diff --git a/scsh/aix/bufpol.scm b/scsh/aix/bufpol.scm index 1829ecb..5172dd1 100644 --- a/scsh/aix/bufpol.scm +++ b/scsh/aix/bufpol.scm @@ -1,5 +1,5 @@ ;;; Flags that control buffering policy. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; These are for the SET-PORT-BUFFERING procedure, essentially a Scheme ;;; analog of the setbuf(3S) stdio call. We use the actual stdio values. diff --git a/scsh/aix/errno.scm b/scsh/aix/errno.scm index 4c976e2..241e8fa 100644 --- a/scsh/aix/errno.scm +++ b/scsh/aix/errno.scm @@ -1,5 +1,5 @@ ;;; Errno constant definitions. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; AIX version by Chipsy Sperber (define errno/2big 7) ; 2big is not a legit Scheme symbol. Lose, lose. diff --git a/scsh/aix/fdflags.scm b/scsh/aix/fdflags.scm index 3bde3ba..30fe529 100644 --- a/scsh/aix/fdflags.scm +++ b/scsh/aix/fdflags.scm @@ -1,5 +1,5 @@ ;;; Flags for open(2) and fcntl(2). -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; AIX version by Chipsy Sperber (define-enum-constants open diff --git a/scsh/aix/netconst.scm b/scsh/aix/netconst.scm index 39a5af4..edf8ed5 100644 --- a/scsh/aix/netconst.scm +++ b/scsh/aix/netconst.scm @@ -1,5 +1,5 @@ ;;; Magic Numbers for Networking -;;; Copyright (c) 1994 by Brian D. Carlstrom. +;;; Copyright (c) 1994 by Brian D. Carlstrom. See file COPYING. ;;; magic numbers not from header file ;;; but from man page diff --git a/scsh/aix/packages.scm b/scsh/aix/packages.scm index 7bb97d2..944e109 100644 --- a/scsh/aix/packages.scm +++ b/scsh/aix/packages.scm @@ -1,5 +1,5 @@ ;;; Interfaces and packages for the machine specific parts of scsh. -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; Copyright (c) 1994 by Brian D. Carlstrom. ;;; AIX version by Chipsy Sperber diff --git a/scsh/aix/signals.scm b/scsh/aix/signals.scm index 774e3b7..36420bb 100644 --- a/scsh/aix/signals.scm +++ b/scsh/aix/signals.scm @@ -1,5 +1,5 @@ ;;; Signal constant definitions for AIX -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; Copyright (c) 1994 by Brian D. Carlstrom. ;;; AIX version by Chipsy Sperber diff --git a/scsh/aix/time_dep.scm b/scsh/aix/time_dep.scm index 7f8adf4..b9b2063 100644 --- a/scsh/aix/time_dep.scm +++ b/scsh/aix/time_dep.scm @@ -1,5 +1,5 @@ ;;; OS-dependent time stuff -;;; Copyright (c) 1995 by Olin Shivers. +;;; Copyright (c) 1995 by Olin Shivers. See file COPYING. ;;; This suffices for BSD systems with the gettimeofday() ;;; microsecond-resolution timer. diff --git a/scsh/aix/tty-consts.scm b/scsh/aix/tty-consts.scm index 5b7c943..f4475c7 100644 --- a/scsh/aix/tty-consts.scm +++ b/scsh/aix/tty-consts.scm @@ -1,5 +1,5 @@ ;;; Constant definitions for tty control code (POSIX termios). -;;; Copyright (c) 1995 by Brian Carlstrom. +;;; Copyright (c) 1995 by Brian Carlstrom. See file COPYING. ;;; Largely rehacked by Olin. ;;; These constants are for AIX 3.2.x, diff --git a/scsh/aix/waitcodes.scm b/scsh/aix/waitcodes.scm index 09c832c..a0fd9c7 100644 --- a/scsh/aix/waitcodes.scm +++ b/scsh/aix/waitcodes.scm @@ -1,5 +1,5 @@ ;;; Scsh routines for analysing exit codes returned by WAIT. -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; ;;; To port these to a new OS, consult /usr/include/sys/wait.h, ;;; and check the WIFEXITED, WEXITSTATUS, WIFSTOPPED, WSTOPSIG, diff --git a/scsh/awk.scm b/scsh/awk.scm index e95dcc4..3433c82 100644 --- a/scsh/awk.scm +++ b/scsh/awk.scm @@ -1,5 +1,5 @@ ;;; An awk loop, after the design of David Albertz and Olin Shivers. -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; This uses the new RX SRE syntax. Defines a Clinger-Rees expander for ;;; the old, pre-SRE syntax AWK, and one for the new SRE-syntax AWK. diff --git a/scsh/bsd/bufpol.scm b/scsh/bsd/bufpol.scm index 803bdf3..d314b8a 100644 --- a/scsh/bsd/bufpol.scm +++ b/scsh/bsd/bufpol.scm @@ -1,5 +1,5 @@ ;;; Flags that control buffering policy. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; Copyright (c) 1995 by Brian D. Carlstrom. ;;; These are for the SET-PORT-BUFFERING procedure, essentially a Scheme diff --git a/scsh/bsd/errno.scm b/scsh/bsd/errno.scm index b997a59..fbf0aba 100644 --- a/scsh/bsd/errno.scm +++ b/scsh/bsd/errno.scm @@ -1,5 +1,5 @@ ;;; Errno constant definitions. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; Copyright (c) 1994 by Brian D. Carlstrom. ;;; These are the correct values for BSD4.4-Lite-based systems diff --git a/scsh/bsd/fdflags.scm b/scsh/bsd/fdflags.scm index 3139743..9aebffb 100644 --- a/scsh/bsd/fdflags.scm +++ b/scsh/bsd/fdflags.scm @@ -1,5 +1,5 @@ ;;; Flags for open(2) and fcntl(2). -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; Copyright (c) 1994 by Brian D. Carlstrom (define-enum-constants open diff --git a/scsh/bsd/netconst.scm b/scsh/bsd/netconst.scm index 2b12ae8..8bdc5de 100644 --- a/scsh/bsd/netconst.scm +++ b/scsh/bsd/netconst.scm @@ -1,5 +1,5 @@ ;;; Magic Numbers for Networking -;;; Copyright (c) 1994 by Brian D. Carlstrom. +;;; Copyright (c) 1994 by Brian D. Carlstrom. See file COPYING. ;;; magic numbers not from header file ;;; but from man page diff --git a/scsh/bsd/packages.scm b/scsh/bsd/packages.scm index 1749fd1..6a0b377 100644 --- a/scsh/bsd/packages.scm +++ b/scsh/bsd/packages.scm @@ -1,5 +1,5 @@ ;;; Interfaces and packages for the BSD4.4-Lite specific parts of scsh. -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; Copyright (c) 1994 by Brian D. Carlstrom. (define-interface bsd44lite-fdflags-extras-interface diff --git a/scsh/bsd/signals.scm b/scsh/bsd/signals.scm index 6a4b933..97eee46 100644 --- a/scsh/bsd/signals.scm +++ b/scsh/bsd/signals.scm @@ -1,5 +1,5 @@ ;;; Signal constant definitions for BSD4.4-Lite -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; Copyright (c) 1994 by Brian D. Carlstrom. (define-enum-constants signal diff --git a/scsh/bsd/time_dep.scm b/scsh/bsd/time_dep.scm index 7f8adf4..b9b2063 100644 --- a/scsh/bsd/time_dep.scm +++ b/scsh/bsd/time_dep.scm @@ -1,5 +1,5 @@ ;;; OS-dependent time stuff -;;; Copyright (c) 1995 by Olin Shivers. +;;; Copyright (c) 1995 by Olin Shivers. See file COPYING. ;;; This suffices for BSD systems with the gettimeofday() ;;; microsecond-resolution timer. diff --git a/scsh/bsd/tty-consts.scm b/scsh/bsd/tty-consts.scm index 51cf348..42b86cc 100644 --- a/scsh/bsd/tty-consts.scm +++ b/scsh/bsd/tty-consts.scm @@ -1,5 +1,5 @@ ;;; Constant definitions for tty control code (POSIX termios). -;;; Copyright (c) 1995 by Brian Carlstrom. +;;; Copyright (c) 1995 by Brian Carlstrom. See file COPYING. ;;; Largely rehacked by Olin. ;;; Constants from NetBSD header files substituted by Bill Sommerfeld diff --git a/scsh/bsd/waitcodes.scm b/scsh/bsd/waitcodes.scm index ce370ae..f60a876 100644 --- a/scsh/bsd/waitcodes.scm +++ b/scsh/bsd/waitcodes.scm @@ -1,5 +1,5 @@ ;;; Scsh routines for analysing exit codes returned by WAIT. -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; ;;; To port these to a new OS, consult /usr/include/sys/wait.h, ;;; and check the WIFEXITED, WEXITSTATUS, WIFSTOPPED, WSTOPSIG, diff --git a/scsh/cxux/bufpol.scm b/scsh/cxux/bufpol.scm index 09e5ad9..f37ae08 100644 --- a/scsh/cxux/bufpol.scm +++ b/scsh/cxux/bufpol.scm @@ -1,5 +1,5 @@ ;;; Flags that control buffering policy. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; These are for the SET-PORT-BUFFERING procedure, essentially a Scheme ;;; analog of the setbuf(3S) stdio call. We use the actual stdio values. diff --git a/scsh/cxux/errno.scm b/scsh/cxux/errno.scm index d424d6d..889c203 100644 --- a/scsh/cxux/errno.scm +++ b/scsh/cxux/errno.scm @@ -1,5 +1,5 @@ ;;; Errno constant definitions. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; These are the correct values for a Harris NightHawk running CX/UX diff --git a/scsh/cxux/fdflags.scm b/scsh/cxux/fdflags.scm index f468086..0e518b6 100644 --- a/scsh/cxux/fdflags.scm +++ b/scsh/cxux/fdflags.scm @@ -1,5 +1,5 @@ ;;; Flags for open(2) and fcntl(2). -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. (define-enum-constants open (read 0) diff --git a/scsh/cxux/netconst.scm b/scsh/cxux/netconst.scm index 59a4c68..b5c38f6 100644 --- a/scsh/cxux/netconst.scm +++ b/scsh/cxux/netconst.scm @@ -1,5 +1,5 @@ ;;; Magic Numbers for Networking -;;; Copyright (c) 1994 by Brian D. Carlstrom. +;;; Copyright (c) 1994 by Brian D. Carlstrom. See file COPYING. ;;; magic numbers not from header file ;;; but from man page diff --git a/scsh/cxux/packages.scm b/scsh/cxux/packages.scm index bab9ab8..f789154 100644 --- a/scsh/cxux/packages.scm +++ b/scsh/cxux/packages.scm @@ -1,6 +1,6 @@ ;;; Interfaces and packages for the machine specific parts of scsh. ;;; This is a specific to CX/UX -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; Copyright (c) 1994 by Brian D. Carlstrom. (define-interface cxux-fdflags-extras-interface diff --git a/scsh/cxux/signals.scm b/scsh/cxux/signals.scm index a37faef..f9188eb 100644 --- a/scsh/cxux/signals.scm +++ b/scsh/cxux/signals.scm @@ -1,5 +1,5 @@ ;;; Signal constant definitions for "m88k-cxux" -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; Copyright (c) 1994 by Brian D. Carlstrom. ;;POSIX only defined here. diff --git a/scsh/cxux/time_dep.scm b/scsh/cxux/time_dep.scm index 7f8adf4..b9b2063 100644 --- a/scsh/cxux/time_dep.scm +++ b/scsh/cxux/time_dep.scm @@ -1,5 +1,5 @@ ;;; OS-dependent time stuff -;;; Copyright (c) 1995 by Olin Shivers. +;;; Copyright (c) 1995 by Olin Shivers. See file COPYING. ;;; This suffices for BSD systems with the gettimeofday() ;;; microsecond-resolution timer. diff --git a/scsh/cxux/waitcodes.scm b/scsh/cxux/waitcodes.scm index 09c832c..a0fd9c7 100644 --- a/scsh/cxux/waitcodes.scm +++ b/scsh/cxux/waitcodes.scm @@ -1,5 +1,5 @@ ;;; Scsh routines for analysing exit codes returned by WAIT. -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; ;;; To port these to a new OS, consult /usr/include/sys/wait.h, ;;; and check the WIFEXITED, WEXITSTATUS, WIFSTOPPED, WSTOPSIG, diff --git a/scsh/db.scm b/scsh/db.scm index 75328de..e240630 100644 --- a/scsh/db.scm +++ b/scsh/db.scm @@ -1,6 +1,7 @@ ;;; Very vanilla DBM processing code ;;; Copyright (c) 1995 by David Albertz (dalbertz@clark.lcs.mit.edu). +;;; See file COPYING. ;;; This code is freely available for use by anyone for any purpose, ;;; so long as you don't charge money for it, remove this notice, or diff --git a/scsh/dbm.scm b/scsh/dbm.scm index 1c7226f..6ac5c1a 100644 --- a/scsh/dbm.scm +++ b/scsh/dbm.scm @@ -1,6 +1,7 @@ ;;; DBM processing code ;;; Copyright (c) 1995 by David Albertz (dalbertz@clark.lcs.mit.edu). +;;; See file COPYING. ;;; This code is freely available for use by anyone for any purpose, ;;; so long as you don't charge money for it, remove this notice, or diff --git a/scsh/defrec.scm b/scsh/defrec.scm index c90752a..ac16c58 100644 --- a/scsh/defrec.scm +++ b/scsh/defrec.scm @@ -1,4 +1,4 @@ -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; Syntax for defining record types. ;;; This implementation works with the Scheme48 system -- diff --git a/scsh/enumconst.scm b/scsh/enumconst.scm index 7de5a3e..9095ccd 100644 --- a/scsh/enumconst.scm +++ b/scsh/enumconst.scm @@ -1,4 +1,4 @@ -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; Handy for defining random flags and constants. ;;; (define-enum-constant "errno" intr 9) => (define errno/intr 9) diff --git a/scsh/fdports.scm b/scsh/fdports.scm index 7d66314..4e04ca7 100644 --- a/scsh/fdports.scm +++ b/scsh/fdports.scm @@ -1,4 +1,4 @@ -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. (define (fd/port? x) (or (and (integer? x) (>= x 0)) diff --git a/scsh/fileinfo.scm b/scsh/fileinfo.scm index 9ec09ef..e502428 100644 --- a/scsh/fileinfo.scm +++ b/scsh/fileinfo.scm @@ -1,4 +1,4 @@ -;;; Copyright (c) 1993, 1994 by Olin Shivers. +;;; Copyright (c) 1993, 1994 by Olin Shivers. See file COPYING. ;;; chase? true (the default) means if the file is a symlink, chase the link ;;; and report on the file it references. chase? = #f means check the actual diff --git a/scsh/filemtch.scm b/scsh/filemtch.scm index d338502..59d1b26 100644 --- a/scsh/filemtch.scm +++ b/scsh/filemtch.scm @@ -2,6 +2,7 @@ ;;; Copyright (c) 1994 by David Albertz (dalbertz@clark.lcs.mit.edu). ;;; Copyright (c) 1994 by Olin Shivers (shivers@clark.lcs.mit.edu). +;;; See file COPYING. ;;; This code is freely available for use by anyone for any purpose, ;;; so long as you don't charge money for it, remove this notice, or diff --git a/scsh/filesys.scm b/scsh/filesys.scm index c9d7127..abb6a32 100644 --- a/scsh/filesys.scm +++ b/scsh/filesys.scm @@ -1,6 +1,6 @@ ;;; Ops that create objects in the file system: ;;; create-{directory,fifo,hard-link,symlink} -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; This procedure nukes FNAME, whatever it may be: directory, file, fifo, ;;; symlink. diff --git a/scsh/flock.scm b/scsh/flock.scm index 35790f9..3690136 100644 --- a/scsh/flock.scm +++ b/scsh/flock.scm @@ -2,7 +2,7 @@ ;;; Posix advisory record-locking for file descriptors. ;;; These procs may only be applied to integer file descriptors; ;;; they may not be applied to ports. -;;; Copyright (c) 1995 by David Albertz and Olin Shivers. +;;; Copyright (c) 1995 by David Albertz and Olin Shivers. See file COPYING. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; C syscall interface diff --git a/scsh/fr.scm b/scsh/fr.scm index 103f81a..9ab0948 100644 --- a/scsh/fr.scm +++ b/scsh/fr.scm @@ -1,5 +1,5 @@ ;;; Field and record parsing utilities for scsh. -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; Notes: ;;; - Comment on the dependencies here... diff --git a/scsh/generic/bufpol.scm b/scsh/generic/bufpol.scm index 09e5ad9..f37ae08 100644 --- a/scsh/generic/bufpol.scm +++ b/scsh/generic/bufpol.scm @@ -1,5 +1,5 @@ ;;; Flags that control buffering policy. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; These are for the SET-PORT-BUFFERING procedure, essentially a Scheme ;;; analog of the setbuf(3S) stdio call. We use the actual stdio values. diff --git a/scsh/generic/errno.scm b/scsh/generic/errno.scm index 6f64388..a56a343 100644 --- a/scsh/generic/errno.scm +++ b/scsh/generic/errno.scm @@ -1,5 +1,5 @@ ;;; Errno constant definitions. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; These are the correct values for my SparcStation. diff --git a/scsh/generic/fdflags.scm b/scsh/generic/fdflags.scm index 987ed71..c6b32da 100644 --- a/scsh/generic/fdflags.scm +++ b/scsh/generic/fdflags.scm @@ -1,5 +1,5 @@ ;;; Flags for open(2) and fcntl(2). -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. (define-enum-constants open (read 0) diff --git a/scsh/generic/netconst.scm b/scsh/generic/netconst.scm index 59a4c68..b5c38f6 100644 --- a/scsh/generic/netconst.scm +++ b/scsh/generic/netconst.scm @@ -1,5 +1,5 @@ ;;; Magic Numbers for Networking -;;; Copyright (c) 1994 by Brian D. Carlstrom. +;;; Copyright (c) 1994 by Brian D. Carlstrom. See file COPYING. ;;; magic numbers not from header file ;;; but from man page diff --git a/scsh/generic/packages.scm b/scsh/generic/packages.scm index c8096a9..e4851e6 100644 --- a/scsh/generic/packages.scm +++ b/scsh/generic/packages.scm @@ -1,6 +1,6 @@ ;;; Interfaces and packages for the machine specific parts of scsh. ;;; This is a generic version as a starting point, based on sunos. -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; Copyright (c) 1994 by Brian D. Carlstrom. (define-interface generic-fdflags-extras-interface diff --git a/scsh/generic/signals.scm b/scsh/generic/signals.scm index 0fba185..2753900 100644 --- a/scsh/generic/signals.scm +++ b/scsh/generic/signals.scm @@ -1,5 +1,5 @@ ;;; Signal constant definitions for "generic" -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; Copyright (c) 1994 by Brian D. Carlstrom. ;;POSIX only defined here. diff --git a/scsh/generic/time_dep.scm b/scsh/generic/time_dep.scm index 7f8adf4..b9b2063 100644 --- a/scsh/generic/time_dep.scm +++ b/scsh/generic/time_dep.scm @@ -1,5 +1,5 @@ ;;; OS-dependent time stuff -;;; Copyright (c) 1995 by Olin Shivers. +;;; Copyright (c) 1995 by Olin Shivers. See file COPYING. ;;; This suffices for BSD systems with the gettimeofday() ;;; microsecond-resolution timer. diff --git a/scsh/generic/waitcodes.scm b/scsh/generic/waitcodes.scm index 09c832c..a0fd9c7 100644 --- a/scsh/generic/waitcodes.scm +++ b/scsh/generic/waitcodes.scm @@ -1,5 +1,5 @@ ;;; Scsh routines for analysing exit codes returned by WAIT. -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; ;;; To port these to a new OS, consult /usr/include/sys/wait.h, ;;; and check the WIFEXITED, WEXITSTATUS, WIFSTOPPED, WSTOPSIG, diff --git a/scsh/glob.scm b/scsh/glob.scm index 271b59c..d0ed459 100644 --- a/scsh/glob.scm +++ b/scsh/glob.scm @@ -2,6 +2,7 @@ ;;; Copyright (c) 1994 by David Albertz (dalbertz@clark.lcs.mit.edu). ;;; Copyright (c) 1994 by Olin Shivers (shivers@clark.lcs.mit.edu). +;;; See file COPYING. ;;; This code is freely available for use by anyone for any purpose, ;;; so long as you don't charge money for it, remove this notice, or diff --git a/scsh/here.scm b/scsh/here.scm index 957c291..8ca38fc 100644 --- a/scsh/here.scm +++ b/scsh/here.scm @@ -1,7 +1,7 @@ ;;; Here documents in Scheme for scsh scripts. ;;; These are like "here documents" for sh and csh shell scripts ;;; (i.e., the <string + (pid)))) ;; prefix for temp files - in their own dir +(define *prefix* (string-append *temp-dir* "/")) + +(define (make-static-heap image archive) + (if (file-exists? *temp-dir*) + (if (equal? 'directory (file-info:type (file-attributes *temp-dir*))) + (with-cwd *temp-dir* + (map delete-file (directory-files *temp-dir* #t))) + (delete-file *temp-dir*))) + (create-directory *temp-dir* #o755 #t) + (let ((size (file-info:size (file-attributes image)))) + (do-it size image *prefix*))) + +(define (test) + (make-static-heap *scsh-image* *image-lib*)) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + + +; For example: +; (do-it 100000 "~/s48/debug/little.image" "little-heap.c") +; +; The first argument to do-it should be somewhat larger than the size, +; in bytes, of the image file to be converted (which you can obtain with +; "ls -l"). +; +; If the image contains 0-length stored objects, then the .c file will +; have to be compiled by gcc, since 0-length arrays aren't allowed in +; ANSI C. This wouldn't be difficult to work around. + +(define *comments?* #f) + +; 800,000 bytes => 200,000 words => at least 100,000 objects +; 50 chunks => 16,000 bytes per chunk => 2,000 objects per chunk +(define *chunk-size* 10000) + +(define (do-it bytes infile prefix) + (let ((start (init bytes infile))) + (emit-area-declarations "p" immutable? "const " prefix) + (emit-area-declarations "i" mutable? "" prefix) + (emit-area-initializers "p" immutable? "const " prefix) + (emit-area-initializers "i" mutable? "" prefix) + (call-with-output-file (string-append prefix "entry.c") + (lambda (port) + (display "#include \"" port) + (display prefix port) + (display (descriptor-include start) port) + (display ".h\"" port) + (newline port) + (display "const long entry = " port) + (emit-descriptor start port) + (write-char #\; port) + (newline port))))) + +(define (init bytes infile) + (create-memory (quotient bytes 2) quiescent) ;Output of ls -l + (initialize-heap (memory-begin) (memory-size)) + (let ((start (read-image infile 0))) + (let ((n (nchunks))) + (message n (if (= n 1) " chunk" " chunks"))) + start)) + +(define (nchunks) (+ (chunk-number (heap-pointer)) 1)) + +; emit struct declarations for areas + +(define (emit-area-declarations name in-area? const prefix) + (for-each-stored-object + (string-append prefix name) ".h" + (lambda (chunk port) + (message name chunk " declaration") + (format port "#define D(x) (long)(&x)+7~%") + (format port "#define H unsigned long~%") + (display "struct " port) (display name port) (display chunk port) + (display " {" port) (newline port)) + (lambda (x port) + (if (in-area? x) + (emit-declaration x port))) + (lambda (chunk port) + (display "};" port) + (newline port) + (display const port) + (display "extern struct " port) + (display name port) + (display chunk port) + (write-char #\space port) (display name port) (display chunk port) + (write-char #\; port) (newline port) + chunk))) + +(define (emit-declaration x port) + (display " H x" port) + (writex x port) + (cond ((d-vector? x) + (display "; long d" port) + (writex x port) + (write-char #\[ port) + (write (d-vector-length x) port)) + ((vm-string? x) + (display "; char d" port) + (writex x port) + (write-char #\[ port) + ;; Ensure alignment (thanks Ian) + (write (cells->bytes (bytes->cells (b-vector-length x))) + port)) + (else + (display "; unsigned char d" port) + (writex x port) + (write-char #\[ port) + ;; Ensure alignment + (write (cells->bytes (bytes->cells (b-vector-length x))) + port))) + (display "];" port) + (if *comments?* + (begin (display " /* " port) + (display (enumerand->name (stob-type x) stob) port) + (display " */" port))) + (newline port)) + +; Emit initializers for areas + +(define (emit-area-initializers name in-area? const prefix) + (for-each-stored-object + (string-append prefix name) ".c" + (lambda (chunk port) + (message name chunk " initializer") + (display const port) + (display "struct " port) (display name port) (write chunk port) + (write-char #\space port) (display name port) (write chunk port) + (display " =" port) (newline port) + + (write-char #\{ port) (newline port)) + (lambda (x port) + (if (in-area? x) + (emit-initializer x port))) + (lambda (chunk port) + (display "};" port) (newline port))) + + (call-with-output-file + (string-append prefix ".c") + (lambda (port) + (let ((n (nchunks))) + (format port "const long ~a_count = ~s;~%" name n) + (format port "~a long * const ~a_areas[~s] = {" const name n) + (do ((i 0 (+ i 1))) + ((= i n)) + (format port "(~a long *)&~a~s, " const name i)) + (format port "};~%const long ~a_sizes[~s] = {" name n) + (do ((i 0 (+ i 1))) + ((= i n)) + (format port "sizeof(~a~s), " name i)) + (format port "};~%"))))) + + +(define (message . stuff) + (for-each display stuff) (newline)) + +(define (emit-initializer x port) + (display " " port) + (write (stob-header x) port) + (write-char #\, port) + (cond ((d-vector? x) + (emit-d-vector-initializer x port)) + ((vm-string? x) + (write-char #\" port) + (let ((len (vm-string-length x))) + (do ((i 0 (+ i 1))) + ((= i len) (write-char #\" port)) + (let ((c (vm-string-ref x i))) + (cond ((or (char=? c #\") (char=? c #\\)) + (write-char #\\ port)) + ((char=? c #\newline) + (display "\\n\\" port))) + (write-char c port))))) + (else + (write-char #\{ port) + (let ((len (b-vector-length x))) + (do ((i 0 (+ i 1))) + ((= i len) (write-char #\} port)) + (write (b-vector-ref x i) port) + (write-char #\, port))))) + (write-char #\, port) + (if *comments?* + (begin (display " /* " port) + (writex x port) + (display " */" port))) + (newline port)) + +(define (emit-d-vector-initializer x port) + (write-char #\{ port) + (let ((len (d-vector-length x))) + (do ((i 0 (+ i 1))) + ((= i len) (write-char #\} port)) + (emit-descriptor (d-vector-ref x i) port) + (write-char #\, port)))) + +(define (emit-descriptor x port) + (if (stob? x) + (begin (if (immutable? x) + (display "D(p" port) + (display "D(i" port)) + (display (chunk-number x) port) + (display ".x" port) + (writex x port) + (write-char #\) port)) + (write x port))) + +; hacked emit-descriptor returns chunk or #f +(define (descriptor-include x) + (if (stob? x) + (string-append + (if (immutable? x) "p" "i") + (number->string (chunk-number x))) + #f)) + +; Foo + +(define (writex x port) + (write (quotient (- (- x (memory-begin)) 7) 4) port)) + +(define (chunk-number x) + (quotient (- (- x (memory-begin)) 7) *chunk-size*)) + + +; Image traversal utility + +(define (for-each-stored-object suffix chunk-start proc chunk-end) + (let ((limit (heap-pointer))) + (let chunk-loop ((addr (newspace-begin)) + (i 0) + (chunk (+ (newspace-begin) *chunk-size*))) + (if (addr< addr limit) + (begin + (chunk-start i) + (let loop ((addr addr)) + (if (and (addr< addr limit) + (addr< addr chunk)) + (let ((d (fetch addr))) + (if (not (header? d)) + (warn "heap is in an inconsistent state" d)) + (proc (address->stob-descriptor (addr1+ addr))) + (loop (addr1+ (addr+ addr (header-a-units d))))) + (begin (chunk-end i) + (chunk-loop addr + (+ i 1) + (+ chunk *chunk-size*)))))))))) + +(define (mutable? x) (not (immutable? x))) diff --git a/scsh/oldtop.scm b/scsh/oldtop.scm index f9c8d7a..a0689fa 100644 --- a/scsh/oldtop.scm +++ b/scsh/oldtop.scm @@ -1,5 +1,5 @@ ;;; Scsh top level -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; Requires ;;; From BUILD: build-image diff --git a/scsh/procobj.scm b/scsh/procobj.scm index ff1aab9..cf550a8 100644 --- a/scsh/procobj.scm +++ b/scsh/procobj.scm @@ -1,5 +1,5 @@ ;;; Unix wait & process objects for scsh -;;; Copyright (c) 1993, 1994, 1995 by Olin Shivers. +;;; Copyright (c) 1993, 1994, 1995 by Olin Shivers. See file COPYING. ;;; This is a GC'd abstraction for Unix process id's. ;;; The problem with Unix pids is (a) they clutter up the kernel diff --git a/scsh/pty.scm b/scsh/pty.scm index 85c07c9..1150cd9 100644 --- a/scsh/pty.scm +++ b/scsh/pty.scm @@ -1,5 +1,5 @@ ;;; Pseudo terminals -;;; Copyright (c) 1995 by Olin Shivers. +;;; Copyright (c) 1995 by Olin Shivers. See file COPYING. ;;; (fork-pty-session thunk) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/scsh/rw.scm b/scsh/rw.scm index 2e17712..862a776 100644 --- a/scsh/rw.scm +++ b/scsh/rw.scm @@ -1,5 +1,5 @@ ;;; Basic read and write -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; Note: read ops should check to see if their string args are mutable. diff --git a/scsh/rx/doc2.txt b/scsh/rx/doc2.txt index 3a9c866..51b33df 100644 --- a/scsh/rx/doc2.txt +++ b/scsh/rx/doc2.txt @@ -1,7 +1,7 @@ Scsh regular expressions Olin Shivers July 1998 -Last Update: 98/10/4 +Last Update: 99/7/12 * Todo Module naming and structuring. @@ -505,7 +505,7 @@ We can *compute* a char class by writing the SRE , where is a Scheme expression producing a value that can be coerced to a character set: a character set, character, one-character -string, or char-class regexp value. This regexp matches one character +string, or char-class regexp value. This regexp matches any character from the set. The char-class SRE ,@ is entirely equivalent to , @@ -584,7 +584,7 @@ context in which the "a" is interpreted, making the SRE equivalent to ** Dynamic regexps -SRE notation allows you to compute parts of a regular expressions +SRE notation allows you to compute parts of a regular expression at run time. The SRE , is a regexp whose body is a Scheme expression producing a @@ -711,12 +711,11 @@ that is not supported by the current scsh reference implementation.] *** Posix string notation -The SRE (posix-string ), where is a string literal -(*not* a general Scheme expression), allows one to use Posix string -notation for a regexp. It's intended as backwards compatibility and -is deprecated. Example: (posix-string "[aeiou]+|x*|y{3,5}") matches -a string of vowels, a possibly empty string of x's, or three to five -y's. +The SRE (posix-string ), where is a string literal (*not* +a general Scheme expression that evaluates to a string), allows one to use +Posix string notation for a regexp. It's intended as backwards compatibility +and is deprecated. Example: (posix-string "[aeiou]+|x*|y{3,5}") matches a +string of vowels, a possibly empty string of x's, or three to five y's. Parens are used ambiguously in Posix notation -- both for grouping and submatch marking. The (posix-string ) form makes the @@ -1270,7 +1269,7 @@ corresponding SRE is much more transparent: *** ASCII nul and newline -Does . match a ASCII nul? Does it match a newline? Does [^x]? Unforunately, +Does . match a ASCII nul? Does it match a newline? Does [^x]? Unfortunately, the same expressions have different meanings depending on the implementation and the flags passed to the pattern-compiler functions. In SRE notation, the behaviour of each element is unambiguously defined. No surprises; no @@ -1422,18 +1421,18 @@ should not be used in new code. Same as above, except 'post item means recurse on post-match substring. If RE doesn't match STR, returns STR. -(regexp-foldl re kons knil s [finish start]) -> value +(regexp-fold re kons knil s [finish start]) -> value The following definition is a bit unwieldy, but the intuition is simple: this procedure uses the regexp RE to divide up string S into non-matching/matching chunks, and then "folds" the procedure KONS across this sequence of chunks. It is useful when you wish to operate on a string in sub-units defined by some regular expression, as are - the related REGEXP-FOLDR and REGEXP-FOR-EACH procedures. + the related REGEXP-FOLD-RIGHT and REGEXP-FOR-EACH procedures. Search from START (defaulting to 0) for a match to RE; call this match M. Let I be the index of the end of the match (that is, (match:end M 0)). Loop as follows: - (regexp-foldl re kons (kons START M knil) s finish I) + (regexp-fold re kons (kons START M knil) s finish I) If there is no match, return instead (finish START knil) FINISH defaults to (lambda (i knil) knil) @@ -1457,7 +1456,7 @@ should not be used in new code. Hint: The LET-MATCH macro is frequently useful for operating on the match value M passed to the KONS function. -(regexp-foldr re kons knil s [finish start]) -> value +(regexp-fold-right re kons knil s [finish start]) -> value This procedure repeatedly matches regexp RE across string S. This divides S up into a sequence of matching/non-matching chunks: NM0 M1 NM1 M2 NM2 ... Mk NMk @@ -1475,9 +1474,9 @@ should not be used in new code. FINISH defaults to (lambda (i knil) knil) Example: To pick out all the matches to RE in S, say - (regexp-foldr re - (lambda (m i lis) (cons (match:substring m 0) lis)) - '() s) + (regexp-fold-right re + (lambda (m i lis) (cons (match:substring m 0) lis)) + '() s) Hint: The LET-MATCH macro is frequently useful for operating on the match value M passed to the KONS function. @@ -1636,11 +1635,12 @@ explicit-renaming low-level macros. else. E.g., we might have a conditional form wherein if the test part of one arm is an SRE, it expands to a regexp match on some implied value, otherwise the form is evaluated as a boolean - Scheme expression: + Scheme expression. Here's an example of how a high-level macro could + drop an expression bound to ?TEST-EXP into an IF-SRE-FORM: - (if-sre-form test-exp ; If TEST-EXP is a regexp, - (regexp-search? (rx test-exp) line) ; match it against the line, - test-exp) ; otw it's a boolean exp. + (if-sre-form ?test-exp ; If ?TEST-EXP is a regexp, + (regexp-search? (rx ?test-exp) line) ; match it against the line, + ?test-exp) ; otw it's a boolean exp. (sre-form? form rename compare) -> boolean This procedure is for low-level macros doing things equivalent to diff --git a/scsh/scsh-condition.scm b/scsh/scsh-condition.scm index b86e6cf..bec8042 100644 --- a/scsh/scsh-condition.scm +++ b/scsh/scsh-condition.scm @@ -1,4 +1,4 @@ -;;; Copyright (c) 1994 by Olin Shivers +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; Add scsh conditions to s48. ;;; A syscall-error condition-type: diff --git a/scsh/scsh-interfaces.scm b/scsh/scsh-interfaces.scm index 2bb1a7a..788453b 100644 --- a/scsh/scsh-interfaces.scm +++ b/scsh/scsh-interfaces.scm @@ -1,6 +1,7 @@ ;;; The module interfaces for scsh. ;;; Copyright (c) 1994 by Olin Shivers and David Albertz. ;;; Copyright (c) 1994 by Brian D. Carlstrom +;;; See file COPYING. (define-interface posix-fdflags-interface (export ((open/read diff --git a/scsh/scsh-package.scm b/scsh/scsh-package.scm index 63766fe..8538fc7 100644 --- a/scsh/scsh-package.scm +++ b/scsh/scsh-package.scm @@ -1,5 +1,5 @@ ;;; The packages that scsh uses/defines. -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; Note: field-reader package (fr.scm) and here docs use READ-LINE. ;;; It is defined in rdelim.scm. diff --git a/scsh/scsh-read.scm b/scsh/scsh-read.scm index a5f7f32..dc83b48 100644 --- a/scsh/scsh-read.scm +++ b/scsh/scsh-read.scm @@ -1,4 +1,4 @@ -;;; Copyright (c) 1993, 1994 by Olin Shivers. +;;; Copyright (c) 1993, 1994 by Olin Shivers. See file COPYING. ;;; #! comment read-macro ;;; no case-folding ;;; -flag is a symbol diff --git a/scsh/scsh.scm b/scsh/scsh.scm index c992fc0..c3173e4 100644 --- a/scsh/scsh.scm +++ b/scsh/scsh.scm @@ -1,6 +1,7 @@ ;;; A Scheme shell. ;;; Copyright (c) 1992 by Olin Shivers. ;;; Copyright (c) 1994 by Brian D. Carlstrom. +;;; See file COPYING. ;;; Call THUNK, then die. ;;; A clever definition in a clever implementation allows the caller's stack diff --git a/scsh/select.scm b/scsh/select.scm index 8f12b4e..d2b84dd 100644 --- a/scsh/select.scm +++ b/scsh/select.scm @@ -1,5 +1,5 @@ ;;; select(2) syscall for scsh. -*- Scheme -*- -;;; Copyright (c) 1995 by Olin Shivers. +;;; Copyright (c) 1995 by Olin Shivers. See file COPYING. (foreign-source "/* Make sure foreign-function stubs interface to the C funs correctly: */" diff --git a/scsh/sighandlers.scm b/scsh/sighandlers.scm index 3ee13ff..8ecd260 100644 --- a/scsh/sighandlers.scm +++ b/scsh/sighandlers.scm @@ -1,4 +1,4 @@ -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; Signal handler system ;;; The principal trickiness here is that we have to interface to Unix signals diff --git a/scsh/solaris/bufpol.scm b/scsh/solaris/bufpol.scm index 1829ecb..5172dd1 100644 --- a/scsh/solaris/bufpol.scm +++ b/scsh/solaris/bufpol.scm @@ -1,5 +1,5 @@ ;;; Flags that control buffering policy. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; These are for the SET-PORT-BUFFERING procedure, essentially a Scheme ;;; analog of the setbuf(3S) stdio call. We use the actual stdio values. diff --git a/scsh/solaris/errno.scm b/scsh/solaris/errno.scm index 43c1230..2b857b5 100644 --- a/scsh/solaris/errno.scm +++ b/scsh/solaris/errno.scm @@ -1,5 +1,5 @@ ;;; Errno constant definitions. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; Revised for Solaris 1994 by tvb@math.ufl.edu ;;; These are the correct values for my SparcStation. diff --git a/scsh/solaris/fdflags.scm b/scsh/solaris/fdflags.scm index a5bc4c3..363a2bd 100644 --- a/scsh/solaris/fdflags.scm +++ b/scsh/solaris/fdflags.scm @@ -1,5 +1,5 @@ ;;; Flags for open(2) and fcntl(2). -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; Modified for Solaris by tvb@math.ufl.edu (define-enum-constants open diff --git a/scsh/solaris/netconst.scm b/scsh/solaris/netconst.scm index 845e94e..d4c9876 100644 --- a/scsh/solaris/netconst.scm +++ b/scsh/solaris/netconst.scm @@ -1,5 +1,5 @@ ;;; Magic Numbers for Networking -;;; Copyright (c) 1994 by Brian D. Carlstrom. +;;; Copyright (c) 1994 by Brian D. Carlstrom. See file COPYING. ;;; magic numbers not from header file ;;; but from man page diff --git a/scsh/solaris/packages.scm b/scsh/solaris/packages.scm index 71ef64b..e8e3f67 100644 --- a/scsh/solaris/packages.scm +++ b/scsh/solaris/packages.scm @@ -1,5 +1,5 @@ ;;; Interfaces and packages for the Sun specific parts of scsh. -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. (define-interface solaris-fdflags-extras-interface (export open/no-delay diff --git a/scsh/solaris/signals.scm b/scsh/solaris/signals.scm index c50914d..9ce8bd9 100644 --- a/scsh/solaris/signals.scm +++ b/scsh/solaris/signals.scm @@ -1,5 +1,5 @@ ;;; Signal constant definitions for Sun4 -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; Modified for Solaris by tvb@math.ufl.edu ;; Adapted from signal.h - tvb diff --git a/scsh/solaris/time_dep.scm b/scsh/solaris/time_dep.scm index 7f8adf4..b9b2063 100644 --- a/scsh/solaris/time_dep.scm +++ b/scsh/solaris/time_dep.scm @@ -1,5 +1,5 @@ ;;; OS-dependent time stuff -;;; Copyright (c) 1995 by Olin Shivers. +;;; Copyright (c) 1995 by Olin Shivers. See file COPYING. ;;; This suffices for BSD systems with the gettimeofday() ;;; microsecond-resolution timer. diff --git a/scsh/solaris/tty-consts.scm b/scsh/solaris/tty-consts.scm index 8bf6dc1..025aa72 100644 --- a/scsh/solaris/tty-consts.scm +++ b/scsh/solaris/tty-consts.scm @@ -1,5 +1,5 @@ ;;; Constant definitions for tty control code (POSIX termios). -;;; Copyright (c) 1995 by Brian Carlstrom. +;;; Copyright (c) 1995 by Brian Carlstrom. See file COPYING. ;;; Largely rehacked by Olin. ;;; These constants are for Solaris 2.x, diff --git a/scsh/solaris/waitcodes.scm b/scsh/solaris/waitcodes.scm index 51f43e0..a3e4819 100644 --- a/scsh/solaris/waitcodes.scm +++ b/scsh/solaris/waitcodes.scm @@ -1,5 +1,5 @@ ;;; Scsh routines for analysing exit codes returned by WAIT. -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; ;;; To port these to a new OS, consult /usr/include/sys/wait.h, ;;; and check the WIFEXITED, WEXITSTATUS, WIFSTOPPED, WSTOPSIG, diff --git a/scsh/startup.scm b/scsh/startup.scm index ac8b2d7..97c9cbd 100644 --- a/scsh/startup.scm +++ b/scsh/startup.scm @@ -1,5 +1,5 @@ ;;; Scsh start-up code. -;;; Copyright (c) 1995 by Olin Shivers. +;;; Copyright (c) 1995 by Olin Shivers. See file COPYING. ;;; A scsh starter takes the command line args, parses them, ;;; initialises the scsh system, and either starts up a repl loop diff --git a/scsh/static-heap.scm b/scsh/static-heap.scm new file mode 100644 index 0000000..73a4c0f --- /dev/null +++ b/scsh/static-heap.scm @@ -0,0 +1,8 @@ +;;; Package for Static heaps for the Scheme Shell +;;; Copyright (c) 1995 by Brian D. Carlstrom. See file COPYING. + +;;; based on Scheme48 implementation. +;;; Copyright (c) 1993, 1994 by Richard Kelsey and Jonathan Rees. + +(define (newspace-begin) *newspace-begin*) +(define (heap-pointer) *hp*) diff --git a/scsh/static1.scm b/scsh/static1.scm new file mode 100644 index 0000000..eb2146e --- /dev/null +++ b/scsh/static1.scm @@ -0,0 +1,642 @@ +;;; Package for Static heaps for the Scheme Shell +;;; Copyright (c) 1995 by Brian D. Carlstrom. See file COPYING. + +;;; based on Scheme48 implementation. +;;; Copyright (c) 1993, 1994 by Richard Kelsey and Jonathan Rees. + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; prefix for temp files - in their own dir +(define *temp-dir* "/tmp") + +(define (test) + (scsh-do-it *scsh-image* *temp-dir* *image-lib* "gcc -c" "ar cq")) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(define-record heap + (length 0) + (objects '()) + ) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(define (scsh-do-it infile tempdir outfile cc-command ar-command) + (let* ((temp-dir (format #f "~a/scsh~s" tempdir (pid))) + (prefix (string-append temp-dir "/static")) + (start (read-heap-image infile))) + (receive (pure impure reloc externs) + (create-heaps-and-tables) + (if (file-exists? temp-dir) + (if (file-directory? temp-dir) + (with-cwd temp-dir + (map delete-file (directory-files temp-dir #t))) + (delete-file temp-dir))) + (create-directory temp-dir #o755 #t) + (with-cwd temp-dir + (write-c-header-file pure impure externs infile outfile prefix) + (write-c-image pure impure reloc externs prefix) + (write-main-c-file start reloc prefix) + (compile-c-files cc-command prefix)) + (archive-files ar-command outfile prefix) + ))) + + +(define debug #f) + +(define (vm-string->string x) + (cond ((vm-string? x) + (let ((len (vm-string-length x))) + (let loop ((i 0) + (l '())) + (cond ((= i len) + (list->string (reverse l))) + (else + (loop (+ i 1) (cons (vm-string-ref x i) l))))))) + (else + (message x " is not a vm-string")))) + +(define (read-heap-image infile) + (let ((bytes (file-info:size (file-info infile)))) + (init (inexact->exact (floor (* 1.1 bytes))) infile))) +; XXX need little extra space for find-all-xs + +(define (create-heaps-and-tables) + (let* ((n (nchunks)) + ( pure (make-vector n)) + (impure (make-vector n)) + (reloc (make-vector n)) + (externs (make-table ))) + ;; initialize to blanks + (let loop ((i 0)) + (cond ((not (= i n)) + (vector-set! pure i (make-heap )) + (vector-set! impure i (make-heap )) + (vector-set! reloc i (make-table)) + (loop (+ i 1))))) + (scsh-for-each-stored-object + (lambda (chunk) + (format #t "Reading chunk number ~s" chunk)) + (lambda (chunk x len) + (if debug + (write x)) + (let* ((mutable (mutable? x)) + (heap (vector-ref (if mutable impure pure) chunk))) + (table-set! (vector-ref reloc chunk) x (heap:length heap)) + (set-heap:objects heap (cons x (heap:objects heap))) + (set-heap:length heap (+ len (heap:length heap))) + (cond (debug + (display (if mutable " mutable " " immutable ")) + (cond ((d-vector? x) (display " d-vector")) + ((vm-string? x) (display "vm-string")) + (else (display " b-vector"))) + (let ((m (heap:length (vector-ref impure chunk))) + (i (heap:length (vector-ref pure chunk)))) + (message " m" m "+i" i "=" (+ m i)))))) + (if (= (header-type (stob-header x)) (enum stob external)) + (table-set! externs + (external-value x) + (vm-string->string (external-name x)))) + ) + (lambda (chunk) + (newline))) + (let loop ((i 0)) + (cond ((not (= i n)) + (let ((p (vector-ref pure i)) + (i (vector-ref impure i))) + (set-heap:objects p (reverse (heap:objects p))) + (set-heap:objects i (reverse (heap:objects i)))) + (loop (+ i 1))))) + (values pure impure reloc externs))) + +(define (write-c-header-file pure impure externs infile outfile prefix) + (message "Writing header file") + (call-with-output-file (string-append prefix ".h") + (lambda (port) + (format port "/* Static Heap File Automatically Generated~%") + (format port " * by scsh/static.scm~%") + (format port " * from ~a~%" infile) + (format port " * to ~a~%" outfile) + (format port " */~%") + (let ((n (nchunks))) + (do ((i 0 (+ i 1))) + ((= i n)) + (format port "extern const long p~s[~s];~%" i + (quotient (heap:length (vector-ref pure i)) 4))) + (do ((i 0 (+ i 1))) + ((= i n)) + (format port "extern long i~s[~s];~%" i + (quotient (heap:length (vector-ref impure i)) 4)))) + (table-walk + (lambda (address name) + (format port "const extern ~a();~%" name)) + externs) + ))) + +(define (d-vector-for-each proc d-vector) + (do ((i 0 (+ i 1))) + ((>= i (d-vector-length d-vector))) + (proc (d-vector-ref d-vector i)))) + +(define (write-c-image pure impure reloc externs prefix) + (message "Writing pure c files") + (scsh-write-c-image pure "p" "const " reloc externs prefix) + (message "Writing impure c files") + (scsh-write-c-image impure "i" "" reloc externs prefix)) + +(define (scsh-write-c-image heap name const reloc externs prefix) + (let ((n (nchunks))) + (let chunk-loop ((c 0)) + (cond ((not (= c n)) + (format #t "Writing ~a-~a~s.c~%" prefix name c) + (call-with-output-file + (format #f "~a-~a~s.c" prefix name c) + (lambda (port) + (format port "#include \"~a.h\"~%" prefix) + (format port "~a long ~a~s[]={~%" const name c) + (let ((heap (vector-ref heap c))) + (let heap-loop ((l (heap:objects heap))) + (cond ((not (null? l)) + (scsh-emit-initializer (car l) reloc externs port) + (heap-loop (cdr l)))))) + (display "};" port) + (newline port))) + (chunk-loop (+ 1 c))))))) + +(define (write-main-c-file start reloc prefix) + (let ((n (nchunks))) + (call-with-output-file (string-append prefix ".c") + (lambda (port) + (format port "#include \"~a.h\"~%" prefix) + (format port "const long p_count = ~s;~%" n) + (format port "const long i_count = ~s;~%" n) + + (format port "const long * const p_areas[~s] = {" n) + (do ((i 0 (+ i 1))) + ((= i n)) + (format port "(const long *) &p~s, " i)) + (format port "};~%") + + (format port "long * const i_areas[~s] = {" n) + (do ((i 0 (+ i 1))) + ((= i n)) + (format port "(long *) &i~s, " i)) + (format port "};~%") + + (format port "const long p_sizes[~s] = {" n) + (do ((i 0 (+ i 1))) + ((= i n)) + (format port "sizeof(p~s), " i)) + (format port "};~%") + + (format port "const long i_sizes[~s] = {" n) + (do ((i 0 (+ i 1))) + ((= i n)) + (format port "sizeof(i~s), " i)) + (format port "};~%") + + (display "const long entry = " port) + (scsh-emit-descriptor start reloc port) + (write-char #\; port) + (newline port))))) + +(define (compile-c-files cc-command prefix) + (let ((n (nchunks)) + (cc (line->list cc-command))) + (message "Compiling main C file") + (run (,@(append cc (list (format #f "~a.c" prefix))))) + (do ((i 0 (+ i 1))) + ((= i n)) + (message "Compiling C file for pure chunk " i) + (run (,@(append cc + (list (format #f "~a-p~s.c" prefix i))))) + (message "Compiling C file for impure chunk " i) + (run (,@(append cc + (list (format #f "~a-i~s.c" prefix i)))))))) + +(define (archive-files ar-command outfile prefix) + (let ((n (nchunks)) + (ar (line->list ar-command))) + (message "Archiving object files") + (run (,@(append + ar + (cons + outfile + (let loop ((i 0) + (l '())) + (cond ((not (= i n)) + (loop (+ i 1) + (cons + (format #f "~a-i~s.o" prefix i) + (cons + (format #f "~a-p~s.o" prefix i) + l)))) + (else + (reverse + (cons + (string-append prefix ".o") + l))))))))))) + +(define (scsh-emit-initializer x reloc externs port) + (write-hex port (stob-header x)) + (cond ((d-vector? x) + (scsh-emit-d-vector-initializer x reloc port)) + ((vm-string? x) + (scsh-emit-vm-string-initializer x port)) + (else + (scsh-emit-b-vector-initializer x reloc externs port))) + (if *comments?* + (begin (display " /* " port) + (writex x port) + (display " */" port))) + (newline port)) + + +(define (scsh-emit-d-vector-initializer x reloc port) + (let ((len (d-vector-length x))) + (do ((i 0 (+ i 1))) + ((= i len)) + (scsh-emit-descriptor (d-vector-ref x i) reloc port) + (write-char #\, port)))) + +(define (scsh-emit-vm-string-initializer x port) + (let* ((len (vm-string-length x)) ; end is jawilson style hack + (end (- (cells->bytes (bytes->cells (+ len 1))) 4))) + (do ((i 0 (+ i 4))) + ((= i end) + (case (- len end) + ((0) + (write-hex port 0)) + ((1) + (write-hex + port + (net-to-host-32 (arithmetic-shift + (char->ascii (vm-string-ref x i)) 24)))) + ((2) + (write-hex + port + (net-to-host-32 + (bitwise-ior + (arithmetic-shift + (char->ascii (vm-string-ref x i)) 24) + (arithmetic-shift + (char->ascii (vm-string-ref x (+ i 1))) 16))))) + ((3) + (write-hex + port + (net-to-host-32 + (bitwise-ior + (bitwise-ior + (arithmetic-shift + (char->ascii (vm-string-ref x i)) 24) + (arithmetic-shift + (char->ascii (vm-string-ref x (+ i 1))) 16)) + (arithmetic-shift + (char->ascii (vm-string-ref x (+ i 2))) 8))))))) + (write-hex port + (net-to-host-32 (bitwise-ior + (bitwise-ior + (arithmetic-shift + (char->ascii (vm-string-ref x i)) 24) + (arithmetic-shift + (char->ascii (vm-string-ref x (+ i 1))) 16)) + (bitwise-ior + (arithmetic-shift + (char->ascii (vm-string-ref x (+ i 2))) 8) + (char->ascii (vm-string-ref x (+ i 3)))))) + )))) + +(define (scsh-emit-b-vector-initializer x reloc externs port) + (cond ((and (code-vector? x) + (table-ref externs x)) => + (lambda (name) + (format port "(long) *~a," name))) + (else + (let* ((len (b-vector-length x)) ;end is jawilson style hack + (end (- (cells->bytes (bytes->cells (+ len 1))) 4))) + (do ((i 0 (+ i 4))) + ((= i end) + (case (- len end) + ((1) + (write-hex + port + (net-to-host-32 (arithmetic-shift (b-vector-ref x i) 24)))) + ((2) + (write-hex + port + (net-to-host-32 + (bitwise-ior + (arithmetic-shift (b-vector-ref x i) 24) + (arithmetic-shift (b-vector-ref x (+ i 1)) 16))))) + ((3) + (write-hex + port + (net-to-host-32 + (bitwise-ior + (bitwise-ior + (arithmetic-shift (b-vector-ref x i) 24) + (arithmetic-shift (b-vector-ref x (+ i 1)) 16)) + (arithmetic-shift (b-vector-ref x (+ i 2)) 8))) + )))) + (write-hex + port + (net-to-host-32 (bitwise-ior + (bitwise-ior + (arithmetic-shift (b-vector-ref x i) 24) + (arithmetic-shift (b-vector-ref x (+ i 1)) 16)) + (bitwise-ior + (arithmetic-shift (b-vector-ref x (+ i 2)) 8) + (b-vector-ref x (+ i 3)))))))) + ))) + +(define (scsh-emit-descriptor x reloc port) + (if (stob? x) + (let ((n (chunk-number x))) + (display "(long)(&" port) + (if (immutable? x) + (display "p" port) + (display "i" port)) + (display n port) + (display "[" port) + (display (quotient (table-ref (vector-ref reloc n) x) 4) port) + (display "])+7" port)) + (format port + (if (negative? x) "-0x~a" "0x~a") + (number->string (abs x) 16)))) + +(define (scsh-for-each-stored-object chunk-start proc chunk-end) + (let ((limit (heap-pointer))) + (let chunk-loop ((addr (newspace-begin)) + (i 0) + (chunk (+ (newspace-begin) *chunk-size*))) + (if (addr< addr limit) + (begin (chunk-start i) + (let loop ((addr addr)) + (if (and (addr< addr limit) + (addr< addr chunk)) + (let* ((d (fetch addr)) + (len (addr1+ (header-a-units d)))) + (if (not (header? d)) + (warn "heap is in an inconsistent state" d)) + (proc i (address->stob-descriptor (addr1+ addr)) len) + (loop (addr+ addr len))) + (begin (chunk-end i) + (chunk-loop addr + (+ i 1) + (+ chunk *chunk-size*)))))))))) + +(define (write-hex port x) + (format port + (if (negative? x) "-0x~a," "0x~a,") + (number->string (abs x) 16))) + +;; takes a string and break it into a list at whitespace +;; rewrite using scsh stuff? +(define (line->list line) + (let ((len (string-length line))) + (let loop ((start 0) + (end 0) + (l '())) + (cond ((>= end len) + (if (= start end) + l + (append l (list (substring line start end))))) + ((and (= start end) + (or (char=? (string-ref line start) (ascii->char 32)) + (char=? (string-ref line start) (ascii->char 9)))) + (loop (+ 1 start) + (+ 1 end) + l)) + ((or (char=? (string-ref line end) (ascii->char 32)) + (char=? (string-ref line end) (ascii->char 9))) + (loop (+ 1 end) + (+ 1 end) + (append l (list (substring line start end))))) + ((< end len) + (loop start + (+ 1 end) + l)) + (else (error "unexpected case in line->list")))))) + +;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +;;; Debugging +;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +(define (bin n) + (number->string n 2)) + +(define (oct n) + (number->string n 8)) + +(define (dec n) + (number->string n 10)) + +(define (hex n) + (number->string n 16)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; For example: +; (do-it 100000 "~/s48/debug/little.image" "little-heap.c") +; +; The first argument to do-it should be somewhat larger than the size, +; in bytes, of the image file to be converted (which you can obtain with +; "ls -l"). +; +; If the image contains 0-length stored objects, then the .c file will +; have to be compiled by gcc, since 0-length arrays aren't allowed in +; ANSI C. This wouldn't be difficult to work around. + +(define *comments?* #f) + +; 800,000 bytes => 200,000 words => at least 100,000 objects +; 50 chunks => 16,000 bytes per chunk => 2,000 objects per chunk +(define *chunk-size* 10000) + +(define (do-it bytes infile outfile) + (let ((start (init bytes infile))) + (call-with-output-file outfile + (lambda (port) + (format port "#define D(x) (long)(&x)+7~%") + (format port "#define H unsigned long~%") + (emit-area-declarations "p" immutable? "const " port) + (emit-area-declarations "i" mutable? "" port) + (emit-area-initializers "p" immutable? "const " port) + (emit-area-initializers "i" mutable? "" port) + (display "const long entry = " port) + (emit-descriptor start port) + (write-char #\; port) + (newline port))))) + +(define (init bytes infile) + (create-memory (quotient bytes 2) quiescent) ;Output of ls -l + (initialize-heap (memory-begin) (memory-size)) + (let ((start (read-image infile 0))) + (message (nchunks) + " chunks") + start)) + +(define (nchunks) (+ (chunk-number (heap-pointer)) 1)) + +; emit struct declarations for areas + +(define (emit-area-declarations name in-area? const port) + (for-each-stored-object + (lambda (chunk) + (message name chunk " declaration") + (display "struct " port) (display name port) (display chunk port) + (display " {" port) (newline port)) + (lambda (x) + (if (in-area? x) + (emit-declaration x port))) + (lambda (chunk) + (display "};" port) + (newline port) + (display const port) + (display "extern struct " port) (display name port) (display chunk port) + (write-char #\space port) (display name port) (display chunk port) + (write-char #\; port) (newline port) + chunk))) + +(define (emit-declaration x port) + (display " H x" port) + (writex x port) + (cond ((d-vector? x) + (display "; long d" port) + (writex x port) + (write-char #\[ port) + (write (d-vector-length x) port)) + ((vm-string? x) + (display "; char d" port) + (writex x port) + (write-char #\[ port) + ;; Ensure alignment (thanks Ian) + (write (cells->bytes (bytes->cells (b-vector-length x))) + port)) + (else + (display "; unsigned char d" port) + (writex x port) + (write-char #\[ port) + ;; Ensure alignment + (write (cells->bytes (bytes->cells (b-vector-length x))) + port))) + (display "];" port) + (if *comments?* + (begin (display " /* " port) + (display (enumerand->name (stob-type x) stob) port) + (display " */" port))) + (newline port)) + +; Emit initializers for areas + +(define (emit-area-initializers name in-area? const port) + (for-each-stored-object + (lambda (chunk) + (message name chunk " initializer") + + (display const port) + (display "struct " port) (display name port) (write chunk port) + (write-char #\space port) (display name port) (write chunk port) + (display " =" port) (newline port) + + (write-char #\{ port) (newline port)) + (lambda (x) + (if (in-area? x) + (emit-initializer x port))) + (lambda (chunk) + (display "};" port) (newline port))) + + (let ((n (nchunks))) + (format port "const long ~a_count = ~s;~%" name n) + (format port "~a long * const ~a_areas[~s] = {" const name n) + (do ((i 0 (+ i 1))) + ((= i n)) + (format port "(~a long *)&~a~s, " const name i)) + (format port "};~%const long ~a_sizes[~s] = {" name n) + (do ((i 0 (+ i 1))) + ((= i n)) + (format port "sizeof(~a~s), " name i)) + (format port "};~%"))) + + +(define (message . stuff) + (for-each display stuff) (newline)) + +(define (emit-initializer x port) + (display " " port) + (write (stob-header x) port) + (write-char #\, port) + (cond ((d-vector? x) + (emit-d-vector-initializer x port)) + ((vm-string? x) + (write-char #\" port) + (let ((len (vm-string-length x))) + (do ((i 0 (+ i 1))) + ((= i len) (write-char #\" port)) + (let ((c (vm-string-ref x i))) + (cond ((or (char=? c #\") (char=? c #\\)) + (write-char #\\ port)) + ((char=? c #\newline) + (display "\\n\\" port))) + (write-char c port))))) + (else + (write-char #\{ port) + (let ((len (b-vector-length x))) + (do ((i 0 (+ i 1))) + ((= i len) (write-char #\} port)) + (write (b-vector-ref x i) port) + (write-char #\, port))))) + (write-char #\, port) + (if *comments?* + (begin (display " /* " port) + (writex x port) + (display " */" port))) + (newline port)) + +(define (emit-d-vector-initializer x port) + (write-char #\{ port) + (let ((len (d-vector-length x))) + (do ((i 0 (+ i 1))) + ((= i len) (write-char #\} port)) + (emit-descriptor (d-vector-ref x i) port) + (write-char #\, port)))) + +(define (emit-descriptor x port) + (if (stob? x) + (begin (if (immutable? x) + (display "D(p" port) + (display "D(i" port)) + (display (chunk-number x) port) + (display ".x" port) + (writex x port) + (write-char #\) port)) + (write x port))) + + +; Foo + +(define (writex x port) + (write (quotient (- (- x (memory-begin)) 7) 4) port)) + +(define (chunk-number x) + (quotient (- (- x (memory-begin)) 7) *chunk-size*)) + + +; Image traversal utility + +(define (for-each-stored-object chunk-start proc chunk-end) + (let ((limit (heap-pointer))) + (let chunk-loop ((addr (newspace-begin)) + (i 0) + (chunk (+ (newspace-begin) *chunk-size*))) + (if (addr< addr limit) + (begin (chunk-start i) + (let loop ((addr addr)) + (if (and (addr< addr limit) + (addr< addr chunk)) + (let ((d (fetch addr))) + (if (not (header? d)) + (warn "heap is in an inconsistent state" d)) + (proc (address->stob-descriptor (addr1+ addr))) + (loop (addr1+ (addr+ addr (header-a-units d))))) + (begin (chunk-end i) + (chunk-loop addr + (+ i 1) + (+ chunk *chunk-size*)))))))))) + +(define (mutable? x) (not (immutable? x))) diff --git a/scsh/stringcoll.scm b/scsh/stringcoll.scm index e2e2d92..a8912b2 100644 --- a/scsh/stringcoll.scm +++ b/scsh/stringcoll.scm @@ -1,4 +1,4 @@ -;;; Copyright (c) 1994 by Olin Shivers +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; String collectors ;;; =========================================================================== diff --git a/scsh/sunos/bufpol.scm b/scsh/sunos/bufpol.scm index 09e5ad9..f37ae08 100644 --- a/scsh/sunos/bufpol.scm +++ b/scsh/sunos/bufpol.scm @@ -1,5 +1,5 @@ ;;; Flags that control buffering policy. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; These are for the SET-PORT-BUFFERING procedure, essentially a Scheme ;;; analog of the setbuf(3S) stdio call. We use the actual stdio values. diff --git a/scsh/sunos/errno.scm b/scsh/sunos/errno.scm index 5b72ee4..753960a 100644 --- a/scsh/sunos/errno.scm +++ b/scsh/sunos/errno.scm @@ -1,5 +1,5 @@ ;;; Errno constant definitions. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; These are the correct values for my SparcStation. diff --git a/scsh/sunos/fdflags.scm b/scsh/sunos/fdflags.scm index 9d58572..3322221 100644 --- a/scsh/sunos/fdflags.scm +++ b/scsh/sunos/fdflags.scm @@ -1,5 +1,5 @@ ;;; Flags for open(2) and fcntl(2). -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. (define-enum-constants open (read 0) diff --git a/scsh/sunos/netconst.scm b/scsh/sunos/netconst.scm index 548bb49..2d130fe 100644 --- a/scsh/sunos/netconst.scm +++ b/scsh/sunos/netconst.scm @@ -1,5 +1,5 @@ ;;; Magic Numbers for Networking -;;; Copyright (c) 1994 by Brian D. Carlstrom. +;;; Copyright (c) 1994 by Brian D. Carlstrom. See file COPYING. ;;; magic numbers not from header file ;;; but from man page diff --git a/scsh/sunos/packages.scm b/scsh/sunos/packages.scm index 0151fc6..33dbf09 100644 --- a/scsh/sunos/packages.scm +++ b/scsh/sunos/packages.scm @@ -1,5 +1,5 @@ ;;; Interfaces and packages for the Sun specific parts of scsh. -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. (define-interface sunos-fdflags-extras-interface (export open/no-delay diff --git a/scsh/sunos/signals.scm b/scsh/sunos/signals.scm index d1b961d..66d831b 100644 --- a/scsh/sunos/signals.scm +++ b/scsh/sunos/signals.scm @@ -1,5 +1,6 @@ ;;; Signal constant definitions for Sun4 ;;; Copyright (c) 1994, 1996 by Olin Shivers and Brian D. Carlstrom +;;; See file COPYING. (define-enum-constants signal ;; POSIX diff --git a/scsh/sunos/time_dep.scm b/scsh/sunos/time_dep.scm index 7f8adf4..b9b2063 100644 --- a/scsh/sunos/time_dep.scm +++ b/scsh/sunos/time_dep.scm @@ -1,5 +1,5 @@ ;;; OS-dependent time stuff -;;; Copyright (c) 1995 by Olin Shivers. +;;; Copyright (c) 1995 by Olin Shivers. See file COPYING. ;;; This suffices for BSD systems with the gettimeofday() ;;; microsecond-resolution timer. diff --git a/scsh/sunos/tty-consts.scm b/scsh/sunos/tty-consts.scm index 16ada56..1e2bc7a 100644 --- a/scsh/sunos/tty-consts.scm +++ b/scsh/sunos/tty-consts.scm @@ -1,5 +1,5 @@ ;;; Constant definitions for tty control code (POSIX termios). -;;; Copyright (c) 1995 by Brian Carlstrom. +;;; Copyright (c) 1995 by Brian Carlstrom. See file COPYING. ;;; Largely rehacked by Olin. ;;; These constants are for SunOS 4.x.x, diff --git a/scsh/sunos/waitcodes.scm b/scsh/sunos/waitcodes.scm index 2dedbdc..65ffe3d 100644 --- a/scsh/sunos/waitcodes.scm +++ b/scsh/sunos/waitcodes.scm @@ -1,5 +1,5 @@ ;;; Scsh routines for analysing exit codes returned by WAIT. -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; ;;; To port these to a new OS, consult /usr/include/sys/wait.h, ;;; and check the WIFEXITED, WEXITSTATUS, WIFSTOPPED, WSTOPSIG, diff --git a/scsh/syntax-helpers.scm b/scsh/syntax-helpers.scm index 71efd6a..218664f 100644 --- a/scsh/syntax-helpers.scm +++ b/scsh/syntax-helpers.scm @@ -3,7 +3,7 @@ ;;; Needs name-export and receive-syntax S48 packages. ;;; Also needs scsh's utilities package (for CHECK-ARG). ;;; Must be loaded into for-syntax package. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. (define-syntax define-simple-syntax (syntax-rules () diff --git a/scsh/syntax.scm b/scsh/syntax.scm index 8d2e0c5..d3c528e 100644 --- a/scsh/syntax.scm +++ b/scsh/syntax.scm @@ -1,6 +1,6 @@ ;;; Syntax definitions for scsh. ;;; Translating process forms into Scheme code. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. (define-syntax define-simple-syntax (syntax-rules () diff --git a/scsh/syscalls.scm b/scsh/syscalls.scm index b19825c..b13acd5 100644 --- a/scsh/syscalls.scm +++ b/scsh/syscalls.scm @@ -1,5 +1,5 @@ ;;; POSIX system-call Scheme binding. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; Scheme48 implementation. diff --git a/scsh/time.scm b/scsh/time.scm index 2b3bab2..1b5aabd 100644 --- a/scsh/time.scm +++ b/scsh/time.scm @@ -1,5 +1,5 @@ ;;; Time interface for scsh. -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; Should I have a (FILL-IN-DATE! date) procedure that fills in ;;; the redundant info in a date record? diff --git a/scsh/top.scm b/scsh/top.scm index b2d93df..45ada39 100644 --- a/scsh/top.scm +++ b/scsh/top.scm @@ -1,5 +1,5 @@ ;;; The scsh argv switch parser. -;;; Copyright (c) 1995 by Olin Shivers. +;;; Copyright (c) 1995 by Olin Shivers. See file COPYING. ;;; Imports: ;;; COMMAND-PROCESSOR: set-batch-mode?! command-loop diff --git a/scsh/tty.scm b/scsh/tty.scm index 5a79afa..691a5c8 100644 --- a/scsh/tty.scm +++ b/scsh/tty.scm @@ -10,7 +10,7 @@ ;;; -Olin ;;; Terminal Control for the Scheme Shell -;;; Copyright (c) 1995 by Brian D. Carlstrom. +;;; Copyright (c) 1995 by Brian D. Carlstrom. See file COPYING. ;;; Rehacked by Olin 8/95. (foreign-source diff --git a/scsh/ultrix/bufpol.scm b/scsh/ultrix/bufpol.scm index 09e5ad9..f37ae08 100644 --- a/scsh/ultrix/bufpol.scm +++ b/scsh/ultrix/bufpol.scm @@ -1,5 +1,5 @@ ;;; Flags that control buffering policy. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; These are for the SET-PORT-BUFFERING procedure, essentially a Scheme ;;; analog of the setbuf(3S) stdio call. We use the actual stdio values. diff --git a/scsh/ultrix/errno.scm b/scsh/ultrix/errno.scm index a0922f8..09f2e8d 100644 --- a/scsh/ultrix/errno.scm +++ b/scsh/ultrix/errno.scm @@ -1,5 +1,5 @@ ;;; Errno constant definitions. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; Copyright (c) 1994 by Brian D. Carlstrom. ;;; These are the correct values for Ultrix. diff --git a/scsh/ultrix/fdflags.scm b/scsh/ultrix/fdflags.scm index f1d64e9..0850841 100644 --- a/scsh/ultrix/fdflags.scm +++ b/scsh/ultrix/fdflags.scm @@ -1,5 +1,5 @@ ;;; Flags for open(2) and fcntl(2). -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. ;;; Copyright (c) 1994 by Brian D. Carlstrom. (define-enum-constants open diff --git a/scsh/ultrix/netconst.scm b/scsh/ultrix/netconst.scm index e2e5774..9493727 100644 --- a/scsh/ultrix/netconst.scm +++ b/scsh/ultrix/netconst.scm @@ -1,5 +1,5 @@ ;;; Magic Numbers for Networking -;;; Copyright (c) 1994 by Brian D. Carlstrom. +;;; Copyright (c) 1994 by Brian D. Carlstrom. See file COPYING. ;;; magic numbers not from header file ;;; but from man page diff --git a/scsh/ultrix/packages.scm b/scsh/ultrix/packages.scm index dea6199..28b1616 100644 --- a/scsh/ultrix/packages.scm +++ b/scsh/ultrix/packages.scm @@ -1,5 +1,5 @@ ;;; Interfaces and packages for the machine specific parts of scsh for Ultrix. -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; Copyright (c) 1994 by Brian D. Carlstrom. (define-interface ultrix-fdflags-extras-interface diff --git a/scsh/ultrix/signals.scm b/scsh/ultrix/signals.scm index 416dbb0..afcd9cb 100644 --- a/scsh/ultrix/signals.scm +++ b/scsh/ultrix/signals.scm @@ -1,5 +1,5 @@ ;;; Signal constant definitions for Ultrix -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; Copyright (c) 1994 by Brian D. Carlstrom. ;;POSIX only defined here. diff --git a/scsh/ultrix/time_dep.scm b/scsh/ultrix/time_dep.scm index 7f8adf4..b9b2063 100644 --- a/scsh/ultrix/time_dep.scm +++ b/scsh/ultrix/time_dep.scm @@ -1,5 +1,5 @@ ;;; OS-dependent time stuff -;;; Copyright (c) 1995 by Olin Shivers. +;;; Copyright (c) 1995 by Olin Shivers. See file COPYING. ;;; This suffices for BSD systems with the gettimeofday() ;;; microsecond-resolution timer. diff --git a/scsh/ultrix/tty-consts.scm b/scsh/ultrix/tty-consts.scm index 09f81b5..6b6e939 100644 --- a/scsh/ultrix/tty-consts.scm +++ b/scsh/ultrix/tty-consts.scm @@ -1,5 +1,5 @@ ;;; Constant definitions for tty control code (POSIX termios). -;;; Copyright (c) 1995 by Brian Carlstrom. +;;; Copyright (c) 1995 by Brian Carlstrom. See file COPYING. ;;; Largely rehacked by Olin. ;;; These constants are for Ultrix 4.2 diff --git a/scsh/ultrix/waitcodes.scm b/scsh/ultrix/waitcodes.scm index 5c5c612..c4d59f4 100644 --- a/scsh/ultrix/waitcodes.scm +++ b/scsh/ultrix/waitcodes.scm @@ -1,5 +1,5 @@ ;;; Scsh routines for analysing exit codes returned by WAIT. -;;; Copyright (c) 1994 by Olin Shivers. +;;; Copyright (c) 1994 by Olin Shivers. See file COPYING. ;;; ;;; To port these to a new OS, consult /usr/include/sys/wait.h, ;;; and check the WIFEXITED, WEXITSTATUS, WIFSTOPPED, WSTOPSIG, diff --git a/scsh/utilities.scm b/scsh/utilities.scm index b8fb965..e8c5628 100644 --- a/scsh/utilities.scm +++ b/scsh/utilities.scm @@ -1,5 +1,5 @@ ;;; Random useful utilities. -;;; Copyright (c) 1993 by Olin Shivers. +;;; Copyright (c) 1993 by Olin Shivers. See file COPYING. (define (del elt lis) (letrec ((del (lambda (lis)