From: Jan Nieuwenhuizen Date: Thu, 8 Apr 2004 10:34:51 +0000 (+0000) Subject: (parse_file): Strip \r from lines. Fixes DOS X-Git-Tag: release/2.3.0~51 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=47a9c0b80ab41b3a7252d5973944384ed6a4a70b;p=lilypond.git (parse_file): Strip \r from lines. Fixes DOS flavour abc files (backportme). --- diff --git a/ChangeLog b/ChangeLog index fc5218d356..4bcb4ef14b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-04-08 Jan Nieuwenhuizen + + * scripts/abc2ly.py (parse_file): Strip \r from lines. Fixes DOS + flavour abc files (backportme). + 2004-04-08 Han-Wen Nienhuys * lily/scaled-font-metric.cc (text_dimension): only multiply with diff --git a/THANKS b/THANKS index ebcd179d2d..ee60553ef3 100644 --- a/THANKS +++ b/THANKS @@ -18,6 +18,7 @@ BUG HUNTERS/SUGGESTIONS David Bobroff Stephen Pollei +Peter Rosenbeck Release 2.2 *********** diff --git a/scripts/abc2ly.py b/scripts/abc2ly.py index df73f40793..534c6a8b7f 100644 --- a/scripts/abc2ly.py +++ b/scripts/abc2ly.py @@ -401,10 +401,10 @@ def lily_key (k): return '%s \\major' % key type = k[0:3] - if key_lookup.has_key(type): - return("%s \\%s" % ( key, key_lookup[type])) - sys.stderr.write("Unknown key type `%s' ignored\n" % type) - return key + if key_lookup.has_key (type): + return ("%s \\%s" % ( key, key_lookup[type])) + sys.stderr.write ("Unknown key type `%s' ignored\n" % type) + return "" def shift_key (note, acc , shift): s = semitone_pitch((note, acc)) @@ -1209,6 +1209,7 @@ happy_count = 100 def parse_file (fn): f = open (fn) ls = f.readlines () + ls = map (lambda x: re.sub ("\r$", '', x), ls) select_voice('default', '') lineno = 0