]> git.donarmstrong.com Git - lilypond.git/commitdiff
lexer.ll: remove old and buggy TeX cruft
authorDavid Kastrup <dak@gnu.org>
Sun, 1 Jan 2012 16:56:07 +0000 (17:56 +0100)
committerDavid Kastrup <dak@gnu.org>
Sun, 1 Jan 2012 18:14:02 +0000 (19:14 +0100)
lily/lexer.ll

index 1777398f8ab3b2caafbceaad6c6f055960cce823..ce3bf9c5166d721db1e0b5d6d4fb937d8938020d 100644 (file)
@@ -1046,30 +1046,18 @@ is_valid_version (string s)
        
 
 /*
-  substitute _ and \,
+  substitute _
 */
 string
 lyric_fudge (string s)
 {
-  char *chars = string_copy (s);
+       size_t i=0;
 
-  for (char *p = chars; *p ; p++)
-    {
-      if (*p == '_' && (p == chars || *(p-1) != '\\'))
-       *p = ' ';
-    }
-  
-  s = string (chars);
-  delete[] chars;
-
-  ssize i = 0; 
-  if ((i = s.find ("\\,")) != NPOS)   // change "\," to TeX's "\c "
-    {
-      * (((char*)s.c_str ()) + i + 1) = 'c';
-      s = s.substr (0, i + 2) + " " + s.substr (i - 2);
-    }
-
-  return s;
+       while ((i = s.find ('_', i)) != string::npos)
+       {
+               s[i++] = ' ';
+       }
+       return s;
 }
 
 /*