]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'cvs-head' of http://lilypond.org/vc/lilypond into master-hanwen
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 3 Nov 2006 01:26:44 +0000 (02:26 +0100)
committerHan-Wen Nienhuys <lilydev@haring.localdomain>
Fri, 3 Nov 2006 01:26:44 +0000 (02:26 +0100)
32 files changed:
.gitignore
ChangeLog
GNUmakefile.in
buildscripts/git-update-changelog.py
elisp/GNUmakefile
input/regression/horizontal-bracket-break.ly [new file with mode: 0644]
input/regression/utf-8.ly
lily/context-def.cc
lily/include/lily-lexer.hh
lily/include/lily-parser.hh
lily/include/parse-scm.hh
lily/include/program-option.hh
lily/include/smobs.hh
lily/include/source.hh
lily/lexer.ll
lily/lily-lexer.cc
lily/lily-parser-scheme.cc
lily/lily-parser.cc
lily/parse-scm.cc
lily/part-combine-iterator.cc
lily/prob.cc
lily/program-option.cc
lily/simple-spacer.cc
lily/source.cc
lily/tie-configuration.cc
ly/declarations-init.ly
ly/music-functions-init.ly
mf/GNUmakefile
scm/autochange.scm
scm/lily.scm
scm/part-combiner.scm
stepmake/stepmake/po-vars.make

index 0b3bdf9521bcba26eb4a1eb1be724719bfd716c5..44b67df04b38943ee8b02e6acce8767e54f204c2 100644 (file)
@@ -17,3 +17,11 @@ tags
 *.midi
 \#*
 lily-[0-9][0-9][0-9]*
+gcstat*.scm
+*.aux
+*.svg
+*.pyc
+*.log
+.htaccess
+*.tfm
+*.afm
index 13ca50f1aee47818362968fc93de6e18038c255d..709756e77674c561cac4ecb40652df187325ec97 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
        * flower/polynomial.cc (check_sol): no empty if bodies. 
 
+2006-10-30  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * stepmake/stepmake/po-vars.make: Resolve.
+
+2006-10-29  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * stepmake/stepmake/po-vars.make: test change for GIT gateway.
+
+2006-10-29  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * buildscripts/git-update-changelog.py (main): write .msg and cvs
+       command.
+
+       * scm/define-grobs.scm: 
+       separation-items have width
+       
+       * VERSION: 
+       bump version
+       
+       * .gitignore: 
+       * Documentation/topdocs/NEWS.tely: 
+       * lily/separating-group-spanner.cc: 
+       * lily/slur-engraver.cc: 
+       * lily/slur-scoring.cc: 
+       * scm/define-grobs.scm: 
+       * input/regression/slur-clef.ly:
+       add breakableSeparationItem to extra encompass for slurs. This
+       fixes slur/clef slur/key collisions etc. Should fix #49
+       
+       * lily/include/slur-scoring.hh: 
+       * lily/slur-scoring.cc: 
+       Use X of separation item as slur start. Fixes #120
+
+2006-10-29  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * buildscripts/git-update-changelog.py (changelog_body): don't
+       write committishes.
+
+       * lily/grob.cc: add avoid-slur
+
+2006-10-28  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * emacsclient.patch: 
+       * server.el.patch: 
+       move server/emacsclient to elisp/
+
+       * buildscripts/git-update-changelog.py (Commit.note_del_file):
+       apply patches too
+
+       * elisp/server.el.patch: 
+       move emacs patches.
+
+       * elisp/emacsclient.patch: 
+       emacsclient too.
+
+       * buildscripts/git-update-changelog.py: 
+       ignore ChangeLog
+
+       * .gitignore: 
+       update
+
+       * ChangeLog: 
+       * buildscripts/git-update-changelog.py: 
+       script to update ChangeLog with Git messages.
+
+       * lily/beam-engraver.cc: 
+       * input/regression/rest-pitched-beam.ly: 
+       don't set callback if staff-position set. Fixes #126.
+
+       * lily/bar-number-engraver.cc: 
+       * lily/beam.cc: 
+       * lily/fingering-engraver.cc: 
+       * lily/grob-property.cc: 
+       * lily/grob.cc: 
+       * lily/include/grob.hh: 
+       * lily/include/lily-guile-macros.hh: 
+       * lily/mark-engraver.cc: 
+       * lily/melody-engraver.cc: 
+       * lily/script-column.cc: 
+       * lily/tie-formatting-problem.cc: 
+       * lily/tie.cc: 
+       internal_get_property_data() using ly_symbol2scm()
+
+       * stepmake/stepmake/generic-targets.make: 
+       create .gitignore in outdir.
+
+       * .gitignore: 
+       new file.
+
+2006-10-28  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * input/test/vertical-extent.ly: 
+       * python/convertrules.py (conv): verticalExtent -> VerticalAxisGroup.
+
+2006-10-28  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * stepmake/bin/add-html-footer.py (compose): remove setgcos
+
+2006-10-28  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * GNUmakefile.in (install-help2man): install-help2man target. 
+
+2006-10-27  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * SConstruct (configure): Do not check for /bin/sh.
+
+2006-10-27  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * mf/GNUmakefile: explicit dependencies for emmentaler .otf-table
+       files.
+
+       * Documentation/topdocs/NEWS.tely (Top): add FretBoards example. 
+
+       * input/regression/fret-boards.ly: new file.
+
+       * po/de.po: new po courtesy translation team.
+
+       * scripts/lilypond-book.py (get_option_parser): add newline to doc
+       string.
+
+2006-10-27  Mats Bengtsson  <mabe@drongo.s3.kth.se>
+
+       * ly/gregorian-init.ly (neumeDemoLayout): update
+       minimumVerticalExtent -> VerticalAxisGroup #'minimum-Y-extent 
+
+       * scm/define-context-properties.scm, ly/engraver-init.ly: Remove
+       obsolete verticalExtent / extraVerticalExtent / minumumVerticalExtent
+
+2006-10-27  Erlend Aasland  <erlenda@gmail.com>
+
+       * GNUmakefile.in ($(tree-share-prefix)/mf-link-tree link-mf-tree):
+       Yet another build fix.
+
+2006-10-26  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * SConstruct (lilypondprefix): use sorted() for list_sort()
+       indent 4
+
+2006-10-26  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * flower/SConscript: Unit test rules.
+
+       * flower/test-std.cc: Compile fix.
+
+2006-10-26  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * python/midi.c (pymidi_parse_track): warning fixes.
+
+       * lily/dot-column.cc (struct Dot_position): initialize extremal_head_
+       include dot-column.hh
+
+2006-10-26  Graham Percival  <gpermus@gmail.com>
+
+       * Documentation/user/{basic-, global}: minor changes from mailist.
+
+2006-10-26  Erlend Aasland  <erlenda@gmail.com>
+
+       * scm/define-grobs.scm: trivial beautification
+
+       * lily/tie-performer.cc: no need to #include "pqueue.hh"
+
+       * lily/source-file.cc: put multibyte var inside #if clause
+
+       * scm/define-grob-interfaces.scm:
+       * scm/define-grob-properties.scm:
+       Build fix (string-fret-finger-combinations)
+
+       * Documentation/topdocs/INSTALL.texi: Remove obsolete info about
+       lexer-gcc-3.1.sh
+
+       * Documentation/user/lilypond-book.itely: Build fix.
+
+2006-10-26  Joe Neeman  <joeneeman@gmail.com>
+
+       * lily/system.cc (get_paper_system): 
+       * lily/paper-book.cc (systems): 
+       move most of the backwards compatibility stuff into
+       Paper_book::systems
+
+       * Documentation/topdocs/NEWS.tely: add 2 entries for the
+       page breaking stuff
+
+       * Documentation/user/page.itely: remove time-scaled-music
+       bug for the Page_turn_engraver
+
+       * lily/paper-book.cc (set_system_penalty): backwards
+       compatibility (breakbefore) for the old page breaker
+
+2006-10-25  Graham Percival  <gpermus@gmail.com>
+
+       * Diocumentation/user/instrument-notation.itely: added more
+       info about stanzas; thanks Geoff!
+
+       * Documentation/user/ {basic, advanced}: small fixes from
+       mailist.
+
+       * THANKS: add some bug reporters.
+
+2006-10-25  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * scm/define-context-properties.scm (all-user-translation-properties):
+       noteToFretFunction: Add.
+
+       * scm/define-grobs.scm (all-grob-descriptions): FretBoard: use
+       fret-diagram-interface (WAS: fret-board-interface).  Fixes build.
+
+2006-10-23  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * flower/file-name.cc (dos_to_posix): Help std::string.copy with
+       trailing zero.
+
+       * GNUmakefile.in ($(tree-share-prefix)/mf-link-tree link-mf-tree):
+       Remove bashism in delete.
+
+2006-10-25  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * scm/define-grobs.scm (all-grob-descriptions): set finger-code.
+
+       * scm/translation-functions.scm (determine-frets-mf): flatten let*
+
+       * scm/define-context-properties.scm
+       (all-user-translation-properties): add maximumFretStretch property.
+
+       * scm/translation-functions.scm (tunings): read and use maximumFretStretch.
+
+       * lily/source-file.cc (get_counts): use multibyte variable.
+
+       * scm/translation-functions.scm (determine-frets-mf): new
+       function: compute fret numbers. 
+
+       * scm/output-lib.scm (string-frets->description) new function.
+       (fret-board::calc-stencil): new function
+
+       * scm/fret-diagrams.scm (fret-diagram-verbose): update doc string.
+
+       * scm/define-grobs.scm (all-grob-descriptions): add FretBoard grob. 
+
+       * lily/include/lily-guile.hh (ly_cxx_vector_to_list): new function.
+
+       * lily/tab-note-heads-engraver.cc: cleanups.
+
+       * lily/fretboard-engraver.cc: new file
+
+       * ly/engraver-init.ly: add FretBoards context
+
+2006-10-24  Joe Neeman  <joeneeman@gmail.com>
+
+       * lily/grob.cc (pure_relative_y_coordinate)
+       (pure_height): use the new call_pure_function stuff
+
+       * lily/grob-property.cc (call_pure_function): wrapper for the scheme
+       call-pure-function
+
+       * lily/side-position-interface.cc (pure_y_aligned_side): add an
+       optarg
+
+       * lily/simple-closure.cc (ly_eval_simple_closure): make
+       simple-closure evaluatable from scheme
+       (evaluate_with_simple_closure): make simple-closures pure-
+       evaluatable
+
+       * lily/slur.cc (pure_outside_slur_callback): new function
+
+       * ly/paper-defaults.ly: change default blank-page-force to 2 (this
+       fits in with previous changes that made the page forces much
+       smaller)
+
+       * scm/define-grobs.scm (call-pure-function): generalise pure-Y-offset
+       and pure-Y-extent into this new function.
+       (pure-conversions-alist): add outside-slur-callback
+
+2006-10-24  Mats Bengtsson  <mabe@drongo.s3.kth.se>
+
+       * Documentation/user/advanced-notation.itely (Instrument names):
+       Remove obsolete bug workaround for instrument names on piano
+       staff. 
+
+2006-10-24  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * Documentation/user/lilypond-book.itely (Integrating DocBook and
+       music): patch by Bertalan Fodor for docbook.
+
+       * Documentation/topdocs/GNUmakefile (LILYPOND_BINARY): use instead
+       of $(LILYPOND). Prevents lilypond run for .txt files.
+
+       * INSTALL.txt: gitness.
+
+       * .cvsignore: update to force gitness. 
+
+2006-10-23  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * lily/tuplet-bracket.cc (calc_position_and_height): robustness:
+       detect suicide in nested tuplets.
+
+2006-10-23  Werner Lemberg  <wl@gnu.org>
+
+       * lily/pango-font.cc (Pango_font::pango_item_string_stencil): Fix
+       typo in argument to FT_Get_X11_Font_Format.
+
+2006-10-23  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * stepmake/stepmake/po-vars.make: more gitness.
+
+       * flower/polynomial.cc (check_sol): no empty if bodies. 
+
 2006-10-22  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
        * stepmake/stepmake/po-vars.make: test change for GIT gateway.
index 8ecc6f65bfc3993bbdfe0ea02ad2a9569a124cc8..fc35f9124597b9ee210437a9986035e72abc6ef8 100644 (file)
@@ -22,9 +22,8 @@ TOPDOC_FILES=AUTHORS README INSTALL NEWS
 TOPDOC_TXT_FILES = $(addprefix $(top-build-dir)/Documentation/topdocs/$(outdir)/,$(addsuffix .txt,$(TOPDOC_FILES)))
 IN_FILES := $(call src-wildcard,*.in)
 
-PATCH_FILES = emacsclient.patch server.el.patch 
 EXTRA_DIST_FILES = VERSION .cvsignore SConstruct \
-  $(README_FILES) $(SCRIPTS) $(IN_FILES) $(PATCH_FILES)
+  $(README_FILES) $(SCRIPTS) $(IN_FILES) 
 INSTALLATION_DIR=$(local_lilypond_datadir)
 INSTALLATION_FILES=$(config_make) VERSION
 
index 5ad922be93a9b3619c222f4aafc3f277be34834f..4b98c6c1994e0e3a8a2073f4144e7e8c91e53c99 100644 (file)
@@ -17,6 +17,15 @@ def system (x):
 class PatchFailed(Exception):
     pass
 
+def sign (x):
+    if x < 0:
+        return -1
+    if x > 0:
+        return 1
+
+    return 0
+    
+
 class Commit:
     def __init__ (self, dict):
         for v in ('message',
@@ -32,6 +41,8 @@ class Commit:
         self.email = m.group (2).strip ()
         self.name = m.group (1).strip ()
         self.diff = read_pipe ('git show %s' % self.committish)
+    def compare (self, other):
+        return sign (time.mktime (self.date) - time.mktime (other.date))
         
     def touched_files (self):
         files = []
@@ -173,6 +184,15 @@ Run this file from the CVS directory, with commits from the repository in --git-
     if first == log[:len (first)]:
         log = log[len (first):]
 
+    try:
+        previously_done = dict((c, 1) for c in open ('.git-commits-done').read ().split ('\n'))
+    except OSError:
+        previously_done = {}
+
+    commits = [c for c in commits if not previously_done.has_key (c.committish)]
+    commits = sorted (commits, cmp=Commit.compare)
+
+    
     file_adddel = []
     collated_log = ''
     collated_message = ''
@@ -181,6 +201,7 @@ Run this file from the CVS directory, with commits from the repository in --git-
     while commits:
         c = commits[0]
         commits = commits[1:]
+        
         commits_done.append (c) 
 
         if not c.has_patch ():
index a92370d521dbbb8b6e5387831ac06d911ee84acb..0eab184cd0d74f0012dfce2808441b71831154a2 100644 (file)
@@ -9,6 +9,7 @@ INSTALLATION_OUT_DIR=$(elispdir)
 INSTALLATION_OUT_FILES=$(outdir)/lilypond-words.el
 
 STEPMAKE_TEMPLATES=elisp install install-out
+EXTRA_DIST_FILES= emacsclient.patch server.el.patch 
 
 include $(depth)/make/stepmake.make
 
diff --git a/input/regression/horizontal-bracket-break.ly b/input/regression/horizontal-bracket-break.ly
new file mode 100644 (file)
index 0000000..1b28726
--- /dev/null
@@ -0,0 +1,12 @@
+\header {
+  texidoc = "Horizontal brackets connect over line breaks."
+
+}
+\version "2.9.26"
+\paper { ragged-right  = ##t }
+
+\new Voice \with {
+  \consists Horizontal_bracket_engraver }
+{
+  c1\startGroup \break c1 \stopGroup
+}
index a9b4179face3c36905992cf53e9ac152888b56c8..4a82eab24b5ec7fab1d5b102cf5bdf3ca167f8a2 100644 (file)
@@ -43,7 +43,7 @@ japanese = \lyricmode {
   わがよたれぞ  つねならむ
   うゐのおくや  まけふこえて
   あさきゆめみじ ゑひもせず 
- }
+}
 
 % "a legal song to you"
 portuguese = \lyricmode { 
index 0af5fabf4fdef003342bc705ffe19797b642be15..c3a2a6c293b88594989b633393bb7f340103f629 100644 (file)
@@ -87,6 +87,8 @@ Context_def::print_smob (SCM smob, SCM port, scm_print_state*)
 SCM
 Context_def::mark_smob (SCM smob)
 {
+  ASSERT_LIVE_IS_ALLOWED();
+  
   Context_def *me = (Context_def *) SCM_CELL_WORD_1 (smob);
 
   scm_gc_mark (me->description_);
index 6a9107ee158c8d42eb18e3fac2ab3b270d2c4ad0..b64798823b7dce81e6f4b579f690cd1fc8051179 100644 (file)
@@ -64,6 +64,7 @@ public:
 
   void add_scope (SCM);
   SCM set_current_scope ();
+  bool has_scope () const;
   SCM remove_scope ();
 
   void start_main_input ();
index 4fa354d2803a31358049419f6054873da4a6bcc9..d4557e368826cfb7a195070c89303b794cf9e755 100644 (file)
@@ -50,6 +50,7 @@ public:
 
   DECLARE_SCHEME_CALLBACK (layout_description, ());
 
+  void clear ();
   void do_init_file ();
   void do_yyparse ();
   void parse_file (string init, string name, string out_name);
index 28223cac7ecd66413304b74b7af8a5f2b1005c37..0f48de2c533b6a384a04d359caca3b131d8b03f1 100644 (file)
@@ -13,6 +13,7 @@
 #include "lily-guile.hh"
 
 extern bool parse_protect_global;
+extern bool parsed_objects_should_be_dead;
 
 struct Parse_start
 {
index 5833ee5c37bea1c6f34082346c05d6d03c90c6fd..55971a1fa16ba6a74e451ad6e5ed81cc0bd36783 100644 (file)
@@ -20,4 +20,6 @@ extern bool profile_property_accesses;
 SCM ly_get_option (SCM);
 SCM ly_set_option (SCM, SCM);
 
+bool get_program_option (const char *);
+
 #endif /* SCM_OPTION_HH */
index cfd49db34f7260e9053aeafee57fc83740c9c869..a2dcdb613d31dd442cb3ce15464aeb4b91c688a0 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "lily-guile.hh"
 #include "virtual-methods.hh"
+#include "warn.hh"
 
 /*
   Smobs are GUILEs mechanism of exporting C(++) objects to the Scheme
 void protect_smob (SCM smob, SCM *prot_cons);
 void unprotect_smob (SCM smob, SCM *prot_cons);
 
+extern bool parsed_objects_should_be_dead;
+
+#define ASSERT_LIVE_IS_ALLOWED()     \
+  static bool passed_here_once;\
+  if (parsed_objects_should_be_dead && !passed_here_once) { \
+    programming_error (string ("Parsed object should be dead: ")  + __PRETTY_FUNCTION__ ); \
+    passed_here_once = true;\
+  }    
+
 #endif /* SMOBS_HH */
 
index 09c6b0553f4e19d23c196a0de9f763341600c220..b06266b4fc8df483db94779bf6dd823ccc0901bf 100644 (file)
@@ -13,9 +13,8 @@
 /*   A set of sourcefiles.  */
 class Sources
 {
-  Sources (Sources const &) {}
+  Sources (Sources const &);
   vector<Source_file*> sourcefiles_;
-  bool is_binary_;
 
 public:
   Sources ();
@@ -25,7 +24,6 @@ public:
   Source_file *get_sourcefile (char const *);
   void add (Source_file *sourcefile);
   void set_path (File_path *);
-  void set_binary (bool);
 
   const File_path *path_;
 };
index 04a279b4ca06bed273cbbfdad4608b66329c1ac0..8bf851eea4b5e3a63cb2b240bfb9682674ff9ccf 100644 (file)
@@ -80,11 +80,6 @@ bool is_valid_version (string s);
        (*(YYLTYPE*)lexloc)
 
 #define YY_USER_ACTION add_lexed_char (YYLeng ());
-/*
-
-LYRICS         ({AA}|{TEX})[^0-9 \t\n\f]*
-
-*/
 
 
 SCM scan_fraction (string);
@@ -117,18 +112,21 @@ SCM (* scm_parse_error_handler) (void *);
 %x sourcefilename
 %x version
 
-A              [a-zA-Z]
+A              [a-zA-Z\200-\377]
 AA             {A}|_
 N              [0-9]
 AN             {AA}|{N}
 ANY_CHAR       (.|\n)
 PUNCT          [?!:'`]
 ACCENT         \\[`'"^]
-NATIONAL       [\001-\006\021-\027\031\036\200-\377]
+NATIONAL       [\001-\006\021-\027\031\036]
 TEX            {AA}|-|{PUNCT}|{ACCENT}|{NATIONAL}
 WORD           {A}{AN}*
 DASHED_WORD            {A}({AN}|-)*
 DASHED_KEY_WORD                \\{DASHED_WORD}
+
+
+
 ALPHAWORD      {A}+
 DIGIT          {N}
 UNSIGNED       {N}+
@@ -148,6 +146,7 @@ ESCAPED             [nt\\'"]
 EXTENDER       __
 HYPHEN         --
 BOM_UTF8       \357\273\277
+
 %%
 
 
@@ -245,7 +244,6 @@ BOM_UTF8    \357\273\277
        int i;
        sscanf (YYText (), "%d", &i);
 
-//     this->set_debug (1); 
        yy_pop_state ();
        this->here_input ().get_source_file ()->set_line (here_input ().start (), i);
 }
index ef579dc7f05fdefb2bb7a258c0e5fdf60594ba67..1f39bd242584647489e93efcdffdbf0a16d301a7 100644 (file)
@@ -148,6 +148,11 @@ Lily_lexer::add_scope (SCM module)
 
   set_current_scope ();
 }
+bool
+Lily_lexer::has_scope () const
+{
+  return scm_is_pair (scopes_);
+}
 
 SCM
 Lily_lexer::remove_scope ()
@@ -300,6 +305,8 @@ IMPLEMENT_DEFAULT_EQUAL_P (Lily_lexer);
 SCM
 Lily_lexer::mark_smob (SCM s)
 {
+  ASSERT_LIVE_IS_ALLOWED();
+  
   Lily_lexer *lexer = (Lily_lexer *) SCM_CELL_WORD_1 (s);
 
   scm_gc_mark (lexer->chordmodifier_tab_);
index 90d9a60366e018a21fc845de9bf91ae55419927d..a1cdfa3c035f9b5d7d26db9f3d81f7928f9930bd 100644 (file)
@@ -110,11 +110,12 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
       exit (2);
     }
 
+
+  bool error = false;
   if ((file_name != "-") && file_name.empty ())
     {
       warning (_f ("can't find file: `%s'", file));
-      scm_throw (ly_symbol2scm ("ly-file-failed"),
-                scm_list_1 (scm_makfrom0str (file_name.c_str ())));
+      error = true;
     }
   else
     {
@@ -129,14 +130,20 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
 
       parser->parse_file (init, file_name, out_file);
 
-      bool error = parser->error_level_;
+      error = parser->error_level_;
 
+      parser->clear ();
       parser->unprotect ();
-      if (error)
-       /* TODO: pass renamed input file too.  */
-       scm_throw (ly_symbol2scm ("ly-file-failed"),
-                  scm_list_1 (scm_makfrom0str (file_name.c_str ())));
     }
+
+  /*
+    outside the if-else to ensure cleanup fo Sources object, 
+   */
+  if (error)
+    /* TODO: pass renamed input file too.  */
+    scm_throw (ly_symbol2scm ("ly-file-failed"),
+              scm_list_1 (scm_makfrom0str (file_name.c_str ())));
+  
   return SCM_UNSPECIFIED;
 }
 
index 8c5d43b2026f0f3672cf26c8b1c331e0d96fade2..a339e8a8f5d7c6585b98c3ef034a28b43224a1dc 100644 (file)
@@ -127,7 +127,7 @@ Lily_parser::parse_file (string init, string name, string out_name)
     }
 
   error_level_ = error_level_ | lexer_->error_level_;
-  lexer_ = 0;
+  clear ();
 }
 
 void
@@ -156,6 +156,18 @@ Lily_parser::parse_string (string ly_code)
   error_level_ = error_level_ | lexer_->error_level_;
 }
 
+void
+Lily_parser::clear ()
+{
+  if (lexer_)
+    {
+      while (lexer_->has_scope ())
+       lexer_->remove_scope ();
+    }
+
+  lexer_ = 0;  
+}
+
 char const *
 Lily_parser::here_str0 () const
 {
index 75f161540dfd0e705520c4fabf3f80b82d7c7b26..0769083cfa6c4f1371659a4612f3bd9fee4c0d52 100644 (file)
@@ -115,6 +115,7 @@ protected_ly_parse_scm (Parse_start *ps)
 }
 
 bool parse_protect_global = true;
+bool parsed_objects_should_be_dead = false;
 
 /* Try parsing.  Upon failure return SCM_UNDEFINED.
    FIXME: shouldn't we return SCM_UNSCPECIFIED -- jcn  */
index 9f06f3821f10ae5f0ba35670e46e7c35ab9f8dd5..03da0d4f5714fcd67dbc9257cccdef9b81c02f2a 100644 (file)
@@ -34,7 +34,6 @@ public:
 protected:
   virtual void derived_substitute (Context *f, Context *t);
   virtual void derived_mark () const;
-  Part_combine_iterator (Part_combine_iterator const &);
 
   virtual void construct_children ();
   virtual Moment pending_moment () const;
@@ -57,6 +56,11 @@ private:
 
   SCM split_list_;
 
+  Stream_event *unisono_event_; 
+  Stream_event *solo_one_event_;
+  Stream_event *solo_two_event_;
+  Stream_event *mmrest_event_; 
+  
   enum Status
     {
       APART,
@@ -111,6 +115,11 @@ Part_combine_iterator::do_quit ()
 
 Part_combine_iterator::Part_combine_iterator ()
 {
+  mmrest_event_ = 0;
+  unisono_event_ = 0;
+  solo_two_event_ = 0;
+  solo_one_event_= 0;
+
   first_iter_ = 0;
   second_iter_ = 0;
   split_list_ = SCM_EOL;
@@ -125,6 +134,17 @@ Part_combine_iterator::derived_mark () const
     scm_gc_mark (first_iter_->self_scm ());
   if (second_iter_)
     scm_gc_mark (second_iter_->self_scm ());
+
+  Stream_event *ptrs[] = {
+    unisono_event_,
+    mmrest_event_,
+    solo_two_event_,
+    solo_one_event_,
+    0
+  };
+  for (int i = 0; ptrs[i]; i++)
+    if (ptrs[i])
+      scm_gc_mark (ptrs[i]->self_scm ());
 }
 
 void
@@ -171,14 +191,15 @@ Part_combine_iterator::chords_together ()
 void
 Part_combine_iterator::kill_mmrest (int in)
 {
-  static Stream_event *mmrest;
-  if (!mmrest)
+  
+  if (!mmrest_event_)
     {
-      mmrest = new Stream_event (ly_symbol2scm ("multi-measure-rest-event"));
-      mmrest->set_property ("duration", SCM_EOL);
+      mmrest_event_ = new Stream_event (ly_symbol2scm ("multi-measure-rest-event"));
+      mmrest_event_->set_property ("duration", SCM_EOL);
+      mmrest_event_->unprotect ();
     }
 
-  handles_[in].get_outlet ()->event_source ()->broadcast (mmrest);
+  handles_[in].get_outlet ()->event_source ()->broadcast (mmrest_event_);
 }
 
 void
@@ -196,11 +217,13 @@ Part_combine_iterator::solo1 ()
 
       if (playing_state_ != SOLO1)
        {
-         static Stream_event *event;
-         if (!event)
-           event = new Stream_event (ly_symbol2scm ("solo-one-event"));
+         if (!solo_one_event_)
+           {
+             solo_one_event_ = new Stream_event (ly_symbol2scm ("solo-one-event"));
+             solo_one_event_->unprotect ();
+           }
 
-         first_iter_->get_outlet ()->event_source ()->broadcast (event);
+         first_iter_->get_outlet ()->event_source ()->broadcast (solo_one_event_);
        }
       playing_state_ = SOLO1;
     }
@@ -252,14 +275,16 @@ Part_combine_iterator::unisono (bool silent)
       if (playing_state_ != UNISONO
          && newstate == UNISONO)
        {
-         static Stream_event *event;
-         if (!event)
-           event = new Stream_event (ly_symbol2scm ("unisono-event"));
-
+         if (!unisono_event_)
+           {
+             unisono_event_ = new Stream_event (ly_symbol2scm ("unisono-event"));
+             unisono_event_->unprotect ();
+           }
+         
 
          Context *out = (last_playing_ == SOLO2 ? second_iter_ : first_iter_)
            ->get_outlet ();
-         out->event_source ()->broadcast (event);
+         out->event_source ()->broadcast (unisono_event_);
          playing_state_ = UNISONO;
        }
       state_ = newstate;
@@ -279,11 +304,13 @@ Part_combine_iterator::solo2 ()
 
       if (playing_state_ != SOLO2)
        {
-         static Stream_event *event;
-         if (!event)
-           event = new Stream_event (ly_symbol2scm ("solo-two-event"));
-
-         second_iter_->get_outlet ()->event_source ()->broadcast (event);
+         if (!solo_two_event_)
+           {
+             solo_two_event_ = new Stream_event (ly_symbol2scm ("solo-two-event"));
+             solo_two_event_->unprotect ();
+           }
+         
+         second_iter_->get_outlet ()->event_source ()->broadcast (solo_two_event_);
          playing_state_ = SOLO2;
        }
     }
@@ -368,7 +395,8 @@ Part_combine_iterator::set_busy (SCM se)
 }
 
 /*
-* Processes a moment in an iterator, and returns whether any new music was reported.
+  Processes a moment in an iterator, and returns whether any new music
+  was reported.
 */
 bool
 Part_combine_iterator::try_process (Music_iterator *i, Moment m)
index e28c24411a309a53bd0eead98b759e9c55d45c7e..b6df86590fe157f4746b391a3dabe349579c78af 100644 (file)
@@ -101,6 +101,8 @@ Prob::derived_mark () const
 SCM
 Prob::mark_smob (SCM smob)
 {
+  ASSERT_LIVE_IS_ALLOWED();
+  
   Prob *system = (Prob *) SCM_CELL_WORD_1 (smob);
   scm_gc_mark (system->mutable_property_alist_);
   system->derived_mark ();
index 9ec4901c857bbadcfd8d7673d8ed944232dd0ada..be81de380bf49ec1d5fea180d445db17d7be7d49 100644 (file)
@@ -34,7 +34,6 @@ bool profile_property_accesses = false;
 bool do_internal_type_checking_global;
 bool strict_infinity_checking = false; 
 
-
 static SCM option_hash;
 
 void internal_set_option (SCM var, SCM val)
@@ -68,6 +67,11 @@ void internal_set_option (SCM var, SCM val)
       do_internal_type_checking_global = to_boolean (val);
       val = scm_from_bool (to_boolean (val));
     }
+  else if (var == ly_symbol2scm ("debug-gc-assert-parsed-dead"))
+    {
+      parsed_objects_should_be_dead = to_boolean (val);
+      val = scm_from_bool (parsed_objects_should_be_dead);
+    }
   else if (var == ly_symbol2scm ("old-relative"))
     {
       lily_1_8_relative = to_boolean (val);
@@ -204,6 +208,9 @@ LY_DEFINE (ly_command_line_verbose_p, "ly:command-line-verbose?", 0, 0, 0, (),
   return scm_from_bool (be_verbose_global);
 }
 
+
+
+
 LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var),
           "Get a global option setting.")
 {
@@ -211,3 +218,12 @@ LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var),
                   SCM_ARG1, __FUNCTION__, "symbol");
   return scm_hashq_ref (option_hash, var, SCM_BOOL_F);
 }
+
+
+bool
+get_program_option (const char *s)
+{
+  SCM sym = ly_symbol2scm (s);
+
+  return to_boolean (ly_get_option (sym));
+}
index 3aa4bc001cf50547673ad349d29e7cfa813718d5..115c2a73376acb5cc5894173259c77e97405d407 100644 (file)
@@ -407,8 +407,10 @@ get_column_description (vector<Grob*> const &cols, vsize col_index, bool line_st
            description.end_rods_.push_back (Rod_description (j, scm_to_double (scm_cdar (s))));
        }
     }
+  
   if (!line_starter && to_boolean (col->get_property ("keep-inside-line")))
     description.keep_inside_line_ = col->extent (col, X_AXIS);
+
   description.break_permission_ = col->get_property ("line-break-permission");
   return description;
 }
index 9d978d4fae93d9b5e20e8b86fed9f6daa7b331ba..811b4dd6814dd541400b38895eae08f39c16ed88 100644 (file)
 Sources::Sources ()
 {
   path_ = 0;
-  is_binary_ = false;
 }
 
-void
-Sources::set_binary (bool bo)
+
+Sources::Sources (Sources const &)
 {
-  is_binary_ = bo;
+  assert (false);
 }
 
+
 void
 Sources::set_path (File_path *f)
 {
@@ -64,16 +64,3 @@ Sources::~Sources ()
     }
 }
 
-Source_file *
-Sources::get_sourcefile (char const *str0)
-{
-  for (vector<Source_file*>::iterator i = sourcefiles_.begin();
-       i != sourcefiles_.end (); i++)
-    {
-      if ((*i)->contains (str0))
-       return *i;
-    }
-
-  return 0;
-}
-
index 27f44691dd1ba3a27ffbff8f8726c5963936b71e..2e15eb72ebe6d21fbfa9fd3459c5cb7a53f02ee9 100644 (file)
@@ -80,12 +80,6 @@ Tie_configuration::column_span_length () const
   return column_ranks_[RIGHT] - column_ranks_[LEFT];
 }
 
-int
-Tie_configuration::column_span_length () const
-{
-  return column_ranks_[RIGHT] - column_ranks_[LEFT];
-}
-
 Real
 Tie_configuration::distance (Tie_configuration const &a,
                             Tie_configuration const &b)
index 6728973084a07aba90b6bf42b6abc3ff24564461..3ff8e221197c57d83c47998649e2503e9444c157 100644 (file)
@@ -106,8 +106,6 @@ partCombineListener = \layout {
     }
 }
 
-#(set-part-combine-listener partCombineListener)
-
 \include "dynamic-scripts-init.ly"
 \include "spanners-init.ly"
 \include "property-init.ly"
index 4686f7b723831d048d64a36fdfc1d02e3f1adc5e..a1fafa63e35c5a142d3dbb764dd36eb614b27811 100644 (file)
@@ -23,7 +23,7 @@ acciaccatura =
 addquote =
 #(define-music-function (parser location name music) (string? ly:music?)
    "Add a piece of music to be quoted "
-   (add-quotable name music)
+   (add-quotable parser name music)
    (make-music 'SequentialMusic 'void #t))
 
 
@@ -96,7 +96,7 @@ assertBeamSlope =
 
 autochange =
 #(define-music-function (parser location music) (ly:music?)
-               (make-autochange-music music))
+               (make-autochange-music parser music))
 
 applyContext =
 #(define-music-function (parser location proc) (procedure?)
@@ -338,7 +338,8 @@ octave =
               ))
 partcombine =
 #(define-music-function (parser location part1 part2) (ly:music? ly:music?)
-                (make-part-combine-music (list part1 part2)))
+                (make-part-combine-music parser
+                                        (list part1 part2)))
 
              
 pitchedTrill =
index 0956ee36ef0f9ed4a8c1883b102d76df6de96772..c87aa1c47fe7779987c11dd68694440628685dfd 100644 (file)
@@ -65,7 +65,6 @@ $(outdir)/emmentaler-%.otf $(outdir)/emmentaler-%.svg: $(outdir)/emmentaler-%.pe
 
 $(outdir)/aybabtu.otf $(outdir)/aybabtu.svg: $(outdir)/aybabtu.pe $(foreach s,$(BRACES),$(outdir)/feta-braces-$(s).pfa) $(outdir)/aybabtu.otf-table $(outdir)/aybabtu.otf-gtable
        cd $(outdir) && $(FONTFORGE) -script aybabtu.pe
-       -rm -f $(outdir)/*.scale.{pfa,afm}
 
 $(outdir)/%.pfa: $(outdir)/%.log
 
index e4a27d7063703ca8eb73ad8847480741d59b263a..c445997199b8f53e6ac968cdac97b0098a3e594c 100644 (file)
@@ -3,7 +3,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; autochange - fairly related to part combining.
 
-(define-public (make-autochange-music music)
+(define-public (make-autochange-music parser music)
   (define (generate-split-list change-moment event-list acc)
     (if (null? event-list)
        acc
@@ -32,7 +32,8 @@
   
   (let* ((m (make-music 'AutoChangeMusic))
        (m1 (make-non-relative-music (context-spec-music music 'Voice "one")))
-        (context-list (recording-group-emulate music part-combine-listener))
+        (context-list (recording-group-emulate music
+                                               (ly:parser-lookup parser 'partCombineListener)))
         (evs (car context-list))
          (rev (reverse! (cdar context-list)))
         (split (reverse! (generate-split-list
index edd99461d5d7a7e7aca37959e6b633f3f11c1824..ee17b9fbc77c9f20f027b408c0b90d22cfab7c70 100644 (file)
              (clip-systems #f "Generate cut-out snippets of a score")
              (debug-gc #f
                        "dump memory debugging statistics")
+             (debug-gc-assert-parsed-dead #f
+                       "for memory debugging: ensure that all refs to parsed objects are dead.")
+             
+             (debug-midi #f "generate human readable MIDI")
+             (debug-parser #f "debug the bison parser")
+             (debug-lexer #f "debug the flex lexer")
              (debug-midi #f "generate human readable MIDI")
              (debug-parser #f "debug the bison parser")
              (debug-lexer #f "debug the flex lexer")
@@ -386,6 +392,8 @@ The syntax is the same as `define*-public'."
          (display "Live object statistics: GC'ing\n")
          (gc)
          (gc)
+         (ly:set-option 'debug-gc-assert-parsed-dead #t)
+         (gc)
          
          (set! stats (gc-live-object-stats))
          (display "Dumping live object statistics.\n")
@@ -445,6 +453,7 @@ The syntax is the same as `define*-public'."
 
     (for-each
      (lambda (x)
+       (ly:set-option 'debug-gc-assert-parsed-dead #f)
        (lilypond-file handler x)
        (ly:clear-anonymous-modules)
        (if (ly:get-option 'debug-gc)
@@ -458,8 +467,7 @@ The syntax is the same as `define*-public'."
         (lambda () (ly:parse-file file-name))
         (lambda (x . args) (handler x file-name))))
 
-(use-modules (scm editor)
-            )
+(use-modules (scm editor))
 
 (define-public (gui-main files)
   (if (null? files)
index a444313f6617f1d385580e8cd76905b1041b8eb7..cc051cd5e639d23d0ddaf24e9bb16e874fb32432 100644 (file)
@@ -220,25 +220,13 @@ Voice-state objects
     (ly:interpret-music-expression (make-non-relative-music music) global)
     context-list))
 
-(define noticed '())
-;; todo: junk this, extract $defaultlayout from parser instead
-(define part-combine-listener '())
-
-; UGH - should pass noticed setter to part-combine-listener
-(define-safe-public (set-part-combine-listener x)
-  (set! part-combine-listener x))
-
-(define-public (notice-the-events-for-pc context lst)
-  "add CONTEXT-ID, EVENT list to NOTICED variable."
-  
-  (set! noticed (acons (ly:context-id context) lst noticed)))
-
-(define-public (make-part-combine-music music-list)
+(define-public (make-part-combine-music parser music-list)
   (let* ((m (make-music 'PartCombineMusic))
         (m1 (make-non-relative-music (context-spec-music (first music-list) 'Voice "one")))
         (m2  (make-non-relative-music  (context-spec-music (second music-list) 'Voice "two")))
-        (evs2 (recording-group-emulate m2 part-combine-listener))
-        (evs1 (recording-group-emulate m1 part-combine-listener)))
+        (listener (ly:parser-lookup parser 'partCombineListener))
+        (evs2 (recording-group-emulate m2 listener))
+        (evs1 (recording-group-emulate m1 listener)))
     
     (set! (ly:music-property m 'elements) (list m1 m2))
     (set! (ly:music-property m 'split-list)
@@ -495,11 +483,10 @@ the mark when there are no spanners active.
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(define-public (add-quotable name mus)
-  (set! noticed '())
+(define-public (add-quotable parser name mus)
   (let* ((tab (eval 'musicQuotes (current-module)))
         (context-list (recording-group-emulate (context-spec-music mus 'Voice)
-                                             part-combine-listener)))
+                                               (ly:parser-lookup parser 'partCombineListener))))
     (if (pair? context-list)
        (hash-set! tab name
                   ;; cdr : skip name string
index e032d7ee59da0ee580e7967954f6938b5163084d..1bb8bf6d7fd4c8d09aea89b47de20fb8bbb61626 100644 (file)
@@ -1,2 +1 @@
 # empty
-