diff --git a/libguile/fports.c b/libguile/fports.c index 5a3ec73e8..ad3295ec8 100644 --- a/libguile/fports.c +++ b/libguile/fports.c @@ -131,45 +131,41 @@ scm_fport_buffer_add (SCM port, int read_size, int write_size) SCM_DEFINE (scm_setvbuf, "setvbuf", 2, 1, 0, (SCM port, SCM mode, SCM 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 - - -@deffn primitive fcntl fd/port command [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 -") + "Set the buffering mode for @var{port}. @var{mode} can be:\n" + "@table @code\n" + "@item _IONBF\n" + "non-buffered\n" + "@item _IOLBF\n" + "line buffered\n" + "@item _IOFBF\n" + "block buffered, using a newly allocated buffer of @var{size} bytes.\n" + "If @var{size} is omitted, a default size will be used.\n" + "@end table\n\n\n" + "@deffn primitive fcntl fd/port command [value]\n" + "Apply @var{command} to the specified file descriptor or the underlying\n" + "file descriptor of the specified port. @var{value} is an optional\n" + "integer argument.\n\n" + "Values for @var{command} are:\n\n" + "@table @code\n" + "@item F_DUPFD\n" + "Duplicate a file descriptor\n" + "@item F_GETFD\n" + "Get flags associated with the file descriptor.\n" + "@item F_SETFD\n" + "Set flags associated with the file descriptor to @var{value}.\n" + "@item F_GETFL\n" + "Get flags associated with the open file.\n" + "@item F_SETFL\n" + "Set flags associated with the open file to @var{value}\n" + "@item F_GETOWN\n" + "Get the process ID of a socket's owner, for @code{SIGIO} signals.\n" + "@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\n" + "@code{F_SETFL}.\n" + "@end table\n" + "") #define FUNC_NAME s_scm_setvbuf { int cmode, csize; @@ -257,48 +253,42 @@ scm_evict_ports (int fd) */ SCM_DEFINE (scm_open_file, "open-file", 2, 0, 0, (SCM filename, SCM modes), -"Open the file whose name is @var{string}, and return a port -representing that file. The attributes of the port are -determined by the @var{mode} string. The way in -which this is interpreted is similar to C stdio: - -The first character must be one of the following: - -@table @samp -@item r -Open an existing file for input. -@item w -Open a file for output, creating it if it doesn't already exist -or removing its contents if it does. -@item a -Open a file for output, creating it if it doesn't already exist. -All writes to the port will go to the end of the file. -The "append mode" can be turned off while the port is in use -@pxref{Ports and File Descriptors, fcntl} -@end table - -The following additional characters can be appended: - -@table @samp -@item + -Open the port for both input and output. E.g., @code{r+}: open -an existing file for both input and output. -@item 0 -Create an "unbuffered" port. In this case input and output operations -are passed directly to the underlying port implementation without -additional buffering. This is likely to slow down I/O operations. -The buffering mode can be changed while a port is in use -@pxref{Ports and File Descriptors, setvbuf} -@item l -Add line-buffering to the port. The port output buffer will be -automatically flushed whenever a newline character is written. -@end table - -In theory we could create read/write ports which were buffered in one -direction only. However this isn't included in the current interfaces. - -If a file cannot be opened with the access requested, -@code{open-file} throws an exception.") + "Open the file whose name is @var{string}, and return a port\n" + "representing that file. The attributes of the port are\n" + "determined by the @var{mode} string. The way in \n" + "which this is interpreted is similar to C stdio:\n\n" + "The first character must be one of the following:\n\n" + "@table @samp\n" + "@item r\n" + "Open an existing file for input.\n" + "@item w\n" + "Open a file for output, creating it if it doesn't already exist\n" + "or removing its contents if it does.\n" + "@item a\n" + "Open a file for output, creating it if it doesn't already exist.\n" + "All writes to the port will go to the end of the file.\n" + "The \"append mode\" can be turned off while the port is in use\n" + "@pxref{Ports and File Descriptors, fcntl}\n" + "@end table\n\n" + "The following additional characters can be appended:\n\n" + "@table @samp\n" + "@item +\n" + "Open the port for both input and output. E.g., @code{r+}: open\n" + "an existing file for both input and output.\n" + "@item 0\n" + "Create an \"unbuffered\" port. In this case input and output operations\n" + "are passed directly to the underlying port implementation without\n" + "additional buffering. This is likely to slow down I/O operations.\n" + "The buffering mode can be changed while a port is in use\n" + "@pxref{Ports and File Descriptors, setvbuf}\n" + "@item l\n" + "Add line-buffering to the port. The port output buffer will be\n" + "automatically flushed whenever a newline character is written.\n" + "@end table\n\n" + "In theory we could create read/write ports which were buffered in one\n" + "direction only. However this isn't included in the current interfaces.\n\n" + "If a file cannot be opened with the access requested,\n" + "@code{open-file} throws an exception.") #define FUNC_NAME s_scm_open_file { SCM port; diff --git a/libguile/list.c b/libguile/list.c index 8b9a51abc..d98348cfb 100644 --- a/libguile/list.c +++ b/libguile/list.c @@ -181,10 +181,10 @@ SCM_DEFINE (scm_length, "length", 1, 0, 0, SCM_DEFINE (scm_append, "append", 0, 0, 1, (SCM args), -"A destructive version of @code{append} (@pxref{Pairs and Lists,,,r4rs, -The Revised^4 Report on Scheme}). The cdr field of each list's final -pair is changed to point to the head of the next list, so no consing is -performed. Return a pointer to the mutated list.") + "A destructive version of @code{append} (@pxref{Pairs and Lists,,,r4rs,\n" + "The Revised^4 Report on Scheme}). The cdr field of each list's final\n" + "pair is changed to point to the head of the next list, so no consing is\n" + "performed. Return a pointer to the mutated list.") #define FUNC_NAME s_scm_append { SCM res = SCM_EOL;