From a0e46e79ea0ab6a7baadd58265aefc51c1faba61 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 8 Aug 2002 19:14:53 +0000 Subject: [PATCH] * lily/beam.cc (struct Int_set): typo. * mf/feta-beugel.mf (code): braces should start at 0, not 1. * lily/beam.cc (struct Int_set): don't get stuck inserting interval segments of length 0.0. * scripts/convert-ly.py: break-align conversion. --- ChangeLog | 4 +++ lily/beam.cc | 2 +- mf/feta-beugel.mf | 4 +-- scripts/convert-ly.py | 57 ++++++++++++++++++++++--------------------- 4 files changed, 35 insertions(+), 32 deletions(-) diff --git a/ChangeLog b/ChangeLog index acc6853502..2034382be9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2002-08-08 Han-Wen Nienhuys + * lily/beam.cc (struct Int_set): typo. + + * mf/feta-beugel.mf (code): braces should start at 0, not 1. + * lily/include/lily-guile.hh (scm_int2num): guile 1.4 compatibility. * scm/grob-description.scm (all-grob-descriptions): set diff --git a/lily/beam.cc b/lily/beam.cc index b4a98a36a7..d3e2d0b525 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -599,7 +599,7 @@ struct Int_set before[RIGHT] = s[LEFT]; after[LEFT] = s[RIGHT]; - if (before.empty_b() && before.length () > 0.0) + if (!before.empty_b() && before.length () > 0.0) { allowed_regions_.insert (before, i); i++; diff --git a/mf/feta-beugel.mf b/mf/feta-beugel.mf index 419f3b59ed..8f779e1c68 100644 --- a/mf/feta-beugel.mf +++ b/mf/feta-beugel.mf @@ -8,7 +8,7 @@ mode_setup; staffsize#:=16pt#; save code; -code := 0; +code := -1; def abc_encode_int (expr i) = @@ -19,8 +19,6 @@ def abc_encode_int (expr i) = fi enddef ; -message (abc_encode_int (26)); - def draw_brace (expr height_sharp, width_sharp, slt_sharp) = save pendir, height, width, thin, thick, slt; diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index bcdd1f261c..2e7f64fb1a 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -840,6 +840,35 @@ if 1: conversions.append (((1,5,38), conv, 'SystemStartDelimiter -> systemStartDelimiter')) + +if 1: + def conv (str): + + def func(match): + break_dict = { + "Instrument_name": "instrument-name", + "Left_edge_item": "left-edge", + "Span_bar": "span-bar", + "Breathing_sign": "breathing-sign", + "Staff_bar": "staff-bar", + "Clef_item": "clef", + "Key_item": "key-signature", + "Time_signature": "time-signature", + "Custos": "custos" + } + props = match.group (1) + for (k,v) in break_dict.items(): + props = re.sub (k, v, props) + return "breakAlignOrder = #'(%s)" % props + + str = re.sub ("breakAlignOrder *= *#'\\(([a-z_\n\tA-Z ]+)\\)", + func, str) + return str + + # 40 ? + conversions.append (((1,5,40), conv, 'breakAlignOrder property names')) + + if 1: def conv (str): str = re.sub ('noAutoBeaming *= *##f', 'autoBeaming = ##t', str) @@ -913,34 +942,6 @@ if 1: conversions.append (((1,5,68), conv, 'ly-set-X-property -> ly-set-X-property!')) -if 1: - def conv (str): - - def func(match): - break_dict = { - "Instrument_name": "instrument-name", - "Left_edge_item": "left-edge", - "Span_bar": "span-bar", - "Breathing_sign": "breathing-sign", - "Staff_bar": "staff-bar", - "Clef_item": "clef", - "Key_item": "key-signature", - "Time_signature": "time-signature", - "Custos": "custos" - } - props = match.group (1) - for (k,v) in break_dict.items(): - props = re.sub (k, v, props) - return "breakAlignOrder = #'(%s)" % props - - str = re.sub ("breakAlignOrder *= *#'\\(([a-z_\n\tA-Z ]+)\\)", - func, str) - return str - - # 40 ? - conversions.append (((1,5,40), conv, 'breakAlignOrder property names')) - - ################################ # END OF CONVERSIONS ################################ -- 2.39.5