guile-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile/guile-core ice-9/ChangeLog ice-9/Makefile...


From: Gary Houston
Subject: guile/guile-core ice-9/ChangeLog ice-9/Makefile...
Date: Sun, 21 Jan 2001 14:11:29 -0800

CVSROOT:        /cvs
Module name:    guile
Changes by:     Gary Houston <address@hidden>   01/01/21 14:11:29

Modified files:
        guile-core/ice-9: ChangeLog Makefile.am boot-9.scm lineio.scm 
        guile-core     : NEWS 
Added files:
        guile-core/ice-9: rdelim.scm 

Log message:
        * rdelim.scm: new file implementing module (ice-9 rdelim).
        * ice-9.scm (scm-line-incrementors read-line! read-delimited!
        read-delimited read-line): moved to rdelim.scm.
        scm-line-incrementors is not exported.
        * boot-9.scm: import (ice-9 rdelim) for backwards compatibility,
        for now.
        * lineio.scm: use module (ice-9 rdelim).
        * Makefile.am (ice9_sources): add rdelim.scm.

CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/ice-9/rdelim.scm.diff?r1=NONE&r2=1.1
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/ice-9/ChangeLog.diff?r1=1.364&r2=1.365
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/ice-9/Makefile.am.diff?r1=1.32&r2=1.33
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/ice-9/boot-9.scm.diff?r1=1.220&r2=1.221
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/ice-9/lineio.scm.diff?r1=1.7&r2=1.8
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/NEWS.diff?r1=1.239&r2=1.240

Patches:
Index: guile/guile-core/NEWS
diff -u guile/guile-core/NEWS:1.239 guile/guile-core/NEWS:1.240
--- guile/guile-core/NEWS:1.239 Sat Jan  6 14:04:04 2001
+++ guile/guile-core/NEWS       Sun Jan 21 14:11:29 2001
@@ -8,25 +8,17 @@
 
 * Changes to the distribution
 
-** New modules (oop goops) etc
+** New modules (oop goops) etc.:
 
-The new modules
-
   (oop goops)
   (oop goops describe)
   (oop goops save)
   (oop goops active-slot)
   (oop goops composite-slot)
-
-plus some GOOPS utility modules have been added.
-
-* Changes to the stand-alone interpreter
 
-** GOOPS has been merged into Guile
+The Guile Object Oriented Programming System (GOOPS) has been
+integrated into Guile.
 
-The Guile Object Oriented Programming System has been integrated into
-Guile.
-
 Type
 
   (use-modules (oop goops))
@@ -75,6 +67,27 @@
 See further in the GOOPS tutorial available in the guile-doc
 distribution in info (goops.info) and texinfo formats.
 
+** New module (ice-9 rdelim).
+
+This exports the following procedures which were previously defined
+in the root module:
+
+read-line read-line! read-delimited read-delimited!
+;; TODO: read-string!/partial %read-delimited! %read-line write-line
+
+For backwards compatibility the definitions are also imported into the
+root module in this version of Guile.  However you should add:
+
+(use-modules (ice-9 rdelim))
+
+to any program which uses the definitions, since this may be removed
+in in a future version.
+
+Alternatively, if guile-scsh is installed, the (scsh rdelim) module
+can be used for similar functionality.
+
+* Changes to the stand-alone interpreter
+
 ** It's now possible to create modules with controlled environments
 
 Example:
@@ -283,7 +296,7 @@
 
 There is no such concept as a weak binding any more.
 
-** Removed constants:  bignum-radix
+** Removed constants:  bignum-radix, scm-line-incrementors
 
 * Changes to the gh_ interface
 
Index: guile/guile-core/ice-9/ChangeLog
diff -u guile/guile-core/ice-9/ChangeLog:1.364 
guile/guile-core/ice-9/ChangeLog:1.365
--- guile/guile-core/ice-9/ChangeLog:1.364      Fri Dec 29 07:47:16 2000
+++ guile/guile-core/ice-9/ChangeLog    Sun Jan 21 14:11:29 2001
@@ -1,3 +1,14 @@
+2001-01-21  Gary Houston  <address@hidden>
+
+       * rdelim.scm: new file implementing module (ice-9 rdelim).
+       * ice-9.scm (scm-line-incrementors read-line! read-delimited!
+       read-delimited read-line): moved to rdelim.scm.
+       scm-line-incrementors is not exported.
+       * boot-9.scm: import (ice-9 rdelim) for backwards compatibility,
+       for now.
+       * lineio.scm: use module (ice-9 rdelim).
+       * Makefile.am (ice9_sources): add rdelim.scm.
+
 2000-12-29  Dirk Herrmann  <address@hidden>
 
        * boot-9.scm (root-module-closure, scm-module-closure):  Remove
Index: guile/guile-core/ice-9/Makefile.am
diff -u guile/guile-core/ice-9/Makefile.am:1.32 
guile/guile-core/ice-9/Makefile.am:1.33
--- guile/guile-core/ice-9/Makefile.am:1.32     Thu Aug 10 17:45:09 2000
+++ guile/guile-core/ice-9/Makefile.am  Sun Jan 21 14:11:29 2001
@@ -28,7 +28,7 @@
        format.scm getopt-long.scm hcons.scm lineio.scm ls.scm            \
        mapping.scm networking.scm null.scm optargs.scm poe.scm popen.scm \
        posix.scm psyntax.pp psyntax.ss q.scm r4rs.scm r5rs.scm           \
-       receive.scm srfi-8.scm                                            \
+       rdelim.scm receive.scm srfi-8.scm                                 \
        regex.scm runq.scm safe-r5rs.scm safe.scm session.scm slib.scm    \
        streams.scm string-fun.scm syncase.scm tags.scm threads.scm 
 
Index: guile/guile-core/ice-9/boot-9.scm
diff -u guile/guile-core/ice-9/boot-9.scm:1.220 
guile/guile-core/ice-9/boot-9.scm:1.221
--- guile/guile-core/ice-9/boot-9.scm:1.220     Fri Dec 29 07:47:16 2000
+++ guile/guile-core/ice-9/boot-9.scm   Sun Jan 21 14:11:29 2001
@@ -166,152 +166,6 @@
 
 
 
-;;; {Line and Delimited I/O}
-
-;;; corresponds to SCM_LINE_INCREMENTORS in libguile.
-(define scm-line-incrementors "\n")
-
-(define (read-line! string . maybe-port)
-  (let* ((port (if (pair? maybe-port)
-                  (car maybe-port)
-                  (current-input-port))))
-    (let* ((rv (%read-delimited! scm-line-incrementors
-                                string
-                                #t
-                                port))
-          (terminator (car rv))
-          (nchars (cdr rv)))
-      (cond ((and (= nchars 0)
-                 (eof-object? terminator))
-            terminator)
-           ((not terminator) #f)
-           (else nchars)))))
-
-(define (read-delimited! delims buf . args)
-  (let* ((num-args (length args))
-        (port (if (> num-args 0)
-                  (car args)
-                  (current-input-port)))
-        (handle-delim (if (> num-args 1)
-                          (cadr args)
-                          'trim))
-        (start (if (> num-args 2)
-                   (caddr args)
-                   0))
-        (end (if (> num-args 3)
-                 (cadddr args)
-                 (string-length buf))))
-    (let* ((rv (%read-delimited! delims
-                                buf
-                                (not (eq? handle-delim 'peek))
-                                port
-                                start
-                                end))
-          (terminator (car rv))
-          (nchars (cdr rv)))
-      (cond ((or (not terminator)      ; buffer filled
-                (eof-object? terminator))
-            (if (zero? nchars)
-                (if (eq? handle-delim 'split)
-                    (cons terminator terminator)
-                    terminator)
-                (if (eq? handle-delim 'split)
-                    (cons nchars terminator)
-                    nchars)))
-           (else
-            (case handle-delim
-              ((trim peek) nchars)
-              ((concat) (string-set! buf (+ nchars start) terminator)
-                        (+ nchars 1))
-              ((split) (cons nchars terminator))
-              (else (error "unexpected handle-delim value: " 
-                           handle-delim))))))))
-  
-(define (read-delimited delims . args)
-  (let* ((port (if (pair? args)
-                  (let ((pt (car args)))
-                    (set! args (cdr args))
-                    pt)
-                  (current-input-port)))
-        (handle-delim (if (pair? args)
-                          (car args)
-                          'trim)))
-    (let loop ((substrings ())
-              (total-chars 0)
-              (buf-size 100))          ; doubled each time through.
-      (let* ((buf (make-string buf-size))
-            (rv (%read-delimited! delims
-                                  buf
-                                  (not (eq? handle-delim 'peek))
-                                  port))
-            (terminator (car rv))
-            (nchars (cdr rv))
-            (join-substrings
-             (lambda ()
-               (apply string-append
-                      (reverse
-                       (cons (if (and (eq? handle-delim 'concat)
-                                      (not (eof-object? terminator)))
-                                 (string terminator)
-                                 "")
-                             (cons (substring buf 0 nchars)
-                                   substrings))))))
-            (new-total (+ total-chars nchars)))
-       (cond ((not terminator)
-              ;; buffer filled.
-              (loop (cons (substring buf 0 nchars) substrings)
-                    new-total
-                    (* buf-size 2)))
-             ((eof-object? terminator)
-              (if (zero? new-total)
-                  (if (eq? handle-delim 'split)
-                      (cons terminator terminator)
-                      terminator)
-                  (if (eq? handle-delim 'split)
-                      (cons (join-substrings) terminator)
-                      (join-substrings))))
-             (else
-              (case handle-delim
-                  ((trim peek concat) (join-substrings))
-                  ((split) (cons (join-substrings) terminator))
-
-
-                  (else (error "unexpected handle-delim value: "
-                               handle-delim)))))))))
-
-;;; read-line [PORT [HANDLE-DELIM]] reads a newline-terminated string
-;;; from PORT.  The return value depends on the value of HANDLE-DELIM,
-;;; which may be one of the symbols `trim', `concat', `peek' and
-;;; `split'.  If it is `trim' (the default), the trailing newline is
-;;; removed and the string is returned.  If `concat', the string is
-;;; returned with the trailing newline intact.  If `peek', the newline
-;;; is left in the input port buffer and the string is returned.  If
-;;; `split', the newline is split from the string and read-line
-;;; returns a pair consisting of the truncated string and the newline.
-
-(define (read-line . args)
-  (let* ((port         (if (null? args)
-                           (current-input-port)
-                           (car args)))
-        (handle-delim  (if (> (length args) 1)
-                           (cadr args)
-                           'trim))
-        (line/delim    (%read-line port))
-        (line          (car line/delim))
-        (delim         (cdr line/delim)))
-    (case handle-delim
-      ((trim) line)
-      ((split) line/delim)
-      ((concat) (if (and (string? line) (char? delim))
-                   (string-append line (string delim))
-                   line))
-      ((peek) (if (char? delim)
-                 (unread-char delim port))
-             line)
-      (else
-       (error "unexpected handle-delim value: " handle-delim)))))
-
-
 ;;; {Arrays}
 ;;;
 
@@ -2483,6 +2337,7 @@
     (read (current-input-port))))
 
 (define (scm-style-repl)
+
   (letrec (
           (start-gc-rt #f)
           (start-rt #f)
@@ -2770,6 +2625,7 @@
 
 
 
+
 ;;; {Load emacs interface support if emacs option is given.}
 
 (define (load-emacs-interface)
@@ -2779,14 +2635,16 @@
 
 
 
+;; temporary, for backwards compatibility.
+(use-modules (ice-9 rdelim))
+
+
 (define using-readline?
   (let ((using-readline? (make-fluid)))
      (make-procedure-with-setter
       (lambda () (fluid-ref using-readline?))
       (lambda (v) (fluid-set! using-readline? v)))))
 
-;; this is just (scm-style-repl) with a wrapper to install and remove 
-;; signal handlers.
 (define (top-repl) 
 
   ;; Load emacs interface support if emacs option is given.
Index: guile/guile-core/ice-9/lineio.scm
diff -u guile/guile-core/ice-9/lineio.scm:1.7 
guile/guile-core/ice-9/lineio.scm:1.8
--- guile/guile-core/ice-9/lineio.scm:1.7       Tue Nov 28 05:40:40 2000
+++ guile/guile-core/ice-9/lineio.scm   Sun Jan 21 14:11:29 2001
@@ -20,7 +20,8 @@
 
 
 
-(define-module (ice-9 lineio))
+(define-module (ice-9 lineio)
+  :use-module (ice-9 readline))
 
 
 ;;; {Line Buffering Input Ports}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]