From: janneke <janneke>
Date: Thu, 11 Aug 2005 23:28:07 +0000 (+0000)
Subject: (parse_symbol_list): Bugfix.
X-Git-Tag: release/2.6.4~17^2~95
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e4686fb1119bb312d31eb19248859c755cf90728;p=lilypond.git

(parse_symbol_list): Bugfix.
---

diff --git a/ChangeLog b/ChangeLog
index ea6d38502a..f87cd78f6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-08-12  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+	* lily/lily-guile.cc (parse_symbol_list): Bugfix.
+
 2005-08-11  Jan Nieuwenhuizen  <janneke@gnu.org>
 
 	* 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<String> 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, ' '));