]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/staff-symbol-engraver.cc (acknowledge_grob): remove item ->
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 29 May 2004 13:11:45 +0000 (13:11 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 29 May 2004 13:11:45 +0000 (13:11 +0000)
staffsymbol dependency.

* lily/include/grob.hh (class Grob): live () -> is_live (). Small
cleanups.

* lily/parser.yy (book_body): book header is initted to
$globalheader.

20 files changed:
ChangeLog
lily/accidental-placement.cc
lily/align-interface.cc
lily/dot-column.cc
lily/dynamic-engraver.cc
lily/grob-property.cc
lily/grob.cc
lily/include/grob.hh
lily/include/output-def.hh
lily/note-collision.cc
lily/note-spacing.cc
lily/paper-book.cc
lily/paper-column.cc
lily/parser.yy
lily/piano-pedal-engraver.cc
lily/staff-symbol-engraver.cc
lily/stem-tremolo.cc
lily/system.cc
lily/tie-column.cc
scm/lily.scm

index 9bddbebc1f465f1e576b8c65ec84680d045f4b51..1955b018e2d58f682bd689062966fad7512c4784 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2004-05-29  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/staff-symbol-engraver.cc (acknowledge_grob): remove item ->
+       staffsymbol dependency.
+
+       * lily/include/grob.hh (class Grob): live () -> is_live (). Small
+       cleanups.
+
        * lily/book.cc (process): return Paper_book
        (to_stencil): use Book::process().
 
index 71d48910b87b51d8359b59ef9de50f316e750b2a..12b21171615b84f7cec70bb190ca931b4dd9a438 100644 (file)
@@ -250,7 +250,7 @@ stagger_apes (Link_array<Accidental_placement_entry> *apes)
 SCM
 Accidental_placement::position_accidentals (Grob * me)
 {
-  if (!me->live ())
+  if (!me->is_live ())
     return SCM_UNSPECIFIED;
   
   SCM accs = me->get_property ("accidental-grobs");
index 8f5ece25113d90d592fb6c4e08f95862338bf1be..6c08f13de4191dcfad017d2773fa3a24fae6f54a 100644 (file)
@@ -82,7 +82,7 @@ Align_interface::align_to_fixed_distance (Grob *me , Axis a)
          && Hara_kiri_group_spanner::has_interface (elems[j]))
        Hara_kiri_group_spanner::consider_suicide (elems[j]);
 
-      if (!elems[j]->live ())
+      if (!elems[j]->is_live ())
        elems.del (j);
     }
 
index f3669231c82d1e764cd548cdb1d48346b652b01b..1a7f3cc601222ed66839b0c69b58cc65c05a0cc4 100644 (file)
@@ -255,7 +255,7 @@ Dot_column::do_shifts (Grob*me)
   
   dots.sort (compare_position);
   for (int i = dots.size (); i--;)
-    if (!dots[i]->live ())
+    if (!dots[i]->is_live ())
       dots.del (i);
   
   Dot_configuration cfg;
index 31368b175c79d46915c3b6e63c2248b242ad303c..8b476249312a452717e9a73b17f8a25d7a2f386f 100644 (file)
@@ -286,7 +286,7 @@ Dynamic_engraver::finalize ()
   typeset_all ();
   
   if (line_spanner_
-      && !line_spanner_->live ())
+      && !line_spanner_->is_live ())
     line_spanner_ = 0;
   if (line_spanner_)
     {
@@ -295,7 +295,7 @@ Dynamic_engraver::finalize ()
     }
 
   if (cresc_
-      && !cresc_->live ())
+      && !cresc_->is_live ())
     cresc_ = 0;
   if (cresc_)
     {
@@ -315,10 +315,10 @@ Dynamic_engraver::typeset_all ()
     Maybe just check at typeset_grob ()?
   */
   if (finished_cresc_
-      && !finished_cresc_->live ())
+      && !finished_cresc_->is_live ())
     finished_cresc_ = 0;
   if (finished_line_spanner_
-      && !finished_line_spanner_->live ())
+      && !finished_line_spanner_->is_live ())
     finished_line_spanner_ = 0;
 
   if (finished_cresc_)
@@ -382,7 +382,7 @@ Dynamic_engraver::acknowledge_grob (Grob_info i)
     {
       if (line_spanner_
          /* Don't refill killed spanner */
-         && line_spanner_->live ())
+         && line_spanner_->is_live ())
        {
          Side_position_interface::add_support (line_spanner_,i.grob_);
          add_bound_item (line_spanner_,dynamic_cast<Item*> (i.grob_));
index 72353140f38e228d2c32674d998b7edd831cd538..f351d1ba362f6b8126a18311487d9fc2d1609c85 100644 (file)
@@ -69,7 +69,7 @@ void
 Grob::internal_set_property (SCM s, SCM v)
 {
   /* Perhaps we simply do the assq_set, but what the heck. */
-  if (!live ())
+  if (!is_live ())
     return;
 
   if (internal_type_checking_global_b)
@@ -113,7 +113,7 @@ Grob::substitute_mutable_properties (SCM crit, SCM orig)
 
 
 bool
-Grob::live () const
+Grob::is_live () const
 {
   return immutable_property_alist_ != SCM_EOL;
 }
index 5ca831a51ae9c0d55788e77bc1b67956c6733631..79152064b4ff53a62291085c041dcb4e8abb5840 100644 (file)
@@ -196,7 +196,7 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname)
 Stencil *
 Grob::get_stencil ()  const
 {
-  if (!live ())
+  if (!is_live ())
     {
       return 0;
     }
@@ -207,7 +207,7 @@ Grob::get_stencil ()  const
 
   mol = get_uncached_stencil ();
   
-  if (live ())
+  if (is_live ())
     {
       Grob *me = (Grob*)this;
       me->set_property ("stencil", mol);
@@ -306,7 +306,7 @@ Grob::handle_broken_dependencies ()
 
   System *system = get_system ();
 
-  if (live ()
+  if (is_live ()
       && system && common_refpoint (system, X_AXIS) && common_refpoint (system, Y_AXIS))
     {
       substitute_mutable_properties (system ? system->self_scm () : SCM_UNDEFINED,
@@ -339,7 +339,7 @@ Grob::handle_broken_dependencies ()
 void
 Grob::suicide ()
 {
-  if (!live ())
+  if (!is_live ())
     return; 
 
   
index ba7a7b8a0da8ee564c9f15864ecc0da1ee1d715f..2be13c6c24ae4b443b2450a6708a7cd9f65f84f5 100644 (file)
@@ -22,7 +22,6 @@
     */
 enum Grob_status {
   ORPHAN=0,                    // not yet added to Paper_score
-  VIRGIN,      
   PRECALCING,
   PRECALCED,           // calcs before spacing done
   POSTCALCING,         // busy calculating. This is used to trap cyclic deps.
@@ -52,13 +51,6 @@ public:
     0 means ORPHAN,
    */
   char status_;
-
-
-  /*
-    IDEA: make this a global variable. This is the same for all
-    elements, I think it is safe to assume that we will not have
-    scores being formatted multithreadedly.
-   */
   Paper_score *pscore_;
   Dimension_cache dim_cache_[NO_AXES];
 
@@ -77,8 +69,6 @@ public:
   void warning (String)const;
   void programming_error (String)const;
   
-  void set_elt_pointer (const char*, SCM val);
-  friend class Property_engraver; //  UGHUGHUGH.
   /*
     related classes.
    */
@@ -111,7 +101,7 @@ public:
 
   SCM get_property_alist_chain (SCM) const;
   void suicide ();
-  bool live () const;
+  bool is_live () const;
   
   DECLARE_SCHEME_CALLBACK (stencil_extent, (SCM smob, SCM axis));
 
@@ -136,7 +126,6 @@ public:
   Real relative_coordinate (Grob const* refp, Axis) const;
   Grob*common_refpoint (Grob const* s, Axis a) const;
 
-
   // duh. slim down interface here. (todo)
   bool has_offset_callback (SCM callback, Axis)const;
   void add_offset_callback (SCM callback, Axis);
@@ -145,8 +134,8 @@ public:
   Real get_offset (Axis a) const;
   
   void set_parent (Grob* e, Axis);
-  
   Grob *get_parent (Axis a) const {   return  dim_cache_[a].parent_; }
+
   DECLARE_SCHEME_CALLBACK (fixup_refpoint, (SCM));
 };
 
index 8b5ab341ea6f59a20d131dc446fa80c646211c7d..cd76d29881bd0bf6e35046c7d6c2aec95ff90c8f 100644 (file)
 #include "smobs.hh"
 #include "input.hh"
 
-/**
-  Definition of how to output lilypond.
+/*
+  Output settings for a block of music.
+
+  This devolved into a rather empty class. The distinction between
+  various instances is made in the parser, which creates
+  midi/paper/bookpaper blocks depending on the keyword read.
+
+  The data structure is set up as recursive: the definitions not
+  supplied in paper are looked up in bookpaper. This is done through
+  the parent_ field of Output_def. However, such nesting is limited to
+  two levels,
+
+  * first because the parser hard-codes the different types
+  of output block.
+
+  * Second, because the prime benefit of multiple levels
+  (eg. bookpaper containing paper for a score, containing paper of a
+  \score embedded in \markup) requires scaling the Stencils (eg. the
+  one coming from score at markup level)
+  
  */
 class Output_def   
 {
index ee3f53c8883fa9f72fe0cc63ac5360057e5b3ea1..02dc5a08e691ac523be09b38ee232ceb5ee7c0b5 100644 (file)
@@ -237,7 +237,7 @@ check_meshing_chords (Grob *me,
            d->suicide ();
        }
       
-      if (wipe_ball && wipe_ball->live ())
+      if (wipe_ball && wipe_ball->is_live ())
        {
          wipe_ball->set_property ("transparent", SCM_BOOL_T);
          wipe_ball->set_property ("stencil", SCM_EOL);
index 3a9d904e288265516f0c07e070c1c5c653e03efc..54a391a881776862221b794e8f40d963ed677aa6 100644 (file)
@@ -164,7 +164,7 @@ Note_spacing::get_spacing (Grob *me, Item* right_col,
 Item *
 Note_spacing::left_column (Grob *me)
 {
-  if (!me->live ())
+  if (!me->is_live ())
     return 0;
   
   return dynamic_cast<Item*> (me)->get_column ();
@@ -181,7 +181,7 @@ prune RIGHT-ITEMS.
 Item *
 Note_spacing::right_column (Grob*me)
 {
-  if (!me->live ())
+  if (!me->is_live ())
     return 0;
   
   SCM right = me->get_property ("right-items");
@@ -273,7 +273,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn,
          
          Grob *stem = Note_column::get_stem (it);
 
-         if (!stem || !stem->live ())
+         if (!stem || !stem->is_live ())
            {
              if (d == RIGHT && Separation_item::has_interface (it))
                {
index b304ee447280747136393762b8ee4e12718379bc..04759a3b1c3c8ae9ddd7666a4d5f4ddf80e63fd4 100644 (file)
@@ -87,7 +87,6 @@ Paper_book::print_smob (SCM smob, SCM port, scm_print_state*)
   TODO: there is too much code dup, and the interface is not
   clear. FIXME.
  */
-
 void
 Paper_book::output (String outname)
 {
@@ -101,7 +100,11 @@ Paper_book::output (String outname)
   Paper_outputter *out = get_paper_outputter (outname);
   int page_count = scm_ilength (pages);
 
-  out->output_header (bookpaper_,   scm_list_1 (header_), page_count, false);
+  SCM scopes = SCM_EOL;
+  if (ly_c_module_p (header_))
+    scopes = scm_cons (header_, scopes);
+  
+  out->output_header (bookpaper_, scopes, page_count, false);
 
   for (SCM s = pages; s != SCM_EOL; s = ly_cdr (s))
     {
@@ -169,7 +172,7 @@ Paper_book::classic_output (String outname)
     scopes = scm_cons (score_lines_[0].header_, scopes);
   //end ugh
   
-  out->output_header (p, header_, 0, true);
+  out->output_header (p, scopes, 0, true);
 
   SCM top_lines = score_lines_.top ().lines_;
   Paper_line *first = unsmob_paper_line (scm_vector_ref (top_lines,
index 6f52171db191e6e1e6bea095da00d7329f874aa1..5e5bc659a5722b82bd7707204cd2405112a9aedc 100644 (file)
@@ -151,7 +151,7 @@ Paper_column::before_line_breaking (SCM grob)
     {
       Grob * g = unsmob_grob (ly_car (*ptrptr));
 
-      if (!g || !g->live ())
+      if (!g || !g->is_live ())
        {
          *ptrptr = ly_cdr (*ptrptr);
        }
index a5d77bd4da6698f1f6589081d0881c263a14e916..593f7acca5cf07ea8679cedc2627a0d1f0f54ca0 100644 (file)
@@ -304,6 +304,7 @@ or
 %token TYPE
 %token UNSET
 %token WITH
+%token MARKUP
 
 /* escaped */
 /* FIXME: this sucks.  The user will get to see these names:
@@ -311,115 +312,110 @@ or
                \
                  %%
   */
+
 %token E_CHAR E_EXCLAMATION E_SMALLER E_BIGGER E_OPEN E_CLOSE
 %token E_LEFTSQUARE E_RIGHTSQUARE E_TILDE
 %token E_BACKSLASH
-%token <i> E_UNSIGNED
 %token CHORD_BASS CHORD_COLON CHORD_MINUS CHORD_CARET  CHORD_SLASH
 %token FIGURE_SPACE
 
 %token <i>     DIGIT
-%token <scm>   NOTENAME_PITCH
-%token <scm>   TONICNAME_PITCH
-%token <scm>   CHORDMODIFIER_PITCH
-%token <scm>   DURATION_IDENTIFIER
-%token <scm>    FRACTION
+%token <i>     UNSIGNED
+%token <i> E_UNSIGNED
 %token <id>    IDENTIFIER
-%token DRUMS
+%token <scm>   CHORDMODIFIER_PITCH
 %token <scm>   DRUM_PITCH
-%token <scm>   CHORD_MODIFIER
-%token <scm>   SCORE_IDENTIFIER
-%token <scm>   MUSIC_OUTPUT_DEF_IDENTIFIER
-%token <scm>   NUMBER_IDENTIFIER
+%token <scm>   DURATION_IDENTIFIER
 %token <scm>   EVENT_IDENTIFIER
 %token <scm>   MUSIC_IDENTIFIER CONTEXT_DEF_IDENTIFIER
-%token <scm>   STRING_IDENTIFIER SCM_IDENTIFIER
+%token <scm>   NOTENAME_PITCH
+%token <scm>   NUMBER_IDENTIFIER
+%token <scm>   OUTPUT_DEF_IDENTIFIER
 %token <scm>   RESTNAME
-%token <scm>   STRING
 %token <scm>   SCM_T
-%token <i>     UNSIGNED
+%token <scm>   SCORE_IDENTIFIER
+%token <scm>   STRING
+%token <scm>   STRING_IDENTIFIER SCM_IDENTIFIER
+%token <scm>   TONICNAME_PITCH
+%token <scm>   CHORD_MODIFIER
+%token <scm>    FRACTION
 %token <scm>   REAL
-
-%token MARKUP
-%token <scm> MARKUP_HEAD_MARKUP0
 %token <scm> MARKUP_HEAD_EMPTY
+%token <scm> MARKUP_HEAD_MARKUP0
 %token <scm> MARKUP_HEAD_MARKUP0_MARKUP1
 %token <scm> MARKUP_HEAD_SCM0
 %token <scm> MARKUP_HEAD_SCM0_MARKUP1
 %token <scm> MARKUP_HEAD_SCM0_SCM1
-%token <scm> MARKUP_HEAD_SCM0_SCM1_SCM2
 %token <scm> MARKUP_HEAD_SCM0_SCM1_MARKUP2
-
+%token <scm> MARKUP_HEAD_SCM0_SCM1_SCM2
+%token <scm> MARKUP_IDENTIFIER MARKUP_HEAD_LIST0
 %token <scm> MUSIC_FUNCTION
-%token <scm> MUSIC_FUNCTION_SCM 
 %token <scm> MUSIC_FUNCTION_MUSIC 
-%token <scm> MUSIC_FUNCTION_SCM_MUSIC 
 %token <scm> MUSIC_FUNCTION_MUSIC_MUSIC 
-%token <scm> MUSIC_FUNCTION_SCM_SCM_MUSIC 
+%token <scm> MUSIC_FUNCTION_SCM 
+%token <scm> MUSIC_FUNCTION_SCM_MUSIC 
 %token <scm> MUSIC_FUNCTION_SCM_MUSIC_MUSIC 
+%token <scm> MUSIC_FUNCTION_SCM_SCM_MUSIC 
+%token DRUMS
 
-%token <scm> MARKUP_IDENTIFIER MARKUP_HEAD_LIST0
-%type <scm> markup markup_line markup_list  markup_list_body full_markup
 
-%type <book>   book_block book_body
-%type <outputdef> book_paper_head book_paper_block book_paper_body
 
+%type <book>   book_block book_body
+%type <i>      bare_int  bare_unsigned
 %type <i>      exclamations questions dots optional_rest
-%type <i>      bass_mod
-%type <scm>    oct_check
-%type <scm>    context_mod_list
-%type <scm>    lyric_element
-%type <scm>    bass_number br_bass_figure bass_figure figure_list figure_spec
-%type <scm>    new_lyrics
-%type <outputdef> output_def
-%type <scm>    lilypond_header lilypond_header_body
-%type <music>  open_event close_event
+%type <i>      script_dir
 %type <i>      sub_quotes sup_quotes
-%type <music>  toplevel_music
-%type <music>  simple_element event_chord command_element
+%type <i>      tremolo_type
+%type <i>      bass_mod
+
 %type <music>  Composite_music Simple_music Prefix_composite_music Generic_prefix_music
-%type <scm>    Generic_prefix_music_scm 
 %type <music>  Grouped_music_list
+%type <music>  Music Sequential_music Simultaneous_music
 %type <music>  Repeated_music
-%type <scm>     Alternative_music
-%type <i>      tremolo_type
-%type <i>      bare_int  bare_unsigned
-%type <i>      script_dir
-%type <scm>    identifier_init
-%type <scm>    simple_string
-
-%type <music>  note_chord_element chord_body chord_body_element
-%type <scm>    chord_body_elements
-%type <scm>    steno_duration optional_notemode_duration multiplied_duration
-       
-%type <scm>    post_events
+%type <music>  command_req
 %type <music>  gen_text_def direction_less_event direction_reqd_event
-%type <scm>    steno_pitch pitch absolute_pitch pitch_also_in_chords
-%type <scm>    steno_tonic_pitch
-%type <scm>    duration_length fraction
-
-%type <scm>    chord_item chord_items chord_separator new_chord
-%type <scm>    step_number step_numbers 
-
-%type <scm>    embedded_scm scalar
-%type <music>  Music Sequential_music Simultaneous_music
-%type <music>  relative_music re_rhythmed_music
 %type <music>  music_property_def context_change
-%type <scm>    context_prop_spec
-%type <scm>    Music_list
-%type <scm>    property_operation
-%type <scm>    context_mod context_def_mod optional_context_mod
-%type <outputdef>      music_output_def_body music_output_def_head
+%type <music>  note_chord_element chord_body chord_body_element
+%type <music>  open_event close_event
 %type <music>  post_event tagged_post_event
-%type <music>  command_req
+%type <music>  relative_music re_rhythmed_music
+%type <music>  simple_element event_chord command_element
 %type <music>  string_number_event
-%type <scm>    string bare_number number_expression number_term number_factor
-%type <score>  score_block score_body
+%type <music>  toplevel_music
+%type <music>  tempo_event
+
+%type <outputdef>      output_def_body output_def_head
+%type <outputdef> output_def book_paper_block 
 
+%type <scm>    Music_list
+%type <scm>    chord_body_elements
+%type <scm>    chord_item chord_items chord_separator new_chord
 %type <scm>    context_def_spec_block context_def_spec_body
-%type <music>  tempo_event
+%type <scm>    context_mod context_def_mod optional_context_mod
+%type <scm>    context_prop_spec
+%type <scm>    duration_length fraction
+%type <scm>    embedded_scm scalar
+%type <scm>    identifier_init
+%type <scm>    lilypond_header lilypond_header_body
+%type <scm>    new_lyrics
+%type <scm>    post_events
+%type <scm>    property_operation
 %type <scm>    script_abbreviation
+%type <scm>    simple_string
+%type <scm>    steno_pitch pitch absolute_pitch pitch_also_in_chords
+%type <scm>    steno_tonic_pitch
+%type <scm>    step_number step_numbers 
+%type <scm>    string bare_number number_expression number_term number_factor
+%type <scm>    bass_number br_bass_figure bass_figure figure_list figure_spec
+%type <scm>    context_mod_list
+%type <scm>    octave_check
+%type <scm>    steno_duration optional_notemode_duration multiplied_duration
+%type <scm>    Generic_prefix_music_scm 
+%type <scm>    lyric_element
+%type <scm>     Alternative_music
+%type <scm>    markup markup_line markup_list markup_list_body full_markup
 
+%type <score>  score_block score_body
 
 
 %left '-' '+'
@@ -484,10 +480,6 @@ toplevel_expression:
                THIS->lexer_->set_identifier (id, od->self_scm ());
                scm_gc_unprotect_object (od->self_scm ());
        }
-       | book_paper_block {
-               THIS->lexer_->set_identifier (ly_symbol2scm ("$defaultbookpaper"), $1->self_scm ());
-               scm_gc_unprotect_object ($1->self_scm ());
-       }
        ;
 
 toplevel_music:
@@ -618,26 +610,6 @@ context_def_spec_body:
        ;
 
 
-book_paper_block:
-       book_paper_body '}' {
-               $$ = $1;
-               THIS->lexer_->remove_scope ();
-       }
-       ;
-book_paper_head:
-       BOOKPAPER '{' {
-               $$ = get_bookpaper (THIS);
-               $$->input_origin_ = THIS->here_input ();
-               THIS->lexer_->add_scope ($$->scope_);
-       }
-       ;
-
-book_paper_body:
-       book_paper_head
-       | book_paper_body assignment { }
-       ;
-       
-
 
 book_block:
        BOOK {
@@ -729,10 +701,23 @@ score_body:
 
 
 /*
-       MIDI
+       OUTPUT DEF
 */
+
+book_paper_block:
+       output_def {
+               $$ = $1;
+               if ($$->lookup_variable (ly_symbol2scm ("is-bookpaper")) != SCM_BOOL_T)
+               {
+                       THIS->parser_error (_("Need \\bookpaper for bookpaper block."));
+                       $$ = get_bookpaper (THIS);
+               }
+       }
+       ;
+
+
 output_def:
-       music_output_def_body '}' {
+       output_def_body '}' {
                $$ = $1;
                if ($1->parent_)
                        THIS->lexer_->remove_scope ();
@@ -742,8 +727,13 @@ output_def:
        }
        ;
 
-music_output_def_head:
-       MIDI    {
+output_def_head:
+       BOOKPAPER {
+               $$ = get_bookpaper (THIS);
+               $$->input_origin_ = THIS->here_input ();
+               THIS->lexer_->add_scope ($$->scope_);
+       }
+       | MIDI    {
                Output_def *p = get_midi (THIS);
                $$ = p;
                THIS->lexer_->add_scope (p->scope_);
@@ -760,13 +750,13 @@ music_output_def_head:
        ;
 
 
-music_output_def_body:
-       music_output_def_head '{' {
+output_def_body:
+       output_def_head '{' {
                $$ = $1;
                $$->input_origin_.set_spot (THIS->here_input ());
                THIS->lexer_->push_initial_state ();
        }
-       | music_output_def_head '{' MUSIC_OUTPUT_DEF_IDENTIFIER         {
+       | output_def_head '{' OUTPUT_DEF_IDENTIFIER     {
                scm_gc_unprotect_object ($1->self_scm ());
                Output_def *o = unsmob_output_def ($3);
                o->input_origin_.set_spot (THIS->here_input ());
@@ -775,13 +765,13 @@ music_output_def_body:
                THIS->lexer_->add_scope (o->scope_);
                THIS->lexer_->push_initial_state ();
        }
-       | music_output_def_body assignment  {
+       | output_def_body assignment  {
 
        }
-       | music_output_def_body context_def_spec_block  {
+       | output_def_body context_def_spec_block        {
                assign_context_def ($$, $2);
        }
-       | music_output_def_body tempo_event  {
+       | output_def_body tempo_event  {
                /*
                        junk this ? there already is tempo stuff in
                        music.
@@ -791,7 +781,7 @@ music_output_def_body:
                set_tempo ($$, d->get_length (), m);
                scm_gc_unprotect_object ($2->self_scm ());
        }
-       | music_output_def_body error {
+       | output_def_body error {
 
        }
        ;
@@ -1779,7 +1769,7 @@ direction_reqd_event:
        }
        ;
 
-oct_check:
+octave_check:
        /**/ { $$ = SCM_EOL; }
        | '='  { $$ = scm_int2num (0); }
        | '=' sub_quotes { $$ = scm_int2num ($2); }
@@ -2124,7 +2114,7 @@ optional_rest:
        ;
 
 simple_element:
-       pitch exclamations questions oct_check optional_notemode_duration optional_rest {
+       pitch exclamations questions octave_check optional_notemode_duration optional_rest {
 
                Input i = THIS->pop_spot ();
                if (!THIS->lexer_->is_note_state ())
@@ -2586,7 +2576,7 @@ My_lily_lexer::try_special_identifiers (SCM *destination, SCM sid)
                p = p->clone ();
 
                *destination = p->self_scm ();
-               return MUSIC_OUTPUT_DEF_IDENTIFIER;
+               return OUTPUT_DEF_IDENTIFIER;
        } else if (Text_item::markup_p (sid)) {
                *destination = sid;
                return MARKUP_IDENTIFIER;
index ef383470960cd5a30dfc95a4db29b44185a55ba7..ad6741cdb26938c3d520182b467ebd27ca3e43a8 100644 (file)
@@ -429,11 +429,11 @@ Piano_pedal_engraver::finalize ()
        suicide?
       */
       if (p->line_spanner_
-         && !p->line_spanner_->live ())
+         && !p->line_spanner_->is_live ())
        p->line_spanner_ = 0;
       
       if (p->bracket_
-         && !p->bracket_->live ())
+         && !p->bracket_->is_live ())
        p->bracket_ = 0;
       
       if (p->bracket_)
@@ -500,10 +500,10 @@ Piano_pedal_engraver::typeset_all (Pedal_info * p)
     Handle suicide. 
   */
   if (p->finished_line_spanner_
-      && !p->finished_line_spanner_->live ())
+      && !p->finished_line_spanner_->is_live ())
     p->finished_line_spanner_ = 0;
   if (p->finished_bracket_
-      && !p->finished_bracket_->live ())
+      && !p->finished_bracket_->is_live ())
     p->finished_bracket_ = 0;
 
 
index fe813adc0a3209effd8c2dee75079f3d5c54d6ae..38c39dffc4e5fb5c7048a2dcf160811d0e749596 100644 (file)
@@ -68,9 +68,6 @@ void
 Staff_symbol_engraver::acknowledge_grob (Grob_info s)
 {
   s.grob_->set_property ("staff-symbol", span_->self_scm ());
-
-  // remove this. probly not necessary?
-  s.grob_->add_dependency (span_); // UGH. UGH. UGH
 }
 
 
index 1ac44ca61ef02be7f142b2a08a0cfd17eaaf9aab..84a70cc432e732ea8588ccb98e0daf41f7f26f12 100644 (file)
@@ -125,7 +125,7 @@ Stem_tremolo::print (SCM grob)
     stemdir = UP;
 
   Real beam_translation
-    = (beam && beam->live ())
+    = (beam && beam->is_live ())
     ? Beam::get_beam_translation (beam)
     : 0.81;
 
index 48f7034236bc3d26adb732d4eb5015d073cd6461..d8485232ab2b83f428705416122fc2a9df0233de 100644 (file)
@@ -89,7 +89,7 @@ System::get_lines ()
            }
          g->suicide ();
        }
-      else if (g->live ())
+      else if (g->is_live ())
        g->do_break_processing ();
     }
 
index 17ea197241e26f86137e55214eb8a17443dec393..c3ff0c50e672958908557893ff24fcfc71871870 100644 (file)
@@ -154,7 +154,7 @@ Tie_column::werner_directions (Grob *me)
   if (ties.size () == 1)
     {
       Grob *  t = ties[0];
-      if (t->live ()
+      if (t->is_live ()
          && !get_grob_direction (t))
        set_grob_direction (t,Tie::get_default_dir (t));
       return ;
index 3f82992e04fbf6cf4084ef3f9f29719adc69c0cb..f5e77909179e4cf738dee8b403b56f0eb4d1317f 100644 (file)
 ;; parser stuff.
 (define-public (print-music-as-book parser music)
   (let* ((score (ly:music-scorify music))
-        (book (ly:score-bookify score)))
+        (head  (ly:parser-lookup parser '$globalheader))
+        (book (ly:score-bookify score head)))
     (ly:parser-print-book parser book)))
 
 (define-public (print-score-as-book parser score)
-  (let
-      ((book (ly:score-bookify score (ly:parser-lookup parser '$globalheader))))
+  (let*
+      ((head  (ly:parser-lookup parser '$globalheader))
+       (book (ly:score-bookify score head)))
     
     (ly:parser-print-book parser book)))
 
 (define-public (print-score parser score)
-  (let ((book (ly:score-bookify score)))
+  (let* ((head  (ly:parser-lookup parser '$globalheader))
+       (book (ly:score-bookify score head)))
     (ly:parser-print-score parser book)))
                
 (define-public default-toplevel-music-handler print-music-as-book)