]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/sequential-iterator.cc (Sequential_iterator): init list_
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 15 Sep 2002 00:06:15 +0000 (00:06 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 15 Sep 2002 00:06:15 +0000 (00:06 +0000)
* lily/translator-def.cc (Translator_def): make a GC proof copy
constructor.

ChangeLog
Documentation/user/tutorial.itely
input/test/GNUmakefile
lily/folded-repeat-iterator.cc
lily/lyric-combine-music-iterator.cc
lily/part-combine-music-iterator.cc
lily/percent-repeat-iterator.cc
lily/sequential-iterator.cc
lily/translator-def.cc
scm/lily.scm
scripts/lilypond-book.py

index f2714db5d53e1f373c0deaf6c7429e2c9b670405..2d776618e2c60c3d3f89bf2572f60d9b5b8ee0da 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
+2002-09-15  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * lily/sequential-iterator.cc (Sequential_iterator): init list_
+
+       * lily/translator-def.cc (Translator_def): make a GC proof copy
+       constructor.
+
 2002-09-14  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
+       * lily/percent-repeat-iterator.cc (process): quit iter.
+
        * lily/simultaneous-music-iterator.cc
        (Simultaneous_music_iterator): protection bugfix.
        (get_pending_events): bugfix: don't use s twice.
index 1d351ba3e141a7af545aecfc9c57cdce5092217e..54968e2e27d14bea4d68d3811fc52559c0d40bc7 100644 (file)
@@ -500,7 +500,8 @@ g'4 ~ g' a'2 ~ a'4
 @end quotation
 @separate
 
-The key signature is set with the command ``@code{\key}'':
+The key signature is set with the command ``@code{\key}''.  One caution:
+you need to specify whether the key is @code{\major} or @code{\minor}.
 @quotation
 @example
 \key d \major
index 82fc916468e100fa44ddcb570a6e24caa012f603..e33a3600a5f5a0de46021bc950329b0bbf9cf423 100644 (file)
@@ -15,4 +15,4 @@ EXTRA_DISTFILES=features.abc
 
 include $(depth)/make/stepmake.make 
 
-TITLE=LilyPond Feature Tests
+TITLE=LilyPond Tips and Tricks
index 3a90567566a1f53fa92dca8151898e2f3f735cb9..b2e07aed32d6ba45a581dd93b30ac962bbd8c0f3 100644 (file)
@@ -1,5 +1,5 @@
 /*   
-  repeated-music-iterator.cc --  implement Folded_repeat_iterator
+     folded-repeat-iterator.cc --  implement Folded_repeat_iterator
   
   source file of the GNU LilyPond music typesetter
   
@@ -67,7 +67,7 @@ Folded_repeat_iterator::construct_children ()
   main_iter_ = unsmob_iterator (get_iterator (mus->body ()));
   if (!main_iter_->ok ())
     {
-     leave_body ();
+      leave_body ();
       enter_alternative ();
     }
 }
@@ -121,12 +121,17 @@ Folded_repeat_iterator::enter_alternative ()
   Repeated_music *  mus = dynamic_cast<Repeated_music *> (get_music ());  
   if (mus->alternatives ())
     {
+  /*
+    ugh.
+   */ 
       Simultaneous_music_iterator * s = new Simultaneous_music_iterator;
       s->separate_contexts_b_ = true;
       s->init_translator (mus, report_to ());
       
       alternative_iter_ = s;
       alternative_iter_->construct_children ();
+
+      scm_gc_unprotect_object (s->self_scm());
     }
 }
 
index fc4d7c2b4188574e952a8439ecc02bed11c0e768..127945b3d6276e47848c17c2f7b76560bbc3e3ce 100644 (file)
@@ -127,8 +127,10 @@ Lyric_combine_music_iterator::process (Moment m)
 void
 Lyric_combine_music_iterator::do_quit ()
 {
-  if (music_iter_) music_iter_->quit();
-  if (lyric_iter_) lyric_iter_->quit();
+  if (music_iter_)
+    music_iter_->quit();
+  if (lyric_iter_)
+    lyric_iter_->quit();
   
 }
 Lyric_combine_music_iterator::Lyric_combine_music_iterator (Lyric_combine_music_iterator const & src)
index 9c7efd35c5c11db67e1ee8a9b7c9187af378f22c..73c7ae792433be29eef180490fcd4a1c478866ef 100644 (file)
@@ -34,8 +34,10 @@ Part_combine_music_iterator::derived_mark () const
 void
 Part_combine_music_iterator::do_quit ()
 {
-  if (first_iter_) first_iter_->quit();
-  if (second_iter_) second_iter_->quit();
+  if (first_iter_)
+    first_iter_->quit();
+  if (second_iter_)
+    second_iter_->quit();
 }
 
 Part_combine_music_iterator::Part_combine_music_iterator (Part_combine_music_iterator const &src)
index 4e8dac48a9c901a2f63ae7e5024fe812a85595a7..d1bdfb1f9b7d9cabb9a4cc11e143768b8e12bfb6 100644 (file)
@@ -66,6 +66,7 @@ Percent_repeat_iterator::process (Moment m)
 
   if (finish_mom_ <= m )
     {
+      child_iter_->quit(); 
       child_iter_ = 0;
     }
 }
index 7c6f6c4a4659f5f8ab7ab1036f58882d69584324..9424e84d2d8103fa92b9aa46e57b3b155c9c31f4 100644 (file)
@@ -39,6 +39,7 @@ Grace_fixup *get_grace_fixups (SCM cursor);
 Sequential_iterator::Sequential_iterator ()
 {
   here_mom_ = Moment (0);
+  list_ = SCM_EOL;
   grace_fixups_ = 0;
   iter_ =0;
 }
@@ -64,10 +65,7 @@ Sequential_iterator::Sequential_iterator (Sequential_iterator const &src)
   cursor_ = src.cursor_;
   list_ = src.cursor_;
   here_mom_ = src.here_mom_;
-  if (src.iter_)
-    iter_ = src.iter_->clone ();
-  else
-    iter_ = 0;
+  iter_ = (src.iter_) ? src.iter_->clone () : 0;
 
   if (iter_)
     scm_gc_unprotect_object (iter_->self_scm());
index 14d7c9f9f84e6298916381d99d9d97d82a9162ed..14a4fe5404eefcb4baedc78924d88ca97be8696e 100644 (file)
@@ -50,7 +50,11 @@ Translator_def::Translator_def ()
   end_consists_name_list_ = SCM_EOL;
   property_ops_ = SCM_EOL;
   type_name_ = SCM_EOL;
+
+  smobify_self();
+  
 }
+
 Translator_def::~Translator_def ()
 {
 }
@@ -58,6 +62,16 @@ Translator_def::~Translator_def ()
 Translator_def::Translator_def (Translator_def const & s)
   : Input (s)
 {
+  type_aliases_ = SCM_EOL;
+  translator_group_type_ = SCM_EOL;
+  accepts_name_list_ = SCM_EOL;   
+  consists_name_list_ = SCM_EOL;
+  end_consists_name_list_ = SCM_EOL;
+  property_ops_ = SCM_EOL;
+  type_name_ = SCM_EOL;
+
+  
+  smobify_self();
   consists_name_list_ = scm_list_copy (s.consists_name_list_);
   end_consists_name_list_ = scm_list_copy (s.end_consists_name_list_);
   accepts_name_list_ = scm_list_copy (s.accepts_name_list_);
@@ -275,14 +289,16 @@ SCM
 Translator_def::clone_scm () const
 {
   Translator_def * t = new Translator_def (*this);
-  return t->unprotected_smobify_self ();
+  scm_gc_unprotect_object (t->self_scm());
+  return t->self_scm();
 }
 
 SCM
 Translator_def::make_scm ()
 {
   Translator_def* t = new Translator_def;
-  return t->unprotected_smobify_self ();
+  scm_gc_unprotect_object (t->self_scm());
+  return t->self_scm();
 }
 
 void
index eb081496e193eb74fd1d56066e2ca388d4300c54..7575993e64c25203898cb2ed8cf383b518f6c5f0 100644 (file)
@@ -18,7 +18,7 @@
 ;(debug-enable 'debug)
 ;(debug-enable 'backtrace)
 ;(read-enable 'positions)
-;(set-debug-cell-accesses! #f)
+;(set-debug-cell-accesses! 15000)
 
 
 
index d048055e75c09299b87897775190763364ac71b5..d1882ce2ec5e43a3731e8f66359febe2009f5108 100644 (file)
@@ -113,6 +113,8 @@ kpse = os.popen ('kpsexpand \$TEXMF').read()
 kpse = re.sub('[ \t\n]+$','', kpse)
 type1_paths = os.popen ('kpsewhich -expand-path=\$T1FONTS').read ()
 
+binary = 'lilypond'
+#binary = 'valgrind --suppressions=/home/hanwen/usr/src/guile-1.6.supp  --num-callers=10 /home/hanwen/usr/src/lilypond/lily/out/lilypond'
 environment = {
        # TODO: * prevent multiple addition.
        #       * clean TEXINPUTS, MFINPUTS, TFMFONTS,
@@ -1144,8 +1146,8 @@ def compile_all_files (chunks):
                        if g_outdir:
                                lilyopts = lilyopts + '--dep-prefix=' + g_outdir + '/'
                texfiles = string.join (tex, ' ')
-               cmd = 'lilypond --header=texidoc %s %s %s' \
-                     % (lilyopts, g_extra_opts, texfiles)
+               cmd = '%s --header=texidoc %s %s %s' \
+                     % (binary, lilyopts, g_extra_opts, texfiles)
 
                system (cmd)