1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-12 14:50:19 +02:00

* fports.c, list.c: Converted docstrings to ANSI C format and

escaped " occurring inside string literals.
This commit is contained in:
Mikael Djurfeldt 2000-01-18 13:09:54 +00:00
parent 682eefe9e2
commit fc0d72d448
2 changed files with 75 additions and 85 deletions

View file

@ -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_DEFINE (scm_setvbuf, "setvbuf", 2, 1, 0,
(SCM port, SCM mode, SCM size), (SCM port, SCM mode, SCM size),
"Set the buffering mode for @var{port}. @var{mode} can be: "Set the buffering mode for @var{port}. @var{mode} can be:\n"
@table @code "@table @code\n"
@item _IONBF "@item _IONBF\n"
non-buffered "non-buffered\n"
@item _IOLBF "@item _IOLBF\n"
line buffered "line buffered\n"
@item _IOFBF "@item _IOFBF\n"
block buffered, using a newly allocated buffer of @var{size} bytes. "block buffered, using a newly allocated buffer of @var{size} bytes.\n"
If @var{size} is omitted, a default size will be used. "If @var{size} is omitted, a default size will be used.\n"
@end table "@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"
@deffn primitive fcntl fd/port command [value] "file descriptor of the specified port. @var{value} is an optional\n"
Apply @var{command} to the specified file descriptor or the underlying "integer argument.\n\n"
file descriptor of the specified port. @var{value} is an optional "Values for @var{command} are:\n\n"
integer argument. "@table @code\n"
"@item F_DUPFD\n"
Values for @var{command} are: "Duplicate a file descriptor\n"
"@item F_GETFD\n"
@table @code "Get flags associated with the file descriptor.\n"
@item F_DUPFD "@item F_SETFD\n"
Duplicate a file descriptor "Set flags associated with the file descriptor to @var{value}.\n"
@item F_GETFD "@item F_GETFL\n"
Get flags associated with the file descriptor. "Get flags associated with the open file.\n"
@item F_SETFD "@item F_SETFL\n"
Set flags associated with the file descriptor to @var{value}. "Set flags associated with the open file to @var{value}\n"
@item F_GETFL "@item F_GETOWN\n"
Get flags associated with the open file. "Get the process ID of a socket's owner, for @code{SIGIO} signals.\n"
@item F_SETFL "@item F_SETOWN\n"
Set flags associated with the open file to @var{value} "Set the process that owns a socket to @var{value}, for @code{SIGIO} signals.\n"
@item F_GETOWN "@item FD_CLOEXEC\n"
Get the process ID of a socket's owner, for @code{SIGIO} signals. "The value used to indicate the \"close on exec\" flag with @code{F_GETFL} or\n"
@item F_SETOWN "@code{F_SETFL}.\n"
Set the process that owns a socket to @var{value}, for @code{SIGIO} signals. "@end table\n"
@item FD_CLOEXEC "")
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_setvbuf #define FUNC_NAME s_scm_setvbuf
{ {
int cmode, csize; int cmode, csize;
@ -257,48 +253,42 @@ scm_evict_ports (int fd)
*/ */
SCM_DEFINE (scm_open_file, "open-file", 2, 0, 0, SCM_DEFINE (scm_open_file, "open-file", 2, 0, 0,
(SCM filename, SCM modes), (SCM filename, SCM modes),
"Open the file whose name is @var{string}, and return a port "Open the file whose name is @var{string}, and return a port\n"
representing that file. The attributes of the port are "representing that file. The attributes of the port are\n"
determined by the @var{mode} string. The way in "determined by the @var{mode} string. The way in \n"
which this is interpreted is similar to C stdio: "which this is interpreted is similar to C stdio:\n\n"
"The first character must be one of the following:\n\n"
The first character must be one of the following: "@table @samp\n"
"@item r\n"
@table @samp "Open an existing file for input.\n"
@item r "@item w\n"
Open an existing file for input. "Open a file for output, creating it if it doesn't already exist\n"
@item w "or removing its contents if it does.\n"
Open a file for output, creating it if it doesn't already exist "@item a\n"
or removing its contents if it does. "Open a file for output, creating it if it doesn't already exist.\n"
@item a "All writes to the port will go to the end of the file.\n"
Open a file for output, creating it if it doesn't already exist. "The \"append mode\" can be turned off while the port is in use\n"
All writes to the port will go to the end of the file. "@pxref{Ports and File Descriptors, fcntl}\n"
The "append mode" can be turned off while the port is in use "@end table\n\n"
@pxref{Ports and File Descriptors, fcntl} "The following additional characters can be appended:\n\n"
@end table "@table @samp\n"
"@item +\n"
The following additional characters can be appended: "Open the port for both input and output. E.g., @code{r+}: open\n"
"an existing file for both input and output.\n"
@table @samp "@item 0\n"
@item + "Create an \"unbuffered\" port. In this case input and output operations\n"
Open the port for both input and output. E.g., @code{r+}: open "are passed directly to the underlying port implementation without\n"
an existing file for both input and output. "additional buffering. This is likely to slow down I/O operations.\n"
@item 0 "The buffering mode can be changed while a port is in use\n"
Create an "unbuffered" port. In this case input and output operations "@pxref{Ports and File Descriptors, setvbuf}\n"
are passed directly to the underlying port implementation without "@item l\n"
additional buffering. This is likely to slow down I/O operations. "Add line-buffering to the port. The port output buffer will be\n"
The buffering mode can be changed while a port is in use "automatically flushed whenever a newline character is written.\n"
@pxref{Ports and File Descriptors, setvbuf} "@end table\n\n"
@item l "In theory we could create read/write ports which were buffered in one\n"
Add line-buffering to the port. The port output buffer will be "direction only. However this isn't included in the current interfaces.\n\n"
automatically flushed whenever a newline character is written. "If a file cannot be opened with the access requested,\n"
@end table "@code{open-file} throws an exception.")
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.")
#define FUNC_NAME s_scm_open_file #define FUNC_NAME s_scm_open_file
{ {
SCM port; SCM port;

View file

@ -181,10 +181,10 @@ SCM_DEFINE (scm_length, "length", 1, 0, 0,
SCM_DEFINE (scm_append, "append", 0, 0, 1, SCM_DEFINE (scm_append, "append", 0, 0, 1,
(SCM args), (SCM args),
"A destructive version of @code{append} (@pxref{Pairs and Lists,,,r4rs, "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 "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 "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.") "performed. Return a pointer to the mutated list.")
#define FUNC_NAME s_scm_append #define FUNC_NAME s_scm_append
{ {
SCM res = SCM_EOL; SCM res = SCM_EOL;