]> git.donarmstrong.com Git - lilypond.git/commitdiff
run cvs up before patching.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 7 Nov 2006 18:27:31 +0000 (18:27 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 7 Nov 2006 18:27:31 +0000 (18:27 +0000)
use (sign dir) for computing attachment points.
another (sign dir) fix for note markup
use stem::calc-duration-log for rest.
don't use guile -e main execution.
Examine Stem::duration_log() for preventing merge of quarter and halfnote. Fixes collision-heads.ly. Add separate regtest for that.
trim example.
excise cmr10
formatting.
use  SCM_ASSERT_TYPE for graphing functions.
nitpicks.

14 files changed:
ChangeLog
buildscripts/git-update-changelog.py
input/regression/collision-heads.ly
input/regression/collision-merge-differently-headed.ly [new file with mode: 0644]
lily/all-font-metrics.cc
lily/break-substitution.cc
lily/cluster.cc
lily/dynamic-text-spanner.cc
lily/engraver.cc
lily/grob-property.cc
lily/note-collision.cc
scm/define-grobs.scm
scm/define-markup-commands.scm
scripts/lilypond-invoke-editor.scm

index c4407c4a6103928942a000b2614f758cb68a7092..43a22c48b592d34d9c69149f9676cef07bacae11 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,41 @@
+2006-11-07  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * lily/break-substitution.cc: 
+       * lily/dynamic-text-spanner.cc: 
+       nitpicks.
+
+       * lily/engraver.cc: 
+       * lily/grob-property.cc: 
+       use  SCM_ASSERT_TYPE for graphing functions.
+
+       * lily/cluster.cc: 
+       formatting.
+
+       * lily/all-font-metrics.cc: 
+       excise cmr10
+
+       * input/regression/collision-heads.ly: 
+       trim example.
+
+       * lily/note-collision.cc: 
+       * input/regression/collision-merge-differently-headed.ly: 
+       Examine Stem::duration_log() for preventing merge of quarter and halfnote. Fixes collision-heads.ly. Add separate regtest for that.
+
+       * scripts/lilypond-invoke-editor.scm: 
+       don't use guile -e main execution.
+
+       * scm/define-grobs.scm: 
+       use stem::calc-duration-log for rest.
+
+       * scm/define-markup-commands.scm: 
+       another (sign dir) fix for note markup
+
+       * scm/define-markup-commands.scm: 
+       use (sign dir) for computing attachment points.
+
+       * buildscripts/git-update-changelog.py: 
+       run cvs up before patching.
+
 2006-11-06  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
        * lily/note-head.cc: 
index e3bc06384fcc7bacadfd4c63686b9fdfea063702..465e407ce1db46d73091003d762fa334fc7d965f 100644 (file)
@@ -224,13 +224,13 @@ Run this file from the CVS directory, with commits from the repository in --git-
 
     try:
         previously_done = dict((c, 1) for c in open ('.git-commits-done').read ().split ('\n'))
-    except OSError:
+    except IOError:
         previously_done = {}
 
-    commits = [c for c in commits if not previously_done.has_key (c.committish)]
     commits = [c for c in commits if not previously_done.has_key (c.committish)]
     commits = sorted (commits, cmp=Commit.compare)
 
+    system ('cvs up')
     
     file_adddel = []
     collated_log = ''
index adb25053642eff1198a7bcbc4331c4c2c304c759..5dc3a2c24e1eb27d89fcdb6b5005a4f57032c994 100644 (file)
@@ -1,11 +1,7 @@
-\version "2.7.39"
+\version "2.9.29"
 \header {
   texidoc =
-
-  "If @code{merge-differently-headed} is enabled, then
-open note heads may be merged with black noteheads, but only
-if the black note heads are from 8th or shorter notes.
-"
+  "Open and black note heads are not merged by default."
   
 }
 
@@ -15,15 +11,8 @@ if the black note heads are from 8th or shorter notes.
 \context Staff  \relative c'' <<
   {
     c2 c8 c4.
-    
-    \override Staff.NoteCollision  #'merge-differently-headed = ##t
-    c2 c8 c4.
-    c2
   }\\
   {
     c8 c4. c2
-    
-    c8 c4. c2
-    c4
   }
 >>
diff --git a/input/regression/collision-merge-differently-headed.ly b/input/regression/collision-merge-differently-headed.ly
new file mode 100644 (file)
index 0000000..62e6e6b
--- /dev/null
@@ -0,0 +1,25 @@
+\version "2.7.39"
+\header {
+  texidoc =
+
+  "If @code{merge-differently-headed} is enabled, then
+open note heads may be merged with black noteheads, but only
+if the black note heads are from 8th or shorter notes.
+"
+  
+}
+
+\layout { ragged-right= ##t }
+
+
+\context Staff  \relative c'' <<
+  {
+    \override Staff.NoteCollision  #'merge-differently-headed = ##t
+    c2 c8 c4.
+    c2
+  }\\
+  {
+    c8 c4. c2
+    c4
+  }
+>>
index 4159cd5a32356f52be6d2d85105fee8919e83bfc..4d95f9e6c1c00fd4aab59a5b1f3e7f6e0d38f202 100644 (file)
@@ -15,8 +15,6 @@
 #include "scm-hash.hh"
 #include "warn.hh"
 
-static char const *default_font_str0_ = "cmr10";
-
 All_font_metrics::All_font_metrics (string path)
 {
   otf_dict_ = new Scheme_hash_table;
@@ -158,20 +156,9 @@ All_font_metrics::find_font (string name)
 {
   Font_metric *f = find_otf (name);
 
-
-  if (!f)
-    {
-      warning (_f ("can't find font: `%s'", name.c_str ()));
-      warning (_ ("loading default font"));
-    }
-
-  string def_name = default_font_str0_;
-
   if (!f)
     {
-      error (_f ("can't find default font: `%s'", def_name.c_str ()));
-      error (_f ("(search path: `%s')", search_path_.to_string ()));
-      error (_ ("giving up"));
+      error (_f ("can't find font: `%s'", name.c_str ()));
     }
 
   return f;
index b01f2421206f49824c1b0a348c075f63e0f21994..20ae27b01ffc6fa3e1630da61542de2698068e68 100644 (file)
@@ -322,6 +322,8 @@ Spanner::fast_substitute_grob_array (SCM sym,
 
   /*
     We store items on the left, spanners on the right in this vector.
+
+    FIXME: will not multithread.
   */
   static Substitution_entry *vec;
   static int vec_room;
index 6cb0060e67cc33c28f2ed624d3f03f0ee6881420..27ef9dd08a88defccd4c2bbc9f55e407b5810c97 100644 (file)
@@ -203,7 +203,9 @@ ADD_INTERFACE (Cluster, "cluster-interface",
               "The property @code{style} controls the shape of cluster segments.  Valid values "
               "include @code{leftsided-stairs}, @code{rightsided-stairs}, @code{centered-stairs}, "
               "and @code{ramp}.\n",
-              "style padding columns");
+              "style "
+              "padding "
+              "columns ");
 
 struct Cluster_beacon
 {
index 32ef531c14adb13494cb7a51cd96013c39b1a69a..59eb1c3a58a767ae9b20c1534e1806a6eaf7c681 100644 (file)
@@ -51,7 +51,8 @@ Dynamic_text_spanner::print (SCM smob)
   Grob *me = unsmob_grob (smob);
   Spanner *spanner = dynamic_cast<Spanner *> (me);
 
-  Grob *common = spanner->get_bound (LEFT)->common_refpoint (spanner->get_bound (RIGHT), X_AXIS);
+  Grob *common = spanner->get_bound (LEFT)
+    ->common_refpoint (spanner->get_bound (RIGHT), X_AXIS);
   Output_def *layout = me->layout ();
 
   Interval span_points;
index f66aff808c044ff0730682f8ab7424ea63c34b78..b61850eb2fe467a15c0295e8178b349ed2b78c52 100644 (file)
@@ -98,12 +98,12 @@ LY_DEFINE (ly_set_grob_creation_callback, "ly:set-grob-creation-callback",
           "the grob to be created and the corresponding line number in the "
           "C++ source file.")
 {
-  if (!ly_is_procedure (cb))
-    warning (_ ("not setting creation callback: not a procedure"));
-  else
-    creation_callback = cb;
+  SCM_ASSERT_TYPE(ly_is_procedure (cb), cb, SCM_ARG1, __FUNCTION__,
+                 "procedure");
 
-  return SCM_EOL;
+  creation_callback = cb;
+
+  return SCM_UNSPECIFIED;
 }
 #endif
 
index 707f4c118aa6953604417bd039614e6cbb85e2de..f1242994d53fb696133cbedfc6e6b2bc1b9336ce 100644 (file)
@@ -32,11 +32,12 @@ LY_DEFINE (ly_set_grob_modification_callback, "ly:set-grob-modification-callback
           "which the modification was requested, the property to be changed and "
           "the new value for the property.")
 {
-  if (!ly_is_procedure (cb))
-    warning (_ ("not setting modification callback: not a procedure"));
-  else
-    modification_callback = cb;
-  return SCM_EOL;
+
+  SCM_ASSERT_TYPE(ly_is_procedure (cb), cb, SCM_ARG1, __FUNCTION__,
+                 "procedure");
+
+  modification_callback = cb;
+  return SCM_UNSPECIFIED;
 }
 #endif
 
index bce6d08a60c52dfdb3da8eb4590b6169ae51872c..ddfbf19983e14572dcf8fe4eec4baae09489cce1 100644 (file)
@@ -39,6 +39,9 @@ check_meshing_chords (Grob *me,
   if (!Note_column::get_stem (cu) || !Note_column::get_stem (cd))
     return;
 
+  Drul_array<Grob*> stems (Note_column::get_stem (cd),
+                          Note_column::get_stem (cu));
+  
   Grob *nu = Note_column::first_head (cu);
   Grob *nd = Note_column::first_head (cd);
 
@@ -90,10 +93,10 @@ check_meshing_chords (Grob *me,
   /* Should never merge quarter and half notes, as this would make
      them indistinguishable.  */
   if (merge_possible
-      && ((Rhythmic_head::duration_log (nu) == 1
-          && Rhythmic_head::duration_log (nd) == 2)
-         || (Rhythmic_head::duration_log (nu) == 2
-             && Rhythmic_head::duration_log (nd) == 1)))
+      && ((Stem::duration_log (stems[UP]) == 1
+          && Stem::duration_log (stems[DOWN]) == 2)
+         || (Stem::duration_log (stems[UP]) == 2
+             && Stem::duration_log (stems[DOWN]) == 1)))
     merge_possible = false;
 
   /*
@@ -535,4 +538,4 @@ ADD_INTERFACE (Note_collision_interface, "note-collision-interface",
               /* properties */
               "merge-differently-dotted "
               "merge-differently-headed "
-              "positioning-done");
+              "positioning-done ");
index 920aaafbf63e1a1a12d253beefc0563bdde90eaa..be0de886f52b2b3479ff723aa8077582a5c2eed8 100644 (file)
     (Rest
      . (
        (stencil . ,ly:rest::print)
-       (duration-log . ,note-head::calc-duration-log)
+       (duration-log . ,stem::calc-duration-log)
        (X-extent . ,ly:rest::width)
        (Y-extent . ,ly:rest::height)
        (Y-offset . ,ly:rest::y-offset-callback)
      . (
        (stencil . ,ly:text-interface::print)
        (Y-offset . ,ly:staff-symbol-referencer::callback)
-       (duration-log . ,note-head::calc-duration-log)
        (font-size . -2)
        (stem-attachment . (0.0 . 1.35))
        (font-series . bold)
index 73e243a6a185d879e8f24238ff2f7828c969bae5..71407e60cd31f2645f379f44d55d01cbefeb86be 100644 (file)
@@ -1190,6 +1190,7 @@ figured bass notation"
 (define-markup-command (note-by-number layout props log dot-count dir) (number? number? number?)
   "Construct a note symbol, with stem.  By using fractional values for
 @var{dir}, you can obtain longer or shorter stems."
+
   (define (get-glyph-name-candidates dir log style)
     (map (lambda (dir-name)
      (format "noteheads.~a~a~a" dir-name (min log 2)
@@ -1211,22 +1212,22 @@ figured bass notation"
         (size-factor (magstep (chain-assoc-get 'font-size props 0)))
         (style (chain-assoc-get 'style props '()))
          (stem-length (*  size-factor (max 3 (- log 1))))
-         (head-glyph-name (get-glyph-name font (get-glyph-name-candidates dir log style)))
+         (head-glyph-name (get-glyph-name font (get-glyph-name-candidates (sign dir) log style)))
          (head-glyph (ly:font-get-glyph font head-glyph-name))
         (attach-indices (ly:note-head::stem-attachment font head-glyph-name))
          (stem-thickness (* size-factor 0.13))
          (stemy (* dir stem-length))
          (attach-off (cons (interval-index
                            (ly:stencil-extent head-glyph X)
-                           (* dir (car attach-indices)))
-                          (* dir       ; fixme, this is inconsistent between X & Y.
+                           (* (sign dir) (car attach-indices)))
+                          (* (sign dir)        ; fixme, this is inconsistent between X & Y.
                              (interval-index
                               (ly:stencil-extent head-glyph Y)
                               (cdr attach-indices)))))
          (stem-glyph (and (> log 0)
                          (ly:round-filled-box
                           (ordered-cons (car attach-off)
-                                        (+ (car attach-off)  (* (- dir) stem-thickness)))
+                                        (+ (car attach-off)  (* (- (sign dir)) stem-thickness)))
                           (cons (min stemy (cdr attach-off))
                                 (max stemy (cdr attach-off)))
                           (/ stem-thickness 3))))
index b07304e232cea1fda9d0d005a58929899d3f228b..048ac3f53b3021fa005478e3ace188f1e3fd02f4 100755 (executable)
@@ -1,5 +1,4 @@
-#!@GUILE@ \
--e main -s
+#!@GUILE@ -s
 !#
 ;;;; lilypond-invoke-editor.scm -- Invoke an editor in file:line:column mode
 ;;;;
@@ -146,3 +145,4 @@ Options:
          (run-editor uri)
          (run-browser uri)))))
 
+(main (command-line))