From: Jan Nieuwenhuizen Date: Thu, 11 Aug 2005 12:47:26 +0000 (+0000) Subject: * lily/lily-guile.cc (parse_symbol_list): Rewrite. Grok multiple X-Git-Tag: release/2.7.5~23 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6230f26b7c4ff359cef43df880d5f81f4a75869b;p=lilypond.git * lily/lily-guile.cc (parse_symbol_list): Rewrite. Grok multiple whitespace as symbol separator. * lily/side-position-interface.cc: Add slur-padding. --- diff --git a/ChangeLog b/ChangeLog index 27da26c83d..3509fea22f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,13 @@ 2005-08-11 Jan Nieuwenhuizen - * input/regression/slur-script.ly: Fixed. + * lily/lily-guile.cc (parse_symbol_list): Rewrite. Grok multiple + whitespace as symbol separator. + + * lily/side-position-interface.cc: Add slur-padding. + + * input/regression/slur-script.ly: Fixed. Backportme? This is + quite a large fix, and it never worked in a stable release; so not + really a regression. * lily/phrasing-slur-engraver.cc (class Phrasing_slur_engraver): Update cut and paste code from Slur_engraver. diff --git a/Documentation/topdocs/GNUmakefile b/Documentation/topdocs/GNUmakefile index f9b4aa23e6..747f3993ee 100644 --- a/Documentation/topdocs/GNUmakefile +++ b/Documentation/topdocs/GNUmakefile @@ -3,8 +3,8 @@ depth = ../.. STEPMAKE_TEMPLATES=documentation tex texinfo topdocs LOCALSTEPMAKE_TEMPLATES=lilypond ly -HTML_FILES=$(addprefix $(outdir)/, $(TEXI_FILES:.texi=.html) $(TELY_FILES:.tely=.html)) - +HTML_FILES=$(TEXI_FILES:%.texi=$(outdir)/%.html) $(TELY_FILES:%.tely=$(outdir)/%.html) +PDF_FILES=$(outdir)/NEWS.pdf include $(depth)/make/stepmake.make ifneq ($(out),www) diff --git a/Documentation/topdocs/NEWS.tely b/Documentation/topdocs/NEWS.tely index cd34afd026..b0ad6ef3d0 100644 --- a/Documentation/topdocs/NEWS.tely +++ b/Documentation/topdocs/NEWS.tely @@ -30,9 +30,25 @@ See user manual, \NAME\ @end ifnottex @unnumbered New features in 2.7 since 2.6 +@ifhtml +This document is also available in @uref{source/Documentation/topdocs/out-www/NEWS.pdf,PDF}. +@end ifhtml + @itemize @bullet +@item +Text scripts such as fingering instructions and dynamics avoid +collissions with Slurs + +@lilypond[fragment,relative=1] +{ + b_1( b _1_3_5) + c-2_\markup { \italic {"cresc."}}( f c) + c-3( c\f c) +} +@end lilypond + @item Tuplets can be made to reach the next non-tuplet note by setting the @code{tupletFullLength} property, diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 1cb03277f3..23cda4eccd 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -441,10 +441,9 @@ Dynamic_engraver::acknowledge_script (Grob_info info) Side_position_interface::add_support (line_spanner_, info.grob ()); } - -ADD_ACKNOWLEDGER (Dynamic_engraver,script); -ADD_ACKNOWLEDGER (Dynamic_engraver,note_column); -ADD_ACKNOWLEDGER (Dynamic_engraver,slur); +ADD_ACKNOWLEDGER (Dynamic_engraver, script); +ADD_ACKNOWLEDGER (Dynamic_engraver, note_column); +ADD_ACKNOWLEDGER (Dynamic_engraver, slur); ADD_TRANSLATOR (Dynamic_engraver, /* descr */ diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 1f28e78d60..cb269924c3 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -25,6 +25,7 @@ #include "misc.hh" #include "offset.hh" #include "pitch.hh" +#include "string-convert.hh" #include "source-file.hh" #include "version.hh" #include "warn.hh" @@ -352,46 +353,31 @@ ly_assoc_cdr (SCM key, SCM alist) if (scm_is_pair (alist)) { SCM trykey = scm_caar (alist); - if (scm_is_pair (trykey) && to_boolean (scm_equal_p (key, scm_cdr (trykey)))) + if (scm_is_pair (trykey) + && to_boolean (scm_equal_p (key, scm_cdr (trykey)))) return scm_car (alist); - else - return ly_assoc_cdr (key, scm_cdr (alist)); + return ly_assoc_cdr (key, scm_cdr (alist)); } return SCM_BOOL_F; } -/* LST has the form "sym1 sym2 sym3\nsym4\nsym5" - i.e. \n and ' ' can be used interchangeably as separators. */ SCM -parse_symbol_list (char const *lst) +ly_string_array_to_scm (Array a) { - char *s = strdup (lst); - char *orig = s; - SCM create_list = SCM_EOL; - - char *e = s + strlen (s) - 1; - while (e >= s && isspace (*e)) - *e-- = 0; - - for (char *p = s; *p; p++) - if (*p == '\n') - *p = ' '; - - if (!s[0]) - s = 0; + SCM s = SCM_EOL; + for (int i = a.size () - 1; i >= 0; i--) + s = scm_cons (ly_symbol2scm (a[i].to_str0 ()), s); + return s; +} - while (s) - { - char *next = strchr (s, ' '); - if (next) - *next++ = 0; - - create_list = scm_cons (ly_symbol2scm (s), create_list); - s = next; - } - - free (orig); - return create_list; +/* LST is whitespace separated list of symbols. */ +SCM +parse_symbol_list (char const *lst) +{ + String s = lst; + s.substitute ('\n', ' '); + s.substitute ('\t', ' '); + return ly_string_array_to_scm (String_convert::split (s, ' ')); } SCM diff --git a/lily/script-interface.cc b/lily/script-interface.cc index b6a17251ef..f796c58e38 100644 --- a/lily/script-interface.cc +++ b/lily/script-interface.cc @@ -6,9 +6,10 @@ (c) 1999--2005 Han-Wen Nienhuys */ +#include "script-interface.hh" + #include "directional-element-interface.hh" #include "warn.hh" -#include "script-interface.hh" #include "font-interface.hh" #include "side-position-interface.hh" #include "output-def.hh" diff --git a/lily/side-position-interface.cc b/lily/side-position-interface.cc index e6821a3bd9..0801a4f76b 100644 --- a/lily/side-position-interface.cc +++ b/lily/side-position-interface.cc @@ -261,5 +261,12 @@ ADD_INTERFACE (Side_position_interface, "side-position-interface", "victim object relative to the support (left or right, up or down?)\n\n " "The routine also takes the size the staff into account if " "@code{staff-padding} is set. If undefined, the staff symbol is ignored.", - "staff-padding side-support-elements direction-source " - "direction side-relative-direction minimum-space padding"); + "direction " + "direction-source " + "minimum-space " + "padding " + "side-relative-direction " + "side-support-elements " + "slur-padding " + "staff-padding " + ); diff --git a/lily/text-interface.cc b/lily/text-interface.cc index 1c5cee670f..18ec49f874 100644 --- a/lily/text-interface.cc +++ b/lily/text-interface.cc @@ -92,5 +92,5 @@ Text_interface::is_markup (SCM x) ADD_INTERFACE (Text_interface, "text-interface", "A scheme markup text, see @usermanref{Text markup}.", - "text baseline-skip word-space"); + "baseline-skip direction text word-space"); diff --git a/stepmake/stepmake/topdocs-targets.make b/stepmake/stepmake/topdocs-targets.make index 0a858bd45b..32d9a0b920 100644 --- a/stepmake/stepmake/topdocs-targets.make +++ b/stepmake/stepmake/topdocs-targets.make @@ -5,5 +5,5 @@ copy-to-top: $(TO_TOP_FILES) $(foreach i, $(TO_TOP_FILES), \ cp $(i) $(builddir) && ) true -local-WWW: $(HTML_FILES) copy-to-top +local-WWW: $(HTML_FILES) $(PDF_FILES) copy-to-top