home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / guile / 1.8 / guile-procedures.txt
Encoding:
Text File  |  2008-12-17  |  286.0 KB  |  8,704 lines

  1. This is guile-procedures.txt, produced by makeinfo version 4.11 from
  2. guile-procedures.texi.
  3.  
  4. acons
  5.  
  6.  -- Scheme Procedure: acons key value alist
  7.      Add a new key-value pair to ALIST.  A new pair is created whose
  8.      car is KEY and whose cdr is VALUE, and the pair is consed onto
  9.      ALIST, and the new list is returned.  This function is _not_
  10.      destructive; ALIST is not modified.
  11.  
  12.     sloppy-assq
  13.  
  14.  -- Scheme Procedure: sloppy-assq key alist
  15.      Behaves like `assq' but does not do any error checking.
  16.      Recommended only for use in Guile internals.
  17.  
  18.     sloppy-assv
  19.  
  20.  -- Scheme Procedure: sloppy-assv key alist
  21.      Behaves like `assv' but does not do any error checking.
  22.      Recommended only for use in Guile internals.
  23.  
  24.     sloppy-assoc
  25.  
  26.  -- Scheme Procedure: sloppy-assoc key alist
  27.      Behaves like `assoc' but does not do any error checking.
  28.      Recommended only for use in Guile internals.
  29.  
  30.     assq
  31.  
  32.  -- Scheme Procedure: assq key alist
  33.  -- Scheme Procedure: assv key alist
  34.  -- Scheme Procedure: assoc key alist
  35.      Fetch the entry in ALIST that is associated with KEY.  To decide
  36.      whether the argument KEY matches a particular entry in ALIST,
  37.      `assq' compares keys with `eq?', `assv' uses `eqv?' and `assoc'
  38.      uses `equal?'.  If KEY cannot be found in ALIST (according to
  39.      whichever equality predicate is in use), then return `#f'.  These
  40.      functions return the entire alist entry found (i.e. both the key
  41.      and the value).
  42.  
  43.     assv
  44.  
  45.  -- Scheme Procedure: assv key alist
  46.      Behaves like `assq' but uses `eqv?' for key comparison.
  47.  
  48.     assoc
  49.  
  50.  -- Scheme Procedure: assoc key alist
  51.      Behaves like `assq' but uses `equal?' for key comparison.
  52.  
  53.     assq-ref
  54.  
  55.  -- Scheme Procedure: assq-ref alist key
  56.  -- Scheme Procedure: assv-ref alist key
  57.  -- Scheme Procedure: assoc-ref alist key
  58.      Like `assq', `assv' and `assoc', except that only the value
  59.      associated with KEY in ALIST is returned.  These functions are
  60.      equivalent to
  61.  
  62.           (let ((ent (ASSOCIATOR KEY ALIST)))
  63.             (and ent (cdr ent)))
  64.  
  65.      where ASSOCIATOR is one of `assq', `assv' or `assoc'.
  66.  
  67.     assv-ref
  68.  
  69.  -- Scheme Procedure: assv-ref alist key
  70.      Behaves like `assq-ref' but uses `eqv?' for key comparison.
  71.  
  72.     assoc-ref
  73.  
  74.  -- Scheme Procedure: assoc-ref alist key
  75.      Behaves like `assq-ref' but uses `equal?' for key comparison.
  76.  
  77.     assq-set!
  78.  
  79.  -- Scheme Procedure: assq-set! alist key val
  80.  -- Scheme Procedure: assv-set! alist key value
  81.  -- Scheme Procedure: assoc-set! alist key value
  82.      Reassociate KEY in ALIST with VALUE: find any existing ALIST entry
  83.      for KEY and associate it with the new VALUE.  If ALIST does not
  84.      contain an entry for KEY, add a new one.  Return the (possibly
  85.      new) alist.
  86.  
  87.      These functions do not attempt to verify the structure of ALIST,
  88.      and so may cause unusual results if passed an object that is not an
  89.      association list.
  90.  
  91.     assv-set!
  92.  
  93.  -- Scheme Procedure: assv-set! alist key val
  94.      Behaves like `assq-set!' but uses `eqv?' for key comparison.
  95.  
  96.     assoc-set!
  97.  
  98.  -- Scheme Procedure: assoc-set! alist key val
  99.      Behaves like `assq-set!' but uses `equal?' for key comparison.
  100.  
  101.     assq-remove!
  102.  
  103.  -- Scheme Procedure: assq-remove! alist key
  104.  -- Scheme Procedure: assv-remove! alist key
  105.  -- Scheme Procedure: assoc-remove! alist key
  106.      Delete the first entry in ALIST associated with KEY, and return
  107.      the resulting alist.
  108.  
  109.     assv-remove!
  110.  
  111.  -- Scheme Procedure: assv-remove! alist key
  112.      Behaves like `assq-remove!' but uses `eqv?' for key comparison.
  113.  
  114.     assoc-remove!
  115.  
  116.  -- Scheme Procedure: assoc-remove! alist key
  117.      Behaves like `assq-remove!' but uses `equal?' for key comparison.
  118.  
  119.     make-arbiter
  120.  
  121.  -- Scheme Procedure: make-arbiter name
  122.      Return an arbiter object, initially unlocked.  Currently NAME is
  123.      only used for diagnostic output.
  124.  
  125.     try-arbiter
  126.  
  127.  -- Scheme Procedure: try-arbiter arb
  128.      If ARB is unlocked, then lock it and return `#t'.  If ARB is
  129.      already locked, then do nothing and return `#f'.
  130.  
  131.     release-arbiter
  132.  
  133.  -- Scheme Procedure: release-arbiter arb
  134.      If ARB is locked, then unlock it and return `#t'.  If ARB is
  135.      already unlocked, then do nothing and return `#f'.
  136.  
  137.      Typical usage is for the thread which locked an arbiter to later
  138.      release it, but that's not required, any thread can release it.
  139.  
  140.     async
  141.  
  142.  -- Scheme Procedure: async thunk
  143.      Create a new async for the procedure THUNK.
  144.  
  145.     async-mark
  146.  
  147.  -- Scheme Procedure: async-mark a
  148.      Mark the async A for future execution.
  149.  
  150.     run-asyncs
  151.  
  152.  -- Scheme Procedure: run-asyncs list_of_a
  153.      Execute all thunks from the asyncs of the list LIST_OF_A.
  154.  
  155.     system-async
  156.  
  157.  -- Scheme Procedure: system-async thunk
  158.      This function is deprecated.  You can use THUNK directly instead
  159.      of explicitely creating an async object.
  160.  
  161.  
  162.     system-async-mark
  163.  
  164.  -- Scheme Procedure: system-async-mark proc [thread]
  165.      Mark PROC (a procedure with zero arguments) for future execution
  166.      in THREAD.  If PROC has already been marked for THREAD but has not
  167.      been executed yet, this call has no effect.  If THREAD is omitted,
  168.      the thread that called `system-async-mark' is used.
  169.  
  170.      This procedure is not safe to be called from C signal handlers.
  171.      Use `scm_sigaction' or `scm_sigaction_for_thread' to install
  172.      signal handlers.
  173.  
  174.     noop
  175.  
  176.  -- Scheme Procedure: noop . args
  177.      Do nothing.  When called without arguments, return `#f', otherwise
  178.      return the first argument.
  179.  
  180.     unmask-signals
  181.  
  182.  -- Scheme Procedure: unmask-signals
  183.      Unmask signals. The returned value is not specified.
  184.  
  185.     mask-signals
  186.  
  187.  -- Scheme Procedure: mask-signals
  188.      Mask signals. The returned value is not specified.
  189.  
  190.     call-with-blocked-asyncs
  191.  
  192.  -- Scheme Procedure: call-with-blocked-asyncs proc
  193.      Call PROC with no arguments and block the execution of system
  194.      asyncs by one level for the current thread while it is running.
  195.      Return the value returned by PROC.
  196.  
  197.  
  198.     call-with-unblocked-asyncs
  199.  
  200.  -- Scheme Procedure: call-with-unblocked-asyncs proc
  201.      Call PROC with no arguments and unblock the execution of system
  202.      asyncs by one level for the current thread while it is running.
  203.      Return the value returned by PROC.
  204.  
  205.  
  206.     display-error
  207.  
  208.  -- Scheme Procedure: display-error stack port subr message args rest
  209.      Display an error message to the output port PORT.  STACK is the
  210.      saved stack for the error, SUBR is the name of the procedure in
  211.      which the error occurred and MESSAGE is the actual error message,
  212.      which may contain formatting instructions. These will format the
  213.      arguments in the list ARGS accordingly.  REST is currently ignored.
  214.  
  215.     display-application
  216.  
  217.  -- Scheme Procedure: display-application frame [port [indent]]
  218.      Display a procedure application FRAME to the output port PORT.
  219.      INDENT specifies the indentation of the output.
  220.  
  221.     display-backtrace
  222.  
  223.  -- Scheme Procedure: display-backtrace stack port [first [depth
  224.           [highlights]]]
  225.      Display a backtrace to the output port PORT. STACK is the stack to
  226.      take the backtrace from, FIRST specifies where in the stack to
  227.      start and DEPTH how much frames to display. Both FIRST and DEPTH
  228.      can be `#f', which means that default values will be used.  When
  229.      HIGHLIGHTS is given, it should be a list and all members of it are
  230.      highligthed in the backtrace.
  231.  
  232.     backtrace
  233.  
  234.  -- Scheme Procedure: backtrace [highlights]
  235.      Display a backtrace of the stack saved by the last error to the
  236.      current output port.  When HIGHLIGHTS is given, it should be a
  237.      list and all members of it are highligthed in the backtrace.
  238.  
  239.     not
  240.  
  241.  -- Scheme Procedure: not x
  242.      Return `#t' iff X is `#f', else return `#f'.
  243.  
  244.     boolean?
  245.  
  246.  -- Scheme Procedure: boolean? obj
  247.      Return `#t' iff OBJ is either `#t' or `#f'.
  248.  
  249.     char?
  250.  
  251.  -- Scheme Procedure: char? x
  252.      Return `#t' iff X is a character, else `#f'.
  253.  
  254.     char=?
  255.  
  256.  -- Scheme Procedure: char=? x y
  257.      Return `#t' iff X is the same character as Y, else `#f'.
  258.  
  259.     char<?
  260.  
  261.  -- Scheme Procedure: char<? x y
  262.      Return `#t' iff X is less than Y in the ASCII sequence, else `#f'.
  263.  
  264.     char<=?
  265.  
  266.  -- Scheme Procedure: char<=? x y
  267.      Return `#t' iff X is less than or equal to Y in the ASCII
  268.      sequence, else `#f'.
  269.  
  270.     char>?
  271.  
  272.  -- Scheme Procedure: char>? x y
  273.      Return `#t' iff X is greater than Y in the ASCII sequence, else
  274.      `#f'.
  275.  
  276.     char>=?
  277.  
  278.  -- Scheme Procedure: char>=? x y
  279.      Return `#t' iff X is greater than or equal to Y in the ASCII
  280.      sequence, else `#f'.
  281.  
  282.     char-ci=?
  283.  
  284.  -- Scheme Procedure: char-ci=? x y
  285.      Return `#t' iff X is the same character as Y ignoring case, else
  286.      `#f'.
  287.  
  288.     char-ci<?
  289.  
  290.  -- Scheme Procedure: char-ci<? x y
  291.      Return `#t' iff X is less than Y in the ASCII sequence ignoring
  292.      case, else `#f'.
  293.  
  294.     char-ci<=?
  295.  
  296.  -- Scheme Procedure: char-ci<=? x y
  297.      Return `#t' iff X is less than or equal to Y in the ASCII sequence
  298.      ignoring case, else `#f'.
  299.  
  300.     char-ci>?
  301.  
  302.  -- Scheme Procedure: char-ci>? x y
  303.      Return `#t' iff X is greater than Y in the ASCII sequence ignoring
  304.      case, else `#f'.
  305.  
  306.     char-ci>=?
  307.  
  308.  -- Scheme Procedure: char-ci>=? x y
  309.      Return `#t' iff X is greater than or equal to Y in the ASCII
  310.      sequence ignoring case, else `#f'.
  311.  
  312.     char-alphabetic?
  313.  
  314.  -- Scheme Procedure: char-alphabetic? chr
  315.      Return `#t' iff CHR is alphabetic, else `#f'.
  316.  
  317.  
  318.     char-numeric?
  319.  
  320.  -- Scheme Procedure: char-numeric? chr
  321.      Return `#t' iff CHR is numeric, else `#f'.
  322.  
  323.  
  324.     char-whitespace?
  325.  
  326.  -- Scheme Procedure: char-whitespace? chr
  327.      Return `#t' iff CHR is whitespace, else `#f'.
  328.  
  329.  
  330.     char-upper-case?
  331.  
  332.  -- Scheme Procedure: char-upper-case? chr
  333.      Return `#t' iff CHR is uppercase, else `#f'.
  334.  
  335.  
  336.     char-lower-case?
  337.  
  338.  -- Scheme Procedure: char-lower-case? chr
  339.      Return `#t' iff CHR is lowercase, else `#f'.
  340.  
  341.  
  342.     char-is-both?
  343.  
  344.  -- Scheme Procedure: char-is-both? chr
  345.      Return `#t' iff CHR is either uppercase or lowercase, else `#f'.
  346.  
  347.  
  348.     char->integer
  349.  
  350.  -- Scheme Procedure: char->integer chr
  351.      Return the number corresponding to ordinal position of CHR in the
  352.      ASCII sequence.
  353.  
  354.     integer->char
  355.  
  356.  -- Scheme Procedure: integer->char n
  357.      Return the character at position N in the ASCII sequence.
  358.  
  359.     char-upcase
  360.  
  361.  -- Scheme Procedure: char-upcase chr
  362.      Return the uppercase character version of CHR.
  363.  
  364.     char-downcase
  365.  
  366.  -- Scheme Procedure: char-downcase chr
  367.      Return the lowercase character version of CHR.
  368.  
  369.     with-continuation-barrier
  370.  
  371.  -- Scheme Procedure: with-continuation-barrier proc
  372.      Call PROC and return its result.  Do not allow the invocation of
  373.      continuations that would leave or enter the dynamic extent of the
  374.      call to `with-continuation-barrier'.  Such an attempt causes an
  375.      error to be signaled.
  376.  
  377.      Throws (such as errors) that are not caught from within PROC are
  378.      caught by `with-continuation-barrier'.  In that case, a short
  379.      message is printed to the current error port and `#f' is returned.
  380.  
  381.      Thus, `with-continuation-barrier' returns exactly once.
  382.  
  383.  
  384.     debug-options-interface
  385.  
  386.  -- Scheme Procedure: debug-options-interface [setting]
  387.      Option interface for the debug options. Instead of using this
  388.      procedure directly, use the procedures `debug-enable',
  389.      `debug-disable', `debug-set!' and `debug-options'.
  390.  
  391.     with-traps
  392.  
  393.  -- Scheme Procedure: with-traps thunk
  394.      Call THUNK with traps enabled.
  395.  
  396.     memoized?
  397.  
  398.  -- Scheme Procedure: memoized? obj
  399.      Return `#t' if OBJ is memoized.
  400.  
  401.     unmemoize-expr
  402.  
  403.  -- Scheme Procedure: unmemoize-expr m
  404.      Unmemoize the memoized expression M,
  405.  
  406.     memoized-environment
  407.  
  408.  -- Scheme Procedure: memoized-environment m
  409.      Return the environment of the memoized expression M.
  410.  
  411.     procedure-name
  412.  
  413.  -- Scheme Procedure: procedure-name proc
  414.      Return the name of the procedure PROC
  415.  
  416.     procedure-source
  417.  
  418.  -- Scheme Procedure: procedure-source proc
  419.      Return the source of the procedure PROC.
  420.  
  421.     procedure-environment
  422.  
  423.  -- Scheme Procedure: procedure-environment proc
  424.      Return the environment of the procedure PROC.
  425.  
  426.     local-eval
  427.  
  428.  -- Scheme Procedure: local-eval exp [env]
  429.      Evaluate EXP in its environment.  If ENV is supplied, it is the
  430.      environment in which to evaluate EXP.  Otherwise, EXP must be a
  431.      memoized code object (in which case, its environment is implicit).
  432.  
  433.     debug-object?
  434.  
  435.  -- Scheme Procedure: debug-object? obj
  436.      Return `#t' if OBJ is a debug object.
  437.  
  438.     issue-deprecation-warning
  439.  
  440.  -- Scheme Procedure: issue-deprecation-warning . msgs
  441.      Output MSGS to `(current-error-port)' when this is the first call
  442.      to `issue-deprecation-warning' with this specific MSGS.  Do
  443.      nothing otherwise. The argument MSGS should be a list of strings;
  444.      they are printed in turn, each one followed by a newline.
  445.  
  446.     include-deprecated-features
  447.  
  448.  -- Scheme Procedure: include-deprecated-features
  449.      Return `#t' iff deprecated features should be included in public
  450.      interfaces.
  451.  
  452.     substring-move-left!
  453.  
  454.  -- Scheme Procedure: substring-move-left!
  455.      implemented by the C function "scm_substring_move_x"
  456.  
  457.     substring-move-right!
  458.  
  459.  -- Scheme Procedure: substring-move-right!
  460.      implemented by the C function "scm_substring_move_x"
  461.  
  462.     c-registered-modules
  463.  
  464.  -- Scheme Procedure: c-registered-modules
  465.      Return a list of the object code modules that have been imported
  466.      into the current Guile process.  Each element of the list is a
  467.      pair whose car is the name of the module, and whose cdr is the
  468.      function handle for that module's initializer function.  The name
  469.      is the string that has been passed to scm_register_module_xxx.
  470.  
  471.     c-clear-registered-modules
  472.  
  473.  -- Scheme Procedure: c-clear-registered-modules
  474.      Destroy the list of modules registered with the current Guile
  475.      process.  The return value is unspecified.  *Warning:* this
  476.      function does not actually unlink or deallocate these modules, but
  477.      only destroys the records of which modules have been loaded.  It
  478.      should therefore be used only by module bookkeeping operations.
  479.  
  480.     close-all-ports-except
  481.  
  482.  -- Scheme Procedure: close-all-ports-except . ports
  483.      [DEPRECATED] Close all open file ports used by the interpreter
  484.      except for those supplied as arguments.  This procedure was
  485.      intended to be used before an exec call to close file descriptors
  486.      which are not needed in the new process.  However it has the
  487.      undesirable side effect of flushing buffers, so it's deprecated.
  488.      Use port-for-each instead.
  489.  
  490.     variable-set-name-hint!
  491.  
  492.  -- Scheme Procedure: variable-set-name-hint! var hint
  493.      Do not use this function.
  494.  
  495.     builtin-variable
  496.  
  497.  -- Scheme Procedure: builtin-variable name
  498.      Do not use this function.
  499.  
  500.     sloppy-memq
  501.  
  502.  -- Scheme Procedure: sloppy-memq x lst
  503.      This procedure behaves like `memq', but does no type or error
  504.      checking.  Its use is recommended only in writing Guile internals,
  505.      not for high-level Scheme programs.
  506.  
  507.     sloppy-memv
  508.  
  509.  -- Scheme Procedure: sloppy-memv x lst
  510.      This procedure behaves like `memv', but does no type or error
  511.      checking.  Its use is recommended only in writing Guile internals,
  512.      not for high-level Scheme programs.
  513.  
  514.     sloppy-member
  515.  
  516.  -- Scheme Procedure: sloppy-member x lst
  517.      This procedure behaves like `member', but does no type or error
  518.      checking.  Its use is recommended only in writing Guile internals,
  519.      not for high-level Scheme programs.
  520.  
  521.     read-and-eval!
  522.  
  523.  -- Scheme Procedure: read-and-eval! [port]
  524.      Read a form from PORT (standard input by default), and evaluate it
  525.      (memoizing it in the process) in the top-level environment.  If no
  526.      data is left to be read from PORT, an `end-of-file' error is
  527.      signalled.
  528.  
  529.     string->obarray-symbol
  530.  
  531.  -- Scheme Procedure: string->obarray-symbol o s [softp]
  532.      Intern a new symbol in OBARRAY, a symbol table, with name STRING.
  533.  
  534.      If OBARRAY is `#f', use the default system symbol table.  If
  535.      OBARRAY is `#t', the symbol should not be interned in any symbol
  536.      table; merely return the pair (SYMBOL . #<UNDEFINED>).
  537.  
  538.      The SOFT? argument determines whether new symbol table entries
  539.      should be created when the specified symbol is not already present
  540.      in OBARRAY.  If SOFT? is specified and is a true value, then new
  541.      entries should not be added for symbols not already present in the
  542.      table; instead, simply return `#f'.
  543.  
  544.     intern-symbol
  545.  
  546.  -- Scheme Procedure: intern-symbol o s
  547.      Add a new symbol to OBARRAY with name STRING, bound to an
  548.      unspecified initial value.  The symbol table is not modified if a
  549.      symbol with this name is already present.
  550.  
  551.     unintern-symbol
  552.  
  553.  -- Scheme Procedure: unintern-symbol o s
  554.      Remove the symbol with name STRING from OBARRAY.  This function
  555.      returns `#t' if the symbol was present and `#f' otherwise.
  556.  
  557.     symbol-binding
  558.  
  559.  -- Scheme Procedure: symbol-binding o s
  560.      Look up in OBARRAY the symbol whose name is STRING, and return the
  561.      value to which it is bound.  If OBARRAY is `#f', use the global
  562.      symbol table.  If STRING is not interned in OBARRAY, an error is
  563.      signalled.
  564.  
  565.     symbol-bound?
  566.  
  567.  -- Scheme Procedure: symbol-bound? o s
  568.      Return `#t' if OBARRAY contains a symbol with name STRING bound to
  569.      a defined value.  This differs from SYMBOL-INTERNED? in that the
  570.      mere mention of a symbol usually causes it to be interned;
  571.      `symbol-bound?' determines whether a symbol has been given any
  572.      meaningful value.
  573.  
  574.     symbol-set!
  575.  
  576.  -- Scheme Procedure: symbol-set! o s v
  577.      Find the symbol in OBARRAY whose name is STRING, and rebind it to
  578.      VALUE.  An error is signalled if STRING is not present in OBARRAY.
  579.  
  580.     gentemp
  581.  
  582.  -- Scheme Procedure: gentemp [prefix [obarray]]
  583.      Create a new symbol with a name unique in an obarray.  The name is
  584.      constructed from an optional string PREFIX and a counter value.
  585.      The default prefix is `t'.  The OBARRAY is specified as a second
  586.      optional argument.  Default is the system obarray where all normal
  587.      symbols are interned.  The counter is increased by 1 at each call.
  588.      There is no provision for resetting the counter.
  589.  
  590.     guardian-destroyed?
  591.  
  592.  -- Scheme Procedure: guardian-destroyed? guardian
  593.      Return `#t' if GUARDIAN has been destroyed, otherwise `#f'.
  594.  
  595.     guardian-greedy?
  596.  
  597.  -- Scheme Procedure: guardian-greedy? guardian
  598.      Return `#t' if GUARDIAN is a greedy guardian, otherwise `#f'.
  599.  
  600.     destroy-guardian!
  601.  
  602.  -- Scheme Procedure: destroy-guardian! guardian
  603.      Destroys GUARDIAN, by making it impossible to put any more objects
  604.      in it or get any objects from it.  It also unguards any objects
  605.      guarded by GUARDIAN.
  606.  
  607.     make-keyword-from-dash-symbol
  608.  
  609.  -- Scheme Procedure: make-keyword-from-dash-symbol symbol
  610.      Make a keyword object from a SYMBOL that starts with a dash.
  611.  
  612.     keyword-dash-symbol
  613.  
  614.  -- Scheme Procedure: keyword-dash-symbol keyword
  615.      Return the dash symbol for KEYWORD.  This is the inverse of
  616.      `make-keyword-from-dash-symbol'.
  617.  
  618.     dynamic-link
  619.  
  620.  -- Scheme Procedure: dynamic-link filename
  621.      Find the shared object (shared library) denoted by FILENAME and
  622.      link it into the running Guile application.  The returned scheme
  623.      object is a "handle" for the library which can be passed to
  624.      `dynamic-func', `dynamic-call' etc.
  625.  
  626.      Searching for object files is system dependent.  Normally, if
  627.      FILENAME does have an explicit directory it will be searched for
  628.      in locations such as `/usr/lib' and `/usr/local/lib'.
  629.  
  630.     dynamic-object?
  631.  
  632.  -- Scheme Procedure: dynamic-object? obj
  633.      Return `#t' if OBJ is a dynamic object handle, or `#f' otherwise.
  634.  
  635.     dynamic-unlink
  636.  
  637.  -- Scheme Procedure: dynamic-unlink dobj
  638.      Unlink a dynamic object from the application, if possible.  The
  639.      object must have been linked by `dynamic-link', with DOBJ the
  640.      corresponding handle.  After this procedure is called, the handle
  641.      can no longer be used to access the object.
  642.  
  643.     dynamic-func
  644.  
  645.  -- Scheme Procedure: dynamic-func name dobj
  646.      Return a "handle" for the function NAME in the shared object
  647.      referred to by DOBJ.  The handle can be passed to `dynamic-call'
  648.      to actually call the function.
  649.  
  650.      Regardless whether your C compiler prepends an underscore `_' to
  651.      the global names in a program, you should *not* include this
  652.      underscore in NAME since it will be added automatically when
  653.      necessary.
  654.  
  655.     dynamic-call
  656.  
  657.  -- Scheme Procedure: dynamic-call func dobj
  658.      Call a C function in a dynamic object.  Two styles of invocation
  659.      are supported:
  660.  
  661.         * FUNC can be a function handle returned by `dynamic-func'.  In
  662.           this case DOBJ is ignored
  663.  
  664.         * FUNC can be a string with the name of the function to call,
  665.           with DOBJ the handle of the dynamic object in which to find
  666.           the function.  This is equivalent to
  667.  
  668.                (dynamic-call (dynamic-func FUNC DOBJ) #f)
  669.  
  670.      In either case, the function is passed no arguments and its return
  671.      value is ignored.
  672.  
  673.     dynamic-args-call
  674.  
  675.  -- Scheme Procedure: dynamic-args-call func dobj args
  676.      Call the C function indicated by FUNC and DOBJ, just like
  677.      `dynamic-call', but pass it some arguments and return its return
  678.      value.  The C function is expected to take two arguments and
  679.      return an `int', just like `main':
  680.           int c_func (int argc, char **argv);
  681.  
  682.      The parameter ARGS must be a list of strings and is converted into
  683.      an array of `char *'.  The array is passed in ARGV and its size in
  684.      ARGC.  The return value is converted to a Scheme number and
  685.      returned from the call to `dynamic-args-call'.
  686.  
  687.     dynamic-wind
  688.  
  689.  -- Scheme Procedure: dynamic-wind in_guard thunk out_guard
  690.      All three arguments must be 0-argument procedures.  IN_GUARD is
  691.      called, then THUNK, then OUT_GUARD.
  692.  
  693.      If, any time during the execution of THUNK, the continuation of
  694.      the `dynamic_wind' expression is escaped non-locally, OUT_GUARD is
  695.      called.  If the continuation of the dynamic-wind is re-entered,
  696.      IN_GUARD is called.  Thus IN_GUARD and OUT_GUARD may be called any
  697.      number of times.
  698.           (define x 'normal-binding)
  699.           => x
  700.           (define a-cont  (call-with-current-continuation
  701.                     (lambda (escape)
  702.                        (let ((old-x x))
  703.                          (dynamic-wind
  704.                         ;; in-guard:
  705.                         ;;
  706.                         (lambda () (set! x 'special-binding))
  707.  
  708.                         ;; thunk
  709.                         ;;
  710.                          (lambda () (display x) (newline)
  711.                                (call-with-current-continuation escape)
  712.                                (display x) (newline)
  713.                                x)
  714.  
  715.                         ;; out-guard:
  716.                         ;;
  717.                         (lambda () (set! x old-x)))))))
  718.  
  719.           ;; Prints:
  720.           special-binding
  721.           ;; Evaluates to:
  722.           => a-cont
  723.           x
  724.           => normal-binding
  725.           (a-cont #f)
  726.           ;; Prints:
  727.           special-binding
  728.           ;; Evaluates to:
  729.           => a-cont  ;; the value of the (define a-cont...)
  730.           x
  731.           => normal-binding
  732.           a-cont
  733.           => special-binding
  734.  
  735.     environment?
  736.  
  737.  -- Scheme Procedure: environment? obj
  738.      Return `#t' if OBJ is an environment, or `#f' otherwise.
  739.  
  740.     environment-bound?
  741.  
  742.  -- Scheme Procedure: environment-bound? env sym
  743.      Return `#t' if SYM is bound in ENV, or `#f' otherwise.
  744.  
  745.     environment-ref
  746.  
  747.  -- Scheme Procedure: environment-ref env sym
  748.      Return the value of the location bound to SYM in ENV. If SYM is
  749.      unbound in ENV, signal an `environment:unbound' error.
  750.  
  751.     environment-fold
  752.  
  753.  -- Scheme Procedure: environment-fold env proc init
  754.      Iterate over all the bindings in ENV, accumulating some value.
  755.      For each binding in ENV, apply PROC to the symbol bound, its
  756.      value, and the result from the previous application of PROC.  Use
  757.      INIT as PROC's third argument the first time PROC is applied.  If
  758.      ENV contains no bindings, this function simply returns INIT.  If
  759.      ENV binds the symbol sym1 to the value val1, sym2 to val2, and so
  760.      on, then this procedure computes:
  761.             (proc sym1 val1
  762.                   (proc sym2 val2
  763.                         ...
  764.                         (proc symn valn
  765.                               init)))
  766.      Each binding in ENV will be processed exactly once.
  767.      `environment-fold' makes no guarantees about the order in which
  768.      the bindings are processed.  Here is a function which, given an
  769.      environment, constructs an association list representing that
  770.      environment's bindings, using environment-fold:
  771.             (define (environment->alist env)
  772.               (environment-fold env
  773.                                 (lambda (sym val tail)
  774.                                   (cons (cons sym val) tail))
  775.                                 '()))
  776.  
  777.     environment-define
  778.  
  779.  -- Scheme Procedure: environment-define env sym val
  780.      Bind SYM to a new location containing VAL in ENV. If SYM is
  781.      already bound to another location in ENV and the binding is
  782.      mutable, that binding is replaced.  The new binding and location
  783.      are both mutable. The return value is unspecified.  If SYM is
  784.      already bound in ENV, and the binding is immutable, signal an
  785.      `environment:immutable-binding' error.
  786.  
  787.     environment-undefine
  788.  
  789.  -- Scheme Procedure: environment-undefine env sym
  790.      Remove any binding for SYM from ENV. If SYM is unbound in ENV, do
  791.      nothing.  The return value is unspecified.  If SYM is already
  792.      bound in ENV, and the binding is immutable, signal an
  793.      `environment:immutable-binding' error.
  794.  
  795.     environment-set!
  796.  
  797.  -- Scheme Procedure: environment-set! env sym val
  798.      If ENV binds SYM to some location, change that location's value to
  799.      VAL.  The return value is unspecified.  If SYM is not bound in
  800.      ENV, signal an `environment:unbound' error.  If ENV binds SYM to
  801.      an immutable location, signal an `environment:immutable-location'
  802.      error.
  803.  
  804.     environment-cell
  805.  
  806.  -- Scheme Procedure: environment-cell env sym for_write
  807.      Return the value cell which ENV binds to SYM, or `#f' if the
  808.      binding does not live in a value cell.  The argument FOR-WRITE
  809.      indicates whether the caller intends to modify the variable's
  810.      value by mutating the value cell.  If the variable is immutable,
  811.      then `environment-cell' signals an
  812.      `environment:immutable-location' error.  If SYM is unbound in ENV,
  813.      signal an `environment:unbound' error.  If you use this function,
  814.      you should consider using `environment-observe', to be notified
  815.      when SYM gets re-bound to a new value cell, or becomes undefined.
  816.  
  817.     environment-observe
  818.  
  819.  -- Scheme Procedure: environment-observe env proc
  820.      Whenever ENV's bindings change, apply PROC to ENV.  This function
  821.      returns an object, token, which you can pass to
  822.      `environment-unobserve' to remove PROC from the set of procedures
  823.      observing ENV.  The type and value of token is unspecified.
  824.  
  825.     environment-observe-weak
  826.  
  827.  -- Scheme Procedure: environment-observe-weak env proc
  828.      This function is the same as environment-observe, except that the
  829.      reference ENV retains to PROC is a weak reference. This means
  830.      that, if there are no other live, non-weak references to PROC, it
  831.      will be garbage-collected, and dropped from ENV's list of
  832.      observing procedures.
  833.  
  834.     environment-unobserve
  835.  
  836.  -- Scheme Procedure: environment-unobserve token
  837.      Cancel the observation request which returned the value TOKEN.
  838.      The return value is unspecified.  If a call `(environment-observe
  839.      env proc)' returns TOKEN, then the call `(environment-unobserve
  840.      token)' will cause PROC to no longer be called when ENV's bindings
  841.      change.
  842.  
  843.     make-leaf-environment
  844.  
  845.  -- Scheme Procedure: make-leaf-environment
  846.      Create a new leaf environment, containing no bindings.  All
  847.      bindings and locations created in the new environment will be
  848.      mutable.
  849.  
  850.     leaf-environment?
  851.  
  852.  -- Scheme Procedure: leaf-environment? object
  853.      Return `#t' if object is a leaf environment, or `#f' otherwise.
  854.  
  855.     make-eval-environment
  856.  
  857.  -- Scheme Procedure: make-eval-environment local imported
  858.      Return a new environment object eval whose bindings are the union
  859.      of the bindings in the environments LOCAL and IMPORTED, with
  860.      bindings from LOCAL taking precedence. Definitions made in eval
  861.      are placed in LOCAL.  Applying `environment-define' or
  862.      `environment-undefine' to eval has the same effect as applying the
  863.      procedure to LOCAL.  Note that eval incorporates LOCAL and
  864.      IMPORTED by reference: If, after creating eval, the program
  865.      changes the bindings of LOCAL or IMPORTED, those changes will be
  866.      visible in eval.  Since most Scheme evaluation takes place in eval
  867.      environments, they transparently cache the bindings received from
  868.      LOCAL and IMPORTED. Thus, the first time the program looks up a
  869.      symbol in eval, eval may make calls to LOCAL or IMPORTED to find
  870.      their bindings, but subsequent references to that symbol will be
  871.      as fast as references to bindings in finite environments.  In
  872.      typical use, LOCAL will be a finite environment, and IMPORTED will
  873.      be an import environment
  874.  
  875.     eval-environment?
  876.  
  877.  -- Scheme Procedure: eval-environment? object
  878.      Return `#t' if object is an eval environment, or `#f' otherwise.
  879.  
  880.     eval-environment-local
  881.  
  882.  -- Scheme Procedure: eval-environment-local env
  883.      Return the local environment of eval environment ENV.
  884.  
  885.     eval-environment-set-local!
  886.  
  887.  -- Scheme Procedure: eval-environment-set-local! env local
  888.      Change ENV's local environment to LOCAL.
  889.  
  890.     eval-environment-imported
  891.  
  892.  -- Scheme Procedure: eval-environment-imported env
  893.      Return the imported environment of eval environment ENV.
  894.  
  895.     eval-environment-set-imported!
  896.  
  897.  -- Scheme Procedure: eval-environment-set-imported! env imported
  898.      Change ENV's imported environment to IMPORTED.
  899.  
  900.     make-import-environment
  901.  
  902.  -- Scheme Procedure: make-import-environment imports conflict_proc
  903.      Return a new environment IMP whose bindings are the union of the
  904.      bindings from the environments in IMPORTS; IMPORTS must be a list
  905.      of environments. That is, IMP binds a symbol to a location when
  906.      some element of IMPORTS does.  If two different elements of
  907.      IMPORTS have a binding for the same symbol, the CONFLICT-PROC is
  908.      called with the following parameters:  the import environment, the
  909.      symbol and the list of the imported environments that bind the
  910.      symbol.  If the CONFLICT-PROC returns an environment ENV, the
  911.      conflict is considered as resolved and the binding from ENV is
  912.      used.  If the CONFLICT-PROC returns some non-environment object,
  913.      the conflict is considered unresolved and the symbol is treated as
  914.      unspecified in the import environment.  The checking for conflicts
  915.      may be performed lazily, i. e. at the moment when a value or
  916.      binding for a certain symbol is requested instead of the moment
  917.      when the environment is created or the bindings of the imports
  918.      change.  All bindings in IMP are immutable. If you apply
  919.      `environment-define' or `environment-undefine' to IMP, Guile will
  920.      signal an  `environment:immutable-binding' error. However, notice
  921.      that the set of bindings in IMP may still change, if one of its
  922.      imported environments changes.
  923.  
  924.     import-environment?
  925.  
  926.  -- Scheme Procedure: import-environment? object
  927.      Return `#t' if object is an import environment, or `#f' otherwise.
  928.  
  929.     import-environment-imports
  930.  
  931.  -- Scheme Procedure: import-environment-imports env
  932.      Return the list of environments imported by the import environment
  933.      ENV.
  934.  
  935.     import-environment-set-imports!
  936.  
  937.  -- Scheme Procedure: import-environment-set-imports! env imports
  938.      Change ENV's list of imported environments to IMPORTS, and check
  939.      for conflicts.
  940.  
  941.     make-export-environment
  942.  
  943.  -- Scheme Procedure: make-export-environment private signature
  944.      Return a new environment EXP containing only those bindings in
  945.      private whose symbols are present in SIGNATURE. The PRIVATE
  946.      argument must be an environment.
  947.  
  948.      The environment EXP binds symbol to location when ENV does, and
  949.      symbol is exported by SIGNATURE.
  950.  
  951.      SIGNATURE is a list specifying which of the bindings in PRIVATE
  952.      should be visible in EXP. Each element of SIGNATURE should be a
  953.      list of the form:   (symbol attribute ...)  where each attribute
  954.      is one of the following:
  955.     the symbol `mutable-location'
  956.           EXP should treat the   location bound to symbol as mutable.
  957.           That is, EXP   will pass calls to `environment-set!' or
  958.           `environment-cell' directly through to private.
  959.  
  960.     the symbol `immutable-location'
  961.           EXP should treat   the location bound to symbol as immutable.
  962.           If the program   applies `environment-set!' to EXP and
  963.           symbol, or   calls `environment-cell' to obtain a writable
  964.           value   cell, `environment-set!' will signal an
  965.           `environment:immutable-location' error. Note that, even   if
  966.           an export environment treats a location as immutable, the
  967.           underlying environment may treat it as mutable, so its
  968.           value may change.
  969.      It is an error for an element of signature to specify both
  970.      `mutable-location' and `immutable-location'. If neither is
  971.      specified, `immutable-location' is assumed.
  972.  
  973.      As a special case, if an element of signature is a lone symbol
  974.      SYM, it is equivalent to an element of the form `(sym)'.
  975.  
  976.      All bindings in EXP are immutable. If you apply
  977.      `environment-define' or `environment-undefine' to EXP, Guile will
  978.      signal an `environment:immutable-binding' error. However, notice
  979.      that the set of bindings in EXP may still change, if the bindings
  980.      in private change.
  981.  
  982.     export-environment?
  983.  
  984.  -- Scheme Procedure: export-environment? object
  985.      Return `#t' if object is an export environment, or `#f' otherwise.
  986.  
  987.     export-environment-private
  988.  
  989.  -- Scheme Procedure: export-environment-private env
  990.      Return the private environment of export environment ENV.
  991.  
  992.     export-environment-set-private!
  993.  
  994.  -- Scheme Procedure: export-environment-set-private! env private
  995.      Change the private environment of export environment ENV.
  996.  
  997.     export-environment-signature
  998.  
  999.  -- Scheme Procedure: export-environment-signature env
  1000.      Return the signature of export environment ENV.
  1001.  
  1002.     export-environment-set-signature!
  1003.  
  1004.  -- Scheme Procedure: export-environment-set-signature! env signature
  1005.      Change the signature of export environment ENV.
  1006.  
  1007.     eq?
  1008.  
  1009.  -- Scheme Procedure: eq? x y
  1010.      Return `#t' if X and Y are the same object, except for numbers and
  1011.      characters.  For example,
  1012.  
  1013.           (define x (vector 1 2 3))
  1014.           (define y (vector 1 2 3))
  1015.  
  1016.           (eq? x x)  => #t
  1017.           (eq? x y)  => #f
  1018.  
  1019.      Numbers and characters are not equal to any other object, but the
  1020.      problem is they're not necessarily `eq?' to themselves either.
  1021.      This is even so when the number comes directly from a variable,
  1022.  
  1023.           (let ((n (+ 2 3)))
  1024.             (eq? n n))       => *unspecified*
  1025.  
  1026.      Generally `eqv?' should be used when comparing numbers or
  1027.      characters.  `=' or `char=?' can be used too.
  1028.  
  1029.      It's worth noting that end-of-list `()', `#t', `#f', a symbol of a
  1030.      given name, and a keyword of a given name, are unique objects.
  1031.      There's just one of each, so for instance no matter how `()'
  1032.      arises in a program, it's the same object and can be compared with
  1033.      `eq?',
  1034.  
  1035.           (define x (cdr '(123)))
  1036.           (define y (cdr '(456)))
  1037.           (eq? x y) => #t
  1038.  
  1039.           (define x (string->symbol "foo"))
  1040.           (eq? x 'foo) => #t
  1041.  
  1042.     eqv?
  1043.  
  1044.  -- Scheme Procedure: eqv? x y
  1045.      Return `#t' if X and Y are the same object, or for characters and
  1046.      numbers the same value.
  1047.  
  1048.      On objects except characters and numbers, `eqv?' is the same as
  1049.      `eq?', it's true if X and Y are the same object.
  1050.  
  1051.      If X and Y are numbers or characters, `eqv?' compares their type
  1052.      and value.  An exact number is not `eqv?' to an inexact number
  1053.      (even if their value is the same).
  1054.  
  1055.           (eqv? 3 (+ 1 2)) => #t
  1056.           (eqv? 1 1.0)     => #f
  1057.  
  1058.     equal?
  1059.  
  1060.  -- Scheme Procedure: equal? x y
  1061.      Return `#t' if X and Y are the same type, and their contents or
  1062.      value are equal.
  1063.  
  1064.      For a pair, string, vector or array, `equal?' compares the
  1065.      contents, and does so using using the same `equal?' recursively,
  1066.      so a deep structure can be traversed.
  1067.  
  1068.           (equal? (list 1 2 3) (list 1 2 3))   => #t
  1069.           (equal? (list 1 2 3) (vector 1 2 3)) => #f
  1070.  
  1071.      For other objects, `equal?' compares as per `eqv?', which means
  1072.      characters and numbers are compared by type and value (and like
  1073.      `eqv?', exact and inexact numbers are not `equal?', even if their
  1074.      value is the same).
  1075.  
  1076.           (equal? 3 (+ 1 2)) => #t
  1077.           (equal? 1 1.0)     => #f
  1078.  
  1079.      Hash tables are currently only compared as per `eq?', so two
  1080.      different tables are not `equal?', even if their contents are the
  1081.      same.
  1082.  
  1083.      `equal?' does not support circular data structures, it may go into
  1084.      an infinite loop if asked to compare two circular lists or similar.
  1085.  
  1086.      New application-defined object types (Smobs) have an `equalp'
  1087.      handler which is called by `equal?'.  This lets an application
  1088.      traverse the contents or control what is considered `equal?' for
  1089.      two such objects.  If there's no handler, the default is to just
  1090.      compare as per `eq?'.
  1091.  
  1092.     scm-error
  1093.  
  1094.  -- Scheme Procedure: scm-error key subr message args data
  1095.      Raise an error with key KEY.  SUBR can be a string naming the
  1096.      procedure associated with the error, or `#f'.  MESSAGE is the
  1097.      error message string, possibly containing `~S' and `~A' escapes.
  1098.      When an error is reported, these are replaced by formatting the
  1099.      corresponding members of ARGS: `~A' (was `%s' in older versions of
  1100.      Guile) formats using `display' and `~S' (was `%S') formats using
  1101.      `write'.  DATA is a list or `#f' depending on KEY: if KEY is
  1102.      `system-error' then it should be a list containing the Unix
  1103.      `errno' value; If KEY is `signal' then it should be a list
  1104.      containing the Unix signal number; If KEY is `out-of-range' or
  1105.      `wrong-type-arg', it is a list containing the bad value; otherwise
  1106.      it will usually be `#f'.
  1107.  
  1108.     strerror
  1109.  
  1110.  -- Scheme Procedure: strerror err
  1111.      Return the Unix error message corresponding to ERR, which must be
  1112.      an integer value.
  1113.  
  1114.     apply:nconc2last
  1115.  
  1116.  -- Scheme Procedure: apply:nconc2last lst
  1117.      Given a list (ARG1 ... ARGS), this function conses the ARG1 ...
  1118.      arguments onto the front of ARGS, and returns the resulting list.
  1119.      Note that ARGS is a list; thus, the argument to this function is a
  1120.      list whose last element is a list.  Note: Rather than do new
  1121.      consing, `apply:nconc2last' destroys its argument, so use with
  1122.      care.
  1123.  
  1124.     force
  1125.  
  1126.  -- Scheme Procedure: force promise
  1127.      If the promise X has not been computed yet, compute and return X,
  1128.      otherwise just return the previously computed value.
  1129.  
  1130.     promise?
  1131.  
  1132.  -- Scheme Procedure: promise? obj
  1133.      Return true if OBJ is a promise, i.e. a delayed computation (*note
  1134.      Delayed evaluation: (r5rs.info)Delayed evaluation.).
  1135.  
  1136.     cons-source
  1137.  
  1138.  -- Scheme Procedure: cons-source xorig x y
  1139.      Create and return a new pair whose car and cdr are X and Y.  Any
  1140.      source properties associated with XORIG are also associated with
  1141.      the new pair.
  1142.  
  1143.     copy-tree
  1144.  
  1145.  -- Scheme Procedure: copy-tree obj
  1146.      Recursively copy the data tree that is bound to OBJ, and return a
  1147.      the new data structure.  `copy-tree' recurses down the contents of
  1148.      both pairs and vectors (since both cons cells and vector cells may
  1149.      point to arbitrary objects), and stops recursing when it hits any
  1150.      other object.
  1151.  
  1152.     primitive-eval
  1153.  
  1154.  -- Scheme Procedure: primitive-eval exp
  1155.      Evaluate EXP in the top-level environment specified by the current
  1156.      module.
  1157.  
  1158.     eval
  1159.  
  1160.  -- Scheme Procedure: eval exp module_or_state
  1161.      Evaluate EXP, a list representing a Scheme expression, in the
  1162.      top-level environment specified by MODULE_OR_STATE.  While EXP is
  1163.      evaluated (using `primitive-eval'), MODULE_OR_STATE is made the
  1164.      current module when it is a module, or the current dynamic state
  1165.      when it is a dynamic state.Example: (eval '(+ 1 2)
  1166.      (interaction-environment))
  1167.  
  1168.     eval-options-interface
  1169.  
  1170.  -- Scheme Procedure: eval-options-interface [setting]
  1171.      Option interface for the evaluation options. Instead of using this
  1172.      procedure directly, use the procedures `eval-enable',
  1173.      `eval-disable', `eval-set!' and `eval-options'.
  1174.  
  1175.     evaluator-traps-interface
  1176.  
  1177.  -- Scheme Procedure: evaluator-traps-interface [setting]
  1178.      Option interface for the evaluator trap options.
  1179.  
  1180.     defined?
  1181.  
  1182.  -- Scheme Procedure: defined? sym [env]
  1183.      Return `#t' if SYM is defined in the lexical environment ENV.
  1184.      When ENV is not specified, look in the top-level environment as
  1185.      defined by the current module.
  1186.  
  1187.     map-in-order
  1188.  
  1189.  -- Scheme Procedure: map-in-order
  1190.      implemented by the C function "scm_map"
  1191.  
  1192.     self-evaluating?
  1193.  
  1194.  -- Scheme Procedure: self-evaluating? obj
  1195.      Return #t for objects which Guile considers self-evaluating
  1196.  
  1197.     load-extension
  1198.  
  1199.  -- Scheme Procedure: load-extension lib init
  1200.      Load and initialize the extension designated by LIB and INIT.
  1201.      When there is no pre-registered function for LIB/INIT, this is
  1202.      equivalent to
  1203.  
  1204.           (dynamic-call INIT (dynamic-link LIB))
  1205.  
  1206.      When there is a pre-registered function, that function is called
  1207.      instead.
  1208.  
  1209.      Normally, there is no pre-registered function.  This option exists
  1210.      only for situations where dynamic linking is unavailable or
  1211.      unwanted.  In that case, you would statically link your program
  1212.      with the desired library, and register its init function right
  1213.      after Guile has been initialized.
  1214.  
  1215.      LIB should be a string denoting a shared library without any file
  1216.      type suffix such as ".so".  The suffix is provided automatically.
  1217.      It should also not contain any directory components.  Libraries
  1218.      that implement Guile Extensions should be put into the normal
  1219.      locations for shared libraries.  We recommend to use the naming
  1220.      convention libguile-bla-blum for a extension related to a module
  1221.      `(bla blum)'.
  1222.  
  1223.      The normal way for a extension to be used is to write a small
  1224.      Scheme file that defines a module, and to load the extension into
  1225.      this module.  When the module is auto-loaded, the extension is
  1226.      loaded as well.  For example,
  1227.  
  1228.           (define-module (bla blum))
  1229.  
  1230.           (load-extension "libguile-bla-blum" "bla_init_blum")
  1231.  
  1232.     program-arguments
  1233.  
  1234.  -- Scheme Procedure: program-arguments
  1235.  -- Scheme Procedure: command-line
  1236.      Return the list of command line arguments passed to Guile, as a
  1237.      list of strings.  The list includes the invoked program name,
  1238.      which is usually `"guile"', but excludes switches and parameters
  1239.      for command line options like `-e' and `-l'.
  1240.  
  1241.     set-program-arguments
  1242.  
  1243.  -- Scheme Procedure: set-program-arguments lst
  1244.      Set the command line arguments to be returned by
  1245.      `program-arguments' (and `command-line').  LST should be a list of
  1246.      strings, the first of which is the program name (either a script
  1247.      name, or just `"guile"').
  1248.  
  1249.      Program arguments are held in a fluid and therefore have a
  1250.      separate value in each Guile thread.  Neither the list nor the
  1251.      strings within it are copied, so should not be modified later.
  1252.  
  1253.     make-fluid
  1254.  
  1255.  -- Scheme Procedure: make-fluid
  1256.      Return a newly created fluid.  Fluids are objects that can hold one
  1257.      value per dynamic state.  That is, modifications to this value are
  1258.      only visible to code that executes with the same dynamic state as
  1259.      the modifying code.  When a new dynamic state is constructed, it
  1260.      inherits the values from its parent.  Because each thread normally
  1261.      executes with its own dynamic state, you can use fluids for thread
  1262.      local storage.
  1263.  
  1264.     fluid?
  1265.  
  1266.  -- Scheme Procedure: fluid? obj
  1267.      Return `#t' iff OBJ is a fluid; otherwise, return `#f'.
  1268.  
  1269.     fluid-ref
  1270.  
  1271.  -- Scheme Procedure: fluid-ref fluid
  1272.      Return the value associated with FLUID in the current dynamic
  1273.      root.  If FLUID has not been set, then return `#f'.
  1274.  
  1275.     fluid-set!
  1276.  
  1277.  -- Scheme Procedure: fluid-set! fluid value
  1278.      Set the value associated with FLUID in the current dynamic root.
  1279.  
  1280.     with-fluids*
  1281.  
  1282.  -- Scheme Procedure: with-fluids* fluids values thunk
  1283.      Set FLUIDS to VALUES temporary, and call THUNK.  FLUIDS must be a
  1284.      list of fluids and VALUES must be the same number of their values
  1285.      to be applied.  Each substitution is done one after another.
  1286.      THUNK must be a procedure with no argument.
  1287.  
  1288.     with-fluid*
  1289.  
  1290.  -- Scheme Procedure: with-fluid* fluid value thunk
  1291.      Set FLUID to VALUE temporarily, and call THUNK.  THUNK must be a
  1292.      procedure with no argument.
  1293.  
  1294.     make-dynamic-state
  1295.  
  1296.  -- Scheme Procedure: make-dynamic-state [parent]
  1297.      Return a copy of the dynamic state object PARENT or of the current
  1298.      dynamic state when PARENT is omitted.
  1299.  
  1300.     dynamic-state?
  1301.  
  1302.  -- Scheme Procedure: dynamic-state? obj
  1303.      Return `#t' if OBJ is a dynamic state object; return `#f' otherwise
  1304.  
  1305.     current-dynamic-state
  1306.  
  1307.  -- Scheme Procedure: current-dynamic-state
  1308.      Return the current dynamic state object.
  1309.  
  1310.     set-current-dynamic-state
  1311.  
  1312.  -- Scheme Procedure: set-current-dynamic-state state
  1313.      Set the current dynamic state object to STATE and return the
  1314.      previous current dynamic state object.
  1315.  
  1316.     with-dynamic-state
  1317.  
  1318.  -- Scheme Procedure: with-dynamic-state state proc
  1319.      Call PROC while STATE is the current dynamic state object.
  1320.  
  1321.     setvbuf
  1322.  
  1323.  -- Scheme Procedure: setvbuf port mode [size]
  1324.      Set the buffering mode for PORT.  MODE can be:
  1325.     `_IONBF'
  1326.           non-buffered
  1327.  
  1328.     `_IOLBF'
  1329.           line buffered
  1330.  
  1331.     `_IOFBF'
  1332.           block buffered, using a newly allocated buffer of SIZE bytes.
  1333.           If SIZE is omitted, a default size will be used.
  1334.  
  1335.     file-port?
  1336.  
  1337.  -- Scheme Procedure: file-port? obj
  1338.      Determine whether OBJ is a port that is related to a file.
  1339.  
  1340.     open-file
  1341.  
  1342.  -- Scheme Procedure: open-file filename mode
  1343.      Open the file whose name is FILENAME, and return a port
  1344.      representing that file.  The attributes of the port are determined
  1345.      by the MODE string.  The way in which this is interpreted is
  1346.      similar to C stdio.  The first character must be one of the
  1347.      following:
  1348.     `r'
  1349.           Open an existing file for input.
  1350.  
  1351.     `w'
  1352.           Open a file for output, creating it if it doesn't already
  1353.           exist or removing its contents if it does.
  1354.  
  1355.     `a'
  1356.           Open a file for output, creating it if it doesn't already
  1357.           exist.  All writes to the port will go to the end of the file.
  1358.           The "append mode" can be turned off while the port is in use
  1359.           *note fcntl: Ports and File Descriptors.
  1360.      The following additional characters can be appended:
  1361.     `b'
  1362.           Open the underlying file in binary mode, if supported by the
  1363.           operating system.
  1364.  
  1365.     `+'
  1366.           Open the port for both input and output.  E.g., `r+': open an
  1367.           existing file for both input and output.
  1368.  
  1369.     `0'
  1370.           Create an "unbuffered" port.  In this case input and output
  1371.           operations are passed directly to the underlying port
  1372.           implementation without additional buffering.  This is likely
  1373.           to slow down I/O operations.  The buffering mode can be
  1374.           changed while a port is in use *note setvbuf: Ports and File
  1375.           Descriptors.
  1376.  
  1377.     `l'
  1378.           Add line-buffering to the port.  The port output buffer will
  1379.           be automatically flushed whenever a newline character is
  1380.           written.
  1381.      In theory we could create read/write ports which were buffered in
  1382.      one direction only.  However this isn't included in the current
  1383.      interfaces.  If a file cannot be opened with the access requested,
  1384.      `open-file' throws an exception.
  1385.  
  1386.     gc-live-object-stats
  1387.  
  1388.  -- Scheme Procedure: gc-live-object-stats
  1389.      Return an alist of statistics of the current live objects.
  1390.  
  1391.     gc-stats
  1392.  
  1393.  -- Scheme Procedure: gc-stats
  1394.      Return an association list of statistics about Guile's current use
  1395.      of storage.
  1396.  
  1397.  
  1398.     object-address
  1399.  
  1400.  -- Scheme Procedure: object-address obj
  1401.      Return an integer that for the lifetime of OBJ is uniquely
  1402.      returned by this function for OBJ
  1403.  
  1404.     gc
  1405.  
  1406.  -- Scheme Procedure: gc
  1407.      Scans all of SCM objects and reclaims for further use those that
  1408.      are no longer accessible.
  1409.  
  1410.     class-of
  1411.  
  1412.  -- Scheme Procedure: class-of x
  1413.      Return the class of X.
  1414.  
  1415.     %compute-slots
  1416.  
  1417.  -- Scheme Procedure: %compute-slots class
  1418.      Return a list consisting of the names of all slots belonging to
  1419.      class CLASS, i. e. the slots of CLASS and of all of its
  1420.      superclasses.
  1421.  
  1422.     get-keyword
  1423.  
  1424.  -- Scheme Procedure: get-keyword key l default_value
  1425.      Determine an associated value for the keyword KEY from the list L.
  1426.      The list L has to consist of an even number of elements, where,
  1427.      starting with the first, every second element is a keyword,
  1428.      followed by its associated value.  If L does not hold a value for
  1429.      KEY, the value DEFAULT_VALUE is returned.
  1430.  
  1431.     %initialize-object
  1432.  
  1433.  -- Scheme Procedure: %initialize-object obj initargs
  1434.      Initialize the object OBJ with the given arguments INITARGS.
  1435.  
  1436.     %prep-layout!
  1437.  
  1438.  -- Scheme Procedure: %prep-layout! class
  1439.  
  1440.     %inherit-magic!
  1441.  
  1442.  -- Scheme Procedure: %inherit-magic! class dsupers
  1443.  
  1444.     instance?
  1445.  
  1446.  -- Scheme Procedure: instance? obj
  1447.      Return `#t' if OBJ is an instance.
  1448.  
  1449.     class-name
  1450.  
  1451.  -- Scheme Procedure: class-name obj
  1452.      Return the class name of OBJ.
  1453.  
  1454.     class-direct-supers
  1455.  
  1456.  -- Scheme Procedure: class-direct-supers obj
  1457.      Return the direct superclasses of the class OBJ.
  1458.  
  1459.     class-direct-slots
  1460.  
  1461.  -- Scheme Procedure: class-direct-slots obj
  1462.      Return the direct slots of the class OBJ.
  1463.  
  1464.     class-direct-subclasses
  1465.  
  1466.  -- Scheme Procedure: class-direct-subclasses obj
  1467.      Return the direct subclasses of the class OBJ.
  1468.  
  1469.     class-direct-methods
  1470.  
  1471.  -- Scheme Procedure: class-direct-methods obj
  1472.      Return the direct methods of the class OBJ
  1473.  
  1474.     class-precedence-list
  1475.  
  1476.  -- Scheme Procedure: class-precedence-list obj
  1477.      Return the class precedence list of the class OBJ.
  1478.  
  1479.     class-slots
  1480.  
  1481.  -- Scheme Procedure: class-slots obj
  1482.      Return the slot list of the class OBJ.
  1483.  
  1484.     class-environment
  1485.  
  1486.  -- Scheme Procedure: class-environment obj
  1487.      Return the environment of the class OBJ.
  1488.  
  1489.     generic-function-name
  1490.  
  1491.  -- Scheme Procedure: generic-function-name obj
  1492.      Return the name of the generic function OBJ.
  1493.  
  1494.     generic-function-methods
  1495.  
  1496.  -- Scheme Procedure: generic-function-methods obj
  1497.      Return the methods of the generic function OBJ.
  1498.  
  1499.     method-generic-function
  1500.  
  1501.  -- Scheme Procedure: method-generic-function obj
  1502.      Return the generic function for the method OBJ.
  1503.  
  1504.     method-specializers
  1505.  
  1506.  -- Scheme Procedure: method-specializers obj
  1507.      Return specializers of the method OBJ.
  1508.  
  1509.     method-procedure
  1510.  
  1511.  -- Scheme Procedure: method-procedure obj
  1512.      Return the procedure of the method OBJ.
  1513.  
  1514.     accessor-method-slot-definition
  1515.  
  1516.  -- Scheme Procedure: accessor-method-slot-definition obj
  1517.      Return the slot definition of the accessor OBJ.
  1518.  
  1519.     %tag-body
  1520.  
  1521.  -- Scheme Procedure: %tag-body body
  1522.      Internal GOOPS magic--don't use this function!
  1523.  
  1524.     make-unbound
  1525.  
  1526.  -- Scheme Procedure: make-unbound
  1527.      Return the unbound value.
  1528.  
  1529.     unbound?
  1530.  
  1531.  -- Scheme Procedure: unbound? obj
  1532.      Return `#t' if OBJ is unbound.
  1533.  
  1534.     assert-bound
  1535.  
  1536.  -- Scheme Procedure: assert-bound value obj
  1537.      Return VALUE if it is bound, and invoke the SLOT-UNBOUND method of
  1538.      OBJ if it is not.
  1539.  
  1540.     @assert-bound-ref
  1541.  
  1542.  -- Scheme Procedure: @assert-bound-ref obj index
  1543.      Like `assert-bound', but use INDEX for accessing the value from
  1544.      OBJ.
  1545.  
  1546.     %fast-slot-ref
  1547.  
  1548.  -- Scheme Procedure: %fast-slot-ref obj index
  1549.      Return the slot value with index INDEX from OBJ.
  1550.  
  1551.     %fast-slot-set!
  1552.  
  1553.  -- Scheme Procedure: %fast-slot-set! obj index value
  1554.      Set the slot with index INDEX in OBJ to VALUE.
  1555.  
  1556.     slot-ref-using-class
  1557.  
  1558.  -- Scheme Procedure: slot-ref-using-class class obj slot_name
  1559.  
  1560.     slot-set-using-class!
  1561.  
  1562.  -- Scheme Procedure: slot-set-using-class! class obj slot_name value
  1563.  
  1564.     slot-bound-using-class?
  1565.  
  1566.  -- Scheme Procedure: slot-bound-using-class? class obj slot_name
  1567.  
  1568.     slot-exists-using-class?
  1569.  
  1570.  -- Scheme Procedure: slot-exists-using-class? class obj slot_name
  1571.  
  1572.     slot-ref
  1573.  
  1574.  -- Scheme Procedure: slot-ref obj slot_name
  1575.      Return the value from OBJ's slot with the name SLOT_NAME.
  1576.  
  1577.     slot-set!
  1578.  
  1579.  -- Scheme Procedure: slot-set! obj slot_name value
  1580.      Set the slot named SLOT_NAME of OBJ to VALUE.
  1581.  
  1582.     slot-bound?
  1583.  
  1584.  -- Scheme Procedure: slot-bound? obj slot_name
  1585.      Return `#t' if the slot named SLOT_NAME of OBJ is bound.
  1586.  
  1587.     slot-exists?
  1588.  
  1589.  -- Scheme Procedure: slot-exists? obj slot_name
  1590.      Return `#t' if OBJ has a slot named SLOT_NAME.
  1591.  
  1592.     %allocate-instance
  1593.  
  1594.  -- Scheme Procedure: %allocate-instance class initargs
  1595.      Create a new instance of class CLASS and initialize it from the
  1596.      arguments INITARGS.
  1597.  
  1598.     %set-object-setter!
  1599.  
  1600.  -- Scheme Procedure: %set-object-setter! obj setter
  1601.  
  1602.     %modify-instance
  1603.  
  1604.  -- Scheme Procedure: %modify-instance old new
  1605.  
  1606.     %modify-class
  1607.  
  1608.  -- Scheme Procedure: %modify-class old new
  1609.  
  1610.     %invalidate-class
  1611.  
  1612.  -- Scheme Procedure: %invalidate-class class
  1613.  
  1614.     %invalidate-method-cache!
  1615.  
  1616.  -- Scheme Procedure: %invalidate-method-cache! gf
  1617.  
  1618.     generic-capability?
  1619.  
  1620.  -- Scheme Procedure: generic-capability? proc
  1621.  
  1622.     enable-primitive-generic!
  1623.  
  1624.  -- Scheme Procedure: enable-primitive-generic! . subrs
  1625.  
  1626.     primitive-generic-generic
  1627.  
  1628.  -- Scheme Procedure: primitive-generic-generic subr
  1629.  
  1630.     make
  1631.  
  1632.  -- Scheme Procedure: make . args
  1633.      Make a new object.  ARGS must contain the class and all necessary
  1634.      initialization information.
  1635.  
  1636.     find-method
  1637.  
  1638.  -- Scheme Procedure: find-method . l
  1639.  
  1640.     %method-more-specific?
  1641.  
  1642.  -- Scheme Procedure: %method-more-specific? m1 m2 targs
  1643.      Return true if method M1 is more specific than M2 given the
  1644.      argument types (classes) listed in TARGS.
  1645.  
  1646.     %goops-loaded
  1647.  
  1648.  -- Scheme Procedure: %goops-loaded
  1649.      Announce that GOOPS is loaded and perform initialization on the C
  1650.      level which depends on the loaded GOOPS modules.
  1651.  
  1652.     make-guardian
  1653.  
  1654.  -- Scheme Procedure: make-guardian
  1655.      Create a new guardian.  A guardian protects a set of objects from
  1656.      garbage collection, allowing a program to apply cleanup or other
  1657.      actions.
  1658.  
  1659.      `make-guardian' returns a procedure representing the guardian.
  1660.      Calling the guardian procedure with an argument adds the argument
  1661.      to the guardian's set of protected objects.  Calling the guardian
  1662.      procedure without an argument returns one of the protected objects
  1663.      which are ready for garbage collection, or `#f' if no such object
  1664.      is available.  Objects which are returned in this way are removed
  1665.      from the guardian.
  1666.  
  1667.      You can put a single object into a guardian more than once and you
  1668.      can put a single object into more than one guardian.  The object
  1669.      will then be returned multiple times by the guardian procedures.
  1670.  
  1671.      An object is eligible to be returned from a guardian when it is no
  1672.      longer referenced from outside any guardian.
  1673.  
  1674.      There is no guarantee about the order in which objects are returned
  1675.      from a guardian.  If you want to impose an order on finalization
  1676.      actions, for example, you can do that by keeping objects alive in
  1677.      some global data structure until they are no longer needed for
  1678.      finalizing other objects.
  1679.  
  1680.      Being an element in a weak vector, a key in a hash table with weak
  1681.      keys, or a value in a hash table with weak value does not prevent
  1682.      an object from being returned by a guardian.  But as long as an
  1683.      object can be returned from a guardian it will not be removed from
  1684.      such a weak vector or hash table.  In other words, a weak link
  1685.      does not prevent an object from being considered collectable, but
  1686.      being inside a guardian prevents a weak link from being broken.
  1687.  
  1688.      A key in a weak key hash table can be though of as having a strong
  1689.      reference to its associated value as long as the key is accessible.
  1690.      Consequently, when the key only accessible from within a guardian,
  1691.      the reference from the key to the value is also considered to be
  1692.      coming from within a guardian.  Thus, if there is no other
  1693.      reference to the value, it is eligible to be returned from a
  1694.      guardian.
  1695.  
  1696.  
  1697.     hashq
  1698.  
  1699.  -- Scheme Procedure: hashq key size
  1700.      Determine a hash value for KEY that is suitable for lookups in a
  1701.      hashtable of size SIZE, where `eq?' is used as the equality
  1702.      predicate.  The function returns an integer in the range 0 to SIZE
  1703.      - 1.  Note that `hashq' may use internal addresses.  Thus two
  1704.      calls to hashq where the keys are `eq?' are not guaranteed to
  1705.      deliver the same value if the key object gets garbage collected in
  1706.      between.  This can happen, for example with symbols: `(hashq 'foo
  1707.      n) (gc) (hashq 'foo n)' may produce two different values, since
  1708.      `foo' will be garbage collected.
  1709.  
  1710.     hashv
  1711.  
  1712.  -- Scheme Procedure: hashv key size
  1713.      Determine a hash value for KEY that is suitable for lookups in a
  1714.      hashtable of size SIZE, where `eqv?' is used as the equality
  1715.      predicate.  The function returns an integer in the range 0 to SIZE
  1716.      - 1.  Note that `(hashv key)' may use internal addresses.  Thus
  1717.      two calls to hashv where the keys are `eqv?' are not guaranteed to
  1718.      deliver the same value if the key object gets garbage collected in
  1719.      between.  This can happen, for example with symbols: `(hashv 'foo
  1720.      n) (gc) (hashv 'foo n)' may produce two different values, since
  1721.      `foo' will be garbage collected.
  1722.  
  1723.     hash
  1724.  
  1725.  -- Scheme Procedure: hash key size
  1726.      Determine a hash value for KEY that is suitable for lookups in a
  1727.      hashtable of size SIZE, where `equal?' is used as the equality
  1728.      predicate.  The function returns an integer in the range 0 to SIZE
  1729.      - 1.
  1730.  
  1731.     make-hash-table
  1732.  
  1733.  -- Scheme Procedure: make-hash-table [n]
  1734.      Make a new abstract hash table object with minimum number of
  1735.      buckets N
  1736.  
  1737.  
  1738.     make-weak-key-hash-table
  1739.  
  1740.  -- Scheme Procedure: make-weak-key-hash-table [n]
  1741.  -- Scheme Procedure: make-weak-value-hash-table size
  1742.  -- Scheme Procedure: make-doubly-weak-hash-table size
  1743.      Return a weak hash table with SIZE buckets.
  1744.  
  1745.      You can modify weak hash tables in exactly the same way you would
  1746.      modify regular hash tables. (*note Hash Tables::)
  1747.  
  1748.     make-weak-value-hash-table
  1749.  
  1750.  -- Scheme Procedure: make-weak-value-hash-table [n]
  1751.      Return a hash table with weak values with SIZE buckets.  (*note
  1752.      Hash Tables::)
  1753.  
  1754.     make-doubly-weak-hash-table
  1755.  
  1756.  -- Scheme Procedure: make-doubly-weak-hash-table n
  1757.      Return a hash table with weak keys and values with SIZE buckets.
  1758.      (*note Hash Tables::)
  1759.  
  1760.     hash-table?
  1761.  
  1762.  -- Scheme Procedure: hash-table? obj
  1763.      Return `#t' if OBJ is an abstract hash table object.
  1764.  
  1765.     weak-key-hash-table?
  1766.  
  1767.  -- Scheme Procedure: weak-key-hash-table? obj
  1768.  -- Scheme Procedure: weak-value-hash-table? obj
  1769.  -- Scheme Procedure: doubly-weak-hash-table? obj
  1770.      Return `#t' if OBJ is the specified weak hash table. Note that a
  1771.      doubly weak hash table is neither a weak key nor a weak value hash
  1772.      table.
  1773.  
  1774.     weak-value-hash-table?
  1775.  
  1776.  -- Scheme Procedure: weak-value-hash-table? obj
  1777.      Return `#t' if OBJ is a weak value hash table.
  1778.  
  1779.     doubly-weak-hash-table?
  1780.  
  1781.  -- Scheme Procedure: doubly-weak-hash-table? obj
  1782.      Return `#t' if OBJ is a doubly weak hash table.
  1783.  
  1784.     hash-clear!
  1785.  
  1786.  -- Scheme Procedure: hash-clear! table
  1787.      Remove all items from TABLE (without triggering a resize).
  1788.  
  1789.     hashq-get-handle
  1790.  
  1791.  -- Scheme Procedure: hashq-get-handle table key
  1792.      This procedure returns the `(key . value)' pair from the hash
  1793.      table TABLE.  If TABLE does not hold an associated value for KEY,
  1794.      `#f' is returned.  Uses `eq?' for equality testing.
  1795.  
  1796.     hashq-create-handle!
  1797.  
  1798.  -- Scheme Procedure: hashq-create-handle! table key init
  1799.      This function looks up KEY in TABLE and returns its handle.  If
  1800.      KEY is not already present, a new handle is created which
  1801.      associates KEY with INIT.
  1802.  
  1803.     hashq-ref
  1804.  
  1805.  -- Scheme Procedure: hashq-ref table key [dflt]
  1806.      Look up KEY in the hash table TABLE, and return the value (if any)
  1807.      associated with it.  If KEY is not found, return DEFAULT (or `#f'
  1808.      if no DEFAULT argument is supplied).  Uses `eq?' for equality
  1809.      testing.
  1810.  
  1811.     hashq-set!
  1812.  
  1813.  -- Scheme Procedure: hashq-set! table key val
  1814.      Find the entry in TABLE associated with KEY, and store VALUE
  1815.      there. Uses `eq?' for equality testing.
  1816.  
  1817.     hashq-remove!
  1818.  
  1819.  -- Scheme Procedure: hashq-remove! table key
  1820.      Remove KEY (and any value associated with it) from TABLE.  Uses
  1821.      `eq?' for equality tests.
  1822.  
  1823.     hashv-get-handle
  1824.  
  1825.  -- Scheme Procedure: hashv-get-handle table key
  1826.      This procedure returns the `(key . value)' pair from the hash
  1827.      table TABLE.  If TABLE does not hold an associated value for KEY,
  1828.      `#f' is returned.  Uses `eqv?' for equality testing.
  1829.  
  1830.     hashv-create-handle!
  1831.  
  1832.  -- Scheme Procedure: hashv-create-handle! table key init
  1833.      This function looks up KEY in TABLE and returns its handle.  If
  1834.      KEY is not already present, a new handle is created which
  1835.      associates KEY with INIT.
  1836.  
  1837.     hashv-ref
  1838.  
  1839.  -- Scheme Procedure: hashv-ref table key [dflt]
  1840.      Look up KEY in the hash table TABLE, and return the value (if any)
  1841.      associated with it.  If KEY is not found, return DEFAULT (or `#f'
  1842.      if no DEFAULT argument is supplied).  Uses `eqv?' for equality
  1843.      testing.
  1844.  
  1845.     hashv-set!
  1846.  
  1847.  -- Scheme Procedure: hashv-set! table key val
  1848.      Find the entry in TABLE associated with KEY, and store VALUE
  1849.      there. Uses `eqv?' for equality testing.
  1850.  
  1851.     hashv-remove!
  1852.  
  1853.  -- Scheme Procedure: hashv-remove! table key
  1854.      Remove KEY (and any value associated with it) from TABLE.  Uses
  1855.      `eqv?' for equality tests.
  1856.  
  1857.     hash-get-handle
  1858.  
  1859.  -- Scheme Procedure: hash-get-handle table key
  1860.      This procedure returns the `(key . value)' pair from the hash
  1861.      table TABLE.  If TABLE does not hold an associated value for KEY,
  1862.      `#f' is returned.  Uses `equal?' for equality testing.
  1863.  
  1864.     hash-create-handle!
  1865.  
  1866.  -- Scheme Procedure: hash-create-handle! table key init
  1867.      This function looks up KEY in TABLE and returns its handle.  If
  1868.      KEY is not already present, a new handle is created which
  1869.      associates KEY with INIT.
  1870.  
  1871.     hash-ref
  1872.  
  1873.  -- Scheme Procedure: hash-ref table key [dflt]
  1874.      Look up KEY in the hash table TABLE, and return the value (if any)
  1875.      associated with it.  If KEY is not found, return DEFAULT (or `#f'
  1876.      if no DEFAULT argument is supplied).  Uses `equal?' for equality
  1877.      testing.
  1878.  
  1879.     hash-set!
  1880.  
  1881.  -- Scheme Procedure: hash-set! table key val
  1882.      Find the entry in TABLE associated with KEY, and store VALUE
  1883.      there. Uses `equal?' for equality testing.
  1884.  
  1885.     hash-remove!
  1886.  
  1887.  -- Scheme Procedure: hash-remove! table key
  1888.      Remove KEY (and any value associated with it) from TABLE.  Uses
  1889.      `equal?' for equality tests.
  1890.  
  1891.     hashx-get-handle
  1892.  
  1893.  -- Scheme Procedure: hashx-get-handle hash assoc table key
  1894.      This behaves the same way as the corresponding `-get-handle'
  1895.      function, but uses HASH as a hash function and ASSOC to compare
  1896.      keys.  `hash' must be a function that takes two arguments, a key
  1897.      to be hashed and a table size.  `assoc' must be an associator
  1898.      function, like `assoc', `assq' or `assv'.
  1899.  
  1900.     hashx-create-handle!
  1901.  
  1902.  -- Scheme Procedure: hashx-create-handle! hash assoc table key init
  1903.      This behaves the same way as the corresponding `-create-handle'
  1904.      function, but uses HASH as a hash function and ASSOC to compare
  1905.      keys.  `hash' must be a function that takes two arguments, a key
  1906.      to be hashed and a table size.  `assoc' must be an associator
  1907.      function, like `assoc', `assq' or `assv'.
  1908.  
  1909.     hashx-ref
  1910.  
  1911.  -- Scheme Procedure: hashx-ref hash assoc table key [dflt]
  1912.      This behaves the same way as the corresponding `ref' function, but
  1913.      uses HASH as a hash function and ASSOC to compare keys.  `hash'
  1914.      must be a function that takes two arguments, a key to be hashed
  1915.      and a table size.  `assoc' must be an associator function, like
  1916.      `assoc', `assq' or `assv'.
  1917.  
  1918.      By way of illustration, `hashq-ref table key' is equivalent to
  1919.      `hashx-ref hashq assq table key'.
  1920.  
  1921.     hashx-set!
  1922.  
  1923.  -- Scheme Procedure: hashx-set! hash assoc table key val
  1924.      This behaves the same way as the corresponding `set!' function,
  1925.      but uses HASH as a hash function and ASSOC to compare keys.
  1926.      `hash' must be a function that takes two arguments, a key to be
  1927.      hashed and a table size.  `assoc' must be an associator function,
  1928.      like `assoc', `assq' or `assv'.
  1929.  
  1930.      By way of illustration, `hashq-set! table key' is equivalent to
  1931.      `hashx-set!  hashq assq table key'.
  1932.  
  1933.     hashx-remove!
  1934.  
  1935.  -- Scheme Procedure: hashx-remove! hash assoc table obj
  1936.      This behaves the same way as the corresponding `remove!' function,
  1937.      but uses HASH as a hash function and ASSOC to compare keys.
  1938.      `hash' must be a function that takes two arguments, a key to be
  1939.      hashed and a table size.  `assoc' must be an associator function,
  1940.      like `assoc', `assq' or `assv'.
  1941.  
  1942.      By way of illustration, `hashq-remove! table key' is equivalent to
  1943.      `hashx-remove!  hashq assq #f table key'.
  1944.  
  1945.     hash-fold
  1946.  
  1947.  -- Scheme Procedure: hash-fold proc init table
  1948.      An iterator over hash-table elements.  Accumulates and returns a
  1949.      result by applying PROC successively.  The arguments to PROC are
  1950.      "(key value prior-result)" where key and value are successive
  1951.      pairs from the hash table TABLE, and prior-result is either INIT
  1952.      (for the first application of PROC) or the return value of the
  1953.      previous application of PROC.  For example, `(hash-fold acons '()
  1954.      tab)' will convert a hash table into an a-list of key-value pairs.
  1955.  
  1956.     hash-for-each
  1957.  
  1958.  -- Scheme Procedure: hash-for-each proc table
  1959.      An iterator over hash-table elements.  Applies PROC successively
  1960.      on all hash table items.  The arguments to PROC are "(key value)"
  1961.      where key and value are successive pairs from the hash table TABLE.
  1962.  
  1963.     hash-for-each-handle
  1964.  
  1965.  -- Scheme Procedure: hash-for-each-handle proc table
  1966.      An iterator over hash-table elements.  Applies PROC successively
  1967.      on all hash table handles.
  1968.  
  1969.     hash-map->list
  1970.  
  1971.  -- Scheme Procedure: hash-map->list proc table
  1972.      An iterator over hash-table elements.  Accumulates and returns as
  1973.      a list the results of applying PROC successively.  The arguments
  1974.      to PROC are "(key value)" where key and value are successive pairs
  1975.      from the hash table TABLE.
  1976.  
  1977.     make-hook
  1978.  
  1979.  -- Scheme Procedure: make-hook [n_args]
  1980.      Create a hook for storing procedure of arity N_ARGS.  N_ARGS
  1981.      defaults to zero.  The returned value is a hook object to be used
  1982.      with the other hook procedures.
  1983.  
  1984.     hook?
  1985.  
  1986.  -- Scheme Procedure: hook? x
  1987.      Return `#t' if X is a hook, `#f' otherwise.
  1988.  
  1989.     hook-empty?
  1990.  
  1991.  -- Scheme Procedure: hook-empty? hook
  1992.      Return `#t' if HOOK is an empty hook, `#f' otherwise.
  1993.  
  1994.     add-hook!
  1995.  
  1996.  -- Scheme Procedure: add-hook! hook proc [append_p]
  1997.      Add the procedure PROC to the hook HOOK. The procedure is added to
  1998.      the end if APPEND_P is true, otherwise it is added to the front.
  1999.      The return value of this procedure is not specified.
  2000.  
  2001.     remove-hook!
  2002.  
  2003.  -- Scheme Procedure: remove-hook! hook proc
  2004.      Remove the procedure PROC from the hook HOOK.  The return value of
  2005.      this procedure is not specified.
  2006.  
  2007.     reset-hook!
  2008.  
  2009.  -- Scheme Procedure: reset-hook! hook
  2010.      Remove all procedures from the hook HOOK.  The return value of
  2011.      this procedure is not specified.
  2012.  
  2013.     run-hook
  2014.  
  2015.  -- Scheme Procedure: run-hook hook . args
  2016.      Apply all procedures from the hook HOOK to the arguments ARGS.
  2017.      The order of the procedure application is first to last.  The
  2018.      return value of this procedure is not specified.
  2019.  
  2020.     hook->list
  2021.  
  2022.  -- Scheme Procedure: hook->list hook
  2023.      Convert the procedure list of HOOK to a list.
  2024.  
  2025.     gettext
  2026.  
  2027.  -- Scheme Procedure: gettext msgid [domain [category]]
  2028.      Return the translation of MSGID in the message domain DOMAIN.
  2029.      DOMAIN is optional and defaults to the domain set through
  2030.      (textdomain).  CATEGORY is optional and defaults to LC_MESSAGES.
  2031.  
  2032.     ngettext
  2033.  
  2034.  -- Scheme Procedure: ngettext msgid msgid_plural n [domain [category]]
  2035.      Return the translation of MSGID/MSGID_PLURAL in the message domain
  2036.      DOMAIN, with the plural form being chosen appropriately for the
  2037.      number N.  DOMAIN is optional and defaults to the domain set
  2038.      through (textdomain). CATEGORY is optional and defaults to
  2039.      LC_MESSAGES.
  2040.  
  2041.     textdomain
  2042.  
  2043.  -- Scheme Procedure: textdomain [domainname]
  2044.      If optional parameter DOMAINNAME is supplied, set the textdomain.
  2045.      Return the textdomain.
  2046.  
  2047.     bindtextdomain
  2048.  
  2049.  -- Scheme Procedure: bindtextdomain domainname [directory]
  2050.      If optional parameter DIRECTORY is supplied, set message catalogs
  2051.      to directory DIRECTORY.  Return the directory bound to DOMAINNAME.
  2052.  
  2053.     bind-textdomain-codeset
  2054.  
  2055.  -- Scheme Procedure: bind-textdomain-codeset domainname [encoding]
  2056.      If optional parameter ENCODING is supplied, set encoding for
  2057.      message catalogs of DOMAINNAME.  Return the encoding of DOMAINNAME.
  2058.  
  2059.     ftell
  2060.  
  2061.  -- Scheme Procedure: ftell fd_port
  2062.      Return an integer representing the current position of FD/PORT,
  2063.      measured from the beginning.  Equivalent to:
  2064.  
  2065.           (seek port 0 SEEK_CUR)
  2066.  
  2067.     redirect-port
  2068.  
  2069.  -- Scheme Procedure: redirect-port old new
  2070.      This procedure takes two ports and duplicates the underlying file
  2071.      descriptor from OLD-PORT into NEW-PORT.  The current file
  2072.      descriptor in NEW-PORT will be closed.  After the redirection the
  2073.      two ports will share a file position and file status flags.
  2074.  
  2075.      The return value is unspecified.
  2076.  
  2077.      Unexpected behaviour can result if both ports are subsequently used
  2078.      and the original and/or duplicate ports are buffered.
  2079.  
  2080.      This procedure does not have any side effects on other ports or
  2081.      revealed counts.
  2082.  
  2083.     dup->fdes
  2084.  
  2085.  -- Scheme Procedure: dup->fdes fd_or_port [fd]
  2086.      Return a new integer file descriptor referring to the open file
  2087.      designated by FD_OR_PORT, which must be either an open file port
  2088.      or a file descriptor.
  2089.  
  2090.     dup2
  2091.  
  2092.  -- Scheme Procedure: dup2 oldfd newfd
  2093.      A simple wrapper for the `dup2' system call.  Copies the file
  2094.      descriptor OLDFD to descriptor number NEWFD, replacing the
  2095.      previous meaning of NEWFD.  Both OLDFD and NEWFD must be integers.
  2096.      Unlike for dup->fdes or primitive-move->fdes, no attempt is made
  2097.      to move away ports which are using NEWFD.  The return value is
  2098.      unspecified.
  2099.  
  2100.     fileno
  2101.  
  2102.  -- Scheme Procedure: fileno port
  2103.      Return the integer file descriptor underlying PORT.  Does not
  2104.      change its revealed count.
  2105.  
  2106.     isatty?
  2107.  
  2108.  -- Scheme Procedure: isatty? port
  2109.      Return `#t' if PORT is using a serial non-file device, otherwise
  2110.      `#f'.
  2111.  
  2112.     fdopen
  2113.  
  2114.  -- Scheme Procedure: fdopen fdes modes
  2115.      Return a new port based on the file descriptor FDES.  Modes are
  2116.      given by the string MODES.  The revealed count of the port is
  2117.      initialized to zero.  The modes string is the same as that
  2118.      accepted by *note open-file: File Ports.
  2119.  
  2120.     primitive-move->fdes
  2121.  
  2122.  -- Scheme Procedure: primitive-move->fdes port fd
  2123.      Moves the underlying file descriptor for PORT to the integer value
  2124.      FDES without changing the revealed count of PORT.  Any other ports
  2125.      already using this descriptor will be automatically shifted to new
  2126.      descriptors and their revealed counts reset to zero.  The return
  2127.      value is `#f' if the file descriptor already had the required
  2128.      value or `#t' if it was moved.
  2129.  
  2130.     fdes->ports
  2131.  
  2132.  -- Scheme Procedure: fdes->ports fd
  2133.      Return a list of existing ports which have FDES as an underlying
  2134.      file descriptor, without changing their revealed counts.
  2135.  
  2136.     keyword?
  2137.  
  2138.  -- Scheme Procedure: keyword? obj
  2139.      Return `#t' if the argument OBJ is a keyword, else `#f'.
  2140.  
  2141.     symbol->keyword
  2142.  
  2143.  -- Scheme Procedure: symbol->keyword symbol
  2144.      Return the keyword with the same name as SYMBOL.
  2145.  
  2146.     keyword->symbol
  2147.  
  2148.  -- Scheme Procedure: keyword->symbol keyword
  2149.      Return the symbol with the same name as KEYWORD.
  2150.  
  2151.     make-list
  2152.  
  2153.  -- Scheme Procedure: make-list n [init]
  2154.      Create a list containing of N elements, where each element is
  2155.      initialized to INIT.  INIT defaults to the empty list `()' if not
  2156.      given.
  2157.  
  2158.     cons*
  2159.  
  2160.  -- Scheme Procedure: cons* arg . rest
  2161.      Like `list', but the last arg provides the tail of the constructed
  2162.      list, returning `(cons ARG1 (cons ARG2 (cons ... ARGN)))'.
  2163.      Requires at least one argument.  If given one argument, that
  2164.      argument is returned as result.  This function is called `list*'
  2165.      in some other Schemes and in Common LISP.
  2166.  
  2167.     null?
  2168.  
  2169.  -- Scheme Procedure: null? x
  2170.      Return `#t' iff X is the empty list, else `#f'.
  2171.  
  2172.     list?
  2173.  
  2174.  -- Scheme Procedure: list? x
  2175.      Return `#t' iff X is a proper list, else `#f'.
  2176.  
  2177.     length
  2178.  
  2179.  -- Scheme Procedure: length lst
  2180.      Return the number of elements in list LST.
  2181.  
  2182.     append
  2183.  
  2184.  -- Scheme Procedure: append . args
  2185.      Return a list consisting of the elements the lists passed as
  2186.      arguments.
  2187.           (append '(x) '(y))          =>  (x y)
  2188.           (append '(a) '(b c d))      =>  (a b c d)
  2189.           (append '(a (b)) '((c)))    =>  (a (b) (c))
  2190.      The resulting list is always newly allocated, except that it
  2191.      shares structure with the last list argument.  The last argument
  2192.      may actually be any object; an improper list results if the last
  2193.      argument is not a proper list.
  2194.           (append '(a b) '(c . d))    =>  (a b c . d)
  2195.           (append '() 'a)             =>  a
  2196.  
  2197.     append!
  2198.  
  2199.  -- Scheme Procedure: append! . lists
  2200.      A destructive version of `append' (*note Pairs and Lists:
  2201.      (r5rs)Pairs and Lists.).  The cdr field of each list's final pair
  2202.      is changed to point to the head of the next list, so no consing is
  2203.      performed.  Return the mutated list.
  2204.  
  2205.     last-pair
  2206.  
  2207.  -- Scheme Procedure: last-pair lst
  2208.      Return the last pair in LST, signalling an error if LST is
  2209.      circular.
  2210.  
  2211.     reverse
  2212.  
  2213.  -- Scheme Procedure: reverse lst
  2214.      Return a new list that contains the elements of LST but in reverse
  2215.      order.
  2216.  
  2217.     reverse!
  2218.  
  2219.  -- Scheme Procedure: reverse! lst [new_tail]
  2220.      A destructive version of `reverse' (*note Pairs and Lists:
  2221.      (r5rs)Pairs and Lists.).  The cdr of each cell in LST is modified
  2222.      to point to the previous list element.  Return the reversed list.
  2223.  
  2224.      Caveat: because the list is modified in place, the tail of the
  2225.      original list now becomes its head, and the head of the original
  2226.      list now becomes the tail.  Therefore, the LST symbol to which the
  2227.      head of the original list was bound now points to the tail.  To
  2228.      ensure that the head of the modified list is not lost, it is wise
  2229.      to save the return value of `reverse!'
  2230.  
  2231.     list-ref
  2232.  
  2233.  -- Scheme Procedure: list-ref list k
  2234.      Return the Kth element from LIST.
  2235.  
  2236.     list-set!
  2237.  
  2238.  -- Scheme Procedure: list-set! list k val
  2239.      Set the Kth element of LIST to VAL.
  2240.  
  2241.     list-cdr-ref
  2242.  
  2243.  -- Scheme Procedure: list-cdr-ref
  2244.      implemented by the C function "scm_list_tail"
  2245.  
  2246.     list-tail
  2247.  
  2248.  -- Scheme Procedure: list-tail lst k
  2249.  -- Scheme Procedure: list-cdr-ref lst k
  2250.      Return the "tail" of LST beginning with its Kth element.  The
  2251.      first element of the list is considered to be element 0.
  2252.  
  2253.      `list-tail' and `list-cdr-ref' are identical.  It may help to
  2254.      think of `list-cdr-ref' as accessing the Kth cdr of the list, or
  2255.      returning the results of cdring K times down LST.
  2256.  
  2257.     list-cdr-set!
  2258.  
  2259.  -- Scheme Procedure: list-cdr-set! list k val
  2260.      Set the Kth cdr of LIST to VAL.
  2261.  
  2262.     list-head
  2263.  
  2264.  -- Scheme Procedure: list-head lst k
  2265.      Copy the first K elements from LST into a new list, and return it.
  2266.  
  2267.     list-copy
  2268.  
  2269.  -- Scheme Procedure: list-copy lst
  2270.      Return a (newly-created) copy of LST.
  2271.  
  2272.     list
  2273.  
  2274.  -- Scheme Procedure: list . objs
  2275.      Return a list containing OBJS, the arguments to `list'.
  2276.  
  2277.     memq
  2278.  
  2279.  -- Scheme Procedure: memq x lst
  2280.      Return the first sublist of LST whose car is `eq?' to X where the
  2281.      sublists of LST are the non-empty lists returned by `(list-tail
  2282.      LST K)' for K less than the length of LST.  If X does not occur in
  2283.      LST, then `#f' (not the empty list) is returned.
  2284.  
  2285.     memv
  2286.  
  2287.  -- Scheme Procedure: memv x lst
  2288.      Return the first sublist of LST whose car is `eqv?' to X where the
  2289.      sublists of LST are the non-empty lists returned by `(list-tail
  2290.      LST K)' for K less than the length of LST.  If X does not occur in
  2291.      LST, then `#f' (not the empty list) is returned.
  2292.  
  2293.     member
  2294.  
  2295.  -- Scheme Procedure: member x lst
  2296.      Return the first sublist of LST whose car is `equal?' to X where
  2297.      the sublists of LST are the non-empty lists returned by
  2298.      `(list-tail LST K)' for K less than the length of LST.  If X does
  2299.      not occur in LST, then `#f' (not the empty list) is returned.
  2300.  
  2301.     delq!
  2302.  
  2303.  -- Scheme Procedure: delq! item lst
  2304.  -- Scheme Procedure: delv! item lst
  2305.  -- Scheme Procedure: delete! item lst
  2306.      These procedures are destructive versions of `delq', `delv' and
  2307.      `delete': they modify the existing LST rather than creating a new
  2308.      list.  Caveat evaluator: Like other destructive list functions,
  2309.      these functions cannot modify the binding of LST, and so cannot be
  2310.      used to delete the first element of LST destructively.
  2311.  
  2312.     delv!
  2313.  
  2314.  -- Scheme Procedure: delv! item lst
  2315.      Destructively remove all elements from LST that are `eqv?' to ITEM.
  2316.  
  2317.     delete!
  2318.  
  2319.  -- Scheme Procedure: delete! item lst
  2320.      Destructively remove all elements from LST that are `equal?' to
  2321.      ITEM.
  2322.  
  2323.     delq
  2324.  
  2325.  -- Scheme Procedure: delq item lst
  2326.      Return a newly-created copy of LST with elements `eq?' to ITEM
  2327.      removed.  This procedure mirrors `memq': `delq' compares elements
  2328.      of LST against ITEM with `eq?'.
  2329.  
  2330.     delv
  2331.  
  2332.  -- Scheme Procedure: delv item lst
  2333.      Return a newly-created copy of LST with elements `eqv?'  to ITEM
  2334.      removed.  This procedure mirrors `memv': `delv' compares elements
  2335.      of LST against ITEM with `eqv?'.
  2336.  
  2337.     delete
  2338.  
  2339.  -- Scheme Procedure: delete item lst
  2340.      Return a newly-created copy of LST with elements `equal?'  to ITEM
  2341.      removed.  This procedure mirrors `member': `delete' compares
  2342.      elements of LST against ITEM with `equal?'.
  2343.  
  2344.     delq1!
  2345.  
  2346.  -- Scheme Procedure: delq1! item lst
  2347.      Like `delq!', but only deletes the first occurrence of ITEM from
  2348.      LST.  Tests for equality using `eq?'.  See also `delv1!' and
  2349.      `delete1!'.
  2350.  
  2351.     delv1!
  2352.  
  2353.  -- Scheme Procedure: delv1! item lst
  2354.      Like `delv!', but only deletes the first occurrence of ITEM from
  2355.      LST.  Tests for equality using `eqv?'.  See also `delq1!' and
  2356.      `delete1!'.
  2357.  
  2358.     delete1!
  2359.  
  2360.  -- Scheme Procedure: delete1! item lst
  2361.      Like `delete!', but only deletes the first occurrence of ITEM from
  2362.      LST.  Tests for equality using `equal?'.  See also `delq1!' and
  2363.      `delv1!'.
  2364.  
  2365.     filter
  2366.  
  2367.  -- Scheme Procedure: filter pred list
  2368.      Return all the elements of 2nd arg LIST that satisfy predicate
  2369.      PRED.  The list is not disordered - elements that appear in the
  2370.      result list occur in the same order as they occur in the argument
  2371.      list. The returned list may share a common tail with the argument
  2372.      list. The dynamic order in which the various applications of pred
  2373.      are made is not specified.
  2374.  
  2375.           (filter even? '(0 7 8 8 43 -4)) => (0 8 8 -4)
  2376.  
  2377.     filter!
  2378.  
  2379.  -- Scheme Procedure: filter! pred list
  2380.      Linear-update variant of `filter'.
  2381.  
  2382.     primitive-load
  2383.  
  2384.  -- Scheme Procedure: primitive-load filename
  2385.      Load the file named FILENAME and evaluate its contents in the
  2386.      top-level environment. The load paths are not searched; FILENAME
  2387.      must either be a full pathname or be a pathname relative to the
  2388.      current directory.  If the  variable `%load-hook' is defined, it
  2389.      should be bound to a procedure that will be called before any code
  2390.      is loaded.  See the documentation for `%load-hook' later in this
  2391.      section.
  2392.  
  2393.     %package-data-dir
  2394.  
  2395.  -- Scheme Procedure: %package-data-dir
  2396.      Return the name of the directory where Scheme packages, modules and
  2397.      libraries are kept.  On most Unix systems, this will be
  2398.      `/usr/local/share/guile'.
  2399.  
  2400.     %library-dir
  2401.  
  2402.  -- Scheme Procedure: %library-dir
  2403.      Return the directory where the Guile Scheme library files are
  2404.      installed.  E.g., may return "/usr/share/guile/1.3.5".
  2405.  
  2406.     %site-dir
  2407.  
  2408.  -- Scheme Procedure: %site-dir
  2409.      Return the directory where the Guile site files are installed.
  2410.      E.g., may return "/usr/share/guile/site".
  2411.  
  2412.     parse-path
  2413.  
  2414.  -- Scheme Procedure: parse-path path [tail]
  2415.      Parse PATH, which is expected to be a colon-separated string, into
  2416.      a list and return the resulting list with TAIL appended. If PATH
  2417.      is `#f', TAIL is returned.
  2418.  
  2419.     search-path
  2420.  
  2421.  -- Scheme Procedure: search-path path filename [extensions]
  2422.      Search PATH for a directory containing a file named FILENAME. The
  2423.      file must be readable, and not a directory.  If we find one,
  2424.      return its full filename; otherwise, return `#f'.  If FILENAME is
  2425.      absolute, return it unchanged.  If given, EXTENSIONS is a list of
  2426.      strings; for each directory in PATH, we search for FILENAME
  2427.      concatenated with each EXTENSION.
  2428.  
  2429.     %search-load-path
  2430.  
  2431.  -- Scheme Procedure: %search-load-path filename
  2432.      Search %LOAD-PATH for the file named FILENAME, which must be
  2433.      readable by the current user.  If FILENAME is found in the list of
  2434.      paths to search or is an absolute pathname, return its full
  2435.      pathname.  Otherwise, return `#f'.  Filenames may have any of the
  2436.      optional extensions in the `%load-extensions' list;
  2437.      `%search-load-path' will try each extension automatically.
  2438.  
  2439.     primitive-load-path
  2440.  
  2441.  -- Scheme Procedure: primitive-load-path filename
  2442.      Search %LOAD-PATH for the file named FILENAME and load it into the
  2443.      top-level environment.  If FILENAME is a relative pathname and is
  2444.      not found in the list of search paths, an error is signalled.
  2445.  
  2446.     procedure->memoizing-macro
  2447.  
  2448.  -- Scheme Procedure: procedure->memoizing-macro code
  2449.      Return a "macro" which, when a symbol defined to this value
  2450.      appears as the first symbol in an expression, evaluates the result
  2451.      of applying CODE to the expression and the environment.
  2452.  
  2453.      `procedure->memoizing-macro' is the same as `procedure->macro',
  2454.      except that the expression returned by CODE replaces the original
  2455.      macro expression in the memoized form of the containing code.
  2456.  
  2457.     procedure->syntax
  2458.  
  2459.  -- Scheme Procedure: procedure->syntax code
  2460.      Return a "macro" which, when a symbol defined to this value
  2461.      appears as the first symbol in an expression, returns the result
  2462.      of applying CODE to the expression and the environment.
  2463.  
  2464.     procedure->macro
  2465.  
  2466.  -- Scheme Procedure: procedure->macro code
  2467.      Return a "macro" which, when a symbol defined to this value
  2468.      appears as the first symbol in an expression, evaluates the result
  2469.      of applying CODE to the expression and the environment.  For
  2470.      example:
  2471.  
  2472.           (define trace
  2473.             (procedure->macro
  2474.              (lambda (x env) `(set! ,(cadr x) (tracef ,(cadr x) ',(cadr x))))))
  2475.  
  2476.           (trace foo) == (set! foo (tracef foo 'foo)).
  2477.  
  2478.     macro?
  2479.  
  2480.  -- Scheme Procedure: macro? obj
  2481.      Return `#t' if OBJ is a regular macro, a memoizing macro or a
  2482.      syntax transformer.
  2483.  
  2484.     macro-type
  2485.  
  2486.  -- Scheme Procedure: macro-type m
  2487.      Return one of the symbols `syntax', `macro' or `macro!', depending
  2488.      on whether M is a syntax transformer, a regular macro, or a
  2489.      memoizing macro, respectively.  If M is not a macro, `#f' is
  2490.      returned.
  2491.  
  2492.     macro-name
  2493.  
  2494.  -- Scheme Procedure: macro-name m
  2495.      Return the name of the macro M.
  2496.  
  2497.     macro-transformer
  2498.  
  2499.  -- Scheme Procedure: macro-transformer m
  2500.      Return the transformer of the macro M.
  2501.  
  2502.     current-module
  2503.  
  2504.  -- Scheme Procedure: current-module
  2505.      Return the current module.
  2506.  
  2507.     set-current-module
  2508.  
  2509.  -- Scheme Procedure: set-current-module module
  2510.      Set the current module to MODULE and return the previous current
  2511.      module.
  2512.  
  2513.     interaction-environment
  2514.  
  2515.  -- Scheme Procedure: interaction-environment
  2516.      Return a specifier for the environment that contains
  2517.      implementation-defined bindings, typically a superset of those
  2518.      listed in the report.  The intent is that this procedure will
  2519.      return the environment in which the implementation would evaluate
  2520.      expressions dynamically typed by the user.
  2521.  
  2522.     env-module
  2523.  
  2524.  -- Scheme Procedure: env-module env
  2525.      Return the module of ENV, a lexical environment.
  2526.  
  2527.     standard-eval-closure
  2528.  
  2529.  -- Scheme Procedure: standard-eval-closure module
  2530.      Return an eval closure for the module MODULE.
  2531.  
  2532.     standard-interface-eval-closure
  2533.  
  2534.  -- Scheme Procedure: standard-interface-eval-closure module
  2535.      Return a interface eval closure for the module MODULE. Such a
  2536.      closure does not allow new bindings to be added.
  2537.  
  2538.     module-import-interface
  2539.  
  2540.  -- Scheme Procedure: module-import-interface module sym
  2541.  
  2542.     %get-pre-modules-obarray
  2543.  
  2544.  -- Scheme Procedure: %get-pre-modules-obarray
  2545.      Return the obarray that is used for all new bindings before the
  2546.      module system is booted.  The first call to `set-current-module'
  2547.      will boot the module system.
  2548.  
  2549.     exact?
  2550.  
  2551.  -- Scheme Procedure: exact? x
  2552.      Return `#t' if X is an exact number, `#f' otherwise.
  2553.  
  2554.     odd?
  2555.  
  2556.  -- Scheme Procedure: odd? n
  2557.      Return `#t' if N is an odd number, `#f' otherwise.
  2558.  
  2559.     even?
  2560.  
  2561.  -- Scheme Procedure: even? n
  2562.      Return `#t' if N is an even number, `#f' otherwise.
  2563.  
  2564.     inf?
  2565.  
  2566.  -- Scheme Procedure: inf? x
  2567.      Return `#t' if X is either `+inf.0' or `-inf.0', `#f' otherwise.
  2568.  
  2569.     nan?
  2570.  
  2571.  -- Scheme Procedure: nan? n
  2572.      Return `#t' if N is a NaN, `#f' otherwise.
  2573.  
  2574.     inf
  2575.  
  2576.  -- Scheme Procedure: inf
  2577.      Return Inf.
  2578.  
  2579.     nan
  2580.  
  2581.  -- Scheme Procedure: nan
  2582.      Return NaN.
  2583.  
  2584.     abs
  2585.  
  2586.  -- Scheme Procedure: abs x
  2587.      Return the absolute value of X.
  2588.  
  2589.     logand
  2590.  
  2591.  -- Scheme Procedure: logand n1 n2
  2592.      Return the bitwise AND of the integer arguments.
  2593.  
  2594.           (logand) => -1
  2595.           (logand 7) => 7
  2596.           (logand #b111 #b011 #b001) => 1
  2597.  
  2598.     logior
  2599.  
  2600.  -- Scheme Procedure: logior n1 n2
  2601.      Return the bitwise OR of the integer arguments.
  2602.  
  2603.           (logior) => 0
  2604.           (logior 7) => 7
  2605.           (logior #b000 #b001 #b011) => 3
  2606.  
  2607.     logxor
  2608.  
  2609.  -- Scheme Procedure: logxor n1 n2
  2610.      Return the bitwise XOR of the integer arguments.  A bit is set in
  2611.      the result if it is set in an odd number of arguments.
  2612.           (logxor) => 0
  2613.           (logxor 7) => 7
  2614.           (logxor #b000 #b001 #b011) => 2
  2615.           (logxor #b000 #b001 #b011 #b011) => 1
  2616.  
  2617.     logtest
  2618.  
  2619.  -- Scheme Procedure: logtest j k
  2620.      Test whether J and K have any 1 bits in common.  This is
  2621.      equivalent to `(not (zero? (logand j k)))', but without actually
  2622.      calculating the `logand', just testing for non-zero.
  2623.  
  2624.           (logtest #b0100 #b1011) => #f
  2625.           (logtest #b0100 #b0111) => #t
  2626.  
  2627.     logbit?
  2628.  
  2629.  -- Scheme Procedure: logbit? index j
  2630.      Test whether bit number INDEX in J is set.  INDEX starts from 0
  2631.      for the least significant bit.
  2632.  
  2633.           (logbit? 0 #b1101) => #t
  2634.           (logbit? 1 #b1101) => #f
  2635.           (logbit? 2 #b1101) => #t
  2636.           (logbit? 3 #b1101) => #t
  2637.           (logbit? 4 #b1101) => #f
  2638.  
  2639.     lognot
  2640.  
  2641.  -- Scheme Procedure: lognot n
  2642.      Return the integer which is the ones-complement of the integer
  2643.      argument.
  2644.  
  2645.           (number->string (lognot #b10000000) 2)
  2646.              => "-10000001"
  2647.           (number->string (lognot #b0) 2)
  2648.              => "-1"
  2649.  
  2650.     modulo-expt
  2651.  
  2652.  -- Scheme Procedure: modulo-expt n k m
  2653.      Return N raised to the integer exponent K, modulo M.
  2654.  
  2655.           (modulo-expt 2 3 5)
  2656.              => 3
  2657.  
  2658.     integer-expt
  2659.  
  2660.  -- Scheme Procedure: integer-expt n k
  2661.      Return N raised to the power K.  K must be an exact integer, N can
  2662.      be any number.
  2663.  
  2664.      Negative K is supported, and results in 1/n^abs(k) in the usual
  2665.      way.  N^0 is 1, as usual, and that includes 0^0 is 1.
  2666.  
  2667.           (integer-expt 2 5)   => 32
  2668.           (integer-expt -3 3)  => -27
  2669.           (integer-expt 5 -3)  => 1/125
  2670.           (integer-expt 0 0)   => 1
  2671.  
  2672.     ash
  2673.  
  2674.  -- Scheme Procedure: ash n cnt
  2675.      Return N shifted left by CNT bits, or shifted right if CNT is
  2676.      negative.  This is an "arithmetic" shift.
  2677.  
  2678.      This is effectively a multiplication by 2^CNT, and when CNT is
  2679.      negative it's a division, rounded towards negative infinity.
  2680.      (Note that this is not the same rounding as `quotient' does.)
  2681.  
  2682.      With N viewed as an infinite precision twos complement, `ash'
  2683.      means a left shift introducing zero bits, or a right shift
  2684.      dropping bits.
  2685.  
  2686.           (number->string (ash #b1 3) 2)     => "1000"
  2687.           (number->string (ash #b1010 -1) 2) => "101"
  2688.  
  2689.           ;; -23 is bits ...11101001, -6 is bits ...111010
  2690.           (ash -23 -2) => -6
  2691.  
  2692.     bit-extract
  2693.  
  2694.  -- Scheme Procedure: bit-extract n start end
  2695.      Return the integer composed of the START (inclusive) through END
  2696.      (exclusive) bits of N.  The STARTth bit becomes the 0-th bit in
  2697.      the result.
  2698.  
  2699.           (number->string (bit-extract #b1101101010 0 4) 2)
  2700.              => "1010"
  2701.           (number->string (bit-extract #b1101101010 4 9) 2)
  2702.              => "10110"
  2703.  
  2704.     logcount
  2705.  
  2706.  -- Scheme Procedure: logcount n
  2707.      Return the number of bits in integer N.  If integer is positive,
  2708.      the 1-bits in its binary representation are counted.  If negative,
  2709.      the 0-bits in its two's-complement binary representation are
  2710.      counted.  If 0, 0 is returned.
  2711.  
  2712.           (logcount #b10101010)
  2713.              => 4
  2714.           (logcount 0)
  2715.              => 0
  2716.           (logcount -2)
  2717.              => 1
  2718.  
  2719.     integer-length
  2720.  
  2721.  -- Scheme Procedure: integer-length n
  2722.      Return the number of bits necessary to represent N.
  2723.  
  2724.           (integer-length #b10101010)
  2725.              => 8
  2726.           (integer-length 0)
  2727.              => 0
  2728.           (integer-length #b1111)
  2729.              => 4
  2730.  
  2731.     number->string
  2732.  
  2733.  -- Scheme Procedure: number->string n [radix]
  2734.      Return a string holding the external representation of the number
  2735.      N in the given RADIX.  If N is inexact, a radix of 10 will be used.
  2736.  
  2737.     string->number
  2738.  
  2739.  -- Scheme Procedure: string->number string [radix]
  2740.      Return a number of the maximally precise representation expressed
  2741.      by the given STRING. RADIX must be an exact integer, either 2, 8,
  2742.      10, or 16. If supplied, RADIX is a default radix that may be
  2743.      overridden by an explicit radix prefix in STRING (e.g. "#o177").
  2744.      If RADIX is not supplied, then the default radix is 10. If string
  2745.      is not a syntactically valid notation for a number, then
  2746.      `string->number' returns `#f'.
  2747.  
  2748.     number?
  2749.  
  2750.  -- Scheme Procedure: number? x
  2751.      Return `#t' if X is a number, `#f' otherwise.
  2752.  
  2753.     complex?
  2754.  
  2755.  -- Scheme Procedure: complex? x
  2756.      Return `#t' if X is a complex number, `#f' otherwise.  Note that
  2757.      the sets of real, rational and integer values form subsets of the
  2758.      set of complex numbers, i. e. the predicate will also be fulfilled
  2759.      if X is a real, rational or integer number.
  2760.  
  2761.     real?
  2762.  
  2763.  -- Scheme Procedure: real? x
  2764.      Return `#t' if X is a real number, `#f' otherwise.  Note that the
  2765.      set of integer values forms a subset of the set of real numbers,
  2766.      i. e. the predicate will also be fulfilled if X is an integer
  2767.      number.
  2768.  
  2769.     rational?
  2770.  
  2771.  -- Scheme Procedure: rational? x
  2772.      Return `#t' if X is a rational number, `#f' otherwise.  Note that
  2773.      the set of integer values forms a subset of the set of rational
  2774.      numbers, i. e. the predicate will also be fulfilled if X is an
  2775.      integer number.
  2776.  
  2777.     integer?
  2778.  
  2779.  -- Scheme Procedure: integer? x
  2780.      Return `#t' if X is an integer number, `#f' else.
  2781.  
  2782.     inexact?
  2783.  
  2784.  -- Scheme Procedure: inexact? x
  2785.      Return `#t' if X is an inexact number, `#f' else.
  2786.  
  2787.     1+
  2788.  
  2789.  -- Scheme Procedure: 1+ x
  2790.      Return X+1.
  2791.  
  2792.     1-
  2793.  
  2794.  -- Scheme Procedure: 1- x
  2795.      Return X-1.
  2796.  
  2797.     truncate
  2798.  
  2799.  -- Scheme Procedure: truncate x
  2800.      Round the number X towards zero.
  2801.  
  2802.     round
  2803.  
  2804.  -- Scheme Procedure: round x
  2805.      Round the number X towards the nearest integer. When it is exactly
  2806.      halfway between two integers, round towards the even one.
  2807.  
  2808.     floor
  2809.  
  2810.  -- Scheme Procedure: floor x
  2811.      Round the number X towards minus infinity.
  2812.  
  2813.     ceiling
  2814.  
  2815.  -- Scheme Procedure: ceiling x
  2816.      Round the number X towards infinity.
  2817.  
  2818.     $expt
  2819.  
  2820.  -- Scheme Procedure: $expt x y
  2821.      Return X raised to the power of Y. This procedure does not accept
  2822.      complex arguments.
  2823.  
  2824.     $atan2
  2825.  
  2826.  -- Scheme Procedure: $atan2 x y
  2827.      Return the arc tangent of the two arguments X and Y. This is
  2828.      similar to calculating the arc tangent of X / Y, except that the
  2829.      signs of both arguments are used to determine the quadrant of the
  2830.      result. This procedure does not accept complex arguments.
  2831.  
  2832.     make-rectangular
  2833.  
  2834.  -- Scheme Procedure: make-rectangular real_part imaginary_part
  2835.      Return a complex number constructed of the given REAL-PART and
  2836.      IMAGINARY-PART parts.
  2837.  
  2838.     make-polar
  2839.  
  2840.  -- Scheme Procedure: make-polar x y
  2841.      Return the complex number X * e^(i * Y).
  2842.  
  2843.     inexact->exact
  2844.  
  2845.  -- Scheme Procedure: inexact->exact z
  2846.      Return an exact number that is numerically closest to Z.
  2847.  
  2848.     rationalize
  2849.  
  2850.  -- Scheme Procedure: rationalize x err
  2851.      Return an exact number that is within ERR of X.
  2852.  
  2853.     log
  2854.  
  2855.  -- Scheme Procedure: log z
  2856.      Return the natural logarithm of Z.
  2857.  
  2858.     log10
  2859.  
  2860.  -- Scheme Procedure: log10 z
  2861.      Return the base 10 logarithm of Z.
  2862.  
  2863.     exp
  2864.  
  2865.  -- Scheme Procedure: exp z
  2866.      Return e to the power of Z, where e is the base of natural
  2867.      logarithms (2.71828...).
  2868.  
  2869.     sqrt
  2870.  
  2871.  -- Scheme Procedure: sqrt x
  2872.      Return the square root of Z.  Of the two possible roots (positive
  2873.      and negative), the one with the a positive real part is returned,
  2874.      or if that's zero then a positive imaginary part.  Thus,
  2875.  
  2876.           (sqrt 9.0)       => 3.0
  2877.           (sqrt -9.0)      => 0.0+3.0i
  2878.           (sqrt 1.0+1.0i)  => 1.09868411346781+0.455089860562227i
  2879.           (sqrt -1.0-1.0i) => 0.455089860562227-1.09868411346781i
  2880.  
  2881.     entity?
  2882.  
  2883.  -- Scheme Procedure: entity? obj
  2884.      Return `#t' if OBJ is an entity.
  2885.  
  2886.     operator?
  2887.  
  2888.  -- Scheme Procedure: operator? obj
  2889.      Return `#t' if OBJ is an operator.
  2890.  
  2891.     valid-object-procedure?
  2892.  
  2893.  -- Scheme Procedure: valid-object-procedure? proc
  2894.      Return `#t' iff PROC is a procedure that can be used with
  2895.      `set-object-procedure'.  It is always valid to use a closure
  2896.      constructed by `lambda'.
  2897.  
  2898.     set-object-procedure!
  2899.  
  2900.  -- Scheme Procedure: set-object-procedure! obj proc
  2901.      Set the object procedure of OBJ to PROC.  OBJ must be either an
  2902.      entity or an operator.
  2903.  
  2904.     make-class-object
  2905.  
  2906.  -- Scheme Procedure: make-class-object metaclass layout
  2907.      Create a new class object of class METACLASS, with the slot layout
  2908.      specified by LAYOUT.
  2909.  
  2910.     make-subclass-object
  2911.  
  2912.  -- Scheme Procedure: make-subclass-object class layout
  2913.      Create a subclass object of CLASS, with the slot layout specified
  2914.      by LAYOUT.
  2915.  
  2916.     object-properties
  2917.  
  2918.  -- Scheme Procedure: object-properties obj
  2919.      Return OBJ's property list.
  2920.  
  2921.     set-object-properties!
  2922.  
  2923.  -- Scheme Procedure: set-object-properties! obj alist
  2924.      Set OBJ's property list to ALIST.
  2925.  
  2926.     object-property
  2927.  
  2928.  -- Scheme Procedure: object-property obj key
  2929.      Return the property of OBJ with name KEY.
  2930.  
  2931.     set-object-property!
  2932.  
  2933.  -- Scheme Procedure: set-object-property! obj key value
  2934.      In OBJ's property list, set the property named KEY to VALUE.
  2935.  
  2936.     cons
  2937.  
  2938.  -- Scheme Procedure: cons x y
  2939.      Return a newly allocated pair whose car is X and whose cdr is Y.
  2940.      The pair is guaranteed to be different (in the sense of `eq?')
  2941.      from every previously existing object.
  2942.  
  2943.     pair?
  2944.  
  2945.  -- Scheme Procedure: pair? x
  2946.      Return `#t' if X is a pair; otherwise return `#f'.
  2947.  
  2948.     set-car!
  2949.  
  2950.  -- Scheme Procedure: set-car! pair value
  2951.      Stores VALUE in the car field of PAIR.  The value returned by
  2952.      `set-car!' is unspecified.
  2953.  
  2954.     set-cdr!
  2955.  
  2956.  -- Scheme Procedure: set-cdr! pair value
  2957.      Stores VALUE in the cdr field of PAIR.  The value returned by
  2958.      `set-cdr!' is unspecified.
  2959.  
  2960.     char-ready?
  2961.  
  2962.  -- Scheme Procedure: char-ready? [port]
  2963.      Return `#t' if a character is ready on input PORT and return `#f'
  2964.      otherwise.  If `char-ready?' returns `#t' then the next
  2965.      `read-char' operation on PORT is guaranteed not to hang.  If PORT
  2966.      is a file port at end of file then `char-ready?' returns `#t'.
  2967.  
  2968.      `char-ready?' exists to make it possible for a program to accept
  2969.      characters from interactive ports without getting stuck waiting
  2970.      for input.  Any input editors associated with such ports must make
  2971.      sure that characters whose existence has been asserted by
  2972.      `char-ready?' cannot be rubbed out.  If `char-ready?' were to
  2973.      return `#f' at end of file, a port at end of file would be
  2974.      indistinguishable from an interactive port that has no ready
  2975.      characters.
  2976.  
  2977.     drain-input
  2978.  
  2979.  -- Scheme Procedure: drain-input port
  2980.      This procedure clears a port's input buffers, similar to the way
  2981.      that force-output clears the output buffer.  The contents of the
  2982.      buffers are returned as a single string, e.g.,
  2983.  
  2984.           (define p (open-input-file ...))
  2985.           (drain-input p) => empty string, nothing buffered yet.
  2986.           (unread-char (read-char p) p)
  2987.           (drain-input p) => initial chars from p, up to the buffer size.
  2988.  
  2989.      Draining the buffers may be useful for cleanly finishing buffered
  2990.      I/O so that the file descriptor can be used directly for further
  2991.      input.
  2992.  
  2993.     current-input-port
  2994.  
  2995.  -- Scheme Procedure: current-input-port
  2996.      Return the current input port.  This is the default port used by
  2997.      many input procedures.  Initially, `current-input-port' returns
  2998.      the "standard input" in Unix and C terminology.
  2999.  
  3000.     current-output-port
  3001.  
  3002.  -- Scheme Procedure: current-output-port
  3003.      Return the current output port.  This is the default port used by
  3004.      many output procedures.  Initially, `current-output-port' returns
  3005.      the "standard output" in Unix and C terminology.
  3006.  
  3007.     current-error-port
  3008.  
  3009.  -- Scheme Procedure: current-error-port
  3010.      Return the port to which errors and warnings should be sent (the
  3011.      "standard error" in Unix and C terminology).
  3012.  
  3013.     current-load-port
  3014.  
  3015.  -- Scheme Procedure: current-load-port
  3016.      Return the current-load-port.  The load port is used internally by
  3017.      `primitive-load'.
  3018.  
  3019.     set-current-input-port
  3020.  
  3021.  -- Scheme Procedure: set-current-input-port port
  3022.  -- Scheme Procedure: set-current-output-port port
  3023.  -- Scheme Procedure: set-current-error-port port
  3024.      Change the ports returned by `current-input-port',
  3025.      `current-output-port' and `current-error-port', respectively, so
  3026.      that they use the supplied PORT for input or output.
  3027.  
  3028.     set-current-output-port
  3029.  
  3030.  -- Scheme Procedure: set-current-output-port port
  3031.      Set the current default output port to PORT.
  3032.  
  3033.     set-current-error-port
  3034.  
  3035.  -- Scheme Procedure: set-current-error-port port
  3036.      Set the current default error port to PORT.
  3037.  
  3038.     port-revealed
  3039.  
  3040.  -- Scheme Procedure: port-revealed port
  3041.      Return the revealed count for PORT.
  3042.  
  3043.     set-port-revealed!
  3044.  
  3045.  -- Scheme Procedure: set-port-revealed! port rcount
  3046.      Sets the revealed count for a port to a given value.  The return
  3047.      value is unspecified.
  3048.  
  3049.     port-mode
  3050.  
  3051.  -- Scheme Procedure: port-mode port
  3052.      Return the port modes associated with the open port PORT.  These
  3053.      will not necessarily be identical to the modes used when the port
  3054.      was opened, since modes such as "append" which are used only
  3055.      during port creation are not retained.
  3056.  
  3057.     close-port
  3058.  
  3059.  -- Scheme Procedure: close-port port
  3060.      Close the specified port object.  Return `#t' if it successfully
  3061.      closes a port or `#f' if it was already closed.  An exception may
  3062.      be raised if an error occurs, for example when flushing buffered
  3063.      output.  See also *note close: Ports and File Descriptors, for a
  3064.      procedure which can close file descriptors.
  3065.  
  3066.     close-input-port
  3067.  
  3068.  -- Scheme Procedure: close-input-port port
  3069.      Close the specified input port object.  The routine has no effect
  3070.      if the file has already been closed.  An exception may be raised
  3071.      if an error occurs.  The value returned is unspecified.
  3072.  
  3073.      See also *note close: Ports and File Descriptors, for a procedure
  3074.      which can close file descriptors.
  3075.  
  3076.     close-output-port
  3077.  
  3078.  -- Scheme Procedure: close-output-port port
  3079.      Close the specified output port object.  The routine has no effect
  3080.      if the file has already been closed.  An exception may be raised
  3081.      if an error occurs.  The value returned is unspecified.
  3082.  
  3083.      See also *note close: Ports and File Descriptors, for a procedure
  3084.      which can close file descriptors.
  3085.  
  3086.     port-for-each
  3087.  
  3088.  -- Scheme Procedure: port-for-each proc
  3089.      Apply PROC to each port in the Guile port table in turn.  The
  3090.      return value is unspecified.  More specifically, PROC is applied
  3091.      exactly once to every port that exists in the system at the time
  3092.      PORT-FOR-EACH is invoked.  Changes to the port table while
  3093.      PORT-FOR-EACH is running have no effect as far as PORT-FOR-EACH is
  3094.      concerned.
  3095.  
  3096.     input-port?
  3097.  
  3098.  -- Scheme Procedure: input-port? x
  3099.      Return `#t' if X is an input port, otherwise return `#f'.  Any
  3100.      object satisfying this predicate also satisfies `port?'.
  3101.  
  3102.     output-port?
  3103.  
  3104.  -- Scheme Procedure: output-port? x
  3105.      Return `#t' if X is an output port, otherwise return `#f'.  Any
  3106.      object satisfying this predicate also satisfies `port?'.
  3107.  
  3108.     port?
  3109.  
  3110.  -- Scheme Procedure: port? x
  3111.      Return a boolean indicating whether X is a port.  Equivalent to
  3112.      `(or (input-port? X) (output-port?  X))'.
  3113.  
  3114.     port-closed?
  3115.  
  3116.  -- Scheme Procedure: port-closed? port
  3117.      Return `#t' if PORT is closed or `#f' if it is open.
  3118.  
  3119.     eof-object?
  3120.  
  3121.  -- Scheme Procedure: eof-object? x
  3122.      Return `#t' if X is an end-of-file object; otherwise return `#f'.
  3123.  
  3124.     force-output
  3125.  
  3126.  -- Scheme Procedure: force-output [port]
  3127.      Flush the specified output port, or the current output port if PORT
  3128.      is omitted.  The current output buffer contents are passed to the
  3129.      underlying port implementation (e.g., in the case of fports, the
  3130.      data will be written to the file and the output buffer will be
  3131.      cleared.)  It has no effect on an unbuffered port.
  3132.  
  3133.      The return value is unspecified.
  3134.  
  3135.     flush-all-ports
  3136.  
  3137.  -- Scheme Procedure: flush-all-ports
  3138.      Equivalent to calling `force-output' on all open output ports.
  3139.      The return value is unspecified.
  3140.  
  3141.     read-char
  3142.  
  3143.  -- Scheme Procedure: read-char [port]
  3144.      Return the next character available from PORT, updating PORT to
  3145.      point to the following character.  If no more characters are
  3146.      available, the end-of-file object is returned.
  3147.  
  3148.     peek-char
  3149.  
  3150.  -- Scheme Procedure: peek-char [port]
  3151.      Return the next character available from PORT, _without_ updating
  3152.      PORT to point to the following character.  If no more characters
  3153.      are available, the end-of-file object is returned.
  3154.  
  3155.      The value returned by a call to `peek-char' is the same as the
  3156.      value that would have been returned by a call to `read-char' on
  3157.      the same port.  The only difference is that the very next call to
  3158.      `read-char' or `peek-char' on that PORT will return the value
  3159.      returned by the preceding call to `peek-char'.  In particular, a
  3160.      call to `peek-char' on an interactive port will hang waiting for
  3161.      input whenever a call to `read-char' would have hung.
  3162.  
  3163.     unread-char
  3164.  
  3165.  -- Scheme Procedure: unread-char cobj [port]
  3166.      Place CHAR in PORT so that it will be read by the next read
  3167.      operation.  If called multiple times, the unread characters will
  3168.      be read again in last-in first-out order.  If PORT is not
  3169.      supplied, the current input port is used.
  3170.  
  3171.     unread-string
  3172.  
  3173.  -- Scheme Procedure: unread-string str port
  3174.      Place the string STR in PORT so that its characters will be read
  3175.      in subsequent read operations.  If called multiple times, the
  3176.      unread characters will be read again in last-in first-out order.
  3177.      If PORT is not supplied, the current-input-port is used.
  3178.  
  3179.     seek
  3180.  
  3181.  -- Scheme Procedure: seek fd_port offset whence
  3182.      Sets the current position of FD/PORT to the integer OFFSET, which
  3183.      is interpreted according to the value of WHENCE.
  3184.  
  3185.      One of the following variables should be supplied for WHENCE:
  3186.  
  3187.       -- Variable: SEEK_SET
  3188.           Seek from the beginning of the file.
  3189.  
  3190.       -- Variable: SEEK_CUR
  3191.           Seek from the current position.
  3192.  
  3193.       -- Variable: SEEK_END
  3194.           Seek from the end of the file.
  3195.      If FD/PORT is a file descriptor, the underlying system call is
  3196.      `lseek'.  PORT may be a string port.
  3197.  
  3198.      The value returned is the new position in the file.  This means
  3199.      that the current position of a port can be obtained using:
  3200.           (seek port 0 SEEK_CUR)
  3201.  
  3202.     truncate-file
  3203.  
  3204.  -- Scheme Procedure: truncate-file object [length]
  3205.      Truncate FILE to LENGTH bytes.  FILE can be a filename string, a
  3206.      port object, or an integer file descriptor.  The return value is
  3207.      unspecified.
  3208.  
  3209.      For a port or file descriptor LENGTH can be omitted, in which case
  3210.      the file is truncated at the current position (per `ftell' above).
  3211.  
  3212.      On most systems a file can be extended by giving a length greater
  3213.      than the current size, but this is not mandatory in the POSIX
  3214.      standard.
  3215.  
  3216.     port-line
  3217.  
  3218.  -- Scheme Procedure: port-line port
  3219.      Return the current line number for PORT.
  3220.  
  3221.      The first line of a file is 0.  But you might want to add 1 when
  3222.      printing line numbers, since starting from 1 is traditional in
  3223.      error messages, and likely to be more natural to non-programmers.
  3224.  
  3225.     set-port-line!
  3226.  
  3227.  -- Scheme Procedure: set-port-line! port line
  3228.      Set the current line number for PORT to LINE.  The first line of a
  3229.      file is 0.
  3230.  
  3231.     port-column
  3232.  
  3233.  -- Scheme Procedure: port-column port
  3234.      Return the current column number of PORT.  If the number is
  3235.      unknown, the result is #f.  Otherwise, the result is a 0-origin
  3236.      integer - i.e. the first character of the first line is line 0,
  3237.      column 0.  (However, when you display a file position, for example
  3238.      in an error message, we recommend you add 1 to get 1-origin
  3239.      integers.  This is because lines and column numbers traditionally
  3240.      start with 1, and that is what non-programmers will find most
  3241.      natural.)
  3242.  
  3243.     set-port-column!
  3244.  
  3245.  -- Scheme Procedure: set-port-column! port column
  3246.      Set the current column of PORT.  Before reading the first
  3247.      character on a line the column should be 0.
  3248.  
  3249.     port-filename
  3250.  
  3251.  -- Scheme Procedure: port-filename port
  3252.      Return the filename associated with PORT.  This function returns
  3253.      the strings "standard input", "standard output" and "standard
  3254.      error" when called on the current input, output and error ports
  3255.      respectively.
  3256.  
  3257.     set-port-filename!
  3258.  
  3259.  -- Scheme Procedure: set-port-filename! port filename
  3260.      Change the filename associated with PORT, using the current input
  3261.      port if none is specified.  Note that this does not change the
  3262.      port's source of data, but only the value that is returned by
  3263.      `port-filename' and reported in diagnostic output.
  3264.  
  3265.     %make-void-port
  3266.  
  3267.  -- Scheme Procedure: %make-void-port mode
  3268.      Create and return a new void port.  A void port acts like
  3269.      `/dev/null'.  The MODE argument specifies the input/output modes
  3270.      for this port: see the documentation for `open-file' in *note File
  3271.      Ports::.
  3272.  
  3273.     print-options-interface
  3274.  
  3275.  -- Scheme Procedure: print-options-interface [setting]
  3276.      Option interface for the print options. Instead of using this
  3277.      procedure directly, use the procedures `print-enable',
  3278.      `print-disable', `print-set!' and `print-options'.
  3279.  
  3280.     simple-format
  3281.  
  3282.  -- Scheme Procedure: simple-format destination message . args
  3283.      Write MESSAGE to DESTINATION, defaulting to the current output
  3284.      port.  MESSAGE can contain `~A' (was `%s') and `~S' (was `%S')
  3285.      escapes.  When printed, the escapes are replaced with
  3286.      corresponding members of ARGS: `~A' formats using `display' and
  3287.      `~S' formats using `write'.  If DESTINATION is `#t', then use the
  3288.      current output port, if DESTINATION is `#f', then return a string
  3289.      containing the formatted text. Does not add a trailing newline.
  3290.  
  3291.     newline
  3292.  
  3293.  -- Scheme Procedure: newline [port]
  3294.      Send a newline to PORT.  If PORT is omitted, send to the current
  3295.      output port.
  3296.  
  3297.     write-char
  3298.  
  3299.  -- Scheme Procedure: write-char chr [port]
  3300.      Send character CHR to PORT.
  3301.  
  3302.     port-with-print-state
  3303.  
  3304.  -- Scheme Procedure: port-with-print-state port [pstate]
  3305.      Create a new port which behaves like PORT, but with an included
  3306.      print state PSTATE.  PSTATE is optional.  If PSTATE isn't supplied
  3307.      and PORT already has a print state, the old print state is reused.
  3308.  
  3309.     get-print-state
  3310.  
  3311.  -- Scheme Procedure: get-print-state port
  3312.      Return the print state of the port PORT. If PORT has no associated
  3313.      print state, `#f' is returned.
  3314.  
  3315.     procedure-properties
  3316.  
  3317.  -- Scheme Procedure: procedure-properties proc
  3318.      Return OBJ's property list.
  3319.  
  3320.     set-procedure-properties!
  3321.  
  3322.  -- Scheme Procedure: set-procedure-properties! proc new_val
  3323.      Set OBJ's property list to ALIST.
  3324.  
  3325.     procedure-property
  3326.  
  3327.  -- Scheme Procedure: procedure-property p k
  3328.      Return the property of OBJ with name KEY.
  3329.  
  3330.     set-procedure-property!
  3331.  
  3332.  -- Scheme Procedure: set-procedure-property! p k v
  3333.      In OBJ's property list, set the property named KEY to VALUE.
  3334.  
  3335.     procedure?
  3336.  
  3337.  -- Scheme Procedure: procedure? obj
  3338.      Return `#t' if OBJ is a procedure.
  3339.  
  3340.     closure?
  3341.  
  3342.  -- Scheme Procedure: closure? obj
  3343.      Return `#t' if OBJ is a closure.
  3344.  
  3345.     thunk?
  3346.  
  3347.  -- Scheme Procedure: thunk? obj
  3348.      Return `#t' if OBJ is a thunk.
  3349.  
  3350.     procedure-documentation
  3351.  
  3352.  -- Scheme Procedure: procedure-documentation proc
  3353.      Return the documentation string associated with `proc'.  By
  3354.      convention, if a procedure contains more than one expression and
  3355.      the first expression is a string constant, that string is assumed
  3356.      to contain documentation for that procedure.
  3357.  
  3358.     procedure-with-setter?
  3359.  
  3360.  -- Scheme Procedure: procedure-with-setter? obj
  3361.      Return `#t' if OBJ is a procedure with an associated setter
  3362.      procedure.
  3363.  
  3364.     make-procedure-with-setter
  3365.  
  3366.  -- Scheme Procedure: make-procedure-with-setter procedure setter
  3367.      Create a new procedure which behaves like PROCEDURE, but with the
  3368.      associated setter SETTER.
  3369.  
  3370.     procedure
  3371.  
  3372.  -- Scheme Procedure: procedure proc
  3373.      Return the procedure of PROC, which must be either a procedure
  3374.      with setter, or an operator struct.
  3375.  
  3376.     primitive-make-property
  3377.  
  3378.  -- Scheme Procedure: primitive-make-property not_found_proc
  3379.      Create a "property token" that can be used with
  3380.      `primitive-property-ref' and `primitive-property-set!'.  See
  3381.      `primitive-property-ref' for the significance of NOT_FOUND_PROC.
  3382.  
  3383.     primitive-property-ref
  3384.  
  3385.  -- Scheme Procedure: primitive-property-ref prop obj
  3386.      Return the property PROP of OBJ.
  3387.  
  3388.      When no value has yet been associated with PROP and OBJ, the
  3389.      NOT-FOUND-PROC from PROP is used.  A call `(NOT-FOUND-PROC PROP
  3390.      OBJ)' is made and the result set as the property value.  If
  3391.      NOT-FOUND-PROC is `#f' then `#f' is the property value.
  3392.  
  3393.     primitive-property-set!
  3394.  
  3395.  -- Scheme Procedure: primitive-property-set! prop obj val
  3396.      Set the property PROP of OBJ to VAL.
  3397.  
  3398.     primitive-property-del!
  3399.  
  3400.  -- Scheme Procedure: primitive-property-del! prop obj
  3401.      Remove any value associated with PROP and OBJ.
  3402.  
  3403.     random
  3404.  
  3405.  -- Scheme Procedure: random n [state]
  3406.      Return a number in [0, N).
  3407.  
  3408.      Accepts a positive integer or real n and returns a number of the
  3409.      same type between zero (inclusive) and N (exclusive). The values
  3410.      returned have a uniform distribution.
  3411.  
  3412.      The optional argument STATE must be of the type produced by
  3413.      `seed->random-state'. It defaults to the value of the variable
  3414.      *RANDOM-STATE*. This object is used to maintain the state of the
  3415.      pseudo-random-number generator and is altered as a side effect of
  3416.      the random operation.
  3417.  
  3418.     copy-random-state
  3419.  
  3420.  -- Scheme Procedure: copy-random-state [state]
  3421.      Return a copy of the random state STATE.
  3422.  
  3423.     seed->random-state
  3424.  
  3425.  -- Scheme Procedure: seed->random-state seed
  3426.      Return a new random state using SEED.
  3427.  
  3428.     random:uniform
  3429.  
  3430.  -- Scheme Procedure: random:uniform [state]
  3431.      Return a uniformly distributed inexact real random number in [0,1).
  3432.  
  3433.     random:normal
  3434.  
  3435.  -- Scheme Procedure: random:normal [state]
  3436.      Return an inexact real in a normal distribution.  The distribution
  3437.      used has mean 0 and standard deviation 1.  For a normal
  3438.      distribution with mean m and standard deviation d use `(+ m (* d
  3439.      (random:normal)))'.
  3440.  
  3441.     random:solid-sphere!
  3442.  
  3443.  -- Scheme Procedure: random:solid-sphere! v [state]
  3444.      Fills VECT with inexact real random numbers the sum of whose
  3445.      squares is less than 1.0.  Thinking of VECT as coordinates in
  3446.      space of dimension N = `(vector-length VECT)', the coordinates are
  3447.      uniformly distributed within the unit N-sphere.
  3448.  
  3449.     random:hollow-sphere!
  3450.  
  3451.  -- Scheme Procedure: random:hollow-sphere! v [state]
  3452.      Fills vect with inexact real random numbers the sum of whose
  3453.      squares is equal to 1.0.  Thinking of vect as coordinates in space
  3454.      of dimension n = (vector-length vect), the coordinates are
  3455.      uniformly distributed over the surface of the unit n-sphere.
  3456.  
  3457.     random:normal-vector!
  3458.  
  3459.  -- Scheme Procedure: random:normal-vector! v [state]
  3460.      Fills vect with inexact real random numbers that are independent
  3461.      and standard normally distributed (i.e., with mean 0 and variance
  3462.      1).
  3463.  
  3464.     random:exp
  3465.  
  3466.  -- Scheme Procedure: random:exp [state]
  3467.      Return an inexact real in an exponential distribution with mean 1.
  3468.      For an exponential distribution with mean u use (* u (random:exp)).
  3469.  
  3470.     %read-delimited!
  3471.  
  3472.  -- Scheme Procedure: %read-delimited! delims str gobble [port [start
  3473.           [end]]]
  3474.      Read characters from PORT into STR until one of the characters in
  3475.      the DELIMS string is encountered.  If GOBBLE is true, discard the
  3476.      delimiter character; otherwise, leave it in the input stream for
  3477.      the next read.  If PORT is not specified, use the value of
  3478.      `(current-input-port)'.  If START or END are specified, store data
  3479.      only into the substring of STR bounded by START and END (which
  3480.      default to the beginning and end of the string, respectively).
  3481.  
  3482.      Return a pair consisting of the delimiter that terminated the
  3483.      string and the number of characters read.  If reading stopped at
  3484.      the end of file, the delimiter returned is the EOF-OBJECT; if the
  3485.      string was filled without encountering a delimiter, this value is
  3486.      `#f'.
  3487.  
  3488.     %read-line
  3489.  
  3490.  -- Scheme Procedure: %read-line [port]
  3491.      Read a newline-terminated line from PORT, allocating storage as
  3492.      necessary.  The newline terminator (if any) is removed from the
  3493.      string, and a pair consisting of the line and its delimiter is
  3494.      returned.  The delimiter may be either a newline or the
  3495.      EOF-OBJECT; if `%read-line' is called at the end of file, it
  3496.      returns the pair `(#<eof> . #<eof>)'.
  3497.  
  3498.     write-line
  3499.  
  3500.  -- Scheme Procedure: write-line obj [port]
  3501.      Display OBJ and a newline character to PORT.  If PORT is not
  3502.      specified, `(current-output-port)' is used.  This function is
  3503.      equivalent to:
  3504.           (display obj [port])
  3505.           (newline [port])
  3506.  
  3507.     read-options-interface
  3508.  
  3509.  -- Scheme Procedure: read-options-interface [setting]
  3510.      Option interface for the read options. Instead of using this
  3511.      procedure directly, use the procedures `read-enable',
  3512.      `read-disable', `read-set!' and `read-options'.
  3513.  
  3514.     read
  3515.  
  3516.  -- Scheme Procedure: read [port]
  3517.      Read an s-expression from the input port PORT, or from the current
  3518.      input port if PORT is not specified.  Any whitespace before the
  3519.      next token is discarded.
  3520.  
  3521.     read-hash-extend
  3522.  
  3523.  -- Scheme Procedure: read-hash-extend chr proc
  3524.      Install the procedure PROC for reading expressions starting with
  3525.      the character sequence `#' and CHR.  PROC will be called with two
  3526.      arguments:  the character CHR and the port to read further data
  3527.      from. The object returned will be the return value of `read'.
  3528.  
  3529.     call-with-dynamic-root
  3530.  
  3531.  -- Scheme Procedure: call-with-dynamic-root thunk handler
  3532.      Call THUNK with a new dynamic state and withina continuation
  3533.      barrier.  The HANDLER catches allotherwise uncaught throws and
  3534.      executes within the samedynamic context as THUNK.
  3535.  
  3536.     dynamic-root
  3537.  
  3538.  -- Scheme Procedure: dynamic-root
  3539.      Return an object representing the current dynamic root.
  3540.  
  3541.      These objects are only useful for comparison using `eq?'.
  3542.  
  3543.  
  3544.     read-string!/partial
  3545.  
  3546.  -- Scheme Procedure: read-string!/partial str [port_or_fdes [start
  3547.           [end]]]
  3548.      Read characters from a port or file descriptor into a string STR.
  3549.      A port must have an underlying file descriptor -- a so-called
  3550.      fport.  This procedure is scsh-compatible and can efficiently read
  3551.      large strings.  It will:
  3552.  
  3553.         * attempt to fill the entire string, unless the START and/or
  3554.           END arguments are supplied.  i.e., START defaults to 0 and
  3555.           END defaults to `(string-length str)'
  3556.  
  3557.         * use the current input port if PORT_OR_FDES is not supplied.
  3558.  
  3559.         * return fewer than the requested number of characters in some
  3560.           cases, e.g., on end of file, if interrupted by a signal, or if
  3561.           not all the characters are immediately available.
  3562.  
  3563.         * wait indefinitely for some input if no characters are
  3564.           currently available, unless the port is in non-blocking mode.
  3565.  
  3566.         * read characters from the port's input buffers if available,
  3567.           instead from the underlying file descriptor.
  3568.  
  3569.         * return `#f' if end-of-file is encountered before reading any
  3570.           characters, otherwise return the number of characters read.
  3571.  
  3572.         * return 0 if the port is in non-blocking mode and no characters
  3573.           are immediately available.
  3574.  
  3575.         * return 0 if the request is for 0 bytes, with no end-of-file
  3576.           check.
  3577.  
  3578.     write-string/partial
  3579.  
  3580.  -- Scheme Procedure: write-string/partial str [port_or_fdes [start
  3581.           [end]]]
  3582.      Write characters from a string STR to a port or file descriptor.
  3583.      A port must have an underlying file descriptor -- a so-called
  3584.      fport.  This procedure is scsh-compatible and can efficiently
  3585.      write large strings.  It will:
  3586.  
  3587.         * attempt to write the entire string, unless the START and/or
  3588.           END arguments are supplied.  i.e., START defaults to 0 and
  3589.           END defaults to `(string-length str)'
  3590.  
  3591.         * use the current output port if PORT_OF_FDES is not supplied.
  3592.  
  3593.         * in the case of a buffered port, store the characters in the
  3594.           port's output buffer, if all will fit.  If they will not fit
  3595.           then any existing buffered characters will be flushed before
  3596.           attempting to write the new characters directly to the
  3597.           underlying file descriptor.  If the port is in non-blocking
  3598.           mode and buffered characters can not be flushed immediately,
  3599.           then an `EAGAIN' system-error exception will be raised (Note:
  3600.           scsh does not support the use of non-blocking buffered ports.)
  3601.  
  3602.         * write fewer than the requested number of characters in some
  3603.           cases, e.g., if interrupted by a signal or if not all of the
  3604.           output can be accepted immediately.
  3605.  
  3606.         * wait indefinitely for at least one character from STR to be
  3607.           accepted by the port, unless the port is in non-blocking mode.
  3608.  
  3609.         * return the number of characters accepted by the port.
  3610.  
  3611.         * return 0 if the port is in non-blocking mode and can not
  3612.           accept at least one character from STR immediately
  3613.  
  3614.         * return 0 immediately if the request size is 0 bytes.
  3615.  
  3616.     sigaction
  3617.  
  3618.  -- Scheme Procedure: sigaction signum [handler [flags [thread]]]
  3619.      Install or report the signal handler for a specified signal.
  3620.  
  3621.      SIGNUM is the signal number, which can be specified using the value
  3622.      of variables such as `SIGINT'.
  3623.  
  3624.      If HANDLER is omitted, `sigaction' returns a pair: the CAR is the
  3625.      current signal hander, which will be either an integer with the
  3626.      value `SIG_DFL' (default action) or `SIG_IGN' (ignore), or the
  3627.      Scheme procedure which handles the signal, or `#f' if a non-Scheme
  3628.      procedure handles the signal.  The CDR contains the current
  3629.      `sigaction' flags for the handler.
  3630.  
  3631.      If HANDLER is provided, it is installed as the new handler for
  3632.      SIGNUM.  HANDLER can be a Scheme procedure taking one argument, or
  3633.      the value of `SIG_DFL' (default action) or `SIG_IGN' (ignore), or
  3634.      `#f' to restore whatever signal handler was installed before
  3635.      `sigaction' was first used.  When a scheme procedure has been
  3636.      specified, that procedure will run in the given THREAD.   When no
  3637.      thread has been given, the thread that made this call to
  3638.      `sigaction' is used.  Flags can optionally be specified for the
  3639.      new handler (`SA_RESTART' will always be added if it's available
  3640.      and the system is using restartable system calls.)  The return
  3641.      value is a pair with information about the old handler as
  3642.      described above.
  3643.  
  3644.      This interface does not provide access to the "signal blocking"
  3645.      facility.  Maybe this is not needed, since the thread support may
  3646.      provide solutions to the problem of consistent access to data
  3647.      structures.
  3648.  
  3649.     restore-signals
  3650.  
  3651.  -- Scheme Procedure: restore-signals
  3652.      Return all signal handlers to the values they had before any call
  3653.      to `sigaction' was made.  The return value is unspecified.
  3654.  
  3655.     alarm
  3656.  
  3657.  -- Scheme Procedure: alarm i
  3658.      Set a timer to raise a `SIGALRM' signal after the specified number
  3659.      of seconds (an integer).  It's advisable to install a signal
  3660.      handler for `SIGALRM' beforehand, since the default action is to
  3661.      terminate the process.
  3662.  
  3663.      The return value indicates the time remaining for the previous
  3664.      alarm, if any.  The new value replaces the previous alarm.  If
  3665.      there was no previous alarm, the return value is zero.
  3666.  
  3667.     setitimer
  3668.  
  3669.  -- Scheme Procedure: setitimer which_timer interval_seconds
  3670.           interval_microseconds value_seconds value_microseconds
  3671.      Set the timer specified by WHICH_TIMER according to the given
  3672.      INTERVAL_SECONDS, INTERVAL_MICROSECONDS, VALUE_SECONDS, and
  3673.      VALUE_MICROSECONDS values.
  3674.  
  3675.      Return information about the timer's previous setting.  Errors are
  3676.      handled as described in the guile info pages under "POSIX
  3677.      Interface Conventions".
  3678.  
  3679.      The timers available are: `ITIMER_REAL', `ITIMER_VIRTUAL', and
  3680.      `ITIMER_PROF'.
  3681.  
  3682.      The return value will be a list of two cons pairs representing the
  3683.      current state of the given timer.  The first pair is the seconds
  3684.      and microseconds of the timer `it_interval', and the second pair is
  3685.      the seconds and microseconds of the timer `it_value'.
  3686.  
  3687.     getitimer
  3688.  
  3689.  -- Scheme Procedure: getitimer which_timer
  3690.      Return information about the timer specified by WHICH_TIMER Errors
  3691.      are handled as described in the guile info pages under "POSIX
  3692.      Interface Conventions".
  3693.  
  3694.      The timers available are: `ITIMER_REAL', `ITIMER_VIRTUAL', and
  3695.      `ITIMER_PROF'.
  3696.  
  3697.      The return value will be a list of two cons pairs representing the
  3698.      current state of the given timer.  The first pair is the seconds
  3699.      and microseconds of the timer `it_interval', and the second pair is
  3700.      the seconds and microseconds of the timer `it_value'.
  3701.  
  3702.     pause
  3703.  
  3704.  -- Scheme Procedure: pause
  3705.      Pause the current process (thread?) until a signal arrives whose
  3706.      action is to either terminate the current process or invoke a
  3707.      handler procedure.  The return value is unspecified.
  3708.  
  3709.     sleep
  3710.  
  3711.  -- Scheme Procedure: sleep i
  3712.      Wait for the given number of seconds (an integer) or until a signal
  3713.      arrives.  The return value is zero if the time elapses or the
  3714.      number of seconds remaining otherwise.
  3715.  
  3716.      See also `usleep'.
  3717.  
  3718.     usleep
  3719.  
  3720.  -- Scheme Procedure: usleep i
  3721.      Wait the given period USECS microseconds (an integer).  If a
  3722.      signal arrives the wait stops and the return value is the time
  3723.      remaining, in microseconds.  If the period elapses with no signal
  3724.      the return is zero.
  3725.  
  3726.      On most systems the process scheduler is not microsecond accurate
  3727.      and the actual period slept by `usleep' may be rounded to a system
  3728.      clock tick boundary.  Traditionally such ticks were 10 milliseconds
  3729.      apart, and that interval is often still used.
  3730.  
  3731.      See also `sleep'.
  3732.  
  3733.     raise
  3734.  
  3735.  -- Scheme Procedure: raise sig
  3736.      Sends a specified signal SIG to the current process, where SIG is
  3737.      as described for the kill procedure.
  3738.  
  3739.     system
  3740.  
  3741.  -- Scheme Procedure: system [cmd]
  3742.      Execute CMD using the operating system's "command processor".
  3743.      Under Unix this is usually the default shell `sh'.  The value
  3744.      returned is CMD's exit status as returned by `waitpid', which can
  3745.      be interpreted using `status:exit-val' and friends.
  3746.  
  3747.      If `system' is called without arguments, return a boolean
  3748.      indicating whether the command processor is available.
  3749.  
  3750.     system*
  3751.  
  3752.  -- Scheme Procedure: system* . args
  3753.      Execute the command indicated by ARGS.  The first element must be
  3754.      a string indicating the command to be executed, and the remaining
  3755.      items must be strings representing each of the arguments to that
  3756.      command.
  3757.  
  3758.      This function returns the exit status of the command as provided by
  3759.      `waitpid'.  This value can be handled with `status:exit-val' and
  3760.      the related functions.
  3761.  
  3762.      `system*' is similar to `system', but accepts only one string
  3763.      per-argument, and performs no shell interpretation.  The command
  3764.      is executed using fork and execlp.  Accordingly this function may
  3765.      be safer than `system' in situations where shell interpretation is
  3766.      not required.
  3767.  
  3768.      Example: (system* "echo" "foo" "bar")
  3769.  
  3770.     getenv
  3771.  
  3772.  -- Scheme Procedure: getenv nam
  3773.      Looks up the string NAME in the current environment.  The return
  3774.      value is `#f' unless a string of the form `NAME=VALUE' is found,
  3775.      in which case the string `VALUE' is returned.
  3776.  
  3777.     primitive-exit
  3778.  
  3779.  -- Scheme Procedure: primitive-exit [status]
  3780.      Terminate the current process without unwinding the Scheme stack.
  3781.      The exit status is STATUS if supplied, otherwise zero.
  3782.  
  3783.     primitive-_exit
  3784.  
  3785.  -- Scheme Procedure: primitive-_exit [status]
  3786.      Terminate the current process using the _exit() system call and
  3787.      without unwinding the Scheme stack.  The exit status is STATUS if
  3788.      supplied, otherwise zero.
  3789.  
  3790.      This function is typically useful after a fork, to ensure no
  3791.      Scheme cleanups or `atexit' handlers are run (those usually
  3792.      belonging in the parent rather than the child).
  3793.  
  3794.     restricted-vector-sort!
  3795.  
  3796.  -- Scheme Procedure: restricted-vector-sort! vec less startpos endpos
  3797.      Sort the vector VEC, using LESS for comparing the vector elements.
  3798.      STARTPOS (inclusively) and ENDPOS (exclusively) delimit the range
  3799.      of the vector which gets sorted.  The return value is not
  3800.      specified.
  3801.  
  3802.     sorted?
  3803.  
  3804.  -- Scheme Procedure: sorted? items less
  3805.      Return `#t' iff ITEMS is a list or a vector such that for all 1 <=
  3806.      i <= m, the predicate LESS returns true when applied to all
  3807.      elements i - 1 and i
  3808.  
  3809.     merge
  3810.  
  3811.  -- Scheme Procedure: merge alist blist less
  3812.      Merge two already sorted lists into one.  Given two lists ALIST
  3813.      and BLIST, such that `(sorted? alist less?)' and `(sorted? blist
  3814.      less?)', return a new list in which the elements of ALIST and
  3815.      BLIST have been stably interleaved so that `(sorted? (merge alist
  3816.      blist less?) less?)'.  Note:  this does _not_ accept vectors.
  3817.  
  3818.     merge!
  3819.  
  3820.  -- Scheme Procedure: merge! alist blist less
  3821.      Takes two lists ALIST and BLIST such that `(sorted? alist less?)'
  3822.      and `(sorted? blist less?)' and returns a new list in which the
  3823.      elements of ALIST and BLIST have been stably interleaved so that
  3824.      `(sorted? (merge alist blist less?) less?)'.  This is the
  3825.      destructive variant of `merge' Note:  this does _not_ accept
  3826.      vectors.
  3827.  
  3828.     sort!
  3829.  
  3830.  -- Scheme Procedure: sort! items less
  3831.      Sort the sequence ITEMS, which may be a list or a vector.  LESS is
  3832.      used for comparing the sequence elements.  The sorting is
  3833.      destructive, that means that the input sequence is modified to
  3834.      produce the sorted result.  This is not a stable sort.
  3835.  
  3836.     sort
  3837.  
  3838.  -- Scheme Procedure: sort items less
  3839.      Sort the sequence ITEMS, which may be a list or a vector.  LESS is
  3840.      used for comparing the sequence elements.  This is not a stable
  3841.      sort.
  3842.  
  3843.     stable-sort!
  3844.  
  3845.  -- Scheme Procedure: stable-sort! items less
  3846.      Sort the sequence ITEMS, which may be a list or a vector. LESS is
  3847.      used for comparing the sequence elements.  The sorting is
  3848.      destructive, that means that the input sequence is modified to
  3849.      produce the sorted result.  This is a stable sort.
  3850.  
  3851.     stable-sort
  3852.  
  3853.  -- Scheme Procedure: stable-sort items less
  3854.      Sort the sequence ITEMS, which may be a list or a vector. LESS is
  3855.      used for comparing the sequence elements.  This is a stable sort.
  3856.  
  3857.     sort-list!
  3858.  
  3859.  -- Scheme Procedure: sort-list! items less
  3860.      Sort the list ITEMS, using LESS for comparing the list elements.
  3861.      The sorting is destructive, that means that the input list is
  3862.      modified to produce the sorted result.  This is a stable sort.
  3863.  
  3864.     sort-list
  3865.  
  3866.  -- Scheme Procedure: sort-list items less
  3867.      Sort the list ITEMS, using LESS for comparing the list elements.
  3868.      This is a stable sort.
  3869.  
  3870.     source-properties
  3871.  
  3872.  -- Scheme Procedure: source-properties obj
  3873.      Return the source property association list of OBJ.
  3874.  
  3875.     set-source-properties!
  3876.  
  3877.  -- Scheme Procedure: set-source-properties! obj plist
  3878.      Install the association list PLIST as the source property list for
  3879.      OBJ.
  3880.  
  3881.     source-property
  3882.  
  3883.  -- Scheme Procedure: source-property obj key
  3884.      Return the source property specified by KEY from OBJ's source
  3885.      property list.
  3886.  
  3887.     set-source-property!
  3888.  
  3889.  -- Scheme Procedure: set-source-property! obj key datum
  3890.      Set the source property of object OBJ, which is specified by KEY
  3891.      to DATUM.  Normally, the key will be a symbol.
  3892.  
  3893.     stack?
  3894.  
  3895.  -- Scheme Procedure: stack? obj
  3896.      Return `#t' if OBJ is a calling stack.
  3897.  
  3898.     make-stack
  3899.  
  3900.  -- Scheme Procedure: make-stack obj . args
  3901.      Create a new stack. If OBJ is `#t', the current evaluation stack
  3902.      is used for creating the stack frames, otherwise the frames are
  3903.      taken from OBJ (which must be either a debug object or a
  3904.      continuation).
  3905.  
  3906.      ARGS should be a list containing any combination of integer,
  3907.      procedure and `#t' values.
  3908.  
  3909.      These values specify various ways of cutting away uninteresting
  3910.      stack frames from the top and bottom of the stack that
  3911.      `make-stack' returns.  They come in pairs like this: `(INNER_CUT_1
  3912.      OUTER_CUT_1 INNER_CUT_2 OUTER_CUT_2 ...)'.
  3913.  
  3914.      Each INNER_CUT_N can be `#t', an integer, or a procedure.  `#t'
  3915.      means to cut away all frames up to but excluding the first user
  3916.      module frame.  An integer means to cut away exactly that number of
  3917.      frames.  A procedure means to cut away all frames up to but
  3918.      excluding the application frame whose procedure matches the
  3919.      specified one.
  3920.  
  3921.      Each OUTER_CUT_N can be an integer or a procedure.  An integer
  3922.      means to cut away that number of frames.  A procedure means to cut
  3923.      away frames down to but excluding the application frame whose
  3924.      procedure matches the specified one.
  3925.  
  3926.      If the OUTER_CUT_N of the last pair is missing, it is taken as 0.
  3927.  
  3928.     stack-id
  3929.  
  3930.  -- Scheme Procedure: stack-id stack
  3931.      Return the identifier given to STACK by `start-stack'.
  3932.  
  3933.     stack-ref
  3934.  
  3935.  -- Scheme Procedure: stack-ref stack index
  3936.      Return the INDEX'th frame from STACK.
  3937.  
  3938.     stack-length
  3939.  
  3940.  -- Scheme Procedure: stack-length stack
  3941.      Return the length of STACK.
  3942.  
  3943.     frame?
  3944.  
  3945.  -- Scheme Procedure: frame? obj
  3946.      Return `#t' if OBJ is a stack frame.
  3947.  
  3948.     last-stack-frame
  3949.  
  3950.  -- Scheme Procedure: last-stack-frame obj
  3951.      Return a stack which consists of a single frame, which is the last
  3952.      stack frame for OBJ. OBJ must be either a debug object or a
  3953.      continuation.
  3954.  
  3955.     frame-number
  3956.  
  3957.  -- Scheme Procedure: frame-number frame
  3958.      Return the frame number of FRAME.
  3959.  
  3960.     frame-source
  3961.  
  3962.  -- Scheme Procedure: frame-source frame
  3963.      Return the source of FRAME.
  3964.  
  3965.     frame-procedure
  3966.  
  3967.  -- Scheme Procedure: frame-procedure frame
  3968.      Return the procedure for FRAME, or `#f' if no procedure is
  3969.      associated with FRAME.
  3970.  
  3971.     frame-arguments
  3972.  
  3973.  -- Scheme Procedure: frame-arguments frame
  3974.      Return the arguments of FRAME.
  3975.  
  3976.     frame-previous
  3977.  
  3978.  -- Scheme Procedure: frame-previous frame
  3979.      Return the previous frame of FRAME, or `#f' if FRAME is the first
  3980.      frame in its stack.
  3981.  
  3982.     frame-next
  3983.  
  3984.  -- Scheme Procedure: frame-next frame
  3985.      Return the next frame of FRAME, or `#f' if FRAME is the last frame
  3986.      in its stack.
  3987.  
  3988.     frame-real?
  3989.  
  3990.  -- Scheme Procedure: frame-real? frame
  3991.      Return `#t' if FRAME is a real frame.
  3992.  
  3993.     frame-procedure?
  3994.  
  3995.  -- Scheme Procedure: frame-procedure? frame
  3996.      Return `#t' if a procedure is associated with FRAME.
  3997.  
  3998.     frame-evaluating-args?
  3999.  
  4000.  -- Scheme Procedure: frame-evaluating-args? frame
  4001.      Return `#t' if FRAME contains evaluated arguments.
  4002.  
  4003.     frame-overflow?
  4004.  
  4005.  -- Scheme Procedure: frame-overflow? frame
  4006.      Return `#t' if FRAME is an overflow frame.
  4007.  
  4008.     get-internal-real-time
  4009.  
  4010.  -- Scheme Procedure: get-internal-real-time
  4011.      Return the number of time units since the interpreter was started.
  4012.  
  4013.     times
  4014.  
  4015.  -- Scheme Procedure: times
  4016.      Return an object with information about real and processor time.
  4017.      The following procedures accept such an object as an argument and
  4018.      return a selected component:
  4019.  
  4020.     `tms:clock'
  4021.           The current real time, expressed as time units relative to an
  4022.           arbitrary base.
  4023.  
  4024.     `tms:utime'
  4025.           The CPU time units used by the calling process.
  4026.  
  4027.     `tms:stime'
  4028.           The CPU time units used by the system on behalf of the calling
  4029.           process.
  4030.  
  4031.     `tms:cutime'
  4032.           The CPU time units used by terminated child processes of the
  4033.           calling process, whose status has been collected (e.g., using
  4034.           `waitpid').
  4035.  
  4036.     `tms:cstime'
  4037.           Similarly, the CPU times units used by the system on behalf of
  4038.           terminated child processes.
  4039.  
  4040.     get-internal-run-time
  4041.  
  4042.  -- Scheme Procedure: get-internal-run-time
  4043.      Return the number of time units of processor time used by the
  4044.      interpreter.  Both _system_ and _user_ time are included but
  4045.      subprocesses are not.
  4046.  
  4047.     current-time
  4048.  
  4049.  -- Scheme Procedure: current-time
  4050.      Return the number of seconds since 1970-01-01 00:00:00 UTC,
  4051.      excluding leap seconds.
  4052.  
  4053.     gettimeofday
  4054.  
  4055.  -- Scheme Procedure: gettimeofday
  4056.      Return a pair containing the number of seconds and microseconds
  4057.      since 1970-01-01 00:00:00 UTC, excluding leap seconds.  Note:
  4058.      whether true microsecond resolution is available depends on the
  4059.      operating system.
  4060.  
  4061.     localtime
  4062.  
  4063.  -- Scheme Procedure: localtime time [zone]
  4064.      Return an object representing the broken down components of TIME,
  4065.      an integer like the one returned by `current-time'.  The time zone
  4066.      for the calculation is optionally specified by ZONE (a string),
  4067.      otherwise the `TZ' environment variable or the system default is
  4068.      used.
  4069.  
  4070.     gmtime
  4071.  
  4072.  -- Scheme Procedure: gmtime time
  4073.      Return an object representing the broken down components of TIME,
  4074.      an integer like the one returned by `current-time'.  The values
  4075.      are calculated for UTC.
  4076.  
  4077.     mktime
  4078.  
  4079.  -- Scheme Procedure: mktime sbd_time [zone]
  4080.      BD-TIME is an object representing broken down time and `zone' is
  4081.      an optional time zone specifier (otherwise the TZ environment
  4082.      variable or the system default is used).
  4083.  
  4084.      Returns a pair: the car is a corresponding integer time value like
  4085.      that returned by `current-time'; the cdr is a broken down time
  4086.      object, similar to as BD-TIME but with normalized values.
  4087.  
  4088.     tzset
  4089.  
  4090.  -- Scheme Procedure: tzset
  4091.      Initialize the timezone from the TZ environment variable or the
  4092.      system default.  It's not usually necessary to call this procedure
  4093.      since it's done automatically by other procedures that depend on
  4094.      the timezone.
  4095.  
  4096.     strftime
  4097.  
  4098.  -- Scheme Procedure: strftime format stime
  4099.      Return a string which is broken-down time structure STIME
  4100.      formatted according to the given FORMAT string.
  4101.  
  4102.      FORMAT contains field specifications introduced by a `%'
  4103.      character.  See *note Formatting Calendar Time: (libc)Formatting
  4104.      Calendar Time, or `man 3 strftime', for the available formatting.
  4105.  
  4106.           (strftime "%c" (localtime (current-time)))
  4107.           => "Mon Mar 11 20:17:43 2002"
  4108.  
  4109.      If `setlocale' has been called (*note Locales::), month and day
  4110.      names are from the current locale and in the locale character set.
  4111.  
  4112.     strptime
  4113.  
  4114.  -- Scheme Procedure: strptime format string
  4115.      Performs the reverse action to `strftime', parsing STRING
  4116.      according to the specification supplied in TEMPLATE.  The
  4117.      interpretation of month and day names is dependent on the current
  4118.      locale.  The value returned is a pair.  The car has an object with
  4119.      time components in the form returned by `localtime' or `gmtime',
  4120.      but the time zone components are not usefully set.  The cdr
  4121.      reports the number of characters from STRING which were used for
  4122.      the conversion.
  4123.  
  4124.     string?
  4125.  
  4126.  -- Scheme Procedure: string? obj
  4127.      Return `#t' if OBJ is a string, else `#f'.
  4128.  
  4129.     list->string
  4130.  
  4131.  -- Scheme Procedure: list->string
  4132.      implemented by the C function "scm_string"
  4133.  
  4134.     string
  4135.  
  4136.  -- Scheme Procedure: string . chrs
  4137.  -- Scheme Procedure: list->string chrs
  4138.      Return a newly allocated string composed of the arguments, CHRS.
  4139.  
  4140.     make-string
  4141.  
  4142.  -- Scheme Procedure: make-string k [chr]
  4143.      Return a newly allocated string of length K.  If CHR is given,
  4144.      then all elements of the string are initialized to CHR, otherwise
  4145.      the contents of the STRING are unspecified.
  4146.  
  4147.     string-length
  4148.  
  4149.  -- Scheme Procedure: string-length string
  4150.      Return the number of characters in STRING.
  4151.  
  4152.     string-ref
  4153.  
  4154.  -- Scheme Procedure: string-ref str k
  4155.      Return character K of STR using zero-origin indexing. K must be a
  4156.      valid index of STR.
  4157.  
  4158.     string-set!
  4159.  
  4160.  -- Scheme Procedure: string-set! str k chr
  4161.      Store CHR in element K of STR and return an unspecified value. K
  4162.      must be a valid index of STR.
  4163.  
  4164.     substring
  4165.  
  4166.  -- Scheme Procedure: substring str start [end]
  4167.      Return a newly allocated string formed from the characters of STR
  4168.      beginning with index START (inclusive) and ending with index END
  4169.      (exclusive).  STR must be a string, START and END must be exact
  4170.      integers satisfying:
  4171.  
  4172.      0 <= START <= END <= (string-length STR).
  4173.  
  4174.     substring/read-only
  4175.  
  4176.  -- Scheme Procedure: substring/read-only str start [end]
  4177.      Return a newly allocated string formed from the characters of STR
  4178.      beginning with index START (inclusive) and ending with index END
  4179.      (exclusive).  STR must be a string, START and END must be exact
  4180.      integers satisfying:
  4181.  
  4182.      0 <= START <= END <= (string-length STR).
  4183.  
  4184.      The returned string is read-only.
  4185.  
  4186.  
  4187.     substring/copy
  4188.  
  4189.  -- Scheme Procedure: substring/copy str start [end]
  4190.      Return a newly allocated string formed from the characters of STR
  4191.      beginning with index START (inclusive) and ending with index END
  4192.      (exclusive).  STR must be a string, START and END must be exact
  4193.      integers satisfying:
  4194.  
  4195.      0 <= START <= END <= (string-length STR).
  4196.  
  4197.     substring/shared
  4198.  
  4199.  -- Scheme Procedure: substring/shared str start [end]
  4200.      Return string that indirectly refers to the characters of STR
  4201.      beginning with index START (inclusive) and ending with index END
  4202.      (exclusive).  STR must be a string, START and END must be exact
  4203.      integers satisfying:
  4204.  
  4205.      0 <= START <= END <= (string-length STR).
  4206.  
  4207.     string-append
  4208.  
  4209.  -- Scheme Procedure: string-append . args
  4210.      Return a newly allocated string whose characters form the
  4211.      concatenation of the given strings, ARGS.
  4212.  
  4213.     uniform-vector?
  4214.  
  4215.  -- Scheme Procedure: uniform-vector? obj
  4216.      Return `#t' if OBJ is a uniform vector.
  4217.  
  4218.     uniform-vector-ref
  4219.  
  4220.  -- Scheme Procedure: uniform-vector-ref v idx
  4221.      Return the element at index IDX of the homogenous numeric vector V.
  4222.  
  4223.     uniform-vector-set!
  4224.  
  4225.  -- Scheme Procedure: uniform-vector-set! v idx val
  4226.      Set the element at index IDX of the homogenous numeric vector V to
  4227.      VAL.
  4228.  
  4229.     uniform-vector->list
  4230.  
  4231.  -- Scheme Procedure: uniform-vector->list uvec
  4232.      Convert the uniform numeric vector UVEC to a list.
  4233.  
  4234.     uniform-vector-length
  4235.  
  4236.  -- Scheme Procedure: uniform-vector-length v
  4237.      Return the number of elements in the uniform vector V.
  4238.  
  4239.     uniform-vector-read!
  4240.  
  4241.  -- Scheme Procedure: uniform-vector-read! uvec [port_or_fd [start
  4242.           [end]]]
  4243.      Fill the elements of UVEC by reading raw bytes from PORT-OR-FDES,
  4244.      using host byte order.
  4245.  
  4246.      The optional arguments START (inclusive) and END (exclusive) allow
  4247.      a specified region to be read, leaving the remainder of the vector
  4248.      unchanged.
  4249.  
  4250.      When PORT-OR-FDES is a port, all specified elements of UVEC are
  4251.      attempted to be read, potentially blocking while waiting formore
  4252.      input or end-of-file.  When PORT-OR-FD is an integer, a single
  4253.      call to read(2) is made.
  4254.  
  4255.      An error is signalled when the last element has only been
  4256.      partially filled before reaching end-of-file or in the single call
  4257.      to read(2).
  4258.  
  4259.      `uniform-vector-read!' returns the number of elements read.
  4260.  
  4261.      PORT-OR-FDES may be omitted, in which case it defaults to the
  4262.      value returned by `(current-input-port)'.
  4263.  
  4264.     uniform-vector-write
  4265.  
  4266.  -- Scheme Procedure: uniform-vector-write uvec [port_or_fd [start
  4267.           [end]]]
  4268.      Write the elements of UVEC as raw bytes to PORT-OR-FDES, in the
  4269.      host byte order.
  4270.  
  4271.      The optional arguments START (inclusive) and END (exclusive) allow
  4272.      a specified region to be written.
  4273.  
  4274.      When PORT-OR-FDES is a port, all specified elements of UVEC are
  4275.      attempted to be written, potentially blocking while waiting for
  4276.      more room.  When PORT-OR-FD is an integer, a single call to
  4277.      write(2) is made.
  4278.  
  4279.      An error is signalled when the last element has only been
  4280.      partially written in the single call to write(2).
  4281.  
  4282.      The number of objects actually written is returned.  PORT-OR-FDES
  4283.      may be omitted, in which case it defaults to the value returned by
  4284.      `(current-output-port)'.
  4285.  
  4286.     u8vector?
  4287.  
  4288.  -- Scheme Procedure: u8vector? obj
  4289.      Return `#t' if OBJ is a vector of type u8, `#f' otherwise.
  4290.  
  4291.     make-u8vector
  4292.  
  4293.  -- Scheme Procedure: make-u8vector len [fill]
  4294.      Return a newly allocated uniform numeric vector which can hold LEN
  4295.      elements.  If FILL is given, it is used to initialize the
  4296.      elements, otherwise the contents of the vector is unspecified.
  4297.  
  4298.     u8vector
  4299.  
  4300.  -- Scheme Procedure: u8vector . l
  4301.      Return a newly allocated uniform numeric vector containing all
  4302.      argument values.
  4303.  
  4304.     u8vector-length
  4305.  
  4306.  -- Scheme Procedure: u8vector-length uvec
  4307.      Return the number of elements in the uniform numeric vector UVEC.
  4308.  
  4309.     u8vector-ref
  4310.  
  4311.  -- Scheme Procedure: u8vector-ref uvec index
  4312.      Return the element at INDEX in the uniform numeric vector UVEC.
  4313.  
  4314.     u8vector-set!
  4315.  
  4316.  -- Scheme Procedure: u8vector-set! uvec index value
  4317.      Set the element at INDEX in the uniform numeric vector UVEC to
  4318.      VALUE.  The return value is not specified.
  4319.  
  4320.     u8vector->list
  4321.  
  4322.  -- Scheme Procedure: u8vector->list uvec
  4323.      Convert the uniform numeric vector UVEC to a list.
  4324.  
  4325.     list->u8vector
  4326.  
  4327.  -- Scheme Procedure: list->u8vector l
  4328.      Convert the list L to a numeric uniform vector.
  4329.  
  4330.     any->u8vector
  4331.  
  4332.  -- Scheme Procedure: any->u8vector obj
  4333.      Convert OBJ, which can be a list, vector, or uniform vector, to a
  4334.      numeric uniform vector of type u8.
  4335.  
  4336.     s8vector?
  4337.  
  4338.  -- Scheme Procedure: s8vector? obj
  4339.      Return `#t' if OBJ is a vector of type s8, `#f' otherwise.
  4340.  
  4341.     make-s8vector
  4342.  
  4343.  -- Scheme Procedure: make-s8vector len [fill]
  4344.      Return a newly allocated uniform numeric vector which can hold LEN
  4345.      elements.  If FILL is given, it is used to initialize the
  4346.      elements, otherwise the contents of the vector is unspecified.
  4347.  
  4348.     s8vector
  4349.  
  4350.  -- Scheme Procedure: s8vector . l
  4351.      Return a newly allocated uniform numeric vector containing all
  4352.      argument values.
  4353.  
  4354.     s8vector-length
  4355.  
  4356.  -- Scheme Procedure: s8vector-length uvec
  4357.      Return the number of elements in the uniform numeric vector UVEC.
  4358.  
  4359.     s8vector-ref
  4360.  
  4361.  -- Scheme Procedure: s8vector-ref uvec index
  4362.      Return the element at INDEX in the uniform numeric vector UVEC.
  4363.  
  4364.     s8vector-set!
  4365.  
  4366.  -- Scheme Procedure: s8vector-set! uvec index value
  4367.      Set the element at INDEX in the uniform numeric vector UVEC to
  4368.      VALUE.  The return value is not specified.
  4369.  
  4370.     s8vector->list
  4371.  
  4372.  -- Scheme Procedure: s8vector->list uvec
  4373.      Convert the uniform numeric vector UVEC to a list.
  4374.  
  4375.     list->s8vector
  4376.  
  4377.  -- Scheme Procedure: list->s8vector l
  4378.      Convert the list L to a numeric uniform vector.
  4379.  
  4380.     any->s8vector
  4381.  
  4382.  -- Scheme Procedure: any->s8vector obj
  4383.      Convert OBJ, which can be a list, vector, or uniform vector, to a
  4384.      numeric uniform vector of type s8.
  4385.  
  4386.     u16vector?
  4387.  
  4388.  -- Scheme Procedure: u16vector? obj
  4389.      Return `#t' if OBJ is a vector of type u16, `#f' otherwise.
  4390.  
  4391.     make-u16vector
  4392.  
  4393.  -- Scheme Procedure: make-u16vector len [fill]
  4394.      Return a newly allocated uniform numeric vector which can hold LEN
  4395.      elements.  If FILL is given, it is used to initialize the
  4396.      elements, otherwise the contents of the vector is unspecified.
  4397.  
  4398.     u16vector
  4399.  
  4400.  -- Scheme Procedure: u16vector . l
  4401.      Return a newly allocated uniform numeric vector containing all
  4402.      argument values.
  4403.  
  4404.     u16vector-length
  4405.  
  4406.  -- Scheme Procedure: u16vector-length uvec
  4407.      Return the number of elements in the uniform numeric vector UVEC.
  4408.  
  4409.     u16vector-ref
  4410.  
  4411.  -- Scheme Procedure: u16vector-ref uvec index
  4412.      Return the element at INDEX in the uniform numeric vector UVEC.
  4413.  
  4414.     u16vector-set!
  4415.  
  4416.  -- Scheme Procedure: u16vector-set! uvec index value
  4417.      Set the element at INDEX in the uniform numeric vector UVEC to
  4418.      VALUE.  The return value is not specified.
  4419.  
  4420.     u16vector->list
  4421.  
  4422.  -- Scheme Procedure: u16vector->list uvec
  4423.      Convert the uniform numeric vector UVEC to a list.
  4424.  
  4425.     list->u16vector
  4426.  
  4427.  -- Scheme Procedure: list->u16vector l
  4428.      Convert the list L to a numeric uniform vector.
  4429.  
  4430.     any->u16vector
  4431.  
  4432.  -- Scheme Procedure: any->u16vector obj
  4433.      Convert OBJ, which can be a list, vector, or uniform vector, to a
  4434.      numeric uniform vector of type u16.
  4435.  
  4436.     s16vector?
  4437.  
  4438.  -- Scheme Procedure: s16vector? obj
  4439.      Return `#t' if OBJ is a vector of type s16, `#f' otherwise.
  4440.  
  4441.     make-s16vector
  4442.  
  4443.  -- Scheme Procedure: make-s16vector len [fill]
  4444.      Return a newly allocated uniform numeric vector which can hold LEN
  4445.      elements.  If FILL is given, it is used to initialize the
  4446.      elements, otherwise the contents of the vector is unspecified.
  4447.  
  4448.     s16vector
  4449.  
  4450.  -- Scheme Procedure: s16vector . l
  4451.      Return a newly allocated uniform numeric vector containing all
  4452.      argument values.
  4453.  
  4454.     s16vector-length
  4455.  
  4456.  -- Scheme Procedure: s16vector-length uvec
  4457.      Return the number of elements in the uniform numeric vector UVEC.
  4458.  
  4459.     s16vector-ref
  4460.  
  4461.  -- Scheme Procedure: s16vector-ref uvec index
  4462.      Return the element at INDEX in the uniform numeric vector UVEC.
  4463.  
  4464.     s16vector-set!
  4465.  
  4466.  -- Scheme Procedure: s16vector-set! uvec index value
  4467.      Set the element at INDEX in the uniform numeric vector UVEC to
  4468.      VALUE.  The return value is not specified.
  4469.  
  4470.     s16vector->list
  4471.  
  4472.  -- Scheme Procedure: s16vector->list uvec
  4473.      Convert the uniform numeric vector UVEC to a list.
  4474.  
  4475.     list->s16vector
  4476.  
  4477.  -- Scheme Procedure: list->s16vector l
  4478.      Convert the list L to a numeric uniform vector.
  4479.  
  4480.     any->s16vector
  4481.  
  4482.  -- Scheme Procedure: any->s16vector obj
  4483.      Convert OBJ, which can be a list, vector, or uniform vector, to a
  4484.      numeric uniform vector of type s16.
  4485.  
  4486.     u32vector?
  4487.  
  4488.  -- Scheme Procedure: u32vector? obj
  4489.      Return `#t' if OBJ is a vector of type u32, `#f' otherwise.
  4490.  
  4491.     make-u32vector
  4492.  
  4493.  -- Scheme Procedure: make-u32vector len [fill]
  4494.      Return a newly allocated uniform numeric vector which can hold LEN
  4495.      elements.  If FILL is given, it is used to initialize the
  4496.      elements, otherwise the contents of the vector is unspecified.
  4497.  
  4498.     u32vector
  4499.  
  4500.  -- Scheme Procedure: u32vector . l
  4501.      Return a newly allocated uniform numeric vector containing all
  4502.      argument values.
  4503.  
  4504.     u32vector-length
  4505.  
  4506.  -- Scheme Procedure: u32vector-length uvec
  4507.      Return the number of elements in the uniform numeric vector UVEC.
  4508.  
  4509.     u32vector-ref
  4510.  
  4511.  -- Scheme Procedure: u32vector-ref uvec index
  4512.      Return the element at INDEX in the uniform numeric vector UVEC.
  4513.  
  4514.     u32vector-set!
  4515.  
  4516.  -- Scheme Procedure: u32vector-set! uvec index value
  4517.      Set the element at INDEX in the uniform numeric vector UVEC to
  4518.      VALUE.  The return value is not specified.
  4519.  
  4520.     u32vector->list
  4521.  
  4522.  -- Scheme Procedure: u32vector->list uvec
  4523.      Convert the uniform numeric vector UVEC to a list.
  4524.  
  4525.     list->u32vector
  4526.  
  4527.  -- Scheme Procedure: list->u32vector l
  4528.      Convert the list L to a numeric uniform vector.
  4529.  
  4530.     any->u32vector
  4531.  
  4532.  -- Scheme Procedure: any->u32vector obj
  4533.      Convert OBJ, which can be a list, vector, or uniform vector, to a
  4534.      numeric uniform vector of type u32.
  4535.  
  4536.     s32vector?
  4537.  
  4538.  -- Scheme Procedure: s32vector? obj
  4539.      Return `#t' if OBJ is a vector of type s32, `#f' otherwise.
  4540.  
  4541.     make-s32vector
  4542.  
  4543.  -- Scheme Procedure: make-s32vector len [fill]
  4544.      Return a newly allocated uniform numeric vector which can hold LEN
  4545.      elements.  If FILL is given, it is used to initialize the
  4546.      elements, otherwise the contents of the vector is unspecified.
  4547.  
  4548.     s32vector
  4549.  
  4550.  -- Scheme Procedure: s32vector . l
  4551.      Return a newly allocated uniform numeric vector containing all
  4552.      argument values.
  4553.  
  4554.     s32vector-length
  4555.  
  4556.  -- Scheme Procedure: s32vector-length uvec
  4557.      Return the number of elements in the uniform numeric vector UVEC.
  4558.  
  4559.     s32vector-ref
  4560.  
  4561.  -- Scheme Procedure: s32vector-ref uvec index
  4562.      Return the element at INDEX in the uniform numeric vector UVEC.
  4563.  
  4564.     s32vector-set!
  4565.  
  4566.  -- Scheme Procedure: s32vector-set! uvec index value
  4567.      Set the element at INDEX in the uniform numeric vector UVEC to
  4568.      VALUE.  The return value is not specified.
  4569.  
  4570.     s32vector->list
  4571.  
  4572.  -- Scheme Procedure: s32vector->list uvec
  4573.      Convert the uniform numeric vector UVEC to a list.
  4574.  
  4575.     list->s32vector
  4576.  
  4577.  -- Scheme Procedure: list->s32vector l
  4578.      Convert the list L to a numeric uniform vector.
  4579.  
  4580.     any->s32vector
  4581.  
  4582.  -- Scheme Procedure: any->s32vector obj
  4583.      Convert OBJ, which can be a list, vector, or uniform vector, to a
  4584.      numeric uniform vector of type s32.
  4585.  
  4586.     u64vector?
  4587.  
  4588.  -- Scheme Procedure: u64vector? obj
  4589.      Return `#t' if OBJ is a vector of type u64, `#f' otherwise.
  4590.  
  4591.     make-u64vector
  4592.  
  4593.  -- Scheme Procedure: make-u64vector len [fill]
  4594.      Return a newly allocated uniform numeric vector which can hold LEN
  4595.      elements.  If FILL is given, it is used to initialize the
  4596.      elements, otherwise the contents of the vector is unspecified.
  4597.  
  4598.     u64vector
  4599.  
  4600.  -- Scheme Procedure: u64vector . l
  4601.      Return a newly allocated uniform numeric vector containing all
  4602.      argument values.
  4603.  
  4604.     u64vector-length
  4605.  
  4606.  -- Scheme Procedure: u64vector-length uvec
  4607.      Return the number of elements in the uniform numeric vector UVEC.
  4608.  
  4609.     u64vector-ref
  4610.  
  4611.  -- Scheme Procedure: u64vector-ref uvec index
  4612.      Return the element at INDEX in the uniform numeric vector UVEC.
  4613.  
  4614.     u64vector-set!
  4615.  
  4616.  -- Scheme Procedure: u64vector-set! uvec index value
  4617.      Set the element at INDEX in the uniform numeric vector UVEC to
  4618.      VALUE.  The return value is not specified.
  4619.  
  4620.     u64vector->list
  4621.  
  4622.  -- Scheme Procedure: u64vector->list uvec
  4623.      Convert the uniform numeric vector UVEC to a list.
  4624.  
  4625.     list->u64vector
  4626.  
  4627.  -- Scheme Procedure: list->u64vector l
  4628.      Convert the list L to a numeric uniform vector.
  4629.  
  4630.     any->u64vector
  4631.  
  4632.  -- Scheme Procedure: any->u64vector obj
  4633.      Convert OBJ, which can be a list, vector, or uniform vector, to a
  4634.      numeric uniform vector of type u64.
  4635.  
  4636.     s64vector?
  4637.  
  4638.  -- Scheme Procedure: s64vector? obj
  4639.      Return `#t' if OBJ is a vector of type s64, `#f' otherwise.
  4640.  
  4641.     make-s64vector
  4642.  
  4643.  -- Scheme Procedure: make-s64vector len [fill]
  4644.      Return a newly allocated uniform numeric vector which can hold LEN
  4645.      elements.  If FILL is given, it is used to initialize the
  4646.      elements, otherwise the contents of the vector is unspecified.
  4647.  
  4648.     s64vector
  4649.  
  4650.  -- Scheme Procedure: s64vector . l
  4651.      Return a newly allocated uniform numeric vector containing all
  4652.      argument values.
  4653.  
  4654.     s64vector-length
  4655.  
  4656.  -- Scheme Procedure: s64vector-length uvec
  4657.      Return the number of elements in the uniform numeric vector UVEC.
  4658.  
  4659.     s64vector-ref
  4660.  
  4661.  -- Scheme Procedure: s64vector-ref uvec index
  4662.      Return the element at INDEX in the uniform numeric vector UVEC.
  4663.  
  4664.     s64vector-set!
  4665.  
  4666.  -- Scheme Procedure: s64vector-set! uvec index value
  4667.      Set the element at INDEX in the uniform numeric vector UVEC to
  4668.      VALUE.  The return value is not specified.
  4669.  
  4670.     s64vector->list
  4671.  
  4672.  -- Scheme Procedure: s64vector->list uvec
  4673.      Convert the uniform numeric vector UVEC to a list.
  4674.  
  4675.     list->s64vector
  4676.  
  4677.  -- Scheme Procedure: list->s64vector l
  4678.      Convert the list L to a numeric uniform vector.
  4679.  
  4680.     any->s64vector
  4681.  
  4682.  -- Scheme Procedure: any->s64vector obj
  4683.      Convert OBJ, which can be a list, vector, or uniform vector, to a
  4684.      numeric uniform vector of type s64.
  4685.  
  4686.     f32vector?
  4687.  
  4688.  -- Scheme Procedure: f32vector? obj
  4689.      Return `#t' if OBJ is a vector of type f32, `#f' otherwise.
  4690.  
  4691.     make-f32vector
  4692.  
  4693.  -- Scheme Procedure: make-f32vector len [fill]
  4694.      Return a newly allocated uniform numeric vector which can hold LEN
  4695.      elements.  If FILL is given, it is used to initialize the
  4696.      elements, otherwise the contents of the vector is unspecified.
  4697.  
  4698.     f32vector
  4699.  
  4700.  -- Scheme Procedure: f32vector . l
  4701.      Return a newly allocated uniform numeric vector containing all
  4702.      argument values.
  4703.  
  4704.     f32vector-length
  4705.  
  4706.  -- Scheme Procedure: f32vector-length uvec
  4707.      Return the number of elements in the uniform numeric vector UVEC.
  4708.  
  4709.     f32vector-ref
  4710.  
  4711.  -- Scheme Procedure: f32vector-ref uvec index
  4712.      Return the element at INDEX in the uniform numeric vector UVEC.
  4713.  
  4714.     f32vector-set!
  4715.  
  4716.  -- Scheme Procedure: f32vector-set! uvec index value
  4717.      Set the element at INDEX in the uniform numeric vector UVEC to
  4718.      VALUE.  The return value is not specified.
  4719.  
  4720.     f32vector->list
  4721.  
  4722.  -- Scheme Procedure: f32vector->list uvec
  4723.      Convert the uniform numeric vector UVEC to a list.
  4724.  
  4725.     list->f32vector
  4726.  
  4727.  -- Scheme Procedure: list->f32vector l
  4728.      Convert the list L to a numeric uniform vector.
  4729.  
  4730.     any->f32vector
  4731.  
  4732.  -- Scheme Procedure: any->f32vector obj
  4733.      Convert OBJ, which can be a list, vector, or uniform vector, to a
  4734.      numeric uniform vector of type f32.
  4735.  
  4736.     f64vector?
  4737.  
  4738.  -- Scheme Procedure: f64vector? obj
  4739.      Return `#t' if OBJ is a vector of type f64, `#f' otherwise.
  4740.  
  4741.     make-f64vector
  4742.  
  4743.  -- Scheme Procedure: make-f64vector len [fill]
  4744.      Return a newly allocated uniform numeric vector which can hold LEN
  4745.      elements.  If FILL is given, it is used to initialize the
  4746.      elements, otherwise the contents of the vector is unspecified.
  4747.  
  4748.     f64vector
  4749.  
  4750.  -- Scheme Procedure: f64vector . l
  4751.      Return a newly allocated uniform numeric vector containing all
  4752.      argument values.
  4753.  
  4754.     f64vector-length
  4755.  
  4756.  -- Scheme Procedure: f64vector-length uvec
  4757.      Return the number of elements in the uniform numeric vector UVEC.
  4758.  
  4759.     f64vector-ref
  4760.  
  4761.  -- Scheme Procedure: f64vector-ref uvec index
  4762.      Return the element at INDEX in the uniform numeric vector UVEC.
  4763.  
  4764.     f64vector-set!
  4765.  
  4766.  -- Scheme Procedure: f64vector-set! uvec index value
  4767.      Set the element at INDEX in the uniform numeric vector UVEC to
  4768.      VALUE.  The return value is not specified.
  4769.  
  4770.     f64vector->list
  4771.  
  4772.  -- Scheme Procedure: f64vector->list uvec
  4773.      Convert the uniform numeric vector UVEC to a list.
  4774.  
  4775.     list->f64vector
  4776.  
  4777.  -- Scheme Procedure: list->f64vector l
  4778.      Convert the list L to a numeric uniform vector.
  4779.  
  4780.     any->f64vector
  4781.  
  4782.  -- Scheme Procedure: any->f64vector obj
  4783.      Convert OBJ, which can be a list, vector, or uniform vector, to a
  4784.      numeric uniform vector of type f64.
  4785.  
  4786.     c32vector?
  4787.  
  4788.  -- Scheme Procedure: c32vector? obj
  4789.      Return `#t' if OBJ is a vector of type c32, `#f' otherwise.
  4790.  
  4791.     make-c32vector
  4792.  
  4793.  -- Scheme Procedure: make-c32vector len [fill]
  4794.      Return a newly allocated uniform numeric vector which can hold LEN
  4795.      elements.  If FILL is given, it is used to initialize the
  4796.      elements, otherwise the contents of the vector is unspecified.
  4797.  
  4798.     c32vector
  4799.  
  4800.  -- Scheme Procedure: c32vector . l
  4801.      Return a newly allocated uniform numeric vector containing all
  4802.      argument values.
  4803.  
  4804.     c32vector-length
  4805.  
  4806.  -- Scheme Procedure: c32vector-length uvec
  4807.      Return the number of elements in the uniform numeric vector UVEC.
  4808.  
  4809.     c32vector-ref
  4810.  
  4811.  -- Scheme Procedure: c32vector-ref uvec index
  4812.      Return the element at INDEX in the uniform numeric vector UVEC.
  4813.  
  4814.     c32vector-set!
  4815.  
  4816.  -- Scheme Procedure: c32vector-set! uvec index value
  4817.      Set the element at INDEX in the uniform numeric vector UVEC to
  4818.      VALUE.  The return value is not specified.
  4819.  
  4820.     c32vector->list
  4821.  
  4822.  -- Scheme Procedure: c32vector->list uvec
  4823.      Convert the uniform numeric vector UVEC to a list.
  4824.  
  4825.     list->c32vector
  4826.  
  4827.  -- Scheme Procedure: list->c32vector l
  4828.      Convert the list L to a numeric uniform vector.
  4829.  
  4830.     any->c32vector
  4831.  
  4832.  -- Scheme Procedure: any->c32vector obj
  4833.      Convert OBJ, which can be a list, vector, or uniform vector, to a
  4834.      numeric uniform vector of type c32.
  4835.  
  4836.     c64vector?
  4837.  
  4838.  -- Scheme Procedure: c64vector? obj
  4839.      Return `#t' if OBJ is a vector of type c64, `#f' otherwise.
  4840.  
  4841.     make-c64vector
  4842.  
  4843.  -- Scheme Procedure: make-c64vector len [fill]
  4844.      Return a newly allocated uniform numeric vector which can hold LEN
  4845.      elements.  If FILL is given, it is used to initialize the
  4846.      elements, otherwise the contents of the vector is unspecified.
  4847.  
  4848.     c64vector
  4849.  
  4850.  -- Scheme Procedure: c64vector . l
  4851.      Return a newly allocated uniform numeric vector containing all
  4852.      argument values.
  4853.  
  4854.     c64vector-length
  4855.  
  4856.  -- Scheme Procedure: c64vector-length uvec
  4857.      Return the number of elements in the uniform numeric vector UVEC.
  4858.  
  4859.     c64vector-ref
  4860.  
  4861.  -- Scheme Procedure: c64vector-ref uvec index
  4862.      Return the element at INDEX in the uniform numeric vector UVEC.
  4863.  
  4864.     c64vector-set!
  4865.  
  4866.  -- Scheme Procedure: c64vector-set! uvec index value
  4867.      Set the element at INDEX in the uniform numeric vector UVEC to
  4868.      VALUE.  The return value is not specified.
  4869.  
  4870.     c64vector->list
  4871.  
  4872.  -- Scheme Procedure: c64vector->list uvec
  4873.      Convert the uniform numeric vector UVEC to a list.
  4874.  
  4875.     list->c64vector
  4876.  
  4877.  -- Scheme Procedure: list->c64vector l
  4878.      Convert the list L to a numeric uniform vector.
  4879.  
  4880.     any->c64vector
  4881.  
  4882.  -- Scheme Procedure: any->c64vector obj
  4883.      Convert OBJ, which can be a list, vector, or uniform vector, to a
  4884.      numeric uniform vector of type c64.
  4885.  
  4886.     string-null?
  4887.  
  4888.  -- Scheme Procedure: string-null? str
  4889.      Return `#t' if STR's length is zero, and `#f' otherwise.
  4890.           (string-null? "")  => #t
  4891.           y                    => "foo"
  4892.           (string-null? y)     => #f
  4893.  
  4894.     string-any-c-code
  4895.  
  4896.  -- Scheme Procedure: string-any-c-code char_pred s [start [end]]
  4897.      Check if CHAR_PRED is true for any character in string S.
  4898.  
  4899.      CHAR_PRED can be a character to check for any equal to that, or a
  4900.      character set (*note Character Sets::) to check for any in that
  4901.      set, or a predicate procedure to call.
  4902.  
  4903.      For a procedure, calls `(CHAR_PRED c)' are made successively on
  4904.      the characters from START to END.  If CHAR_PRED returns true (ie.
  4905.      non-`#f'), `string-any' stops and that return value is the return
  4906.      from `string-any'.  The call on the last character (ie. at END-1),
  4907.      if that point is reached, is a tail call.
  4908.  
  4909.      If there are no characters in S (ie. START equals END) then the
  4910.      return is `#f'.
  4911.  
  4912.  
  4913.     string-every-c-code
  4914.  
  4915.  -- Scheme Procedure: string-every-c-code char_pred s [start [end]]
  4916.      Check if CHAR_PRED is true for every character in string S.
  4917.  
  4918.      CHAR_PRED can be a character to check for every character equal to
  4919.      that, or a character set (*note Character Sets::) to check for
  4920.      every character being in that set, or a predicate procedure to
  4921.      call.
  4922.  
  4923.      For a procedure, calls `(CHAR_PRED c)' are made successively on
  4924.      the characters from START to END.  If CHAR_PRED returns `#f',
  4925.      `string-every' stops and returns `#f'.  The call on the last
  4926.      character (ie. at END-1), if that point is reached, is a tail call
  4927.      and the return from that call is the return from `string-every'.
  4928.  
  4929.      If there are no characters in S (ie. START equals END) then the
  4930.      return is `#t'.
  4931.  
  4932.  
  4933.     string-tabulate
  4934.  
  4935.  -- Scheme Procedure: string-tabulate proc len
  4936.      PROC is an integer->char procedure.  Construct a string of size
  4937.      LEN by applying PROC to each index to produce the corresponding
  4938.      string element.  The order in which PROC is applied to the indices
  4939.      is not specified.
  4940.  
  4941.     string->list
  4942.  
  4943.  -- Scheme Procedure: string->list str [start [end]]
  4944.      Convert the string STR into a list of characters.
  4945.  
  4946.     reverse-list->string
  4947.  
  4948.  -- Scheme Procedure: reverse-list->string chrs
  4949.      An efficient implementation of `(compose string->list reverse)':
  4950.  
  4951.           (reverse-list->string '(#\a #\B #\c)) => "cBa"
  4952.  
  4953.     string-join
  4954.  
  4955.  -- Scheme Procedure: string-join ls [delimiter [grammar]]
  4956.      Append the string in the string list LS, using the string DELIM as
  4957.      a delimiter between the elements of LS.  GRAMMAR is a symbol which
  4958.      specifies how the delimiter is placed between the strings, and
  4959.      defaults to the symbol `infix'.
  4960.  
  4961.     `infix'
  4962.           Insert the separator between list elements.  An empty string
  4963.           will produce an empty list.
  4964.  
  4965.     `string-infix'
  4966.           Like `infix', but will raise an error if given the empty list.
  4967.  
  4968.     `suffix'
  4969.           Insert the separator after every list element.
  4970.  
  4971.     `prefix'
  4972.           Insert the separator before each list element.
  4973.  
  4974.     string-copy
  4975.  
  4976.  -- Scheme Procedure: string-copy str [start [end]]
  4977.      Return a freshly allocated copy of the string STR.  If given,
  4978.      START and END delimit the portion of STR which is copied.
  4979.  
  4980.     string-copy!
  4981.  
  4982.  -- Scheme Procedure: string-copy! target tstart s [start [end]]
  4983.      Copy the sequence of characters from index range [START, END) in
  4984.      string S to string TARGET, beginning at index TSTART.  The
  4985.      characters are copied left-to-right or right-to-left as needed -
  4986.      the copy is guaranteed to work, even if TARGET and S are the same
  4987.      string.  It is an error if the copy operation runs off the end of
  4988.      the target string.
  4989.  
  4990.     substring-move!
  4991.  
  4992.  -- Scheme Procedure: substring-move! str1 start1 end1 str2 start2
  4993.      Copy the substring of STR1 bounded by START1 and END1 into STR2
  4994.      beginning at position START2.  STR1 and STR2 can be the same
  4995.      string.
  4996.  
  4997.     string-take
  4998.  
  4999.  -- Scheme Procedure: string-take s n
  5000.      Return the N first characters of S.
  5001.  
  5002.     string-drop
  5003.  
  5004.  -- Scheme Procedure: string-drop s n
  5005.      Return all but the first N characters of S.
  5006.  
  5007.     string-take-right
  5008.  
  5009.  -- Scheme Procedure: string-take-right s n
  5010.      Return the N last characters of S.
  5011.  
  5012.     string-drop-right
  5013.  
  5014.  -- Scheme Procedure: string-drop-right s n
  5015.      Return all but the last N characters of S.
  5016.  
  5017.     string-pad
  5018.  
  5019.  -- Scheme Procedure: string-pad s len [chr [start [end]]]
  5020.      Take that characters from START to END from the string S and
  5021.      return a new string, right-padded by the character CHR to length
  5022.      LEN.  If the resulting string is longer than LEN, it is truncated
  5023.      on the right.
  5024.  
  5025.     string-pad-right
  5026.  
  5027.  -- Scheme Procedure: string-pad-right s len [chr [start [end]]]
  5028.      Take that characters from START to END from the string S and
  5029.      return a new string, left-padded by the character CHR to length
  5030.      LEN.  If the resulting string is longer than LEN, it is truncated
  5031.      on the left.
  5032.  
  5033.     string-trim
  5034.  
  5035.  -- Scheme Procedure: string-trim s [char_pred [start [end]]]
  5036.      Trim S by skipping over all characters on the left that satisfy
  5037.      the parameter CHAR_PRED:
  5038.  
  5039.         * if it is the character CH, characters equal to CH are trimmed,
  5040.  
  5041.         * if it is a procedure PRED characters that satisfy PRED are
  5042.           trimmed,
  5043.  
  5044.         * if it is a character set, characters in that set are trimmed.
  5045.  
  5046.      If called without a CHAR_PRED argument, all whitespace is trimmed.
  5047.  
  5048.     string-trim-right
  5049.  
  5050.  -- Scheme Procedure: string-trim-right s [char_pred [start [end]]]
  5051.      Trim S by skipping over all characters on the rightt that satisfy
  5052.      the parameter CHAR_PRED:
  5053.  
  5054.         * if it is the character CH, characters equal to CH are trimmed,
  5055.  
  5056.         * if it is a procedure PRED characters that satisfy PRED are
  5057.           trimmed,
  5058.  
  5059.         * if it is a character sets, all characters in that set are
  5060.           trimmed.
  5061.  
  5062.      If called without a CHAR_PRED argument, all whitespace is trimmed.
  5063.  
  5064.     string-trim-both
  5065.  
  5066.  -- Scheme Procedure: string-trim-both s [char_pred [start [end]]]
  5067.      Trim S by skipping over all characters on both sides of the string
  5068.      that satisfy the parameter CHAR_PRED:
  5069.  
  5070.         * if it is the character CH, characters equal to CH are trimmed,
  5071.  
  5072.         * if it is a procedure PRED characters that satisfy PRED are
  5073.           trimmed,
  5074.  
  5075.         * if it is a character set, the characters in the set are
  5076.           trimmed.
  5077.  
  5078.      If called without a CHAR_PRED argument, all whitespace is trimmed.
  5079.  
  5080.     string-fill!
  5081.  
  5082.  -- Scheme Procedure: string-fill! str chr [start [end]]
  5083.      Stores CHR in every element of the given STR and returns an
  5084.      unspecified value.
  5085.  
  5086.     string-compare
  5087.  
  5088.  -- Scheme Procedure: string-compare s1 s2 proc_lt proc_eq proc_gt
  5089.           [start1 [end1 [start2 [end2]]]]
  5090.      Apply PROC_LT, PROC_EQ, PROC_GT to the mismatch index, depending
  5091.      upon whether S1 is less than, equal to, or greater than S2.  The
  5092.      mismatch index is the largest index I such that for every 0 <= J <
  5093.      I, S1[J] = S2[J] - that is, I is the first position that does not
  5094.      match.
  5095.  
  5096.     string-compare-ci
  5097.  
  5098.  -- Scheme Procedure: string-compare-ci s1 s2 proc_lt proc_eq proc_gt
  5099.           [start1 [end1 [start2 [end2]]]]
  5100.      Apply PROC_LT, PROC_EQ, PROC_GT to the mismatch index, depending
  5101.      upon whether S1 is less than, equal to, or greater than S2.  The
  5102.      mismatch index is the largest index I such that for every 0 <= J <
  5103.      I, S1[J] = S2[J] - that is, I is the first position that does not
  5104.      match.  The character comparison is done case-insensitively.
  5105.  
  5106.     string=
  5107.  
  5108.  -- Scheme Procedure: string= s1 s2 [start1 [end1 [start2 [end2]]]]
  5109.      Return `#f' if S1 and S2 are not equal, a true value otherwise.
  5110.  
  5111.     string<>
  5112.  
  5113.  -- Scheme Procedure: string<> s1 s2 [start1 [end1 [start2 [end2]]]]
  5114.      Return `#f' if S1 and S2 are equal, a true value otherwise.
  5115.  
  5116.     string<
  5117.  
  5118.  -- Scheme Procedure: string< s1 s2 [start1 [end1 [start2 [end2]]]]
  5119.      Return `#f' if S1 is greater or equal to S2, a true value
  5120.      otherwise.
  5121.  
  5122.     string>
  5123.  
  5124.  -- Scheme Procedure: string> s1 s2 [start1 [end1 [start2 [end2]]]]
  5125.      Return `#f' if S1 is less or equal to S2, a true value otherwise.
  5126.  
  5127.     string<=
  5128.  
  5129.  -- Scheme Procedure: string<= s1 s2 [start1 [end1 [start2 [end2]]]]
  5130.      Return `#f' if S1 is greater to S2, a true value otherwise.
  5131.  
  5132.     string>=
  5133.  
  5134.  -- Scheme Procedure: string>= s1 s2 [start1 [end1 [start2 [end2]]]]
  5135.      Return `#f' if S1 is less to S2, a true value otherwise.
  5136.  
  5137.     string-ci=
  5138.  
  5139.  -- Scheme Procedure: string-ci= s1 s2 [start1 [end1 [start2 [end2]]]]
  5140.      Return `#f' if S1 and S2 are not equal, a true value otherwise.
  5141.      The character comparison is done case-insensitively.
  5142.  
  5143.     string-ci<>
  5144.  
  5145.  -- Scheme Procedure: string-ci<> s1 s2 [start1 [end1 [start2 [end2]]]]
  5146.      Return `#f' if S1 and S2 are equal, a true value otherwise.  The
  5147.      character comparison is done case-insensitively.
  5148.  
  5149.     string-ci<
  5150.  
  5151.  -- Scheme Procedure: string-ci< s1 s2 [start1 [end1 [start2 [end2]]]]
  5152.      Return `#f' if S1 is greater or equal to S2, a true value
  5153.      otherwise.  The character comparison is done case-insensitively.
  5154.  
  5155.     string-ci>
  5156.  
  5157.  -- Scheme Procedure: string-ci> s1 s2 [start1 [end1 [start2 [end2]]]]
  5158.      Return `#f' if S1 is less or equal to S2, a true value otherwise.
  5159.      The character comparison is done case-insensitively.
  5160.  
  5161.     string-ci<=
  5162.  
  5163.  -- Scheme Procedure: string-ci<= s1 s2 [start1 [end1 [start2 [end2]]]]
  5164.      Return `#f' if S1 is greater to S2, a true value otherwise.  The
  5165.      character comparison is done case-insensitively.
  5166.  
  5167.     string-ci>=
  5168.  
  5169.  -- Scheme Procedure: string-ci>= s1 s2 [start1 [end1 [start2 [end2]]]]
  5170.      Return `#f' if S1 is less to S2, a true value otherwise.  The
  5171.      character comparison is done case-insensitively.
  5172.  
  5173.     string-hash
  5174.  
  5175.  -- Scheme Procedure: string-hash s [bound [start [end]]]
  5176.      Compute a hash value for S.  the optional argument BOUND is a
  5177.      non-negative exact integer specifying the range of the hash
  5178.      function. A positive value restricts the return value to the range
  5179.      [0,bound).
  5180.  
  5181.     string-hash-ci
  5182.  
  5183.  -- Scheme Procedure: string-hash-ci s [bound [start [end]]]
  5184.      Compute a hash value for S.  the optional argument BOUND is a
  5185.      non-negative exact integer specifying the range of the hash
  5186.      function. A positive value restricts the return value to the range
  5187.      [0,bound).
  5188.  
  5189.     string-prefix-length
  5190.  
  5191.  -- Scheme Procedure: string-prefix-length s1 s2 [start1 [end1 [start2
  5192.           [end2]]]]
  5193.      Return the length of the longest common prefix of the two strings.
  5194.  
  5195.     string-prefix-length-ci
  5196.  
  5197.  -- Scheme Procedure: string-prefix-length-ci s1 s2 [start1 [end1
  5198.           [start2 [end2]]]]
  5199.      Return the length of the longest common prefix of the two strings,
  5200.      ignoring character case.
  5201.  
  5202.     string-suffix-length
  5203.  
  5204.  -- Scheme Procedure: string-suffix-length s1 s2 [start1 [end1 [start2
  5205.           [end2]]]]
  5206.      Return the length of the longest common suffix of the two strings.
  5207.  
  5208.     string-suffix-length-ci
  5209.  
  5210.  -- Scheme Procedure: string-suffix-length-ci s1 s2 [start1 [end1
  5211.           [start2 [end2]]]]
  5212.      Return the length of the longest common suffix of the two strings,
  5213.      ignoring character case.
  5214.  
  5215.     string-prefix?
  5216.  
  5217.  -- Scheme Procedure: string-prefix? s1 s2 [start1 [end1 [start2
  5218.           [end2]]]]
  5219.      Is S1 a prefix of S2?
  5220.  
  5221.     string-prefix-ci?
  5222.  
  5223.  -- Scheme Procedure: string-prefix-ci? s1 s2 [start1 [end1 [start2
  5224.           [end2]]]]
  5225.      Is S1 a prefix of S2, ignoring character case?
  5226.  
  5227.     string-suffix?
  5228.  
  5229.  -- Scheme Procedure: string-suffix? s1 s2 [start1 [end1 [start2
  5230.           [end2]]]]
  5231.      Is S1 a suffix of S2?
  5232.  
  5233.     string-suffix-ci?
  5234.  
  5235.  -- Scheme Procedure: string-suffix-ci? s1 s2 [start1 [end1 [start2
  5236.           [end2]]]]
  5237.      Is S1 a suffix of S2, ignoring character case?
  5238.  
  5239.     string-index
  5240.  
  5241.  -- Scheme Procedure: string-index s char_pred [start [end]]
  5242.      Search through the string S from left to right, returning the
  5243.      index of the first occurence of a character which
  5244.  
  5245.         * equals CHAR_PRED, if it is character,
  5246.  
  5247.         * satisifies the predicate CHAR_PRED, if it is a procedure,
  5248.  
  5249.         * is in the set CHAR_PRED, if it is a character set.
  5250.  
  5251.     string-index-right
  5252.  
  5253.  -- Scheme Procedure: string-index-right s char_pred [start [end]]
  5254.      Search through the string S from right to left, returning the
  5255.      index of the last occurence of a character which
  5256.  
  5257.         * equals CHAR_PRED, if it is character,
  5258.  
  5259.         * satisifies the predicate CHAR_PRED, if it is a procedure,
  5260.  
  5261.         * is in the set if CHAR_PRED is a character set.
  5262.  
  5263.     string-rindex
  5264.  
  5265.  -- Scheme Procedure: string-rindex s char_pred [start [end]]
  5266.      Search through the string S from right to left, returning the
  5267.      index of the last occurence of a character which
  5268.  
  5269.         * equals CHAR_PRED, if it is character,
  5270.  
  5271.         * satisifies the predicate CHAR_PRED, if it is a procedure,
  5272.  
  5273.         * is in the set if CHAR_PRED is a character set.
  5274.  
  5275.     string-skip
  5276.  
  5277.  -- Scheme Procedure: string-skip s char_pred [start [end]]
  5278.      Search through the string S from left to right, returning the
  5279.      index of the first occurence of a character which
  5280.  
  5281.         * does not equal CHAR_PRED, if it is character,
  5282.  
  5283.         * does not satisify the predicate CHAR_PRED, if it is a
  5284.           procedure,
  5285.  
  5286.         * is not in the set if CHAR_PRED is a character set.
  5287.  
  5288.     string-skip-right
  5289.  
  5290.  -- Scheme Procedure: string-skip-right s char_pred [start [end]]
  5291.      Search through the string S from right to left, returning the
  5292.      index of the last occurence of a character which
  5293.  
  5294.         * does not equal CHAR_PRED, if it is character,
  5295.  
  5296.         * does not satisfy the predicate CHAR_PRED, if it is a
  5297.           procedure,
  5298.  
  5299.         * is not in the set if CHAR_PRED is a character set.
  5300.  
  5301.     string-count
  5302.  
  5303.  -- Scheme Procedure: string-count s char_pred [start [end]]
  5304.      Return the count of the number of characters in the string S which
  5305.  
  5306.         * equals CHAR_PRED, if it is character,
  5307.  
  5308.         * satisifies the predicate CHAR_PRED, if it is a procedure.
  5309.  
  5310.         * is in the set CHAR_PRED, if it is a character set.
  5311.  
  5312.     string-contains
  5313.  
  5314.  -- Scheme Procedure: string-contains s1 s2 [start1 [end1 [start2
  5315.           [end2]]]]
  5316.      Does string S1 contain string S2?  Return the index in S1 where S2
  5317.      occurs as a substring, or false.  The optional start/end indices
  5318.      restrict the operation to the indicated substrings.
  5319.  
  5320.     string-contains-ci
  5321.  
  5322.  -- Scheme Procedure: string-contains-ci s1 s2 [start1 [end1 [start2
  5323.           [end2]]]]
  5324.      Does string S1 contain string S2?  Return the index in S1 where S2
  5325.      occurs as a substring, or false.  The optional start/end indices
  5326.      restrict the operation to the indicated substrings.  Character
  5327.      comparison is done case-insensitively.
  5328.  
  5329.     string-upcase!
  5330.  
  5331.  -- Scheme Procedure: string-upcase! str [start [end]]
  5332.      Destructively upcase every character in `str'.
  5333.  
  5334.           (string-upcase! y)
  5335.           => "ARRDEFG"
  5336.           y
  5337.           => "ARRDEFG"
  5338.  
  5339.     string-upcase
  5340.  
  5341.  -- Scheme Procedure: string-upcase str [start [end]]
  5342.      Upcase every character in `str'.
  5343.  
  5344.     string-downcase!
  5345.  
  5346.  -- Scheme Procedure: string-downcase! str [start [end]]
  5347.      Destructively downcase every character in STR.
  5348.  
  5349.           y
  5350.           => "ARRDEFG"
  5351.           (string-downcase! y)
  5352.           => "arrdefg"
  5353.           y
  5354.           => "arrdefg"
  5355.  
  5356.     string-downcase
  5357.  
  5358.  -- Scheme Procedure: string-downcase str [start [end]]
  5359.      Downcase every character in STR.
  5360.  
  5361.     string-titlecase!
  5362.  
  5363.  -- Scheme Procedure: string-titlecase! str [start [end]]
  5364.      Destructively titlecase every first character in a word in STR.
  5365.  
  5366.     string-titlecase
  5367.  
  5368.  -- Scheme Procedure: string-titlecase str [start [end]]
  5369.      Titlecase every first character in a word in STR.
  5370.  
  5371.     string-capitalize!
  5372.  
  5373.  -- Scheme Procedure: string-capitalize! str
  5374.      Upcase the first character of every word in STR destructively and
  5375.      return STR.
  5376.  
  5377.           y                      => "hello world"
  5378.           (string-capitalize! y) => "Hello World"
  5379.           y                      => "Hello World"
  5380.  
  5381.     string-capitalize
  5382.  
  5383.  -- Scheme Procedure: string-capitalize str
  5384.      Return a freshly allocated string with the characters in STR,
  5385.      where the first character of every word is capitalized.
  5386.  
  5387.     string-reverse
  5388.  
  5389.  -- Scheme Procedure: string-reverse str [start [end]]
  5390.      Reverse the string STR.  The optional arguments START and END
  5391.      delimit the region of STR to operate on.
  5392.  
  5393.     string-reverse!
  5394.  
  5395.  -- Scheme Procedure: string-reverse! str [start [end]]
  5396.      Reverse the string STR in-place.  The optional arguments START and
  5397.      END delimit the region of STR to operate on.  The return value is
  5398.      unspecified.
  5399.  
  5400.     string-append/shared
  5401.  
  5402.  -- Scheme Procedure: string-append/shared . rest
  5403.      Like `string-append', but the result may share memory with the
  5404.      argument strings.
  5405.  
  5406.     string-concatenate
  5407.  
  5408.  -- Scheme Procedure: string-concatenate ls
  5409.      Append the elements of LS (which must be strings) together into a
  5410.      single string.  Guaranteed to return a freshly allocated string.
  5411.  
  5412.     string-concatenate-reverse
  5413.  
  5414.  -- Scheme Procedure: string-concatenate-reverse ls [final_string [end]]
  5415.      Without optional arguments, this procedure is equivalent to
  5416.  
  5417.           (string-concatenate (reverse ls))
  5418.  
  5419.      If the optional argument FINAL_STRING is specified, it is consed
  5420.      onto the beginning to LS before performing the list-reverse and
  5421.      string-concatenate operations.  If END is given, only the
  5422.      characters of FINAL_STRING up to index END are used.
  5423.  
  5424.      Guaranteed to return a freshly allocated string.
  5425.  
  5426.     string-concatenate/shared
  5427.  
  5428.  -- Scheme Procedure: string-concatenate/shared ls
  5429.      Like `string-concatenate', but the result may share memory with
  5430.      the strings in the list LS.
  5431.  
  5432.     string-concatenate-reverse/shared
  5433.  
  5434.  -- Scheme Procedure: string-concatenate-reverse/shared ls
  5435.           [final_string [end]]
  5436.      Like `string-concatenate-reverse', but the result may share memory
  5437.      with the the strings in the LS arguments.
  5438.  
  5439.     string-map
  5440.  
  5441.  -- Scheme Procedure: string-map proc s [start [end]]
  5442.      PROC is a char->char procedure, it is mapped over S.  The order in
  5443.      which the procedure is applied to the string elements is not
  5444.      specified.
  5445.  
  5446.     string-map!
  5447.  
  5448.  -- Scheme Procedure: string-map! proc s [start [end]]
  5449.      PROC is a char->char procedure, it is mapped over S.  The order in
  5450.      which the procedure is applied to the string elements is not
  5451.      specified.  The string S is modified in-place, the return value is
  5452.      not specified.
  5453.  
  5454.     string-fold
  5455.  
  5456.  -- Scheme Procedure: string-fold kons knil s [start [end]]
  5457.      Fold KONS over the characters of S, with KNIL as the terminating
  5458.      element, from left to right.  KONS must expect two arguments: The
  5459.      actual character and the last result of KONS' application.
  5460.  
  5461.     string-fold-right
  5462.  
  5463.  -- Scheme Procedure: string-fold-right kons knil s [start [end]]
  5464.      Fold KONS over the characters of S, with KNIL as the terminating
  5465.      element, from right to left.  KONS must expect two arguments: The
  5466.      actual character and the last result of KONS' application.
  5467.  
  5468.     string-unfold
  5469.  
  5470.  -- Scheme Procedure: string-unfold p f g seed [base [make_final]]
  5471.         * G is used to generate a series of _seed_ values from the
  5472.           initial SEED: SEED, (G SEED), (G^2 SEED), (G^3 SEED), ...
  5473.  
  5474.         * P tells us when to stop - when it returns true when applied
  5475.           to one of these seed values.
  5476.  
  5477.         * F maps each seed value to the corresponding character in the
  5478.           result string.  These chars are assembled into the string in
  5479.           a left-to-right order.
  5480.  
  5481.         * BASE is the optional initial/leftmost portion of the
  5482.           constructed string; it default to the empty string.
  5483.  
  5484.         * MAKE_FINAL is applied to the terminal seed value (on which P
  5485.           returns true) to produce the final/rightmost portion of the
  5486.           constructed string.  It defaults to `(lambda (x) )'.
  5487.  
  5488.     string-unfold-right
  5489.  
  5490.  -- Scheme Procedure: string-unfold-right p f g seed [base [make_final]]
  5491.         * G is used to generate a series of _seed_ values from the
  5492.           initial SEED: SEED, (G SEED), (G^2 SEED), (G^3 SEED), ...
  5493.  
  5494.         * P tells us when to stop - when it returns true when applied
  5495.           to one of these seed values.
  5496.  
  5497.         * F maps each seed value to the corresponding character in the
  5498.           result string.  These chars are assembled into the string in
  5499.           a right-to-left order.
  5500.  
  5501.         * BASE is the optional initial/rightmost portion of the
  5502.           constructed string; it default to the empty string.
  5503.  
  5504.         * MAKE_FINAL is applied to the terminal seed value (on which P
  5505.           returns true) to produce the final/leftmost portion of the
  5506.           constructed string.  It defaults to `(lambda (x) )'.
  5507.  
  5508.     string-for-each
  5509.  
  5510.  -- Scheme Procedure: string-for-each proc s [start [end]]
  5511.      PROC is mapped over S in left-to-right order.  The return value is
  5512.      not specified.
  5513.  
  5514.     string-for-each-index
  5515.  
  5516.  -- Scheme Procedure: string-for-each-index proc s [start [end]]
  5517.      Call `(PROC i)' for each index i in S, from left to right.
  5518.  
  5519.      For example, to change characters to alternately upper and lower
  5520.      case,
  5521.  
  5522.           (define str (string-copy "studly"))
  5523.           (string-for-each-index
  5524.               (lambda (i)
  5525.                 (string-set! str i
  5526.                   ((if (even? i) char-upcase char-downcase)
  5527.                    (string-ref str i))))
  5528.               str)
  5529.           str => "StUdLy"
  5530.  
  5531.     xsubstring
  5532.  
  5533.  -- Scheme Procedure: xsubstring s from [to [start [end]]]
  5534.      This is the _extended substring_ procedure that implements
  5535.      replicated copying of a substring of some string.
  5536.  
  5537.      S is a string, START and END are optional arguments that demarcate
  5538.      a substring of S, defaulting to 0 and the length of S.  Replicate
  5539.      this substring up and down index space, in both the positive and
  5540.      negative directions.  `xsubstring' returns the substring of this
  5541.      string beginning at index FROM, and ending at TO, which defaults
  5542.      to FROM + (END - START).
  5543.  
  5544.     string-xcopy!
  5545.  
  5546.  -- Scheme Procedure: string-xcopy! target tstart s sfrom [sto [start
  5547.           [end]]]
  5548.      Exactly the same as `xsubstring', but the extracted text is
  5549.      written into the string TARGET starting at index TSTART.  The
  5550.      operation is not defined if `(eq?  TARGET S)' or these arguments
  5551.      share storage - you cannot copy a string on top of itself.
  5552.  
  5553.     string-replace
  5554.  
  5555.  -- Scheme Procedure: string-replace s1 s2 [start1 [end1 [start2
  5556.           [end2]]]]
  5557.      Return the string S1, but with the characters START1 ... END1
  5558.      replaced by the characters START2 ... END2 from S2.
  5559.  
  5560.     string-tokenize
  5561.  
  5562.  -- Scheme Procedure: string-tokenize s [token_set [start [end]]]
  5563.      Split the string S into a list of substrings, where each substring
  5564.      is a maximal non-empty contiguous sequence of characters from the
  5565.      character set TOKEN_SET, which defaults to `char-set:graphic'.  If
  5566.      START or END indices are provided, they restrict `string-tokenize'
  5567.      to operating on the indicated substring of S.
  5568.  
  5569.     string-split
  5570.  
  5571.  -- Scheme Procedure: string-split str chr
  5572.      Split the string STR into the a list of the substrings delimited
  5573.      by appearances of the character CHR.  Note that an empty substring
  5574.      between separator characters will result in an empty string in the
  5575.      result list.
  5576.  
  5577.           (string-split "root:x:0:0:root:/root:/bin/bash" #\:)
  5578.           =>
  5579.           ("root" "x" "0" "0" "root" "/root" "/bin/bash")
  5580.  
  5581.           (string-split "::" #\:)
  5582.           =>
  5583.           ("" "" "")
  5584.  
  5585.           (string-split "" #\:)
  5586.           =>
  5587.           ("")
  5588.  
  5589.     string-filter
  5590.  
  5591.  -- Scheme Procedure: string-filter s char_pred [start [end]]
  5592.      Filter the string S, retaining only those characters which satisfy
  5593.      CHAR_PRED.
  5594.  
  5595.      If CHAR_PRED is a procedure, it is applied to each character as a
  5596.      predicate, if it is a character, it is tested for equality and if
  5597.      it is a character set, it is tested for membership.
  5598.  
  5599.     string-delete
  5600.  
  5601.  -- Scheme Procedure: string-delete s char_pred [start [end]]
  5602.      Delete characters satisfying CHAR_PRED from S.
  5603.  
  5604.      If CHAR_PRED is a procedure, it is applied to each character as a
  5605.      predicate, if it is a character, it is tested for equality and if
  5606.      it is a character set, it is tested for membership.
  5607.  
  5608.     char-set?
  5609.  
  5610.  -- Scheme Procedure: char-set? obj
  5611.      Return `#t' if OBJ is a character set, `#f' otherwise.
  5612.  
  5613.     char-set=
  5614.  
  5615.  -- Scheme Procedure: char-set= . char_sets
  5616.      Return `#t' if all given character sets are equal.
  5617.  
  5618.     char-set<=
  5619.  
  5620.  -- Scheme Procedure: char-set<= . char_sets
  5621.      Return `#t' if every character set CSi is a subset of character
  5622.      set CSi+1.
  5623.  
  5624.     char-set-hash
  5625.  
  5626.  -- Scheme Procedure: char-set-hash cs [bound]
  5627.      Compute a hash value for the character set CS.  If BOUND is given
  5628.      and non-zero, it restricts the returned value to the range 0 ...
  5629.      BOUND - 1.
  5630.  
  5631.     char-set-cursor
  5632.  
  5633.  -- Scheme Procedure: char-set-cursor cs
  5634.      Return a cursor into the character set CS.
  5635.  
  5636.     char-set-ref
  5637.  
  5638.  -- Scheme Procedure: char-set-ref cs cursor
  5639.      Return the character at the current cursor position CURSOR in the
  5640.      character set CS.  It is an error to pass a cursor for which
  5641.      `end-of-char-set?' returns true.
  5642.  
  5643.     char-set-cursor-next
  5644.  
  5645.  -- Scheme Procedure: char-set-cursor-next cs cursor
  5646.      Advance the character set cursor CURSOR to the next character in
  5647.      the character set CS.  It is an error if the cursor given
  5648.      satisfies `end-of-char-set?'.
  5649.  
  5650.     end-of-char-set?
  5651.  
  5652.  -- Scheme Procedure: end-of-char-set? cursor
  5653.      Return `#t' if CURSOR has reached the end of a character set, `#f'
  5654.      otherwise.
  5655.  
  5656.     char-set-fold
  5657.  
  5658.  -- Scheme Procedure: char-set-fold kons knil cs
  5659.      Fold the procedure KONS over the character set CS, initializing it
  5660.      with KNIL.
  5661.  
  5662.     char-set-unfold
  5663.  
  5664.  -- Scheme Procedure: char-set-unfold p f g seed [base_cs]
  5665.      This is a fundamental constructor for character sets.
  5666.         * G is used to generate a series of "seed" values from the
  5667.           initial seed: SEED, (G SEED), (G^2 SEED), (G^3 SEED), ...
  5668.  
  5669.         * P tells us when to stop - when it returns true when applied
  5670.           to one of the seed values.
  5671.  
  5672.         * F maps each seed value to a character. These characters are
  5673.           added to the base character set BASE_CS to form the result;
  5674.           BASE_CS defaults to the empty set.
  5675.  
  5676.     char-set-unfold!
  5677.  
  5678.  -- Scheme Procedure: char-set-unfold! p f g seed base_cs
  5679.      This is a fundamental constructor for character sets.
  5680.         * G is used to generate a series of "seed" values from the
  5681.           initial seed: SEED, (G SEED), (G^2 SEED), (G^3 SEED), ...
  5682.  
  5683.         * P tells us when to stop - when it returns true when applied
  5684.           to one of the seed values.
  5685.  
  5686.         * F maps each seed value to a character. These characters are
  5687.           added to the base character set BASE_CS to form the result;
  5688.           BASE_CS defaults to the empty set.
  5689.  
  5690.     char-set-for-each
  5691.  
  5692.  -- Scheme Procedure: char-set-for-each proc cs
  5693.      Apply PROC to every character in the character set CS.  The return
  5694.      value is not specified.
  5695.  
  5696.     char-set-map
  5697.  
  5698.  -- Scheme Procedure: char-set-map proc cs
  5699.      Map the procedure PROC over every character in CS.  PROC must be a
  5700.      character -> character procedure.
  5701.  
  5702.     char-set-copy
  5703.  
  5704.  -- Scheme Procedure: char-set-copy cs
  5705.      Return a newly allocated character set containing all characters
  5706.      in CS.
  5707.  
  5708.     char-set
  5709.  
  5710.  -- Scheme Procedure: char-set . rest
  5711.      Return a character set containing all given characters.
  5712.  
  5713.     list->char-set
  5714.  
  5715.  -- Scheme Procedure: list->char-set list [base_cs]
  5716.      Convert the character list LIST to a character set.  If the
  5717.      character set BASE_CS is given, the character in this set are also
  5718.      included in the result.
  5719.  
  5720.     list->char-set!
  5721.  
  5722.  -- Scheme Procedure: list->char-set! list base_cs
  5723.      Convert the character list LIST to a character set.  The
  5724.      characters are added to BASE_CS and BASE_CS is returned.
  5725.  
  5726.     string->char-set
  5727.  
  5728.  -- Scheme Procedure: string->char-set str [base_cs]
  5729.      Convert the string STR to a character set.  If the character set
  5730.      BASE_CS is given, the characters in this set are also included in
  5731.      the result.
  5732.  
  5733.     string->char-set!
  5734.  
  5735.  -- Scheme Procedure: string->char-set! str base_cs
  5736.      Convert the string STR to a character set.  The characters from
  5737.      the string are added to BASE_CS, and BASE_CS is returned.
  5738.  
  5739.     char-set-filter
  5740.  
  5741.  -- Scheme Procedure: char-set-filter pred cs [base_cs]
  5742.      Return a character set containing every character from CS so that
  5743.      it satisfies PRED.  If provided, the characters from BASE_CS are
  5744.      added to the result.
  5745.  
  5746.     char-set-filter!
  5747.  
  5748.  -- Scheme Procedure: char-set-filter! pred cs base_cs
  5749.      Return a character set containing every character from CS so that
  5750.      it satisfies PRED.  The characters are added to BASE_CS and
  5751.      BASE_CS is returned.
  5752.  
  5753.     ucs-range->char-set
  5754.  
  5755.  -- Scheme Procedure: ucs-range->char-set lower upper [error [base_cs]]
  5756.      Return a character set containing all characters whose character
  5757.      codes lie in the half-open range [LOWER,UPPER).
  5758.  
  5759.      If ERROR is a true value, an error is signalled if the specified
  5760.      range contains characters which are not contained in the
  5761.      implemented character range.  If ERROR is `#f', these characters
  5762.      are silently left out of the resultung character set.
  5763.  
  5764.      The characters in BASE_CS are added to the result, if given.
  5765.  
  5766.     ucs-range->char-set!
  5767.  
  5768.  -- Scheme Procedure: ucs-range->char-set! lower upper error base_cs
  5769.      Return a character set containing all characters whose character
  5770.      codes lie in the half-open range [LOWER,UPPER).
  5771.  
  5772.      If ERROR is a true value, an error is signalled if the specified
  5773.      range contains characters which are not contained in the
  5774.      implemented character range.  If ERROR is `#f', these characters
  5775.      are silently left out of the resultung character set.
  5776.  
  5777.      The characters are added to BASE_CS and BASE_CS is returned.
  5778.  
  5779.     ->char-set
  5780.  
  5781.  -- Scheme Procedure: ->char-set x
  5782.      Coerces x into a char-set. X may be a string, character or
  5783.      char-set. A string is converted to the set of its constituent
  5784.      characters; a character is converted to a singleton set; a
  5785.      char-set is returned as-is.
  5786.  
  5787.     char-set-size
  5788.  
  5789.  -- Scheme Procedure: char-set-size cs
  5790.      Return the number of elements in character set CS.
  5791.  
  5792.     char-set-count
  5793.  
  5794.  -- Scheme Procedure: char-set-count pred cs
  5795.      Return the number of the elements int the character set CS which
  5796.      satisfy the predicate PRED.
  5797.  
  5798.     char-set->list
  5799.  
  5800.  -- Scheme Procedure: char-set->list cs
  5801.      Return a list containing the elements of the character set CS.
  5802.  
  5803.     char-set->string
  5804.  
  5805.  -- Scheme Procedure: char-set->string cs
  5806.      Return a string containing the elements of the character set CS.
  5807.      The order in which the characters are placed in the string is not
  5808.      defined.
  5809.  
  5810.     char-set-contains?
  5811.  
  5812.  -- Scheme Procedure: char-set-contains? cs ch
  5813.      Return `#t' iff the character CH is contained in the character set
  5814.      CS.
  5815.  
  5816.     char-set-every
  5817.  
  5818.  -- Scheme Procedure: char-set-every pred cs
  5819.      Return a true value if every character in the character set CS
  5820.      satisfies the predicate PRED.
  5821.  
  5822.     char-set-any
  5823.  
  5824.  -- Scheme Procedure: char-set-any pred cs
  5825.      Return a true value if any character in the character set CS
  5826.      satisfies the predicate PRED.
  5827.  
  5828.     char-set-adjoin
  5829.  
  5830.  -- Scheme Procedure: char-set-adjoin cs . rest
  5831.      Add all character arguments to the first argument, which must be a
  5832.      character set.
  5833.  
  5834.     char-set-delete
  5835.  
  5836.  -- Scheme Procedure: char-set-delete cs . rest
  5837.      Delete all character arguments from the first argument, which must
  5838.      be a character set.
  5839.  
  5840.     char-set-adjoin!
  5841.  
  5842.  -- Scheme Procedure: char-set-adjoin! cs . rest
  5843.      Add all character arguments to the first argument, which must be a
  5844.      character set.
  5845.  
  5846.     char-set-delete!
  5847.  
  5848.  -- Scheme Procedure: char-set-delete! cs . rest
  5849.      Delete all character arguments from the first argument, which must
  5850.      be a character set.
  5851.  
  5852.     char-set-complement
  5853.  
  5854.  -- Scheme Procedure: char-set-complement cs
  5855.      Return the complement of the character set CS.
  5856.  
  5857.     char-set-union
  5858.  
  5859.  -- Scheme Procedure: char-set-union . rest
  5860.      Return the union of all argument character sets.
  5861.  
  5862.     char-set-intersection
  5863.  
  5864.  -- Scheme Procedure: char-set-intersection . rest
  5865.      Return the intersection of all argument character sets.
  5866.  
  5867.     char-set-difference
  5868.  
  5869.  -- Scheme Procedure: char-set-difference cs1 . rest
  5870.      Return the difference of all argument character sets.
  5871.  
  5872.     char-set-xor
  5873.  
  5874.  -- Scheme Procedure: char-set-xor . rest
  5875.      Return the exclusive-or of all argument character sets.
  5876.  
  5877.     char-set-diff+intersection
  5878.  
  5879.  -- Scheme Procedure: char-set-diff+intersection cs1 . rest
  5880.      Return the difference and the intersection of all argument
  5881.      character sets.
  5882.  
  5883.     char-set-complement!
  5884.  
  5885.  -- Scheme Procedure: char-set-complement! cs
  5886.      Return the complement of the character set CS.
  5887.  
  5888.     char-set-union!
  5889.  
  5890.  -- Scheme Procedure: char-set-union! cs1 . rest
  5891.      Return the union of all argument character sets.
  5892.  
  5893.     char-set-intersection!
  5894.  
  5895.  -- Scheme Procedure: char-set-intersection! cs1 . rest
  5896.      Return the intersection of all argument character sets.
  5897.  
  5898.     char-set-difference!
  5899.  
  5900.  -- Scheme Procedure: char-set-difference! cs1 . rest
  5901.      Return the difference of all argument character sets.
  5902.  
  5903.     char-set-xor!
  5904.  
  5905.  -- Scheme Procedure: char-set-xor! cs1 . rest
  5906.      Return the exclusive-or of all argument character sets.
  5907.  
  5908.     char-set-diff+intersection!
  5909.  
  5910.  -- Scheme Procedure: char-set-diff+intersection! cs1 cs2 . rest
  5911.      Return the difference and the intersection of all argument
  5912.      character sets.
  5913.  
  5914.     string=?
  5915.  
  5916.  -- Scheme Procedure: string=? s1 s2
  5917.      Lexicographic equality predicate; return `#t' if the two strings
  5918.      are the same length and contain the same characters in the same
  5919.      positions, otherwise return `#f'.
  5920.  
  5921.      The procedure `string-ci=?' treats upper and lower case letters as
  5922.      though they were the same character, but `string=?' treats upper
  5923.      and lower case as distinct characters.
  5924.  
  5925.     string-ci=?
  5926.  
  5927.  -- Scheme Procedure: string-ci=? s1 s2
  5928.      Case-insensitive string equality predicate; return `#t' if the two
  5929.      strings are the same length and their component characters match
  5930.      (ignoring case) at each position; otherwise return `#f'.
  5931.  
  5932.     string<?
  5933.  
  5934.  -- Scheme Procedure: string<? s1 s2
  5935.      Lexicographic ordering predicate; return `#t' if S1 is
  5936.      lexicographically less than S2.
  5937.  
  5938.     string<=?
  5939.  
  5940.  -- Scheme Procedure: string<=? s1 s2
  5941.      Lexicographic ordering predicate; return `#t' if S1 is
  5942.      lexicographically less than or equal to S2.
  5943.  
  5944.     string>?
  5945.  
  5946.  -- Scheme Procedure: string>? s1 s2
  5947.      Lexicographic ordering predicate; return `#t' if S1 is
  5948.      lexicographically greater than S2.
  5949.  
  5950.     string>=?
  5951.  
  5952.  -- Scheme Procedure: string>=? s1 s2
  5953.      Lexicographic ordering predicate; return `#t' if S1 is
  5954.      lexicographically greater than or equal to S2.
  5955.  
  5956.     string-ci<?
  5957.  
  5958.  -- Scheme Procedure: string-ci<? s1 s2
  5959.      Case insensitive lexicographic ordering predicate; return `#t' if
  5960.      S1 is lexicographically less than S2 regardless of case.
  5961.  
  5962.     string-ci<=?
  5963.  
  5964.  -- Scheme Procedure: string-ci<=? s1 s2
  5965.      Case insensitive lexicographic ordering predicate; return `#t' if
  5966.      S1 is lexicographically less than or equal to S2 regardless of
  5967.      case.
  5968.  
  5969.     string-ci>?
  5970.  
  5971.  -- Scheme Procedure: string-ci>? s1 s2
  5972.      Case insensitive lexicographic ordering predicate; return `#t' if
  5973.      S1 is lexicographically greater than S2 regardless of case.
  5974.  
  5975.     string-ci>=?
  5976.  
  5977.  -- Scheme Procedure: string-ci>=? s1 s2
  5978.      Case insensitive lexicographic ordering predicate; return `#t' if
  5979.      S1 is lexicographically greater than or equal to S2 regardless of
  5980.      case.
  5981.  
  5982.     object->string
  5983.  
  5984.  -- Scheme Procedure: object->string obj [printer]
  5985.      Return a Scheme string obtained by printing OBJ.  Printing
  5986.      function can be specified by the optional second argument PRINTER
  5987.      (default: `write').
  5988.  
  5989.     call-with-output-string
  5990.  
  5991.  -- Scheme Procedure: call-with-output-string proc
  5992.      Calls the one-argument procedure PROC with a newly created output
  5993.      port.  When the function returns, the string composed of the
  5994.      characters written into the port is returned.
  5995.  
  5996.     call-with-input-string
  5997.  
  5998.  -- Scheme Procedure: call-with-input-string string proc
  5999.      Calls the one-argument procedure PROC with a newly created input
  6000.      port from which STRING's contents may be read.  The value yielded
  6001.      by the PROC is returned.
  6002.  
  6003.     open-input-string
  6004.  
  6005.  -- Scheme Procedure: open-input-string str
  6006.      Take a string and return an input port that delivers characters
  6007.      from the string. The port can be closed by `close-input-port',
  6008.      though its storage will be reclaimed by the garbage collector if
  6009.      it becomes inaccessible.
  6010.  
  6011.     open-output-string
  6012.  
  6013.  -- Scheme Procedure: open-output-string
  6014.      Return an output port that will accumulate characters for
  6015.      retrieval by `get-output-string'. The port can be closed by the
  6016.      procedure `close-output-port', though its storage will be
  6017.      reclaimed by the garbage collector if it becomes inaccessible.
  6018.  
  6019.     get-output-string
  6020.  
  6021.  -- Scheme Procedure: get-output-string port
  6022.      Given an output port created by `open-output-string', return a
  6023.      string consisting of the characters that have been output to the
  6024.      port so far.
  6025.  
  6026.     eval-string
  6027.  
  6028.  -- Scheme Procedure: eval-string string [module]
  6029.      Evaluate STRING as the text representation of a Scheme form or
  6030.      forms, and return whatever value they produce.  Evaluation takes
  6031.      place in the given module, or the current module when no module is
  6032.      given.  While the code is evaluated, the given module is made the
  6033.      current one.  The current module is restored when this procedure
  6034.      returns.
  6035.  
  6036.     make-struct-layout
  6037.  
  6038.  -- Scheme Procedure: make-struct-layout fields
  6039.      Return a new structure layout object.
  6040.  
  6041.      FIELDS must be a string made up of pairs of characters strung
  6042.      together.  The first character of each pair describes a field
  6043.      type, the second a field protection.  Allowed types are 'p' for
  6044.      GC-protected Scheme data, 'u' for unprotected binary data, and 's'
  6045.      for a field that points to the structure itself.    Allowed
  6046.      protections are 'w' for mutable fields, 'r' for read-only fields,
  6047.      and 'o' for opaque fields.  The last field protection
  6048.      specification may be capitalized to indicate that the field is a
  6049.      tail-array.
  6050.  
  6051.     struct?
  6052.  
  6053.  -- Scheme Procedure: struct? x
  6054.      Return `#t' iff X is a structure object, else `#f'.
  6055.  
  6056.     struct-vtable?
  6057.  
  6058.  -- Scheme Procedure: struct-vtable? x
  6059.      Return `#t' iff X is a vtable structure.
  6060.  
  6061.     make-struct
  6062.  
  6063.  -- Scheme Procedure: make-struct vtable tail_array_size . init
  6064.      Create a new structure.
  6065.  
  6066.      TYPE must be a vtable structure (*note Vtables::).
  6067.  
  6068.      TAIL-ELTS must be a non-negative integer.  If the layout
  6069.      specification indicated by TYPE includes a tail-array, this is the
  6070.      number of elements allocated to that array.
  6071.  
  6072.      The INIT1, ... are optional arguments describing how successive
  6073.      fields of the structure should be initialized.  Only fields with
  6074.      protection 'r' or 'w' can be initialized, except for fields of
  6075.      type 's', which are automatically initialized to point to the new
  6076.      structure itself; fields with protection 'o' can not be
  6077.      initialized by Scheme programs.
  6078.  
  6079.      If fewer optional arguments than initializable fields are supplied,
  6080.      fields of type 'p' get default value #f while fields of type 'u'
  6081.      are initialized to 0.
  6082.  
  6083.      Structs are currently the basic representation for record-like data
  6084.      structures in Guile.  The plan is to eventually replace them with a
  6085.      new representation which will at the same time be easier to use and
  6086.      more powerful.
  6087.  
  6088.      For more information, see the documentation for
  6089.      `make-vtable-vtable'.
  6090.  
  6091.     make-vtable-vtable
  6092.  
  6093.  -- Scheme Procedure: make-vtable-vtable user_fields tail_array_size .
  6094.           init
  6095.      Return a new, self-describing vtable structure.
  6096.  
  6097.      USER-FIELDS is a string describing user defined fields of the
  6098.      vtable beginning at index `vtable-offset-user' (see
  6099.      `make-struct-layout').
  6100.  
  6101.      TAIL-SIZE specifies the size of the tail-array (if any) of this
  6102.      vtable.
  6103.  
  6104.      INIT1, ... are the optional initializers for the fields of the
  6105.      vtable.
  6106.  
  6107.      Vtables have one initializable system field--the struct printer.
  6108.      This field comes before the user fields in the initializers passed
  6109.      to `make-vtable-vtable' and `make-struct', and thus works as a
  6110.      third optional argument to `make-vtable-vtable' and a fourth to
  6111.      `make-struct' when creating vtables:
  6112.  
  6113.      If the value is a procedure, it will be called instead of the
  6114.      standard printer whenever a struct described by this vtable is
  6115.      printed.  The procedure will be called with arguments STRUCT and
  6116.      PORT.
  6117.  
  6118.      The structure of a struct is described by a vtable, so the vtable
  6119.      is in essence the type of the struct.  The vtable is itself a
  6120.      struct with a vtable.  This could go on forever if it weren't for
  6121.      the vtable-vtables which are self-describing vtables, and thus
  6122.      terminate the chain.
  6123.  
  6124.      There are several potential ways of using structs, but the standard
  6125.      one is to use three kinds of structs, together building up a type
  6126.      sub-system: one vtable-vtable working as the root and one or
  6127.      several "types", each with a set of "instances".  (The
  6128.      vtable-vtable should be compared to the class <class> which is the
  6129.      class of itself.)
  6130.  
  6131.           (define ball-root (make-vtable-vtable "pr" 0))
  6132.  
  6133.           (define (make-ball-type ball-color)
  6134.             (make-struct ball-root 0
  6135.                      (make-struct-layout "pw")
  6136.                          (lambda (ball port)
  6137.                            (format port "#<a ~A ball owned by ~A>"
  6138.                                    (color ball)
  6139.                                    (owner ball)))
  6140.                          ball-color))
  6141.           (define (color ball) (struct-ref (struct-vtable ball) vtable-offset-user))
  6142.           (define (owner ball) (struct-ref ball 0))
  6143.  
  6144.           (define red (make-ball-type 'red))
  6145.           (define green (make-ball-type 'green))
  6146.  
  6147.           (define (make-ball type owner) (make-struct type 0 owner))
  6148.  
  6149.           (define ball (make-ball green 'Nisse))
  6150.           ball => #<a green ball owned by Nisse>
  6151.  
  6152.     make-vtable
  6153.  
  6154.  -- Scheme Procedure: make-vtable fields [printer]
  6155.      Create a vtable, for creating structures with the given FIELDS.
  6156.  
  6157.      The optional PRINTER argument is a function to be called `(PRINTER
  6158.      struct port)' on the structures created.  It should look at STRUCT
  6159.      and write to PORT.
  6160.  
  6161.     struct-ref
  6162.  
  6163.  -- Scheme Procedure: struct-ref handle pos
  6164.  -- Scheme Procedure: struct-set! struct n value
  6165.      Access (or modify) the Nth field of STRUCT.
  6166.  
  6167.      If the field is of type 'p', then it can be set to an arbitrary
  6168.      value.
  6169.  
  6170.      If the field is of type 'u', then it can only be set to a
  6171.      non-negative integer value small enough to fit in one machine word.
  6172.  
  6173.     struct-set!
  6174.  
  6175.  -- Scheme Procedure: struct-set! handle pos val
  6176.      Set the slot of the structure HANDLE with index POS to VAL.
  6177.      Signal an error if the slot can not be written to.
  6178.  
  6179.     struct-vtable
  6180.  
  6181.  -- Scheme Procedure: struct-vtable handle
  6182.      Return the vtable structure that describes the type of STRUCT.
  6183.  
  6184.     struct-vtable-tag
  6185.  
  6186.  -- Scheme Procedure: struct-vtable-tag handle
  6187.      Return the vtable tag of the structure HANDLE.
  6188.  
  6189.     struct-vtable-name
  6190.  
  6191.  -- Scheme Procedure: struct-vtable-name vtable
  6192.      Return the name of the vtable VTABLE.
  6193.  
  6194.     set-struct-vtable-name!
  6195.  
  6196.  -- Scheme Procedure: set-struct-vtable-name! vtable name
  6197.      Set the name of the vtable VTABLE to NAME.
  6198.  
  6199.     symbol?
  6200.  
  6201.  -- Scheme Procedure: symbol? obj
  6202.      Return `#t' if OBJ is a symbol, otherwise return `#f'.
  6203.  
  6204.     symbol-interned?
  6205.  
  6206.  -- Scheme Procedure: symbol-interned? symbol
  6207.      Return `#t' if SYMBOL is interned, otherwise return `#f'.
  6208.  
  6209.     make-symbol
  6210.  
  6211.  -- Scheme Procedure: make-symbol name
  6212.      Return a new uninterned symbol with the name NAME.  The returned
  6213.      symbol is guaranteed to be unique and future calls to
  6214.      `string->symbol' will not return it.
  6215.  
  6216.     symbol->string
  6217.  
  6218.  -- Scheme Procedure: symbol->string s
  6219.      Return the name of SYMBOL as a string.  If the symbol was part of
  6220.      an object returned as the value of a literal expression (section
  6221.      *note Literal expressions: (r5rs)Literal expressions.) or by a
  6222.      call to the `read' procedure, and its name contains alphabetic
  6223.      characters, then the string returned will contain characters in
  6224.      the implementation's preferred standard case--some implementations
  6225.      will prefer upper case, others lower case.  If the symbol was
  6226.      returned by `string->symbol', the case of characters in the string
  6227.      returned will be the same as the case in the string that was
  6228.      passed to `string->symbol'.  It is an error to apply mutation
  6229.      procedures like `string-set!' to strings returned by this
  6230.      procedure.
  6231.  
  6232.      The following examples assume that the implementation's standard
  6233.      case is lower case:
  6234.  
  6235.           (symbol->string 'flying-fish)    => "flying-fish"
  6236.           (symbol->string 'Martin)         =>  "martin"
  6237.           (symbol->string
  6238.              (string->symbol "Malvina")) => "Malvina"
  6239.  
  6240.     string->symbol
  6241.  
  6242.  -- Scheme Procedure: string->symbol string
  6243.      Return the symbol whose name is STRING. This procedure can create
  6244.      symbols with names containing special characters or letters in the
  6245.      non-standard case, but it is usually a bad idea to create such
  6246.      symbols because in some implementations of Scheme they cannot be
  6247.      read as themselves.  See `symbol->string'.
  6248.  
  6249.      The following examples assume that the implementation's standard
  6250.      case is lower case:
  6251.  
  6252.           (eq? 'mISSISSIppi 'mississippi) => #t
  6253.           (string->symbol "mISSISSIppi") => the symbol with name "mISSISSIppi"
  6254.           (eq? 'bitBlt (string->symbol "bitBlt")) => #f
  6255.           (eq? 'JollyWog
  6256.             (string->symbol (symbol->string 'JollyWog))) => #t
  6257.           (string=? "K. Harper, M.D."
  6258.             (symbol->string
  6259.               (string->symbol "K. Harper, M.D."))) =>#t
  6260.  
  6261.     string-ci->symbol
  6262.  
  6263.  -- Scheme Procedure: string-ci->symbol str
  6264.      Return the symbol whose name is STR.  STR is converted to
  6265.      lowercase before the conversion is done, if Guile is currently
  6266.      reading symbols case-insensitively.
  6267.  
  6268.     gensym
  6269.  
  6270.  -- Scheme Procedure: gensym [prefix]
  6271.      Create a new symbol with a name constructed from a prefix and a
  6272.      counter value. The string PREFIX can be specified as an optional
  6273.      argument. Default prefix is ` g'.  The counter is increased by 1
  6274.      at each call. There is no provision for resetting the counter.
  6275.  
  6276.     symbol-hash
  6277.  
  6278.  -- Scheme Procedure: symbol-hash symbol
  6279.      Return a hash value for SYMBOL.
  6280.  
  6281.     symbol-fref
  6282.  
  6283.  -- Scheme Procedure: symbol-fref s
  6284.      Return the contents of SYMBOL's "function slot".
  6285.  
  6286.     symbol-pref
  6287.  
  6288.  -- Scheme Procedure: symbol-pref s
  6289.      Return the "property list" currently associated with SYMBOL.
  6290.  
  6291.     symbol-fset!
  6292.  
  6293.  -- Scheme Procedure: symbol-fset! s val
  6294.      Change the binding of SYMBOL's function slot.
  6295.  
  6296.     symbol-pset!
  6297.  
  6298.  -- Scheme Procedure: symbol-pset! s val
  6299.      Change the binding of SYMBOL's property slot.
  6300.  
  6301.     call-with-new-thread
  6302.  
  6303.  -- Scheme Procedure: call-with-new-thread thunk [handler]
  6304.      Call `thunk' in a new thread and with a new dynamic state,
  6305.      returning a new thread object representing the thread.  The
  6306.      procedure THUNK is called via `with-continuation-barrier'.
  6307.  
  6308.      When HANDLER is specified, then THUNK is called from within a
  6309.      `catch' with tag `#t' that has HANDLER as its handler.  This catch
  6310.      is established inside the continuation barrier.
  6311.  
  6312.      Once THUNK or HANDLER returns, the return value is made the _exit
  6313.      value_ of the thread and the thread is terminated.
  6314.  
  6315.     yield
  6316.  
  6317.  -- Scheme Procedure: yield
  6318.      Move the calling thread to the end of the scheduling queue.
  6319.  
  6320.     join-thread
  6321.  
  6322.  -- Scheme Procedure: join-thread thread
  6323.      Suspend execution of the calling thread until the target THREAD
  6324.      terminates, unless the target THREAD has already terminated.
  6325.  
  6326.     make-mutex
  6327.  
  6328.  -- Scheme Procedure: make-mutex
  6329.      Create a new mutex.
  6330.  
  6331.     make-recursive-mutex
  6332.  
  6333.  -- Scheme Procedure: make-recursive-mutex
  6334.      Create a new recursive mutex.
  6335.  
  6336.     lock-mutex
  6337.  
  6338.  -- Scheme Procedure: lock-mutex mx
  6339.      Lock MUTEX. If the mutex is already locked, the calling thread
  6340.      blocks until the mutex becomes available. The function returns
  6341.      when the calling thread owns the lock on MUTEX.  Locking a mutex
  6342.      that a thread already owns will succeed right away and will not
  6343.      block the thread.  That is, Guile's mutexes are _recursive_.
  6344.  
  6345.     try-mutex
  6346.  
  6347.  -- Scheme Procedure: try-mutex mutex
  6348.      Try to lock MUTEX. If the mutex is already locked by someone else,
  6349.      return `#f'.  Else lock the mutex and return `#t'.
  6350.  
  6351.     unlock-mutex
  6352.  
  6353.  -- Scheme Procedure: unlock-mutex mx
  6354.      Unlocks MUTEX if the calling thread owns the lock on MUTEX.
  6355.      Calling unlock-mutex on a mutex not owned by the current thread
  6356.      results in undefined behaviour. Once a mutex has been unlocked,
  6357.      one thread blocked on MUTEX is awakened and grabs the mutex lock.
  6358.      Every call to `lock-mutex' by this thread must be matched with a
  6359.      call to `unlock-mutex'.  Only the last call to `unlock-mutex' will
  6360.      actually unlock the mutex.
  6361.  
  6362.     make-condition-variable
  6363.  
  6364.  -- Scheme Procedure: make-condition-variable
  6365.      Make a new condition variable.
  6366.  
  6367.     wait-condition-variable
  6368.  
  6369.  -- Scheme Procedure: wait-condition-variable cv mx [t]
  6370.      Wait until COND-VAR has been signalled.  While waiting, MUTEX is
  6371.      atomically unlocked (as with `unlock-mutex') and is locked again
  6372.      when this function returns.  When TIME is given, it specifies a
  6373.      point in time where the waiting should be aborted.  It can be
  6374.      either a integer as returned by `current-time' or a pair as
  6375.      returned by `gettimeofday'.  When the waiting is aborted the mutex
  6376.      is locked and `#f' is returned.  When the condition variable is in
  6377.      fact signalled, the mutex is also locked and `#t' is returned.
  6378.  
  6379.     signal-condition-variable
  6380.  
  6381.  -- Scheme Procedure: signal-condition-variable cv
  6382.      Wake up one thread that is waiting for CV
  6383.  
  6384.     broadcast-condition-variable
  6385.  
  6386.  -- Scheme Procedure: broadcast-condition-variable cv
  6387.      Wake up all threads that are waiting for CV.
  6388.  
  6389.     current-thread
  6390.  
  6391.  -- Scheme Procedure: current-thread
  6392.      Return the thread that called this function.
  6393.  
  6394.     all-threads
  6395.  
  6396.  -- Scheme Procedure: all-threads
  6397.      Return a list of all threads.
  6398.  
  6399.     thread-exited?
  6400.  
  6401.  -- Scheme Procedure: thread-exited? thread
  6402.      Return `#t' iff THREAD has exited.
  6403.  
  6404.  
  6405.     catch
  6406.  
  6407.  -- Scheme Procedure: catch key thunk handler [pre_unwind_handler]
  6408.      Invoke THUNK in the dynamic context of HANDLER for exceptions
  6409.      matching KEY.  If thunk throws to the symbol KEY, then HANDLER is
  6410.      invoked this way:
  6411.           (handler key args ...)
  6412.  
  6413.      KEY is a symbol or `#t'.
  6414.  
  6415.      THUNK takes no arguments.  If THUNK returns normally, that is the
  6416.      return value of `catch'.
  6417.  
  6418.      Handler is invoked outside the scope of its own `catch'.  If
  6419.      HANDLER again throws to the same key, a new handler from further
  6420.      up the call chain is invoked.
  6421.  
  6422.      If the key is `#t', then a throw to _any_ symbol will match this
  6423.      call to `catch'.
  6424.  
  6425.      If a PRE-UNWIND-HANDLER is given and THUNK throws an exception
  6426.      that matches KEY, Guile calls the PRE-UNWIND-HANDLER before
  6427.      unwinding the dynamic state and invoking the main HANDLER.
  6428.      PRE-UNWIND-HANDLER should be a procedure with the same signature
  6429.      as HANDLER, that is `(lambda (key . args))'.  It is typically used
  6430.      to save the stack at the point where the exception occurred, but
  6431.      can also query other parts of the dynamic state at that point,
  6432.      such as fluid values.
  6433.  
  6434.      A PRE-UNWIND-HANDLER can exit either normally or non-locally.  If
  6435.      it exits normally, Guile unwinds the stack and dynamic context and
  6436.      then calls the normal (third argument) handler.  If it exits
  6437.      non-locally, that exit determines the continuation.
  6438.  
  6439.     with-throw-handler
  6440.  
  6441.  -- Scheme Procedure: with-throw-handler key thunk handler
  6442.      Add HANDLER to the dynamic context as a throw handler for key KEY,
  6443.      then invoke THUNK.
  6444.  
  6445.     lazy-catch
  6446.  
  6447.  -- Scheme Procedure: lazy-catch key thunk handler
  6448.      This behaves exactly like `catch', except that it does not unwind
  6449.      the stack before invoking HANDLER.  If the HANDLER procedure
  6450.      returns normally, Guile rethrows the same exception again to the
  6451.      next innermost catch, lazy-catch or throw handler.  If the HANDLER
  6452.      exits non-locally, that exit determines the continuation.
  6453.  
  6454.     throw
  6455.  
  6456.  -- Scheme Procedure: throw key . args
  6457.      Invoke the catch form matching KEY, passing ARGS to the HANDLER.
  6458.  
  6459.      KEY is a symbol.  It will match catches of the same symbol or of
  6460.      `#t'.
  6461.  
  6462.      If there is no handler at all, Guile prints an error and then
  6463.      exits.
  6464.  
  6465.     values
  6466.  
  6467.  -- Scheme Procedure: values . args
  6468.      Delivers all of its arguments to its continuation.  Except for
  6469.      continuations created by the `call-with-values' procedure, all
  6470.      continuations take exactly one value.  The effect of passing no
  6471.      value or more than one value to continuations that were not
  6472.      created by `call-with-values' is unspecified.
  6473.  
  6474.     make-variable
  6475.  
  6476.  -- Scheme Procedure: make-variable init
  6477.      Return a variable initialized to value INIT.
  6478.  
  6479.     make-undefined-variable
  6480.  
  6481.  -- Scheme Procedure: make-undefined-variable
  6482.      Return a variable that is initially unbound.
  6483.  
  6484.     variable?
  6485.  
  6486.  -- Scheme Procedure: variable? obj
  6487.      Return `#t' iff OBJ is a variable object, else return `#f'.
  6488.  
  6489.     variable-ref
  6490.  
  6491.  -- Scheme Procedure: variable-ref var
  6492.      Dereference VAR and return its value.  VAR must be a variable
  6493.      object; see `make-variable' and `make-undefined-variable'.
  6494.  
  6495.     variable-set!
  6496.  
  6497.  -- Scheme Procedure: variable-set! var val
  6498.      Set the value of the variable VAR to VAL.  VAR must be a variable
  6499.      object, VAL can be any value. Return an unspecified value.
  6500.  
  6501.     variable-bound?
  6502.  
  6503.  -- Scheme Procedure: variable-bound? var
  6504.      Return `#t' iff VAR is bound to a value.  Throws an error if VAR
  6505.      is not a variable object.
  6506.  
  6507.     vector?
  6508.  
  6509.  -- Scheme Procedure: vector? obj
  6510.      Return `#t' if OBJ is a vector, otherwise return `#f'.
  6511.  
  6512.     list->vector
  6513.  
  6514.  -- Scheme Procedure: list->vector
  6515.      implemented by the C function "scm_vector"
  6516.  
  6517.     vector
  6518.  
  6519.  -- Scheme Procedure: vector . l
  6520.  -- Scheme Procedure: list->vector l
  6521.      Return a newly allocated vector composed of the given arguments.
  6522.      Analogous to `list'.
  6523.  
  6524.           (vector 'a 'b 'c) => #(a b c)
  6525.  
  6526.     make-vector
  6527.  
  6528.  -- Scheme Procedure: make-vector k [fill]
  6529.      Return a newly allocated vector of K elements.  If a second
  6530.      argument is given, then each position is initialized to FILL.
  6531.      Otherwise the initial contents of each position is unspecified.
  6532.  
  6533.     vector-copy
  6534.  
  6535.  -- Scheme Procedure: vector-copy vec
  6536.      Return a copy of VEC.
  6537.  
  6538.     vector->list
  6539.  
  6540.  -- Scheme Procedure: vector->list v
  6541.      Return a newly allocated list composed of the elements of V.
  6542.  
  6543.           (vector->list '#(dah dah didah)) =>  (dah dah didah)
  6544.           (list->vector '(dididit dah)) =>  #(dididit dah)
  6545.  
  6546.     vector-fill!
  6547.  
  6548.  -- Scheme Procedure: vector-fill! v fill
  6549.      Store FILL in every position of VECTOR.  The value returned by
  6550.      `vector-fill!' is unspecified.
  6551.  
  6552.     vector-move-left!
  6553.  
  6554.  -- Scheme Procedure: vector-move-left! vec1 start1 end1 vec2 start2
  6555.      Copy elements from VEC1, positions START1 to END1, to VEC2
  6556.      starting at position START2.  START1 and START2 are inclusive
  6557.      indices; END1 is exclusive.
  6558.  
  6559.      `vector-move-left!' copies elements in leftmost order.  Therefore,
  6560.      in the case where VEC1 and VEC2 refer to the same vector,
  6561.      `vector-move-left!' is usually appropriate when START1 is greater
  6562.      than START2.
  6563.  
  6564.     vector-move-right!
  6565.  
  6566.  -- Scheme Procedure: vector-move-right! vec1 start1 end1 vec2 start2
  6567.      Copy elements from VEC1, positions START1 to END1, to VEC2
  6568.      starting at position START2.  START1 and START2 are inclusive
  6569.      indices; END1 is exclusive.
  6570.  
  6571.      `vector-move-right!' copies elements in rightmost order.
  6572.      Therefore, in the case where VEC1 and VEC2 refer to the same
  6573.      vector, `vector-move-right!' is usually appropriate when START1 is
  6574.      less than START2.
  6575.  
  6576.     generalized-vector?
  6577.  
  6578.  -- Scheme Procedure: generalized-vector? obj
  6579.      Return `#t' if OBJ is a vector, string, bitvector, or uniform
  6580.      numeric vector.
  6581.  
  6582.     generalized-vector-length
  6583.  
  6584.  -- Scheme Procedure: generalized-vector-length v
  6585.      Return the length of the generalized vector V.
  6586.  
  6587.     generalized-vector-ref
  6588.  
  6589.  -- Scheme Procedure: generalized-vector-ref v idx
  6590.      Return the element at index IDX of the generalized vector V.
  6591.  
  6592.     generalized-vector-set!
  6593.  
  6594.  -- Scheme Procedure: generalized-vector-set! v idx val
  6595.      Set the element at index IDX of the generalized vector V to VAL.
  6596.  
  6597.     generalized-vector->list
  6598.  
  6599.  -- Scheme Procedure: generalized-vector->list v
  6600.      Return a new list whose elements are the elements of the
  6601.      generalized vector V.
  6602.  
  6603.     major-version
  6604.  
  6605.  -- Scheme Procedure: major-version
  6606.      Return a string containing Guile's major version number.  E.g.,
  6607.      the 1 in "1.6.5".
  6608.  
  6609.     minor-version
  6610.  
  6611.  -- Scheme Procedure: minor-version
  6612.      Return a string containing Guile's minor version number.  E.g.,
  6613.      the 6 in "1.6.5".
  6614.  
  6615.     micro-version
  6616.  
  6617.  -- Scheme Procedure: micro-version
  6618.      Return a string containing Guile's micro version number.  E.g.,
  6619.      the 5 in "1.6.5".
  6620.  
  6621.     version
  6622.  
  6623.  -- Scheme Procedure: version
  6624.  -- Scheme Procedure: major-version
  6625.  -- Scheme Procedure: minor-version
  6626.  -- Scheme Procedure: micro-version
  6627.      Return a string describing Guile's version number, or its major,
  6628.      minor or micro version number, respectively.
  6629.  
  6630.           (version) => "1.6.0"
  6631.           (major-version) => "1"
  6632.           (minor-version) => "6"
  6633.           (micro-version) => "0"
  6634.  
  6635.     effective-version
  6636.  
  6637.  -- Scheme Procedure: effective-version
  6638.      Return a string describing Guile's effective version number.
  6639.           (version) => "1.6.0"
  6640.           (effective-version) => "1.6"
  6641.           (major-version) => "1"
  6642.           (minor-version) => "6"
  6643.           (micro-version) => "0"
  6644.  
  6645.     make-soft-port
  6646.  
  6647.  -- Scheme Procedure: make-soft-port pv modes
  6648.      Return a port capable of receiving or delivering characters as
  6649.      specified by the MODES string (*note open-file: File Ports.).  PV
  6650.      must be a vector of length 5 or 6.  Its components are as follows:
  6651.  
  6652.        0. procedure accepting one character for output
  6653.  
  6654.        1. procedure accepting a string for output
  6655.  
  6656.        2. thunk for flushing output
  6657.  
  6658.        3. thunk for getting one character
  6659.  
  6660.        4. thunk for closing port (not by garbage collection)
  6661.  
  6662.        5. (if present and not `#f') thunk for computing the number of
  6663.           characters that can be read from the port without blocking.
  6664.  
  6665.      For an output-only port only elements 0, 1, 2, and 4 need be
  6666.      procedures.  For an input-only port only elements 3 and 4 need be
  6667.      procedures.  Thunks 2 and 4 can instead be `#f' if there is no
  6668.      useful operation for them to perform.
  6669.  
  6670.      If thunk 3 returns `#f' or an `eof-object' (*note eof-object?:
  6671.      (r5rs)Input.) it indicates that the port has reached end-of-file.
  6672.      For example:
  6673.  
  6674.           (define stdout (current-output-port))
  6675.           (define p (make-soft-port
  6676.                      (vector
  6677.                       (lambda (c) (write c stdout))
  6678.                       (lambda (s) (display s stdout))
  6679.                       (lambda () (display "." stdout))
  6680.                       (lambda () (char-upcase (read-char)))
  6681.                       (lambda () (display "@" stdout)))
  6682.                      "rw"))
  6683.  
  6684.           (write p p) => #<input-output: soft 8081e20>
  6685.  
  6686.     make-weak-vector
  6687.  
  6688.  -- Scheme Procedure: make-weak-vector size [fill]
  6689.      Return a weak vector with SIZE elements. If the optional argument
  6690.      FILL is given, all entries in the vector will be set to FILL. The
  6691.      default value for FILL is the empty list.
  6692.  
  6693.     list->weak-vector
  6694.  
  6695.  -- Scheme Procedure: list->weak-vector
  6696.      implemented by the C function "scm_weak_vector"
  6697.  
  6698.     weak-vector
  6699.  
  6700.  -- Scheme Procedure: weak-vector . l
  6701.  -- Scheme Procedure: list->weak-vector l
  6702.      Construct a weak vector from a list: `weak-vector' uses the list
  6703.      of its arguments while `list->weak-vector' uses its only argument
  6704.      L (a list) to construct a weak vector the same way `list->vector'
  6705.      would.
  6706.  
  6707.     weak-vector?
  6708.  
  6709.  -- Scheme Procedure: weak-vector? obj
  6710.      Return `#t' if OBJ is a weak vector. Note that all weak hashes are
  6711.      also weak vectors.
  6712.  
  6713.     make-weak-key-alist-vector
  6714.  
  6715.  -- Scheme Procedure: make-weak-key-alist-vector [size]
  6716.  -- Scheme Procedure: make-weak-value-alist-vector size
  6717.  -- Scheme Procedure: make-doubly-weak-alist-vector size
  6718.      Return a weak hash table with SIZE buckets. As with any hash
  6719.      table, choosing a good size for the table requires some caution.
  6720.  
  6721.      You can modify weak hash tables in exactly the same way you would
  6722.      modify regular hash tables. (*note Hash Tables::)
  6723.  
  6724.     make-weak-value-alist-vector
  6725.  
  6726.  -- Scheme Procedure: make-weak-value-alist-vector [size]
  6727.      Return a hash table with weak values with SIZE buckets.  (*note
  6728.      Hash Tables::)
  6729.  
  6730.     make-doubly-weak-alist-vector
  6731.  
  6732.  -- Scheme Procedure: make-doubly-weak-alist-vector size
  6733.      Return a hash table with weak keys and values with SIZE buckets.
  6734.      (*note Hash Tables::)
  6735.  
  6736.     weak-key-alist-vector?
  6737.  
  6738.  -- Scheme Procedure: weak-key-alist-vector? obj
  6739.  -- Scheme Procedure: weak-value-alist-vector? obj
  6740.  -- Scheme Procedure: doubly-weak-alist-vector? obj
  6741.      Return `#t' if OBJ is the specified weak hash table. Note that a
  6742.      doubly weak hash table is neither a weak key nor a weak value hash
  6743.      table.
  6744.  
  6745.     weak-value-alist-vector?
  6746.  
  6747.  -- Scheme Procedure: weak-value-alist-vector? obj
  6748.      Return `#t' if OBJ is a weak value hash table.
  6749.  
  6750.     doubly-weak-alist-vector?
  6751.  
  6752.  -- Scheme Procedure: doubly-weak-alist-vector? obj
  6753.      Return `#t' if OBJ is a doubly weak hash table.
  6754.  
  6755.     array-fill!
  6756.  
  6757.  -- Scheme Procedure: array-fill! ra fill
  6758.      Store FILL in every element of ARRAY.  The value returned is
  6759.      unspecified.
  6760.  
  6761.     array-copy-in-order!
  6762.  
  6763.  -- Scheme Procedure: array-copy-in-order!
  6764.      implemented by the C function "scm_array_copy_x"
  6765.  
  6766.     array-copy!
  6767.  
  6768.  -- Scheme Procedure: array-copy! src dst
  6769.  -- Scheme Procedure: array-copy-in-order! src dst
  6770.      Copy every element from vector or array SOURCE to the
  6771.      corresponding element of DESTINATION.  DESTINATION must have the
  6772.      same rank as SOURCE, and be at least as large in each dimension.
  6773.      The order is unspecified.
  6774.  
  6775.     array-map-in-order!
  6776.  
  6777.  -- Scheme Procedure: array-map-in-order!
  6778.      implemented by the C function "scm_array_map_x"
  6779.  
  6780.     array-map!
  6781.  
  6782.  -- Scheme Procedure: array-map! ra0 proc . lra
  6783.  -- Scheme Procedure: array-map-in-order! ra0 proc . lra
  6784.      ARRAY1, ... must have the same number of dimensions as ARRAY0 and
  6785.      have a range for each index which includes the range for the
  6786.      corresponding index in ARRAY0.  PROC is applied to each tuple of
  6787.      elements of ARRAY1 ... and the result is stored as the
  6788.      corresponding element in ARRAY0.  The value returned is
  6789.      unspecified.  The order of application is unspecified.
  6790.  
  6791.     array-for-each
  6792.  
  6793.  -- Scheme Procedure: array-for-each proc ra0 . lra
  6794.      Apply PROC to each tuple of elements of ARRAY0 ...  in row-major
  6795.      order.  The value returned is unspecified.
  6796.  
  6797.     array-index-map!
  6798.  
  6799.  -- Scheme Procedure: array-index-map! ra proc
  6800.      Apply PROC to the indices of each element of ARRAY in turn,
  6801.      storing the result in the corresponding element.  The value
  6802.      returned and the order of application are unspecified.
  6803.  
  6804.      One can implement ARRAY-INDEXES as
  6805.           (define (array-indexes array)
  6806.               (let ((ra (apply make-array #f (array-shape array))))
  6807.                 (array-index-map! ra (lambda x x))
  6808.                 ra))
  6809.      Another example:
  6810.           (define (apl:index-generator n)
  6811.               (let ((v (make-uniform-vector n 1)))
  6812.                 (array-index-map! v (lambda (i) i))
  6813.                 v))
  6814.  
  6815.     array?
  6816.  
  6817.  -- Scheme Procedure: array? obj [prot]
  6818.      Return `#t' if the OBJ is an array, and `#f' if not.
  6819.  
  6820.     typed-array?
  6821.  
  6822.  -- Scheme Procedure: typed-array? obj type
  6823.      Return `#t' if the OBJ is an array of type TYPE, and `#f' if not.
  6824.  
  6825.     array-rank
  6826.  
  6827.  -- Scheme Procedure: array-rank array
  6828.      Return the number of dimensions of the array ARRAY.
  6829.  
  6830.  
  6831.     array-dimensions
  6832.  
  6833.  -- Scheme Procedure: array-dimensions ra
  6834.      `array-dimensions' is similar to `array-shape' but replaces
  6835.      elements with a `0' minimum with one greater than the maximum. So:
  6836.           (array-dimensions (make-array 'foo '(-1 3) 5)) => ((-1 3) 5)
  6837.  
  6838.     shared-array-root
  6839.  
  6840.  -- Scheme Procedure: shared-array-root ra
  6841.      Return the root vector of a shared array.
  6842.  
  6843.     shared-array-offset
  6844.  
  6845.  -- Scheme Procedure: shared-array-offset ra
  6846.      Return the root vector index of the first element in the array.
  6847.  
  6848.     shared-array-increments
  6849.  
  6850.  -- Scheme Procedure: shared-array-increments ra
  6851.      For each dimension, return the distance between elements in the
  6852.      root vector.
  6853.  
  6854.     make-typed-array
  6855.  
  6856.  -- Scheme Procedure: make-typed-array type fill . bounds
  6857.      Create and return an array of type TYPE.
  6858.  
  6859.     make-array
  6860.  
  6861.  -- Scheme Procedure: make-array fill . bounds
  6862.      Create and return an array.
  6863.  
  6864.     dimensions->uniform-array
  6865.  
  6866.  -- Scheme Procedure: dimensions->uniform-array dims prot [fill]
  6867.  -- Scheme Procedure: make-uniform-vector length prototype [fill]
  6868.      Create and return a uniform array or vector of type corresponding
  6869.      to PROTOTYPE with dimensions DIMS or length LENGTH.  If FILL is
  6870.      supplied, it's used to fill the array, otherwise PROTOTYPE is used.
  6871.  
  6872.     make-shared-array
  6873.  
  6874.  -- Scheme Procedure: make-shared-array oldra mapfunc . dims
  6875.      `make-shared-array' can be used to create shared subarrays of other
  6876.      arrays.  The MAPPER is a function that translates coordinates in
  6877.      the new array into coordinates in the old array.  A MAPPER must be
  6878.      linear, and its range must stay within the bounds of the old
  6879.      array, but it can be otherwise arbitrary.  A simple example:
  6880.           (define fred (make-array #f 8 8))
  6881.           (define freds-diagonal
  6882.             (make-shared-array fred (lambda (i) (list i i)) 8))
  6883.           (array-set! freds-diagonal 'foo 3)
  6884.           (array-ref fred 3 3) => foo
  6885.           (define freds-center
  6886.             (make-shared-array fred (lambda (i j) (list (+ 3 i) (+ 3 j))) 2 2))
  6887.           (array-ref freds-center 0 0) => foo
  6888.  
  6889.     transpose-array
  6890.  
  6891.  -- Scheme Procedure: transpose-array ra . args
  6892.      Return an array sharing contents with ARRAY, but with dimensions
  6893.      arranged in a different order.  There must be one DIM argument for
  6894.      each dimension of ARRAY.  DIM0, DIM1, ... should be integers
  6895.      between 0 and the rank of the array to be returned.  Each integer
  6896.      in that range must appear at least once in the argument list.
  6897.  
  6898.      The values of DIM0, DIM1, ... correspond to dimensions in the
  6899.      array to be returned, their positions in the argument list to
  6900.      dimensions of ARRAY.  Several DIMs may have the same value, in
  6901.      which case the returned array will have smaller rank than ARRAY.
  6902.  
  6903.           (transpose-array '#2((a b) (c d)) 1 0) => #2((a c) (b d))
  6904.           (transpose-array '#2((a b) (c d)) 0 0) => #1(a d)
  6905.           (transpose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1 1 0) =>
  6906.                           #2((a 4) (b 5) (c 6))
  6907.  
  6908.     enclose-array
  6909.  
  6910.  -- Scheme Procedure: enclose-array ra . axes
  6911.      DIM0, DIM1 ... should be nonnegative integers less than the rank
  6912.      of ARRAY.  ENCLOSE-ARRAY returns an array resembling an array of
  6913.      shared arrays.  The dimensions of each shared array are the same
  6914.      as the DIMth dimensions of the original array, the dimensions of
  6915.      the outer array are the same as those of the original array that
  6916.      did not match a DIM.
  6917.  
  6918.      An enclosed array is not a general Scheme array.  Its elements may
  6919.      not be set using `array-set!'.  Two references to the same element
  6920.      of an enclosed array will be `equal?' but will not in general be
  6921.      `eq?'.  The value returned by ARRAY-PROTOTYPE when given an
  6922.      enclosed array is unspecified.
  6923.  
  6924.      examples:
  6925.           (enclose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1) =>
  6926.              #<enclosed-array (#1(a d) #1(b e) #1(c f)) (#1(1 4) #1(2 5) #1(3 6))>
  6927.  
  6928.           (enclose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1 0) =>
  6929.              #<enclosed-array #2((a 1) (d 4)) #2((b 2) (e 5)) #2((c 3) (f 6))>
  6930.  
  6931.     array-in-bounds?
  6932.  
  6933.  -- Scheme Procedure: array-in-bounds? v . args
  6934.      Return `#t' if its arguments would be acceptable to `array-ref'.
  6935.  
  6936.     array-ref
  6937.  
  6938.  -- Scheme Procedure: array-ref v . args
  6939.      Return the element at the `(index1, index2)' element in ARRAY.
  6940.  
  6941.     array-set!
  6942.  
  6943.  -- Scheme Procedure: array-set! v obj . args
  6944.      Set the element at the `(index1, index2)' element in ARRAY to
  6945.      NEW-VALUE.  The value returned by array-set! is unspecified.
  6946.  
  6947.     array-contents
  6948.  
  6949.  -- Scheme Procedure: array-contents ra [strict]
  6950.      If ARRAY may be "unrolled" into a one dimensional shared array
  6951.      without changing their order (last subscript changing fastest),
  6952.      then `array-contents' returns that shared array, otherwise it
  6953.      returns `#f'.  All arrays made by MAKE-ARRAY and
  6954.      MAKE-UNIFORM-ARRAY may be unrolled, some arrays made by
  6955.      MAKE-SHARED-ARRAY may not be.
  6956.  
  6957.      If the optional argument STRICT is provided, a shared array will
  6958.      be returned only if its elements are stored internally contiguous
  6959.      in memory.
  6960.  
  6961.     uniform-array-read!
  6962.  
  6963.  -- Scheme Procedure: uniform-array-read! ura [port_or_fd [start [end]]]
  6964.  -- Scheme Procedure: uniform-vector-read! uve [port-or-fdes] [start]
  6965.           [end]
  6966.      Attempt to read all elements of URA, in lexicographic order, as
  6967.      binary objects from PORT-OR-FDES.  If an end of file is
  6968.      encountered, the objects up to that point are put into URA
  6969.      (starting at the beginning) and the remainder of the array is
  6970.      unchanged.
  6971.  
  6972.      The optional arguments START and END allow a specified region of a
  6973.      vector (or linearized array) to be read, leaving the remainder of
  6974.      the vector unchanged.
  6975.  
  6976.      `uniform-array-read!' returns the number of objects read.
  6977.      PORT-OR-FDES may be omitted, in which case it defaults to the value
  6978.      returned by `(current-input-port)'.
  6979.  
  6980.     uniform-array-write
  6981.  
  6982.  -- Scheme Procedure: uniform-array-write ura [port_or_fd [start [end]]]
  6983.      Writes all elements of URA as binary objects to PORT-OR-FDES.
  6984.  
  6985.      The optional arguments START and END allow a specified region of a
  6986.      vector (or linearized array) to be written.
  6987.  
  6988.      The number of objects actually written is returned.  PORT-OR-FDES
  6989.      may be omitted, in which case it defaults to the value returned by
  6990.      `(current-output-port)'.
  6991.  
  6992.     bitvector?
  6993.  
  6994.  -- Scheme Procedure: bitvector? obj
  6995.      Return `#t' when OBJ is a bitvector, else return `#f'.
  6996.  
  6997.     make-bitvector
  6998.  
  6999.  -- Scheme Procedure: make-bitvector len [fill]
  7000.      Create a new bitvector of length LEN and optionally initialize all
  7001.      elements to FILL.
  7002.  
  7003.     bitvector
  7004.  
  7005.  -- Scheme Procedure: bitvector . bits
  7006.      Create a new bitvector with the arguments as elements.
  7007.  
  7008.     bitvector-length
  7009.  
  7010.  -- Scheme Procedure: bitvector-length vec
  7011.      Return the length of the bitvector VEC.
  7012.  
  7013.     bitvector-ref
  7014.  
  7015.  -- Scheme Procedure: bitvector-ref vec idx
  7016.      Return the element at index IDX of the bitvector VEC.
  7017.  
  7018.     bitvector-set!
  7019.  
  7020.  -- Scheme Procedure: bitvector-set! vec idx val
  7021.      Set the element at index IDX of the bitvector VEC when VAL is
  7022.      true, else clear it.
  7023.  
  7024.     bitvector-fill!
  7025.  
  7026.  -- Scheme Procedure: bitvector-fill! vec val
  7027.      Set all elements of the bitvector VEC when VAL is true, else clear
  7028.      them.
  7029.  
  7030.     list->bitvector
  7031.  
  7032.  -- Scheme Procedure: list->bitvector list
  7033.      Return a new bitvector initialized with the elements of LIST.
  7034.  
  7035.     bitvector->list
  7036.  
  7037.  -- Scheme Procedure: bitvector->list vec
  7038.      Return a new list initialized with the elements of the bitvector
  7039.      VEC.
  7040.  
  7041.     bit-count
  7042.  
  7043.  -- Scheme Procedure: bit-count b bitvector
  7044.      Return the number of occurrences of the boolean B in BITVECTOR.
  7045.  
  7046.     bit-position
  7047.  
  7048.  -- Scheme Procedure: bit-position item v k
  7049.      Return the index of the first occurrance of ITEM in bit vector V,
  7050.      starting from K.  If there is no ITEM entry between K and the end
  7051.      of BITVECTOR, then return `#f'.  For example,
  7052.  
  7053.           (bit-position #t #*000101 0)  => 3
  7054.           (bit-position #f #*0001111 3) => #f
  7055.  
  7056.     bit-set*!
  7057.  
  7058.  -- Scheme Procedure: bit-set*! v kv obj
  7059.      Set entries of bit vector V to OBJ, with KV selecting the entries
  7060.      to change.  The return value is unspecified.
  7061.  
  7062.      If KV is a bit vector, then those entries where it has `#t' are
  7063.      the ones in V which are set to OBJ.  KV and V must be the same
  7064.      length.  When OBJ is `#t' it's like KV is OR'ed into V.  Or when
  7065.      OBJ is `#f' it can be seen as an ANDNOT.
  7066.  
  7067.           (define bv #*01000010)
  7068.           (bit-set*! bv #*10010001 #t)
  7069.           bv
  7070.           => #*11010011
  7071.  
  7072.      If KV is a u32vector, then its elements are indices into V which
  7073.      are set to OBJ.
  7074.  
  7075.           (define bv #*01000010)
  7076.           (bit-set*! bv #u32(5 2 7) #t)
  7077.           bv
  7078.           => #*01100111
  7079.  
  7080.     bit-count*
  7081.  
  7082.  -- Scheme Procedure: bit-count* v kv obj
  7083.      Return a count of how many entries in bit vector V are equal to
  7084.      OBJ, with KV selecting the entries to consider.
  7085.  
  7086.      If KV is a bit vector, then those entries where it has `#t' are
  7087.      the ones in V which are considered.  KV and V must be the same
  7088.      length.
  7089.  
  7090.      If KV is a u32vector, then it contains the indexes in V to
  7091.      consider.
  7092.  
  7093.      For example,
  7094.  
  7095.           (bit-count* #*01110111 #*11001101 #t) => 3
  7096.           (bit-count* #*01110111 #u32(7 0 4) #f)  => 2
  7097.  
  7098.     bit-invert!
  7099.  
  7100.  -- Scheme Procedure: bit-invert! v
  7101.      Modify the bit vector V by replacing each element with its
  7102.      negation.
  7103.  
  7104.     array->list
  7105.  
  7106.  -- Scheme Procedure: array->list v
  7107.      Return a list consisting of all the elements, in order, of ARRAY.
  7108.  
  7109.     list->typed-array
  7110.  
  7111.  -- Scheme Procedure: list->typed-array type shape lst
  7112.      Return an array of the type TYPE with elements the same as those
  7113.      of LST.
  7114.  
  7115.      The argument SHAPE determines the number of dimensions of the
  7116.      array and their shape.  It is either an exact integer, giving the
  7117.      number of dimensions directly, or a list whose length specifies
  7118.      the number of dimensions and each element specified the lower and
  7119.      optionally the upper bound of the corresponding dimension.  When
  7120.      the element is list of two elements, these elements give the lower
  7121.      and upper bounds.  When it is an exact integer, it gives only the
  7122.      lower bound.
  7123.  
  7124.     list->array
  7125.  
  7126.  -- Scheme Procedure: list->array ndim lst
  7127.      Return an array with elements the same as those of LST.
  7128.  
  7129.     list->uniform-array
  7130.  
  7131.  -- Scheme Procedure: list->uniform-array ndim prot lst
  7132.      Return a uniform array of the type indicated by prototype PROT
  7133.      with elements the same as those of LST.  Elements must be of the
  7134.      appropriate type, no coercions are done.
  7135.  
  7136.      The argument NDIM determines the number of dimensions of the
  7137.      array.  It is either an exact integer, giving the number directly,
  7138.      or a list of exact integers, whose length specifies the number of
  7139.      dimensions and each element is the lower index bound of its
  7140.      dimension.
  7141.  
  7142.     array-type
  7143.  
  7144.  -- Scheme Procedure: array-type ra
  7145.  
  7146.     array-prototype
  7147.  
  7148.  -- Scheme Procedure: array-prototype ra
  7149.      Return an object that would produce an array of the same type as
  7150.      ARRAY, if used as the PROTOTYPE for `make-uniform-array'.
  7151.  
  7152.     dynamic-link
  7153.  
  7154.  -- Scheme Procedure: dynamic-link filename
  7155.      Find the shared object (shared library) denoted by FILENAME and
  7156.      link it into the running Guile application.  The returned scheme
  7157.      object is a "handle" for the library which can be passed to
  7158.      `dynamic-func', `dynamic-call' etc.
  7159.  
  7160.      Searching for object files is system dependent.  Normally, if
  7161.      FILENAME does have an explicit directory it will be searched for
  7162.      in locations such as `/usr/lib' and `/usr/local/lib'.
  7163.  
  7164.     dynamic-object?
  7165.  
  7166.  -- Scheme Procedure: dynamic-object? obj
  7167.      Return `#t' if OBJ is a dynamic object handle, or `#f' otherwise.
  7168.  
  7169.     dynamic-unlink
  7170.  
  7171.  -- Scheme Procedure: dynamic-unlink dobj
  7172.      Unlink a dynamic object from the application, if possible.  The
  7173.      object must have been linked by `dynamic-link', with DOBJ the
  7174.      corresponding handle.  After this procedure is called, the handle
  7175.      can no longer be used to access the object.
  7176.  
  7177.     dynamic-func
  7178.  
  7179.  -- Scheme Procedure: dynamic-func name dobj
  7180.      Return a "handle" for the function NAME in the shared object
  7181.      referred to by DOBJ.  The handle can be passed to `dynamic-call'
  7182.      to actually call the function.
  7183.  
  7184.      Regardless whether your C compiler prepends an underscore `_' to
  7185.      the global names in a program, you should *not* include this
  7186.      underscore in NAME since it will be added automatically when
  7187.      necessary.
  7188.  
  7189.     dynamic-call
  7190.  
  7191.  -- Scheme Procedure: dynamic-call func dobj
  7192.      Call a C function in a dynamic object.  Two styles of invocation
  7193.      are supported:
  7194.  
  7195.         * FUNC can be a function handle returned by `dynamic-func'.  In
  7196.           this case DOBJ is ignored
  7197.  
  7198.         * FUNC can be a string with the name of the function to call,
  7199.           with DOBJ the handle of the dynamic object in which to find
  7200.           the function.  This is equivalent to
  7201.  
  7202.                (dynamic-call (dynamic-func FUNC DOBJ) #f)
  7203.  
  7204.      In either case, the function is passed no arguments and its return
  7205.      value is ignored.
  7206.  
  7207.     dynamic-args-call
  7208.  
  7209.  -- Scheme Procedure: dynamic-args-call func dobj args
  7210.      Call the C function indicated by FUNC and DOBJ, just like
  7211.      `dynamic-call', but pass it some arguments and return its return
  7212.      value.  The C function is expected to take two arguments and
  7213.      return an `int', just like `main':
  7214.           int c_func (int argc, char **argv);
  7215.  
  7216.      The parameter ARGS must be a list of strings and is converted into
  7217.      an array of `char *'.  The array is passed in ARGV and its size in
  7218.      ARGC.  The return value is converted to a Scheme number and
  7219.      returned from the call to `dynamic-args-call'.
  7220.  
  7221.     chown
  7222.  
  7223.  -- Scheme Procedure: chown object owner group
  7224.      Change the ownership and group of the file referred to by OBJECT to
  7225.      the integer values OWNER and GROUP.  OBJECT can be a string
  7226.      containing a file name or, if the platform supports fchown, a port
  7227.      or integer file descriptor which is open on the file.  The return
  7228.      value is unspecified.
  7229.  
  7230.      If OBJECT is a symbolic link, either the ownership of the link or
  7231.      the ownership of the referenced file will be changed depending on
  7232.      the operating system (lchown is unsupported at present).  If OWNER
  7233.      or GROUP is specified as `-1', then that ID is not changed.
  7234.  
  7235.     chmod
  7236.  
  7237.  -- Scheme Procedure: chmod object mode
  7238.      Changes the permissions of the file referred to by OBJ.  OBJ can
  7239.      be a string containing a file name or a port or integer file
  7240.      descriptor which is open on a file (in which case `fchmod' is used
  7241.      as the underlying system call).  MODE specifies the new
  7242.      permissions as a decimal number, e.g., `(chmod "foo" #o755)'.  The
  7243.      return value is unspecified.
  7244.  
  7245.     umask
  7246.  
  7247.  -- Scheme Procedure: umask [mode]
  7248.      If MODE is omitted, returns a decimal number representing the
  7249.      current file creation mask.  Otherwise the file creation mask is
  7250.      set to MODE and the previous value is returned.
  7251.  
  7252.      E.g., `(umask #o022)' sets the mask to octal 22, decimal 18.
  7253.  
  7254.     open-fdes
  7255.  
  7256.  -- Scheme Procedure: open-fdes path flags [mode]
  7257.      Similar to `open' but return a file descriptor instead of a port.
  7258.  
  7259.     open
  7260.  
  7261.  -- Scheme Procedure: open path flags [mode]
  7262.      Open the file named by PATH for reading and/or writing.  FLAGS is
  7263.      an integer specifying how the file should be opened.  MODE is an
  7264.      integer specifying the permission bits of the file, if it needs to
  7265.      be created, before the umask is applied.  The default is 666 (Unix
  7266.      itself has no default).
  7267.  
  7268.      FLAGS can be constructed by combining variables using `logior'.
  7269.      Basic flags are:
  7270.  
  7271.       -- Variable: O_RDONLY
  7272.           Open the file read-only.
  7273.  
  7274.       -- Variable: O_WRONLY
  7275.           Open the file write-only.
  7276.  
  7277.       -- Variable: O_RDWR
  7278.           Open the file read/write.
  7279.  
  7280.       -- Variable: O_APPEND
  7281.           Append to the file instead of truncating.
  7282.  
  7283.       -- Variable: O_CREAT
  7284.           Create the file if it does not already exist.
  7285.  
  7286.      See the Unix documentation of the `open' system call for
  7287.      additional flags.
  7288.  
  7289.     close
  7290.  
  7291.  -- Scheme Procedure: close fd_or_port
  7292.      Similar to close-port (*note close-port: Closing.), but also works
  7293.      on file descriptors.  A side effect of closing a file descriptor
  7294.      is that any ports using that file descriptor are moved to a
  7295.      different file descriptor and have their revealed counts set to
  7296.      zero.
  7297.  
  7298.     close-fdes
  7299.  
  7300.  -- Scheme Procedure: close-fdes fd
  7301.      A simple wrapper for the `close' system call.  Close file
  7302.      descriptor FD, which must be an integer.  Unlike close (*note
  7303.      close: Ports and File Descriptors.), the file descriptor will be
  7304.      closed even if a port is using it.  The return value is
  7305.      unspecified.
  7306.  
  7307.     stat
  7308.  
  7309.  -- Scheme Procedure: stat object
  7310.      Return an object containing various information about the file
  7311.      determined by OBJ.  OBJ can be a string containing a file name or
  7312.      a port or integer file descriptor which is open on a file (in
  7313.      which case `fstat' is used as the underlying system call).
  7314.  
  7315.      The object returned by `stat' can be passed as a single parameter
  7316.      to the following procedures, all of which return integers:
  7317.  
  7318.     `stat:dev'
  7319.           The device containing the file.
  7320.  
  7321.     `stat:ino'
  7322.           The file serial number, which distinguishes this file from all
  7323.           other files on the same device.
  7324.  
  7325.     `stat:mode'
  7326.           The mode of the file.  This includes file type information and
  7327.           the file permission bits.  See `stat:type' and `stat:perms'
  7328.           below.
  7329.  
  7330.     `stat:nlink'
  7331.           The number of hard links to the file.
  7332.  
  7333.     `stat:uid'
  7334.           The user ID of the file's owner.
  7335.  
  7336.     `stat:gid'
  7337.           The group ID of the file.
  7338.  
  7339.     `stat:rdev'
  7340.           Device ID; this entry is defined only for character or block
  7341.           special files.
  7342.  
  7343.     `stat:size'
  7344.           The size of a regular file in bytes.
  7345.  
  7346.     `stat:atime'
  7347.           The last access time for the file.
  7348.  
  7349.     `stat:mtime'
  7350.           The last modification time for the file.
  7351.  
  7352.     `stat:ctime'
  7353.           The last modification time for the attributes of the file.
  7354.  
  7355.     `stat:blksize'
  7356.           The optimal block size for reading or writing the file, in
  7357.           bytes.
  7358.  
  7359.     `stat:blocks'
  7360.           The amount of disk space that the file occupies measured in
  7361.           units of 512 byte blocks.
  7362.  
  7363.      In addition, the following procedures return the information from
  7364.      stat:mode in a more convenient form:
  7365.  
  7366.     `stat:type'
  7367.           A symbol representing the type of file.  Possible values are
  7368.           regular, directory, symlink, block-special, char-special,
  7369.           fifo, socket and unknown
  7370.  
  7371.     `stat:perms'
  7372.           An integer representing the access permission bits.
  7373.  
  7374.     link
  7375.  
  7376.  -- Scheme Procedure: link oldpath newpath
  7377.      Creates a new name NEWPATH in the file system for the file named
  7378.      by OLDPATH.  If OLDPATH is a symbolic link, the link may or may
  7379.      not be followed depending on the system.
  7380.  
  7381.     rename-file
  7382.  
  7383.  -- Scheme Procedure: rename-file oldname newname
  7384.      Renames the file specified by OLDNAME to NEWNAME.  The return
  7385.      value is unspecified.
  7386.  
  7387.     delete-file
  7388.  
  7389.  -- Scheme Procedure: delete-file str
  7390.      Deletes (or "unlinks") the file specified by PATH.
  7391.  
  7392.     mkdir
  7393.  
  7394.  -- Scheme Procedure: mkdir path [mode]
  7395.      Create a new directory named by PATH.  If MODE is omitted then the
  7396.      permissions of the directory file are set using the current umask.
  7397.      Otherwise they are set to the decimal value specified with MODE.
  7398.      The return value is unspecified.
  7399.  
  7400.     rmdir
  7401.  
  7402.  -- Scheme Procedure: rmdir path
  7403.      Remove the existing directory named by PATH.  The directory must
  7404.      be empty for this to succeed.  The return value is unspecified.
  7405.  
  7406.     directory-stream?
  7407.  
  7408.  -- Scheme Procedure: directory-stream? obj
  7409.      Return a boolean indicating whether OBJECT is a directory stream
  7410.      as returned by `opendir'.
  7411.  
  7412.     opendir
  7413.  
  7414.  -- Scheme Procedure: opendir dirname
  7415.      Open the directory specified by PATH and return a directory stream.
  7416.  
  7417.     readdir
  7418.  
  7419.  -- Scheme Procedure: readdir port
  7420.      Return (as a string) the next directory entry from the directory
  7421.      stream STREAM.  If there is no remaining entry to be read then the
  7422.      end of file object is returned.
  7423.  
  7424.     rewinddir
  7425.  
  7426.  -- Scheme Procedure: rewinddir port
  7427.      Reset the directory port STREAM so that the next call to `readdir'
  7428.      will return the first directory entry.
  7429.  
  7430.     closedir
  7431.  
  7432.  -- Scheme Procedure: closedir port
  7433.      Close the directory stream STREAM.  The return value is
  7434.      unspecified.
  7435.  
  7436.     chdir
  7437.  
  7438.  -- Scheme Procedure: chdir str
  7439.      Change the current working directory to PATH.  The return value is
  7440.      unspecified.
  7441.  
  7442.     getcwd
  7443.  
  7444.  -- Scheme Procedure: getcwd
  7445.      Return the name of the current working directory.
  7446.  
  7447.     select
  7448.  
  7449.  -- Scheme Procedure: select reads writes excepts [secs [usecs]]
  7450.      This procedure has a variety of uses: waiting for the ability to
  7451.      provide input, accept output, or the existence of exceptional
  7452.      conditions on a collection of ports or file descriptors, or
  7453.      waiting for a timeout to occur.  It also returns if interrupted by
  7454.      a signal.
  7455.  
  7456.      READS, WRITES and EXCEPTS can be lists or vectors, with each
  7457.      member a port or a file descriptor.  The value returned is a list
  7458.      of three corresponding lists or vectors containing only the
  7459.      members which meet the specified requirement.  The ability of port
  7460.      buffers to provide input or accept output is taken into account.
  7461.      Ordering of the input lists or vectors is not preserved.
  7462.  
  7463.      The optional arguments SECS and USECS specify the timeout.  Either
  7464.      SECS can be specified alone, as either an integer or a real
  7465.      number, or both SECS and USECS can be specified as integers, in
  7466.      which case USECS is an additional timeout expressed in
  7467.      microseconds.  If SECS is omitted or is `#f' then select will wait
  7468.      for as long as it takes for one of the other conditions to be
  7469.      satisfied.
  7470.  
  7471.      The scsh version of `select' differs as follows: Only vectors are
  7472.      accepted for the first three arguments.  The USECS argument is not
  7473.      supported.  Multiple values are returned instead of a list.
  7474.      Duplicates in the input vectors appear only once in output.  An
  7475.      additional `select!' interface is provided.
  7476.  
  7477.     fcntl
  7478.  
  7479.  -- Scheme Procedure: fcntl object cmd [value]
  7480.      Apply COMMAND to the specified file descriptor or the underlying
  7481.      file descriptor of the specified port.  VALUE is an optional
  7482.      integer argument.
  7483.  
  7484.      Values for COMMAND are:
  7485.  
  7486.     `F_DUPFD'
  7487.           Duplicate a file descriptor
  7488.  
  7489.     `F_GETFD'
  7490.           Get flags associated with the file descriptor.
  7491.  
  7492.     `F_SETFD'
  7493.           Set flags associated with the file descriptor to VALUE.
  7494.  
  7495.     `F_GETFL'
  7496.           Get flags associated with the open file.
  7497.  
  7498.     `F_SETFL'
  7499.           Set flags associated with the open file to VALUE
  7500.  
  7501.     `F_GETOWN'
  7502.           Get the process ID of a socket's owner, for `SIGIO' signals.
  7503.  
  7504.     `F_SETOWN'
  7505.           Set the process that owns a socket to VALUE, for `SIGIO'
  7506.           signals.
  7507.  
  7508.     `FD_CLOEXEC'
  7509.           The value used to indicate the "close on exec" flag with
  7510.           `F_GETFL' or `F_SETFL'.
  7511.  
  7512.     fsync
  7513.  
  7514.  -- Scheme Procedure: fsync object
  7515.      Copies any unwritten data for the specified output file descriptor
  7516.      to disk.  If PORT/FD is a port, its buffer is flushed before the
  7517.      underlying file descriptor is fsync'd.  The return value is
  7518.      unspecified.
  7519.  
  7520.     symlink
  7521.  
  7522.  -- Scheme Procedure: symlink oldpath newpath
  7523.      Create a symbolic link named PATH-TO with the value (i.e.,
  7524.      pointing to) PATH-FROM.  The return value is unspecified.
  7525.  
  7526.     readlink
  7527.  
  7528.  -- Scheme Procedure: readlink path
  7529.      Return the value of the symbolic link named by PATH (a string),
  7530.      i.e., the file that the link points to.
  7531.  
  7532.     lstat
  7533.  
  7534.  -- Scheme Procedure: lstat str
  7535.      Similar to `stat', but does not follow symbolic links, i.e., it
  7536.      will return information about a symbolic link itself, not the file
  7537.      it points to.  PATH must be a string.
  7538.  
  7539.     copy-file
  7540.  
  7541.  -- Scheme Procedure: copy-file oldfile newfile
  7542.      Copy the file specified by PATH-FROM to PATH-TO.  The return value
  7543.      is unspecified.
  7544.  
  7545.     dirname
  7546.  
  7547.  -- Scheme Procedure: dirname filename
  7548.      Return the directory name component of the file name FILENAME. If
  7549.      FILENAME does not contain a directory component, `.' is returned.
  7550.  
  7551.     basename
  7552.  
  7553.  -- Scheme Procedure: basename filename [suffix]
  7554.      Return the base name of the file name FILENAME. The base name is
  7555.      the file name without any directory components.  If SUFFIX is
  7556.      provided, and is equal to the end of BASENAME, it is removed also.
  7557.  
  7558.     pipe
  7559.  
  7560.  -- Scheme Procedure: pipe
  7561.      Return a newly created pipe: a pair of ports which are linked
  7562.      together on the local machine.  The _car_ is the input port and
  7563.      the _cdr_ is the output port.  Data written (and flushed) to the
  7564.      output port can be read from the input port.  Pipes are commonly
  7565.      used for communication with a newly forked child process.  The
  7566.      need to flush the output port can be avoided by making it
  7567.      unbuffered using `setvbuf'.
  7568.  
  7569.      Writes occur atomically provided the size of the data in bytes is
  7570.      not greater than the value of `PIPE_BUF'.  Note that the output
  7571.      port is likely to block if too much data (typically equal to
  7572.      `PIPE_BUF') has been written but not yet read from the input port.
  7573.  
  7574.     getgroups
  7575.  
  7576.  -- Scheme Procedure: getgroups
  7577.      Return a vector of integers representing the current supplementary
  7578.      group IDs.
  7579.  
  7580.     setgroups
  7581.  
  7582.  -- Scheme Procedure: setgroups group_vec
  7583.      Set the current set of supplementary group IDs to the integers in
  7584.      the given vector VEC.  The return value is unspecified.
  7585.  
  7586.      Generally only the superuser can set the process group IDs.
  7587.  
  7588.     getpw
  7589.  
  7590.  -- Scheme Procedure: getpw [user]
  7591.      Look up an entry in the user database.  OBJ can be an integer, a
  7592.      string, or omitted, giving the behaviour of getpwuid, getpwnam or
  7593.      getpwent respectively.
  7594.  
  7595.     setpw
  7596.  
  7597.  -- Scheme Procedure: setpw [arg]
  7598.      If called with a true argument, initialize or reset the password
  7599.      data stream.  Otherwise, close the stream.  The `setpwent' and
  7600.      `endpwent' procedures are implemented on top of this.
  7601.  
  7602.     getgr
  7603.  
  7604.  -- Scheme Procedure: getgr [name]
  7605.      Look up an entry in the group database.  OBJ can be an integer, a
  7606.      string, or omitted, giving the behaviour of getgrgid, getgrnam or
  7607.      getgrent respectively.
  7608.  
  7609.     setgr
  7610.  
  7611.  -- Scheme Procedure: setgr [arg]
  7612.      If called with a true argument, initialize or reset the group data
  7613.      stream.  Otherwise, close the stream.  The `setgrent' and
  7614.      `endgrent' procedures are implemented on top of this.
  7615.  
  7616.     kill
  7617.  
  7618.  -- Scheme Procedure: kill pid sig
  7619.      Sends a signal to the specified process or group of processes.
  7620.  
  7621.      PID specifies the processes to which the signal is sent:
  7622.  
  7623.     PID greater than 0
  7624.           The process whose identifier is PID.
  7625.  
  7626.     PID equal to 0
  7627.           All processes in the current process group.
  7628.  
  7629.     PID less than -1
  7630.           The process group whose identifier is -PID
  7631.  
  7632.     PID equal to -1
  7633.           If the process is privileged, all processes except for some
  7634.           special system processes.  Otherwise, all processes with the
  7635.           current effective user ID.
  7636.  
  7637.      SIG should be specified using a variable corresponding to the Unix
  7638.      symbolic name, e.g.,
  7639.  
  7640.       -- Variable: SIGHUP
  7641.           Hang-up signal.
  7642.  
  7643.       -- Variable: SIGINT
  7644.           Interrupt signal.
  7645.  
  7646.     waitpid
  7647.  
  7648.  -- Scheme Procedure: waitpid pid [options]
  7649.      This procedure collects status information from a child process
  7650.      which has terminated or (optionally) stopped.  Normally it will
  7651.      suspend the calling process until this can be done.  If more than
  7652.      one child process is eligible then one will be chosen by the
  7653.      operating system.
  7654.  
  7655.      The value of PID determines the behaviour:
  7656.  
  7657.     PID greater than 0
  7658.           Request status information from the specified child process.
  7659.  
  7660.     PID equal to -1 or WAIT_ANY
  7661.           Request status information for any child process.
  7662.  
  7663.     PID equal to 0 or WAIT_MYPGRP
  7664.           Request status information for any child process in the
  7665.           current process group.
  7666.  
  7667.     PID less than -1
  7668.           Request status information for any child process whose
  7669.           process group ID is -PID.
  7670.  
  7671.      The OPTIONS argument, if supplied, should be the bitwise OR of the
  7672.      values of zero or more of the following variables:
  7673.  
  7674.       -- Variable: WNOHANG
  7675.           Return immediately even if there are no child processes to be
  7676.           collected.
  7677.  
  7678.       -- Variable: WUNTRACED
  7679.           Report status information for stopped processes as well as
  7680.           terminated processes.
  7681.  
  7682.      The return value is a pair containing:
  7683.  
  7684.        1. The process ID of the child process, or 0 if `WNOHANG' was
  7685.           specified and no process was collected.
  7686.  
  7687.        2. The integer status value.
  7688.  
  7689.     status:exit-val
  7690.  
  7691.  -- Scheme Procedure: status:exit-val status
  7692.      Return the exit status value, as would be set if a process ended
  7693.      normally through a call to `exit' or `_exit', if any, otherwise
  7694.      `#f'.
  7695.  
  7696.     status:term-sig
  7697.  
  7698.  -- Scheme Procedure: status:term-sig status
  7699.      Return the signal number which terminated the process, if any,
  7700.      otherwise `#f'.
  7701.  
  7702.     status:stop-sig
  7703.  
  7704.  -- Scheme Procedure: status:stop-sig status
  7705.      Return the signal number which stopped the process, if any,
  7706.      otherwise `#f'.
  7707.  
  7708.     getppid
  7709.  
  7710.  -- Scheme Procedure: getppid
  7711.      Return an integer representing the process ID of the parent
  7712.      process.
  7713.  
  7714.     getuid
  7715.  
  7716.  -- Scheme Procedure: getuid
  7717.      Return an integer representing the current real user ID.
  7718.  
  7719.     getgid
  7720.  
  7721.  -- Scheme Procedure: getgid
  7722.      Return an integer representing the current real group ID.
  7723.  
  7724.     geteuid
  7725.  
  7726.  -- Scheme Procedure: geteuid
  7727.      Return an integer representing the current effective user ID.  If
  7728.      the system does not support effective IDs, then the real ID is
  7729.      returned.  `(provided? 'EIDs)' reports whether the system supports
  7730.      effective IDs.
  7731.  
  7732.     getegid
  7733.  
  7734.  -- Scheme Procedure: getegid
  7735.      Return an integer representing the current effective group ID.  If
  7736.      the system does not support effective IDs, then the real ID is
  7737.      returned.  `(provided? 'EIDs)' reports whether the system supports
  7738.      effective IDs.
  7739.  
  7740.     setuid
  7741.  
  7742.  -- Scheme Procedure: setuid id
  7743.      Sets both the real and effective user IDs to the integer ID,
  7744.      provided the process has appropriate privileges.  The return value
  7745.      is unspecified.
  7746.  
  7747.     setgid
  7748.  
  7749.  -- Scheme Procedure: setgid id
  7750.      Sets both the real and effective group IDs to the integer ID,
  7751.      provided the process has appropriate privileges.  The return value
  7752.      is unspecified.
  7753.  
  7754.     seteuid
  7755.  
  7756.  -- Scheme Procedure: seteuid id
  7757.      Sets the effective user ID to the integer ID, provided the process
  7758.      has appropriate privileges.  If effective IDs are not supported,
  7759.      the real ID is set instead - `(provided? 'EIDs)' reports whether
  7760.      the system supports effective IDs.  The return value is
  7761.      unspecified.
  7762.  
  7763.     setegid
  7764.  
  7765.  -- Scheme Procedure: setegid id
  7766.      Sets the effective group ID to the integer ID, provided the process
  7767.      has appropriate privileges.  If effective IDs are not supported,
  7768.      the real ID is set instead - `(provided? 'EIDs)' reports whether
  7769.      the system supports effective IDs.  The return value is
  7770.      unspecified.
  7771.  
  7772.     getpgrp
  7773.  
  7774.  -- Scheme Procedure: getpgrp
  7775.      Return an integer representing the current process group ID.  This
  7776.      is the POSIX definition, not BSD.
  7777.  
  7778.     setpgid
  7779.  
  7780.  -- Scheme Procedure: setpgid pid pgid
  7781.      Move the process PID into the process group PGID.  PID or PGID
  7782.      must be integers: they can be zero to indicate the ID of the
  7783.      current process.  Fails on systems that do not support job control.
  7784.      The return value is unspecified.
  7785.  
  7786.     setsid
  7787.  
  7788.  -- Scheme Procedure: setsid
  7789.      Creates a new session.  The current process becomes the session
  7790.      leader and is put in a new process group.  The process will be
  7791.      detached from its controlling terminal if it has one.  The return
  7792.      value is an integer representing the new process group ID.
  7793.  
  7794.     ttyname
  7795.  
  7796.  -- Scheme Procedure: ttyname port
  7797.      Return a string with the name of the serial terminal device
  7798.      underlying PORT.
  7799.  
  7800.     ctermid
  7801.  
  7802.  -- Scheme Procedure: ctermid
  7803.      Return a string containing the file name of the controlling
  7804.      terminal for the current process.
  7805.  
  7806.     tcgetpgrp
  7807.  
  7808.  -- Scheme Procedure: tcgetpgrp port
  7809.      Return the process group ID of the foreground process group
  7810.      associated with the terminal open on the file descriptor
  7811.      underlying PORT.
  7812.  
  7813.      If there is no foreground process group, the return value is a
  7814.      number greater than 1 that does not match the process group ID of
  7815.      any existing process group.  This can happen if all of the
  7816.      processes in the job that was formerly the foreground job have
  7817.      terminated, and no other job has yet been moved into the
  7818.      foreground.
  7819.  
  7820.     tcsetpgrp
  7821.  
  7822.  -- Scheme Procedure: tcsetpgrp port pgid
  7823.      Set the foreground process group ID for the terminal used by the
  7824.      file descriptor underlying PORT to the integer PGID.  The calling
  7825.      process must be a member of the same session as PGID and must have
  7826.      the same controlling terminal.  The return value is unspecified.
  7827.  
  7828.     execl
  7829.  
  7830.  -- Scheme Procedure: execl filename . args
  7831.      Executes the file named by PATH as a new process image.  The
  7832.      remaining arguments are supplied to the process; from a C program
  7833.      they are accessible as the `argv' argument to `main'.
  7834.      Conventionally the first ARG is the same as PATH.  All arguments
  7835.      must be strings.
  7836.  
  7837.      If ARG is missing, PATH is executed with a null argument list,
  7838.      which may have system-dependent side-effects.
  7839.  
  7840.      This procedure is currently implemented using the `execv' system
  7841.      call, but we call it `execl' because of its Scheme calling
  7842.      interface.
  7843.  
  7844.     execlp
  7845.  
  7846.  -- Scheme Procedure: execlp filename . args
  7847.      Similar to `execl', however if FILENAME does not contain a slash
  7848.      then the file to execute will be located by searching the
  7849.      directories listed in the `PATH' environment variable.
  7850.  
  7851.      This procedure is currently implemented using the `execvp' system
  7852.      call, but we call it `execlp' because of its Scheme calling
  7853.      interface.
  7854.  
  7855.     execle
  7856.  
  7857.  -- Scheme Procedure: execle filename env . args
  7858.      Similar to `execl', but the environment of the new process is
  7859.      specified by ENV, which must be a list of strings as returned by
  7860.      the `environ' procedure.
  7861.  
  7862.      This procedure is currently implemented using the `execve' system
  7863.      call, but we call it `execle' because of its Scheme calling
  7864.      interface.
  7865.  
  7866.     primitive-fork
  7867.  
  7868.  -- Scheme Procedure: primitive-fork
  7869.      Creates a new "child" process by duplicating the current "parent"
  7870.      process.  In the child the return value is 0.  In the parent the
  7871.      return value is the integer process ID of the child.
  7872.  
  7873.      This procedure has been renamed from `fork' to avoid a naming
  7874.      conflict with the scsh fork.
  7875.  
  7876.     uname
  7877.  
  7878.  -- Scheme Procedure: uname
  7879.      Return an object with some information about the computer system
  7880.      the program is running on.
  7881.  
  7882.     environ
  7883.  
  7884.  -- Scheme Procedure: environ [env]
  7885.      If ENV is omitted, return the current environment (in the Unix
  7886.      sense) as a list of strings.  Otherwise set the current
  7887.      environment, which is also the default environment for child
  7888.      processes, to the supplied list of strings.  Each member of ENV
  7889.      should be of the form `NAME=VALUE' and values of `NAME' should not
  7890.      be duplicated.  If ENV is supplied then the return value is
  7891.      unspecified.
  7892.  
  7893.     tmpnam
  7894.  
  7895.  -- Scheme Procedure: tmpnam
  7896.      Return a name in the file system that does not match any existing
  7897.      file.  However there is no guarantee that another process will not
  7898.      create the file after `tmpnam' is called.  Care should be taken if
  7899.      opening the file, e.g., use the `O_EXCL' open flag or use
  7900.      `mkstemp!' instead.
  7901.  
  7902.     mkstemp!
  7903.  
  7904.  -- Scheme Procedure: mkstemp! tmpl
  7905.      Create a new unique file in the file system and return a new
  7906.      buffered port open for reading and writing to the file.
  7907.  
  7908.      TMPL is a string specifying where the file should be created: it
  7909.      must end with `XXXXXX' and those `X's will be changed in the
  7910.      string to return the name of the file.  (`port-filename' on the
  7911.      port also gives the name.)
  7912.  
  7913.      POSIX doesn't specify the permissions mode of the file, on GNU and
  7914.      most systems it's `#o600'.  An application can use `chmod' to
  7915.      relax that if desired.  For example `#o666' less `umask', which is
  7916.      usual for ordinary file creation,
  7917.  
  7918.           (let ((port (mkstemp! (string-copy "/tmp/myfile-XXXXXX"))))
  7919.             (chmod port (logand #o666 (lognot (umask))))
  7920.             ...)
  7921.  
  7922.     utime
  7923.  
  7924.  -- Scheme Procedure: utime pathname [actime [modtime]]
  7925.      `utime' sets the access and modification times for the file named
  7926.      by PATH.  If ACTIME or MODTIME is not supplied, then the current
  7927.      time is used.  ACTIME and MODTIME must be integer time values as
  7928.      returned by the `current-time' procedure.
  7929.           (utime "foo" (- (current-time) 3600))
  7930.      will set the access time to one hour in the past and the
  7931.      modification time to the current time.
  7932.  
  7933.     access?
  7934.  
  7935.  -- Scheme Procedure: access? path how
  7936.      Test accessibility of a file under the real UID and GID of the
  7937.      calling process.  The return is `#t' if PATH exists and the
  7938.      permissions requested by HOW are all allowed, or `#f' if not.
  7939.  
  7940.      HOW is an integer which is one of the following values, or a
  7941.      bitwise-OR (`logior') of multiple values.
  7942.  
  7943.       -- Variable: R_OK
  7944.           Test for read permission.
  7945.  
  7946.       -- Variable: W_OK
  7947.           Test for write permission.
  7948.  
  7949.       -- Variable: X_OK
  7950.           Test for execute permission.
  7951.  
  7952.       -- Variable: F_OK
  7953.           Test for existence of the file.  This is implied by each of
  7954.           the other tests, so there's no need to combine it with them.
  7955.  
  7956.      It's important to note that `access?' does not simply indicate
  7957.      what will happen on attempting to read or write a file.  In normal
  7958.      circumstances it does, but in a set-UID or set-GID program it
  7959.      doesn't because `access?' tests the real ID, whereas an open or
  7960.      execute attempt uses the effective ID.
  7961.  
  7962.      A program which will never run set-UID/GID can ignore the
  7963.      difference between real and effective IDs, but for maximum
  7964.      generality, especially in library functions, it's best not to use
  7965.      `access?' to predict the result of an open or execute, instead
  7966.      simply attempt that and catch any exception.
  7967.  
  7968.      The main use for `access?' is to let a set-UID/GID program
  7969.      determine what the invoking user would have been allowed to do,
  7970.      without the greater (or perhaps lesser) privileges afforded by the
  7971.      effective ID.  For more on this, see "Testing File Access" in The
  7972.      GNU C Library Reference Manual.
  7973.  
  7974.     getpid
  7975.  
  7976.  -- Scheme Procedure: getpid
  7977.      Return an integer representing the current process ID.
  7978.  
  7979.     putenv
  7980.  
  7981.  -- Scheme Procedure: putenv str
  7982.      Modifies the environment of the current process, which is also the
  7983.      default environment inherited by child processes.
  7984.  
  7985.      If STRING is of the form `NAME=VALUE' then it will be written
  7986.      directly into the environment, replacing any existing environment
  7987.      string with name matching `NAME'.  If STRING does not contain an
  7988.      equal sign, then any existing string with name matching STRING will
  7989.      be removed.
  7990.  
  7991.      The return value is unspecified.
  7992.  
  7993.     setlocale
  7994.  
  7995.  -- Scheme Procedure: setlocale category [locale]
  7996.      If LOCALE is omitted, return the current value of the specified
  7997.      locale category as a system-dependent string.  CATEGORY should be
  7998.      specified using the values `LC_COLLATE', `LC_ALL' etc.
  7999.  
  8000.      Otherwise the specified locale category is set to the string
  8001.      LOCALE and the new value is returned as a system-dependent string.
  8002.      If LOCALE is an empty string, the locale will be set using
  8003.      environment variables.
  8004.  
  8005.     mknod
  8006.  
  8007.  -- Scheme Procedure: mknod path type perms dev
  8008.      Creates a new special file, such as a file corresponding to a
  8009.      device.  PATH specifies the name of the file.  TYPE should be one
  8010.      of the following symbols: regular, directory, symlink,
  8011.      block-special, char-special, fifo, or socket.  PERMS (an integer)
  8012.      specifies the file permissions.  DEV (an integer) specifies which
  8013.      device the special file refers to.  Its exact interpretation
  8014.      depends on the kind of special file being created.
  8015.  
  8016.      E.g.,
  8017.           (mknod "/dev/fd0" 'block-special #o660 (+ (* 2 256) 2))
  8018.  
  8019.      The return value is unspecified.
  8020.  
  8021.     nice
  8022.  
  8023.  -- Scheme Procedure: nice incr
  8024.      Increment the priority of the current process by INCR.  A higher
  8025.      priority value means that the process runs less often.  The return
  8026.      value is unspecified.
  8027.  
  8028.     sync
  8029.  
  8030.  -- Scheme Procedure: sync
  8031.      Flush the operating system disk buffers.  The return value is
  8032.      unspecified.
  8033.  
  8034.     crypt
  8035.  
  8036.  -- Scheme Procedure: crypt key salt
  8037.      Encrypt KEY using SALT as the salt value to the crypt(3) library
  8038.      call.
  8039.  
  8040.     chroot
  8041.  
  8042.  -- Scheme Procedure: chroot path
  8043.      Change the root directory to that specified in PATH.  This
  8044.      directory will be used for path names beginning with `/'.  The
  8045.      root directory is inherited by all children of the current
  8046.      process.  Only the superuser may change the root directory.
  8047.  
  8048.     getlogin
  8049.  
  8050.  -- Scheme Procedure: getlogin
  8051.      Return a string containing the name of the user logged in on the
  8052.      controlling terminal of the process, or `#f' if this information
  8053.      cannot be obtained.
  8054.  
  8055.     cuserid
  8056.  
  8057.  -- Scheme Procedure: cuserid
  8058.      Return a string containing a user name associated with the
  8059.      effective user id of the process.  Return `#f' if this information
  8060.      cannot be obtained.
  8061.  
  8062.     getpriority
  8063.  
  8064.  -- Scheme Procedure: getpriority which who
  8065.      Return the scheduling priority of the process, process group or
  8066.      user, as indicated by WHICH and WHO. WHICH is one of the variables
  8067.      `PRIO_PROCESS', `PRIO_PGRP' or `PRIO_USER', and WHO is interpreted
  8068.      relative to WHICH (a process identifier for `PRIO_PROCESS',
  8069.      process group identifier for `PRIO_PGRP', and a user identifier
  8070.      for `PRIO_USER'.  A zero value of WHO denotes the current process,
  8071.      process group, or user.  Return the highest priority (lowest
  8072.      numerical value) of any of the specified processes.
  8073.  
  8074.     setpriority
  8075.  
  8076.  -- Scheme Procedure: setpriority which who prio
  8077.      Set the scheduling priority of the process, process group or user,
  8078.      as indicated by WHICH and WHO. WHICH is one of the variables
  8079.      `PRIO_PROCESS', `PRIO_PGRP' or `PRIO_USER', and WHO is interpreted
  8080.      relative to WHICH (a process identifier for `PRIO_PROCESS',
  8081.      process group identifier for `PRIO_PGRP', and a user identifier
  8082.      for `PRIO_USER'.  A zero value of WHO denotes the current process,
  8083.      process group, or user.  PRIO is a value in the range -20 and 20,
  8084.      the default priority is 0; lower priorities cause more favorable
  8085.      scheduling.  Sets the priority of all of the specified processes.
  8086.      Only the super-user may lower priorities.  The return value is not
  8087.      specified.
  8088.  
  8089.     getpass
  8090.  
  8091.  -- Scheme Procedure: getpass prompt
  8092.      Display PROMPT to the standard error output and read a password
  8093.      from `/dev/tty'.  If this file is not accessible, it reads from
  8094.      standard input.  The password may be up to 127 characters in
  8095.      length.  Additional characters and the terminating newline
  8096.      character are discarded.  While reading the password, echoing and
  8097.      the generation of signals by special characters is disabled.
  8098.  
  8099.     flock
  8100.  
  8101.  -- Scheme Procedure: flock file operation
  8102.      Apply or remove an advisory lock on an open file.  OPERATION
  8103.      specifies the action to be done:
  8104.  
  8105.       -- Variable: LOCK_SH
  8106.           Shared lock.  More than one process may hold a shared lock
  8107.           for a given file at a given time.
  8108.  
  8109.       -- Variable: LOCK_EX
  8110.           Exclusive lock.  Only one process may hold an exclusive lock
  8111.           for a given file at a given time.
  8112.  
  8113.       -- Variable: LOCK_UN
  8114.           Unlock the file.
  8115.  
  8116.       -- Variable: LOCK_NB
  8117.           Don't block when locking.  This is combined with one of the
  8118.           other operations using `logior'.  If `flock' would block an
  8119.           `EWOULDBLOCK' error is thrown.
  8120.  
  8121.      The return value is not specified. FILE may be an open file
  8122.      descriptor or an open file descriptor port.
  8123.  
  8124.      Note that `flock' does not lock files across NFS.
  8125.  
  8126.     sethostname
  8127.  
  8128.  -- Scheme Procedure: sethostname name
  8129.      Set the host name of the current processor to NAME. May only be
  8130.      used by the superuser.  The return value is not specified.
  8131.  
  8132.     gethostname
  8133.  
  8134.  -- Scheme Procedure: gethostname
  8135.      Return the host name of the current processor.
  8136.  
  8137.     gethost
  8138.  
  8139.  -- Scheme Procedure: gethost [host]
  8140.  -- Scheme Procedure: gethostbyname hostname
  8141.  -- Scheme Procedure: gethostbyaddr address
  8142.      Look up a host by name or address, returning a host object.  The
  8143.      `gethost' procedure will accept either a string name or an integer
  8144.      address; if given no arguments, it behaves like `gethostent' (see
  8145.      below).  If a name or address is supplied but the address can not
  8146.      be found, an error will be thrown to one of the keys:
  8147.      `host-not-found', `try-again', `no-recovery' or `no-data',
  8148.      corresponding to the equivalent `h_error' values.  Unusual
  8149.      conditions may result in errors thrown to the `system-error' or
  8150.      `misc_error' keys.
  8151.  
  8152.     getnet
  8153.  
  8154.  -- Scheme Procedure: getnet [net]
  8155.  -- Scheme Procedure: getnetbyname net-name
  8156.  -- Scheme Procedure: getnetbyaddr net-number
  8157.      Look up a network by name or net number in the network database.
  8158.      The NET-NAME argument must be a string, and the NET-NUMBER
  8159.      argument must be an integer.  `getnet' will accept either type of
  8160.      argument, behaving like `getnetent' (see below) if no arguments are
  8161.      given.
  8162.  
  8163.     getproto
  8164.  
  8165.  -- Scheme Procedure: getproto [protocol]
  8166.  -- Scheme Procedure: getprotobyname name
  8167.  -- Scheme Procedure: getprotobynumber number
  8168.      Look up a network protocol by name or by number.  `getprotobyname'
  8169.      takes a string argument, and `getprotobynumber' takes an integer
  8170.      argument.  `getproto' will accept either type, behaving like
  8171.      `getprotoent' (see below) if no arguments are supplied.
  8172.  
  8173.     getserv
  8174.  
  8175.  -- Scheme Procedure: getserv [name [protocol]]
  8176.  -- Scheme Procedure: getservbyname name protocol
  8177.  -- Scheme Procedure: getservbyport port protocol
  8178.      Look up a network service by name or by service number, and return
  8179.      a network service object.  The PROTOCOL argument specifies the name
  8180.      of the desired protocol; if the protocol found in the network
  8181.      service database does not match this name, a system error is
  8182.      signalled.
  8183.  
  8184.      The `getserv' procedure will take either a service name or number
  8185.      as its first argument; if given no arguments, it behaves like
  8186.      `getservent' (see below).
  8187.  
  8188.     sethost
  8189.  
  8190.  -- Scheme Procedure: sethost [stayopen]
  8191.      If STAYOPEN is omitted, this is equivalent to `endhostent'.
  8192.      Otherwise it is equivalent to `sethostent stayopen'.
  8193.  
  8194.     setnet
  8195.  
  8196.  -- Scheme Procedure: setnet [stayopen]
  8197.      If STAYOPEN is omitted, this is equivalent to `endnetent'.
  8198.      Otherwise it is equivalent to `setnetent stayopen'.
  8199.  
  8200.     setproto
  8201.  
  8202.  -- Scheme Procedure: setproto [stayopen]
  8203.      If STAYOPEN is omitted, this is equivalent to `endprotoent'.
  8204.      Otherwise it is equivalent to `setprotoent stayopen'.
  8205.  
  8206.     setserv
  8207.  
  8208.  -- Scheme Procedure: setserv [stayopen]
  8209.      If STAYOPEN is omitted, this is equivalent to `endservent'.
  8210.      Otherwise it is equivalent to `setservent stayopen'.
  8211.  
  8212.     htons
  8213.  
  8214.  -- Scheme Procedure: htons value
  8215.      Convert a 16 bit quantity from host to network byte ordering.
  8216.      VALUE is packed into 2 bytes, which are then converted and
  8217.      returned as a new integer.
  8218.  
  8219.     ntohs
  8220.  
  8221.  -- Scheme Procedure: ntohs value
  8222.      Convert a 16 bit quantity from network to host byte ordering.
  8223.      VALUE is packed into 2 bytes, which are then converted and
  8224.      returned as a new integer.
  8225.  
  8226.     htonl
  8227.  
  8228.  -- Scheme Procedure: htonl value
  8229.      Convert a 32 bit quantity from host to network byte ordering.
  8230.      VALUE is packed into 4 bytes, which are then converted and
  8231.      returned as a new integer.
  8232.  
  8233.     ntohl
  8234.  
  8235.  -- Scheme Procedure: ntohl value
  8236.      Convert a 32 bit quantity from network to host byte ordering.
  8237.      VALUE is packed into 4 bytes, which are then converted and
  8238.      returned as a new integer.
  8239.  
  8240.     inet-aton
  8241.  
  8242.  -- Scheme Procedure: inet-aton address
  8243.      Convert an IPv4 Internet address from printable string (dotted
  8244.      decimal notation) to an integer.  E.g.,
  8245.  
  8246.           (inet-aton "127.0.0.1") => 2130706433
  8247.  
  8248.     inet-ntoa
  8249.  
  8250.  -- Scheme Procedure: inet-ntoa inetid
  8251.      Convert an IPv4 Internet address to a printable (dotted decimal
  8252.      notation) string.  E.g.,
  8253.  
  8254.           (inet-ntoa 2130706433) => "127.0.0.1"
  8255.  
  8256.     inet-netof
  8257.  
  8258.  -- Scheme Procedure: inet-netof address
  8259.      Return the network number part of the given IPv4 Internet address.
  8260.      E.g.,
  8261.  
  8262.           (inet-netof 2130706433) => 127
  8263.  
  8264.     inet-lnaof
  8265.  
  8266.  -- Scheme Procedure: inet-lnaof address
  8267.      Return the local-address-with-network part of the given IPv4
  8268.      Internet address, using the obsolete class A/B/C system.  E.g.,
  8269.  
  8270.           (inet-lnaof 2130706433) => 1
  8271.  
  8272.     inet-makeaddr
  8273.  
  8274.  -- Scheme Procedure: inet-makeaddr net lna
  8275.      Make an IPv4 Internet address by combining the network number NET
  8276.      with the local-address-within-network number LNA.  E.g.,
  8277.  
  8278.           (inet-makeaddr 127 1) => 2130706433
  8279.  
  8280.     inet-pton
  8281.  
  8282.  -- Scheme Procedure: inet-pton family address
  8283.      Convert a string containing a printable network address to an
  8284.      integer address.  Note that unlike the C version of this function,
  8285.      the result is an integer with normal host byte ordering.  FAMILY
  8286.      can be `AF_INET' or `AF_INET6'.  E.g.,
  8287.  
  8288.           (inet-pton AF_INET "127.0.0.1") => 2130706433
  8289.           (inet-pton AF_INET6 "::1") => 1
  8290.  
  8291.     inet-ntop
  8292.  
  8293.  -- Scheme Procedure: inet-ntop family address
  8294.      Convert a network address into a printable string.  Note that
  8295.      unlike the C version of this function, the input is an integer
  8296.      with normal host byte ordering.  FAMILY can be `AF_INET' or
  8297.      `AF_INET6'.  E.g.,
  8298.  
  8299.           (inet-ntop AF_INET 2130706433) => "127.0.0.1"
  8300.           (inet-ntop AF_INET6 (- (expt 2 128) 1)) =>
  8301.           ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
  8302.  
  8303.     socket
  8304.  
  8305.  -- Scheme Procedure: socket family style proto
  8306.      Return a new socket port of the type specified by FAMILY, STYLE
  8307.      and PROTO.  All three parameters are integers.  Supported values
  8308.      for FAMILY are `AF_UNIX', `AF_INET' and `AF_INET6'.  Typical
  8309.      values for STYLE are `SOCK_STREAM', `SOCK_DGRAM' and `SOCK_RAW'.
  8310.  
  8311.      PROTO can be obtained from a protocol name using `getprotobyname'.
  8312.      A value of zero specifies the default protocol, which is usually
  8313.      right.
  8314.  
  8315.      A single socket port cannot by used for communication until it has
  8316.      been connected to another socket.
  8317.  
  8318.     socketpair
  8319.  
  8320.  -- Scheme Procedure: socketpair family style proto
  8321.      Return a pair of connected (but unnamed) socket ports of the type
  8322.      specified by FAMILY, STYLE and PROTO.  Many systems support only
  8323.      socket pairs of the `AF_UNIX' family.  Zero is likely to be the
  8324.      only meaningful value for PROTO.
  8325.  
  8326.     getsockopt
  8327.  
  8328.  -- Scheme Procedure: getsockopt sock level optname
  8329.      Return an option value from socket port SOCK.
  8330.  
  8331.      LEVEL is an integer specifying a protocol layer, either
  8332.      `SOL_SOCKET' for socket level options, or a protocol number from
  8333.      the `IPPROTO' constants or `getprotoent' (*note Network
  8334.      Databases::).
  8335.  
  8336.       -- Variable: SOL_SOCKET
  8337.       -- Variable: IPPROTO_IP
  8338.       -- Variable: IPPROTO_TCP
  8339.       -- Variable: IPPROTO_UDP
  8340.  
  8341.      OPTNAME is an integer specifying an option within the protocol
  8342.      layer.
  8343.  
  8344.      For `SOL_SOCKET' level the following OPTNAMEs are defined (when
  8345.      provided by the system).  For their meaning see *note Socket-Level
  8346.      Options: (libc)Socket-Level Options, or `man 7 socket'.
  8347.  
  8348.       -- Variable: SO_DEBUG
  8349.       -- Variable: SO_REUSEADDR
  8350.       -- Variable: SO_STYLE
  8351.       -- Variable: SO_TYPE
  8352.       -- Variable: SO_ERROR
  8353.       -- Variable: SO_DONTROUTE
  8354.       -- Variable: SO_BROADCAST
  8355.       -- Variable: SO_SNDBUF
  8356.       -- Variable: SO_RCVBUF
  8357.       -- Variable: SO_KEEPALIVE
  8358.       -- Variable: SO_OOBINLINE
  8359.       -- Variable: SO_NO_CHECK
  8360.       -- Variable: SO_PRIORITY
  8361.           The value returned is an integer.
  8362.  
  8363.       -- Variable: SO_LINGER
  8364.           The VALUE returned is a pair of integers `(ENABLE .
  8365.           TIMEOUT)'.  On old systems without timeout support (ie.
  8366.           without `struct linger'), only ENABLE has an effect but the
  8367.           value in Guile is always a pair.
  8368.  
  8369.     setsockopt
  8370.  
  8371.  -- Scheme Procedure: setsockopt sock level optname value
  8372.      Set an option on socket port SOCK.  The return value is
  8373.      unspecified.
  8374.  
  8375.      LEVEL is an integer specifying a protocol layer, either
  8376.      `SOL_SOCKET' for socket level options, or a protocol number from
  8377.      the `IPPROTO' constants or `getprotoent' (*note Network
  8378.      Databases::).
  8379.  
  8380.       -- Variable: SOL_SOCKET
  8381.       -- Variable: IPPROTO_IP
  8382.       -- Variable: IPPROTO_TCP
  8383.       -- Variable: IPPROTO_UDP
  8384.  
  8385.      OPTNAME is an integer specifying an option within the protocol
  8386.      layer.
  8387.  
  8388.      For `SOL_SOCKET' level the following OPTNAMEs are defined (when
  8389.      provided by the system).  For their meaning see *note Socket-Level
  8390.      Options: (libc)Socket-Level Options, or `man 7 socket'.
  8391.  
  8392.       -- Variable: SO_DEBUG
  8393.       -- Variable: SO_REUSEADDR
  8394.       -- Variable: SO_STYLE
  8395.       -- Variable: SO_TYPE
  8396.       -- Variable: SO_ERROR
  8397.       -- Variable: SO_DONTROUTE
  8398.       -- Variable: SO_BROADCAST
  8399.       -- Variable: SO_SNDBUF
  8400.       -- Variable: SO_RCVBUF
  8401.       -- Variable: SO_KEEPALIVE
  8402.       -- Variable: SO_OOBINLINE
  8403.       -- Variable: SO_NO_CHECK
  8404.       -- Variable: SO_PRIORITY
  8405.           VALUE is an integer.
  8406.  
  8407.       -- Variable: SO_LINGER
  8408.           VALUE is a pair of integers `(ENABLE . TIMEOUT)'.  On old
  8409.           systems without timeout support (ie. without `struct
  8410.           linger'), only ENABLE has an effect but the value in Guile is
  8411.           always a pair.
  8412.  
  8413.      For IP level (`IPPROTO_IP') the following OPTNAMEs are defined
  8414.      (when provided by the system).  See `man ip' for what they mean.
  8415.  
  8416.       -- Variable: IP_ADD_MEMBERSHIP
  8417.       -- Variable: IP_DROP_MEMBERSHIP
  8418.           These can be used only with `setsockopt', not `getsockopt'.
  8419.           VALUE is a pair `(MULTIADDR . INTERFACEADDR)' of IPv4
  8420.           addresses (*note Network Address Conversion::).  MULTIADDR is
  8421.           a multicast address to be added to or dropped from the
  8422.           interface INTERFACEADDR.  INTERFACEADDR can be `INADDR_ANY'
  8423.           to have the system select the interface.  INTERFACEADDR can
  8424.           also be an interface index number, on systems supporting that.
  8425.  
  8426.     shutdown
  8427.  
  8428.  -- Scheme Procedure: shutdown sock how
  8429.      Sockets can be closed simply by using `close-port'. The `shutdown'
  8430.      procedure allows reception or transmission on a connection to be
  8431.      shut down individually, according to the parameter HOW:
  8432.  
  8433.     0
  8434.           Stop receiving data for this socket.  If further data
  8435.           arrives,  reject it.
  8436.  
  8437.     1
  8438.           Stop trying to transmit data from this socket.  Discard any
  8439.           data waiting to be sent.  Stop looking for acknowledgement of
  8440.           data already sent; don't retransmit it if it is lost.
  8441.  
  8442.     2
  8443.           Stop both reception and transmission.
  8444.  
  8445.      The return value is unspecified.
  8446.  
  8447.     connect
  8448.  
  8449.  -- Scheme Procedure: connect sock fam_or_sockaddr [address . args]
  8450.      Initiate a connection from a socket using a specified address
  8451.      family to the address specified by ADDRESS and possibly ARGS.  The
  8452.      format required for ADDRESS and ARGS depends on the family of the
  8453.      socket.
  8454.  
  8455.      For a socket of family `AF_UNIX', only ADDRESS is specified and
  8456.      must be a string with the filename where the socket is to be
  8457.      created.
  8458.  
  8459.      For a socket of family `AF_INET', ADDRESS must be an integer IPv4
  8460.      host address and ARGS must be a single integer port number.
  8461.  
  8462.      For a socket of family `AF_INET6', ADDRESS must be an integer IPv6
  8463.      host address and ARGS may be up to three integers: port [flowinfo]
  8464.      [scope_id], where flowinfo and scope_id default to zero.
  8465.  
  8466.      Alternatively, the second argument can be a socket address object
  8467.      as returned by `make-socket-address', in which case the no
  8468.      additional arguments should be passed.
  8469.  
  8470.      The return value is unspecified.
  8471.  
  8472.     bind
  8473.  
  8474.  -- Scheme Procedure: bind sock fam_or_sockaddr [address . args]
  8475.      Assign an address to the socket port SOCK.  Generally this only
  8476.      needs to be done for server sockets, so they know where to look
  8477.      for incoming connections.  A socket without an address will be
  8478.      assigned one automatically when it starts communicating.
  8479.  
  8480.      The format of ADDRESS and ARGS depends on the family of the socket.
  8481.  
  8482.      For a socket of family `AF_UNIX', only ADDRESS is specified and
  8483.      must be a string with the filename where the socket is to be
  8484.      created.
  8485.  
  8486.      For a socket of family `AF_INET', ADDRESS must be an integer IPv4
  8487.      address and ARGS must be a single integer port number.
  8488.  
  8489.      The values of the following variables can also be used for ADDRESS:
  8490.  
  8491.       -- Variable: INADDR_ANY
  8492.           Allow connections from any address.
  8493.  
  8494.       -- Variable: INADDR_LOOPBACK
  8495.           The address of the local host using the loopback device.
  8496.  
  8497.       -- Variable: INADDR_BROADCAST
  8498.           The broadcast address on the local network.
  8499.  
  8500.       -- Variable: INADDR_NONE
  8501.           No address.
  8502.  
  8503.      For a socket of family `AF_INET6', ADDRESS must be an integer IPv6
  8504.      address and ARGS may be up to three integers: port [flowinfo]
  8505.      [scope_id], where flowinfo and scope_id default to zero.
  8506.  
  8507.      Alternatively, the second argument can be a socket address object
  8508.      as returned by `make-socket-address', in which case the no
  8509.      additional arguments should be passed.
  8510.  
  8511.      The return value is unspecified.
  8512.  
  8513.     listen
  8514.  
  8515.  -- Scheme Procedure: listen sock backlog
  8516.      Enable SOCK to accept connection requests.  BACKLOG is an integer
  8517.      specifying the maximum length of the queue for pending connections.
  8518.      If the queue fills, new clients will fail to connect until the
  8519.      server calls `accept' to accept a connection from the queue.
  8520.  
  8521.      The return value is unspecified.
  8522.  
  8523.     make-socket-address
  8524.  
  8525.  -- Scheme Procedure: make-socket-address family address . args
  8526.      Return a Scheme address object that reflects ADDRESS, being an
  8527.      address of family FAMILY, with the family-specific parameters ARGS
  8528.      (see the description of `connect' for details).
  8529.  
  8530.     accept
  8531.  
  8532.  -- Scheme Procedure: accept sock
  8533.      Accept a connection on a bound, listening socket.  If there are no
  8534.      pending connections in the queue, wait until one is available
  8535.      unless the non-blocking option has been set on the socket.
  8536.  
  8537.      The return value is a pair in which the _car_ is a new socket port
  8538.      for the connection and the _cdr_ is an object with address
  8539.      information about the client which initiated the connection.
  8540.  
  8541.      SOCK does not become part of the connection and will continue to
  8542.      accept new requests.
  8543.  
  8544.     getsockname
  8545.  
  8546.  -- Scheme Procedure: getsockname sock
  8547.      Return the address of SOCK, in the same form as the object
  8548.      returned by `accept'.  On many systems the address of a socket in
  8549.      the `AF_FILE' namespace cannot be read.
  8550.  
  8551.     getpeername
  8552.  
  8553.  -- Scheme Procedure: getpeername sock
  8554.      Return the address that SOCK is connected to, in the same form as
  8555.      the object returned by `accept'.  On many systems the address of a
  8556.      socket in the `AF_FILE' namespace cannot be read.
  8557.  
  8558.     recv!
  8559.  
  8560.  -- Scheme Procedure: recv! sock buf [flags]
  8561.      Receive data from a socket port.  SOCK must already be bound to
  8562.      the address from which data is to be received.  BUF is a string
  8563.      into which the data will be written.  The size of BUF limits the
  8564.      amount of data which can be received: in the case of packet
  8565.      protocols, if a packet larger than this limit is encountered then
  8566.      some data will be irrevocably lost.
  8567.  
  8568.      The optional FLAGS argument is a value or bitwise OR of MSG_OOB,
  8569.      MSG_PEEK, MSG_DONTROUTE etc.
  8570.  
  8571.      The value returned is the number of bytes read from the socket.
  8572.  
  8573.      Note that the data is read directly from the socket file
  8574.      descriptor: any unread buffered port data is ignored.
  8575.  
  8576.     send
  8577.  
  8578.  -- Scheme Procedure: send sock message [flags]
  8579.      Transmit the string MESSAGE on a socket port SOCK.  SOCK must
  8580.      already be bound to a destination address.  The value returned is
  8581.      the number of bytes transmitted - it's possible for this to be
  8582.      less than the length of MESSAGE if the socket is set to be
  8583.      non-blocking.  The optional FLAGS argument is a value or bitwise
  8584.      OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.
  8585.  
  8586.      Note that the data is written directly to the socket file
  8587.      descriptor: any unflushed buffered port data is ignored.
  8588.  
  8589.     recvfrom!
  8590.  
  8591.  -- Scheme Procedure: recvfrom! sock str [flags [start [end]]]
  8592.      Receive data from socket port SOCK (which must be already bound),
  8593.      returning the originating address as well as the data.  This is
  8594.      usually for use on datagram sockets, but can be used on
  8595.      stream-oriented sockets too.
  8596.  
  8597.      The data received is stored in the given STR, using either the
  8598.      whole string or just the region between the optional START and END
  8599.      positions.  The size of STR limits the amount of data which can be
  8600.      received.  For datagram protocols, if a packet larger than this is
  8601.      received then excess bytes are irrevocably lost.
  8602.  
  8603.      The return value is a pair.  The `car' is the number of bytes
  8604.      read.  The `cdr' is a socket address object which is where the
  8605.      data come from, or `#f' if the origin is unknown.
  8606.  
  8607.      The optional FLAGS argument is a or bitwise OR (`logior') of
  8608.      `MSG_OOB', `MSG_PEEK', `MSG_DONTROUTE' etc.
  8609.  
  8610.      Data is read directly from the socket file descriptor, any
  8611.      buffered port data is ignored.
  8612.  
  8613.      On a GNU/Linux system `recvfrom!' is not multi-threading, all
  8614.      threads stop while a `recvfrom!' call is in progress.  An
  8615.      application may need to use `select', `O_NONBLOCK' or
  8616.      `MSG_DONTWAIT' to avoid this.
  8617.  
  8618.     sendto
  8619.  
  8620.  -- Scheme Procedure: sendto sock message fam_or_sockaddr [address .
  8621.           args_and_flags]
  8622.      Transmit the string MESSAGE on the socket port SOCK.  The
  8623.      destination address is specified using the FAM, ADDRESS and
  8624.      ARGS_AND_FLAGS arguments, or just a socket address object returned
  8625.      by `make-socket-address', in a similar way to the `connect'
  8626.      procedure.  ARGS_AND_FLAGS contains the usual connection arguments
  8627.      optionally followed by a flags argument, which is a value or
  8628.      bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.
  8629.  
  8630.      The value returned is the number of bytes transmitted - it's
  8631.      possible for this to be less than the length of MESSAGE if the
  8632.      socket is set to be non-blocking.  Note that the data is written
  8633.      directly to the socket file descriptor: any unflushed buffered
  8634.      port data is ignored.
  8635.  
  8636.     regexp?
  8637.  
  8638.  -- Scheme Procedure: regexp? obj
  8639.      Return `#t' if OBJ is a compiled regular expression, or `#f'
  8640.      otherwise.
  8641.  
  8642.     make-regexp
  8643.  
  8644.  -- Scheme Procedure: make-regexp pat . flags
  8645.      Compile the regular expression described by PAT, and return the
  8646.      compiled regexp structure.  If PAT does not describe a legal
  8647.      regular expression, `make-regexp' throws a
  8648.      `regular-expression-syntax' error.
  8649.  
  8650.      The FLAGS arguments change the behavior of the compiled regular
  8651.      expression.  The following flags may be supplied:
  8652.  
  8653.     `regexp/icase'
  8654.           Consider uppercase and lowercase letters to be the same when
  8655.           matching.
  8656.  
  8657.     `regexp/newline'
  8658.           If a newline appears in the target string, then permit the
  8659.           `^' and `$' operators to match immediately after or
  8660.           immediately before the newline, respectively.  Also, the `.'
  8661.           and `[^...]' operators will never match a newline character.
  8662.           The intent of this flag is to treat the target string as a
  8663.           buffer containing many lines of text, and the regular
  8664.           expression as a pattern that may match a single one of those
  8665.           lines.
  8666.  
  8667.     `regexp/basic'
  8668.           Compile a basic ("obsolete") regexp instead of the extended
  8669.           ("modern") regexps that are the default.  Basic regexps do
  8670.           not consider `|', `+' or `?' to be special characters, and
  8671.           require the `{...}' and `(...)' metacharacters to be
  8672.           backslash-escaped (*note Backslash Escapes::).  There are
  8673.           several other differences between basic and extended regular
  8674.           expressions, but these are the most significant.
  8675.  
  8676.     `regexp/extended'
  8677.           Compile an extended regular expression rather than a basic
  8678.           regexp.  This is the default behavior; this flag will not
  8679.           usually be needed.  If a call to `make-regexp' includes both
  8680.           `regexp/basic' and `regexp/extended' flags, the one which
  8681.           comes last will override the earlier one.
  8682.  
  8683.     regexp-exec
  8684.  
  8685.  -- Scheme Procedure: regexp-exec rx str [start [flags]]
  8686.      Match the compiled regular expression RX against `str'.  If the
  8687.      optional integer START argument is provided, begin matching from
  8688.      that position in the string.  Return a match structure describing
  8689.      the results of the match, or `#f' if no match could be found.
  8690.  
  8691.      The FLAGS arguments change the matching behavior.  The following
  8692.      flags may be supplied:
  8693.  
  8694.     `regexp/notbol'
  8695.           Operator `^' always fails (unless `regexp/newline' is used).
  8696.           Use this when the beginning of the string should not be
  8697.           considered the beginning of a line.
  8698.  
  8699.     `regexp/noteol'
  8700.           Operator `$' always fails (unless `regexp/newline' is used).
  8701.           Use this when the end of the string should not be considered
  8702.           the end of a line.
  8703.  
  8704.