]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 21 Sep 2004 15:17:38 +0000 (15:17 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 21 Sep 2004 15:17:38 +0000 (15:17 +0000)
ChangeLog
lily/parse-scm.cc
scm/framework-tex.scm
scm/safe-lily.scm

index 57b6ce4b10812cde0ecd0f046a891d41e483727f..5c078f5577fcd8bab83dbabec27ce9e9f5e4f351 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,13 @@
 
 2004-09-21  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * lily/parse-scm.cc (internal_ly_parse_scm): Eval in module, not
+       in function.
+
+       * scm/framework-tex.scm (convert-to-dvi): Use nonstopmode.  Set
+       openout_any=p.  Throughout: progress to stderr, translate user
+       messages.
+
        * scm/output-gnome.scm: Fix font dir description.
 
 2004-09-20  Han-Wen Nienhuys   <hanwen@xs4all.nl>
index 5189f3247915697961a6f5a22e61fabbc8c59180..2ad5a0c1ce5426de046b0d8892753d6686eb3b5b 100644 (file)
@@ -38,9 +38,16 @@ internal_ly_parse_scm (Parse_start * ps)
   /* Read expression from port.  */
   if (!SCM_EOF_OBJECT_P (form = scm_read (port)))
     {
-      SCM function = ly_scheme_function ("make-safe-lilypond-module");
       if (ps->safe_)
-       answer = scm_eval (form, function);
+       {
+         static SCM module = SCM_BOOL_F;
+         if (module == SCM_BOOL_F)
+           {
+             SCM function = ly_scheme_function ("make-safe-lilypond-module");
+             module = scm_call_0 (function);
+           }
+         answer = scm_eval (form, module);
+       }
       else
        answer = scm_primitive_eval (form);
     }
index eeee26df6dd20737fce1d8032e4fffba1484e166..3b0b9ad09462abcf06abfb4e5b46130422cfc981 100644 (file)
             (srfi srfi-13)
             (lily))
 
-(define-public (sanitize-tex-string s) ;; todo: rename
+;; FIXME: rename
+;; what is bla supposed to do?  It breaks the default output terribly:
+
+;; \def\lilypondpaperbla$\backslash${$\backslash$}{bla$\backslash${$\backslash$}}%
+;; \lyitem{089.5557}{-15.3109}{\hbox{\magfontUGQLomTVo{}bla$\backslash${$\backslash$}}}%
+;; --jcn
+(define-public (sanitize-tex-string s)
    (if (ly:get-option 'safe)
       (regexp-substitute/global #f "\\\\"
                                (regexp-substitute/global #f "([{}])" "bla{}" 'pre  "\\" 1 'post )
@@ -55,7 +61,8 @@
 
 (define (define-fonts bookpaper)
   (string-append
-   "\\def\\lilypondpaperunit{mm}" ;; UGH. FIXME.
+   ;; UGH. FIXME.   
+   "\\def\\lilypondpaperunit{mm}\n"
    (tex-number-def "lilypondpaper" 'outputscale
                   (number->string (exact->inexact
                                    (ly:bookpaper-outputscale bookpaper))))
   (if (not (equal? "-" fn))
       (set! fn (string-append fn "." key)))
   (display
-   (format "Writing header field `~a' to `~a'..."
+   (format (_ "Writing header field `~a' to `~a'...")
           key
           (if (equal? "-" fn) "<stdout>" fn)
-          )
+          (current-error-port))
    (current-error-port))
   (if (equal? fn "-")
       (display val)
       (display val (open-file fn "w")))
-  (display "\n" (current-error-port))
+  (newline (current-error-port))
   "")
 
 (define (output-scopes  scopes fields basename)
         (tex-string-def "lilypond" 'classic "1")
         "")
 
+     (if (ly:get-option 'safe)
+        "\\nofiles\n"
+        "")
+
      (tex-string-def
       "lilypondpaper" 'linewidth
       (ly:number->string (* scale (ly:output-def-lookup bookpaper 'linewidth))))
 
 (define-public (convert-to-ps book name)
   (let*
-      ((cmd (string-append "dvips -u+ec-mftrace.map -u+lilypond.map -Ppdf " (basename name ".tex"))))
+      ((cmd (string-append "dvips -u+ec-mftrace.map -u+lilypond.map -Ppdf "
+                          (basename name ".tex"))))
 
-    (display (format #f "invoking ~S" cmd))
+    (display (format #f (_ "Invoking ~S") cmd) (current-error-port))
+    (newline (current-error-port))
     (system cmd)))
 
 (define-public (convert-to-dvi book name)
   (let*
-      ((cmd (string-append "latex " name)))
+      ((cmd (string-append "latex \\\\nonstopmode \\\\input " name)))
 
-    (display (format #f "invoking ~S\n" cmd))
+    (display (format #f (_ "Invoking ~S") cmd) (current-error-port))
+    (newline (current-error-port))
+
+    ;; fixme: set in environment?
+    (if (ly:get-option 'safe)
+       (set! cmd (string-append "openout_any=p " cmd)))
+    
     (system cmd)))
 
 (define-public (convert-to-tex book name)
index b47f9d42601d60080bec6cb849374dfe89177faf..1c33c06ba37e1431cffc71f9870d2c57a96dbb04 100644 (file)
      ly:version
      ly:warn
 
+     ;; SCM-only functionality
+     set-global-staff-size
+
+     ;; FIXME: cannot change staff size in --safe-mode
+     ;;$defaultbookpaper
+     ;;$defaultmidi
+     ;;$defaultpaper
+
      ;; need these for parsing init files:
      ;; todo: should have a macro define-safe-public
      DOUBLE-FLAT
-     THREE-Q-FLAT
+     DOUBLE-SHARP
      FLAT
-     SEMI-FLAT
      NATURAL
+     SEMI-FLAT
      SEMI-SHARP
-     SHARP
-     THREE-Q-SHARP
-     DOUBLE-SHARP
      SEMI-TONE
+     SHARP
      START
      STOP
+     THREE-Q-FLAT
+     THREE-Q-SHARP
+
      alist->hash-table
+     chord-name->german-markup
+     context-spec-music
      default-chord-modifier-list
-     sequential-music-to-chord-exceptions
-     make-music
      make-articulation
      make-event-chord
+     make-music
      make-penalty-music
      make-span-event
-     set-start-grace-properties
-     set-stop-grace-properties
-     set-default-paper-size
-     set-part-combine-listener
-     context-spec-music
      make-voice-props-revert
      make-voice-props-set
-     chord-name->german-markup
      note-name->german-markup
+     sequential-music-to-chord-exceptions
+     set-default-paper-size
+     set-part-combine-listener
+     set-start-grace-properties
+     set-stop-grace-properties
 
      Accidental_interface::after_line_breaking
      Accidental_interface::print