aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--array.txi111
-rw-r--r--debian/changelog163
-rw-r--r--debian/control16
-rw-r--r--debian/copyright579
-rw-r--r--debian/doc-base15
-rw-r--r--debian/postinst29
-rw-r--r--debian/prerm16
-rwxr-xr-xdebian/rules94
-rw-r--r--debian/slibconfig7
-rw-r--r--differ.txi95
-rw-r--r--http-cgi.scm6
-rw-r--r--nclients.scm4
-rw-r--r--srcdir.mk2
-rw-r--r--srfi-1.txi178
-rw-r--r--srfi.txi42
-rw-r--r--strsrch.scm4
17 files changed, 1357 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 30a16b2..3a1d5fc 100644
--- a/Makefile
+++ b/Makefile
@@ -46,7 +46,7 @@ $(htmldir)slib_toc.html: slib_toc.html Makefile
rpm_prefix=/usr/src/redhat/
-prefix = /usr/local
+prefix = debian/tmp/usr
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
@@ -301,6 +301,8 @@ report:
clean:
-rm -f *~ *.bak *.orig *.rej core a.out *.o \#*
-rm -rf *temp
+ -rm -f slib$(VERSION).info
+
distclean: realclean
realclean:
-rm -f *~ *.bak *.orig *.rej TAGS core a.out *.o \#*
diff --git a/array.txi b/array.txi
new file mode 100644
index 0000000..5d30b19
--- /dev/null
+++ b/array.txi
@@ -0,0 +1,111 @@
+@code{(require 'array)}
+@ftindex array
+
+
+@defun array? obj
+
+Returns @code{#t} if the @var{obj} is an array, and @code{#f} if not.
+@end defun
+@noindent
+@emph{Note:} Arrays are not disjoint from other Scheme types. Strings
+and vectors also satisfy @code{array?}. A disjoint array predicate can
+be written:
+
+@example
+(define (strict-array? obj)
+ (and (array? obj) (not (string? obj)) (not (vector? obj))))
+@end example
+
+
+@defun array=? array1 array2
+
+Returns @code{#t} if @var{array1} and @var{array2} have the same rank and shape and the
+corresponding elements of @var{array1} and @var{array2} are @code{equal?}.
+
+@example
+(array=? (make-array 'foo 3 3) (make-array 'foo '(0 2) '(1 2)))
+ @result{} #t
+@end example
+@end defun
+
+@defun make-array initial-value bound1 bound2 @dots{}
+
+Creates and returns an array with dimensions @var{bound1},
+@var{bound2}, @dots{} and filled with @var{initial-value}.
+@end defun
+@noindent
+When constructing an array, @var{bound} is either an inclusive range of
+indices expressed as a two element list, or an upper bound expressed as
+a single integer. So
+
+@example
+(make-array 'foo 3 3) @equiv{} (make-array 'foo '(0 2) '(0 2))
+@end example
+
+
+@defun make-shared-array array mapper bound1 bound2 @dots{}
+
+@code{make-shared-array} can be used to create shared subarrays of other
+arrays. The @var{mapper} is a function that translates coordinates in
+the new array into coordinates in the old array. A @var{mapper} must be
+linear, and its range must stay within the bounds of the old array, but
+it can be otherwise arbitrary. A simple example:
+
+@example
+(define fred (make-array #f 8 8))
+(define freds-diagonal
+ (make-shared-array fred (lambda (i) (list i i)) 8))
+(array-set! freds-diagonal 'foo 3)
+(array-ref fred 3 3)
+ @result{} FOO
+(define freds-center
+ (make-shared-array fred (lambda (i j) (list (+ 3 i) (+ 3 j)))
+ 2 2))
+(array-ref freds-center 0 0)
+ @result{} FOO
+@end example
+@end defun
+
+@defun array-rank obj
+
+Returns the number of dimensions of @var{obj}. If @var{obj} is not an array, 0 is
+returned.
+@end defun
+
+@defun array-shape array
+
+Returns a list of inclusive bounds.
+
+@example
+(array-shape (make-array 'foo 3 5))
+ @result{} ((0 2) (0 4))
+@end example
+@end defun
+
+@defun array-dimensions array
+
+@code{array-dimensions} is similar to @code{array-shape} but replaces
+elements with a 0 minimum with one greater than the maximum.
+
+@example
+(array-dimensions (make-array 'foo 3 5))
+ @result{} (3 5)
+@end example
+@end defun
+
+@defun array-in-bounds? array index1 index2 @dots{}
+
+Returns @code{#t} if its arguments would be acceptable to
+@code{array-ref}.
+@end defun
+
+@defun array-ref array index1 index2 @dots{}
+
+Returns the (@var{index1}, @var{index2}, @dots{}) element of @var{array}.
+@end defun
+
+@defun array-set! array obj index1 index2 @dots{}
+
+Stores @var{obj} in the (@var{index1}, @var{index2}, @dots{}) element of @var{array}. The value returned
+by @code{array-set!} is unspecified.
+@end defun
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..411c3c4
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,163 @@
+slib (2d2-1) unstable; urgency=low
+
+ * New upstream version
+ * Revert back to free. Is now so.
+
+ -- James LewisMoss <dres@debian.org> Fri, 27 Jul 2001 23:45:29 -0400
+
+slib (2d1-1) unstable; urgency=low
+
+ * New upstream version.
+ * Move to non-free. FSF pointed out license doesn't allow modified
+ versions to be distributed.
+ * Get a complete list of copyrights that apply to the source into
+ copyright file.
+ * Remove setup for guile 1.3.
+ * Remove postrm. Just calling install-info (lintian) Move install-info
+ call to prerm since doc-base doesn't do install-info.
+
+ -- James LewisMoss <dres@debian.org> Mon, 21 May 2001 23:34:52 -0400
+
+slib (2c9-3) unstable; urgency=low
+
+ * Change info location to section "The Algorithmic Language Scheme" to
+ match up with where guile puts it's files.
+ * Postinst is running slibconfig now. (Closes: #75891)
+
+ -- James LewisMoss <dres@debian.org> Mon, 11 Dec 2000 03:39:43 -0500
+
+slib (2c9-2) unstable; urgency=low
+
+ * Stop installing slibconfig (for guile).
+ * In postinst if /usr/sbin/slibconnfig exists call it (Close: #75843
+ #75891).
+
+ -- James LewisMoss <dres@debian.org> Sun, 5 Nov 2000 00:10:51 -0500
+
+slib (2c9-1) unstable; urgency=low
+
+ * New upstream (Closes: #74760)
+ * replace string-index with strsrch:string-index in http-cgi.scm.
+ * Add doc-base support (Closes: #31163)
+
+ -- James LewisMoss <dres@debian.org> Sun, 22 Oct 2000 22:15:55 -0400
+
+slib (2c7-1) unstable; urgency=low
+
+ * New upstream.
+ * Add slibconfig back in.
+
+ -- James LewisMoss <dres@debian.org> Mon, 6 Dec 1999 19:32:57 -0500
+
+slib (2c6-2) unstable; urgency=low
+
+ * Remove the slib$(VERSION).info file. Cut the diff back down to
+ size.
+
+ -- James LewisMoss <dres@debian.org> Sat, 13 Nov 1999 14:10:38 -0500
+
+slib (2c6-1) unstable; urgency=low
+
+ * New upstream.
+ * Move docs to /usr/share. Up standards version. add /usr/doc symlink.
+ Move info files. Remove undocumented link.
+
+ -- James LewisMoss <dres@debian.org> Sat, 13 Nov 1999 12:56:18 -0500
+
+slib (2c5-6) unstable; urgency=low
+
+ * Lowercase two vars in yasyn.scm (Fixes bug #37222)
+
+ -- James LewisMoss <dres@debian.org> Sat, 10 Jul 1999 19:17:04 -0400
+
+slib (2c5-5) unstable; urgency=low
+
+ * Fix it so string-index isn't defined (now there is a
+ strsrch:string-index) (Fixes #38812)
+
+ -- James LewisMoss <dres@debian.org> Fri, 9 Jul 1999 21:30:19 -0400
+
+slib (2c5-4) unstable; urgency=low
+
+ * Don't run slibconfig in postinst. (Fixes bug #38253, #37733, #37715,
+ #37746, #37809, #37917, #38123, #38462)
+
+ -- James LewisMoss <dres@debian.org> Thu, 3 Jun 1999 20:19:53 -0400
+
+slib (2c5-3) unstable; urgency=low
+
+ * Run slibconfig in postinst. It was commented out there, but I don't
+ see any old bug reports on why it was commented out, so let's try
+ again. :) (Fixes bug #37221)
+
+ -- James LewisMoss <dres@debian.org> Wed, 12 May 1999 22:37:02 -0400
+
+slib (2c5-2) unstable; urgency=low
+
+ * Link mklibcat.scm to mklibcat. Fixes a problem with using slib with
+ guile.
+
+ -- James LewisMoss <dres@debian.org> Sun, 7 Mar 1999 21:51:35 -0500
+
+slib (2c5-1) unstable; urgency=low
+
+ * New upstream.
+
+ -- James LewisMoss <dres@debian.org> Sun, 7 Mar 1999 10:10:27 -0500
+
+slib (2c3-4) unstable; urgency=low
+
+ * New maintainer.
+
+ -- James LewisMoss <dres@debian.org> Fri, 26 Feb 1999 00:52:26 -0500
+
+slib (2c3-3) frozen unstable; urgency=low
+
+ * Fixes #16235.
+ * Fixes #19943.
+ * Fixes #20265.
+ * Fixes #24917.
+ * Fixes #27389.
+
+ -- David N. Welton <davidw@efn.org> Mon, 9 Nov 1998 21:18:01 -0800
+
+slib (2c3-2) frozen unstable; urgency=low
+
+ * Re-uploaded for slink freeze.
+
+ -- David N. Welton <davidw@efn.org> Mon, 2 Nov 1998 21:07:07 -0800
+
+slib (2c3-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- David N. Welton <davidw@efn.org> Mon, 26 Oct 1998 22:14:30 -0800
+
+slib (2c0-3) unstable; urgency=low
+
+ * New maintainer.
+ * slibconfig script to automatically configure guile.
+ * Fix type in description, closes: Bug#18996
+
+ -- Jim Pick <jim@jimpick.com> Sun, 8 Mar 1998 23:05:22 -0800
+
+slib (2c0-2) unstable; urgency=low
+
+ * Minor fix for debian/rules targets
+
+ -- Rob Browning <rlb@cs.utexas.edu> Fri, 12 Dec 1997 17:35:22 -0600
+
+slib (2c0-1) unstable; urgency=low
+
+ * New upstream source
+ * New maintainer
+
+ -- Rob Browning <rlb@cs.utexas.edu> Fri, 12 Dec 1997 16:49:13 -0600
+
+slib (2a6-1) unstable; urgency=low
+
+ * First Debian release.
+
+ -- Karl Sackett <krs@debian.org> Mon, 16 Dec 1996 09:23:46 -0600
+
+
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..d4392b7
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,16 @@
+Source: slib
+Section: devel
+Priority: optional
+Maintainer: James LewisMoss <dres@debian.org>
+Standards-Version: 3.0.0
+
+Package: slib
+Section: devel
+Priority: optional
+Architecture: all
+Description: Portable Scheme library.
+ SLIB is a portable scheme library meant to provide compatibility and
+ utility functions for all standard scheme implementations. SLIB
+ includes initialization files for Chez, ELK 2.1, GAMBIT, MacScheme,
+ MITScheme, scheme->C, Scheme48, T3.1, and VSCM. SCM also supports
+ SLIB.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..2a18aa9
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,579 @@
+This is the Debian GNU/Linux prepackaged version of slib.
+
+This package was put together by Rob Browning <rlb@cs.utexas.edu>
+from sources obtained from:
+
+ ftp://swiss-ftp.ai.mit.edu/archive/scm/slib2d1.zip
+
+For more information see:
+
+ http://www-swiss.ai.mit.edu/~jaffer/SLIB.html
+
+Following are a list of source files followed by the copyright that
+applies to them.
+
+alist.scm alistab.scm arraymap.scm batch.scm break.scm Bev2slib.scm
+chap.scm charplot.scm cltime.scm coerce.scm comparse.scm cring.scm
+db2html.scm dbrowse.scm dbutil.scm debug.scm dwindtst.scm dynwind.scm
+eval.scm factor.scm fft.scm fluidlet.scm getopt.scm getparam.scm
+hash.scm hashtab.scm htmlform.scm http-cgi.scm lineio.scm logical.scm
+makcrc.scm mklibcat.scm modular.scm mulapply.scm nclients.scm
+obj2str.scm paramlst.scm plottest.scm pnm.scm ppfile.scm prec.scm
+printf.scm priorque.scm process.scm psxtime.scm qp.scm randinex.scm
+random.scm rdms.scm repl.scm report.scm require.scm root.scm sc2.scm
+sc4opt.scm sc4sc3.scm scanf.scm scmacro.scm simetrix.scm structst.scm
+tek40.scm tek41.scm timezone.scm trace.scm trnscrpt.scm tzfile.scm
+uri.scm withfile.scm
+;Permission to copy this software, to redistribute it, and to use it
+;for any purpose is granted, subject to the following restrictions and
+;understandings.
+;
+;1. Any copy made of this software must include this copyright notice
+;in full.
+;
+;2. I have made no warrantee or representation that the operation of
+;this software will be error-free, and I am under no obligation to
+;provide any services, by way of maintenance, update, or otherwise.
+;
+;3. In conjunction with products arising from the use of this
+;material, there shall be no use of my name in any advertising,
+;promotional, or sales literature without prior written consent in
+;each case.
+format.scm formatst.scm Template.scm
+;;; "Template.scm" configuration template of *features* for Scheme -*-scheme-*-
+;;; Author: Aubrey Jaffer
+;;;
+;;; This code is in the public domain.
+array.scm
+;;;;"array.scm" Arrays for Scheme
+; Copyright (C) 1993 Alan Bawden
+;
+; Permission to copy this software, to redistribute it, and to use it
+; for any purpose is granted, subject to the following restrictions and
+; understandings.
+;
+; 1. Any copy made of this software must include this copyright notice
+; in full.
+;
+; 2. Users of this software agree to make their best efforts (a) to
+; return to me any improvements or extensions that they make, so that
+; these may be included in future releases; and (b) to inform me of
+; noteworthy uses of this software.
+;
+; 3. I have made no warrantee or representation that the operation of
+; this software will be error-free, and I am under no obligation to
+; provide any services, by way of maintenance, update, or otherwise.
+;
+; 4. In conjunction with products arising from the use of this material,
+; there shall be no use of my name in any advertising, promotional, or
+; sales literature without prior written consent in each case.
+;
+; Alan Bawden
+; MIT Room NE43-510
+; 545 Tech. Sq.
+; Cambridge, MA 02139
+; Alan@LCS.MIT.EDU
+byte.scm determ.scm mularg.scm
+;; NO COPYRIGHT
+collect.scm
+;"collect.scm" Sample collection operations
+; COPYRIGHT (c) Kenneth Dickey 1992
+;
+; This software may be used for any purpose whatever
+; without warrantee of any kind.
+; AUTHOR Ken Dickey
+; DATE 1992 September 1
+; LAST UPDATED 1992 September 2
+; NOTES Expository (optimizations & checks elided).
+; Requires YASOS (Yet Another Scheme Object System).
+comlist.scm
+;;"comlist.scm" Implementation of COMMON LISP list functions for Scheme
+; Copyright (C) 1991, 1993, 1995 Aubrey Jaffer.
+; Copyright (C) 2000 Colin Walters
+;
+;Permission to copy this software, to redistribute it, and to use it
+;for any purpose is granted, subject to the following restrictions and
+;understandings.
+;
+;1. Any copy made of this software must include this copyright notice
+;in full.
+;
+;2. I have made no warrantee or representation that the operation of
+;this software will be error-free, and I am under no obligation to
+;provide any services, by way of maintenance, update, or otherwise.
+;
+;3. In conjunction with products arising from the use of this
+;material, there shall be no use of my name in any advertising,
+;promotional, or sales literature without prior written consent in
+;each case.
+defmacex.scm
+;;;"defmacex.scm" defmacro:expand* for any Scheme dialect.
+;;;Copyright 1993-1994 Dorai Sitaram and Aubrey Jaffer.
+;
+;Permission to copy this software, to redistribute it, and to use it
+;for any purpose is granted, subject to the following restrictions and
+;understandings.
+;
+;1. Any copy made of this software must include this copyright notice
+;in full.
+;
+;2. I have made no warrantee or representation that the operation of
+;this software will be error-free, and I am under no obligation to
+;provide any services, by way of maintenance, update, or otherwise.
+;
+;3. In conjunction with products arising from the use of this
+;material, there shall be no use of my name in any advertising,
+;promotional, or sales literature without prior written consent in
+;each case.
+dynamic.scm
+; "dynamic.scm", DYNAMIC data type for Scheme
+; Copyright 1992 Andrew Wilcox.
+;
+; You may freely copy, redistribute and modify this package.
+genwrite.scm
+;;"genwrite.scm" generic write used by pretty-print and truncated-print.
+;; Copyright (c) 1991, Marc Feeley
+;; Author: Marc Feeley (feeley@iro.umontreal.ca)
+;; Distribution restrictions: none
+glob.scm
+;;; "glob.scm" String matching for filenames (a la BASH).
+;;; Copyright (C) 1998 Radey Shouman.
+;
+;Permission to copy this software, to redistribute it, and to use it
+;for any purpose is granted, subject to the following restrictions and
+;understandings.
+;
+;1. Any copy made of this software must include this copyright notice
+;in full.
+;
+;2. I have made no warrantee or representation that the operation of
+;this software will be error-free, and I am under no obligation to
+;provide any services, by way of maintenance, update, or otherwise.
+;
+;3. In conjunction with products arising from the use of this
+;material, there shall be no use of my name in any advertising,
+;promotional, or sales literature without prior written consent in
+;each case.
+macrotst.scm
+;;;"macrotst.scm" Test for R4RS Macros
+;;; From Revised^4 Report on the Algorithmic Language Scheme
+;;; Editors: William Clinger and Jonathon Rees
+;
+; We intend this report to belong to the entire Scheme community, and so
+; we grant permission to copy it in whole or in part without fee. In
+; particular, we encourage implementors of Scheme to use this report as
+; a starting point for manuals and other documentation, modifying it as
+; necessary.
+macwork.scm mwdenote.scm mwexpand.scm mwsynrul.scm
+;;;; "macwork.scm": Will Clinger's macros that work. -*- Scheme -*-
+;Copyright 1992 William Clinger
+;
+; Permission to copy this software, in whole or in part, to use this
+; software for any lawful purpose, and to redistribute this software
+; is granted subject to the restriction that all copies made of this
+; software must include this copyright notice in full.
+;
+; I also request that you send me a copy of any improvements that you
+; make to this software so that they may be incorporated within it to
+; the benefit of the Scheme community.
+mbe.scm
+;;;; "mbe.scm" "Macro by Example" (Eugene Kohlbecker, R4RS)
+;;; From: Dorai Sitaram, dorai@cs.rice.edu, 1991, 1999
+;
+;Permission to copy this software, to redistribute it, and to use it
+;for any purpose is granted, subject to the following restrictions and
+;understandings.
+;
+;1. Any copy made of this software must include this copyright notice
+;in full.
+;
+;2. I have made no warrantee or representation that the operation of
+;this software will be error-free, and I am under no obligation to
+;provide any services, by way of maintenance, update, or otherwise.
+;
+;3. In conjunction with products arising from the use of this
+;material, there shall be no use of my name in any advertising,
+;promotional, or sales literature without prior written consent in
+;each case.
+minimize.scm
+;;; "minimize.scm" finds minimum f(x) for x0 <= x <= x1.
+;;; Author: Lars Arvestad
+;;;
+;;; This code is in the public domain.
+object.scm
+;;; "object.scm" Macroless Object System
+;;;From: whumeniu@datap.ca (Wade Humeniuk)
+pp.scm
+;"pp.scm" Pretty-Print
+promise.scm
+;;;"promise.scm" promise for force and delay
+;;; From Revised^4 Report on the Algorithmic Language Scheme
+;;; Editors: William Clinger and Jonathon Rees
+;
+; We intend this report to belong to the entire Scheme community, and so
+; we grant permission to copy it in whole or in part without fee. In
+; particular, we encourage implementors of Scheme to use this report as
+; a starting point for manuals and other documentation, modifying it as
+; necessary.
+queue.scm
+; "queue.scm" Queues/Stacks for Scheme
+; Written by Andrew Wilcox (awilcox@astro.psu.edu) on April 1, 1992.
+;
+; This code is in the public domain.
+r4rsyn.scm synchk.scm synclo.scm synrul.scm
+;;; "r4rsyn.scm" R4RS syntax -*-Scheme-*-
+;;; Copyright (c) 1989-91 Massachusetts Institute of Technology
+;;;
+;;; This material was developed by the Scheme project at the
+;;; Massachusetts Institute of Technology, Department of Electrical
+;;; Engineering and Computer Science. Permission to copy this
+;;; software, to redistribute it, and to use it for any purpose is
+;;; granted, subject to the following restrictions and understandings.
+;;;
+;;; 1. Any copy made of this software must include this copyright
+;;; notice in full.
+;;;
+;;; 2. Users of this software agree to make their best efforts (a) to
+;;; return to the MIT Scheme project any improvements or extensions
+;;; that they make, so that these may be included in future releases;
+;;; and (b) to inform MIT of noteworthy uses of this software.
+;;;
+;;; 3. All materials developed as a consequence of the use of this
+;;; software shall duly acknowledge such use, in accordance with the
+;;; usual standards of acknowledging credit in academic research.
+;;;
+;;; 4. MIT has made no warrantee or representation that the operation
+;;; of this software will be error-free, and MIT is under no
+;;; obligation to provide any services, by way of maintenance, update,
+;;; or otherwise.
+;;;
+;;; 5. In conjunction with products arising from the use of this
+;;; material, there shall be no use of the name of the Massachusetts
+;;; Institute of Technology nor of any adaptation thereof in any
+;;; advertising, promotional, or sales literature without prior
+;;; written consent from MIT in each case.
+ratize.scm
+;;;; "ratize.scm" Find simplest number ratios
+recobj.scm
+;;; "recobj.scm" Records implemented as objects.
+;;;From: whumeniu@datap.ca (Wade Humeniuk)
+record.scm
+; "record.scm" record data types
+; Written by David Carlton, carlton@husc.harvard.edu.
+; Re-Written by Aubrey Jaffer, jaffer@ai.mit.edu, 1996, 1997
+;
+; This code is in the public domain.
+scaexpp.scm scaglob.scm scainit.scm scamacr.scm scaoutp.scm structure.scm
+;;; "scaoutp.scm" syntax-case output
+;;; Copyright (C) 1992 R. Kent Dybvig
+;;;
+;;; Permission to copy this software, in whole or in part, to use this
+;;; software for any lawful purpose, and to redistribute this software
+;;; is granted subject to the restriction that all copies made of this
+;;; software must include this copyright notice in full. This software
+;;; is provided AS IS, with NO WARRANTY, EITHER EXPRESS OR IMPLIED,
+;;; INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY
+;;; OR FITNESS FOR ANY PARTICULAR PURPOSE. IN NO EVENT SHALL THE
+;;; AUTHORS BE LIABLE FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES OF ANY
+;;; NATURE WHATSOEVER.
+schmooz.scm
+;;; "schmooz.scm" Program for extracting texinfo comments from Scheme.
+;;; Copyright (C) 1998, 2000 Radey Shouman and Aubrey Jaffer.
+;
+;Permission to copy this software, to redistribute it, and to use it
+;for any purpose is granted, subject to the following restrictions and
+;understandings.
+;
+;1. Any copy made of this software must include this copyright notice
+;in full.
+;
+;2. I have made no warrantee or representation that the operation of
+;this software will be error-free, and I am under no obligation to
+;provide any services, by way of maintenance, update, or otherwise.
+;
+;3. In conjunction with products arising from the use of this
+;material, there shall be no use of my name in any advertising,
+;promotional, or sales literature without prior written consent in
+;each case.
+scmactst.scm
+;;;"scmactst.scm" test syntactic closures macros
+;;; From "sc-macro.doc", A Syntactic Closures Macro Facility by Chris Hanson
+selfset.scm
+;;"selfset.scm" Set single letter identifiers to their symbols.
+sierpinski.scm
+;"sierpinski.scm" Hash function for 2d data which preserves nearness.
+;From: jjb@isye.gatech.edu (John Bartholdi)
+;
+; This code is in the public domain.
+sort.scm
+;;; "sort.scm" Defines: sorted?, merge, merge!, sort, sort!
+;;; Author : Richard A. O'Keefe (based on Prolog code by D.H.D.Warren)
+;;;
+;;; This code is in the public domain.
+soundex.scm
+;"soundex.scm" Original SOUNDEX algorithm.
+;From jjb@isye.gatech.edu Mon May 2 22:29:43 1994
+;
+; This code is in the public domain.
+stdio.scm
+;; "stdio.scm" compatability stub
+strcase.scm
+;;; "strcase.scm" String casing functions.
+; Written 1992 by Dirk Lutzebaeck (lutzeb@cs.tu-berlin.de)
+;
+; This code is in the public domain.
+strport.scm
+;;;;"strport.scm" Portable string ports for Scheme
+;;;Copyright 1993 Dorai Sitaram and Aubrey Jaffer.
+;
+;Permission to copy this software, to redistribute it, and to use it
+;for any purpose is granted, subject to the following restrictions and
+;understandings.
+;
+;1. Any copy made of this software must include this copyright notice
+;in full.
+;
+;2. I have made no warrantee or representation that the operation of
+;this software will be error-free, and I am under no obligation to
+;provide any services, by way of maintenance, update, or otherwise.
+;
+;3. In conjunction with products arising from the use of this
+;material, there shall be no use of my name in any advertising,
+;promotional, or sales literature without prior written consent in
+;each case.
+strsrch.scm
+;;; "MISCIO" Search for string from port.
+; Written 1995, 1996 by Oleg Kiselyov (oleg@ponder.csci.unt.edu)
+; Modified 1996, 1997, 1998 by A. Jaffer (jaffer@ai.mit.edu)
+;
+; This code is in the public domain.
+struct.scm
+;;; "struct.scm": defmacros for RECORDS
+;;; Copyright 1992 Jeff Alexander, Shinnder Lee, and Lewis Patterson
+tree.scm
+;;"tree.scm" Implementation of COMMON LISP tree functions for Scheme
+; Copyright 1993, 1994 David Love (d.love@dl.ac.uk)
+;
+;Permission to copy this software, to redistribute it, and to use it
+;for any purpose is granted, subject to the following restrictions and
+;understandings.
+;
+;1. Any copy made of this software must include this copyright notice
+;in full.
+;
+;2. I have made no warrantee or representation that the operation of
+;this software will be error-free, and I am under no obligation to
+;provide any services, by way of maintenance, update, or otherwise.
+;
+;3. In conjunction with products arising from the use of this
+;material, there shall be no use of my name in any advertising,
+;promotional, or sales literature without prior written consent in
+;each case.
+tsort.scm
+;;; "tsort.scm" Topological sort
+;;; Copyright (C) 1995 Mikael Djurfeldt
+;
+; This code is in the public domain.
+values.scm
+;"values.scm" multiple values
+;By david carlton, carlton@husc.harvard.edu.
+;
+;This code is in the public domain.
+wttest.scm
+;; "wttrtst.scm" Test Weight balanced trees -*-Scheme-*-
+;; Copyright (c) 1993-1994 Stephen Adams
+;;
+;; Copyright (c) 1993-94 Massachusetts Institute of Technology
+;;
+;; This material was developed by the Scheme project at the Massachusetts
+;; Institute of Technology, Department of Electrical Engineering and
+;; Computer Science. Permission to copy this software, to redistribute
+;; it, and to use it for any purpose is granted, subject to the following
+;; restrictions and understandings.
+;;
+;; 1. Any copy made of this software must include this copyright notice
+;; in full.
+;;
+;; 2. Users of this software agree to make their best efforts (a) to
+;; return to the MIT Scheme project any improvements or extensions that
+;; they make, so that these may be included in future releases; and (b)
+;; to inform MIT of noteworthy uses of this software.
+;;
+;; 3. All materials developed as a consequence of the use of this
+;; software shall duly acknowledge such use, in accordance with the usual
+;; standards of acknowledging credit in academic research.
+;;
+;; 4. MIT has made no warrantee or representation that the operation of
+;; this software will be error-free, and MIT is under no obligation to
+;; provide any services, by way of maintenance, update, or otherwise.
+;;
+;; 5. In conjunction with products arising from the use of this material,
+;; there shall be no use of the name of the Massachusetts Institute of
+;; Technology nor of any adaptation thereof in any advertising,
+;; promotional, or sales literature without prior written consent from
+;; MIT in each case.
+wttree.scm
+;; "wttree.scm" Weight balanced trees -*-Scheme-*-
+;; Copyright (c) 1993-1994 Stephen Adams
+;;
+;; $Id: wttree.scm,v 1.3 1999/10/11 03:36:29 jaffer Exp $
+;;
+;; References:
+;;
+;; Stephen Adams, Implemeting Sets Efficiently in a Functional
+;; Language, CSTR 92-10, Department of Electronics and Computer
+;; Science, University of Southampton, 1992
+;;
+;;
+;; Copyright (c) 1993-94 Massachusetts Institute of Technology
+;;
+;; This material was developed by the Scheme project at the Massachusetts
+;; Institute of Technology, Department of Electrical Engineering and
+;; Computer Science. Permission to copy this software, to redistribute
+;; it, and to use it for any purpose is granted, subject to the following
+;; restrictions and understandings.
+;;
+;; 1. Any copy made of this software must include this copyright notice
+;; in full.
+;;
+;; 2. Users of this software agree to make their best efforts (a) to
+;; return to the MIT Scheme project any improvements or extensions that
+;; they make, so that these may be included in future releases; and (b)
+;; to inform MIT of noteworthy uses of this software.
+;;
+;; 3. All materials developed as a consequence of the use of this
+;; software shall duly acknowledge such use, in accordance with the usual
+;; standards of acknowledging credit in academic research.
+;;
+;; 4. MIT has made no warrantee or representation that the operation of
+;; this software will be error-free, and MIT is under no obligation to
+;; provide any services, by way of maintenance, update, or otherwise.
+;;
+;; 5. In conjunction with products arising from the use of this material,
+;; there shall be no use of the name of the Massachusetts Institute of
+;; Technology nor of any adaptation thereof in any advertising,
+;; promotional, or sales literature without prior written consent from
+;; MIT in each case.
+yasyn.scm
+;;"yasyn.scm" YASOS in terms of "object.scm"
+;;;From: whumeniu@datap.ca (Wade Humeniuk)
+DrScheme.init
+;;;"DrScheme.init" Initialization for SLIB for DrScheme -*-scheme-*-
+;; Friedrich Dominicus <frido@q-software-solutions.com>
+;; Newsgroups: comp.lang.scheme
+;; Date: 02 Oct 2000 09:24:57 +0200
+RScheme.init
+;;;"RScheme.init" Initialization for SLIB for RScheme -*-scheme-*-
+;;;; From http://www.rscheme.org/rs/pg1/RScheme.scm
+;;; Author: Aubrey Jaffer
+;;;
+;;; This code is in the public domain.
+;;;
+;;; adapted for RScheme by Donovan Kolbly -- (v1 1997-09-14)
+;;;
+;Permission to copy this software, to redistribute it, and to use it
+;for any purpose is granted, subject to the following restrictions and
+;understandings.
+;
+;1. Any copy made of this software must include this copyright notice
+;in full.
+;
+;2. I have made no warrantee or representation that the operation of
+;this software will be error-free, and I am under no obligation to
+;provide any services, by way of maintenance, update, or otherwise.
+;
+;3. In conjunction with products arising from the use of this
+;material, there shall be no use of my name in any advertising,
+;promotional, or sales literature without prior written consent in
+;each case.
+STk.init
+;;;"STk.init" SLIB Initialization for STk -*-scheme-*-
+;;; Authors: Erick Gallesio (eg@unice.fr) and Aubrey Jaffer.
+;;;
+;;; This code is in the public domain.
+bigloo.init
+;; "bigloo.init" Initialization for SLIB for Bigloo -*-scheme-*-
+;; Copyright 1994 Robert Sanders
+;; Copyright 1991, 1992, 1993 Aubrey Jaffer
+;; Copyright 1991 David Love
+;;
+;; Permission to copy this software, to redistribute it, and to use it
+;; for any purpose is granted, subject to the following restrictions and
+;; understandings.
+;;
+;; 1. Any copy made of this software must include this copyright notice
+;; in full.
+;;
+;; 2. I have made no warrantee or representation that the operation of
+;; this software will be error-free, and I am under no obligation to
+;; provide any services, by way of maintenance, update, or otherwise.
+;;
+;; 3. In conjunction with products arising from the use of this
+;; material, there shall be no use of my name in any advertising,
+;; promotional, or sales literature without prior written consent in
+;; each case.
+chez.init
+;;;"chez.init" Initialization file for SLIB for Chez Scheme 6.0a -*-scheme-*-
+;;; Authors: dorai@cs.rice.edu (Dorai Sitaram) and Aubrey Jaffer.
+;;;
+;;; This code is in the public domain.
+elk.init
+;;;"elk.init" Initialisation file for SLIB for ELK 2.1 -*- Scheme -*-
+;;; Author: Aubrey Jaffer
+;;;
+;;; This code is in the public domain.
+gambit.init
+;;;"gambit.init" Initialization for SLIB for Gambit -*-scheme-*-
+;;; Author: Aubrey Jaffer
+;;;
+;;; This code is in the public domain.
+macscheme.init
+;;;"macscheme.init" Configuration of *features* for MacScheme -*-scheme-*-
+;;; Author: Aubrey Jaffer
+;;;
+;;; This code is in the public domain.
+mitscheme.init
+;;;"mitscheme.init" Initialization for SLIB for MITScheme -*-scheme-*-
+;;; Author: Aubrey Jaffer
+;;;
+;;; This code is in the public domain.
+pscheme.init
+;;; "pscheme.init" SLIB init file for Pocket Scheme -*-scheme-*-
+;;; Author: Ben Goetter <goetter@mazama.net>
+;;; last revised for 1.1.0 on 16 October 2000
+;;; Initial work for 0.2.3 by Robert Goldman (goldman@htc.honeywell.com)
+;;; SLIB orig Author: Aubrey Jaffer (jaffer@ai.mit.edu)
+;;;
+;;; This code is in the public domain.
+scheme2c.init
+;;; "scheme2c.init" Initialisation for SLIB for Scheme->C on Sun -*-scheme-*-
+;;; Authors: David Love and Aubrey Jaffer
+;;;
+;;; This code is in the public domain.
+scheme48.init
+;;;"scheme48.init" Initialisation for SLIB for Scheme48 -*-scheme-*-
+;;; Author: Aubrey Jaffer
+;;;
+;;; This code is in the public domain.
+scm.init
+;"scm.init" Configuration file for SLIB for SCM -*-scheme-*-
+scsh.init
+;;; "scsh.init" Initialisation for SLIB for Scsh 0.5.1 -*-scheme-*-
+;;; Author: Aubrey Jaffer
+;;;
+;;; This code is in the public domain.
+t3.init
+;;; "t3.init" Initialization file for SLIB for T3.1. -*-scheme-*-
+;;; Authors: David Carlton, Stephen Bevan, F. Javier Thayer, and Aubrey Jaffer.
+;;;
+;;; This code is in the public domain.
+umbscheme.init
+;;; "umbscheme.init" Initialization for SLIB for umb-scheme -*-scheme-*-
+;;; Author: Aubrey Jaffer
+;;;
+;;; This code is in the public domain.
+vscm.init
+;;; "vscm.init" Configuration of *features* for VSCM -*-scheme-*-
+;;; Author: Aubrey Jaffer
+;;;
+;;; This code is in the public domain.
diff --git a/debian/doc-base b/debian/doc-base
new file mode 100644
index 0000000..72e6327
--- /dev/null
+++ b/debian/doc-base
@@ -0,0 +1,15 @@
+Document: slib
+Title: slib Scheme library documentation
+Author: Aubrey Jaffer
+Abstract: This manual describes the facilities and functions
+ provided by the slib scheme library.
+Section: Apps/Programming
+
+Format: Info
+Section: The Algorithmic Language Scheme
+Index: /usr/share/info/slib.info.gz
+Files: /usr/share/info/slib.info.gz
+
+Format: HTML
+Index: /usr/share/doc/slib/slib.html
+Files: /usr/share/doc/slib/slib.html
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..847a44a
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,29 @@
+#!/bin/sh
+set -e
+
+install-info --quiet --section "The Algorithmic Language Scheme" \
+ "The Algorithmic Language Scheme" \
+ --description="The SLIB portable Scheme library" \
+ /usr/share/info/slib.info.gz
+
+# OK. This is bad because it really should be in the guile config or
+# in some emacs-commond sort of package. Now we conditionally run it.
+# one of these probably shouldn't exist, but don't know which and
+# probably shourld support the older.
+if [ -x /usr/sbin/guile1.4-slibconfig ] ; then
+ echo Running /usr/sbin/guile1.4-slibconfig
+ /usr/sbin/guile1.4-slibconfig
+fi
+
+if [ "$1" = "configure" ]; then
+ if [ -d /usr/doc -a ! -e /usr/doc/slib -a -d /usr/share/doc/slib ]; then
+ ln -sf ../share/doc/slib /usr/doc/slib
+ fi
+fi
+
+# doc base support
+if [ "$1" = configure ]; then
+ if command -v install-docs >/dev/null 2>&1; then
+ install-docs -i /usr/share/doc-base/slib
+ fi
+fi
diff --git a/debian/prerm b/debian/prerm
new file mode 100644
index 0000000..3dbde02
--- /dev/null
+++ b/debian/prerm
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/slib ]; then
+ rm -f /usr/doc/slib
+fi
+
+# doc base support
+if [ "$1" = remove -o "$1" = upgrade ]; then
+ if command -v install-docs >/dev/null 2>&1; then
+ install-docs -r slib
+ fi
+fi
+
+install-info --quiet --remove /usr/share/info/slib.info.gz
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..f690acd
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,94 @@
+#! /usr/bin/make -f
+# -*-Makefile-*-
+
+CC =gcc
+CFLAGS =-O2 -g -Wall
+LDFLAGS =
+
+SHELL =/bin/sh
+srcdir =.
+
+INSTALL =/usr/bin/install
+INSTALL_DIR =$(INSTALL) -d -m 755 -o root -g root
+INSTALL_PROGRAM =$(INSTALL) -m 755 -o root -g root
+INSTALL_DATA =$(INSTALL) -m 644 -o root -g root
+INSTALL_MAN =$(INSTALL) -m 444 -o root -g root
+
+build:
+ $(checkdir)
+ make
+ texi2html -monolithic slib.texi
+ touch build
+
+clean:
+ $(checkdir)
+ -rm slib.html
+ -rm slib.info*
+ make clean
+ -rm -f build
+ -rm -rf debian/tmp* *~ debian/*~ debian/files debian/substvars
+
+binary-arch: checkroot
+ $(checkdir)
+
+binary-indep: checkroot build
+ $(checkdir)
+ -rm -rf debian/tmp*
+
+# debian/tmp
+ $(INSTALL_DIR) debian/tmp
+ $(INSTALL_DIR) debian/tmp/DEBIAN
+ $(INSTALL_PROGRAM) debian/postinst debian/tmp/DEBIAN
+ $(INSTALL_PROGRAM) debian/prerm debian/tmp/DEBIAN
+
+# library
+ $(INSTALL_DIR) debian/tmp/usr/share/slib
+ $(INSTALL_DATA) *.scm debian/tmp/usr/share/slib
+ # this fixes a load problem with guile
+ ( cd debian/tmp/usr/share/slib ; ln -s mklibcat.scm mklibcat )
+
+# documentation
+ $(INSTALL_DIR) debian/tmp/usr/share/doc/slib
+ $(INSTALL_DATA) debian/copyright debian/tmp/usr/share/doc/slib
+ $(INSTALL_DATA) debian/changelog \
+ debian/tmp/usr/share/doc/slib/changelog.Debian
+ gzip -9v debian/tmp/usr/share/doc/slib/changelog.Debian
+
+ $(INSTALL_DATA) ChangeLog debian/tmp/usr/share/doc/slib/changelog
+ gzip -9v debian/tmp/usr/share/doc/slib/changelog
+ $(INSTALL_DATA) README debian/tmp/usr/share/doc/slib
+ gzip -9v debian/tmp/usr/share/doc/slib/README
+ $(INSTALL_DATA) FAQ debian/tmp/usr/share/doc/slib
+ gzip -9v debian/tmp/usr/share/doc/slib/FAQ
+ $(INSTALL_DATA) slib.html debian/tmp/usr/share/doc/slib
+
+ $(INSTALL_DIR) debian/tmp/usr/share/slib/init
+ $(INSTALL_DATA) *.init debian/tmp/usr/share/slib/init
+
+ $(INSTALL_DIR) debian/tmp/usr/share/doc-base
+ $(INSTALL_DATA) debian/doc-base debian/tmp/usr/share/doc-base/slib
+
+# info pages
+ $(INSTALL_DIR) debian/tmp/usr/share/info
+ $(INSTALL_DATA) slib.info* debian/tmp/usr/share/info
+ gzip -9v debian/tmp/usr/share/info/*
+
+# slibconfig
+
+ #$(INSTALL_DIR) debian/tmp/usr/sbin
+ #$(INSTALL_PROGRAM) debian/slibconfig debian/tmp/usr/sbin
+
+ dpkg-gencontrol -is -ip
+ dpkg --build debian/tmp ..
+
+define checkdir
+ test -f slib.texi -a -f debian/rules
+endef
+
+binary: binary-indep binary-arch
+
+checkroot:
+ $(checkdir)
+ test root = "`whoami`"
+
+.PHONY: config build clean binary binary-arch binary-indep
diff --git a/debian/slibconfig b/debian/slibconfig
new file mode 100644
index 0000000..05eee30
--- /dev/null
+++ b/debian/slibconfig
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+if [ -d /usr/share/guile -a -x /usr/bin/guile ]; then
+ (cd /usr/share/guile
+ guile -c "(use-modules (ice-9 slib)) (require 'new-catalog)"
+ )
+fi
diff --git a/differ.txi b/differ.txi
new file mode 100644
index 0000000..f7b1f75
--- /dev/null
+++ b/differ.txi
@@ -0,0 +1,95 @@
+@noindent
+This package implements the algorithm:
+
+@ifinfo
+@example
+S. Wu, E. Myers, U. Manber, and W. Miller,
+ "An O(NP) Sequence Comparison Algorithm,"
+ Information Processing Letters 35, 6 (1990), 317-323.
+ @url{http://www.cs.arizona.edu/people/gene/vita.html}
+@end example
+@end ifinfo
+@ifset html
+S. Wu, <A HREF="http://www.cs.arizona.edu/people/gene/vita.html">
+E. Myers,</A> U. Manber, and W. Miller,
+<A HREF="http://www.cs.arizona.edu/people/gene/PAPERS/np_diff.ps">
+"An O(NP) Sequence Comparison Algorithm,"</A>
+Information Processing Letters 35, 6 (1990), 317-323.
+@end ifset
+
+@noindent
+If the items being sequenced are text lines, then the computed
+edit-list is equivalent to the output of the @dfn{diff} utility
+@cindex diff
+program. If the items being sequenced are words, then it is like the
+lesser known @dfn{spiff} program.
+@cindex spiff
+
+@noindent
+The values returned by @code{diff:edit-length} can be used to gauge
+the degree of match between two sequences.
+
+@noindent
+I believe that this algorithm is currently the fastest for these
+tasks, but genome sequencing applications fuel extensive research in
+this area.
+
+
+@defun diff:longest-common-subsequence array1 array2 =?
+
+
+@defunx diff:longest-common-subsequence array1 array2
+@var{array1} and @var{array2} are one-dimensional arrays. The procedure @var{=?} is used
+to compare sequence tokens for equality. @var{=?} defaults to @code{eqv?}.
+@code{diff:longest-common-subsequence} returns a one-dimensional array of length @code{(quotient (- (+
+len1 len2) (fp:edit-length @var{array1} @var{array2})) 2)} holding the longest sequence
+common to both @var{array}s.
+@end defun
+
+@defun diff:edits array1 array2 =?
+
+
+@defunx diff:edits array1 array2
+@var{array1} and @var{array2} are one-dimensional arrays. The procedure @var{=?} is used
+to compare sequence tokens for equality. @var{=?} defaults to @code{eqv?}.
+@code{diff:edits} returns a list of length @code{(fp:edit-length @var{array1} @var{array2})} composed of
+a shortest sequence of edits transformaing @var{array1} to @var{array2}.
+
+Each edit is a list of an integer and a symbol:
+@table @asis
+@item (@var{j} insert)
+Inserts @code{(array-ref @var{array1} @var{j})} into the sequence.
+@item (@var{k} delete)
+Deletes @code{(array-ref @var{array2} @var{k})} from the sequence.
+@end table
+@end defun
+
+@defun diff:edit-length array1 array2 =?
+
+
+@defunx diff:edit-length array1 array2
+@var{array1} and @var{array2} are one-dimensional arrays. The procedure @var{=?} is used
+to compare sequence tokens for equality. @var{=?} defaults to @code{eqv?}.
+@code{diff:edit-length} returns the length of the shortest sequence of edits transformaing
+@var{array1} to @var{array2}.
+@end defun
+@example
+(diff:longest-common-subsequence '#(f g h i e j c k l m)
+ '#(f g e h i j k p q r l m))
+ @result{} #(f g h i j k l m)
+
+(diff:edit-length '#(f g h i e j c k l m)
+ '#(f g e h i j k p q r l m))
+@result{} 6
+
+(pretty-print (diff:edits '#(f g h i e j c k l m)
+ '#(f g e h i j k p q r l m)))
+@print{}
+((3 insert) ; e
+ (4 delete) ; c
+ (6 delete) ; h
+ (7 insert) ; p
+ (8 insert) ; q
+ (9 insert)) ; r
+@end example
+
diff --git a/http-cgi.scm b/http-cgi.scm
index 02aade3..a313758 100644
--- a/http-cgi.scm
+++ b/http-cgi.scm
@@ -43,7 +43,7 @@
(set! http:crlf (string (string-ref line 0) #\newline)))
(if (eof-object? line) line alist))
(let ((len (string-length line))
- (idx (string-index line #\:)))
+ (idx (strsrch:string-index line #\:)))
(if (char-whitespace? (string-ref line (+ -1 len)))
(set! len (+ -1 len)))
(and idx (do ((idx2 (+ idx 1) (+ idx2 1)))
@@ -64,9 +64,9 @@
(let* ((request-uri (cadr request-line))
(len (string-length request-uri)))
(and (> len 3)
- (string-index request-uri #\?)
+ (strsrch:string-index request-uri #\?)
(substring request-uri
- (+ 1 (string-index request-uri #\?))
+ (+ 1 (strsrch:string-index request-uri #\?))
(if (eqv? #\/ (string-ref request-uri (+ -1 len)))
(+ -1 len)
len)))))
diff --git a/nclients.scm b/nclients.scm
index 08f3d0b..8b778b8 100644
--- a/nclients.scm
+++ b/nclients.scm
@@ -116,7 +116,7 @@
(read-line port) ;past newline
(do ((line (read-line port) (read-line port)))
((not (and (string? line)
- (string-index line #\=))))
+ (strsrch:string-index line #\=))))
(sscanf line "HostName=%s" compname)
(sscanf line "DomainName=%s" workgroup)))))
(not user)
@@ -126,7 +126,7 @@
(read-line port) ;past newline
(do ((line (read-line port) (read-line port)))
((not (and (string? line)
- (string-index line #\=))))
+ (strsrch:string-index line #\=))))
(sscanf line "UserName=%s" user))))))
(if (and compname (not hostname))
(set! hostname
diff --git a/srcdir.mk b/srcdir.mk
new file mode 100644
index 0000000..cdb825f
--- /dev/null
+++ b/srcdir.mk
@@ -0,0 +1,2 @@
+srcdir = /home/dres/project/debian/scheme/slib_2d2/
+
diff --git a/srfi-1.txi b/srfi-1.txi
new file mode 100644
index 0000000..a27fcc1
--- /dev/null
+++ b/srfi-1.txi
@@ -0,0 +1,178 @@
+@code{(require 'srfi-1)}
+@ftindex srfi-1
+
+@noindent
+Implements the @dfn{SRFI-1} @dfn{list-processing library} as described
+@cindex SRFI-1
+@cindex list-processing library
+at @url{http://srfi.schemers.org/srfi-1/srfi-1.html}
+
+@subheading Constructors
+
+
+@defun xcons d a
+@code{(define (xcons d a) (cons a d))}.
+@end defun
+
+@defun list-tabulate len proc
+Returns a list of length @var{len}. Element @var{i} is @code{(@var{proc}
+@var{i})} for 0 <= @var{i} < @var{len}.
+@end defun
+
+@defun cons* obj1 obj2
+
+@end defun
+
+@defun iota count start step
+
+
+@defunx iota count start
+
+@defunx iota count
+Returns a list of @var{count} numbers: (@var{start}, @var{start}+@var{step}, @dots{}, @var{start}+(@var{count}-1)*@var{step}).
+@end defun
+
+@defun circular-list obj1 obj2 @dots{}
+
+Returns a circular list of @var{obj1}, @var{obj2}, @dots{}.
+@end defun
+@subheading Predicates
+
+
+@defun proper-list? obj
+
+@end defun
+
+@defun circular-list? x
+
+@end defun
+
+@defun dotted-list? obj
+
+@end defun
+
+@defun null-list? obj
+
+@end defun
+
+@defun not-pair? obj
+
+@end defun
+
+@defun list= =pred list @dots{}
+
+@end defun
+@subheading Selectors
+
+
+@defun first pair
+@defunx fifth obj
+@defunx sixth obj
+@defunx seventh obj
+@defunx eighth obj
+@defunx ninth obj
+@defunx tenth obj
+
+@end defun
+
+@defun car+cdr pair
+
+@end defun
+
+@defun take lst k
+@defunx drop lst k
+
+@end defun
+
+@defun take-right lst k
+
+@end defun
+
+@defun split-at lst k
+
+@end defun
+
+@defun last lst
+
+(car (last-pair lst))
+@end defun
+@subheading Miscellaneous
+
+
+@defun length+ obj
+
+@end defun
+
+@defun concatenate lists
+@defunx concatenate! lists
+
+@end defun
+
+@defun reverse! lst
+
+@end defun
+
+@defun append-reverse rev-head tail
+@defunx append-reverse! rev-head tail
+
+@end defun
+
+@defun zip list1 list2 @dots{}
+
+@end defun
+
+@defun unzip1 lst
+@defunx unzip2 lst
+@defunx unzip3 lst
+@defunx unzip4 lst
+@defunx unzip5 lst
+
+@end defun
+
+@defun count pred list1 list2 @dots{}
+
+@end defun
+@subheading Fold and Unfold
+
+@subheading Filtering and Partitioning
+
+@subheading Searching
+
+
+@defun find pred list
+
+@end defun
+
+@defun find-tail pred list
+
+@end defun
+
+@defun member obj list pred
+
+
+@defunx member obj list
+
+@code{member} returns the first sublist of @var{list} whose car is @var{obj}, where the sublists
+of @var{list} are the non-empty lists returned by @t{(list-tail @var{list} @var{k})}
+for @var{k} less than the length of @var{list}. If @var{obj} does not occur in @var{list},
+then @t{#f} (not the empty list) is returned. The procedure @var{pred} is
+used for testing equality. If @var{pred} is not provided, @samp{equal?} is
+used.
+@end defun
+@subheading Deleting
+
+@subheading Association lists
+
+
+@defun assoc obj alist pred
+
+
+@defunx assoc obj alist
+
+@var{alist} (for ``association list'') must be a list of pairs. These
+procedures find the first pair in @var{alist} whose car field is @var{obj}, and
+returns that pair. If no pair in @var{alist} has @var{obj} as its car, then @t{#f}
+(not the empty list) is returned. The procedure @var{pred} is used for
+testing equality. If @var{pred} is not provided, @samp{equal?} is used.
+@end defun
+@subheading Set operations
diff --git a/srfi.txi b/srfi.txi
new file mode 100644
index 0000000..52d2dbb
--- /dev/null
+++ b/srfi.txi
@@ -0,0 +1,42 @@
+@code{(require 'srfi)}
+@ftindex srfi
+
+@noindent Implements @dfn{Scheme Request For Implementation} (SRFI) as
+@cindex Scheme Request For Implementation
+described at @url{http://srfi.schemers.org/}
+
+@noindent The Copyright terms of each SRFI states:
+@quotation
+"However, this document itself may not be modified in any way, ..."
+@end quotation
+
+@noindent Therefore, the specification of SRFI constructs must not be
+quoted without including the complete SRFI document containing
+discussion and a sample implementation program.
+
+
+@defmac cond-expand <clause1> <clause2> @dots{}
+
+
+@emph{Syntax:}
+Each @r{<clause>} should be of the form
+
+@format
+@t{(@r{<feature>} @r{<expression1>} @dots{})}
+@end format
+
+where @r{<feature>} is a boolean expression composed of symbols and
+`and', `or', and `not' of boolean expressions. The last @r{<clause>}
+may be an ``else clause,'' which has the form
+
+@format
+@t{(else @r{<expression1>} @r{<expression2>} @dots{})@r{.}}
+@end format
+
+The first clause whose feature expression is satisfied is expanded.
+If no feature expression is satisfied and there is no else clause, an
+error is signaled.
+
+SLIB @code{cond-expand} is an extension of SRFI-0,
+@url{http://srfi.schemers.org/srfi-0/srfi-0.html}.
+@end defmac
diff --git a/strsrch.scm b/strsrch.scm
index 71c69df..a6ab7e1 100644
--- a/strsrch.scm
+++ b/strsrch.scm
@@ -5,7 +5,7 @@
; This code is in the public domain.
;;; Return the index of the first occurence of a-char in str, or #f
-(define (string-index str a-char)
+(define (strsrch:string-index str a-char)
(let loop ((pos 0))
(cond
;; whole string has been searched, in vain
@@ -40,7 +40,7 @@
(c2 (if (<= pat-len 1) #f (string-ref pattern 1))))
(cond
((not c1) 0) ; empty pattern, matches upfront
- ((not c2) (string-index str c1)) ; one-char pattern
+ ((not c2) (strsrch:string-index str c1)) ; one-char pattern
(else ; matching pattern of > two chars
(let outer ((pos 0))
(cond