summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/ref/scheme-debugging.texi7
-rw-r--r--guile-readline/ChangeLog4
-rw-r--r--guile-readline/ice-9/readline.scm3
-rw-r--r--ice-9/ChangeLog27
-rw-r--r--ice-9/boot-9.scm33
-rw-r--r--ice-9/format.scm5
-rw-r--r--ice-9/ftw.scm31
7 files changed, 77 insertions, 33 deletions
diff --git a/doc/ref/scheme-debugging.texi b/doc/ref/scheme-debugging.texi
index a9d1691d1..32a6a46bd 100644
--- a/doc/ref/scheme-debugging.texi
+++ b/doc/ref/scheme-debugging.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Guile Reference Manual.
-@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004
+@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006
@c Free Software Foundation, Inc.
@c See the file guile.texi for copying conditions.
@@ -511,3 +511,8 @@ behaviour as well as the more traditional @code{trace-here}.
The older mechanism will probably become obsolete eventually, but it's
worth keeping it around for a while until we are sure that the new
mechanism is correct and does what programmers need.
+
+
+@c Local Variables:
+@c TeX-master: "guile.texi"
+@c End:
diff --git a/guile-readline/ChangeLog b/guile-readline/ChangeLog
index 2a102e9e9..b7bddd59f 100644
--- a/guile-readline/ChangeLog
+++ b/guile-readline/ChangeLog
@@ -9,6 +9,10 @@
globals. Save and restore the new-input- and continuation-
prompts around the REPL read call.
+2006-10-05 Kevin Ryde <user42@zip.com.au>
+
+ * ice-9/readline.scm (filename-completion-function): Export this.
+
2006-04-17 Kevin Ryde <user42@zip.com.au>
* ice-9/readline.scm: Bump lib file version to libguilereadline-v-18,
diff --git a/guile-readline/ice-9/readline.scm b/guile-readline/ice-9/readline.scm
index 067bd3842..e74bc0243 100644
--- a/guile-readline/ice-9/readline.scm
+++ b/guile-readline/ice-9/readline.scm
@@ -27,7 +27,8 @@
:use-module (ice-9 session)
:use-module (ice-9 regex)
:use-module (ice-9 buffered-input)
- :no-backtrace)
+ :no-backtrace
+ :export (filename-completion-function))
diff --git a/ice-9/ChangeLog b/ice-9/ChangeLog
index 237604515..1b903da23 100644
--- a/ice-9/ChangeLog
+++ b/ice-9/ChangeLog
@@ -1,3 +1,11 @@
+2006-10-05 Kevin Ryde <user42@zip.com.au>
+
+ * ftw.scm (visited?-proc): Use hashv since we know we're getting
+ numbers. Incorporate stat:dev, since stat:ino is only unique within a
+ single device. This fixes a bug where if two files with the same
+ inode on different devices where seen only the first would be returned
+ by ftw (and nftw).
+
2006-10-03 Neil Jerram <neil@ossau.uklinux.net>
* gds-client.scm (run-utility): Remove unnecessary
@@ -22,6 +30,18 @@
(info-args, info-frame, position, evaluate): Docstring
improvements.
+2006-09-23 Kevin Ryde <user42@zip.com.au>
+
+ * boot-9.scm (log, log10, exp, sqrt): Remove, now in
+ libguile/numbers.c.
+
+2006-09-07 Kevin Ryde <user42@zip.com.au>
+
+ * format.scm: Module "(ice-9 threads)" no longer used, now no mutex.
+ (format:parse-float): Fix normalization of leading zeros like "02.5"
+ to "2.5". left-zeros was zeroed before adjusting format:fn-dot,
+ resulting in the latter being unchanged.
+
2006-08-18 Neil Jerram <neil@ossau.uklinux.net>
* debugging/trc.scm: New file.
@@ -44,6 +64,13 @@
* Makefile.am (SUBDIRS): Add debugging.
+2006-08-02 Kevin Ryde <user42@zip.com.au>
+
+ * boot-9.scm (%record-type-check): New function.
+ (record-accessor, record-modifier): Use it for a strict type check of
+ the given record. Previously an accessor returned #f on a wrong
+ record type, and modifier silently did nothing.
+
2006-06-19 Neil Jerram <neil@ossau.uklinux.net>
* Makefile.am (ice9_sources): Add new files.
diff --git a/ice-9/boot-9.scm b/ice-9/boot-9.scm
index 0f56f9855..3ecd7b596 100644
--- a/ice-9/boot-9.scm
+++ b/ice-9/boot-9.scm
@@ -429,13 +429,20 @@
(define (record-predicate rtd)
(lambda (obj) (and (struct? obj) (eq? rtd (struct-vtable obj)))))
+(define (%record-type-check rtd obj) ;; private helper
+ (or (eq? rtd (record-type-descriptor obj))
+ (scm-error 'wrong-type-arg "%record-type-check"
+ "Wrong type record (want `~S'): ~S"
+ (list (record-type-name rtd) obj)
+ #f)))
+
(define (record-accessor rtd field-name)
(let* ((pos (list-index (record-type-fields rtd) field-name)))
(if (not pos)
(error 'no-such-field field-name))
(local-eval `(lambda (obj)
- (and (eq? ',rtd (record-type-descriptor obj))
- (struct-ref obj ,pos)))
+ (%record-type-check ',rtd obj)
+ (struct-ref obj ,pos))
the-root-environment)))
(define (record-modifier rtd field-name)
@@ -443,8 +450,8 @@
(if (not pos)
(error 'no-such-field field-name))
(local-eval `(lambda (obj val)
- (and (eq? ',rtd (record-type-descriptor obj))
- (struct-set! obj ,pos val)))
+ (%record-type-check ',rtd obj)
+ (struct-set! obj ,pos val))
the-root-environment)))
@@ -779,21 +786,6 @@
;;; See the file `COPYING' for terms applying to this program.
;;;
-(define (exp z)
- (if (real? z) ($exp z)
- (make-polar ($exp (real-part z)) (imag-part z))))
-
-(define (log z)
- (if (and (real? z) (>= z 0))
- ($log z)
- (make-rectangular ($log (magnitude z)) (angle z))))
-
-(define (sqrt z)
- (if (real? z)
- (if (negative? z) (make-rectangular 0 ($sqrt (- z)))
- ($sqrt z))
- (make-polar ($sqrt (magnitude z)) (/ (angle z) 2))))
-
(define expt
(let ((integer-expt integer-expt))
(lambda (z1 z2)
@@ -868,9 +860,6 @@
(/ (log (/ (- +i z) (+ +i z))) +2i))
($atan2 z (car y))))
-(define (log10 arg)
- (/ (log arg) (log 10)))
-
;;; {Reader Extensions}
diff --git a/ice-9/format.scm b/ice-9/format.scm
index 3d17d44df..4bf623757 100644
--- a/ice-9/format.scm
+++ b/ice-9/format.scm
@@ -13,7 +13,6 @@
(define-module (ice-9 format)
:use-module (ice-9 and-let-star)
- :use-module (ice-9 threads)
:autoload (ice-9 pretty-print) (pretty-print)
:replace (format)
:export (format:symbol-case-conv
@@ -1461,8 +1460,8 @@
(if (> format:fn-dot left-zeros)
(begin ; norm 0{0}nn.mm to nn.mm
(format:fn-shiftleft left-zeros)
- (set! left-zeros 0)
- (set! format:fn-dot (- format:fn-dot left-zeros)))
+ (set! format:fn-dot (- format:fn-dot left-zeros))
+ (set! left-zeros 0))
(begin ; normalize 0{0}.nnn to .nnn
(format:fn-shiftleft format:fn-dot)
(set! left-zeros (- left-zeros format:fn-dot))
diff --git a/ice-9/ftw.scm b/ice-9/ftw.scm
index 09b580c05..23f341521 100644
--- a/ice-9/ftw.scm
+++ b/ice-9/ftw.scm
@@ -217,14 +217,33 @@
(define (abs? filename)
(char=? #\/ (string-ref filename 0)))
+;; `visited?-proc' returns a test procedure VISITED? which when called as
+;; (VISITED? stat-obj) returns #f the first time a distinct file is seen,
+;; then #t on any subsequent sighting of it.
+;;
+;; stat:dev and stat:ino together uniquely identify a file (see "Attribute
+;; Meanings" in the glibc manual). Often there'll be just one dev, and
+;; usually there's just a handful mounted, so the strategy here is a small
+;; hash table indexed by dev, containing hash tables indexed by ino.
+;;
+;; It'd be possible to make a pair (dev . ino) and use that as the key to a
+;; single hash table. It'd use an extra pair for every file visited, but
+;; might be a little faster if it meant less scheme code.
+;;
(define (visited?-proc size)
- (let ((visited (make-hash-table size)))
+ (let ((dev-hash (make-hash-table 7)))
(lambda (s)
- (and s (let ((ino (stat:ino s)))
- (or (hash-ref visited ino)
- (begin
- (hash-set! visited ino #t)
- #f)))))))
+ (and s
+ (let ((ino-hash (hashv-ref dev-hash (stat:dev s)))
+ (ino (stat:ino s)))
+ (or ino-hash
+ (begin
+ (set! ino-hash (make-hash-table size))
+ (hashv-set! dev-hash (stat:dev s) ino-hash)))
+ (or (hashv-ref ino-hash ino)
+ (begin
+ (hashv-set! ino-hash ino #t)
+ #f)))))))
(define (stat-dir-readable?-proc uid gid)
(let ((uid (getuid))