]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily.scm
release: 1.3.147
[lilypond.git] / scm / lily.scm
index f8b1a671ed85e3e835465aacc6969cc1f7413b2b..352dc965412ffba4b67bfe2befb9c7fc04e9f2f5 100644 (file)
 
 (debug-enable 'backtrace)
 
+
 (define point-and-click #f)
 (define security-paranoia #f)
+(define midi-debug #f)
+
+(define (line-column-location line col file)
+  "Print an input location, including column number ."
+  (string-append (number->string line) ":"
+                (number->string col) " " file)
+  )
+
+(define (line-location line col file)
+  "Print an input location, without column number ."
+  (string-append (number->string line) " " file)
+  )
+
+;; cpp hack to get useful error message
+(define ifdef "First run this through cpp.")
+(define ifndef "First run this through cpp.")
+  
 (define default-script-alist '())
 (define font-name-alist  '())
 
@@ -35,7 +53,7 @@
 
 ;;; Un-assorted stuff
 
-;; URG guile-1.3/1.4 compatibility
+;; URG guile-1.4/1.4.x compatibility
 (define (ly-eval x) (eval2 x #f))
 
 (define (sign x)
       1
       (if (< x 0) -1 1)))
 
-
-;;(define major-scale
-;;  '(
-;;    (0 . 0)
-;;    (1 . 0)
-;;    (2 . 0)
-;;    (3 . 0)
-;;    (4 . 0)
-;;    (5 . 0)
-;;    (6 . 0)
-;;   ))
+(define (write-me n x)
+  (display n)
+  (write x)
+  (newline)
+  x)
+
+(define (empty? x)
+  (equal? x '()))
+
+(define (!= l r)
+  (not (= l r)))
+
+(define (filter-list pred? list)
+  "return that part of LIST for which PRED is true."
+  (if (null? list) '()
+      (let* ((rest  (filter-list pred? (cdr list))))
+       (if (pred?  (car list))
+           (cons (car list)  rest)
+           rest))))
+
+(define (uniqued-alist  alist acc)
+  (if (null? alist) acc
+      (if (assoc (caar alist) acc)
+         (uniqued-alist (cdr alist) acc)
+         (uniqued-alist (cdr alist) (cons (car alist) acc)))))
+
+(define (uniq-list list)
+  (if (null? list) '()
+      (if (null? (cdr list))
+         list
+         (if (equal? (car list) (cadr list))
+             (uniq-list (cdr list))
+             (cons (car list) (uniq-list (cdr list)))))))
+
+(define (alist<? x y)
+  (string<? (symbol->string (car x))
+           (symbol->string (car y))))
 
 
 (map (lambda (x) (eval-string (ly-gulp-file x)))
      '("output-lib.scm"
        "tex.scm"
        "ps.scm"
-       ;; "ascii-script.scm"
+       "ascii-script.scm"
        ))
 
 (if (not standalone)
           "chord-name.scm"
           "grob-description.scm"
           "script.scm"
+          "drums.scm"
           "midi.scm"
           )))