]> git.donarmstrong.com Git - lilypond.git/commitdiff
also barf if file doesn't exist.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 7 Nov 2006 01:32:04 +0000 (01:32 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 7 Nov 2006 01:32:04 +0000 (01:32 +0000)
use Rhythmic_head::duration_log() iso. Note_head::get_balltype().
trim note-head.cc includes.

ChangeLog
buildscripts/git-update-changelog.py
lily/easy-notation.cc
lily/mensural-ligature-engraver.cc
lily/note-collision.cc
lily/note-head.cc
scm/define-grobs.scm
scm/output-lib.scm

index 46043f65322d6b05a170ceb3e0608fcdc4eaa407..c4407c4a6103928942a000b2614f758cb68a7092 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2006-11-06  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * lily/note-head.cc: 
+       trim note-head.cc includes.
+
+       * lily/easy-notation.cc: 
+       * lily/mensural-ligature-engraver.cc: 
+       * lily/note-collision.cc: 
+       * lily/note-head.cc: 
+       * scm/define-grobs.scm: 
+       * scm/output-lib.scm: 
+       use Rhythmic_head::duration_log() iso. Note_head::get_balltype().
+
+       * buildscripts/git-update-changelog.py: 
+       also barf if file doesn't exist.
+
 2006-11-07  Erlend Aasland  <erlenda@gmail.com>
 
        * scm/music-function.scm (add-ballon-text): add FIXME comment.
index 35dd2e6c7538795821ed1a6abc41706578e9bead..e3bc06384fcc7bacadfd4c63686b9fdfea063702 100644 (file)
@@ -53,6 +53,9 @@ class Commit:
 
         if removals == []:
             return True
+
+        if not os.path.exists (filename):
+            return False
         
         contents = open (filename).read ()
         for r in removals:
index 6ddc00e1d39418be0c9c628388b61f3f6df8e134..2fb0d7223474f364a377a1746c54bb8790f5537c 100644 (file)
@@ -20,6 +20,7 @@ using namespace std;
 #include "stem.hh"
 #include "stream-event.hh"
 #include "text-interface.hh"
+#include "rhythmic-head.hh"
 
 /*
 
@@ -31,7 +32,7 @@ SCM
 Note_head::brew_ez_stencil (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
-  int log = Note_head::get_balltype (me);
+  int log = Rhythmic_head::duration_log (me);
 
   SCM cause = me->get_property ("cause");
   SCM spitch = unsmob_stream_event (cause)->get_property ("pitch");
index 45466c10c403ef33e318bff4b58f01a6a03db77d..a6a48a8f188f4bf92537576453a9b90f6c9e8160 100644 (file)
@@ -99,7 +99,7 @@ Mensural_ligature_engraver::transform_heads (vector<Grob_info> primitives)
     {
       Grob_info info = primitives[i];
       Item *primitive = dynamic_cast<Item *> (info.grob ());
-      int duration_log = Note_head::get_balltype (primitive);
+      int duration_log = Rhythmic_head::duration_log (primitive);
 
       Stream_event *nr = info.event_cause ();
 
index 7bcfa464ceee01b6da9138def0fec95d13d6ba02..bce6d08a60c52dfdb3da8eb4590b6169ae51872c 100644 (file)
@@ -58,8 +58,8 @@ check_meshing_chords (Grob *me,
                    nd->get_property ("style")))
     merge_possible = false;
 
-  int upball_type = Note_head::get_balltype (nu);
-  int dnball_type = Note_head::get_balltype (nd);
+  int upball_type = Rhythmic_head::duration_log (nu);
+  int dnball_type = Rhythmic_head::duration_log (nd);
 
   /* Do not merge whole notes (or longer, like breve, longa, maxima).  */
   if (merge_possible && (upball_type <= 0 || dnball_type <= 0))
index cb89b5ae17d52dad44277c75ce144026444a27bb..ecf59808f3865aa1c86837577d7a3539b7dc05ec 100644 (file)
 #include <cmath>
 #include <cctype>
 #include <algorithm>           //  min, max
+
 using namespace std;
 
 #include "directional-element-interface.hh"
-#include "dots.hh"
 #include "font-interface.hh"
 #include "international.hh"
-#include "lookup.hh"
-#include "misc.hh"
-#include "music.hh"
-#include "output-def.hh"
-#include "rhythmic-head.hh"
-#include "staff-symbol-referencer.hh"
-#include "staff-symbol.hh"
 #include "warn.hh"
 
 static Stencil
@@ -147,12 +140,6 @@ Note_head::calc_stem_attachment (SCM smob)
   return ly_offset2scm (get_stem_attachment (fm, key));
 }
 
-int
-Note_head::get_balltype (Grob *me)
-{
-  SCM s = me->get_property ("duration-log");
-  return scm_is_number (s) ? min (int (scm_to_int (s)), 2) : 0;
-}
 
 ADD_INTERFACE (Note_head, "note-head-interface",
               "Note head",
index 3c1988c9c8c027cf52bf50040da70610eb3856a7..920aaafbf63e1a1a12d253beefc0563bdde90eaa 100644 (file)
     (Stem
      . (
        (direction . ,ly:stem::calc-direction)
-       (duration-log . ,note-head::calc-duration-log)
+       (duration-log . ,stem::calc-duration-log)
        (default-direction . ,ly:stem::calc-default-direction)
        (stem-end-position . ,ly:stem::calc-stem-end-position)
 
index d918290d218fc1e3f016f98373a3ef845b18123e..2978f3b198e567adde40f529536590cde4684235 100644 (file)
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; note heads
 
-(define-public (note-head::calc-duration-log grob)
+
+(define-public (stem::calc-duration-log grob)
   (ly:duration-log
    (ly:event-property (event-cause grob) 'duration)))
 
+(define-public (note-head::calc-duration-log grob)
+  (min 2 
+       (ly:duration-log
+       (ly:event-property (event-cause grob) 'duration))))
+
 (define-public (dots::calc-dot-count grob)
   (ly:duration-dot-count
    (ly:event-property (event-cause grob) 'duration)))