From 1258ad0e8da82706c7b66449747218ff3b8c9506 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 28 Aug 2003 19:12:44 +0000 Subject: [PATCH] (system): remove errorlog files. --- ChangeLog | 14 ++++++++++++++ Documentation/topdocs/NEWS.texi | 4 +++- Documentation/user/tutorial.itely | 4 ++-- VERSION | 2 +- lily/include/molecule.hh | 11 +---------- lily/molecule-scheme.cc | 10 +++++++--- lily/molecule.cc | 5 ++--- lily/my-lily-lexer.cc | 2 +- lily/parser.yy | 4 ++-- ly/grace-init.ly | 4 ++-- python/lilylib.py | 19 ++++++++++++++----- scm/new-markup.scm | 24 ++++++++++++++++++++++++ scripts/convert-ly.py | 8 ++++++++ 13 files changed, 81 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 73a7f56395..592137546a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-08-28 Han-Wen Nienhuys + + * python/lilylib.py (system): remove errorlog files. + 2003-08-28 Heikki Junes * lilypond.words: add \new and new graces. Add dynamics to menus @@ -6,6 +10,16 @@ 2003-08-28 Han-Wen Nienhuys + * lily/molecule.cc (align_to): idem. + + * lily/molecule-scheme.cc: ly_align_to_x takes continuous dir argument. + + + * ly/grace-init.ly (stopAcciaccaturaMusic): correct misspelling of + accacciatura everywhere. + + * VERSION (PACKAGE_NAME): released 1.9.2 + * GNUmakefile.in (EXTRA_DIST_FILES): dist lilypond.vim too. * scm/document-markup.scm (markup-doc-node): sort markup function diff --git a/Documentation/topdocs/NEWS.texi b/Documentation/topdocs/NEWS.texi index 0afa422dfb..60672b3f0f 100644 --- a/Documentation/topdocs/NEWS.texi +++ b/Documentation/topdocs/NEWS.texi @@ -8,6 +8,8 @@ @chapter New features in 1.9 since 1.8 @itemize +@item +Markup text (ie. general text formatting) may now be used for lyrics too. @item Two new commands for grace notes have been added, @code{\accacciatura} @@ -18,7 +20,7 @@ and @code{\appoggiatura}, \accacciatura g8 f4 @end example -Both reflect the traditional meanings of accacciatura and appogiatura, +Both reflect the traditional meanings of acciaccatura and appogiatura, and both insert insert a slur from the first grace note to the main note. diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index 3208a77635..c7eb233424 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -1199,8 +1199,8 @@ example, When the file is processed by @code{ly2dvi}, the title and composer specified are printed above the music. The `tagline' is a short line -printed at bottom of the last page, which normally says ``Lily was -here, version @dots{}''. In the example above, it is replaced by the +printed at bottom of the last page, which normally says ``Engraved +by LilyPond, version @dots{}''. In the example above, it is replaced by the line ``small is beautiful''. Normally, the @code{\header} is put at the top of the file. However, diff --git a/VERSION b/VERSION index 41e5a00ffe..f62e416fdf 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=9 -PATCH_LEVEL=2 +PATCH_LEVEL=3 MY_PATCH_LEVEL= # Use the above to send patches: MY_PATCH_LEVEL is always empty for a diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh index 7b514e46f5..eedacf62a9 100644 --- a/lily/include/molecule.hh +++ b/lily/include/molecule.hh @@ -62,16 +62,7 @@ public: Real minimum); void add_molecule (Molecule const &m); void translate (Offset); - - /** - align D direction in axis A. - - If D == CENTER, then move the dimension (A).center () to (0,0) - - Else, move so dimension (A)[D] == 0.0 - - */ - void align_to (Axis a, Direction d); + void align_to (Axis a, Real x); void translate_axis (Real,Axis); Interval extent (Axis) const; diff --git a/lily/molecule-scheme.cc b/lily/molecule-scheme.cc index 1bef34afed..b81c4f717d 100644 --- a/lily/molecule-scheme.cc +++ b/lily/molecule-scheme.cc @@ -211,13 +211,17 @@ LY_DEFINE(ly_fontify_atom,"ly:fontify-atom", 2, 0, 0, return fontify_atom (unsmob_metrics (met), f); } LY_DEFINE(ly_align_to_x,"ly:molecule-align-to!", 3, 0, 0, (SCM mol, SCM axis, SCM dir), - "Align @var{mol} using its own extents.") + + "Align @var{mol} using its own extents. @var{dir} is a number -1, 1 are " + " left and right respectively. Other values are interpolated (so 0 means " + " the center. ") { SCM_ASSERT_TYPE(unsmob_molecule (mol), mol, SCM_ARG1, __FUNCTION__, "molecule"); SCM_ASSERT_TYPE(ly_axis_p (axis), axis, SCM_ARG2, __FUNCTION__, "axis"); - SCM_ASSERT_TYPE(ly_dir_p (dir), dir, SCM_ARG3, __FUNCTION__, "dir"); + SCM_ASSERT_TYPE(gh_number_p (dir), dir, SCM_ARG3, __FUNCTION__, "number"); - unsmob_molecule (mol)->align_to ((Axis)gh_scm2int (axis), Direction (gh_scm2int (dir))); + unsmob_molecule (mol)->align_to ((Axis)gh_scm2int (axis), + gh_scm2double (dir)); return SCM_UNDEFINED; } diff --git a/lily/molecule.cc b/lily/molecule.cc index af60d58ab4..e05e643263 100644 --- a/lily/molecule.cc +++ b/lily/molecule.cc @@ -105,14 +105,13 @@ Molecule::set_empty (bool e) void -Molecule::align_to (Axis a, Direction d) +Molecule::align_to (Axis a, Real x) { if (empty_b()) return ; Interval i (extent (a)); - Real r = (d == CENTER) ? i.center () : i[d]; - translate_axis (-r, a); + translate_axis (-i.linear_combination (x), a); } /* diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index b3445a8a84..1e63016cbf 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -26,7 +26,7 @@ static Keyword_ent the_key_tab[]={ - {"accacciatura", ACCACCIATURA}, + {"acciaccatura", ACCIACATURA}, {"accepts", ACCEPTS}, {"addlyrics", ADDLYRICS}, {"alias", ALIAS}, diff --git a/lily/parser.yy b/lily/parser.yy index 5a7119fba2..87cb025130 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -244,7 +244,7 @@ yylex (YYSTYPE *s, void * v) %token FIGURES FIGURE_OPEN FIGURE_CLOSE %token FIGURE_BRACKET_CLOSE FIGURE_BRACKET_OPEN %token GRACE -%token ACCACCIATURA +%token ACCIACATURA %token APPOGGIATURA %token GROBDESCRIPTIONS %token HEADER @@ -905,7 +905,7 @@ Simple_music: grace_head: GRACE { $$ = scm_makfrom0str ("Grace"); } - | ACCACCIATURA { $$ = scm_makfrom0str ("Accacciatura"); } + | ACCIACATURA { $$ = scm_makfrom0str ("Acciaccatura"); } | APPOGGIATURA { $$ = scm_makfrom0str ("Appoggiatura"); } ; diff --git a/ly/grace-init.ly b/ly/grace-init.ly index 3c052b8bfd..d9e433fc13 100644 --- a/ly/grace-init.ly +++ b/ly/grace-init.ly @@ -20,13 +20,13 @@ stopAppoggiaturaMusic = \notes { s1*0) } -startAccacciaturaMusic = \notes { +startAcciaccaturaMusic = \notes { \context Voice \applycontext #set-start-grace-properties s1*0( \property Voice.Stem \override #'stroke-style = #"grace" } -stopAccacciaturaMusic = \notes { +stopAcciaccaturaMusic = \notes { \property Voice.Stem \revert #'stroke-style \context Voice \applycontext #set-stop-grace-properties s1*0) diff --git a/python/lilylib.py b/python/lilylib.py index abb604baf5..e221817bd1 100644 --- a/python/lilylib.py +++ b/python/lilylib.py @@ -260,6 +260,7 @@ def read_pipe (cmd, mode = 'r'): signal = 0x0f & status exit_status = status >> 8 + print 'errorlog', error_log_file if status: error (_ ("`%s\' failed (%d)") % (cmd, exit_status)) @@ -279,7 +280,9 @@ def read_pipe (cmd, mode = 'r'): progress ('\n') if error_log_file: + print 'unlinking errorlog', error_log_file os.unlink (error_log_file) + print 'reachin end', error_log_file return output @@ -293,7 +296,8 @@ RETURN VALUE Exit status of CMD ''' name = command_name (cmd) - + error_log_file = '' + if __main__.verbose_p: progress_p = 1 progress (_ ("Invoking `%s\'") % cmd) @@ -302,10 +306,11 @@ Exit status of CMD ''' redirect = '' if not progress_p: - redirect = ' 1>/dev/null 2>' + error_log (name) + error_log_file = error_log (name) + redirect = ' 1>/dev/null 2>' + error_log_file elif __main__.pseudo_filter_p: redirect = ' 1>/dev/null' - + status = os.system (cmd + redirect) signal = 0x0f & status exit_status = status >> 8 @@ -322,11 +327,15 @@ Exit status of CMD ''' warning (msg + ' ' + _ ("(ignored)")) else: error (msg) - if not progress_p: + if not progress_p and error_log_file: error (_ ("The error log is as follows:")) - sys.stderr.write (open (error_log (name)).read ()) + sys.stderr.write (error_log_file).read () + if error_log_file: + os.unlink (error_log_file) exit (status) + if error_log_file: + os.unlink (error_log_file) progress ('\n') return status diff --git a/scm/new-markup.scm b/scm/new-markup.scm index 9d3b1c000c..e59c4bcc70 100644 --- a/scm/new-markup.scm +++ b/scm/new-markup.scm @@ -170,6 +170,23 @@ for the reader. mols) )) +(define-public (right-align-markup grob props . rest) + (let* ((m (interpret-markup grob props (car rest)))) + (ly:molecule-align-to! m X RIGHT) + m)) + +(define-public (halign-markup grob props . rest) + "Set horizontal alignment. Syntax: haling A MARKUP. A=-1 is LEFT, +A=1 is right, values in between vary alignment accordingly." + (let* ((m (interpret-markup grob props (cadr rest)))) + (ly:molecule-align-to! m X (car rest)) + m)) + +(define-public (left-align-markup grob props . rest) + (let* ((m (interpret-markup grob props (car rest)))) + (ly:molecule-align-to! m X RIGHT) + m)) + (define-public (musicglyph-markup grob props . rest) (ly:find-glyph-by-name (ly:get-font grob (cons '((font-family . music)) props)) @@ -342,6 +359,8 @@ Syntax: \\fraction MARKUP1 MARKUP2." ) (define-public (hbracket-markup grob props . rest) + "Horizontal brackets around its single argument. Syntax \\hbracket MARKUP." + (let* ( (th 0.1) ;; todo: take from GROB. @@ -352,6 +371,7 @@ Syntax: \\fraction MARKUP1 MARKUP2." )) (define-public (bracket-markup grob props . rest) + "Vertical brackets around its single argument. Syntax \\bracket MARKUP." (let* ( (th 0.1) ;; todo: take from GROB. @@ -581,6 +601,10 @@ Syntax: \\fraction MARKUP1 MARKUP2." (cons center-markup (list markup-list?)) (cons line-markup (list markup-list?)) + (cons right-align-markup (list markup?)) + (cons left-align-markup (list markup?)) + (cons halign-markup (list number? markup?)) + (cons combine-markup (list markup? markup?)) (cons simple-markup (list string?)) (cons musicglyph-markup (list scheme?)) diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index f138c70a47..2f14ad226d 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -1440,6 +1440,14 @@ if 1: conversions.append (((1,9,2), conv, """\newcontext -> \new""")) +if 1: + def conv (str): + str = re.sub ('accacciatura', + 'acciaccatura', str) + return str + + conversions.append (((1,9,3), conv, """\acciaccatura misspelling""")) + ################################ # END OF CONVERSIONS ################################ -- 2.39.5