]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/note-column.cc: reformat.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 16 Sep 2006 21:26:49 +0000 (21:26 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 16 Sep 2006 21:26:49 +0000 (21:26 +0000)
* lily/rest-collision.cc (calc_positioning_done): fix whole/half
step positioning for note/rest combinations.

* input/regression/rest-note-collision.ly: new file.

* scm/define-grobs.scm (all-grob-descriptions): add
springs-and-rods

* flower/include/std-vector.hh: switch off again.

* VERSION (PATCH_LEVEL): bump to 2.9.18

* flower/include/std-string.hh: idem.

* flower/include/std-vector.hh (_GLIBCXX_DEBUG): set if NDEBUG not set.

12 files changed:
ChangeLog
VERSION
flower/include/std-string.hh
flower/include/std-vector.hh
flower/std-string.cc
input/regression/rest-note-collision.ly [new file with mode: 0644]
lily/font-config.cc
lily/note-column.cc
lily/rest-collision.cc
scm/define-grobs.scm
scm/part-combiner.scm
stepmake/aclocal.m4

index 971f21d0932881f98a8215b878995f002b7a34d6..0e8b212ff677d9d19bf2c8987eab4b8d2e072966 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,20 @@
-2006-09-15  Han-Wen Nienhuys  <hanwen@lilypond.org>
+2006-09-16  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
-       * stepmake/aclocal.m4: use -D_GLIBCXX_DEBUG if optimize not set.
+       * lily/rest-collision.cc (calc_positioning_done): fix whole/half
+       step positioning for note/rest combinations.
+
+       * input/regression/rest-note-collision.ly: new file.
+
+       * scm/define-grobs.scm (all-grob-descriptions): add
+       springs-and-rods
+
+       * flower/include/std-vector.hh: switch off again.
+
+       * VERSION (PATCH_LEVEL): bump to 2.9.18
+
+       * flower/include/std-string.hh: idem.
+
+       * flower/include/std-vector.hh (_GLIBCXX_DEBUG): set if NDEBUG not set.
 
 2006-09-15  Mats Bengtsson  <mabe@drongo.s3.kth.se>
 
diff --git a/VERSION b/VERSION
index f14c281e486407f8d1d6da4d88aa5028b87665ee..9d5789cd29d6ff881a5077fe78eac10a673cb6a2 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=9
-PATCH_LEVEL=17
+PATCH_LEVEL=18
 MY_PATCH_LEVEL=
 
index bc2fd61ee5f75bd90ccbd02692b7514aa72ac006..d0fdd9c9782d77accc33f7001a63ebdeea5f7ca5 100644 (file)
  
 #include "compare.hh"
 
+#if 0
+/*
+  leads to dubious crashes - libstdc++  bug?
+ */
+#ifndef NDEBUG
+#define _GLIBCXX_DEBUG 1
+#endif
+#endif
+
 #include <string>
 
 using namespace std;
index 55b28d7da641cb9701dc09125a48942ba509b12c..da3686a07c813eb7ab036d3e151c7c6af762d4ee 100644 (file)
@@ -9,6 +9,16 @@
 #ifndef STD_VECTOR_HH
 #define STD_VECTOR_HH
 
+#if 0
+
+/*
+  leads to dubious crashes - libstdc++  bug?
+*/
+#ifndef NDEBUG
+#define _GLIBCXX_DEBUG 1
+#endif
+#endif
+
 #include <algorithm>   /* find, reverse, sort */
 #include <functional>  /* unary_function */
 #include <cassert>
index 4069278cb20d35fc2cd5b15cc0e5b0ec25c86df8..6d8ebd52f5ba7fe7d00319176feec7150b14eb9d 100644 (file)
@@ -106,8 +106,9 @@ string_compare (string const &a, string const &b)
 vector<string>
 string_split (string str, char c)
 {
-  vector<string> a;
   ssize i = str.find (c);
+
+  vector<string> a;
   while (i != NPOS)
     {
       string s = str.substr (0, i);
diff --git a/input/regression/rest-note-collision.ly b/input/regression/rest-note-collision.ly
new file mode 100644 (file)
index 0000000..9b8f1a8
--- /dev/null
@@ -0,0 +1,31 @@
+
+\header {
+
+  texidoc = "In rest-note collisions, the rest moves in discrete
+  steps, and inside the staff, it moves in whole staff spaces."
+
+       }
+
+
+\version "2.9.18"
+\new Staff {
+
+  <<
+    \relative c'' {
+      f e d c b a g f e d c
+    }
+    \\
+    {
+      r4 r r r r r r r r r r
+    }
+  >>
+  <<
+    {
+      r4 r r r r r r r r r r
+    }
+    \\
+    \relative c'' {
+      f e d c b a g f e d c
+    }
+  >>
+}
index 0993f8183722a982a11cb72c2542c530a5365ef3..afa210a7ad4faba7d0ea887d4ee4634e10138333 100644 (file)
@@ -50,7 +50,7 @@ init_fontconfig ()
     {
       string dir = dirs[i];
       if (!FcConfigAppFontAddDir (font_config_global, (FcChar8 *)dir.c_str ()))
-       error (_f ("adding font directory: %s", dir.c_str ()));
+       error (_f ("failed adding font directory: %s", dir.c_str ()));
       else if (be_verbose_global)
        message (_f ("adding font directory: %s", dir.c_str ()));
     }
index ba8ebd6fd8c700fbe4d1fd28160631ac478068c6..c77aa351f5a8f379189187e3311b9ac6889d385a 100644 (file)
@@ -188,4 +188,14 @@ Note_column::arpeggio (Grob *me)
 
 ADD_INTERFACE (Note_column, "note-column-interface",
               "Stem and noteheads combined",
-              "arpeggio note-heads rest-collision rest horizontal-shift stem accidentals force-hshift");
+
+              /* properties */
+              "accidentals "
+              "arpeggio "
+              "force-hshift "
+              "horizontal-shift "
+              "note-heads "
+              "rest "
+              "rest-collision "
+              "stem "
+              );
index 589dd0dbecf9cb1e2739161b2dbbab691280a9df..e10a7f0cc49fca061aa20925ca41d88a6edff31c 100644 (file)
@@ -212,13 +212,14 @@ Rest_collision::calc_positioning_done (SCM smob)
       for (vsize i = rests.size (); !rcol && i--;)
        if (Note_column::dir (rests[i]))
          {
-           dir = Note_column::dir (rests[i]);
            rcol = rests[i];
+           dir = Note_column::dir (rcol);
          }
 
       if (!rcol)
        return SCM_UNSPECIFIED;
 
+      Grob *rest = Note_column::get_rest (rcol);
       Grob *common = common_refpoint_of_array (notes, rcol, Y_AXIS);
 
       Interval restdim = rcol->extent (common, Y_AXIS);
@@ -232,9 +233,10 @@ Rest_collision::calc_positioning_done (SCM smob)
       for (vsize i = 0; i < notes.size (); i++)
        notedim.unite (notes[i]->extent (common, Y_AXIS));
 
-      Real dist
-       = minimum_dist + dir * max (notedim[dir] - restdim[-dir], 0.0);
 
+      Real y = dir * max (0.0,
+                         -dir * restdim[-dir] + dir * notedim[dir]  + minimum_dist);
+      
       int stafflines = Staff_symbol_referencer::line_count (me);
       if (!stafflines)
        {
@@ -243,13 +245,16 @@ Rest_collision::calc_positioning_done (SCM smob)
        }
 
       // move discretely by half spaces.
-      int discrete_dist = int (ceil (dist / (0.5 * staff_space)));
+      int discrete_y = dir * int (ceil (y / (0.5 * dir * staff_space)));
 
       // move by whole spaces inside the staff.
-      if (discrete_dist < stafflines + 1)
-       discrete_dist = int (ceil (discrete_dist / 2.0) * 2.0);
+      if (fabs (Staff_symbol_referencer::get_position (rest)
+               + discrete_y) < stafflines + 1)
+       {
+         discrete_y = dir * int (ceil (dir * discrete_y / 2.0) * 2.0);
+       }
 
-      Note_column::translate_rests (rcol, dir * discrete_dist);
+      Note_column::translate_rests (rcol, discrete_y);
     }
   return SCM_UNSPECIFIED;
 }
index 07971e2f91bcfbf5da139b56bf60c007124d51f8..05b7d5eb2c74de0863bf720945892709b57e463b 100644 (file)
     (Tie
      . (
        (control-points . ,ly:tie::calc-control-points)
+       (springs-and-rods . ,ly:spacing-spanner::set-springs)
        (avoid-slur . inside)
        (direction . ,ly:tie::calc-direction)
        (stencil . ,ly:tie::print)
index c92ea2f3dbb07020641ea5764bcc9e8a8618a522..bd9ce0f720f0cd5e65a0f43063bc25951427fb29 100644 (file)
@@ -400,7 +400,10 @@ Only set if not set previously.
       
       (define (try-solo type start-idx current-idx)
        "Find a maximum stretch that can be marked as solo. Only set
-the mark when there are no spanners active."
+the mark when there are no spanners active.
+
+      return next idx to analyse.
+"
        (if (< current-idx (vector-length result))
            (let* ((now-state (vector-ref result current-idx))
                   (solo-state (current-voice-state now-state (if (equal? type 'solo1) 1 2)))
@@ -416,6 +419,7 @@ the mark when there are no spanners active."
                     current-idx)
                    ((and
                      (null? (span-state solo-state)))
+
                     ;;
                     ;; This includes rests. This isn't a problem: long rests
                     ;; will be shared with the silent voice, and be marked
index 4cc525ea2a6b18e4ba6d4e98efa01b01b07ee5dd..813b8309775e6c9f7b0fa021b305a336473cb0fb 100644 (file)
@@ -194,8 +194,6 @@ AC_DEFUN(STEPMAKE_COMPILE, [
        AC_DEFINE(NDEBUG)
        DEFINES="$DEFINES -DNDEBUG"
        OPTIMIZE=" -O2 -finline-functions"
-    else
-        DEFINES="$DEFINES -D_GLIBCXX_DEBUG"
     fi
 
     if test $profile_b = yes; then