summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Init5d2.scm4
-rw-r--r--Makefile18
-rw-r--r--bld.scm59
-rw-r--r--build.features123
-rw-r--r--build.scm6
-rw-r--r--continue.h2
-rw-r--r--crs.c25
-rw-r--r--debian/changelog133
-rw-r--r--debian/control13
-rw-r--r--debian/copyright16
-rw-r--r--debian/postinst12
-rw-r--r--debian/postrm4
-rw-r--r--debian/prerm8
-rw-r--r--debian/require.scm.debian2
-rwxr-xr-xdebian/rules151
-rw-r--r--eval.c2
-rw-r--r--features.txi196
-rw-r--r--mkimpcat.scm46
-rw-r--r--platform.txi43
-rw-r--r--tmp32
-rw-r--r--version.txi2
-rwxr-xr-xxgen.scm2
22 files changed, 826 insertions, 43 deletions
diff --git a/Init5d2.scm b/Init5d2.scm
index 946e6d7..19c2ff2 100644
--- a/Init5d2.scm
+++ b/Init5d2.scm
@@ -149,7 +149,7 @@
((eof-object? c))
(write-char c)))))
(define (terms)
- (display-file (in-vicinity (implementation-vicinity) "COPYING")))
+ (display-file "/usr/doc/copyright/GPL"))
;; Array syntax:
;; n is a decimal number, which may be elided for a default value of 1.
@@ -471,7 +471,7 @@
(begin
(define (ed . args)
(system (apply string-append
- (or (getenv "EDITOR") "ed")
+ (or (getenv "EDITOR") "editor")
(map (lambda (s) (string-append " " s)) args))))
(set! *features* (cons 'ed *features*))))
diff --git a/Makefile b/Makefile
index 8a92daa..f4465f5 100644
--- a/Makefile
+++ b/Makefile
@@ -44,9 +44,9 @@
SHELL = /bin/sh
CPROTO = cproto
#CC =
-CFLAGS = -g
+CFLAGS = -g -O
#LIBS =
-LD = $(CC) -g
+LD = $(CC) -g -O
# directory where COPYING and InitXXX.scm reside.
#IMPLPATH = /usr/local/src/scm/
@@ -203,7 +203,7 @@ benchlit:
echo
tail -20 BenchLog
report:
- scmlit -e"(slib:report #t)"
+ ./scmlit -e"(slib:report #t)"
scm -e"(slib:report #t)"
dvidir=../dvi/
@@ -264,17 +264,17 @@ info: installinfo
installinfo: $(infodir)scm.info $(infodir)Xlibscm.info
platform.txi: build.scm
- scmlit -r database-browse -l build.scm -e "(browse build 'platform)" \
+ ./scmlit -r database-browse -l build.scm -e "(browse build 'platform)" \
> platform.txi
-features.txi: build build.scm
- scmlit -l build -e"(make-features-txi)"
+features.txi: build.features build.scm
+ ./scmlit -l build.features -e"(make-features-txi)"
scm$(VERSION).info: version.txi scm.texi platform.txi features.txi
-mv scm.info scmtemp.info
makeinfo scm.texi --no-split -o scm.info
mv scm.info scm$(VERSION).info
-mv scmtemp.info scm.info
scm.info: scm$(VERSION).info
- infobar scmprev/scm.info scm$(VERSION).info scm.info
+# infobar scmprev/scm.info scm$(VERSION).info scm.info
$(infodir)scm.info: scm.info
cp -p scm.info $(infodir)scm.info
-install-info $(infodir)scm.info $(infodir)dir
@@ -518,8 +518,10 @@ mostlyclean:
clean:
-rm -f core a.out ramap.o ramap.obj $(ofiles) scmmain.o lints
-$(RM_R) *temp
+ -rm -f scm$(VERSION).info
+
distclean: clean
- -rm -f $(EXECFILES) *.o *.obj a.out TAGS implcat slibcat gdbscm
+ -rm -f $(EXECFILES) *.o *.obj a.out implcat slibcat gdbscm TAGS
realclean: distclean
-rm -f scm.doc
realempty: temp/scm
diff --git a/bld.scm b/bld.scm
new file mode 100644
index 0000000..b12ecb9
--- /dev/null
+++ b/bld.scm
@@ -0,0 +1,59 @@
+#!/bin/sh
+:;exec ./scmlit -f $0 -e"(bi)" build $*
+
+(require 'build)
+(require 'getopt)
+(require 'getopt-parameters)
+
+(define (build-from-argv argv)
+ (cond ((string? argv)
+ (require 'read-command)
+ (set! argv (call-with-input-string argv read-command))))
+ (let ()
+ (define command (string->symbol (list-ref argv *optind*)))
+ (define argc (length argv))
+ (cond
+ ((pair? argv)
+ (set! *optind* (+ 1 *optind*))
+ ((make-command-server build '*commands*)
+ command
+ (lambda (comname comval options positions arities types
+ defaulters checks aliases)
+ (let* ((params (getopt->parameter-list
+ argc argv options arities types aliases))
+ (fparams (fill-empty-parameters defaulters params)))
+ (cond ((not (list? params)) #f)
+ ((not (check-parameters checks fparams)) #f)
+ ((not (check-arities (map arity->arity-spec arities) fparams))
+ (slib:error 'build-from-argv "arity error" fparams) #f)
+ (else (comval fparams))))))))))
+
+(define (build-from-whole-argv argv)
+ (set! *optind* 0)
+ (set! *optarg* #f)
+ (build-from-argv argv))
+
+(define b build-from-whole-argv)
+
+(define (b*)
+ (require 'read-command)
+ (do ((e (read-command) (read-command)))
+ ((eof-object? e))
+ (cond ((null? e))
+ (else
+ (cond ((not (string-ci=? (car e) "build"))
+ (set! e (cons "build" e))))
+ (write (build-from-whole-argv e))
+ (newline)))
+ (display "build> ")
+ (force-output)))
+
+(define (bi) (build-from-argv *argv*))
+
+(cond (*interactive*
+ (display "type (b \"build <command-line>\") to build") (newline)
+ (display "type (b*) to enter build command loop") (newline)))
+
+;;; Local Variables:
+;;; mode:scheme
+;;; End:
diff --git a/build.features b/build.features
new file mode 100644
index 0000000..1921d3c
--- /dev/null
+++ b/build.features
@@ -0,0 +1,123 @@
+#!/bin/sh
+:;exec scmlit -f $0 -e"(bi)" build $*
+
+(require (in-vicinity (program-vicinity) "build.scm"))
+(require 'getopt)
+(require 'getopt-parameters)
+
+(define (make-features-txi)
+ (call-with-output-file "features.txi"
+ (lambda (port)
+ ((((build 'open-table) 'features #f) 'for-each-row)
+ (lambda (row)
+ (apply (lambda (name spec documentation)
+ (display "@item " port) (display name port) (newline port)
+ (display "@cindex " port) (display name port) (newline port)
+ (display documentation port) (newline port) (newline port))
+ row))))))
+
+(define (print-manifest port)
+ (display "@multitable @columnfractions .22 .78" port) (newline port)
+ ((((build 'open-table) 'manifest #f) 'for-each-row)
+ (lambda (row)
+ (apply (lambda (file format category documentation)
+ (display (string-append "@item @code{" file) port)
+ (display "}" port) (newline port)
+ (display (string-append "@tab " documentation) port)
+ (newline port))
+ row)))
+ (display "@end multitable" port) (newline port))
+
+(define (append-info-node path node afile)
+ (let ((cat (open-file afile "a")))
+ (do ((n (+ -1 2) (+ -1 n)))
+ ((negative? n) (close-port cat))
+ (newline cat)))
+ (system (string-append "info -f " path " -n '" node "' -o - >> " afile)))
+
+(define (make-readme)
+ (require 'posix)
+ (let ((pipe (open-output-pipe "makeinfo --no-headers -o README"))
+ (scm-info (read-version
+ (in-vicinity (implementation-vicinity) "patchlvl.h"))))
+ (if (not pipe) (slib:error 'make-readme 'couldn't 'open 'pipe))
+ (display "\
+This directory contains the distribution of scm" pipe)
+ (display scm-info pipe)
+ (display ". Scm conforms to
+Revised^5 Report on the Algorithmic Language Scheme and the IEEE P1178
+specification. SCM runs under Amiga, Atari-ST, MacOS, MS-DOS, OS/2,
+NOS/VE, Unicos, VMS, Unix and similar systems.
+
+@center @url{http://swissnet.ai.mit.edu/~jaffer/SCM.html}
+
+@section Manifest
+"
+ pipe)
+ (print-manifest pipe)
+ (close-port pipe)
+ (set! scm-info (string-append "scm" scm-info ".info"))
+ (append-info-node scm-info "SLIB" "README")
+ (append-info-node scm-info "Making SCM" "README")
+ (append-info-node scm-info "Editing Scheme Code" "README")
+ (append-info-node scm-info "Problems Compiling" "README")
+ (append-info-node scm-info "Problems Linking" "README")
+ (append-info-node scm-info "Problems Running" "README")
+ (append-info-node scm-info "Testing" "README")))
+
+(define (build-from-argv argv)
+ (cond ((string? argv)
+ (require 'read-command)
+ (set! argv (call-with-input-string argv read-command))))
+ (let ()
+ (define command (string->symbol (list-ref argv *optind*)))
+ (define argc (length argv))
+ (cond
+ ((pair? argv)
+ (set! *optind* (+ 1 *optind*))
+ ((make-command-server build '*commands*)
+ command
+ (lambda (comname comval options positions arities types
+ defaulters checks aliases)
+ (let* ((params (getopt->parameter-list
+ argc argv options arities types aliases))
+ (fparams (fill-empty-parameters defaulters params)))
+ (cond ((not (list? params))
+ (slib:warn 'build-from-argv 'not-parameters? fparams)
+ #f)
+ ((not (check-parameters checks fparams))
+ (slib:warn 'build-from-argv 'check-parameters 'failed)
+ #f)
+ ((not (check-arities (map arity->arity-spec arities) fparams))
+ (slib:error 'build-from-argv "arity error" fparams) #f)
+ (else (comval fparams))))))))))
+
+(define (build-from-whole-argv argv)
+ (set! *optind* 0)
+ (set! *optarg* #f)
+ (build-from-argv argv))
+
+(define b build-from-whole-argv)
+
+(define (b*)
+ (require 'read-command)
+ (do ((e (read-command) (read-command)))
+ ((eof-object? e))
+ (cond ((null? e))
+ (else
+ (cond ((not (string-ci=? (car e) "build"))
+ (set! e (cons "build" e))))
+ (write (build-from-whole-argv e))
+ (newline)))
+ (display "build> ")
+ (force-output)))
+
+(define (bi) (if (build-from-argv *argv*) #t (exit #f)))
+
+(cond (*interactive*
+ (display "type (b \"build <command-line>\") to build") (newline)
+ (display "type (b*) to enter build command loop") (newline)))
+
+;;; Local Variables:
+;;; mode:scheme
+;;; End:
diff --git a/build.scm b/build.scm
index 4c4d88d..9af0217 100644
--- a/build.scm
+++ b/build.scm
@@ -318,7 +318,7 @@
#;interface to the editline or GNU readline library.
(define-build-feature
'edit-line
- '((c-file "edline.c") (c-lib termcap editline) (compiled-init "init_edline")))
+ '((c-file "edline.c") (c-lib terminfo editline) (compiled-init "init_edline")))
#;Client connections to the mysql databases.
(define-build-feature
@@ -475,12 +475,12 @@
((m *unknown* "" "-lm" "/usr/lib/libm.a" () ())
(c *unknown* "" "-lc" "/usr/lib/libc.a" () ())
- (regex *unknown* "" "-lregex" "/usr/lib/libregex.a" () ())
+ (regex *unknown* "" "-lrx" "/usr/lib/librx.a" () ())
(curses *unknown* "" "-lcurses" "/usr/lib/libcurses.a" () ())
(graphics *unknown* "-I/usr/X11/include -DX11" "-lX11"
"/usr/X11/lib/libX11.sa" () ())
(editline *unknown* "" "-lreadline" "/usr/lib/libreadline.a" () ())
- (termcap *unknown* "" "-ltermcap" "/usr/lib/libtermcap.a" () ())
+ (termcap *unknown* "" "-lncurses" "/usr/lib/libncurses.a" () ())
(debug *unknown* "-g" "-g" #f () ())
(socket *unknown* "" "" #f () ())
(lib *unknown* "" "" #f () ("scmmain.c"))
diff --git a/continue.h b/continue.h
index d16338f..c017dec 100644
--- a/continue.h
+++ b/continue.h
@@ -170,7 +170,7 @@ void throw_to_continuation P((CONTINUATION *cont, long val,
continuations on the SPARC. It flushes the register windows so
that all the state of the process is contained in the stack. */
-#ifdef sparc
+#if defined(sparc) || defined(__sparc__)
# define FLUSH_REGISTER_WINDOWS asm("ta 3")
#else
# define FLUSH_REGISTER_WINDOWS /* empty */
diff --git a/crs.c b/crs.c
index bab7c52..ef1e956 100644
--- a/crs.c
+++ b/crs.c
@@ -54,6 +54,18 @@
int wgetch P((WINDOW *));
#endif
+static int curses_initted = 0;
+
+static SCM scm_linitscr(void);
+
+
+static void do_init_maybe()
+{
+ if(!curses_initted)
+ scm_linitscr();
+ curses_initted = 1;
+}
+
/* define WIN port type */
#define WIN(obj) ((WINDOW*)CDR(obj))
#define WINP(obj) (tc16_window==TYP16(obj))
@@ -84,8 +96,8 @@ static ptobfuns winptob = {
bwaddch,
bwaddstr,
bwwrite,
- wrefresh,
- wgetch,
+ wrefresh, /* warning from compiler is wrefresh(WINDOW*) not (FILE*) */
+ wgetch, /* warning from compiler is wrefresh(WINDOW*) not (FILE*) */
freewindow};
SCM mkwindow(win)
@@ -102,7 +114,7 @@ SCM mkwindow(win)
}
SCM *loc_stdscr = 0;
-SCM linitscr()
+SCM scm_linitscr()
{
WINDOW *win;
if NIMP(*loc_stdscr) {
@@ -110,10 +122,12 @@ SCM linitscr()
return *loc_stdscr;
}
win = initscr();
+ curses_initted = 1;
return *loc_stdscr = mkwindow(win);
}
SCM lendwin()
{
+ do_init_maybe();
if IMP(*loc_stdscr) return BOOL_F;
return ERR==endwin() ? BOOL_F : BOOL_T;
}
@@ -132,6 +146,7 @@ SCM lnewwin(lines, cols, args)
begin_x = CAR(CDR(args));
ASSERT(INUMP(begin_y), begin_y, ARG3, s_newwin);
ASSERT(INUMP(begin_x), begin_y, ARG4, s_newwin);
+ do_init_maybe();
win = newwin(INUM(lines), INUM(cols),
INUM(begin_y), INUM(begin_x));
return mkwindow(win);
@@ -302,7 +317,7 @@ static char s_nonl[] = "nonl", s_nocbreak[] = "nocbreak",
s_noecho[] = "noecho", s_noraw[] = "noraw";
static iproc subr0s[] = {
- {"initscr", linitscr},
+ {"initscr", scm_linitscr},
{"endwin", lendwin},
{&s_nonl[2], lnl},
{s_nonl, lnonl},
@@ -403,5 +418,5 @@ void init_crs()
make_subr(s_mvwin, tc7_subr_3, lmvwin);
make_subr(s_box, tc7_subr_3, lbox);
add_feature("curses");
- add_final(lendwin);
+ /* add_final(lendwin); */
}
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..981ac53
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,133 @@
+scm (5d2-3) unstable frozen; urgency=low
+
+ * Fix libncurses4-dev -> libncurses5-dev build depend (Closes: #58435)
+ * Fix libreadline2-dev -> libreadline4-dev build depend.
+ * Fix license location in copyright file (lintian warning)
+ * Add tetex-bin as a build depend (needs makeinfo) (Closes: #53197)
+ * Add -isp option to dpkg-gencontrol (lintian error)
+ * Move scm to section interpreters.
+
+ -- James LewisMoss <dres@debian.org> Sun, 12 Mar 2000 09:04:17 -0500
+
+scm (5d2-2) unstable; urgency=low
+
+ * Apply patch from upstream for bug in eval.c. (Picked up from
+ comp.lang.scheme)
+ * Add Build-Depends on slib, librx1g-dev, libncurses4-dev, libreadlineg2-dev.
+ * Up standards version.
+ * Correct description: this is an R5RS implementation now
+ * Make sure no optimizations are done on m68k. (Closes: #52434)
+
+ -- James LewisMoss <dres@debian.org> Thu, 16 Dec 1999 23:53:15 -0500
+
+scm (5d2-1) unstable; urgency=low
+
+ * New upstream.
+
+ -- James LewisMoss <dres@debian.org> Mon, 6 Dec 1999 19:30:02 -0500
+
+scm (5d1-2) unstable; urgency=low
+
+ * Remove TAGS on clean (cut the diff back down to reasonable size).
+
+ -- James LewisMoss <dres@debian.org> Sat, 13 Nov 1999 14:10:10 -0500
+
+scm (5d1-1) unstable; urgency=low
+
+ * New upstream.
+ * move stuff to /usr/share.
+
+ -- James LewisMoss <dres@debian.org> Sat, 13 Nov 1999 13:26:46 -0500
+
+scm (5d0-3) unstable; urgency=low
+
+ * Change scmlit call to ./scmlit call (missed one) (Fixes bugs #37455
+ and #35545)
+ * Change man file permissions to 644 (fixes lintian warning)
+
+ -- James LewisMoss <dres@debian.org> Wed, 12 May 1999 22:39:54 -0400
+
+scm (5d0-2) unstable; urgency=low
+
+ * Removed call to add_final in init_crs. lendwin doesn't do anything
+ and scm was crashing when quit everytime in final_scm.
+ * Changed copyright to reflect new source.
+
+ -- James LewisMoss <dres@debian.org> Thu, 11 Mar 1999 22:13:19 -0500
+
+scm (5d0-1) unstable; urgency=low
+
+ * New upstream.
+ * Changed (terms) to access "/usr/doc/copyright/GPL".
+ * Changed regex to use -lrx
+
+ -- James LewisMoss <dres@debian.org> Sun, 7 Mar 1999 12:39:16 -0500
+
+scm (5c3-6) unstable; urgency=low
+
+ * New maintainer.
+
+ -- James LewisMoss <dres@debian.org> Fri, 26 Feb 1999 00:45:30 -0500
+
+scm (5c3-5) frozen unstable; urgency=low
+
+ * debian/rules chmod +x's bld.scm. Fixes #30521.
+
+ -- David N. Welton <davidw@efn.org> Fri, 11 Dec 1998 20:21:49 -0800
+
+scm (5c3-4) frozen unstable; urgency=low
+
+ * Made bld.scm executable. Fixes #29578.
+
+ -- David N. Welton <davidw@efn.org> Mon, 30 Nov 1998 20:57:12 -0800
+
+scm (5c3-3) frozen unstable; urgency=low
+
+ * -nw
+ * Fixes #16762.
+ * Fixes #18163.
+ * Fixes #18164.
+ * Fixes #23743.
+ * Fixes #24098.
+ * Fixes #24099.
+ * Fixes #24547.
+
+ -- David N. Welton <davidw@efn.org> Mon, 9 Nov 1998 21:41:29 -0800
+
+scm (5c3-2) frozen unstable; urgency=low
+
+ * Re-uploading for slink freeze.
+
+ -- David N. Welton <davidw@efn.org> Mon, 2 Nov 1998 21:06:01 -0800
+
+scm (5c3-1) unstable; urgency=low
+
+ * New upstream version.
+
+ -- David N. Welton <davidw@efn.org> Thu, 29 Oct 1998 21:37:49 -0800
+
+scm (5b3-1) unstable; urgency=low
+
+ * New maintainer
+ * New version
+ * libc6
+
+ -- Rob Browning <rlb@cs.utexas.edu> Fri, 12 Dec 1997 17:29:42 -0600
+
+scm (4e6-2) unstable; urgency=low
+
+ * Recompiled to use regex0.
+
+ -- Karl Sackett <krs@debian.org> Wed, 18 Dec 1996 13:27:20 -0600
+
+scm (4e6-1) unstable; urgency=low
+
+ * First Debian release.
+ * Makefile.in: scm compiles with regex.
+
+ -- Karl Sackett <krs@debian.org> Fri, 13 Dec 1996 08:55:23 -0600
+
+Local variables:
+mode: debian-changelog
+add-log-mailing-address: "dres@debian.org"
+End:
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..adca312
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,13 @@
+Source: scm
+Section: interpreters
+Priority: optional
+Maintainer: James LewisMoss <dres@debian.org>
+Standards-Version: 3.1.1
+Build-Depends: slib, librx1g-dev, libncurses5-dev, libreadline4-dev, tetex-bin
+
+Package: scm
+Architecture: any
+Depends: slib, ${shlibs:Depends}
+Description: A Scheme language interpreter.
+ Scm conforms to Revised^5 Report on the Algorithmic Language Scheme and
+ the IEEE P1178 specification.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..419226e
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,16 @@
+This is the Debian GNU/Linux prepackaged version of scm.
+
+This package was put together by Karl Sackett <krs@debian.org>, and
+upgraded by James LewisMoss <dres@debian.org> from sources obtained
+from:
+
+ ftp://swiss-ftp.ai.mit.edu/archive/scm/scm5d0.tar.gz
+
+For more information see:
+
+ http://www-swiss.ai.mit.edu/~jaffer/SCM.html
+
+License:
+
+scm is distributed under the GNU General Public License. See
+/usr/share/common-licenses/GPL for details.
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..aa12961
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -e
+
+install-info --quiet --section "Development" "Development" \
+ --description="A Scheme language interpreter" \
+ /usr/share/info/scm.info.gz
+
+if [ "$1" = "configure" ]; then
+ if [ -d /usr/doc -a ! -e /usr/doc/scm -a -d /usr/share/doc/scm ]; then
+ ln -sf ../share/doc/scm /usr/doc/scm
+ fi
+fi
diff --git a/debian/postrm b/debian/postrm
new file mode 100644
index 0000000..e7f4756
--- /dev/null
+++ b/debian/postrm
@@ -0,0 +1,4 @@
+#!/bin/sh
+set -e
+
+install-info --quiet --remove scm
diff --git a/debian/prerm b/debian/prerm
new file mode 100644
index 0000000..85fdaab
--- /dev/null
+++ b/debian/prerm
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/scm ]; then
+ rm -f /usr/doc/scm
+fi
+
diff --git a/debian/require.scm.debian b/debian/require.scm.debian
new file mode 100644
index 0000000..06e43e6
--- /dev/null
+++ b/debian/require.scm.debian
@@ -0,0 +1,2 @@
+(define (library-vicinity) "/usr/share/slib/")
+(load (in-vicinity (library-vicinity) "require"))
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..bc0618f
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,151 @@
+#! /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 644 -o root -g root
+
+ifeq ($(DEB_BUILD_ARCH), m68k)
+COMPILER_OPTIONS=
+else
+COMPILER_OPTIONS=-O2
+endif
+
+SCM_OPTIONS = -p linux \
+ --compiler-options=-g \
+ --compiler-options=$(COMPILER_OPTIONS) \
+ -F cautious \
+ -F bignums \
+ -F arrays \
+ -F array-for-each \
+ -F inexact \
+ -F record \
+ -F compiled-closure \
+ -F generalized-c-arguments \
+ -F tick-interrupts \
+ -F i/o-extensions \
+ -F edit-line \
+ -F regex \
+ -F socket \
+ -F posix \
+ -F unix \
+ -F curses \
+ -F dynamic-linking \
+ -F dump \
+ -F macro
+
+# -F heap-can-shrink \
+
+NON_LIB_FILES = 'bench.scm|build.scm|example.scm|r4rstest.scm|pi.scm'
+
+#test: stamp-configure
+# $(checkdir)
+# make checklit
+
+build:
+ chmod +x bld.scm
+ $(checkdir)
+ cp debian/require.scm.debian require.scm
+ifeq ($(DEB_BUILD_ARCH), m68k)
+ ${MAKE} scmlit CFLAGS=-g
+else
+ ${MAKE} scmlit
+endif
+ test -e /usr/share/slib || \
+ (echo "Must have slib installed for compile" && exit 1)
+# SCHEME_LIBRARY_PATH=/usr/share/slib/ ./build.scm ${SCM_OPTIONS} > debian/bld
+ ./bld.scm ${SCM_OPTIONS} > debian/bld
+ chmod ug+x debian/bld
+ debian/bld
+ #-rm -f debian/bld
+ #makeinfo scm.texi -o scm.info
+ make scm.info
+ texi2html -monolithic scm.texi
+ touch build
+
+clean:
+ $(checkdir)
+ -rm scm.info* scm.html tmp1 tmp2 scmflags.h scmlit
+ -rm -f scm5d0.info
+ -rm require.scm scm
+ make distclean
+ -rm -f build debian/bld
+ -rm -rf *~ debian/*~ debian/tmp* debian/files debian/substvars
+
+binary-indep: checkroot
+ $(checkdir)
+
+binary-arch: 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
+ $(INSTALL_PROGRAM) debian/postrm debian/tmp/DEBIAN
+
+# binaries
+ $(INSTALL_DIR) debian/tmp/usr/bin
+ $(INSTALL_PROGRAM) -s scm debian/tmp/usr/bin
+
+# library
+ $(INSTALL_DIR) debian/tmp/usr/lib/scm
+ $(INSTALL_DATA) `ls *.scm | egrep -v ${NON_LIB_FILES}` debian/tmp/usr/lib/scm
+ $(INSTALL_DATA) slibcat debian/tmp/usr/lib/scm
+ chmod +x debian/tmp/usr/lib/scm/bld.scm
+
+# man pages
+ $(INSTALL_DIR) debian/tmp/usr/share/man/man1
+ $(INSTALL_MAN) scm.1 debian/tmp/usr/share/man/man1
+ gzip -9vr debian/tmp/usr/share/man
+
+# documentation
+ $(INSTALL_DIR) debian/tmp/usr/share/doc/scm
+ $(INSTALL_DATA) debian/changelog debian/tmp/usr/share/doc/scm/changelog.Debian
+ $(INSTALL_DATA) ChangeLog debian/tmp/usr/share/doc/scm/changelog
+ $(INSTALL_DATA) QUICKREF debian/tmp/usr/share/doc/scm
+ $(INSTALL_DATA) README debian/tmp/usr/share/doc/scm
+ gzip -9v debian/tmp/usr/share/doc/scm/*
+ $(INSTALL_DATA) scm.html debian/tmp/usr/share/doc/scm
+ $(INSTALL_DATA) debian/copyright debian/tmp/usr/share/doc/scm
+
+# examples
+ $(INSTALL_DIR) debian/tmp/usr/share/doc/scm/examples
+ $(INSTALL_DATA) r4rstest.scm debian/tmp/usr/share/doc/scm/examples
+ $(INSTALL_DATA) example.scm debian/tmp/usr/share/doc/scm/examples
+ $(INSTALL_DATA) pi.scm debian/tmp/usr/share/doc/scm/examples
+ $(INSTALL_DATA) pi.c debian/tmp/usr/share/doc/scm/examples
+ $(INSTALL_DATA) bench.scm debian/tmp/usr/share/doc/scm/examples
+ $(INSTALL_DATA) split.scm debian/tmp/usr/share/doc/scm/examples
+
+# info pages
+ $(INSTALL_DIR) debian/tmp/usr/share/info
+ $(INSTALL_DATA) scm.info* debian/tmp/usr/share/info
+ gzip -9 debian/tmp/usr/share/info/*
+
+ dpkg-shlibdeps scm
+ dpkg-gencontrol -isp
+ dpkg --build debian/tmp ..
+
+define checkdir
+ test -f scm.h -a -f debian/rules
+endef
+
+binary: binary-indep binary-arch
+
+checkroot:
+ $(checkdir)
+ test root = "`whoami`"
+
+.PHONY: clean binary binary-arch binary-indep
diff --git a/eval.c b/eval.c
index ee4975d..fdb3683 100644
--- a/eval.c
+++ b/eval.c
@@ -2332,7 +2332,7 @@ SCM scm_cvapply(proc, n, argv)
return SUBRF(proc)(argv[0], argv[1],
2==n ? EOL : scm_v2lst(n-2, &argv[2]));
case tc7_asubr:
- if (1 >= n) return SUBRF(proc)(0==n ? argv[0] : UNDEFINED, UNDEFINED);
+ if (1 >= n) return SUBRF(proc)(0==n ? UNDEFINED : argv[0], UNDEFINED);
res = argv[0];
for (i = 1; i < n; i++)
res = SUBRF(proc)(res, argv[i]);
diff --git a/features.txi b/features.txi
new file mode 100644
index 0000000..3580171
--- /dev/null
+++ b/features.txi
@@ -0,0 +1,196 @@
+@item array
+@cindex array
+Alias for ARRAYS
+
+@item array-for-each
+@cindex array-for-each
+array-map! and array-for-each (arrays must also be featured).
+
+@item arrays
+@cindex arrays
+Use if you want arrays, uniform-arrays and uniform-vectors.
+
+@item bignums
+@cindex bignums
+Large precision integers.
+
+@item careful-interrupt-masking
+@cindex careful-interrupt-masking
+Define this for extra checking of interrupt masking and some simple
+checks for proper use of malloc and free. This is for debugging C
+code in @file{sys.c}, @file{eval.c}, @file{repl.c} and makes the
+interpreter several times slower than usual.
+
+@item cautious
+@cindex cautious
+Normally, the number of arguments arguments to interpreted closures
+(from LAMBDA) are checked if the function part of a form is not a
+symbol or only the first time the form is executed if the function
+part is a symbol. defining @samp{reckless} disables any checking.
+If you want to have SCM always check the number of arguments to
+interpreted closures define feature @samp{cautious}.
+
+@item cheap-continuations
+@cindex cheap-continuations
+If you only need straight stack continuations, executables compile with
+this feature will run faster and use less storage than not having it.
+Machines with unusual stacks @emph{need} this. Also, if you incorporate
+new C code into scm which uses VMS system services or library routines
+(which need to unwind the stack in an ordrly manner) you may need to
+use this feature.
+
+@item compiled-closure
+@cindex compiled-closure
+Use if you want to use compiled closures.
+
+@item curses
+@cindex curses
+For the @dfn{curses} screen management package.
+
+@item debug
+@cindex debug
+Turns on the features @samp{cautious},
+@samp{careful-interrupt-masking}, and @samp{stack-limit}; uses
+@code{-g} flags for debugging SCM source code.
+
+@item dump
+@cindex dump
+Convert a running scheme program into an executable file.
+
+@item dynamic-linking
+@cindex dynamic-linking
+Be able to load compiled files while running.
+
+@item edit-line
+@cindex edit-line
+interface to the editline or GNU readline library.
+
+@item engineering-notation
+@cindex engineering-notation
+Use if you want floats to display in engineering notation (exponents
+always multiples of 3) instead of scientific notation.
+
+@item generalized-c-arguments
+@cindex generalized-c-arguments
+@code{make_gsubr} for arbitrary (< 11) arguments to C functions.
+
+@item i/o-extensions
+@cindex i/o-extensions
+Commonly available I/O extensions: @dfn{exec}, line I/O, file
+positioning, file delete and rename, and directory functions.
+
+@item inexact
+@cindex inexact
+Use if you want floating point numbers.
+
+@item lit
+@cindex lit
+Lightweight -- no features
+
+@item macro
+@cindex macro
+C level support for hygienic and referentially transparent macros
+(syntax-rules macros).
+
+@item mysql
+@cindex mysql
+Client connections to the mysql databases.
+
+@item no-heap-shrink
+@cindex no-heap-shrink
+Use if you want segments of unused heap to not be freed up after
+garbage collection. This may increase time in GC for *very* large
+working sets.
+
+@item none
+@cindex none
+No features
+
+@item posix
+@cindex posix
+Posix functions available on all @dfn{Unix-like} systems. fork and
+process functions, user and group IDs, file permissions, and
+@dfn{link}.
+
+@item reckless
+@cindex reckless
+If your scheme code runs without any errors you can disable almost
+all error checking by compiling all files with @samp{reckless}.
+
+@item record
+@cindex record
+The Record package provides a facility for user to define their own
+record data types. See SLIB for documentation.
+
+@item regex
+@cindex regex
+String regular expression matching.
+
+@item rev2-procedures
+@cindex rev2-procedures
+These procedures were specified in the @cite{Revised^2 Report on Scheme}
+but not in @cite{R4RS}.
+
+@item sicp
+@cindex sicp
+Use if you want to run code from:
+
+@cindex SICP
+Harold Abelson and Gerald Jay Sussman with Julie Sussman.
+@cite{Structure and Interpretation of Computer Programs.}
+The MIT Press, Cambridge, Massachusetts, USA, 1985.
+
+Differences from R5RS are:
+@itemize @bullet
+@item
+(eq? '() '#f)
+@item
+(define a 25) returns the symbol a.
+@item
+(set! a 36) returns 36.
+@end itemize
+
+@item single-precision-only
+@cindex single-precision-only
+Use if you want all inexact real numbers to be single precision. This
+only has an effect if SINGLES is also defined (which is the default).
+This does not affect complex numbers.
+
+@item socket
+@cindex socket
+BSD @dfn{socket} interface.
+
+@item stack-limit
+@cindex stack-limit
+Use to enable checking for stack overflow. Define value of the C
+preprocessor variable @var{STACK_LIMIT} to be the size to which SCM
+should allow the stack to grow. STACK_LIMIT should be less than the
+maximum size the hardware can support, as not every routine checks the
+stack.
+
+@item tick-interrupts
+@cindex tick-interrupts
+Use if you want the ticks and ticks-interrupt functions.
+
+@item turtlegr
+@cindex turtlegr
+@dfn{Turtle} graphics calls for both Borland-C and X11 from
+sjm@@ee.tut.fi.
+
+@item unix
+@cindex unix
+Those unix features which have not made it into the Posix specs:
+nice, acct, lstat, readlink, symlink, mknod and sync.
+
+@item windows
+@cindex windows
+Microsoft Windows executable.
+
+@item x
+@cindex x
+Alias for Xlib feature.
+
+@item xlib
+@cindex xlib
+Interface to Xlib graphics routines.
+
diff --git a/mkimpcat.scm b/mkimpcat.scm
index 57c29b0..2f6c13a 100644
--- a/mkimpcat.scm
+++ b/mkimpcat.scm
@@ -41,15 +41,17 @@
;;;; "mkimpcat.scm" Build SCM-specific catalog for SLIB.
;;; Author: Aubrey Jaffer.
+(define (installation-vicinity) "/usr/lib/scm/")
+
(let ((catname "implcat"))
(call-with-output-file (in-vicinity (implementation-vicinity) catname)
(lambda (op)
(define (display* . args)
(for-each (lambda (arg) (display arg op)) args)
(newline op))
- (define wb:vicinity (string-append (implementation-vicinity) "../wb/"))
+ (define wb:vicinity (string-append (installation-vicinity) "../wb/"))
(define x-scm:vicinity
- (string-append (implementation-vicinity) "../xscm-2.01/"))
+ (string-append (installation-vicinity) "../xscm-2.01/"))
(define (add-link feature ofile . libs)
(cond ((file-exists? ofile)
;; remove #f from libs list
@@ -72,14 +74,14 @@
(display* "(")
(begin
(cond ((add-link 'i/o-extensions
- (in-vicinity (implementation-vicinity) "ioext"
+ (in-vicinity (installation-vicinity) "ioext"
link:able-suffix)
(usr:lib "c"))
(add-alias 'directory-for-each 'i/o-extensions)
(add-alias 'line-i/o 'i/o-extensions)
(add-alias 'pipe 'i/o-extensions)))
(cond ((add-link 'rev2-procedures
- (in-vicinity (implementation-vicinity) "sc2"
+ (in-vicinity (installation-vicinity) "sc2"
link:able-suffix))
(add-alias 'rev3-procedures 'rev2-procedures)))
(cond ((or
@@ -111,55 +113,55 @@
(add-source 'xpm (in-vicinity x-scm:vicinity "xpm"))))
(add-link 'turtle-graphics
- (in-vicinity (implementation-vicinity) "turtlegr"
+ (in-vicinity (installation-vicinity) "turtlegr"
link:able-suffix)
(x:lib "X11")
(usr:lib "m")
(usr:lib "c"))
(add-link 'Xlib
- (in-vicinity (implementation-vicinity) "x"
+ (in-vicinity (installation-vicinity) "x"
link:able-suffix)
(x:lib "X11")
(usr:lib "c"))
(add-link 'curses
- (in-vicinity (implementation-vicinity) "crs"
+ (in-vicinity (installation-vicinity) "crs"
link:able-suffix)
(usr:lib "ncurses")
;;(usr:lib "curses")
;;(usr:lib "termcap")
(usr:lib "c"))
(add-link 'edit-line
- (in-vicinity (implementation-vicinity) "edline"
+ (in-vicinity (installation-vicinity) "edline"
link:able-suffix)
(usr:lib "readline")
(usr:lib "termcap")
(usr:lib "c"))
(add-link 'regex
- (in-vicinity (implementation-vicinity) "rgx"
+ (in-vicinity (installation-vicinity) "rgx"
link:able-suffix)
(usr:lib "c"))
(add-link 'unix
- (in-vicinity (implementation-vicinity) "unix"
+ (in-vicinity (installation-vicinity) "unix"
link:able-suffix)
- (in-vicinity (implementation-vicinity) "ioext"
+ (in-vicinity (installation-vicinity) "ioext"
link:able-suffix)
(usr:lib "c"))
(add-link 'posix
- (in-vicinity (implementation-vicinity) "posix"
+ (in-vicinity (installation-vicinity) "posix"
link:able-suffix)
(usr:lib "c"))
(add-link 'socket
- (in-vicinity (implementation-vicinity) "socket"
+ (in-vicinity (installation-vicinity) "socket"
link:able-suffix)
(usr:lib "c"))
(add-link 'record
- (in-vicinity (implementation-vicinity) "record"
+ (in-vicinity (installation-vicinity) "record"
link:able-suffix))
(add-link 'generalized-c-arguments
- (in-vicinity (implementation-vicinity) "gsubr"
+ (in-vicinity (installation-vicinity) "gsubr"
link:able-suffix))
(add-link 'array-for-each
- (in-vicinity (implementation-vicinity) "ramap"
+ (in-vicinity (installation-vicinity) "ramap"
link:able-suffix))
)
(display* ")")
@@ -180,14 +182,14 @@
(begin
;; Simple associations -- OK for all modes of dynamic-linking
(display* "(")
- (add-alias 'hobbit (in-vicinity (implementation-vicinity) "hobbit"))
- (add-alias 'scmhob (in-vicinity (implementation-vicinity) "scmhob"))
+ (add-alias 'hobbit (in-vicinity (installation-vicinity) "hobbit"))
+ (add-alias 'scmhob (in-vicinity (installation-vicinity) "scmhob"))
(add-alias 'regex-case
- (in-vicinity (implementation-vicinity) "rgxcase"))
+ (in-vicinity (installation-vicinity) "rgxcase"))
(add-alias 'url-filename
- (in-vicinity (implementation-vicinity) "urlfile"))
+ (in-vicinity (installation-vicinity) "urlfile"))
(add-source 'disarm (in-vicinity
- (implementation-vicinity)
+ (installation-vicinity)
(string-append "disarm" (scheme-file-suffix))))
(add-source 'build (in-vicinity
(implementation-vicinity)
@@ -203,7 +205,7 @@
(display* "#.(if (defined? renamed-identifier)")
(display* " '(")
(display " " op)
- (add-source 'macro (in-vicinity (implementation-vicinity) "Macro"))
+ (add-source 'macro (in-vicinity (installation-vicinity) "Macro"))
(display* " )")
(display* " '())")
)
diff --git a/platform.txi b/platform.txi
new file mode 100644
index 0000000..bae415d
--- /dev/null
+++ b/platform.txi
@@ -0,0 +1,43 @@
+Table: platform
+name processor operating-system compiler
+#f processor-family operating-system #f
+symbol processor-family operating-system symbol
+symbol atom symbol symbol
+================= ================= ================= =================
+*unknown* *unknown* unix cc
+acorn-unixlib acorn *unknown* cc
+aix powerpc aix cc
+alpha alpha osf1 cc
+alpha-elf alpha unix cc
+alpha-linux alpha linux gcc
+amiga-aztec m68000 amiga cc
+amiga-dice-c m68000 amiga dcc
+amiga-gcc m68000 amiga gcc
+amiga-sas m68000 amiga lc
+atari-st-gcc m68000 atari.st gcc
+atari-st-turbo-c m68000 atari.st tcc
+borland-c 8086 ms-dos bcc
+cygwin32 i386 unix gcc
+djgpp i386 ms-dos gcc
+freebsd i386 unix cc
+gcc *unknown* unix gcc
+highc i386 ms-dos hc386
+hp-ux hp-risc hp-ux cc
+irix mips irix gcc
+linux i386 linux gcc
+linux-aout i386 linux gcc
+microsoft-c 8086 ms-dos cl
+microsoft-c-nt i386 ms-dos cl
+microsoft-quick-c 8086 ms-dos qcl
+ms-dos 8086 ms-dos cc
+os/2-cset i386 os/2 icc
+os/2-emx i386 os/2 gcc
+sunos sparc sunos cc
+svr4 *unknown* unix cc
+svr4-gcc-sun-ld sparc sunos gcc
+turbo-c 8086 ms-dos tcc
+unicos cray unicos cc
+unix *unknown* unix cc
+vms vax vms cc
+vms-gcc vax vms gcc
+watcom-9.0 i386 ms-dos wcc386p
diff --git a/tmp3 b/tmp3
new file mode 100644
index 0000000..b109107
--- /dev/null
+++ b/tmp3
@@ -0,0 +1,2 @@
+;(0.25 -3.25)
+(define foo (quote (0.25 -3.25))) \ No newline at end of file
diff --git a/version.txi b/version.txi
new file mode 100644
index 0000000..b5a0148
--- /dev/null
+++ b/version.txi
@@ -0,0 +1,2 @@
+@set SCMVERSION 5d0
+@set SCMDATE January 1999
diff --git a/xgen.scm b/xgen.scm
index 19db1cc..bac5668 100755
--- a/xgen.scm
+++ b/xgen.scm
@@ -1,4 +1,4 @@
-#! /usr/local/bin/scm \ %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
+#! /usr/bin/scm \ %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
- !#
;; Copyright (C) 1991-1999 Free Software Foundation, Inc.
;;