]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' of ssh+git://hanwen@git.sv.gnu.org/srv/git/lilypond
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 3 Jan 2007 13:35:31 +0000 (14:35 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 3 Jan 2007 13:35:31 +0000 (14:35 +0100)
GNUmakefile.in
buildscripts/output-distance.py
input/regression/hairpin-to-rest.ly [new file with mode: 0644]
lily/hairpin.cc
scm/lily.scm

index 9718820f6259dc0a3b9999e8f584fd018c7c9c09..b7a2421caf61fcf80da8b2999e409a03c8a46455 100644 (file)
@@ -207,7 +207,7 @@ $(config_h): config.hh.in
 
 
 test:
-       rm input/regression/out-test/collated-files.html
+       rm -f input/regression/out-test/collated-files.html
        $(MAKE) -C input/regression/ out=test LILYPOND_BOOK_LILYPOND_FLAGS="--backend=eps --formats=ps $(LILYPOND_JOBS) -dseparate-log-files -dinclude-eps-fonts -dgs-load-fonts --header=texidoc -I $(top-src-dir)/input/manual -ddump-profile -dcheck-internal-types -ddump-signatures -danti-alias-factor=1" LILYPOND_BOOK_VERBOSE= out-test/collated-files.html 
        @find input ly -name '*.ly' -print |grep -v 'out.*/' | xargs grep '\\version' -L | grep -v "standard input" |sed 's/^/**** Missing version: /g' 
 
index 9e3926fcc7a3253e2e64c7ea43979d36c82e46a6..aaf60cbcbb2263dcf59243bd61108245abc8dc52 100644 (file)
@@ -347,6 +347,10 @@ class FileCompareLink (FileLink):
         self.contents = (self.get_content (self.files[0]),
                          self.get_content (self.files[1]))
         
+    def link_files_for_html (self, old_dir, new_dir, dest_dir):
+        for f in self.files:
+            link_file (f, os.path.join (dest_dir, f))
+
     def name (self):
         name = os.path.basename (self.files[0])
         name = os.path.splitext (name)[0]
@@ -389,9 +393,9 @@ class ProfileFileLink (FileCompareLink):
 
         dist = 0.0
         for k in ('time', 'cells'):
-            (v1,v2) = (r[0].get (k ,0),
-                       r[1].get (k ,0))
-            if v1 + v2 <= 0:
+            (v1,v2) = (r[0].get (k , -1),
+                       r[1].get (k , -1))
+            if v1 < 0 or v2 < 0 or float (v1 + v2) == 0.0:
                 continue
 
             ratio = v2 / float (v1+v2)
@@ -404,8 +408,8 @@ class ProfileFileLink (FileCompareLink):
 class TextFileCompareLink (FileCompareLink):
     def calc_distance (self):
         import difflib
-        diff = difflib.unified_diff (self.contents[0].split ('\n'),
-                                     self.contents[1].split ('\n'),
+        diff = difflib.unified_diff (self.contents[0].strip().split ('\n'),
+                                     self.contents[1].strip().split ('\n'),
                                      fromfiledate = self.files[0],
                                      tofiledate = self.files[1]
                                      )
diff --git a/input/regression/hairpin-to-rest.ly b/input/regression/hairpin-to-rest.ly
new file mode 100644 (file)
index 0000000..3ba757d
--- /dev/null
@@ -0,0 +1,11 @@
+\version "2.10.8"
+\header {
+  texidoc = "Hairpins end at the left edge of a rest."
+}
+
+\layout{
+  ragged-right=##t
+}
+\relative c'' {
+  c2\p\> r4\!
+}
index e0916cd99d98c4a0d524155d81fa57bf800b787a..6bb83b16a61fbb3ffaa90a1bb9be03b8e8a29856 100644 (file)
@@ -9,16 +9,15 @@
 #include "hairpin.hh"
 
 #include "dimensions.hh"
-#include "font-interface.hh"
 #include "international.hh"
 #include "line-interface.hh"
-#include "lookup.hh"
 #include "output-def.hh"
 #include "paper-column.hh"
 #include "pointer-group-interface.hh"
 #include "spanner.hh"
 #include "staff-symbol-referencer.hh"
 #include "text-interface.hh"
+#include "note-column.hh"
 #include "warn.hh"
 
 MAKE_SCHEME_CALLBACK (Hairpin, after_line_breaking, 1);
@@ -167,7 +166,12 @@ Hairpin::print (SCM smob)
                }
              else
                {
-                 x_points[d] = e[d];
+                 if (Note_column::has_interface (b)
+                     && Note_column::has_rests (b))
+                   x_points[d] = e[-d];
+                 else
+                   x_points[d] = e[d];
+                 
                  Item *bound = me->get_bound (d);
                  if (bound->is_non_musical (bound))
                    x_points[d] -=  d * padding;
index dfa5120c7766f32fe3347a5d8d13bd0ae3d1f6d0..33f3c9014c3adaff1f0a58036631057c6937dbe2 100644 (file)
@@ -370,7 +370,8 @@ The syntax is the same as `define*-public'."
      (- (tms:utime t)
        (ly:assoc-get 'gc-time-taken stats))
 
-     (ly:assoc-get 'total-cells-allocated  stats 0)
+     ;; unreliable...
+     ;;(ly:assoc-get 'total-cells-allocated  stats 0)
      ;; difficult to put memory amount stats into here.
      
      )))