]> git.donarmstrong.com Git - lilypond.git/commitdiff
* make/lilypond.fedora.spec.in (Group): add lilypond-internals to
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 13 Oct 2005 23:25:15 +0000 (23:25 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 13 Oct 2005 23:25:15 +0000 (23:25 +0000)
dist.

* lily/tuplet-bracket.cc: check columns of bounds, not bounds
themselves.

33 files changed:
ChangeLog
flower/include/virtual-methods.hh
lily/audio-element.cc
lily/context.cc
lily/font-metric.cc
lily/grob.cc
lily/include/afm.hh
lily/include/audio-element.hh
lily/include/context.hh
lily/include/font-metric.hh
lily/include/global-context.hh
lily/include/grob.hh
lily/include/item.hh
lily/include/open-type-font.hh
lily/include/spanner.hh
lily/include/tfm.hh
lily/midi-item.cc
lily/music-iterator.cc
lily/music-output.cc
lily/music-scheme.cc
lily/music.cc
lily/output-def.cc
lily/output-property-music-iterator.cc
lily/paper-book.cc
lily/paper-system.cc
lily/translator-ctors.cc
lily/translator-group.cc
lily/translator-scheme.cc
lily/translator.cc
lily/tuplet-bracket.cc
ly/titling-init.ly
make/lilypond.fedora.spec.in
scm/safe-lily.scm

index 7538e6c56dff199dbdacd41357db2ec6b71ceb75..bbc194942660be49495b5956c1001f8790a450df 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2005-10-14  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * make/lilypond.fedora.spec.in (Group): add lilypond-internals to
+       dist.
+
+       * lily/tuplet-bracket.cc: check columns of bounds, not bounds
+       themselves.
+
+2005-10-12  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * flower/include/virtual-methods.hh (VIRTUAL_COPY_CONSTRUCTOR):
+       add class_name() method.
+
+       * lily/music-scheme.cc: remove ly:music-name.
+
 2005-10-11  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * cygwin/postinstall-lilypond.sh: Remove cruft.
@@ -8,6 +23,12 @@
 
 2005-10-11  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * ly/titling-init.ly (evenHeaderMarkup): use space in header on
+       even header too.6
+       
+       * scm/define-markup-commands.scm (wordwrap-string): bugfix for
+       MacOS 9 users.
+
        * lily/hara-kiri-group-spanner.cc (consider_suicide): only
        consider break index for broken spanner.
 
index bf460b9d210ef2f9aeb1d099d3bc16f8b4de6094..4cca1db2a3541d215556fc36619e311b39a96aeb 100644 (file)
@@ -25,7 +25,13 @@ demangle_classname (type_info const &);
    VIRTUAL_COPY_CONSTRUCTOR (Baseclass, Foo);
    }; */
 
+#define DECLARE_CLASSNAME(name) \
+  virtual const char *class_name () const {    \
+    return #name; \
+}
+
 #define VIRTUAL_COPY_CONSTRUCTOR(Base, name)   \
+  DECLARE_CLASSNAME(name);\
   virtual Base *clone () const                 \
   {                                            \
     return new name (*this);                   \
index c0dfcc22f106bb73b7e18b4dd2598bf13fa9f002..67e336093782d8cfdb1b8c939727ce00404309c3 100644 (file)
@@ -19,5 +19,5 @@ Audio_element::~Audio_element ()
 char const *
 Audio_element::name () const
 {
-  return classname (this);
+  return this->class_name ();
 }
index dce243596e039f8abd974635cd2f6960ddcae2ea..7a5eda0b749809f18aaacc7adad6e6b3d4b01837 100644 (file)
@@ -495,7 +495,7 @@ Context::print_smob (SCM s, SCM port, scm_print_state *)
   Context *sc = (Context *) SCM_CELL_WORD_1 (s);
 
   scm_puts ("#<", port);
-  scm_puts (classname (sc), port);
+  scm_puts (sc->class_name (), port);
   if (Context_def *d = unsmob_context_def (sc->definition_))
     {
       scm_puts (" ", port);
index 48ec34183efb254194720dda876274f96b9452ad..4118cac23b19fca4da5b773078e7d1bf9b9f217d 100644 (file)
@@ -112,7 +112,7 @@ Font_metric::print_smob (SCM s, SCM port, scm_print_state *)
 {
   Font_metric *m = unsmob_metrics (s);
   scm_puts ("#<", port);
-  scm_puts (classname (m), port);
+  scm_puts (m->class_name (), port);
   scm_puts (" ", port);
   scm_write (m->description_, port);
   scm_puts (">", port);
index 3a019cea6ec54f251e7063db9602bfe8328d175f..cf3b52d9353fb83c7698ecc58806f54e5ee6ee53 100644 (file)
@@ -534,7 +534,7 @@ Grob::name () const
   SCM meta = get_property ("meta");
   SCM nm = scm_assoc (ly_symbol2scm ("name"), meta);
   nm = (scm_is_pair (nm)) ? scm_cdr (nm) : SCM_EOL;
-  return scm_is_symbol (nm) ? ly_symbol2string (nm) : classname (this);
+  return scm_is_symbol (nm) ? ly_symbol2string (nm) : this->class_name ();
 }
 
 void
index 7f436f470a2edf8f4820de3e30fdb68598b31309..80d2917236b94c4f6aa0cad6d471f3afb78139d5 100644 (file)
@@ -1,4 +1,3 @@
-
 /*
   afm.hh -- declare Adobe_font_metric
 
@@ -19,6 +18,7 @@ using namespace std;
 
 class Adobe_font_metric : public Simple_font_metric
 {
+  DECLARE_CLASSNAME(Adobe_font_metric);
 public:
   AFM_Font_info *font_info_;
   unsigned int checksum_;
index 7004d5f27f685660bd6cfbd4e73d169ce631e56b..5eebc0335502f2bcbf9c088c38ff2c1d74ba4291 100644 (file)
@@ -16,6 +16,7 @@ class Audio_element
 public:
   Audio_element ();
   virtual ~Audio_element ();
+  VIRTUAL_COPY_CONSTRUCTOR(Audio_element,Audio_element);
   virtual char const *name () const;
 protected:
 };
index ca7a40b5602bf40516ca04b4f1506d85928a5834..faf6491eb88d4cc30e546118e5891b32c71fabe2 100644 (file)
@@ -14,6 +14,7 @@ using namespace std;
 
 #include "moment.hh"
 #include "lily-proto.hh"
+#include "virtual-methods.hh"
 
 class Context
 {
@@ -21,7 +22,7 @@ class Context
   Context (Context const &src);
 
   DECLARE_SMOBS (Context, dummy);
-
+  DECLARE_CLASSNAME(Context);
   void terminate ();
 
 private:
index a8846aa5689f6225e892eecec8d52278fc01fa3f..69e2033d973fa6a204d62d32acde231651c4e10f 100644 (file)
 #include "box.hh"
 #include "lily-proto.hh"
 #include "smobs.hh"
+#include "virtual-methods.hh"
 
 class Font_metric
 {
+  DECLARE_CLASSNAME(Font_metric);
+
 public:
   SCM description_;
   String file_name_;
@@ -52,6 +55,7 @@ int get_encoded_index (Font_metric *m, String input_coding, int code);
 
 class Simple_font_metric : public Font_metric
 {
+  DECLARE_CLASSNAME(Simple_font_metric);
 public:
 };
 
index 720147e03d4e488e97291d5ddc952f37ddb21f82..647ec914d0845c0d101a12271ef325f1fcdbfc1b 100644 (file)
@@ -17,6 +17,8 @@ class Global_context : public virtual Context
   PQueue<Moment> extra_mom_pq_;
   Output_def *output_def_;
 
+  DECLARE_CLASSNAME(Global_context);
+
   friend class Output_def;
 public:
   Global_context (Output_def *, Moment final, Object_key *key);
index 0ab69e1aafcd030230c9b632e7dc7014741a12ba..40446590a2c30071ac967a50c1de7c1e1e24c123 100644 (file)
@@ -50,6 +50,7 @@ protected:
   void substitute_object_links (SCM, SCM);
   char status_;
 
+  DECLARE_CLASSNAME(Grob);
 public:
   Object_key const *get_key () const;
 
@@ -65,7 +66,7 @@ public:
 
   virtual Grob *clone (int count) const;
   DECLARE_SCHEME_CALLBACK (stencil_extent, (SCM smob, SCM axis));
-
+  
   String name () const;
   /*
     Properties
index 9b50af6db3e471237fb963c5bfbf2270e3cf15ec..94ca0bc049a1570c80eee7b994622159ecfa590e 100644 (file)
@@ -21,6 +21,7 @@ class Item : public Grob
 {
   Drul_array<Item *> broken_to_drul_;
 
+  DECLARE_CLASSNAME(Item);
 public:
   Item (SCM, Object_key const *);
   Item (Item const &, int count);
index e75b4c62d4280efac1b1658d32f488cdf469aa9a..097f661a659db333a78decdbccc0888d4a689450 100644 (file)
@@ -31,6 +31,7 @@ class Open_type_font : public Font_metric
   Index_to_charcode_map index_to_charcode_map_;
   Open_type_font (FT_Face);
 
+  DECLARE_CLASSNAME(Open_type_font);
 public:
   SCM get_subfonts () const;
   SCM get_global_table () const;
index d1042348e9a2b403337b1a087353f10f2df3ea00..4a0110013ddcc686186451a193fbfe850ceb931c 100644 (file)
@@ -31,6 +31,8 @@ class Spanner : public Grob
   Drul_array<Item *> spanned_drul_;
   int break_index_;
 
+  DECLARE_CLASSNAME(Spanner);
+
 public:
   DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM));
 
index 32f1222589475a09b36ae0ab3ed274d95e26cf79..12648f58127b860c5abc110394113edfaeaae65f 100644 (file)
@@ -142,6 +142,7 @@ struct Tex_font_char_metric
 
 class Tex_font_metric : public Simple_font_metric
 {
+  DECLARE_CLASSNAME(Tex_font_metric);
 public:
   static SCM make_tfm (String file_name);
 
index 3e13665a36567702c030e8117ba1616d6daf9e9c..ad1001cbd714ff969753adb8358533dda343ad0e 100644 (file)
@@ -473,5 +473,5 @@ Midi_track::data_string () const
 char const *
 Midi_item::name () const
 {
-  return classname (this);
+  return this->class_name ();
 }
index 600eb2e702fcc7ff9eae340fe222383cfa2c89f0..6b29d2bc2f9205b9b74b66e9745fd091733c7e64 100644 (file)
@@ -207,7 +207,7 @@ Music_iterator::print_smob (SCM sm, SCM port, scm_print_state*)
   char s[1000];
 
   Music_iterator *iter = unsmob_iterator (sm);
-  sprintf (s, "#<%s>", classname (iter));
+  sprintf (s, "#<%s>", iter->class_name ());
   scm_puts (s, port);
   return 1;
 }
index 21e86e4c6cbc9e5b5b7dcf5ac8cc9355f47b1687..cd5d762ae1217eb1482ac759d9e4b9219b912249 100644 (file)
@@ -48,7 +48,7 @@ Music_output::print_smob (SCM s, SCM p, scm_print_state*)
 {
   Music_output *sc = (Music_output *) SCM_CELL_WORD_1 (s);
   scm_puts ("#<", p);
-  scm_puts (classname (sc), p);
+  scm_puts (sc->class_name (), p);
   scm_puts (">", p);
 
   return 1;
index f796a451bcd2865f656d3cf5edab3328f24ef9af..9508c4d66158aba138c709cd9ca876052d79e69a 100644 (file)
@@ -47,16 +47,6 @@ LY_DEFINE (ly_music_set_property, "ly:music-set-property!",
   return SCM_UNSPECIFIED;
 }
 
-LY_DEFINE (ly_music_name, "ly:music-name",
-          1, 0, 0, (SCM mus),
-          "Return the name of @var{music}.")
-{
-  Music *m = unsmob_music (mus);
-  SCM_ASSERT_TYPE (m, mus, SCM_ARG1, __FUNCTION__, "music");
-
-  char const *nm = classname (m);
-  return scm_makfrom0str (nm);
-}
 
 /* todo:  property args */
 LY_DEFINE (ly_make_music, "ly:make-music",
index 8ab9028da0944fa10db69672fd792c1b549d4e59..278caa13438b67cf404effe7731900726c6342e0 100644 (file)
@@ -38,7 +38,7 @@ Music::name () const
   if (scm_is_symbol (nm))
     return ly_symbol2string (nm);
   else
-    return classname (this);
+    return "Music";
 }
 
 Music::Music (SCM init)
@@ -142,7 +142,7 @@ Music::print_smob (SCM s, SCM p, scm_print_state*)
   if (scm_is_symbol (nm) || scm_is_string (nm))
     scm_display (nm, p);
   else
-    scm_puts (classname (m), p);
+    scm_puts ("Music", p);
 
   /* Printing properties takes a lot of time, especially during backtraces.
      For inspecting, it is better to explicitly use an inspection
index c3f1955b76ffb1019c1e94197e513f2a16861ad9..73d646b2d3a78ec313cd135db386d3c5509c7629 100644 (file)
@@ -90,7 +90,7 @@ Output_def::print_smob (SCM s, SCM p, scm_print_state *)
 {
   Output_def * def = unsmob_output_def (s);
   scm_puts ("#< ", p);
-  scm_puts (classname (def), p);
+  scm_puts (def->class_name (), p);
   
   (void)def;
   scm_puts (">", p);
index 1af4868d4940afb9b7262192fa6aaefad561d6dd..462d7c6714dd59254777a5cf1cc9f924e8728271 100644 (file)
@@ -27,7 +27,7 @@ Output_property_music_iterator::process (Moment m)
       bool accepted = try_music (get_music ());
       if (!accepted)
        get_music ()->origin ()->warning (_f ("junking event: `%s'",
-                                         classname (get_music ())));
+                                         get_music (->class_name ())));
     }
   Simple_music_iterator::process (m);
 }
index 3ba7bef6b3a85edce6e864ea6d8a905ab10b9e63..99be33adeded7501cc2a6832dd17f805370a6501 100644 (file)
@@ -58,7 +58,7 @@ Paper_book::print_smob (SCM smob, SCM port, scm_print_state*)
   Paper_book *b = (Paper_book *) SCM_CELL_WORD_1 (smob);
 
   scm_puts ("#<", port);
-  scm_puts (classname (b), port);
+  scm_puts (b->class_name (), port);
   scm_puts (" ", port);
   scm_puts (">", port);
   return 1;
index 66b04c38b29de142f9d56e282d4cf7a14973698d..064b91f6c9a973289b9d64684189829d6c8c149c 100644 (file)
@@ -51,7 +51,7 @@ Paper_system::print_smob (SCM smob, SCM port, scm_print_state*)
 {
   Paper_system *p = (Paper_system *) SCM_CELL_WORD_1 (smob);
   scm_puts ("#<", port);
-  scm_puts (classname (p), port);
+  scm_puts ("Paper_system", port);
   scm_display (p->mutable_property_alist_, port);
   scm_display (p->immutable_property_alist_, port);
   
index 728dd00271bb16e63f2e24ea5208661fb10e3cfc..593eb2c26a154d4026a59f5753ac26b9c88c8cce 100644 (file)
@@ -33,7 +33,7 @@ add_translator (Translator *t)
   if (!global_translator_dict)
     global_translator_dict = new Scheme_hash_table;
 
-  SCM k = ly_symbol2scm (classname (t));
+  SCM k = ly_symbol2scm (t->class_name ());
   global_translator_dict->set (k, t->self_scm ());
 
   t->unprotect ();
index 5bf64576eb0b647e6fabeb4239b8fad5ef000837..2646dba0f8696005ce86658ae9f513b0912d3969 100644 (file)
@@ -220,7 +220,7 @@ Translator_group::print_smob (SCM s, SCM port, scm_print_state *)
 {
   Translator_group *me = (Translator_group *) SCM_CELL_WORD_1 (s);
   scm_puts ("#<Translator_group ", port);
-  scm_puts (classname (me), port);
+  scm_puts (me->class_name (), port);
   scm_display (me->simple_trans_list_, port);
   scm_puts (" >", port);
   return 1;
index 4266e5cf8ef6dc9045fa63336ac558f6939f4f9f..0b484375d561a531911b2bae9c4234570bbf8bdc 100644 (file)
@@ -17,7 +17,7 @@ LY_DEFINE (ly_translator_name, "ly:translator-name",
 {
   Translator *tr = unsmob_translator (trans);
   SCM_ASSERT_TYPE (tr, trans, SCM_ARG1, __FUNCTION__, "Translator");
-  char const *nm = classname (tr);
+  char const *nm = tr->class_name ();
   return ly_symbol2scm (nm);
 }
 
index c301956d3f9216048cf5bb65d96af1b34c79bf16..b78c9c4425ef9d1c0e5eea4993e0ea9fca73ea25 100644 (file)
@@ -151,7 +151,7 @@ Translator::print_smob (SCM s, SCM port, scm_print_state *)
 {
   Translator *me = (Translator *) SCM_CELL_WORD_1 (s);
   scm_puts ("#<Translator ", port);
-  scm_puts (classname (me), port);
+  scm_puts (me->class_name (), port);
   scm_puts (" >", port);
   return 1;
 }
index 983f98f937ea975c6d9f42fc466de16de2b04c2e..209545797f3ea71de30c95f63a1d482adc0f63cd 100644 (file)
@@ -67,20 +67,24 @@ Tuplet_bracket::parallel_beam (Grob *me_grob, Link_array<Grob> const &cols, bool
       || me->get_bound (RIGHT)->break_status_dir ())
     return 0;
 
-  Grob *s1 = Note_column::get_stem (cols[0]);
-  Grob *s2 = Note_column::get_stem (cols.top ());
+  Drul_array<Grob*> stems (Note_column::get_stem (cols[0]),
+                          Note_column::get_stem (cols.top ()));
 
-  if (s2 != me->get_bound (RIGHT))
+  if (dynamic_cast<Item*> (stems[RIGHT])->get_column ()
+      != me->get_bound (RIGHT)->get_column())
     return 0;
 
-  Grob *b1 = s1 ? Stem::get_beam (s1) : 0;
-  Grob *b2 = s2 ? Stem::get_beam (s2) : 0;
-
+  Drul_array<Grob*> beams;
+  Direction d = LEFT;
+  do {
+    beams[d] = stems[d] ? Stem::get_beam (stems[d]) : 0;
+  } while (flip (&d) != LEFT);
+  
   *equally_long = false;
-  if (! (b1 && (b1 == b2) && !me->is_broken ()))
+  if (! (beams[LEFT] && (beams[LEFT] == beams[RIGHT]) && !me->is_broken ()))
     return 0;
 
-  extract_grob_set (b1, "stems", beam_stems);
+  extract_grob_set (beams[LEFT], "stems", beam_stems);
   if (beam_stems.size () == 0)
     {
       programming_error ("beam under tuplet bracket has no stems");
@@ -88,8 +92,8 @@ Tuplet_bracket::parallel_beam (Grob *me_grob, Link_array<Grob> const &cols, bool
       return 0;
     }
 
-  *equally_long = (beam_stems[0] == s1 && beam_stems.top () == s2);
-  return b1;
+  *equally_long = (beam_stems[0] == stems[LEFT] && beam_stems.top () == stems[RIGHT]);
+  return beams[LEFT];
 }
 
 /*
@@ -128,7 +132,6 @@ Tuplet_bracket::print (SCM smob)
 
   bool equally_long = false;
   Grob *par_beam = parallel_beam (me, columns, &equally_long);
-
   Spanner *sp = dynamic_cast<Spanner *> (me);
 
   bool bracket_visibility = !(par_beam && equally_long);
index 4e155b0dc09182afb8c27f7445dcd3b89c92b359..be15aa070f78ba8d55cb9ebcae61862812a56249 100644 (file)
@@ -116,7 +116,7 @@ evenHeaderMarkup = \markup
 \fill-line {
   \on-the-fly #print-page-number-check-first \fromproperty #'page:page-number-string
   \on-the-fly #not-first-page \fromproperty #'header:instrument
-  ""
+  " "
 }
 
 oddFooterMarkup = \markup {
index be2d56bad830ba1b04d50a0feb60752d82fadcf2..527ead002361d5584dabb301c3fb75397091c9ac 100644 (file)
@@ -101,8 +101,9 @@ gzip -9fn `find $RPM_BUILD_ROOT%{_infodir}/ -name '*.info'`
 touch /tmp/.lilypond-install
 
 %if %{info}
-/sbin/install-info %{_infodir}/lilypond/lilypond.info.gz %{_infodir}/dir 
-/sbin/install-info %{_infodir}/lilypond/music-glossary.info.gz %{_infodir}/dir 
+  /sbin/install-info %{_infodir}/lilypond/lilypond.info.gz %{_infodir}/dir 
+  /sbin/install-info %{_infodir}/lilypond/lilypond-internals.info.gz %{_infodir}/dir 
+  /sbin/install-info %{_infodir}/lilypond/music-glossary.info.gz %{_infodir}/dir 
 %endif
 
 export PACKAGEDIR=%{_datadir}/lilypond/@TOPLEVEL_VERSION@
@@ -129,6 +130,7 @@ fi
 
 %if %{info}
     /sbin/install-info --delete %{_infodir}/lilypond/lilypond.info.gz %{_infodir}/dir 
+    /sbin/install-info --delete %{_infodir}/lilypond/lilypond-internals.info.gz %{_infodir}/dir 
     /sbin/install-info --delete %{_infodir}/lilypond/music-glossary.info.gz %{_infodir}/dir 
 %endif
 
index d5851fd20b0d90590737d035199584330761692e..fc483d2f57301e854487d3991a970998ee067b2e 100644 (file)
@@ -83,7 +83,6 @@
    ly:music-length
    ly:music-list?
    ly:music-mutable-properties
-   ly:music-name
    ly:music-property
    ly:make-score
    ly:music-set-property!