diff options
-rw-r--r-- | doc/ChangeLog | 10 | ||||
-rw-r--r-- | doc/deprecated.texi | 1 | ||||
-rw-r--r-- | doc/posix.texi | 141 | ||||
-rw-r--r-- | doc/scheme-binding.texi | 1 | ||||
-rw-r--r-- | doc/scheme-control.texi | 6 | ||||
-rwxr-xr-x | doc/scheme-data.texi | 266 | ||||
-rw-r--r-- | doc/scheme-debug.texi | 31 | ||||
-rw-r--r-- | doc/scheme-evaluation.texi | 16 | ||||
-rw-r--r-- | doc/scheme-io.texi | 50 | ||||
-rw-r--r-- | doc/scheme-memory.texi | 20 | ||||
-rw-r--r-- | doc/scheme-modules.texi | 9 | ||||
-rw-r--r-- | doc/scheme-options.texi | 8 | ||||
-rw-r--r-- | doc/scheme-procedures.texi | 24 | ||||
-rw-r--r-- | doc/scheme-scheduling.texi | 23 | ||||
-rw-r--r-- | doc/scheme-translation.texi | 49 | ||||
-rw-r--r-- | doc/scheme-utility.texi | 22 |
16 files changed, 10 insertions, 667 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 46a0ca91c..7530a8d5b 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,13 @@ +2001-04-09 Neil Jerram <neil@ossau.uklinux.net> + + * deprecated.texi, posix.texi, scheme-binding.texi, + scheme-control.texi, scheme-data.texi, scheme-debug.texi, + scheme-evaluation.texi, scheme-io.texi, scheme-memory.texi, + scheme-modules.texi, scheme-options.texi, scheme-procedures.texi, + scheme-scheduling.texi, scheme-translation.texi, + scheme-utility.texi: Remove `@c docstring' comments, since they + aren't used any more by the docstring tracking utilities. + 2001-04-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de> * scheme-data.texi (Pairs): New data type and procedure diff --git a/doc/deprecated.texi b/doc/deprecated.texi index 6eab2b584..e7f5277db 100644 --- a/doc/deprecated.texi +++ b/doc/deprecated.texi @@ -1,7 +1,6 @@ @node Deprecated @chapter Deprecated -@c docstring begin (texi-doc-string "guile" "tag") @deffn primitive tag x Return an integer corresponding to the type of X. Deprecated. @end deffn diff --git a/doc/posix.texi b/doc/posix.texi index 6b5943d59..b6c72d22f 100644 --- a/doc/posix.texi +++ b/doc/posix.texi @@ -150,18 +150,15 @@ 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. -@c docstring begin (texi-doc-string "guile" "port-revealed") @deffn primitive port-revealed port Return the revealed count for @var{port}. @end deffn -@c docstring begin (texi-doc-string "guile" "set-port-revealed!") @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 -@c docstring begin (texi-doc-string "guile" "fileno") @deffn primitive fileno port Return the integer file descriptor underlying @var{port}. Does not change its revealed count. @@ -172,7 +169,6 @@ Returns the integer file descriptor underlying @var{port}. As a side effect the revealed count of @var{port} is incremented. @end deffn -@c docstring begin (texi-doc-string "guile" "fdopen") @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 @@ -180,7 +176,6 @@ of the port is initialized to zero. The modes string is the same as that accepted by @ref{File Ports, open-file}. @end deffn -@c docstring begin (texi-doc-string "guile" "fdes->ports") @deffn primitive fdes->ports fd Return a list of existing ports which have @var{fdes} as an underlying file descriptor, without changing their revealed @@ -199,7 +194,6 @@ descriptor, if one exists, and increments its revealed count. Otherwise, returns a new output port with a revealed count of 1. @end deffn -@c docstring begin (texi-doc-string "guile" "primitive-move->fdes") @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}. @@ -221,7 +215,6 @@ The return value is unspecified. Decrements the revealed count for a port. @end deffn -@c docstring begin (texi-doc-string "guile" "fsync") @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 @@ -229,7 +222,6 @@ file descriptor is fsync'd. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "open") @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. @@ -260,13 +252,11 @@ See the Unix documentation of the @code{open} system call for additional flags. @end deffn -@c docstring begin (texi-doc-string "guile" "open-fdes") @deffn primitive open-fdes path flags [mode] Similar to @code{open} but return a file descriptor instead of a port. @end deffn -@c docstring begin (texi-doc-string "guile" "close") @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 @@ -274,7 +264,6 @@ any ports using that file descriptor are moved to a different file descriptor and have their revealed counts set to zero. @end deffn -@c docstring begin (texi-doc-string "guile" "close-fdes") @deffn primitive close-fdes fd A simple wrapper for the @code{close} system call. Close file descriptor @var{fd}, which must be an integer. @@ -283,7 +272,6 @@ the file descriptor will be closed even if a port is using it. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "unread-char") @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 @@ -291,7 +279,6 @@ will be read again in last-in first-out order. If @var{port} is not supplied, the current input port is used. @end deffn -@c docstring begin (texi-doc-string "guile" "unread-string") @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 @@ -299,7 +286,6 @@ 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 -@c docstring begin (texi-doc-string "guile" "pipe") @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 @@ -325,7 +311,6 @@ 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. -@c docstring begin (texi-doc-string "guile" "dup->fdes") @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 @@ -364,7 +349,6 @@ port. This procedure is equivalent to @code{(dup->port @var{port} @var{modes})}. @end deffn -@c docstring begin (texi-doc-string "guile" "redirect-port") @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 @@ -381,7 +365,6 @@ This procedure does not have any side effects on other ports or revealed counts. @end deffn -@c docstring begin (texi-doc-string "guile" "dup2") @deffn primitive dup2 oldfd newfd A simple wrapper for the @code{dup2} system call. Copies the file descriptor @var{oldfd} to descriptor @@ -393,7 +376,6 @@ is made to move away ports which are using @var{newfd}. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "port-mode") @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 @@ -401,7 +383,6 @@ the port was opened, since modes such as "append" which are used only during port creation are not retained. @end deffn -@c docstring begin (texi-doc-string "guile" "close-all-ports-except") @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 @@ -411,7 +392,6 @@ undesirable side-effect of flushing buffes, so it's deprecated. Use port-for-each instead. @end deffn -@c docstring begin (texi-doc-string "guile" "port-for-each") @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, @@ -421,7 +401,6 @@ 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 -@c docstring begin (texi-doc-string "guile" "setvbuf") @deffn primitive setvbuf port mode [size] Set the buffering mode for @var{port}. @var{mode} can be: @table @code @@ -435,7 +414,6 @@ If @var{size} is omitted, a default size will be used. @end table @end deffn -@c docstring begin (texi-doc-string "guile" "fcntl") @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 @@ -464,7 +442,6 @@ The value used to indicate the "close on exec" flag with @code{F_GETFL} or @end table @end deffn -@c docstring begin (texi-doc-string "guile" "select") @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 @@ -506,7 +483,6 @@ 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. -@c docstring begin (texi-doc-string "guile" "access?") @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 @@ -532,7 +508,6 @@ test for existence of the file. @end deffn @findex fstat -@c docstring begin (texi-doc-string "guile" "stat") @deffn primitive stat object Return an object containing various information about the file determined by @var{obj}. @var{obj} can be a string containing @@ -588,14 +563,12 @@ An integer representing the access permission bits. @end table @end deffn -@c docstring begin (texi-doc-string "guile" "lstat") @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 -@c docstring begin (texi-doc-string "guile" "readlink") @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. @@ -603,7 +576,6 @@ string), i.e., the file that the link points to. @findex fchown @findex lchown -@c docstring begin (texi-doc-string "guile" "chown") @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 @@ -620,7 +592,6 @@ as @code{-1}, then that ID is not changed. @end deffn @findex fchmod -@c docstring begin (texi-doc-string "guile" "chmod") @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 @@ -631,7 +602,6 @@ the new permissions as a decimal number, e.g., @code{(chmod "foo" #o755)}. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "utime") @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 @@ -646,25 +616,21 @@ modification time to the current time. @end deffn @findex unlink -@c docstring begin (texi-doc-string "guile" "delete-file") @deffn primitive delete-file str Deletes (or "unlinks") the file specified by @var{path}. @end deffn -@c docstring begin (texi-doc-string "guile" "copy-file") @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 -@c docstring begin (texi-doc-string "guile" "rename-file") @deffn primitive rename-file oldname newname Renames the file specified by @var{oldname} to @var{newname}. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "link") @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 @@ -672,13 +638,11 @@ link, the link may or may not be followed depending on the system. @end deffn -@c docstring begin (texi-doc-string "guile" "symlink") @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 -@c docstring begin (texi-doc-string "guile" "mkdir") @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 @@ -686,50 +650,42 @@ umask. Otherwise they are set to the decimal value specified with @var{mode}. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "rmdir") @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 -@c docstring begin (texi-doc-string "guile" "opendir") @deffn primitive opendir dirname Open the directory specified by @var{path} and return a directory stream. @end deffn -@c docstring begin (texi-doc-string "guile" "directory-stream?") @deffn primitive directory-stream? obj Return a boolean indicating whether @var{object} is a directory stream as returned by @code{opendir}. @end deffn -@c docstring begin (texi-doc-string "guile" "readdir") @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 -@c docstring begin (texi-doc-string "guile" "rewinddir") @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 -@c docstring begin (texi-doc-string "guile" "closedir") @deffn primitive closedir port Close the directory stream @var{stream}. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "sync") @deffn primitive sync Flush the operating system disk buffers. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "mknod") @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 @@ -748,7 +704,6 @@ E.g., The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "tmpnam") @deffn primitive tmpnam Return a name in the file system that does not match any existing file. However there is no guarantee that another @@ -757,14 +712,12 @@ Care should be taken if opening the file, e.g., use the @code{O_EXCL} open flag or use @code{mkstemp!} instead. @end deffn -@c docstring begin (texi-doc-string "guile" "dirname") @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 -@c docstring begin (texi-doc-string "guile" "basename") @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. @@ -823,14 +776,12 @@ Return the next entry in the user database, using the stream set by Closes the stream used by @code{getpwent}. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "setpw") @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 -@c docstring begin (texi-doc-string "guile" "getpw") @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 @@ -875,14 +826,12 @@ Closes the stream used by @code{getgrent}. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "setgr") @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 -@c docstring begin (texi-doc-string "guile" "getgr") @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 @@ -892,13 +841,11 @@ or getgrent respectively. @node Time @section Time -@c docstring begin (texi-doc-string "guile" "current-time") @deffn primitive current-time Return the number of seconds since 1970-01-01 00:00:00 UTC, excluding leap seconds. @end deffn -@c docstring begin (texi-doc-string "guile" "gettimeofday") @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: @@ -937,7 +884,6 @@ Time zone offset in seconds west of UTC (-46800 to 43200). Time zone label (a string), not necessarily unique. @end table -@c docstring begin (texi-doc-string "guile" "localtime") @deffn primitive localtime time [zone] Return an object representing the broken down components of @var{time}, an integer like the one returned by @@ -946,14 +892,12 @@ optionally specified by @var{zone} (a string), otherwise the @code{TZ} environment variable or the system default is used. @end deffn -@c docstring begin (texi-doc-string "guile" "gmtime") @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 -@c docstring begin (texi-doc-string "guile" "mktime") @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 @@ -965,7 +909,6 @@ by @code{current-time}; the cdr is a broken down time object, similar to as @var{bd-time} but with normalized values. @end deffn -@c docstring begin (texi-doc-string "guile" "tzset") @deffn primitive tzset Initialize the timezone from the TZ environment variable or the system default. It's not usually necessary to call this procedure @@ -973,7 +916,6 @@ since it's done automatically by other procedures that depend on the timezone. @end deffn -@c docstring begin (texi-doc-string "guile" "strftime") @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} @@ -984,7 +926,6 @@ is the formatted string. @xref{Formatting Date and Time, , , libc, The GNU C Library Reference Manual}.) @end deffn -@c docstring begin (texi-doc-string "guile" "strptime") @deffn primitive strptime format string Performs the reverse action to @code{strftime}, parsing @var{string} according to the specification supplied in @@ -1003,7 +944,6 @@ The value of this variable is the number of time units per second reported by the following procedures. @end defvar -@c docstring begin (texi-doc-string "guile" "times") @deffn primitive times Return an object with information about real and processor time. The following procedures accept such an object as an @@ -1027,13 +967,11 @@ terminated child processes. @end table @end deffn -@c docstring begin (texi-doc-string "guile" "get-internal-real-time") @deffn primitive get-internal-real-time Return the number of time units since the interpreter was started. @end deffn -@c docstring begin (texi-doc-string "guile" "get-internal-run-time") @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 @@ -1043,7 +981,6 @@ included but subprocesses are not. @node Runtime Environment @section Runtime Environment -@c docstring begin (texi-doc-string "guile" "program-arguments") @deffn primitive program-arguments @deffnx procedure command-line Return the list of command line arguments passed to Guile, as a list of @@ -1052,7 +989,6 @@ strings. The list includes the invoked program name, which is usually options like @code{-e} and @code{-l}. @end deffn -@c docstring begin (texi-doc-string "guile" "getenv") @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 @@ -1072,7 +1008,6 @@ to the environment, replacing any existing string with name matching The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "environ") @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 @@ -1083,7 +1018,6 @@ processes, to the supplied list of strings. Each member of then the return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "putenv") @deffn primitive putenv str Modifies the environment of the current process, which is also the default environment inherited by child processes. @@ -1103,19 +1037,16 @@ The return value is unspecified. @section Processes @findex cd -@c docstring begin (texi-doc-string "guile" "chdir") @deffn primitive chdir str Change the current working directory to @var{path}. The return value is unspecified. @end deffn @findex pwd -@c docstring begin (texi-doc-string "guile" "getcwd") @deffn primitive getcwd Return the name of the current working directory. @end deffn -@c docstring begin (texi-doc-string "guile" "umask") @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 @@ -1124,34 +1055,28 @@ file creation mask. Otherwise the file creation mask is set to E.g., @code{(umask #o022)} sets the mask to octal 22, decimal 18. @end deffn -@c docstring begin (texi-doc-string "guile" "getpid") @deffn primitive getpid Return an integer representing the current process ID. @end deffn -@c docstring begin (texi-doc-string "guile" "getgroups") @deffn primitive getgroups Return a vector of integers representing the current supplimentary group IDs. @end deffn -@c docstring begin (texi-doc-string "guile" "getppid") @deffn primitive getppid Return an integer representing the process ID of the parent process. @end deffn -@c docstring begin (texi-doc-string "guile" "getuid") @deffn primitive getuid Return an integer representing the current real user ID. @end deffn -@c docstring begin (texi-doc-string "guile" "getgid") @deffn primitive getgid Return an integer representing the current real group ID. @end deffn -@c docstring begin (texi-doc-string "guile" "geteuid") @deffn primitive geteuid Return an integer representing the current effective user ID. If the system does not support effective IDs, then the real ID @@ -1159,7 +1084,6 @@ is returned. @code{(feature? 'EIDs)} reports whether the system supports effective IDs. @end deffn -@c docstring begin (texi-doc-string "guile" "getegid") @deffn primitive getegid Return an integer representing the current effective group ID. If the system does not support effective IDs, then the real ID @@ -1167,21 +1091,18 @@ is returned. @code{(feature? 'EIDs)} reports whether the system supports effective IDs. @end deffn -@c docstring begin (texi-doc-string "guile" "setuid") @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 -@c docstring begin (texi-doc-string "guile" "setgid") @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 -@c docstring begin (texi-doc-string "guile" "seteuid") @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 @@ -1190,7 +1111,6 @@ system supports effective IDs. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "setegid") @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 @@ -1199,13 +1119,11 @@ system supports effective IDs. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "getpgrp") @deffn primitive getpgrp Return an integer representing the current process group ID. This is the POSIX definition, not BSD. @end deffn -@c docstring begin (texi-doc-string "guile" "setpgid") @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 @@ -1214,7 +1132,6 @@ Fails on systems that do not support job control. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "setsid") @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 @@ -1222,7 +1139,6 @@ from its controlling terminal if it has one. The return value is an integer representing the new process group ID. @end deffn -@c docstring begin (texi-doc-string "guile" "waitpid") @deffn primitive waitpid pid [options] This procedure collects status information from a child process which has terminated or (optionally) stopped. Normally it will @@ -1271,26 +1187,22 @@ The following three functions can be used to decode the process status code returned by @code{waitpid}. -@c docstring begin (texi-doc-string "guile" "status:exit-val") @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 -@c docstring begin (texi-doc-string "guile" "status:term-sig") @deffn primitive status:term-sig status Return the signal number which terminated the process, if any, otherwise @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "status:stop-sig") @deffn primitive status:stop-sig status Return the signal number which stopped the process, if any, otherwise @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "system") @deffn primitive system [cmd] Execute @var{cmd} using the operating system's "command processor". Under Unix this is usually the default shell @@ -1301,14 +1213,12 @@ If @code{system} is called without arguments, return a boolean indicating whether the command processor is available. @end deffn -@c docstring begin (texi-doc-string "guile" "primitive-exit") @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 -@c docstring begin (texi-doc-string "guile" "execl") @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 @@ -1323,7 +1233,6 @@ 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 -@c docstring begin (texi-doc-string "guile" "execlp") @deffn primitive execlp filename . args Similar to @code{execl}, however if @var{filename} does not contain a slash @@ -1334,7 +1243,6 @@ 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 -@c docstring begin (texi-doc-string "guile" "execle") @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 @@ -1344,7 +1252,6 @@ 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 -@c docstring begin (texi-doc-string "guile" "primitive-fork") @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 @@ -1354,7 +1261,6 @@ This procedure has been renamed from @code{fork} to avoid a naming conflict with the scsh fork. @end deffn -@c docstring begin (texi-doc-string "guile" "nice") @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. @@ -1366,7 +1272,6 @@ The return value is unspecified. Procedures to raise, handle and wait for signals. -@c docstring begin (texi-doc-string "guile" "kill") @deffn primitive kill pid sig Sends a signal to the specified process or group of processes. @@ -1397,13 +1302,11 @@ Interrupt signal. @end defvar @end deffn -@c docstring begin (texi-doc-string "guile" "raise") @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 -@c docstring begin (texi-doc-string "guile" "sigaction") @deffn primitive sigaction signum [handler [flags]] Install or report the signal handler for a specified signal. @@ -1433,13 +1336,11 @@ provide solutions to the problem of consistent access to data structures. @end deffn -@c docstring begin (texi-doc-string "guile" "restore-signals") @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 -@c docstring begin (texi-doc-string "guile" "alarm") @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 @@ -1452,21 +1353,18 @@ if any. The new value replaces the previous alarm. If there was no previous alarm, the return value is zero. @end deffn -@c docstring begin (texi-doc-string "guile" "pause") @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 -@c docstring begin (texi-doc-string "guile" "sleep") @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 -@c docstring begin (texi-doc-string "guile" "usleep") @deffn primitive usleep i Sleep for I microseconds. @code{usleep} is not available on all platforms. @@ -1475,25 +1373,21 @@ all platforms. @node Terminals and Ptys @section Terminals and Ptys -@c docstring begin (texi-doc-string "guile" "isatty?") @deffn primitive isatty? port Return @code{#t} if @var{port} is using a serial non--file device, otherwise @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "ttyname") @deffn primitive ttyname port Return a string with the name of the serial terminal device underlying @var{port}. @end deffn -@c docstring begin (texi-doc-string "guile" "ctermid") @deffn primitive ctermid Return a string containing the file name of the controlling terminal for the current process. @end deffn -@c docstring begin (texi-doc-string "guile" "tcgetpgrp") @deffn primitive tcgetpgrp port Return the process group ID of the foreground process group associated with the terminal open on the file descriptor @@ -1506,7 +1400,6 @@ terminated, and no other job has yet been moved into the foreground. @end deffn -@c docstring begin (texi-doc-string "guile" "tcsetpgrp") @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}. @@ -1569,7 +1462,6 @@ the database routines since they are not reentrant. @subsubsection Address Conversion -@c docstring begin (texi-doc-string "guile" "inet-aton") @deffn primitive inet-aton address Converts a string containing an Internet host address in the traditional dotted decimal notation into an integer. @@ -1578,7 +1470,6 @@ traditional dotted decimal notation into an integer. @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "inet-ntoa") @deffn primitive inet-ntoa inetid Converts an integer Internet host address into a string with the traditional dotted decimal representation. @@ -1587,7 +1478,6 @@ the traditional dotted decimal representation. @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "inet-netof") @deffn primitive inet-netof address Return the network number part of the given integer Internet address. @@ -1596,7 +1486,6 @@ address. @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "inet-lnaof") @deffn primitive inet-lnaof address Return the local-address-with-network part of the given Internet address. @@ -1605,7 +1494,6 @@ Internet address. @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "inet-makeaddr") @deffn primitive inet-makeaddr net lna Makes an Internet host address by combining the network number @var{net} with the local-address-within-network number @@ -1643,7 +1531,6 @@ The list of network addresses associated with @var{host}. The following procedures are used to search the host database: -@c docstring begin (texi-doc-string "guile" "gethost") @deffn primitive gethost [host] @deffnx procedure gethostbyname hostname @deffnx procedure gethostbyaddr address @@ -1680,7 +1567,6 @@ This procedure may not be used before @code{sethostent} has been called. Close the stream used by @code{gethostent}. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "sethost") @deffn primitive sethost [stayopen] If @var{stayopen} is omitted, this is equivalent to @code{endhostent}. Otherwise it is equivalent to @code{sethostent stayopen}. @@ -1706,7 +1592,6 @@ The network number. The following procedures are used to search the network database: -@c docstring begin (texi-doc-string "guile" "getnet") @deffn primitive getnet [net] @deffnx procedure getnetbyname net-name @deffnx procedure getnetbyaddr net-number @@ -1737,7 +1622,6 @@ Return the next entry from the network database. Close the stream used by @code{getnetent}. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "setnet") @deffn primitive setnet [stayopen] If @var{stayopen} is omitted, this is equivalent to @code{endnetent}. Otherwise it is equivalent to @code{setnetent stayopen}. @@ -1760,7 +1644,6 @@ The protocol number. The following procedures are used to search the protocol database: -@c docstring begin (texi-doc-string "guile" "getproto") @deffn primitive getproto [protocol] @deffnx procedure getprotobyname name @deffnx procedure getprotobynumber number @@ -1790,7 +1673,6 @@ Return the next entry from the protocol database. Close the stream used by @code{getprotoent}. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "setproto") @deffn primitive setproto [stayopen] If @var{stayopen} is omitted, this is equivalent to @code{endprotoent}. Otherwise it is equivalent to @code{setprotoent stayopen}. @@ -1817,7 +1699,6 @@ in the database under different protocol names. The following procedures are used to search the service database: -@c docstring begin (texi-doc-string "guile" "getserv") @deffn primitive getserv [name [protocol]] @deffnx procedure getservbyname name protocol @deffnx procedure getservbyport port protocol @@ -1851,7 +1732,6 @@ Return the next entry from the services database. Close the stream used by @code{getservent}. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "setserv") @deffn primitive setserv [stayopen] If @var{stayopen} is omitted, this is equivalent to @code{endservent}. Otherwise it is equivalent to @code{setservent stayopen}. @@ -1871,7 +1751,6 @@ 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. -@c docstring begin (texi-doc-string "guile" "socket") @deffn primitive socket family style proto Return a new socket port of the type specified by @var{family}, @var{style} and @var{protocol}. All three parameters are @@ -1886,7 +1765,6 @@ A single socket port cannot by used for communication until it has been connected to another socket. @end deffn -@c docstring begin (texi-doc-string "guile" "socketpair") @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{protocol}. @@ -1895,7 +1773,6 @@ family. Zero is likely to be the only meaningful value for @var{protocol}. @end deffn -@c docstring begin (texi-doc-string "guile" "getsockopt") @deffn primitive getsockopt sock level optname Return the value of a particular socket option for the socket port @var{socket}. @var{level} is an integer code for type of @@ -1907,7 +1784,6 @@ The returned value is typically an integer but @code{SO_LINGER} returns a pair of integers. @end deffn -@c docstring begin (texi-doc-string "guile" "setsockopt") @deffn primitive setsockopt sock level optname value Sets the value of a particular socket option for the socket port @var{socket}. @var{level} is an integer code for type of option @@ -1922,7 +1798,6 @@ be a pair. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "shutdown") @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 @@ -1943,7 +1818,6 @@ Stop both reception and transmission. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "connect") @deffn primitive connect sock fam address . args Initiates a connection from @var{socket} to the address specified by @var{address} and possibly @var{arg @dots{}}. The format @@ -1961,7 +1835,6 @@ must be a single integer port number. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "bind") @deffn primitive bind sock fam address . args Assigns an address to the socket port @var{socket}. Generally this only needs to be done for server sockets, @@ -2001,7 +1874,6 @@ No address. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "listen") @deffn primitive listen sock backlog This procedure enables @var{socket} to accept connection requests. @var{backlog} is an integer specifying @@ -2012,7 +1884,6 @@ server calls @code{accept} to accept a connection from the queue. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "accept") @deffn primitive accept sock Accepts a connection on a bound, listening socket @var{socket}. If there are no pending connections in the queue, it waits until @@ -2048,14 +1919,12 @@ If the socket family is @code{AF_INET}, returns the Internet port number. @end table -@c docstring begin (texi-doc-string "guile" "getsockname") @deffn primitive getsockname sock Return the address of @var{socket}, 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 -@c docstring begin (texi-doc-string "guile" "getpeername") @deffn primitive getpeername sock Return the address of the socket that the socket @var{socket} is connected to, in the same form as the object returned by @@ -2063,7 +1932,6 @@ is connected to, in the same form as the object returned by @code{AF_FILE} namespace cannot be read. @end deffn -@c docstring begin (texi-doc-string "guile" "recv!") @deffn primitive recv! sock buf [flags] Receives data from the socket port @var{socket}. @var{socket} must already be bound to the address from which data is to be received. @@ -2082,7 +1950,6 @@ Note that the data is read directly from the socket file descriptor: any unread buffered port data is ignored. @end deffn -@c docstring begin (texi-doc-string "guile" "send") @deffn primitive send sock message [flags] Transmits the string @var{message} on the socket port @var{socket}. @var{socket} must already be bound to a destination address. The @@ -2095,7 +1962,6 @@ Note that the data is written directly to the socket file descriptor: any unflushed buffered port data is ignored. @end deffn -@c docstring begin (texi-doc-string "guile" "recvfrom!") @deffn primitive recvfrom! sock str [flags [start [end]]] Return data from the socket port @var{socket} and also information about where the data was received from. @@ -2116,7 +1982,6 @@ Note that the data is read directly from the socket file descriptor: any unread buffered port data is ignored. @end deffn -@c docstring begin (texi-doc-string "guile" "sendto") @deffn primitive sendto sock message fam address . args_and_flags Transmits the string @var{message} on the socket port @var{socket}. The destination address is specified using the @var{family}, @var{address} and @@ -2136,28 +2001,24 @@ 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. -@c docstring begin (texi-doc-string "guile" "htons") @deffn primitive htons in Return a new integer from @var{value} by converting from host to network order. @var{value} must be within the range of a C unsigned short integer. @end deffn -@c docstring begin (texi-doc-string "guile" "ntohs") @deffn primitive ntohs in Return a new integer from @var{value} by converting from network to host order. @var{value} must be within the range of a C unsigned short integer. @end deffn -@c docstring begin (texi-doc-string "guile" "htonl") @deffn primitive htonl in Return a new integer from @var{value} by converting from host to network order. @var{value} must be within the range of a C unsigned long integer. @end deffn -@c docstring begin (texi-doc-string "guile" "ntohl") @deffn primitive ntohl in Return a new integer from @var{value} by converting from network to host order. @var{value} must be within the range of @@ -2183,7 +2044,6 @@ These procedures are inconvenient to use at present, but consider: @node System Identification @section System Identification -@c docstring begin (texi-doc-string "guile" "uname") @deffn primitive uname Return an object with some information about the computer system the program is running on. @@ -2221,7 +2081,6 @@ no other easy or unambiguous way of detecting such features. @node Locales @section Locales -@c docstring begin (texi-doc-string "guile" "setlocale") @deffn primitive setlocale category [locale] If @var{locale} is omitted, return the current value of the specified locale category as a system-dependent string. diff --git a/doc/scheme-binding.texi b/doc/scheme-binding.texi index d23ff2fb5..b6bbe7447 100644 --- a/doc/scheme-binding.texi +++ b/doc/scheme-binding.texi @@ -26,7 +26,6 @@ @section Querying variable bindings @c NJFIXME explain [env] -@c docstring begin (texi-doc-string "guile" "defined?") @deffn primitive defined? sym [env] Return @code{#t} if @var{sym} is defined in the top-level environment. @end deffn diff --git a/doc/scheme-control.texi b/doc/scheme-control.texi index 31a20681f..6922f5b9d 100644 --- a/doc/scheme-control.texi +++ b/doc/scheme-control.texi @@ -88,7 +88,6 @@ Instead of using @code{call-with-current-continuation}, the exception primitives documented here are implemented as built-ins that take advantage of the @emph{upward only} nature of exceptions. -@c docstring begin (texi-doc-string "guile" "catch") @deffn primitive catch key thunk handler Invoke @var{thunk} in the dynamic context of @var{handler} for exceptions matching @var{key}. If thunk throws to the symbol @@ -106,7 +105,6 @@ If the key is @code{#t}, then a throw to @emph{any} symbol will match this call to @code{catch}. @end deffn -@c docstring begin (texi-doc-string "guile" "throw") @deffn primitive throw key . args Invoke the catch form matching @var{key}, passing @var{args} to the @var{handler}. @@ -117,7 +115,6 @@ Invoke the catch form matching @var{key}, passing @var{args} to the If there is no handler at all, an error is signaled. @end deffn -@c docstring begin (texi-doc-string "guile" "lazy-catch") @deffn primitive lazy-catch key thunk handler This behaves exactly like @code{catch}, except that it does not unwind the stack (this is the major difference), and if @@ -139,7 +136,6 @@ displaying @var{msg} and writing @var{args}. @end deffn @c end -@c docstring begin (texi-doc-string "guile" "scm-error") @deffn primitive scm-error key subr message args data Raise an error with key @var{key}. @var{subr} can be a string naming the procedure associated with the error, or @code{#f}. @@ -156,7 +152,6 @@ should be a list containing the Unix signal number; otherwise it will usually be @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "strerror") @deffn primitive strerror err Return the Unix error message corresponding to @var{err}, which must be an integer value. @@ -177,7 +172,6 @@ if an exception occurs then @code{#f} is returned instead. be reviewed] @rnindex dynamic-wind -@c docstring begin (texi-doc-string "guile" "dynamic-wind") @deffn primitive dynamic-wind in_guard thunk out_guard All three arguments must be 0-argument procedures. @var{in_guard} is called, then @var{thunk}, then diff --git a/doc/scheme-data.texi b/doc/scheme-data.texi index af6a17d76..d317ba5a7 100755 --- a/doc/scheme-data.texi +++ b/doc/scheme-data.texi @@ -121,7 +121,6 @@ number 0 (like in C and C++), and not the same as the ``empty list'' The @code{not} procedure returns the boolean inverse of its argument: @rnindex not -@c docstring begin (texi-doc-string "guile" "not") @deffn primitive not x Return @code{#t} iff @var{x} is @code{#f}, else return @code{#f}. @end deffn @@ -130,7 +129,6 @@ The @code{boolean?} procedure is a predicate that returns @code{#t} if its argument is one of the boolean values, otherwise @code{#f}. @rnindex boolean? -@c docstring begin (texi-doc-string "guile" "boolean?") @deffn primitive boolean? obj Return @code{#t} iff @var{obj} is either @code{#t} or @code{#f}. @end deffn @@ -204,7 +202,6 @@ converted by Guile to the corresponding real number. The @code{number?} predicate may be applied to any Scheme value to discover whether the value is any of the supported numerical types. -@c docstring begin (texi-doc-string "guile" "number?") @deffn primitive number? obj Return @code{#t} if @var{obj} is any kind of number, @code{#f} else. @end deffn @@ -273,7 +270,6 @@ completely invisible to the Scheme level programmer. @c REFFIXME Maybe point here to discussion of handling immediates/bignums @c on the C level, where the conversion is not so automatic - NJ -@c docstring begin (texi-doc-string "guile" "integer?") @deffn primitive integer? x Return @code{#t} if @var{x} is an integer number, @code{#f} else. @@ -334,7 +330,6 @@ rational numbers and real irrational numbers such as square roots, and in such a way that the new kinds of number integrate seamlessly with those that are already implemented. -@c docstring begin (texi-doc-string "guile" "real?") @deffn primitive real? obj Return @code{#t} if @var{obj} is a real number, @code{#f} else. Note that the sets of integer and rational values form subsets @@ -342,7 +337,6 @@ of the set of real numbers, so the predicate will also be fulfilled if @var{obj} is an integer number or a rational number. @end deffn -@c docstring begin (texi-doc-string "guile" "rational?") @deffn primitive rational? x Return @code{#t} if @var{x} is a rational number, @code{#f} else. Note that the set of integer values forms a subset of @@ -380,7 +374,6 @@ Guile represents a complex number as a pair of numbers both of which are real, so the real and imaginary parts of a complex number have the same properties of inexactness and limited precision as single real numbers. -@c docstring begin (texi-doc-string "guile" "complex?") @deffn primitive complex? x Return @code{#t} if @var{x} is a complex number, @code{#f} else. Note that the sets of real, rational and integer @@ -405,19 +398,16 @@ available, has no fractional part, and is printed as @code{5.0}. Guile will only convert the latter value to the former when forced to do so by an invocation of the @code{inexact->exact} procedure. -@c docstring begin (texi-doc-string "guile" "exact?") @deffn primitive exact? x Return @code{#t} if @var{x} is an exact number, @code{#f} otherwise. @end deffn -@c docstring begin (texi-doc-string "guile" "inexact?") @deffn primitive inexact? x Return @code{#t} if @var{x} is an inexact number, @code{#f} else. @end deffn -@c docstring begin (texi-doc-string "guile" "inexact->exact") @deffn primitive inexact->exact z Return an exact number that is numerically closest to @var{z}. @end deffn @@ -505,13 +495,11 @@ multiplying by 10^N. @rnindex gcd @rnindex lcm -@c docstring begin (texi-doc-string "guile" "odd?") @deffn primitive odd? n Return @code{#t} if @var{n} is an odd number, @code{#f} otherwise. @end deffn -@c docstring begin (texi-doc-string "guile" "even?") @deffn primitive even? n Return @code{#t} if @var{n} is an even number, @code{#f} otherwise. @@ -612,14 +600,12 @@ zero. @rnindex number->string @rnindex string->number -@c docstring begin (texi-doc-string "guile" "number->string") @deffn primitive number->string n [radix] Return a string holding the external representation of the number @var{n} in the given @var{radix}. If @var{n} is inexact, a radix of 10 will be used. @end deffn -@c docstring begin (texi-doc-string "guile" "string->number") @deffn primitive string->number string [radix] Return a number of the maximally precise representation expressed by the given @var{string}. @var{radix} must be an @@ -641,13 +627,11 @@ syntactically valid notation for a number, then @rnindex magnitude @rnindex angle -@c docstring begin (texi-doc-string "guile" "make-rectangular") @deffn primitive make-rectangular real imaginary Return a complex number constructed of the given @var{real} and @var{imaginary} parts. @end deffn -@c docstring begin (texi-doc-string "guile" "make-polar") @deffn primitive make-polar x y Return the complex number @var{x} * e^(i * @var{y}). @end deffn @@ -868,7 +852,6 @@ Return the absolute value of @var{x}. Return the square root of @var{x}. @end deffn -@c docstring begin (texi-doc-string "guile" "$expt") @deffn primitive $expt x y Return @var{x} raised to the power of @var{y}. This procedure does not accept complex arguments. @@ -904,7 +887,6 @@ Return the arccosine of @var{x}. Return the arctangent of @var{x} in the range -PI/2 to PI/2. @end deffn -@c docstring begin (texi-doc-string "guile" "$atan2") @deffn primitive $atan2 x y Return the arc tangent of the two arguments @var{x} and @var{y}. This is similar to calculating the arc tangent of @@ -958,7 +940,6 @@ Return the hyperbolic arctangent of @var{x}. @node Bitwise Operations @subsection Bitwise Operations -@c docstring begin (texi-doc-string "guile" "logand") @deffn primitive logand n1 n2 Return the integer which is the bit-wise AND of the two integer arguments. @@ -968,7 +949,6 @@ arguments. @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "logior") @deffn primitive logior n1 n2 Return the integer which is the bit-wise OR of the two integer arguments. @@ -978,7 +958,6 @@ arguments. @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "logxor") @deffn primitive logxor n1 n2 Return the integer which is the bit-wise XOR of the two integer arguments. @@ -988,7 +967,6 @@ arguments. @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "lognot") @deffn primitive lognot n Return the integer which is the 2s-complement of the integer argument. @@ -1000,7 +978,6 @@ argument. @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "logtest") @deffn primitive logtest j k @lisp (logtest j k) @equiv{} (not (zero? (logand j k))) @@ -1010,7 +987,6 @@ argument. @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "logbit?") @deffn primitive logbit? index j @lisp (logbit? index j) @equiv{} (logtest (integer-expt 2 index) j) @@ -1023,7 +999,6 @@ argument. @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "ash") @deffn primitive ash n cnt The function ash performs an arithmetic shift left by @var{cnt} bits (or shift right, if @var{cnt} is negative). 'Arithmetic' @@ -1040,7 +1015,6 @@ Formally, the function returns an integer equivalent to @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "logcount") @deffn primitive logcount n Return the number of bits in integer @var{n}. If integer is positive, the 1-bits in its binary representation are counted. @@ -1056,7 +1030,6 @@ representation are counted. If 0, 0 is returned. @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "integer-length") @deffn primitive integer-length n Return the number of bits neccessary to represent @var{n}. @lisp @@ -1069,7 +1042,6 @@ Return the number of bits neccessary to represent @var{n}. @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "integer-expt") @deffn primitive integer-expt n k Return @var{n} raised to the non-negative integer exponent @var{k}. @@ -1081,7 +1053,6 @@ Return @var{n} raised to the non-negative integer exponent @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "bit-extract") @deffn primitive bit-extract n start end Return the integer composed of the @var{start} (inclusive) through @var{end} (exclusive) bits of @var{n}. The @@ -1098,12 +1069,10 @@ through @var{end} (exclusive) bits of @var{n}. The @node Random @subsection Random Number Generation -@c docstring begin (texi-doc-string "guile" "copy-random-state") @deffn primitive copy-random-state [state] Return a copy of the random state @var{state}. @end deffn -@c docstring begin (texi-doc-string "guile" "random") @deffn primitive random n [state] Return a number in [0,N). Accepts a positive integer or real n and returns a @@ -1117,14 +1086,12 @@ the state of the pseudo-random-number generator and is altered as a side effect of the random operation. @end deffn -@c docstring begin (texi-doc-string "guile" "random:exp") @deffn primitive random:exp [state] Return an inexact real in an exponential distribution with mean 1. For an exponential distribution with mean u use (* u (random:exp)). @end deffn -@c docstring begin (texi-doc-string "guile" "random:hollow-sphere!") @deffn primitive random:hollow-sphere! v [state] Fills vect with inexact real random numbers the sum of whose squares is equal to 1.0. @@ -1134,7 +1101,6 @@ are uniformly distributed over the surface of the unit n-shere. @end deffn -@c docstring begin (texi-doc-string "guile" "random:normal") @deffn primitive random:normal [state] Return an inexact real in a normal distribution. The distribution used has mean 0 and standard deviation 1. For a @@ -1142,14 +1108,12 @@ normal distribution with mean m and standard deviation d use @code{(+ m (* d (random:normal)))}. @end deffn -@c docstring begin (texi-doc-string "guile" "random:normal-vector!") @deffn primitive random:normal-vector! v [state] Fills vect with inexact real random numbers that are independent and standard normally distributed (i.e., with mean 0 and variance 1). @end deffn -@c docstring begin (texi-doc-string "guile" "random:solid-sphere!") @deffn primitive random:solid-sphere! v [state] Fills vect with inexact real random numbers the sum of whose squares is less than 1.0. @@ -1159,13 +1123,11 @@ are uniformly distributed within the unit n-shere. The sum of the squares of the numbers is returned. @end deffn -@c docstring begin (texi-doc-string "guile" "random:uniform") @deffn primitive random:uniform [state] Return a uniformly distributed inexact real random number in [0,1). @end deffn -@c docstring begin (texi-doc-string "guile" "seed->random-state") @deffn primitive seed->random-state seed Return a new random state using @var{seed}. @end deffn @@ -1252,124 +1214,103 @@ Several characters have more than one name: #\null, #\nul @end itemize -@c docstring begin (texi-doc-string "guile" "char?") @deffn primitive char? x Return @code{#t} iff @var{x} is a character, else @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "char=?") @deffn primitive char=? x y Return @code{#t} iff @var{x} is the same character as @var{y}, else @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "char<?") @deffn primitive char<? x y Return @code{#t} iff @var{x} is less than @var{y} in the ASCII sequence, else @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "char<=?") @deffn primitive char<=? x y Return @code{#t} iff @var{x} is less than or equal to @var{y} in the ASCII sequence, else @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "char>?") @deffn primitive char>? x y Return @code{#t} iff @var{x} is greater than @var{y} in the ASCII sequence, else @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "char>=?") @deffn primitive char>=? x y Return @code{#t} iff @var{x} is greater than or equal to @var{y} in the ASCII sequence, else @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "char-ci=?") @deffn primitive char-ci=? x y Return @code{#t} iff @var{x} is the same character as @var{y} ignoring case, else @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "char-ci<?") @deffn primitive char-ci<? x y Return @code{#t} iff @var{x} is less than @var{y} in the ASCII sequence ignoring case, else @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "char-ci<=?") @deffn primitive char-ci<=? x y Return @code{#t} iff @var{x} is less than or equal to @var{y} in the ASCII sequence ignoring case, else @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "char-ci>?") @deffn primitive char-ci>? x y Return @code{#t} iff @var{x} is greater than @var{y} in the ASCII sequence ignoring case, else @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "char-ci>=?") @deffn primitive char-ci>=? x y Return @code{#t} iff @var{x} is greater than or equal to @var{y} in the ASCII sequence ignoring case, else @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "char-alphabetic?") @deffn primitive char-alphabetic? chr Return @code{#t} iff @var{chr} is alphabetic, else @code{#f}. Alphabetic means the same thing as the isalpha C library function. @end deffn -@c docstring begin (texi-doc-string "guile" "char-numeric?") @deffn primitive char-numeric? chr Return @code{#t} iff @var{chr} is numeric, else @code{#f}. Numeric means the same thing as the isdigit C library function. @end deffn -@c docstring begin (texi-doc-string "guile" "char-whitespace?") @deffn primitive char-whitespace? chr Return @code{#t} iff @var{chr} is whitespace, else @code{#f}. Whitespace means the same thing as the isspace C library function. @end deffn -@c docstring begin (texi-doc-string "guile" "char-upper-case?") @deffn primitive char-upper-case? chr Return @code{#t} iff @var{chr} is uppercase, else @code{#f}. Uppercase means the same thing as the isupper C library function. @end deffn -@c docstring begin (texi-doc-string "guile" "char-lower-case?") @deffn primitive char-lower-case? chr Return @code{#t} iff @var{chr} is lowercase, else @code{#f}. Lowercase means the same thing as the islower C library function. @end deffn -@c docstring begin (texi-doc-string "guile" "char-is-both?") @deffn primitive char-is-both? chr Return @code{#t} iff @var{chr} is either uppercase or lowercase, else @code{#f}. Uppercase and lowercase are as defined by the isupper and islower C library functions. @end deffn -@c docstring begin (texi-doc-string "guile" "char->integer") @deffn primitive char->integer chr Return the number corresponding to ordinal position of @var{chr} in the ASCII sequence. @end deffn -@c docstring begin (texi-doc-string "guile" "integer->char") @deffn primitive integer->char n Return the character at position @var{n} in the ASCII sequence. @end deffn -@c docstring begin (texi-doc-string "guile" "char-upcase") @deffn primitive char-upcase chr Return the uppercase character version of @var{chr}. @end deffn -@c docstring begin (texi-doc-string "guile" "char-downcase") @deffn primitive char-downcase chr Return the lowercase character version of @var{chr}. @end deffn @@ -1437,13 +1378,11 @@ The following procedures can be used to check whether a given string fulfills some specified property. @rnindex string? -@c docstring begin (texi-doc-string "guile" "string?") @deffn primitive string? obj Return @code{#t} iff @var{obj} is a string, else returns @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "string-null?") @deffn primitive string-null? str Return @code{#t} if @var{str}'s length is nonzero, and @code{#f} otherwise. @@ -1464,8 +1403,6 @@ initializing them with some specified character data. @rnindex string @rnindex list->string -@c docstring begin (texi-doc-string "guile" "string") -@c docstring begin (texi-doc-string "guile" "list->string") @deffn primitive string . chrs @deffnx primitive list->string chrs Return a newly allocated string composed of the arguments, @@ -1473,7 +1410,6 @@ Return a newly allocated string composed of the arguments, @end deffn @rnindex make-string -@c docstring begin (texi-doc-string "guile" "make-string") @deffn primitive make-string k [chr] Return a newly allocated string of length @var{k}. If @var{chr} is given, then all elements of @@ -1490,7 +1426,6 @@ work with the resulting list, and then convert it back into a string. These procedures are useful for similar tasks. @rnindex string->list -@c docstring begin (texi-doc-string "guile" "string->list") @deffn primitive string->list str Return a newly allocated list of the characters that make up the given string @var{str}. @code{string->list} and @@ -1506,26 +1441,22 @@ Portions of strings can be extracted by these procedures. @code{substring} can be used to extract substrings from longer strings. @rnindex string-length -@c docstring begin (texi-doc-string "guile" "string-length") @deffn primitive string-length string Return the number of characters in @var{string}. @end deffn @rnindex string-ref -@c docstring begin (texi-doc-string "guile" "string-ref") @deffn primitive string-ref str k Return character @var{k} of @var{str} using zero-origin indexing. @var{k} must be a valid index of @var{str}. @end deffn @rnindex string-copy -@c docstring begin (texi-doc-string "guile" "string-copy") @deffn primitive string-copy str Return a newly allocated copy of the given @var{string}. @end deffn @rnindex substring -@c docstring begin (texi-doc-string "guile" "substring") @deffn primitive substring str start [end] Return a newly allocated string formed from the characters of @var{str} beginning with index @var{start} (inclusive) and @@ -1544,7 +1475,6 @@ not a new string is the result of a string operation, but that the actual memory representation of a string is modified. @rnindex string-set! -@c docstring begin (texi-doc-string "guile" "string-set!") @deffn primitive string-set! str k chr Store @var{chr} in element @var{k} of @var{str} and return an unspecified value. @var{k} must be a valid index of @@ -1552,13 +1482,11 @@ an unspecified value. @var{k} must be a valid index of @end deffn @rnindex string-fill! -@c docstring begin (texi-doc-string "guile" "string-fill!") @deffn primitive string-fill! str chr Store @var{char} in every element of the given @var{string} and return an unspecified value. @end deffn -@c docstring begin (texi-doc-string "guile" "substring-fill!") @deffn primitive substring-fill! str start end fill Change every character in @var{str} between @var{start} and @var{end} to @var{fill}. @@ -1570,9 +1498,6 @@ y @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "substring-move!") -@c docstring begin (texi-doc-string "guile" "substring-move-left!") -@c docstring begin (texi-doc-string "guile" "substring-move-right!") @deffn primitive substring-move! str1 start1 end1 str2 start2 @deffnx primitive substring-move-left! str1 start1 end1 str2 start2 @deffnx primitive substring-move-right! str1 start1 end1 str2 start2 @@ -1657,7 +1582,6 @@ ending in @code{-ci} ignore the character case when comparing strings. @rnindex string=? -@c docstring begin (texi-doc-string "guile" "string=?") @deffn primitive string=? s1 s2 Lexicographic equality predicate; return @code{#t} if the two strings are the same length and contain the same characters in @@ -1669,35 +1593,30 @@ characters. @end deffn @rnindex string<? -@c docstring begin (texi-doc-string "guile" "string<?") @deffn primitive string<? s1 s2 Lexicographic ordering predicate; return @code{#t} if @var{s1} is lexicographically less than @var{s2}. @end deffn @rnindex string<=? -@c docstring begin (texi-doc-string "guile" "string<=?") @deffn primitive string<=? s1 s2 Lexicographic ordering predicate; return @code{#t} if @var{s1} is lexicographically less than or equal to @var{s2}. @end deffn @rnindex string>? -@c docstring begin (texi-doc-string "guile" "string>?") @deffn primitive string>? s1 s2 Lexicographic ordering predicate; return @code{#t} if @var{s1} is lexicographically greater than @var{s2}. @end deffn @rnindex string>=? -@c docstring begin (texi-doc-string "guile" "string>=?") @deffn primitive string>=? s1 s2 Lexicographic ordering predicate; return @code{#t} if @var{s1} is lexicographically greater than or equal to @var{s2}. @end deffn @rnindex string-ci=? -@c docstring begin (texi-doc-string "guile" "string-ci=?") @deffn primitive string-ci=? s1 s2 Case-insensitive string equality predicate; return @code{#t} if the two strings are the same length and their component @@ -1706,7 +1625,6 @@ return @code{#f}. @end deffn @rnindex string-ci< -@c docstring begin (texi-doc-string "guile" "string-ci<?") @deffn primitive string-ci<? s1 s2 Case insensitive lexicographic ordering predicate; return @code{#t} if @var{s1} is lexicographically less than @var{s2} @@ -1714,7 +1632,6 @@ regardless of case. @end deffn @rnindex string<=? -@c docstring begin (texi-doc-string "guile" "string-ci<=?") @deffn primitive string-ci<=? s1 s2 Case insensitive lexicographic ordering predicate; return @code{#t} if @var{s1} is lexicographically less than or equal @@ -1722,7 +1639,6 @@ to @var{s2} regardless of case. @end deffn @rnindex string-ci>? -@c docstring begin (texi-doc-string "guile" "string-ci>?") @deffn primitive string-ci>? s1 s2 Case insensitive lexicographic ordering predicate; return @code{#t} if @var{s1} is lexicographically greater than @@ -1730,7 +1646,6 @@ Case insensitive lexicographic ordering predicate; return @end deffn @rnindex string-ci>=? -@c docstring begin (texi-doc-string "guile" "string-ci>=?") @deffn primitive string-ci>=? s1 s2 Case insensitive lexicographic ordering predicate; return @code{#t} if @var{s1} is lexicographically greater than or @@ -1744,7 +1659,6 @@ equal to @var{s2} regardless of case. When searching the index of a character in a string, these procedures can be used. -@c docstring begin (texi-doc-string "guile" "string-index") @deffn primitive string-index str chr [frm [to]] Return the index of the first occurrence of @var{chr} in @var{str}. The optional integer arguments @var{frm} and @@ -1763,7 +1677,6 @@ procedure essentially implements the @code{index} or @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "string-rindex") @deffn primitive string-rindex str chr [frm [to]] Like @code{string-index}, but search from the right of the string rather than from the left. This procedure essentially @@ -1787,13 +1700,11 @@ the C library. These are procedures for mapping strings to their upper-- or lower--case equivalents, respectively, or for capitalizing strings. -@c docstring begin (texi-doc-string "guile" "string-upcase") @deffn primitive string-upcase str Return a freshly allocated string containing the characters of @var{str} in upper case. @end deffn -@c docstring begin (texi-doc-string "guile" "string-upcase!") @deffn primitive string-upcase! str Destructively upcase every character in @var{str} and return @var{str}. @@ -1804,13 +1715,11 @@ y @result{} "ARRDEFG" @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "string-downcase") @deffn primitive string-downcase str Return a freshly allocation string containing the characters in @var{str} in lower case. @end deffn -@c docstring begin (texi-doc-string "guile" "string-downcase!") @deffn primitive string-downcase! str Destructively downcase every character in @var{str} and return @var{str}. @@ -1821,14 +1730,12 @@ y @result{} "arrdefg" @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "string-capitalize") @deffn primitive string-capitalize str Return a freshly allocated string with the characters in @var{str}, where the first character of every word is capitalized. @end deffn -@c docstring begin (texi-doc-string "guile" "string-capitalize!") @deffn primitive string-capitalize! str Upcase the first character of every word in @var{str} destructively and return @var{str}. @@ -1847,7 +1754,6 @@ The procedure @code{string-append} appends several strings together to form a longer result string. @rnindex string-append -@c docstring begin (texi-doc-string "guile" "string-append") @deffn primitive string-append . args Return a newly allocated string whose characters form the concatenation of the given strings, @var{args}. @@ -1859,7 +1765,6 @@ concatenation of the given strings, @var{args}. This section contains several remaining string procedures. -@c docstring begin (texi-doc-string "guile" "string-ci->symbol") @deffn primitive string-ci->symbol str Return the symbol whose name is @var{str}. @var{str} is converted to lowercase before the conversion is done, if Guile @@ -1886,7 +1791,6 @@ substring is an object that mostly behaves just like an ordinary substring, except that it actually shares storage space with its parent string. -@c docstring begin (texi-doc-string "guile" "make-shared-substring") @deffn primitive make-shared-substring str [start [end]] Return a shared substring of @var{str}. The semantics are the same as for the @code{substring} function: the shared substring @@ -1955,7 +1859,6 @@ and read only strings. Mutable strings answer @code{#t} to @code{string?} while read only strings may or may not. All kinds of strings, whether or not they are mutable return #t to this: -@c docstring begin (texi-doc-string "guile" "read-only-string?") @deffn primitive read-only-string? obj Return true if @var{obj} can be read as a string, @@ -2046,7 +1949,6 @@ the same regular expression is used several times (for example, in a loop). For better performance, you can compile a regular expression in advance and then match strings against the compiled regexp. -@c docstring begin (texi-doc-string "guile" "make-regexp") @deffn primitive make-regexp pat . flags Compile the regular expression described by @var{pat}, and return the compiled regexp structure. If @var{pat} does not @@ -2085,7 +1987,6 @@ one which comes last will override the earlier one. @end table @end deffn -@c docstring begin (texi-doc-string "guile" "regexp-exec") @deffn primitive regexp-exec rx str [start [flags]] Match the compiled regular expression @var{rx} against @code{str}. If the optional integer @var{start} argument is @@ -2094,7 +1995,6 @@ Return a match structure describing the results of the match, or @code{#f} if no match could be found. @end deffn -@c docstring begin (texi-doc-string "guile" "regexp?") @deffn primitive regexp? obj Return @code{#t} if @var{obj} is a compiled regular expression, or @code{#f} otherwise. @@ -2467,7 +2367,6 @@ table (with an undefined value) if none is yet present. @c unbound symbols. @c @end deffn -@c docstring begin (texi-doc-string "guile" "gensym") @deffn primitive gensym [prefix] Create a new symbol with a name constructed from a prefix and a counter value. The string @var{prefix} can be specified as @@ -2476,7 +2375,6 @@ is increased by 1 at each call. There is no provision for resetting the counter. @end deffn -@c docstring begin (texi-doc-string "guile" "gentemp") @deffn primitive gentemp [prefix [obarray]] Create a new symbol with a name unique in an obarray. The name is constructed from an optional string @var{prefix} @@ -2487,14 +2385,12 @@ interned. The counter is increased by 1 at each call. There is no provision for resetting the counter. @end deffn -@c docstring begin (texi-doc-string "guile" "intern-symbol") @deffn primitive intern-symbol obarray string Add a new symbol to @var{obarray} with name @var{string}, bound to an unspecified initial value. The symbol table is not modified if a symbol with this name is already present. @end deffn -@c docstring begin (texi-doc-string "guile" "string->obarray-symbol") @deffn primitive string->obarray-symbol obarray string [soft?] Intern a new symbol in @var{obarray}, a symbol table, with name @var{string}. @@ -2512,7 +2408,6 @@ table; instead, simply return @code{#f}. @end deffn @rnindex string->symbol -@c docstring begin (texi-doc-string "guile" "string->symbol") @deffn primitive string->symbol string Return the symbol whose name is @var{string}. This procedure can create symbols with names containing special characters or @@ -2535,7 +2430,6 @@ standard case is lower case: @end deffn @rnindex symbol->string -@c docstring begin (texi-doc-string "guile" "symbol->string") @deffn primitive symbol->string s Return the name of @var{symbol} as a string. If the symbol was part of an object returned as the value of a literal expression @@ -2560,7 +2454,6 @@ standard case is lower case: @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "symbol-binding") @deffn primitive symbol-binding obarray string Look up in @var{obarray} the symbol whose name is @var{string}, and return the value to which it is bound. If @var{obarray} is @code{#f}, @@ -2568,7 +2461,6 @@ use the global symbol table. If @var{string} is not interned in @var{obarray}, an error is signalled. @end deffn -@c docstring begin (texi-doc-string "guile" "symbol-bound?") @deffn primitive symbol-bound? obarray string Return @code{#t} if @var{obarray} contains a symbol with name @var{string} bound to a defined value. This differs from @@ -2578,38 +2470,31 @@ determines whether a symbol has been given any meaningful value. @end deffn -@c docstring begin (texi-doc-string "guile" "symbol-fref") @deffn primitive symbol-fref symbol Return the contents of @var{symbol}'s @dfn{function slot}. @end deffn -@c docstring begin (texi-doc-string "guile" "symbol-fset!") @deffn primitive symbol-fset! symbol value Change the binding of @var{symbol}'s function slot. @end deffn -@c docstring begin (texi-doc-string "guile" "symbol-hash") @deffn primitive symbol-hash symbol Return a hash value for @var{symbol}. @end deffn -@c docstring begin (texi-doc-string "guile" "symbol-interned?") @deffn primitive symbol-interned? obarray string Return @code{#t} if @var{obarray} contains a symbol with name @var{string}, and @code{#f} otherwise. @end deffn -@c docstring begin (texi-doc-string "guile" "symbol-pref") @deffn primitive symbol-pref symbol Return the @dfn{property list} currently associated with @var{symbol}. @end deffn -@c docstring begin (texi-doc-string "guile" "symbol-pset!") @deffn primitive symbol-pset! symbol value Change the binding of @var{symbol}'s property slot. @end deffn -@c docstring begin (texi-doc-string "guile" "symbol-set!") @deffn primitive symbol-set! obarray string value Find the symbol in @var{obarray} whose name is @var{string}, and rebind it to @var{value}. An error is signalled if @var{string} is not present @@ -2617,27 +2502,23 @@ in @var{obarray}. @end deffn @rnindex symbol? -@c docstring begin (texi-doc-string "guile" "symbol?") @deffn primitive symbol? obj Return @code{#t} if @var{obj} is a symbol, otherwise return @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "unintern-symbol") @deffn primitive unintern-symbol obarray string Remove the symbol with name @var{string} from @var{obarray}. This function returns @code{#t} if the symbol was present and @code{#f} otherwise. @end deffn -@c docstring begin (texi-doc-string "guile" "builtin-variable") @deffn primitive builtin-variable name Return the built-in variable with the name @var{name}. @var{name} must be a symbol (not a string). Then use @code{variable-ref} to access its value. @end deffn -@c docstring begin (texi-doc-string "guile" "make-undefined-variable") @deffn primitive make-undefined-variable [name-hint] Return a variable object initialized to an undefined value. If given, uses @var{name-hint} as its internal (debugging) @@ -2646,7 +2527,6 @@ Remember, of course, that multiple bindings to the same variable may exist, so @var{name-hint} is just that---a hint. @end deffn -@c docstring begin (texi-doc-string "guile" "make-variable") @deffn primitive make-variable init [name-hint] Return a variable object initialized to value @var{init}. If given, uses @var{name-hint} as its internal (debugging) @@ -2655,27 +2535,23 @@ Remember, of course, that multiple bindings to the same variable may exist, so @var{name-hint} is just that---a hint. @end deffn -@c docstring begin (texi-doc-string "guile" "variable-bound?") @deffn primitive variable-bound? var Return @code{#t} iff @var{var} is bound to a value. Throws an error if @var{var} is not a variable object. @end deffn -@c docstring begin (texi-doc-string "guile" "variable-ref") @deffn primitive variable-ref var Dereference @var{var} and return its value. @var{var} must be a variable object; see @code{make-variable} and @code{make-undefined-variable}. @end deffn -@c docstring begin (texi-doc-string "guile" "variable-set!") @deffn primitive variable-set! var val Set the value of the variable @var{var} to @var{val}. @var{var} must be a variable object, @var{val} can be any value. Return an unspecified value. @end deffn -@c docstring begin (texi-doc-string "guile" "variable?") @deffn primitive variable? obj Return @code{#t} iff @var{obj} is a variable object, else return @code{#f} @@ -2878,18 +2754,15 @@ construct a keyword object programmatically, you can do so by calling (as the reader does). The dash symbol for a keyword object can be retrieved using the @code{keyword-dash-symbol} procedure. -@c docstring begin (texi-doc-string "guile" "make-keyword-from-dash-symbol") @deffn primitive make-keyword-from-dash-symbol symbol Make a keyword object from a @var{symbol} that starts with a dash. @end deffn -@c docstring begin (texi-doc-string "guile" "keyword?") @deffn primitive keyword? obj Return @code{#t} if the argument @var{obj} is a keyword, else @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "keyword-dash-symbol") @deffn primitive keyword-dash-symbol keyword Return the dash symbol for @var{keyword}. This is the inverse of @code{make-keyword-from-dash-symbol}. @@ -2945,7 +2818,6 @@ pair, and the pair is returned. The name @code{cons} stands for given Scheme object is a pair or not. @rnindex cons -@c docstring begin (texi-doc-string "guile" "cons") @deffn primitive cons x y Return a newly allocated pair whose car is @var{x} and whose cdr is @var{y}. The pair is guaranteed to be different (in the @@ -2953,7 +2825,6 @@ sense of @code{eq?}) from every previously existing object. @end deffn @rnindex pair? -@c docstring begin (texi-doc-string "guile" "pair?") @deffn primitive pair? x Return @code{#t} if @var{x} is a pair; otherwise return @code{#f}. @@ -2987,14 +2858,12 @@ for example @code{caddr} could be defined by @end deffn @rnindex set-car! -@c docstring begin (texi-doc-string "guile" "set-car!") @deffn primitive set-car! pair value Stores @var{value} in the car field of @var{pair}. The value returned by @code{set-car!} is unspecified. @end deffn @rnindex set-cdr! -@c docstring begin (texi-doc-string "guile" "set-cdr!") @deffn primitive set-cdr! pair value Stores @var{value} in the cdr field of @var{pair}. The value returned by @code{set-cdr!} is unspecified. @@ -3078,7 +2947,6 @@ whether their input is valid, or they could do different things depending on the datatype of their arguments. @rnindex list? -@c docstring begin (texi-doc-string "guile" "list?") @deffn primitive list? x Return @code{#t} iff @var{x} is a proper list, else @code{#f}. @end deffn @@ -3089,7 +2957,6 @@ somehow deals with the elements of a list until the list satisfies @code{null?}. Then, teh algorithm terminates. @rnindex null? -@c docstring begin (texi-doc-string "guile" "null?") @deffn primitive null? x Return @code{#t} iff @var{x} is the empty list, else @code{#f}. @end deffn @@ -3103,13 +2970,11 @@ This section describes the procedures for constructing new lists. the last pair of the list. @rnindex list -@c docstring begin (texi-doc-string "guile" "list") @deffn primitive list arg1 @dots{} Return a list containing @var{objs}, the arguments to @code{list}. @end deffn -@c docstring begin (texi-doc-string "guile" "cons*") @deffn primitive cons* arg1 arg2 @dots{} Like @code{list}, but the last arg provides the tail of the constructed list, returning @code{(cons @var{arg1} (cons @@ -3119,7 +2984,6 @@ result. This function is called @code{list*} in some other Schemes and in Common LISP. @end deffn -@c docstring begin (texi-doc-string "guile" "list-copy") @deffn primitive list-copy lst Return a (newly-created) copy of @var{lst}. @end deffn @@ -3139,26 +3003,21 @@ These procedures are used to get some information about a list, or to retrieve one or more elements of a list. @rnindex length -@c docstring begin (texi-doc-string "guile" "length") @deffn primitive length lst Return the number of elements in list @var{lst}. @end deffn -@c docstring begin (texi-doc-string "guile" "last-pair") @deffn primitive last-pair lst Return a pointer to the last pair in @var{lst}, signalling an error if @var{lst} is circular. @end deffn @rnindex list-ref -@c docstring begin (texi-doc-string "guile" "list-ref") @deffn primitive list-ref list k Return the @var{k}th element from @var{list}. @end deffn @rnindex list-tail -@c docstring begin (texi-doc-string "guile" "list-tail") -@c docstring begin (texi-doc-string "guile" "list-cdr-ref") @deffn primitive list-tail lst k @deffnx primitive list-cdr-ref lst k Return the "tail" of @var{lst} beginning with its @var{k}th element. @@ -3169,7 +3028,6 @@ think of @code{list-cdr-ref} as accessing the @var{k}th cdr of the list, or returning the results of cdring @var{k} times down @var{lst}. @end deffn -@c docstring begin (texi-doc-string "guile" "list-head") @deffn primitive list-head lst k Copy the first @var{k} elements from @var{lst} into a new list, and return it. @@ -3187,7 +3045,6 @@ pairs. This is why you should be careful when using the side--effecting variants. @rnindex append -@c docstring begin (texi-doc-string "guile" "append") @deffn primitive append . args Return a list consisting of the elements the lists passed as arguments. @@ -3206,7 +3063,6 @@ if the last argument is not a proper list. @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "append!") @deffn primitive append! . lists A destructive version of @code{append} (@pxref{Pairs and Lists,,,r4rs, The Revised^4 Report on Scheme}). The cdr field @@ -3216,14 +3072,12 @@ the mutated list. @end deffn @rnindex reverse -@c docstring begin (texi-doc-string "guile" "reverse") @deffn primitive reverse lst Return a new list that contains the elements of @var{lst} but in reverse order. @end deffn @c NJFIXME explain new_tail -@c docstring begin (texi-doc-string "guile" "reverse!") @deffn primitive reverse! lst [new_tail] A destructive version of @code{reverse} (@pxref{Pairs and Lists,,,r4rs, The Revised^4 Report on Scheme}). The cdr of each cell in @var{lst} is @@ -3245,17 +3099,14 @@ The following procedures modify existing list. @code{list-set!} and @code{list-cdr-set!} change which elements a list contains, the various deletion procedures @code{delq}, @code{delv} etc. -@c docstring begin (texi-doc-string "guile" "list-set!") @deffn primitive list-set! list k val Set the @var{k}th element of @var{list} to @var{val}. @end deffn -@c docstring begin (texi-doc-string "guile" "list-cdr-set!") @deffn primitive list-cdr-set! list k val Set the @var{k}th cdr of @var{list} to @var{val}. @end deffn -@c docstring begin (texi-doc-string "guile" "delq") @deffn primitive delq item lst Return a newly-created copy of @var{lst} with elements @code{eq?} to @var{item} removed. This procedure mirrors @@ -3263,7 +3114,6 @@ Return a newly-created copy of @var{lst} with elements @var{item} with @code{eq?}. @end deffn -@c docstring begin (texi-doc-string "guile" "delv") @deffn primitive delv item lst Return a newly-created copy of @var{lst} with elements @code{eqv?} to @var{item} removed. This procedure mirrors @@ -3271,7 +3121,6 @@ Return a newly-created copy of @var{lst} with elements @var{item} with @code{eqv?}. @end deffn -@c docstring begin (texi-doc-string "guile" "delete") @deffn primitive delete item lst Return a newly-created copy of @var{lst} with elements @code{equal?} to @var{item} removed. This procedure mirrors @@ -3279,9 +3128,6 @@ Return a newly-created copy of @var{lst} with elements against @var{item} with @code{equal?}. @end deffn -@c docstring begin (texi-doc-string "guile" "delq!") -@c docstring begin (texi-doc-string "guile" "delv!") -@c docstring begin (texi-doc-string "guile" "delete!") @deffn primitive delq! item lst @deffnx primitive delv! item lst @deffnx primitive delete! item lst @@ -3293,21 +3139,18 @@ destructive list functions, these functions cannot modify the binding of @var{lst} destructively. @end deffn -@c docstring begin (texi-doc-string "guile" "delq1!") @deffn primitive delq1! item lst Like @code{delq!}, but only deletes the first occurrence of @var{item} from @var{lst}. Tests for equality using @code{eq?}. See also @code{delv1!} and @code{delete1!}. @end deffn -@c docstring begin (texi-doc-string "guile" "delv1!") @deffn primitive delv1! item lst Like @code{delv!}, but only deletes the first occurrence of @var{item} from @var{lst}. Tests for equality using @code{eqv?}. See also @code{delq1!} and @code{delete1!}. @end deffn -@c docstring begin (texi-doc-string "guile" "delete1!") @deffn primitive delete1! item lst Like @code{delete!}, but only deletes the first occurrence of @var{item} from @var{lst}. Tests for equality using @@ -3324,7 +3167,6 @@ they return the sublist whose car is equal to the search object, where equality depends on the equality predicate used. @rnindex memq -@c docstring begin (texi-doc-string "guile" "memq") @deffn primitive memq x lst Return the first sublist of @var{lst} whose car is @code{eq?} to @var{x} where the sublists of @var{lst} are the non-empty @@ -3335,7 +3177,6 @@ returned. @end deffn @rnindex memv -@c docstring begin (texi-doc-string "guile" "memv") @deffn primitive memv x lst Return the first sublist of @var{lst} whose car is @code{eqv?} to @var{x} where the sublists of @var{lst} are the non-empty @@ -3346,7 +3187,6 @@ returned. @end deffn @rnindex member -@c docstring begin (texi-doc-string "guile" "member") @deffn primitive member x lst Return the first sublist of @var{lst} whose car is @code{equal?} to @var{x} where the sublists of @var{lst} are @@ -3360,21 +3200,18 @@ empty list) is returned. high level at all? Maybe these docs should be relegated to a "Guile Internals" node or something. -twp] -@c docstring begin (texi-doc-string "guile" "sloppy-memq") @deffn primitive sloppy-memq x lst This procedure behaves like @code{memq}, but does no type or error checking. Its use is recommended only in writing Guile internals, not for high-level Scheme programs. @end deffn -@c docstring begin (texi-doc-string "guile" "sloppy-memv") @deffn primitive sloppy-memv x lst This procedure behaves like @code{memv}, but does no type or error checking. Its use is recommended only in writing Guile internals, not for high-level Scheme programs. @end deffn -@c docstring begin (texi-doc-string "guile" "sloppy-member") @deffn primitive sloppy-member x lst This procedure behaves like @code{member}, but does no type or error checking. Its use is recommended only in writing Guile internals, @@ -3393,7 +3230,6 @@ the result of the invocation is. @rnindex map @c begin (texi-doc-string "guile" "map") -@c docstring begin (texi-doc-string "guile" "map-in-order") @deffn primitive map proc arg1 arg2 @dots{} @deffnx primitive map-in-order proc arg1 arg2 @dots{} Apply @var{proc} to each element of the list @var{arg1} (if only two @@ -3661,7 +3497,6 @@ Structure layouts are represented by specially interned symbols whose name is a string of type and protection codes. To create a new structure layout, use this procedure: -@c docstring begin (texi-doc-string "guile" "make-struct-layout") @deffn primitive make-struct-layout fields Return a new structure layout object. @@ -3683,7 +3518,6 @@ indicate that the field is a tail-array. This section describes the basic procedures for creating and accessing structures. -@c docstring begin (texi-doc-string "guile" "make-struct") @deffn primitive make-struct vtable tail_array_size . init Create a new structure. @@ -3712,15 +3546,12 @@ more powerful. For more information, see the documentation for @code{make-vtable-vtable}. @end deffn -@c docstring begin (texi-doc-string "guile" "struct?") @deffn primitive struct? x Return @code{#t} iff @var{obj} is a structure object, else @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "struct-ref") -@c docstring begin (texi-doc-string "guile" "struct-set!") @deffn primitive struct-ref handle pos @deffnx primitive struct-set! struct n value Access (or modify) the @var{n}th field of @var{struct}. @@ -3744,12 +3575,10 @@ which are used only internally to libguile. The variable @code{vtable-offset-user} is bound to a field number. Vtable fields at that position or greater are user definable. -@c docstring begin (texi-doc-string "guile" "struct-vtable") @deffn primitive struct-vtable handle Return the vtable structure that describes the type of @var{struct}. @end deffn -@c docstring begin (texi-doc-string "guile" "struct-vtable?") @deffn primitive struct-vtable? x Return @code{#t} iff obj is a vtable structure. @end deffn @@ -3762,7 +3591,6 @@ created by using @code{(make-struct V' ...)}. Another possibility is that @code{V} is an instance of the type it itself describes. Vtable structures of the second sort are created by this procedure: -@c docstring begin (texi-doc-string "guile" "make-vtable-vtable") @deffn primitive make-vtable-vtable user_fields tail_array_size . init Return a new, self-describing vtable structure. @@ -3822,17 +3650,14 @@ ball @result{} #<a green ball owned by Nisse> @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "struct-vtable-name") @deffn primitive struct-vtable-name vtable Return the name of the vtable @var{vtable}. @end deffn -@c docstring begin (texi-doc-string "guile" "set-struct-vtable-name!") @deffn primitive set-struct-vtable-name! vtable name Set the name of the vtable @var{vtable} to @var{name}. @end deffn -@c docstring begin (texi-doc-string "guile" "struct-vtable-tag") @deffn primitive struct-vtable-tag handle Return the vtable tag of the structure @var{handle}. @end deffn @@ -3891,7 +3716,6 @@ a vector: The following procedures can be used with conventional arrays (or vectors). -@c docstring begin (texi-doc-string "guile" "array?") @deffn primitive array? v [prot] Return @code{#t} if the @var{obj} is an array, and @code{#f} if not. The @var{prototype} argument is used with uniform arrays @@ -3906,29 +3730,23 @@ Creates and returns an array that has as many dimensions as there are @c array-ref's type is `compiled-closure'. There's some weird stuff @c going on in array.c, too. Let's call it a primitive. -twp -@c docstring begin (texi-doc-string "guile" "uniform-vector-ref") -@c docstring begin (texi-doc-string "guile" "array-ref") @deffn primitive uniform-vector-ref v args @deffnx primitive array-ref v . args Return the element at the @code{(index1, index2)} element in @var{array}. @end deffn -@c docstring begin (texi-doc-string "guile" "array-in-bounds?") @deffn primitive array-in-bounds? v . args Return @code{#t} if its arguments would be acceptable to @code{array-ref}. @end deffn -@c docstring begin (texi-doc-string "guile" "array-set!") -@c docstring begin (texi-doc-string "guile" "uniform-array-set1!") @deffn primitive array-set! v obj . args @deffnx primitive uniform-array-set1! v obj args Sets the element at the @code{(index1, index2)} element in @var{array} to @var{new-value}. The value returned by array-set! is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "make-shared-array") @deffn primitive make-shared-array oldra mapfunc . dims @code{make-shared-array} can be used to create shared subarrays of other arrays. The @var{mapper} is a function that translates coordinates in @@ -3947,22 +3765,18 @@ it can be otherwise arbitrary. A simple example: @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "shared-array-increments") @deffn primitive shared-array-increments ra For each dimension, return the distance between elements in the root vector. @end deffn -@c docstring begin (texi-doc-string "guile" "shared-array-offset") @deffn primitive shared-array-offset ra Return the root vector index of the first element in the array. @end deffn -@c docstring begin (texi-doc-string "guile" "shared-array-root") @deffn primitive shared-array-root ra Return the root vector of a shared array. @end deffn -@c docstring begin (texi-doc-string "guile" "transpose-array") @deffn primitive transpose-array ra . args Return an array sharing contents with @var{array}, but with dimensions arranged in a different order. There must be one @@ -3983,7 +3797,6 @@ have smaller rank than @var{array}. @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "enclose-array") @deffn primitive enclose-array ra . axes @var{dim0}, @var{dim1} @dots{} should be nonnegative integers less than the rank of @var{array}. @var{enclose-array} returns an array @@ -4015,7 +3828,6 @@ Returns a list of inclusive bounds of integers. @end example @end deffn -@c docstring begin (texi-doc-string "guile" "array-dimensions") @deffn primitive array-dimensions ra @code{Array-dimensions} is similar to @code{array-shape} but replaces elements with a @code{0} minimum with one greater than the maximum. So: @@ -4024,20 +3836,16 @@ elements with a @code{0} minimum with one greater than the maximum. So: @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "array-rank") @deffn primitive array-rank ra Return the number of dimensions of @var{obj}. If @var{obj} is not an array, @code{0} is returned. @end deffn -@c docstring begin (texi-doc-string "guile" "array->list") @deffn primitive array->list v Return a list consisting of all the elements, in order, of @var{array}. @end deffn -@c docstring begin (texi-doc-string "guile" "array-copy!") -@c docstring begin (texi-doc-string "guile" "array-copy-in-order!") @deffn primitive array-copy! src dst @deffnx primitive array-copy-in-order! src dst Copies every element from vector or array @var{source} to the @@ -4046,7 +3854,6 @@ the same rank as @var{source}, and be at least as large in each dimension. The order is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "array-fill!") @deffn primitive array-fill! ra fill Stores @var{fill} in every element of @var{array}. The value returned is unspecified. @@ -4061,7 +3868,6 @@ same type, and have corresponding elements which are either @var{array-equal?} but not @var{equal?} to a vector or uniform vector. @end deffn -@c docstring begin (texi-doc-string "guile" "array-contents") @deffn primitive array-contents ra [strict] @deffnx primitive array-contents array strict If @var{array} may be @dfn{unrolled} into a one dimensional shared array @@ -4079,8 +3885,6 @@ memory. @node Array Mapping @subsection Array Mapping -@c docstring begin (texi-doc-string "guile" "array-map!") -@c docstring begin (texi-doc-string "guile" "array-map-in-order!") @deffn primitive array-map! ra0 proc . lra @deffnx primitive array-map-in-order! ra0 proc . lra @var{array1}, @dots{} must have the same number of dimensions as @@ -4091,13 +3895,11 @@ as the corresponding element in @var{array0}. The value returned is unspecified. The order of application is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "array-for-each") @deffn primitive array-for-each proc ra0 . lra @var{proc} is applied to each tuple of elements of @var{array0} @dots{} in row-major order. The value returned is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "array-index-map!") @deffn primitive array-index-map! ra proc applies @var{proc} to the indices of each element of @var{array} in turn, storing the result in the corresponding element. The value @@ -4175,7 +3977,6 @@ except that a single character from the above table is put between @code{#} and @code{(}. For example, a uniform vector of signed long integers is displayed in the form @code{'#e(3 5 9)}. -@c docstring begin (texi-doc-string "guile" "array?") @deffn primitive array? v [prot] Returns @code{#t} if the @var{obj} is an array, and @code{#f} if not. @@ -4189,14 +3990,12 @@ Creates and returns a uniform array of type corresponding to and fills it with @var{prototype}. @end deffn -@c docstring begin (texi-doc-string "guile" "array-prototype") @deffn primitive array-prototype ra Return an object that would produce an array of the same type as @var{array}, if used as the @var{prototype} for @code{make-uniform-array}. @end deffn -@c docstring begin (texi-doc-string "guile" "list->uniform-array") @deffn primitive list->uniform-array ndim prot lst @deffnx procedure list->uniform-vector prot lst Return a uniform array of the type indicated by prototype @@ -4210,12 +4009,10 @@ Stores @var{fill} in every element of @var{uve}. The value returned is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "uniform-vector-length") @deffn primitive uniform-vector-length v Return the number of elements in @var{uve}. @end deffn -@c docstring begin (texi-doc-string "guile" "dimensions->uniform-array") @deffn primitive dimensions->uniform-array dims prot [fill] @deffnx primitive make-uniform-vector length prototype [fill] Create and return a uniform array or vector of type @@ -4226,7 +4023,6 @@ fill the array, otherwise @var{prototype} is used. @c Another compiled-closure. -twp -@c docstring begin (texi-doc-string "guile" "uniform-array-read!") @deffn primitive uniform-array-read! ra [port_or_fd [start [end]]] @deffnx primitive uniform-vector-read! uve [port-or-fdes] [start] [end] Attempts to read all elements of @var{ura}, in lexicographic order, as @@ -4245,7 +4041,6 @@ leaving the remainder of the vector unchanged. returned by @code{(current-input-port)}. @end deffn -@c docstring begin (texi-doc-string "guile" "uniform-array-write") @deffn primitive uniform-array-write v [port_or_fd [start [end]]] @deffnx primitive uniform-vector-write uve [port-or-fdes] [start] [end] Writes all elements of @var{ura} as binary objects to @@ -4280,25 +4075,21 @@ They are displayed as a sequence of @code{0}s and #*101 @end example -@c docstring begin (texi-doc-string "guile" "bit-count") @deffn primitive bit-count b bitvector Return the number of occurrences of the boolean @var{b} in @var{bitvector}. @end deffn -@c docstring begin (texi-doc-string "guile" "bit-position") @deffn primitive bit-position item v k Return the minimum index of an occurrence of @var{bool} in @var{bv} which is at least @var{k}. If no @var{bool} occurs within the specified range @code{#f} is returned. @end deffn -@c docstring begin (texi-doc-string "guile" "bit-invert!") @deffn primitive bit-invert! v Modifies @var{bv} by replacing each element with its negation. @end deffn -@c docstring begin (texi-doc-string "guile" "bit-set*!") @deffn primitive bit-set*! v kv obj If uve is a bit-vector @var{bv} and uve must be of the same length. If @var{bool} is @code{#t}, uve is OR'ed into @@ -4311,7 +4102,6 @@ of @var{bv} corresponding to the indexes in uve are set to @var{bool}. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "bit-count*") @deffn primitive bit-count* v kv obj Return @lisp @@ -4538,7 +4328,6 @@ independent from the list that results from modification by use @code{list-copy} to copy the old association list before modifying it. -@c docstring begin (texi-doc-string "guile" "acons") @deffn primitive acons key value alist Adds a new key-value pair to @var{alist}. A new pair is created whose car is @var{key} and whose cdr is @var{value}, and the @@ -4546,9 +4335,6 @@ pair is consed onto @var{alist}, and the new list is returned. This function is @emph{not} destructive; @var{alist} is not modified. @end deffn -@c docstring begin (texi-doc-string "guile" "assq-set!") -@c docstring begin (texi-doc-string "guile" "assv-set!") -@c docstring begin (texi-doc-string "guile" "assoc-set!") @deffn primitive assq-set! alist key val @deffnx primitive assv-set! alist key value @deffnx primitive assoc-set! alist key value @@ -4574,9 +4360,6 @@ arguments and return the entry for that key if an entry exists, or where an entry exists, these procedures return the complete entry, that is @code{(KEY . VALUE)}, not just the value. -@c docstring begin (texi-doc-string "guile" "assq") -@c docstring begin (texi-doc-string "guile" "assv") -@c docstring begin (texi-doc-string "guile" "assoc") @deffn primitive assq key alist @deffnx primitive assv key alist @deffnx primitive assoc key alist @@ -4601,9 +4384,6 @@ Consequently, @code{assq-ref} and friends should only be used where it is known that an entry exists, or where the ambiguity doesn't matter for some other reason. -@c docstring begin (texi-doc-string "guile" "assq-ref") -@c docstring begin (texi-doc-string "guile" "assv-ref") -@c docstring begin (texi-doc-string "guile" "assoc-ref") @deffn primitive assq-ref alist key @deffnx primitive assv-ref alist key @deffnx primitive assoc-ref alist key @@ -4677,9 +4457,6 @@ two distinct entries to @code{address-list}. When compared using after removing the first matching entry that it finds, and so one of the "mary" entries is left in place. -@c docstring begin (texi-doc-string "guile" "assq-remove!") -@c docstring begin (texi-doc-string "guile" "assv-remove!") -@c docstring begin (texi-doc-string "guile" "assoc-remove!") @deffn primitive assq-remove! alist key @deffnx primitive assv-remove! alist key @deffnx primitive assoc-remove! alist key @@ -4732,19 +4509,16 @@ it is much safer to use the non-@code{sloppy-} procedures, because they help to highlight coding and data errors that the @code{sloppy-} versions would silently cover up. -@c docstring begin (texi-doc-string "guile" "sloppy-assq") @deffn primitive sloppy-assq key alist Behaves like @code{assq} but does not do any error checking. Recommended only for use in Guile internals. @end deffn -@c docstring begin (texi-doc-string "guile" "sloppy-assv") @deffn primitive sloppy-assv key alist Behaves like @code{assv} but does not do any error checking. Recommended only for use in Guile internals. @end deffn -@c docstring begin (texi-doc-string "guile" "sloppy-assoc") @deffn primitive sloppy-assoc key alist Behaves like @code{assoc} but does not do any error checking. Recommended only for use in Guile internals. @@ -4804,7 +4578,6 @@ In each of the functions that follow, the @var{table} argument must be a vector. The @var{key} and @var{value} arguments may be any Scheme object. -@c docstring begin (texi-doc-string "guile" "hashq-ref") @deffn primitive hashq-ref table key [dflt] Look up @var{key} in the hash table @var{table}, and return the value (if any) associated with it. If @var{key} is not found, @@ -4812,7 +4585,6 @@ return @var{default} (or @code{#f} if no @var{default} argument is supplied). Uses @code{eq?} for equality testing. @end deffn -@c docstring begin (texi-doc-string "guile" "hashv-ref") @deffn primitive hashv-ref table key [dflt] Look up @var{key} in the hash table @var{table}, and return the value (if any) associated with it. If @var{key} is not found, @@ -4820,7 +4592,6 @@ return @var{default} (or @code{#f} if no @var{default} argument is supplied). Uses @code{eqv?} for equality testing. @end deffn -@c docstring begin (texi-doc-string "guile" "hash-ref") @deffn primitive hash-ref table key [dflt] Look up @var{key} in the hash table @var{table}, and return the value (if any) associated with it. If @var{key} is not found, @@ -4828,38 +4599,32 @@ return @var{default} (or @code{#f} if no @var{default} argument is supplied). Uses @code{equal?} for equality testing. @end deffn -@c docstring begin (texi-doc-string "guile" "hashq-set!") @deffn primitive hashq-set! table key val Find the entry in @var{table} associated with @var{key}, and store @var{value} there. Uses @code{eq?} for equality testing. @end deffn -@c docstring begin (texi-doc-string "guile" "hashv-set!") @deffn primitive hashv-set! table key val Find the entry in @var{table} associated with @var{key}, and store @var{value} there. Uses @code{eqv?} for equality testing. @end deffn -@c docstring begin (texi-doc-string "guile" "hash-set!") @deffn primitive hash-set! table key val Find the entry in @var{table} associated with @var{key}, and store @var{value} there. Uses @code{equal?} for equality testing. @end deffn -@c docstring begin (texi-doc-string "guile" "hashq-remove!") @deffn primitive hashq-remove! table key Remove @var{key} (and any value associated with it) from @var{table}. Uses @code{eq?} for equality tests. @end deffn -@c docstring begin (texi-doc-string "guile" "hashv-remove!") @deffn primitive hashv-remove! table key Remove @var{key} (and any value associated with it) from @var{table}. Uses @code{eqv?} for equality tests. @end deffn -@c docstring begin (texi-doc-string "guile" "hash-remove!") @deffn primitive hash-remove! table key Remove @var{key} (and any value associated with it) from @var{table}. Uses @code{equal?} for equality tests. @@ -4880,7 +4645,6 @@ use comfortably. If you are interested in learning more, see an introductory textbook on data structures or algorithms for an explanation of how hash tables are implemented. -@c docstring begin (texi-doc-string "guile" "hashq") @deffn primitive hashq key size Determine a hash value for @var{key} that is suitable for lookups in a hashtable of size @var{size}, where @code{eq?} is @@ -4894,7 +4658,6 @@ in between. This can happen, for example with symbols: different values, since @code{foo} will be garbage collected. @end deffn -@c docstring begin (texi-doc-string "guile" "hashv") @deffn primitive hashv key size Determine a hash value for @var{key} that is suitable for lookups in a hashtable of size @var{size}, where @code{eqv?} is @@ -4908,7 +4671,6 @@ in between. This can happen, for example with symbols: different values, since @code{foo} will be garbage collected. @end deffn -@c docstring begin (texi-doc-string "guile" "hash") @deffn primitive hash key size Determine a hash value for @var{key} that is suitable for lookups in a hashtable of size @var{size}, where @code{equal?} @@ -4916,7 +4678,6 @@ is used as the equality predicate. The function returns an integer in the range 0 to @var{size} - 1. @end deffn -@c docstring begin (texi-doc-string "guile" "hashx-ref") @deffn primitive hashx-ref hash assoc table key [dflt] This behaves the same way as the corresponding @code{ref} function, but uses @var{hash} as a hash function and @@ -4928,7 +4689,6 @@ By way of illustration, @code{hashq-ref table key} is equivalent to @code{hashx-ref hashq assq table key}. @end deffn -@c docstring begin (texi-doc-string "guile" "hashx-set!") @deffn primitive hashx-set! hash assoc table key val This behaves the same way as the corresponding @code{set!} function, but uses @var{hash} as a hash function and @@ -4940,7 +4700,6 @@ that takes two arguments, a key to be hashed and a table size. equivalent to @code{hashx-set! hashq assq table key}. @end deffn -@c docstring begin (texi-doc-string "guile" "hashq-get-handle") @deffn primitive hashq-get-handle table key This procedure returns the @code{(key . value)} pair from the hash table @var{table}. If @var{table} does not hold an @@ -4948,7 +4707,6 @@ associated value for @var{key}, @code{#f} is returned. Uses @code{eq?} for equality testing. @end deffn -@c docstring begin (texi-doc-string "guile" "hashv-get-handle") @deffn primitive hashv-get-handle table key This procedure returns the @code{(key . value)} pair from the hash table @var{table}. If @var{table} does not hold an @@ -4956,7 +4714,6 @@ associated value for @var{key}, @code{#f} is returned. Uses @code{eqv?} for equality testing. @end deffn -@c docstring begin (texi-doc-string "guile" "hash-get-handle") @deffn primitive hash-get-handle table key This procedure returns the @code{(key . value)} pair from the hash table @var{table}. If @var{table} does not hold an @@ -4964,7 +4721,6 @@ associated value for @var{key}, @code{#f} is returned. Uses @code{equal?} for equality testing. @end deffn -@c docstring begin (texi-doc-string "guile" "hashx-get-handle") @deffn primitive hashx-get-handle hash assoc table key This behaves the same way as the corresponding @code{-get-handle} function, but uses @var{hash} as a hash @@ -4974,28 +4730,24 @@ table size. @code{assoc} must be an associator function, like @code{assoc}, @code{assq} or @code{assv}. @end deffn -@c docstring begin (texi-doc-string "guile" "hashq-create-handle!") @deffn primitive hashq-create-handle! table key init This function looks up @var{key} in @var{table} and returns its handle. If @var{key} is not already present, a new handle is created which associates @var{key} with @var{init}. @end deffn -@c docstring begin (texi-doc-string "guile" "hashv-create-handle!") @deffn primitive hashv-create-handle! table key init This function looks up @var{key} in @var{table} and returns its handle. If @var{key} is not already present, a new handle is created which associates @var{key} with @var{init}. @end deffn -@c docstring begin (texi-doc-string "guile" "hash-create-handle!") @deffn primitive hash-create-handle! table key init This function looks up @var{key} in @var{table} and returns its handle. If @var{key} is not already present, a new handle is created which associates @var{key} with @var{init}. @end deffn -@c docstring begin (texi-doc-string "guile" "hashx-create-handle!") @deffn primitive hashx-create-handle! hash assoc table key init This behaves the same way as the corresponding @code{-create-handle} function, but uses @var{hash} as a hash @@ -5005,7 +4757,6 @@ table size. @code{assoc} must be an associator function, like @code{assoc}, @code{assq} or @code{assv}. @end deffn -@c docstring begin (texi-doc-string "guile" "hash-fold") @deffn primitive hash-fold proc init table An iterator over hash-table elements. Accumulates and returns a result by applying PROC successively. @@ -5057,7 +4808,6 @@ number in hexidecimal notation. @subsection Vector Predicates @rnindex vector? -@c docstring begin (texi-doc-string "guile" "vector?") @deffn primitive vector? obj Return @code{#t} if @var{obj} is a vector, otherwise return @code{#f}. @@ -5066,7 +4816,6 @@ Return @code{#t} if @var{obj} is a vector, otherwise return @subsection Vector Constructors @rnindex make-vector -@c docstring begin (texi-doc-string "guile" "make-vector") @deffn primitive make-vector k [fill] Return a newly allocated vector of @var{k} elements. If a second argument is given, then each element is initialized to @@ -5076,8 +4825,6 @@ unspecified. @rnindex vector @rnindex list->vector -@c docstring begin (texi-doc-string "guile" "vector") -@c docstring begin (texi-doc-string "guile" "list->vector") @deffn primitive vector . l @deffnx primitive list->vector l Return a newly allocated vector whose elements contain the @@ -5088,7 +4835,6 @@ given arguments. Analogous to @code{list}. @end deffn @rnindex vector->list -@c docstring begin (texi-doc-string "guile" "vector->list") @deffn primitive vector->list v Return a newly allocated list of the objects contained in the elements of @var{vector}. @@ -5121,18 +4867,15 @@ The value returned by @samp{vector-set!} is unspecified. @end deffn @rnindex vector-fill! -@c docstring begin (texi-doc-string "guile" "vector-fill!") @deffn primitive vector-fill! v fill Store @var{fill} in every element of @var{vector}. The value returned by @code{vector-fill!} is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "vector-move-left!") @deffn primitive vector-move-left! vec1 start1 end1 vec2 start2 Vector version of @code{substring-move-left!}. @end deffn -@c docstring begin (texi-doc-string "guile" "vector-move-right!") @deffn primitive vector-move-right! vec1 start1 end1 vec2 start2 Vector version of @code{substring-move-right!}. @end deffn @@ -5252,55 +4995,46 @@ are always called from first to last when they are invoked via When calling @code{hook->list}, the procedures in the resulting list are in the same order as they would have been called by @code{run-hook}. -@c docstring begin (texi-doc-string "guile" "make-hook-with-name") @deffn primitive make-hook-with-name name [n_args] Create a named hook with the name @var{name} for storing procedures of arity @var{n_args}. @var{n_args} defaults to zero. @end deffn -@c docstring begin (texi-doc-string "guile" "make-hook") @deffn primitive make-hook [n_args] Create a hook for storing procedure of arity @var{n_args}. @var{n_args} defaults to zero. @end deffn -@c docstring begin (texi-doc-string "guile" "hook?") @deffn primitive hook? x Return @code{#t} if @var{x} is a hook, @code{#f} otherwise. @end deffn -@c docstring begin (texi-doc-string "guile" "hook-empty?") @deffn primitive hook-empty? hook Return @code{#t} if @var{hook} is an empty hook, @code{#f} otherwise. @end deffn -@c docstring begin (texi-doc-string "guile" "add-hook!") @deffn primitive add-hook! hook proc [append_p] Add the procedure @var{proc} to the hook @var{hook}. The procedure is added to the end if @var{append_p} is true, otherwise it is added to the front. @end deffn -@c docstring begin (texi-doc-string "guile" "remove-hook!") @deffn primitive remove-hook! hook proc Remove the procedure @var{proc} from the hook @var{hook}. @end deffn -@c docstring begin (texi-doc-string "guile" "reset-hook!") @deffn primitive reset-hook! hook Remove all procedures from the hook @var{hook}. @end deffn -@c docstring begin (texi-doc-string "guile" "run-hook") @deffn primitive run-hook hook . args Apply all procedures from the hook @var{hook} to the arguments @var{args}. The order of the procedure application is first to last. @end deffn -@c docstring begin (texi-doc-string "guile" "hook->list") @deffn primitive hook->list hook Convert the procedure list of @var{hook} to a list. @end deffn diff --git a/doc/scheme-debug.texi b/doc/scheme-debug.texi index da7d599cf..d8876cba8 100644 --- a/doc/scheme-debug.texi +++ b/doc/scheme-debug.texi @@ -6,7 +6,6 @@ from the appendix describing the debugger UI. The intro should have a pointer to the UI appendix. -@c docstring begin (texi-doc-string "guile" "display-error") @deffn primitive display-error stack port subr message args rest Display an error message to the output port @var{port}. @var{stack} is the saved stack for the error, @var{subr} is @@ -17,14 +16,12 @@ the list @var{args} accordingly. @var{rest} is currently ignored. @end deffn -@c docstring begin (texi-doc-string "guile" "display-application") @deffn primitive display-application frame [port [indent]] Display a procedure application @var{frame} to the output port @var{port}. @var{indent} specifies the indentation of the output. @end deffn -@c docstring begin (texi-doc-string "guile" "display-backtrace") @deffn primitive display-backtrace stack port [first [depth]] Display a backtrace to the output port @var{port}. @var{stack} is the stack to take the backtrace from, @var{first} specifies @@ -33,13 +30,11 @@ to display. Both @var{first} and @var{depth} can be @code{#f}, which means that default values will be used. @end deffn -@c docstring begin (texi-doc-string "guile" "backtrace") @deffn primitive backtrace Display a backtrace of the stack saved by the last error to the current output port. @end deffn -@c docstring begin (texi-doc-string "guile" "malloc-stats") @deffn primitive malloc-stats Return an alist ((@var{what} . @var{n}) ...) describing number of malloced objects. @@ -48,119 +43,97 @@ of malloced objects. allocated. @end deffn -@c docstring begin (texi-doc-string "guile" "debug-options-interface") @deffn primitive debug-options-interface [setting] Option interface for the debug options. Instead of using this procedure directly, use the procedures @code{debug-enable}, @code{debug-disable}, @code{debug-set!} and @var{debug-options}. @end deffn -@c docstring begin (texi-doc-string "guile" "with-traps") @deffn primitive with-traps thunk Call @var{thunk} with traps enabled. @end deffn -@c docstring begin (texi-doc-string "guile" "memoized?") @deffn primitive memoized? obj Return @code{#t} if @var{obj} is memoized. @end deffn -@c docstring begin (texi-doc-string "guile" "unmemoize") @deffn primitive unmemoize m Unmemoize the memoized expression @var{m}, @end deffn -@c docstring begin (texi-doc-string "guile" "memoized-environment") @deffn primitive memoized-environment m Return the environment of the memoized expression @var{m}. @end deffn -@c docstring begin (texi-doc-string "guile" "procedure-name") @deffn primitive procedure-name proc Return the name of the procedure @var{proc} @end deffn -@c docstring begin (texi-doc-string "guile" "procedure-source") @deffn primitive procedure-source proc Return the source of the procedure @var{proc}. @end deffn -@c docstring begin (texi-doc-string "guile" "procedure-environment") @deffn primitive procedure-environment proc Return the environment of the procedure @var{proc}. @end deffn -@c docstring begin (texi-doc-string "guile" "debug-object?") @deffn primitive debug-object? obj Return @code{#t} if @var{obj} is a debug object. @end deffn -@c docstring begin (texi-doc-string "guile" "frame-arguments") @deffn primitive frame-arguments frame Return the arguments of @var{frame}. @end deffn -@c docstring begin (texi-doc-string "guile" "frame-evaluating-args?") @deffn primitive frame-evaluating-args? frame Return @code{#t} if @var{frame} contains evaluated arguments. @end deffn -@c docstring begin (texi-doc-string "guile" "frame-next") @deffn primitive frame-next frame Return the next frame of @var{frame}, or @code{#f} if @var{frame} is the last frame in its stack. @end deffn -@c docstring begin (texi-doc-string "guile" "frame-number") @deffn primitive frame-number frame Return the frame number of @var{frame}. @end deffn -@c docstring begin (texi-doc-string "guile" "frame-overflow?") @deffn primitive frame-overflow? frame Return @code{#t} if @var{frame} is an overflow frame. @end deffn -@c docstring begin (texi-doc-string "guile" "frame-previous") @deffn primitive frame-previous frame Return the previous frame of @var{frame}, or @code{#f} if @var{frame} is the first frame in its stack. @end deffn -@c docstring begin (texi-doc-string "guile" "frame-procedure") @deffn primitive frame-procedure frame Return the procedure for @var{frame}, or @code{#f} if no procedure is associated with @var{frame}. @end deffn -@c docstring begin (texi-doc-string "guile" "frame-procedure?") @deffn primitive frame-procedure? frame Return @code{#t} if a procedure is associated with @var{frame}. @end deffn -@c docstring begin (texi-doc-string "guile" "frame-real?") @deffn primitive frame-real? frame Return @code{#t} if @var{frame} is a real frame. @end deffn -@c docstring begin (texi-doc-string "guile" "frame-source") @deffn primitive frame-source frame Return the source of @var{frame}. @end deffn -@c docstring begin (texi-doc-string "guile" "frame?") @deffn primitive frame? obj Return @code{#t} if @var{obj} is a stack frame. @end deffn -@c docstring begin (texi-doc-string "guile" "last-stack-frame") @deffn primitive last-stack-frame obj Return a stack which consists of a single frame, which is the last stack frame for @var{obj}. @var{obj} must be either a debug object or a continuation. @end deffn -@c docstring begin (texi-doc-string "guile" "make-stack") @deffn primitive make-stack obj . args Create a new stack. If @var{obj} is @code{#t}, the current evaluation stack is used for creating the stack frames, @@ -170,22 +143,18 @@ either a debug object or a continuation). resulting stack will be narrowed. @end deffn -@c docstring begin (texi-doc-string "guile" "stack-id") @deffn primitive stack-id stack Return the identifier given to @var{stack} by @code{start-stack}. @end deffn -@c docstring begin (texi-doc-string "guile" "stack-length") @deffn primitive stack-length stack Return the length of @var{stack}. @end deffn -@c docstring begin (texi-doc-string "guile" "stack-ref") @deffn primitive stack-ref stack i Return the @var{i}'th frame from @var{stack}. @end deffn -@c docstring begin (texi-doc-string "guile" "stack?") @deffn primitive stack? obj Return @code{#t} if @var{obj} is a calling stack. @end deffn diff --git a/doc/scheme-evaluation.texi b/doc/scheme-evaluation.texi index 4472645a8..55079d5a2 100644 --- a/doc/scheme-evaluation.texi +++ b/doc/scheme-evaluation.texi @@ -52,7 +52,6 @@ loading and evaluating Scheme code at run time. @node Reader Extensions @subsection Reader Extensions -@c docstring begin (texi-doc-string "guile" "read-hash-extend") @deffn primitive read-hash-extend chr proc Install the procedure @var{proc} for reading expressions starting with the character sequence @code{#} and @var{chr}. @@ -66,7 +65,6 @@ returned will be the return value of @code{read}. @section Reading Scheme Code @rnindex read -@c docstring begin (texi-doc-string "guile" "read") @deffn primitive read [port] Read an s-expression from the input port @var{port}, or from the current input port if @var{port} is not specified. @@ -101,7 +99,6 @@ options and switches them on, @code{read-disable} switches them off. @code{read-set!} can be used to set an option to a specific value. @end deffn -@c docstring begin (texi-doc-string "guile" "read-options-interface") @deffn primitive read-options-interface [setting] Option interface for the read options. Instead of using this procedure directly, use the procedures @code{read-enable}, @@ -114,14 +111,12 @@ this procedure directly, use the procedures @code{read-enable}, @rnindex eval @c ARGFIXME environment/environment specifier -@c docstring begin (texi-doc-string "guile" "eval") @deffn primitive eval exp environment Evaluate @var{exp}, a list representing a Scheme expression, in the environment given by @var{environment specifier}. @end deffn @rnindex interaction-environment -@c docstring begin (texi-doc-string "guile" "interaction-environment") @deffn primitive interaction-environment Return a specifier for the environment that contains implementation--defined bindings, typically a superset of those @@ -130,7 +125,6 @@ return the environment in which the implementation would evaluate expressions dynamically typed by the user. @end deffn -@c docstring begin (texi-doc-string "guile" "eval-string") @deffn primitive eval-string string Evaluate @var{string} as the text representation of a Scheme form or forms, and return whatever value they produce. @@ -138,7 +132,6 @@ Evaluation takes place in the environment returned by the procedure @code{interaction-environment}. @end deffn -@c docstring begin (texi-doc-string "guile" "apply:nconc2last") @deffn primitive apply:nconc2last lst Given a list (@var{arg1} @dots{} @var{args}), this function conses the @var{arg1} @dots{} arguments onto the front of @@ -189,7 +182,6 @@ any code is loaded. See documentation for @code{%load-hook} later in this section. @end deffn -@c docstring begin (texi-doc-string "guile" "primitive-load") @deffn primitive primitive-load filename Load the file named @var{filename} and evaluate its contents in the top-level environment. The load paths are not searched; @@ -200,7 +192,6 @@ that will be called before any code is loaded. See the documentation for @code{%load-hook} later in this section. @end deffn -@c docstring begin (texi-doc-string "guile" "primitive-load-path") @deffn primitive primitive-load-path filename Search @var{%load-path} for the file named @var{filename} and load it into the top-level environment. If @var{filename} is a @@ -208,7 +199,6 @@ relative pathname and is not found in the list of search paths, an error is signalled. @end deffn -@c docstring begin (texi-doc-string "guile" "%search-load-path") @deffn primitive %search-load-path filename Search @var{%load-path} for the file named @var{filename}, which must be readable by the current user. If @var{filename} @@ -235,7 +225,6 @@ was passed to @code{primitive-load}. @end defvar -@c docstring begin (texi-doc-string "guile" "current-load-port") @deffn primitive current-load-port Return the current-load-port. The load port is used internally by @code{primitive-load}. @@ -254,14 +243,12 @@ list @code{("" ".scm")}. [delay] -@c docstring begin (texi-doc-string "guile" "promise?") @deffn primitive promise? obj Return true if @var{obj} is a promise, i.e. a delayed computation (@pxref{Delayed evaluation,,,r4rs.info,The Revised^4 Report on Scheme}). @end deffn @rnindex force -@c docstring begin (texi-doc-string "guile" "force") @deffn primitive force x If the promise @var{x} has not been computed yet, compute and return @var{x}, otherwise just return the previously computed @@ -274,7 +261,6 @@ value. [the-environment] -@c docstring begin (texi-doc-string "guile" "local-eval") @deffn primitive local-eval exp [env] Evaluate @var{exp} in its environment. If @var{env} is supplied, it is the environment in which to evaluate @var{exp}. Otherwise, @@ -318,7 +304,6 @@ options and switches them on, @code{eval-disable} switches them off. @code{eval-set!} can be used to set an option to a specific value. @end deffn -@c docstring begin (texi-doc-string "guile" "eval-options-interface") @deffn primitive eval-options-interface [setting] Option interface for the evaluation options. Instead of using this procedure directly, use the procedures @code{eval-enable}, @@ -349,7 +334,6 @@ options and switches them on, @code{trap-disable} switches them off. @code{trap-set!} can be used to set an option to a specific value. @end deffn -@c docstring begin (texi-doc-string "guile" "evaluator-traps-interface") @deffn primitive evaluator-traps-interface [setting] Option interface for the evaluator trap options. @end deffn diff --git a/doc/scheme-io.texi b/doc/scheme-io.texi index 1a28badff..547ee9816 100644 --- a/doc/scheme-io.texi +++ b/doc/scheme-io.texi @@ -33,7 +33,6 @@ that simulate ports in software. @dfn{Soft ports} and @dfn{string ports} are two interesting and powerful examples of this technique. @rnindex input-port? -@c docstring begin (texi-doc-string "guile" "input-port?") @deffn primitive input-port? x Return @code{#t} if @var{x} is an input port, otherwise return @code{#f}. Any object satisfying this predicate also satisfies @@ -41,14 +40,12 @@ Return @code{#t} if @var{x} is an input port, otherwise return @end deffn @rnindex output-port? -@c docstring begin (texi-doc-string "guile" "output-port?") @deffn primitive output-port? x Return @code{#t} if @var{x} is an output port, otherwise return @code{#f}. Any object satisfying this predicate also satisfies @code{port?}. @end deffn -@c docstring begin (texi-doc-string "guile" "port?") @deffn primitive port? x Return a boolean indicating whether @var{x} is a port. Equivalent to @code{(or (input-port? @var{x}) (output-port? @@ -62,14 +59,12 @@ Equivalent to @code{(or (input-port? @var{x}) (output-port? [Generic procedures for reading from ports.] @rnindex eof-object? -@c docstring begin (texi-doc-string "guile" "eof-object?") @deffn primitive eof-object? x Return @code{#t} if @var{x} is an end-of-file object; otherwise return @code{#f}. @end deffn @rnindex char-ready? -@c docstring begin (texi-doc-string "guile" "char-ready?") @deffn primitive char-ready? [port] Return @code{#t} if a character is ready on input @var{port} and return @code{#f} otherwise. If @code{char-ready?} returns @@ -87,7 +82,6 @@ interactive port that has no ready characters.} @end deffn @rnindex read-char? -@c docstring begin (texi-doc-string "guile" "read-char") @deffn primitive read-char [port] Return the next character available from @var{port}, updating @var{port} to point to the following character. If no more @@ -95,7 +89,6 @@ characters are available, the end-of-file object is returned. @end deffn @rnindex peek-char? -@c docstring begin (texi-doc-string "guile" "peek-char") @deffn primitive peek-char [port] Return the next character available from @var{port}, @emph{without} updating @var{port} to point to the following @@ -111,7 +104,6 @@ an interactive port will hang waiting for input whenever a call to @code{read-char} would have hung.} @end deffn -@c docstring begin (texi-doc-string "guile" "unread-char") @deffn primitive unread-char cobj 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 @@ -119,7 +111,6 @@ will be read again in last-in first-out order. If @var{port} is not supplied, the current input port is used. @end deffn -@c docstring begin (texi-doc-string "guile" "unread-string") @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 @@ -127,14 +118,11 @@ 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 -@c docstring begin (texi-doc-string "guile" "drain-input") @deffn primitive drain-input port Drain @var{port}'s read buffers (including any pushed-back characters) and return the content as a single string. @end deffn -@c docstring begin (texi-doc-string "guile" "port-column") -@c docstring begin (texi-doc-string "guile" "port-line") @deffn primitive port-column port @deffnx primitive port-line port Return the current column number or line number of @var{port}, @@ -147,8 +135,6 @@ because lines and column numbers traditionally start with 1, and that is what non-programmers will find most natural.) @end deffn -@c docstring begin (texi-doc-string "guile" "set-port-column!") -@c docstring begin (texi-doc-string "guile" "set-port-line!") @deffn primitive set-port-column! port column @deffnx primitive set-port-line! port line Set the current column or line number of @var{port}, using the @@ -195,25 +181,21 @@ end-of-file check [Generic procedures for writing to ports.] -@c docstring begin (texi-doc-string "guile" "get-print-state") @deffn primitive get-print-state port Return the print state of the port @var{port}. If @var{port} has no associated print state, @code{#f} is returned. @end deffn @rnindex newline -@c docstring begin (texi-doc-string "guile" "newline") @deffn primitive newline [port] Send a newline to @var{port}. @end deffn -@c docstring begin (texi-doc-string "guile" "port-with-print-state") @deffn primitive port-with-print-state port pstate Create a new port which behaves like @var{port}, but with an included print state @var{pstate}. @end deffn -@c docstring begin (texi-doc-string "guile" "print-options-interface") @deffn primitive print-options-interface [setting] Option interface for the print options. Instead of using this procedure directly, use the procedures @@ -221,7 +203,6 @@ this procedure directly, use the procedures and @code{print-options}. @end deffn -@c docstring begin (texi-doc-string "guile" "simple-format") @deffn primitive simple-format destination message . args Write @var{message} to @var{destination}, defaulting to the current output port. @@ -237,13 +218,11 @@ containing the formatted text. Does not add a trailing newline. @end deffn @rnindex write-char -@c docstring begin (texi-doc-string "guile" "write-char") @deffn primitive write-char chr [port] Send character @var{chr} to @var{port}. @end deffn @findex fflush -@c docstring begin (texi-doc-string "guile" "force-output") @deffn primitive force-output [port] Flush the specified output port, or the current output port if @var{port} is omitted. The current output buffer contents are passed to the @@ -254,7 +233,6 @@ It has no effect on an unbuffered port. The return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "flush-all-ports") @deffn primitive flush-all-ports Equivalent to calling @code{force-output} on all open output ports. The return value is unspecified. @@ -264,7 +242,6 @@ all open output ports. The return value is unspecified. @node Closing @section Closing -@c docstring begin (texi-doc-string "guile" "close-port") @deffn primitive close-port port Close the specified port object. Return @code{#t} if it successfully closes a port or @code{#f} if it was already @@ -275,7 +252,6 @@ descriptors. @end deffn @rnindex close-input-port -@c docstring begin (texi-doc-string "guile" "close-input-port") @deffn primitive close-input-port port Close the specified input port object. The routine has no effect if the file has already been closed. An exception may be raised if an @@ -286,7 +262,6 @@ which can close file descriptors. @end deffn @rnindex close-output-port -@c docstring begin (texi-doc-string "guile" "close-output-port") @deffn primitive close-output-port port Close the specified output port object. The routine has no effect if the file has already been closed. An exception may be raised if an @@ -296,7 +271,6 @@ See also @ref{Ports and File Descriptors, close}, for a procedure which can close file descriptors. @end deffn -@c docstring begin (texi-doc-string "guile" "port-closed?") @deffn primitive port-closed? port Return @code{#t} if @var{port} is closed or @code{#f} if it is open. @@ -306,7 +280,6 @@ open. @node Random Access @section Random Access -@c docstring begin (texi-doc-string "guile" "seek") @deffn primitive seek fd_port offset whence Sets the current position of @var{fd/port} to the integer @var{offset}, which is interpreted according to the value of @@ -331,13 +304,11 @@ that the current position of a port can be obtained using: @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "fseek") @deffn primitive fseek fd_port offset whence Obsolete. Almost the same as @code{seek}, but the return value is unspecified. @end deffn -@c docstring begin (texi-doc-string "guile" "ftell") @deffn primitive ftell fd_port Return an integer representing the current position of @var{fd/port}, measured from the beginning. Equivalent to: @@ -348,7 +319,6 @@ Return an integer representing the current position of @findex truncate @findex ftruncate -@c docstring begin (texi-doc-string "guile" "truncate-file") @deffn primitive truncate-file object [length] Truncates the object referred to by @var{object} to at most @var{length} bytes. @var{object} can be a string containing a @@ -435,7 +405,6 @@ NOTE: if the scsh module is loaded then @var{delims} must be an scsh char-set, not a string. @end deffn -@c docstring begin (texi-doc-string "guile" "write-line") @deffn primitive write-line obj [port] Display @var{obj} and a newline character to @var{port}. If @var{port} is not specified, @code{(current-output-port)} is @@ -450,7 +419,6 @@ Some of the abovementioned I/O functions rely on the following C primitives. These will mainly be of interest to people hacking Guile internals. -@c docstring begin (texi-doc-string "guile" "%read-delimited!") @deffn primitive %read-delimited! delims str gobble [port [start [end]]] Read characters from @var{port} into @var{str} until one of the characters in the @var{delims} string is encountered. If @@ -468,7 +436,6 @@ at the end of file, the delimiter returned is the a delimiter, this value is @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "%read-line") @deffn primitive %read-line [port] Read a newline-terminated line from @var{port}, allocating storage as necessary. The newline terminator (if any) is removed from the string, @@ -496,7 +463,6 @@ If omitted, @var{port} defaults to the current output port. @section Default Ports for Input, Output and Errors @rnindex current-input-port -@c docstring begin (texi-doc-string "guile" "current-input-port") @deffn primitive current-input-port Return the current input port. This is the default port used by many input procedures. Initially, @code{current-input-port} @@ -504,7 +470,6 @@ returns the @dfn{standard input} in Unix and C terminology. @end deffn @rnindex current-output-port -@c docstring begin (texi-doc-string "guile" "current-output-port") @deffn primitive current-output-port Return the current output port. This is the default port used by many output procedures. Initially, @@ -512,13 +477,11 @@ by many output procedures. Initially, Unix and C terminology. @end deffn -@c docstring begin (texi-doc-string "guile" "current-error-port") @deffn primitive current-error-port Return the port to which errors and warnings should be sent (the @dfn{standard error} in Unix and C terminology). @end deffn -@c docstring begin (texi-doc-string "guile" "set-current-input-port") @deffn primitive set-current-input-port port @deffnx primitive set-current-output-port port @deffnx primitive set-current-error-port port @@ -527,12 +490,10 @@ Change the ports returned by @code{current-input-port}, so that they use the supplied @var{port} for input or output. @end deffn -@c docstring begin (texi-doc-string "guile" "set-current-output-port") @deffn primitive set-current-output-port port Set the current default output port to PORT. @end deffn -@c docstring begin (texi-doc-string "guile" "set-current-error-port") @deffn primitive set-current-error-port port Set the current default error port to PORT. @end deffn @@ -558,7 +519,6 @@ The following procedures are used to open file ports. See also @ref{Ports and File Descriptors, open}, for an interface to the Unix @code{open} system call. -@c docstring begin (texi-doc-string "guile" "open-file") @deffn primitive open-file filename mode Open the file whose name is @var{filename}, and return a port representing that file. The attributes of the port are @@ -686,7 +646,6 @@ from the continuation of these procedures, their behavior is implementation dependent. @end deffn -@c docstring begin (texi-doc-string "guile" "port-mode") @deffn primitive port-mode port Returns the port modes associated with the open port @var{port}. These will not necessarily be identical to the modes used when the port was @@ -694,14 +653,12 @@ opened, since modes such as "append" which are used only during port creation are not retained. @end deffn -@c docstring begin (texi-doc-string "guile" "port-filename") @deffn primitive port-filename port Return the filename associated with @var{port}. This function returns the strings "standard input", "standard output" and "standard error" when called on the current input, output and error ports respectively. @end deffn -@c docstring begin (texi-doc-string "guile" "set-port-filename!") @deffn primitive set-port-filename! port filename Change the filename associated with @var{port}, using the current input port if none is specified. Note that this does not change the port's @@ -720,14 +677,12 @@ Determine whether @var{obj} is a port that is related to a file. The following allow string ports to be opened by analogy to R4R* file port facilities: -@c docstring begin (texi-doc-string "guile" "call-with-output-string") @deffn primitive call-with-output-string proc Calls the one-argument procedure @var{proc} with a newly created output port. When the function returns, the string composed of the characters written into the port is returned. @end deffn -@c docstring begin (texi-doc-string "guile" "call-with-input-string") @deffn primitive call-with-input-string string proc Calls the one-argument procedure @var{proc} with a newly created input port from which @var{string}'s contents may be @@ -748,7 +703,6 @@ port set temporarily to a string port opened on the specified @var{string}. The value yielded by @var{thunk} is returned. @end deffn -@c docstring begin (texi-doc-string "guile" "open-input-string") @deffn primitive open-input-string str Take a string and return an input port that delivers characters from the string. The port can be closed by @@ -756,7 +710,6 @@ from the string. The port can be closed by by the garbage collector if it becomes inaccessible. @end deffn -@c docstring begin (texi-doc-string "guile" "open-output-string") @deffn primitive open-output-string Return an output port that will accumulate characters for retrieval by @code{get-output-string}. The port can be closed @@ -765,7 +718,6 @@ will be reclaimed by the garbage collector if it becomes inaccessible. @end deffn -@c docstring begin (texi-doc-string "guile" "get-output-string") @deffn primitive get-output-string port Given an output port created by @code{open-output-string}, return a string consisting of the characters that have been @@ -784,7 +736,6 @@ but trying to extract the file descriptor number will fail. A @dfn{soft-port} is a port based on a vector of procedures capable of accepting or delivering characters. It allows emulation of I/O ports. -@c docstring begin (texi-doc-string "guile" "make-soft-port") @deffn primitive make-soft-port pv modes Return a port capable of receiving or delivering characters as specified by the @var{modes} string (@pxref{File Ports, @@ -831,7 +782,6 @@ For example: This kind of port causes any data to be discarded when written to, and always returns the end-of-file object when read from. -@c docstring begin (texi-doc-string "guile" "%make-void-port") @deffn primitive %make-void-port mode Create and return a new void port. A void port acts like /dev/null. The @var{mode} argument diff --git a/doc/scheme-memory.texi b/doc/scheme-memory.texi index 71b3f23e4..196ba5318 100644 --- a/doc/scheme-memory.texi +++ b/doc/scheme-memory.texi @@ -15,25 +15,21 @@ [FIXME: this is pasted in from Tom Lord's original guile.texi and should be reviewed] -@c docstring begin (texi-doc-string "guile" "gc") @deffn primitive gc Scans all of SCM objects and reclaims for further use those that are no longer accessible. @end deffn -@c docstring begin (texi-doc-string "guile" "gc-stats") @deffn primitive gc-stats Return an association list of statistics about Guile's current use of storage. @end deffn -@c docstring begin (texi-doc-string "guile" "object-address") @deffn primitive object-address obj Return an integer that for the lifetime of @var{obj} is uniquely returned by this function for @var{obj} @end deffn -@c docstring begin (texi-doc-string "guile" "unhash-name") @deffn primitive unhash-name name Flushes the glocs for @var{name}, or all glocs if @var{name} is @code{#t}. @@ -88,7 +84,6 @@ they constitute a doubly-weak table has to be used. @node Weak key hashes @subsection Weak key hashes -@c docstring begin (texi-doc-string "guile" "make-weak-key-hash-table") @deffn primitive make-weak-key-hash-table size @deffnx primitive make-weak-value-hash-table size @deffnx primitive make-doubly-weak-hash-table size @@ -99,7 +94,6 @@ You can modify weak hash tables in exactly the same way you would modify regular hash tables. (@pxref{Hash Tables}) @end deffn -@c docstring begin (texi-doc-string "guile" "weak-key-hash-table?") @deffn primitive weak-key-hash-table? obj @deffnx primitive weak-value-hash-table? obj @deffnx primitive doubly-weak-hash-table? obj @@ -108,19 +102,15 @@ table. Note that a doubly weak hash table is neither a weak key nor a weak value hash table. @end deffn -@c docstring begin (texi-doc-string "guile" "make-weak-value-hash-table") @deffn primitive make-weak-value-hash-table k @end deffn -@c docstring begin (texi-doc-string "guile" "weak-value-hash-table?") @deffn primitive weak-value-hash-table? x @end deffn -@c docstring begin (texi-doc-string "guile" "make-doubly-weak-hash-table") @deffn primitive make-doubly-weak-hash-table k @end deffn -@c docstring begin (texi-doc-string "guile" "doubly-weak-hash-table?") @deffn primitive doubly-weak-hash-table? x @end deffn @@ -131,7 +121,6 @@ nor a weak value hash table. Weak vectors are mainly useful in Guile's implementation of weak hash tables. -@c docstring begin (texi-doc-string "guile" "make-weak-vector") @deffn primitive make-weak-vector size [fill] Return a weak vector with @var{size} elements. If the optional argument @var{fill} is given, all entries in the vector will be @@ -139,8 +128,6 @@ set to @var{fill}. The default value for @var{fill} is the empty list. @end deffn -@c docstring begin (texi-doc-string "guile" "weak-vector") -@c docstring begin (texi-doc-string "guile" "list->weak-vector") @deffn primitive weak-vector . l @deffnx primitive list->weak-vector l Construct a weak vector from a list: @code{weak-vector} uses @@ -149,7 +136,6 @@ its only argument @var{l} (a list) to construct a weak vector the same way @code{list->vector} would. @end deffn -@c docstring begin (texi-doc-string "guile" "weak-vector?") @deffn primitive weak-vector? obj Return @code{#t} if @var{obj} is a weak vector. Note that all weak hashes are also weak vectors. @@ -159,7 +145,6 @@ weak hashes are also weak vectors. @node Guardians @section Guardians -@c docstring begin (texi-doc-string "guile" "make-guardian") @deffn primitive make-guardian [greedy?] Create a new guardian. A guardian protects a set of objects from garbage collection, @@ -207,29 +192,24 @@ Return @code{#t} if @var{guardian} has been destroyed, otherwise @code{#f}. @node Objects @chapter Objects -@c docstring begin (texi-doc-string "guile" "entity?") @deffn primitive entity? obj Return @code{#t} if @var{obj} is an entity. @end deffn -@c docstring begin (texi-doc-string "guile" "operator?") @deffn primitive operator? obj Return @code{#t} if @var{obj} is an operator. @end deffn -@c docstring begin (texi-doc-string "guile" "set-object-procedure!") @deffn primitive set-object-procedure! obj proc Return the object procedure of @var{obj} to @var{proc}. @var{obj} must be either an entity or an operator. @end deffn -@c docstring begin (texi-doc-string "guile" "make-class-object") @deffn primitive make-class-object metaclass layout Create a new class object of class @var{metaclass}, with the slot layout specified by @var{layout}. @end deffn -@c docstring begin (texi-doc-string "guile" "make-subclass-object") @deffn primitive make-subclass-object class layout Create a subclass object of @var{class}, with the slot layout specified by @var{layout}. diff --git a/doc/scheme-modules.texi b/doc/scheme-modules.texi index 3a2374329..a02229bfb 100644 --- a/doc/scheme-modules.texi +++ b/doc/scheme-modules.texi @@ -132,7 +132,6 @@ space use, and demonstrate how one would do Python's "from Tkinter import *" versus "import Tkinter". Must also add something about paths and standards for contributed modules.] -@c docstring begin (texi-doc-string "guile" "standard-eval-closure") @deffn primitive standard-eval-closure module Return an eval closure for the module @var{module}. @end deffn @@ -182,7 +181,6 @@ written properly. Guile's dynamic linking functions make it relatively easy to write a module that incorporates code from third-party object code libraries. -@c docstring begin (texi-doc-string "guile" "dynamic-link") @deffn primitive dynamic-link filename Open the dynamic library called @var{filename}. A library handle representing the opened library is returned; this handle @@ -190,13 +188,11 @@ should be used as the @var{dobj} argument to the following functions. @end deffn -@c docstring begin (texi-doc-string "guile" "dynamic-object?") @deffn primitive dynamic-object? obj Return @code{#t} if @var{obj} is a dynamic library handle, or @code{#f} otherwise. @end deffn -@c docstring begin (texi-doc-string "guile" "dynamic-unlink") @deffn primitive dynamic-unlink dobj Unlink the indicated object file from the application. The argument @var{dobj} must have been obtained by a call to @@ -204,7 +200,6 @@ argument @var{dobj} must have been obtained by a call to called on @var{dobj}, its content is no longer accessible. @end deffn -@c docstring begin (texi-doc-string "guile" "dynamic-func") @deffn primitive dynamic-func name dobj Search the dynamic object @var{dobj} for the C function indicated by the string @var{name} and return some Scheme @@ -217,7 +212,6 @@ underscore in @var{function}. Guile knows whether the underscore is needed or not and will add it when necessary. @end deffn -@c docstring begin (texi-doc-string "guile" "dynamic-call") @deffn primitive dynamic-call func dobj Call the C function indicated by @var{func} and @var{dobj}. The function is passed no arguments and its return value is @@ -233,7 +227,6 @@ Interrupts are deferred while the C function is executing (with @code{SCM_DEFER_INTS}/@code{SCM_ALLOW_INTS}). @end deffn -@c docstring begin (texi-doc-string "guile" "dynamic-args-call") @deffn primitive dynamic-args-call func dobj args Call the C function indicated by @var{func} and @var{dobj}, just like @code{dynamic-call}, but pass it some arguments and @@ -250,7 +243,6 @@ converted to a Scheme number and returned from the call to @code{dynamic-args-call}. @end deffn -@c docstring begin (texi-doc-string "guile" "c-registered-modules") @deffn primitive c-registered-modules Return a list of the object code modules that have been imported into the current Guile process. Each element of the list is a pair whose @@ -259,7 +251,6 @@ for that module's initializer function. The name is the string that has been passed to scm_register_module_xxx. @end deffn -@c docstring begin (texi-doc-string "guile" "c-clear-registered-modules") @deffn primitive c-clear-registered-modules Destroy the list of modules registered with the current Guile process. The return value is unspecified. @strong{Warning:} this function does diff --git a/doc/scheme-options.texi b/doc/scheme-options.texi index 439b8c452..472f4807c 100644 --- a/doc/scheme-options.texi +++ b/doc/scheme-options.texi @@ -275,9 +275,6 @@ It is often useful to have site-specific information about the current Guile installation. This chapter describes how to find out about Guile's configuration at run time. -@c docstring begin (texi-doc-string "guile" "version") -@c docstring begin (texi-doc-string "guile" "major-version") -@c docstring begin (texi-doc-string "guile" "minor-version") @deffn primitive version @deffnx primitive major-version @deffnx primitive minor-version @@ -299,26 +296,22 @@ interpreter and the ice-9 runtime have grown out of date with one another. @end deffn -@c docstring begin (texi-doc-string "guile" "%package-data-dir") @deffn primitive %package-data-dir Return the name of the directory where Scheme packages, modules and libraries are kept. On most Unix systems, this will be @samp{/usr/local/share/guile}. @end deffn -@c docstring begin (texi-doc-string "guile" "%library-dir") @deffn primitive %library-dir Return the directory where the Guile Scheme library files are installed. E.g., may return "/usr/share/guile/1.3.5". @end deffn -@c docstring begin (texi-doc-string "guile" "%site-dir") @deffn primitive %site-dir Return the directory where the Guile site files are installed. E.g., may return "/usr/share/guile/site". @end deffn -@c docstring begin (texi-doc-string "guile" "parse-path") @deffn primitive parse-path path [tail] Parse @var{path}, which is expected to be a colon-separated string, into a list and return the resulting list with @@ -326,7 +319,6 @@ string, into a list and return the resulting list with is returned. @end deffn -@c docstring begin (texi-doc-string "guile" "search-path") @deffn primitive search-path path filename [extensions] Search @var{path} for a directory containing a file named @var{filename}. The file must be readable, and not a directory. diff --git a/doc/scheme-procedures.texi b/doc/scheme-procedures.texi index e1cf83e1a..cbb405fde 100644 --- a/doc/scheme-procedures.texi +++ b/doc/scheme-procedures.texi @@ -22,28 +22,23 @@ @node Procedure Properties @section Procedure Properties and Metainformation -@c docstring begin (texi-doc-string "guile" "procedure-properties") @deffn primitive procedure-properties proc Return @var{obj}'s property list. @end deffn -@c docstring begin (texi-doc-string "guile" "procedure-property") @deffn primitive procedure-property p k Return the property of @var{obj} with name @var{key}. @end deffn -@c docstring begin (texi-doc-string "guile" "set-procedure-properties!") @deffn primitive set-procedure-properties! proc new_val Set @var{obj}'s property list to @var{alist}. @end deffn -@c docstring begin (texi-doc-string "guile" "set-procedure-property!") @deffn primitive set-procedure-property! p k v In @var{obj}'s property list, set the property named @var{key} to @var{value}. @end deffn -@c docstring begin (texi-doc-string "guile" "procedure-documentation") @deffn primitive procedure-documentation proc Return the documentation string associated with @code{proc}. By convention, if a procedure contains more than one expression and the @@ -51,40 +46,33 @@ first expression is a string constant, that string is assumed to contain documentation for that procedure. @end deffn -@c docstring begin (texi-doc-string "guile" "closure?") @deffn primitive closure? obj Return @code{#t} if @var{obj} is a closure. @end deffn @rnindex procedure? -@c docstring begin (texi-doc-string "guile" "procedure?") @deffn primitive procedure? obj Return @code{#t} if @var{obj} is a procedure. @end deffn -@c docstring begin (texi-doc-string "guile" "thunk?") @deffn primitive thunk? obj Return @code{#t} if @var{obj} is a thunk. @end deffn -@c docstring begin (texi-doc-string "guile" "set-source-properties!") @deffn primitive set-source-properties! obj plist Install the association list @var{plist} as the source property list for @var{obj}. @end deffn -@c docstring begin (texi-doc-string "guile" "set-source-property!") @deffn primitive set-source-property! obj key datum Set the source property of object @var{obj}, which is specified by @var{key} to @var{datum}. Normally, the key will be a symbol. @end deffn -@c docstring begin (texi-doc-string "guile" "source-properties") @deffn primitive source-properties obj Return the source property association list of @var{obj}. @end deffn -@c docstring begin (texi-doc-string "guile" "source-property") @deffn primitive source-property obj key Return the source property specified by @var{key} from @@ -95,25 +83,21 @@ Return the source property specified by @var{key} from @node Procedures with Setters @section Procedures with Setters -@c docstring begin (texi-doc-string "guile" "make-procedure-with-setter") @deffn primitive make-procedure-with-setter procedure setter Create a new procedure which behaves like @var{procedure}, but with the associated setter @var{setter}. @end deffn -@c docstring begin (texi-doc-string "guile" "procedure-with-setter?") @deffn primitive procedure-with-setter? obj Return @code{#t} if @var{obj} is a procedure with an associated setter procedure. @end deffn -@c docstring begin (texi-doc-string "guile" "procedure") @deffn primitive procedure proc Return the procedure of @var{proc}, which must be either a procedure with setter, or an operator struct. @end deffn -@c docstring begin (texi-doc-string "guile" "setter") @deffn primitive setter proc @end deffn @@ -126,7 +110,6 @@ macros and memoizing macros. Also, any definitions listed here should be double-checked by someone who knows what's going on. Ask Mikael, Jim or Aubrey for help. -twp] -@c docstring begin (texi-doc-string "guile" "procedure->syntax") @deffn primitive procedure->syntax code Return a @dfn{macro} which, when a symbol defined to this value appears as the first symbol in an expression, returns the @@ -134,7 +117,6 @@ result of applying @var{code} to the expression and the environment. @end deffn -@c docstring begin (texi-doc-string "guile" "procedure->macro") @deffn primitive procedure->macro code Return a @dfn{macro} which, when a symbol defined to this value appears as the first symbol in an expression, evaluates the @@ -151,7 +133,6 @@ passed to @var{code}. For example: @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "procedure->memoizing-macro") @deffn primitive procedure->memoizing-macro code Return a @dfn{macro} which, when a symbol defined to this value appears as the first symbol in an expression, evaluates the @@ -168,13 +149,11 @@ passed to @var{proc}. For example: @end lisp @end deffn -@c docstring begin (texi-doc-string "guile" "macro?") @deffn primitive macro? obj Return @code{#t} if @var{obj} is a regular macro, a memoizing macro or a syntax transformer. @end deffn -@c docstring begin (texi-doc-string "guile" "macro-type") @deffn primitive macro-type m Return one of the symbols @code{syntax}, @code{macro} or @code{macro!}, depending on whether @var{m} is a syntax @@ -183,17 +162,14 @@ respectively. If @var{m} is not a macro, @code{#f} is returned. @end deffn -@c docstring begin (texi-doc-string "guile" "macro-name") @deffn primitive macro-name m Return the name of the macro @var{m}. @end deffn -@c docstring begin (texi-doc-string "guile" "macro-transformer") @deffn primitive macro-transformer m Return the transformer of the macro @var{m}. @end deffn -@c docstring begin (texi-doc-string "guile" "cons-source") @deffn primitive cons-source xorig x y Create and return a new pair whose car and cdr are @var{x} and @var{y}. Any source properties associated with @var{xorig} are also associated diff --git a/doc/scheme-scheduling.texi b/doc/scheme-scheduling.texi index 4b717faf9..bddb17dde 100644 --- a/doc/scheme-scheduling.texi +++ b/doc/scheme-scheduling.texi @@ -18,20 +18,17 @@ reviewed and largely reorganized.] @node Arbiters @section Arbiters -@c docstring begin (texi-doc-string "guile" "make-arbiter") @deffn primitive make-arbiter name Return an object of type arbiter and name @var{name}. Its state is initially unlocked. Arbiters are a way to achieve process synchronization. @end deffn -@c docstring begin (texi-doc-string "guile" "try-arbiter") @deffn primitive try-arbiter arb Return @code{#t} and lock the arbiter @var{arb} if the arbiter was unlocked. Otherwise, return @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "release-arbiter") @deffn primitive release-arbiter arb Return @code{#t} and unlock the arbiter @var{arb} if the arbiter was locked. Otherwise, return @code{#f}. @@ -41,44 +38,36 @@ arbiter was locked. Otherwise, return @code{#f}. @node Asyncs @section Asyncs -@c docstring begin (texi-doc-string "guile" "async") @deffn primitive async thunk Create a new async for the procedure @var{thunk}. @end deffn -@c docstring begin (texi-doc-string "guile" "system-async") @deffn primitive system-async thunk Create a new async for the procedure @var{thunk}. Also add it to the system's list of active async objects. @end deffn -@c docstring begin (texi-doc-string "guile" "async-mark") @deffn primitive async-mark a Mark the async @var{a} for future execution. @end deffn -@c docstring begin (texi-doc-string "guile" "system-async-mark") @deffn primitive system-async-mark a Mark the async @var{a} for future execution. @end deffn -@c docstring begin (texi-doc-string "guile" "run-asyncs") @deffn primitive run-asyncs list_of_a Execute all thunks from the asyncs of the list @var{list_of_a}. @end deffn -@c docstring begin (texi-doc-string "guile" "noop") @deffn primitive noop . args Do nothing. When called without arguments, return @code{#f}, otherwise return the first argument. @end deffn -@c docstring begin (texi-doc-string "guile" "unmask-signals") @deffn primitive unmask-signals Unmask signals. The returned value is not specified. @end deffn -@c docstring begin (texi-doc-string "guile" "mask-signals") @deffn primitive mask-signals Mask signals. The returned value is not specified. @end deffn @@ -104,7 +93,6 @@ dynamic root. For example, if you want to apply a procedure, but to not allow that procedure to capture the current continuation, calling the procedure under a new dynamic root will do the job. -@c docstring begin (texi-doc-string "guile" "call-with-dynamic-root") @deffn primitive call-with-dynamic-root thunk handler Evaluate @code{(thunk)} in a new dynamic context, returning its value. @@ -151,7 +139,6 @@ be under a new dynamic root.) @end deffn -@c docstring begin (texi-doc-string "guile" "dynamic-root") @deffn primitive dynamic-root Return an object representing the current dynamic root. @@ -293,7 +280,6 @@ Higher level thread procedures are available by loading the @code{(ice-9 threads)} module. These provide standardized thread creation and mutex interaction. -@c docstring begin (texi-doc-string "guile" "%thread-handler") @deffn primitive %thread-handler tag args@dots{} This procedure is specified as the standard error-handler for @@ -308,27 +294,23 @@ and signals are unmasked with @code{unmask-signals}. [FIXME: Why distinguish based on number of args?! Cue voodoo music here.] @end deffn -@c docstring begin (texi-doc-string "guile" "make-thread") @deffn macro make-thread proc [args@dots{}] Apply @var{proc} to @var{args} in a new thread formed by @code{call-with-new-thread} using @code{%thread-handler} as the error handler. @end deffn -@c docstring begin (texi-doc-string "guile" "begin-thread") @deffn macro begin-thread first [rest@dots{}] Evaluate forms @var{first} and @var{rest} in a new thread formed by @code{call-with-new-thread} using @code{%thread-handler} as the error handler. @end deffn -@c docstring begin (texi-doc-string "guile" "with-mutex") @deffn macro with-mutex m [body@dots{}] Lock mutex @var{m}, evaluate @var{body}, and then unlock @var{m}. These sub-operations form the branches of a @code{dynamic-wind}. @end deffn -@c docstring begin (texi-doc-string "guile" "monitor") @deffn macro monitor first [rest@dots{}] Evaluate forms @var{first} and @var{rest} under a newly created anonymous mutex, using @code{with-mutex}. @@ -340,7 +322,6 @@ anonymous mutex, using @code{with-mutex}. @node Fluids @section Fluids -@c docstring begin (texi-doc-string "guile" "make-fluid") @deffn primitive make-fluid Return a newly created fluid. Fluids are objects of a certain type (a smob) that can hold one SCM @@ -351,25 +332,21 @@ inherits the values from its parent. Because each thread executes in its own dynamic root, you can use fluids for thread local storage. @end deffn -@c docstring begin (texi-doc-string "guile" "fluid?") @deffn primitive fluid? obj Return @code{#t} iff @var{obj} is a fluid; otherwise, return @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "fluid-ref") @deffn primitive fluid-ref fluid Return the value associated with @var{fluid} in the current dynamic root. If @var{fluid} has not been set, then return @code{#f}. @end deffn -@c docstring begin (texi-doc-string "guile" "fluid-set!") @deffn primitive fluid-set! fluid value Set the value associated with @var{fluid} in the current dynamic root. @end deffn -@c docstring begin (texi-doc-string "guile" "with-fluids*") @deffn primitive with-fluids* fluids values thunk Set @var{fluids} to @var{values} temporary, and call @var{thunk}. @var{fluids} must be a list of fluids and @var{values} must be the same diff --git a/doc/scheme-translation.texi b/doc/scheme-translation.texi index dfbbdd0b4..e69de29bb 100644 --- a/doc/scheme-translation.texi +++ b/doc/scheme-translation.texi @@ -1,49 +0,0 @@ -@page -@node Translation -@chapter Support for Translating Other Languages - -[Describe translation framework.] - -@menu -* Emacs Lisp Support:: Helper primitives for Emacs Lisp. -@end menu - - -@node Emacs Lisp Support -@section Emacs Lisp Support - -@c docstring begin (texi-doc-string "guile" "nil-car") -@deffn primitive nil-car x -Return the car of @var{x}, but convert it to LISP nil if it -is Scheme's end-of-list. -@end deffn - -@c docstring begin (texi-doc-string "guile" "nil-cdr") -@deffn primitive nil-cdr x -Return the cdr of @var{x}, but convert it to LISP nil if it -is Scheme's end-of-list. -@end deffn - -@c docstring begin (texi-doc-string "guile" "nil-cons") -@deffn primitive nil-cons x y -Create a new cons cell with @var{x} as the car and @var{y} as -the cdr, but convert @var{y} to Scheme's end-of-list if it is -a LISP nil. -@end deffn - -@c docstring begin (texi-doc-string "guile" "nil-eq") -@deffn primitive nil-eq x y -Compare @var{x} and @var{y} and return LISP's t if they are -@code{eq?}, return LISP's nil otherwise. -@end deffn - -@c docstring begin (texi-doc-string "guile" "null") -@deffn primitive null x -Return LISP's @code{t} if @var{x} is nil in the LISP sense, -return LISP's nil otherwise. -@end deffn - - -@c Local Variables: -@c TeX-master: "guile.texi" -@c End: diff --git a/doc/scheme-utility.texi b/doc/scheme-utility.texi index 3163bf3a5..543a14569 100644 --- a/doc/scheme-utility.texi +++ b/doc/scheme-utility.texi @@ -15,7 +15,6 @@ @section Equality @rnindex eq? -@c docstring begin (texi-doc-string "guile" "eq?") @deffn primitive eq? x y Return @code{#t} iff @var{x} references the same object as @var{y}. @code{eq?} is similar to @code{eqv?} except that in some cases it is @@ -24,7 +23,6 @@ capable of discerning distinctions finer than those detectable by @end deffn @rnindex eqv? -@c docstring begin (texi-doc-string "guile" "eqv?") @deffn primitive eqv? x y The @code{eqv?} procedure defines a useful equivalence relation on objects. Briefly, it returns @code{#t} if @var{x} and @var{y} should normally be @@ -34,7 +32,6 @@ and inexact numbers. @end deffn @rnindex equal? -@c docstring begin (texi-doc-string "guile" "equal?") @deffn primitive equal? x y Return @code{#t} iff @var{x} and @var{y} are recursively @code{eqv?} equivalent. @code{equal?} recursively compares the contents of pairs, @@ -60,25 +57,21 @@ closures than for other kinds of objects. Therefore, when manipulating a property list associated with a procedure object, use the @code{procedure} functions; otherwise, use the @code{object} functions. -@c docstring begin (texi-doc-string "guile" "object-properties") @deffn primitive object-properties obj @deffnx primitive procedure-properties obj Return @var{obj}'s property list. @end deffn -@c docstring begin (texi-doc-string "guile" "set-object-properties!") @deffn primitive set-object-properties! obj alist @deffnx primitive set-procedure-properties! obj alist Set @var{obj}'s property list to @var{alist}. @end deffn -@c docstring begin (texi-doc-string "guile" "object-property") @deffn primitive object-property obj key @deffnx primitive procedure-property obj key Return the property of @var{obj} with name @var{key}. @end deffn -@c docstring begin (texi-doc-string "guile" "set-object-property!") @deffn primitive set-object-property! obj key value @deffnx primitive set-procedure-property! obj key value In @var{obj}'s property list, set the property named @var{key} @@ -92,7 +85,6 @@ the user provides a "property table" that is possibly private.] @node Primitive Properties @section Primitive Properties -@c docstring begin (texi-doc-string "guile" "primitive-make-property") @deffn primitive primitive-make-property not_found_proc Create a @dfn{property token} that can be used with @code{primitive-property-ref} and @code{primitive-property-set!}. @@ -100,7 +92,6 @@ See @code{primitive-property-ref} for the significance of @var{not_found_proc}. @end deffn -@c docstring begin (texi-doc-string "guile" "primitive-property-ref") @deffn primitive primitive-property-ref prop obj Return the property @var{prop} of @var{obj}. When no value has yet been associated with @var{prop} and @var{obj}, call @@ -111,12 +102,10 @@ and use its return value. That value is also associated with default value of @var{prop}. @end deffn -@c docstring begin (texi-doc-string "guile" "primitive-property-set!") @deffn primitive primitive-property-set! prop obj val Associate @var{code} with @var{prop} and @var{obj}. @end deffn -@c docstring begin (texi-doc-string "guile" "primitive-property-del!") @deffn primitive primitive-property-del! prop obj Remove any value associated with @var{prop} and @var{obj}. @end deffn @@ -125,7 +114,6 @@ Remove any value associated with @var{prop} and @var{obj}. @node Sorting @section Sorting -@c docstring begin (texi-doc-string "guile" "merge!") @deffn primitive merge! alist blist less Takes two lists @var{alist} and @var{blist} such that @code{(sorted? alist less?)} and @code{(sorted? blist less?)} and @@ -136,11 +124,9 @@ This is the destructive variant of @code{merge} Note: this does _not_ accept vectors. @end deffn -@c docstring begin (texi-doc-string "guile" "merge") @deffn primitive merge alist blist less @end deffn -@c docstring begin (texi-doc-string "guile" "restricted-vector-sort!") @deffn primitive restricted-vector-sort! vec less startpos endpos Sort the vector @var{vec}, using @var{less} for comparing the vector elements. @var{startpos} and @var{endpos} delimit @@ -148,7 +134,6 @@ the range of the vector which gets sorted. The return value is not specified. @end deffn -@c docstring begin (texi-doc-string "guile" "sort!") @deffn primitive sort! items less Sort the sequence @var{items}, which may be a list or a vector. @var{less} is used for comparing the sequence @@ -157,14 +142,12 @@ input sequence is modified to produce the sorted result. This is not a stable sort. @end deffn -@c docstring begin (texi-doc-string "guile" "sort") @deffn primitive sort items less Sort the sequence @var{items}, which may be a list or a vector. @var{less} is used for comparing the sequence elements. This is not a stable sort. @end deffn -@c docstring begin (texi-doc-string "guile" "sort-list!") @deffn primitive sort-list! items less Sort the list @var{items}, using @var{less} for comparing the list elements. The sorting is destructive, that means that the @@ -172,20 +155,17 @@ input list is modified to produce the sorted result. This is a stable sort. @end deffn -@c docstring begin (texi-doc-string "guile" "sort-list") @deffn primitive sort-list items less Sort the list @var{items}, using @var{less} for comparing the list elements. This is a stable sort. @end deffn -@c docstring begin (texi-doc-string "guile" "sorted?") @deffn primitive sorted? items less Return @code{#t} iff @var{items} is a list or a vector such that for all 1 <= i <= m, the predicate @var{less} returns true when applied to all elements i - 1 and i @end deffn -@c docstring begin (texi-doc-string "guile" "stable-sort!") @deffn primitive stable-sort! items less Sort the sequence @var{items}, which may be a list or a vector. @var{less} is used for comparing the sequence elements. @@ -194,7 +174,6 @@ is modified to produce the sorted result. This is a stable sort. @end deffn -@c docstring begin (texi-doc-string "guile" "stable-sort") @deffn primitive stable-sort items less Sort the sequence @var{items}, which may be a list or a vector. @var{less} is used for comparing the sequence elements. @@ -205,7 +184,6 @@ This is a stable sort. @node Copying @section Copying Deep Structures -@c docstring begin (texi-doc-string "guile" "copy-tree") @deffn primitive copy-tree obj Recursively copy the data tree that is bound to @var{obj}, and return a pointer to the new data structure. @code{copy-tree} recurses down the |