]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/score.cc
Add cautionary-style to interface.
[lilypond.git] / lily / score.cc
index 9b8d379999fb34737d107bdd5be58049bdcb61e1..d8887be29f72d0c1a78cef1bc488dedf4a37eebb 100644 (file)
@@ -3,12 +3,11 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "ly-smobs.icc"
 
-#include "scm-hash.hh"
 #include "score.hh"
 #include "debug.hh"
 #include "music-output-def.hh"
@@ -16,7 +15,7 @@
 #include "music-iterator.hh"
 #include "music.hh"
 #include "global-translator.hh"
-#include "scope.hh"
+#include "scm-hash.hh"
 #include "cpu-timer.hh"
 #include "main.hh"
 #include "paper-def.hh"
@@ -32,6 +31,7 @@ Score::Score ()
   header_p_ = 0;
   music_ = SCM_EOL;
   errorlevel_i_ = 0;
+
   smobify_self ();
 }
 
@@ -48,11 +48,6 @@ Score::Score (Score const &s)
   header_p_ = 0;
   smobify_self ();
 
-  /*
-    TODO: this is not very elegant.... 
-   */
-  store_locations_global_b = (gh_eval_str ("point-and-click") !=  SCM_BOOL_F);
-
   Music * m =unsmob_music (s.music_);
   music_ =  m?m->clone ()->self_scm () : SCM_EOL;
   scm_gc_unprotect_object (music_);
@@ -76,6 +71,14 @@ Score::~Score ()
 void
 Score::run_translator (Music_output_def *odef_l)
 {
+  /*
+    We want to know if we want to store locations, since they take a
+    lot of overhead.
+    
+   */
+  store_locations_global_b = (gh_eval_str ("point-and-click") !=  SCM_BOOL_F);
+
+  
   Cpu_timer timer;
 
   
@@ -123,8 +126,8 @@ Score::run_translator (Music_output_def *odef_l)
 
   if (!header_p_)
     header_p_ = new Scheme_hash_table; // ugh
-  Scope bla (header_p_);
-  output->header_l_ = &bla;
+
+  output->header_l_ = header_p_;
   output->origin_str_ =  location_str ();
 
   progress_indication ("\n");