]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scripts/as2text.scm: Use rdelim module.
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 27 May 2003 15:49:27 +0000 (15:49 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 27 May 2003 15:49:27 +0000 (15:49 +0000)
(start-system): Rename from start-line.
(stop-system): Rename from stop-line.
(af-gulp-file): Use string iso symbol for getenv.

* scm/output-ascii-script.scm: Add guile and lily modules.
(font-name-alist): New variable.
(draw-line): New function.

* scm/output-lib.scm (func, arg->string): Re-add from archive.
(Were these silently removed, without ChangeLog entry?)

ChangeLog
scm/output-ascii-script.scm
scm/output-lib.scm
scripts/as2text.scm

index 6a6e0e019fbb9712df2f5ee7e9911915c782890c..176fa3590719b518649b86a7fba05b5943957020 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2003-05-27  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * scripts/as2text.scm: Use rdelim module.
+       (start-system): Rename from start-line.
+       (stop-system): Rename from stop-line.
+       (af-gulp-file): Use string iso symbol for getenv.
+
+       * scm/output-ascii-script.scm: Add guile and lily modules.
+       (font-name-alist): New variable.
+       (draw-line): New function.
+
+       * scm/output-lib.scm (func, arg->string): Re-add from archive.
+       (Were these silently removed, without ChangeLog entry?)
+
 2003-05-27  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
        * scm/music-functions.scm (make-ottava-set): bugfixes: also
index d938458813699962cbe8e1dbe363fa81462ffec3..c98c383a35456a784c21921fc58c523ac0ab4bcb 100644 (file)
@@ -1,8 +1,13 @@
 (define-module (scm output-ascii-script)
   )
 
+(use-modules (guile)
+            (lily))
+
 (define this-module (current-module))
 
+(define font-name-alist  '())
+
 (define-public (as-output-expression expr port)
   (display (eval expr this-module) port)
   )
 (define (roundfilledbox breapth width depth height blot)
   (filledbox breapth width depth height))
 
+(define (draw-line thick x1 y1 x2 y2)
+  (filledbox 0 (- x2 x1) 0 (- y2 y1)))
+            
 (define (font-load-command name-mag command)
   ;; (display "name-mag: ")
   ;; (write name-mag)
index 7e0aea7f83aace8775160f7ef6e31da87388de54..fbc4cfd8ad86945e55e1e322385be7c624ff5395 100644 (file)
  molecule-boxer
  )
 
+(define-public (arg->string arg)
+  (cond ((number? arg) (inexact->string arg 10))
+       ((string? arg) (string-append "\"" arg "\""))
+       ((symbol? arg) (string-append "\"" (symbol->string arg) "\""))))
+
+(define-public (func name . args)
+  (string-append
+   "(" name
+   (if (null? args)
+       ""
+       (apply string-append
+             (map (lambda (x) (string-append " " (arg->string x))) args)))
+   ")\n"))
+
 ;;(define (mm-to-pt x)
 ;;  (* (/ 72.27 25.40) x))
 
 ;; do nothing in .scm output
-(define (comment s) "")
+(define-public (comment s) "")
 
 (define-public (numbers->string l)
   (apply string-append (map ly:number->string l)))
index 52381cd7060c86d271ed63c10b9e6a20de37eb06..04f3c51e3653240dec9a56fcb94ca6bb05b9405a 100644 (file)
@@ -9,10 +9,11 @@
 
 ;;;; library funtions
 (use-modules
-   (ice-9 debug)
-  (ice-9 getopt-long)
-  (ice-9 string-fun)
-  (ice-9 regex))
+ (ice-9 debug)
+ (ice-9 getopt-long)
+ (ice-9 string-fun)
+ (ice-9 rdelim)
+ (ice-9 regex))
 
 ;;; Script stuff
 (define program-name "as2text")
@@ -167,7 +168,7 @@ Options:
   (let ((old-load-path %load-path))
        (set! %load-path 
             (cons (string-append 
-                   (or (getenv 'LILYPONDPREFIX) ".") "/mf")
+                   (or (getenv "LILYPONDPREFIX") ".") "/mf")
                   (cons (string-append lily-home "/mf") %load-path)))
        (let* ((path (%search-load-path name)) 
              (text (if path
@@ -390,7 +391,7 @@ Options:
 (define (set-line-char c)
   (set! line-char c))
 
-(define (start-line height)
+(define (start-system width height)
   (if first-line 
       (begin
        (set! fonts (cons (cons "default" (generate-default-font)) fonts))
@@ -410,7 +411,7 @@ Options:
   (set! canvas-height (inexact->exact (* scaling height)))
   (set! canvas (make-array " " canvas-height canvas-width)))
 
-(define (stop-line)
+(define (stop-system)
   (if first-line
       (let ((output-file (if (equal? cur-output-name "-")
                              (current-output-port)