From 2dfde5ba6863f0a05161daf761c5b7d0828521c8 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 23:56:34 +0000 Subject: [PATCH] lilypond-1.3.93 --- config.make.in | 2 - configure.in | 10 --- lily/all-font-metrics.cc | 45 ++++++++------ lily/audio-column.cc | 11 ---- lily/audio-element.cc | 13 ---- lily/audio-item.cc | 11 +--- lily/change-translator.cc | 6 -- lily/command-request.cc | 20 ------ lily/global-translator.cc | 1 - lily/identifier.cc | 31 ---------- lily/include/audio-element.hh | 3 +- lily/include/audio-item.hh | 2 - lily/include/change-translator.hh | 1 - lily/include/command-request.hh | 6 +- lily/include/engraver-group-engraver.hh | 3 + lily/include/identifier.hh | 4 +- lily/include/lyric-combine-music.hh | 2 +- lily/include/lyric-performer.hh | 2 +- lily/include/music-output-def.hh | 2 +- lily/include/music-sequence.hh | 2 +- lily/include/music-wrapper.hh | 2 +- lily/include/music.hh | 2 +- lily/include/musical-pitch.hh | 2 +- lily/include/musical-request.hh | 14 ++--- lily/include/note-performer.hh | 2 +- lily/include/paper-def.hh | 2 +- lily/include/part-combine-music.hh | 2 +- lily/include/relative-music.hh | 2 +- lily/include/request.hh | 4 +- lily/include/scope.hh | 3 + lily/include/score.hh | 1 - lily/include/symbol-cache.hh | 79 ++++++++++++++++++++++++ lily/include/tempo-performer.hh | 2 +- lily/include/time-signature-performer.hh | 2 +- lily/include/translator-group.hh | 2 +- lily/include/translator.hh | 4 +- lily/include/transposed-music.hh | 2 +- lily/line-group-group-engraver.cc | 1 - lily/lyric-combine-music.cc | 6 -- lily/lyric-performer.cc | 8 --- lily/moment.cc | 2 +- lily/music-output-def.cc | 10 ++- lily/music-sequence.cc | 8 --- lily/music-wrapper.cc | 6 +- lily/music.cc | 9 +-- lily/musical-pitch.cc | 7 --- lily/musical-request.cc | 61 ------------------ lily/my-lily-lexer.cc | 7 ++- lily/note-performer.cc | 10 +-- lily/paper-def.cc | 17 +---- lily/part-combine-music.cc | 7 +-- lily/performance.cc | 13 ---- lily/property-engraver.cc | 24 +++++-- lily/relative-octave-music.cc | 6 -- lily/request.cc | 5 +- lily/scope.cc | 6 ++ lily/score-element.cc | 7 +-- lily/score-engraver.cc | 2 +- lily/score.cc | 13 +--- lily/scores.cc | 2 - lily/slur-bezier-bow.cc | 13 ---- lily/stanza-number-engraver.cc | 4 +- lily/symbol-cache.cc | 77 +++++++++++++++++++++++ lily/tempo-performer.cc | 8 --- lily/tfm-reader.cc | 26 -------- lily/time-signature-performer.cc | 8 --- lily/translator-group.cc | 16 ++--- lily/translator.cc | 16 ----- lily/transposed-music.cc | 6 -- lily/volta-engraver.cc | 2 +- make/toplevel.make.in | 2 +- stepmake/aclocal.m4 | 6 -- 72 files changed, 276 insertions(+), 449 deletions(-) create mode 100644 lily/include/symbol-cache.hh create mode 100644 lily/symbol-cache.cc diff --git a/config.make.in b/config.make.in index bd7a13c042..0676f025c0 100644 --- a/config.make.in +++ b/config.make.in @@ -16,7 +16,6 @@ PACKAGE = @PACKAGE@ package = @package@ PACKAGE_NAME = @PACKAGE_NAME@ stepmake = @stepmake@ -state-vector = @STATE_VECTOR@ CONFIGSUFFIX = @CONFIGSUFFIX@ MAKEINFO = @MAKEINFO@ ICFLAGS = @ICFLAGS@ @@ -42,7 +41,6 @@ EXTRA_LIBES = @EXTRA_LIBES@ @LIBS@ TFM_PATH = @TFM_PATH@ RANLIB = @RANLIB@ DEFS = @DEFS@ -#SET_MAKE = @SET_MAKE@ DEFINES = @DEFS@ @DEFINES@ COMPILEINFO = @COMPILEINFO@ DOTEXE = @DOTEXE@ diff --git a/configure.in b/configure.in index aa3f16f08f..c4cf39588c 100644 --- a/configure.in +++ b/configure.in @@ -17,21 +17,11 @@ AC_STEPMAKE_COMPILE AC_HAVE_HEADERS(assert.h sys/stat.h) AC_HEADER_STAT -printing_b=no -AC_ARG_ENABLE(printing, - [ enable-printing turn on debug printing. Default: off], - [printing_b=$enableval]) - if test "$optimise_b" = yes; then DEFINES="$DEFINES -DSTRING_UTILS_INLINED" AC_DEFINE(STRINGS_UTILS_INLINED) fi -if test "$printing_b" = no; then - # ugh - AC_DEFINE(NPRINT) - DEFINES="$DEFINES -DNPRINT" -fi AC_STEPMAKE_CXX AC_STEPMAKE_GXX diff --git a/lily/all-font-metrics.cc b/lily/all-font-metrics.cc index d7ec2a94fb..ab4d17759c 100644 --- a/lily/all-font-metrics.cc +++ b/lily/all-font-metrics.cc @@ -44,7 +44,10 @@ Adobe_font_metric * All_font_metrics::find_afm (String name) { SCM sname = ly_symbol2scm (name.ch_C ()); - if (!afm_p_dict_->elem_b (sname)) + + SCM val; + + if (!afm_p_dict_->try_retrieve (sname, &val)) { String path; @@ -63,17 +66,19 @@ All_font_metrics::find_afm (String name) if (verbose_global_b) progress_indication ("[" + path); - SCM afm = read_afm_file (path); + val = read_afm_file (path); - unsmob_metrics (afm)->name_ = sname; + unsmob_metrics (val)->name_ = sname; if (verbose_global_b) progress_indication ("]"); - afm_p_dict_->set (sname,afm); + afm_p_dict_->set (sname,val); + + } - return dynamic_cast (unsmob_metrics (afm_p_dict_->get (sname))); + return dynamic_cast (unsmob_metrics (val)); } Scaled_font_metric * @@ -82,25 +87,26 @@ All_font_metrics::find_scaled (String nm, int m) String index = nm + "@" + to_str (m); SCM sname = ly_symbol2scm (index.ch_C ()); - Font_metric *fm =0; - if (!scaled_p_dict_->elem_b (sname)) + SCM val; + + if (!scaled_p_dict_->try_retrieve (sname, &val)) { Font_metric *f = find_font (nm); - SCM s = Scaled_font_metric::make_scaled_font_metric (f, m); - scaled_p_dict_->set (sname, s); - fm = unsmob_metrics (s); + val = Scaled_font_metric::make_scaled_font_metric (f, m); + scaled_p_dict_->set (sname, val); } - else - fm = unsmob_metrics (scaled_p_dict_->get (sname)); + - return dynamic_cast (fm); + return dynamic_cast (unsmob_metrics (val)); } Tex_font_metric * All_font_metrics::find_tfm (String name) { - SCM sname = ly_symbol2scm (name.ch_C ()); - if (!tfm_p_dict_->elem_b (sname)) + SCM sname = ly_symbol2scm (name.ch_C ()); + + SCM val; + if (!tfm_p_dict_->try_retrieve (sname, &val)) { String path; @@ -118,17 +124,16 @@ All_font_metrics::find_tfm (String name) if (verbose_global_b) progress_indication ("[" + path); - SCM tfm = Tex_font_metric::make_tfm (path); + val = Tex_font_metric::make_tfm (path); if (verbose_global_b) progress_indication ("]"); - Font_metric *fm = unsmob_metrics (tfm); - fm->name_ = sname; - tfm_p_dict_->set (sname, tfm); + unsmob_metrics (val)->name_ = sname; + tfm_p_dict_->set (sname, val); } return - dynamic_cast (unsmob_metrics (tfm_p_dict_->get(sname))); + dynamic_cast (unsmob_metrics (val)); } diff --git a/lily/audio-column.cc b/lily/audio-column.cc index 1dde79a5e9..b29f09982c 100644 --- a/lily/audio-column.cc +++ b/lily/audio-column.cc @@ -31,15 +31,4 @@ Audio_column::at_mom() const return at_mom_; } -void -Audio_column::print() const -{ -#ifndef NPRINT - DEBUG_OUT << "Audio_column {"; - DEBUG_OUT << "at: " << at_mom_ << ". Contains:"; - for (int i =0; i < audio_item_l_arr_.size (); i++) - DEBUG_OUT << classname (audio_item_l_arr_[i]) << ", "; - DEBUG_OUT << "\n}\n"; -#endif -} diff --git a/lily/audio-element.cc b/lily/audio-element.cc index 39fbe8f178..9eff747eb4 100644 --- a/lily/audio-element.cc +++ b/lily/audio-element.cc @@ -18,17 +18,4 @@ Audio_element::~Audio_element() { } -void -Audio_element::print () const -{ -#ifndef NPRINT - DEBUG_OUT << classname (this) << "{ "; - do_print (); - DEBUG_OUT << "}"; -#endif -} -void -Audio_element::do_print ()const -{ -} diff --git a/lily/audio-item.cc b/lily/audio-item.cc index 4e771ca08e..b4d358c7f7 100644 --- a/lily/audio-item.cc +++ b/lily/audio-item.cc @@ -83,14 +83,5 @@ Audio_tie::set_note (Direction d, Audio_note* note_l) // add_dependency (head_l); } -void -Audio_item::do_print () const -{ -#ifndef NPRINT - if (audio_column_l_) - { - DEBUG_OUT << "at: "<< audio_column_l_->at_mom (); - } -#endif -} + diff --git a/lily/change-translator.cc b/lily/change-translator.cc index b0144488be..144aefd229 100644 --- a/lily/change-translator.cc +++ b/lily/change-translator.cc @@ -11,9 +11,3 @@ -void -Change_translator::do_print () const -{ - DEBUG_OUT << "change " << change_to_type_str_ << " to " << change_to_id_str_ ; -} - diff --git a/lily/command-request.cc b/lily/command-request.cc index 1aaaea84ea..8ea0ef54dd 100644 --- a/lily/command-request.cc +++ b/lily/command-request.cc @@ -23,13 +23,6 @@ Barcheck_req::do_equal_b (Request const *r) const return b; } -void -Clef_change_req::do_print () const -{ -#ifndef NPRINT - DEBUG_OUT << clef_str_ ; -#endif -} Clef_change_req::Clef_change_req (String s) { @@ -37,14 +30,6 @@ Clef_change_req::Clef_change_req (String s) } -void -Time_signature_change_req::do_print () const -{ -#ifndef NPRINT - DEBUG_OUT << beats_i_ << "/" << one_beat_i_; -#endif -} - bool Time_signature_change_req::do_equal_b (Request const *r) const { @@ -68,11 +53,6 @@ Tempo_req::Tempo_req () dur_. durlog_i_ = 2; } -void -Tempo_req::do_print () const -{ - DEBUG_OUT << dur_.str () << " = " << metronome_i_; -} bool diff --git a/lily/global-translator.cc b/lily/global-translator.cc index 1713ce3736..ad3b7d0a8a 100644 --- a/lily/global-translator.cc +++ b/lily/global-translator.cc @@ -92,7 +92,6 @@ Global_translator::run_iterator_on_me (Music_iterator * iter) { w = iter->pending_moment(); - DEBUG_OUT << "proccing: " << w << '\n'; } w = sneaky_insert_extra_moment (w); diff --git a/lily/identifier.cc b/lily/identifier.cc index bedc2f9dfd..d46460f71b 100644 --- a/lily/identifier.cc +++ b/lily/identifier.cc @@ -61,28 +61,6 @@ Identifier::do_str () const return ""; } -void -Identifier::print () const -{ - DEBUG_OUT << "identifier "; - do_print (); -} -void -Identifier::do_print () const -{ -} - -/* ugh. */ -#define DEFAULT_PRINT(Class) \ -void \ -Class ## _identifier::do_print () const { \ - Class *cl = ((Class ## _identifier *)this)->access_content_ ## Class(false);\ - cl->print (); \ -} - - -DEFAULT_PRINT(Score); -DEFAULT_PRINT(Music_output_def); /* ugh. */ #define DUMMY_STR(Class) \ @@ -95,15 +73,6 @@ DUMMY_STR(Score); DUMMY_STR(Music_output_def); DUMMY_STR(Duration); -#define STRING_PRINT(Class) \ -void \ -Class ## _identifier::do_print () const\ -{\ - DEBUG_OUT << do_str () << '\n';\ -}\ - - -STRING_PRINT(Duration); #define DEFAULT_STR(Class) \ String \ diff --git a/lily/include/audio-element.hh b/lily/include/audio-element.hh index 6dff0e01f7..a8d79fc0e5 100644 --- a/lily/include/audio-element.hh +++ b/lily/include/audio-element.hh @@ -19,13 +19,12 @@ public: Audio_element (); virtual ~Audio_element (); - void print () const; + // should we use a scm list? bool grace_b_; protected: - virtual void do_print () const; }; #endif // AUDIO_ELEMENT_HH diff --git a/lily/include/audio-item.hh b/lily/include/audio-item.hh index b06ab920c9..e8ced6a64b 100644 --- a/lily/include/audio-item.hh +++ b/lily/include/audio-item.hh @@ -29,8 +29,6 @@ public: Audio_column* audio_column_l_; -protected: - virtual void do_print () const; private: Audio_item (Audio_item const&); diff --git a/lily/include/change-translator.hh b/lily/include/change-translator.hh index af18db7eb3..7dc774ca37 100644 --- a/lily/include/change-translator.hh +++ b/lily/include/change-translator.hh @@ -20,7 +20,6 @@ public: protected: VIRTUAL_COPY_CONS(Music); - void do_print () const; }; diff --git a/lily/include/command-request.hh b/lily/include/command-request.hh index 875024650c..078e02dd2f 100644 --- a/lily/include/command-request.hh +++ b/lily/include/command-request.hh @@ -48,7 +48,7 @@ public: Tempo_req(); protected: - virtual void do_print () const; + VIRTUAL_COPY_CONS(Music); bool do_equal_b (Request const *) const; }; @@ -64,7 +64,7 @@ public: Time_signature_change_req(); protected: - virtual void do_print () const; + bool do_equal_b (Request const *) const; VIRTUAL_COPY_CONS(Music); }; @@ -111,7 +111,7 @@ public: String clef_str_; Clef_change_req (String); protected: - virtual void do_print () const; + VIRTUAL_COPY_CONS(Music); }; diff --git a/lily/include/engraver-group-engraver.hh b/lily/include/engraver-group-engraver.hh index dffbfd18ef..dd378bf0e0 100644 --- a/lily/include/engraver-group-engraver.hh +++ b/lily/include/engraver-group-engraver.hh @@ -27,6 +27,9 @@ class Engraver_group_engraver : public Engraver, { protected: Array announce_info_arr_; + + + public: VIRTUAL_COPY_CONS(Translator); diff --git a/lily/include/identifier.hh b/lily/include/identifier.hh index 2e39b1ff47..7f87c08b8f 100644 --- a/lily/include/identifier.hh +++ b/lily/include/identifier.hh @@ -49,7 +49,7 @@ struct Identifier : public Input { DECLARE_SMOBS(Identifier, foo); protected: - virtual void do_print () const; + virtual String do_str () const; }; @@ -62,7 +62,7 @@ struct Class ## _identifier : Identifier {\ VIRTUAL_COPY_CONS(Identifier);\ virtual Class* access_content_ ## Class (bool copy_b) const;\ ~Class ## _identifier();\ - virtual void do_print () const; \ + \ virtual String do_str () const; \ }\ diff --git a/lily/include/lyric-combine-music.hh b/lily/include/lyric-combine-music.hh index a4a47c2a43..9b121ff0d7 100644 --- a/lily/include/lyric-combine-music.hh +++ b/lily/include/lyric-combine-music.hh @@ -20,7 +20,7 @@ public: Lyric_combine_music (Music*, Music*); virtual void transpose (Musical_pitch); - virtual void do_print () const; + VIRTUAL_COPY_CONS(Music); virtual Moment length_mom () const; virtual Musical_pitch to_relative_octave (Musical_pitch); diff --git a/lily/include/lyric-performer.hh b/lily/include/lyric-performer.hh index 89890b4982..9bb48d0b74 100644 --- a/lily/include/lyric-performer.hh +++ b/lily/include/lyric-performer.hh @@ -20,7 +20,7 @@ public: Lyric_performer (); protected: - void do_print() const; + virtual bool do_try_music (Music* req_l); virtual void do_process_music(); virtual void do_pre_move_processing (); diff --git a/lily/include/music-output-def.hh b/lily/include/music-output-def.hh index a5c5c8d152..e60743cb25 100644 --- a/lily/include/music-output-def.hh +++ b/lily/include/music-output-def.hh @@ -29,7 +29,7 @@ public: Music_output_def (); virtual ~Music_output_def (); virtual int get_next_default_count () const; - virtual void print () const; + Global_translator *get_global_translator_p (); Translator_group *get_group_translator_p (String type) const; diff --git a/lily/include/music-sequence.hh b/lily/include/music-sequence.hh index 736d4abf98..6e88236e33 100644 --- a/lily/include/music-sequence.hh +++ b/lily/include/music-sequence.hh @@ -34,7 +34,7 @@ public: protected: virtual Musical_pitch to_relative_octave (Musical_pitch); - virtual void do_print() const; + }; #endif diff --git a/lily/include/music-wrapper.hh b/lily/include/music-wrapper.hh index 76987deac5..d5227830a7 100644 --- a/lily/include/music-wrapper.hh +++ b/lily/include/music-wrapper.hh @@ -25,7 +25,7 @@ public: Music_wrapper (Music*); Music * element () const; virtual void transpose (Musical_pitch); - virtual void do_print () const; + VIRTUAL_COPY_CONS(Music); virtual Moment length_mom () const; diff --git a/lily/include/music.hh b/lily/include/music.hh index 9e50aa0998..dbcfccf687 100644 --- a/lily/include/music.hh +++ b/lily/include/music.hh @@ -59,7 +59,7 @@ public: Music (Music const &m); Music(); protected: - virtual void do_print() const; + DECLARE_SMOBS(Music,); SCM immutable_property_alist_; SCM mutable_property_alist_; diff --git a/lily/include/musical-pitch.hh b/lily/include/musical-pitch.hh index 079de76c8f..ed9f63857a 100644 --- a/lily/include/musical-pitch.hh +++ b/lily/include/musical-pitch.hh @@ -46,7 +46,7 @@ struct Musical_pitch : public Input void up_to (int); void down_to (int); String str () const; - void print () const; + SCM to_scm () const; }; diff --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index ee5728441c..0c2d6f928d 100644 --- a/lily/include/musical-request.hh +++ b/lily/include/musical-request.hh @@ -23,7 +23,7 @@ class Rhythmic_req : public virtual Request { public: Duration duration_; - virtual void do_print () const; + bool do_equal_b (Request const*) const; void compress (Moment); @@ -42,7 +42,7 @@ struct Tremolo_req : public Request { VIRTUAL_COPY_CONS (Music); Tremolo_req (); int type_i_; - virtual void do_print () const; + }; @@ -50,7 +50,7 @@ struct Tremolo_req : public Request { */ class Lyric_req : public Rhythmic_req { public: - virtual void do_print () const; + String text_str_; VIRTUAL_COPY_CONS(Music); }; @@ -62,7 +62,7 @@ public: String articulation_str_; protected: virtual bool do_equal_b (Request const*) const; - virtual void do_print () const; + VIRTUAL_COPY_CONS(Music); }; @@ -75,7 +75,7 @@ public: protected: VIRTUAL_COPY_CONS(Music); virtual bool do_equal_b (Request const*)const; - virtual void do_print () const; + }; @@ -90,7 +90,7 @@ protected: /// transpose. #delta# is relative to central c. virtual void transpose (Musical_pitch delta); virtual bool do_equal_b (Request const*) const; - virtual void do_print () const; + VIRTUAL_COPY_CONS(Music); }; @@ -122,7 +122,7 @@ public: bool cautionary_b_; Note_req(); protected: - virtual void do_print () const; + bool do_equal_b (Request const*) const; VIRTUAL_COPY_CONS(Music); }; diff --git a/lily/include/note-performer.hh b/lily/include/note-performer.hh index 6b0f607ade..574e695224 100644 --- a/lily/include/note-performer.hh +++ b/lily/include/note-performer.hh @@ -23,7 +23,7 @@ public: protected: virtual void do_process_music (); virtual bool do_try_music (Music *req_l) ; - virtual void do_print () const; + virtual void do_pre_move_processing (); virtual void process_acknowledged (); Global_translator* global_translator_l (); diff --git a/lily/include/paper-def.hh b/lily/include/paper-def.hh index 3898a1ae18..17847564c6 100644 --- a/lily/include/paper-def.hh +++ b/lily/include/paper-def.hh @@ -66,7 +66,7 @@ public: Paper_def (Paper_def const&); Interval line_dimensions_int (int) const; - void print () const; + Lookup const * lookup_l (int sz) const; // TODO naming virtual int get_next_default_count () const; static void reset_default_count(); diff --git a/lily/include/part-combine-music.hh b/lily/include/part-combine-music.hh index 102de3ad06..1c91b340f2 100644 --- a/lily/include/part-combine-music.hh +++ b/lily/include/part-combine-music.hh @@ -23,7 +23,7 @@ public: Music * second_l () const; virtual void transpose (Musical_pitch); - virtual void do_print () const; + virtual Moment length_mom () const; virtual Musical_pitch to_relative_octave (Musical_pitch); virtual void compress (Moment); diff --git a/lily/include/relative-music.hh b/lily/include/relative-music.hh index 53e770f76a..a861d451bc 100644 --- a/lily/include/relative-music.hh +++ b/lily/include/relative-music.hh @@ -17,7 +17,7 @@ class Relative_octave_music : public Music_wrapper public: Musical_pitch last_pitch_; - void do_print () const; + Relative_octave_music (Music*, Musical_pitch); VIRTUAL_COPY_CONS(Music); diff --git a/lily/include/request.hh b/lily/include/request.hh index 35401d75d7..f1cd68f483 100644 --- a/lily/include/request.hh +++ b/lily/include/request.hh @@ -30,7 +30,7 @@ public: bool equal_b (Request const*) const; protected: virtual bool do_equal_b (Request const*) const; - virtual void do_print() const; + }; @@ -60,7 +60,7 @@ public: Span_req(); protected: virtual bool do_equal_b (Request const*) const; - virtual void do_print() const; + VIRTUAL_COPY_CONS(Music); }; diff --git a/lily/include/scope.hh b/lily/include/scope.hh index f1f4d8a1dc..cf16c0564b 100644 --- a/lily/include/scope.hh +++ b/lily/include/scope.hh @@ -20,6 +20,9 @@ public: SCM to_alist () const; bool elem_b (String ) const; bool elem_b (SCM s) const; + + bool try_retrieve (SCM key, SCM *val) const; + Identifier *elem (String) const; Identifier *elem (SCM) const; diff --git a/lily/include/score.hh b/lily/include/score.hh index b7515dc32a..b315574933 100644 --- a/lily/include/score.hh +++ b/lily/include/score.hh @@ -32,7 +32,6 @@ public: void process(); void add_output (Music_output_def *def_p); - void print() const; private: void run_translator (Music_output_def*); }; diff --git a/lily/include/symbol-cache.hh b/lily/include/symbol-cache.hh new file mode 100644 index 0000000000..e07b603d3c --- /dev/null +++ b/lily/include/symbol-cache.hh @@ -0,0 +1,79 @@ +/* + symbol-cache.hh -- declare Symbol cacher. + + source file of the GNU LilyPond music typesetter + + (c) 2000 Han-Wen Nienhuys + + */ + +#ifndef SYMBOL_CACHE_HH +#define SYMBOL_CACHE_HH + +#if 1 + +/* + A per file cache: for each compilation unit, there is a separate + cache that maps the address of a string directly to a SCM value + + */ +struct Symbol_cache_pair{ + const char * key; + SCM val ; +}; + +static Symbol_cache_pair *private_symbol_cache; +static Symbol_cache_pair *private_symbol_cache_end; + +static SCM +symbol (const char *ch) __attribute__ ((unused)); + + SCM +symbol (const char *ch) +{ + Symbol_cache_pair * lo = private_symbol_cache; + Symbol_cache_pair * hi = private_symbol_cache_end -1; + + if (lo) + { + do + { + Symbol_cache_pair * mid = lo + (hi - lo) / 2 ; + if (mid->key > ch) + hi = mid; + else + lo = mid; + } + while ((hi - lo) > 1); + if (lo->key== ch) + return lo->val; + } + + + Symbol_cache_pair * p = private_symbol_cache; + for (; p < private_symbol_cache_end + && p->key < ch ; p++) + ; + + int idx = p - private_symbol_cache; + + SCM sym = gh_symbol2scm ((char*) ch); + scm_permanent_object (sym); + + int sz = private_symbol_cache_end - private_symbol_cache; + sz ++ ; + private_symbol_cache + = (Symbol_cache_pair*) realloc (private_symbol_cache, + sizeof (Symbol_cache_pair)* sz); + private_symbol_cache_end = private_symbol_cache + sz; + for (p = private_symbol_cache_end -1; + p != private_symbol_cache + idx; p --) + *p = *(p - 1); + + p->key = ch; + p->val = sym; + + return sym; +} +#endif /* SYMBOL_CACHE_HH */ +#endif diff --git a/lily/include/tempo-performer.hh b/lily/include/tempo-performer.hh index 086b731cd3..c4a6d0f7c8 100644 --- a/lily/include/tempo-performer.hh +++ b/lily/include/tempo-performer.hh @@ -21,7 +21,7 @@ public: ~Tempo_performer(); protected: - void do_print() const; + virtual bool do_try_music (Music* req_l); virtual void do_process_music(); virtual void do_pre_move_processing (); diff --git a/lily/include/time-signature-performer.hh b/lily/include/time-signature-performer.hh index 7226d1c086..ef3d20bb27 100644 --- a/lily/include/time-signature-performer.hh +++ b/lily/include/time-signature-performer.hh @@ -21,7 +21,7 @@ public: ~Time_signature_performer(); protected: - void do_print() const; + virtual bool do_try_music (Music* req_l); virtual void do_process_music(); virtual void do_pre_move_processing (); diff --git a/lily/include/translator-group.hh b/lily/include/translator-group.hh index 507ff124b4..5d24929d5b 100644 --- a/lily/include/translator-group.hh +++ b/lily/include/translator-group.hh @@ -69,7 +69,7 @@ public: protected: bool try_music_on_nongroup_children (Music *m); - virtual void do_print () const; + virtual void do_process_music (); virtual void do_add_processing (); virtual bool do_try_music (Music* req_l); diff --git a/lily/include/translator.hh b/lily/include/translator.hh index 74a46a1fd2..2eb5023cc3 100644 --- a/lily/include/translator.hh +++ b/lily/include/translator.hh @@ -37,7 +37,7 @@ public: Translator_group * daddy_trans_l_ ; - void print () const; + /** try to fit the request in this engraver @@ -96,7 +96,7 @@ protected: */ virtual void do_add_processing (); virtual bool do_try_music (Music *req_l); - virtual void do_print () const; + virtual void do_pre_move_processing(); virtual void do_post_move_processing(); virtual void do_process_music () ; diff --git a/lily/include/transposed-music.hh b/lily/include/transposed-music.hh index 7ae1db5595..a559feb2bb 100644 --- a/lily/include/transposed-music.hh +++ b/lily/include/transposed-music.hh @@ -18,7 +18,7 @@ class Transposed_music : public Music_wrapper public: Musical_pitch transpose_to_pitch_; - void do_print () const; + Transposed_music (Music*, Musical_pitch); VIRTUAL_COPY_CONS(Music); diff --git a/lily/line-group-group-engraver.cc b/lily/line-group-group-engraver.cc index a03c8b6a06..a705daddb6 100644 --- a/lily/line-group-group-engraver.cc +++ b/lily/line-group-group-engraver.cc @@ -37,7 +37,6 @@ Line_group_engraver_group::do_removal_processing() Score_element * it = unsmob_element (get_property (ly_symbol2scm ("currentCommandColumn"))); - staffline_p_->set_bound(RIGHT,it); Engraver_group_engraver::typeset_element (staffline_p_); staffline_p_ = 0; diff --git a/lily/lyric-combine-music.cc b/lily/lyric-combine-music.cc index 0b1f86b332..2059314b25 100644 --- a/lily/lyric-combine-music.cc +++ b/lily/lyric-combine-music.cc @@ -24,12 +24,6 @@ Lyric_combine_music::transpose (Musical_pitch p) lyrics_l () ->transpose (p); } -void -Lyric_combine_music::do_print () const -{ - music_l ()->print(); - lyrics_l () ->print (); -} Moment Lyric_combine_music::length_mom () const diff --git a/lily/lyric-performer.cc b/lily/lyric-performer.cc index e07fe0f4fe..4569505c4a 100644 --- a/lily/lyric-performer.cc +++ b/lily/lyric-performer.cc @@ -17,14 +17,6 @@ Lyric_performer::Lyric_performer () audio_p_ = 0; } -void -Lyric_performer::do_print () const -{ -#ifndef NPRINT - if (lreq_arr_.size ()) - lreq_arr_[0]->print (); -#endif -} void Lyric_performer::do_process_music () diff --git a/lily/moment.cc b/lily/moment.cc index b2f588e4af..c3ebbf02c9 100644 --- a/lily/moment.cc +++ b/lily/moment.cc @@ -66,7 +66,7 @@ make_rational (SCM n, SCM d) void init_moments () { - scm_make_gsubr ("make-moment", 2 , 0, 0, (SCM(*)()) make_rational); + scm_make_gsubr ("make-moment", 2 , 0, 0, (Scheme_function_unknown) make_rational); } ADD_SCM_INIT_FUNC(moms,init_moments); diff --git a/lily/music-output-def.cc b/lily/music-output-def.cc index 438ea4cca6..d2ddb4a9af 100644 --- a/lily/music-output-def.cc +++ b/lily/music-output-def.cc @@ -56,10 +56,11 @@ SCM Music_output_def::find_translator_l (SCM name) const { String s = ly_scm2string (name); + + SCM val =SCM_EOL; if (translator_p_dict_p_->elem_b (s)) return translator_p_dict_p_->scm_elem (s); - - return SCM_EOL; + return val; } @@ -77,10 +78,7 @@ Music_output_def::get_global_translator_p () return dynamic_cast (tg); } -void -Music_output_def::print () const -{ -} + String Music_output_def::get_default_output () const diff --git a/lily/music-sequence.cc b/lily/music-sequence.cc index 3ff7f4a235..2e5243f6b5 100644 --- a/lily/music-sequence.cc +++ b/lily/music-sequence.cc @@ -63,14 +63,6 @@ Music_sequence::transpose (Musical_pitch rq) unsmob_music (gh_car (s))->transpose (rq); } -void -Music_sequence::do_print() const -{ -#ifndef NPRINT - for (SCM s = music_list (); gh_pair_p (s); s = gh_cdr (s)) - unsmob_music (gh_car (s))->print(); -#endif -} diff --git a/lily/music-wrapper.cc b/lily/music-wrapper.cc index 8a2d66f5bd..ffcba96336 100644 --- a/lily/music-wrapper.cc +++ b/lily/music-wrapper.cc @@ -11,11 +11,7 @@ #include "music-wrapper.hh" -void -Music_wrapper::do_print () const -{ - element ()->print (); -} + void Music_wrapper::transpose (Musical_pitch p) diff --git a/lily/music.cc b/lily/music.cc index 8ce821e012..c9e001482c 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -64,10 +64,7 @@ Music::compress (Moment) { } -void -Music::do_print() const -{ -} + Moment Music::length_mom () const @@ -177,10 +174,6 @@ Music::origin () const } -void -Music::print ()const -{ -} diff --git a/lily/musical-pitch.cc b/lily/musical-pitch.cc index bb22b41291..5a834db780 100644 --- a/lily/musical-pitch.cc +++ b/lily/musical-pitch.cc @@ -55,13 +55,6 @@ Musical_pitch::Musical_pitch (int n, int a, int o) octave_i_ = o; } -void -Musical_pitch::print () const -{ -#ifndef NPRINT - DEBUG_OUT << str (); -#endif -} int Musical_pitch::compare (Musical_pitch const &m1, Musical_pitch const &m2) diff --git a/lily/musical-request.cc b/lily/musical-request.cc index cdcda7ac01..dccf2e3fd5 100644 --- a/lily/musical-request.cc +++ b/lily/musical-request.cc @@ -11,26 +11,12 @@ #include "debug.hh" #include "music-list.hh" -void -Span_req::do_print () const -{ -#ifndef NPRINT - DEBUG_OUT << span_dir_; -#endif -} Tremolo_req::Tremolo_req () { type_i_ = 0; } -void -Tremolo_req::do_print () const -{ -#ifndef NPRINT - DEBUG_OUT << "type " << type_i_ << '\n'; -#endif -} void Melodic_req::transpose (Musical_pitch delta) @@ -59,11 +45,6 @@ Melodic_req::compare (Melodic_req const &m1 , Melodic_req const&m2) return Musical_pitch::compare (m1.pitch_, m2.pitch_); } -void -Melodic_req::do_print () const -{ - pitch_.print (); -} @@ -82,13 +63,6 @@ Rhythmic_req::do_equal_b (Request const* r) const return rh && !compare (*this, *rh); } -void -Rhythmic_req::do_print () const -{ -#ifndef NPRINT - DEBUG_OUT << "duration { " <scm_elem (s); + if (gh_number_p (val)) { return gh_scm2double (val); @@ -93,18 +94,6 @@ Paper_def::set_lookup (int i, SCM l) lookup_alist_ = scm_assq_set_x(lookup_alist_, gh_int2scm (i), l); } - - -void -Paper_def::print () const -{ -#ifndef NPRINT - Music_output_def::print (); - if (flower_dstream) - gh_display (lookup_alist_); -#endif -} - Lookup const * Paper_def::lookup_l (int i) const { diff --git a/lily/part-combine-music.cc b/lily/part-combine-music.cc index d9e98329b3..c6ee771304 100644 --- a/lily/part-combine-music.cc +++ b/lily/part-combine-music.cc @@ -27,12 +27,7 @@ Part_combine_music::transpose (Musical_pitch p) second_l () ->transpose (p); } -void -Part_combine_music::do_print () const -{ - first_l ()->print(); - second_l () ->print (); -} + Moment Part_combine_music::length_mom () const diff --git a/lily/performance.cc b/lily/performance.cc index f6ff1cb5c7..9da4c7dc38 100644 --- a/lily/performance.cc +++ b/lily/performance.cc @@ -137,23 +137,10 @@ Performance::add_element (Audio_element *p) audio_elem_p_list_ = new Killing_cons (p, audio_elem_p_list_); } -void -Performance::print() const -{ -#ifndef NPRINT - DEBUG_OUT << "Performance { "; - DEBUG_OUT << "Items: "; - for (Cons* i =audio_elem_p_list_; i; i = i->next_) - i->car_->print (); - DEBUG_OUT << "}"; -#endif -} void Performance::process() { - print (); - String out = midi_l_->get_default_output (); if (out.empty_b ()) { diff --git a/lily/property-engraver.cc b/lily/property-engraver.cc index 1e5a16b931..312e1022be 100644 --- a/lily/property-engraver.cc +++ b/lily/property-engraver.cc @@ -12,6 +12,7 @@ #include "dictionary.hh" #include "score-element.hh" #include "scm-hash.hh" +#include "translator-group.hh" /* JUNKME: should use pushproperty everywhere. @@ -23,7 +24,7 @@ class Property_engraver : public Engraver UGH. Junk Dictionary */ Scheme_hash_table *prop_dict_; // junkme - void apply_properties (SCM, Score_element*); + void apply_properties (SCM, Score_element*, Translator_group *origin); protected: virtual void acknowledge_element (Score_element_info ei); @@ -58,7 +59,7 @@ Property_engraver::do_creation_processing () { prop_dict_ = new Scheme_hash_table; - SCM plist = get_property ("Generic_property_list"); + SCM plist = get_property (ly_symbol2scm ("Generic_property_list")); for (; gh_pair_p (plist); plist = gh_cdr (plist)) { SCM elt_props = gh_car (plist); @@ -75,19 +76,19 @@ Property_engraver::acknowledge_element (Score_element_info i) { if (prop_dict_->try_retrieve (gh_car (ifs), &props)) { - apply_properties (props,i.elem_l_); + apply_properties (props,i.elem_l_, i.origin_trans_l_->daddy_trans_l_); } } if (prop_dict_->try_retrieve (ly_symbol2scm ("all"), &props)) { - apply_properties (props, i.elem_l_); + apply_properties (props, i.elem_l_, i.origin_trans_l_->daddy_trans_l_); } } void -Property_engraver::apply_properties (SCM p, Score_element *e) +Property_engraver::apply_properties (SCM p, Score_element *e, Translator_group*origin) { for (; gh_pair_p (p); p = gh_cdr (p)) { @@ -112,7 +113,18 @@ Property_engraver::apply_properties (SCM p, Score_element *e) ; // Not defined in context. else if (gh_apply (type_p, scm_listify (val, SCM_UNDEFINED)) == SCM_BOOL_T) // defined and right type: do it - e->set_elt_property (elt_prop_sym, val); + { + e->set_elt_property (elt_prop_sym, val); + + String msg = "Property_engraver is deprecated. Use\n \\property " + + origin->type_str_ + + ".basicXXXXProperties" + + " \\push #'" + + ly_symbol2string (elt_prop_sym) + + " = #"; + warning (msg); + scm_display (val, scm_current_error_port ()); + } else /* diff --git a/lily/relative-octave-music.cc b/lily/relative-octave-music.cc index f786e7b0ed..5f8081afa0 100644 --- a/lily/relative-octave-music.cc +++ b/lily/relative-octave-music.cc @@ -23,11 +23,5 @@ Relative_octave_music::Relative_octave_music(Music*p,Musical_pitch def) last_pitch_ = element ()->to_relative_octave (def); } -void -Relative_octave_music::do_print () const -{ - Music_wrapper::do_print (); - DEBUG_OUT << "default pitch: " << last_pitch_.str (); -} diff --git a/lily/request.cc b/lily/request.cc index 14eb23856c..ad9223d274 100644 --- a/lily/request.cc +++ b/lily/request.cc @@ -9,10 +9,7 @@ #include "request.hh" #include "debug.hh" -void -Request::do_print() const -{ -} + bool Request::equal_b (Request const* r) const diff --git a/lily/scope.cc b/lily/scope.cc index 85837e5d09..ba18c1f44c 100644 --- a/lily/scope.cc +++ b/lily/scope.cc @@ -80,3 +80,9 @@ Scope::to_alist () const { return id_dict_->to_alist (); } + +bool +Scope::try_retrieve (SCM k , SCM *v)const +{ + return id_dict_->try_retrieve (k, v); +} diff --git a/lily/score-element.cc b/lily/score-element.cc index f1974fe63a..c4d43ca0b8 100644 --- a/lily/score-element.cc +++ b/lily/score-element.cc @@ -832,15 +832,14 @@ spanner_get_bound (SCM slur, SCM dir) static SCM interfaces_sym; -#define UNDEFINED_ARG static void init_functions () { interfaces_sym = scm_permanent_object (ly_symbol2scm ("interfaces")); - scm_make_gsubr ("ly-get-elt-property", 2, 0, 0, (SCM(*)(UNDEFINED_ARG))ly_get_elt_property); - scm_make_gsubr ("ly-set-elt-property", 3, 0, 0, (SCM(*)(UNDEFINED_ARG))ly_set_elt_property); - scm_make_gsubr ("ly-get-spanner-bound", 2 , 0, 0, (SCM(*)(UNDEFINED_ARG)) spanner_get_bound); + scm_make_gsubr ("ly-get-elt-property", 2, 0, 0, (Scheme_function_unknown)ly_get_elt_property); + scm_make_gsubr ("ly-set-elt-property", 3, 0, 0, (Scheme_function_unknown)ly_set_elt_property); + scm_make_gsubr ("ly-get-spanner-bound", 2 , 0, 0, (Scheme_function_unknown) spanner_get_bound); } bool diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 66b759e7d2..e2fa641da3 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -269,7 +269,7 @@ Score_engraver::do_add_processing () pscore_p_ = new Paper_score; pscore_p_->paper_l_ = dynamic_cast(output_def_l_); - SCM props = get_property(ly_symbol2scm ("basicLineOfScoreProperties")); + SCM props = get_property (ly_symbol2scm ("basicLineOfScoreProperties")); pscore_p_->typeset_line (new Line_of_score (props)); } diff --git a/lily/score.cc b/lily/score.cc index 4f33c853f1..ed53e2b0d1 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -121,7 +121,7 @@ Score::process() if (!unsmob_music (music_)) return; - print(); + for (int i=0; i < def_p_arr_.size (); i++) { if (no_paper_global_b @@ -133,17 +133,6 @@ Score::process() -void -Score::print() const -{ -#ifndef NPRINT - DEBUG_OUT << "score {\n"; - // music_p_ -> print (); - for (int i=0; i < def_p_arr_.size (); i++) - def_p_arr_[i]->print(); - DEBUG_OUT << "}\n"; -#endif -} void Score::add_output (Music_output_def *pap_p) diff --git a/lily/scores.cc b/lily/scores.cc index 0a075e5bc7..7d611e494a 100644 --- a/lily/scores.cc +++ b/lily/scores.cc @@ -81,8 +81,6 @@ do_scores() } else { - if (flower_dstream && !flower_dstream->silent_b ("do_scores")) - is_p->print (); is_p->process(); } } diff --git a/lily/slur-bezier-bow.cc b/lily/slur-bezier-bow.cc index 0240e99f87..b9f3396206 100644 --- a/lily/slur-bezier-bow.cc +++ b/lily/slur-bezier-bow.cc @@ -149,10 +149,6 @@ Slur_bezier_bow::minimise_enclosed_area (Paper_def* paper_l, Real beauty) Real length = curve_.control_[3][X_AXIS]; Real beautiful = beauty * length * slur_height (length, h_inf_, r_0_); - DEBUG_OUT << to_str ("Beautiful: %f\n", beautiful); - DEBUG_OUT << to_str ("Length: %f\n", length); - // DEBUG_OUT << to_str ("D-height: %f\n", default_height); - DEBUG_OUT << to_str ("FitFac: %f\n", fit_factor ()); if (fit_factor () > 1.0) blow_fit (); @@ -186,20 +182,11 @@ Slur_bezier_bow::minimise_enclosed_area (Paper_def* paper_l, Real beauty) has_interface (ly_symbol2scm ("lyric-syllable-interface"))) +// if (i.elem_l_->has_interface (symbol ("lyric-syllable-interface"))) // Tried catching lyric items to generate stanza numbers, but it spoils lyric spacing. if (Bar::has_interface (i.elem_l_) || now_mom() == Moment(0)) // Works, but requires bar_engraver in LyricVoice context apart from at beginning. // Is there any score element we can catch that will do the trick? -// if (! i.elem_l_->has_interface (ly_symbol2scm ("lyric-syllable-interface")) || +// if (! i.elem_l_->has_interface (symbol ("lyric-syllable-interface")) || // now_mom() == Moment(0)) // What happens if we try anything at all EXCEPT a lyric? Is there anything else? // Not sure what it's catching, but it still mucks up lyrics. diff --git a/lily/symbol-cache.cc b/lily/symbol-cache.cc new file mode 100644 index 0000000000..ed801f2fef --- /dev/null +++ b/lily/symbol-cache.cc @@ -0,0 +1,77 @@ +/* + symbol-cache.cc -- implement a cache for literal symbols, eg + symbol("foo-bar") + + + source file of the GNU LilyPond music typesetter + + (c) 2000 Han-Wen Nienhuys + + */ + +#include +#include "lily-guile.hh" + +#if 0 + +typedef map Literal_symbol_map; +Literal_symbol_map literal_map; + + +SCM +symbol (const char*s) +{ + Literal_symbol_map::const_iterator i = literal_map.find (s); + if (i != literal_map.end()) + return (*i).second; + + SCM sym = gh_symbol2scm ((char*)s); + scm_permanent_object (sym); + literal_map[s] = sym; + return sym; +} + + +/* + This is a gory trick to cache the value gh_symbol2scm (), without + cluttering up the C code with snarf macros. + + You should *ONLY* use symbol() for arguments that are literal + strings! + + without (wtk1-fugue2) + + real 0m20.157s + user 0m19.800s + sys 0m0.140s + + with: (per file.) + + real 0m19.284s + user 0m18.630s + sys 0m0.190s + + + global with STL map + + real 0m20.616s + user 0m19.360s + sys 0m0.080s + + global with binsearch. + + + real 0m19.352s + user 0m18.710s + sys 0m0.230s + local binsearch + + user 18.8 + + local with binsearch, and other optimizations. + + 17.7 +*/ +#endif + + diff --git a/lily/tempo-performer.cc b/lily/tempo-performer.cc index b728730947..e4066580ca 100644 --- a/lily/tempo-performer.cc +++ b/lily/tempo-performer.cc @@ -22,14 +22,6 @@ Tempo_performer::~Tempo_performer () { } -void -Tempo_performer::do_print () const -{ -#ifndef NPRINT - if (tempo_req_l_) - tempo_req_l_->print (); -#endif -} void Tempo_performer::do_process_music () diff --git a/lily/tfm-reader.cc b/lily/tfm-reader.cc index 176ecd195a..70472b8020 100644 --- a/lily/tfm-reader.cc +++ b/lily/tfm-reader.cc @@ -113,10 +113,6 @@ Tex_font_metric_reader::read_header () info_.coding_scheme = header_length > 2 ? get_bcpl_str () : "unspecified"; - DEBUG_OUT << format_str ("TFM checksum = %u, design_size = %fpt, coding scheme = `%s'.\n", - info_.checksum, - info_.design_size, - info_.coding_scheme.ch_C ()); } /* Although TFM files are only usable by TeX if they have at least seven @@ -154,10 +150,6 @@ Tex_font_metric_reader::read_params () for (Char_code i = 2; i <= header_.param_word_count; i++) info_.parameters[i - 1] = get_U32_fix_scaled_f (); -#ifdef PRINT - for (Char_code i = 1; i <= header_.param_word_count; i++) - DEBUG_OUT << format_str ("TFM parameter %d: %.3f", i, info_.parameters[i - 1]); -#endif } /* Read every character in the TFM file, storing the result in the @@ -246,13 +238,6 @@ Tex_font_metric_reader::read_char () `char_info_word'). */ tfm_char.exists_b_ = width_index != 0; -#ifdef PRINT - DEBUG_OUT << format_str (" width = %f, height = %f, ", - tfm_char.width_, tfm_char.height_); - DEBUG_OUT << format_str ("depth = %f, ic = %f.\n", - tfm_char.depth, tfm_char.italic_correction); -#endif - if (tag == 1) { input_.seek_ch_C (header_.lig_kern_pos + remainder * 4); @@ -283,9 +268,6 @@ Tex_font_metric_reader::read_lig_kern_program (Array * ligature_ar bool kern_step_b = input_.get_U8 () >= KERN_FLAG; U8 remainder = input_.get_U8 (); -#ifdef PRINT - DEBUG_OUT << format_str (" if next = %u (%c), ", next_char, next_char); -#endif if (kern_step_b) { @@ -299,9 +281,6 @@ Tex_font_metric_reader::read_lig_kern_program (Array * ligature_ar kern_arr_p->push (kern_element); -#ifdef PRINT - DEBUG_OUT << format_str ("kern %f.\n", kern_element.kern); -#endif } else { @@ -310,11 +289,6 @@ Tex_font_metric_reader::read_lig_kern_program (Array * ligature_ar ligature_element.ligature = remainder; ligature_arr_p->push (ligature_element); -#ifdef PRINT - DEBUG_OUT format_str ("ligature %d (hex %x).\n", - ligature_element.ligature, - ligature_element.ligature); -#endif } } while (!end_b); } diff --git a/lily/time-signature-performer.cc b/lily/time-signature-performer.cc index aeed66b806..709087e42b 100644 --- a/lily/time-signature-performer.cc +++ b/lily/time-signature-performer.cc @@ -22,14 +22,6 @@ Time_signature_performer::~Time_signature_performer () { } -void -Time_signature_performer::do_print () const -{ -#ifndef NPRINT - if (time_signature_req_l_) - time_signature_req_l_->print (); -#endif -} void Time_signature_performer::do_process_music () diff --git a/lily/translator-group.cc b/lily/translator-group.cc index a13eb4901b..24416817d0 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -272,12 +272,7 @@ Translator_group::each (Method_pointer method) static_each (trans_group_list_, method); } -void -Translator_group::do_print() const -{ -#ifndef NPRINT -#endif -} + void Translator_group::do_add_processing () @@ -307,15 +302,14 @@ Translator_group::where_defined (SCM sym) const SCM Translator_group::get_property (SCM sym) const { - if (properties_dict ()->elem_b (sym)) - { - return properties_dict ()->get (sym); - } + SCM val =SCM_UNDEFINED; + if (properties_dict ()->try_retrieve (sym, &val)) + return val; if (daddy_trans_l_) return daddy_trans_l_->get_property (sym); - return SCM_UNDEFINED; + return val; } void diff --git a/lily/translator.cc b/lily/translator.cc index 90edc46fbb..905266cbea 100644 --- a/lily/translator.cc +++ b/lily/translator.cc @@ -88,22 +88,6 @@ Translator::do_add_processing () { } -void -Translator::print () const -{ -#ifndef NPRINT - DEBUG_OUT << classname (this) << " {"; - if (classname (this) != type_str_) - DEBUG_OUT << "type = " << type_str_; - do_print (); - DEBUG_OUT << "}\n"; -#endif -} - -void -Translator::do_print () const -{ -} diff --git a/lily/transposed-music.cc b/lily/transposed-music.cc index 2bcb370865..7c7f38ac2d 100644 --- a/lily/transposed-music.cc +++ b/lily/transposed-music.cc @@ -17,12 +17,6 @@ Transposed_music::Transposed_music (Music *p, Musical_pitch pit) p->transpose (pit); } -void -Transposed_music::do_print () const -{ - Music_wrapper::do_print (); - DEBUG_OUT << "transposition pitch: " << transpose_to_pitch_.str (); -} Musical_pitch Transposed_music::to_relative_octave (Musical_pitch p) diff --git a/lily/volta-engraver.cc b/lily/volta-engraver.cc index 4f5baf6b24..ed97955f7c 100644 --- a/lily/volta-engraver.cc +++ b/lily/volta-engraver.cc @@ -105,7 +105,7 @@ Volta_engraver::do_process_music () volta_span_p_ = 0; } - volta_span_p_ = new Spanner (get_property ("basicVoltaSpannerProperties")); + volta_span_p_ = new Spanner (get_property ("basicVoltaBracketProperties")); Volta_spanner::set_interface (volta_span_p_); announce_element (volta_span_p_,0); volta_span_p_->set_elt_property ("text", str); diff --git a/make/toplevel.make.in b/make/toplevel.make.in index 59d033d477..13019ee8f2 100644 --- a/make/toplevel.make.in +++ b/make/toplevel.make.in @@ -17,7 +17,7 @@ SCRIPTS = configure aclocal.m4 README_FILES = DEDICATION COPYING NEWS CHANGES ROADMAP README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt IN_FILES := $(wildcard *.in) -EXTRA_DIST_FILES = dstreamrc lilypond-mode.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) +EXTRA_DIST_FILES = lilypond-mode.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES) # bootstrap stepmake: diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index d1220794a6..35ffdbd78f 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -292,12 +292,6 @@ AC_DEFUN(AC_STEPMAKE_INIT, [ AUTOGENERATE="This file was automatically generated by configure" AC_SUBST(AUTOGENERATE) - STATE_VECTOR=`ls make/STATE-VECTOR 2>/dev/null` - if test "x$STATE_VECTOR" != "x"; then - STATE_VECTOR="\$(depth)/$STATE_VECTOR" - fi - AC_SUBST(STATE_VECTOR) - CONFIGSUFFIX= AC_ARG_ENABLE(config, [ enable-config=FILE put configure settings in config-FILE.make], -- 2.39.5