From 54737001bbecb54d1184500973e7b1c057107358 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Wed, 6 Mar 2002 21:12:43 +0000 Subject: [PATCH 01/29] Removed maintainer section. --- THANKS | 4 ---- 1 file changed, 4 deletions(-) diff --git a/THANKS b/THANKS index 508aa098a..2a43632eb 100644 --- a/THANKS +++ b/THANKS @@ -1,7 +1,3 @@ -The Guile maintainer committee consists of - - Marius Vollmer - Contributors since the last release: Rob Browning From 020c890ccc305a9be7a6d2fc7f12328dfe7adfb1 Mon Sep 17 00:00:00 2001 From: Neil Jerram Date: Fri, 8 Mar 2002 13:07:50 +0000 Subject: [PATCH 02/29] * Fix bug caused by frame size overflowing its field. --- libguile/ChangeLog | 9 +++++++++ libguile/debug.h | 2 +- libguile/eval.c | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 66d68ae0d..8bda007cf 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,12 @@ +2002-03-08 Neil Jerram + + * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use + of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this. + + * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in + debug.status. It isn't needed, and it can overflow the bits + reserved for it (which may lead to a segv or a GC abort). + 2002-03-02 Dirk Herrmann * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed diff --git a/libguile/debug.h b/libguile/debug.h index f7059266f..da7cad68f 100644 --- a/libguile/debug.h +++ b/libguile/debug.h @@ -141,7 +141,7 @@ SCM_API scm_t_debug_frame *scm_last_debug_frame; #define SCM_TRACED_FRAME (1L << 8) #define SCM_ARGS_READY (1L << 7) #define SCM_DOVERFLOW (1L << 6) -#define SCM_MAX_FRAME_SIZE 63 /* also used as a mask for the size field */ +#define SCM_MAX_FRAME_SIZE 63 #define SCM_FRAMETYPE (3L << 11) diff --git a/libguile/eval.c b/libguile/eval.c index 6167b5b23..c4dc8e6e8 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -1899,7 +1899,7 @@ SCM_CEVAL (SCM x, SCM env) scm_t_debug_frame debug; scm_t_debug_info *debug_info_end; debug.prev = scm_last_debug_frame; - debug.status = scm_debug_eframe_size; + debug.status = 0; /* * The debug.vect contains twice as much scm_t_debug_info frames as the * user has specified with (debug-set! frames ). From 58d233cca9756e8e4c11ba2122159ade7c933fa3 Mon Sep 17 00:00:00 2001 From: Neil Jerram Date: Fri, 8 Mar 2002 13:11:34 +0000 Subject: [PATCH 03/29] * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already exists when adding a source property other than those that are handled explicitly, add the new property to the SRCPROPS obj's plist. --- libguile/ChangeLog | 5 +++++ libguile/srcprop.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 8bda007cf..3d491d288 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,5 +1,10 @@ 2002-03-08 Neil Jerram + * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already + exists when adding a source property other than those that are + handled explicitly, add the new property to the SRCPROPS obj's + plist. + * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this. diff --git a/libguile/srcprop.c b/libguile/srcprop.c index f00828b79..e909991a5 100644 --- a/libguile/srcprop.c +++ b/libguile/srcprop.c @@ -317,7 +317,12 @@ SCM_DEFINE (scm_set_source_property_x, "set-source-property!", 3, 0, 0, SCM_WHASHSET (scm_source_whash, h, scm_make_srcprops (0, 0, SCM_UNDEFINED, datum, p)); } else - SCM_WHASHSET (scm_source_whash, h, scm_acons (key, datum, p)); + { + if (SRCPROPSP (p)) + SRCPROPPLIST (p) = scm_acons (key, datum, SRCPROPPLIST (p)); + else + SCM_WHASHSET (scm_source_whash, h, scm_acons (key, datum, p)); + } return SCM_UNSPECIFIED; } #undef FUNC_NAME From ecfeac8c95c4335f942e4e0028d7b593be59664b Mon Sep 17 00:00:00 2001 From: Neil Jerram Date: Fri, 8 Mar 2002 13:13:36 +0000 Subject: [PATCH 04/29] * docstring.el (docstring-libguile-directory, docstring-display-location, docstring-show-source): New. --- doc/maint/ChangeLog | 5 ++++ doc/maint/docstring.el | 58 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/doc/maint/ChangeLog b/doc/maint/ChangeLog index 37e19e73d..3508a73be 100644 --- a/doc/maint/ChangeLog +++ b/doc/maint/ChangeLog @@ -1,3 +1,8 @@ +2002-03-08 Neil Jerram + + * docstring.el (docstring-libguile-directory, + docstring-display-location, docstring-show-source): New. + 2001-11-16 Neil Jerram * guile.texi: Replaced by regenerated libguile version. diff --git a/doc/maint/docstring.el b/doc/maint/docstring.el index 58d07eaa3..9177d33c5 100644 --- a/doc/maint/docstring.el +++ b/doc/maint/docstring.el @@ -539,6 +539,64 @@ new snarfed docstring file.\n\n") ;(find-tracking-docstring '(guile) "primitive sloppy-assq") ;(find-snarfed-docstring '(guile) "primitive sloppy-assq") +(defvar docstring-libguile-directory (expand-file-name "libguile" + guile-core-dir) + "*The directory containing the C source for libguile.") + +(defun docstring-display-location (file line) + (let ((buffer (find-file-noselect + (expand-file-name file docstring-libguile-directory)))) + (if buffer + (let* ((window (or (get-buffer-window buffer) + (display-buffer buffer))) + (pos (save-excursion + (set-buffer buffer) + (goto-line line) + (point)))) + (set-window-point window pos))))) + +(defun docstring-show-source () + "Given that point is sitting in a docstring in one of the Texinfo +source files for the Guile manual, and that that docstring may be +snarfed automatically from a libguile C file, determine whether the +docstring is from libguile and, if it is, display the relevant C file +at the line from which the docstring was snarfed. + +Why? When updating snarfed docstrings, you should usually edit the C +source rather than the Texinfo source, so that your updates benefit +Guile's online help as well. This function locates the C source for a +docstring so that it is easy for you to do this." + (interactive) + (let* ((deffn-line + (save-excursion + (end-of-line) + (or (re-search-backward "^@deffn " nil t) + (error "No docstring here!")) + (buffer-substring (point) + (progn + (end-of-line) + (point))))) + (guile-texi-file + (expand-file-name "guile.texi" docstring-libguile-directory)) + (source-location + (save-excursion + (set-buffer (find-file-noselect guile-texi-file)) + (save-excursion + (goto-char (point-min)) + (or (re-search-forward (concat "^" + (regexp-quote deffn-line) + "$") + nil t) + (error "Docstring not from libguile")) + (forward-line -1) + (if (looking-at "^@c snarfed from \\([^:]+\\):\\([0-9]+\\)$") + (cons (match-string 1) + (string-to-int (match-string 2))) + (error "Corrupt docstring entry in guile.texi")))))) + (docstring-display-location (car source-location) + (cdr source-location)))) + + (provide 'docstring) ;;; docstring.el ends here From a3f0622d5d1b9ea1e6c38b966412d4aa446e83b8 Mon Sep 17 00:00:00 2001 From: Neil Jerram Date: Fri, 8 Mar 2002 13:18:00 +0000 Subject: [PATCH 05/29] * Insert missing `of' in autoconf.texi. --- doc/ref/ChangeLog | 4 ++++ doc/ref/autoconf.texi | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/ref/ChangeLog b/doc/ref/ChangeLog index aa7ea31fe..52d9fa840 100644 --- a/doc/ref/ChangeLog +++ b/doc/ref/ChangeLog @@ -1,3 +1,7 @@ +2002-03-03 Neil Jerram + + * autoconf.texi (Autoconf Background): Insert missing `of'. + 2002-03-01 Dirk Herrmann * api.txt, data-rep.texi: Renamed the struct scm_cell to diff --git a/doc/ref/autoconf.texi b/doc/ref/autoconf.texi index 301dc440f..8d05b2ecc 100644 --- a/doc/ref/autoconf.texi +++ b/doc/ref/autoconf.texi @@ -30,9 +30,10 @@ by the @file{configure} script, typically by adding the tests to Users of your package then run @file{configure} in the normal way. Macros are a way to make common feature tests easy to express. Autoconf -provides a wide range macros (@pxref{Existing Tests,,,autoconf}), and Guile -installation provides Guile-specific tests in the areas of: program detection, -compilation flags reporting, and Scheme module checks. +provides a wide range of macros (@pxref{Existing Tests,,,autoconf}), and +Guile installation provides Guile-specific tests in the areas of: +program detection, compilation flags reporting, and Scheme module +checks. @node Autoconf Macros From e12ed7aa92fa3c98e00f674e76cf1c0ee436c92f Mon Sep 17 00:00:00 2001 From: Neil Jerram Date: Fri, 8 Mar 2002 13:18:59 +0000 Subject: [PATCH 06/29] * Grammatical correction: change `are' to `is' in guile.m4 docstring. --- guile-config/ChangeLog | 4 ++++ guile-config/guile.m4 | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/guile-config/ChangeLog b/guile-config/ChangeLog index 0fce8d321..607d01322 100644 --- a/guile-config/ChangeLog +++ b/guile-config/ChangeLog @@ -1,3 +1,7 @@ +2002-03-03 Neil Jerram + + * guile.m4 (GUILE_PROGS): In docstring, change `are' to `is'. + 2002-01-02 Thien-Thi Nguyen * guile.m4: Rewrite comments in texi. diff --git a/guile-config/guile.m4 b/guile-config/guile.m4 index fa098eecf..020de5a05 100644 --- a/guile-config/guile.m4 +++ b/guile-config/guile.m4 @@ -67,7 +67,7 @@ # This macro looks for programs @code{guile}, @code{guile-config} and # @code{guile-tools}, and sets variables @var{GUILE}, @var{GUILE_CONFIG} and # @var{GUILE_TOOLS}, to their paths, respectively. If either of the first two -# are not found, signal error. +# is not found, signal error. # # The variables are marked for substitution, as by @code{AC_SUBST}. # From 27c54e0b59511f264354d2432e1d60cf09dc715c Mon Sep 17 00:00:00 2001 From: Neil Jerram Date: Fri, 8 Mar 2002 13:19:42 +0000 Subject: [PATCH 07/29] * snarf-guile-m4-docs (display-texi): Strip off `# ' from start of docstring lines if possible, rather than just `#'. --- scripts/ChangeLog | 5 +++++ scripts/snarf-guile-m4-docs | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/ChangeLog b/scripts/ChangeLog index 912000ea8..7d619d2b0 100644 --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2002-03-03 Neil Jerram + + * snarf-guile-m4-docs (display-texi): Strip off `# ' from start of + docstring lines if possible, rather than just `#'. + 2002-02-26 Thien-Thi Nguyen * Makefile.am: Update path to pre-inst-guile automake frag. diff --git a/scripts/snarf-guile-m4-docs b/scripts/snarf-guile-m4-docs index 8a724ca67..45d258c61 100755 --- a/scripts/snarf-guile-m4-docs +++ b/scripts/snarf-guile-m4-docs @@ -43,9 +43,12 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@" (define (display-texi lines) (display "@deffn {Autoconf Macro}") (for-each (lambda (line) - (display (if (string=? "#" (substring line 0 1)) - (substring line 1) - line)) + (display (cond ((and (>= (string-length line) 2) + (string=? "# " (substring line 0 2))) + (substring line 2)) + ((string=? "#" (substring line 0 1)) + (substring line 1)) + (else line))) (newline)) lines) (display "@end deffn") From e07983b4b410ea5fe157a039444a709b0616a433 Mon Sep 17 00:00:00 2001 From: Neil Jerram Date: Fri, 8 Mar 2002 18:04:57 +0000 Subject: [PATCH 08/29] A couple of bug status updates. --- BUGS | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/BUGS b/BUGS index 37016476c..230e0ad6b 100644 --- a/BUGS +++ b/BUGS @@ -27,7 +27,7 @@ bugs are good. bug 1 -- (debug-disable 'debug) has no effect if first form in ~/.guile reported-by: Sven.Hartrumpf@fernuni-hagen.de / 2001-08-31 -fixed: not-yet +fixed: 2001-11-07 (1.7.x) ttn sez: buggy behavior confirmed on both 1.5.x and 1.7.x. @@ -36,6 +36,12 @@ on the other hand, when second or later, the expected effect (disabling use of debugging evaluator) seems to be reflected when viewing the debug options. it could be that the bug is in display and not the actual setting. +NJ 2002-03-08: + +Problem was caused by (top-repl)'s loading of (ice-9 debug), which +ended with unconditional `(debug-enable 'debug)'. Fixed by removing +the offending lines. + bug 2 -- documentation mirroring not complete reported-by: lord@regexps.com / 2001-08 @@ -170,6 +176,14 @@ Keith Wright sez: > I get the impression that it is supposed to build without 'makeinfo', > if this is not so it should be mentioned in the README or INSTALL. +NJ 2002-03-08: + +Addressed partially in Makefile.am, by copying guile-procedures.texi +to guile-procedures.txt if makeinfo is not available. + +However, a better IMO fix would be to include a prebuilt +guile-procedures.txt in the distribution. + bug 9 -- sibling threads not infinite looping reported-by: giraud@tif.inria.fr / 2001-09-24 From fc17ed5b72633016a14be2f3d026992ea0a197cb Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 8 Mar 2002 21:20:31 +0000 Subject: [PATCH 09/29] (Miscellaneous Tools): New node/chapter. (Snarfing, Init Snarfing with guile-snarf, How guile-snarf works, Macros guile-snarf recognizes, Doc Snarfing): New nodes/(sub)sections. (Executable Modules): Now a section under "Miscellaneous Tools". --- doc/ref/tools.texi | 267 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 257 insertions(+), 10 deletions(-) diff --git a/doc/ref/tools.texi b/doc/ref/tools.texi index 3629b93b1..18448bfd8 100644 --- a/doc/ref/tools.texi +++ b/doc/ref/tools.texi @@ -1,6 +1,251 @@ @page +@node Miscellaneous Tools +@chapter Miscellaneous Tools + +Programming is more fun with a good tools. This chapter describes snarfing +tools, and the @code{guile-tools} program which can be used to invoke the rest +of the tools (which are self-documenting). Some of these are used in Guile +development, too. Imagine that! + +@menu +* Snarfing:: Grepping the source in various ways. +* Executable Modules:: Modules callable via guile-tools. +@end menu + +@c --------------------------------------------------------------------------- +@node Snarfing +@section Snarfing +@cindex snarfing + +Because it's easier to maintain documentation, code, and other metainfo in one +source file than in many files, there have evolved many methods for grepping +source to lift and separate these kinds of info, in the process generating +docs or fragments of source or what have you. This is known generally as +@dfn{snarfing}, which comes from the verb ``to snarf'', here meaning ``to +unceremoniously extract information from a somewhat unwilling source.'' + +This section documents the installed program @code{guile-snarf} which does +@dfn{init snarfing}, and also touches upon guile's doc snarfing process which +is not yet finalized (i.e., doc snarfing programs are not installed at this +time). + +@menu +* Init Snarfing with guile-snarf:: Exposing C subrs and friends to Scheme. +* Doc Snarfing:: Generating GDFv2 or texi from source. +@end menu + +@c --------------------------------------------------------------------------- +@node Init Snarfing with guile-snarf +@subsection Init Snarfing with guile-snarf +@c NOTE: This node and two subnodes are adapted from ../sources/snarf.texi. +@cindex snarfing, init +@cindex primitive functions +@cindex subrs, defining + +When writing C code for use with Guile, you typically define a set of C +functions, and then make some of them visible to the Scheme world by +calling the @code{scm_c_define_gsubr} function; a C function published in +this way is called a @dfn{subr}. If you have many subrs to publish, it +can sometimes be annoying to keep the list of calls to +@code{scm_c_define_gsubr} in sync with the list of function definitions. +Frequently, a programmer will define a new subr in C, recompile the +application, and then discover that the Scheme interpreter cannot see +the subr, because of a missed call to @code{scm_c_define_gsubr}. + +Guile provides the @code{guile-snarf} command to manage this problem. +Using this tool, you can keep all the information needed to define the +subr alongside the function definition itself; @code{guile-snarf} will +extract this information from your source code, and automatically +generate a file of calls to @code{scm_c_define_gsubr} which you can +@code{#include} into an initialization function. + +@menu +* How guile-snarf works:: Using @code{guile-snarf}, with example. +* Macros guile-snarf recognizes:: How to mark up code for @code{guile-snarf}. +@end menu + +@c --------------------------------------------------------------------------- +@node How guile-snarf works +@subsubsection How guile-snarf works +@cindex guile-snarf invocation +@cindex guile-snarf example + +Usage: @code{guile-snarf} [CPP-OPTIONS ...] SOURCE.c + +@code{guile-snarf} uses cpp to process SOURCE.c, writing C language +initialization calls to standard output, based on special (some would say +magic) cpp macros found in the input (@pxref{Macros guile-snarf recognizes}). + +For example, here is how you might define a new subr called +@code{clear-image}, implemented by the C function @code{clear_image}: + +@example +@group +#include + +SCM_DEFINE (clear_image, "clear-image", 1, 0, 0, + (SCM image_smob), + "Clear the image.") +#define FUNC_NAME s_clear_image +@{ + /* C code to clear the image... */ +@} +#undef FUNC_NAME + +void +init_image_type () +@{ +#include "image-type.x" +@} +@end group +@end example + +The @code{SCM_DEFINE} declaration says that the C function +@code{clear_image} implements a Scheme subr called @code{clear-image}, +which takes one required argument (type @code{SCM} named +@code{image_smob}), no optional arguments, and no tail argument. +@xref{Doc Snarfing}, for info on the docstring. + +This works in concert with @code{FUNC_NAME} to also define a static +array of characters named @code{s_clear_image}, initialized to the +string "clear-image". The body of @code{clear_image} may use the array +in error messages, instead of writing out the literal string; this may +save string space on some systems. + +Assuming the text above lives in a file named @file{image-type.c}, you will +need to execute the following command to prepare this file for compilation: + +@example +guile-snarf image-type.c > image-type.x +@end example + +This scans @file{image-type.c} for @code{SCM_DEFINE} +declarations, and writes to @file{image-type.x} the output: + +@example +scm_c_define_gsubr (s_clear_image, 1, 0, 0, (SCM (*)() ) clear_image); +@end example + +When compiled normally, @code{SCM_DEFINE} is a macro which expands to a +declaration of the @code{s_clear_image} string. + +Note that the output file name matches the @code{#include} from the +input file. Also, you still need to provide all the same information +you would if you were using @code{scm_c_define_gsubr} yourself, but you +can place the information near the function definition itself, so it is +less likely to become incorrect or out-of-date. + +If you have many files that @code{guile-snarf} must process, you should +consider using a rule like the following in your Makefile: + +@example +.SUFFIXES: .x +.c.x: + guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@@ +@end example + +This tells make to run @code{guile-snarf} to produce each needed +@file{.x} file from the corresponding @file{.c} file. + +@code{guile-snarf} passes all its command-line arguments directly to the +C preprocessor, which it uses to extract the information it needs from +the source code. this means you can pass normal compilation flags to +@code{guile-snarf} to define preprocessor symbols, add header file +directories, and so on. + +@c --------------------------------------------------------------------------- +@node Macros guile-snarf recognizes +@subsubsection Macros guile-snarf recognizes +@cindex guile-snarf recognized macros + +Here are the macros you can use in your source code from which +@code{guile-snarf} can construct initialization code: + +@example +/* procedures */ +SCM_DEFINE (FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) + +SCM_PROC (RANAME, STR, REQ, OPT, VAR, CFN) +SCM_REGISTER_PROC (RANAME, STR, REQ, OPT, VAR, CFN) + +SCM_GPROC (RANAME, STR, REQ, OPT, VAR, CFN, GF) + +/* everything else */ +SCM_SYMBOL (c_name, scheme_name) +SCM_GLOBAL_SYMBOL (c_name, scheme_name) + +SCM_KEYWORD (c_name, scheme_name) +SCM_GLOBAL_KEYWORD (c_name, scheme_name) + +SCM_VARIABLE (c_name, scheme_name) +SCM_GLOBAL_VARIABLE (c_name, scheme_name) + +SCM_VARIABLE_INIT (c_name, scheme_name, init_val) +SCM_GLOBAL_VARIABLE_INIT (c_name, scheme_name, init_val) +@end example + +@c i like things dense, but maybe someone else will reformat this +@c into an easier-to-read list. also, all-upcase to me is a form +@c of quoting, so @var{} is not necessary there. --ttn +REQ and OPT are numbers indicating required and optional argument +counts, respectively; VAR is a number that, if non-zero, means the +function will accept any remaining arguments as a list; DOCSTRING is a +string (use @code{\n\} at eol for multi-line); FNAME is a C-language +identifier, CFN and GF and @var{c_name} likewise; PRIMNAME is a string +denoting the name available to Scheme code, STR and @var{scheme_name} +likewise; RANAME is the name of the static string (must match that +declared by the associated definition of cpp macro @var{FUNC_NAME}); +ARGLIST is an argument list (in parentheses); and lastly, @var{init_val} +is a expression suitable for initializing a new variable. + +For procedures, you can use @code{SCM_DEFINE} for most purposes. Use +@code{SCM_PROC} along with @code{SCM_REGISTER_PROC} when you don't want +to be bothered with docstrings. Use @code{SCM_GPROC} for generic +functions (@pxref{GOOPS,,,goops}). All procedures are declared +@code{static} with return type @code{SCM}. + +For everything else, use the appropriate macro (@code{SCM_SYMBOL} for +symbols, and so on). The "_GLOBAL_" variants omit @code{static} +declaration. + +All these macros should be used at top-level, outside function bodies. +Also, it's a good idea to define @var{FUNC_NAME} immediately after using +@code{SCM_DEFINE} (and similar), and then the function body, and then +@code{#undef FUNC_NAME}. + +@xref{How guile-snarf works}, and also libguile source, for examples. +@xref{Subrs}, for details on argument passing and how to write C +functions. + +@c --------------------------------------------------------------------------- +@node Doc Snarfing +@subsection Doc Snarfing + +In addition to init snarfing (@pxref{Init Snarfing with guile-snarf}), +the libguile sources are also subject to doc snarfing, by programs that +are included in the distribution (but not installed at this time). The +output is the file @file{guile-procedures.txt} which is installed, and +subsequently used by module @code{(ice-9 documentation)}. + +Here is a list of what does what according to @file{libguile/Makefile.am}: + +@itemize +@item guile-snarf-docs runs cpp defining SCM_MAGIC_SNARF_DOCS +@item guile_filter_doc_snarfage parses guile-snarf-docs output to produce .doc +@item ../scripts/snarf-check-and-output-texi makes guile.texi +@item ../scripts/snarf-check-and-output-texi makes guile-procedures.txt +@item guile-func-name-check checks source snarf-syntax integrity (optional?) +@item guile-doc-snarf calls guile-snarf-docs (to make .doc) and guile-snarf +@end itemize + +Note that for guile-1.4, a completely different approach was used! All this +is rather byzantine, so for now @emph{NO} doc snarfing programs are installed. + +[fixme: Document further once doc snarfing is tamed somewhat. --ttn] + +@c --------------------------------------------------------------------------- @node Executable Modules -@chapter Executable Modules +@section Executable Modules @cindex guile-tools @cindex modules, executable @cindex executable modules @@ -13,6 +258,8 @@ that it can be called as a program in its own right, from the shell. For this reason, we sometimes use the term @dfn{script} in this context to mean the same thing. +@c wow look at this hole^! variable-width font users eat your heart out. + As a convenience, the @code{guile-tools} wrapper program is installed along w/ @code{guile}; it knows where a particular module is installed and calls it passing its args to the program. The result is that you need not augment your @@ -38,10 +285,10 @@ guile-tools display-commentary '(scripts lint)' guile-tools --source lint @end example -The rest of this chapter describes the packaging that goes into creating an +The rest of this section describes the packaging that goes into creating an executable module. Feel free to skip to the next chapter. -@section Writing Executable Modules +@subsection Writing Executable Modules @c adapted from scripts/README @@ -63,8 +310,8 @@ signature "(PROGRAM . args)" must be exported. Basically, use some variant of the form: @example - (define-module (scripts PROGRAM) - :export (PROGRAM)) +(define-module (scripts PROGRAM) + :export (PROGRAM)) @end example Feel free to export other definitions useful in the module context. @@ -73,7 +320,7 @@ Feel free to export other definitions useful in the module context. There must be the alias: @example - (define main PROGRAM) +(define main PROGRAM) @end example However, `main' must NOT be exported. @@ -82,10 +329,10 @@ However, `main' must NOT be exported. The beginning of the file must use the following invocation sequence: @example - #!/bin/sh - main='(module-ref (resolve-module '\''(scripts PROGRAM)) '\'main')' - exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@" - !# +#!/bin/sh +main='(module-ref (resolve-module '\''(scripts PROGRAM)) '\'main')' +exec $@{GUILE-guile@} -l $0 -c "(apply $main (cdr (command-line)))" "$@@" +!# @end example @end itemize From 73ede5920e74809fa8797345e65fa343b2179938 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 8 Mar 2002 21:23:36 +0000 Subject: [PATCH 10/29] (Miscellaneous Tools): Add under "Part II". Implement by including tools.texi. --- doc/ref/guile.texi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/ref/guile.texi b/doc/ref/guile.texi index c0d6cdae7..d078c465b 100644 --- a/doc/ref/guile.texi +++ b/doc/ref/guile.texi @@ -94,7 +94,7 @@ by the Free Software Foundation. @sp 10 @comment The title is printed in a large font. @title Guile Reference Manual -@subtitle $Id: guile.texi,v 1.12 2002-01-08 08:29:00 ttn Exp $ +@subtitle $Id: guile.texi,v 1.13 2002-03-08 21:23:36 ttn Exp $ @subtitle For use with Guile @value{VERSION} @c AUTHORS @@ -203,7 +203,7 @@ Preface Part I: Introduction to Guile * What is Guile?:: And what does it do? -* Whirlwind Tour:: An introductory whirlwind tour. +* Whirlwind Tour:: An introductory whirlwind tour. * Obtaining and Installing Guile:: * Reporting Bugs:: Reporting bugs in Guile or this manual. @@ -221,6 +221,7 @@ Part II: Programming with Guile * GH:: The deprecated GH interface. * Debugger User Interface:: * Autoconf Support:: Guile-specific configure.in macros. +* Miscellaneous Tools:: Snarfing, linting, etc. * Further Reading:: Where to find out more about Scheme programming. Part III: Guile API Reference @@ -302,6 +303,7 @@ options available. @include gh.texi @include debugging.texi @include autoconf.texi +@include tools.texi @include scheme-reading.texi @page From f394773de5634b870203811aee213dad48575757 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 8 Mar 2002 21:24:30 +0000 Subject: [PATCH 11/29] (guile_TEXINFOS): Add tools.texi. --- doc/ref/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ref/Makefile.am b/doc/ref/Makefile.am index 5935dc7fc..42760453c 100644 --- a/doc/ref/Makefile.am +++ b/doc/ref/Makefile.am @@ -33,7 +33,7 @@ guile_TEXINFOS = preface.texi intro.texi program.texi scheme-intro.texi \ expect.texi scsh.texi tcltk.texi scripts.texi gh.texi scm.texi \ debugging.texi indices.texi script-getopt.texi data-rep.texi \ extend.texi repl-modules.texi srfi-modules.texi misc-modules.texi \ - scheme-compound.texi autoconf.texi autoconf-macros.texi + scheme-compound.texi autoconf.texi autoconf-macros.texi tools.texi ETAGS_ARGS = $(info_TEXINFOS) $(guile_TEXINFOS) From 604a672efe41fca2026684efdb8a5ade66291b55 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 8 Mar 2002 21:28:07 +0000 Subject: [PATCH 12/29] (bin_SCRIPTS): Revive this decl, w/ initial element "guile-snarf" moved back from `noinst_SCRIPTS'. --- libguile/Makefile.am | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libguile/Makefile.am b/libguile/Makefile.am index 504152619..3946801b5 100644 --- a/libguile/Makefile.am +++ b/libguile/Makefile.am @@ -141,10 +141,11 @@ modinclude_HEADERS = __scm.h alist.h arbiters.h async.h backtrace.h boolean.h \ ## and not a header -- headers are included in the distribution. modinclude_DATA = scmconfig.h +bin_SCRIPTS = guile-snarf + # We can re-enable install for some of these if/when they are documented # and people feel like maintaining them. For now, this is not the case. -noinst_SCRIPTS = guile-snarf guile-doc-snarf guile-snarf-docs \ - guile-func-name-check +noinst_SCRIPTS = guile-doc-snarf guile-snarf-docs guile-func-name-check EXTRA_DIST = ChangeLog-gh ChangeLog-scm ChangeLog-threads \ ChangeLog-1996-1999 ChangeLog-2000 cpp_signal.c \ From 1ebf1566bc8ebae430138f21650bf72ffc511b67 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 8 Mar 2002 21:29:19 +0000 Subject: [PATCH 13/29] *** empty log message *** --- doc/ref/ChangeLog | 16 ++++++++++++++++ libguile/ChangeLog | 7 ++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/doc/ref/ChangeLog b/doc/ref/ChangeLog index 52d9fa840..ec8a5ada7 100644 --- a/doc/ref/ChangeLog +++ b/doc/ref/ChangeLog @@ -1,3 +1,19 @@ +2002-03-08 Thien-Thi Nguyen + + * tools.texi (Miscellaneous Tools): New node/chapter. + (Snarfing, Init Snarfing with guile-snarf, How guile-snarf works, + Macros guile-snarf recognizes, Doc Snarfing): New nodes/(sub)sections. + (Executable Modules): Now a section under "Miscellaneous Tools". + + * guile.texi (Miscellaneous Tools): Add under "Part II". + Implement by including tools.texi. + + * Makefile.am (guile_TEXINFOS): Add tools.texi. + +2002-03-07 Thien-Thi Nguyen + + * tools.texi: New file. + 2002-03-03 Neil Jerram * autoconf.texi (Autoconf Background): Insert missing `of'. diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 3d491d288..5806d2df4 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,8 @@ +2002-03-08 Thien-Thi Nguyen + + * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element + "guile-snarf" moved back from `noinst_SCRIPTS'. + 2002-03-08 Neil Jerram * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already @@ -96,7 +101,7 @@ * inet_aton.c, fports.c: Commented the inclusion of . - * deprecation.c (vsnprintf): Define to `_vsnprintf' for + * deprecation.c (vsnprintf): Define to `_vsnprintf' for Windows (MinGW). 2002-02-26 Thien-Thi Nguyen From f12745b633ad25a59f8800524b6d9dd685544d6b Mon Sep 17 00:00:00 2001 From: Dirk Herrmann Date: Sat, 9 Mar 2002 20:15:16 +0000 Subject: [PATCH 14/29] * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch. Added lots of comments regarding the implementation of #@dispatch. Changed intra-procedure communication to use t.arg1 instead of arg2. Removed some uses of t.arg1, t.lloc and proc as temporary variables. Introduced temporary variables with hopefully descriptive names for clarification. Replaced SCM_N?IMP by a more explicit predicate in some places. Use SCM_INSTANCE_HASH instead of computing the expression explicitly. Eliminate now unused label nontoplevel_cdrxbegin. * goops.h (SCM_INSTANCE_HASH): New macro. * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros. --- libguile/ChangeLog | 16 +++ libguile/eval.c | 241 ++++++++++++++++++++++++++++----------------- libguile/goops.h | 1 + libguile/objects.h | 2 + 4 files changed, 169 insertions(+), 91 deletions(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 5806d2df4..e28e1590f 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,19 @@ +2002-03-02 Dirk Herrmann + + * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch. + Added lots of comments regarding the implementation of #@dispatch. + Changed intra-procedure communication to use t.arg1 instead of + arg2. Removed some uses of t.arg1, t.lloc and proc as temporary + variables. Introduced temporary variables with hopefully + descriptive names for clarification. Replaced SCM_N?IMP by a more + explicit predicate in some places. Use SCM_INSTANCE_HASH instead + of computing the expression explicitly. Eliminate now unused + label nontoplevel_cdrxbegin. + + * goops.h (SCM_INSTANCE_HASH): New macro. + + * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros. + 2002-03-08 Thien-Thi Nguyen * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element diff --git a/libguile/eval.c b/libguile/eval.c index c4dc8e6e8..9ffd561f9 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -96,6 +96,7 @@ char *alloca (); #include "libguile/root.h" #include "libguile/vectors.h" #include "libguile/fluids.h" +#include "libguile/goops.h" #include "libguile/values.h" #include "libguile/validate.h" @@ -2042,7 +2043,6 @@ dispatch: nontoplevel_cdrxnoap: PREP_APPLY (SCM_UNDEFINED, SCM_EOL); - nontoplevel_cdrxbegin: x = SCM_CDR (x); nontoplevel_begin: while (!SCM_NULLP (SCM_CDR (x))) @@ -2430,99 +2430,158 @@ dispatch: RETURN (scm_makprom (scm_closure (SCM_CDR (x), env))); case (SCM_ISYMNUM (SCM_IM_DISPATCH)): - proc = SCM_CADR (x); /* unevaluated operands */ - PREP_APPLY (SCM_UNDEFINED, SCM_EOL); - if (SCM_IMP (proc)) - arg2 = *scm_ilookup (proc, env); - else if (!SCM_CONSP (proc)) - { - if (SCM_VARIABLEP (proc)) - arg2 = SCM_VARIABLE_REF (proc); - else - arg2 = *scm_lookupcar (SCM_CDR (x), env, 1); - } - else - { - arg2 = scm_list_1 (EVALCAR (proc, env)); - t.lloc = SCM_CDRLOC (arg2); - while (SCM_NIMP (proc = SCM_CDR (proc))) - { - *t.lloc = scm_list_1 (EVALCAR (proc, env)); - t.lloc = SCM_CDRLOC (*t.lloc); - } - } - - type_dispatch: - /* The type dispatch code is duplicated here - * (c.f. objects.c:scm_mcache_compute_cmethod) since that - * cuts down execution time for type dispatch to 50%. - */ { - long i, n, end, mask; - SCM z = SCM_CDDR (x); - n = SCM_INUM (SCM_CAR (z)); /* maximum number of specializers */ - proc = SCM_CADR (z); - - if (SCM_NIMP (proc)) - { - /* Prepare for linear search */ - mask = -1; - i = 0; - end = SCM_VECTOR_LENGTH (proc); - } + /* If not done yet, evaluate the operand forms. The result is a + * list of arguments stored in t.arg1, which is used to perform the + * function dispatch. */ + SCM operand_forms = SCM_CADR (x); + PREP_APPLY (SCM_UNDEFINED, SCM_EOL); + if (SCM_ILOCP (operand_forms)) + t.arg1 = *scm_ilookup (operand_forms, env); + else if (SCM_VARIABLEP (operand_forms)) + t.arg1 = SCM_VARIABLE_REF (operand_forms); + else if (!SCM_CONSP (operand_forms)) + t.arg1 = *scm_lookupcar (SCM_CDR (x), env, 1); else { - /* Compute a hash value */ - long hashset = SCM_INUM (proc); - long j = n; - z = SCM_CDDR (z); - mask = SCM_INUM (SCM_CAR (z)); - proc = SCM_CADR (z); - i = 0; - t.arg1 = arg2; - if (SCM_NIMP (t.arg1)) - do - { - i += SCM_STRUCT_DATA (scm_class_of (SCM_CAR (t.arg1))) - [scm_si_hashsets + hashset]; - t.arg1 = SCM_CDR (t.arg1); - } - while (j-- && SCM_NIMP (t.arg1)); - i &= mask; - end = i; + SCM tail = t.arg1 = scm_list_1 (EVALCAR (operand_forms, env)); + operand_forms = SCM_CDR (operand_forms); + while (!SCM_NULLP (operand_forms)) + { + SCM new_tail = scm_list_1 (EVALCAR (operand_forms, env)); + SCM_SETCDR (tail, new_tail); + tail = new_tail; + operand_forms = SCM_CDR (operand_forms); + } } + } - /* Search for match */ - do - { - long j = n; - z = SCM_VELTS (proc)[i]; - t.arg1 = arg2; /* list of arguments */ - if (SCM_NIMP (t.arg1)) - do + /* The type dispatch code is duplicated below + * (c.f. objects.c:scm_mcache_compute_cmethod) since that + * cuts down execution time for type dispatch to 50%. */ + type_dispatch: /* inputs: x, t.arg1 */ + /* Type dispatch means to determine from the types of the function + * arguments (i. e. the 'signature' of the call), which method from + * a generic function is to be called. This process of selecting + * the right method takes some time. To speed it up, guile uses + * caching: Together with the macro call to dispatch the signatures + * of some previous calls to that generic function from the same + * place are stored (in the code!) in a cache that we call the + * 'method cache'. This is done since it is likely, that + * consecutive calls to dispatch from that position in the code will + * have the same signature. Thus, the type dispatch works as + * follows: First, determine a hash value from the signature of the + * actual arguments. Second, use this hash value as an index to + * find that same signature in the method cache stored at this + * position in the code. If found, you have also found the + * corresponding method that belongs to that signature. If the + * signature is not found in the method cache, you have to perform a + * full search over all signatures stored with the generic + * function. */ + { + unsigned long int specializers; + unsigned long int hash_value; + unsigned long int cache_end_pos; + unsigned long int mask; + SCM method_cache; + + { + SCM z = SCM_CDDR (x); + SCM tmp = SCM_CADR (z); + specializers = SCM_INUM (SCM_CAR (z)); + + /* Compute a hash value for searching the method cache. There + * are two variants for computing the hash value, a (rather) + * complicated one, and a simple one. For the complicated one + * explained below, tmp holds a number that is used in the + * computation. */ + if (SCM_INUMP (tmp)) + { + /* Use the signature of the actual arguments to determine + * the hash value. This is done as follows: Each class has + * an array of random numbers, that are determined when the + * class is created. The integer 'hashset' is an index into + * that array of random numbers. Now, from all classes that + * are part of the signature of the actual arguments, the + * random numbers at index 'hashset' are taken and summed + * up, giving the hash value. The value of 'hashset' is + * stored at the call to dispatch. This allows to have + * different 'formulas' for calculating the hash value at + * different places where dispatch is called. This allows + * to optimize the hash formula at every individual place + * where dispatch is called, such that hopefully the hash + * value that is computed will directly point to the right + * method in the method cache. */ + unsigned long int hashset = SCM_INUM (tmp); + unsigned long int counter = specializers + 1; + SCM tmp_arg = t.arg1; + hash_value = 0; + while (!SCM_NULLP (tmp_arg) && counter != 0) + { + SCM class = scm_class_of (SCM_CAR (tmp_arg)); + hash_value += SCM_INSTANCE_HASH (class, hashset); + tmp_arg = SCM_CDR (tmp_arg); + counter--; + } + z = SCM_CDDR (z); + method_cache = SCM_CADR (z); + mask = SCM_INUM (SCM_CAR (z)); + hash_value &= mask; + cache_end_pos = hash_value; + } + else + { + /* This method of determining the hash value is much + * simpler: Set the hash value to zero and just perform a + * linear search through the method cache. */ + method_cache = tmp; + mask = (unsigned long int) ((long) -1); + hash_value = 0; + cache_end_pos = SCM_VECTOR_LENGTH (method_cache); + } + } + + { + /* Search the method cache for a method with a matching + * signature. Start the search at position 'hash_value'. The + * hashing implementation uses linear probing for conflict + * resolution, that is, if the signature in question is not + * found at the starting index in the hash table, the next table + * entry is tried, and so on, until in the worst case the whole + * cache has been searched, but still the signature has not been + * found. */ + SCM z; + do + { + SCM args = t.arg1; /* list of arguments */ + z = SCM_VELTS (method_cache)[hash_value]; + while (!SCM_NULLP (args)) { /* More arguments than specifiers => CLASS != ENV */ - if (! SCM_EQ_P (scm_class_of (SCM_CAR (t.arg1)), SCM_CAR (z))) + SCM class_of_arg = scm_class_of (SCM_CAR (args)); + if (!SCM_EQ_P (class_of_arg, SCM_CAR (z))) goto next_method; - t.arg1 = SCM_CDR (t.arg1); + args = SCM_CDR (args); z = SCM_CDR (z); } - while (j-- && SCM_NIMP (t.arg1)); - /* Fewer arguments than specifiers => CAR != ENV */ - if (!(SCM_IMP (SCM_CAR (z)) || SCM_CONSP (SCM_CAR (z)))) - goto next_method; - apply_cmethod: - env = EXTEND_ENV (SCM_CAR (SCM_CMETHOD_CODE (z)), - arg2, - SCM_CMETHOD_ENV (z)); - x = SCM_CMETHOD_CODE (z); - goto nontoplevel_cdrxbegin; - next_method: - i = (i + 1) & mask; - } while (i != end); - - z = scm_memoize_method (x, arg2); - goto apply_cmethod; + /* Fewer arguments than specifiers => CAR != ENV */ + if (SCM_NULLP (SCM_CAR (z)) || SCM_CONSP (SCM_CAR (z))) + goto apply_cmethod; + next_method: + hash_value = (hash_value + 1) & mask; + } while (hash_value != cache_end_pos); + + /* No appropriate method was found in the cache. */ + z = scm_memoize_method (x, t.arg1); + + apply_cmethod: /* inputs: z, t.arg1 */ + { + SCM formals = SCM_CMETHOD_FORMALS (z); + env = EXTEND_ENV (formals, t.arg1, SCM_CMETHOD_ENV (z)); + x = SCM_CMETHOD_BODY (z); + goto nontoplevel_begin; + } + } } case (SCM_ISYMNUM (SCM_IM_SLOT_REF)): @@ -2806,7 +2865,7 @@ evapply: if (SCM_OBJ_CLASS_FLAGS (proc) & SCM_CLASSF_PURE_GENERIC) { x = SCM_ENTITY_PROCEDURE (proc); - arg2 = SCM_EOL; + t.arg1 = SCM_EOL; goto type_dispatch; } else if (!SCM_I_OPERATORP (proc)) @@ -2951,9 +3010,9 @@ evapply: { x = SCM_ENTITY_PROCEDURE (proc); #ifdef DEVAL - arg2 = debug.info->a.args; + t.arg1 = debug.info->a.args; #else - arg2 = scm_list_1 (t.arg1); + t.arg1 = scm_list_1 (t.arg1); #endif goto type_dispatch; } @@ -3047,9 +3106,9 @@ evapply: { x = SCM_ENTITY_PROCEDURE (proc); #ifdef DEVAL - arg2 = debug.info->a.args; + t.arg1 = debug.info->a.args; #else - arg2 = scm_list_2 (t.arg1, arg2); + t.arg1 = scm_list_2 (t.arg1, arg2); #endif goto type_dispatch; } @@ -3259,9 +3318,9 @@ evapply: if (SCM_OBJ_CLASS_FLAGS (proc) & SCM_CLASSF_PURE_GENERIC) { #ifdef DEVAL - arg2 = debug.info->a.args; + t.arg1 = debug.info->a.args; #else - arg2 = scm_cons2 (t.arg1, arg2, scm_eval_args (x, env, proc)); + t.arg1 = scm_cons2 (t.arg1, arg2, scm_eval_args (x, env, proc)); #endif x = SCM_ENTITY_PROCEDURE (proc); goto type_dispatch; diff --git a/libguile/goops.h b/libguile/goops.h index fb83005a9..6f4b48c1d 100644 --- a/libguile/goops.h +++ b/libguile/goops.h @@ -144,6 +144,7 @@ typedef struct scm_t_method { #define SCM_SLOT(x, i) (SCM_PACK (SCM_INST (x) [i])) #define SCM_SET_SLOT(x, i, v) (SCM_INST (x) [i] = SCM_UNPACK (v)) +#define SCM_INSTANCE_HASH(c, i) (SCM_INST (c) [scm_si_hashsets + (i)]) #define SCM_SET_HASHSET(c, i, h) (SCM_INST (c) [scm_si_hashsets + (i)] = (h)) #define SCM_SUBCLASSP(c1, c2) (!SCM_FALSEP (scm_c_memq (c2, SCM_SLOT (c1, scm_si_cpl)))) diff --git a/libguile/objects.h b/libguile/objects.h index a2d77a23d..afeeb181a 100644 --- a/libguile/objects.h +++ b/libguile/objects.h @@ -190,6 +190,8 @@ typedef struct scm_effective_slot_definition { #define SCM_ESLOTDEF(x) ((scm_effective_slot_definition *) SCM_CDR (x)) #define SCM_CMETHOD_CODE(cmethod) SCM_CDR (cmethod) +#define SCM_CMETHOD_FORMALS(cmethod) SCM_CAR (SCM_CMETHOD_CODE (cmethod)) +#define SCM_CMETHOD_BODY(cmethod) SCM_CDR (SCM_CMETHOD_CODE (cmethod)) #define SCM_CMETHOD_ENV(cmethod) SCM_CAR (cmethod) /* Port classes */ From 1d15ecd303107c83a6da132b4f945b70ebbb182b Mon Sep 17 00:00:00 2001 From: Dirk Herrmann Date: Sun, 10 Mar 2002 07:53:27 +0000 Subject: [PATCH 15/29] * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref', 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and proc as temporary variables. Introduced temporary variables with hopefully descriptive names for clarification. Replaced SCM_N?IMP by a more explicit predicate in some places. --- libguile/ChangeLog | 10 +++++- libguile/eval.c | 79 +++++++++++++++++++++++++++------------------- 2 files changed, 56 insertions(+), 33 deletions(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index e28e1590f..d38558ab3 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,4 +1,12 @@ -2002-03-02 Dirk Herrmann +2002-03-10 Dirk Herrmann + + * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref', + 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and + proc as temporary variables. Introduced temporary variables with + hopefully descriptive names for clarification. Replaced SCM_N?IMP + by a more explicit predicate in some places. + +2002-03-09 Dirk Herrmann * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch. Added lots of comments regarding the implementation of #@dispatch. diff --git a/libguile/eval.c b/libguile/eval.c index 9ffd561f9..7869ecc23 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -2584,40 +2584,54 @@ dispatch: } } + case (SCM_ISYMNUM (SCM_IM_SLOT_REF)): x = SCM_CDR (x); - t.arg1 = EVALCAR (x, env); - RETURN (SCM_PACK (SCM_STRUCT_DATA (t.arg1) [SCM_INUM (SCM_CADR (x))])); - + { + SCM instance = EVALCAR (x, env); + unsigned long int slot = SCM_INUM (SCM_CADR (x)); + RETURN (SCM_PACK (SCM_STRUCT_DATA (instance) [slot])); + } + + case (SCM_ISYMNUM (SCM_IM_SLOT_SET_X)): x = SCM_CDR (x); - t.arg1 = EVALCAR (x, env); - x = SCM_CDR (x); - proc = SCM_CDR (x); - SCM_STRUCT_DATA (t.arg1) [SCM_INUM (SCM_CAR (x))] - = SCM_UNPACK (EVALCAR (proc, env)); - RETURN (SCM_UNSPECIFIED); + { + SCM instance = EVALCAR (x, env); + unsigned long int slot = SCM_INUM (SCM_CADR (x)); + SCM value = EVALCAR (SCM_CDDR (x), env); + SCM_STRUCT_DATA (instance) [slot] = SCM_UNPACK (value); + RETURN (SCM_UNSPECIFIED); + } + #ifdef SCM_ENABLE_ELISP case (SCM_ISYMNUM (SCM_IM_NIL_COND)): - proc = SCM_CDR (x); - while (SCM_NIMP (x = SCM_CDR (proc))) - { - if (!(SCM_FALSEP (t.arg1 = EVALCAR (proc, env)) - || SCM_NILP (t.arg1) - || SCM_NULLP (t.arg1))) - { - if (SCM_EQ_P (SCM_CAR (x), SCM_UNSPECIFIED)) - RETURN (t.arg1); - PREP_APPLY (SCM_UNDEFINED, SCM_EOL); - goto carloop; - } - proc = SCM_CDR (x); - } - x = proc; - PREP_APPLY (SCM_UNDEFINED, SCM_EOL); - goto carloop; + { + SCM test_form = SCM_CDR (x); + x = SCM_CDR (test_form); + while (!SCM_NULL_OR_NIL_P (x)) + { + SCM test_result = EVALCAR (test_form, env); + if (!(SCM_FALSEP (test_result) + || SCM_NULL_OR_NIL_P (test_result))) + { + if (SCM_EQ_P (SCM_CAR (x), SCM_UNSPECIFIED)) + RETURN (test_result); + PREP_APPLY (SCM_UNDEFINED, SCM_EOL); + goto carloop; + } + else + { + test_form = SCM_CDR (x); + x = SCM_CDR (test_form); + } + } + x = test_form; + PREP_APPLY (SCM_UNDEFINED, SCM_EOL); + goto carloop; + } #endif /* SCM_ENABLE_ELISP */ @@ -2639,12 +2653,12 @@ dispatch: scm_swap_bindings (vars, vals); scm_dynwinds = scm_acons (vars, vals, scm_dynwinds); - - arg2 = x = SCM_CDR (x); - while (!SCM_NULLP (arg2 = SCM_CDR (arg2))) + + /* Ignore all but the last evaluation result. */ + for (x = SCM_CDR (x); !SCM_NULLP (SCM_CDR (x)); x = SCM_CDR (x)) { - SIDEVAL (SCM_CAR (x), env); - x = arg2; + if (SCM_CONSP (SCM_CAR (x))) + SCM_CEVAL (SCM_CAR (x), env); } proc = EVALCAR (x, env); @@ -2654,6 +2668,7 @@ dispatch: RETURN (proc); } + case (SCM_ISYMNUM (SCM_IM_CALL_WITH_VALUES)): { proc = SCM_CDR (x); From ff0a837c208113f186a67505372995712c46e281 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Mon, 11 Mar 2002 17:51:18 +0000 Subject: [PATCH 16/29] (scm_string_capitalize_x): Treat characters as unsigned so that 8-bit chars work. Thanks to David Pirotte! --- libguile/strop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libguile/strop.c b/libguile/strop.c index 89cd02f62..d0696add5 100644 --- a/libguile/strop.c +++ b/libguile/strop.c @@ -410,12 +410,12 @@ SCM_DEFINE (scm_string_downcase, "string-downcase", 1, 0, 0, static SCM string_capitalize_x (SCM str) { - char *sz; + unsigned char *sz; long i, len; int in_word=0; len = SCM_STRING_LENGTH(str); - sz = SCM_STRING_CHARS (str); + sz = SCM_STRING_UCHARS (str); for(i=0; i Date: Mon, 11 Mar 2002 17:51:52 +0000 Subject: [PATCH 17/29] Removed FIXME comment about hoos for malloc and free. --- libguile/convert.i.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libguile/convert.i.c b/libguile/convert.i.c index e2c338a7a..45a3ea443 100644 --- a/libguile/convert.i.c +++ b/libguile/convert.i.c @@ -1,9 +1,5 @@ /* this file is #include'd (x times) by convert.c */ -/* FIXME: Should we use exported wrappers for malloc (and free), which - * allow windows DLLs to call the correct freeing function? */ - - /* Convert a vector, weak vector, (if possible string, substring), list or uniform vector into an C array. If the result array in argument 2 is NULL, malloc() a new one. If out of memory, return NULL. */ From bd7c7fc63729adf957331174badfba5f87f18d80 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Mon, 11 Mar 2002 17:52:41 +0000 Subject: [PATCH 18/29] (string_titlecase_x): Treat characters as unsigned so that 8-bit chars work. Thanks to David Pirotte! --- srfi/srfi-13.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srfi/srfi-13.c b/srfi/srfi-13.c index 3d32cf744..38d53fece 100644 --- a/srfi/srfi-13.c +++ b/srfi/srfi-13.c @@ -2106,10 +2106,10 @@ SCM_DEFINE (scm_string_downcaseS, "string-downcase", 1, 2, 0, static SCM string_titlecase_x (SCM str, int start, int end) { - char * sz; + unsigned char * sz; int i, in_word = 0; - sz = SCM_STRING_CHARS (str); + sz = SCM_STRING_UCHARS (str); for(i = start; i < end; i++) { if (!SCM_FALSEP (scm_char_alphabetic_p (SCM_MAKE_CHAR (sz[i])))) From 16d98032a4d403ddc8f2c01f5d1413af40c71f32 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Mon, 11 Mar 2002 17:52:56 +0000 Subject: [PATCH 19/29] *** empty log message *** --- TODO | 2 ++ libguile/ChangeLog | 5 +++++ srfi/ChangeLog | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/TODO b/TODO index 905253d91..7f952e053 100644 --- a/TODO +++ b/TODO @@ -18,6 +18,8 @@ that user-visible changes are reflected in NEWS. * Eventually +- Unify SRFI-4 and the existing uniform array code, cleaning it up in + the process. - [after signal handling and threading have been fixed] remove the code corresponding to GUILE_OLD_ASYNC_CLICK and the corresponding GUILE_OLD_ASYNC_CLICK macro. diff --git a/libguile/ChangeLog b/libguile/ChangeLog index d38558ab3..94b68996f 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,8 @@ +2002-03-11 Marius Vollmer + + * strop.c (scm_string_capitalize_x): Treat characters as unsigned + so that 8-bit chars work. Thanks to David Pirotte! + 2002-03-10 Dirk Herrmann * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref', diff --git a/srfi/ChangeLog b/srfi/ChangeLog index 85d30f6f8..ed187389a 100644 --- a/srfi/ChangeLog +++ b/srfi/ChangeLog @@ -1,3 +1,8 @@ +2002-03-11 Marius Vollmer + + * srfi-13.c (string_titlecase_x): Treat characters as unsigned so + that 8-bit chars work. Thanks to David Pirotte! + 2002-02-24 Rob Browning * Makefile.am (libguile_srfi_srfi_4_la_LDFLAGS): use From 8794207d2ea092a901d3efc1f2d12ffa0b80de83 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Mon, 11 Mar 2002 17:57:47 +0000 Subject: [PATCH 20/29] Corrected function name in entry header. --- libguile/ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 94b68996f..0f529a5eb 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,7 +1,7 @@ 2002-03-11 Marius Vollmer - * strop.c (scm_string_capitalize_x): Treat characters as unsigned - so that 8-bit chars work. Thanks to David Pirotte! + * strop.c (string_capitalize_x): Treat characters as unsigned so + that 8-bit chars work. Thanks to David Pirotte! 2002-03-10 Dirk Herrmann From ba74ef4eae2649905eeb03e573fee5cd669ca371 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Mon, 11 Mar 2002 19:10:01 +0000 Subject: [PATCH 21/29] (scm_divide): Adapt code from libstdc++/f2c to void potential overflow problems. Thanks to John W Eaton! --- libguile/numbers.c | 65 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 7 deletions(-) diff --git a/libguile/numbers.c b/libguile/numbers.c index 98c045b78..baecf0210 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -1,4 +1,8 @@ /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. + * + * Portions Copyright 1990, 1991, 1992, 1993 by AT&T Bell Laboratories + * and Bellcore. See scm_divide. + * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -3691,6 +3695,33 @@ scm_num2dbl (SCM a, const char *why) #undef FUNC_NAME +/* The code below for complex division is adapted from the GNU + libstdc++, which adapted it from f2c's libF77, and is subject to + this copyright: */ + +/**************************************************************** +Copyright 1990, 1991, 1992, 1993 by AT&T Bell Laboratories and Bellcore. + +Permission to use, copy, modify, and distribute this software +and its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the names of AT&T Bell Laboratories or +Bellcore or any of their entities not be used in advertising or +publicity pertaining to distribution of the software without +specific, written prior permission. + +AT&T and Bellcore disclaim all warranties with regard to this +software, including all implied warranties of merchantability +and fitness. In no event shall AT&T or Bellcore be liable for +any special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether +in an action of contract, negligence or other tortious action, +arising out of or in connection with the use or performance of +this software. +****************************************************************/ + SCM_GPROC1 (s_divide, "/", scm_tc7_asubr, scm_divide, g_divide); /* Divide the first argument by the product of the remaining arguments. If called with one argument @var{z1}, 1/@var{z1} is @@ -3724,8 +3755,15 @@ scm_divide (SCM x, SCM y) } else if (SCM_COMPLEXP (x)) { double r = SCM_COMPLEX_REAL (x); double i = SCM_COMPLEX_IMAG (x); - double d = r * r + i * i; - return scm_make_complex (r / d, -i / d); + if (r <= i) { + double t = r / i; + double d = i * (1.0 + t * t); + return scm_make_complex (t / d, -1.0 / d); + } else { + double t = i / r; + double d = r * (1.0 + t * t); + return scm_make_complex (1.0 / d, -t / d); + } } else { SCM_WTA_DISPATCH_1 (g_divide, x, SCM_ARG1, s_divide); } @@ -3765,8 +3803,15 @@ scm_divide (SCM x, SCM y) { double r = SCM_COMPLEX_REAL (y); double i = SCM_COMPLEX_IMAG (y); - double d = r * r + i * i; - return scm_make_complex ((a * r) / d, (-a * i) / d); + if (r <= i) { + double t = r / i; + double d = i * (1.0 + t * t); + return scm_make_complex ((a * t) / d, -a / d); + } else { + double t = i / r; + double d = r * (1.0 + t * t); + return scm_make_complex (a / d, -(a * t) / d); + } } } else { SCM_WTA_DISPATCH_2 (g_divide, x, y, SCM_ARGn, s_divide); @@ -3870,9 +3915,15 @@ scm_divide (SCM x, SCM y) } else if (SCM_COMPLEXP (y)) { double ry = SCM_COMPLEX_REAL (y); double iy = SCM_COMPLEX_IMAG (y); - double d = ry * ry + iy * iy; - return scm_make_complex ((rx * ry + ix * iy) / d, - (ix * ry - rx * iy) / d); + if (ry <= iy) { + double t = ry / iy; + double d = iy * (1.0 + t * t); + return scm_make_complex ((rx * t + ix) / d, (ix * t - rx) / d); + } else { + double t = iy / ry; + double d = ry * (1.0 + t * t); + return scm_make_complex ((rx + ix * t) / d, (ix - rx * t) / d); + } } else { SCM_WTA_DISPATCH_2 (g_divide, x, y, SCM_ARGn, s_divide); } From 469b963c661fe72f218e7765adfa1ef37952c7f0 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Mon, 11 Mar 2002 19:10:28 +0000 Subject: [PATCH 22/29] New tests for complex division. --- test-suite/tests/numbers.test | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/test-suite/tests/numbers.test b/test-suite/tests/numbers.test index 03998bd41..e0577a008 100644 --- a/test-suite/tests/numbers.test +++ b/test-suite/tests/numbers.test @@ -1421,7 +1421,30 @@ (pass-if-exception "(/ +i 0.0)" exception:numerical-overflow - (/ +i 0.0)))) + (/ +i 0.0))) + + (with-test-prefix "complex division" + + (pass-if "(/ 3+4i)" + (= (/ 3+4i) 0.12-0.16i)) + + (pass-if "(/ 4+3i)" + (= (/ 4+3i) 0.16-0.12i)) + + (pass-if "(/ 25+125i 3+4i)" + (= (/ 25+125i 3+4i) 23.0+11.0i)) + + (pass-if "(/ 25+125i 4+3i)" + (= (/ 25+125i 4+3i) 19.0+17.0i)) + + (pass-if "(/ 25 3+4i)" + (= (/ 25 3+4i) 3.0-4.0i)) + + (pass-if "(/ 25 4+3i)" + (= (/ 25 4+3i) 4.0-3.0i)) + + (pass-if "(/ 1e200+1e200i)" + (= (/ 1e200+1e200i) 5.0e-201-5.0e-201i)))) ;;; ;;; truncate From 5046250eb77e43ff571bd0926f3403b5e07ce5b6 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Mon, 11 Mar 2002 19:10:47 +0000 Subject: [PATCH 23/29] *** empty log message *** --- AUTHORS | 3 +++ THANKS | 2 ++ libguile/ChangeLog | 3 +++ 3 files changed, 8 insertions(+) diff --git a/AUTHORS b/AUTHORS index 74cdb2ba1..9df01eb13 100644 --- a/AUTHORS +++ b/AUTHORS @@ -322,3 +322,6 @@ In the subdirectory libguile, changes to: continuations.h continuations.c gc.c + +John W. Eaton, based on code from AT&T Bell Laboratories and Bellcore: + The complex number division method in libguile/numbers.c. diff --git a/THANKS b/THANKS index 2a43632eb..1dd99f015 100644 --- a/THANKS +++ b/THANKS @@ -12,11 +12,13 @@ For fixes or providing information which led to a fix: Brian Crowder Christopher Cramer Alexandre Duret-Lutz + John W Eaton Aubrey Jaffer Eric Gillespie, Jr John Goerzen Han-Wen Nienhuys Ron Peterson + David Pirotte Ken Raeburn Bill Schottstaedt Momchil Velikov diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 0f529a5eb..812415ad4 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,5 +1,8 @@ 2002-03-11 Marius Vollmer + * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void + potential overflow problems. Thanks to John W Eaton! + * strop.c (string_capitalize_x): Treat characters as unsigned so that 8-bit chars work. Thanks to David Pirotte! From fd1fcb7f9e26945ce8b1314a4e40557112ecd441 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Mon, 11 Mar 2002 19:29:35 +0000 Subject: [PATCH 24/29] *** empty log message *** --- TODO | 120 ----------------------------------------------------------- 1 file changed, 120 deletions(-) diff --git a/TODO b/TODO index 7f952e053..e69de29bb 100644 --- a/TODO +++ b/TODO @@ -1,120 +0,0 @@ -The Guile TODO List (actually, an -*-outline-*-) - -* Protocol - -These TODO items are grouped by target release version. The first group is -the "Eventually" group, which is not associated w/ any particular version. -Items should be initially added to this group, and then later moved under a -version upon either ownership or sponsorship. - -Maintainers (w/ write privs) indicate ownership by `[USERNAME]'. Use -`[ACTUAL-OWNER:MAINTAINER]' to indicate sponsorship, where both elements are -usernames. - -Upon completion, simply change the "-" to a "+", but do not delete the item. -At release time, the "+" entries will be deleted after review to make sure -that user-visible changes are reflected in NEWS. - - -* Eventually - -- Unify SRFI-4 and the existing uniform array code, cleaning it up in - the process. -- [after signal handling and threading have been fixed] remove the code - corresponding to GUILE_OLD_ASYNC_CLICK and the corresponding - GUILE_OLD_ASYNC_CLICK macro. -- implement and integrate generational garbage collection -- add POSIX thread support -- factor thread support out of libguile -- protect common resources using mutecis from the new interface -- remove the dynamic roots -- revise the fluid implementation -- implement the GC thread synchronization (all threads: go to sleep!) -- implementing the libguileposix threads glue library -- develop better representation for GOOPS objects -- write Orbit CORBA interface -- [after new module system] factor out modules sort.c and random.c should be - factored out into separate modules -- include malloc debugging code in an optional file in libguile -- fix looking up procedure names in environment in backtraces -- implement srcprops using double cells -- use "real" procprops -- add facilities for easily debugging Scheme programs from Emacs -- write good interface to Tk -- write translators for additional languages - - Perl - - Python - - TCL - - Emacs Lisp - - Rexx -- make GDB work with Guile -- use the SCM trick of tagging environments with immediates (see m_letrec1) - to convert source correctly in unmemocopy -- eliminate argument checking for closures -- Implement a thread-safe alternative to SCM's environment caches -- rename ice-9 to something more obvious -- implement implicitly shared substrings (thread-safe, copy on write). In - this context, the concept of read-only-strings might be re-introduced to - implement the symbol->string semantics of R5RS. -- implement internationalized strings -- revise the uniform vector implementation -- make the set of error signalling functions more consistent -- Fix bug reported by Sven.Hartrumpf@fernuni-hagen.de 2001-08-31: - (debug-disable 'debug) has no effect if it is the first form in ~/.guile. -- provide a non-extended implementation of 'define' for the R5RS module. - - -* Before releasing 1.8.0: - -- deprecate old uniform vector interface. - -- add DLL support [ela] <-- set by ttn (my bad) - -- write emacs/patch.el [ttn] - + outgoing - - incoming - -+ sync srfi-modules.texi [ttn] - -- For GOOPS: [ttn] - - rewrite method cache management in C - - rewrite core macros (define-class et al) in C - - define C API - -- Compile with --enable-error-on-warning without failure. Requires a - number of fixes, including num2integral.i.c and on some platforms - gc_os_dep.c. Also SCM_FIXABLE etc. will produce unavoidable - warnings on some platforms with some vars as written now. i.e. on - alphas, SCM_FIXABLE(some_int) is always true. We need more - conditional compilation or similar. - -- Move sample .gdbinit in HACKING to somewhere more appropriate (manual?). - -- Make sure we have appropriate interface numbers for shared - libraries, and that we document and use the libtool - conventions. [rlb]. - -- Update the version numbers in GUILE-VERSION and README. [rlb] - -- Start a new section of the NEWS file. - - -* Before releasing 1.10.0: - -- in boot-9.scm: - remove deprecated function `feature?´. - -- gc.c and gc.h: - remove deprecated macros SCM_NEWCELL and SCM_NEWCELL2 together with - their support staffing scm_deprecated_newcell, - scm_deprecated_newcell2, scm_tc16_allocated, mark_allocated. - -- in gc.c and gc.h: - Remove deprecated functions scm_must_malloc, - scm_must_realloc, scm_must_free, scm_done_malloc, scm_done_free, - scm_must_strndup, scm_must_strdup. - -- Change return types of smob and port free functions to void. - They should all return zero by now. - -[TODO ends here] From 413d32b658ced090c4d068863e29948b79243bd6 Mon Sep 17 00:00:00 2001 From: Neil Jerram Date: Tue, 12 Mar 2002 21:08:57 +0000 Subject: [PATCH 25/29] Various minor enhancements ported from the stable CVS branch. --- doc/ref/ChangeLog | 6 ++++++ doc/ref/data-rep.texi | 3 ++- doc/ref/scheme-evaluation.texi | 4 ++-- doc/ref/scheme-options.texi | 1 + doc/ref/scheme-translation.texi | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/ref/ChangeLog b/doc/ref/ChangeLog index ec8a5ada7..18ecbffe5 100644 --- a/doc/ref/ChangeLog +++ b/doc/ref/ChangeLog @@ -1,3 +1,9 @@ +2002-03-12 Neil Jerram + + * data-rep.texi, guile.texi, scheme-evaluation.texi, + scheme-options.texi, scheme-translation.texi: Various minor + enhancements ported from the stable CVS branch. + 2002-03-08 Thien-Thi Nguyen * tools.texi (Miscellaneous Tools): New node/chapter. diff --git a/doc/ref/data-rep.texi b/doc/ref/data-rep.texi index d3a9aa678..6e0dc1ae0 100644 --- a/doc/ref/data-rep.texi +++ b/doc/ref/data-rep.texi @@ -46,7 +46,7 @@ @c essay @sp 10 @c essay @comment The title is printed in a large font. @c essay @title Data Representation in Guile -@c essay @subtitle $Id: data-rep.texi,v 1.5 2002-03-01 00:19:20 dirk Exp $ +@c essay @subtitle $Id: data-rep.texi,v 1.6 2002-03-12 21:08:57 ossau Exp $ @c essay @subtitle For use with Guile @value{VERSION} @c essay @author Jim Blandy @c essay @author Free Software Foundation @@ -1609,6 +1609,7 @@ make_image (SCM name, SCM s_width, SCM s_height) @} @end example + @node Type checking @subsection Type checking diff --git a/doc/ref/scheme-evaluation.texi b/doc/ref/scheme-evaluation.texi index d9854fe6d..fbfcd87a8 100644 --- a/doc/ref/scheme-evaluation.texi +++ b/doc/ref/scheme-evaluation.texi @@ -175,7 +175,7 @@ options and switches them on, @code{read-disable} switches them off. @deffnx {C Function} scm_read_options (setting) Option interface for the read options. Instead of using this procedure directly, use the procedures @code{read-enable}, -@code{read-disable}, @code{read-set!} and @var{read-options}. +@code{read-disable}, @code{read-set!} and @code{read-options}. @end deffn @@ -386,7 +386,7 @@ options and switches them on, @code{eval-disable} switches them off. @deffnx {C Function} scm_eval_options_interface (setting) Option interface for the evaluation options. Instead of using this procedure directly, use the procedures @code{eval-enable}, -@code{eval-disable}, @code{eval-set!} and @var{eval-options}. +@code{eval-disable}, @code{eval-set!} and @code{eval-options}. @end deffn @c FIXME::martin: Why aren't these procedure named like the other options diff --git a/doc/ref/scheme-options.texi b/doc/ref/scheme-options.texi index 12c49c3a8..e2ab70429 100644 --- a/doc/ref/scheme-options.texi +++ b/doc/ref/scheme-options.texi @@ -154,6 +154,7 @@ closure-hook #f Hook for printing closures. @node Evaluator options @section Evaluator options + These are the evaluator options with their default values, as they are printed by typing @code{(eval-options 'full)} in Guile. diff --git a/doc/ref/scheme-translation.texi b/doc/ref/scheme-translation.texi index e0e1aff41..4d398c60f 100644 --- a/doc/ref/scheme-translation.texi +++ b/doc/ref/scheme-translation.texi @@ -28,7 +28,7 @@ is Scheme's end-of-list. @deffnx {C Function} scm_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. +a Lisp nil. @end deffn @deffn {Scheme Procedure} nil-eq x y From 04a98cff96351d0e3dd47a201592d84ba3edd688 Mon Sep 17 00:00:00 2001 From: Neil Jerram Date: Tue, 12 Mar 2002 21:12:25 +0000 Subject: [PATCH 26/29] * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds, rreadfds, rwritefds, rexceptfds): Made static. * gc.c (terminating), fports.c (terminating): Renamed scm_i_terminating. --- libguile/ChangeLog | 8 ++++++++ libguile/fports.c | 4 ++-- libguile/gc.c | 4 ++-- libguile/iselect.c | 16 ++++++++-------- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 812415ad4..2adb13d62 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,11 @@ +2002-03-12 Neil Jerram + + * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds, + rreadfds, rwritefds, rexceptfds): Made static. + + * gc.c (terminating), fports.c (terminating): Renamed + scm_i_terminating. + 2002-03-11 Marius Vollmer * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void diff --git a/libguile/fports.c b/libguile/fports.c index 2fe0bee0c..55f4782a3 100644 --- a/libguile/fports.c +++ b/libguile/fports.c @@ -727,7 +727,7 @@ fport_write (SCM port, const void *data, size_t size) /* becomes 1 when process is exiting: normal exception handling won't work by this time. */ -extern int terminating; +extern int scm_i_terminating; static void fport_flush (SCM port) @@ -759,7 +759,7 @@ fport_flush (SCM port) } pt->write_pos = pt->write_buf + remaining; } - if (terminating) + if (scm_i_terminating) { const char *msg = "Error: could not flush file-descriptor "; char buf[11]; diff --git a/libguile/gc.c b/libguile/gc.c index 3da2861e1..a96e9df9c 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -2585,7 +2585,7 @@ scm_gc_unregister_roots (SCM *b, unsigned long n) scm_gc_unregister_root (p); } -int terminating; +int scm_i_terminating; /* called on process termination. */ #ifdef HAVE_ATEXIT @@ -2602,7 +2602,7 @@ cleanup (int status, void *arg) #endif #endif { - terminating = 1; + scm_i_terminating = 1; scm_flush_all_ports (); } diff --git a/libguile/iselect.c b/libguile/iselect.c index 2024f15f3..215258001 100644 --- a/libguile/iselect.c +++ b/libguile/iselect.c @@ -100,21 +100,21 @@ int scm_I_am_dead; /* This flag indicates that several threads are waiting on the same file descriptor. When this is the case, the common fd sets are updated in a more inefficient way. */ -int collisionp; +static int collisionp; /* These are the common fd sets. When new select calls are made, those sets are merged into these. */ -int gnfds; -SELECT_TYPE greadfds; -SELECT_TYPE gwritefds; -SELECT_TYPE gexceptfds; +static int gnfds; +static SELECT_TYPE greadfds; +static SELECT_TYPE gwritefds; +static SELECT_TYPE gexceptfds; /* These are the result sets. They are used when we call OS select. We couldn't use the common fd sets above, since that would destroy them. */ -SELECT_TYPE rreadfds; -SELECT_TYPE rwritefds; -SELECT_TYPE rexceptfds; +static SELECT_TYPE rreadfds; +static SELECT_TYPE rwritefds; +static SELECT_TYPE rexceptfds; /* Constant timeval struct representing a zero timeout which we use when polling. */ From efb378b01fca21fe3d569b5de02a532eba8782f3 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Tue, 12 Mar 2002 21:52:40 +0000 Subject: [PATCH 27/29] * guile-config.in (build-link): don't output -L/usr/lib. (build-compile): don't output -I/usr/include. --- guile-config/guile-config.in | 85 +++++++++++++++++++++--------------- 1 file changed, 50 insertions(+), 35 deletions(-) diff --git a/guile-config/guile-config.in b/guile-config/guile-config.in index 54ed9772e..ff3f08a7e 100644 --- a/guile-config/guile-config.in +++ b/guile-config/guile-config.in @@ -140,35 +140,45 @@ (string-append program-name " link: arguments to subcommand not yet implemented"))) - (let* ((flags - (let loop ((libs - ;; Get the string of linker flags we used to build - ;; Guile, and break it up into a list. - (separate-fields-discarding-char #\space - (get-build-info 'LIBS) - list))) - - (cond - ((null? libs) '()) - - ;; Turn any "FOO/libBAR.a" elements into "-lBAR". - ((match-lib (car libs)) - => (lambda (bar) - (cons (string-append "-l" bar) - (loop (cdr libs))))) - - ;; Remove any empty strings that may have seeped in there. - ((string=? (car libs) "") (loop (cdr libs))) - - (else (cons (car libs) (loop (cdr libs))))))) - - ;; Include libguile itself in the list, along with the - ;; directory it was installed in. - (flags (cons (string-append "-L" (get-build-info 'libdir)) - (cons "-lguile" flags)))) - + (let ((libdir (get-build-info 'libdir)) + (other-flags + (let loop ((libs + ;; Get the string of linker flags we used to build + ;; Guile, and break it up into a list. + (separate-fields-discarding-char #\space + (get-build-info 'LIBS) + list))) + + (cond + ((null? libs) '()) + + ;; Turn any "FOO/libBAR.a" elements into "-lBAR". + ((match-lib (car libs)) + => (lambda (bar) + (cons (string-append "-l" bar) + (loop (cdr libs))))) + + ;; Remove any empty strings that may have seeped in there. + ((string=? (car libs) "") (loop (cdr libs))) + + (else (cons (car libs) (loop (cdr libs)))))))) + + ;; Include libguile itself in the list, along with the directory + ;; it was installed in, but do *not* add /usr/lib since that may + ;; prevent other programs from specifying non-/usr/lib versions + ;; via their foo-config scripts. If *any* app puts -L/usr/lib in + ;; the output of its foo-config script then it may prevent the use + ;; a non-/usr/lib install of anything that also has a /usr/lib + ;; install. For now we hard-code /usr/lib, but later maybe we can + ;; do something more dynamic (i.e. what do we need. + ;; Display the flags, separated by spaces. - (display-separated flags) + (if (or (string=? libdir "/usr/lib") + (string=? libdir "/usr/lib/")) + (display-separated (cons "-lguile" other-flags)) + (display-separated (cons + (string-append "-L" (get-build-info 'libdir)) + (cons "-lguile" other-flags)))) (newline))) (define (help-link) @@ -191,7 +201,12 @@ (error (string-append program-name " compile: no arguments expected"))) - (display-line "-I" (get-build-info 'includedir))) + + ;; See gcc manual wrt fixincludes. Search for "Use of + ;; `-I/usr/include' may cause trouble." For now we hard-code this. + ;; Later maybe we can do something more dynamic. + (if (not (string=? (get-build-info 'includedir) "/usr/include")) + (display-line "-I" (get-build-info 'includedir)))) (define (help-compile) (let ((dle display-line-error)) @@ -258,12 +273,12 @@ (newline port)) (define (display-separated args) - (let loop ((args args)) - (cond ((null? args)) - ((null? (cdr args)) (display (car args))) - (else (display (car args)) - (display " ") - (loop (cdr args)))))) + (if (not (null? args)) + (begin + (display (car args)) + (for-each + (lambda (arg) (display " ") (display arg)) + (cdr args))))) ;;;; the command table From 56fd1933cc51d7e817bc0a1b515da8629c9c892f Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Tue, 12 Mar 2002 21:53:56 +0000 Subject: [PATCH 28/29] * syncase.scm: fix bad let. (gensym): fix failure on non-threaded --- ice-9/syncase.scm | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/ice-9/syncase.scm b/ice-9/syncase.scm index dc8c321c7..1a2cc01c4 100644 --- a/ice-9/syncase.scm +++ b/ice-9/syncase.scm @@ -160,17 +160,36 @@ ;; (define gensym (let ((counter 0)) + + (define next-id + (if (provided? 'threads) + (let ((symlock (make-mutex))) + (lambda () + (let ((result #f)) + (with-mutex symlock + (set! result counter) + (set! counter (+ counter 1))) + result))) + ;; faster, non-threaded case. + (lambda () + (let ((result counter)) + (set! counter (+ counter 1)) + result)))) + + ;; actual gensym body code. (lambda (. rest) - (let ((val (number->string counter))) - (set! counter (+ counter 1)) - (cond - ((null? rest) - (string->symbol (string-append "syntmp-" val))) - ((null? (cdr rest)) - (string->symbol (string-append "syntmp-" (car rest) "-" val))) - (else - (error - "syncase's gensym called with the wrong number of arguments"))))))) + (let* ((next-val (next-id)) + (valstr (number->string next-val))) + (cond + ((null? rest) + (string->symbol (string-append "syntmp-" valstr))) + ((null? (cdr rest)) + (string->symbol (string-append "syntmp-" (car rest) "-" valstr))) + (else + (error + (string-append + "syncase's gensym expected 0 or 1 arguments, got " + (length rest))))))))) ;;; Load the preprocessed code From 21b83aabb2c479d333a8a4e3f719f3c177da3689 Mon Sep 17 00:00:00 2001 From: Neil Jerram Date: Tue, 12 Mar 2002 21:54:22 +0000 Subject: [PATCH 29/29] Automatic updates from snarfed libguile docstrings. --- doc/maint/ChangeLog | 4 + doc/maint/guile.texi | 810 +++++++++++++++++++++++++++++++++-- doc/ref/ChangeLog | 3 + doc/ref/new-docstrings.texi | 10 + doc/ref/scheme-compound.texi | 2 +- doc/ref/scheme-data.texi | 2 +- 6 files changed, 791 insertions(+), 40 deletions(-) diff --git a/doc/maint/ChangeLog b/doc/maint/ChangeLog index 3508a73be..013a5377d 100644 --- a/doc/maint/ChangeLog +++ b/doc/maint/ChangeLog @@ -1,3 +1,7 @@ +2002-03-12 Neil Jerram + + * guile.texi: Replaced by regenerated libguile version. + 2002-03-08 Neil Jerram * docstring.el (docstring-libguile-directory, diff --git a/doc/maint/guile.texi b/doc/maint/guile.texi index 1b7eb67c9..516591987 100644 --- a/doc/maint/guile.texi +++ b/doc/maint/guile.texi @@ -1,6 +1,6 @@ -@paragraphindent 0 acons +@c snarfed from alist.c:59 @deffn {Scheme Procedure} acons key value alist @deffnx {C Function} scm_acons (key, value, alist) Add a new key-value pair to @var{alist}. A new pair is @@ -10,6 +10,7 @@ function is @emph{not} destructive; @var{alist} is not modified. @end deffn sloppy-assq +@c snarfed from alist.c:73 @deffn {Scheme Procedure} sloppy-assq key alist @deffnx {C Function} scm_sloppy_assq (key, alist) Behaves like @code{assq} but does not do any error checking. @@ -17,6 +18,7 @@ Recommended only for use in Guile internals. @end deffn sloppy-assv +@c snarfed from alist.c:91 @deffn {Scheme Procedure} sloppy-assv key alist @deffnx {C Function} scm_sloppy_assv (key, alist) Behaves like @code{assv} but does not do any error checking. @@ -24,6 +26,7 @@ Recommended only for use in Guile internals. @end deffn sloppy-assoc +@c snarfed from alist.c:109 @deffn {Scheme Procedure} sloppy-assoc key alist @deffnx {C Function} scm_sloppy_assoc (key, alist) Behaves like @code{assoc} but does not do any error checking. @@ -31,6 +34,7 @@ Recommended only for use in Guile internals. @end deffn assq +@c snarfed from alist.c:136 @deffn {Scheme Procedure} assq key alist @deffnx {Scheme Procedure} assv key alist @deffnx {Scheme Procedure} assoc key alist @@ -45,18 +49,21 @@ return the entire alist entry found (i.e. both the key and the value). @end deffn assv +@c snarfed from alist.c:157 @deffn {Scheme Procedure} assv key alist @deffnx {C Function} scm_assv (key, alist) Behaves like @code{assq} but uses @code{eqv?} for key comparison. @end deffn assoc +@c snarfed from alist.c:178 @deffn {Scheme Procedure} assoc key alist @deffnx {C Function} scm_assoc (key, alist) Behaves like @code{assq} but uses @code{equal?} for key comparison. @end deffn assq-ref +@c snarfed from alist.c:222 @deffn {Scheme Procedure} assq-ref alist key @deffnx {Scheme Procedure} assv-ref alist key @deffnx {Scheme Procedure} assoc-ref alist key @@ -74,18 +81,21 @@ where @var{associator} is one of @code{assq}, @code{assv} or @code{assoc}. @end deffn assv-ref +@c snarfed from alist.c:239 @deffn {Scheme Procedure} assv-ref alist key @deffnx {C Function} scm_assv_ref (alist, key) Behaves like @code{assq-ref} but uses @code{eqv?} for key comparison. @end deffn assoc-ref +@c snarfed from alist.c:256 @deffn {Scheme Procedure} assoc-ref alist key @deffnx {C Function} scm_assoc_ref (alist, key) Behaves like @code{assq-ref} but uses @code{equal?} for key comparison. @end deffn assq-set! +@c snarfed from alist.c:285 @deffn {Scheme Procedure} assq-set! alist key val @deffnx {Scheme Procedure} assv-set! alist key value @deffnx {Scheme Procedure} assoc-set! alist key value @@ -101,18 +111,21 @@ association list. @end deffn assv-set! +@c snarfed from alist.c:303 @deffn {Scheme Procedure} assv-set! alist key val @deffnx {C Function} scm_assv_set_x (alist, key, val) Behaves like @code{assq-set!} but uses @code{eqv?} for key comparison. @end deffn assoc-set! +@c snarfed from alist.c:321 @deffn {Scheme Procedure} assoc-set! alist key val @deffnx {C Function} scm_assoc_set_x (alist, key, val) Behaves like @code{assq-set!} but uses @code{equal?} for key comparison. @end deffn assq-remove! +@c snarfed from alist.c:345 @deffn {Scheme Procedure} assq-remove! alist key @deffnx {Scheme Procedure} assv-remove! alist key @deffnx {Scheme Procedure} assoc-remove! alist key @@ -122,18 +135,21 @@ the resulting alist. @end deffn assv-remove! +@c snarfed from alist.c:361 @deffn {Scheme Procedure} assv-remove! alist key @deffnx {C Function} scm_assv_remove_x (alist, key) Behaves like @code{assq-remove!} but uses @code{eqv?} for key comparison. @end deffn assoc-remove! +@c snarfed from alist.c:377 @deffn {Scheme Procedure} assoc-remove! alist key @deffnx {C Function} scm_assoc_remove_x (alist, key) Behaves like @code{assq-remove!} but uses @code{equal?} for key comparison. @end deffn make-arbiter +@c snarfed from arbiters.c:82 @deffn {Scheme Procedure} make-arbiter name @deffnx {C Function} scm_make_arbiter (name) Return an object of type arbiter and name @var{name}. Its @@ -142,6 +158,7 @@ process synchronization. @end deffn try-arbiter +@c snarfed from arbiters.c:92 @deffn {Scheme Procedure} try-arbiter arb @deffnx {C Function} scm_try_arbiter (arb) Return @code{#t} and lock the arbiter @var{arb} if the arbiter @@ -149,6 +166,7 @@ was unlocked. Otherwise, return @code{#f}. @end deffn release-arbiter +@c snarfed from arbiters.c:113 @deffn {Scheme Procedure} release-arbiter arb @deffnx {C Function} scm_release_arbiter (arb) Return @code{#t} and unlock the arbiter @var{arb} if the @@ -156,12 +174,14 @@ arbiter was locked. Otherwise, return @code{#f}. @end deffn async +@c snarfed from async.c:289 @deffn {Scheme Procedure} async thunk @deffnx {C Function} scm_async (thunk) Create a new async for the procedure @var{thunk}. @end deffn system-async +@c snarfed from async.c:299 @deffn {Scheme Procedure} system-async thunk @deffnx {C Function} scm_system_async (thunk) Create a new async for the procedure @var{thunk}. Also @@ -169,24 +189,28 @@ add it to the system's list of active async objects. @end deffn async-mark +@c snarfed from async.c:310 @deffn {Scheme Procedure} async-mark a @deffnx {C Function} scm_async_mark (a) Mark the async @var{a} for future execution. @end deffn system-async-mark +@c snarfed from async.c:326 @deffn {Scheme Procedure} system-async-mark a @deffnx {C Function} scm_system_async_mark (a) Mark the async @var{a} for future execution. @end deffn run-asyncs +@c snarfed from async.c:351 @deffn {Scheme Procedure} run-asyncs list_of_a @deffnx {C Function} scm_run_asyncs (list_of_a) Execute all thunks from the asyncs of the list @var{list_of_a}. @end deffn noop +@c snarfed from async.c:385 @deffn {Scheme Procedure} noop . args @deffnx {C Function} scm_noop (args) Do nothing. When called without arguments, return @code{#f}, @@ -194,18 +218,21 @@ otherwise return the first argument. @end deffn unmask-signals +@c snarfed from async.c:437 @deffn {Scheme Procedure} unmask-signals @deffnx {C Function} scm_unmask_signals () Unmask signals. The returned value is not specified. @end deffn mask-signals +@c snarfed from async.c:448 @deffn {Scheme Procedure} mask-signals @deffnx {C Function} scm_mask_signals () Mask signals. The returned value is not specified. @end deffn display-error +@c snarfed from backtrace.c:266 @deffn {Scheme Procedure} display-error stack port subr message args rest @deffnx {C Function} scm_display_error (stack, port, subr, message, args, rest) Display an error message to the output port @var{port}. @@ -218,6 +245,7 @@ ignored. @end deffn display-application +@c snarfed from backtrace.c:402 @deffn {Scheme Procedure} display-application frame [port [indent]] @deffnx {C Function} scm_display_application (frame, port, indent) Display a procedure application @var{frame} to the output port @@ -226,6 +254,7 @@ output. @end deffn display-backtrace +@c snarfed from backtrace.c:713 @deffn {Scheme Procedure} display-backtrace stack port [first [depth]] @deffnx {C Function} scm_display_backtrace (stack, port, first, depth) Display a backtrace to the output port @var{port}. @var{stack} @@ -236,6 +265,7 @@ which means that default values will be used. @end deffn backtrace +@c snarfed from backtrace.c:736 @deffn {Scheme Procedure} backtrace @deffnx {C Function} scm_backtrace () Display a backtrace of the stack saved by the last error @@ -243,83 +273,97 @@ to the current output port. @end deffn not +@c snarfed from boolean.c:55 @deffn {Scheme Procedure} not x @deffnx {C Function} scm_not (x) Return @code{#t} iff @var{x} is @code{#f}, else return @code{#f}. @end deffn boolean? +@c snarfed from boolean.c:65 @deffn {Scheme Procedure} boolean? obj @deffnx {C Function} scm_boolean_p (obj) Return @code{#t} iff @var{obj} is either @code{#t} or @code{#f}. @end deffn char? +@c snarfed from chars.c:54 @deffn {Scheme Procedure} char? x @deffnx {C Function} scm_char_p (x) Return @code{#t} iff @var{x} is a character, else @code{#f}. @end deffn char=? +@c snarfed from chars.c:63 @deffn {Scheme Procedure} char=? x y Return @code{#t} iff @var{x} is the same character as @var{y}, else @code{#f}. @end deffn char? +@c snarfed from chars.c:100 @deffn {Scheme Procedure} char>? x y Return @code{#t} iff @var{x} is greater than @var{y} in the ASCII sequence, else @code{#f}. @end deffn char>=? +@c snarfed from chars.c:112 @deffn {Scheme Procedure} 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 char-ci=? +@c snarfed from chars.c:124 @deffn {Scheme Procedure} char-ci=? x y Return @code{#t} iff @var{x} is the same character as @var{y} ignoring case, else @code{#f}. @end deffn char-ci? +@c snarfed from chars.c:160 @deffn {Scheme Procedure} 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 char-ci>=? +@c snarfed from chars.c:172 @deffn {Scheme Procedure} 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 char-alphabetic? +@c snarfed from chars.c:185 @deffn {Scheme Procedure} char-alphabetic? chr @deffnx {C Function} scm_char_alphabetic_p (chr) Return @code{#t} iff @var{chr} is alphabetic, else @code{#f}. @@ -327,6 +371,7 @@ Alphabetic means the same thing as the isalpha C library function. @end deffn char-numeric? +@c snarfed from chars.c:196 @deffn {Scheme Procedure} char-numeric? chr @deffnx {C Function} scm_char_numeric_p (chr) Return @code{#t} iff @var{chr} is numeric, else @code{#f}. @@ -334,6 +379,7 @@ Numeric means the same thing as the isdigit C library function. @end deffn char-whitespace? +@c snarfed from chars.c:207 @deffn {Scheme Procedure} char-whitespace? chr @deffnx {C Function} scm_char_whitespace_p (chr) Return @code{#t} iff @var{chr} is whitespace, else @code{#f}. @@ -341,6 +387,7 @@ Whitespace means the same thing as the isspace C library function. @end deffn char-upper-case? +@c snarfed from chars.c:220 @deffn {Scheme Procedure} char-upper-case? chr @deffnx {C Function} scm_char_upper_case_p (chr) Return @code{#t} iff @var{chr} is uppercase, else @code{#f}. @@ -348,6 +395,7 @@ Uppercase means the same thing as the isupper C library function. @end deffn char-lower-case? +@c snarfed from chars.c:232 @deffn {Scheme Procedure} char-lower-case? chr @deffnx {C Function} scm_char_lower_case_p (chr) Return @code{#t} iff @var{chr} is lowercase, else @code{#f}. @@ -355,6 +403,7 @@ Lowercase means the same thing as the islower C library function. @end deffn char-is-both? +@c snarfed from chars.c:246 @deffn {Scheme Procedure} char-is-both? chr @deffnx {C Function} scm_char_is_both_p (chr) Return @code{#t} iff @var{chr} is either uppercase or lowercase, else @code{#f}. @@ -363,6 +412,7 @@ C library functions. @end deffn char->integer +@c snarfed from chars.c:260 @deffn {Scheme Procedure} char->integer chr @deffnx {C Function} scm_char_to_integer (chr) Return the number corresponding to ordinal position of @var{chr} in the @@ -370,24 +420,28 @@ ASCII sequence. @end deffn integer->char +@c snarfed from chars.c:272 @deffn {Scheme Procedure} integer->char n @deffnx {C Function} scm_integer_to_char (n) Return the character at position @var{n} in the ASCII sequence. @end deffn char-upcase +@c snarfed from chars.c:283 @deffn {Scheme Procedure} char-upcase chr @deffnx {C Function} scm_char_upcase (chr) Return the uppercase character version of @var{chr}. @end deffn char-downcase +@c snarfed from chars.c:294 @deffn {Scheme Procedure} char-downcase chr @deffnx {C Function} scm_char_downcase (chr) Return the lowercase character version of @var{chr}. @end deffn debug-options-interface +@c snarfed from debug.c:79 @deffn {Scheme Procedure} debug-options-interface [setting] @deffnx {C Function} scm_debug_options (setting) Option interface for the debug options. Instead of using @@ -396,48 +450,56 @@ this procedure directly, use the procedures @code{debug-enable}, @end deffn with-traps +@c snarfed from debug.c:127 @deffn {Scheme Procedure} with-traps thunk @deffnx {C Function} scm_with_traps (thunk) Call @var{thunk} with traps enabled. @end deffn memoized? +@c snarfed from debug.c:169 @deffn {Scheme Procedure} memoized? obj @deffnx {C Function} scm_memoized_p (obj) Return @code{#t} if @var{obj} is memoized. @end deffn unmemoize +@c snarfed from debug.c:333 @deffn {Scheme Procedure} unmemoize m @deffnx {C Function} scm_unmemoize (m) Unmemoize the memoized expression @var{m}, @end deffn memoized-environment +@c snarfed from debug.c:343 @deffn {Scheme Procedure} memoized-environment m @deffnx {C Function} scm_memoized_environment (m) Return the environment of the memoized expression @var{m}. @end deffn procedure-name +@c snarfed from debug.c:353 @deffn {Scheme Procedure} procedure-name proc @deffnx {C Function} scm_procedure_name (proc) Return the name of the procedure @var{proc} @end deffn procedure-source +@c snarfed from debug.c:379 @deffn {Scheme Procedure} procedure-source proc @deffnx {C Function} scm_procedure_source (proc) Return the source of the procedure @var{proc}. @end deffn procedure-environment +@c snarfed from debug.c:412 @deffn {Scheme Procedure} procedure-environment proc @deffnx {C Function} scm_procedure_environment (proc) Return the environment of the procedure @var{proc}. @end deffn local-eval +@c snarfed from debug.c:444 @deffn {Scheme Procedure} local-eval exp [env] @deffnx {C Function} scm_local_eval (exp, env) Evaluate @var{exp} in its environment. If @var{env} is supplied, @@ -447,12 +509,14 @@ is implicit). @end deffn debug-object? +@c snarfed from debug.c:531 @deffn {Scheme Procedure} debug-object? obj @deffnx {C Function} scm_debug_object_p (obj) Return @code{#t} if @var{obj} is a debug object. @end deffn dynamic-link +@c snarfed from dynl.c:266 @deffn {Scheme Procedure} dynamic-link filename @deffnx {C Function} scm_dynamic_link (filename) Open the dynamic library called @var{filename}. A library @@ -462,6 +526,7 @@ functions. @end deffn dynamic-object? +@c snarfed from dynl.c:281 @deffn {Scheme Procedure} dynamic-object? obj @deffnx {C Function} scm_dynamic_object_p (obj) Return @code{#t} if @var{obj} is a dynamic library handle, or @code{#f} @@ -469,6 +534,7 @@ otherwise. @end deffn dynamic-unlink +@c snarfed from dynl.c:294 @deffn {Scheme Procedure} dynamic-unlink dobj @deffnx {C Function} scm_dynamic_unlink (dobj) Unlink the indicated object file from the application. The @@ -478,6 +544,7 @@ called on @var{dobj}, its content is no longer accessible. @end deffn dynamic-func +@c snarfed from dynl.c:321 @deffn {Scheme Procedure} dynamic-func name dobj @deffnx {C Function} scm_dynamic_func (name, dobj) Search the dynamic object @var{dobj} for the C function @@ -492,6 +559,7 @@ needed or not and will add it when necessary. @end deffn dynamic-call +@c snarfed from dynl.c:360 @deffn {Scheme Procedure} dynamic-call func dobj @deffnx {C Function} scm_dynamic_call (func, dobj) Call the C function indicated by @var{func} and @var{dobj}. @@ -509,6 +577,7 @@ Interrupts are deferred while the C function is executing (with @end deffn dynamic-args-call +@c snarfed from dynl.c:388 @deffn {Scheme Procedure} dynamic-args-call func dobj args @deffnx {C Function} scm_dynamic_args_call (func, dobj, args) Call the C function indicated by @var{func} and @var{dobj}, @@ -527,6 +596,7 @@ converted to a Scheme number and returned from the call to @end deffn dynamic-wind +@c snarfed from dynwind.c:119 @deffn {Scheme Procedure} dynamic-wind in_guard thunk out_guard @deffnx {C Function} scm_dynamic_wind (in_guard, thunk, out_guard) All three arguments must be 0-argument procedures. @@ -580,6 +650,7 @@ a-cont @end deffn environment? +@c snarfed from environments.c:129 @deffn {Scheme Procedure} environment? obj @deffnx {C Function} scm_environment_p (obj) Return @code{#t} if @var{obj} is an environment, or @code{#f} @@ -587,6 +658,7 @@ otherwise. @end deffn environment-bound? +@c snarfed from environments.c:140 @deffn {Scheme Procedure} environment-bound? env sym @deffnx {C Function} scm_environment_bound_p (env, sym) Return @code{#t} if @var{sym} is bound in @var{env}, or @@ -594,6 +666,7 @@ Return @code{#t} if @var{sym} is bound in @var{env}, or @end deffn environment-ref +@c snarfed from environments.c:155 @deffn {Scheme Procedure} environment-ref env sym @deffnx {C Function} scm_environment_ref (env, sym) Return the value of the location bound to @var{sym} in @@ -602,6 +675,7 @@ Return the value of the location bound to @var{sym} in @end deffn environment-fold +@c snarfed from environments.c:225 @deffn {Scheme Procedure} environment-fold env proc init @deffnx {C Function} scm_environment_fold (env, proc, init) Iterate over all the bindings in @var{env}, accumulating some @@ -638,6 +712,7 @@ using environment-fold: @end deffn environment-define +@c snarfed from environments.c:260 @deffn {Scheme Procedure} environment-define env sym val @deffnx {C Function} scm_environment_define (env, sym, val) Bind @var{sym} to a new location containing @var{val} in @@ -650,6 +725,7 @@ immutable, signal an @code{environment:immutable-binding} error. @end deffn environment-undefine +@c snarfed from environments.c:286 @deffn {Scheme Procedure} environment-undefine env sym @deffnx {C Function} scm_environment_undefine (env, sym) Remove any binding for @var{sym} from @var{env}. If @var{sym} @@ -660,6 +736,7 @@ immutable, signal an @code{environment:immutable-binding} error. @end deffn environment-set! +@c snarfed from environments.c:314 @deffn {Scheme Procedure} environment-set! env sym val @deffnx {C Function} scm_environment_set_x (env, sym, val) If @var{env} binds @var{sym} to some location, change that @@ -672,6 +749,7 @@ to an immutable location, signal an @end deffn environment-cell +@c snarfed from environments.c:349 @deffn {Scheme Procedure} environment-cell env sym for_write @deffnx {C Function} scm_environment_cell (env, sym, for_write) Return the value cell which @var{env} binds to @var{sym}, or @@ -689,6 +767,7 @@ re-bound to a new value cell, or becomes undefined. @end deffn environment-observe +@c snarfed from environments.c:401 @deffn {Scheme Procedure} environment-observe env proc @deffnx {C Function} scm_environment_observe (env, proc) Whenever @var{env}'s bindings change, apply @var{proc} to @@ -700,6 +779,7 @@ token is unspecified. @end deffn environment-observe-weak +@c snarfed from environments.c:418 @deffn {Scheme Procedure} environment-observe-weak env proc @deffnx {C Function} scm_environment_observe_weak (env, proc) This function is the same as environment-observe, except that @@ -711,6 +791,7 @@ list of observing procedures. @end deffn environment-unobserve +@c snarfed from environments.c:454 @deffn {Scheme Procedure} environment-unobserve token @deffnx {C Function} scm_environment_unobserve (token) Cancel the observation request which returned the value @@ -722,6 +803,7 @@ bindings change. @end deffn make-leaf-environment +@c snarfed from environments.c:1031 @deffn {Scheme Procedure} make-leaf-environment @deffnx {C Function} scm_make_leaf_environment () Create a new leaf environment, containing no bindings. @@ -730,6 +812,7 @@ will be mutable. @end deffn leaf-environment? +@c snarfed from environments.c:1054 @deffn {Scheme Procedure} leaf-environment? object @deffnx {C Function} scm_leaf_environment_p (object) Return @code{#t} if object is a leaf environment, or @code{#f} @@ -737,6 +820,7 @@ otherwise. @end deffn make-eval-environment +@c snarfed from environments.c:1419 @deffn {Scheme Procedure} make-eval-environment local imported @deffnx {C Function} scm_make_eval_environment (local, imported) Return a new environment object eval whose bindings are the @@ -763,6 +847,7 @@ In typical use, @var{local} will be a finite environment, and @end deffn eval-environment? +@c snarfed from environments.c:1456 @deffn {Scheme Procedure} eval-environment? object @deffnx {C Function} scm_eval_environment_p (object) Return @code{#t} if object is an eval environment, or @code{#f} @@ -770,30 +855,35 @@ otherwise. @end deffn eval-environment-local +@c snarfed from environments.c:1466 @deffn {Scheme Procedure} eval-environment-local env @deffnx {C Function} scm_eval_environment_local (env) Return the local environment of eval environment @var{env}. @end deffn eval-environment-set-local! +@c snarfed from environments.c:1478 @deffn {Scheme Procedure} eval-environment-set-local! env local @deffnx {C Function} scm_eval_environment_set_local_x (env, local) Change @var{env}'s local environment to @var{local}. @end deffn eval-environment-imported +@c snarfed from environments.c:1504 @deffn {Scheme Procedure} eval-environment-imported env @deffnx {C Function} scm_eval_environment_imported (env) Return the imported environment of eval environment @var{env}. @end deffn eval-environment-set-imported! +@c snarfed from environments.c:1516 @deffn {Scheme Procedure} eval-environment-set-imported! env imported @deffnx {C Function} scm_eval_environment_set_imported_x (env, imported) Change @var{env}'s imported environment to @var{imported}. @end deffn make-import-environment +@c snarfed from environments.c:1839 @deffn {Scheme Procedure} make-import-environment imports conflict_proc @deffnx {C Function} scm_make_import_environment (imports, conflict_proc) Return a new environment @var{imp} whose bindings are the union @@ -824,6 +914,7 @@ if one of its imported environments changes. @end deffn import-environment? +@c snarfed from environments.c:1868 @deffn {Scheme Procedure} import-environment? object @deffnx {C Function} scm_import_environment_p (object) Return @code{#t} if object is an import environment, or @@ -831,6 +922,7 @@ Return @code{#t} if object is an import environment, or @end deffn import-environment-imports +@c snarfed from environments.c:1879 @deffn {Scheme Procedure} import-environment-imports env @deffnx {C Function} scm_import_environment_imports (env) Return the list of environments imported by the import @@ -838,6 +930,7 @@ environment @var{env}. @end deffn import-environment-set-imports! +@c snarfed from environments.c:1892 @deffn {Scheme Procedure} import-environment-set-imports! env imports @deffnx {C Function} scm_import_environment_set_imports_x (env, imports) Change @var{env}'s list of imported environments to @@ -845,6 +938,7 @@ Change @var{env}'s list of imported environments to @end deffn make-export-environment +@c snarfed from environments.c:2159 @deffn {Scheme Procedure} make-export-environment private signature @deffnx {C Function} scm_make_export_environment (private, signature) Return a new environment @var{exp} containing only those @@ -894,6 +988,7 @@ if the bindings in private change. @end deffn export-environment? +@c snarfed from environments.c:2194 @deffn {Scheme Procedure} export-environment? object @deffnx {C Function} scm_export_environment_p (object) Return @code{#t} if object is an export environment, or @@ -901,30 +996,35 @@ Return @code{#t} if object is an export environment, or @end deffn export-environment-private +@c snarfed from environments.c:2204 @deffn {Scheme Procedure} export-environment-private env @deffnx {C Function} scm_export_environment_private (env) Return the private environment of export environment @var{env}. @end deffn export-environment-set-private! +@c snarfed from environments.c:2216 @deffn {Scheme Procedure} export-environment-set-private! env private @deffnx {C Function} scm_export_environment_set_private_x (env, private) Change the private environment of export environment @var{env}. @end deffn export-environment-signature +@c snarfed from environments.c:2238 @deffn {Scheme Procedure} export-environment-signature env @deffnx {C Function} scm_export_environment_signature (env) Return the signature of export environment @var{env}. @end deffn export-environment-set-signature! +@c snarfed from environments.c:2312 @deffn {Scheme Procedure} export-environment-set-signature! env signature @deffnx {C Function} scm_export_environment_set_signature_x (env, signature) Change the signature of export environment @var{env}. @end deffn eq? +@c snarfed from eq.c:62 @deffn {Scheme Procedure} 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 @@ -933,6 +1033,7 @@ capable of discerning distinctions finer than those detectable by @end deffn eqv? +@c snarfed from eq.c:76 @deffn {Scheme Procedure} 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 @@ -942,6 +1043,7 @@ and inexact numbers. @end deffn equal? +@c snarfed from eq.c:125 @deffn {Scheme Procedure} 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, @@ -952,6 +1054,7 @@ terminate if its arguments are circular data structures. @end deffn scm-error +@c snarfed from error.c:117 @deffn {Scheme Procedure} scm-error key subr message args data @deffnx {C Function} scm_error_scm (key, subr, message, args, data) Raise an error with key @var{key}. @var{subr} can be a string @@ -970,6 +1073,7 @@ it will usually be @code{#f}. @end deffn strerror +@c snarfed from error.c:168 @deffn {Scheme Procedure} strerror err @deffnx {C Function} scm_strerror (err) Return the Unix error message corresponding to @var{err}, which @@ -977,6 +1081,7 @@ must be an integer value. @end deffn apply:nconc2last +@c snarfed from eval.c:3485 @deffn {Scheme Procedure} apply:nconc2last lst @deffnx {C Function} scm_nconc2last (lst) Given a list (@var{arg1} @dots{} @var{args}), this function @@ -989,6 +1094,7 @@ destroys its argument, so use with care. @end deffn force +@c snarfed from eval.c:4021 @deffn {Scheme Procedure} force x @deffnx {C Function} scm_force (x) If the promise @var{x} has not been computed yet, compute and @@ -997,6 +1103,7 @@ value. @end deffn promise? +@c snarfed from eval.c:4044 @deffn {Scheme Procedure} promise? obj @deffnx {C Function} scm_promise_p (obj) Return true if @var{obj} is a promise, i.e. a delayed computation @@ -1004,6 +1111,7 @@ Return true if @var{obj} is a promise, i.e. a delayed computation @end deffn cons-source +@c snarfed from eval.c:4056 @deffn {Scheme Procedure} cons-source xorig x y @deffnx {C Function} scm_cons_source (xorig, x, y) Create and return a new pair whose car and cdr are @var{x} and @var{y}. @@ -1012,6 +1120,7 @@ with the new pair. @end deffn copy-tree +@c snarfed from eval.c:4076 @deffn {Scheme Procedure} copy-tree obj @deffnx {C Function} scm_copy_tree (obj) Recursively copy the data tree that is bound to @var{obj}, and return a @@ -1022,6 +1131,7 @@ any other object. @end deffn primitive-eval +@c snarfed from eval.c:4169 @deffn {Scheme Procedure} primitive-eval exp @deffnx {C Function} scm_primitive_eval (exp) Evaluate @var{exp} in the top-level environment specified by @@ -1029,6 +1139,7 @@ the current module. @end deffn eval +@c snarfed from eval.c:4238 @deffn {Scheme Procedure} eval exp module @deffnx {C Function} scm_eval (exp, module) Evaluate @var{exp}, a list representing a Scheme expression, @@ -1039,6 +1150,7 @@ is reset to its previous value when @var{eval} returns. @end deffn eval-options-interface +@c snarfed from eval.c:1782 @deffn {Scheme Procedure} eval-options-interface [setting] @deffnx {C Function} scm_eval_options_interface (setting) Option interface for the evaluation options. Instead of using @@ -1047,23 +1159,27 @@ this procedure directly, use the procedures @code{eval-enable}, @end deffn evaluator-traps-interface +@c snarfed from eval.c:1799 @deffn {Scheme Procedure} evaluator-traps-interface [setting] @deffnx {C Function} scm_evaluator_traps (setting) Option interface for the evaluator trap options. @end deffn defined? +@c snarfed from evalext.c:75 @deffn {Scheme Procedure} defined? sym [env] @deffnx {C Function} scm_definedp (sym, env) Return @code{#t} if @var{sym} is defined in the lexical environment @var{env}. When @var{env} is not specified, look in the top-level environment as defined by the current module. @end deffn map-in-order +@c snarfed from evalext.c:144 @deffn {Scheme Procedure} map-in-order implemented by the C function "scm_map" @end deffn load-extension +@c snarfed from extensions.c:152 @deffn {Scheme Procedure} load-extension lib init @deffnx {C Function} scm_load_extension (lib, init) Load and initialize the extension designated by LIB and INIT. @@ -1103,6 +1219,7 @@ well. For example, @end deffn program-arguments +@c snarfed from feature.c:77 @deffn {Scheme Procedure} program-arguments @deffnx {Scheme Procedure} command-line @deffnx {C Function} scm_program_arguments () @@ -1113,6 +1230,7 @@ options like @code{-e} and @code{-l}. @end deffn make-fluid +@c snarfed from fluids.c:124 @deffn {Scheme Procedure} make-fluid @deffnx {C Function} scm_make_fluid () Return a newly created fluid. @@ -1125,6 +1243,7 @@ in its own dynamic root, you can use fluids for thread local storage. @end deffn fluid? +@c snarfed from fluids.c:137 @deffn {Scheme Procedure} fluid? obj @deffnx {C Function} scm_fluid_p (obj) Return @code{#t} iff @var{obj} is a fluid; otherwise, return @@ -1132,6 +1251,7 @@ Return @code{#t} iff @var{obj} is a fluid; otherwise, return @end deffn fluid-ref +@c snarfed from fluids.c:148 @deffn {Scheme Procedure} fluid-ref fluid @deffnx {C Function} scm_fluid_ref (fluid) Return the value associated with @var{fluid} in the current @@ -1140,12 +1260,14 @@ dynamic root. If @var{fluid} has not been set, then return @end deffn fluid-set! +@c snarfed from fluids.c:164 @deffn {Scheme Procedure} fluid-set! fluid value @deffnx {C Function} scm_fluid_set_x (fluid, value) Set the value associated with @var{fluid} in the current dynamic root. @end deffn with-fluids* +@c snarfed from fluids.c:223 @deffn {Scheme Procedure} with-fluids* fluids values thunk @deffnx {C Function} scm_with_fluids (fluids, values, thunk) Set @var{fluids} to @var{values} temporary, and call @var{thunk}. @@ -1155,6 +1277,7 @@ one after another. @var{thunk} must be a procedure with no argument. @end deffn setvbuf +@c snarfed from fports.c:156 @deffn {Scheme Procedure} setvbuf port mode [size] @deffnx {C Function} scm_setvbuf (port, mode, size) Set the buffering mode for @var{port}. @var{mode} can be: @@ -1170,12 +1293,14 @@ If @var{size} is omitted, a default size will be used. @end deffn file-port? +@c snarfed from fports.c:245 @deffn {Scheme Procedure} file-port? obj @deffnx {C Function} scm_file_port_p (obj) Determine whether @var{obj} is a port that is related to a file. @end deffn open-file +@c snarfed from fports.c:299 @deffn {Scheme Procedure} open-file filename mode @deffnx {C Function} scm_open_file (filename, mode) Open the file whose name is @var{filename}, and return a port @@ -1218,6 +1343,7 @@ requested, @code{open-file} throws an exception. @end deffn gc-stats +@c snarfed from gc.c:735 @deffn {Scheme Procedure} gc-stats @deffnx {C Function} scm_gc_stats () Return an association list of statistics about Guile's current @@ -1225,6 +1351,7 @@ use of storage. @end deffn object-address +@c snarfed from gc.c:832 @deffn {Scheme Procedure} object-address obj @deffnx {C Function} scm_object_address (obj) Return an integer that for the lifetime of @var{obj} is uniquely @@ -1232,6 +1359,7 @@ returned by this function for @var{obj} @end deffn gc +@c snarfed from gc.c:843 @deffn {Scheme Procedure} gc @deffnx {C Function} scm_gc () Scans all of SCM objects and reclaims for further use those that are @@ -1239,6 +1367,7 @@ no longer accessible. @end deffn %compute-slots +@c snarfed from goops.c:291 @deffn {Scheme Procedure} %compute-slots class @deffnx {C Function} scm_sys_compute_slots (class) Return a list consisting of the names of all slots belonging to @@ -1247,6 +1376,7 @@ its superclasses. @end deffn get-keyword +@c snarfed from goops.c:376 @deffn {Scheme Procedure} get-keyword key l default_value @deffnx {C Function} scm_get_keyword (key, l, default_value) Determine an associated value for the keyword @var{key} from @@ -1258,6 +1388,7 @@ If @var{l} does not hold a value for @var{key}, the value @end deffn %initialize-object +@c snarfed from goops.c:399 @deffn {Scheme Procedure} %initialize-object obj initargs @deffnx {C Function} scm_sys_initialize_object (obj, initargs) Initialize the object @var{obj} with the given arguments @@ -1265,126 +1396,147 @@ Initialize the object @var{obj} with the given arguments @end deffn %prep-layout! +@c snarfed from goops.c:479 @deffn {Scheme Procedure} %prep-layout! class @deffnx {C Function} scm_sys_prep_layout_x (class) @end deffn %inherit-magic! +@c snarfed from goops.c:556 @deffn {Scheme Procedure} %inherit-magic! class dsupers @deffnx {C Function} scm_sys_inherit_magic_x (class, dsupers) @end deffn instance? +@c snarfed from goops.c:799 @deffn {Scheme Procedure} instance? obj @deffnx {C Function} scm_instance_p (obj) Return @code{#t} if @var{obj} is an instance. @end deffn class-name +@c snarfed from goops.c:814 @deffn {Scheme Procedure} class-name obj @deffnx {C Function} scm_class_name (obj) Return the class name of @var{obj}. @end deffn class-direct-supers +@c snarfed from goops.c:824 @deffn {Scheme Procedure} class-direct-supers obj @deffnx {C Function} scm_class_direct_supers (obj) Return the direct superclasses of the class @var{obj}. @end deffn class-direct-slots +@c snarfed from goops.c:834 @deffn {Scheme Procedure} class-direct-slots obj @deffnx {C Function} scm_class_direct_slots (obj) Return the direct slots of the class @var{obj}. @end deffn class-direct-subclasses +@c snarfed from goops.c:844 @deffn {Scheme Procedure} class-direct-subclasses obj @deffnx {C Function} scm_class_direct_subclasses (obj) Return the direct subclasses of the class @var{obj}. @end deffn class-direct-methods +@c snarfed from goops.c:854 @deffn {Scheme Procedure} class-direct-methods obj @deffnx {C Function} scm_class_direct_methods (obj) Return the direct methods of the class @var{obj} @end deffn class-precedence-list +@c snarfed from goops.c:864 @deffn {Scheme Procedure} class-precedence-list obj @deffnx {C Function} scm_class_precedence_list (obj) Return the class precedence list of the class @var{obj}. @end deffn class-slots +@c snarfed from goops.c:874 @deffn {Scheme Procedure} class-slots obj @deffnx {C Function} scm_class_slots (obj) Return the slot list of the class @var{obj}. @end deffn class-environment +@c snarfed from goops.c:884 @deffn {Scheme Procedure} class-environment obj @deffnx {C Function} scm_class_environment (obj) Return the environment of the class @var{obj}. @end deffn generic-function-name +@c snarfed from goops.c:895 @deffn {Scheme Procedure} generic-function-name obj @deffnx {C Function} scm_generic_function_name (obj) Return the name of the generic function @var{obj}. @end deffn generic-function-methods +@c snarfed from goops.c:905 @deffn {Scheme Procedure} generic-function-methods obj @deffnx {C Function} scm_generic_function_methods (obj) Return the methods of the generic function @var{obj}. @end deffn method-generic-function +@c snarfed from goops.c:916 @deffn {Scheme Procedure} method-generic-function obj @deffnx {C Function} scm_method_generic_function (obj) Return the generic function fot the method @var{obj}. @end deffn method-specializers +@c snarfed from goops.c:926 @deffn {Scheme Procedure} method-specializers obj @deffnx {C Function} scm_method_specializers (obj) Return specializers of the method @var{obj}. @end deffn method-procedure +@c snarfed from goops.c:936 @deffn {Scheme Procedure} method-procedure obj @deffnx {C Function} scm_method_procedure (obj) Return the procedure of the method @var{obj}. @end deffn accessor-method-slot-definition +@c snarfed from goops.c:946 @deffn {Scheme Procedure} accessor-method-slot-definition obj @deffnx {C Function} scm_accessor_method_slot_definition (obj) Return the slot definition of the accessor @var{obj}. @end deffn %tag-body +@c snarfed from goops.c:956 @deffn {Scheme Procedure} %tag-body body @deffnx {C Function} scm_sys_tag_body (body) Internal GOOPS magic---don't use this function! @end deffn make-unbound +@c snarfed from goops.c:971 @deffn {Scheme Procedure} make-unbound @deffnx {C Function} scm_make_unbound () Return the unbound value. @end deffn unbound? +@c snarfed from goops.c:980 @deffn {Scheme Procedure} unbound? obj @deffnx {C Function} scm_unbound_p (obj) Return @code{#t} if @var{obj} is unbound. @end deffn assert-bound +@c snarfed from goops.c:990 @deffn {Scheme Procedure} assert-bound value obj @deffnx {C Function} scm_assert_bound (value, obj) Return @var{value} if it is bound, and invoke the @@ -1392,6 +1544,7 @@ Return @var{value} if it is bound, and invoke the @end deffn @@assert-bound-ref +@c snarfed from goops.c:1002 @deffn {Scheme Procedure} @@assert-bound-ref obj index @deffnx {C Function} scm_at_assert_bound_ref (obj, index) Like @code{assert-bound}, but use @var{index} for accessing @@ -1399,12 +1552,14 @@ the value from @var{obj}. @end deffn %fast-slot-ref +@c snarfed from goops.c:1014 @deffn {Scheme Procedure} %fast-slot-ref obj index @deffnx {C Function} scm_sys_fast_slot_ref (obj, index) Return the slot value with index @var{index} from @var{obj}. @end deffn %fast-slot-set! +@c snarfed from goops.c:1032 @deffn {Scheme Procedure} %fast-slot-set! obj index value @deffnx {C Function} scm_sys_fast_slot_set_x (obj, index, value) Set the slot with index @var{index} in @var{obj} to @@ -1412,30 +1567,35 @@ Set the slot with index @var{index} in @var{obj} to @end deffn slot-ref-using-class +@c snarfed from goops.c:1162 @deffn {Scheme Procedure} slot-ref-using-class class obj slot_name @deffnx {C Function} scm_slot_ref_using_class (class, obj, slot_name) @end deffn slot-set-using-class! +@c snarfed from goops.c:1181 @deffn {Scheme Procedure} slot-set-using-class! class obj slot_name value @deffnx {C Function} scm_slot_set_using_class_x (class, obj, slot_name, value) @end deffn slot-bound-using-class? +@c snarfed from goops.c:1195 @deffn {Scheme Procedure} slot-bound-using-class? class obj slot_name @deffnx {C Function} scm_slot_bound_using_class_p (class, obj, slot_name) @end deffn slot-exists-using-class? +@c snarfed from goops.c:1210 @deffn {Scheme Procedure} slot-exists-using-class? class obj slot_name @deffnx {C Function} scm_slot_exists_using_class_p (class, obj, slot_name) @end deffn slot-ref +@c snarfed from goops.c:1226 @deffn {Scheme Procedure} slot-ref obj slot_name @deffnx {C Function} scm_slot_ref (obj, slot_name) Return the value from @var{obj}'s slot with the name @@ -1443,12 +1603,14 @@ Return the value from @var{obj}'s slot with the name @end deffn slot-set! +@c snarfed from goops.c:1243 @deffn {Scheme Procedure} slot-set! obj slot_name value @deffnx {C Function} scm_slot_set_x (obj, slot_name, value) Set the slot named @var{slot_name} of @var{obj} to @var{value}. @end deffn slot-bound? +@c snarfed from goops.c:1260 @deffn {Scheme Procedure} slot-bound? obj slot_name @deffnx {C Function} scm_slot_bound_p (obj, slot_name) Return @code{#t} if the slot named @var{slot_name} of @var{obj} @@ -1456,12 +1618,14 @@ is bound. @end deffn slot-exists? +@c snarfed from goops.c:1278 @deffn {Scheme Procedure} slot-exists? obj slot_name @deffnx {C Function} scm_slots_exists_p (obj, slot_name) Return @code{#t} if @var{obj} has a slot named @var{slot_name}. @end deffn %allocate-instance +@c snarfed from goops.c:1317 @deffn {Scheme Procedure} %allocate-instance class initargs @deffnx {C Function} scm_sys_allocate_instance (class, initargs) Create a new instance of class @var{class} and initialize it @@ -1469,54 +1633,63 @@ from the arguments @var{initargs}. @end deffn %set-object-setter! +@c snarfed from goops.c:1387 @deffn {Scheme Procedure} %set-object-setter! obj setter @deffnx {C Function} scm_sys_set_object_setter_x (obj, setter) @end deffn %modify-instance +@c snarfed from goops.c:1412 @deffn {Scheme Procedure} %modify-instance old new @deffnx {C Function} scm_sys_modify_instance (old, new) @end deffn %modify-class +@c snarfed from goops.c:1438 @deffn {Scheme Procedure} %modify-class old new @deffnx {C Function} scm_sys_modify_class (old, new) @end deffn %invalidate-class +@c snarfed from goops.c:1462 @deffn {Scheme Procedure} %invalidate-class class @deffnx {C Function} scm_sys_invalidate_class (class) @end deffn %invalidate-method-cache! +@c snarfed from goops.c:1589 @deffn {Scheme Procedure} %invalidate-method-cache! gf @deffnx {C Function} scm_sys_invalidate_method_cache_x (gf) @end deffn generic-capability? +@c snarfed from goops.c:1615 @deffn {Scheme Procedure} generic-capability? proc @deffnx {C Function} scm_generic_capability_p (proc) @end deffn enable-primitive-generic! +@c snarfed from goops.c:1628 @deffn {Scheme Procedure} enable-primitive-generic! . subrs @deffnx {C Function} scm_enable_primitive_generic_x (subrs) @end deffn primitive-generic-generic +@c snarfed from goops.c:1649 @deffn {Scheme Procedure} primitive-generic-generic subr @deffnx {C Function} scm_primitive_generic_generic (subr) @end deffn make +@c snarfed from goops.c:2010 @deffn {Scheme Procedure} make . args @deffnx {C Function} scm_make (args) Make a new object. @var{args} must contain the class and @@ -1524,18 +1697,21 @@ all necessary initialization information. @end deffn find-method +@c snarfed from goops.c:2103 @deffn {Scheme Procedure} find-method . l @deffnx {C Function} scm_find_method (l) @end deffn %method-more-specific? +@c snarfed from goops.c:2123 @deffn {Scheme Procedure} %method-more-specific? m1 m2 targs @deffnx {C Function} scm_sys_method_more_specific_p (m1, m2, targs) @end deffn %goops-loaded +@c snarfed from goops.c:2648 @deffn {Scheme Procedure} %goops-loaded @deffnx {C Function} scm_sys_goops_loaded () Announce that GOOPS is loaded and perform initialization @@ -1543,6 +1719,7 @@ on the C level which depends on the loaded GOOPS modules. @end deffn make-guardian +@c snarfed from guardians.c:330 @deffn {Scheme Procedure} make-guardian [greedy_p] @deffnx {C Function} scm_make_guardian (greedy_p) Create a new guardian. @@ -1573,18 +1750,21 @@ paper still (mostly) accurately describes the interface). @end deffn guardian-destroyed? +@c snarfed from guardians.c:358 @deffn {Scheme Procedure} guardian-destroyed? guardian @deffnx {C Function} scm_guardian_destroyed_p (guardian) Return @code{#t} if @var{guardian} has been destroyed, otherwise @code{#f}. @end deffn guardian-greedy? +@c snarfed from guardians.c:376 @deffn {Scheme Procedure} guardian-greedy? guardian @deffnx {C Function} scm_guardian_greedy_p (guardian) Return @code{#t} if @var{guardian} is a greedy guardian, otherwise @code{#f}. @end deffn destroy-guardian! +@c snarfed from guardians.c:387 @deffn {Scheme Procedure} destroy-guardian! guardian @deffnx {C Function} scm_destroy_guardian_x (guardian) Destroys @var{guardian}, by making it impossible to put any more @@ -1593,6 +1773,7 @@ objects guarded by @var{guardian}. @end deffn hashq +@c snarfed from hash.c:200 @deffn {Scheme Procedure} hashq key size @deffnx {C Function} scm_hashq (key, size) Determine a hash value for @var{key} that is suitable for @@ -1608,6 +1789,7 @@ different values, since @code{foo} will be garbage collected. @end deffn hashv +@c snarfed from hash.c:236 @deffn {Scheme Procedure} hashv key size @deffnx {C Function} scm_hashv (key, size) Determine a hash value for @var{key} that is suitable for @@ -1623,6 +1805,7 @@ different values, since @code{foo} will be garbage collected. @end deffn hash +@c snarfed from hash.c:259 @deffn {Scheme Procedure} hash key size @deffnx {C Function} scm_hash (key, size) Determine a hash value for @var{key} that is suitable for @@ -1632,6 +1815,7 @@ integer in the range 0 to @var{size} - 1. @end deffn hashq-get-handle +@c snarfed from hashtab.c:173 @deffn {Scheme Procedure} hashq-get-handle table key @deffnx {C Function} scm_hashq_get_handle (table, key) This procedure returns the @code{(key . value)} pair from the @@ -1641,6 +1825,7 @@ Uses @code{eq?} for equality testing. @end deffn hashq-create-handle! +@c snarfed from hashtab.c:185 @deffn {Scheme Procedure} hashq-create-handle! table key init @deffnx {C Function} scm_hashq_create_handle_x (table, key, init) This function looks up @var{key} in @var{table} and returns its handle. @@ -1649,6 +1834,7 @@ associates @var{key} with @var{init}. @end deffn hashq-ref +@c snarfed from hashtab.c:198 @deffn {Scheme Procedure} hashq-ref table key [dflt] @deffnx {C Function} scm_hashq_ref (table, key, dflt) Look up @var{key} in the hash table @var{table}, and return the @@ -1658,6 +1844,7 @@ is supplied). Uses @code{eq?} for equality testing. @end deffn hashq-set! +@c snarfed from hashtab.c:212 @deffn {Scheme Procedure} hashq-set! table key val @deffnx {C Function} scm_hashq_set_x (table, key, val) Find the entry in @var{table} associated with @var{key}, and @@ -1665,6 +1852,7 @@ store @var{value} there. Uses @code{eq?} for equality testing. @end deffn hashq-remove! +@c snarfed from hashtab.c:224 @deffn {Scheme Procedure} hashq-remove! table key @deffnx {C Function} scm_hashq_remove_x (table, key) Remove @var{key} (and any value associated with it) from @@ -1672,6 +1860,7 @@ Remove @var{key} (and any value associated with it) from @end deffn hashv-get-handle +@c snarfed from hashtab.c:240 @deffn {Scheme Procedure} hashv-get-handle table key @deffnx {C Function} scm_hashv_get_handle (table, key) This procedure returns the @code{(key . value)} pair from the @@ -1681,6 +1870,7 @@ Uses @code{eqv?} for equality testing. @end deffn hashv-create-handle! +@c snarfed from hashtab.c:252 @deffn {Scheme Procedure} hashv-create-handle! table key init @deffnx {C Function} scm_hashv_create_handle_x (table, key, init) This function looks up @var{key} in @var{table} and returns its handle. @@ -1689,6 +1879,7 @@ associates @var{key} with @var{init}. @end deffn hashv-ref +@c snarfed from hashtab.c:266 @deffn {Scheme Procedure} hashv-ref table key [dflt] @deffnx {C Function} scm_hashv_ref (table, key, dflt) Look up @var{key} in the hash table @var{table}, and return the @@ -1698,6 +1889,7 @@ is supplied). Uses @code{eqv?} for equality testing. @end deffn hashv-set! +@c snarfed from hashtab.c:280 @deffn {Scheme Procedure} hashv-set! table key val @deffnx {C Function} scm_hashv_set_x (table, key, val) Find the entry in @var{table} associated with @var{key}, and @@ -1705,6 +1897,7 @@ store @var{value} there. Uses @code{eqv?} for equality testing. @end deffn hashv-remove! +@c snarfed from hashtab.c:291 @deffn {Scheme Procedure} hashv-remove! table key @deffnx {C Function} scm_hashv_remove_x (table, key) Remove @var{key} (and any value associated with it) from @@ -1712,6 +1905,7 @@ Remove @var{key} (and any value associated with it) from @end deffn hash-get-handle +@c snarfed from hashtab.c:306 @deffn {Scheme Procedure} hash-get-handle table key @deffnx {C Function} scm_hash_get_handle (table, key) This procedure returns the @code{(key . value)} pair from the @@ -1721,6 +1915,7 @@ Uses @code{equal?} for equality testing. @end deffn hash-create-handle! +@c snarfed from hashtab.c:318 @deffn {Scheme Procedure} hash-create-handle! table key init @deffnx {C Function} scm_hash_create_handle_x (table, key, init) This function looks up @var{key} in @var{table} and returns its handle. @@ -1729,6 +1924,7 @@ associates @var{key} with @var{init}. @end deffn hash-ref +@c snarfed from hashtab.c:331 @deffn {Scheme Procedure} hash-ref table key [dflt] @deffnx {C Function} scm_hash_ref (table, key, dflt) Look up @var{key} in the hash table @var{table}, and return the @@ -1738,6 +1934,7 @@ is supplied). Uses @code{equal?} for equality testing. @end deffn hash-set! +@c snarfed from hashtab.c:346 @deffn {Scheme Procedure} hash-set! table key val @deffnx {C Function} scm_hash_set_x (table, key, val) Find the entry in @var{table} associated with @var{key}, and @@ -1746,6 +1943,7 @@ testing. @end deffn hash-remove! +@c snarfed from hashtab.c:358 @deffn {Scheme Procedure} hash-remove! table key @deffnx {C Function} scm_hash_remove_x (table, key) Remove @var{key} (and any value associated with it) from @@ -1753,6 +1951,7 @@ Remove @var{key} (and any value associated with it) from @end deffn hashx-get-handle +@c snarfed from hashtab.c:422 @deffn {Scheme Procedure} hashx-get-handle hash assoc table key @deffnx {C Function} scm_hashx_get_handle (hash, assoc, table, key) This behaves the same way as the corresponding @@ -1764,6 +1963,7 @@ table size. @code{assoc} must be an associator function, like @end deffn hashx-create-handle! +@c snarfed from hashtab.c:441 @deffn {Scheme Procedure} hashx-create-handle! hash assoc table key init @deffnx {C Function} scm_hashx_create_handle_x (hash, assoc, table, key, init) This behaves the same way as the corresponding @@ -1775,6 +1975,7 @@ table size. @code{assoc} must be an associator function, like @end deffn hashx-ref +@c snarfed from hashtab.c:464 @deffn {Scheme Procedure} hashx-ref hash assoc table key [dflt] @deffnx {C Function} scm_hashx_ref (hash, assoc, table, key, dflt) This behaves the same way as the corresponding @code{ref} @@ -1789,6 +1990,7 @@ equivalent to @code{hashx-ref hashq assq table key}. @end deffn hashx-set! +@c snarfed from hashtab.c:490 @deffn {Scheme Procedure} hashx-set! hash assoc table key val @deffnx {C Function} scm_hashx_set_x (hash, assoc, table, key, val) This behaves the same way as the corresponding @code{set!} @@ -1803,6 +2005,7 @@ equivalent to @code{hashx-set! hashq assq table key}. @end deffn hash-fold +@c snarfed from hashtab.c:528 @deffn {Scheme Procedure} hash-fold proc init table @deffnx {C Function} scm_hash_fold (proc, init, table) An iterator over hash-table elements. @@ -1816,6 +2019,7 @@ table into an a-list of key-value pairs. @end deffn make-hook +@c snarfed from hooks.c:178 @deffn {Scheme Procedure} make-hook [n_args] @deffnx {C Function} scm_make_hook (n_args) Create a hook for storing procedure of arity @var{n_args}. @@ -1824,12 +2028,14 @@ object to be used with the other hook procedures. @end deffn hook? +@c snarfed from hooks.c:201 @deffn {Scheme Procedure} hook? x @deffnx {C Function} scm_hook_p (x) Return @code{#t} if @var{x} is a hook, @code{#f} otherwise. @end deffn hook-empty? +@c snarfed from hooks.c:212 @deffn {Scheme Procedure} hook-empty? hook @deffnx {C Function} scm_hook_empty_p (hook) Return @code{#t} if @var{hook} is an empty hook, @code{#f} @@ -1837,6 +2043,7 @@ otherwise. @end deffn add-hook! +@c snarfed from hooks.c:226 @deffn {Scheme Procedure} add-hook! hook proc [append_p] @deffnx {C Function} scm_add_hook_x (hook, proc, append_p) Add the procedure @var{proc} to the hook @var{hook}. The @@ -1846,6 +2053,7 @@ procedure is not specified. @end deffn remove-hook! +@c snarfed from hooks.c:253 @deffn {Scheme Procedure} remove-hook! hook proc @deffnx {C Function} scm_remove_hook_x (hook, proc) Remove the procedure @var{proc} from the hook @var{hook}. The @@ -1853,6 +2061,7 @@ return value of this procedure is not specified. @end deffn reset-hook! +@c snarfed from hooks.c:267 @deffn {Scheme Procedure} reset-hook! hook @deffnx {C Function} scm_reset_hook_x (hook) Remove all procedures from the hook @var{hook}. The return @@ -1860,6 +2069,7 @@ value of this procedure is not specified. @end deffn run-hook +@c snarfed from hooks.c:281 @deffn {Scheme Procedure} run-hook hook . args @deffnx {C Function} scm_run_hook (hook, args) Apply all procedures from the hook @var{hook} to the arguments @@ -1868,12 +2078,14 @@ last. The return value of this procedure is not specified. @end deffn hook->list +@c snarfed from hooks.c:308 @deffn {Scheme Procedure} hook->list hook @deffnx {C Function} scm_hook_to_list (hook) Convert the procedure list of @var{hook} to a list. @end deffn ftell +@c snarfed from ioext.c:73 @deffn {Scheme Procedure} ftell fd_port @deffnx {C Function} scm_ftell (fd_port) Return an integer representing the current position of @@ -1885,6 +2097,7 @@ Return an integer representing the current position of @end deffn redirect-port +@c snarfed from ioext.c:91 @deffn {Scheme Procedure} redirect-port old new @deffnx {C Function} scm_redirect_port (old, new) This procedure takes two ports and duplicates the underlying file @@ -1903,6 +2116,7 @@ revealed counts. @end deffn dup->fdes +@c snarfed from ioext.c:130 @deffn {Scheme Procedure} dup->fdes fd_or_port [fd] @deffnx {C Function} scm_dup_to_fdes (fd_or_port, fd) Return a new integer file descriptor referring to the open file @@ -1911,6 +2125,7 @@ file port or a file descriptor. @end deffn dup2 +@c snarfed from ioext.c:177 @deffn {Scheme Procedure} dup2 oldfd newfd @deffnx {C Function} scm_dup2 (oldfd, newfd) A simple wrapper for the @code{dup2} system call. @@ -1924,6 +2139,7 @@ The return value is unspecified. @end deffn fileno +@c snarfed from ioext.c:196 @deffn {Scheme Procedure} fileno port @deffnx {C Function} scm_fileno (port) Return the integer file descriptor underlying @var{port}. Does @@ -1931,6 +2147,7 @@ not change its revealed count. @end deffn isatty? +@c snarfed from ioext.c:216 @deffn {Scheme Procedure} isatty? port @deffnx {C Function} scm_isatty_p (port) Return @code{#t} if @var{port} is using a serial non--file @@ -1938,6 +2155,7 @@ device, otherwise @code{#f}. @end deffn fdopen +@c snarfed from ioext.c:238 @deffn {Scheme Procedure} fdopen fdes modes @deffnx {C Function} scm_fdopen (fdes, modes) Return a new port based on the file descriptor @var{fdes}. @@ -1947,6 +2165,7 @@ same as that accepted by @ref{File Ports, open-file}. @end deffn primitive-move->fdes +@c snarfed from ioext.c:262 @deffn {Scheme Procedure} primitive-move->fdes port fd @deffnx {C Function} scm_primitive_move_to_fdes (port, fd) Moves the underlying file descriptor for @var{port} to the integer @@ -1958,6 +2177,7 @@ required value or @code{#t} if it was moved. @end deffn fdes->ports +@c snarfed from ioext.c:296 @deffn {Scheme Procedure} fdes->ports fd @deffnx {C Function} scm_fdes_to_ports (fd) Return a list of existing ports which have @var{fdes} as an @@ -1966,12 +2186,14 @@ counts. @end deffn make-keyword-from-dash-symbol +@c snarfed from keywords.c:74 @deffn {Scheme Procedure} make-keyword-from-dash-symbol symbol @deffnx {C Function} scm_make_keyword_from_dash_symbol (symbol) Make a keyword object from a @var{symbol} that starts with a dash. @end deffn keyword? +@c snarfed from keywords.c:112 @deffn {Scheme Procedure} keyword? obj @deffnx {C Function} scm_keyword_p (obj) Return @code{#t} if the argument @var{obj} is a keyword, else @@ -1979,48 +2201,15 @@ Return @code{#t} if the argument @var{obj} is a keyword, else @end deffn keyword-dash-symbol +@c snarfed from keywords.c:123 @deffn {Scheme Procedure} keyword-dash-symbol keyword @deffnx {C Function} scm_keyword_dash_symbol (keyword) Return the dash symbol for @var{keyword}. This is the inverse of @code{make-keyword-from-dash-symbol}. @end deffn - nil-cons -@deffn {Scheme Procedure} nil-cons x y -@deffnx {C Function} scm_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 - - nil-car -@deffn {Scheme Procedure} nil-car x -@deffnx {C Function} scm_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 - - nil-cdr -@deffn {Scheme Procedure} nil-cdr x -@deffnx {C Function} scm_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 - - null -@deffn {Scheme Procedure} null x -@deffnx {C Function} scm_null (x) -Return LISP's @code{t} if @var{x} is nil in the LISP sense, -return LISP's nil otherwise. -@end deffn - - nil-eq -@deffn {Scheme Procedure} 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 - list +@c snarfed from list.c:127 @deffn {Scheme Procedure} list . objs @deffnx {C Function} scm_list (objs) Return a list containing @var{objs}, the arguments to @@ -2028,6 +2217,7 @@ Return a list containing @var{objs}, the arguments to @end deffn cons* +@c snarfed from list.c:142 @deffn {Scheme Procedure} cons* arg . rest @deffnx {C Function} scm_cons_star (arg, rest) Like @code{list}, but the last arg provides the tail of the @@ -2039,24 +2229,28 @@ Schemes and in Common LISP. @end deffn null? +@c snarfed from list.c:166 @deffn {Scheme Procedure} null? x @deffnx {C Function} scm_null_p (x) Return @code{#t} iff @var{x} is the empty list, else @code{#f}. @end deffn list? +@c snarfed from list.c:176 @deffn {Scheme Procedure} list? x @deffnx {C Function} scm_list_p (x) Return @code{#t} iff @var{x} is a proper list, else @code{#f}. @end deffn length +@c snarfed from list.c:217 @deffn {Scheme Procedure} length lst @deffnx {C Function} scm_length (lst) Return the number of elements in list @var{lst}. @end deffn append +@c snarfed from list.c:246 @deffn {Scheme Procedure} append . args @deffnx {C Function} scm_append (args) Return a list consisting of the elements the lists passed as @@ -2077,6 +2271,7 @@ if the last argument is not a proper list. @end deffn append! +@c snarfed from list.c:280 @deffn {Scheme Procedure} append! . lists @deffnx {C Function} scm_append_x (lists) A destructive version of @code{append} (@pxref{Pairs and @@ -2087,6 +2282,7 @@ the mutated list. @end deffn last-pair +@c snarfed from list.c:306 @deffn {Scheme Procedure} last-pair lst @deffnx {C Function} scm_last_pair (lst) Return a pointer to the last pair in @var{lst}, signalling an error if @@ -2094,6 +2290,7 @@ Return a pointer to the last pair in @var{lst}, signalling an error if @end deffn reverse +@c snarfed from list.c:336 @deffn {Scheme Procedure} reverse lst @deffnx {C Function} scm_reverse (lst) Return a new list that contains the elements of @var{lst} but @@ -2101,6 +2298,7 @@ in reverse order. @end deffn reverse! +@c snarfed from list.c:370 @deffn {Scheme Procedure} reverse! lst [new_tail] @deffnx {C Function} scm_reverse_x (lst, new_tail) A destructive version of @code{reverse} (@pxref{Pairs and Lists,,,r5rs, @@ -2117,23 +2315,27 @@ of the modified list is not lost, it is wise to save the return value of @end deffn list-ref +@c snarfed from list.c:396 @deffn {Scheme Procedure} list-ref list k @deffnx {C Function} scm_list_ref (list, k) Return the @var{k}th element from @var{list}. @end deffn list-set! +@c snarfed from list.c:420 @deffn {Scheme Procedure} list-set! list k val @deffnx {C Function} scm_list_set_x (list, k, val) Set the @var{k}th element of @var{list} to @var{val}. @end deffn list-cdr-ref +@c snarfed from list.c:443 @deffn {Scheme Procedure} list-cdr-ref implemented by the C function "scm_list_tail" @end deffn list-tail +@c snarfed from list.c:452 @deffn {Scheme Procedure} list-tail lst k @deffnx {Scheme Procedure} list-cdr-ref lst k @deffnx {C Function} scm_list_tail (lst, k) @@ -2146,12 +2348,14 @@ or returning the results of cdring @var{k} times down @var{lst}. @end deffn list-cdr-set! +@c snarfed from list.c:468 @deffn {Scheme Procedure} list-cdr-set! list k val @deffnx {C Function} scm_list_cdr_set_x (list, k, val) Set the @var{k}th cdr of @var{list} to @var{val}. @end deffn list-head +@c snarfed from list.c:497 @deffn {Scheme Procedure} list-head lst k @deffnx {C Function} scm_list_head (lst, k) Copy the first @var{k} elements from @var{lst} into a new list, and @@ -2159,12 +2363,14 @@ return it. @end deffn list-copy +@c snarfed from list.c:521 @deffn {Scheme Procedure} list-copy lst @deffnx {C Function} scm_list_copy (lst) Return a (newly-created) copy of @var{lst}. @end deffn memq +@c snarfed from list.c:575 @deffn {Scheme Procedure} memq x lst @deffnx {C Function} scm_memq (x, lst) Return the first sublist of @var{lst} whose car is @code{eq?} @@ -2176,6 +2382,7 @@ returned. @end deffn memv +@c snarfed from list.c:591 @deffn {Scheme Procedure} memv x lst @deffnx {C Function} scm_memv (x, lst) Return the first sublist of @var{lst} whose car is @code{eqv?} @@ -2187,6 +2394,7 @@ returned. @end deffn member +@c snarfed from list.c:612 @deffn {Scheme Procedure} member x lst @deffnx {C Function} scm_member (x, lst) Return the first sublist of @var{lst} whose car is @@ -2198,6 +2406,7 @@ empty list) is returned. @end deffn delq! +@c snarfed from list.c:637 @deffn {Scheme Procedure} delq! item lst @deffnx {Scheme Procedure} delv! item lst @deffnx {Scheme Procedure} delete! item lst @@ -2211,6 +2420,7 @@ destructive list functions, these functions cannot modify the binding of @end deffn delv! +@c snarfed from list.c:661 @deffn {Scheme Procedure} delv! item lst @deffnx {C Function} scm_delv_x (item, lst) Destructively remove all elements from @var{lst} that are @@ -2218,6 +2428,7 @@ Destructively remove all elements from @var{lst} that are @end deffn delete! +@c snarfed from list.c:686 @deffn {Scheme Procedure} delete! item lst @deffnx {C Function} scm_delete_x (item, lst) Destructively remove all elements from @var{lst} that are @@ -2225,6 +2436,7 @@ Destructively remove all elements from @var{lst} that are @end deffn delq +@c snarfed from list.c:715 @deffn {Scheme Procedure} delq item lst @deffnx {C Function} scm_delq (item, lst) Return a newly-created copy of @var{lst} with elements @@ -2234,6 +2446,7 @@ Return a newly-created copy of @var{lst} with elements @end deffn delv +@c snarfed from list.c:728 @deffn {Scheme Procedure} delv item lst @deffnx {C Function} scm_delv (item, lst) Return a newly-created copy of @var{lst} with elements @@ -2243,6 +2456,7 @@ Return a newly-created copy of @var{lst} with elements @end deffn delete +@c snarfed from list.c:741 @deffn {Scheme Procedure} delete item lst @deffnx {C Function} scm_delete (item, lst) Return a newly-created copy of @var{lst} with elements @@ -2252,6 +2466,7 @@ against @var{item} with @code{equal?}. @end deffn delq1! +@c snarfed from list.c:754 @deffn {Scheme Procedure} delq1! item lst @deffnx {C Function} scm_delq1_x (item, lst) Like @code{delq!}, but only deletes the first occurrence of @@ -2260,6 +2475,7 @@ Like @code{delq!}, but only deletes the first occurrence of @end deffn delv1! +@c snarfed from list.c:782 @deffn {Scheme Procedure} delv1! item lst @deffnx {C Function} scm_delv1_x (item, lst) Like @code{delv!}, but only deletes the first occurrence of @@ -2268,6 +2484,7 @@ Like @code{delv!}, but only deletes the first occurrence of @end deffn delete1! +@c snarfed from list.c:810 @deffn {Scheme Procedure} delete1! item lst @deffnx {C Function} scm_delete1_x (item, lst) Like @code{delete!}, but only deletes the first occurrence of @@ -2276,6 +2493,7 @@ Like @code{delete!}, but only deletes the first occurrence of @end deffn primitive-load +@c snarfed from load.c:111 @deffn {Scheme Procedure} primitive-load filename @deffnx {C Function} scm_primitive_load (filename) Load the file named @var{filename} and evaluate its contents in @@ -2288,6 +2506,7 @@ documentation for @code{%load-hook} later in this section. @end deffn %package-data-dir +@c snarfed from load.c:151 @deffn {Scheme Procedure} %package-data-dir @deffnx {C Function} scm_sys_package_data_dir () Return the name of the directory where Scheme packages, modules and @@ -2296,6 +2515,7 @@ libraries are kept. On most Unix systems, this will be @end deffn %library-dir +@c snarfed from load.c:163 @deffn {Scheme Procedure} %library-dir @deffnx {C Function} scm_sys_library_dir () Return the directory where the Guile Scheme library files are installed. @@ -2303,6 +2523,7 @@ E.g., may return "/usr/share/guile/1.3.5". @end deffn %site-dir +@c snarfed from load.c:175 @deffn {Scheme Procedure} %site-dir @deffnx {C Function} scm_sys_site_dir () Return the directory where the Guile site files are installed. @@ -2310,6 +2531,7 @@ E.g., may return "/usr/share/guile/site". @end deffn parse-path +@c snarfed from load.c:227 @deffn {Scheme Procedure} parse-path path [tail] @deffnx {C Function} scm_parse_path (path, tail) Parse @var{path}, which is expected to be a colon-separated @@ -2319,6 +2541,7 @@ is returned. @end deffn search-path +@c snarfed from load.c:277 @deffn {Scheme Procedure} search-path path filename [extensions] @deffnx {C Function} scm_search_path (path, filename, extensions) Search @var{path} for a directory containing a file named @@ -2331,6 +2554,7 @@ concatenated with each @var{extension}. @end deffn %search-load-path +@c snarfed from load.c:423 @deffn {Scheme Procedure} %search-load-path filename @deffnx {C Function} scm_sys_search_load_path (filename) Search @var{%load-path} for the file named @var{filename}, @@ -2343,6 +2567,7 @@ will try each extension automatically. @end deffn primitive-load-path +@c snarfed from load.c:444 @deffn {Scheme Procedure} primitive-load-path filename @deffnx {C Function} scm_primitive_load_path (filename) Search @var{%load-path} for the file named @var{filename} and @@ -2352,6 +2577,7 @@ an error is signalled. @end deffn procedure->syntax +@c snarfed from macros.c:104 @deffn {Scheme Procedure} procedure->syntax code @deffnx {C Function} scm_makacro (code) Return a @dfn{macro} which, when a symbol defined to this value @@ -2361,6 +2587,7 @@ environment. @end deffn procedure->macro +@c snarfed from macros.c:127 @deffn {Scheme Procedure} procedure->macro code @deffnx {C Function} scm_makmacro (code) Return a @dfn{macro} which, when a symbol defined to this value @@ -2380,6 +2607,7 @@ passed to @var{code}. For example: @end deffn procedure->memoizing-macro +@c snarfed from macros.c:150 @deffn {Scheme Procedure} procedure->memoizing-macro code @deffnx {C Function} scm_makmmacro (code) Return a @dfn{macro} which, when a symbol defined to this value @@ -2399,6 +2627,7 @@ passed to @var{proc}. For example: @end deffn macro? +@c snarfed from macros.c:162 @deffn {Scheme Procedure} macro? obj @deffnx {C Function} scm_macro_p (obj) Return @code{#t} if @var{obj} is a regular macro, a memoizing macro or a @@ -2406,6 +2635,7 @@ syntax transformer. @end deffn macro-type +@c snarfed from macros.c:180 @deffn {Scheme Procedure} macro-type m @deffnx {C Function} scm_macro_type (m) Return one of the symbols @code{syntax}, @code{macro} or @@ -2416,24 +2646,28 @@ returned. @end deffn macro-name +@c snarfed from macros.c:198 @deffn {Scheme Procedure} macro-name m @deffnx {C Function} scm_macro_name (m) Return the name of the macro @var{m}. @end deffn macro-transformer +@c snarfed from macros.c:209 @deffn {Scheme Procedure} macro-transformer m @deffnx {C Function} scm_macro_transformer (m) Return the transformer of the macro @var{m}. @end deffn current-module +@c snarfed from modules.c:69 @deffn {Scheme Procedure} current-module @deffnx {C Function} scm_current_module () Return the current module. @end deffn set-current-module +@c snarfed from modules.c:81 @deffn {Scheme Procedure} set-current-module module @deffnx {C Function} scm_set_current_module (module) Set the current module to @var{module} and return @@ -2441,6 +2675,7 @@ the previous current module. @end deffn interaction-environment +@c snarfed from modules.c:104 @deffn {Scheme Procedure} interaction-environment @deffnx {C Function} scm_interaction_environment () Return a specifier for the environment that contains @@ -2451,30 +2686,35 @@ evaluate expressions dynamically typed by the user. @end deffn env-module +@c snarfed from modules.c:271 @deffn {Scheme Procedure} env-module env @deffnx {C Function} scm_env_module (env) Return the module of @var{ENV}, a lexical environment. @end deffn standard-eval-closure +@c snarfed from modules.c:348 @deffn {Scheme Procedure} standard-eval-closure module @deffnx {C Function} scm_standard_eval_closure (module) Return an eval closure for the module @var{module}. @end deffn standard-interface-eval-closure +@c snarfed from modules.c:359 @deffn {Scheme Procedure} standard-interface-eval-closure module @deffnx {C Function} scm_standard_interface_eval_closure (module) Return a interface eval closure for the module @var{module}. Such a closure does not allow new bindings to be added. @end deffn %get-pre-modules-obarray +@c snarfed from modules.c:582 @deffn {Scheme Procedure} %get-pre-modules-obarray @deffnx {C Function} scm_get_pre_modules_obarray () Return the obarray that is used for all new bindings before the module system is booted. The first call to @code{set-current-module} will boot the module system. @end deffn exact? +@c snarfed from numbers.c:101 @deffn {Scheme Procedure} exact? x @deffnx {C Function} scm_exact_p (x) Return @code{#t} if @var{x} is an exact number, @code{#f} @@ -2482,6 +2722,7 @@ otherwise. @end deffn odd? +@c snarfed from numbers.c:118 @deffn {Scheme Procedure} odd? n @deffnx {C Function} scm_odd_p (n) Return @code{#t} if @var{n} is an odd number, @code{#f} @@ -2489,6 +2730,7 @@ otherwise. @end deffn even? +@c snarfed from numbers.c:135 @deffn {Scheme Procedure} even? n @deffnx {C Function} scm_even_p (n) Return @code{#t} if @var{n} is an even number, @code{#f} @@ -2496,6 +2738,7 @@ otherwise. @end deffn logand +@c snarfed from numbers.c:748 @deffn {Scheme Procedure} logand n1 n2 Return the bitwise AND of the integer arguments. @@ -2507,6 +2750,7 @@ Return the bitwise AND of the integer arguments. @end deffn logior +@c snarfed from numbers.c:834 @deffn {Scheme Procedure} logior n1 n2 Return the bitwise OR of the integer arguments. @@ -2518,6 +2762,7 @@ Return the bitwise OR of the integer arguments. @end deffn logxor +@c snarfed from numbers.c:921 @deffn {Scheme Procedure} logxor n1 n2 Return the bitwise XOR of the integer arguments. A bit is set in the result if it is set in an odd number of arguments. @@ -2530,6 +2775,7 @@ set in the result if it is set in an odd number of arguments. @end deffn logtest +@c snarfed from numbers.c:990 @deffn {Scheme Procedure} logtest j k @deffnx {C Function} scm_logtest (j, k) @lisp @@ -2541,6 +2787,7 @@ set in the result if it is set in an odd number of arguments. @end deffn logbit? +@c snarfed from numbers.c:1047 @deffn {Scheme Procedure} logbit? index j @deffnx {C Function} scm_logbit_p (index, j) @lisp @@ -2555,6 +2802,7 @@ set in the result if it is set in an odd number of arguments. @end deffn lognot +@c snarfed from numbers.c:1096 @deffn {Scheme Procedure} lognot n @deffnx {C Function} scm_lognot (n) Return the integer which is the 2s-complement of the integer @@ -2569,6 +2817,7 @@ argument. @end deffn integer-expt +@c snarfed from numbers.c:1113 @deffn {Scheme Procedure} integer-expt n k @deffnx {C Function} scm_integer_expt (n, k) Return @var{n} raised to the non-negative integer exponent @@ -2583,6 +2832,7 @@ Return @var{n} raised to the non-negative integer exponent @end deffn ash +@c snarfed from numbers.c:1168 @deffn {Scheme Procedure} ash n cnt @deffnx {C Function} scm_ash (n, cnt) The function ash performs an arithmetic shift left by @var{cnt} @@ -2603,6 +2853,7 @@ Formally, the function returns an integer equivalent to @end deffn bit-extract +@c snarfed from numbers.c:1221 @deffn {Scheme Procedure} bit-extract n start end @deffnx {C Function} scm_bit_extract (n, start, end) Return the integer composed of the @var{start} (inclusive) @@ -2618,6 +2869,7 @@ through @var{end} (exclusive) bits of @var{n}. The @end deffn logcount +@c snarfed from numbers.c:1293 @deffn {Scheme Procedure} logcount n @deffnx {C Function} scm_logcount (n) Return the number of bits in integer @var{n}. If integer is @@ -2636,6 +2888,7 @@ representation are counted. If 0, 0 is returned. @end deffn integer-length +@c snarfed from numbers.c:1344 @deffn {Scheme Procedure} integer-length n @deffnx {C Function} scm_integer_length (n) Return the number of bits neccessary to represent @var{n}. @@ -2651,6 +2904,7 @@ Return the number of bits neccessary to represent @var{n}. @end deffn number->string +@c snarfed from numbers.c:2177 @deffn {Scheme Procedure} number->string n [radix] @deffnx {C Function} scm_number_to_string (n, radix) Return a string holding the external representation of the @@ -2659,6 +2913,7 @@ inexact, a radix of 10 will be used. @end deffn string->number +@c snarfed from numbers.c:2812 @deffn {Scheme Procedure} string->number string [radix] @deffnx {C Function} scm_string_to_number (string, radix) Return a number of the maximally precise representation @@ -2672,11 +2927,13 @@ syntactically valid notation for a number, then @end deffn number? +@c snarfed from numbers.c:2881 @deffn {Scheme Procedure} number? implemented by the C function "scm_number_p" @end deffn complex? +@c snarfed from numbers.c:2893 @deffn {Scheme Procedure} complex? x @deffnx {C Function} scm_number_p (x) Return @code{#t} if @var{x} is a complex number, @code{#f} @@ -2687,11 +2944,13 @@ rational or integer number. @end deffn real? +@c snarfed from numbers.c:2901 @deffn {Scheme Procedure} real? implemented by the C function "scm_real_p" @end deffn rational? +@c snarfed from numbers.c:2914 @deffn {Scheme Procedure} rational? x @deffnx {C Function} scm_real_p (x) Return @code{#t} if @var{x} is a rational number, @code{#f} @@ -2703,6 +2962,7 @@ precision. @end deffn integer? +@c snarfed from numbers.c:2935 @deffn {Scheme Procedure} integer? x @deffnx {C Function} scm_integer_p (x) Return @code{#t} if @var{x} is an integer number, @code{#f} @@ -2710,6 +2970,7 @@ else. @end deffn inexact? +@c snarfed from numbers.c:2960 @deffn {Scheme Procedure} inexact? x @deffnx {C Function} scm_inexact_p (x) Return @code{#t} if @var{x} is an inexact number, @code{#f} @@ -2717,6 +2978,7 @@ else. @end deffn $expt +@c snarfed from numbers.c:4084 @deffn {Scheme Procedure} $expt x y @deffnx {C Function} scm_sys_expt (x, y) Return @var{x} raised to the power of @var{y}. This @@ -2724,6 +2986,7 @@ procedure does not accept complex arguments. @end deffn $atan2 +@c snarfed from numbers.c:4100 @deffn {Scheme Procedure} $atan2 x y @deffnx {C Function} scm_sys_atan2 (x, y) Return the arc tangent of the two arguments @var{x} and @@ -2734,6 +2997,7 @@ procedure does not accept complex arguments. @end deffn make-rectangular +@c snarfed from numbers.c:4113 @deffn {Scheme Procedure} make-rectangular real imaginary @deffnx {C Function} scm_make_rectangular (real, imaginary) Return a complex number constructed of the given @var{real} and @@ -2741,42 +3005,49 @@ Return a complex number constructed of the given @var{real} and @end deffn make-polar +@c snarfed from numbers.c:4126 @deffn {Scheme Procedure} make-polar x y @deffnx {C Function} scm_make_polar (x, y) Return the complex number @var{x} * e^(i * @var{y}). @end deffn inexact->exact +@c snarfed from numbers.c:4261 @deffn {Scheme Procedure} inexact->exact z @deffnx {C Function} scm_inexact_to_exact (z) Return an exact number that is numerically closest to @var{z}. @end deffn class-of +@c snarfed from objects.c:86 @deffn {Scheme Procedure} class-of x @deffnx {C Function} scm_class_of (x) Return the class of @var{x}. @end deffn entity? +@c snarfed from objects.c:360 @deffn {Scheme Procedure} entity? obj @deffnx {C Function} scm_entity_p (obj) Return @code{#t} if @var{obj} is an entity. @end deffn operator? +@c snarfed from objects.c:369 @deffn {Scheme Procedure} operator? obj @deffnx {C Function} scm_operator_p (obj) Return @code{#t} if @var{obj} is an operator. @end deffn valid-object-procedure? +@c snarfed from objects.c:385 @deffn {Scheme Procedure} valid-object-procedure? proc @deffnx {C Function} scm_valid_object_procedure_p (proc) Return @code{#t} iff @var{proc} is a procedure that can be used with @code{set-object-procedure}. It is always valid to use a closure constructed by @code{lambda}. @end deffn set-object-procedure! +@c snarfed from objects.c:407 @deffn {Scheme Procedure} set-object-procedure! obj proc @deffnx {C Function} scm_set_object_procedure_x (obj, proc) Set the object procedure of @var{obj} to @var{proc}. @@ -2784,6 +3055,7 @@ Set the object procedure of @var{obj} to @var{proc}. @end deffn make-class-object +@c snarfed from objects.c:467 @deffn {Scheme Procedure} make-class-object metaclass layout @deffnx {C Function} scm_make_class_object (metaclass, layout) Create a new class object of class @var{metaclass}, with the @@ -2791,6 +3063,7 @@ slot layout specified by @var{layout}. @end deffn make-subclass-object +@c snarfed from objects.c:482 @deffn {Scheme Procedure} make-subclass-object class layout @deffnx {C Function} scm_make_subclass_object (class, layout) Create a subclass object of @var{class}, with the slot layout @@ -2798,24 +3071,28 @@ specified by @var{layout}. @end deffn object-properties +@c snarfed from objprop.c:59 @deffn {Scheme Procedure} object-properties obj @deffnx {C Function} scm_object_properties (obj) Return @var{obj}'s property list. @end deffn set-object-properties! +@c snarfed from objprop.c:69 @deffn {Scheme Procedure} set-object-properties! obj alist @deffnx {C Function} scm_set_object_properties_x (obj, alist) Set @var{obj}'s property list to @var{alist}. @end deffn object-property +@c snarfed from objprop.c:80 @deffn {Scheme Procedure} object-property obj key @deffnx {C Function} scm_object_property (obj, key) Return the property of @var{obj} with name @var{key}. @end deffn set-object-property! +@c snarfed from objprop.c:92 @deffn {Scheme Procedure} set-object-property! obj key value @deffnx {C Function} scm_set_object_property_x (obj, key, value) In @var{obj}'s property list, set the property named @var{key} @@ -2823,6 +3100,7 @@ to @var{value}. @end deffn cons +@c snarfed from pairs.c:80 @deffn {Scheme Procedure} cons x y @deffnx {C Function} scm_cons (x, y) Return a newly allocated pair whose car is @var{x} and whose @@ -2831,6 +3109,7 @@ sense of @code{eq?}) from every previously existing object. @end deffn pair? +@c snarfed from pairs.c:98 @deffn {Scheme Procedure} pair? x @deffnx {C Function} scm_pair_p (x) Return @code{#t} if @var{x} is a pair; otherwise return @@ -2838,6 +3117,7 @@ Return @code{#t} if @var{x} is a pair; otherwise return @end deffn set-car! +@c snarfed from pairs.c:109 @deffn {Scheme Procedure} set-car! pair value @deffnx {C Function} scm_set_car_x (pair, value) Stores @var{value} in the car field of @var{pair}. The value returned @@ -2845,6 +3125,7 @@ by @code{set-car!} is unspecified. @end deffn set-cdr! +@c snarfed from pairs.c:122 @deffn {Scheme Procedure} set-cdr! pair value @deffnx {C Function} scm_set_cdr_x (pair, value) Stores @var{value} in the cdr field of @var{pair}. The value returned @@ -2852,6 +3133,7 @@ by @code{set-cdr!} is unspecified. @end deffn char-ready? +@c snarfed from ports.c:259 @deffn {Scheme Procedure} char-ready? [port] @deffnx {C Function} scm_char_ready_p (port) Return @code{#t} if a character is ready on input @var{port} @@ -2870,6 +3152,7 @@ interactive port that has no ready characters.} @end deffn drain-input +@c snarfed from ports.c:336 @deffn {Scheme Procedure} drain-input port @deffnx {C Function} scm_drain_input (port) This procedure clears a port's input buffers, similar @@ -2889,6 +3172,7 @@ for further input. @end deffn current-input-port +@c snarfed from ports.c:363 @deffn {Scheme Procedure} current-input-port @deffnx {C Function} scm_current_input_port () Return the current input port. This is the default port used @@ -2897,6 +3181,7 @@ returns the @dfn{standard input} in Unix and C terminology. @end deffn current-output-port +@c snarfed from ports.c:375 @deffn {Scheme Procedure} current-output-port @deffnx {C Function} scm_current_output_port () Return the current output port. This is the default port used @@ -2906,6 +3191,7 @@ Unix and C terminology. @end deffn current-error-port +@c snarfed from ports.c:385 @deffn {Scheme Procedure} current-error-port @deffnx {C Function} scm_current_error_port () Return the port to which errors and warnings should be sent (the @@ -2913,6 +3199,7 @@ Return the port to which errors and warnings should be sent (the @end deffn current-load-port +@c snarfed from ports.c:395 @deffn {Scheme Procedure} current-load-port @deffnx {C Function} scm_current_load_port () Return the current-load-port. @@ -2920,6 +3207,7 @@ The load port is used internally by @code{primitive-load}. @end deffn set-current-input-port +@c snarfed from ports.c:408 @deffn {Scheme Procedure} set-current-input-port port @deffnx {Scheme Procedure} set-current-output-port port @deffnx {Scheme Procedure} set-current-error-port port @@ -2930,24 +3218,28 @@ so that they use the supplied @var{port} for input or output. @end deffn set-current-output-port +@c snarfed from ports.c:421 @deffn {Scheme Procedure} set-current-output-port port @deffnx {C Function} scm_set_current_output_port (port) Set the current default output port to @var{port}. @end deffn set-current-error-port +@c snarfed from ports.c:435 @deffn {Scheme Procedure} set-current-error-port port @deffnx {C Function} scm_set_current_error_port (port) Set the current default error port to @var{port}. @end deffn port-revealed +@c snarfed from ports.c:578 @deffn {Scheme Procedure} port-revealed port @deffnx {C Function} scm_port_revealed (port) Return the revealed count for @var{port}. @end deffn set-port-revealed! +@c snarfed from ports.c:591 @deffn {Scheme Procedure} set-port-revealed! port rcount @deffnx {C Function} scm_set_port_revealed_x (port, rcount) Sets the revealed count for a port to a given value. @@ -2955,6 +3247,7 @@ The return value is unspecified. @end deffn port-mode +@c snarfed from ports.c:634 @deffn {Scheme Procedure} port-mode port @deffnx {C Function} scm_port_mode (port) Return the port modes associated with the open port @var{port}. @@ -2964,6 +3257,7 @@ used only during port creation are not retained. @end deffn close-port +@c snarfed from ports.c:671 @deffn {Scheme Procedure} close-port port @deffnx {C Function} scm_close_port (port) Close the specified port object. Return @code{#t} if it @@ -2975,6 +3269,7 @@ descriptors. @end deffn close-input-port +@c snarfed from ports.c:699 @deffn {Scheme Procedure} close-input-port port @deffnx {C Function} scm_close_input_port (port) Close the specified input port object. The routine has no effect if @@ -2986,6 +3281,7 @@ which can close file descriptors. @end deffn close-output-port +@c snarfed from ports.c:714 @deffn {Scheme Procedure} close-output-port port @deffnx {C Function} scm_close_output_port (port) Close the specified output port object. The routine has no effect if @@ -2997,6 +3293,7 @@ which can close file descriptors. @end deffn port-for-each +@c snarfed from ports.c:731 @deffn {Scheme Procedure} port-for-each proc @deffnx {C Function} scm_port_for_each (proc) Apply @var{proc} to each port in the Guile port table @@ -3008,6 +3305,7 @@ have no effect as far as @var{port-for-each} is concerned. @end deffn input-port? +@c snarfed from ports.c:772 @deffn {Scheme Procedure} input-port? x @deffnx {C Function} scm_input_port_p (x) Return @code{#t} if @var{x} is an input port, otherwise return @@ -3016,6 +3314,7 @@ Return @code{#t} if @var{x} is an input port, otherwise return @end deffn output-port? +@c snarfed from ports.c:783 @deffn {Scheme Procedure} output-port? x @deffnx {C Function} scm_output_port_p (x) Return @code{#t} if @var{x} is an output port, otherwise return @@ -3024,6 +3323,7 @@ Return @code{#t} if @var{x} is an output port, otherwise return @end deffn port? +@c snarfed from ports.c:795 @deffn {Scheme Procedure} port? x @deffnx {C Function} scm_port_p (x) Return a boolean indicating whether @var{x} is a port. @@ -3032,6 +3332,7 @@ Equivalent to @code{(or (input-port? @var{x}) (output-port? @end deffn port-closed? +@c snarfed from ports.c:805 @deffn {Scheme Procedure} port-closed? port @deffnx {C Function} scm_port_closed_p (port) Return @code{#t} if @var{port} is closed or @code{#f} if it is @@ -3039,6 +3340,7 @@ open. @end deffn eof-object? +@c snarfed from ports.c:816 @deffn {Scheme Procedure} eof-object? x @deffnx {C Function} scm_eof_object_p (x) Return @code{#t} if @var{x} is an end-of-file object; otherwise @@ -3046,6 +3348,7 @@ return @code{#f}. @end deffn force-output +@c snarfed from ports.c:830 @deffn {Scheme Procedure} force-output [port] @deffnx {C Function} scm_force_output (port) Flush the specified output port, or the current output port if @var{port} @@ -3058,6 +3361,7 @@ The return value is unspecified. @end deffn flush-all-ports +@c snarfed from ports.c:848 @deffn {Scheme Procedure} flush-all-ports @deffnx {C Function} scm_flush_all_ports () Equivalent to calling @code{force-output} on @@ -3065,6 +3369,7 @@ all open output ports. The return value is unspecified. @end deffn read-char +@c snarfed from ports.c:866 @deffn {Scheme Procedure} read-char [port] @deffnx {C Function} scm_read_char (port) Return the next character available from @var{port}, updating @@ -3073,6 +3378,7 @@ characters are available, the end-of-file object is returned. @end deffn peek-char +@c snarfed from ports.c:1192 @deffn {Scheme Procedure} peek-char [port] @deffnx {C Function} scm_peek_char (port) Return the next character available from @var{port}, @@ -3090,6 +3396,7 @@ to @code{read-char} would have hung.} @end deffn unread-char +@c snarfed from ports.c:1213 @deffn {Scheme Procedure} unread-char cobj [port] @deffnx {C Function} scm_unread_char (cobj, port) Place @var{char} in @var{port} so that it will be read by the @@ -3099,6 +3406,7 @@ not supplied, the current input port is used. @end deffn unread-string +@c snarfed from ports.c:1236 @deffn {Scheme Procedure} unread-string str port @deffnx {C Function} scm_unread_string (str, port) Place the string @var{str} in @var{port} so that its characters will be @@ -3108,6 +3416,7 @@ unread characters will be read again in last-in first-out order. If @end deffn seek +@c snarfed from ports.c:1275 @deffn {Scheme Procedure} seek fd_port offset whence @deffnx {C Function} scm_seek (fd_port, offset, whence) Sets the current position of @var{fd/port} to the integer @@ -3136,6 +3445,7 @@ that the current position of a port can be obtained using: @end deffn truncate-file +@c snarfed from ports.c:1330 @deffn {Scheme Procedure} truncate-file object [length] @deffnx {C Function} scm_truncate_file (object, length) Truncates the object referred to by @var{object} to at most @@ -3147,18 +3457,21 @@ position. The return value is unspecified. @end deffn port-line +@c snarfed from ports.c:1383 @deffn {Scheme Procedure} port-line port @deffnx {C Function} scm_port_line (port) Return the current line number for @var{port}. @end deffn set-port-line! +@c snarfed from ports.c:1394 @deffn {Scheme Procedure} set-port-line! port line @deffnx {C Function} scm_set_port_line_x (port, line) Set the current line number for @var{port} to @var{line}. @end deffn port-column +@c snarfed from ports.c:1415 @deffn {Scheme Procedure} port-column port @deffnx {Scheme Procedure} port-line port @deffnx {C Function} scm_port_column (port) @@ -3173,6 +3486,7 @@ what non-programmers will find most natural.) @end deffn set-port-column! +@c snarfed from ports.c:1428 @deffn {Scheme Procedure} set-port-column! port column @deffnx {Scheme Procedure} set-port-line! port line @deffnx {C Function} scm_set_port_column_x (port, column) @@ -3181,6 +3495,7 @@ current input port if none is specified. @end deffn port-filename +@c snarfed from ports.c:1443 @deffn {Scheme Procedure} port-filename port @deffnx {C Function} scm_port_filename (port) Return the filename associated with @var{port}. This function returns @@ -3189,6 +3504,7 @@ when called on the current input, output and error ports respectively. @end deffn set-port-filename! +@c snarfed from ports.c:1457 @deffn {Scheme Procedure} set-port-filename! port filename @deffnx {C Function} scm_set_port_filename_x (port, filename) Change the filename associated with @var{port}, using the current input @@ -3198,6 +3514,7 @@ source of data, but only the value that is returned by @end deffn %make-void-port +@c snarfed from ports.c:1551 @deffn {Scheme Procedure} %make-void-port mode @deffnx {C Function} scm_sys_make_void_port (mode) Create and return a new void port. A void port acts like @@ -3207,6 +3524,7 @@ documentation for @code{open-file} in @ref{File Ports}. @end deffn print-options-interface +@c snarfed from print.c:142 @deffn {Scheme Procedure} print-options-interface [setting] @deffnx {C Function} scm_print_options (setting) Option interface for the print options. Instead of using @@ -3216,6 +3534,7 @@ and @code{print-options}. @end deffn simple-format +@c snarfed from print.c:921 @deffn {Scheme Procedure} simple-format destination message . args @deffnx {C Function} scm_simple_format (destination, message, args) Write @var{message} to @var{destination}, defaulting to @@ -3232,6 +3551,7 @@ containing the formatted text. Does not add a trailing newline. @end deffn newline +@c snarfed from print.c:1008 @deffn {Scheme Procedure} newline [port] @deffnx {C Function} scm_newline (port) Send a newline to @var{port}. @@ -3239,12 +3559,14 @@ If @var{port} is omitted, send to the current output port. @end deffn write-char +@c snarfed from print.c:1023 @deffn {Scheme Procedure} write-char chr [port] @deffnx {C Function} scm_write_char (chr, port) Send character @var{chr} to @var{port}. @end deffn port-with-print-state +@c snarfed from print.c:1077 @deffn {Scheme Procedure} port-with-print-state port pstate @deffnx {C Function} scm_port_with_print_state (port, pstate) Create a new port which behaves like @var{port}, but with an @@ -3252,6 +3574,7 @@ included print state @var{pstate}. @end deffn get-print-state +@c snarfed from print.c:1092 @deffn {Scheme Procedure} get-print-state port @deffnx {C Function} scm_get_print_state (port) Return the print state of the port @var{port}. If @var{port} @@ -3259,24 +3582,28 @@ has no associated print state, @code{#f} is returned. @end deffn procedure-properties +@c snarfed from procprop.c:176 @deffn {Scheme Procedure} procedure-properties proc @deffnx {C Function} scm_procedure_properties (proc) Return @var{obj}'s property list. @end deffn set-procedure-properties! +@c snarfed from procprop.c:189 @deffn {Scheme Procedure} set-procedure-properties! proc new_val @deffnx {C Function} scm_set_procedure_properties_x (proc, new_val) Set @var{obj}'s property list to @var{alist}. @end deffn procedure-property +@c snarfed from procprop.c:202 @deffn {Scheme Procedure} procedure-property p k @deffnx {C Function} scm_procedure_property (p, k) Return the property of @var{obj} with name @var{key}. @end deffn set-procedure-property! +@c snarfed from procprop.c:225 @deffn {Scheme Procedure} set-procedure-property! p k v @deffnx {C Function} scm_set_procedure_property_x (p, k, v) In @var{obj}'s property list, set the property named @var{key} to @@ -3284,24 +3611,28 @@ In @var{obj}'s property list, set the property named @var{key} to @end deffn procedure? +@c snarfed from procs.c:186 @deffn {Scheme Procedure} procedure? obj @deffnx {C Function} scm_procedure_p (obj) Return @code{#t} if @var{obj} is a procedure. @end deffn closure? +@c snarfed from procs.c:213 @deffn {Scheme Procedure} closure? obj @deffnx {C Function} scm_closure_p (obj) Return @code{#t} if @var{obj} is a closure. @end deffn thunk? +@c snarfed from procs.c:222 @deffn {Scheme Procedure} thunk? obj @deffnx {C Function} scm_thunk_p (obj) Return @code{#t} if @var{obj} is a thunk. @end deffn procedure-documentation +@c snarfed from procs.c:272 @deffn {Scheme Procedure} procedure-documentation proc @deffnx {C Function} scm_procedure_documentation (proc) Return the documentation string associated with @code{proc}. By @@ -3311,6 +3642,7 @@ documentation for that procedure. @end deffn procedure-with-setter? +@c snarfed from procs.c:308 @deffn {Scheme Procedure} procedure-with-setter? obj @deffnx {C Function} scm_procedure_with_setter_p (obj) Return @code{#t} if @var{obj} is a procedure with an @@ -3318,6 +3650,7 @@ associated setter procedure. @end deffn make-procedure-with-setter +@c snarfed from procs.c:318 @deffn {Scheme Procedure} make-procedure-with-setter procedure setter @deffnx {C Function} scm_make_procedure_with_setter (procedure, setter) Create a new procedure which behaves like @var{procedure}, but @@ -3325,6 +3658,7 @@ with the associated setter @var{setter}. @end deffn procedure +@c snarfed from procs.c:332 @deffn {Scheme Procedure} procedure proc @deffnx {C Function} scm_procedure (proc) Return the procedure of @var{proc}, which must be either a @@ -3332,6 +3666,7 @@ procedure with setter, or an operator struct. @end deffn primitive-make-property +@c snarfed from properties.c:64 @deffn {Scheme Procedure} primitive-make-property not_found_proc @deffnx {C Function} scm_primitive_make_property (not_found_proc) Create a @dfn{property token} that can be used with @@ -3341,6 +3676,7 @@ See @code{primitive-property-ref} for the significance of @end deffn primitive-property-ref +@c snarfed from properties.c:82 @deffn {Scheme Procedure} primitive-property-ref prop obj @deffnx {C Function} scm_primitive_property_ref (prop, obj) Return the property @var{prop} of @var{obj}. When no value @@ -3353,18 +3689,21 @@ default value of @var{prop}. @end deffn primitive-property-set! +@c snarfed from properties.c:113 @deffn {Scheme Procedure} primitive-property-set! prop obj val @deffnx {C Function} scm_primitive_property_set_x (prop, obj, val) Associate @var{code} with @var{prop} and @var{obj}. @end deffn primitive-property-del! +@c snarfed from properties.c:134 @deffn {Scheme Procedure} primitive-property-del! prop obj @deffnx {C Function} scm_primitive_property_del_x (prop, obj) Remove any value associated with @var{prop} and @var{obj}. @end deffn random +@c snarfed from random.c:376 @deffn {Scheme Procedure} random n [state] @deffnx {C Function} scm_random (n, state) Return a number in [0,N). @@ -3382,18 +3721,21 @@ as a side effect of the random operation. @end deffn copy-random-state +@c snarfed from random.c:399 @deffn {Scheme Procedure} copy-random-state [state] @deffnx {C Function} scm_copy_random_state (state) Return a copy of the random state @var{state}. @end deffn seed->random-state +@c snarfed from random.c:411 @deffn {Scheme Procedure} seed->random-state seed @deffnx {C Function} scm_seed_to_random_state (seed) Return a new random state using @var{seed}. @end deffn random:uniform +@c snarfed from random.c:425 @deffn {Scheme Procedure} random:uniform [state] @deffnx {C Function} scm_random_uniform (state) Return a uniformly distributed inexact real random number in @@ -3401,6 +3743,7 @@ Return a uniformly distributed inexact real random number in @end deffn random:normal +@c snarfed from random.c:440 @deffn {Scheme Procedure} random:normal [state] @deffnx {C Function} scm_random_normal (state) Return an inexact real in a normal distribution. The @@ -3410,6 +3753,7 @@ normal distribution with mean m and standard deviation d use @end deffn random:solid-sphere! +@c snarfed from random.c:496 @deffn {Scheme Procedure} random:solid-sphere! v [state] @deffnx {C Function} scm_random_solid_sphere_x (v, state) Fills vect with inexact real random numbers @@ -3421,6 +3765,7 @@ The sum of the squares of the numbers is returned. @end deffn random:hollow-sphere! +@c snarfed from random.c:519 @deffn {Scheme Procedure} random:hollow-sphere! v [state] @deffnx {C Function} scm_random_hollow_sphere_x (v, state) Fills vect with inexact real random numbers @@ -3432,6 +3777,7 @@ unit n-sphere. @end deffn random:normal-vector! +@c snarfed from random.c:537 @deffn {Scheme Procedure} random:normal-vector! v [state] @deffnx {C Function} scm_random_normal_vector_x (v, state) Fills vect with inexact real random numbers that are @@ -3440,6 +3786,7 @@ independent and standard normally distributed @end deffn random:exp +@c snarfed from random.c:562 @deffn {Scheme Procedure} random:exp [state] @deffnx {C Function} scm_random_exp (state) Return an inexact real in an exponential distribution with mean @@ -3448,6 +3795,7 @@ Return an inexact real in an exponential distribution with mean @end deffn %read-delimited! +@c snarfed from rdelim.c:78 @deffn {Scheme Procedure} %read-delimited! delims str gobble [port [start [end]]] @deffnx {C Function} scm_read_delimited_x (delims, str, gobble, port, start, end) Read characters from @var{port} into @var{str} until one of the @@ -3468,6 +3816,7 @@ a delimiter, this value is @code{#f}. @end deffn %read-line +@c snarfed from rdelim.c:222 @deffn {Scheme Procedure} %read-line [port] @deffnx {C Function} scm_read_line (port) Read a newline-terminated line from @var{port}, allocating storage as @@ -3479,6 +3828,7 @@ delimiter may be either a newline or the @var{eof-object}; if @end deffn write-line +@c snarfed from rdelim.c:275 @deffn {Scheme Procedure} write-line obj [port] @deffnx {C Function} scm_write_line (obj, port) Display @var{obj} and a newline character to @var{port}. If @@ -3491,6 +3841,7 @@ used. This function is equivalent to: @end deffn read-options-interface +@c snarfed from read.c:82 @deffn {Scheme Procedure} read-options-interface [setting] @deffnx {C Function} scm_read_options (setting) Option interface for the read options. Instead of using @@ -3499,6 +3850,7 @@ this procedure directly, use the procedures @code{read-enable}, @end deffn read +@c snarfed from read.c:102 @deffn {Scheme Procedure} read [port] @deffnx {C Function} scm_read (port) Read an s-expression from the input port @var{port}, or from @@ -3507,6 +3859,7 @@ Any whitespace before the next token is discarded. @end deffn read-hash-extend +@c snarfed from read.c:769 @deffn {Scheme Procedure} read-hash-extend chr proc @deffnx {C Function} scm_read_hash_extend (chr, proc) Install the procedure @var{proc} for reading expressions @@ -3517,6 +3870,7 @@ returned will be the return value of @code{read}. @end deffn call-with-dynamic-root +@c snarfed from root.c:352 @deffn {Scheme Procedure} call-with-dynamic-root thunk handler @deffnx {C Function} scm_call_with_dynamic_root (thunk, handler) Evaluate @code{(thunk)} in a new dynamic context, returning its value. @@ -3564,6 +3918,7 @@ be under a new dynamic root.) @end deffn dynamic-root +@c snarfed from root.c:365 @deffn {Scheme Procedure} dynamic-root @deffnx {C Function} scm_dynamic_root () Return an object representing the current dynamic root. @@ -3574,6 +3929,7 @@ in no way depend on this. @end deffn read-string!/partial +@c snarfed from rw.c:121 @deffn {Scheme Procedure} read-string!/partial str [port_or_fdes [start [end]]] @deffnx {C Function} scm_read_string_x_partial (str, port_or_fdes, start, end) Read characters from a port or file descriptor into a @@ -3616,6 +3972,7 @@ end-of-file check. @end deffn write-string/partial +@c snarfed from rw.c:215 @deffn {Scheme Procedure} write-string/partial str [port_or_fdes [start [end]]] @deffnx {C Function} scm_write_string_partial (str, port_or_fdes, start, end) Write characters from a string @var{str} to a port or file @@ -3662,6 +4019,7 @@ return 0 immediately if the request size is 0 bytes. @end deffn sigaction +@c snarfed from scmsigs.c:182 @deffn {Scheme Procedure} sigaction signum [handler [flags]] @deffnx {C Function} scm_sigaction (signum, handler, flags) Install or report the signal handler for a specified signal. @@ -3693,6 +4051,7 @@ structures. @end deffn restore-signals +@c snarfed from scmsigs.c:345 @deffn {Scheme Procedure} restore-signals @deffnx {C Function} scm_restore_signals () Return all signal handlers to the values they had before any call to @@ -3700,6 +4059,7 @@ Return all signal handlers to the values they had before any call to @end deffn alarm +@c snarfed from scmsigs.c:384 @deffn {Scheme Procedure} alarm i @deffnx {C Function} scm_alarm (i) Set a timer to raise a @code{SIGALRM} signal after the specified @@ -3714,6 +4074,7 @@ no previous alarm, the return value is zero. @end deffn setitimer +@c snarfed from scmsigs.c:414 @deffn {Scheme Procedure} setitimer which_timer interval_seconds interval_microseconds value_seconds value_microseconds @deffnx {C Function} scm_setitimer (which_timer, interval_seconds, interval_microseconds, value_seconds, value_microseconds) Set the timer specified by @var{which_timer} according to the given @@ -3734,6 +4095,7 @@ the seconds and microseconds of the timer @code{it_value}. @end deffn getitimer +@c snarfed from scmsigs.c:455 @deffn {Scheme Procedure} getitimer which_timer @deffnx {C Function} scm_getitimer (which_timer) Return information about the timer specified by @var{which_timer} @@ -3750,6 +4112,7 @@ the seconds and microseconds of the timer @code{it_value}. @end deffn pause +@c snarfed from scmsigs.c:482 @deffn {Scheme Procedure} pause @deffnx {C Function} scm_pause () Pause the current process (thread?) until a signal arrives whose @@ -3758,6 +4121,7 @@ handler procedure. The return value is unspecified. @end deffn sleep +@c snarfed from scmsigs.c:495 @deffn {Scheme Procedure} sleep i @deffnx {C Function} scm_sleep (i) Wait for the given number of seconds (an integer) or until a signal @@ -3766,6 +4130,7 @@ of seconds remaining otherwise. @end deffn usleep +@c snarfed from scmsigs.c:513 @deffn {Scheme Procedure} usleep i @deffnx {C Function} scm_usleep (i) Sleep for I microseconds. @code{usleep} is not available on @@ -3773,6 +4138,7 @@ all platforms. @end deffn raise +@c snarfed from scmsigs.c:542 @deffn {Scheme Procedure} raise sig @deffnx {C Function} scm_raise (sig) Sends a specified signal @var{sig} to the current process, where @@ -3780,6 +4146,7 @@ Sends a specified signal @var{sig} to the current process, where @end deffn system +@c snarfed from simpos.c:76 @deffn {Scheme Procedure} system [cmd] @deffnx {C Function} scm_system (cmd) Execute @var{cmd} using the operating system's "command @@ -3793,6 +4160,7 @@ indicating whether the command processor is available. @end deffn getenv +@c snarfed from simpos.c:103 @deffn {Scheme Procedure} getenv nam @deffnx {C Function} scm_getenv (nam) Looks up the string @var{name} in the current environment. The return @@ -3801,6 +4169,7 @@ found, in which case the string @code{VALUE} is returned. @end deffn primitive-exit +@c snarfed from simpos.c:118 @deffn {Scheme Procedure} primitive-exit [status] @deffnx {C Function} scm_primitive_exit (status) Terminate the current process without unwinding the Scheme stack. @@ -3809,6 +4178,7 @@ is @var{status} if supplied, otherwise zero. @end deffn restricted-vector-sort! +@c snarfed from sort.c:422 @deffn {Scheme Procedure} restricted-vector-sort! vec less startpos endpos @deffnx {C Function} scm_restricted_vector_sort_x (vec, less, startpos, endpos) Sort the vector @var{vec}, using @var{less} for comparing @@ -3818,6 +4188,7 @@ is not specified. @end deffn sorted? +@c snarfed from sort.c:453 @deffn {Scheme Procedure} sorted? items less @deffnx {C Function} scm_sorted_p (items, less) Return @code{#t} iff @var{items} is a list or a vector such that @@ -3826,6 +4197,7 @@ applied to all elements i - 1 and i @end deffn merge +@c snarfed from sort.c:526 @deffn {Scheme Procedure} merge alist blist less @deffnx {C Function} scm_merge (alist, blist, less) Merge two already sorted lists into one. @@ -3838,6 +4210,7 @@ Note: this does _not_ accept vectors. @end deffn merge! +@c snarfed from sort.c:639 @deffn {Scheme Procedure} merge! alist blist less @deffnx {C Function} scm_merge_x (alist, blist, less) Takes two lists @var{alist} and @var{blist} such that @@ -3850,6 +4223,7 @@ Note: this does _not_ accept vectors. @end deffn sort! +@c snarfed from sort.c:715 @deffn {Scheme Procedure} sort! items less @deffnx {C Function} scm_sort_x (items, less) Sort the sequence @var{items}, which may be a list or a @@ -3860,6 +4234,7 @@ This is not a stable sort. @end deffn sort +@c snarfed from sort.c:749 @deffn {Scheme Procedure} sort items less @deffnx {C Function} scm_sort (items, less) Sort the sequence @var{items}, which may be a list or a @@ -3868,6 +4243,7 @@ elements. This is not a stable sort. @end deffn stable-sort! +@c snarfed from sort.c:845 @deffn {Scheme Procedure} stable-sort! items less @deffnx {C Function} scm_stable_sort_x (items, less) Sort the sequence @var{items}, which may be a list or a @@ -3878,6 +4254,7 @@ This is a stable sort. @end deffn stable-sort +@c snarfed from sort.c:885 @deffn {Scheme Procedure} stable-sort items less @deffnx {C Function} scm_stable_sort (items, less) Sort the sequence @var{items}, which may be a list or a @@ -3886,6 +4263,7 @@ This is a stable sort. @end deffn sort-list! +@c snarfed from sort.c:931 @deffn {Scheme Procedure} sort-list! items less @deffnx {C Function} scm_sort_list_x (items, less) Sort the list @var{items}, using @var{less} for comparing the @@ -3895,6 +4273,7 @@ This is a stable sort. @end deffn sort-list +@c snarfed from sort.c:945 @deffn {Scheme Procedure} sort-list items less @deffnx {C Function} scm_sort_list (items, less) Sort the list @var{items}, using @var{less} for comparing the @@ -3902,12 +4281,14 @@ list elements. This is a stable sort. @end deffn source-properties +@c snarfed from srcprop.c:170 @deffn {Scheme Procedure} source-properties obj @deffnx {C Function} scm_source_properties (obj) Return the source property association list of @var{obj}. @end deffn set-source-properties! +@c snarfed from srcprop.c:193 @deffn {Scheme Procedure} set-source-properties! obj plist @deffnx {C Function} scm_set_source_properties_x (obj, plist) Install the association list @var{plist} as the source property @@ -3915,6 +4296,7 @@ list for @var{obj}. @end deffn source-property +@c snarfed from srcprop.c:213 @deffn {Scheme Procedure} source-property obj key @deffnx {C Function} scm_source_property (obj, key) Return the source property specified by @var{key} from @@ -3922,6 +4304,7 @@ Return the source property specified by @var{key} from @end deffn set-source-property! +@c snarfed from srcprop.c:246 @deffn {Scheme Procedure} set-source-property! obj key datum @deffnx {C Function} scm_set_source_property_x (obj, key, datum) Set the source property of object @var{obj}, which is specified by @@ -3929,12 +4312,14 @@ Set the source property of object @var{obj}, which is specified by @end deffn stack? +@c snarfed from stacks.c:411 @deffn {Scheme Procedure} stack? obj @deffnx {C Function} scm_stack_p (obj) Return @code{#t} if @var{obj} is a calling stack. @end deffn make-stack +@c snarfed from stacks.c:442 @deffn {Scheme Procedure} make-stack obj . args @deffnx {C Function} scm_make_stack (obj, args) Create a new stack. If @var{obj} is @code{#t}, the current @@ -3968,30 +4353,35 @@ taken as 0. @end deffn stack-id +@c snarfed from stacks.c:534 @deffn {Scheme Procedure} stack-id stack @deffnx {C Function} scm_stack_id (stack) Return the identifier given to @var{stack} by @code{start-stack}. @end deffn stack-ref +@c snarfed from stacks.c:575 @deffn {Scheme Procedure} stack-ref stack index @deffnx {C Function} scm_stack_ref (stack, index) Return the @var{index}'th frame from @var{stack}. @end deffn stack-length +@c snarfed from stacks.c:591 @deffn {Scheme Procedure} stack-length stack @deffnx {C Function} scm_stack_length (stack) Return the length of @var{stack}. @end deffn frame? +@c snarfed from stacks.c:604 @deffn {Scheme Procedure} frame? obj @deffnx {C Function} scm_frame_p (obj) Return @code{#t} if @var{obj} is a stack frame. @end deffn last-stack-frame +@c snarfed from stacks.c:615 @deffn {Scheme Procedure} last-stack-frame obj @deffnx {C Function} scm_last_stack_frame (obj) Return a stack which consists of a single frame, which is the @@ -4000,18 +4390,21 @@ debug object or a continuation. @end deffn frame-number +@c snarfed from stacks.c:657 @deffn {Scheme Procedure} frame-number frame @deffnx {C Function} scm_frame_number (frame) Return the frame number of @var{frame}. @end deffn frame-source +@c snarfed from stacks.c:667 @deffn {Scheme Procedure} frame-source frame @deffnx {C Function} scm_frame_source (frame) Return the source of @var{frame}. @end deffn frame-procedure +@c snarfed from stacks.c:678 @deffn {Scheme Procedure} frame-procedure frame @deffnx {C Function} scm_frame_procedure (frame) Return the procedure for @var{frame}, or @code{#f} if no @@ -4019,12 +4412,14 @@ procedure is associated with @var{frame}. @end deffn frame-arguments +@c snarfed from stacks.c:690 @deffn {Scheme Procedure} frame-arguments frame @deffnx {C Function} scm_frame_arguments (frame) Return the arguments of @var{frame}. @end deffn frame-previous +@c snarfed from stacks.c:701 @deffn {Scheme Procedure} frame-previous frame @deffnx {C Function} scm_frame_previous (frame) Return the previous frame of @var{frame}, or @code{#f} if @@ -4032,6 +4427,7 @@ Return the previous frame of @var{frame}, or @code{#f} if @end deffn frame-next +@c snarfed from stacks.c:717 @deffn {Scheme Procedure} frame-next frame @deffnx {C Function} scm_frame_next (frame) Return the next frame of @var{frame}, or @code{#f} if @@ -4039,30 +4435,35 @@ Return the next frame of @var{frame}, or @code{#f} if @end deffn frame-real? +@c snarfed from stacks.c:732 @deffn {Scheme Procedure} frame-real? frame @deffnx {C Function} scm_frame_real_p (frame) Return @code{#t} if @var{frame} is a real frame. @end deffn frame-procedure? +@c snarfed from stacks.c:742 @deffn {Scheme Procedure} frame-procedure? frame @deffnx {C Function} scm_frame_procedure_p (frame) Return @code{#t} if a procedure is associated with @var{frame}. @end deffn frame-evaluating-args? +@c snarfed from stacks.c:752 @deffn {Scheme Procedure} frame-evaluating-args? frame @deffnx {C Function} scm_frame_evaluating_args_p (frame) Return @code{#t} if @var{frame} contains evaluated arguments. @end deffn frame-overflow? +@c snarfed from stacks.c:762 @deffn {Scheme Procedure} frame-overflow? frame @deffnx {C Function} scm_frame_overflow_p (frame) Return @code{#t} if @var{frame} is an overflow frame. @end deffn get-internal-real-time +@c snarfed from stime.c:143 @deffn {Scheme Procedure} get-internal-real-time @deffnx {C Function} scm_get_internal_real_time () Return the number of time units since the interpreter was @@ -4070,6 +4471,7 @@ started. @end deffn times +@c snarfed from stime.c:188 @deffn {Scheme Procedure} times @deffnx {C Function} scm_times () Return an object with information about real and processor @@ -4096,6 +4498,7 @@ terminated child processes. @end deffn get-internal-run-time +@c snarfed from stime.c:220 @deffn {Scheme Procedure} get-internal-run-time @deffnx {C Function} scm_get_internal_run_time () Return the number of time units of processor time used by the @@ -4104,6 +4507,7 @@ included but subprocesses are not. @end deffn current-time +@c snarfed from stime.c:230 @deffn {Scheme Procedure} current-time @deffnx {C Function} scm_current_time () Return the number of seconds since 1970-01-01 00:00:00 UTC, @@ -4111,6 +4515,7 @@ excluding leap seconds. @end deffn gettimeofday +@c snarfed from stime.c:248 @deffn {Scheme Procedure} gettimeofday @deffnx {C Function} scm_gettimeofday () Return a pair containing the number of seconds and microseconds @@ -4120,6 +4525,7 @@ operating system. @end deffn localtime +@c snarfed from stime.c:347 @deffn {Scheme Procedure} localtime time [zone] @deffnx {C Function} scm_localtime (time, zone) Return an object representing the broken down components of @@ -4130,6 +4536,7 @@ optionally specified by @var{zone} (a string), otherwise the @end deffn gmtime +@c snarfed from stime.c:420 @deffn {Scheme Procedure} gmtime time @deffnx {C Function} scm_gmtime (time) Return an object representing the broken down components of @@ -4138,6 +4545,7 @@ Return an object representing the broken down components of @end deffn mktime +@c snarfed from stime.c:482 @deffn {Scheme Procedure} mktime sbd_time [zone] @deffnx {C Function} scm_mktime (sbd_time, zone) @var{bd-time} is an object representing broken down time and @code{zone} @@ -4151,6 +4559,7 @@ as @var{bd-time} but with normalized values. @end deffn tzset +@c snarfed from stime.c:556 @deffn {Scheme Procedure} tzset @deffnx {C Function} scm_tzset () Initialize the timezone from the TZ environment variable @@ -4160,6 +4569,7 @@ timezone. @end deffn strftime +@c snarfed from stime.c:573 @deffn {Scheme Procedure} strftime format stime @deffnx {C Function} scm_strftime (format, stime) Formats a time specification @var{time} using @var{template}. @var{time} @@ -4172,6 +4582,7 @@ is the formatted string. @end deffn strptime +@c snarfed from stime.c:670 @deffn {Scheme Procedure} strptime format string @deffnx {C Function} scm_strptime (format, string) Performs the reverse action to @code{strftime}, parsing @@ -4187,17 +4598,20 @@ which were used for the conversion. @end deffn string? +@c snarfed from strings.c:61 @deffn {Scheme Procedure} string? obj @deffnx {C Function} scm_string_p (obj) Return @code{#t} iff @var{obj} is a string, else @code{#f}. @end deffn list->string +@c snarfed from strings.c:69 @deffn {Scheme Procedure} list->string implemented by the C function "scm_string" @end deffn string +@c snarfed from strings.c:75 @deffn {Scheme Procedure} string . chrs @deffnx {Scheme Procedure} list->string chrs @deffnx {C Function} scm_string (chrs) @@ -4206,6 +4620,7 @@ Return a newly allocated string composed of the arguments, @end deffn make-string +@c snarfed from strings.c:209 @deffn {Scheme Procedure} make-string k [chr] @deffnx {C Function} scm_make_string (k, chr) Return a newly allocated string of @@ -4215,12 +4630,14 @@ of the @var{string} are unspecified. @end deffn string-length +@c snarfed from strings.c:242 @deffn {Scheme Procedure} string-length string @deffnx {C Function} scm_string_length (string) Return the number of characters in @var{string}. @end deffn string-ref +@c snarfed from strings.c:253 @deffn {Scheme Procedure} string-ref str k @deffnx {C Function} scm_string_ref (str, k) Return character @var{k} of @var{str} using zero-origin @@ -4228,6 +4645,7 @@ indexing. @var{k} must be a valid index of @var{str}. @end deffn string-set! +@c snarfed from strings.c:270 @deffn {Scheme Procedure} string-set! str k chr @deffnx {C Function} scm_string_set_x (str, k, chr) Store @var{chr} in element @var{k} of @var{str} and return @@ -4236,6 +4654,7 @@ an unspecified value. @var{k} must be a valid index of @end deffn substring +@c snarfed from strings.c:289 @deffn {Scheme Procedure} substring str start [end] @deffnx {C Function} scm_substring (str, start, end) Return a newly allocated string formed from the characters @@ -4248,6 +4667,7 @@ exact integers satisfying: @end deffn string-append +@c snarfed from strings.c:315 @deffn {Scheme Procedure} string-append . args @deffnx {C Function} scm_string_append (args) Return a newly allocated string whose characters form the @@ -4255,6 +4675,7 @@ concatenation of the given strings, @var{args}. @end deffn string-index +@c snarfed from strop.c:138 @deffn {Scheme Procedure} string-index str chr [frm [to]] @deffnx {C Function} scm_string_index (str, chr, frm, to) Return the index of the first occurrence of @var{chr} in @@ -4276,6 +4697,7 @@ procedure essentially implements the @code{index} or @end deffn string-rindex +@c snarfed from strop.c:168 @deffn {Scheme Procedure} string-rindex str chr [frm [to]] @deffnx {C Function} scm_string_rindex (str, chr, frm, to) Like @code{string-index}, but search from the right of the @@ -4296,6 +4718,7 @@ the C library. @end deffn substring-move! +@c snarfed from strop.c:188 @deffn {Scheme Procedure} substring-move! str1 start1 end1 str2 start2 @deffnx {C Function} scm_substring_move_x (str1, start1, end1, str2, start2) Copy the substring of @var{str1} bounded by @var{start1} and @var{end1} @@ -4304,6 +4727,7 @@ into @var{str2} beginning at position @var{start2}. @end deffn substring-fill! +@c snarfed from strop.c:224 @deffn {Scheme Procedure} substring-fill! str start end fill @deffnx {C Function} scm_substring_fill_x (str, start, end, fill) Change every character in @var{str} between @var{start} and @@ -4318,6 +4742,7 @@ y @end deffn string-null? +@c snarfed from strop.c:249 @deffn {Scheme Procedure} string-null? str @deffnx {C Function} scm_string_null_p (str) Return @code{#t} if @var{str}'s length is zero, and @@ -4330,6 +4755,7 @@ y @result{} "foo" @end deffn string->list +@c snarfed from strop.c:263 @deffn {Scheme Procedure} string->list str @deffnx {C Function} scm_string_to_list (str) Return a newly allocated list of the characters that make up @@ -4339,12 +4765,14 @@ concerned. @end deffn string-copy +@c snarfed from strop.c:292 @deffn {Scheme Procedure} string-copy str @deffnx {C Function} scm_string_copy (str) Return a newly allocated copy of the given @var{string}. @end deffn string-fill! +@c snarfed from strop.c:305 @deffn {Scheme Procedure} string-fill! str chr @deffnx {C Function} scm_string_fill_x (str, chr) Store @var{char} in every element of the given @var{string} and @@ -4352,6 +4780,7 @@ return an unspecified value. @end deffn string-upcase! +@c snarfed from strop.c:340 @deffn {Scheme Procedure} string-upcase! str @deffnx {C Function} scm_string_upcase_x (str) Destructively upcase every character in @var{str} and return @@ -4364,6 +4793,7 @@ y @result{} "ARRDEFG" @end deffn string-upcase +@c snarfed from strop.c:353 @deffn {Scheme Procedure} string-upcase str @deffnx {C Function} scm_string_upcase (str) Return a freshly allocated string containing the characters of @@ -4371,6 +4801,7 @@ Return a freshly allocated string containing the characters of @end deffn string-downcase! +@c snarfed from strop.c:385 @deffn {Scheme Procedure} string-downcase! str @deffnx {C Function} scm_string_downcase_x (str) Destructively downcase every character in @var{str} and return @@ -4383,6 +4814,7 @@ y @result{} "arrdefg" @end deffn string-downcase +@c snarfed from strop.c:398 @deffn {Scheme Procedure} string-downcase str @deffnx {C Function} scm_string_downcase (str) Return a freshly allocation string containing the characters in @@ -4390,6 +4822,7 @@ Return a freshly allocation string containing the characters in @end deffn string-capitalize! +@c snarfed from strop.c:443 @deffn {Scheme Procedure} string-capitalize! str @deffnx {C Function} scm_string_capitalize_x (str) Upcase the first character of every word in @var{str} @@ -4403,6 +4836,7 @@ y @result{} "Hello World" @end deffn string-capitalize +@c snarfed from strop.c:457 @deffn {Scheme Procedure} string-capitalize str @deffnx {C Function} scm_string_capitalize (str) Return a freshly allocated string with the characters in @@ -4411,6 +4845,7 @@ capitalized. @end deffn string-split +@c snarfed from strop.c:486 @deffn {Scheme Procedure} string-split str chr @deffnx {C Function} scm_string_split (str, chr) Split the string @var{str} into the a list of the substrings delimited @@ -4434,6 +4869,7 @@ result list. @end deffn string-ci->symbol +@c snarfed from strop.c:521 @deffn {Scheme Procedure} string-ci->symbol str @deffnx {C Function} scm_string_ci_to_symbol (str) Return the symbol whose name is @var{str}. @var{str} is @@ -4442,6 +4878,7 @@ is currently reading symbols case-insensitively. @end deffn string=? +@c snarfed from strorder.c:62 @deffn {Scheme Procedure} string=? s1 s2 Lexicographic equality predicate; return @code{#t} if the two strings are the same length and contain the same characters in @@ -4454,6 +4891,7 @@ characters. @end deffn string-ci=? +@c snarfed from strorder.c:97 @deffn {Scheme Procedure} string-ci=? s1 s2 Case-insensitive string equality predicate; return @code{#t} if the two strings are the same length and their component @@ -4462,30 +4900,35 @@ return @code{#f}. @end deffn string? +@c snarfed from strorder.c:182 @deffn {Scheme Procedure} string>? s1 s2 Lexicographic ordering predicate; return @code{#t} if @var{s1} is lexicographically greater than @var{s2}. @end deffn string>=? +@c snarfed from strorder.c:196 @deffn {Scheme Procedure} string>=? s1 s2 Lexicographic ordering predicate; return @code{#t} if @var{s1} is lexicographically greater than or equal to @var{s2}. @end deffn string-ci? +@c snarfed from strorder.c:265 @deffn {Scheme Procedure} string-ci>? s1 s2 Case insensitive lexicographic ordering predicate; return @code{#t} if @var{s1} is lexicographically greater than @@ -4507,6 +4952,7 @@ Case insensitive lexicographic ordering predicate; return @end deffn string-ci>=? +@c snarfed from strorder.c:280 @deffn {Scheme Procedure} string-ci>=? s1 s2 Case insensitive lexicographic ordering predicate; return @code{#t} if @var{s1} is lexicographically greater than or @@ -4514,6 +4960,7 @@ equal to @var{s2} regardless of case. @end deffn object->string +@c snarfed from strports.c:321 @deffn {Scheme Procedure} object->string obj [printer] @deffnx {C Function} scm_object_to_string (obj, printer) Return a Scheme string obtained by printing @var{obj}. @@ -4522,6 +4969,7 @@ argument @var{printer} (default: @code{write}). @end deffn call-with-output-string +@c snarfed from strports.c:345 @deffn {Scheme Procedure} call-with-output-string proc @deffnx {C Function} scm_call_with_output_string (proc) Calls the one-argument procedure @var{proc} with a newly created output @@ -4530,6 +4978,7 @@ written into the port is returned. @end deffn call-with-input-string +@c snarfed from strports.c:364 @deffn {Scheme Procedure} call-with-input-string string proc @deffnx {C Function} scm_call_with_input_string (string, proc) Calls the one-argument procedure @var{proc} with a newly @@ -4538,6 +4987,7 @@ read. The value yielded by the @var{proc} is returned. @end deffn open-input-string +@c snarfed from strports.c:377 @deffn {Scheme Procedure} open-input-string str @deffnx {C Function} scm_open_input_string (str) Take a string and return an input port that delivers characters @@ -4547,6 +4997,7 @@ by the garbage collector if it becomes inaccessible. @end deffn open-output-string +@c snarfed from strports.c:391 @deffn {Scheme Procedure} open-output-string @deffnx {C Function} scm_open_output_string () Return an output port that will accumulate characters for @@ -4557,6 +5008,7 @@ inaccessible. @end deffn get-output-string +@c snarfed from strports.c:408 @deffn {Scheme Procedure} get-output-string port @deffnx {C Function} scm_get_output_string (port) Given an output port created by @code{open-output-string}, @@ -4565,6 +5017,7 @@ output to the port so far. @end deffn eval-string +@c snarfed from strports.c:467 @deffn {Scheme Procedure} eval-string string @deffnx {C Function} scm_eval_string (string) Evaluate @var{string} as the text representation of a Scheme @@ -4574,6 +5027,7 @@ procedure @code{interaction-environment}. @end deffn make-struct-layout +@c snarfed from struct.c:77 @deffn {Scheme Procedure} make-struct-layout fields @deffnx {C Function} scm_make_struct_layout (fields) Return a new structure layout object. @@ -4589,6 +5043,7 @@ indicate that the field is a tail-array. @end deffn struct? +@c snarfed from struct.c:244 @deffn {Scheme Procedure} struct? x @deffnx {C Function} scm_struct_p (x) Return @code{#t} iff @var{x} is a structure object, else @@ -4596,12 +5051,14 @@ Return @code{#t} iff @var{x} is a structure object, else @end deffn struct-vtable? +@c snarfed from struct.c:253 @deffn {Scheme Procedure} struct-vtable? x @deffnx {C Function} scm_struct_vtable_p (x) Return @code{#t} iff @var{x} is a vtable structure. @end deffn make-struct +@c snarfed from struct.c:434 @deffn {Scheme Procedure} make-struct vtable tail_array_size . init @deffnx {C Function} scm_make_struct (vtable, tail_array_size, init) Create a new structure. @@ -4632,6 +5089,7 @@ For more information, see the documentation for @code{make-vtable-vtable}. @end deffn make-vtable-vtable +@c snarfed from struct.c:519 @deffn {Scheme Procedure} make-vtable-vtable user_fields tail_array_size . init @deffnx {C Function} scm_make_vtable_vtable (user_fields, tail_array_size, init) Return a new, self-describing vtable structure. @@ -4693,6 +5151,7 @@ ball @result{} # @end deffn struct-ref +@c snarfed from struct.c:560 @deffn {Scheme Procedure} struct-ref handle pos @deffnx {Scheme Procedure} struct-set! struct n value @deffnx {C Function} scm_struct_ref (handle, pos) @@ -4705,6 +5164,7 @@ integer value small enough to fit in one machine word. @end deffn struct-set! +@c snarfed from struct.c:638 @deffn {Scheme Procedure} struct-set! handle pos val @deffnx {C Function} scm_struct_set_x (handle, pos, val) Set the slot of the structure @var{handle} with index @var{pos} @@ -4713,37 +5173,58 @@ to. @end deffn struct-vtable +@c snarfed from struct.c:708 @deffn {Scheme Procedure} struct-vtable handle @deffnx {C Function} scm_struct_vtable (handle) Return the vtable structure that describes the type of @var{struct}. @end deffn struct-vtable-tag +@c snarfed from struct.c:719 @deffn {Scheme Procedure} struct-vtable-tag handle @deffnx {C Function} scm_struct_vtable_tag (handle) Return the vtable tag of the structure @var{handle}. @end deffn struct-vtable-name +@c snarfed from struct.c:758 @deffn {Scheme Procedure} struct-vtable-name vtable @deffnx {C Function} scm_struct_vtable_name (vtable) Return the name of the vtable @var{vtable}. @end deffn set-struct-vtable-name! +@c snarfed from struct.c:768 @deffn {Scheme Procedure} set-struct-vtable-name! vtable name @deffnx {C Function} scm_set_struct_vtable_name_x (vtable, name) Set the name of the vtable @var{vtable} to @var{name}. @end deffn symbol? +@c snarfed from symbols.c:164 @deffn {Scheme Procedure} symbol? obj @deffnx {C Function} scm_symbol_p (obj) Return @code{#t} if @var{obj} is a symbol, otherwise return @code{#f}. @end deffn + symbol-interned? +@c snarfed from symbols.c:174 +@deffn {Scheme Procedure} symbol-interned? symbol +@deffnx {C Function} scm_symbol_interned_p (symbol) +Return @code{#t} if @var{symbol} is interned, otherwise return +@code{#f}. +@end deffn + + make-symbol +@c snarfed from symbols.c:186 +@deffn {Scheme Procedure} make-symbol name +@deffnx {C Function} scm_make_symbol (name) +Return a new uninterned symbol with the name @var{name}. The returned symbol is guaranteed to be unique and future calls to @code{string->symbol} will not return it. +@end deffn + symbol->string +@c snarfed from symbols.c:222 @deffn {Scheme Procedure} symbol->string s @deffnx {C Function} scm_symbol_to_string (s) Return the name of @var{symbol} as a string. If the symbol was @@ -4772,6 +5253,7 @@ standard case is lower case: @end deffn string->symbol +@c snarfed from symbols.c:255 @deffn {Scheme Procedure} string->symbol string @deffnx {C Function} scm_string_to_symbol (string) Return the symbol whose name is @var{string}. This procedure @@ -4797,46 +5279,53 @@ standard case is lower case: @end deffn gensym +@c snarfed from symbols.c:277 @deffn {Scheme Procedure} gensym [prefix] @deffnx {C Function} scm_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 -an optional argument. Default prefix is @code{g}. The counter +an optional argument. Default prefix is @code{ g}. The counter is increased by 1 at each call. There is no provision for resetting the counter. @end deffn symbol-hash +@c snarfed from symbols.c:309 @deffn {Scheme Procedure} symbol-hash symbol @deffnx {C Function} scm_symbol_hash (symbol) Return a hash value for @var{symbol}. @end deffn symbol-fref +@c snarfed from symbols.c:319 @deffn {Scheme Procedure} symbol-fref s @deffnx {C Function} scm_symbol_fref (s) Return the contents of @var{symbol}'s @dfn{function slot}. @end deffn symbol-pref +@c snarfed from symbols.c:330 @deffn {Scheme Procedure} symbol-pref s @deffnx {C Function} scm_symbol_pref (s) Return the @dfn{property list} currently associated with @var{symbol}. @end deffn symbol-fset! +@c snarfed from symbols.c:341 @deffn {Scheme Procedure} symbol-fset! s val @deffnx {C Function} scm_symbol_fset_x (s, val) Change the binding of @var{symbol}'s function slot. @end deffn symbol-pset! +@c snarfed from symbols.c:353 @deffn {Scheme Procedure} symbol-pset! s val @deffnx {C Function} scm_symbol_pset_x (s, val) Change the binding of @var{symbol}'s property slot. @end deffn catch +@c snarfed from throw.c:534 @deffn {Scheme Procedure} catch key thunk handler @deffnx {C Function} scm_catch (key, thunk, handler) Invoke @var{thunk} in the dynamic context of @var{handler} for @@ -4860,6 +5349,7 @@ match this call to @code{catch}. @end deffn lazy-catch +@c snarfed from throw.c:562 @deffn {Scheme Procedure} lazy-catch key thunk handler @deffnx {C Function} scm_lazy_catch (key, thunk, handler) This behaves exactly like @code{catch}, except that it does @@ -4869,6 +5359,7 @@ it must throw to another catch, or otherwise exit non-locally. @end deffn throw +@c snarfed from throw.c:595 @deffn {Scheme Procedure} throw key . args @deffnx {C Function} scm_throw (key, args) Invoke the catch form matching @var{key}, passing @var{args} to the @@ -4881,6 +5372,7 @@ If there is no handler at all, Guile prints an error and then exits. @end deffn values +@c snarfed from values.c:77 @deffn {Scheme Procedure} values . args @deffnx {C Function} scm_values (args) Delivers all of its arguments to its continuation. Except for @@ -4891,18 +5383,21 @@ were not created by @code{call-with-values} is unspecified. @end deffn make-variable +@c snarfed from variable.c:76 @deffn {Scheme Procedure} make-variable init @deffnx {C Function} scm_make_variable (init) Return a variable initialized to value @var{init}. @end deffn make-undefined-variable +@c snarfed from variable.c:86 @deffn {Scheme Procedure} make-undefined-variable @deffnx {C Function} scm_make_undefined_variable () Return a variable that is initially unbound. @end deffn variable? +@c snarfed from variable.c:97 @deffn {Scheme Procedure} variable? obj @deffnx {C Function} scm_variable_p (obj) Return @code{#t} iff @var{obj} is a variable object, else @@ -4910,6 +5405,7 @@ return @code{#f}. @end deffn variable-ref +@c snarfed from variable.c:109 @deffn {Scheme Procedure} variable-ref var @deffnx {C Function} scm_variable_ref (var) Dereference @var{var} and return its value. @@ -4918,6 +5414,7 @@ and @code{make-undefined-variable}. @end deffn variable-set! +@c snarfed from variable.c:125 @deffn {Scheme Procedure} variable-set! var val @deffnx {C Function} scm_variable_set_x (var, val) Set the value of the variable @var{var} to @var{val}. @@ -4926,6 +5423,7 @@ value. Return an unspecified value. @end deffn variable-bound? +@c snarfed from variable.c:137 @deffn {Scheme Procedure} variable-bound? var @deffnx {C Function} scm_variable_bound_p (var) Return @code{#t} iff @var{var} is bound to a value. @@ -4933,6 +5431,7 @@ Throws an error if @var{var} is not a variable object. @end deffn vector? +@c snarfed from vectors.c:59 @deffn {Scheme Procedure} vector? obj @deffnx {C Function} scm_vector_p (obj) Return @code{#t} if @var{obj} is a vector, otherwise return @@ -4940,11 +5439,13 @@ Return @code{#t} if @var{obj} is a vector, otherwise return @end deffn list->vector +@c snarfed from vectors.c:76 @deffn {Scheme Procedure} list->vector implemented by the C function "scm_vector" @end deffn vector +@c snarfed from vectors.c:93 @deffn {Scheme Procedure} vector . l @deffnx {Scheme Procedure} list->vector l @deffnx {C Function} scm_vector (l) @@ -4957,6 +5458,7 @@ given arguments. Analogous to @code{list}. @end deffn make-vector +@c snarfed from vectors.c:179 @deffn {Scheme Procedure} make-vector k [fill] @deffnx {C Function} scm_make_vector (k, fill) Return a newly allocated vector of @var{k} elements. If a @@ -4966,6 +5468,7 @@ unspecified. @end deffn vector->list +@c snarfed from vectors.c:233 @deffn {Scheme Procedure} vector->list v @deffnx {C Function} scm_vector_to_list (v) Return a newly allocated list composed of the elements of @var{v}. @@ -4977,6 +5480,7 @@ Return a newly allocated list composed of the elements of @var{v}. @end deffn vector-fill! +@c snarfed from vectors.c:250 @deffn {Scheme Procedure} vector-fill! v fill @deffnx {C Function} scm_vector_fill_x (v, fill) Store @var{fill} in every position of @var{vector}. The value @@ -4984,6 +5488,7 @@ returned by @code{vector-fill!} is unspecified. @end deffn vector-move-left! +@c snarfed from vectors.c:283 @deffn {Scheme Procedure} vector-move-left! vec1 start1 end1 vec2 start2 @deffnx {C Function} scm_vector_move_left_x (vec1, start1, end1, vec2, start2) Copy elements from @var{vec1}, positions @var{start1} to @var{end1}, @@ -4997,6 +5502,7 @@ same vector, @code{vector-move-left!} is usually appropriate when @end deffn vector-move-right! +@c snarfed from vectors.c:312 @deffn {Scheme Procedure} vector-move-right! vec1 start1 end1 vec2 start2 @deffnx {C Function} scm_vector_move_right_x (vec1, start1, end1, vec2, start2) Copy elements from @var{vec1}, positions @var{start1} to @var{end1}, @@ -5010,6 +5516,7 @@ same vector, @code{vector-move-right!} is usually appropriate when @end deffn major-version +@c snarfed from version.c:59 @deffn {Scheme Procedure} major-version @deffnx {C Function} scm_major_version () Return a string containing Guile's major version number. @@ -5017,6 +5524,7 @@ E.g., the 1 in "1.6.5". @end deffn minor-version +@c snarfed from version.c:72 @deffn {Scheme Procedure} minor-version @deffnx {C Function} scm_minor_version () Return a string containing Guile's minor version number. @@ -5024,6 +5532,7 @@ E.g., the 6 in "1.6.5". @end deffn micro-version +@c snarfed from version.c:85 @deffn {Scheme Procedure} micro-version @deffnx {C Function} scm_micro_version () Return a string containing Guile's micro version number. @@ -5031,6 +5540,7 @@ E.g., the 5 in "1.6.5". @end deffn version +@c snarfed from version.c:107 @deffn {Scheme Procedure} version @deffnx {Scheme Procedure} major-version @deffnx {Scheme Procedure} minor-version @@ -5048,6 +5558,7 @@ or micro version number, respectively. @end deffn make-soft-port +@c snarfed from vports.c:185 @deffn {Scheme Procedure} make-soft-port pv modes @deffnx {C Function} scm_make_soft_port (pv, modes) Return a port capable of receiving or delivering characters as @@ -5094,6 +5605,7 @@ For example: @end deffn make-weak-vector +@c snarfed from weaks.c:116 @deffn {Scheme Procedure} make-weak-vector size [fill] @deffnx {C Function} scm_make_weak_vector (size, fill) Return a weak vector with @var{size} elements. If the optional @@ -5103,11 +5615,13 @@ empty list. @end deffn list->weak-vector +@c snarfed from weaks.c:124 @deffn {Scheme Procedure} list->weak-vector implemented by the C function "scm_weak_vector" @end deffn weak-vector +@c snarfed from weaks.c:132 @deffn {Scheme Procedure} weak-vector . l @deffnx {Scheme Procedure} list->weak-vector l @deffnx {C Function} scm_weak_vector (l) @@ -5118,6 +5632,7 @@ the same way @code{list->vector} would. @end deffn weak-vector? +@c snarfed from weaks.c:160 @deffn {Scheme Procedure} weak-vector? obj @deffnx {C Function} scm_weak_vector_p (obj) Return @code{#t} if @var{obj} is a weak vector. Note that all @@ -5125,6 +5640,7 @@ weak hashes are also weak vectors. @end deffn make-weak-key-hash-table +@c snarfed from weaks.c:178 @deffn {Scheme Procedure} make-weak-key-hash-table size @deffnx {Scheme Procedure} make-weak-value-hash-table size @deffnx {Scheme Procedure} make-doubly-weak-hash-table size @@ -5138,6 +5654,7 @@ would modify regular hash tables. (@pxref{Hash Tables}) @end deffn make-weak-value-hash-table +@c snarfed from weaks.c:189 @deffn {Scheme Procedure} make-weak-value-hash-table size @deffnx {C Function} scm_make_weak_value_hash_table (size) Return a hash table with weak values with @var{size} buckets. @@ -5145,6 +5662,7 @@ Return a hash table with weak values with @var{size} buckets. @end deffn make-doubly-weak-hash-table +@c snarfed from weaks.c:200 @deffn {Scheme Procedure} make-doubly-weak-hash-table size @deffnx {C Function} scm_make_doubly_weak_hash_table (size) Return a hash table with weak keys and values with @var{size} @@ -5152,6 +5670,7 @@ buckets. (@pxref{Hash Tables}) @end deffn weak-key-hash-table? +@c snarfed from weaks.c:214 @deffn {Scheme Procedure} weak-key-hash-table? obj @deffnx {Scheme Procedure} weak-value-hash-table? obj @deffnx {Scheme Procedure} doubly-weak-hash-table? obj @@ -5162,18 +5681,21 @@ nor a weak value hash table. @end deffn weak-value-hash-table? +@c snarfed from weaks.c:224 @deffn {Scheme Procedure} weak-value-hash-table? obj @deffnx {C Function} scm_weak_value_hash_table_p (obj) Return @code{#t} if @var{obj} is a weak value hash table. @end deffn doubly-weak-hash-table? +@c snarfed from weaks.c:234 @deffn {Scheme Procedure} doubly-weak-hash-table? obj @deffnx {C Function} scm_doubly_weak_hash_table_p (obj) Return @code{#t} if @var{obj} is a doubly weak hash table. @end deffn regexp? +@c snarfed from regex-posix.c:137 @deffn {Scheme Procedure} regexp? obj @deffnx {C Function} scm_regexp_p (obj) Return @code{#t} if @var{obj} is a compiled regular expression, @@ -5181,6 +5703,7 @@ or @code{#f} otherwise. @end deffn make-regexp +@c snarfed from regex-posix.c:182 @deffn {Scheme Procedure} make-regexp pat . flags @deffnx {C Function} scm_make_regexp (pat, flags) Compile the regular expression described by @var{pat}, and @@ -5223,6 +5746,7 @@ one which comes last will override the earlier one. @end deffn regexp-exec +@c snarfed from regex-posix.c:243 @deffn {Scheme Procedure} regexp-exec rx str [start [flags]] @deffnx {C Function} scm_regexp_exec (rx, str, start, flags) Match the compiled regular expression @var{rx} against @@ -5247,6 +5771,7 @@ considered the end of a line. @end deffn array-fill! +@c snarfed from ramap.c:462 @deffn {Scheme Procedure} array-fill! ra fill @deffnx {C Function} scm_array_fill_x (ra, fill) Store @var{fill} in every element of @var{array}. The value returned @@ -5254,11 +5779,13 @@ is unspecified. @end deffn array-copy-in-order! +@c snarfed from ramap.c:827 @deffn {Scheme Procedure} array-copy-in-order! implemented by the C function "scm_array_copy_x" @end deffn array-copy! +@c snarfed from ramap.c:836 @deffn {Scheme Procedure} array-copy! src dst @deffnx {Scheme Procedure} array-copy-in-order! src dst @deffnx {C Function} scm_array_copy_x (src, dst) @@ -5269,11 +5796,13 @@ dimension. The order is unspecified. @end deffn array-map-in-order! +@c snarfed from ramap.c:1510 @deffn {Scheme Procedure} array-map-in-order! implemented by the C function "scm_array_map_x" @end deffn array-map! +@c snarfed from ramap.c:1521 @deffn {Scheme Procedure} array-map! ra0 proc . lra @deffnx {Scheme Procedure} array-map-in-order! ra0 proc . lra @deffnx {C Function} scm_array_map_x (ra0, proc, lra) @@ -5286,6 +5815,7 @@ unspecified. The order of application is unspecified. @end deffn array-for-each +@c snarfed from ramap.c:1668 @deffn {Scheme Procedure} array-for-each proc ra0 . lra @deffnx {C Function} scm_array_for_each (proc, ra0, lra) Apply @var{proc} to each tuple of elements of @var{array0} @dots{} @@ -5293,6 +5823,7 @@ in row-major order. The value returned is unspecified. @end deffn array-index-map! +@c snarfed from ramap.c:1696 @deffn {Scheme Procedure} array-index-map! ra proc @deffnx {C Function} scm_array_index_map_x (ra, proc) Apply @var{proc} to the indices of each element of @var{array} in @@ -5316,12 +5847,14 @@ Another example: @end deffn uniform-vector-length +@c snarfed from unif.c:250 @deffn {Scheme Procedure} uniform-vector-length v @deffnx {C Function} scm_uniform_vector_length (v) Return the number of elements in @var{uve}. @end deffn array? +@c snarfed from unif.c:284 @deffn {Scheme Procedure} array? v [prot] @deffnx {C Function} scm_array_p (v, prot) Return @code{#t} if the @var{obj} is an array, and @code{#f} if @@ -5330,6 +5863,7 @@ and is described elsewhere. @end deffn array-rank +@c snarfed from unif.c:355 @deffn {Scheme Procedure} array-rank ra @deffnx {C Function} scm_array_rank (ra) Return the number of dimensions of @var{obj}. If @var{obj} is @@ -5337,6 +5871,7 @@ not an array, @code{0} is returned. @end deffn array-dimensions +@c snarfed from unif.c:393 @deffn {Scheme Procedure} array-dimensions ra @deffnx {C Function} scm_array_dimensions (ra) @code{Array-dimensions} is similar to @code{array-shape} but replaces @@ -5347,24 +5882,28 @@ elements with a @code{0} minimum with one greater than the maximum. So: @end deffn shared-array-root +@c snarfed from unif.c:440 @deffn {Scheme Procedure} shared-array-root ra @deffnx {C Function} scm_shared_array_root (ra) Return the root vector of a shared array. @end deffn shared-array-offset +@c snarfed from unif.c:451 @deffn {Scheme Procedure} shared-array-offset ra @deffnx {C Function} scm_shared_array_offset (ra) Return the root vector index of the first element in the array. @end deffn shared-array-increments +@c snarfed from unif.c:462 @deffn {Scheme Procedure} shared-array-increments ra @deffnx {C Function} scm_shared_array_increments (ra) For each dimension, return the distance between elements in the root vector. @end deffn dimensions->uniform-array +@c snarfed from unif.c:581 @deffn {Scheme Procedure} dimensions->uniform-array dims prot [fill] @deffnx {Scheme Procedure} make-uniform-vector length prototype [fill] @deffnx {C Function} scm_dimensions_to_uniform_array (dims, prot, fill) @@ -5375,6 +5914,7 @@ fill the array, otherwise @var{prototype} is used. @end deffn make-shared-array +@c snarfed from unif.c:670 @deffn {Scheme Procedure} make-shared-array oldra mapfunc . dims @deffnx {C Function} scm_make_shared_array (oldra, mapfunc, dims) @code{make-shared-array} can be used to create shared subarrays of other @@ -5395,6 +5935,7 @@ it can be otherwise arbitrary. A simple example: @end deffn transpose-array +@c snarfed from unif.c:802 @deffn {Scheme Procedure} transpose-array ra . args @deffnx {C Function} scm_transpose_array (ra, args) Return an array sharing contents with @var{array}, but with @@ -5419,6 +5960,7 @@ have smaller rank than @var{array}. @end deffn enclose-array +@c snarfed from unif.c:911 @deffn {Scheme Procedure} enclose-array ra . axes @deffnx {C Function} scm_enclose_array (ra, axes) @var{dim0}, @var{dim1} @dots{} should be nonnegative integers less than @@ -5445,6 +5987,7 @@ examples: @end deffn array-in-bounds? +@c snarfed from unif.c:995 @deffn {Scheme Procedure} array-in-bounds? v . args @deffnx {C Function} scm_array_in_bounds_p (v, args) Return @code{#t} if its arguments would be acceptable to @@ -5452,11 +5995,13 @@ Return @code{#t} if its arguments would be acceptable to @end deffn array-ref +@c snarfed from unif.c:1074 @deffn {Scheme Procedure} array-ref implemented by the C function "scm_uniform_vector_ref" @end deffn uniform-vector-ref +@c snarfed from unif.c:1081 @deffn {Scheme Procedure} uniform-vector-ref v args @deffnx {Scheme Procedure} array-ref v . args @deffnx {C Function} scm_uniform_vector_ref (v, args) @@ -5465,11 +6010,13 @@ Return the element at the @code{(index1, index2)} element in @end deffn uniform-array-set1! +@c snarfed from unif.c:1250 @deffn {Scheme Procedure} uniform-array-set1! implemented by the C function "scm_array_set_x" @end deffn array-set! +@c snarfed from unif.c:1259 @deffn {Scheme Procedure} array-set! v obj . args @deffnx {Scheme Procedure} uniform-array-set1! v obj args @deffnx {C Function} scm_array_set_x (v, obj, args) @@ -5478,6 +6025,7 @@ Set the element at the @code{(index1, index2)} element in @var{array} to @end deffn array-contents +@c snarfed from unif.c:1374 @deffn {Scheme Procedure} array-contents ra [strict] @deffnx {C Function} scm_array_contents (ra, strict) If @var{array} may be @dfn{unrolled} into a one dimensional shared array @@ -5493,6 +6041,7 @@ memory. @end deffn uniform-array-read! +@c snarfed from unif.c:1488 @deffn {Scheme Procedure} uniform-array-read! ra [port_or_fd [start [end]]] @deffnx {Scheme Procedure} uniform-vector-read! uve [port-or-fdes] [start] [end] @deffnx {C Function} scm_uniform_array_read_x (ra, port_or_fd, start, end) @@ -5513,6 +6062,7 @@ returned by @code{(current-input-port)}. @end deffn uniform-array-write +@c snarfed from unif.c:1653 @deffn {Scheme Procedure} uniform-array-write v [port_or_fd [start [end]]] @deffnx {Scheme Procedure} uniform-vector-write uve [port-or-fdes] [start] [end] @deffnx {C Function} scm_uniform_array_write (v, port_or_fd, start, end) @@ -5530,6 +6080,7 @@ omitted, in which case it defaults to the value returned by @end deffn bit-count +@c snarfed from unif.c:1780 @deffn {Scheme Procedure} bit-count b bitvector @deffnx {C Function} scm_bit_count (b, bitvector) Return the number of occurrences of the boolean @var{b} in @@ -5537,6 +6088,7 @@ Return the number of occurrences of the boolean @var{b} in @end deffn bit-position +@c snarfed from unif.c:1819 @deffn {Scheme Procedure} bit-position item v k @deffnx {C Function} scm_bit_position (item, v, k) Return the minimum index of an occurrence of @var{bool} in @@ -5545,6 +6097,7 @@ within the specified range @code{#f} is returned. @end deffn bit-set*! +@c snarfed from unif.c:1887 @deffn {Scheme Procedure} bit-set*! v kv obj @deffnx {C Function} scm_bit_set_star_x (v, kv, obj) If uve is a bit-vector @var{bv} and uve must be of the same @@ -5559,6 +6112,7 @@ of @var{bv} corresponding to the indexes in uve are set to @end deffn bit-count* +@c snarfed from unif.c:1941 @deffn {Scheme Procedure} bit-count* v kv obj @deffnx {C Function} scm_bit_count_star (v, kv, obj) Return @@ -5569,19 +6123,22 @@ Return @end deffn bit-invert! +@c snarfed from unif.c:2005 @deffn {Scheme Procedure} bit-invert! v @deffnx {C Function} scm_bit_invert_x (v) Modify @var{bv} by replacing each element with its negation. @end deffn array->list +@c snarfed from unif.c:2084 @deffn {Scheme Procedure} array->list v -@deffnx {C Function} scm_t_arrayo_list (v) +@deffnx {C Function} scm_array_to_list (v) Return a list consisting of all the elements, in order, of @var{array}. @end deffn list->uniform-array +@c snarfed from unif.c:2185 @deffn {Scheme Procedure} list->uniform-array ndim prot lst @deffnx {Scheme Procedure} list->uniform-vector prot lst @deffnx {C Function} scm_list_to_uniform_array (ndim, prot, lst) @@ -5592,6 +6149,7 @@ done. @end deffn array-prototype +@c snarfed from unif.c:2536 @deffn {Scheme Procedure} array-prototype ra @deffnx {C Function} scm_array_prototype (ra) Return an object that would produce an array of the same type @@ -5600,6 +6158,7 @@ as @var{array}, if used as the @var{prototype} for @end deffn chown +@c snarfed from filesys.c:214 @deffn {Scheme Procedure} chown object owner group @deffnx {C Function} scm_chown (object, owner, group) Change the ownership and group of the file referred to by @var{object} to @@ -5617,6 +6176,7 @@ as @code{-1}, then that ID is not changed. @end deffn chmod +@c snarfed from filesys.c:254 @deffn {Scheme Procedure} chmod object mode @deffnx {C Function} scm_chmod (object, mode) Changes the permissions of the file referred to by @var{obj}. @@ -5629,6 +6189,7 @@ The return value is unspecified. @end deffn umask +@c snarfed from filesys.c:287 @deffn {Scheme Procedure} umask [mode] @deffnx {C Function} scm_umask (mode) If @var{mode} is omitted, retuns a decimal number representing the current @@ -5639,6 +6200,7 @@ E.g., @code{(umask #o022)} sets the mask to octal 22, decimal 18. @end deffn open-fdes +@c snarfed from filesys.c:310 @deffn {Scheme Procedure} open-fdes path flags [mode] @deffnx {C Function} scm_open_fdes (path, flags, mode) Similar to @code{open} but return a file descriptor instead of @@ -5646,6 +6208,7 @@ a port. @end deffn open +@c snarfed from filesys.c:352 @deffn {Scheme Procedure} open path flags [mode] @deffnx {C Function} scm_open (path, flags, mode) Open the file named by @var{path} for reading and/or writing. @@ -5678,6 +6241,7 @@ for additional flags. @end deffn close +@c snarfed from filesys.c:390 @deffn {Scheme Procedure} close fd_or_port @deffnx {C Function} scm_close (fd_or_port) Similar to close-port (@pxref{Closing, close-port}), @@ -5688,6 +6252,7 @@ their revealed counts set to zero. @end deffn close-fdes +@c snarfed from filesys.c:418 @deffn {Scheme Procedure} close-fdes fd @deffnx {C Function} scm_close_fdes (fd) A simple wrapper for the @code{close} system call. @@ -5698,6 +6263,7 @@ The return value is unspecified. @end deffn stat +@c snarfed from filesys.c:621 @deffn {Scheme Procedure} stat object @deffnx {C Function} scm_stat (object) Return an object containing various information about the file @@ -5759,6 +6325,7 @@ An integer representing the access permission bits. @end deffn link +@c snarfed from filesys.c:684 @deffn {Scheme Procedure} link oldpath newpath @deffnx {C Function} scm_link (oldpath, newpath) Creates a new name @var{newpath} in the file system for the @@ -5768,6 +6335,7 @@ system. @end deffn rename-file +@c snarfed from filesys.c:705 @deffn {Scheme Procedure} rename-file oldname newname @deffnx {C Function} scm_rename (oldname, newname) Renames the file specified by @var{oldname} to @var{newname}. @@ -5775,12 +6343,14 @@ The return value is unspecified. @end deffn delete-file +@c snarfed from filesys.c:732 @deffn {Scheme Procedure} delete-file str @deffnx {C Function} scm_delete_file (str) Deletes (or "unlinks") the file specified by @var{path}. @end deffn mkdir +@c snarfed from filesys.c:750 @deffn {Scheme Procedure} mkdir path [mode] @deffnx {C Function} scm_mkdir (path, mode) Create a new directory named by @var{path}. If @var{mode} is omitted @@ -5790,6 +6360,7 @@ umask. Otherwise they are set to the decimal value specified with @end deffn rmdir +@c snarfed from filesys.c:778 @deffn {Scheme Procedure} rmdir path @deffnx {C Function} scm_rmdir (path) Remove the existing directory named by @var{path}. The directory must @@ -5797,6 +6368,7 @@ be empty for this to succeed. The return value is unspecified. @end deffn directory-stream? +@c snarfed from filesys.c:803 @deffn {Scheme Procedure} directory-stream? obj @deffnx {C Function} scm_directory_stream_p (obj) Return a boolean indicating whether @var{object} is a directory @@ -5804,6 +6376,7 @@ stream as returned by @code{opendir}. @end deffn opendir +@c snarfed from filesys.c:814 @deffn {Scheme Procedure} opendir dirname @deffnx {C Function} scm_opendir (dirname) Open the directory specified by @var{path} and return a directory @@ -5811,6 +6384,7 @@ stream. @end deffn readdir +@c snarfed from filesys.c:831 @deffn {Scheme Procedure} readdir port @deffnx {C Function} scm_readdir (port) Return (as a string) the next directory entry from the directory stream @@ -5819,6 +6393,7 @@ end of file object is returned. @end deffn rewinddir +@c snarfed from filesys.c:854 @deffn {Scheme Procedure} rewinddir port @deffnx {C Function} scm_rewinddir (port) Reset the directory port @var{stream} so that the next call to @@ -5826,6 +6401,7 @@ Reset the directory port @var{stream} so that the next call to @end deffn closedir +@c snarfed from filesys.c:871 @deffn {Scheme Procedure} closedir port @deffnx {C Function} scm_closedir (port) Close the directory stream @var{stream}. @@ -5833,6 +6409,7 @@ The return value is unspecified. @end deffn chdir +@c snarfed from filesys.c:921 @deffn {Scheme Procedure} chdir str @deffnx {C Function} scm_chdir (str) Change the current working directory to @var{path}. @@ -5840,12 +6417,14 @@ The return value is unspecified. @end deffn getcwd +@c snarfed from filesys.c:937 @deffn {Scheme Procedure} getcwd @deffnx {C Function} scm_getcwd () Return the name of the current working directory. @end deffn select +@c snarfed from filesys.c:1133 @deffn {Scheme Procedure} select reads writes excepts [secs [usecs]] @deffnx {C Function} scm_select (reads, writes, excepts, secs, usecs) This procedure has a variety of uses: waiting for the ability @@ -5880,6 +6459,7 @@ An additional @code{select!} interface is provided. @end deffn fcntl +@c snarfed from filesys.c:1279 @deffn {Scheme Procedure} fcntl object cmd [value] @deffnx {C Function} scm_fcntl (object, cmd, value) Apply @var{command} to the specified file descriptor or the underlying @@ -5910,6 +6490,7 @@ The value used to indicate the "close on exec" flag with @code{F_GETFL} or @end deffn fsync +@c snarfed from filesys.c:1316 @deffn {Scheme Procedure} fsync object @deffnx {C Function} scm_fsync (object) Copies any unwritten data for the specified output file descriptor to disk. @@ -5919,6 +6500,7 @@ The return value is unspecified. @end deffn symlink +@c snarfed from filesys.c:1343 @deffn {Scheme Procedure} symlink oldpath newpath @deffnx {C Function} scm_symlink (oldpath, newpath) Create a symbolic link named @var{path-to} with the value (i.e., pointing to) @@ -5926,6 +6508,7 @@ Create a symbolic link named @var{path-to} with the value (i.e., pointing to) @end deffn readlink +@c snarfed from filesys.c:1362 @deffn {Scheme Procedure} readlink path @deffnx {C Function} scm_readlink (path) Return the value of the symbolic link named by @var{path} (a @@ -5933,6 +6516,7 @@ string), i.e., the file that the link points to. @end deffn lstat +@c snarfed from filesys.c:1391 @deffn {Scheme Procedure} lstat str @deffnx {C Function} scm_lstat (str) Similar to @code{stat}, but does not follow symbolic links, i.e., @@ -5941,6 +6525,7 @@ file it points to. @var{path} must be a string. @end deffn copy-file +@c snarfed from filesys.c:1415 @deffn {Scheme Procedure} copy-file oldfile newfile @deffnx {C Function} scm_copy_file (oldfile, newfile) Copy the file specified by @var{path-from} to @var{path-to}. @@ -5948,6 +6533,7 @@ The return value is unspecified. @end deffn dirname +@c snarfed from filesys.c:1460 @deffn {Scheme Procedure} dirname filename @deffnx {C Function} scm_dirname (filename) Return the directory name component of the file name @@ -5956,6 +6542,7 @@ component, @code{.} is returned. @end deffn basename +@c snarfed from filesys.c:1503 @deffn {Scheme Procedure} basename filename [suffix] @deffnx {C Function} scm_basename (filename, suffix) Return the base name of the file name @var{filename}. The @@ -5965,6 +6552,7 @@ If @var{suffix} is privided, and is equal to the end of @end deffn pipe +@c snarfed from posix.c:201 @deffn {Scheme Procedure} pipe @deffnx {C Function} scm_pipe () Return a newly created pipe: a pair of ports which are linked @@ -5983,6 +6571,7 @@ from the input port. @end deffn getgroups +@c snarfed from posix.c:222 @deffn {Scheme Procedure} getgroups @deffnx {C Function} scm_getgroups () Return a vector of integers representing the current @@ -5990,6 +6579,7 @@ supplimentary group IDs. @end deffn getpw +@c snarfed from posix.c:253 @deffn {Scheme Procedure} getpw [user] @deffnx {C Function} scm_getpwuid (user) Look up an entry in the user database. @var{obj} can be an integer, @@ -5998,6 +6588,7 @@ or getpwent respectively. @end deffn setpw +@c snarfed from posix.c:306 @deffn {Scheme Procedure} setpw [arg] @deffnx {C Function} scm_setpwent (arg) If called with a true argument, initialize or reset the password data @@ -6006,6 +6597,7 @@ stream. Otherwise, close the stream. The @code{setpwent} and @end deffn getgr +@c snarfed from posix.c:325 @deffn {Scheme Procedure} getgr [name] @deffnx {C Function} scm_getgrgid (name) Look up an entry in the group database. @var{obj} can be an integer, @@ -6014,6 +6606,7 @@ or getgrent respectively. @end deffn setgr +@c snarfed from posix.c:365 @deffn {Scheme Procedure} setgr [arg] @deffnx {C Function} scm_setgrent (arg) If called with a true argument, initialize or reset the group data @@ -6022,6 +6615,7 @@ stream. Otherwise, close the stream. The @code{setgrent} and @end deffn kill +@c snarfed from posix.c:401 @deffn {Scheme Procedure} kill pid sig @deffnx {C Function} scm_kill (pid, sig) Sends a signal to the specified process or group of processes. @@ -6054,6 +6648,7 @@ Interrupt signal. @end deffn waitpid +@c snarfed from posix.c:454 @deffn {Scheme Procedure} waitpid pid [options] @deffnx {C Function} scm_waitpid (pid, options) This procedure collects status information from a child process which @@ -6100,6 +6695,7 @@ The integer status value. @end deffn status:exit-val +@c snarfed from posix.c:482 @deffn {Scheme Procedure} status:exit-val status @deffnx {C Function} scm_status_exit_val (status) Return the exit status value, as would be set if a process @@ -6108,6 +6704,7 @@ if any, otherwise @code{#f}. @end deffn status:term-sig +@c snarfed from posix.c:502 @deffn {Scheme Procedure} status:term-sig status @deffnx {C Function} scm_status_term_sig (status) Return the signal number which terminated the process, if any, @@ -6115,6 +6712,7 @@ otherwise @code{#f}. @end deffn status:stop-sig +@c snarfed from posix.c:520 @deffn {Scheme Procedure} status:stop-sig status @deffnx {C Function} scm_status_stop_sig (status) Return the signal number which stopped the process, if any, @@ -6122,6 +6720,7 @@ otherwise @code{#f}. @end deffn getppid +@c snarfed from posix.c:540 @deffn {Scheme Procedure} getppid @deffnx {C Function} scm_getppid () Return an integer representing the process ID of the parent @@ -6129,18 +6728,21 @@ process. @end deffn getuid +@c snarfed from posix.c:552 @deffn {Scheme Procedure} getuid @deffnx {C Function} scm_getuid () Return an integer representing the current real user ID. @end deffn getgid +@c snarfed from posix.c:563 @deffn {Scheme Procedure} getgid @deffnx {C Function} scm_getgid () Return an integer representing the current real group ID. @end deffn geteuid +@c snarfed from posix.c:577 @deffn {Scheme Procedure} geteuid @deffnx {C Function} scm_geteuid () Return an integer representing the current effective user ID. @@ -6150,6 +6752,7 @@ system supports effective IDs. @end deffn getegid +@c snarfed from posix.c:594 @deffn {Scheme Procedure} getegid @deffnx {C Function} scm_getegid () Return an integer representing the current effective group ID. @@ -6159,6 +6762,7 @@ system supports effective IDs. @end deffn setuid +@c snarfed from posix.c:610 @deffn {Scheme Procedure} setuid id @deffnx {C Function} scm_setuid (id) Sets both the real and effective user IDs to the integer @var{id}, provided @@ -6167,6 +6771,7 @@ The return value is unspecified. @end deffn setgid +@c snarfed from posix.c:624 @deffn {Scheme Procedure} setgid id @deffnx {C Function} scm_setgid (id) Sets both the real and effective group IDs to the integer @var{id}, provided @@ -6175,6 +6780,7 @@ The return value is unspecified. @end deffn seteuid +@c snarfed from posix.c:640 @deffn {Scheme Procedure} seteuid id @deffnx {C Function} scm_seteuid (id) Sets the effective user ID to the integer @var{id}, provided the process @@ -6185,6 +6791,7 @@ The return value is unspecified. @end deffn setegid +@c snarfed from posix.c:666 @deffn {Scheme Procedure} setegid id @deffnx {C Function} scm_setegid (id) Sets the effective group ID to the integer @var{id}, provided the process @@ -6195,6 +6802,7 @@ The return value is unspecified. @end deffn getpgrp +@c snarfed from posix.c:690 @deffn {Scheme Procedure} getpgrp @deffnx {C Function} scm_getpgrp () Return an integer representing the current process group ID. @@ -6202,6 +6810,7 @@ This is the POSIX definition, not BSD. @end deffn setpgid +@c snarfed from posix.c:708 @deffn {Scheme Procedure} setpgid pid pgid @deffnx {C Function} scm_setpgid (pid, pgid) Move the process @var{pid} into the process group @var{pgid}. @var{pid} or @@ -6212,6 +6821,7 @@ The return value is unspecified. @end deffn setsid +@c snarfed from posix.c:727 @deffn {Scheme Procedure} setsid @deffnx {C Function} scm_setsid () Creates a new session. The current process becomes the session leader @@ -6221,6 +6831,7 @@ The return value is an integer representing the new process group ID. @end deffn ttyname +@c snarfed from posix.c:742 @deffn {Scheme Procedure} ttyname port @deffnx {C Function} scm_ttyname (port) Return a string with the name of the serial terminal device @@ -6228,6 +6839,7 @@ underlying @var{port}. @end deffn ctermid +@c snarfed from posix.c:766 @deffn {Scheme Procedure} ctermid @deffnx {C Function} scm_ctermid () Return a string containing the file name of the controlling @@ -6235,6 +6847,7 @@ terminal for the current process. @end deffn tcgetpgrp +@c snarfed from posix.c:789 @deffn {Scheme Procedure} tcgetpgrp port @deffnx {C Function} scm_tcgetpgrp (port) Return the process group ID of the foreground process group @@ -6250,6 +6863,7 @@ foreground. @end deffn tcsetpgrp +@c snarfed from posix.c:813 @deffn {Scheme Procedure} tcsetpgrp port pgid @deffnx {C Function} scm_tcsetpgrp (port, pgid) Set the foreground process group ID for the terminal used by the file @@ -6260,6 +6874,7 @@ controlling terminal. The return value is unspecified. @end deffn execl +@c snarfed from posix.c:873 @deffn {Scheme Procedure} execl filename . args @deffnx {C Function} scm_execl (filename, args) Executes the file named by @var{path} as a new process image. @@ -6276,6 +6891,7 @@ call, but we call it @code{execl} because of its Scheme calling interface. @end deffn execlp +@c snarfed from posix.c:893 @deffn {Scheme Procedure} execlp filename . args @deffnx {C Function} scm_execlp (filename, args) Similar to @code{execl}, however if @@ -6288,6 +6904,7 @@ call, but we call it @code{execlp} because of its Scheme calling interface. @end deffn execle +@c snarfed from posix.c:943 @deffn {Scheme Procedure} execle filename env . args @deffnx {C Function} scm_execle (filename, env, args) Similar to @code{execl}, but the environment of the new process is @@ -6299,6 +6916,7 @@ call, but we call it @code{execle} because of its Scheme calling interface. @end deffn primitive-fork +@c snarfed from posix.c:967 @deffn {Scheme Procedure} primitive-fork @deffnx {C Function} scm_fork () Creates a new "child" process by duplicating the current "parent" process. @@ -6310,6 +6928,7 @@ with the scsh fork. @end deffn uname +@c snarfed from posix.c:987 @deffn {Scheme Procedure} uname @deffnx {C Function} scm_uname () Return an object with some information about the computer @@ -6317,6 +6936,7 @@ system the program is running on. @end deffn environ +@c snarfed from posix.c:1017 @deffn {Scheme Procedure} environ [env] @deffnx {C Function} scm_environ (env) If @var{env} is omitted, return the current environment (in the @@ -6329,6 +6949,7 @@ then the return value is unspecified. @end deffn tmpnam +@c snarfed from posix.c:1055 @deffn {Scheme Procedure} tmpnam @deffnx {C Function} scm_tmpnam () Return a name in the file system that does not match any @@ -6339,6 +6960,7 @@ Care should be taken if opening the file, e.g., use the @end deffn mkstemp! +@c snarfed from posix.c:1081 @deffn {Scheme Procedure} mkstemp! tmpl @deffnx {C Function} scm_mkstemp (tmpl) Create a new unique file in the file system and returns a new @@ -6349,6 +6971,7 @@ place to return the name of the temporary file. @end deffn utime +@c snarfed from posix.c:1106 @deffn {Scheme Procedure} utime pathname [actime [modtime]] @deffnx {C Function} scm_utime (pathname, actime, modtime) @code{utime} sets the access and modification times for the @@ -6364,6 +6987,7 @@ modification time to the current time. @end deffn access? +@c snarfed from posix.c:1154 @deffn {Scheme Procedure} access? path how @deffnx {C Function} scm_access (path, how) Return @code{#t} if @var{path} corresponds to an existing file @@ -6392,12 +7016,14 @@ test for existence of the file. @end deffn getpid +@c snarfed from posix.c:1168 @deffn {Scheme Procedure} getpid @deffnx {C Function} scm_getpid () Return an integer representing the current process ID. @end deffn putenv +@c snarfed from posix.c:1185 @deffn {Scheme Procedure} putenv str @deffnx {C Function} scm_putenv (str) Modifies the environment of the current process, which is @@ -6414,6 +7040,7 @@ The return value is unspecified. @end deffn setlocale +@c snarfed from posix.c:1216 @deffn {Scheme Procedure} setlocale category [locale] @deffnx {C Function} scm_setlocale (category, locale) If @var{locale} is omitted, return the current value of the @@ -6428,6 +7055,7 @@ the locale will be set using envirionment variables. @end deffn mknod +@c snarfed from posix.c:1256 @deffn {Scheme Procedure} mknod path type perms dev @deffnx {C Function} scm_mknod (path, type, perms, dev) Creates a new special file, such as a file corresponding to a device. @@ -6448,6 +7076,7 @@ The return value is unspecified. @end deffn nice +@c snarfed from posix.c:1302 @deffn {Scheme Procedure} nice incr @deffnx {C Function} scm_nice (incr) Increment the priority of the current process by @var{incr}. A higher @@ -6456,6 +7085,7 @@ The return value is unspecified. @end deffn sync +@c snarfed from posix.c:1317 @deffn {Scheme Procedure} sync @deffnx {C Function} scm_sync () Flush the operating system disk buffers. @@ -6463,6 +7093,7 @@ The return value is unspecified. @end deffn crypt +@c snarfed from posix.c:1330 @deffn {Scheme Procedure} crypt key salt @deffnx {C Function} scm_crypt (key, salt) Encrypt @var{key} using @var{salt} as the salt value to the @@ -6470,6 +7101,7 @@ crypt(3) library call. @end deffn chroot +@c snarfed from posix.c:1351 @deffn {Scheme Procedure} chroot path @deffnx {C Function} scm_chroot (path) Change the root directory to that specified in @var{path}. @@ -6480,6 +7112,7 @@ root directory. @end deffn getlogin +@c snarfed from posix.c:1383 @deffn {Scheme Procedure} getlogin @deffnx {C Function} scm_getlogin () Return a string containing the name of the user logged in on @@ -6488,6 +7121,7 @@ information cannot be obtained. @end deffn cuserid +@c snarfed from posix.c:1401 @deffn {Scheme Procedure} cuserid @deffnx {C Function} scm_cuserid () Return a string containing a user name associated with the @@ -6496,6 +7130,7 @@ information cannot be obtained. @end deffn getpriority +@c snarfed from posix.c:1426 @deffn {Scheme Procedure} getpriority which who @deffnx {C Function} scm_getpriority (which, who) Return the scheduling priority of the process, process group @@ -6511,6 +7146,7 @@ specified processes. @end deffn setpriority +@c snarfed from posix.c:1460 @deffn {Scheme Procedure} setpriority which who prio @deffnx {C Function} scm_setpriority (which, who, prio) Set the scheduling priority of the process, process group @@ -6529,6 +7165,7 @@ The return value is not specified. @end deffn getpass +@c snarfed from posix.c:1485 @deffn {Scheme Procedure} getpass prompt @deffnx {C Function} scm_getpass (prompt) Display @var{prompt} to the standard error output and read @@ -6541,6 +7178,7 @@ characters is disabled. @end deffn flock +@c snarfed from posix.c:1589 @deffn {Scheme Procedure} flock file operation @deffnx {C Function} scm_flock (file, operation) Apply or remove an advisory lock on an open file. @@ -6563,6 +7201,7 @@ file descriptor or an open file descriptior port. @end deffn sethostname +@c snarfed from posix.c:1615 @deffn {Scheme Procedure} sethostname name @deffnx {C Function} scm_sethostname (name) Set the host name of the current processor to @var{name}. May @@ -6571,12 +7210,14 @@ specified. @end deffn gethostname +@c snarfed from posix.c:1630 @deffn {Scheme Procedure} gethostname @deffnx {C Function} scm_gethostname () Return the host name of the current processor. @end deffn gethost +@c snarfed from net_db.c:153 @deffn {Scheme Procedure} gethost [host] @deffnx {Scheme Procedure} gethostbyname hostname @deffnx {Scheme Procedure} gethostbyaddr address @@ -6593,6 +7234,7 @@ Unusual conditions may result in errors thrown to the @end deffn getnet +@c snarfed from net_db.c:232 @deffn {Scheme Procedure} getnet [net] @deffnx {Scheme Procedure} getnetbyname net-name @deffnx {Scheme Procedure} getnetbyaddr net-number @@ -6605,6 +7247,7 @@ given. @end deffn getproto +@c snarfed from net_db.c:281 @deffn {Scheme Procedure} getproto [protocol] @deffnx {Scheme Procedure} getprotobyname name @deffnx {Scheme Procedure} getprotobynumber number @@ -6616,6 +7259,7 @@ argument. @code{getproto} will accept either type, behaving like @end deffn getserv +@c snarfed from net_db.c:347 @deffn {Scheme Procedure} getserv [name [protocol]] @deffnx {Scheme Procedure} getservbyname name protocol @deffnx {Scheme Procedure} getservbyport port protocol @@ -6631,6 +7275,7 @@ as its first argument; if given no arguments, it behaves like @end deffn sethost +@c snarfed from net_db.c:384 @deffn {Scheme Procedure} sethost [stayopen] @deffnx {C Function} scm_sethost (stayopen) If @var{stayopen} is omitted, this is equivalent to @code{endhostent}. @@ -6638,6 +7283,7 @@ Otherwise it is equivalent to @code{sethostent stayopen}. @end deffn setnet +@c snarfed from net_db.c:400 @deffn {Scheme Procedure} setnet [stayopen] @deffnx {C Function} scm_setnet (stayopen) If @var{stayopen} is omitted, this is equivalent to @code{endnetent}. @@ -6645,6 +7291,7 @@ Otherwise it is equivalent to @code{setnetent stayopen}. @end deffn setproto +@c snarfed from net_db.c:416 @deffn {Scheme Procedure} setproto [stayopen] @deffnx {C Function} scm_setproto (stayopen) If @var{stayopen} is omitted, this is equivalent to @code{endprotoent}. @@ -6652,6 +7299,7 @@ Otherwise it is equivalent to @code{setprotoent stayopen}. @end deffn setserv +@c snarfed from net_db.c:432 @deffn {Scheme Procedure} setserv [stayopen] @deffnx {C Function} scm_setserv (stayopen) If @var{stayopen} is omitted, this is equivalent to @code{endservent}. @@ -6659,6 +7307,7 @@ Otherwise it is equivalent to @code{setservent stayopen}. @end deffn htons +@c snarfed from socket.c:108 @deffn {Scheme Procedure} htons value @deffnx {C Function} scm_htons (value) Convert a 16 bit quantity from host to network byte ordering. @@ -6667,6 +7316,7 @@ and returned as a new integer. @end deffn ntohs +@c snarfed from socket.c:125 @deffn {Scheme Procedure} ntohs value @deffnx {C Function} scm_ntohs (value) Convert a 16 bit quantity from network to host byte ordering. @@ -6675,6 +7325,7 @@ and returned as a new integer. @end deffn htonl +@c snarfed from socket.c:142 @deffn {Scheme Procedure} htonl value @deffnx {C Function} scm_htonl (value) Convert a 32 bit quantity from host to network byte ordering. @@ -6683,6 +7334,7 @@ and returned as a new integer. @end deffn ntohl +@c snarfed from socket.c:155 @deffn {Scheme Procedure} ntohl value @deffnx {C Function} scm_ntohl (value) Convert a 32 bit quantity from network to host byte ordering. @@ -6691,6 +7343,7 @@ and returned as a new integer. @end deffn inet-aton +@c snarfed from socket.c:175 @deffn {Scheme Procedure} inet-aton address @deffnx {C Function} scm_inet_aton (address) Convert an IPv4 Internet address from printable string @@ -6702,6 +7355,7 @@ Convert an IPv4 Internet address from printable string @end deffn inet-ntoa +@c snarfed from socket.c:194 @deffn {Scheme Procedure} inet-ntoa inetid @deffnx {C Function} scm_inet_ntoa (inetid) Convert an IPv4 Internet address to a printable @@ -6713,6 +7367,7 @@ Convert an IPv4 Internet address to a printable @end deffn inet-netof +@c snarfed from socket.c:214 @deffn {Scheme Procedure} inet-netof address @deffnx {C Function} scm_inet_netof (address) Return the network number part of the given IPv4 @@ -6724,6 +7379,7 @@ Internet address. E.g., @end deffn inet-lnaof +@c snarfed from socket.c:232 @deffn {Scheme Procedure} inet-lnaof address @deffnx {C Function} scm_lnaof (address) Return the local-address-with-network part of the given @@ -6736,6 +7392,7 @@ E.g., @end deffn inet-makeaddr +@c snarfed from socket.c:250 @deffn {Scheme Procedure} inet-makeaddr net lna @deffnx {C Function} scm_inet_makeaddr (net, lna) Make an IPv4 Internet address by combining the network number @@ -6748,6 +7405,7 @@ Make an IPv4 Internet address by combining the network number @end deffn inet-pton +@c snarfed from socket.c:368 @deffn {Scheme Procedure} inet-pton family address @deffnx {C Function} scm_inet_pton (family, address) Convert a string containing a printable network address to @@ -6763,6 +7421,7 @@ the result is an integer with normal host byte ordering. @end deffn inet-ntop +@c snarfed from socket.c:403 @deffn {Scheme Procedure} inet-ntop family address @deffnx {C Function} scm_inet_ntop (family, address) Convert a network address into a printable string. @@ -6778,6 +7437,7 @@ ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff @end deffn socket +@c snarfed from socket.c:448 @deffn {Scheme Procedure} socket family style proto @deffnx {C Function} scm_socket (family, style, proto) Return a new socket port of the type specified by @var{family}, @@ -6796,6 +7456,7 @@ has been connected to another socket. @end deffn socketpair +@c snarfed from socket.c:470 @deffn {Scheme Procedure} socketpair family style proto @deffnx {C Function} scm_socketpair (family, style, proto) Return a pair of connected (but unnamed) socket ports of the @@ -6806,6 +7467,7 @@ family. Zero is likely to be the only meaningful value for @end deffn getsockopt +@c snarfed from socket.c:499 @deffn {Scheme Procedure} getsockopt sock level optname @deffnx {C Function} scm_getsockopt (sock, level, optname) Return the value of a particular socket option for the socket @@ -6820,6 +7482,7 @@ returns a pair of integers. @end deffn setsockopt +@c snarfed from socket.c:567 @deffn {Scheme Procedure} setsockopt sock level optname value @deffnx {C Function} scm_setsockopt (sock, level, optname, value) Set the value of a particular socket option for the socket @@ -6836,6 +7499,7 @@ The return value is unspecified. @end deffn shutdown +@c snarfed from socket.c:671 @deffn {Scheme Procedure} shutdown sock how @deffnx {C Function} scm_shutdown (sock, how) Sockets can be closed simply by using @code{close-port}. The @@ -6858,6 +7522,7 @@ The return value is unspecified. @end deffn connect +@c snarfed from socket.c:815 @deffn {Scheme Procedure} connect sock fam address . args @deffnx {C Function} scm_connect (sock, fam, address, args) Initiate a connection from a socket using a specified address @@ -6884,6 +7549,7 @@ The return value is unspecified. @end deffn bind +@c snarfed from socket.c:875 @deffn {Scheme Procedure} bind sock fam address . args @deffnx {C Function} scm_bind (sock, fam, address, args) Assign an address to the socket port @var{sock}. @@ -6932,6 +7598,7 @@ The return value is unspecified. @end deffn listen +@c snarfed from socket.c:909 @deffn {Scheme Procedure} listen sock backlog @deffnx {C Function} scm_listen (sock, backlog) Enable @var{sock} to accept connection @@ -6945,6 +7612,7 @@ The return value is unspecified. @end deffn accept +@c snarfed from socket.c:1014 @deffn {Scheme Procedure} accept sock @deffnx {C Function} scm_accept (sock) Accept a connection on a bound, listening socket. @@ -6964,6 +7632,7 @@ connection and will continue to accept new requests. @end deffn getsockname +@c snarfed from socket.c:1041 @deffn {Scheme Procedure} getsockname sock @deffnx {C Function} scm_getsockname (sock) Return the address of @var{sock}, in the same form as the @@ -6972,6 +7641,7 @@ of a socket in the @code{AF_FILE} namespace cannot be read. @end deffn getpeername +@c snarfed from socket.c:1063 @deffn {Scheme Procedure} getpeername sock @deffnx {C Function} scm_getpeername (sock) Return the address that @var{sock} @@ -6981,6 +7651,7 @@ is connected to, in the same form as the object returned by @end deffn recv! +@c snarfed from socket.c:1098 @deffn {Scheme Procedure} recv! sock buf [flags] @deffnx {C Function} scm_recv (sock, buf, flags) Receive data from a socket port. @@ -7006,6 +7677,7 @@ any unread buffered port data is ignored. @end deffn send +@c snarfed from socket.c:1131 @deffn {Scheme Procedure} send sock message [flags] @deffnx {C Function} scm_send (sock, message, flags) Transmit the string @var{message} on a socket port @var{sock}. @@ -7024,6 +7696,7 @@ any unflushed buffered port data is ignored. @end deffn recvfrom! +@c snarfed from socket.c:1171 @deffn {Scheme Procedure} recvfrom! sock str [flags [start [end]]] @deffnx {C Function} scm_recvfrom (sock, str, flags, start, end) Return data from the socket port @var{sock} and also @@ -7052,6 +7725,7 @@ descriptor: any unread buffered port data is ignored. @end deffn sendto +@c snarfed from socket.c:1229 @deffn {Scheme Procedure} sendto sock message fam address . args_and_flags @deffnx {C Function} scm_sendto (sock, message, fam, address, args_and_flags) Transmit the string @var{message} on the socket port @@ -7073,3 +7747,63 @@ Note that the data is written directly to the socket file descriptor: any unflushed buffered port data is ignored. @end deffn + + single-active-thread? +@c snarfed from threads.c:79 +@deffn {Scheme Procedure} single-active-thread? +implemented by the C function "scm_single_thread_p" +@end deffn + + yield +@c snarfed from threads.c:85 +@deffn {Scheme Procedure} yield +implemented by the C function "scm_yield" +@end deffn + + call-with-new-thread +@c snarfed from threads.c:90 +@deffn {Scheme Procedure} call-with-new-thread +implemented by the C function "scm_call_with_new_thread" +@end deffn + + join-thread +@c snarfed from threads.c:104 +@deffn {Scheme Procedure} join-thread +implemented by the C function "scm_join_thread" +@end deffn + + make-mutex +@c snarfed from threads.c:109 +@deffn {Scheme Procedure} make-mutex +implemented by the C function "scm_make_mutex" +@end deffn + + lock-mutex +@c snarfed from threads.c:112 +@deffn {Scheme Procedure} lock-mutex +implemented by the C function "scm_lock_mutex" +@end deffn + + unlock-mutex +@c snarfed from threads.c:117 +@deffn {Scheme Procedure} unlock-mutex +implemented by the C function "scm_unlock_mutex" +@end deffn + + make-condition-variable +@c snarfed from threads.c:123 +@deffn {Scheme Procedure} make-condition-variable +implemented by the C function "scm_make_condition_variable" +@end deffn + + wait-condition-variable +@c snarfed from threads.c:125 +@deffn {Scheme Procedure} wait-condition-variable +implemented by the C function "scm_wait_condition_variable" +@end deffn + + signal-condition-variable +@c snarfed from threads.c:127 +@deffn {Scheme Procedure} signal-condition-variable +implemented by the C function "scm_signal_condition_variable" +@end deffn diff --git a/doc/ref/ChangeLog b/doc/ref/ChangeLog index 18ecbffe5..fbbb86d10 100644 --- a/doc/ref/ChangeLog +++ b/doc/ref/ChangeLog @@ -1,5 +1,8 @@ 2002-03-12 Neil Jerram + * scheme-compound.texi, scheme-data.texi, new-docstrings.texi: + Automatic updates from snarfed libguile docstrings. + * data-rep.texi, guile.texi, scheme-evaluation.texi, scheme-options.texi, scheme-translation.texi: Various minor enhancements ported from the stable CVS branch. diff --git a/doc/ref/new-docstrings.texi b/doc/ref/new-docstrings.texi index 5116cb18e..169f4c20e 100644 --- a/doc/ref/new-docstrings.texi +++ b/doc/ref/new-docstrings.texi @@ -679,3 +679,13 @@ well. For example, (load-extension "libguile-bla-blum" "bla_init_blum") @end lisp @end deffn + +@deffn {Scheme Procedure} single-active-thread? +implemented by the C function "scm_single_thread_p" +@end deffn + +@deffn {Scheme Procedure} object-address obj +@deffnx {C Function} scm_object_address (obj) +Return an integer that for the lifetime of @var{obj} is uniquely +returned by this function for @var{obj} +@end deffn diff --git a/doc/ref/scheme-compound.texi b/doc/ref/scheme-compound.texi index 0ab5e309d..ec49bccd7 100644 --- a/doc/ref/scheme-compound.texi +++ b/doc/ref/scheme-compound.texi @@ -1343,7 +1343,7 @@ not an array, @code{0} is returned. @end deffn @deffn {Scheme Procedure} array->list v -@deffnx {C Function} scm_t_arrayo_list (v) +@deffnx {C Function} scm_array_to_list (v) Return a list consisting of all the elements, in order, of @var{array}. @end deffn diff --git a/doc/ref/scheme-data.texi b/doc/ref/scheme-data.texi index 0aeb7de6c..6404da80f 100755 --- a/doc/ref/scheme-data.texi +++ b/doc/ref/scheme-data.texi @@ -2347,7 +2347,7 @@ Return a hash value for @var{symbol}. @deffnx {C Function} scm_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 -an optional argument. Default prefix is @code{g}. The counter +an optional argument. Default prefix is @code{ g}. The counter is increased by 1 at each call. There is no provision for resetting the counter. @end deffn