]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/main.cc (main_with_guile): switch debugging. release/2.1.34
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 23 Mar 2004 12:42:30 +0000 (12:42 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 23 Mar 2004 12:42:30 +0000 (12:42 +0000)
* lily/system.cc (get_line): plug leak.

* lily/paper-book.cc (pages): plug memory leaks: delete page array
and contents.
(stencil2line): plug leak.

* Documentation/user/changing-defaults.itely (Determining a grob
property):  new node.
(Layout interfaces): new node.
(Navigating the program reference): new node.

15 files changed:
ChangeLog
Documentation/user/changing-defaults.itely
Documentation/user/lilypond-book.itely
Documentation/user/notation.itely
VERSION
lily/include/paper-score.hh
lily/include/staff-symbol-referencer.hh
lily/main.cc
lily/paper-book.cc
lily/paper-score.cc
lily/system.cc
scm/define-music-types.scm
scm/document-translation.scm
scm/lily.scm
vim/GNUmakefile

index c60609360056d22eabc444ef59c67775b4c14845..b657eb3dafa9585028a6ee87cfbd07be87413c1d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2004-03-23  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/main.cc (main_with_guile): switch debugging.
+
+       * lily/system.cc (get_line): plug leak.
+
+       * lily/paper-book.cc (pages): plug memory leaks: delete page array
+       and contents.
+       (stencil2line): plug leak.
+
        * Documentation/user/changing-defaults.itely (Determining a grob
        property):  new node.
        (Layout interfaces): new node.
index ed7a7eec2dae1b5614666fb6f76fb7ae9ecf3fba..861c9856a48baaa9b80350ed97e4dc095bce49b4 100644 (file)
@@ -50,7 +50,6 @@ entering numbers, lists, strings and symbols in Scheme.
 * Fonts::                       
 * Text markup::                 
 * Global layout::               
-* Font Size::                   
 * Output details::              
 @end menu
 
@@ -960,7 +959,6 @@ layout property name:
 * Navigating the program reference::  
 * Layout interfaces::           
 * Determining the grob property::  
-* Determining a grob property::  
 @end menu
 
 
@@ -1232,9 +1230,6 @@ object interface.  Each interface has a number of properties.  Some of
 them are not user-serviceable (``Internal properties''), but others
 are.
 
-@node Determining the grob property
-@subsection Determining the grob property
-
 We have been talking of `the' @code{Fingering} object, but actually it
 does  not amount to much. The initialization file
 @file{scm/define-grobs.scm} shows the soul of the `object',
@@ -1261,8 +1256,9 @@ as you can see, @code{Fingering} is nothing more than a bunch of
 variable settings, and the webpage is directly generated from this
 definition.
 
-@node  Determining a grob property
-@subsection Determining a grob property
+@node Determining the grob property
+@subsection Determining the grob property
+
 
 Recall that we wanted to change the position of the @b{2} in 
 
@@ -1322,7 +1318,7 @@ also be deduced from the program reference, for the page for the
 @internalsref{Fingering_engraver} plug-in says
 
 @quotation
-  Fingering_engraver is part of contexts: @dots{} @internalsref{Voice}
+  Fingering_engraver is part of contexts: @dots{} @b{@internalsref{Voice}}
 @end quotation
 
 
@@ -1334,6 +1330,8 @@ also be deduced from the program reference, for the page for the
 * Font selection::              
 @end menu
 
+
+
 @node Selecting font sizes
 @subsection Selecting font sizes
 
@@ -1593,11 +1591,102 @@ are chosen whenever the page gets full.
 
 
 @menu
+* Setting global staff size::   
 * Vertical spacing::            
 * Horizontal spacing::          
+* Line breaking::               
+* Page layout::                 
 @end menu
 
 
+@node Setting global staff size
+@subsection Setting global staff size
+
+@cindex font size, setting
+@cindex staff size, setting
+@cindex @code{paper} file
+
+The Feta font provides musical symbols at eight  different
+sizes. Each font is tuned for a different staff size: at smaller sizes
+the font gets heavier, to match the relatively heavier staff lines.
+The recommended font sizes are listed in the following table:
+
+@multitable @columnfractions  .25 .25 .25 .25
+
+@item @b{font name}
+@tab @b{staff height (pt)}
+@tab @b{staff height (mm)}
+@tab @b{use}
+
+@item feta11
+@tab 11.22
+@tab 3.9 
+@tab pocket scores
+
+@item feta13
+@tab 12.60
+@tab 4.4
+@tab
+
+@item feta14
+@tab 14.14
+@tab 5.0
+@tab 
+
+@item feta16
+@tab 15.87
+@tab 5.6
+@tab 
+
+@item feta18
+@tab 17.82
+@tab 6.3
+@tab song books
+
+@item feta20
+@tab 17.82
+@tab 7.0
+@tab standard parts 
+
+@item feta23
+@tab 22.45 
+@tab 7.9
+@tab 
+
+@item feta20
+@tab 25.2 
+@tab 8.9
+@tab
+@c modern rental material  ?
+
+@end multitable
+
+These fonts are available in any sizes. The context property
+@code{fontSize} and the layout property @code{staff-space} (in
+@internalsref{StaffSymbol}) can be used to tune size for individual
+staves. The size of individual staves are relative to the global size,
+which can be set   in the following manner:
+
+@example
+  #(set-global-staff-size 14)
+@end example
+
+This sets the global default size to 14pt staff height, and scales all
+fonts accordingly.
+
+@seealso
+
+This manual: @ref{Selecting font sizes}.
+
+
+
+@menu
+* Vertical spacing::            
+* Horizontal spacing::          
+* Line breaking::               
+* Page layout::                 
+@end menu
+
 @node Vertical spacing
 @subsection Vertical spacing
 
@@ -1765,86 +1854,6 @@ There is no convenient mechanism to manually override spacing.
 
 
 
-@node Font Size
-@section Font size
-
-@cindex font size, setting
-@cindex staff size, setting
-@cindex @code{paper} file
-
-The Feta font provides musical symbols at eight  different
-sizes. Each font is tuned for a different staff size: at smaller sizes
-the font gets heavier, to match the relatively heavier staff lines.
-The recommended font sizes are listed in the following table:
-
-@multitable @columnfractions  .25 .25 .25 .25
-
-@item @b{font name}
-@tab @b{staff height (pt)}
-@tab @b{staff height (mm)}
-@tab @b{use}
-
-@item feta11
-@tab 11.22
-@tab 3.9 
-@tab pocket scores
-
-@item feta13
-@tab 12.60
-@tab 4.4
-@tab
-
-@item feta14
-@tab 14.14
-@tab 5.0
-@tab 
-
-@item feta16
-@tab 15.87
-@tab 5.6
-@tab 
-
-@item feta18
-@tab 17.82
-@tab 6.3
-@tab song books
-
-@item feta20
-@tab 17.82
-@tab 7.0
-@tab standard parts 
-
-@item feta23
-@tab 22.45 
-@tab 7.9
-@tab 
-
-@item feta20
-@tab 25.2 
-@tab 8.9
-@tab
-@c modern rental material  ?
-
-@end multitable
-
-These fonts are available in any sizes. The context property
-@code{fontSize} and the layout property @code{staff-space} (in
-@internalsref{StaffSymbol}) can be used to tune size for individual
-staves. The size of individual staves are relative to the global size,
-which can be set   in the following manner:
-
-@example
-  #(set-global-staff-size 14)
-@end example
-
-This sets the global default size to 14pt staff height, and scales all
-fonts accordingly.
-
-@seealso
-
-This manual: @ref{Selecting font sizes}.
-
-
 @menu
 * Line breaking::               
 * Page layout::                 
index cea6f98b9b3b89b99a9995ee5bb86d5ecfd96cdd..08fbcac767441afc7efa29779946f51a88dde22d 100644 (file)
@@ -364,8 +364,6 @@ fragments in the DVI output only. For getting images in the HTML
 version,  the format 
 @code{texi-html} must be used.
 
-@ignore
-@c broken
 @item @option{-F @var{filter}}, @option{--filter=@var{filter}}
 Pipe snippets through @var{filter}.
 
@@ -373,7 +371,6 @@ For example:
 @example
     lilypond-book --filter='convert-ly --from=2.0.0' my-book.tely
 @end example
-@end ignore
 
 @item @option{--help}
 Print a short help message.
index 05178a0d43f1cd75eff718885879de1bde33f122..a01a7c3d1fb7cc6153962199b44c53f15bbac2ff 100644 (file)
@@ -7381,7 +7381,7 @@ used in music for beginners:
 The command @code{\setEasyHeads} overrides settings for the
 @internalsref{NoteHead} object.  To make the letters readable, it has
 to be printed in a large font size.  To print with a larger font, see
-@ref{Font Size}.
+@ref{Setting global staff size}.
 
 @cindex Xdvi
 @cindex ghostscript
diff --git a/VERSION b/VERSION
index e95b04287b82255760006bfa70ff8f607c8ba13c..aeaa26a9105dbd7f4d8eb2391a4f03d3ce20bbd8 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=1
-PATCH_LEVEL=33
-MY_PATCH_LEVEL=hwn1
+PATCH_LEVEL=34
+MY_PATCH_LEVEL=
 
index f6db4de5753b4a15728708c2c41e99896c1c1b84..43bc6a58364250d4b397997faba57e09e8025cb5 100644 (file)
@@ -34,7 +34,7 @@ protected:
   virtual SCM process (String);
 
 private:
-  Protected_scm score_;
+  Protected_scm systems_;
 
   void preprocess ();
   void calc_idealspacing ();
index 3a4b5946abb9484747c70d7ac457bc030a99dc96..34fe6a9b27abd0bd39d3deabc3d7102988ba546d 100644 (file)
@@ -21,7 +21,6 @@
 class Staff_symbol_referencer 
 {
 public:
-  
   static bool has_interface (Grob*);
   static bool ugly_hack (Grob*);  
   static void set_position (Grob*,Real);
@@ -31,10 +30,9 @@ public:
      Leading are the lead strips between the sticks (lines) of
      typeface. ie. leading is vertical space.
   */
   static Real line_thickness (Grob*);
   static Real staff_space (Grob*);
-  static Grob * get_staff_symbol (Grob*);
+  static Grob *get_staff_symbol (Grob*);
   static bool on_staffline (Grob*);
   static bool on_staffline (Grob*,int);
   static int line_count (Grob*);
index ba7bddf16111b0518e3fcef669801e2f9593e473..a2a9ceec93aae70096af7b7d597d8732f4df8c45 100644 (file)
@@ -285,14 +285,12 @@ main_with_guile (void *, int, char **)
   bool first = true;
   while (char const *arg = option_parser->get_next_arg ())
     {
-  
 #if 0
       /* Code to debug memory leaks.  Cannot call from within .ly
         since then we get the protects from the parser state too.  */
       scm_gc ();
       scm_call_0 (ly_scheme_function ("dump-gc-protects"));
 #endif
-      
       do_one_file (arg);
       first = false;
     }
index 8c684df9115bce076f84b5782456577b064ab7e9..4f48f7a5adab554eb2c3a3cfdf12a94c4ec9ee06 100644 (file)
@@ -30,7 +30,8 @@ stencil2line (Stencil* stil, bool is_title = false)
                       stil->extent (Y_AXIS).length ());
   Paper_line *pl = new Paper_line (dim, scm_cons (stil->smobbed_copy (),
                                                  SCM_EOL), is_title);
-  return pl->self_scm ();
+
+  return scm_gc_unprotect_object (pl->self_scm ());
 }
 
 /* Simplistic page interface */
@@ -261,6 +262,15 @@ Paper_book::output (String outname)
     (*pages)[i]->output (out, i + 1 == page_count);
 
   out->output_scheme (scm_list_1 (ly_symbol2scm ("end-output")));
+
+  /*
+    Ugh
+   */
+  for (int i =pages->size (); i--;)
+    delete pages->elem(i);
+  delete pages;
+
+  
   progress_indication ("\n");
 }
 
@@ -397,12 +407,11 @@ Paper_book::pages ()
 
   SCM all = lines ();
   SCM proc = paper->get_scmvar ("page-breaking");
-  SCM breaks = scm_apply_0 (proc, scm_list_n (all,
-                                             gh_double2scm (height_),
-                                             gh_double2scm (text_height),
-                                             gh_double2scm (-copy_height),
-                                             gh_double2scm (-tag_height),
-                                             SCM_UNDEFINED));
+  SCM breaks = scm_apply_0 (proc, scm_list_n (all, gh_double2scm (height_),
+                                           gh_double2scm (text_height),
+                                           gh_double2scm (-copy_height),
+                                           gh_double2scm (-tag_height),
+                                           SCM_UNDEFINED));
 
   /* Copyright on first page.  */
   if (unsmob_stencil (copyright_))
@@ -432,6 +441,7 @@ Paper_book::pages ()
   /* Tagline on last page.  */
   if (unsmob_stencil (tagline_))
     page->tagline_ = tagline_;
+
   return pages;
 }
 
index 92f27355f6ff84836701a8f00f4692d56e266067..1eab7f80f6bc4b54db8cdb55d60f47f415ff191b 100644 (file)
@@ -31,7 +31,6 @@ Paper_score::Paper_score ()
 {
   paper_ = 0;
   system_ = 0;
-  score_ = SCM_EOL;
 }
 
 Paper_score::Paper_score (Paper_score const &s)
@@ -46,7 +45,7 @@ Paper_score::typeset_line (System *system)
   if (!system_)
     system_ = system;
 
-  score_ = gh_cons (system->self_scm (), score_);
+  systems_ = gh_cons (system->self_scm (), systems_);
   system->pscore_ = this;
 
   scm_gc_unprotect_object (system->self_scm ());
@@ -92,7 +91,7 @@ Paper_score::process (String)
   progress_indication ("\n");
 
   /* Only keep result stencils in lines_, *title_; delete all grobs.  */
-  score_ = SCM_EOL;
+  systems_ = SCM_EOL;
   
   return lines;
 }
index f0633da0c3a8fd4ba3967d95cd0e87b1e4baa30d..0237dbbd3f054110fc52a2e29690822b391622c2 100644 (file)
@@ -424,7 +424,7 @@ System::get_line ()
        /*
          must copy the stencil, for we cannot change the stencil
          cached in G.
-        */
+       */
        SCM my_stencil = stil->smobbed_copy ();
        unsmob_stencil (my_stencil)->translate (o + extra);
        stencils = scm_cons (my_stencil, stencils);
@@ -445,6 +445,8 @@ System::get_line ()
   Interval y (extent (this, Y_AXIS));
   Paper_line *pl = new Paper_line (Offset (x.length (), y.length ()),
                                   stencils);
+
+  scm_gc_unprotect_object (pl->self_scm ());
   return pl->self_scm ();
 }
 
index 62e5ab8df2c07d3d544ff76b8e699fc479453d77..68f6357b588c431999c24d022b6ac4b0f8bc8434 100644 (file)
@@ -33,7 +33,7 @@ Call the argument with all current grobs during interpreting phase.
 
 Syntax
 
-\applyoutput FUNC
+\\applyoutput FUNC
 
 arguments to func are 1. the grob, 2. the originating context,
 3. context where FUNC is called.
index 1fa883a977f846fb7151c8cf67113bd8cb9f2812..5ebdc811beeafd8699fb255416f945740be96753 100644 (file)
        (eg (find-engraver-by-name name ))
        )
 
-    (cons (symbol->string name )
+    (cons (string-append "@code{" (ref-ify (symbol->string name)) "}")
          (engraver-doc-string eg #f)
      )
     ))
       #:text
       (string-append 
        desc
-       "\n\n This context is also known as: \n\n"
-       (human-listify aliases)
+       (if (pair? aliases)
+          (string-append "\n\n This context is also known as: \n\n"
+                         (human-listify aliases))
+          "")
        "\n\nThis context creates the following layout objects: \n\n"
        (human-listify (uniq-list (sort grob-refs string<? )))
        "."
        
        "\n\nThis context is built from the following engravers: "
        (description-list->texi
-             (map document-engraver-by-name consists))
+       (map document-engraver-by-name consists))
        ))))
 
 (define (engraver-grobs grav)
index 1cd2fc684b665f7c7805a465c23abb1a4da4189e..2360da093a76f0da53701728980fab8cf43ba21b 100644 (file)
@@ -503,6 +503,7 @@ L1 is copied, L2 not.
               ) "w"))
        )
 
+    (display "DUMPING...\n")
     (display
      (filter
       (lambda (x) (not (symbol? x))) 
index ae98124e8d197536163ded9bb9d58e400e1d78f3..a52855eae95d543b502626546bb3382d0bdba750 100644 (file)
@@ -4,6 +4,15 @@ INSTALLATION_OUT_DIR=$(vimdir)/syntax
 INSTALLATION_OUT_FILES=$(LILYPOND_WORDS)
 # $(outdir)/lilypond-words $(outdir)/lilypond-words.el
 
+EXTRA_DIST_FILES=$(wildcard *.vim) vimrc
+
+LILYPOND_WORDS = $(outdir)/lilypond-words $(outdir)/lilypond-words.vim
+LILYPOND_WORDS_DEPENDS =\
+  $(topdir)/lily/my-lily-lexer.cc \
+  $(buildscript-dir)/lilypond-words.py \
+  $(topdir)/scm/new-markup.scm \
+  $(topdir)/ly/engraver-init.ly
+
 STEPMAKE_TEMPLATES=install-out
 
 # vimdir defined in config.make
@@ -41,15 +50,6 @@ local-uninstall:
        rm $(vimdir)/syntax/lilypond.vim
        rmdir -p $(vimdir)/syntax
 
-EXTRA_DIST_FILES=filetype.vim vimrc
-
-LILYPOND_WORDS = $(outdir)/lilypond-words $(outdir)/lilypond-words.vim
-LILYPOND_WORDS_DEPENDS =\
-  $(topdir)/lily/my-lily-lexer.cc \
-  $(buildscript-dir)/lilypond-words.py \
-  $(topdir)/scm/new-markup.scm \
-  $(topdir)/ly/engraver-init.ly
-
 $(LILYPOND_WORDS): 
        cd $(topdir) && $(PYTHON) buildscripts/lilypond-words.py --words --vim --dir=$(builddir)/vim/$(outconfbase)