[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile/guile-scsh ChangeLog INCOMPAT README USAG...
From: |
Gary Houston |
Subject: |
guile/guile-scsh ChangeLog INCOMPAT README USAG... |
Date: |
Mon, 27 Nov 2000 13:27:05 -0800 |
CVSROOT: /cvs
Module name: guile
Changes by: Gary Houston <address@hidden> 00/11/27 13:27:05
Modified files:
guile-scsh : ChangeLog INCOMPAT README USAGE fluid.scm
fname.scm init.scm make-module-list
population.scm procobj.scm scsh-condition.scm
scsh-version.scm sighandlers.scm stringcoll.scm
syscalls.scm weak.scm
guile-scsh/lib : list-lib.scm
Removed files:
guile-scsh : condition.scm enumconst.scm
guile-scsh/lib : ccp.scm
Log message:
* USAGE, README: updated.
* lib/list-lib.scm (for-each): define
* lib/list-lib.scm: define module (scsh lib list-lib).
comment out procedures which are already compatibly defined in
Guile (cons*, make-list, list-copy, last-pair, append!,
reverse!)
(for-each): define, since it's supposed to be here but was missing.
* lib/ccp.scm: file removed. doesn't seem to be required by
anything else or documented.
* scsh-condition.scm: define module (scsh scsh-condition).
* condition.scm: file removed.
* stringcoll.scm: define module (scsh stringcoll).
* enumconst.scm: file deleted: defines a couple of macros which
are not used or exported.
* fluid.scm: define module (scsh fluid).
* sighandlers.scm: define module (scsh sighandlers).
(maybe-define-signal): export each symbol that's
defined.
* weak.scm: define module (scsh weak).
* population.scm: define module (scsh population).
* procobj.scm: define module (scsh procobj).
* syscalls.scm: define module (scsh syscalls).
(close-fdes, seek): removed: now guile primitives.
* fname.scm: define module (scsh fname).
* scsh-version.scm: define module (scsh scsh-version).
* init.scm: load new modules.
CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/ChangeLog.diff?r1=1.42&r2=1.43
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/INCOMPAT.diff?r1=1.18&r2=1.19
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/README.diff?r1=1.9&r2=1.10
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/USAGE.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/fluid.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/fname.scm.diff?r1=1.2&r2=1.3
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/init.scm.diff?r1=1.33&r2=1.34
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/make-module-list.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/population.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/procobj.scm.diff?r1=1.2&r2=1.3
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/scsh-condition.scm.diff?r1=1.3&r2=1.4
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/scsh-version.scm.diff?r1=1.2&r2=1.3
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/sighandlers.scm.diff?r1=1.2&r2=1.3
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/stringcoll.scm.diff?r1=1.2&r2=1.3
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/syscalls.scm.diff?r1=1.11&r2=1.12
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/weak.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/condition.scm.diff?r1=1.1&r2=NONE
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/enumconst.scm.diff?r1=1.2&r2=NONE
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/lib/list-lib.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/lib/ccp.scm.diff?r1=1.1&r2=NONE
Patches:
Index: guile/guile-scsh/ChangeLog
diff -u guile/guile-scsh/ChangeLog:1.42 guile/guile-scsh/ChangeLog:1.43
--- guile/guile-scsh/ChangeLog:1.42 Sun Oct 29 11:53:23 2000
+++ guile/guile-scsh/ChangeLog Mon Nov 27 13:27:04 2000
@@ -1,3 +1,40 @@
+2000-11-27 Gary Houston <address@hidden>
+
+ * USAGE, README: updated.
+
+ * lib/list-lib.scm (for-each): define
+
+ * lib/list-lib.scm: define module (scsh lib list-lib).
+ comment out procedures which are already compatibly defined in
+ Guile (cons*, make-list, list-copy, last-pair, append!,
+ reverse!)
+ (for-each): define, since it's supposed to be here but was missing.
+
+ * lib/ccp.scm: file removed. doesn't seem to be required by
+ anything else or documented.
+
+ * scsh-condition.scm: define module (scsh scsh-condition).
+
+ * condition.scm: file removed.
+
+ * stringcoll.scm: define module (scsh stringcoll).
+
+ * enumconst.scm: file deleted: defines a couple of macros which
+ are not used or exported.
+
+ * fluid.scm: define module (scsh fluid).
+ * sighandlers.scm: define module (scsh sighandlers).
+ (maybe-define-signal): export each symbol that's
+ defined.
+ * weak.scm: define module (scsh weak).
+ * population.scm: define module (scsh population).
+ * procobj.scm: define module (scsh procobj).
+ * syscalls.scm: define module (scsh syscalls).
+ (close-fdes, seek): removed: now guile primitives.
+ * fname.scm: define module (scsh fname).
+ * scsh-version.scm: define module (scsh scsh-version).
+ * init.scm: load new modules.
+
2000-10-29 Gary Houston <address@hidden>
* rx/rx-lib.scm: define module (scsh rx rx-lib).
Index: guile/guile-scsh/INCOMPAT
diff -u guile/guile-scsh/INCOMPAT:1.18 guile/guile-scsh/INCOMPAT:1.19
--- guile/guile-scsh/INCOMPAT:1.18 Sun Oct 15 13:14:50 2000
+++ guile/guile-scsh/INCOMPAT Mon Nov 27 13:27:04 2000
@@ -19,6 +19,11 @@
the interfaces to the I/O system may be incompatible.
+interrupt-set, set-enabled-interrupts, with-interrupts,
+with-enabled-interrupts*, %set-unix-signal-handler and
+%unix-signal-handler have not been implemented. Within a
+with-enabled-interrupts form, all interrupts are disabled.
+
[check that the following are still true in 0.5.2]
generic-receive-message! always returns 2 values: the number of
@@ -32,10 +37,6 @@
character is a delimiter or EOF, since this a) seems to require extra
code or comparisons, b) makes read-delimted! and read-line! more complex
c) doesn't gain much anyway.
-
-set-enabled-interrupts and with-interrupts have not been
-implemented. Within a with-enabled-interrupts form, all interrupts are
-disabled.
set-command-line-args! is not implemented.
command-line returns the same list every time, not a copy.
Index: guile/guile-scsh/README
diff -u guile/guile-scsh/README:1.9 guile/guile-scsh/README:1.10
--- guile/guile-scsh/README:1.9 Sun Oct 29 11:53:23 2000
+++ guile/guile-scsh/README Mon Nov 27 13:27:04 2000
@@ -1,14 +1,14 @@
-This is an incomplete port of the scheme shell, scsh 0.5.2 to Guile.
+This is an incomplete port of the scheme shell, scsh 0.5.2, to Guile.
+This is not a release of guile-scsh, but was presumably obtained at
+some random time from the CVS archive.
For the original scsh package and documentation, see:
http://www.swiss.ai.mit.edu/ftpdir/scsh/
-Prerequisites for guile-scsh:
+This version of guile-scsh requires:
-1) guile-core, version 1.4. The CVS version of guile-scsh should also
-work with the CVS version of guile-core: please report it as a bug if
-it doesn't.
+1) guile-core dated 27 November 2000 or later. Version 1.4 is too old.
2) The guilerxspencer module, available from http://arglist.com/guile/
Index: guile/guile-scsh/USAGE
diff -u guile/guile-scsh/USAGE:1.1 guile/guile-scsh/USAGE:1.2
--- guile/guile-scsh/USAGE:1.1 Sun Oct 29 11:53:23 2000
+++ guile/guile-scsh/USAGE Mon Nov 27 13:27:04 2000
@@ -1,24 +1,3 @@
-The entire guile-scsh package can be loaded into a running Guile
-interpreter with:
-
-(load-from-path "scsh/init")
-
-Warning: this will take a while and will clobber various Guile
-definitions.
-
-It's probably more useful to import parts of scsh individually using
-the Guile module system, but this is not yet possible for all parts of
-the library.
-
-The remainder of this file lists the modules and the exported symbols
-for each. The modules don't necessarily correspond with scsh
-structures, since the Guile module system requires a correspondence
-between module names and files. It was considered desirable to leave
-the scsh file layouts relatively intact, to simplify ungrading to
-newer versions of scsh.
-
-This list was generated with help from the make-module-list script.
-
(scsh alt-syntax)
;; not compatible with (ice-9 syncase)
(define-syntax syntax-rules)
@@ -49,7 +28,8 @@
(arithmetic-shift bitwise-not bitwise-and bitwise-ior bitwise-xor)
(scsh utilities)
-;; "delete" is incompatile with guile primitive.
+;; "delete" is incompatile with guile primitive. it's also incompatible with
+;; delete from (scsh lib list-lib).
(del delete filter first first? nth fold fold-right any every mapv mapv!
vector-every? copy-vector initialize-vector vector-append vfold vfold-right
check-arg conjoin disjoin negate compose call/cc deprecated-proc
deposit-bit-field real->exact-integer)
(scsh define-foreign-syntax)
@@ -135,6 +115,42 @@
(read-line read-paragraph read-delimited read-delimited! skip-char-set)
(scsh here)
-;; exports nothing, but installs a read macro for #<
()
+(scsh scsh-version)
+(scsh-major-version scsh-minor-version scsh-version-string)
+
+(scsh weak)
+(make-weak-pointer weak-pointer-ref weak-pointer?)
+
+(scsh population)
+(make-population add-to-population! population-reduce population->list
walk-population)
+
+(scsh sighandlers)
+;; also exports signal/alrm, interrupt/alrm etc.
+(signal->interrupt with-enabled-interrupts enabled-interrupts
set-enabled-interrupts set-interrupt-handler interrupt-handler)
+
+(scsh procobj)
+(proc:pid proc? pid->proc autoreap-policy reap-zombies new-child-proc
wait/poll wait/stopped-children wait wait-any wait-process-group)
+
+(scsh syscalls)
+;; replaces pipe, sleep
+(%exec %%fork cwd user-gid user-effective-gid set-gid user-supplementary-gids
user-uid user-effective-uid set-uid user-login-name pid parent-pid
set-process-group become-session-leader set-umask process-times cpu-ticks/sec
set-file-mode set-file-owner set-file-group read-symlink delete-directory
set-file-times file-info file-info:type file-info:gid file-info:inode
file-info:atime file-info:mtime file-info:ctime file-info:mode file-info:nlinks
file-info:uid file-info:size sync-file sync-file-system seek/set seek/delta
seek/end tell pipe signal-process signal-process-group pause-until-interrupt
user-info user-info:name user-info:uid user-info:gid user-info:home-dir
user-info:shell name->user-info uid->user-info ->uid ->username %homedir
group-info group-info:name group-info:gid group-info:members ->gid ->groupname
directory-files env->alist alist->env fdes-flags set-fdes-flags fdes-status
set-fdes-status open/read open/write open/read+write open/non-blocking
open/append open/exclusive open/create open/truncate open/no-control-tty
fdflags/close-on-exec sleep sleep-until system-name define-errno-syscall)
+
+(scsh fname)
+(file-name-as-directory file-name-directory? file-name-non-directory?
directory-as-file-name ensure-file-name-is-nondirectory file-name-absolute?
file-name-directory file-name-nondirectory split-file-name path-list->file-name
file-name-extension file-name-sans-extension replace-extension parse-file-name
expand-file-name simplify-file-name resolve-tilde-file-name resolve-file-name
absolute-file-name home-dir home-file)
+
+(scsh fluid)
+(make-fluid set-fluid! fluid let-fluid)
+
+(scsh stringcoll)
+(make-string-collector collect-string! clear-string-collector!
string-collector->string)
+
+(scsh scsh-condition)
+(errno-error with-errno-handler* with-errno-handler)
+
+(scsh lib list-lib)
+;; replaces:
+;; map map-in-order for-each member assoc iota list-index
+;; delete delete!
+(xcons list-tabulate list-copy circular-list iota proper-list? circular-list?
dotted-list? not-pair? null-list? list= first second third fourth fifth sixth
seventh eighth ninth tenth car+cdr take drop take-right drop-right take!
drop-right! take-while drop-while take-while! split-at split-at! span break
span! break! last length+ append-reverse append-reverse! concatenate
concatenate! zip unzip1 unzip2 unzip3 unzip4 unzip5 count unfold unfold-right
fold unfold pair-fold reduce fold-right unfold-right pair-fold-right
reduce-right append-map append-map! map! pair-for-each filter-map map-in-order
filter partition remove filter! partition! remove! find find-tail any every
list-index delete delete! delete-duplicates delete-duplicates! alist-cons
alist-copy alist-delete alist-delete! lset<= lset= lset-adjoin lset-union
lset-union! lset-intersection lset-intersection! lset-difference
lset-difference! lset-xor lset-xor! lset-diff+intersection
lset-diff+intersection! map for-each member assoc)
Index: guile/guile-scsh/fluid.scm
diff -u guile/guile-scsh/fluid.scm:1.1 guile/guile-scsh/fluid.scm:1.2
--- guile/guile-scsh/fluid.scm:1.1 Sat Aug 30 12:37:17 1997
+++ guile/guile-scsh/fluid.scm Mon Nov 27 13:27:04 2000
@@ -1,5 +1,8 @@
;; implementation of scheme48 fluid variables using libguile fluids.
+(define-module (scsh fluid))
+(export make-fluid set-fluid! fluid let-fluid)
+
(if (not (defined? 'guile-make-fluid))
(define guile-make-fluid make-fluid))
Index: guile/guile-scsh/fname.scm
diff -u guile/guile-scsh/fname.scm:1.2 guile/guile-scsh/fname.scm:1.3
--- guile/guile-scsh/fname.scm:1.2 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/fname.scm Mon Nov 27 13:27:04 2000
@@ -11,6 +11,34 @@
;;; Relevant bits of CScheme:
;;; pathnm sfile strnin unxcwd unxdir unxpar unxprm unxpth unxunp wrkdir
+(define-module (scsh fname)
+ :use-module (scsh lib string-lib)
+ :use-module (scsh let-opt)
+ :use-module (scsh receive)
+ :use-module (scsh syscalls))
+
+(export file-name-as-directory
+ file-name-directory?
+ file-name-non-directory?
+ directory-as-file-name
+ ensure-file-name-is-nondirectory
+ file-name-absolute?
+ file-name-directory
+ file-name-nondirectory
+ split-file-name
+ path-list->file-name
+ file-name-extension
+ file-name-sans-extension
+ replace-extension
+ parse-file-name
+ expand-file-name
+ simplify-file-name
+ resolve-tilde-file-name
+ resolve-file-name
+ absolute-file-name
+ home-dir
+ home-file)
+
(define (file-name-directory? fname)
(or (string=? fname "") ; Note! "" is directory (cwd)
(char=? #\/ (string-ref fname (- (string-length fname) 1)))))
Index: guile/guile-scsh/init.scm
diff -u guile/guile-scsh/init.scm:1.33 guile/guile-scsh/init.scm:1.34
--- guile/guile-scsh/init.scm:1.33 Sun Oct 29 11:53:23 2000
+++ guile/guile-scsh/init.scm Mon Nov 27 13:27:04 2000
@@ -43,22 +43,29 @@
(scsh rdelim)
(scsh here)
-)
+ (scsh scsh-version)
+ (scsh weak)
+ (scsh population)
+
+ ;; also exports signal/alrm, interrupt/alrm etc.
+ (scsh sighandlers)
-(load-from-path "scsh/scsh-version.scm")
-(load-from-path "scsh/fname.scm")
-(load-from-path "scsh/enumconst.scm")
-(load-from-path "scsh/weak.scm")
-(load-from-path "scsh/fluid.scm")
-(load-from-path "scsh/population.scm")
-(load-from-path "scsh/stringcoll.scm")
-(load-from-path "scsh/condition.scm")
-(load-from-path "scsh/scsh-condition.scm")
+ (scsh procobj)
-(load-from-path "scsh/lib/ccp.scm")
-(load-from-path "scsh/lib/list-lib.scm")
+ ;; replaces pipe, sleep
+ (scsh syscalls)
+
+ (scsh fname)
+ (scsh fluid)
+ (scsh stringcoll)
+ (scsh scsh-condition)
+
+ ;; replaces:
+ ;; map map-in-order for-each member assoc iota list-index
+ ;; delete delete!
+ (scsh lib list-lib)
+)
-(load-from-path "scsh/syscalls.scm")
(load-from-path "scsh/syntax.scm")
(load-from-path "scsh/fileinfo.scm")
(load-from-path "scsh/glob.scm")
@@ -70,8 +77,6 @@
(load-from-path "scsh/fr.scm")
(load-from-path "scsh/netconst.scm")
(load-from-path "scsh/network.scm")
-(load-from-path "scsh/sighandlers.scm")
-(load-from-path "scsh/procobj.scm")
(load-from-path "scsh/scsh.scm")
(init-scsh-vars #f)
Index: guile/guile-scsh/lib/list-lib.scm
diff -u guile/guile-scsh/lib/list-lib.scm:1.1
guile/guile-scsh/lib/list-lib.scm:1.2
--- guile/guile-scsh/lib/list-lib.scm:1.1 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/lib/list-lib.scm Mon Nov 27 13:27:05 2000
@@ -208,7 +208,52 @@
;;;
;;; The SRFI discussion record contains more discussion on this topic.
+(define-module (scsh lib list-lib)
+ :use-module (scsh receive)
+ :use-module (scsh utilities)
+ :use-module (scsh let-opt)
+)
+(export xcons
+ ; cons* make-list
+ list-tabulate list-copy circular-list iota
+ proper-list? circular-list? dotted-list? not-pair? null-list? list=
+ first second third fourth fifth sixth seventh eighth ninth tenth
+ car+cdr
+ take drop
+ take-right drop-right
+ take! drop-right!
+ take-while drop-while take-while!
+ split-at split-at!
+ span break
+ span! break!
+ last ; last-pair
+ length+
+ ; append! reverse!
+ append-reverse append-reverse! concatenate
+ concatenate!
+ zip unzip1 unzip2 unzip3 unzip4 unzip5
+ count
+ unfold unfold-right
+ fold unfold pair-fold reduce
+ fold-right unfold-right pair-fold-right reduce-right
+ append-map append-map! map! pair-for-each filter-map map-in-order
+ filter partition remove
+ filter! partition! remove!
+ find find-tail any every list-index
+ delete delete! delete-duplicates delete-duplicates!
+ alist-cons alist-copy
+ alist-delete alist-delete!
+
+ lset<= lset= lset-adjoin
+ lset-union lset-union!
+ lset-intersection lset-intersection!
+ lset-difference lset-difference!
+ lset-xor lset-xor!
+ lset-diff+intersection lset-diff+intersection!
+ map for-each member assoc
+)
+
;;; Constructors
;;;;;;;;;;;;;;;;
@@ -224,15 +269,16 @@
;;; Make a list of length LEN.
-(define (make-list len . maybe-elt)
- (check-arg (lambda (n) (and (integer? n) (>= n 0))) len make-list)
- (let ((elt (cond ((null? maybe-elt) #f) ; Default value
- ((null? (cdr maybe-elt)) (car maybe-elt))
- (else (error "Too many arguments to MAKE-LIST"
- (cons len maybe-elt))))))
- (do ((i len (- i 1))
- (ans '() (cons elt ans)))
- ((<= i 0) ans))))
+;; already defined in Guile
+; (define (make-list len . maybe-elt)
+; (check-arg (lambda (n) (and (integer? n) (>= n 0))) len make-list)
+; (let ((elt (cond ((null? maybe-elt) #f) ; Default value
+; ((null? (cdr maybe-elt)) (car maybe-elt))
+; (else (error "Too many arguments to MAKE-LIST"
+; (cons len maybe-elt))))))
+; (do ((i len (- i 1))
+; (ans '() (cons elt ans)))
+; ((<= i 0) ans))))
;(define (list . ans) ans) ; R4RS
@@ -252,19 +298,20 @@
;;;
;;; (cons first (unfold not-pair? car cdr rest values))
-(define (cons* first . rest)
- (let recur ((x first) (rest rest))
- (if (pair? rest)
- (cons x (recur (car rest) (cdr rest)))
- x)))
+;; already defined in Guile
+; (define (cons* first . rest)
+; (let recur ((x first) (rest rest))
+; (if (pair? rest)
+; (cons x (recur (car rest) (cdr rest)))
+; x)))
;;; (unfold not-pair? car cdr lis values)
-(define (list-copy lis)
- (let recur ((lis lis))
- (if (pair? lis)
- (cons (car lis) (recur (cdr lis)))
- lis)))
+;(define (list-copy lis)
+; (let recur ((lis lis))
+; (if (pair? lis)
+; (cons (car lis) (recur (cdr lis)))
+; lis)))
;;; IOTA count [start step] (start start+step ... start+(count-1)*step)
@@ -593,11 +640,12 @@
(define (last lis) (car (last-pair lis)))
-(define (last-pair lis)
- (check-arg pair? lis last-pair)
- (let lp ((lis lis))
- (let ((tail (cdr lis)))
- (if (pair? tail) (lp tail) lis))))
+;; already defined in Guile.
+; (define (last-pair lis)
+; (check-arg pair? lis last-pair)
+; (let lp ((lis lis))
+; (let ((tail (cdr lis)))
+; (if (pair? tail) (lp tail) lis))))
;;; Unzippers -- 1 through 5
@@ -647,24 +695,25 @@
;;; append! append-reverse append-reverse! concatenate concatenate!
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(define (append! . lists)
- ;; First, scan through lists looking for a non-empty one.
- (let lp ((lists lists) (prev '()))
- (if (not (pair? lists)) prev
- (let ((first (car lists))
- (rest (cdr lists)))
- (if (not (pair? first)) (lp rest first)
-
- ;; Now, do the splicing.
- (let lp2 ((tail-cons (last-pair first))
- (rest rest))
- (if (pair? rest)
- (let ((next (car rest))
- (rest (cdr rest)))
- (set-cdr! tail-cons next)
- (lp2 (if (pair? next) (last-pair next) tail-cons)
- rest))
- first)))))))
+;; already defined in Guile.
+; (define (append! . lists)
+; ;; First, scan through lists looking for a non-empty one.
+; (let lp ((lists lists) (prev '()))
+; (if (not (pair? lists)) prev
+; (let ((first (car lists))
+; (rest (cdr lists)))
+; (if (not (pair? first)) (lp rest first)
+
+; ;; Now, do the splicing.
+; (let lp2 ((tail-cons (last-pair first))
+; (rest rest))
+; (if (pair? rest)
+; (let ((next (car rest))
+; (rest (cdr rest)))
+; (set-cdr! tail-cons next)
+; (lp2 (if (pair? next) (last-pair next) tail-cons)
+; rest))
+; first)))))))
;;; APPEND is R4RS.
;(define (append . lists)
@@ -942,6 +991,16 @@
(proc lis) ; in case PROC SET-CDR!s LIS.
(lp tail))))))
+;; guile: above it's claimed that for-each is redefined in this file
+;; to handle lists of unequal lengths. this is from scsh rts/base.scm
+;; and hacked.
+(define (for-each proc first . rest)
+ (let loop ((first first) (rest rest))
+ (if (not (or (null? first)
+ (any null? rest)))
+ (begin (apply proc (cons (car first) (map car rest)))
+ (loop (cdr first) (map cdr rest))))))
+
;;; We stop when LIS1 runs out, not when any list runs out.
(define (map! f lis1 . lists)
(check-arg procedure? f map!)
@@ -980,6 +1039,8 @@
;;; NOTE: Some implementations of R5RS MAP are compliant with this spec;
;;; in which case this procedure may simply be defined as a synonym for MAP.
+;; Guile's version can't be used because it doesn't allow list of unequal
+;; length.
(define (map-in-order f lis1 . lists)
(check-arg procedure? f map-in-order)
(if (pair? lists)
@@ -990,9 +1051,9 @@
(cons x (recur cdrs))) ; then tail.
'())))
- ;; Fast path.
- (let recur ((lis lis1))
- (if (null-list? lis) lis
+ ;; Fast path.
+ (let recur ((lis lis1))
+ (if (null-list? lis) lis
(let ((tail (cdr lis))
(x (f (car lis)))) ; Do head first,
(cons x (recur tail))))))) ; then tail.
@@ -1411,12 +1472,13 @@
;(define (reverse! lis)
; (pair-fold (lambda (pair tail) (set-cdr! pair tail) pair) '() lis))
-(define (reverse! lis)
- (let lp ((lis lis) (ans '()))
- (if (null-list? lis) ans
- (let ((tail (cdr lis)))
- (set-cdr! lis ans)
- (lp tail lis)))))
+;; already defined in Guile.
+; (define (reverse! lis)
+; (let lp ((lis lis) (ans '()))
+; (if (null-list? lis) ans
+; (let ((tail (cdr lis)))
+; (set-cdr! lis ans)
+; (lp tail lis)))))
;;; Lists-as-sets
;;;;;;;;;;;;;;;;;
Index: guile/guile-scsh/make-module-list
diff -u guile/guile-scsh/make-module-list:1.1
guile/guile-scsh/make-module-list:1.2
--- guile/guile-scsh/make-module-list:1.1 Sun Oct 29 11:53:23 2000
+++ guile/guile-scsh/make-module-list Mon Nov 27 13:27:04 2000
@@ -42,10 +42,18 @@
rx/parse
rx/rx-lib
rdelim
- here)))
-
-;; comments
-
+ here
+ scsh-version
+ weak
+ population
+ sighandlers
+ procobj
+ syscalls
+ fname
+ fluid
+ stringcoll
+ scsh-condition
+ lib/list-lib)))
;; if expr is a define-module form, return the name of the module
;; e.g., '(scsh alt-syntax).
Index: guile/guile-scsh/population.scm
diff -u guile/guile-scsh/population.scm:1.1 guile/guile-scsh/population.scm:1.2
--- guile/guile-scsh/population.scm:1.1 Sat Aug 9 12:17:30 1997
+++ guile/guile-scsh/population.scm Mon Nov 27 13:27:04 2000
@@ -1,7 +1,10 @@
; Copyright (c) 1993, 1994 Richard Kelsey and Jonathan Rees. See file COPYING.
-
-
+(define-module (scsh population)
+ :use-module (scsh weak)
+)
+(export make-population add-to-population! population-reduce
+ population->list walk-population)
(define (make-population)
(list '<population>))
Index: guile/guile-scsh/procobj.scm
diff -u guile/guile-scsh/procobj.scm:1.2 guile/guile-scsh/procobj.scm:1.3
--- guile/guile-scsh/procobj.scm:1.2 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/procobj.scm Mon Nov 27 13:27:04 2000
@@ -9,6 +9,18 @@
;;; and out of the kernel process table, and they can be waited on
;;; multiple times.
+(define-module (scsh procobj)
+ :use-module (scsh defrec)
+ :use-module (scsh population)
+ :use-module (scsh utilities)
+ :use-module (scsh let-opt)
+ :use-module (scsh sighandlers)
+ :use-module (scsh weak)
+)
+(export proc:pid proc? pid->proc autoreap-policy reap-zombies
+ new-child-proc wait/poll wait/stopped-children wait wait-any
+ wait-process-group)
+
;;; Process objects
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Index: guile/guile-scsh/scsh-condition.scm
diff -u guile/guile-scsh/scsh-condition.scm:1.3
guile/guile-scsh/scsh-condition.scm:1.4
--- guile/guile-scsh/scsh-condition.scm:1.3 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/scsh-condition.scm Mon Nov 27 13:27:04 2000
@@ -1,6 +1,12 @@
;;; Copyright (c) 1994 by Olin Shivers. See file COPYING.
;;; Add scsh conditions to s48.
+(define-module (scsh scsh-condition)
+ :use-module (scsh alt-syntax)
+)
+(export errno-error with-errno-handler*)
+(export-syntax with-errno-handler)
+
;;; A syscall-error condition-type:
;;(define-condition-type 'syscall-error '(error))
Index: guile/guile-scsh/scsh-version.scm
diff -u guile/guile-scsh/scsh-version.scm:1.2
guile/guile-scsh/scsh-version.scm:1.3
--- guile/guile-scsh/scsh-version.scm:1.2 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/scsh-version.scm Mon Nov 27 13:27:04 2000
@@ -1,3 +1,6 @@
+(define-module (scsh scsh-version))
+(export scsh-major-version scsh-minor-version scsh-version-string)
+
(define scsh-major-version 0)
(define scsh-minor-version 5)
(define scsh-version-string "0.5.2")
Index: guile/guile-scsh/sighandlers.scm
diff -u guile/guile-scsh/sighandlers.scm:1.2
guile/guile-scsh/sighandlers.scm:1.3
--- guile/guile-scsh/sighandlers.scm:1.2 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/sighandlers.scm Mon Nov 27 13:27:04 2000
@@ -32,6 +32,25 @@
;;; ENABLED-INTERRUPTS
;;; Must define WITH-INTERRUPTS* and WITH-INTERRUPTS.
+(define-module (scsh sighandlers)
+ :use-module (scsh define-foreign-syntax)
+)
+;; additional exports are generated below.
+(export signal->interrupt
+ ;; interrupt-set
+ with-enabled-interrupts
+ ;; with-enabled-interrupts*
+ enabled-interrupts
+ set-enabled-interrupts
+
+ set-interrupt-handler
+ interrupt-handler
+
+;; %set-unix-signal-handler
+;; %unix-signal-handler
+
+)
+
(foreign-source
"#include <errno.h>"
""
@@ -75,18 +94,19 @@
;(define with-enabled-interrupts* with-interrupts)
(defmacro maybe-define-signal (name)
- (let ((build-name (lambda (prefix signame)
- (string->symbol
- (string-append prefix
- (string-downcase
- (substring (symbol->string signame)
- 3)))))))
- `(if (defined? ',name)
- (begin
- (define ,(build-name "interrupt/" name)
- ,name)
- (define ,(build-name "signal/" name)
- ,name)))))
+ (let* ((build-name (lambda (prefix signame)
+ (string->symbol
+ (string-append prefix
+ (string-downcase
+ (substring (symbol->string signame)
+ 3))))))
+ (interrupt-name (build-name "interrupt/" name))
+ (signal-name (build-name "signal/" name)))
+ `(cond ((defined? ',name)
+ (define ,interrupt-name ,name)
+ (export ,interrupt-name)
+ (define ,signal-name ,name)
+ (export ,signal-name)))))
(maybe-define-signal SIGABRT)
(maybe-define-signal SIGALRM)
@@ -122,8 +142,6 @@
(maybe-define-signal SIGWINCH)
(maybe-define-signal SIGXCPU)
(maybe-define-signal SIGXFSZ)
-
-(undefine maybe-define-signal)
;;; HANDLER is #f (ignore), #t (default), or a procedure taking an integer
;;; argument. The interrupt is delivered to a procedure by (1) setting the
Index: guile/guile-scsh/stringcoll.scm
diff -u guile/guile-scsh/stringcoll.scm:1.2 guile/guile-scsh/stringcoll.scm:1.3
--- guile/guile-scsh/stringcoll.scm:1.2 Mon Sep 4 11:37:14 2000
+++ guile/guile-scsh/stringcoll.scm Mon Nov 27 13:27:04 2000
@@ -27,6 +27,12 @@
;;; This facility makes it reasonably efficient to accumulate strings
;;; of any size in increments of any size.
+(define-module (scsh stringcoll)
+ :use-module (scsh defrec)
+)
+(export make-string-collector collect-string! clear-string-collector!
+ string-collector->string)
+
(define-record string-collector
(len 0) ; How many chars have we accumulated?
(chunks '()) ; The chunk list.
Index: guile/guile-scsh/syscalls.scm
diff -u guile/guile-scsh/syscalls.scm:1.11 guile/guile-scsh/syscalls.scm:1.12
--- guile/guile-scsh/syscalls.scm:1.11 Sat Oct 14 13:56:56 2000
+++ guile/guile-scsh/syscalls.scm Mon Nov 27 13:27:04 2000
@@ -5,6 +5,43 @@
;;; Need to rationalise names here. getgid. get-gid. "effective" as morpheme?
+(define-module (scsh syscalls)
+ :use-module (scsh define-foreign-syntax)
+ :use-module (scsh receive)
+ :use-module (scsh utilities)
+ :use-module (scsh let-opt)
+ :use-module (scsh fname)
+ :use-module (scsh defrec)
+ :use-module (scsh procobj)
+)
+(export %exec %%fork cwd user-gid user-effective-gid set-gid
+ user-supplementary-gids user-uid user-effective-uid set-uid
+ user-login-name pid parent-pid set-process-group
+ become-session-leader set-umask process-times cpu-ticks/sec
+ set-file-mode set-file-owner set-file-group read-symlink
+ delete-directory set-file-times
+ file-info file-info:type file-info:gid file-info:inode
+ file-info:atime file-info:mtime file-info:ctime file-info:mode
+ file-info:nlinks file-info:uid file-info:size
+ sync-file sync-file-system
+ seek/set seek/delta seek/end tell pipe
+ signal-process signal-process-group pause-until-interrupt
+ user-info user-info:name user-info:uid user-info:gid
+ user-info:home-dir user-info:shell
+ name->user-info uid->user-info ->uid ->username %homedir
+ group-info group-info:name group-info:gid group-info:members
+ ->gid ->groupname
+ directory-files
+ env->alist alist->env
+ fdes-flags set-fdes-flags fdes-status set-fdes-status
+ open/read open/write open/read+write open/non-blocking
+ open/append open/exclusive open/create open/truncate
+ open/no-control-tty fdflags/close-on-exec
+ sleep sleep-until
+ system-name)
+
+(export-syntax define-errno-syscall)
+
(foreign-source
"#include <sys/signal.h>"
"#include <sys/types.h>"
@@ -518,8 +555,6 @@
;; (else
;; (errno-error errno %close-fdes fd)))))) ; You lose.
-(define close-fdes close)
-
(define-foreign %dup/errno
(dup (integer fd))
(multi-rep (to-scheme integer errno_or_false)
@@ -548,9 +583,14 @@
(define seek/delta SEEK_CUR)
(define seek/end SEEK_END)
-(define (seek fd/port offset . maybe-whence)
- (let ((whence (:optional maybe-whence seek/set)))
- (fseek fd/port offset whence)))
+;(define (seek fd/port offset . maybe-whence)
+; (let ((whence (:optional maybe-whence seek/set)))
+; (receive (err cursor)
+; ((if (integer? fd/port) %fd-seek/errno %fdport-seek/errno)
+; fd/port
+; offset
+; whence)
+; (if err (errno-error err seek fd/port offset whence) cursor))))
(define tell ftell)
@@ -589,9 +629,9 @@
(if (not (defined? 'guile-pipe))
(define guile-pipe pipe))
-(set! pipe (lambda ()
- (let ((rv (guile-pipe)))
- (values (car rv) (cdr rv)))))
+(define pipe (lambda ()
+ (let ((rv (guile-pipe)))
+ (values (car rv) (cdr rv)))))
(define-foreign %read-fdes-char
(read_fdes_char (integer fd))
Index: guile/guile-scsh/weak.scm
diff -u guile/guile-scsh/weak.scm:1.1 guile/guile-scsh/weak.scm:1.2
--- guile/guile-scsh/weak.scm:1.1 Sat Aug 9 12:17:33 1997
+++ guile/guile-scsh/weak.scm Mon Nov 27 13:27:04 2000
@@ -1,5 +1,8 @@
;; implementation of weak pointers using Guile's weak vectors.
+(define-module (scsh weak))
+(export make-weak-pointer weak-pointer-ref weak-pointer?)
+
(define (make-weak-pointer x) (make-weak-vector 1 x))
(define (weak-pointer-ref x) (vector-ref x 0))
(define (weak-pointer? x)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- guile/guile-scsh ChangeLog INCOMPAT README USAG...,
Gary Houston <=