]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.93
authorfred <fred>
Tue, 26 Mar 2002 23:56:34 +0000 (23:56 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:56:34 +0000 (23:56 +0000)
72 files changed:
config.make.in
configure.in
lily/all-font-metrics.cc
lily/audio-column.cc
lily/audio-element.cc
lily/audio-item.cc
lily/change-translator.cc
lily/command-request.cc
lily/global-translator.cc
lily/identifier.cc
lily/include/audio-element.hh
lily/include/audio-item.hh
lily/include/change-translator.hh
lily/include/command-request.hh
lily/include/engraver-group-engraver.hh
lily/include/identifier.hh
lily/include/lyric-combine-music.hh
lily/include/lyric-performer.hh
lily/include/music-output-def.hh
lily/include/music-sequence.hh
lily/include/music-wrapper.hh
lily/include/music.hh
lily/include/musical-pitch.hh
lily/include/musical-request.hh
lily/include/note-performer.hh
lily/include/paper-def.hh
lily/include/part-combine-music.hh
lily/include/relative-music.hh
lily/include/request.hh
lily/include/scope.hh
lily/include/score.hh
lily/include/symbol-cache.hh [new file with mode: 0644]
lily/include/tempo-performer.hh
lily/include/time-signature-performer.hh
lily/include/translator-group.hh
lily/include/translator.hh
lily/include/transposed-music.hh
lily/line-group-group-engraver.cc
lily/lyric-combine-music.cc
lily/lyric-performer.cc
lily/moment.cc
lily/music-output-def.cc
lily/music-sequence.cc
lily/music-wrapper.cc
lily/music.cc
lily/musical-pitch.cc
lily/musical-request.cc
lily/my-lily-lexer.cc
lily/note-performer.cc
lily/paper-def.cc
lily/part-combine-music.cc
lily/performance.cc
lily/property-engraver.cc
lily/relative-octave-music.cc
lily/request.cc
lily/scope.cc
lily/score-element.cc
lily/score-engraver.cc
lily/score.cc
lily/scores.cc
lily/slur-bezier-bow.cc
lily/stanza-number-engraver.cc
lily/symbol-cache.cc [new file with mode: 0644]
lily/tempo-performer.cc
lily/tfm-reader.cc
lily/time-signature-performer.cc
lily/translator-group.cc
lily/translator.cc
lily/transposed-music.cc
lily/volta-engraver.cc
make/toplevel.make.in
stepmake/aclocal.m4

index bd7a13c04272c65318a99806944c213042632644..0676f025c06bdb998ce5cfd54a105cd10c1919fd 100644 (file)
@@ -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@
index aa3f16f08f51dc0d967ac316fbac7d82375225cc..c4cf39588c485feaaaab00bb2d2b2ca39a42e1d5 100644 (file)
@@ -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
index d7ec2a94fb565bc40986424eacac9fb011e1cbc5..ab4d17759ca92e9a28006b771eda3a7e0f018eb5 100644 (file)
@@ -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<Adobe_font_metric*> (unsmob_metrics (afm_p_dict_->get (sname)));
+  return dynamic_cast<Adobe_font_metric*> (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<Scaled_font_metric*> (fm);
+  return dynamic_cast<Scaled_font_metric*> (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<Tex_font_metric*> (unsmob_metrics (tfm_p_dict_->get(sname)));
+    dynamic_cast<Tex_font_metric*> (unsmob_metrics (val));
 }
 
 
index 1dde79a5e98d63ed0a3105e87855046615c2b7d7..b29f09982c74a579c2a21233b78453914424eaa5 100644 (file)
@@ -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 
-}
 
index 39fbe8f1788d54f75ef03ff6fce5fbe136ee03ea..9eff747eb458f011fe9ff3bf088245d93dc032e3 100644 (file)
@@ -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
-{
-}
index 4e771ca08e23aaadfbd3ac325971a3333e1d345e..b4d358c7f7fe9c176902cfce58f1ace95f6233fd 100644 (file)
@@ -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
-}
+
 
index b0144488be8f262e5bac9cb032ac689bbbe3e2cd..144aefd229b2f43d20089d49a1b8c23031791a8c 100644 (file)
@@ -11,9 +11,3 @@
 
 
 
-void
-Change_translator::do_print () const
-{
-  DEBUG_OUT << "change " << change_to_type_str_ << " to " << change_to_id_str_ ;
-}
-  
index 1aaaea84eac453af8abe05465444adbe3ba44aac..8ea0ef54dd175a2b63e1f3f7e40702d9137d5f14 100644 (file)
@@ -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
index 1713ce373637844343ec828a977c3c9b08e7d7b1..ad3b7d0a8aa066d6101975600393f18ec5611cf4 100644 (file)
@@ -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);
index bedc2f9dfd9bfa7bea3ce2e3adf85e58da856df3..d46460f71b03306f8d23fe4a82a8cd272993cc5c 100644 (file)
@@ -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 \
index 6dff0e01f7129523d570ec620e71eff715ef39dd..a8d79fc0e57d1e358e875702ba86293cdaea9491 100644 (file)
@@ -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
index b06ab920c997de089f03ce7e4640a707ec258f51..e8ced6a64bdbc6a039be4412a8b8e5c7f0e2a099 100644 (file)
@@ -29,8 +29,6 @@ public:
 
   Audio_column* audio_column_l_;
 
-protected:
-  virtual void do_print () const;
   
 private:
   Audio_item (Audio_item const&);
index af18db7eb32d8df27cbb1784388a08aad0bbb811..7dc774ca37ded7086228138632469fe593c760bf 100644 (file)
@@ -20,7 +20,6 @@ public:
   
 protected:
   VIRTUAL_COPY_CONS(Music);
-  void do_print () const;
 };
 
 
index 875024650c7bf7f2d1f20eddb60d6b46a43e03b8..078e02dd2f07e109ff913db02fa5fb0852662c46 100644 (file)
@@ -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);
 };
 
index dffbfd18ef389d88f712e91202a46e450503b185..dd378bf0e0edff94ba29b391340985582f1d39ff 100644 (file)
@@ -27,6 +27,9 @@ class Engraver_group_engraver : public Engraver,
 {
 protected:
   Array<Score_element_info> announce_info_arr_;
+
+  
+  
 public:
   VIRTUAL_COPY_CONS(Translator);
     
index 2e39b1ff47479651488f7a16cd9bdaad503b6ed2..7f87c08b8f7c8e8a3d9cd06888bc3fea787b000c 100644 (file)
@@ -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; \
 }\
 
index a4a47c2a43941b4b9255c85002b0c0ad7578c5ea..9b121ff0d7816c5e026f7a8048bf9664a75f6a77 100644 (file)
@@ -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);
index 89890b498231a732555aa2e600e4c1b03e06cbe1..9bb48d0b749eda7ccfd08b1b1f2f4916efa23516 100644 (file)
@@ -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 ();
index a5c5c8d15206891d05377564ec7feb3e25540bd9..e60743cb2561c8fd79d87427bf7de48b294314ae 100644 (file)
@@ -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;
index 736d4abf98a988a84511c28e41daf437f4a2130a..6e88236e3375bf9e8cd34a2739ac4e02b1de1055 100644 (file)
@@ -34,7 +34,7 @@ public:
   
 protected:
   virtual Musical_pitch to_relative_octave (Musical_pitch);
-  virtual void do_print() const;
+
 
 };
 #endif
index 76987deac5827e9dadaa45efe388fdb664105cc5..d5227830a7a33daf7f0d26bb1bb1ce2f628a74ca 100644 (file)
@@ -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;
index 9e50aa0998d47ef547b9d722efb9de174e59208b..dbcfccf68747cec00214272ee45e721e1afe064f 100644 (file)
@@ -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_;
index 079de76c8f650127501de88e1a6d82c7bdccc512..ed9f63857ab48a74cab2aed1a71133518005cdb8 100644 (file)
@@ -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;
 };
 
index ee5728441c41752f5e6f4828c3c9f0f66c84a084..0c2d6f928dd3c925434307227503c64ca8a1a394 100644 (file)
@@ -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);
 };
index 6b0f607ade41087c1525f9da63b095d678abaa35..574e6952244f0547267e0ce6f2541e8a3219a15e 100644 (file)
@@ -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 ();
index 3898a1ae18c89fc186fcfe9b7d272c2d68726f39..17847564c689ab44e6e793ebb5430250e1410065 100644 (file)
@@ -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();
index 102de3ad06dff1ca8f655204f1d2cf98323f0f10..1c91b340f29887e58dd26a4161dba7c8a87ab6d0 100644 (file)
@@ -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);
index 53e770f76a6f8440ac004597ae11edc467c3c4cd..a861d451bc0a23e0f6534e77813252ed28bd768e 100644 (file)
@@ -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);
index 35401d75d7c38b662c88067ce66abcf18ab3f4cf..f1cd68f48301f949e49e364fe264b87f3617b159 100644 (file)
@@ -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);
 };
 
index f1f4d8a1dc6619659161a5c57d7825c0a1ef76d1..cf16c0564b872b3556a380a38261e64fc8e5982b 100644 (file)
@@ -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;
 
index b7515dc32abfcebdf7d6a5bc5e4ec426be1d0f40..b315574933032e378b2037c776e798b0fe139ad9 100644 (file)
@@ -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 (file)
index 0000000..e07b603
--- /dev/null
@@ -0,0 +1,79 @@
+/*   
+  symbol-cache.hh -- declare Symbol cacher.
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#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
index 086b731cd3804bbcfa99d3adce3d24faf7c019cc..c4a6d0f7c894d8168e6e3e365ef4b57d3d6868cb 100644 (file)
@@ -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 ();
index 7226d1c086897e22a0f17512823d591a7af376fd..ef3d20bb27551a616209e0ed64c7de6d75967b35 100644 (file)
@@ -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 ();
index 507ff124b4a86e32d9167f83b54963bf75f20507..5d24929d5b53cc1c6af83655ebbb07694d462374 100644 (file)
@@ -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);       
index 74a46a1fd2c503ce8986933bfb0c21741e6cd55b..2eb5023cc3bbe5394868d6dee5fed0149e9fb49b 100644 (file)
@@ -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 () ;
index 7ae1db5595e27837e8368e045e27d46f2dcfe6cb..a559feb2bb7a1894cb3d34f0c28ed41a7f56a5a8 100644 (file)
@@ -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);
index a03c8b6a064b99428010ce793cc8054a22947deb..a705daddb653517cc972919e01003f5f86b420df 100644 (file)
@@ -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;
index 0b1f86b332836e5d207d0f9164dea67942bceb97..2059314b2545a4802ca97249422caa089b5074e6 100644 (file)
@@ -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
index e07fe0f4fe1df5dfd3495d024f494861ff69da71..4569505c4adb4738c0a6a2b682f1b70c9fe05fe7 100644 (file)
@@ -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 ()
index b2f588e4af7f790216a44a5cb6559ee6b3a92cb8..c3ebbf02c9028f252210701d462d6b7b4cf94e28 100644 (file)
@@ -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);
index 438ea4cca67281bc5da761db69c2f43d1586469c..d2ddb4a9af0fa2205b153736935f8944db95133e 100644 (file)
@@ -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 <Global_translator *> (tg);
 }
 
-void
-Music_output_def::print () const
-{
-}
+
 
 String
 Music_output_def::get_default_output () const
index 3ff7f4a235d20fe6879a1f59b7f774997fc8d813..2e5243f6b5915d09a71f95aba34f94511d16d051 100644 (file)
@@ -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 
-}
 
 
 
index 8a2d66f5bd4f459328e7552cf47796e74e154ac7..ffcba963366d7dc7fdd934377b0aa158dcd28319 100644 (file)
 #include "music-wrapper.hh"
 
 
-void
-Music_wrapper::do_print () const
-{
-  element ()->print ();
-}
+
 
 void
 Music_wrapper::transpose (Musical_pitch p)
index 8ce821e0124a6685535ec471a33dcbd6b92bf95b..c9e001482cb6e5e53aa292d50513d6065c848eac 100644 (file)
@@ -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
-{
-}
 
 
 
index bb22b41291b59ad70833b4850dc8bf0c7cbe1d26..5a834db780a0f6d28a521edd612e8f47905b979f 100644 (file)
@@ -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)
index cdcda7ac0160ae4c634aa92163c461e23d9a774b..dccf2e3fd5b82cd97be0fc70c0effd0cc7f5efca 100644 (file)
 #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 { " <<duration_.str () << "}";
-#endif
-}
 
 
 Moment
@@ -103,14 +77,6 @@ Rhythmic_req::compress (Moment m)
   duration_.compress (m);
 }
 
-void
-Lyric_req::do_print () const
-{
-#ifndef NPRINT
-  Rhythmic_req::do_print ();
-  DEBUG_OUT <<  "text = " << text_str_;
-#endif
-}
 
 
 bool
@@ -129,22 +95,6 @@ Note_req::Note_req ()
 
 
 
-void
-Note_req::do_print () const
-{
-#ifndef NPRINT
-  Melodic_req::do_print ();
-  if (cautionary_b_)
-    {
-       DEBUG_OUT << " force cautionary accidental\n";
-    }
-  else if (forceacc_b_)
-    {
-       DEBUG_OUT << " force accidental\n";
-    }
-  Rhythmic_req::do_print ();
-#endif
-}
 
 
 bool
@@ -159,12 +109,6 @@ Span_req::Span_req ()
   span_dir_ = CENTER;
 }
 
-void
-Text_script_req::do_print () const
-{
-  DEBUG_OUT << "text" << text_str_
-       << ", style = " << style_str_;
-}
 
 bool
 Text_script_req::do_equal_b (Request const* r) const
@@ -173,11 +117,6 @@ Text_script_req::do_equal_b (Request const* r) const
   return t && t->text_str_ == text_str_ && t->style_str_ == style_str_;
 }
 
-void
-Articulation_req::do_print () const
-{
-  DEBUG_OUT << articulation_str_;
-}
 
 bool
 Articulation_req::do_equal_b (Request const* r) const
index a3dc6043aca070ade02c649293d54baa3a82fa0d..44843e402adc9850319b45cae997752afe73fee5 100644 (file)
@@ -104,8 +104,11 @@ My_lily_lexer::lookup_identifier (String s)
   SCM sym = ly_symbol2scm (s.ch_C());
   
   for (int i = scope_l_arr_.size (); i--; )
-    if (scope_l_arr_[i]->elem_b (sym))
-      return scope_l_arr_[i]->scm_elem(sym);
+    {
+      SCM val = SCM_UNSPECIFIED;
+      if (scope_l_arr_[i]->try_retrieve (sym, &val))
+       return val;
+    }
   return SCM_UNSPECIFIED;
 }
 
index 782b4848a2b5f393dc8a32341f970f68e8f444e6..9433e8714cd4faab68ef2bfbad65cf840dc0d39f 100644 (file)
@@ -20,15 +20,7 @@ Note_performer::Note_performer ()
 {
 }
 
-void 
-Note_performer::do_print () const
-{
-#ifndef NPRINT
-  if (note_req_l_arr_.size()>0)
-    for(int i=0;i<note_req_l_arr_.size();i++)
-      note_req_l_arr_[i]->print ();
-#endif
-}
+
 
 void 
 Note_performer::do_process_music () 
index fb01b677857a6be81ceb0b2cef4c4c8407990197..7300edd6a60553c66ffca95412ec0df76634e7e0 100644 (file)
@@ -56,12 +56,13 @@ Paper_def::get_scmvar (String s) const
 Real
 Paper_def::get_realvar (SCM s) const
 {
-  if (!scope_p_->elem_b (s))
+  SCM val ;
+  if (!scope_p_->try_retrieve (s, &val))
     {
       programming_error ("unknown paper variable: " +  ly_symbol2string (s));
       return 0.0;
     }
-  SCM val = scope_p_->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
 {
index d9e98329b3be75126a6068f0c7d1a424eaf255bb..c6ee7713043c36f271f20a362623d6093795c281 100644 (file)
@@ -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
index f6ff1cb5c7fc06874b385d269959f8fe74200e97..9da4c7dc38caaae621456bcc1594cb0d54d015cc 100644 (file)
@@ -137,23 +137,10 @@ Performance::add_element (Audio_element *p)
   audio_elem_p_list_ = new Killing_cons<Audio_element> (p, audio_elem_p_list_);
 }
 
-void
-Performance::print() const
-{
-#ifndef NPRINT
-  DEBUG_OUT << "Performance { ";
-  DEBUG_OUT << "Items: ";
-  for (Cons<Audio_element>* 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 ())
     {
index 1e5a16b931ae2e849ee3e21873a86ad3fb325130..312e1022be9019c9bc9d6019aa8590a2e9cabb97 100644 (file)
@@ -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
 
        /*
index f786e7b0edcbd9e590c18a8d4fb00b2a5e4b9bec..5f8081afa0c177e1b908c1e1c1bcae14cdf8a7a9 100644 (file)
@@ -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 ();
-}
 
 
index 14eb23856c8ccec738065fcdbf60bb4cf0bd9650..ad9223d274ecda7f476561074ee6c4fc648ddc41 100644 (file)
@@ -9,10 +9,7 @@
 #include "request.hh"
 #include "debug.hh"
 
-void
-Request::do_print() const
-{
-}
+
 
 bool
 Request::equal_b (Request const* r) const
index 85837e5d0979ca048aa9872620b6d74bb1bf9e6a..ba18c1f44c707362c82048ec295597da4f4e5be4 100644 (file)
@@ -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);
+}
index f1974fe63abd5b622d3cb2c7b7a114c33d0cd61f..c4d43ca0b8d2633442b7cd73847257b40920b762 100644 (file)
@@ -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
index 66b759e7d237bc7c9cd31c67ce45afd7fbdd1b35..e2fa641da3d104d305dd7300a0006653dc973762 100644 (file)
@@ -269,7 +269,7 @@ Score_engraver::do_add_processing ()
   pscore_p_ = new Paper_score;
   pscore_p_->paper_l_ = dynamic_cast<Paper_def*>(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));
 }
index 4f33c853f1a37edded37c8a7bd8cc60374478e0f..ed53e2b0d1c5183b456110fb94b4785ed85d92f3 100644 (file)
@@ -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)
index 0a075e5bc7da3e11f5458a8b04be2f57e041ecc9..7d611e494aa3489f1e7d20a5e925cfeab8ac66d6 100644 (file)
@@ -81,8 +81,6 @@ do_scores()
        }
       else
        {
-         if (flower_dstream && !flower_dstream->silent_b ("do_scores"))
-             is_p->print ();
          is_p->process();
        }
     }
index 0240e99f87a2dbc45c1aa0c560e481788f45ce34..b9f3396206ed96215e8d5a5bafff1de7e002ae0c 100644 (file)
@@ -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)
                <? abs ((curve_.control_[3][X_AXIS]
                         - curve_.control_[2][X_AXIS]) / da[1]));
 
-      DEBUG_OUT << to_str ("pct: %f\n", pct);
-      DEBUG_OUT << to_str ("u: %f\n", u);
-
-      DEBUG_OUT << to_str ("da: (%f, %f)\n", da[0], da[1]);
-      DEBUG_OUT << to_str ("da*u: (%f, %f)\n", da[0]*u*pct, da[1]*u*pct);
-      DEBUG_OUT << to_str ("cx: (%f, %f)\n", curve_.control_[1][X_AXIS],
-                          curve_.control_[2][X_AXIS]);
-
       curve_.control_[1][X_AXIS] -= da[0] * u * pct;
       curve_.control_[2][X_AXIS] -= da[1] * u * pct;
     }
 
   Real area = enclosed_area_f ();
-  DEBUG_OUT << to_str ("Exarea: %f\n", area);
 }
 
 
index 86d62e4fbd525bd89f98b62a4f32b2b8a69b961c..e21d7c4fc96c2dd1ad9d12f05a16a689b7607db9 100644 (file)
@@ -48,12 +48,12 @@ Stanza_number_engraver::acknowledge_element(Score_element_info i)
   
   if (gh_string_p (s))
     {
-//       if (i.elem_l_->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 (file)
index 0000000..ed801f2
--- /dev/null
@@ -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 <hanwen@cs.uu.nl>
+  
+ */
+
+#include <map>
+#include "lily-guile.hh" 
+
+#if 0
+
+typedef map<const char*, SCM> 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
+
+
index b728730947e1093b77cbe9470cb78e98f1a7122c..e4066580ca7da4d61d7e0262b7d145b858706a45 100644 (file)
@@ -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 ()
index 176ecd195ac7a03f8b0be7d973240c84ccf3fee4..70472b8020f3227211a55a9fc346070550f0232b 100644 (file)
@@ -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 <Tfm_ligature>* 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 <Tfm_ligature>* 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 <Tfm_ligature>* 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);
 }
index aeed66b8068da901e47692ff22e45fbc0db73fdb..709087e42b416b475487d10c86cff9e1b21cab7b 100644 (file)
@@ -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 ()
index a13eb4901b3803190a5208bbf39cef12e8130508..24416817d00941fb8a32113d78cbf357e636f99a 100644 (file)
@@ -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
index 90edc46fbbaa3423bc62f94c9b6612f2a3346e04..905266cbeab94cdc7e07db923ebfa4f7a7935c6d 100644 (file)
@@ -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
-{
-}
 
 
 
index 2bcb37086552f5e4ef1f9216a30770f942b2fc83..7c7f38ac2dbb601e746330bb18ed3250721479af 100644 (file)
@@ -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)
index 4f5baf6b24170c912b2875f8000059211e556cfd..ed97955f7c46c73fbc3f52003bb4d85c022b890d 100644 (file)
@@ -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);
index 59d033d477b14745cdac75e5bfb0e1e38e6fd4d6..13019ee8f2189159a390d4b6c6686009158959ab 100644 (file)
@@ -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:
index d1220794a6556252cd1e021bd4316df0149ef426..35ffdbd78f5a1046d07bdbaa7178e3ac7293e67d 100644 (file)
@@ -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],