From 139777e5c7fb9621456adadc98610feb5549a5de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Grabm=C3=BCller?= Date: Mon, 16 Jul 2001 18:51:11 +0000 Subject: [PATCH 01/38] (scm_char_set_map): Bug-fix: char-set-map was modifying the argument instead of the return value. --- srfi/ChangeLog | 5 +++++ srfi/srfi-14.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/srfi/ChangeLog b/srfi/ChangeLog index 8c2f2c936..081f4eaa8 100644 --- a/srfi/ChangeLog +++ b/srfi/ChangeLog @@ -1,3 +1,8 @@ +2001-07-16 Martin Grabmueller + + (scm_char_set_map): Bug-fix: char-set-map was modifying the + argument instead of the return value. + 2001-07-16 Martin Grabmueller * srfi-14.c: Allocate correct memory size for charsets (32 bytes), diff --git a/srfi/srfi-14.c b/srfi/srfi-14.c index 878349158..14a717a80 100644 --- a/srfi/srfi-14.c +++ b/srfi/srfi-14.c @@ -429,7 +429,7 @@ SCM_DEFINE (scm_char_set_map, "char-set-map", 2, 0, 0, SCM ch = scm_call_1 (proc, SCM_MAKE_CHAR (k)); if (!SCM_CHARP (ch)) SCM_MISC_ERROR ("procedure ~S returned non-char", scm_list_1 (proc)); - SCM_CHARSET_SET (cs, SCM_CHAR (ch)); + SCM_CHARSET_SET (result, SCM_CHAR (ch)); } return result; } From 8b19021c25ec8ead2e1237788160e4d486c017f4 Mon Sep 17 00:00:00 2001 From: Gary Houston Date: Mon, 16 Jul 2001 22:30:25 +0000 Subject: [PATCH 02/38] * srfi-14.scm: export string->char-set!, not string-char-set!. * srfi-14.c (scm_char_set_ref, scm_char_set_cursor_next, scm_end_of_char_set_p): reject negative cursor values. (scm_list_to_char_set, scm_list_to_char_set_x): when reporting type error in list component, omit the position (was always 1). --- srfi/ChangeLog | 11 ++++++++++- srfi/srfi-14.c | 10 +++++----- srfi/srfi-14.scm | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/srfi/ChangeLog b/srfi/ChangeLog index 081f4eaa8..ceadab802 100644 --- a/srfi/ChangeLog +++ b/srfi/ChangeLog @@ -1,3 +1,12 @@ +2001-07-16 Gary Houston + + * srfi-14.scm: export string->char-set!, not string-char-set!. + + * srfi-14.c (scm_char_set_ref, scm_char_set_cursor_next, + scm_end_of_char_set_p): reject negative cursor values. + (scm_list_to_char_set, scm_list_to_char_set_x): when reporting + type error in list component, omit the position (was always 1). + 2001-07-16 Martin Grabmueller (scm_char_set_map): Bug-fix: char-set-map was modifying the @@ -11,7 +20,7 @@ more values. 2001-07-15 Gary Houston - + * srfi-14.c (scm_char_set_hash): recognise 0 instead of #f in the opt arg to give default bound, as in final spec. don't allow negative bounds. diff --git a/srfi/srfi-14.c b/srfi/srfi-14.c index 14a717a80..427ee9e23 100644 --- a/srfi/srfi-14.c +++ b/srfi/srfi-14.c @@ -241,7 +241,7 @@ SCM_DEFINE (scm_char_set_ref, "char-set-ref", 2, 0, 0, int ccursor; SCM_VALIDATE_SMOB (1, cs, charset); - SCM_VALIDATE_INUM_COPY (2, cursor, ccursor); + SCM_VALIDATE_INUM_MIN_COPY (2, cursor, 0, ccursor); if (ccursor >= SCM_CHARSET_SIZE || !SCM_CHARSET_GET (cs, ccursor)) SCM_MISC_ERROR ("invalid character set cursor: ~A", scm_list_1 (cursor)); @@ -260,7 +260,7 @@ SCM_DEFINE (scm_char_set_cursor_next, "char-set-cursor-next", 2, 0, 0, int ccursor; SCM_VALIDATE_SMOB (1, cs, charset); - SCM_VALIDATE_INUM_COPY (2, cursor, ccursor); + SCM_VALIDATE_INUM_MIN_COPY (2, cursor, 0, ccursor); if (ccursor >= SCM_CHARSET_SIZE || !SCM_CHARSET_GET (cs, ccursor)) SCM_MISC_ERROR ("invalid character set cursor: ~A", scm_list_1 (cursor)); @@ -282,7 +282,7 @@ SCM_DEFINE (scm_end_of_char_set_p, "end-of-char-set?", 1, 0, 0, { int ccursor; - SCM_VALIDATE_INUM_COPY (1, cursor, ccursor); + SCM_VALIDATE_INUM_MIN_COPY (1, cursor, 0, ccursor); return SCM_BOOL (ccursor >= SCM_CHARSET_SIZE); } #undef FUNC_NAME @@ -507,7 +507,7 @@ SCM_DEFINE (scm_list_to_char_set, "list->char-set", 1, 1, 0, SCM chr = SCM_CAR (list); int c; - SCM_VALIDATE_CHAR_COPY (1, chr, c); + SCM_VALIDATE_CHAR_COPY (0, chr, c); list = SCM_CDR (list); p[c / sizeof (long)] |= 1 << (c % sizeof (long)); @@ -534,7 +534,7 @@ SCM_DEFINE (scm_list_to_char_set_x, "list->char-set!", 2, 0, 0, SCM chr = SCM_CAR (list); int c; - SCM_VALIDATE_CHAR_COPY (1, chr, c); + SCM_VALIDATE_CHAR_COPY (0, chr, c); list = SCM_CDR (list); p[c / sizeof (long)] |= 1 << (c % sizeof (long)); diff --git a/srfi/srfi-14.scm b/srfi/srfi-14.scm index c123c4dc6..08aa7b71e 100644 --- a/srfi/srfi-14.scm +++ b/srfi/srfi-14.scm @@ -64,7 +64,7 @@ char-set-copy char-set list->char-set list->char-set! - string->char-set string-char-set! + string->char-set string->char-set! char-set-filter char-set-filter! ucs-range->char-set ucs-range->char-set! ->char-set From 8d4ab69245bb9dea59f2bda672c7d995789e7f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Grabm=C3=BCller?= Date: Tue, 17 Jul 2001 05:26:15 +0000 Subject: [PATCH 03/38] * goops/save.scm: Use `re-export' instead of `export' when re-exporting `make-unbound'. --- oop/ChangeLog | 5 +++++ oop/goops/save.scm | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/oop/ChangeLog b/oop/ChangeLog index be51f2c64..0947befbe 100644 --- a/oop/ChangeLog +++ b/oop/ChangeLog @@ -1,3 +1,8 @@ +2001-07-17 Martin Grabmueller + + * goops/save.scm: Use `re-export' instead of `export' when + re-exporting `make-unbound'. + 2001-06-05 Marius Vollmer * goops.scm: Use `re-export' instead of `export' when re-exporting diff --git a/oop/goops/save.scm b/oop/goops/save.scm index 7e937dca5..1597c8e90 100644 --- a/oop/goops/save.scm +++ b/oop/goops/save.scm @@ -48,7 +48,9 @@ :use-module (oop goops util) ) -(export save-objects load-objects restore make-unbound +(re-export make-unbound) + +(export save-objects load-objects restore enumerate! enumerate-component! write-readably write-component write-component-procedure literal? readable make-readable) From 2671725a6539221f4bb34029bcdc3714ff901dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Grabm=C3=BCller?= Date: Tue, 17 Jul 2001 05:35:51 +0000 Subject: [PATCH 04/38] * srfi-14.c: Fix for bug caused by brain-malfunctioning on my side. Bit sets were handled wrong because I couldn't tell bit counts from byte counts. Also, the bit array should be 256 / 8 bytes long. Thank you, Gary! Removed unnecessary protoype for scm_char_set_copy. --- srfi/ChangeLog | 9 +++++++++ srfi/srfi-14.c | 45 ++++++++++++++++++++++----------------------- srfi/srfi-14.h | 9 ++++++++- 3 files changed, 39 insertions(+), 24 deletions(-) diff --git a/srfi/ChangeLog b/srfi/ChangeLog index ceadab802..d8546e8cb 100644 --- a/srfi/ChangeLog +++ b/srfi/ChangeLog @@ -1,3 +1,12 @@ +2001-07-17 Martin Grabmueller + + * srfi-14.c: Fix for bug caused by brain-malfunctioning on my + side. Bit sets were handled wrong because I couldn't tell bit + counts from byte counts. Also, the bit array should be 256 / 8 + bytes long. Thank you, Gary! + + Removed unnecessary protoype for scm_char_set_copy. + 2001-07-16 Gary Houston * srfi-14.scm: export string->char-set!, not string-char-set!. diff --git a/srfi/srfi-14.c b/srfi/srfi-14.c index 427ee9e23..0de7a6ba3 100644 --- a/srfi/srfi-14.c +++ b/srfi/srfi-14.c @@ -50,9 +50,9 @@ #include "srfi-14.h" -#define SCM_CHARSET_SET(cs, idx) (((long *) SCM_SMOB_DATA (cs))[(idx) / sizeof (long)] |= (1 << ((idx) % sizeof (long)))) -SCM scm_char_set_copy (SCM cs); +#define SCM_CHARSET_SET(cs, idx) (((long *) SCM_SMOB_DATA (cs))[(idx) / SCM_BITS_PER_LONG] |= (1 << ((idx) % SCM_BITS_PER_LONG))) + /* Smob type code for character sets. */ int scm_tc16_charset = 0; @@ -94,8 +94,8 @@ make_char_set (const char * func_name) { long * p; - p = scm_must_malloc (SCM_CHARSET_SIZE / sizeof (char), func_name); - memset (p, 0, SCM_CHARSET_SIZE / sizeof (char)); + p = scm_must_malloc (SCM_CHARSET_SIZE / 8, func_name); + memset (p, 0, SCM_CHARSET_SIZE / 8); SCM_RETURN_NEWSMOB (scm_tc16_charset, p); } @@ -131,8 +131,7 @@ SCM_DEFINE (scm_char_set_eq, "char-set=", 0, 0, 1, csi_data = (long *) SCM_SMOB_DATA (csi); if (cs1_data == NULL) cs1_data = csi_data; - else if (memcmp (cs1_data, csi_data, - SCM_CHARSET_SIZE / sizeof (char)) != 0) + else if (memcmp (cs1_data, csi_data, SCM_CHARSET_SIZE / 8) != 0) return SCM_BOOL_F; char_sets = SCM_CDR (char_sets); } @@ -476,7 +475,7 @@ SCM_DEFINE (scm_char_set, "char-set", 0, 0, 1, SCM_VALIDATE_CHAR_COPY (argnum, SCM_CAR (rest), c); argnum++; rest = SCM_CDR (rest); - p[c / sizeof (long)] |= 1 << (c % sizeof (long)); + p[c / SCM_BITS_PER_LONG] |= 1 << (c % SCM_BITS_PER_LONG); } return cs; } @@ -510,7 +509,7 @@ SCM_DEFINE (scm_list_to_char_set, "list->char-set", 1, 1, 0, SCM_VALIDATE_CHAR_COPY (0, chr, c); list = SCM_CDR (list); - p[c / sizeof (long)] |= 1 << (c % sizeof (long)); + p[c / SCM_BITS_PER_LONG] |= 1 << (c % SCM_BITS_PER_LONG); } return cs; } @@ -537,7 +536,7 @@ SCM_DEFINE (scm_list_to_char_set_x, "list->char-set!", 2, 0, 0, SCM_VALIDATE_CHAR_COPY (0, chr, c); list = SCM_CDR (list); - p[c / sizeof (long)] |= 1 << (c % sizeof (long)); + p[c / SCM_BITS_PER_LONG] |= 1 << (c % SCM_BITS_PER_LONG); } return base_cs; } @@ -569,7 +568,7 @@ SCM_DEFINE (scm_string_to_char_set, "string->char-set", 1, 1, 0, while (k < SCM_STRING_LENGTH (str)) { int c = s[k++]; - p[c / sizeof (long)] |= 1 << (c % sizeof (long)); + p[c / SCM_BITS_PER_LONG] |= 1 << (c % SCM_BITS_PER_LONG); } return cs; } @@ -594,7 +593,7 @@ SCM_DEFINE (scm_string_to_char_set_x, "string->char-set!", 2, 0, 0, while (k < SCM_STRING_LENGTH (str)) { int c = s[k++]; - p[c / sizeof (long)] |= 1 << (c % sizeof (long)); + p[c / SCM_BITS_PER_LONG] |= 1 << (c % SCM_BITS_PER_LONG); } return base_cs; } @@ -629,7 +628,7 @@ SCM_DEFINE (scm_char_set_filter, "char-set-filter", 2, 1, 0, SCM res = scm_call_1 (pred, SCM_MAKE_CHAR (k)); if (!SCM_FALSEP (res)) - p[k / sizeof (long)] |= 1 << (k % sizeof (long)); + p[k / SCM_BITS_PER_LONG] |= 1 << (k % SCM_BITS_PER_LONG); } } return ret; @@ -658,7 +657,7 @@ SCM_DEFINE (scm_char_set_filter_x, "char-set-filter!", 3, 0, 0, SCM res = scm_call_1 (pred, SCM_MAKE_CHAR (k)); if (!SCM_FALSEP (res)) - p[k / sizeof (long)] |= 1 << (k % sizeof (long)); + p[k / SCM_BITS_PER_LONG] |= 1 << (k % SCM_BITS_PER_LONG); } } return base_cs; @@ -712,7 +711,7 @@ SCM_DEFINE (scm_ucs_range_to_char_set, "ucs-range->char-set", 2, 2, 0, p = (long *) SCM_SMOB_DATA (cs); while (clower < cupper) { - p[clower / sizeof (long)] |= 1 << (clower % sizeof (long)); + p[clower / SCM_BITS_PER_LONG] |= 1 << (clower % SCM_BITS_PER_LONG); clower++; } return cs; @@ -755,7 +754,7 @@ SCM_DEFINE (scm_ucs_range_to_char_set_x, "ucs-range->char-set!", 4, 0, 0, p = (long *) SCM_SMOB_DATA (base_cs); while (clower < cupper) { - p[clower / sizeof (long)] |= 1 << (clower % sizeof (long)); + p[clower / SCM_BITS_PER_LONG] |= 1 << (clower % SCM_BITS_PER_LONG); clower++; } return base_cs; @@ -928,7 +927,7 @@ SCM_DEFINE (scm_char_set_adjoin, "char-set-adjoin", 1, 0, 1, SCM_VALIDATE_CHAR_COPY (1, chr, c); rest = SCM_CDR (rest); - p[c / sizeof (long)] |= 1 << (c % sizeof (long)); + p[c / SCM_BITS_PER_LONG] |= 1 << (c % SCM_BITS_PER_LONG); } return cs; } @@ -956,7 +955,7 @@ SCM_DEFINE (scm_char_set_delete, "char-set-delete", 1, 0, 1, SCM_VALIDATE_CHAR_COPY (1, chr, c); rest = SCM_CDR (rest); - p[c / sizeof (long)] &= ~(1 << (c % sizeof (long))); + p[c / SCM_BITS_PER_LONG] &= ~(1 << (c % SCM_BITS_PER_LONG)); } return cs; } @@ -983,7 +982,7 @@ SCM_DEFINE (scm_char_set_adjoin_x, "char-set-adjoin!", 1, 0, 1, SCM_VALIDATE_CHAR_COPY (1, chr, c); rest = SCM_CDR (rest); - p[c / sizeof (long)] |= 1 << (c % sizeof (long)); + p[c / SCM_BITS_PER_LONG] |= 1 << (c % SCM_BITS_PER_LONG); } return cs; } @@ -1010,7 +1009,7 @@ SCM_DEFINE (scm_char_set_delete_x, "char-set-delete!", 1, 0, 1, SCM_VALIDATE_CHAR_COPY (1, chr, c); rest = SCM_CDR (rest); - p[c / sizeof (long)] &= ~(1 << (c % sizeof (long))); + p[c / SCM_BITS_PER_LONG] &= ~(1 << (c % SCM_BITS_PER_LONG)); } return cs; } @@ -1129,7 +1128,7 @@ SCM_DEFINE (scm_char_set_difference, "char-set-difference", 1, 0, 1, SCM_DEFINE (scm_char_set_xor, "char-set-xor", 1, 0, 1, (SCM cs1, SCM rest), - "Return the exclusive--or of all argument character sets.") + "Return the exclusive-or of all argument character sets.") #define FUNC_NAME s_scm_char_set_xor { int c = 2; @@ -1296,7 +1295,7 @@ SCM_DEFINE (scm_char_set_difference_x, "char-set-difference!", 1, 0, 1, SCM_DEFINE (scm_char_set_xor_x, "char-set-xor!", 1, 0, 1, (SCM cs1, SCM rest), - "Return the exclusive--or of all argument character sets.") + "Return the exclusive-or of all argument character sets.") #define FUNC_NAME s_scm_char_set_xor_x { int c = 2; @@ -1369,8 +1368,8 @@ scm_c_init_srfi_14 (void) if (!initialized) { - scm_tc16_charset = scm_make_smob_type ("character-set", - SCM_CHARSET_SIZE / sizeof (char)); + scm_tc16_charset = scm_make_smob_type ("character-set", + SCM_CHARSET_SIZE / 8); scm_set_smob_free (scm_tc16_charset, charset_free); scm_set_smob_print (scm_tc16_charset, charset_print); initialized = 1; diff --git a/srfi/srfi-14.h b/srfi/srfi-14.h index 40b355236..2621ba22f 100644 --- a/srfi/srfi-14.h +++ b/srfi/srfi-14.h @@ -48,8 +48,15 @@ #define SCM_CHARSET_SIZE 256 +/* We expect 8-bit bytes here. Shoule be no problem in the year + 2001. */ +#ifndef SCM_BITS_PER_LONG +# define SCM_BITS_PER_LONG (sizeof (long) * 8) +#endif + #define SCM_CHARSET_GET(cs, idx) (((long *) SCM_SMOB_DATA (cs))\ - [(idx) / sizeof (long)] & (1 << ((idx) % sizeof (long)))) + [(idx) / SCM_BITS_PER_LONG] &\ + (1 << ((idx) % SCM_BITS_PER_LONG))) #define SCM_CHARSETP(x) (!SCM_IMP (x) && (SCM_TYP16 (x) == scm_tc16_charset)) From 90ee03daff448f66aea68771dfe1d5df90c052e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Grabm=C3=BCller?= Date: Tue, 17 Jul 2001 18:59:17 +0000 Subject: [PATCH 05/38] * r5rs.scm: Use `re-export' instead of `export' for re-exported primitives. Thanks Neil! --- ice-9/ChangeLog | 5 +++++ ice-9/r5rs.scm | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ice-9/ChangeLog b/ice-9/ChangeLog index ea0fc5b95..90535775c 100644 --- a/ice-9/ChangeLog +++ b/ice-9/ChangeLog @@ -1,3 +1,8 @@ +2001-07-17 Martin Grabmueller + + * r5rs.scm: Use `re-export' instead of `export' for re-exported + primitives. Thanks Neil! + 2001-07-13 Marius Vollmer * safe-r5rs.scm: Use `re-export' instead of `export' for diff --git a/ice-9/r5rs.scm b/ice-9/r5rs.scm index 47dfd59f9..faf75ae9e 100644 --- a/ice-9/r5rs.scm +++ b/ice-9/r5rs.scm @@ -47,18 +47,20 @@ (module-use! %module-public-interface (resolve-interface '(ice-9 safe-r5rs))) (export scheme-report-environment - interaction-environment - - call-with-input-file call-with-output-file - with-input-from-file with-output-to-file - open-input-file open-output-file - close-input-port close-output-port - - load ;;transcript-on ;;transcript-off ) +(re-export interaction-environment + + call-with-input-file call-with-output-file + with-input-from-file with-output-to-file + open-input-file open-output-file + close-input-port close-output-port + + load + ) + (define scheme-report-interface %module-public-interface) (define (scheme-report-environment n) From 4c4185ee9519ef44d0547fcd43deffb7f9bbd0ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Grabm=C3=BCller?= Date: Tue, 17 Jul 2001 19:41:49 +0000 Subject: [PATCH 06/38] * srfi-14.c: Okay. Now I got it. Really. This time it's fixed. Guaranteed. (Maybe) * srfi-19.scm: Define `current-time' before exporting it. --- srfi/ChangeLog | 7 +++++++ srfi/srfi-14.c | 49 +++++++++++++++++++++++++++++------------------- srfi/srfi-19.scm | 13 ++++++++++--- 3 files changed, 47 insertions(+), 22 deletions(-) diff --git a/srfi/ChangeLog b/srfi/ChangeLog index d8546e8cb..5b50721c6 100644 --- a/srfi/ChangeLog +++ b/srfi/ChangeLog @@ -1,3 +1,10 @@ +2001-07-17 Martin Grabmueller + + * srfi-14.c: Okay. Now I got it. Really. This time it's fixed. + Guaranteed. (Maybe) + + * srfi-19.scm: Define `current-time' before exporting it. + 2001-07-17 Martin Grabmueller * srfi-14.c: Fix for bug caused by brain-malfunctioning on my diff --git a/srfi/srfi-14.c b/srfi/srfi-14.c index 0de7a6ba3..7973e61d0 100644 --- a/srfi/srfi-14.c +++ b/srfi/srfi-14.c @@ -54,6 +54,10 @@ #define SCM_CHARSET_SET(cs, idx) (((long *) SCM_SMOB_DATA (cs))[(idx) / SCM_BITS_PER_LONG] |= (1 << ((idx) % SCM_BITS_PER_LONG))) +#define BYTES_PER_CHARSET (SCM_CHARSET_SIZE / 8) +#define LONGS_PER_CHARSET (SCM_CHARSET_SIZE / SCM_BITS_PER_LONG) + + /* Smob type code for character sets. */ int scm_tc16_charset = 0; @@ -94,8 +98,8 @@ make_char_set (const char * func_name) { long * p; - p = scm_must_malloc (SCM_CHARSET_SIZE / 8, func_name); - memset (p, 0, SCM_CHARSET_SIZE / 8); + p = scm_must_malloc (BYTES_PER_CHARSET, func_name); + memset (p, 0, BYTES_PER_CHARSET); SCM_RETURN_NEWSMOB (scm_tc16_charset, p); } @@ -131,7 +135,7 @@ SCM_DEFINE (scm_char_set_eq, "char-set=", 0, 0, 1, csi_data = (long *) SCM_SMOB_DATA (csi); if (cs1_data == NULL) cs1_data = csi_data; - else if (memcmp (cs1_data, csi_data, SCM_CHARSET_SIZE / 8) != 0) + else if (memcmp (cs1_data, csi_data, BYTES_PER_CHARSET) != 0) return SCM_BOOL_F; char_sets = SCM_CDR (char_sets); } @@ -163,7 +167,7 @@ SCM_DEFINE (scm_char_set_leq, "char-set<=", 0, 0, 1, { int k; - for (k = 0; k < SCM_CHARSET_SIZE / sizeof (long); k++) + for (k = 0; k < LONGS_PER_CHARSET; k++) { if ((prev_data[k] & csi_data[k]) != prev_data[k]) return SCM_BOOL_F; @@ -202,7 +206,7 @@ SCM_DEFINE (scm_char_set_hash, "char-set-hash", 1, 1, 0, } p = (long *) SCM_SMOB_DATA (cs); - for (k = 0; k < SCM_CHARSET_SIZE / sizeof (long); k++) + for (k = 0; k < LONGS_PER_CHARSET; k++) { if (p[k] != 0) val = p[k] + (val << 1); @@ -449,7 +453,7 @@ SCM_DEFINE (scm_char_set_copy, "char-set-copy", 1, 0, 0, ret = make_char_set (FUNC_NAME); p1 = (long *) SCM_SMOB_DATA (cs); p2 = (long *) SCM_SMOB_DATA (ret); - for (k = 0; k < SCM_CHARSET_SIZE / sizeof (long); k++) + for (k = 0; k < LONGS_PER_CHARSET; k++) p2[k] = p1[k]; return ret; } @@ -1030,7 +1034,7 @@ SCM_DEFINE (scm_char_set_complement, "char-set-complement", 1, 0, 0, res = make_char_set (FUNC_NAME); p = (long *) SCM_SMOB_DATA (res); q = (long *) SCM_SMOB_DATA (cs); - for (k = 0; k < SCM_CHARSET_SIZE / sizeof (long); k++) + for (k = 0; k < LONGS_PER_CHARSET; k++) p[k] = ~q[k]; return res; } @@ -1058,7 +1062,7 @@ SCM_DEFINE (scm_char_set_union, "char-set-union", 0, 0, 1, c++; rest = SCM_CDR (rest); - for (k = 0; k < SCM_CHARSET_SIZE / sizeof (long); k++) + for (k = 0; k < LONGS_PER_CHARSET; k++) p[k] |= ((long *) SCM_SMOB_DATA (cs))[k]; } return res; @@ -1088,7 +1092,7 @@ SCM_DEFINE (scm_char_set_intersection, "char-set-intersection", 1, 0, 1, c++; rest = SCM_CDR (rest); - for (k = 0; k < SCM_CHARSET_SIZE / sizeof (long); k++) + for (k = 0; k < LONGS_PER_CHARSET; k++) p[k] &= ((long *) SCM_SMOB_DATA (cs))[k]; } return res; @@ -1118,7 +1122,7 @@ SCM_DEFINE (scm_char_set_difference, "char-set-difference", 1, 0, 1, c++; rest = SCM_CDR (rest); - for (k = 0; k < SCM_CHARSET_SIZE / sizeof (long); k++) + for (k = 0; k < LONGS_PER_CHARSET; k++) p[k] &= ~((long *) SCM_SMOB_DATA (cs))[k]; } return res; @@ -1148,7 +1152,7 @@ SCM_DEFINE (scm_char_set_xor, "char-set-xor", 1, 0, 1, c++; rest = SCM_CDR (rest); - for (k = 0; k < SCM_CHARSET_SIZE / sizeof (long); k++) + for (k = 0; k < LONGS_PER_CHARSET; k++) p[k] ^= ((long *) SCM_SMOB_DATA (cs))[k]; } return res; @@ -1181,7 +1185,7 @@ SCM_DEFINE (scm_char_set_diff_plus_intersection, "char-set-diff+intersection", 1 c++; rest = SCM_CDR (rest); - for (k = 0; k < SCM_CHARSET_SIZE / sizeof (long); k++) + for (k = 0; k < LONGS_PER_CHARSET; k++) { p[k] &= ~((long *) SCM_SMOB_DATA (cs))[k]; q[k] &= ((long *) SCM_SMOB_DATA (cs))[k]; @@ -1202,7 +1206,7 @@ SCM_DEFINE (scm_char_set_complement_x, "char-set-complement!", 1, 0, 0, SCM_VALIDATE_SMOB (1, cs, charset); p = (long *) SCM_SMOB_DATA (cs); - for (k = 0; k < SCM_CHARSET_SIZE / sizeof (long); k++) + for (k = 0; k < LONGS_PER_CHARSET; k++) p[k] = ~p[k]; return cs; } @@ -1229,7 +1233,7 @@ SCM_DEFINE (scm_char_set_union_x, "char-set-union!", 1, 0, 1, c++; rest = SCM_CDR (rest); - for (k = 0; k < SCM_CHARSET_SIZE / sizeof (long); k++) + for (k = 0; k < LONGS_PER_CHARSET; k++) p[k] |= ((long *) SCM_SMOB_DATA (cs))[k]; } return cs1; @@ -1257,7 +1261,7 @@ SCM_DEFINE (scm_char_set_intersection_x, "char-set-intersection!", 1, 0, 1, c++; rest = SCM_CDR (rest); - for (k = 0; k < SCM_CHARSET_SIZE / sizeof (long); k++) + for (k = 0; k < LONGS_PER_CHARSET; k++) p[k] &= ((long *) SCM_SMOB_DATA (cs))[k]; } return cs1; @@ -1285,7 +1289,7 @@ SCM_DEFINE (scm_char_set_difference_x, "char-set-difference!", 1, 0, 1, c++; rest = SCM_CDR (rest); - for (k = 0; k < SCM_CHARSET_SIZE / sizeof (long); k++) + for (k = 0; k < LONGS_PER_CHARSET; k++) p[k] &= ~((long *) SCM_SMOB_DATA (cs))[k]; } return cs1; @@ -1313,7 +1317,7 @@ SCM_DEFINE (scm_char_set_xor_x, "char-set-xor!", 1, 0, 1, c++; rest = SCM_CDR (rest); - for (k = 0; k < SCM_CHARSET_SIZE / sizeof (long); k++) + for (k = 0; k < LONGS_PER_CHARSET; k++) p[k] ^= ((long *) SCM_SMOB_DATA (cs))[k]; } return cs1; @@ -1345,7 +1349,7 @@ SCM_DEFINE (scm_char_set_diff_plus_intersection_x, "char-set-diff+intersection!" c++; rest = SCM_CDR (rest); - for (k = 0; k < SCM_CHARSET_SIZE / sizeof (long); k++) + for (k = 0; k < LONGS_PER_CHARSET; k++) { p[k] &= ~((long *) SCM_SMOB_DATA (cs))[k]; q[k] &= ((long *) SCM_SMOB_DATA (cs))[k]; @@ -1369,7 +1373,7 @@ scm_c_init_srfi_14 (void) if (!initialized) { scm_tc16_charset = scm_make_smob_type ("character-set", - SCM_CHARSET_SIZE / 8); + BYTES_PER_CHARSET); scm_set_smob_free (scm_tc16_charset, charset_free); scm_set_smob_print (scm_tc16_charset, charset_print); initialized = 1; @@ -1382,6 +1386,13 @@ scm_c_init_srfi_14 (void) void scm_init_srfi_14 (void) { +#if 0 + fprintf(stderr, "bytes-per-charset: %d\n", BYTES_PER_CHARSET); + fprintf(stderr, "bits-per-long: %d\n", SCM_BITS_PER_LONG); + fprintf(stderr, "longs-per-charset: %d\n", LONGS_PER_CHARSET); + fflush (stderr); +#endif /* 0 */ + /* Do the smob type initialization. */ scm_c_init_srfi_14 (); diff --git a/srfi/srfi-19.scm b/srfi/srfi-19.scm index d95ba9a5c..6a1a5a268 100644 --- a/srfi/srfi-19.scm +++ b/srfi/srfi-19.scm @@ -60,8 +60,15 @@ (define-module (srfi srfi-19) :use-module (srfi srfi-6) :use-module (srfi srfi-8) - :use-module (srfi srfi-9) - :export (;; Constants + :use-module (srfi srfi-9)) + +(begin-deprecated + ;; Prevent `export' from re-exporting core bindings. This behaviour + ;; of `export' is deprecated and will disappear in one of the next + ;; releases. + (define current-time #f)) + +(export ;; Constants time-duration time-monotonic time-process @@ -147,7 +154,7 @@ time-utc->time-tai! ;; Date to string/string to date converters. date->string - string->date)) + string->date) (cond-expand-provide (current-module) '(srfi-19)) From 6b80d352020fe34468cdeecf153fcecc51cc3980 Mon Sep 17 00:00:00 2001 From: Dirk Herrmann Date: Wed, 18 Jul 2001 10:14:29 +0000 Subject: [PATCH 07/38] * A couple of minor cleanups. --- libguile/ChangeLog | 52 ++++++++ libguile/goops.c | 315 ++++++++++++++++++++++++--------------------- 2 files changed, 223 insertions(+), 144 deletions(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index b1663b21f..f0d3576a6 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,55 @@ +2001-07-17 Dirk Herrmann + + * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print, + sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2, + sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name, + sym_direct_supers, sym_direct_slots, sym_direct_subclasses, + sym_direct_methods, sym_cpl, sym_default_slot_definition_class, + sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields, + sym_environment, scm_sym_change_class): New static variables to + hold predefined symbols. + + (build_class_class_slots): Build the list using scm_list_n + instead of cons. Also, slots are already created as lists, thus + making a call to maplist unnecessary. + + (scm_class_name, scm_class_direct_supers, scm_class_direct_slots, + scm_class_direct_subclasses, scm_class_direct_methods, + scm_class_precedence_list, scm_class_slots, scm_class_environment, + scm_method_procedure, create_standard_classes, purgatory): Use + predefined symbols. + + (build_slots_list, compute_getters_n_setters, + scm_sys_initialize_object, scm_sys_inherit_magic_x, + get_slot_value_using_name, set_slot_value_using_name, + scm_sys_invalidate_method_cache_x, scm_generic_capability_p, + scm_compute_applicable_methods, scm_sys_method_more_specific_p, + make_struct_class): Prefer !SCM_ over SCM_N. + + (scm_sys_prep_layout_x): Minimize variable scopes. + + (scm_sys_prep_layout_x, scm_sys_fast_slot_ref, + scm_sys_fast_slot_set_x): Fix signedness. + + (go_to_hell, go_to_heaven, purgatory, scm_change_object_class, + lock_cache_mutex, unlock_cache_mutex, call_memoize_method, + scm_memoize_method, scm_wrap_object): Use packing and unpacking + when converting to and from SCM values. + + (scm_enable_primitive_generic_x): Add rest argument checking. + + (map, filter_cpl, maplist, scm_sys_initialize_object, + scm_sys_prep_layout_x, slot_definition_using_name, + scm_enable_primitive_generic_x, scm_compute_applicable_methods, + call_memoize_method, scm_make, scm_make_class): Prefer explicit + predicates over SCM_N?IMP tests. + + (scm_sys_prep_layout_x): Fix typo in error message. Fix type + checking. + + (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST + alias. + 2001-07-16 Dirk Herrmann * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs. diff --git a/libguile/goops.c b/libguile/goops.c index 13a677218..8e147bea9 100644 --- a/libguile/goops.c +++ b/libguile/goops.c @@ -185,27 +185,28 @@ compute_cpl (SCM supers, SCM res) static SCM map (SCM (*proc) (SCM), SCM ls) { - if (SCM_IMP (ls)) + if (SCM_NULLP (ls)) return ls; - { - SCM res = scm_cons (proc (SCM_CAR (ls)), SCM_EOL); - SCM h = res; - ls = SCM_CDR (ls); - while (SCM_NIMP (ls)) - { - SCM_SETCDR (h, scm_cons (proc (SCM_CAR (ls)), SCM_EOL)); - h = SCM_CDR (h); - ls = SCM_CDR (ls); - } - return res; - } + else + { + SCM res = scm_cons (proc (SCM_CAR (ls)), SCM_EOL); + SCM h = res; + ls = SCM_CDR (ls); + while (!SCM_NULLP (ls)) + { + SCM_SETCDR (h, scm_cons (proc (SCM_CAR (ls)), SCM_EOL)); + h = SCM_CDR (h); + ls = SCM_CDR (ls); + } + return res; + } } static SCM filter_cpl (SCM ls) { SCM res = SCM_EOL; - while (SCM_NIMP (ls)) + while (!SCM_NULLP (ls)) { SCM el = SCM_CAR (ls); if (SCM_FALSEP (scm_c_memq (el, res))) @@ -260,7 +261,7 @@ build_slots_list (SCM dslots, SCM cpl) { register SCM res = dslots; - for (cpl = SCM_CDR(cpl); SCM_NNULLP(cpl); cpl = SCM_CDR(cpl)) + for (cpl = SCM_CDR (cpl); !SCM_NULLP (cpl); cpl = SCM_CDR (cpl)) res = scm_append (scm_list_2 (SCM_SLOT (SCM_CAR (cpl), scm_si_direct_slots), res)); @@ -273,7 +274,7 @@ static SCM maplist (SCM ls) { SCM orig = ls; - while (SCM_NIMP (ls)) + while (!SCM_NULLP (ls)) { if (!SCM_CONSP (SCM_CAR (ls))) SCM_SETCAR (ls, scm_cons (SCM_CAR (ls), SCM_EOL)); @@ -316,11 +317,11 @@ compute_getters_n_setters (SCM slots) SCM *cdrloc = &res; long i = 0; - for ( ; SCM_NNULLP(slots); slots = SCM_CDR(slots)) + for ( ; !SCM_NULLP (slots); slots = SCM_CDR (slots)) { SCM init = SCM_BOOL_F; SCM options = SCM_CDAR (slots); - if (SCM_NNULLP (options)) + if (!SCM_NULLP (options)) { init = scm_get_keyword (k_init_value, options, 0); if (init) @@ -411,13 +412,13 @@ SCM_DEFINE (scm_sys_initialize_object, "%initialize-object", 2, 0, 0, /* See for each slot how it must be initialized */ for (; - SCM_NNULLP (slots); + !SCM_NULLP (slots); get_n_set = SCM_CDR (get_n_set), slots = SCM_CDR (slots)) { SCM slot_name = SCM_CAR (slots); SCM slot_value = 0; - if (SCM_NIMP (SCM_CDR (slot_name))) + if (!SCM_NULLP (SCM_CDR (slot_name))) { /* This slot admits (perhaps) to be initialized at creation time */ long n = scm_ilength (SCM_CDR (slot_name)); @@ -479,9 +480,9 @@ SCM_DEFINE (scm_sys_prep_layout_x, "%prep-layout!", 1, 0, 0, "") #define FUNC_NAME s_scm_sys_prep_layout_x { - long i, n, len; - char *s, p, a; - SCM nfields, slots, type; + SCM slots, nfields; + unsigned long int n, i; + char *s; SCM_VALIDATE_INSTANCE (1, class); slots = SCM_SLOT (class, scm_si_slots); @@ -495,35 +496,49 @@ SCM_DEFINE (scm_sys_prep_layout_x, "%prep-layout!", 1, 0, 0, SCM_MISC_ERROR ("class object doesn't have enough fields: ~S", scm_list_1 (nfields)); - s = n > 0 ? scm_must_malloc (n, FUNC_NAME) : 0; + s = n > 0 ? scm_must_malloc (n, FUNC_NAME) : 0; for (i = 0; i < n; i += 2) { + long len; + SCM type; + char p, a; + if (!SCM_CONSP (slots)) - SCM_MISC_ERROR ("to few slot definitions", SCM_EOL); + SCM_MISC_ERROR ("too few slot definitions", SCM_EOL); len = scm_ilength (SCM_CDAR (slots)); type = scm_i_get_keyword (k_class, SCM_CDAR (slots), len, SCM_BOOL_F, FUNC_NAME); - if (SCM_NIMP (type) && SCM_SUBCLASSP (type, scm_class_foreign_slot)) - { - if (SCM_SUBCLASSP (type, scm_class_self)) - p = 's'; - else if (SCM_SUBCLASSP (type, scm_class_protected)) - p = 'p'; - else - p = 'u'; - - if (SCM_SUBCLASSP (type, scm_class_opaque)) - a = 'o'; - else if (SCM_SUBCLASSP (type, scm_class_read_only)) - a = 'r'; - else - a = 'w'; - } - else + if (SCM_FALSEP (type)) { p = 'p'; a = 'w'; } + else + { + if (!SCM_CLASSP (type)) + SCM_MISC_ERROR ("bad slot class", SCM_EOL); + else if (SCM_SUBCLASSP (type, scm_class_foreign_slot)) + { + if (SCM_SUBCLASSP (type, scm_class_self)) + p = 's'; + else if (SCM_SUBCLASSP (type, scm_class_protected)) + p = 'p'; + else + p = 'u'; + + if (SCM_SUBCLASSP (type, scm_class_opaque)) + a = 'o'; + else if (SCM_SUBCLASSP (type, scm_class_read_only)) + a = 'r'; + else + a = 'w'; + } + else + { + p = 'p'; + a = 'w'; + } + } s[i] = p; s[i + 1] = a; slots = SCM_CDR (slots); @@ -545,7 +560,7 @@ SCM_DEFINE (scm_sys_inherit_magic_x, "%inherit-magic!", 2, 0, 0, SCM ls = dsupers; long flags = 0; SCM_VALIDATE_INSTANCE (1, class); - while (SCM_NNULLP (ls)) + while (!SCM_NULLP (ls)) { SCM_ASSERT (SCM_CONSP (ls) && SCM_INSTANCEP (SCM_CAR (ls)), @@ -658,64 +673,67 @@ scm_basic_make_class (SCM class, SCM name, SCM dsupers, SCM dslots) /******************************************************************************/ +SCM_SYMBOL (sym_layout, "layout"); +SCM_SYMBOL (sym_vcell, "vcell"); +SCM_SYMBOL (sym_vtable, "vtable"); +SCM_SYMBOL (sym_print, "print"); +SCM_SYMBOL (sym_procedure, "procedure"); +SCM_SYMBOL (sym_setter, "setter"); +SCM_SYMBOL (sym_redefined, "redefined"); +SCM_SYMBOL (sym_h0, "h0"); +SCM_SYMBOL (sym_h1, "h1"); +SCM_SYMBOL (sym_h2, "h2"); +SCM_SYMBOL (sym_h3, "h3"); +SCM_SYMBOL (sym_h4, "h4"); +SCM_SYMBOL (sym_h5, "h5"); +SCM_SYMBOL (sym_h6, "h6"); +SCM_SYMBOL (sym_h7, "h7"); +SCM_SYMBOL (sym_name, "name"); +SCM_SYMBOL (sym_direct_supers, "direct-supers"); +SCM_SYMBOL (sym_direct_slots, "direct-slots"); +SCM_SYMBOL (sym_direct_subclasses, "direct-subclasses"); +SCM_SYMBOL (sym_direct_methods, "direct-methods"); +SCM_SYMBOL (sym_cpl, "cpl"); +SCM_SYMBOL (sym_default_slot_definition_class, "default-slot-definition-class"); +SCM_SYMBOL (sym_slots, "slots"); +SCM_SYMBOL (sym_getters_n_setters, "getters-n-setters"); +SCM_SYMBOL (sym_keyword_access, "keyword-access"); +SCM_SYMBOL (sym_nfields, "nfields"); +SCM_SYMBOL (sym_environment, "environment"); + + static SCM build_class_class_slots () { - return maplist ( - scm_cons (scm_list_3 (scm_str2symbol ("layout"), - k_class, - scm_class_protected_read_only), - scm_cons (scm_list_3 (scm_str2symbol ("vcell"), - k_class, - scm_class_opaque), - scm_cons (scm_list_3 (scm_str2symbol ("vtable"), - k_class, - scm_class_self), - scm_cons (scm_str2symbol ("print"), - scm_cons (scm_list_3 (scm_str2symbol ("procedure"), - k_class, - scm_class_protected_opaque), - scm_cons (scm_list_3 (scm_str2symbol ("setter"), - k_class, - scm_class_protected_opaque), - scm_cons (scm_str2symbol ("redefined"), - scm_cons (scm_list_3 (scm_str2symbol ("h0"), - k_class, - scm_class_int), - scm_cons (scm_list_3 (scm_str2symbol ("h1"), - k_class, - scm_class_int), - scm_cons (scm_list_3 (scm_str2symbol ("h2"), - k_class, - scm_class_int), - scm_cons (scm_list_3 (scm_str2symbol ("h3"), - k_class, - scm_class_int), - scm_cons (scm_list_3 (scm_str2symbol ("h4"), - k_class, - scm_class_int), - scm_cons (scm_list_3 (scm_str2symbol ("h5"), - k_class, - scm_class_int), - scm_cons (scm_list_3 (scm_str2symbol ("h6"), - k_class, - scm_class_int), - scm_cons (scm_list_3 (scm_str2symbol ("h7"), - k_class, - scm_class_int), - scm_cons (scm_str2symbol ("name"), - scm_cons (scm_str2symbol ("direct-supers"), - scm_cons (scm_str2symbol ("direct-slots"), - scm_cons (scm_str2symbol ("direct-subclasses"), - scm_cons (scm_str2symbol ("direct-methods"), - scm_cons (scm_str2symbol ("cpl"), - scm_cons (scm_str2symbol ("default-slot-definition-class"), - scm_cons (scm_str2symbol ("slots"), - scm_cons (scm_str2symbol ("getters-n-setters"), /* name-access */ - scm_cons (scm_str2symbol ("keyword-access"), - scm_cons (scm_str2symbol ("nfields"), - scm_cons (scm_str2symbol ("environment"), - SCM_EOL)))))))))))))))))))))))))))); + return scm_list_n ( + scm_list_3 (sym_layout, k_class, scm_class_protected_read_only), + scm_list_3 (sym_vcell, k_class, scm_class_opaque), + scm_list_3 (sym_vtable, k_class, scm_class_self), + scm_list_1 (sym_print), + scm_list_3 (sym_procedure, k_class, scm_class_protected_opaque), + scm_list_3 (sym_setter, k_class, scm_class_protected_opaque), + scm_list_1 (sym_redefined), + scm_list_3 (sym_h0, k_class, scm_class_int), + scm_list_3 (sym_h1, k_class, scm_class_int), + scm_list_3 (sym_h2, k_class, scm_class_int), + scm_list_3 (sym_h3, k_class, scm_class_int), + scm_list_3 (sym_h4, k_class, scm_class_int), + scm_list_3 (sym_h5, k_class, scm_class_int), + scm_list_3 (sym_h6, k_class, scm_class_int), + scm_list_3 (sym_h7, k_class, scm_class_int), + scm_list_1 (sym_name), + scm_list_1 (sym_direct_supers), + scm_list_1 (sym_direct_slots), + scm_list_1 (sym_direct_subclasses), + scm_list_1 (sym_direct_methods), + scm_list_1 (sym_cpl), + scm_list_1 (sym_default_slot_definition_class), + scm_list_1 (sym_slots), + scm_list_1 (sym_getters_n_setters), + scm_list_1 (sym_keyword_access), + scm_list_1 (sym_nfields), + scm_list_1 (sym_environment), + SCM_UNDEFINED); } static void @@ -799,7 +817,7 @@ SCM_DEFINE (scm_class_name, "class-name", 1, 0, 0, #define FUNC_NAME s_scm_class_name { SCM_VALIDATE_CLASS (1, obj); - return scm_slot_ref (obj, scm_str2symbol ("name")); + return scm_slot_ref (obj, sym_name); } #undef FUNC_NAME @@ -809,7 +827,7 @@ SCM_DEFINE (scm_class_direct_supers, "class-direct-supers", 1, 0, 0, #define FUNC_NAME s_scm_class_direct_supers { SCM_VALIDATE_CLASS (1, obj); - return scm_slot_ref (obj, scm_str2symbol ("direct-supers")); + return scm_slot_ref (obj, sym_direct_supers); } #undef FUNC_NAME @@ -819,7 +837,7 @@ SCM_DEFINE (scm_class_direct_slots, "class-direct-slots", 1, 0, 0, #define FUNC_NAME s_scm_class_direct_slots { SCM_VALIDATE_CLASS (1, obj); - return scm_slot_ref (obj, scm_str2symbol ("direct-slots")); + return scm_slot_ref (obj, sym_direct_slots); } #undef FUNC_NAME @@ -829,7 +847,7 @@ SCM_DEFINE (scm_class_direct_subclasses, "class-direct-subclasses", 1, 0, 0, #define FUNC_NAME s_scm_class_direct_subclasses { SCM_VALIDATE_CLASS (1, obj); - return scm_slot_ref(obj, scm_str2symbol ("direct-subclasses")); + return scm_slot_ref(obj, sym_direct_subclasses); } #undef FUNC_NAME @@ -839,7 +857,7 @@ SCM_DEFINE (scm_class_direct_methods, "class-direct-methods", 1, 0, 0, #define FUNC_NAME s_scm_class_direct_methods { SCM_VALIDATE_CLASS (1, obj); - return scm_slot_ref (obj, scm_str2symbol ("direct-methods")); + return scm_slot_ref (obj, sym_direct_methods); } #undef FUNC_NAME @@ -849,7 +867,7 @@ SCM_DEFINE (scm_class_precedence_list, "class-precedence-list", 1, 0, 0, #define FUNC_NAME s_scm_class_precedence_list { SCM_VALIDATE_CLASS (1, obj); - return scm_slot_ref (obj, scm_str2symbol ("cpl")); + return scm_slot_ref (obj, sym_cpl); } #undef FUNC_NAME @@ -859,7 +877,7 @@ SCM_DEFINE (scm_class_slots, "class-slots", 1, 0, 0, #define FUNC_NAME s_scm_class_slots { SCM_VALIDATE_CLASS (1, obj); - return scm_slot_ref (obj, scm_str2symbol ("slots")); + return scm_slot_ref (obj, sym_slots); } #undef FUNC_NAME @@ -869,7 +887,7 @@ SCM_DEFINE (scm_class_environment, "class-environment", 1, 0, 0, #define FUNC_NAME s_scm_class_environment { SCM_VALIDATE_CLASS (1, obj); - return scm_slot_ref(obj, scm_str2symbol ("environment")); + return scm_slot_ref(obj, sym_environment); } #undef FUNC_NAME @@ -921,7 +939,7 @@ SCM_DEFINE (scm_method_procedure, "method-procedure", 1, 0, 0, #define FUNC_NAME s_scm_method_procedure { SCM_VALIDATE_METHOD (1, obj); - return scm_slot_ref (obj, scm_str2symbol ("procedure")); + return scm_slot_ref (obj, sym_procedure); } #undef FUNC_NAME @@ -998,13 +1016,14 @@ SCM_DEFINE (scm_sys_fast_slot_ref, "%fast-slot-ref", 2, 0, 0, "Return the slot value with index @var{index} from @var{obj}.") #define FUNC_NAME s_scm_sys_fast_slot_ref { - register long i; + unsigned long int i; SCM_VALIDATE_INSTANCE (1, obj); SCM_VALIDATE_INUM (2, index); + SCM_ASSERT_RANGE (2, index, SCM_INUM (index) >= 0); i = SCM_INUM (index); - - SCM_ASSERT_RANGE (2, index, i >= 0 && i < SCM_NUMBER_OF_SLOTS (obj)); + SCM_ASSERT_RANGE (2, index, i < SCM_NUMBER_OF_SLOTS (obj)); + return scm_at_assert_bound_ref (obj, index); } #undef FUNC_NAME @@ -1015,12 +1034,14 @@ SCM_DEFINE (scm_sys_fast_slot_set_x, "%fast-slot-set!", 3, 0, 0, "@var{value}.") #define FUNC_NAME s_scm_sys_fast_slot_set_x { - register long i; + unsigned long int i; SCM_VALIDATE_INSTANCE (1, obj); SCM_VALIDATE_INUM (2, index); + SCM_ASSERT_RANGE (2, index, SCM_INUM (index) >= 0); i = SCM_INUM (index); - SCM_ASSERT_RANGE (2, index, i >= 0 && i < SCM_NUMBER_OF_SLOTS (obj)); + SCM_ASSERT_RANGE (2, index, i < SCM_NUMBER_OF_SLOTS (obj)); + SCM_SET_SLOT (obj, i, value); return SCM_UNSPECIFIED; @@ -1040,7 +1061,7 @@ static SCM slot_definition_using_name (SCM class, SCM slot_name) { register SCM slots = SCM_SLOT (class, scm_si_getters_n_setters); - for (; SCM_NIMP (slots); slots = SCM_CDR (slots)) + for (; !SCM_NULLP (slots); slots = SCM_CDR (slots)) if (SCM_CAAR (slots) == slot_name) return SCM_CAR (slots); return SCM_BOOL_F; @@ -1077,7 +1098,7 @@ static SCM get_slot_value_using_name (SCM class, SCM obj, SCM slot_name) { SCM slotdef = slot_definition_using_name (class, slot_name); - if (SCM_NFALSEP (slotdef)) + if (!SCM_FALSEP (slotdef)) return get_slot_value (class, obj, slotdef); else return CALL_GF3 ("slot-missing", class, obj, slot_name); @@ -1118,7 +1139,7 @@ static SCM set_slot_value_using_name (SCM class, SCM obj, SCM slot_name, SCM value) { SCM slotdef = slot_definition_using_name (class, slot_name); - if (SCM_NFALSEP (slotdef)) + if (!SCM_FALSEP (slotdef)) return set_slot_value (class, obj, slotdef, value); else return CALL_GF4 ("slot-missing", class, obj, slot_name, value); @@ -1475,7 +1496,7 @@ burnin (SCM o) { long i; for (i = 1; i < n_hell; ++i) - if (SCM_INST (o) == hell[i]) + if (SCM_STRUCT_DATA (o) == hell[i]) return i; return 0; } @@ -1483,7 +1504,7 @@ burnin (SCM o) static void go_to_hell (void *o) { - SCM obj = (SCM) o; + SCM obj = SCM_PACK ((scm_t_bits) o); #ifdef USE_THREADS scm_mutex_lock (&hell_mutex); #endif @@ -1493,7 +1514,7 @@ go_to_hell (void *o) hell = scm_must_realloc (hell, hell_size, new_size, "hell"); hell_size = new_size; } - hell[n_hell++] = SCM_INST (obj); + hell[n_hell++] = SCM_STRUCT_DATA (obj); #ifdef USE_THREADS scm_mutex_unlock (&hell_mutex); #endif @@ -1505,16 +1526,20 @@ go_to_heaven (void *o) #ifdef USE_THREADS scm_mutex_lock (&hell_mutex); #endif - hell[burnin ((SCM) o)] = hell[--n_hell]; + hell[burnin (SCM_PACK ((scm_t_bits) o))] = hell[--n_hell]; #ifdef USE_THREADS scm_mutex_unlock (&hell_mutex); #endif } + +SCM_SYMBOL (scm_sym_change_class, "change-class"); + static SCM purgatory (void *args) { - return scm_apply_0 (GETVAR (scm_str2symbol ("change-class")), (SCM) args); + return scm_apply_0 (GETVAR (scm_sym_change_class), + SCM_PACK ((scm_t_bits) args)); } void @@ -1522,8 +1547,8 @@ scm_change_object_class (SCM obj, SCM old_class SCM_UNUSED, SCM new_class) { if (!burnin (obj)) scm_internal_dynamic_wind (go_to_hell, purgatory, go_to_heaven, - (void *) scm_list_2 (obj, new_class), - (void *) obj); + (void *) SCM_UNPACK (scm_list_2 (obj, new_class)), + (void *) SCM_UNPACK (obj)); } /****************************************************************************** @@ -1577,7 +1602,7 @@ SCM_DEFINE (scm_sys_invalidate_method_cache_x, "%invalidate-method-cache!", 1, 0 SCM used_by; SCM_ASSERT (SCM_PUREGENERICP (gf), gf, SCM_ARG1, FUNC_NAME); used_by = SCM_SLOT (gf, scm_si_used_by); - if (SCM_NFALSEP (used_by)) + if (!SCM_FALSEP (used_by)) { SCM methods = SCM_SLOT (gf, scm_si_methods); for (; SCM_CONSP (used_by); used_by = SCM_CDR (used_by)) @@ -1600,7 +1625,7 @@ SCM_DEFINE (scm_generic_capability_p, "generic-capability?", 1, 0, 0, "") #define FUNC_NAME s_scm_generic_capability_p { - SCM_ASSERT (SCM_NFALSEP (scm_procedure_p (proc)), + SCM_ASSERT (!SCM_FALSEP (scm_procedure_p (proc)), proc, SCM_ARG1, FUNC_NAME); return (scm_subr_p (proc) && SCM_SUBR_GENERIC (proc) ? SCM_BOOL_T @@ -1613,7 +1638,8 @@ SCM_DEFINE (scm_enable_primitive_generic_x, "enable-primitive-generic!", 0, 0, 1 "") #define FUNC_NAME s_scm_enable_primitive_generic_x { - while (SCM_NIMP (subrs)) + SCM_VALIDATE_REST_ARGUMENT (subrs); + while (!SCM_NULLP (subrs)) { SCM subr = SCM_CAR (subrs); SCM_ASSERT (scm_subr_p (subr) && SCM_SUBR_GENERIC (subr), @@ -1805,16 +1831,16 @@ scm_compute_applicable_methods (SCM gf, SCM args, long len, int find_method_p) else types = p = buffer; - for ( ; SCM_NNULLP (args); args = SCM_CDR (args)) + for ( ; !SCM_NULLP (args); args = SCM_CDR (args)) *p++ = scm_class_of (SCM_CAR (args)); /* Build a list of all applicable methods */ - for (l = SCM_SLOT (gf, scm_si_methods); SCM_NNULLP (l); l = SCM_CDR (l)) + for (l = SCM_SLOT (gf, scm_si_methods); !SCM_NULLP (l); l = SCM_CDR (l)) { fl = SPEC_OF (SCM_CAR (l)); /* Only accept accessors which match exactly in first arg. */ if (SCM_ACCESSORP (SCM_CAR (l)) - && (SCM_IMP (fl) || types[0] != SCM_CAR (fl))) + && (SCM_NULLP (fl) || types[0] != SCM_CAR (fl))) continue; for (i = 0; ; i++, fl = SCM_CDR (fl)) { @@ -1927,14 +1953,14 @@ scm_m_atdispatch (SCM xorig, SCM env) static void lock_cache_mutex (void *m) { - SCM mutex = (SCM) m; + SCM mutex = SCM_PACK ((scm_t_bits) m); scm_lock_mutex (mutex); } static void unlock_cache_mutex (void *m) { - SCM mutex = (SCM) m; + SCM mutex = SCM_PACK ((scm_t_bits) m); scm_unlock_mutex (mutex); } #endif @@ -1942,14 +1968,14 @@ unlock_cache_mutex (void *m) static SCM call_memoize_method (void *a) { - SCM args = (SCM) a; + SCM args = SCM_PACK ((scm_t_bits) a); SCM gf = SCM_CAR (args); SCM x = SCM_CADR (args); /* First check if another thread has inserted a method between * the cache miss and locking the mutex. */ SCM cmethod = scm_mcache_lookup_cmethod (x, SCM_CDDR (args)); - if (SCM_NIMP (cmethod)) + if (!SCM_FALSEP (cmethod)) return cmethod; /*fixme* Use scm_apply */ return CALL_GF3 ("memoize-method!", gf, SCM_CDDR (args), x); @@ -1960,13 +1986,14 @@ scm_memoize_method (SCM x, SCM args) { SCM gf = SCM_CAR (scm_last_pair (x)); #ifdef USE_THREADS - return scm_internal_dynamic_wind (lock_cache_mutex, - call_memoize_method, - unlock_cache_mutex, - (void *) scm_cons2 (gf, x, args), - (void *) SCM_SLOT (gf, scm_si_cache_mutex)); + return scm_internal_dynamic_wind ( + lock_cache_mutex, + call_memoize_method, + unlock_cache_mutex, + (void *) SCM_UNPACK (scm_cons2 (gf, x, args)), + (void *) SCM_UNPACK (SCM_SLOT (gf, scm_si_cache_mutex))); #else - return call_memoize_method ((void *) scm_cons2 (gf, x, args)); + return call_memoize_method ((void *) SCM_UNPACK (scm_cons2 (gf, x, args))); #endif } @@ -2022,7 +2049,7 @@ SCM_DEFINE (scm_make, "make", 0, 0, 1, if (class == scm_class_generic_with_setter) { SCM setter = scm_get_keyword (k_setter, args, SCM_BOOL_F); - if (SCM_NIMP (setter)) + if (!SCM_FALSEP (setter)) scm_sys_set_object_setter_x (z, setter); } } @@ -2116,7 +2143,7 @@ SCM_DEFINE (scm_sys_method_more_specific_p, "%method-more-specific?", 3, 0, 0, /* Verify that all the arguments of targs are classes and place them in a vector*/ v = scm_c_make_vector (len, SCM_EOL); - for (i=0, l=targs; SCM_NNULLP(l); i++, l=SCM_CDR(l)) { + for (i = 0, l = targs; !SCM_NULLP (l); i++, l = SCM_CDR (l)) { SCM_ASSERT (SCM_CLASSP (SCM_CAR (l)), targs, SCM_ARG3, FUNC_NAME); SCM_VELTS(v)[i] = SCM_CAR(l); } @@ -2156,7 +2183,7 @@ create_standard_classes (void) SCM slots; SCM method_slots = scm_list_4 (scm_str2symbol ("generic-function"), scm_str2symbol ("specializers"), - scm_str2symbol ("procedure"), + sym_procedure, scm_str2symbol ("code-table")); SCM amethod_slots = scm_list_1 (scm_list_3 (scm_str2symbol ("slot-definition"), k_init_keyword, @@ -2415,7 +2442,7 @@ static SCM make_struct_class (void *closure SCM_UNUSED, SCM key SCM_UNUSED, SCM data, SCM prev SCM_UNUSED) { - if (SCM_NFALSEP (SCM_STRUCT_TABLE_NAME (data))) + if (!SCM_FALSEP (SCM_STRUCT_TABLE_NAME (data))) SCM_SET_STRUCT_TABLE_CLASS (data, scm_make_extended_class (SCM_SYMBOL_CHARS (SCM_STRUCT_TABLE_NAME (data)))); @@ -2470,7 +2497,7 @@ scm_make_class (SCM meta, char *s_name, SCM supers, size_t size, { SCM name, class; name = scm_str2symbol (s_name); - if (SCM_IMP (supers)) + if (SCM_NULLP (supers)) supers = scm_list_1 (scm_class_foreign_object); class = scm_basic_basic_make_class (meta, name, supers, SCM_EOL); scm_sys_inherit_magic_x (class, supers); @@ -2565,7 +2592,7 @@ scm_wrap_object (SCM class, void *data) { SCM z; SCM_NEWCELL2 (z); - SCM_SETCDR (z, (SCM) data); + SCM_SETCDR (z, SCM_PACK ((scm_t_bits) data)); SCM_SET_STRUCT_GC_CHAIN (z, 0); SCM_SETCAR (z, SCM_UNPACK (SCM_CDR (class)) | scm_tc3_cons_gloc); return z; From 7bcbb3f235cf9739676ddb92866a9c6767465cc2 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Thu, 19 Jul 2001 17:43:14 +0000 Subject: [PATCH 08/38] * scmsigs.h (scm_init_scmsigs): new prototype. (scm_init_scmsigs): new prototype. --- libguile/scmsigs.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libguile/scmsigs.h b/libguile/scmsigs.h index 347ed8b03..06fc129d5 100644 --- a/libguile/scmsigs.h +++ b/libguile/scmsigs.h @@ -50,6 +50,10 @@ extern SCM scm_sigaction (SCM signum, SCM handler, SCM flags); extern SCM scm_restore_signals (void); extern SCM scm_alarm (SCM i); +extern SCM scm_setitimer (SCM which_timer, + SCM interval_seconds, SCM interval_microseconds, + SCM value_seconds, SCM value_microseconds); +extern SCM scm_getitimer (SCM which_timer); extern SCM scm_pause (void); extern SCM scm_sleep (SCM i); extern SCM scm_usleep (SCM i); From 53f8a0d20e30590a54eab6ed6aed7e3d1526c558 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Thu, 19 Jul 2001 17:43:22 +0000 Subject: [PATCH 09/38] * scmsigs.c (s_scm_setitimer): new function. (s_scm_setitimer): new function. --- libguile/scmsigs.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c index 62a0cd99f..ef3e80c68 100644 --- a/libguile/scmsigs.c +++ b/libguile/scmsigs.c @@ -415,6 +415,89 @@ SCM_DEFINE (scm_alarm, "alarm", 1, 0, 0, } #undef FUNC_NAME +#ifdef HAVE_SETITIMER +SCM_DEFINE (scm_setitimer, "setitimer", 5, 0, 0, + (SCM which_timer, + SCM interval_seconds, SCM interval_microseconds, + SCM value_seconds, SCM value_microseconds), + "Set the timer specified by @var{which_timer} according to the given\n" + "@var{interval_seconds}, @var{interval_microseconds},\n" + "@var{value_seconds}, and @var{value_microseconds} values.\n" + "\n" + "Return information about the timer's previous setting." + "\n" + "Errors are handled as described in the guile info pages under ``POSIX\n" + "Interface Conventions''.\n" + "\n" + "The timers available are: @code{ITIMER_REAL}, @code{ITIMER_VIRTUAL}, \n" + "and @code{ITIMER_PROF}.\n" + "\n" + "The return value will be a list of two cons pairs representing the\n" + "current state of the given timer. The first pair is the seconds and\n" + "microseconds of the timer @code{it_interval}, and the second pair is\n" + "the seconds and microseconds of the timer @code{it_value}.\n") +#define FUNC_NAME s_scm_setitimer +{ + int rv; + int c_which_timer; + struct itimerval new_timer; + struct itimerval old_timer; + + c_which_timer = SCM_NUM2INT(1, which_timer); + new_timer.it_interval.tv_sec = SCM_NUM2LONG(2, interval_seconds); + new_timer.it_interval.tv_usec = SCM_NUM2LONG(3, interval_microseconds); + new_timer.it_value.tv_sec = SCM_NUM2LONG(4, value_seconds); + new_timer.it_value.tv_usec = SCM_NUM2LONG(5, value_microseconds); + + SCM_SYSCALL(rv = setitimer(c_which_timer, &new_timer, &old_timer)); + + if(rv != 0) + SCM_SYSERROR; + + return scm_list_2(scm_cons(scm_long2num(old_timer.it_interval.tv_sec), + scm_long2num(old_timer.it_interval.tv_usec)), + scm_cons(scm_long2num(old_timer.it_value.tv_sec), + scm_long2num(old_timer.it_value.tv_usec))); +} +#undef FUNC_NAME +#endif /* HAVE_SETITIMER */ + +#ifdef HAVE_GETITIMER +SCM_DEFINE (scm_getitimer, "getitimer", 1, 0, 0, + (SCM which_timer), + "Return information about the timer specified by @var{which_timer}" + "\n" + "Errors are handled as described in the guile info pages under ``POSIX\n" + "Interface Conventions''.\n" + "\n" + "The timers available are: @code{ITIMER_REAL}, @code{ITIMER_VIRTUAL}, \n" + "and @code{ITIMER_PROF}.\n" + "\n" + "The return value will be a list of two cons pairs representing the\n" + "current state of the given timer. The first pair is the seconds and\n" + "microseconds of the timer @code{it_interval}, and the second pair is\n" + "the seconds and microseconds of the timer @code{it_value}.\n") +#define FUNC_NAME s_scm_getitimer +{ + int rv; + int c_which_timer; + struct itimerval old_timer; + + c_which_timer = SCM_NUM2INT(1, which_timer); + + SCM_SYSCALL(rv = getitimer(c_which_timer, &old_timer)); + + if(rv != 0) + SCM_SYSERROR; + + return scm_list_2(scm_cons(scm_long2num(old_timer.it_interval.tv_sec), + scm_long2num(old_timer.it_interval.tv_usec)), + scm_cons(scm_long2num(old_timer.it_value.tv_sec), + scm_long2num(old_timer.it_value.tv_usec))); +} +#undef FUNC_NAME +#endif /* HAVE_GETITIMER */ + #ifdef HAVE_PAUSE SCM_DEFINE (scm_pause, "pause", 0, 0, 0, (), @@ -552,6 +635,13 @@ scm_init_scmsigs () scm_c_define ("SA_RESTART", scm_long2num (SA_RESTART)); #endif +#if defined(HAVE_SETITIMER) || defined(HAVE_GETITIMER) + /* Stuff needed by setitimer and getitimer. */ + scm_c_define ("ITIMER_REAL", SCM_MAKINUM (ITIMER_REAL)); + scm_c_define ("ITIMER_VIRTUAL", SCM_MAKINUM (ITIMER_VIRTUAL)); + scm_c_define ("ITIMER_PROF", SCM_MAKINUM (ITIMER_PROF)); +#endif /* defined(HAVE_SETITIMER) || defined(HAVE_GETITIMER) */ + #ifndef SCM_MAGIC_SNARFER #include "libguile/scmsigs.x" #endif From f28108ee142c8c05c4273342a051e3018de22343 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Thu, 19 Jul 2001 17:43:34 +0000 Subject: [PATCH 10/38] * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning. --- libguile/gc_os_dep.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libguile/gc_os_dep.c b/libguile/gc_os_dep.c index d05105a63..ab392729d 100644 --- a/libguile/gc_os_dep.c +++ b/libguile/gc_os_dep.c @@ -62,8 +62,11 @@ typedef int GC_bool; # define VOLATILE #endif +#if 0 /* currently unused (as of 2001-07-12) */ + /* Single argument version, robust against whole program analysis. */ -static void GC_noop1(x) +static void +GC_noop1(x) word x; { static VOLATILE word sink; @@ -71,6 +74,8 @@ word x; sink = x; } +#endif + /* Machine dependent parameters. Some tuning parameters can be found */ /* near the top of gc_private.h. */ From e80bea704d370ad1e58f53229599bac153f16a74 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Thu, 19 Jul 2001 17:45:01 +0000 Subject: [PATCH 11/38] * c-tokenize.lex: add option %nounput to quiet warning. Add prototype for yylex to quiet warning. --- libguile/c-tokenize.lex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libguile/c-tokenize.lex b/libguile/c-tokenize.lex index 9c6c9387d..b48354c32 100644 --- a/libguile/c-tokenize.lex +++ b/libguile/c-tokenize.lex @@ -1,4 +1,5 @@ %option noyywrap +%option nounput %pointer EOL \n @@ -18,6 +19,8 @@ INTQUAL (l|L|ll|LL|lL|Ll|u|U) #include #include +int yylex(void); + int filter_snarfage = 0; int print = 1; From 0aaac665d52d5c98a96c94cffba3d3829c94d33d Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Thu, 19 Jul 2001 17:46:22 +0000 Subject: [PATCH 12/38] * box-module/.cvsignore: add .deps. --- examples/box-module/.cvsignore | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/box-module/.cvsignore b/examples/box-module/.cvsignore index 282522db0..051d1bd50 100644 --- a/examples/box-module/.cvsignore +++ b/examples/box-module/.cvsignore @@ -1,2 +1,3 @@ Makefile Makefile.in +.deps From 363902dbb2a3202ae3464793e3de956c2709652b Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Thu, 19 Jul 2001 17:46:30 +0000 Subject: [PATCH 13/38] * box/.cvsignore: add .deps. --- examples/box/.cvsignore | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/box/.cvsignore b/examples/box/.cvsignore index 282522db0..051d1bd50 100644 --- a/examples/box/.cvsignore +++ b/examples/box/.cvsignore @@ -1,2 +1,3 @@ Makefile Makefile.in +.deps From 8afd1a2a62c27f5d1b3bab76bcf799769952427d Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Thu, 19 Jul 2001 17:46:42 +0000 Subject: [PATCH 14/38] * configure.in: add checks for setitimer and getitimer. Add --enable-error-on-warning. --- configure.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index f51e4c4ce..78a0bf7c6 100644 --- a/configure.in +++ b/configure.in @@ -43,6 +43,14 @@ AC_CONFIG_SUBDIRS(guile-readline) # #-------------------------------------------------------------------- +AC_ARG_ENABLE(error-on-warning, + [ --enable-error-on-warning treat compile warnings as errors], + [case "${enableval}" in + yes | y) CFLAGS="${CFLAGS} -Werror"; enable_compile_warnings=no ;; + no | n) ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;; + esac]) + AC_ARG_ENABLE(debug-freelist, [ --enable-debug-freelist include garbage collector freelist debugging code], if test "$enable_debug_freelist" = y || test "$enable_debug_freelist" = yes; then @@ -232,7 +240,7 @@ AC_SUBST(INCLTDL) AC_SUBST(LIBLTDL) AC_SUBST(DLPREOPEN) -AC_CHECK_FUNCS(ctermid ftime fchown getcwd geteuid gettimeofday lstat mkdir mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid strdup system usleep atexit on_exit chown link fcntl ttyname getpwent getgrent kill getppid getpgrp fork) +AC_CHECK_FUNCS(ctermid ftime fchown getcwd geteuid gettimeofday lstat mkdir mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid strdup system usleep atexit on_exit chown link fcntl ttyname getpwent getgrent kill getppid getpgrp fork setitimer getitimer) AC_CHECK_HEADERS(crypt.h sys/resource.h sys/file.h) AC_CHECK_FUNCS(chroot flock getlogin cuserid getpriority setpriority getpass sethostname gethostname) From e658215a980c61f20bf858143361123570768c1d Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Thu, 19 Jul 2001 17:47:08 +0000 Subject: [PATCH 15/38] *** empty log message *** --- ChangeLog | 5 +++++ NEWS | 5 +++++ libguile/ChangeLog | 15 +++++++++++++++ 3 files changed, 25 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3af3aa9cd..0c98e8c21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-07-19 Rob Browning + + * configure.in: add checks for setitimer and getitimer. + Add --enable-error-on-warning. + 2001-07-15 Thien-Thi Nguyen * HACKING: Remove onerous authorship-info deletion clause. diff --git a/NEWS b/NEWS index 6247523a7..01d04af58 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,11 @@ The new configure option `--enable-deprecated=LEVEL' and the environment variable GUILE_WARN_DEPRECATED control this mechanism. See INSTALL and README for more information. +** New functions: setitimer and getitimer. + +These implement a fairly direct interface to the libc functions of the +same name. + ** The #. reader extension is now disabled by default. For safety reasons, #. evaluation is disabled by default. To diff --git a/libguile/ChangeLog b/libguile/ChangeLog index f0d3576a6..56abc6eda 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,18 @@ +2001-07-19 Rob Browning + + * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning. + + * c-tokenize.lex: add option %nounput to quiet warning. + Add prototype for yylex to quiet warning. + + * scmconfig.h.in: add flags for setitimer and getitimer. + + * scmsigs.h (scm_init_scmsigs): new prototype. + (scm_init_scmsigs): new prototype. + + * scmsigs.c (s_scm_setitimer): new function. + (s_scm_setitimer): new function. + 2001-07-17 Dirk Herrmann * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print, From 41d6c85b29279aa0a0091083826eb627f2ce6252 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Thu, 19 Jul 2001 17:58:27 +0000 Subject: [PATCH 16/38] * posix.texi (Signals): add docs for setitimer and getitimer. --- doc/posix.texi | 2304 ------------------------------------------------ 1 file changed, 2304 deletions(-) diff --git a/doc/posix.texi b/doc/posix.texi index a823bc360..e69de29bb 100644 --- a/doc/posix.texi +++ b/doc/posix.texi @@ -1,2304 +0,0 @@ -@node POSIX -@chapter POSIX System Calls and Networking - -@menu -* Conventions:: Conventions employed by the POSIX interface. -* Ports and File Descriptors:: Scheme ``ports'' and Unix file descriptors - have different representations. -* File System:: stat, chown, chmod, etc. -* User Information:: Retrieving a user's GECOS (/etc/passwd) entry. -* Time:: gettimeofday, localtime, strftime, etc. -* Runtime Environment:: Accessing and modifying Guile's environment. -* Processes:: getuid, getpid, etc. -* Signals:: sigaction, kill, pause, alarm, etc. -* Terminals and Ptys:: ttyname, tcsetpgrp, etc. -* Pipes:: Communicating data between processes. -* Networking:: gethostbyaddr, getnetent, socket, bind, listen. -* System Identification:: Obtaining information about the system. -* Locales:: setlocale, etc. -* Encryption:: -@end menu - -@node Conventions -@section POSIX Interface Conventions - -These interfaces provide access to operating system facilities. -They provide a simple wrapping around the underlying C interfaces -to make usage from Scheme more convenient. They are also used -to implement the Guile port of @ref{The Scheme shell (scsh)}. - -Generally there is a single procedure for each corresponding Unix -facility. There are some exceptions, such as procedures implemented for -speed and convenience in Scheme with no primitive Unix equivalent, -e.g., @code{copy-file}. - -The interfaces are intended as far as possible to be portable across -different versions of Unix. In some cases procedures which can't be -implemented on particular systems may become no-ops, or perform limited -actions. In other cases they may throw errors. - -General naming conventions are as follows: - -@itemize @bullet -@item -The Scheme name is often identical to the name of the underlying Unix -facility. -@item -Underscores in Unix procedure names are converted to hyphens. -@item -Procedures which destructively modify Scheme data have exclaimation -marks appended, e.g., @code{recv!}. -@item -Predicates (returning only @code{#t} or @code{#f}) have question marks -appended, e.g., @code{access?}. -@item -Some names are changed to avoid conflict with dissimilar interfaces -defined by scsh, e.g., @code{primitive-fork}. -@item -Unix preprocessor names such as @code{EPERM} or @code{R_OK} are converted -to Scheme variables of the same name (underscores are not replaced -with hyphens). -@end itemize - -Unexpected conditions are generally handled by raising exceptions. -There are a few procedures which return a special value if they don't -succeed, e.g., @code{getenv} returns @code{#f} if it the requested -string is not found in the environment. These cases are noted in -the documentation. - -For ways to deal with exceptions, @ref{Exceptions}. - -Errors which the C-library would report by returning a NULL pointer or -through some other means are reported by raising a @code{system-error} -exception. The value of the Unix @code{errno} variable is available -in the data passed by the exception. - -It can be extracted with the function @code{system-error-errno}: - -@example -(catch - 'system-error - (lambda () - (mkdir "/this-ought-to-fail-if-I'm-not-root")) - (lambda stuff - (let ((errno (system-error-errno stuff))) - (cond - ((= errno EACCES) - (display "You're not allowed to do that.")) - ((= errno EEXIST) - (display "Already exists.")) - (#t - (display (strerror errno)))) - (newline)))) -@end example - -@node Ports and File Descriptors -@section Ports and File Descriptors - -Conventions generally follow those of scsh, @ref{The Scheme shell (scsh)}. - -File ports are implemented using low-level operating system I/O -facilities, with optional buffering to improve efficiency -@pxref{File Ports} - -Note that some procedures (e.g., @code{recv!}) will accept ports as -arguments, but will actually operate directly on the file descriptor -underlying the port. Any port buffering is ignored, including the -buffer which implements @code{peek-char} and @code{unread-char}. - -The @code{force-output} and @code{drain-input} procedures can be used -to clear the buffers. - -Each open file port has an associated operating system file descriptor. -File descriptors are generally not useful in Scheme programs; however -they may be needed when interfacing with foreign code and the Unix -environment. - -A file descriptor can be extracted from a port and a new port can be -created from a file descriptor. However a file descriptor is just an -integer and the garbage collector doesn't recognise it as a reference -to the port. If all other references to the port were dropped, then -it's likely that the garbage collector would free the port, with the -side-effect of closing the file descriptor prematurely. - -To assist the programmer in avoiding this problem, each port has an -associated "revealed count" which can be used to keep track of how many -times the underlying file descriptor has been stored in other places. -If a port's revealed count is greater than zero, the file descriptor -will not be closed when the port is gabage collected. A programmer -can therefore ensure that the revealed count will be greater than -zero if the file descriptor is needed elsewhere. - -For the simple case where a file descriptor is "imported" once to become -a port, it does not matter if the file descriptor is closed when the -port is garbage collected. There is no need to maintain a revealed -count. Likewise when "exporting" a file descriptor to the external -environment, setting the revealed count is not required provided the -port is kept open (i.e., is pointed to by a live Scheme binding) while -the file descriptor is in use. - -To correspond with traditional Unix behaviour, the three file -descriptors (0, 1 and 2) are automatically imported when a program -starts up and assigned to the initial values of the current input, -output and error ports. The revealed count for each is initially set to -one, so that dropping references to one of these ports will not result -in its garbage collection: it could be retrieved with fdopen or -fdes->ports. - -@deffn primitive port-revealed port -Return the revealed count for @var{port}. -@end deffn - -@deffn primitive set-port-revealed! port rcount -Sets the revealed count for a port to a given value. -The return value is unspecified. -@end deffn - -@deffn primitive fileno port -Return the integer file descriptor underlying @var{port}. Does -not change its revealed count. -@end deffn - -@deffn procedure port->fdes port -Returns the integer file descriptor underlying @var{port}. As a -side effect the revealed count of @var{port} is incremented. -@end deffn - -@deffn primitive fdopen fdes modes -Return a new port based on the file descriptor @var{fdes}. -Modes are given by the string @var{modes}. The revealed count -of the port is initialized to zero. The modes string is the -same as that accepted by @ref{File Ports, open-file}. -@end deffn - -@deffn primitive fdes->ports fd -Return a list of existing ports which have @var{fdes} as an -underlying file descriptor, without changing their revealed -counts. -@end deffn - -@deffn procedure fdes->inport fdes -Returns an existing input port which has @var{fdes} as its underlying file -descriptor, if one exists, and increments its revealed count. -Otherwise, returns a new input port with a revealed count of 1. -@end deffn - -@deffn procedure fdes->outport fdes -Returns an existing output port which has @var{fdes} as its underlying file -descriptor, if one exists, and increments its revealed count. -Otherwise, returns a new output port with a revealed count of 1. -@end deffn - -@deffn primitive primitive-move->fdes port fd -Moves the underlying file descriptor for @var{port} to the integer -value @var{fdes} without changing the revealed count of @var{port}. -Any other ports already using this descriptor will be automatically -shifted to new descriptors and their revealed counts reset to zero. -The return value is @code{#f} if the file descriptor already had the -required value or @code{#t} if it was moved. -@end deffn - -@deffn procedure move->fdes port fdes -Moves the underlying file descriptor for @var{port} to the integer -value @var{fdes} and sets its revealed count to one. Any other ports -already using this descriptor will be automatically -shifted to new descriptors and their revealed counts reset to zero. -The return value is unspecified. -@end deffn - -@deffn procedure release-port-handle port -Decrements the revealed count for a port. -@end deffn - -@deffn primitive fsync object -Copies any unwritten data for the specified output file descriptor to disk. -If @var{port/fd} is a port, its buffer is flushed before the underlying -file descriptor is fsync'd. -The return value is unspecified. -@end deffn - -@deffn primitive open path flags [mode] -Open the file named by @var{path} for reading and/or writing. -@var{flags} is an integer specifying how the file should be opened. -@var{mode} is an integer specifying the permission bits of the file, if -it needs to be created, before the umask is applied. The default is 666 -(Unix itself has no default). - -@var{flags} can be constructed by combining variables using @code{logior}. -Basic flags are: - -@defvar O_RDONLY -Open the file read-only. -@end defvar -@defvar O_WRONLY -Open the file write-only. -@end defvar -@defvar O_RDWR -Open the file read/write. -@end defvar -@defvar O_APPEND -Append to the file instead of truncating. -@end defvar -@defvar O_CREAT -Create the file if it does not already exist. -@end defvar - -See the Unix documentation of the @code{open} system call -for additional flags. -@end deffn - -@deffn primitive open-fdes path flags [mode] -Similar to @code{open} but return a file descriptor instead of -a port. -@end deffn - -@deffn primitive close fd_or_port -Similar to close-port (@pxref{Closing, close-port}), but also works on -file descriptors. A side effect of closing a file descriptor is that -any ports using that file descriptor are moved to a different file -descriptor and have their revealed counts set to zero. -@end deffn - -@deffn primitive close-fdes fd -A simple wrapper for the @code{close} system call. -Close file descriptor @var{fd}, which must be an integer. -Unlike close (@pxref{Ports and File Descriptors, close}), -the file descriptor will be closed even if a port is using it. -The return value is unspecified. -@end deffn - -@deffn primitive unread-char char [port] -Place @var{char} in @var{port} so that it will be read by the -next read operation. If called multiple times, the unread characters -will be read again in last-in first-out order. If @var{port} is -not supplied, the current input port is used. -@end deffn - -@deffn primitive unread-string str port -Place the string @var{str} in @var{port} so that its characters will be -read in subsequent read operations. If called multiple times, the -unread characters will be read again in last-in first-out order. If -@var{port} is not supplied, the current-input-port is used. -@end deffn - -@deffn primitive pipe -Return a newly created pipe: a pair of ports which are linked -together on the local machine. The @emph{car} is the input -port and the @emph{cdr} is the output port. Data written (and -flushed) to the output port can be read from the input port. -Pipes are commonly used for communication with a newly forked -child process. The need to flush the output port can be -avoided by making it unbuffered using @code{setvbuf}. - -Writes occur atomically provided the size of the data in bytes -is not greater than the value of @code{PIPE_BUF}. Note that -the output port is likely to block if too much data (typically -equal to @code{PIPE_BUF}) has been written but not yet read -from the input port. -@end deffn - -The next group of procedures perform a @code{dup2} -system call, if @var{newfd} (an -integer) is supplied, otherwise a @code{dup}. The file descriptor to be -duplicated can be supplied as an integer or contained in a port. The -type of value returned varies depending on which procedure is used. - -All procedures also have the side effect when performing @code{dup2} that any -ports using @var{newfd} are moved to a different file descriptor and have -their revealed counts set to zero. - -@deffn primitive dup->fdes fd_or_port [fd] -Return a new integer file descriptor referring to the open file -designated by @var{fd_or_port}, which must be either an open -file port or a file descriptor. -@end deffn - -@deffn procedure dup->inport port/fd [newfd] -Returns a new input port using the new file descriptor. -@end deffn - -@deffn procedure dup->outport port/fd [newfd] -Returns a new output port using the new file descriptor. -@end deffn - -@deffn procedure dup port/fd [newfd] -Returns a new port if @var{port/fd} is a port, with the same mode as the -supplied port, otherwise returns an integer file descriptor. -@end deffn - -@deffn procedure dup->port port/fd mode [newfd] -Returns a new port using the new file descriptor. @var{mode} supplies a -mode string for the port (@pxref{File Ports, open-file}). -@end deffn - -@deffn procedure duplicate-port port modes -Returns a new port which is opened on a duplicate of the file -descriptor underlying @var{port}, with mode string @var{modes} -as for @ref{File Ports, open-file}. The two ports -will share a file position and file status flags. - -Unexpected behaviour can result if both ports are subsequently used -and the original and/or duplicate ports are buffered. -The mode string can include @code{0} to obtain an unbuffered duplicate -port. - -This procedure is equivalent to @code{(dup->port @var{port} @var{modes})}. -@end deffn - -@deffn primitive redirect-port old new -This procedure takes two ports and duplicates the underlying file -descriptor from @var{old-port} into @var{new-port}. The -current file descriptor in @var{new-port} will be closed. -After the redirection the two ports will share a file position -and file status flags. - -The return value is unspecified. - -Unexpected behaviour can result if both ports are subsequently used -and the original and/or duplicate ports are buffered. - -This procedure does not have any side effects on other ports or -revealed counts. -@end deffn - -@deffn primitive dup2 oldfd newfd -A simple wrapper for the @code{dup2} system call. -Copies the file descriptor @var{oldfd} to descriptor -number @var{newfd}, replacing the previous meaning -of @var{newfd}. Both @var{oldfd} and @var{newfd} must -be integers. -Unlike for dup->fdes or primitive-move->fdes, no attempt -is made to move away ports which are using @var{newfd}. -The return value is unspecified. -@end deffn - -@deffn primitive port-mode port -Return the port modes associated with the open port @var{port}. -These will not necessarily be identical to the modes used when -the port was opened, since modes such as "append" which are -used only during port creation are not retained. -@end deffn - -@deffn primitive close-all-ports-except . ports -[DEPRECATED] Close all open file ports used by the interpreter -except for those supplied as arguments. This procedure -was intended to be used before an exec call to close file descriptors -which are not needed in the new process. However it has the -undesirable side-effect of flushing buffes, so it's deprecated. -Use port-for-each instead. -@end deffn - -@deffn primitive port-for-each proc -Apply @var{proc} to each port in the Guile port table -in turn. The return value is unspecified. More specifically, -@var{proc} is applied exactly once to every port that exists -in the system at the time @var{port-for-each} is invoked. -Changes to the port table while @var{port-for-each} is running -have no effect as far as @var{port-for-each} is concerned. -@end deffn - -@deffn primitive setvbuf port mode [size] -Set the buffering mode for @var{port}. @var{mode} can be: -@table @code -@item _IONBF -non-buffered -@item _IOLBF -line buffered -@item _IOFBF -block buffered, using a newly allocated buffer of @var{size} bytes. -If @var{size} is omitted, a default size will be used. -@end table -@end deffn - -@deffn primitive fcntl object cmd [value] -Apply @var{command} to the specified file descriptor or the underlying -file descriptor of the specified port. @var{value} is an optional -integer argument. - -Values for @var{command} are: - -@table @code -@item F_DUPFD -Duplicate a file descriptor -@item F_GETFD -Get flags associated with the file descriptor. -@item F_SETFD -Set flags associated with the file descriptor to @var{value}. -@item F_GETFL -Get flags associated with the open file. -@item F_SETFL -Set flags associated with the open file to @var{value} -@item F_GETOWN -Get the process ID of a socket's owner, for @code{SIGIO} signals. -@item F_SETOWN -Set the process that owns a socket to @var{value}, for @code{SIGIO} signals. -@item FD_CLOEXEC -The value used to indicate the "close on exec" flag with @code{F_GETFL} or -@code{F_SETFL}. -@end table -@end deffn - -@deffn primitive flock file operation -Apply or remove an advisory lock on an open file. -@var{operation} specifies the action to be done: -@table @code -@item LOCK_SH -Shared lock. More than one process may hold a shared lock -for a given file at a given time. -@item LOCK_EX -Exclusive lock. Only one process may hold an exclusive lock -for a given file at a given time. -@item LOCK_UN -Unlock the file. -@item LOCK_NB -Don't block when locking. May be specified by bitwise OR'ing -it to one of the other operations. -@end table -The return value is not specified. @var{file} may be an open -file descriptor or an open file descriptior port. -@end deffn - -@deffn primitive select reads writes excepts [secs [usecs]] -This procedure has a variety of uses: waiting for the ability -to provide input, accept output, or the existance of -exceptional conditions on a collection of ports or file -descriptors, or waiting for a timeout to occur. -It also returns if interrupted by a signal. - -@var{reads}, @var{writes} and @var{excepts} can be lists or -vectors, with each member a port or a file descriptor. -The value returned is a list of three corresponding -lists or vectors containing only the members which meet the -specified requirement. The ability of port buffers to -provide input or accept output is taken into account. -Ordering of the input lists or vectors is not preserved. - -The optional arguments @var{secs} and @var{usecs} specify the -timeout. Either @var{secs} can be specified alone, as -either an integer or a real number, or both @var{secs} and -@var{usecs} can be specified as integers, in which case -@var{usecs} is an additional timeout expressed in -microseconds. If @var{secs} is omitted or is @code{#f} then -select will wait for as long as it takes for one of the other -conditions to be satisfied. - -The scsh version of @code{select} differs as follows: -Only vectors are accepted for the first three arguments. -The @var{usecs} argument is not supported. -Multiple values are returned instead of a list. -Duplicates in the input vectors appear only once in output. -An additional @code{select!} interface is provided. -@end deffn - -@node File System -@section File System - -These procedures allow querying and setting file system attributes -(such as owner, -permissions, sizes and types of files); deleting, copying, renaming and -linking files; creating and removing directories and querying their -contents; syncing the file system and creating special files. - -@deffn primitive access? path how -Return @code{#t} if @var{path} corresponds to an existing file -and the current process has the type of access specified by -@var{how}, otherwise @code{#f}. @var{how} should be specified -using the values of the variables listed below. Multiple -values can be combined using a bitwise or, in which case -@code{#t} will only be returned if all accesses are granted. - -Permissions are checked using the real id of the current -process, not the effective id, although it's the effective id -which determines whether the access would actually be granted. - -@defvar R_OK -test for read permission. -@end defvar -@defvar W_OK -test for write permission. -@end defvar -@defvar X_OK -test for execute permission. -@end defvar -@defvar F_OK -test for existence of the file. -@end defvar -@end deffn - -@findex fstat -@deffn primitive stat object -Return an object containing various information about the file -determined by @var{obj}. @var{obj} can be a string containing -a file name or a port or integer file descriptor which is open -on a file (in which case @code{fstat} is used as the underlying -system call). - -The object returned by @code{stat} can be passed as a single -parameter to the following procedures, all of which return -integers: - -@table @code -@item stat:dev -The device containing the file. -@item stat:ino -The file serial number, which distinguishes this file from all -other files on the same device. -@item stat:mode -The mode of the file. This includes file type information and -the file permission bits. See @code{stat:type} and -@code{stat:perms} below. -@item stat:nlink -The number of hard links to the file. -@item stat:uid -The user ID of the file's owner. -@item stat:gid -The group ID of the file. -@item stat:rdev -Device ID; this entry is defined only for character or block -special files. -@item stat:size -The size of a regular file in bytes. -@item stat:atime -The last access time for the file. -@item stat:mtime -The last modification time for the file. -@item stat:ctime -The last modification time for the attributes of the file. -@item stat:blksize -The optimal block size for reading or writing the file, in -bytes. -@item stat:blocks -The amount of disk space that the file occupies measured in -units of 512 byte blocks. -@end table - -In addition, the following procedures return the information -from stat:mode in a more convenient form: - -@table @code -@item stat:type -A symbol representing the type of file. Possible values are -regular, directory, symlink, block-special, char-special, fifo, -socket and unknown -@item stat:perms -An integer representing the access permission bits. -@end table -@end deffn - -@deffn primitive lstat str -Similar to @code{stat}, but does not follow symbolic links, i.e., -it will return information about a symbolic link itself, not the -file it points to. @var{path} must be a string. -@end deffn - -@deffn primitive readlink path -Return the value of the symbolic link named by @var{path} (a -string), i.e., the file that the link points to. -@end deffn - -@findex fchown -@findex lchown -@deffn primitive chown object owner group -Change the ownership and group of the file referred to by @var{object} to -the integer values @var{owner} and @var{group}. @var{object} can be -a string containing a file name or, if the platform -supports fchown, a port or integer file descriptor -which is open on the file. The return value -is unspecified. - -If @var{object} is a symbolic link, either the -ownership of the link or the ownership of the referenced file will be -changed depending on the operating system (lchown is -unsupported at present). If @var{owner} or @var{group} is specified -as @code{-1}, then that ID is not changed. -@end deffn - -@findex fchmod -@deffn primitive chmod object mode -Changes the permissions of the file referred to by @var{obj}. -@var{obj} can be a string containing a file name or a port or integer file -descriptor which is open on a file (in which case @code{fchmod} is used -as the underlying system call). -@var{mode} specifies -the new permissions as a decimal number, e.g., @code{(chmod "foo" #o755)}. -The return value is unspecified. -@end deffn - -@deffn primitive utime pathname [actime [modtime]] -@code{utime} sets the access and modification times for the -file named by @var{path}. If @var{actime} or @var{modtime} is -not supplied, then the current time is used. @var{actime} and -@var{modtime} must be integer time values as returned by the -@code{current-time} procedure. -@lisp -(utime "foo" (- (current-time) 3600)) -@end lisp -will set the access time to one hour in the past and the -modification time to the current time. -@end deffn - -@findex unlink -@deffn primitive delete-file str -Deletes (or "unlinks") the file specified by @var{path}. -@end deffn - -@deffn primitive copy-file oldfile newfile -Copy the file specified by @var{path-from} to @var{path-to}. -The return value is unspecified. -@end deffn - -@findex rename -@deffn primitive rename-file oldname newname -Renames the file specified by @var{oldname} to @var{newname}. -The return value is unspecified. -@end deffn - -@deffn primitive link oldpath newpath -Creates a new name @var{newpath} in the file system for the -file named by @var{oldpath}. If @var{oldpath} is a symbolic -link, the link may or may not be followed depending on the -system. -@end deffn - -@deffn primitive symlink oldpath newpath -Create a symbolic link named @var{path-to} with the value (i.e., pointing to) -@var{path-from}. The return value is unspecified. -@end deffn - -@deffn primitive mkdir path [mode] -Create a new directory named by @var{path}. If @var{mode} is omitted -then the permissions of the directory file are set using the current -umask. Otherwise they are set to the decimal value specified with -@var{mode}. The return value is unspecified. -@end deffn - -@deffn primitive rmdir path -Remove the existing directory named by @var{path}. The directory must -be empty for this to succeed. The return value is unspecified. -@end deffn - -@deffn primitive opendir dirname -Open the directory specified by @var{path} and return a directory -stream. -@end deffn - -@deffn primitive directory-stream? obj -Return a boolean indicating whether @var{object} is a directory -stream as returned by @code{opendir}. -@end deffn - -@deffn primitive readdir port -Return (as a string) the next directory entry from the directory stream -@var{stream}. If there is no remaining entry to be read then the -end of file object is returned. -@end deffn - -@deffn primitive rewinddir port -Reset the directory port @var{stream} so that the next call to -@code{readdir} will return the first directory entry. -@end deffn - -@deffn primitive closedir port -Close the directory stream @var{stream}. -The return value is unspecified. -@end deffn - -@deffn primitive sync -Flush the operating system disk buffers. -The return value is unspecified. -@end deffn - -@deffn primitive mknod path type perms dev -Creates a new special file, such as a file corresponding to a device. -@var{path} specifies the name of the file. @var{type} should -be one of the following symbols: -regular, directory, symlink, block-special, char-special, -fifo, or socket. @var{perms} (an integer) specifies the file permissions. -@var{dev} (an integer) specifies which device the special file refers -to. Its exact interpretation depends on the kind of special file -being created. - -E.g., -@lisp -(mknod "/dev/fd0" 'block-special #o660 (+ (* 2 256) 2)) -@end lisp - -The return value is unspecified. -@end deffn - -@deffn primitive tmpnam -Return a name in the file system that does not match any -existing file. However there is no guarantee that another -process will not create the file after @code{tmpnam} is called. -Care should be taken if opening the file, e.g., use the -@code{O_EXCL} open flag or use @code{mkstemp!} instead. -@end deffn - -@deffn primitive mkstemp! tmpl -Create a new unique file in the file system and returns a new -buffered port open for reading and writing to the file. -@var{tmpl} is a string specifying where the file should be -created: it must end with @code{XXXXXX} and will be changed in -place to return the name of the temporary file. -@end deffn - -@deffn primitive dirname filename -Return the directory name component of the file name -@var{filename}. If @var{filename} does not contain a directory -component, @code{.} is returned. -@end deffn - -@deffn primitive basename filename [suffix] -Return the base name of the file name @var{filename}. The -base name is the file name without any directory components. -If @var{suffix} is privided, and is equal to the end of -@var{basename}, it is removed also. -@end deffn - - -@node User Information -@section User Information - -The facilities in this section provide an interface to the user and -group database. -They should be used with care since they are not reentrant. - -The following functions accept an object representing user information -and return a selected component: - -@table @code -@item passwd:name -The name of the userid. -@item passwd:passwd -The encrypted passwd. -@item passwd:uid -The user id number. -@item passwd:gid -The group id number. -@item passwd:gecos -The full name. -@item passwd:dir -The home directory. -@item passwd:shell -The login shell. -@end table - -@deffn procedure getpwuid uid -Look up an integer userid in the user database. -@end deffn - -@deffn procedure getpwnam name -Look up a user name string in the user database. -@end deffn - -@deffn procedure setpwent -Initializes a stream used by @code{getpwent} to read from the user database. -The next use of @code{getpwent} will return the first entry. The -return value is unspecified. -@end deffn - -@deffn procedure getpwent -Return the next entry in the user database, using the stream set by -@code{setpwent}. -@end deffn - -@deffn procedure endpwent -Closes the stream used by @code{getpwent}. The return value is unspecified. -@end deffn - -@deffn primitive setpw [arg] -If called with a true argument, initialize or reset the password data -stream. Otherwise, close the stream. The @code{setpwent} and -@code{endpwent} procedures are implemented on top of this. -@end deffn - -@deffn primitive getpw [user] -Look up an entry in the user database. @var{obj} can be an integer, -a string, or omitted, giving the behaviour of getpwuid, getpwnam -or getpwent respectively. -@end deffn - -The following functions accept an object representing group information -and return a selected component: - -@table @code -@item group:name -The group name. -@item group:passwd -The encrypted group password. -@item group:gid -The group id number. -@item group:mem -A list of userids which have this group as a supplimentary group. -@end table - -@deffn procedure getgrgid gid -Look up an integer groupid in the group database. -@end deffn - -@deffn procedure getgrnam name -Look up a group name in the group database. -@end deffn - -@deffn procedure setgrent -Initializes a stream used by @code{getgrent} to read from the group database. -The next use of @code{getgrent} will return the first entry. -The return value is unspecified. -@end deffn - -@deffn procedure getgrent -Return the next entry in the group database, using the stream set by -@code{setgrent}. -@end deffn - -@deffn procedure endgrent -Closes the stream used by @code{getgrent}. -The return value is unspecified. -@end deffn - -@deffn primitive setgr [arg] -If called with a true argument, initialize or reset the group data -stream. Otherwise, close the stream. The @code{setgrent} and -@code{endgrent} procedures are implemented on top of this. -@end deffn - -@deffn primitive getgr [name] -Look up an entry in the group database. @var{obj} can be an integer, -a string, or omitted, giving the behaviour of getgrgid, getgrnam -or getgrent respectively. -@end deffn - -In addition to the accessor procedures for the user database, the -following shortcut procedures are also available. - -@deffn primitive cuserid -Return a string containing a user name associated with the -effective user id of the process. Return @code{#f} if this -information cannot be obtained. -@end deffn - -@deffn primitive getlogin -Return a string containing the name of the user logged in on -the controlling terminal of the process, or @code{#f} if this -information cannot be obtained. -@end deffn - - -@node Time -@section Time - -@deffn primitive current-time -Return the number of seconds since 1970-01-01 00:00:00 UTC, -excluding leap seconds. -@end deffn - -@deffn primitive gettimeofday -Return a pair containing the number of seconds and microseconds -since 1970-01-01 00:00:00 UTC, excluding leap seconds. Note: -whether true microsecond resolution is available depends on the -operating system. -@end deffn - -The following procedures either accept an object representing a broken down -time and return a selected component, or accept an object representing -a broken down time and a value and set the component to the value. -The numbers in parentheses give the usual range. - -@table @code -@item tm:sec, set-tm:sec -Seconds (0-59). -@item tm:min, set-tm:min -Minutes (0-59). -@item tm:hour, set-tm:hour -Hours (0-23). -@item tm:mday, set-tm:mday -Day of the month (1-31). -@item tm:mon, set-tm:mon -Month (0-11). -@item tm:year, set-tm:year -Year (70-), the year minus 1900. -@item tm:wday, set-tm:wday -Day of the week (0-6) with Sunday represented as 0. -@item tm:yday, set-tm:yday -Day of the year (0-364, 365 in leap years). -@item tm:isdst, set-tm:isdst -Daylight saving indicator (0 for "no", greater than 0 for "yes", less than -0 for "unknown"). -@item tm:gmtoff, set-tm:gmtoff -Time zone offset in seconds west of UTC (-46800 to 43200). -@item tm:zone, set-tm:zone -Time zone label (a string), not necessarily unique. -@end table - -@deffn primitive localtime time [zone] -Return an object representing the broken down components of -@var{time}, an integer like the one returned by -@code{current-time}. The time zone for the calculation is -optionally specified by @var{zone} (a string), otherwise the -@code{TZ} environment variable or the system default is used. -@end deffn - -@deffn primitive gmtime time -Return an object representing the broken down components of -@var{time}, an integer like the one returned by -@code{current-time}. The values are calculated for UTC. -@end deffn - -@deffn primitive mktime sbd_time [zone] -@var{bd-time} is an object representing broken down time and @code{zone} -is an optional time zone specifier (otherwise the TZ environment variable -or the system default is used). - -Returns a pair: the car is a corresponding -integer time value like that returned -by @code{current-time}; the cdr is a broken down time object, similar to -as @var{bd-time} but with normalized values. -@end deffn - -@deffn primitive tzset -Initialize the timezone from the TZ environment variable -or the system default. It's not usually necessary to call this procedure -since it's done automatically by other procedures that depend on the -timezone. -@end deffn - -@deffn primitive strftime format stime -Formats a time specification @var{time} using @var{template}. @var{time} -is an object with time components in the form returned by @code{localtime} -or @code{gmtime}. @var{template} is a string which can include formatting -specifications introduced by a @code{%} character. The formatting of -month and day names is dependent on the current locale. The value returned -is the formatted string. -@xref{Formatting Date and Time, , , libc, The GNU C Library Reference Manual}.) -@end deffn - -@deffn primitive strptime format string -Performs the reverse action to @code{strftime}, parsing -@var{string} according to the specification supplied in -@var{template}. The interpretation of month and day names is -dependent on the current locale. The value returned is a pair. -The car has an object with time components -in the form returned by @code{localtime} or @code{gmtime}, -but the time zone components -are not usefully set. -The cdr reports the number of characters from @var{string} -which were used for the conversion. -@end deffn - -@defvar internal-time-units-per-second -The value of this variable is the number of time units per second -reported by the following procedures. -@end defvar - -@deffn primitive times -Return an object with information about real and processor -time. The following procedures accept such an object as an -argument and return a selected component: - -@table @code -@item tms:clock -The current real time, expressed as time units relative to an -arbitrary base. -@item tms:utime -The CPU time units used by the calling process. -@item tms:stime -The CPU time units used by the system on behalf of the calling -process. -@item tms:cutime -The CPU time units used by terminated child processes of the -calling process, whose status has been collected (e.g., using -@code{waitpid}). -@item tms:cstime -Similarly, the CPU times units used by the system on behalf of -terminated child processes. -@end table -@end deffn - -@deffn primitive get-internal-real-time -Return the number of time units since the interpreter was -started. -@end deffn - -@deffn primitive get-internal-run-time -Return the number of time units of processor time used by the -interpreter. Both @emph{system} and @emph{user} time are -included but subprocesses are not. -@end deffn - -@node Runtime Environment -@section Runtime Environment - -@deffn primitive program-arguments -@deffnx procedure command-line -Return the list of command line arguments passed to Guile, as a list of -strings. The list includes the invoked program name, which is usually -@code{"guile"}, but excludes switches and parameters for command line -options like @code{-e} and @code{-l}. -@end deffn - -@deffn primitive getenv nam -Looks up the string @var{name} in the current environment. The return -value is @code{#f} unless a string of the form @code{NAME=VALUE} is -found, in which case the string @code{VALUE} is returned. -@end deffn - -@c begin (scm-doc-string "boot-9.scm" "setenv") -@deffn procedure setenv name value -Modifies the environment of the current process, which is -also the default environment inherited by child processes. - -If @var{value} is @code{#f}, then @var{name} is removed from the -environment. Otherwise, the string @var{name}=@var{value} is added -to the environment, replacing any existing string with name matching -@var{name}. - -The return value is unspecified. -@end deffn - -@deffn primitive environ [env] -If @var{env} is omitted, return the current environment (in the -Unix sense) as a list of strings. Otherwise set the current -environment, which is also the default environment for child -processes, to the supplied list of strings. Each member of -@var{env} should be of the form @code{NAME=VALUE} and values of -@code{NAME} should not be duplicated. If @var{env} is supplied -then the return value is unspecified. -@end deffn - -@deffn primitive putenv str -Modifies the environment of the current process, which is -also the default environment inherited by child processes. - -If @var{string} is of the form @code{NAME=VALUE} then it will be written -directly into the environment, replacing any existing environment string -with -name matching @code{NAME}. If @var{string} does not contain an equal -sign, then any existing string with name matching @var{string} will -be removed. - -The return value is unspecified. -@end deffn - - -@node Processes -@section Processes - -@findex cd -@deffn primitive chdir str -Change the current working directory to @var{path}. -The return value is unspecified. -@end deffn - -@findex pwd -@deffn primitive getcwd -Return the name of the current working directory. -@end deffn - -@deffn primitive umask [mode] -If @var{mode} is omitted, retuns a decimal number representing the current -file creation mask. Otherwise the file creation mask is set to -@var{mode} and the previous value is returned. - -E.g., @code{(umask #o022)} sets the mask to octal 22, decimal 18. -@end deffn - -@deffn primitive chroot path -Change the root directory to that specified in @var{path}. -This directory will be used for path names beginning with -@file{/}. The root directory is inherited by all children -of the current process. Only the superuser may change the -root directory. -@end deffn - -@deffn primitive getpid -Return an integer representing the current process ID. -@end deffn - -@deffn primitive getgroups -Return a vector of integers representing the current -supplimentary group IDs. -@end deffn - -@deffn primitive getppid -Return an integer representing the process ID of the parent -process. -@end deffn - -@deffn primitive getuid -Return an integer representing the current real user ID. -@end deffn - -@deffn primitive getgid -Return an integer representing the current real group ID. -@end deffn - -@deffn primitive geteuid -Return an integer representing the current effective user ID. -If the system does not support effective IDs, then the real ID -is returned. @code{(feature? 'EIDs)} reports whether the -system supports effective IDs. -@end deffn - -@deffn primitive getegid -Return an integer representing the current effective group ID. -If the system does not support effective IDs, then the real ID -is returned. @code{(feature? 'EIDs)} reports whether the -system supports effective IDs. -@end deffn - -@deffn primitive setuid id -Sets both the real and effective user IDs to the integer @var{id}, provided -the process has appropriate privileges. -The return value is unspecified. -@end deffn - -@deffn primitive setgid id -Sets both the real and effective group IDs to the integer @var{id}, provided -the process has appropriate privileges. -The return value is unspecified. -@end deffn - -@deffn primitive seteuid id -Sets the effective user ID to the integer @var{id}, provided the process -has appropriate privileges. If effective IDs are not supported, the -real ID is set instead -- @code{(feature? 'EIDs)} reports whether the -system supports effective IDs. -The return value is unspecified. -@end deffn - -@deffn primitive setegid id -Sets the effective group ID to the integer @var{id}, provided the process -has appropriate privileges. If effective IDs are not supported, the -real ID is set instead -- @code{(feature? 'EIDs)} reports whether the -system supports effective IDs. -The return value is unspecified. -@end deffn - -@deffn primitive getpgrp -Return an integer representing the current process group ID. -This is the POSIX definition, not BSD. -@end deffn - -@deffn primitive setpgid pid pgid -Move the process @var{pid} into the process group @var{pgid}. @var{pid} or -@var{pgid} must be integers: they can be zero to indicate the ID of the -current process. -Fails on systems that do not support job control. -The return value is unspecified. -@end deffn - -@deffn primitive setsid -Creates a new session. The current process becomes the session leader -and is put in a new process group. The process will be detached -from its controlling terminal if it has one. -The return value is an integer representing the new process group ID. -@end deffn - -@deffn primitive waitpid pid [options] -This procedure collects status information from a child process which -has terminated or (optionally) stopped. Normally it will -suspend the calling process until this can be done. If more than one -child process is eligible then one will be chosen by the operating system. - -The value of @var{pid} determines the behaviour: - -@table @r -@item @var{pid} greater than 0 -Request status information from the specified child process. -@item @var{pid} equal to -1 or WAIT_ANY -Request status information for any child process. -@item @var{pid} equal to 0 or WAIT_MYPGRP -Request status information for any child process in the current process -group. -@item @var{pid} less than -1 -Request status information for any child process whose process group ID -is -@var{PID}. -@end table - -The @var{options} argument, if supplied, should be the bitwise OR of the -values of zero or more of the following variables: - -@defvar WNOHANG -Return immediately even if there are no child processes to be collected. -@end defvar - -@defvar WUNTRACED -Report status information for stopped processes as well as terminated -processes. -@end defvar - -The return value is a pair containing: - -@enumerate -@item -The process ID of the child process, or 0 if @code{WNOHANG} was -specified and no process was collected. -@item -The integer status value. -@end enumerate -@end deffn - -The following three -functions can be used to decode the process status code returned -by @code{waitpid}. - -@deffn primitive status:exit-val status -Return the exit status value, as would be set if a process -ended normally through a call to @code{exit} or @code{_exit}, -if any, otherwise @code{#f}. -@end deffn - -@deffn primitive status:term-sig status -Return the signal number which terminated the process, if any, -otherwise @code{#f}. -@end deffn - -@deffn primitive status:stop-sig status -Return the signal number which stopped the process, if any, -otherwise @code{#f}. -@end deffn - -@deffn primitive system [cmd] -Execute @var{cmd} using the operating system's "command -processor". Under Unix this is usually the default shell -@code{sh}. The value returned is @var{cmd}'s exit status as -returned by @code{waitpid}, which can be interpreted using the -functions above. - -If @code{system} is called without arguments, return a boolean -indicating whether the command processor is available. -@end deffn - -@deffn primitive primitive-exit [status] -Terminate the current process without unwinding the Scheme stack. -This is would typically be useful after a fork. The exit status -is @var{status} if supplied, otherwise zero. -@end deffn - -@deffn primitive execl filename . args -Executes the file named by @var{path} as a new process image. -The remaining arguments are supplied to the process; from a C program -they are accessable as the @code{argv} argument to @code{main}. -Conventionally the first @var{arg} is the same as @var{path}. -All arguments must be strings. - -If @var{arg} is missing, @var{path} is executed with a null -argument list, which may have system-dependent side-effects. - -This procedure is currently implemented using the @code{execv} system -call, but we call it @code{execl} because of its Scheme calling interface. -@end deffn - -@deffn primitive execlp filename . args -Similar to @code{execl}, however if -@var{filename} does not contain a slash -then the file to execute will be located by searching the -directories listed in the @code{PATH} environment variable. - -This procedure is currently implemented using the @code{execvp} system -call, but we call it @code{execlp} because of its Scheme calling interface. -@end deffn - -@deffn primitive execle filename env . args -Similar to @code{execl}, but the environment of the new process is -specified by @var{env}, which must be a list of strings as returned by the -@code{environ} procedure. - -This procedure is currently implemented using the @code{execve} system -call, but we call it @code{execle} because of its Scheme calling interface. -@end deffn - -@deffn primitive primitive-fork -Creates a new "child" process by duplicating the current "parent" process. -In the child the return value is 0. In the parent the return value is -the integer process ID of the child. - -This procedure has been renamed from @code{fork} to avoid a naming conflict -with the scsh fork. -@end deffn - -@deffn primitive nice incr -Increment the priority of the current process by @var{incr}. A higher -priority value means that the process runs less often. -The return value is unspecified. -@end deffn - -@deffn primitive setpriority which who prio -Set the scheduling priority of the process, process group -or user, as indicated by @var{which} and @var{who}. @var{which} -is one of the variables @code{PRIO_PROCESS}, @code{PRIO_PGRP} -or @code{PRIO_USER}, and @var{who} is interpreted relative to -@var{which} (a process identifier for @code{PRIO_PROCESS}, -process group identifier for @code{PRIO_PGRP}, and a user -identifier for @code{PRIO_USER}. A zero value of @var{who} -denotes the current process, process group, or user. -@var{prio} is a value in the range -20 and 20, the default -priority is 0; lower priorities cause more favorable -scheduling. Sets the priority of all of the specified -processes. Only the super-user may lower priorities. -The return value is not specified. -@end deffn - -@deffn primitive getpriority which who -Return the scheduling priority of the process, process group -or user, as indicated by @var{which} and @var{who}. @var{which} -is one of the variables @code{PRIO_PROCESS}, @code{PRIO_PGRP} -or @code{PRIO_USER}, and @var{who} is interpreted relative to -@var{which} (a process identifier for @code{PRIO_PROCESS}, -process group identifier for @code{PRIO_PGRP}, and a user -identifier for @code{PRIO_USER}. A zero value of @var{who} -denotes the current process, process group, or user. Return -the highest priority (lowest numerical value) of any of the -specified processes. -@end deffn - - -@node Signals -@section Signals - -Procedures to raise, handle and wait for signals. - -@deffn primitive kill pid sig -Sends a signal to the specified process or group of processes. - -@var{pid} specifies the processes to which the signal is sent: - -@table @r -@item @var{pid} greater than 0 -The process whose identifier is @var{pid}. -@item @var{pid} equal to 0 -All processes in the current process group. -@item @var{pid} less than -1 -The process group whose identifier is -@var{pid} -@item @var{pid} equal to -1 -If the process is privileged, all processes except for some special -system processes. Otherwise, all processes with the current effective -user ID. -@end table - -@var{sig} should be specified using a variable corresponding to -the Unix symbolic name, e.g., - -@defvar SIGHUP -Hang-up signal. -@end defvar - -@defvar SIGINT -Interrupt signal. -@end defvar -@end deffn - -@deffn primitive raise sig -Sends a specified signal @var{sig} to the current process, where -@var{sig} is as described for the kill procedure. -@end deffn - -@deffn primitive sigaction signum [handler [flags]] -Install or report the signal handler for a specified signal. - -@var{signum} is the signal number, which can be specified using the value -of variables such as @code{SIGINT}. - -If @var{action} is omitted, @code{sigaction} returns a pair: the -CAR is the current -signal hander, which will be either an integer with the value @code{SIG_DFL} -(default action) or @code{SIG_IGN} (ignore), or the Scheme procedure which -handles the signal, or @code{#f} if a non-Scheme procedure handles the -signal. The CDR contains the current @code{sigaction} flags for the handler. - -If @var{action} is provided, it is installed as the new handler for -@var{signum}. @var{action} can be a Scheme procedure taking one -argument, or the value of @code{SIG_DFL} (default action) or -@code{SIG_IGN} (ignore), or @code{#f} to restore whatever signal handler -was installed before @code{sigaction} was first used. Flags can -optionally be specified for the new handler (@code{SA_RESTART} will -always be added if it's available and the system is using restartable -system calls.) The return value is a pair with information about the -old handler as described above. - -This interface does not provide access to the "signal blocking" -facility. Maybe this is not needed, since the thread support may -provide solutions to the problem of consistent access to data -structures. -@end deffn - -@deffn primitive restore-signals -Return all signal handlers to the values they had before any call to -@code{sigaction} was made. The return value is unspecified. -@end deffn - -@deffn primitive alarm i -Set a timer to raise a @code{SIGALRM} signal after the specified -number of seconds (an integer). It's advisable to install a signal -handler for -@code{SIGALRM} beforehand, since the default action is to terminate -the process. - -The return value indicates the time remaining for the previous alarm, -if any. The new value replaces the previous alarm. If there was -no previous alarm, the return value is zero. -@end deffn - -@deffn primitive pause -Pause the current process (thread?) until a signal arrives whose -action is to either terminate the current process or invoke a -handler procedure. The return value is unspecified. -@end deffn - -@deffn primitive sleep i -Wait for the given number of seconds (an integer) or until a signal -arrives. The return value is zero if the time elapses or the number -of seconds remaining otherwise. -@end deffn - -@deffn primitive usleep i -Sleep for I microseconds. @code{usleep} is not available on -all platforms. -@end deffn - -@node Terminals and Ptys -@section Terminals and Ptys - -@deffn primitive isatty? port -Return @code{#t} if @var{port} is using a serial non--file -device, otherwise @code{#f}. -@end deffn - -@deffn primitive ttyname port -Return a string with the name of the serial terminal device -underlying @var{port}. -@end deffn - -@deffn primitive ctermid -Return a string containing the file name of the controlling -terminal for the current process. -@end deffn - -@deffn primitive tcgetpgrp port -Return the process group ID of the foreground process group -associated with the terminal open on the file descriptor -underlying @var{port}. - -If there is no foreground process group, the return value is a -number greater than 1 that does not match the process group ID -of any existing process group. This can happen if all of the -processes in the job that was formerly the foreground job have -terminated, and no other job has yet been moved into the -foreground. -@end deffn - -@deffn primitive tcsetpgrp port pgid -Set the foreground process group ID for the terminal used by the file -descriptor underlying @var{port} to the integer @var{pgid}. -The calling process -must be a member of the same session as @var{pgid} and must have the same -controlling terminal. The return value is unspecified. -@end deffn - -@node Pipes -@section Pipes - -The following procedures provide an interface to the @code{popen} and -@code{pclose} system routines. The code is in a separate "popen" -module: - -@smalllisp -(use-modules (ice-9 popen)) -@end smalllisp - -@findex popen -@deffn procedure open-pipe command modes -Executes the shell command @var{command} (a string) in a subprocess. -A pipe to the process is created and returned. @var{modes} specifies -whether an input or output pipe to the process is created: it should -be the value of @code{OPEN_READ} or @code{OPEN_WRITE}. -@end deffn - -@deffn procedure open-input-pipe command -Equivalent to @code{open-pipe} with mode @code{OPEN_READ}. -@end deffn - -@deffn procedure open-output-pipe command -Equivalent to @code{open-pipe} with mode @code{OPEN_WRITE}. -@end deffn - -@findex pclose -@deffn procedure close-pipe port -Closes the pipe created by @code{open-pipe}, then waits for the process -to terminate and returns its status value, @xref{Processes, waitpid}, for -information on how to interpret this value. - -@code{close-port} (@pxref{Closing, close-port}) can also be used to -close a pipe, but doesn't return the status. -@end deffn - -@node Networking -@section Networking - -@menu -* Network Address Conversion:: -* Network Databases:: -* Network Sockets and Communication:: -@end menu - -@node Network Address Conversion -@subsection Network Address Conversion - -This section describes procedures which convert internet addresses -between numeric and string formats. - -@subsubsection IPv4 Address Conversion - -@deffn primitive inet-aton address -Convert an IPv4 Internet address from printable string -(dotted decimal notation) to an integer. E.g., - -@lisp -(inet-aton "127.0.0.1") @result{} 2130706433 -@end lisp -@end deffn - -@deffn primitive inet-ntoa inetid -Convert an IPv4 Internet address to a printable -(dotted decimal notation) string. E.g., - -@lisp -(inet-ntoa 2130706433) @result{} "127.0.0.1" -@end lisp -@end deffn - -@deffn primitive inet-netof address -Return the network number part of the given IPv4 -Internet address. E.g., - -@lisp -(inet-netof 2130706433) @result{} 127 -@end lisp -@end deffn - -@deffn primitive inet-lnaof address -Return the local-address-with-network part of the given -IPv4 Internet address, using the obsolete class A/B/C system. -E.g., - -@lisp -(inet-lnaof 2130706433) @result{} 1 -@end lisp -@end deffn - -@deffn primitive inet-makeaddr net lna -Make an IPv4 Internet address by combining the network number -@var{net} with the local-address-within-network number -@var{lna}. E.g., - -@lisp -(inet-makeaddr 127 1) @result{} 2130706433 -@end lisp -@end deffn - -@subsubsection IPv6 Address Conversion - -@deffn primitive inet-ntop family address -Convert a network address into a printable string. -Note that unlike the C version of this function, -the input is an integer with normal host byte ordering. -@var{family} can be @code{AF_INET} or @code{AF_INET6}. E.g., - -@lisp -(inet-ntop AF_INET 2130706433) @result{} "127.0.0.1" -(inet-ntop AF_INET6 (- (expt 2 128) 1)) @result{} -ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff -@end lisp -@end deffn - -@deffn primitive inet-pton family address -Convert a string containing a printable network address to -an integer address. Note that unlike the C version of this -function, -the result is an integer with normal host byte ordering. -@var{family} can be @code{AF_INET} or @code{AF_INET6}. E.g., - -@lisp -(inet-pton AF_INET "127.0.0.1") @result{} 2130706433 -(inet-pton AF_INET6 "::1") @result{} 1 -@end lisp -@end deffn - - -@node Network Databases -@subsection Network Databases - -This section describes procedures which query various network databases. -Care should be taken when using the database routines since they are not -reentrant. - -@subsubsection The Host Database - -A @dfn{host object} is a structure that represents what is known about a -network host, and is the usual way of representing a system's network -identity inside software. - -The following functions accept a host object and return a selected -component: - -@deffn procedure hostent:name host -The "official" hostname for @var{host}. -@end deffn -@deffn procedure hostent:aliases host -A list of aliases for @var{host}. -@end deffn -@deffn procedure hostent:addrtype host -The host address type. For hosts with Internet addresses, this will -return @code{AF_INET}. -@end deffn -@deffn procedure hostent:length host -The length of each address for @var{host}, in bytes. -@end deffn -@deffn procedure hostent:addr-list host -The list of network addresses associated with @var{host}. -@end deffn - -The following procedures are used to search the host database: - -@deffn primitive gethost [host] -@deffnx procedure gethostbyname hostname -@deffnx procedure gethostbyaddr address -Look up a host by name or address, returning a host object. The -@code{gethost} procedure will accept either a string name or an integer -address; if given no arguments, it behaves like @code{gethostent} (see -below). If a name or address is supplied but the address can not be -found, an error will be thrown to one of the keys: -@code{host-not-found}, @code{try-again}, @code{no-recovery} or -@code{no-data}, corresponding to the equivalent @code{h_error} values. -Unusual conditions may result in errors thrown to the -@code{system-error} or @code{misc_error} keys. -@end deffn - -The following procedures may be used to step through the host -database from beginning to end. - -@deffn procedure sethostent [stayopen] -Initialize an internal stream from which host objects may be read. This -procedure must be called before any calls to @code{gethostent}, and may -also be called afterward to reset the host entry stream. If -@var{stayopen} is supplied and is not @code{#f}, the database is not -closed by subsequent @code{gethostbyname} or @code{gethostbyaddr} calls, -possibly giving an efficiency gain. -@end deffn - -@deffn procedure gethostent -Return the next host object from the host database, or @code{#f} if -there are no more hosts to be found (or an error has been encountered). -This procedure may not be used before @code{sethostent} has been called. -@end deffn - -@deffn procedure endhostent -Close the stream used by @code{gethostent}. The return value is unspecified. -@end deffn - -@deffn primitive sethost [stayopen] -If @var{stayopen} is omitted, this is equivalent to @code{endhostent}. -Otherwise it is equivalent to @code{sethostent stayopen}. -@end deffn -@subsubsection The Network Database - -The following functions accept an object representing a network -and return a selected component: - -@deffn procedure netent:name net -The "official" network name. -@end deffn -@deffn procedure netent:aliases net -A list of aliases for the network. -@end deffn -@deffn procedure netent:addrtype net -The type of the network number. Currently, this returns only -@code{AF_INET}. -@end deffn -@deffn procedure netent:net net -The network number. -@end deffn - -The following procedures are used to search the network database: - -@deffn primitive getnet [net] -@deffnx procedure getnetbyname net-name -@deffnx procedure getnetbyaddr net-number -Look up a network by name or net number in the network database. The -@var{net-name} argument must be a string, and the @var{net-number} -argument must be an integer. @code{getnet} will accept either type of -argument, behaving like @code{getnetent} (see below) if no arguments are -given. -@end deffn - -The following procedures may be used to step through the network -database from beginning to end. - -@deffn procedure setnetent [stayopen] -Initialize an internal stream from which network objects may be read. This -procedure must be called before any calls to @code{getnetent}, and may -also be called afterward to reset the net entry stream. If -@var{stayopen} is supplied and is not @code{#f}, the database is not -closed by subsequent @code{getnetbyname} or @code{getnetbyaddr} calls, -possibly giving an efficiency gain. -@end deffn - -@deffn procedure getnetent -Return the next entry from the network database. -@end deffn - -@deffn procedure endnetent -Close the stream used by @code{getnetent}. The return value is unspecified. -@end deffn - -@deffn primitive setnet [stayopen] -If @var{stayopen} is omitted, this is equivalent to @code{endnetent}. -Otherwise it is equivalent to @code{setnetent stayopen}. -@end deffn - -@subsubsection The Protocol Database - -The following functions accept an object representing a protocol -and return a selected component: - -@deffn procedure protoent:name protocol -The "official" protocol name. -@end deffn -@deffn procedure protoent:aliases protocol -A list of aliases for the protocol. -@end deffn -@deffn procedure protoent:proto protocol -The protocol number. -@end deffn - -The following procedures are used to search the protocol database: - -@deffn primitive getproto [protocol] -@deffnx procedure getprotobyname name -@deffnx procedure getprotobynumber number -Look up a network protocol by name or by number. @code{getprotobyname} -takes a string argument, and @code{getprotobynumber} takes an integer -argument. @code{getproto} will accept either type, behaving like -@code{getprotoent} (see below) if no arguments are supplied. -@end deffn - -The following procedures may be used to step through the protocol -database from beginning to end. - -@deffn procedure setprotoent [stayopen] -Initialize an internal stream from which protocol objects may be read. This -procedure must be called before any calls to @code{getprotoent}, and may -also be called afterward to reset the protocol entry stream. If -@var{stayopen} is supplied and is not @code{#f}, the database is not -closed by subsequent @code{getprotobyname} or @code{getprotobynumber} calls, -possibly giving an efficiency gain. -@end deffn - -@deffn procedure getprotoent -Return the next entry from the protocol database. -@end deffn - -@deffn procedure endprotoent -Close the stream used by @code{getprotoent}. The return value is unspecified. -@end deffn - -@deffn primitive setproto [stayopen] -If @var{stayopen} is omitted, this is equivalent to @code{endprotoent}. -Otherwise it is equivalent to @code{setprotoent stayopen}. -@end deffn - -@subsubsection The Service Database - -The following functions accept an object representing a service -and return a selected component: - -@deffn procedure servent:name serv -The "official" name of the network service. -@end deffn -@deffn procedure servent:aliases serv -A list of aliases for the network service. -@end deffn -@deffn procedure servent:port serv -The Internet port used by the service. -@end deffn -@deffn procedure servent:proto serv -The protocol used by the service. A service may be listed many times -in the database under different protocol names. -@end deffn - -The following procedures are used to search the service database: - -@deffn primitive getserv [name [protocol]] -@deffnx procedure getservbyname name protocol -@deffnx procedure getservbyport port protocol -Look up a network service by name or by service number, and return a -network service object. The @var{protocol} argument specifies the name -of the desired protocol; if the protocol found in the network service -database does not match this name, a system error is signalled. - -The @code{getserv} procedure will take either a service name or number -as its first argument; if given no arguments, it behaves like -@code{getservent} (see below). -@end deffn - -The following procedures may be used to step through the service -database from beginning to end. - -@deffn procedure setservent [stayopen] -Initialize an internal stream from which service objects may be read. This -procedure must be called before any calls to @code{getservent}, and may -also be called afterward to reset the service entry stream. If -@var{stayopen} is supplied and is not @code{#f}, the database is not -closed by subsequent @code{getservbyname} or @code{getservbyport} calls, -possibly giving an efficiency gain. -@end deffn - -@deffn procedure getservent -Return the next entry from the services database. -@end deffn - -@deffn procedure endservent -Close the stream used by @code{getservent}. The return value is unspecified. -@end deffn - -@deffn primitive setserv [stayopen] -If @var{stayopen} is omitted, this is equivalent to @code{endservent}. -Otherwise it is equivalent to @code{setservent stayopen}. -@end deffn - -@node Network Sockets and Communication -@subsection Network Sockets and Communication - -Socket ports can be created using @code{socket} and @code{socketpair}. -The ports are initially unbuffered, to make reading and writing to the -same port more reliable. A buffer can be added to the port using -@code{setvbuf}, @xref{Ports and File Descriptors}. - -The convention used for "host" vs "network" addresses is that addresses -are always held in host order at the Scheme level. The procedures in -this section automatically convert between host and network order when -required. The arguments and return values are thus in host order. - -@deffn primitive socket family style proto -Return a new socket port of the type specified by @var{family}, -@var{style} and @var{proto}. All three parameters are -integers. Supported values for @var{family} are -@code{AF_UNIX}, @code{AF_INET} and @code{AF_INET6}. -Typical values for @var{style} are @code{SOCK_STREAM}, -@code{SOCK_DGRAM} and @code{SOCK_RAW}. - -@var{proto} can be obtained from a protocol name using -@code{getprotobyname}. A value of zero specifies the default -protocol, which is usually right. - -A single socket port cannot by used for communication until it -has been connected to another socket. -@end deffn - -@deffn primitive socketpair family style proto -Return a pair of connected (but unnamed) socket ports of the -type specified by @var{family}, @var{style} and @var{proto}. -Many systems support only socket pairs of the @code{AF_UNIX} -family. Zero is likely to be the only meaningful value for -@var{proto}. -@end deffn - -@deffn primitive getsockopt sock level optname -Return the value of a particular socket option for the socket -port @var{sock}. @var{level} is an integer code for type of -option being requested, e.g., @code{SOL_SOCKET} for -socket-level options. @var{optname} is an integer code for the -option required and should be specified using one of the -symbols @code{SO_DEBUG}, @code{SO_REUSEADDR} etc. - -The returned value is typically an integer but @code{SO_LINGER} -returns a pair of integers. -@end deffn - -@deffn primitive setsockopt sock level optname value -Set the value of a particular socket option for the socket -port @var{sock}. @var{level} is an integer code for type of option -being set, e.g., @code{SOL_SOCKET} for socket-level options. -@var{optname} is an -integer code for the option to set and should be specified using one of -the symbols @code{SO_DEBUG}, @code{SO_REUSEADDR} etc. -@var{value} is the value to which the option should be set. For -most options this must be an integer, but for @code{SO_LINGER} it must -be a pair. - -The return value is unspecified. -@end deffn - -@deffn primitive shutdown sock how -Sockets can be closed simply by using @code{close-port}. The -@code{shutdown} procedure allows reception or tranmission on a -connection to be shut down individually, according to the parameter -@var{how}: - -@table @asis -@item 0 -Stop receiving data for this socket. If further data arrives, reject it. -@item 1 -Stop trying to transmit data from this socket. Discard any -data waiting to be sent. Stop looking for acknowledgement of -data already sent; don't retransmit it if it is lost. -@item 2 -Stop both reception and transmission. -@end table - -The return value is unspecified. -@end deffn - -@deffn primitive connect sock fam address . args -Initiate a connection from a socket using a specified address -family to the address -specified by @var{address} and possibly @var{args}. -The format required for @var{address} -and @var{args} depends on the family of the socket. - -For a socket of family @code{AF_UNIX}, -only @var{address} is specified and must be a string with the -filename where the socket is to be created. - -For a socket of family @code{AF_INET}, -@var{address} must be an integer IPv4 host address and -@var{args} must be a single integer port number. - -For a socket of family @code{AF_INET6}, -@var{address} must be an integer IPv6 host address and -@var{args} may be up to three integers: -port [flowinfo] [scope_id], -where flowinfo and scope_id default to zero. - -The return value is unspecified. -@end deffn - -@deffn primitive bind sock fam address . args -Assign an address to the socket port @var{sock}. -Generally this only needs to be done for server sockets, -so they know where to look for incoming connections. A socket -without an address will be assigned one automatically when it -starts communicating. - -The format of @var{address} and @var{args} depends -on the family of the socket. - -For a socket of family @code{AF_UNIX}, only @var{address} -is specified and must be a string with the filename where -the socket is to be created. - -For a socket of family @code{AF_INET}, @var{address} -must be an integer IPv4 address and @var{args} -must be a single integer port number. - -The values of the following variables can also be used for -@var{address}: - -@defvar INADDR_ANY -Allow connections from any address. -@end defvar - -@defvar INADDR_LOOPBACK -The address of the local host using the loopback device. -@end defvar - -@defvar INADDR_BROADCAST -The broadcast address on the local network. -@end defvar - -@defvar INADDR_NONE -No address. -@end defvar - -For a socket of family @code{AF_INET6}, @var{address} -must be an integer IPv6 address and @var{args} -may be up to three integers: -port [flowinfo] [scope_id], -where flowinfo and scope_id default to zero. - -The return value is unspecified. -@end deffn - -@deffn primitive listen sock backlog -Enable @var{sock} to accept connection -requests. @var{backlog} is an integer specifying -the maximum length of the queue for pending connections. -If the queue fills, new clients will fail to connect until -the server calls @code{accept} to accept a connection from -the queue. - -The return value is unspecified. -@end deffn - -@deffn primitive accept sock -Accept a connection on a bound, listening socket. -If there -are no pending connections in the queue, wait until -one is available unless the non-blocking option has been -set on the socket. - -The return value is a -pair in which the @emph{car} is a new socket port for the -connection and -the @emph{cdr} is an object with address information about the -client which initiated the connection. - -@var{sock} does not become part of the -connection and will continue to accept new requests. -@end deffn - -The following functions take a socket address object, as returned -by @code{accept} and other procedures, and return a selected component. - -@table @code -@item sockaddr:fam -The socket family, typically equal to the value of @code{AF_UNIX} or -@code{AF_INET}. -@item sockaddr:path -If the socket family is @code{AF_UNIX}, returns the path of the -filename the socket is based on. -@item sockaddr:addr -If the socket family is @code{AF_INET}, returns the Internet host -address. -@item sockaddr:port -If the socket family is @code{AF_INET}, returns the Internet port -number. -@end table - -@deffn primitive getsockname sock -Return the address of @var{sock}, in the same form as the -object returned by @code{accept}. On many systems the address -of a socket in the @code{AF_FILE} namespace cannot be read. -@end deffn - -@deffn primitive getpeername sock -Return the address that @var{sock} -is connected to, in the same form as the object returned by -@code{accept}. On many systems the address of a socket in the -@code{AF_FILE} namespace cannot be read. -@end deffn - -@deffn primitive recv! sock buf [flags] -Receive data from a socket port. -@var{sock} must already -be bound to the address from which data is to be received. -@var{buf} is a string into which -the data will be written. The size of @var{buf} limits -the amount of -data which can be received: in the case of packet -protocols, if a packet larger than this limit is encountered -then some data -will be irrevocably lost. - -The optional @var{flags} argument is a value or -bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc. - -The value returned is the number of bytes read from the -socket. - -Note that the data is read directly from the socket file -descriptor: -any unread buffered port data is ignored. -@end deffn - -@deffn primitive send sock message [flags] -Transmit the string @var{message} on a socket port @var{sock}. -@var{sock} must already be bound to a destination address. The -value returned is the number of bytes transmitted -- -it's possible for -this to be less than the length of @var{message} -if the socket is -set to be non-blocking. The optional @var{flags} argument -is a value or -bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc. - -Note that the data is written directly to the socket -file descriptor: -any unflushed buffered port data is ignored. -@end deffn - -@deffn primitive recvfrom! sock str [flags [start [end]]] -Return data from the socket port @var{sock} and also -information about where the data was received from. -@var{sock} must already be bound to the address from which -data is to be received. @code{str}, is a string into which the -data will be written. The size of @var{str} limits the amount -of data which can be received: in the case of packet protocols, -if a packet larger than this limit is encountered then some -data will be irrevocably lost. - -The optional @var{flags} argument is a value or bitwise OR of -@code{MSG_OOB}, @code{MSG_PEEK}, @code{MSG_DONTROUTE} etc. - -The value returned is a pair: the @emph{car} is the number of -bytes read from the socket and the @emph{cdr} an address object -in the same form as returned by @code{accept}. The address -will given as @code{#f} if not available, as is usually the -case for stream sockets. - -The @var{start} and @var{end} arguments specify a substring of -@var{str} to which the data should be written. - -Note that the data is read directly from the socket file -descriptor: any unread buffered port data is ignored. -@end deffn - -@deffn primitive sendto sock message fam address . args_and_flags -Transmit the string @var{message} on the socket port -@var{sock}. The -destination address is specified using the @var{fam}, -@var{address} and -@var{args_and_flags} arguments, in a similar way to the -@code{connect} procedure. @var{args_and_flags} contains -the usual connection arguments optionally followed by -a flags argument, which is a value or -bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc. - -The value returned is the number of bytes transmitted -- -it's possible for -this to be less than the length of @var{message} if the -socket is -set to be non-blocking. -Note that the data is written directly to the socket -file descriptor: -any unflushed buffered port data is ignored. -@end deffn - -The following functions can be used to convert short and long integers -between "host" and "network" order. Although the procedures above do -this automatically for addresses, the conversion will still need to -be done when sending or receiving encoded integer data from the network. - -@deffn primitive htons value -Convert a 16 bit quantity from host to network byte ordering. -@var{value} is packed into 2 bytes, which are then converted -and returned as a new integer. -@end deffn - -@deffn primitive ntohs value -Convert a 16 bit quantity from network to host byte ordering. -@var{value} is packed into 2 bytes, which are then converted -and returned as a new integer. -@end deffn - -@deffn primitive htonl value -Convert a 32 bit quantity from host to network byte ordering. -@var{value} is packed into 4 bytes, which are then converted -and returned as a new integer. -@end deffn - -@deffn primitive ntohl value -Convert a 32 bit quantity from network to host byte ordering. -@var{value} is packed into 4 bytes, which are then converted -and returned as a new integer. -@end deffn - -These procedures are inconvenient to use at present, but consider: - -@example -(define write-network-long - (lambda (value port) - (let ((v (make-uniform-vector 1 1 0))) - (uniform-vector-set! v 0 (htonl value)) - (uniform-vector-write v port)))) - -(define read-network-long - (lambda (port) - (let ((v (make-uniform-vector 1 1 0))) - (uniform-vector-read! v port) - (ntohl (uniform-vector-ref v 0))))) -@end example - -@node System Identification -@section System Identification - -This section lists the various procedures Guile provides for accessing -information about the system it runs on. - -@deffn primitive uname -Return an object with some information about the computer -system the program is running on. -@end deffn - -The following procedures accept an object as returned by @code{uname} -and return a selected component. - -@table @code -@item utsname:sysname -The name of the operating system. -@item utsname:nodename -The network name of the computer. -@item utsname:release -The current release level of the operating system implementation. -@item utsname:version -The current version level within the release of the operating system. -@item utsname:machine -A description of the hardware. -@end table - -@deffn primitive gethostname -Return the host name of the current processor. -@end deffn - -@deffn primitive sethostname name -Set the host name of the current processor to @var{name}. May -only be used by the superuser. The return value is not -specified. -@end deffn - -@c FIXME::martin: Not in libguile! -@deffn primitive software-type -Return a symbol describing the current platform's operating system. -This may be one of AIX, VMS, UNIX, COHERENT, WINDOWS, MS-DOS, OS/2, -THINKC, AMIGA, ATARIST, MACH, or ACORN. - -Note that most varieties of Unix are considered to be simply "UNIX". -That is because when a program depends on features that are not present -on every operating system, it is usually better to test for the presence -or absence of that specific feature. The return value of -@code{software-type} should only be used for this purpose when there is -no other easy or unambiguous way of detecting such features. -@end deffn - -@node Locales -@section Locales - -@deffn primitive setlocale category [locale] -If @var{locale} is omitted, return the current value of the -specified locale category as a system-dependent string. -@var{category} should be specified using the values -@code{LC_COLLATE}, @code{LC_ALL} etc. - -Otherwise the specified locale category is set to the string -@var{locale} and the new value is returned as a -system-dependent string. If @var{locale} is an empty string, -the locale will be set using envirionment variables. -@end deffn - -@node Encryption -@section Encryption - -Please note that the procedures in this section are not suited for -strong encryption, they are only interfaces to the well-known and -common system library functions of the same name. They are just as good -(or bad) as the underlying functions, so you should refer to your system -documentation before using them. - -@deffn primitive crypt key salt -Encrypt @var{key} using @var{salt} as the salt value to the -crypt(3) library call -@end deffn - -@code{getpass} is no encryption procedure at all, but it is often used -in compination with @code{crypt}, that is why it appears in this -section. - -@deffn primitive getpass prompt -Display @var{prompt} to the standard error output and read -a password from @file{/dev/tty}. If this file is not -accessible, it reads from standard input. The password may be -up to 127 characters in length. Additional characters and the -terminating newline character are discarded. While reading -the password, echoing and the generation of signals by special -characters is disabled. -@end deffn From 61921779a92a26d70f5c6d4e49f85a239353a345 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Thu, 19 Jul 2001 17:58:37 +0000 Subject: [PATCH 17/38] *** empty log message *** --- doc/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index 618f754bd..4f5660483 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2001-07-19 Rob Browning + + * posix.texi (Signals): add docs for setitimer and getitimer. + 2001-07-11 Gary Houston * scheme-evaluation.texi: Added `load-from-path'. Corrected `load': From 12ce651a811ce981123d97b3a9452eec38ebb0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Grabm=C3=BCller?= Date: Thu, 19 Jul 2001 20:22:12 +0000 Subject: [PATCH 18/38] * guile-config.in, Makefile.am: Updated copyright notice. --- guile-config/ChangeLog | 4 ++++ guile-config/Makefile.am | 2 +- guile-config/guile-config.in | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/guile-config/ChangeLog b/guile-config/ChangeLog index f163f4ffe..a9920b31e 100644 --- a/guile-config/ChangeLog +++ b/guile-config/ChangeLog @@ -1,3 +1,7 @@ +2001-07-18 Martin Grabmueller + + * guile-config.in, Makefile.am: Updated copyright notice. + 2001-05-28 Gary Houston * Makefile.am: let guile-config depend on libguile/libpath.h, diff --git a/guile-config/Makefile.am b/guile-config/Makefile.am index 7a39b5c12..19c7a6fbf 100644 --- a/guile-config/Makefile.am +++ b/guile-config/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with Automake to create Makefile.in ## Jim Blandy --- September 1997 ## -## Copyright (C) 1998, 1999 Free Software Foundation, Inc. +## Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. ## ## This file is part of GUILE. ## diff --git a/guile-config/guile-config.in b/guile-config/guile-config.in index 0e917889c..54ed9772e 100644 --- a/guile-config/guile-config.in +++ b/guile-config/guile-config.in @@ -4,7 +4,7 @@ ;;;; guile-config --- utility for linking programs with Guile ;;;; Jim Blandy --- September 1997 ;;;; -;;;; Copyright (C) 1998 Free Software Foundation, Inc. +;;;; Copyright (C) 1998, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by From 9cc64c3ea359c6798b26c365c22f8ac610ca1b05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Grabm=C3=BCller?= Date: Thu, 19 Jul 2001 20:23:03 +0000 Subject: [PATCH 19/38] * Makefile.am, readline.scm: Updated copyright notice. --- guile-readline/ChangeLog | 4 ++++ guile-readline/Makefile.am | 2 +- guile-readline/readline.scm | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/guile-readline/ChangeLog b/guile-readline/ChangeLog index 1c56ddff2..e431af5bf 100644 --- a/guile-readline/ChangeLog +++ b/guile-readline/ChangeLog @@ -1,3 +1,7 @@ +2001-07-18 Martin Grabmueller + + * Makefile.am, readline.scm: Updated copyright notice. + 2001-07-09 Thien-Thi Nguyen * readline.c: Remove "face-lift" comment. diff --git a/guile-readline/Makefile.am b/guile-readline/Makefile.am index 0b3038f45..1094501e9 100644 --- a/guile-readline/Makefile.am +++ b/guile-readline/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with Automake to create Makefile.in ## -## Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. +## Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. ## ## This file is part of GUILE. ## diff --git a/guile-readline/readline.scm b/guile-readline/readline.scm index f2960fac6..24f9de58f 100644 --- a/guile-readline/readline.scm +++ b/guile-readline/readline.scm @@ -1,6 +1,6 @@ ;;;; readline.scm --- support functions for command-line editing ;;;; -;;;; Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. +;;;; Copyright (C) 1997, 1999, 2000, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by From e39bbe80b6b305bf61c154c0376052a94fd0dbee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Grabm=C3=BCller?= Date: Thu, 19 Jul 2001 20:24:49 +0000 Subject: [PATCH 20/38] * and-let-star.scm, debug.scm, debugger.scm, history.scm, lineio.scm, null.scm, optargs.scm, r4rs.scm, r5rs.scm, receive.scm, safe-r5rs.scm, streams.scm: Updated copyright notice. --- ice-9/ChangeLog | 6 ++++++ ice-9/and-let-star.scm | 2 +- ice-9/debug.scm | 2 +- ice-9/debugger.scm | 2 +- ice-9/history.scm | 2 +- ice-9/lineio.scm | 2 +- ice-9/null.scm | 2 +- ice-9/optargs.scm | 2 +- ice-9/r4rs.scm | 2 +- ice-9/r5rs.scm | 2 +- ice-9/receive.scm | 2 +- ice-9/safe-r5rs.scm | 2 +- ice-9/streams.scm | 2 +- 13 files changed, 18 insertions(+), 12 deletions(-) diff --git a/ice-9/ChangeLog b/ice-9/ChangeLog index 90535775c..b3b7233a9 100644 --- a/ice-9/ChangeLog +++ b/ice-9/ChangeLog @@ -1,3 +1,9 @@ +2001-07-18 Martin Grabmueller + + * and-let-star.scm, debug.scm, debugger.scm, history.scm, + lineio.scm, null.scm, optargs.scm, r4rs.scm, r5rs.scm, + receive.scm, safe-r5rs.scm, streams.scm: Updated copyright notice. + 2001-07-17 Martin Grabmueller * r5rs.scm: Use `re-export' instead of `export' for re-exported diff --git a/ice-9/and-let-star.scm b/ice-9/and-let-star.scm index c2d7f6002..61765f910 100644 --- a/ice-9/and-let-star.scm +++ b/ice-9/and-let-star.scm @@ -1,7 +1,7 @@ ;;;; and-let-star.scm --- and-let* syntactic form (draft SRFI-2) for Guile ;;;; written by Michael Livshin ;;;; -;;;; Copyright (C) 1999 Free Software Foundation, Inc. +;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/ice-9/debug.scm b/ice-9/debug.scm index 0c25e5c70..bec2068b8 100644 --- a/ice-9/debug.scm +++ b/ice-9/debug.scm @@ -1,4 +1,4 @@ -;;;; Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation +;;;; Copyright (C) 1996, 1997, 1998, 1999, 2001 Free Software Foundation ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/ice-9/debugger.scm b/ice-9/debugger.scm index 16b6d81b5..3bf29ab75 100644 --- a/ice-9/debugger.scm +++ b/ice-9/debugger.scm @@ -1,6 +1,6 @@ ;;;; Guile Debugger -;;; Copyright (C) 1999 Free Software Foundation, Inc. +;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. ;;; ;;; This program is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU General Public License as diff --git a/ice-9/history.scm b/ice-9/history.scm index 66bb7a8cc..6ff1b25a5 100644 --- a/ice-9/history.scm +++ b/ice-9/history.scm @@ -1,4 +1,4 @@ -;;;; Copyright (C) 2000 Free Software Foundation, Inc. +;;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/ice-9/lineio.scm b/ice-9/lineio.scm index fda97d530..b45cf0d52 100644 --- a/ice-9/lineio.scm +++ b/ice-9/lineio.scm @@ -1,6 +1,6 @@ ;;; installed-scm-file -;;;; Copyright (C) 1996, 1998 Free Software Foundation, Inc. +;;;; Copyright (C) 1996, 1998, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/ice-9/null.scm b/ice-9/null.scm index 594f3d79f..30f785a4f 100644 --- a/ice-9/null.scm +++ b/ice-9/null.scm @@ -1,4 +1,4 @@ -;;;; Copyright (C) 2000 Free Software Foundation, Inc. +;;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/ice-9/optargs.scm b/ice-9/optargs.scm index fd4db654b..a64ca9cd8 100644 --- a/ice-9/optargs.scm +++ b/ice-9/optargs.scm @@ -1,6 +1,6 @@ ;;;; optargs.scm -- support for optional arguments ;;;; -;;;; Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. +;;;; Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/ice-9/r4rs.scm b/ice-9/r4rs.scm index f81833288..66a3952b8 100644 --- a/ice-9/r4rs.scm +++ b/ice-9/r4rs.scm @@ -1,7 +1,7 @@ ;;;; r4rs.scm --- definitions needed for libguile to be R4RS compliant ;;;; Jim Blandy --- October 1996 -;;;; Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. +;;;; Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/ice-9/r5rs.scm b/ice-9/r5rs.scm index faf75ae9e..73b9d0fe0 100644 --- a/ice-9/r5rs.scm +++ b/ice-9/r5rs.scm @@ -1,4 +1,4 @@ -;;;; Copyright (C) 2000 Free Software Foundation, Inc. +;;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/ice-9/receive.scm b/ice-9/receive.scm index 257c46f0b..56e5ecc45 100644 --- a/ice-9/receive.scm +++ b/ice-9/receive.scm @@ -1,6 +1,6 @@ ;;;; SRFI-8 -;;; Copyright (C) 2000 Free Software Foundation, Inc. +;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;;; ;;; This program is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU General Public License as diff --git a/ice-9/safe-r5rs.scm b/ice-9/safe-r5rs.scm index 0221bd1b9..b17dd57b0 100644 --- a/ice-9/safe-r5rs.scm +++ b/ice-9/safe-r5rs.scm @@ -1,4 +1,4 @@ -;;;; Copyright (C) 2000 Free Software Foundation, Inc. +;;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/ice-9/streams.scm b/ice-9/streams.scm index d300937e6..9091b896c 100644 --- a/ice-9/streams.scm +++ b/ice-9/streams.scm @@ -1,7 +1,7 @@ ;;;; streams.scm --- general lazy streams ;;;; -*- Scheme -*- -;;;; Copyright (C) 1999 Free Software Foundation, Inc. +;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by From f3a5178732b5c32dcd1b723ab2184d223bd44b7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Grabm=C3=BCller?= Date: Thu, 19 Jul 2001 20:27:40 +0000 Subject: [PATCH 21/38] * goops/util.scm: Updated copyright notice. --- oop/ChangeLog | 4 ++++ oop/goops/util.scm | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/oop/ChangeLog b/oop/ChangeLog index 0947befbe..2e82f3a1c 100644 --- a/oop/ChangeLog +++ b/oop/ChangeLog @@ -1,3 +1,7 @@ +2001-07-18 Martin Grabmueller + + * goops/util.scm: Updated copyright notice. + 2001-07-17 Martin Grabmueller * goops/save.scm: Use `re-export' instead of `export' when diff --git a/oop/goops/util.scm b/oop/goops/util.scm index ebc557dff..d3d904c60 100644 --- a/oop/goops/util.scm +++ b/oop/goops/util.scm @@ -1,4 +1,4 @@ -;;;; Copyright (C) 1999, 2000 Free Software Foundation, Inc. +;;;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by From 46a7b46f0cfe6c477c3a23f271e31665736f6da4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Grabm=C3=BCller?= Date: Thu, 19 Jul 2001 20:28:33 +0000 Subject: [PATCH 22/38] * srfi-11.scm, srfi-8.scm: Update copyright notice. --- srfi/ChangeLog | 4 ++++ srfi/srfi-11.scm | 2 +- srfi/srfi-8.scm | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/srfi/ChangeLog b/srfi/ChangeLog index 5b50721c6..2646f5e25 100644 --- a/srfi/ChangeLog +++ b/srfi/ChangeLog @@ -1,3 +1,7 @@ +2001-07-18 Martin Grabmueller + + * srfi-11.scm, srfi-8.scm: Update copyright notice. + 2001-07-17 Martin Grabmueller * srfi-14.c: Okay. Now I got it. Really. This time it's fixed. diff --git a/srfi/srfi-11.scm b/srfi/srfi-11.scm index 758ef282c..de0753636 100644 --- a/srfi/srfi-11.scm +++ b/srfi/srfi-11.scm @@ -1,6 +1,6 @@ ;;;; srfi-11.scm --- SRFI-11 procedures for Guile -;;; Copyright (C) 2000 Free Software Foundation, Inc. +;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;;; ;;; This program is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU General Public License as diff --git a/srfi/srfi-8.scm b/srfi/srfi-8.scm index 78732d445..52961ed3a 100644 --- a/srfi/srfi-8.scm +++ b/srfi/srfi-8.scm @@ -1,6 +1,6 @@ ;;;; srfi-8.scm --- SRFI-8 procedures for Guile -;;; Copyright (C) 2000 Free Software Foundation, Inc. +;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;;; ;;; This program is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU General Public License as From 96e30d2ab2bc04fa1f9207f151cef5886e08483d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Grabm=C3=BCller?= Date: Thu, 19 Jul 2001 20:30:37 +0000 Subject: [PATCH 23/38] * tests/alist.test, tests/bit-operations.test, tests/common-list.test, tests/environments.test, tests/eval.test, tests/gc.test, tests/hooks.test, tests/import.test, tests/interp.test, tests/list.test, tests/load.test, tests/numbers.test, tests/ports.test, tests/r4rs.test, tests/version.test, tests/weaks.test, lib.scm, guile-test: Updated copyright notice. --- test-suite/ChangeLog | 10 ++++++++++ test-suite/guile-test | 2 +- test-suite/lib.scm | 2 +- test-suite/tests/alist.test | 2 +- test-suite/tests/bit-operations.test | 2 +- test-suite/tests/common-list.test | 2 +- test-suite/tests/environments.test | 2 +- test-suite/tests/eval.test | 2 +- test-suite/tests/gc.test | 2 +- test-suite/tests/guardians.test | 2 +- test-suite/tests/hooks.test | 2 +- test-suite/tests/import.test | 2 +- test-suite/tests/interp.test | 2 +- test-suite/tests/list.test | 2 +- test-suite/tests/load.test | 2 +- test-suite/tests/numbers.test | 2 +- test-suite/tests/ports.test | 2 +- test-suite/tests/r4rs.test | 2 +- test-suite/tests/version.test | 2 +- test-suite/tests/weaks.test | 2 +- 20 files changed, 29 insertions(+), 19 deletions(-) diff --git a/test-suite/ChangeLog b/test-suite/ChangeLog index b54a5df3a..0aa2ad502 100644 --- a/test-suite/ChangeLog +++ b/test-suite/ChangeLog @@ -1,3 +1,13 @@ +2001-07-18 Martin Grabmueller + + * tests/alist.test, tests/bit-operations.test, + tests/common-list.test, tests/environments.test, tests/eval.test, + tests/gc.test, tests/hooks.test, tests/import.test, + tests/interp.test, tests/list.test, tests/load.test, + tests/numbers.test, tests/ports.test, tests/r4rs.test, + tests/version.test, tests/weaks.test, lib.scm, guile-test: Updated + copyright notice. + 2001-07-16 Martin Grabmueller * tests/srfi-14.test: New file. diff --git a/test-suite/guile-test b/test-suite/guile-test index 4d9819641..a040c0da2 100755 --- a/test-suite/guile-test +++ b/test-suite/guile-test @@ -5,7 +5,7 @@ ;;;; guile-test --- run the Guile test suite ;;;; Jim Blandy --- May 1999 ;;;; -;;;; Copyright (C) 1999 Free Software Foundation, Inc. +;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/lib.scm b/test-suite/lib.scm index 2ef8aee45..1084e641d 100644 --- a/test-suite/lib.scm +++ b/test-suite/lib.scm @@ -1,5 +1,5 @@ ;;;; test-suite/lib.scm --- generic support for testing -;;;; Copyright (C) 1999, 2000 Free Software Foundation, Inc. +;;;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/tests/alist.test b/test-suite/tests/alist.test index 39d676ada..c25459c53 100644 --- a/test-suite/tests/alist.test +++ b/test-suite/tests/alist.test @@ -1,5 +1,5 @@ ;;;; alist.test --- tests guile's alists -*- scheme -*- -;;;; Copyright (C) 1999 Free Software Foundation, Inc. +;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/tests/bit-operations.test b/test-suite/tests/bit-operations.test index 46c9fe1b8..f319648d3 100644 --- a/test-suite/tests/bit-operations.test +++ b/test-suite/tests/bit-operations.test @@ -1,5 +1,5 @@ ;;;; bit-operations.test --- bitwise operations on numbers -*- scheme -*- -;;;; Copyright (C) 2000 Free Software Foundation, Inc. +;;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/tests/common-list.test b/test-suite/tests/common-list.test index 6e404f7a8..8d675da9d 100644 --- a/test-suite/tests/common-list.test +++ b/test-suite/tests/common-list.test @@ -1,5 +1,5 @@ ;;;; common-list.test --- tests guile's common list functions -*- scheme -*- -;;;; Copyright (C) 2000 Free Software Foundation, Inc. +;;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/tests/environments.test b/test-suite/tests/environments.test index 895850d16..507dff7fe 100644 --- a/test-suite/tests/environments.test +++ b/test-suite/tests/environments.test @@ -1,5 +1,5 @@ ;;;; environments.test -*- scheme -*- -;;;; Copyright (C) 2000 Free Software Foundation, Inc. +;;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/tests/eval.test b/test-suite/tests/eval.test index 96e3afc8d..8e94885c3 100644 --- a/test-suite/tests/eval.test +++ b/test-suite/tests/eval.test @@ -1,5 +1,5 @@ ;;;; eval.test --- tests guile's evaluator -*- scheme -*- -;;;; Copyright (C) 2000 Free Software Foundation, Inc. +;;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/tests/gc.test b/test-suite/tests/gc.test index 7afeb4226..2617eff69 100644 --- a/test-suite/tests/gc.test +++ b/test-suite/tests/gc.test @@ -1,5 +1,5 @@ ;;;; gc.test --- test guile's garbage collection -*- scheme -*- -;;;; Copyright (C) 2000 Free Software Foundation, Inc. +;;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/tests/guardians.test b/test-suite/tests/guardians.test index 8d5a6eb2b..8fc42c2f6 100644 --- a/test-suite/tests/guardians.test +++ b/test-suite/tests/guardians.test @@ -1,7 +1,7 @@ ;;;; guardians.test --- test suite for Guile Guardians -*- scheme -*- ;;;; Jim Blandy --- July 1999 ;;;; -;;;; Copyright (C) 1999 Free Software Foundation, Inc. +;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/tests/hooks.test b/test-suite/tests/hooks.test index 1f309e5f2..45398d9ff 100644 --- a/test-suite/tests/hooks.test +++ b/test-suite/tests/hooks.test @@ -1,5 +1,5 @@ ;;;; hooks.test --- tests guile's hooks implementation -*- scheme -*- -;;;; Copyright (C) 1999 Free Software Foundation, Inc. +;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/tests/import.test b/test-suite/tests/import.test index 330c91a0b..f22522f8d 100644 --- a/test-suite/tests/import.test +++ b/test-suite/tests/import.test @@ -1,5 +1,5 @@ ;;;; import.test --- test selective and renaming imports -*- scheme -*- -;;;; Copyright (C) 2000 Free Software Foundation, Inc. +;;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/tests/interp.test b/test-suite/tests/interp.test index ac346b256..5d872759b 100644 --- a/test-suite/tests/interp.test +++ b/test-suite/tests/interp.test @@ -1,6 +1,6 @@ ;;;; interp.test --- tests for bugs in the Guile interpreter -*- scheme -*- ;;;; -;;;; Copyright (C) 1999 Free Software Foundation, Inc. +;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/tests/list.test b/test-suite/tests/list.test index 746eeb8ad..04929a2cc 100644 --- a/test-suite/tests/list.test +++ b/test-suite/tests/list.test @@ -1,5 +1,5 @@ ;;;; list.test --- tests guile's lists -*- scheme -*- -;;;; Copyright (C) 2000 Free Software Foundation, Inc. +;;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/tests/load.test b/test-suite/tests/load.test index 473d09de2..294bd252a 100644 --- a/test-suite/tests/load.test +++ b/test-suite/tests/load.test @@ -1,7 +1,7 @@ ;;;; load.test --- test LOAD and path searching functions -*- scheme -*- ;;;; Jim Blandy --- September 1999 ;;;; -;;;; Copyright (C) 1999 Free Software Foundation, Inc. +;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/tests/numbers.test b/test-suite/tests/numbers.test index 139715f81..f20a37d93 100644 --- a/test-suite/tests/numbers.test +++ b/test-suite/tests/numbers.test @@ -1,5 +1,5 @@ ;;;; numbers.test --- tests guile's numbers -*- scheme -*- -;;;; Copyright (C) 2000 Free Software Foundation, Inc. +;;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/tests/ports.test b/test-suite/tests/ports.test index 6fa39cd8a..956aac191 100644 --- a/test-suite/tests/ports.test +++ b/test-suite/tests/ports.test @@ -1,7 +1,7 @@ ;;;; ports.test --- test suite for Guile I/O ports -*- scheme -*- ;;;; Jim Blandy --- May 1999 ;;;; -;;;; Copyright (C) 1999 Free Software Foundation, Inc. +;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/tests/r4rs.test b/test-suite/tests/r4rs.test index 246bbfcfe..c9fbb1525 100644 --- a/test-suite/tests/r4rs.test +++ b/test-suite/tests/r4rs.test @@ -1,5 +1,5 @@ ;;;; r4rs.test --- tests for R4RS compliance -*- scheme -*- -;;;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1999 Free Software Foundation, Inc. +;;;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1999, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/tests/version.test b/test-suite/tests/version.test index 3bf6bb6fe..79587923d 100644 --- a/test-suite/tests/version.test +++ b/test-suite/tests/version.test @@ -1,7 +1,7 @@ ;;;; versions.test --- test suite for Guile's version functions -*- scheme -*- ;;;; Greg J. Badros ;;;; -;;;; Copyright (C) 2000 Free Software Foundation, Inc. +;;;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by diff --git a/test-suite/tests/weaks.test b/test-suite/tests/weaks.test index b5be62da5..e66c89282 100644 --- a/test-suite/tests/weaks.test +++ b/test-suite/tests/weaks.test @@ -1,5 +1,5 @@ ;;;; weaks.test --- tests guile's weaks -*- scheme -*- -;;;; Copyright (C) 1999 Free Software Foundation, Inc. +;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. ;;;; ;;;; This program is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by From c0b2936ee9fdc24132d72562d01fd65223742081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Grabm=C3=BCller?= Date: Thu, 19 Jul 2001 20:57:59 +0000 Subject: [PATCH 24/38] * INSTALL, Makefile.am, configure.in: Updated copyright notice. --- ChangeLog | 4 ++++ INSTALL | 2 +- Makefile.am | 2 +- configure.in | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0c98e8c21..635f21c57 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,10 @@ * configure.in: add checks for setitimer and getitimer. Add --enable-error-on-warning. +2001-07-18 Martin Grabmueller + + * INSTALL, Makefile.am, configure.in: Updated copyright notice. + 2001-07-15 Thien-Thi Nguyen * HACKING: Remove onerous authorship-info deletion clause. diff --git a/INSTALL b/INSTALL index 7e8d40d2b..fedf6dfb1 100644 --- a/INSTALL +++ b/INSTALL @@ -1,5 +1,5 @@ Guile Installation Guide -Copyright (c) 1996, 1997, 1998, 1999, 2000 Free software Foundation, Inc. +Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the diff --git a/Makefile.am b/Makefile.am index 561cd8885..c352d4bd1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in. ## -## Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. +## Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. ## ## This file is part of GUILE. ## diff --git a/configure.in b/configure.in index 78a0bf7c6..90bec143d 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl configuration script for Guile dnl Process this file with autoconf to produce configure. dnl -dnl Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. +dnl Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. dnl dnl This file is part of GUILE dnl From 58ade1022ca491dbb86565aa4e514089ec6fcabd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Grabm=C3=BCller?= Date: Thu, 19 Jul 2001 21:08:49 +0000 Subject: [PATCH 25/38] * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c, chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c, feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c, gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, gsubr.c, gsubr.h, guardians.h, guile-func-name-check.in, guile-snarf-docs-texi.in, guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in, hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h, objprop.c, objprop.h, options.c, options.h, random.h, regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c, strerror.c, strop.h, strports.h, threads.h, values.c, values.h, version.c, version.h: Updated copyright notice. --- libguile/ChangeLog | 15 +++++++++++++++ libguile/alist.c | 2 +- libguile/arbiters.c | 2 +- libguile/async.h | 2 +- libguile/backtrace.h | 2 +- libguile/boolean.c | 2 +- libguile/chars.c | 2 +- libguile/chars.h | 2 +- libguile/continuations.h | 2 +- libguile/debug-malloc.h | 2 +- libguile/dynl.c | 2 +- libguile/feature.c | 2 +- libguile/feature.h | 2 +- libguile/filesys.h | 2 +- libguile/fluids.h | 2 +- libguile/fports.h | 2 +- libguile/gc_os_dep.c | 2 +- libguile/gdb_interface.h | 2 +- libguile/gh_eval.c | 2 +- libguile/gh_funcs.c | 2 +- libguile/gh_io.c | 2 +- libguile/gh_list.c | 2 +- libguile/gh_predicates.c | 2 +- libguile/gsubr.c | 2 +- libguile/gsubr.h | 2 +- libguile/guardians.h | 2 +- libguile/guile-func-name-check.in | 2 +- libguile/guile-snarf-docs-texi.in | 2 +- libguile/guile-snarf-docs.in | 2 +- libguile/guile-snarf.awk.in | 2 +- libguile/guile-snarf.in | 2 +- libguile/hashtab.h | 2 +- libguile/iselect.h | 2 +- libguile/keywords.h | 2 +- libguile/lang.c | 2 +- libguile/list.h | 2 +- libguile/load.h | 2 +- libguile/objprop.c | 2 +- libguile/objprop.h | 2 +- libguile/options.c | 2 +- libguile/options.h | 2 +- libguile/random.h | 2 +- libguile/regex-posix.h | 2 +- libguile/root.c | 2 +- libguile/root.h | 2 +- libguile/script.c | 2 +- libguile/snarf.h | 2 +- libguile/stackchk.c | 2 +- libguile/strerror.c | 2 +- libguile/strop.h | 2 +- libguile/strports.h | 2 +- libguile/threads.h | 2 +- libguile/values.c | 2 +- libguile/values.h | 2 +- libguile/version.c | 2 +- libguile/version.h | 2 +- 56 files changed, 70 insertions(+), 55 deletions(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 56abc6eda..d94097fec 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -13,6 +13,21 @@ * scmsigs.c (s_scm_setitimer): new function. (s_scm_setitimer): new function. +2001-07-18 Martin Grabmueller + + * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c, + chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c, + feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c, + gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c, + gh_predicates.c, gsubr.c, gsubr.h, guardians.h, + guile-func-name-check.in, guile-snarf-docs-texi.in, + guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in, + hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h, + objprop.c, objprop.h, options.c, options.h, random.h, + regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c, + strerror.c, strop.h, strports.h, threads.h, values.c, values.h, + version.c, version.h: Updated copyright notice. + 2001-07-17 Dirk Herrmann * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print, diff --git a/libguile/alist.c b/libguile/alist.c index 0b2e81557..e2fa86068 100644 --- a/libguile/alist.c +++ b/libguile/alist.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/arbiters.c b/libguile/arbiters.c index 7bd92caa8..a6d17ca80 100644 --- a/libguile/arbiters.c +++ b/libguile/arbiters.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996, 1997, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/async.h b/libguile/async.h index 4a5afd59f..15a1841cb 100644 --- a/libguile/async.h +++ b/libguile/async.h @@ -2,7 +2,7 @@ #ifndef SCM_ASYNC_H #define SCM_ASYNC_H -/* Copyright (C) 1995, 96, 97, 98, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 96, 97, 98, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/backtrace.h b/libguile/backtrace.h index 0bc8c0803..db0cd8dc5 100644 --- a/libguile/backtrace.h +++ b/libguile/backtrace.h @@ -2,7 +2,7 @@ #ifndef BACKTRACEH #define BACKTRACEH -/* Copyright (C) 1996, 1998, 1999, 2000 Free Software Foundation +/* Copyright (C) 1996, 1998, 1999, 2000, 2001 Free Software Foundation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/boolean.c b/libguile/boolean.c index cea294c62..da56aab54 100644 --- a/libguile/boolean.c +++ b/libguile/boolean.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/chars.c b/libguile/chars.c index a8967b99f..229da4b35 100644 --- a/libguile/chars.c +++ b/libguile/chars.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/chars.h b/libguile/chars.h index 7339f0255..65cc079d2 100644 --- a/libguile/chars.h +++ b/libguile/chars.h @@ -2,7 +2,7 @@ #ifndef SCM_CHARSH #define SCM_CHARSH -/* Copyright (C) 1995,1996, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/continuations.h b/libguile/continuations.h index 85002ae44..2c67d78a5 100644 --- a/libguile/continuations.h +++ b/libguile/continuations.h @@ -2,7 +2,7 @@ #ifndef CONTINUATIONSH #define CONTINUATIONSH -/* Copyright (C) 1995,1996, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/debug-malloc.h b/libguile/debug-malloc.h index b31b3191e..29e465bc0 100644 --- a/libguile/debug-malloc.h +++ b/libguile/debug-malloc.h @@ -2,7 +2,7 @@ #ifndef DEBUGMALLOCH #define DEBUGMALLOCH -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/dynl.c b/libguile/dynl.c index 1e9d2718a..70d36341f 100644 --- a/libguile/dynl.c +++ b/libguile/dynl.c @@ -1,6 +1,6 @@ /* dynl.c - dynamic linking * - * Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. + * Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/feature.c b/libguile/feature.c index 108cfdd61..30f5325c3 100644 --- a/libguile/feature.c +++ b/libguile/feature.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/feature.h b/libguile/feature.h index c22325917..dcde6803f 100644 --- a/libguile/feature.h +++ b/libguile/feature.h @@ -2,7 +2,7 @@ #ifndef FEATUREH #define FEATUREH -/* Copyright (C) 1995, 1996, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1999, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/filesys.h b/libguile/filesys.h index e0820044b..ee845b743 100644 --- a/libguile/filesys.h +++ b/libguile/filesys.h @@ -2,7 +2,7 @@ #ifndef FILESYSH #define FILESYSH -/* Copyright (C) 1995,1997,1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1997,1998, 1999, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/fluids.h b/libguile/fluids.h index 60c7a879f..acc6bebb4 100644 --- a/libguile/fluids.h +++ b/libguile/fluids.h @@ -3,7 +3,7 @@ #ifndef FLUIDSH #define FLUIDSH -/* Copyright (C) 1996, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/fports.h b/libguile/fports.h index a63699fe3..c8de4f2cb 100644 --- a/libguile/fports.h +++ b/libguile/fports.h @@ -2,7 +2,7 @@ #ifndef FPORTSH #define FPORTSH -/* Copyright (C) 1995,1996,1997,1998,1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/gc_os_dep.c b/libguile/gc_os_dep.c index ab392729d..2d5a19491 100644 --- a/libguile/gc_os_dep.c +++ b/libguile/gc_os_dep.c @@ -3,7 +3,7 @@ * Copyright (c) 1991-1995 by Xerox Corporation. All rights reserved. * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. * Copyright (c) 1999 by Hewlett-Packard Company. All rights reserved. - * Copyright (c) 2000 Free Software Foundation + * Copyright (c) 2000, 2001 Free Software Foundation * * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. diff --git a/libguile/gdb_interface.h b/libguile/gdb_interface.h index fc44bc815..ad3e3af5f 100644 --- a/libguile/gdb_interface.h +++ b/libguile/gdb_interface.h @@ -1,5 +1,5 @@ /* Simple interpreter interface for GDB, the GNU debugger. - Copyright (C) 1996, 2000 Free Software Foundation + Copyright (C) 1996, 2000, 2001 Free Software Foundation This file is part of GDB. diff --git a/libguile/gh_eval.c b/libguile/gh_eval.c index 48259eff3..e1e37d527 100644 --- a/libguile/gh_eval.c +++ b/libguile/gh_eval.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998, 2000, 2001 Free Software Foundation, Inc. * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/gh_funcs.c b/libguile/gh_funcs.c index de3b97a92..74136096a 100644 --- a/libguile/gh_funcs.c +++ b/libguile/gh_funcs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998, 2000, 2001 Free Software Foundation, Inc. * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/gh_io.c b/libguile/gh_io.c index 41ca3a724..f77cefec5 100644 --- a/libguile/gh_io.c +++ b/libguile/gh_io.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997, 2000, 2001 Free Software Foundation, Inc. * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/gh_list.c b/libguile/gh_list.c index 6935ffc4a..1330fc6ef 100644 --- a/libguile/gh_list.c +++ b/libguile/gh_list.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997, 2000, 2001 Free Software Foundation, Inc. * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/gh_predicates.c b/libguile/gh_predicates.c index 1bd234b50..8f3e081b5 100644 --- a/libguile/gh_predicates.c +++ b/libguile/gh_predicates.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997, 2000, 2001 Free Software Foundation, Inc. * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/gsubr.c b/libguile/gsubr.c index 9b3e1fbff..6fe3492a8 100644 --- a/libguile/gsubr.c +++ b/libguile/gsubr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998, 1999, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/gsubr.h b/libguile/gsubr.h index 131854c4f..fe7dcd8f5 100644 --- a/libguile/gsubr.h +++ b/libguile/gsubr.h @@ -2,7 +2,7 @@ #ifndef GSUBRH #define GSUBRH -/* Copyright (C) 1995,1996,1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/guardians.h b/libguile/guardians.h index eb79c1305..4a0489d03 100644 --- a/libguile/guardians.h +++ b/libguile/guardians.h @@ -2,7 +2,7 @@ #ifndef SCM_GUARDIANH #define SCM_GUARDIANH -/* Copyright (C) 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/guile-func-name-check.in b/libguile/guile-func-name-check.in index da1435192..adf5594e8 100644 --- a/libguile/guile-func-name-check.in +++ b/libguile/guile-func-name-check.in @@ -1,6 +1,6 @@ #!/usr/bin/awk -f # -# Copyright (C) 2000 Free Software Foundation, Inc. +# Copyright (C) 2000, 2001 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libguile/guile-snarf-docs-texi.in b/libguile/guile-snarf-docs-texi.in index 587c6aff7..0aa9f9cff 100755 --- a/libguile/guile-snarf-docs-texi.in +++ b/libguile/guile-snarf-docs-texi.in @@ -1,7 +1,7 @@ #!/bin/sh # Massage the snarfed docs to texinfo. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libguile/guile-snarf-docs.in b/libguile/guile-snarf-docs.in index 46c540d48..5129d7d6f 100755 --- a/libguile/guile-snarf-docs.in +++ b/libguile/guile-snarf-docs.in @@ -1,7 +1,7 @@ #!/bin/sh # Extract the doc stuff for builtin things. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libguile/guile-snarf.awk.in b/libguile/guile-snarf.awk.in index 8d2e73bb3..107e4fc7d 100644 --- a/libguile/guile-snarf.awk.in +++ b/libguile/guile-snarf.awk.in @@ -1,4 +1,4 @@ -# Copyright (C) 1999, 2000 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libguile/guile-snarf.in b/libguile/guile-snarf.in index ffb035146..3d708dbf3 100644 --- a/libguile/guile-snarf.in +++ b/libguile/guile-snarf.in @@ -1,7 +1,7 @@ #!/bin/sh # Extract the initialization actions for builtin things. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libguile/hashtab.h b/libguile/hashtab.h index 785626c84..c7594a344 100644 --- a/libguile/hashtab.h +++ b/libguile/hashtab.h @@ -2,7 +2,7 @@ #ifndef HASHTABH #define HASHTABH -/* Copyright (C) 1995, 1996, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1999, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/iselect.h b/libguile/iselect.h index fdaedcc61..4a7971864 100644 --- a/libguile/iselect.h +++ b/libguile/iselect.h @@ -3,7 +3,7 @@ #ifndef ISELECTH #define ISELECTH -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/keywords.h b/libguile/keywords.h index 9112abb45..13ce8cb95 100644 --- a/libguile/keywords.h +++ b/libguile/keywords.h @@ -2,7 +2,7 @@ #ifndef KEYWORDSH #define KEYWORDSH -/* Copyright (C) 1995,1996,1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1999, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/lang.c b/libguile/lang.c index 8ec52f74e..b5791fbbf 100644 --- a/libguile/lang.c +++ b/libguile/lang.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/list.h b/libguile/list.h index ba8601974..d4f2c6efb 100644 --- a/libguile/list.h +++ b/libguile/list.h @@ -2,7 +2,7 @@ #ifndef LISTH #define LISTH -/* Copyright (C) 1995,1996,1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/load.h b/libguile/load.h index fbba9be08..b3c2c2e52 100644 --- a/libguile/load.h +++ b/libguile/load.h @@ -2,7 +2,7 @@ #ifndef LOADH #define LOADH -/* Copyright (C) 1995,1996,1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/objprop.c b/libguile/objprop.c index 0e3eee7bc..4d5dd79cb 100644 --- a/libguile/objprop.c +++ b/libguile/objprop.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/objprop.h b/libguile/objprop.h index 376991017..bc590fbe0 100644 --- a/libguile/objprop.h +++ b/libguile/objprop.h @@ -2,7 +2,7 @@ #ifndef OBJPROPH #define OBJPROPH -/* Copyright (C) 1995, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/options.c b/libguile/options.c index 327f0aa5d..74cb820f9 100644 --- a/libguile/options.c +++ b/libguile/options.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1998, 2000 Free Software Foundation +/* Copyright (C) 1995, 1996, 1998, 2000, 2001 Free Software Foundation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/options.h b/libguile/options.h index 899f5eed5..f8b56ef68 100644 --- a/libguile/options.h +++ b/libguile/options.h @@ -2,7 +2,7 @@ #ifndef OPTIONSH #define OPTIONSH -/* Copyright (C) 1995,1996, 2000 Free Software Foundation +/* Copyright (C) 1995,1996, 2000, 2001 Free Software Foundation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/random.h b/libguile/random.h index 020a745bc..0901c597b 100644 --- a/libguile/random.h +++ b/libguile/random.h @@ -2,7 +2,7 @@ #ifndef RANDOMH #define RANDOMH -/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/regex-posix.h b/libguile/regex-posix.h index 23416738f..798c55240 100644 --- a/libguile/regex-posix.h +++ b/libguile/regex-posix.h @@ -3,7 +3,7 @@ #ifndef REGEXPOSIXH #define REGEXPOSIXH -/* Copyright (C) 1997,1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/root.c b/libguile/root.c index 150d66dc0..6ff24ca49 100644 --- a/libguile/root.c +++ b/libguile/root.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/root.h b/libguile/root.h index e5a680e84..2bc3b4f20 100644 --- a/libguile/root.h +++ b/libguile/root.h @@ -3,7 +3,7 @@ #ifndef ROOTH #define ROOTH -/* Copyright (C) 1996,1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996,1998, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/script.c b/libguile/script.c index ebd38c1e8..2f740659c 100644 --- a/libguile/script.c +++ b/libguile/script.c @@ -584,7 +584,7 @@ scm_compile_shell_switches (int argc, char **argv) { /* Print version number. */ printf ("Guile %s\n" - "Copyright (c) 1995, 1996, 1997, 2000 Free Software Foundation\n" + "Copyright (c) 1995, 1996, 1997, 2000, 2001 Free Software Foundation\n" "Guile may be distributed under the terms of the GNU General Public Licence;\n" "certain other uses are permitted as well. For details, see the file\n" "`COPYING', which is included in the Guile distribution.\n" diff --git a/libguile/snarf.h b/libguile/snarf.h index 36eea885e..8c03c3874 100644 --- a/libguile/snarf.h +++ b/libguile/snarf.h @@ -5,7 +5,7 @@ #ifndef LIBGUILE_SNARF_H #define LIBGUILE_SNARF_H -/* Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/stackchk.c b/libguile/stackchk.c index abf6a5a55..da3ebe7f9 100644 --- a/libguile/stackchk.c +++ b/libguile/stackchk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/strerror.c b/libguile/strerror.c index ba43e8e6b..8c42cd2a4 100644 --- a/libguile/strerror.c +++ b/libguile/strerror.c @@ -1,5 +1,5 @@ /* Turning errno values into English error messages. - Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 2000 Free Software Foundation, Inc. + Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/libguile/strop.h b/libguile/strop.h index 45a3ecb84..14b079849 100644 --- a/libguile/strop.h +++ b/libguile/strop.h @@ -2,7 +2,7 @@ #ifndef STROPH #define STROPH -/* Copyright (C) 1995,1996,1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/strports.h b/libguile/strports.h index 5de723b8b..590aa2959 100644 --- a/libguile/strports.h +++ b/libguile/strports.h @@ -2,7 +2,7 @@ #ifndef STRPORTSH #define STRPORTSH -/* Copyright (C) 1995,1996, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/threads.h b/libguile/threads.h index 408ce1734..1cc228594 100644 --- a/libguile/threads.h +++ b/libguile/threads.h @@ -3,7 +3,7 @@ #ifndef THREADSH #define THREADSH -/* Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/values.c b/libguile/values.c index 5aad29a89..a11b0041d 100644 --- a/libguile/values.c +++ b/libguile/values.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/values.h b/libguile/values.h index 20777153d..1ddac9a71 100644 --- a/libguile/values.h +++ b/libguile/values.h @@ -2,7 +2,7 @@ #ifndef SCM_VALUES_H #define SCM_VALUES_H -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/version.c b/libguile/version.c index a3ac0d920..c74f66c56 100644 --- a/libguile/version.c +++ b/libguile/version.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996, 1999, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/version.h b/libguile/version.h index 15b01406f..b95254632 100644 --- a/libguile/version.h +++ b/libguile/version.h @@ -2,7 +2,7 @@ #ifndef VERSIONH #define VERSIONH -/* Copyright (C) 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From bd8398e6ef8a5deb178f39c2632e4d1a0f9fc5ea Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 21 Jul 2001 06:42:46 +0000 Subject: [PATCH 26/38] Remove "how to contribute" header paragraph. --- TODO | 4 ---- 1 file changed, 4 deletions(-) diff --git a/TODO b/TODO index db2903ad4..f5836ede6 100644 --- a/TODO +++ b/TODO @@ -13,10 +13,6 @@ Ownership is indicated by `[USERNAME]'. Maintainers (w/ write privs) can indicate sponsorship by `[ACTUAL-OWNER:MAINTAINER]', where both elements are usernames. -If you would like to suggest changes or contribute patches, please first email -guile-devel@gnu.org to coordinate efforts. If you distribute this file, -please include the first line and check around on the Internet for updates. - See also file HACKING. ------------------------------------------------------------------------------ From 1bed8c28a26868a64d35a6dd8d814412e3edb0ac Mon Sep 17 00:00:00 2001 From: Gary Houston Date: Sat, 21 Jul 2001 21:11:16 +0000 Subject: [PATCH 27/38] * scmsigs.c: include sys/time.h for itimer stuff. --- libguile/ChangeLog | 4 ++++ libguile/scmsigs.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index d94097fec..213f021cd 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,7 @@ +2001-07-21 Gary Houston + + * scmsigs.c: include sys/time.h for itimer stuff. + 2001-07-19 Rob Browning * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning. diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c index ef3e80c68..93f806a33 100644 --- a/libguile/scmsigs.c +++ b/libguile/scmsigs.c @@ -59,6 +59,10 @@ #include #endif +#ifdef HAVE_SYS_TIME_H +#include +#endif + /* The thread system has its own sleep and usleep functions. */ #ifndef USE_THREADS From 32bc3c4596f06d71cd9f09ccecbc6075a8f82883 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sun, 22 Jul 2001 11:08:18 +0000 Subject: [PATCH 28/38] (autoload-info): Also handle `defmacro-public' forms. --- scripts/generate-autoload | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/generate-autoload b/scripts/generate-autoload index eef2b88c5..83fa1f3f2 100755 --- a/scripts/generate-autoload +++ b/scripts/generate-autoload @@ -38,9 +38,10 @@ exec ${GUILE-guile} -c "(apply $main (cdr (command-line)))" "$@" ;; ;; For each file, a symbol triggers an autoload if it is found in one ;; of these situations: -;; - in the `:export' clause of a `define-module' form; -;; - in a top-level `export' or `export-syntax' form; -;; - in a `define-public' form. +;; - in the `:export' clause of a `define-module' form +;; - in a top-level `export' or `export-syntax' form +;; - in a `define-public' form +;; - in a `defmacro-public' form ;; ;; The module name is inferred from the `define-module' form. If either the ;; module name or the exports list cannot be determined, no autoload entry is @@ -100,6 +101,13 @@ exec ${GUILE-guile} -c "(apply $main (cdr (command-line)))" "$@" (loop (read p) module-name (cons (cadr form) exports))) + ((and (list? form) + (< 3 (length form)) + (eq? 'defmacro-public (car form)) + (symbol? (cadr form))) + (loop (read p) + module-name + (cons (cadr form) exports))) (else (loop (read p) module-name exports))))))) (define (generate-autoload . args) From 9977b4fb1f0e255226fe047defed6e5710d95e05 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sun, 22 Jul 2001 11:09:23 +0000 Subject: [PATCH 29/38] *** empty log message *** --- scripts/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/ChangeLog b/scripts/ChangeLog index 257fdad91..b25efc2f2 100644 --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2001-07-22 Thien-Thi Nguyen + + * generate-autoload (autoload-info): + Also handle `defmacro-public' forms. + 2001-07-14 Thien-Thi Nguyen * PROGRAM, display-commentary, doc-snarf, generate-autoload, From 6a1677a396302f218b8ce82973d3f50f7d1b9487 Mon Sep 17 00:00:00 2001 From: Gary Houston Date: Sun, 22 Jul 2001 12:49:02 +0000 Subject: [PATCH 30/38] * regex-posix.c (s_scm_regexp_exec): use scm_long2num not SCM_MAKINUM to convert regoff_t value to SCM. --- libguile/ChangeLog | 5 +++++ libguile/regex-posix.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 213f021cd..13e56a81a 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,8 @@ +2001-07-22 Gary Houston + + * regex-posix.c (s_scm_regexp_exec): use scm_long2num not + SCM_MAKINUM to convert regoff_t value to SCM. + 2001-07-21 Gary Houston * scmsigs.c: include sys/time.h for itimer stuff. diff --git a/libguile/regex-posix.c b/libguile/regex-posix.c index 1a232d59f..d5d8fba63 100644 --- a/libguile/regex-posix.c +++ b/libguile/regex-posix.c @@ -278,8 +278,8 @@ SCM_DEFINE (scm_regexp_exec, "regexp-exec", 2, 2, 0, SCM_VELTS(mvec)[i+1] = scm_cons (SCM_MAKINUM (-1), SCM_MAKINUM (-1)); else SCM_VELTS(mvec)[i+1] - = scm_cons(SCM_MAKINUM(matches[i].rm_so + offset), - SCM_MAKINUM(matches[i].rm_eo + offset)); + = scm_cons (scm_long2num (matches[i].rm_so + offset), + scm_long2num (matches[i].rm_eo + offset)); } scm_must_free ((char *) matches); SCM_ALLOW_INTS; From f4d1173bb3e2e0b0de40968120b7fecca67a879f Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Sun, 22 Jul 2001 18:28:21 +0000 Subject: [PATCH 31/38] Check for "inttypes.h". --- configure.in | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.in b/configure.in index 90bec143d..69656d4a6 100644 --- a/configure.in +++ b/configure.in @@ -178,6 +178,7 @@ dnl If these types don't exist on this platform, they are replaced by dnl "unsigned long" and "long", respectively. AC_CHECK_HEADERS(stdint.h) +AC_CHECK_HEADERS(inttypes.h) AC_CHECK_TYPES([uintptr_t, ptrdiff_t]) AC_CACHE_CHECK([for long longs], scm_cv_long_longs, From cda36c23561b70fb88cd1670227bd51933b38207 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Sun, 22 Jul 2001 18:30:08 +0000 Subject: [PATCH 32/38] * tags.h: Include inttypes.h when we have it. * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot is taken by the new SCM_IM_CALL_WITH_VALUES. * print.c (scm_isymnames): Update table accordingly. --- libguile/tags.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libguile/tags.h b/libguile/tags.h index 7d45c66c5..9b877b7ec 100644 --- a/libguile/tags.h +++ b/libguile/tags.h @@ -54,6 +54,10 @@ #include #endif +#ifdef HAVE_INTTYPES_H +#include +#endif + /* In the beginning was the Word: @@ -487,7 +491,7 @@ extern char *scm_isymnames[]; /* defined in print.c */ * used instead. It is not ideal to let this kind of unique and * strange values loose on the Scheme level. */ -#define SCM_UNBOUND SCM_MAKIFLAG (33) +#define SCM_UNBOUND SCM_MAKIFLAG (34) #define SCM_UNBNDP(x) (SCM_EQ_P ((x), SCM_UNDEFINED)) From 24d1fde84c208f30204d726d26847b379ef4c5ab Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Sun, 22 Jul 2001 18:30:36 +0000 Subject: [PATCH 33/38] * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot is taken by the new SCM_IM_CALL_WITH_VALUES. * print.c (scm_isymnames): Update table accordingly. --- libguile/print.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libguile/print.c b/libguile/print.c index 82c619586..25d854fad 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -121,7 +121,8 @@ char *scm_isymnames[] = "#@bind", "#@delay", - + "#@call-with-values", + "#" }; From f3805ebb7cd244512e9f1d05c46d45df653da633 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Sun, 22 Jul 2001 18:31:11 +0000 Subject: [PATCH 34/38] *** empty log message *** --- ChangeLog | 4 ++++ libguile/ChangeLog | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 635f21c57..2aadabd3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-07-22 Marius Vollmer + + * configure.in: Check for "inttypes.h". + 2001-07-19 Rob Browning * configure.in: add checks for setitimer and getitimer. diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 13e56a81a..0d72dc1b3 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,13 @@ +2001-07-22 Marius Vollmer + + * tags.h: Include inttypes.h when we have it. + +2001-07-13 Marius Vollmer + + * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot + is taken by the new SCM_IM_CALL_WITH_VALUES. + * print.c (scm_isymnames): Update table accordingly. + 2001-07-22 Gary Houston * regex-posix.c (s_scm_regexp_exec): use scm_long2num not From d1bc66027ef9081ab86bb7a1e5061700df022e87 Mon Sep 17 00:00:00 2001 From: Gary Houston Date: Sun, 22 Jul 2001 20:17:28 +0000 Subject: [PATCH 35/38] * srfi-14.c (scm_char_set_intersection, scm_char_set_xor): remove the compulsory cs1 arguments: all args are optional in final spec. * srfi-14.h: declarations updated. --- srfi/ChangeLog | 6 ++++ srfi/srfi-14.c | 76 +++++++++++++++++++++++++++++++------------------- srfi/srfi-14.h | 4 +-- 3 files changed, 56 insertions(+), 30 deletions(-) diff --git a/srfi/ChangeLog b/srfi/ChangeLog index 2646f5e25..e4a7440a8 100644 --- a/srfi/ChangeLog +++ b/srfi/ChangeLog @@ -1,3 +1,9 @@ +2001-07-22 Gary Houston + + * srfi-14.c (scm_char_set_intersection, scm_char_set_xor): remove + the compulsory cs1 arguments: all args are optional in final spec. + * srfi-14.h: declarations updated. + 2001-07-18 Martin Grabmueller * srfi-11.scm, srfi-8.scm: Update copyright notice. diff --git a/srfi/srfi-14.c b/srfi/srfi-14.c index 7973e61d0..798f75bb5 100644 --- a/srfi/srfi-14.c +++ b/srfi/srfi-14.c @@ -1070,31 +1070,41 @@ SCM_DEFINE (scm_char_set_union, "char-set-union", 0, 0, 1, #undef FUNC_NAME -SCM_DEFINE (scm_char_set_intersection, "char-set-intersection", 1, 0, 1, - (SCM cs1, SCM rest), +SCM_DEFINE (scm_char_set_intersection, "char-set-intersection", 0, 0, 1, + (SCM rest), "Return the intersection of all argument character sets.") #define FUNC_NAME s_scm_char_set_intersection { - int c = 2; SCM res; - long * p; - SCM_VALIDATE_SMOB (1, cs1, charset); SCM_VALIDATE_REST_ARGUMENT (rest); - res = scm_char_set_copy (cs1); - p = (long *) SCM_SMOB_DATA (res); - while (!SCM_NULLP (rest)) + if (SCM_NULLP (rest)) + res = make_char_set (FUNC_NAME); + else { - int k; - SCM cs = SCM_CAR (rest); - SCM_VALIDATE_SMOB (c, cs, charset); - c++; + long *p; + int argnum = 2; + + res = scm_char_set_copy (SCM_CAR (rest)); + p = (long *) SCM_SMOB_DATA (res); rest = SCM_CDR (rest); - for (k = 0; k < LONGS_PER_CHARSET; k++) - p[k] &= ((long *) SCM_SMOB_DATA (cs))[k]; + while (SCM_CONSP (rest)) + { + int k; + SCM cs = SCM_CAR (rest); + long *cs_data; + + SCM_VALIDATE_SMOB (argnum, cs, charset); + argnum++; + cs_data = (long *) SCM_SMOB_DATA (cs); + rest = SCM_CDR (rest); + for (k = 0; k < LONGS_PER_CHARSET; k++) + p[k] &= cs_data[k]; + } } + return res; } #undef FUNC_NAME @@ -1130,30 +1140,40 @@ SCM_DEFINE (scm_char_set_difference, "char-set-difference", 1, 0, 1, #undef FUNC_NAME -SCM_DEFINE (scm_char_set_xor, "char-set-xor", 1, 0, 1, - (SCM cs1, SCM rest), +SCM_DEFINE (scm_char_set_xor, "char-set-xor", 0, 0, 1, + (SCM rest), "Return the exclusive-or of all argument character sets.") #define FUNC_NAME s_scm_char_set_xor { - int c = 2; SCM res; - long * p; - SCM_VALIDATE_SMOB (1, cs1, charset); SCM_VALIDATE_REST_ARGUMENT (rest); - res = scm_char_set_copy (cs1); - p = (long *) SCM_SMOB_DATA (res); - while (!SCM_NULLP (rest)) + if (SCM_NULLP (rest)) + res = make_char_set (FUNC_NAME); + else { - int k; - SCM cs = SCM_CAR (rest); - SCM_VALIDATE_SMOB (c, cs, charset); - c++; + long * p; + int argnum = 2; + + res = scm_char_set_copy (SCM_CAR (rest)); + p = (long *) SCM_SMOB_DATA (res); rest = SCM_CDR (rest); - for (k = 0; k < LONGS_PER_CHARSET; k++) - p[k] ^= ((long *) SCM_SMOB_DATA (cs))[k]; + while (SCM_CONSP (rest)) + { + int k; + SCM cs = SCM_CAR (rest); + long *cs_data; + + SCM_VALIDATE_SMOB (argnum, cs, charset); + argnum++; + cs_data = (long *) SCM_SMOB_DATA (cs); + rest = SCM_CDR (rest); + + for (k = 0; k < LONGS_PER_CHARSET; k++) + p[k] ^= cs_data[k]; + } } return res; } diff --git a/srfi/srfi-14.h b/srfi/srfi-14.h index 2621ba22f..02e74f765 100644 --- a/srfi/srfi-14.h +++ b/srfi/srfi-14.h @@ -102,9 +102,9 @@ SCM scm_char_set_adjoin_x (SCM cs, SCM rest); SCM scm_char_set_delete_x (SCM cs, SCM rest); SCM scm_char_set_complement (SCM cs); SCM scm_char_set_union (SCM rest); -SCM scm_char_set_intersection (SCM cs1, SCM rest); +SCM scm_char_set_intersection (SCM rest); SCM scm_char_set_difference (SCM cs1, SCM rest); -SCM scm_char_set_xor (SCM cs1, SCM rest); +SCM scm_char_set_xor (SCM rest); SCM scm_char_set_diff_plus_intersection (SCM cs1, SCM rest); SCM scm_char_set_complement_x (SCM cs); SCM scm_char_set_union_x (SCM cs1, SCM rest); From 42b54c05a9ba541cfe15eb071ad96b42de19d908 Mon Sep 17 00:00:00 2001 From: Gary Houston Date: Sun, 22 Jul 2001 22:01:50 +0000 Subject: [PATCH 36/38] (scm_char_set_xor): bug fix: characters should only be included if they occur in exactly one argument, but were included if they occured an odd number of times >= 3, e.g, in (char-set-xor a a a) where a is (char-set #\a). fix it with a "mask" array. --- srfi/ChangeLog | 5 +++++ srfi/srfi-14.c | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/srfi/ChangeLog b/srfi/ChangeLog index e4a7440a8..3a3937b29 100644 --- a/srfi/ChangeLog +++ b/srfi/ChangeLog @@ -2,6 +2,11 @@ * srfi-14.c (scm_char_set_intersection, scm_char_set_xor): remove the compulsory cs1 arguments: all args are optional in final spec. + (scm_char_set_xor): bug fix: characters should only be included if + they occur in exactly one argument, but were included if they + occured an odd number of times >= 3, e.g, in (char-set-xor a a a) + where a is (char-set #\a). fix it with a "mask" array. + * srfi-14.h: declarations updated. 2001-07-18 Martin Grabmueller diff --git a/srfi/srfi-14.c b/srfi/srfi-14.c index 798f75bb5..8d628252a 100644 --- a/srfi/srfi-14.c +++ b/srfi/srfi-14.c @@ -1155,16 +1155,18 @@ SCM_DEFINE (scm_char_set_xor, "char-set-xor", 0, 0, 1, { long * p; int argnum = 2; + long mask[LONGS_PER_CHARSET]; + int k; + memset (mask, 0, sizeof mask); res = scm_char_set_copy (SCM_CAR (rest)); p = (long *) SCM_SMOB_DATA (res); rest = SCM_CDR (rest); while (SCM_CONSP (rest)) { - int k; SCM cs = SCM_CAR (rest); - long *cs_data; + long *cs_data; SCM_VALIDATE_SMOB (argnum, cs, charset); argnum++; @@ -1172,8 +1174,14 @@ SCM_DEFINE (scm_char_set_xor, "char-set-xor", 0, 0, 1, rest = SCM_CDR (rest); for (k = 0; k < LONGS_PER_CHARSET; k++) - p[k] ^= cs_data[k]; + { + mask[k] |= p[k] & cs_data[k]; + p[k] ^= cs_data[k]; + } } + /* avoid including characters that occur an odd number of times >= 3. */ + for (k = 0; k < LONGS_PER_CHARSET; k++) + p[k] &= ~mask[k]; } return res; } From d95744e9865c423588a884ef8effa0c4a204226a Mon Sep 17 00:00:00 2001 From: Gary Houston Date: Sun, 22 Jul 2001 23:21:03 +0000 Subject: [PATCH 37/38] Reverse the n-ary logxor change. The behaviour is weird in a set context, but consistent with logxor and scsh. Maybe it should get the benefit of the doubt. --- srfi/ChangeLog | 4 ---- srfi/srfi-14.c | 14 +++----------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/srfi/ChangeLog b/srfi/ChangeLog index 3a3937b29..b287451b2 100644 --- a/srfi/ChangeLog +++ b/srfi/ChangeLog @@ -2,10 +2,6 @@ * srfi-14.c (scm_char_set_intersection, scm_char_set_xor): remove the compulsory cs1 arguments: all args are optional in final spec. - (scm_char_set_xor): bug fix: characters should only be included if - they occur in exactly one argument, but were included if they - occured an odd number of times >= 3, e.g, in (char-set-xor a a a) - where a is (char-set #\a). fix it with a "mask" array. * srfi-14.h: declarations updated. diff --git a/srfi/srfi-14.c b/srfi/srfi-14.c index 8d628252a..8a7a7321a 100644 --- a/srfi/srfi-14.c +++ b/srfi/srfi-14.c @@ -1153,12 +1153,9 @@ SCM_DEFINE (scm_char_set_xor, "char-set-xor", 0, 0, 1, res = make_char_set (FUNC_NAME); else { - long * p; int argnum = 2; - long mask[LONGS_PER_CHARSET]; - int k; + long * p; - memset (mask, 0, sizeof mask); res = scm_char_set_copy (SCM_CAR (rest)); p = (long *) SCM_SMOB_DATA (res); rest = SCM_CDR (rest); @@ -1167,6 +1164,7 @@ SCM_DEFINE (scm_char_set_xor, "char-set-xor", 0, 0, 1, { SCM cs = SCM_CAR (rest); long *cs_data; + int k; SCM_VALIDATE_SMOB (argnum, cs, charset); argnum++; @@ -1174,14 +1172,8 @@ SCM_DEFINE (scm_char_set_xor, "char-set-xor", 0, 0, 1, rest = SCM_CDR (rest); for (k = 0; k < LONGS_PER_CHARSET; k++) - { - mask[k] |= p[k] & cs_data[k]; - p[k] ^= cs_data[k]; - } + p[k] ^= cs_data[k]; } - /* avoid including characters that occur an odd number of times >= 3. */ - for (k = 0; k < LONGS_PER_CHARSET; k++) - p[k] &= ~mask[k]; } return res; } From 9d198c1b17ffb0ce66ab3c1fd48807efdc198d22 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Mon, 23 Jul 2001 22:09:42 +0000 Subject: [PATCH 38/38] * syncase.scm (psyncomp): Removed, it is now in compile-psyntax.scm. * Makefile.am (psyntax.pp): Enable rule for psyntax.pp only in maintainer mode. Use compile-psyntax.scm for actual compilation. Make sure the uninstalled guile is used. (EXTRA_DIST): Distribute compile-psyntax.scm * compile-psyntax.scm: New file. --- ice-9/Makefile.am | 7 +++++-- ice-9/compile-psyntax.scm | 25 +++++++++++++++++++++++++ ice-9/syncase.scm | 16 ---------------- 3 files changed, 30 insertions(+), 18 deletions(-) create mode 100644 ice-9/compile-psyntax.scm diff --git a/ice-9/Makefile.am b/ice-9/Makefile.am index 597fa7700..e9af0558a 100644 --- a/ice-9/Makefile.am +++ b/ice-9/Makefile.am @@ -43,7 +43,10 @@ install-data-local: $(subpkgdatadir)/'and-let*.scm' ## test.scm is not currently installed. -EXTRA_DIST = $(ice9_sources) test.scm and-let-star-compat.scm +EXTRA_DIST = $(ice9_sources) test.scm and-let-star-compat.scm \ + compile-psyntax.scm +if MAINTAINER_MODE psyntax.pp: psyntax.ss - cd $(srcdir) && guile -c '(load-from-path "ice-9/syncase") (define-module (ice-9 syncase)) (psyncomp)' + GUILE_LOAD_PATH=$(srcdir)/..:.. ../libguile/guile -s compile-psyntax.scm $(srcdir)/psyntax.ss $(srcdir)/psyntax.pp +endif diff --git a/ice-9/compile-psyntax.scm b/ice-9/compile-psyntax.scm new file mode 100644 index 000000000..b96e8111b --- /dev/null +++ b/ice-9/compile-psyntax.scm @@ -0,0 +1,25 @@ +(use-modules (ice-9 syncase)) + +;; XXX - We need to be inside (ice-9 syncase) since psyntax.ss calls +;; `eval' int he `interaction-environment' aka the current module and +;; it expects to have `andmap' there. The reason for this escapes me +;; at the moment. +;; +(define-module (ice-9 syncase)) + +(define source (list-ref (command-line) 1)) +(define target (list-ref (command-line) 2)) + +(let ((in (open-input-file source)) + (out (open-output-file (string-append target ".tmp")))) + (let loop ((x (read in))) + (if (eof-object? x) + (begin + (close-port out) + (close-port in)) + (begin + (write (sc-expand3 x 'c '(compile load eval)) out) + (newline out) + (loop (read in)))))) + +(system (format #f "mv -f ~s.tmp ~s" target target)) diff --git a/ice-9/syncase.scm b/ice-9/syncase.scm index f7aca4c43..948e11b86 100644 --- a/ice-9/syncase.scm +++ b/ice-9/syncase.scm @@ -139,22 +139,6 @@ (define generated-symbols (make-weak-key-hash-table 1019)) -;;; Utilities - -(define (psyncomp) - (system "mv -f psyntax.pp psyntax.pp~") - (let ((in (open-input-file "psyntax.ss")) - (out (open-output-file "psyntax.pp"))) - (let loop ((x (read in))) - (if (eof-object? x) - (begin - (close-port out) - (close-port in)) - (begin - (write (sc-expand3 x 'c '(compile load eval)) out) - (newline out) - (loop (read in))))))) - ;;; Load the preprocessed code (let ((old-debug #f)