From 42dec791a83d21306b2ad15a03664cdc492397f0 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Thu, 11 Aug 2005 23:28:07 +0000 Subject: [PATCH] (parse_symbol_list): Bugfix. --- ChangeLog | 4 ++++ buildscripts/fixcc.py | 23 +++++++++++++++++++++++ lily/lily-guile.cc | 8 +++++--- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ea6d38502a..f87cd78f6f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-08-12 Jan Nieuwenhuizen + + * lily/lily-guile.cc (parse_symbol_list): Bugfix. + 2005-08-11 Jan Nieuwenhuizen * mf/GNUmakefile (get-*-fonts): Rename from get-*-pfa. Copy SVG diff --git a/buildscripts/fixcc.py b/buildscripts/fixcc.py index 015f5145df..1075a52229 100644 --- a/buildscripts/fixcc.py +++ b/buildscripts/fixcc.py @@ -91,6 +91,9 @@ rules = { ('\n[ \t]*,', ','), # dangling semicolon ('\n[ \t]*;', ';'), + # delete gratuitous blocks + ('''(?ux)\n([ ]|\t\s*){\n\s*(.*?)(?![{}]|\b(do|for|else|if|switch|while)\b);\n\s*}''', + '\n\\2;'), # brace open ('(\w)[ \t]*([^\s]*){([ \t]*\n)', '\\1\\2\n{\n'), # brace open backslash @@ -588,6 +591,26 @@ i (shift) *-d; a = 0 ? *x : *y; + +{ + if (foo) + { + a = 1; + } +} + + if (prev_delta_pitch < - 1) + { + glyph_name = "svaticana.reverse.plica"; + } + if (prev_delta_pitch < - 1) + { + glyph_name = svaticana.reverse.plica; + } + if (prev_delta_pitch < - 1) + { + glyph_name = "2"; + } ''' def test (): diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index cb269924c3..c147945d07 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -370,11 +370,13 @@ ly_string_array_to_scm (Array a) return s; } -/* LST is whitespace separated list of symbols. */ +/* SYMBOLS is a whitespace separated list. */ SCM -parse_symbol_list (char const *lst) +parse_symbol_list (char const *symbols) { - String s = lst; + while (isspace (*symbols)) + *symbols++; + String s = symbols; s.substitute ('\n', ' '); s.substitute ('\t', ' '); return ly_string_array_to_scm (String_convert::split (s, ' ')); -- 2.39.5