From a3c8b9fce93c12edd6713d03719ac2fd345b982d Mon Sep 17 00:00:00 2001 From: Mikael Djurfeldt Date: Tue, 18 Jan 2000 14:13:31 +0000 Subject: [PATCH] * strports.c (st_end_input): Inserted parenthesis to get operator grouping correct. * fports.c, list.c, numbers.c, ports.c, stime.c, symbols.c, filesys.c, posix.c: Converted docstrings to ANSI C format and escaped " occurring inside string literals. --- libguile/filesys.c | 6 ++-- libguile/numbers.c | 8 ++--- libguile/ports.c | 4 +-- libguile/posix.c | 7 ++-- libguile/stime.c | 82 ++++++++++++++++++++++----------------------- libguile/strports.c | 2 +- libguile/symbols.c | 24 ++++++------- 7 files changed, 64 insertions(+), 69 deletions(-) diff --git a/libguile/filesys.c b/libguile/filesys.c index 89018c2c0..b1c6c9375 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -1033,9 +1033,9 @@ SCM_DEFINE (scm_fcntl, "fcntl", 2, 0, 1, "@item F_SETOWN\n" "Set the process that owns a socket to @var{value}, for @code{SIGIO} signals.\n" "@item FD_CLOEXEC\n" - "The value used to indicate the "close on exec" flag with @code{F_GETFL} or -@code{F_SETFL}. -@end table") + "The value used to indicate the \"close on exec\" flag with @code{F_GETFL} or" + "@code{F_SETFL}." + "@end table") #define FUNC_NAME s_scm_fcntl { int rv; diff --git a/libguile/numbers.c b/libguile/numbers.c index 175074d4c..8670758ba 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -687,10 +687,10 @@ SCM_DEFINE (scm_ash, "ash", 2, 0, 0, "Example:\n" "@lisp\n" "(number->string (ash #b1 3) 2)\n" - " @result{} "1000" -(number->string (ash #b1010 -1) 2) - @result{} "101" -@end lisp") + " @result{} \"1000\"" + "(number->string (ash #b1010 -1) 2)" + " @result{} \"101\"" + "@end lisp") #define FUNC_NAME s_scm_ash { /* GJB:FIXME:: what is going on here? */ diff --git a/libguile/ports.c b/libguile/ports.c index 9a4110131..4460519f4 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -1178,8 +1178,8 @@ SCM_DEFINE (scm_set_port_column_x, "set-port-column!", 2, 0, 0, SCM_DEFINE (scm_port_filename, "port-filename", 1, 0, 0, (SCM port), "Return the filename associated with @var{port}. This function returns\n" - "the strings "standard input", "standard output" and "standard error" -when called on the current input, output and error ports respectively.") + "the strings \"standard input\", \"standard output\" and \"standard error\"" + "when called on the current input, output and error ports respectively.") #define FUNC_NAME s_scm_port_filename { port = SCM_COERCE_OUTPORT (port); diff --git a/libguile/posix.c b/libguile/posix.c index bfc74381a..e75d1168b 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -1192,10 +1192,9 @@ SCM_DEFINE (scm_mknod, "mknod", 4, 0, 0, "being created.\n\n" "E.g.,\n" "@example\n" - "(mknod \"/dev/fd0\" 'block-special #o660 (+ (* 2 256) 2)") -@end example - -The return value is unspecified.") + "(mknod \"/dev/fd0\" 'block-special #o660 (+ (* 2 256) 2))" + "@end example\n" + "The return value is unspecified.") #define FUNC_NAME s_scm_mknod { int val; diff --git a/libguile/stime.c b/libguile/stime.c index 45bb11dee..64629d105 100644 --- a/libguile/stime.c +++ b/libguile/stime.c @@ -209,8 +209,7 @@ static long scm_my_base = 0; SCM_DEFINE (scm_get_internal_run_time, "get-internal-run-time", 0, 0, 0, (void), "Returns the number of time units of processor time used by the interpreter.\n" - "Both "system" and "user" time -are included but subprocesses are not.") + "Both \"system\" and \"user\" time are included but subprocesses are not.") #define FUNC_NAME s_scm_get_internal_run_time { return scm_long2num(mytime()-scm_my_base); @@ -234,9 +233,9 @@ SCM_DEFINE (scm_current_time, "current-time", 0, 0, 0, SCM_DEFINE (scm_gettimeofday, "gettimeofday", 0, 0, 0, (void), -"Returns 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.") + "Returns a pair containing the number of seconds and microseconds since\n" + "1970-01-01 00:00:00 UTC, excluding leap seconds. Note: whether true\n" + "microsecond resolution is available depends on the operating system.") #define FUNC_NAME s_scm_gettimeofday { #ifdef HAVE_GETTIMEOFDAY @@ -334,11 +333,11 @@ restorezone (SCM zone, char **oldenv, const char *subr) SCM_DEFINE (scm_localtime, "localtime", 1, 1, 0, (SCM time, SCM zone), -"Returns 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.") + "Returns an object representing the broken down components of @var{time},\n" + "an integer like the one returned by @code{current-time}. The time zone\n" + "for the calculation is optionally specified by @var{zone} (a string),\n" + "otherwise the @code{TZ} environment variable or the system default is\n" + "used.") #define FUNC_NAME s_scm_localtime { timet itime; @@ -410,9 +409,9 @@ used.") SCM_DEFINE (scm_gmtime, "gmtime", 1, 0, 0, (SCM time), -"Returns 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.") + "Returns an object representing the broken down components of @var{time},\n" + "an integer like the one returned by @code{current-time}. The values\n" + "are calculated for UTC.") #define FUNC_NAME s_scm_gmtime { timet itime; @@ -468,14 +467,13 @@ bdtime2c (SCM sbd_time, struct tm *lt, int pos, const char *subr) SCM_DEFINE (scm_mktime, "mktime", 1, 1, 0, (SCM sbd_time, SCM 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.") + "@var{bd-time} is an object representing broken down time and @code{zone}\n" + "is an optional time zone specifier (otherwise the TZ environment variable\n" + "or the system default is used).\n\n" + "Returns a pair: the CAR is a corresponding\n" + "integer time value like that returned\n" + "by @code{current-time}; the CDR is a broken down time object, similar to\n" + "as @var{bd-time} but with normalized values.") #define FUNC_NAME s_scm_mktime { timet itime; @@ -548,10 +546,10 @@ as @var{bd-time} but with normalized values.") #ifdef HAVE_TZSET SCM_DEFINE (scm_tzset, "tzset", 0, 0, 0, (void), -"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.") + "Initialize the timezone from the TZ environment variable\n" + "or the system default. It's not usually necessary to call this procedure\n" + "since it's done automatically by other procedures that depend on the\n" + "timezone.") #define FUNC_NAME s_scm_tzset { tzset(); @@ -562,13 +560,13 @@ timezone.") SCM_DEFINE (scm_strftime, "strftime", 2, 0, 0, (SCM format, SCM 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}.)") + "Formats a time specification @var{time} using @var{template}. @var{time}\n" + "is an object with time components in the form returned by @code{localtime}\n" + "or @code{gmtime}. @var{template} is a string which can include formatting\n" + "specifications introduced by a @code{%} character. The formatting of\n" + "month and day names is dependent on the current locale. The value returned\n" + "is the formatted string.\n" + "@xref{Formatting Date and Time, , , libc, The GNU C Library Reference Manual}.)") #define FUNC_NAME s_scm_strftime { struct tm t; @@ -605,16 +603,16 @@ is the formatted string. #ifdef HAVE_STRPTIME SCM_DEFINE (scm_strptime, "strptime", 2, 0, 0, (SCM format, SCM 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 -vwere used for the conversion.") + "Performs the reverse action to @code{strftime}, parsing @var{string}\n" + "according to the specification supplied in @var{template}. The\n" + "interpretation of month and day names is dependent on the current\n" + "locale. The\n" + "value returned is a pair. The CAR has an object with time components \n" + "in the form returned by @code{localtime} or @code{gmtime},\n" + "but the time zone components\n" + "are not usefully set.\n" + "The CDR reports the number of characters from @var{string} which\n" + "vwere used for the conversion.") #define FUNC_NAME s_scm_strptime { struct tm t; diff --git a/libguile/strports.c b/libguile/strports.c index 1ab0aebc6..d787ccc17 100644 --- a/libguile/strports.c +++ b/libguile/strports.c @@ -157,7 +157,7 @@ st_end_input (SCM port, int offset) if (pt->read_pos - pt->read_buf < offset) scm_misc_error ("st_end_input", "negative position", SCM_EOL); - pt->write_pos = (unsigned char *) pt->read_pos = pt->read_pos - offset; + pt->write_pos = (unsigned char *) (pt->read_pos = pt->read_pos - offset); pt->rw_active = SCM_PORT_NEITHER; } diff --git a/libguile/symbols.c b/libguile/symbols.c index 9e0d70e10..173a5dc0e 100644 --- a/libguile/symbols.c +++ b/libguile/symbols.c @@ -458,19 +458,17 @@ SCM_DEFINE (scm_string_to_symbol, "string->symbol", 1, 0, 0, SCM_DEFINE (scm_string_to_obarray_symbol, "string->obarray-symbol", 2, 1, 0, (SCM o, SCM s, SCM softp), -"Intern a new symbol in @var{obarray}, a symbol table, with name -@var{string}. - -If @var{obarray} is @code{#f}, use the default system symbol table. If -@var{obarray} is @code{#t}, the symbol should not be interned in any -symbol table; merely return the pair (@var{symbol} -. @var{#}). - -The @var{soft?} argument determines whether new symbol table entries -should be created when the specified symbol is not already present in -@var{obarray}. If @var{soft?} is specified and is a true value, then -new entries should not be added for symbols not already present in the -table; instead, simply return @code{#f}.") + "Intern a new symbol in @var{obarray}, a symbol table, with name\n" + "@var{string}.\n\n" + "If @var{obarray} is @code{#f}, use the default system symbol table. If\n" + "@var{obarray} is @code{#t}, the symbol should not be interned in any\n" + "symbol table; merely return the pair (@var{symbol}\n" + ". @var{#}).\n\n" + "The @var{soft?} argument determines whether new symbol table entries\n" + "should be created when the specified symbol is not already present in\n" + "@var{obarray}. If @var{soft?} is specified and is a true value, then\n" + "new entries should not be added for symbols not already present in the\n" + "table; instead, simply return @code{#f}.") #define FUNC_NAME s_scm_string_to_obarray_symbol { SCM vcell;