]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/time-signature-performer.cc (derived_mark): new function.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 5 Apr 2005 10:22:50 +0000 (10:22 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 5 Apr 2005 10:22:50 +0000 (10:22 +0000)
* scripts/lilypond-book.py (find_linestarts): new function.
(find_toplevel_snippets): keep track of line numbers.

ChangeLog
Documentation/topdocs/NEWS.tely
lily/spaceable-grob.cc
lily/time-signature-performer.cc
scm/backend-library.scm
scm/framework-ps.scm
scripts/lilypond-book.py

index 4b504977fb481d3ae86b0f160696d4c62a1ccb14..aa5fe5bacd72587d523eee125f2f024b3eec0cce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2005-04-05  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * lily/time-signature-performer.cc (derived_mark): new function.
+
        * lily/lily-parser-scheme.cc:  print mapped file name for progress
 
        * scripts/lilypond-book.py (find_linestarts): new function.
index b2d3a33272c8cc7a79dbb628e3cb544a818d9099..e540e5561587beb2ad48e8499d995f7df6e6aa66 100644 (file)
@@ -30,6 +30,11 @@ See user manual, \NAME\
 
 
 @itemize @bullet
+
+@item
+@file{lilypond-book} now makes @file{lilypond} print line numbers
+relative to the input file for every error message.
+  
 @item
 A new @code{\circle} markup command allows for all kinds of circled texts
 
index 13760ce36aa0abefee9ca35f5c2505b0fc72af64..d4c1c3bd5e782dde3ce24ba0947730d3fd1183a9 100644 (file)
@@ -27,9 +27,12 @@ void
 Spaceable_grob::add_rod (Grob *me, Grob *p, Real d)
 {
   //  printf ("rod %lf\n", d);
-  if (isinf (d) || d < 0)
+  if (d < 0)
+    return ;
+  
+  if (isinf (d))
     {
-      programming_error ("Weird rod");
+      programming_error ("Infinite rod");
     }
 
   SCM mins = get_minimum_distances (me);
index b02a15bfa7622ecda583ac73bc1f89ffadae6f73..397b3cf653be7444b5e30347c2b53139d6c66e91 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "audio-item.hh"
 #include "performer.hh"
+#include "protected-scm.hh"
 
 class Time_signature_performer : public Performer
 {
@@ -19,13 +20,19 @@ protected:
 
   virtual void stop_translation_timestep ();
   virtual void create_audio_elements ();
-
+  virtual void derived_mark () const;
   SCM prev_fraction_;
 private:
 
   Audio_time_signature *audio_;
 };
 
+void
+Time_signature_performer::derived_mark () const
+{
+  scm_gc_mark (prev_fraction_);
+}
+
 Time_signature_performer::Time_signature_performer ()
 {
   prev_fraction_ = SCM_BOOL_F;
index f162ea97d76717310da8fd17db00f3c12de5ff86..55d19f28d912d594177dfc2ab1366f615fe9a7db 100644 (file)
@@ -90,7 +90,7 @@
      (if (member x formats) (set! new-fmts (cons x new-fmts))))
    '("tex" "dvi" "ps" "pdf" "png"))
 
-  (reverse new-fmts))
+  (uniq-list (reverse new-fmts)))
 
 (define (header-to-file file-name key value)
   (set! key (symbol->string key))
index 1e0deba2050b356d4d5498b9ea0dc8cab47d129e..ee072d05ac9b12a33e9a7c5ba4c051760b5a12c5 100644 (file)
 
     (display "%%Trailer\n%%EOF\n" port)
     (ly:outputter-close outputter)
-    (postprocess-output book framework-ps-module filename (ly:output-formats))
+    (postprocess-output book framework-ps-module filename
+                        (completize-formats (ly:output-formats)))
 ))
 
 (if (not (defined? 'nan?))
index 5b24c8e0a664f855628efb5f3cd352fe169a14f9..bb90debaf7e323f2bab4d495b3425f5e863b2e92 100644 (file)
@@ -1088,13 +1088,14 @@ def find_toplevel_snippets (s, types):
                                if snippet_type_to_class.has_key (type):
                                        cl = snippet_type_to_class[type]
 
+                               
+                               start = index + m.start ('match')
                                line_number = line_start_idx
-                               while (line_starts[line_number] < index):
+                               while (line_starts[line_number] < start):
                                        line_number += 1
 
                                line_number += 1
                                snip = cl (type, m, format, line_number)
-                               start = index + m.start ('match')
                                found[type] = (start, snip)
 
                        if found[type] \