CVSROOT: /cvsroot/lilypond
Module name: lilypond
Branch:
Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/06/06 19:25:58
Modified files:
. : ChangeLog
scm : ps-to-png.scm
Log message:
(gulp-port): rename from read. Don't redefine
system primitives.
(gulp-port): using read-string!/partial. We don't want to read an
entire PS file (GUILE 1.6 limits strings to 16M)
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3725&tr2=1.3726&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/ps-to-png.scm.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3725 lilypond/ChangeLog:1.3726
--- lilypond/ChangeLog:1.3725 Mon Jun 6 18:44:50 2005
+++ lilypond/ChangeLog Mon Jun 6 19:25:54 2005
@@ -1,5 +1,10 @@
2005-06-06 Han-Wen Nienhuys <[EMAIL PROTECTED]>
+ * scm/ps-to-png.scm (gulp-port): rename from read. Don't redefine
+ system primitives.
+ (gulp-port): using read-string!/partial. We don't want to read an
+ entire PS file (GUILE 1.6 limits strings to 16M)
+
* scm/define-grobs.scm (all-grob-descriptions): remove arch-*
properties. Add font-interface.
Index: lilypond/scm/ps-to-png.scm
diff -u lilypond/scm/ps-to-png.scm:1.1 lilypond/scm/ps-to-png.scm:1.2
--- lilypond/scm/ps-to-png.scm:1.1 Mon Jun 6 07:57:06 2005
+++ lilypond/scm/ps-to-png.scm Mon Jun 6 19:25:58 2005
@@ -9,7 +9,7 @@
(use-modules
(ice-9 optargs)
(ice-9 regex)
- (ice-9 rdelim)
+ (ice-9 rw)
(srfi srfi-1))
;; gettext wrapper for guile < 1.7.2
@@ -20,9 +20,12 @@
(define (re-sub re sub string)
(regexp-substitute/global #f re string 'pre sub 'post))
-(define (read port)
- (let ((s (read-delimited "" port)))
- (if (eof-object? s) "" s)))
+(define (gulp-port port how-much)
+ (let*
+ ((str (make-string how-much)))
+
+ (read-string!/partial str port)
+ str))
(define (dir-listing dir-name)
(define (dir-helper dir lst)
@@ -48,7 +51,7 @@
-c quit 2>~S"
file-name bbox))
(status (system cmd))
- (s (read (open-file bbox "r")))
+ (s (gulp-port (open-file bbox "r") 10240))
(m (string-match BOUNDING_BOX_RE s)))
(display m)
(newline)
@@ -64,7 +67,7 @@
(rename-page-1? #f)
(verbose? #f))
(let* ((base (basename (re-sub "\.e?ps" "" ps-name)))
- (header (read (open-file ps-name "r")))
+ (header (gulp-port (open-file ps-name "r") 10240))
(png1 (string-append base ".png"))
(pngn (string-append base "-page%d.png"))
(pngn-re (re-sub "%d" "[0-9]*" pngn))
_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs