(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 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
(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)
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)))
;;;; 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")
(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
(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))
(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)