From bb36bac02a64770871780231ecc709cb18b20932 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 14 Jan 2000 00:22:04 +0100 Subject: [PATCH] release: 1.3.19 ========== * lilypond-mode.el for emacs supersedes mudela-mode.el * Tuplet spanners don't collide with encompassing notes. * Gobbled Adobe parseAFM* code, for future use. * Big 1999 to 2000 search/replace. * Big interline to staff_space search/replace for mf files. * Removed Bow class, and split code into Tie and Slur * Don't put scripts on grace notes. * Font_metric uses SCM for name field. * Various compilation fixes. 1.3.17.j --- CHANGES | 29 +- Documentation/faq.texi | 6 +- Documentation/programmer/regression-test.tely | 3 + Documentation/user/properties.itely | 2 +- TODO | 19 +- VERSION | 4 +- flower/axis.cc | 2 +- flower/cpu-timer.cc | 2 +- flower/dstream.cc | 2 +- flower/getopt-long.cc | 3 +- flower/include/arithmetic-operator.hh | 2 +- flower/include/axes.hh | 2 +- flower/include/cpu-timer.hh | 2 +- flower/include/data-file.hh | 2 +- flower/include/dictionary-iter.hh | 2 +- flower/include/dictionary.hh | 2 +- flower/include/direction.hh | 2 +- flower/include/drul-array.hh | 2 +- flower/include/dstream.hh | 2 +- flower/include/file-path.hh | 2 +- flower/include/flower-debug.hh | 2 +- flower/include/{fproto.hh => flower-proto.hh} | 29 +- flower/include/international.hh | 2 +- flower/include/interval.hh | 4 +- flower/include/interval.tcc | 2 +- flower/include/libc-extension.hh | 4 +- flower/include/offset.hh | 1 + flower/include/parray.hh | 2 +- flower/include/parse-afm.hh | 327 +++++ flower/include/pointer.hh | 2 +- flower/include/pointer.tcc | 2 +- flower/include/pqueue.hh | 2 +- flower/include/rational.hh | 4 +- flower/include/real.hh | 2 +- flower/include/scalar.hh | 2 +- flower/include/string-convert.hh | 2 +- flower/include/string-data.hh | 2 +- flower/include/string-data.icc | 2 +- flower/include/string-handle.hh | 5 +- flower/include/string-handle.icc | 2 +- flower/include/string.hh | 9 +- flower/include/string.icc | 2 +- flower/include/virtual-methods.hh | 6 +- flower/international.cc | 2 +- flower/interval.cc | 2 +- flower/libc-extension.cc | 2 +- flower/offset.cc | 19 +- flower/parse-afm.cc | 1294 +++++++++++++++++ flower/polynomial.cc | 2 +- flower/rational.cc | 2 +- flower/scalar.cc | 2 +- flower/string-convert.cc | 2 +- flower/string.cc | 2 +- flower/stringutil.cc | 2 +- input/test/grace.ly | 2 +- input/test/no-span.ly | 41 - input/test/tuplet-2.fly | 3 + lib/binary-source-file.cc | 2 +- lib/include/file-storage.hh | 2 +- lib/include/input.hh | 2 +- lib/include/mapped-file-storage.hh | 2 +- lib/include/proto.hh | 2 +- lib/include/simple-file-storage.hh | 2 +- lib/include/string-storage.hh | 2 +- lib/include/warn.hh | 2 +- lib/input.cc | 2 +- lib/mapped-file-storage.cc | 2 +- lib/simple-file-storage.cc | 2 +- lib/source-file.cc | 2 +- lib/source.cc | 2 +- lily/afm-reader.cc | 2 +- lily/afm.cc | 2 +- lily/align-element.cc | 2 +- lily/align-note-column-engraver.cc | 4 +- lily/all-font-metrics.cc | 13 +- lily/atom.cc | 2 +- lily/audio-column.cc | 2 +- lily/audio-element.cc | 2 +- lily/audio-item-info.cc | 2 +- lily/audio-item.cc | 2 +- lily/audio-staff.cc | 2 +- lily/auto-beam-engraver.cc | 1 - lily/axis-group-element.cc | 2 +- lily/axis-group-engraver.cc | 3 +- lily/bar-engraver.cc | 14 +- lily/bar-number-engraver.cc | 7 +- lily/bar.cc | 9 +- lily/base-span-bar-engraver.cc | 17 +- lily/beam-engraver.cc | 9 +- lily/beam.cc | 17 +- lily/bezier-bow.cc | 15 +- lily/bezier.cc | 2 +- lily/bow.cc | 169 --- lily/boxes.cc | 2 +- lily/break-algorithm.cc | 2 +- lily/break-align-engraver.cc | 7 +- lily/break-align-item.cc | 2 +- lily/breathing-sign-engraver.cc | 4 +- lily/change-iterator.cc | 2 +- lily/change-translator.cc | 2 +- lily/chord-name-engraver.cc | 2 +- lily/chord-name.cc | 4 +- lily/chord-tremolo-engraver.cc | 2 +- lily/clef-engraver.cc | 9 +- lily/clef-item.cc | 2 +- lily/collision-engraver.cc | 8 +- lily/collision.cc | 2 +- lily/column-x-positions.cc | 2 +- lily/command-request.cc | 2 +- lily/crescendo.cc | 6 +- lily/debug.cc | 4 - lily/dimension-cache.cc | 2 +- lily/direction.cc | 2 +- lily/dot-column-engraver.cc | 7 +- lily/dot-column.cc | 4 +- lily/dots.cc | 2 +- lily/duration.cc | 2 +- lily/dynamic-engraver.cc | 9 +- lily/engraver-group-engraver.cc | 5 +- lily/engraver.cc | 2 +- lily/font-metric.cc | 24 +- lily/global-translator.cc | 2 +- lily/gourlay-breaking.cc | 2 +- lily/grace-engraver-group.cc | 6 +- lily/grace-performer-group.cc | 2 +- lily/grace-position-engraver.cc | 3 +- lily/hara-kiri-engraver.cc | 4 +- lily/hara-kiri-line-group-engraver.cc | 1 + lily/idealspacing.cc | 2 +- lily/identifier.cc | 7 +- lily/includable-lexer.cc | 2 +- lily/include/afm.hh | 2 +- lily/include/afm2.hh | 43 + lily/include/align-element.hh | 2 +- lily/include/all-font-metrics.hh | 5 +- lily/include/atom.hh | 2 +- lily/include/audio-column.hh | 2 +- lily/include/audio-element.hh | 3 +- lily/include/audio-item.hh | 3 +- lily/include/audio-staff.hh | 2 +- lily/include/axis-align-spanner.hh | 2 +- lily/include/axis-group-element.hh | 2 +- lily/include/axis-group-item.hh | 2 +- lily/include/axis-group-spanner.hh | 2 +- lily/include/bar-engraver.hh | 2 +- lily/include/bar-number-engraver.hh | 2 +- lily/include/bar.hh | 3 +- lily/include/base-span-bar-engraver.hh | 4 +- lily/include/beam-engraver.hh | 2 +- lily/include/beam.hh | 2 +- lily/include/bezier.hh | 2 +- lily/include/bow.hh | 16 +- lily/include/box.hh | 2 +- lily/include/break-algorithm.hh | 2 +- lily/include/break-align-item.hh | 2 +- lily/include/change-iterator.hh | 2 +- lily/include/change-translator.hh | 2 +- lily/include/chord-name-engraver.hh | 2 +- lily/include/chord-tremolo-engraver.hh | 2 +- lily/include/clef-item.hh | 2 +- lily/include/collision-engraver.hh | 2 +- lily/include/collision.hh | 2 +- lily/include/column-x-positions.hh | 2 +- lily/include/command-request.hh | 2 +- lily/include/crescendo.hh | 2 +- lily/include/dimension-cache.hh | 2 +- lily/include/dot-column-engraver.hh | 2 +- lily/include/dot-column.hh | 2 +- lily/include/dots.hh | 2 +- lily/include/duration.hh | 4 +- lily/include/engraver-group-engraver.hh | 2 +- lily/include/engraver.hh | 2 +- lily/include/file-results.hh | 4 +- lily/include/font-metric.hh | 6 +- lily/include/font-size-engraver.hh | 2 +- lily/include/global-translator.hh | 2 +- lily/include/gourlay-breaking.hh | 2 +- lily/include/header.hh | 2 +- lily/include/idealspacing.hh | 2 +- lily/include/identifier.hh | 9 +- lily/include/includable-lexer.hh | 4 +- lily/include/item.hh | 3 +- lily/include/key-engraver.hh | 2 +- lily/include/key-item.hh | 2 +- lily/include/key-performer.hh | 2 +- lily/include/key.hh | 2 +- lily/include/keyword.hh | 2 +- lily/include/least-squares.hh | 19 + lily/include/leastsquares.hh | 24 +- lily/include/lily-guile.hh | 13 +- lily/include/lily-guile.icc | 5 +- lily/include/lily-proto.hh | 14 +- lily/include/line-group-group-engraver.hh | 2 +- lily/include/line-of-score.hh | 2 +- lily/include/local-key-engraver.hh | 2 +- lily/include/local-key-item.hh | 2 +- lily/include/lookup.hh | 4 +- lily/include/lyric-engraver.hh | 2 +- lily/include/lyric-performer.hh | 2 +- lily/include/main.hh | 2 +- lily/include/mark-engraver.hh | 2 +- lily/include/midi-def.hh | 2 +- lily/include/midi-item.hh | 2 +- lily/include/midi-stream.hh | 2 +- lily/include/midi-walker.hh | 2 +- lily/include/minterval.hh | 2 +- lily/include/molecule.hh | 2 +- lily/include/mudela-version.hh | 2 +- lily/include/multi-measure-rest-engraver.hh | 2 +- lily/include/multi-measure-rest.hh | 2 +- lily/include/music-iterator.hh | 2 +- lily/include/music-list.hh | 2 +- lily/include/music-output-def.hh | 2 +- lily/include/music-output.hh | 2 +- lily/include/music-wrapper-iterator.hh | 2 +- lily/include/music-wrapper.hh | 2 +- lily/include/music.hh | 2 +- lily/include/musical-pitch.hh | 4 +- lily/include/musical-request.hh | 2 +- lily/include/my-lily-lexer.hh | 7 +- lily/include/my-lily-parser.hh | 2 +- lily/include/note-column.hh | 2 +- lily/include/note-head.hh | 2 +- lily/include/note-heads-engraver.hh | 2 +- lily/include/note-performer.hh | 2 +- lily/include/notename-table.hh | 2 +- lily/include/paper-column.hh | 2 +- lily/include/paper-def.hh | 2 +- lily/include/paper-outputter.hh | 2 +- lily/include/paper-score.hh | 2 +- lily/include/performance.hh | 2 +- lily/include/performer-group-performer.hh | 2 +- lily/include/performer.hh | 2 +- lily/include/pitch-squash-engraver.hh | 2 +- lily/include/priority-halign-engraver.hh | 2 +- lily/include/property-iterator.hh | 2 +- lily/include/protected-scm.hh | 2 +- lily/include/relative-music.hh | 2 +- lily/include/repeat-engraver.hh | 2 +- lily/include/request-chord-iterator.hh | 2 +- lily/include/request-chord.hh | 2 +- lily/include/request.hh | 2 +- lily/include/rest-collision-engraver.hh | 2 +- lily/include/rest-collision.hh | 2 +- lily/include/rest-engraver.hh | 2 +- lily/include/rest.hh | 2 +- lily/include/rhythmic-column-engraver.hh | 2 +- lily/include/rhythmic-head.hh | 2 +- lily/include/rod.hh | 2 +- lily/include/scope.hh | 2 +- lily/include/score-element-info.hh | 2 +- lily/include/score-engraver.hh | 2 +- lily/include/score-performer.hh | 2 +- lily/include/score-priority-engraver.hh | 2 +- lily/include/score.hh | 2 +- lily/include/script-engraver.hh | 2 +- lily/include/separating-group-spanner.hh | 2 +- .../include/separating-line-group-engraver.hh | 2 +- lily/include/sequential-music-iterator.hh | 2 +- lily/include/simultaneous-music-iterator.hh | 2 +- lily/include/single-malt-grouping-item.hh | 2 +- lily/include/slur-engraver.hh | 2 +- lily/include/slur.hh | 11 +- lily/include/span-bar.hh | 2 +- lily/include/span-score-bar-engraver.hh | 3 +- lily/include/spanner.hh | 2 +- lily/include/staff-info.hh | 2 +- lily/include/staff-margin-engraver.hh | 2 +- lily/include/staff-performer.hh | 2 +- lily/include/staff-symbol-referencer.hh | 2 +- lily/include/staff-symbol.hh | 2 +- lily/include/stem-engraver.hh | 2 +- lily/include/stem-info.hh | 2 +- lily/include/stem-tremolo.hh | 2 +- lily/include/stem.hh | 2 +- lily/include/super-element.hh | 2 +- lily/include/swallow-engraver.hh | 2 +- lily/include/swallow-perf.hh | 2 +- lily/include/tempo-performer.hh | 2 +- lily/include/text-item.hh | 2 +- lily/include/tie-engraver.hh | 2 +- lily/include/tie.hh | 14 +- lily/include/time-scaled-music-iterator.hh | 2 +- lily/include/time-scaled-music.hh | 2 +- lily/include/time-signature-engraver.hh | 2 +- lily/include/time-signature-performer.hh | 2 +- lily/include/time-signature.hh | 2 +- lily/include/timing-engraver.hh | 2 +- lily/include/timing-translator.hh | 2 +- lily/include/translation-property.hh | 2 +- lily/include/translator-change.hh | 2 +- lily/include/translator-group.hh | 2 +- lily/include/translator.hh | 3 +- lily/include/transposed-music.hh | 2 +- lily/include/tuplet-engraver.hh | 2 +- lily/include/tuplet-spanner.hh | 4 +- lily/include/type-swallow-translator.hh | 2 +- lily/include/vertical-align-engraver.hh | 2 +- lily/include/volta-spanner.hh | 2 +- lily/item.cc | 7 +- lily/key-engraver.cc | 7 +- lily/key-item.cc | 2 +- lily/key-performer.cc | 5 +- lily/key.cc | 2 +- lily/least-squares.cc | 43 + lily/leastsquares.cc | 42 - lily/lexer.ll | 17 +- lily/lily-guile.cc | 29 +- lily/line-group-group-engraver.cc | 9 +- lily/line-of-score.cc | 2 +- lily/local-key-engraver.cc | 8 +- lily/local-key-item.cc | 2 +- lily/lookup.cc | 10 +- lily/lyric-engraver.cc | 3 +- lily/lyric-performer.cc | 2 +- lily/main.cc | 6 +- lily/mark-engraver.cc | 4 +- lily/melisma-engraver.cc | 2 +- lily/midi-def.cc | 2 +- lily/midi-item.cc | 2 +- lily/midi-stream.cc | 2 +- lily/midi-walker.cc | 2 +- lily/misc.cc | 2 +- lily/molecule.cc | 2 +- lily/mudela-version.cc | 2 +- lily/multi-measure-rest-engraver.cc | 3 +- lily/multi-measure-rest.cc | 4 +- lily/music-iterator.cc | 3 +- lily/music-list.cc | 2 +- lily/music-output-def.cc | 2 +- lily/music-sequence.cc | 2 +- lily/music-wrapper-iterator.cc | 2 +- lily/music-wrapper.cc | 2 +- lily/music.cc | 4 +- lily/musical-pitch.cc | 10 +- lily/musical-request.cc | 2 +- lily/my-lily-lexer.cc | 17 +- lily/my-lily-parser.cc | 53 +- lily/note-column.cc | 2 +- lily/note-head.cc | 2 +- lily/note-heads-engraver.cc | 9 +- lily/note-name-engraver.cc | 4 +- lily/note-performer.cc | 3 +- lily/notename-table.cc | 2 +- lily/paper-column.cc | 2 +- lily/paper-def.cc | 2 +- lily/paper-outputter.cc | 4 +- lily/paper-score.cc | 2 +- lily/paper-stream.cc | 2 +- lily/parser.yy | 38 +- lily/performance.cc | 2 +- lily/performer-group-performer.cc | 7 +- lily/performer.cc | 2 +- lily/pitch-squash-engraver.cc | 8 +- lily/property-engraver.cc | 4 +- lily/property-iterator.cc | 2 +- lily/protected-scm.cc | 2 +- lily/relative-octave-music.cc | 2 +- lily/repeat-engraver.cc | 2 +- lily/request-chord-iterator.cc | 2 +- lily/request.cc | 2 +- lily/rest-collision-engraver.cc | 8 +- lily/rest-collision.cc | 2 +- lily/rest-engraver.cc | 9 +- lily/rest.cc | 4 +- lily/rhythmic-column-engraver.cc | 6 +- lily/rhythmic-head.cc | 2 +- lily/rod.cc | 2 +- lily/scope.cc | 2 +- lily/score-element-info.cc | 2 +- lily/score-element.cc | 4 +- lily/score-engraver.cc | 9 +- lily/score-performer.cc | 4 +- lily/score.cc | 2 +- lily/scores.cc | 2 +- lily/script-column-engraver.cc | 3 +- lily/script-engraver.cc | 16 +- lily/separating-group-spanner.cc | 2 +- lily/separating-line-group-engraver.cc | 8 +- lily/sequential-music-iterator.cc | 2 +- lily/side-position-interface.cc | 2 +- lily/simultaneous-music-iterator.cc | 2 +- lily/single-malt-grouping-item.cc | 2 +- lily/slur-engraver.cc | 6 +- lily/slur.cc | 132 +- lily/spacing-engraver.cc | 4 +- lily/span-bar-engraver.cc | 12 +- lily/span-bar.cc | 27 +- lily/span-score-bar-engraver.cc | 41 +- lily/spanner.cc | 2 +- lily/staff-info.cc | 2 +- lily/staff-margin-engraver.cc | 2 +- lily/staff-performer.cc | 3 +- lily/staff-symbol-engraver.cc | 6 +- lily/staff-symbol-referencer.cc | 4 +- lily/staff-symbol.cc | 2 +- lily/stem-engraver.cc | 7 +- lily/stem-tremolo.cc | 2 +- lily/stem.cc | 10 +- lily/super-element.cc | 2 +- lily/swallow-engraver.cc | 8 +- lily/swallow-perf.cc | 6 +- lily/template5.cc | 2 +- lily/tempo-performer.cc | 2 +- lily/text-engraver.cc | 7 +- lily/text-item.cc | 2 +- lily/tfm.cc | 10 +- lily/tie-engraver.cc | 9 +- lily/tie-performer.cc | 1 + lily/tie.cc | 142 +- lily/time-scaled-music-iterator.cc | 2 +- lily/time-scaled-music.cc | 2 +- lily/time-signature-engraver.cc | 7 +- lily/time-signature-performer.cc | 2 +- lily/time-signature.cc | 2 +- lily/timing-engraver.cc | 9 +- lily/timing-translator.cc | 7 +- lily/translation-property.cc | 2 +- lily/translator-ctors.cc | 2 +- lily/translator-group.cc | 2 +- lily/translator.cc | 4 +- lily/transposed-music.cc | 2 +- lily/tuplet-engraver.cc | 7 +- lily/tuplet-spanner.cc | 58 +- lily/type-swallow-translator.cc | 7 +- lily/vertical-align-engraver.cc | 8 +- lily/volta-spanner.cc | 2 +- lily/warn.cc | 2 +- lilypond-mode.el | 380 +++++ ly/engraver.ly | 3 +- make/out/lilypond.lsm | 8 +- make/out/lilypond.spec | 4 +- make/toplevel.make.in | 2 +- mf/feta-accordion.mf | 32 +- mf/feta-banier.mf | 72 +- mf/feta-beugel.mf | 4 +- mf/feta-bolletjes.mf | 12 +- mf/feta-eindelijk.mf | 124 +- mf/feta-haak.mf | 6 +- mf/feta-klef.mf | 20 +- mf/feta-macros.mf | 2 +- mf/feta-params.mf | 8 +- mf/feta-puntje.mf | 6 +- mf/feta-schrift.mf | 54 +- mf/feta-slag.mf | 8 +- mf/feta-sleur.mf | 6 +- mf/feta-timesig.mf | 58 +- mf/feta-toevallig.mf | 56 +- midi2ly/duration-convert.cc | 2 +- midi2ly/duration-iter.cc | 2 +- midi2ly/duration.cc | 2 +- midi2ly/include/duration-convert.hh | 2 +- midi2ly/include/duration-iter.hh | 2 +- midi2ly/include/duration.hh | 4 +- midi2ly/include/plet.hh | 2 +- midi2ly/main.cc | 2 +- midi2ly/plet.cc | 2 +- mudela-mode.el | 198 --- mutopia/J.S.Bach/pa.ly | 20 +- po/fr.po | 2 +- po/nl.po | 2 +- scm/generic-property.scm | 15 +- scm/lily.scm | 36 +- 463 files changed, 3528 insertions(+), 1616 deletions(-) rename flower/include/{fproto.hh => flower-proto.hh} (67%) create mode 100644 flower/include/parse-afm.hh create mode 100644 flower/parse-afm.cc delete mode 100644 input/test/no-span.ly create mode 100644 input/test/tuplet-2.fly delete mode 100644 lily/bow.cc create mode 100644 lily/include/afm2.hh create mode 100644 lily/include/least-squares.hh create mode 100644 lily/least-squares.cc delete mode 100644 lily/leastsquares.cc create mode 100644 lilypond-mode.el delete mode 100644 mudela-mode.el diff --git a/CHANGES b/CHANGES index 87eedc5cd2..00fac87e23 100644 --- a/CHANGES +++ b/CHANGES @@ -1,20 +1,23 @@ -1.3.18.jcn3 -=========== +1.3.18.uu2 +========== -* Moved decision for stacking staff spanners {[ from item-creation phase -to post_processing (only then we know dimensions/visibility of items) +* lilypond-mode.el for emacs supersedes mudela-mode.el -* Separted bar-break-glyph-alist, see input/test/no-span.ly +* Tuplet spanners don't collide with encompassing notes. -1.3.18.jcn2 -=========== +* Gobbled Adobe parseAFM* code, for future use. -* try at getting glyph property from mudela +* Big 1999 to 2000 search/replace. -1.3.18.jcn1 -=========== +* Big interline to staff_space search/replace for mf files. + +* Removed Bow class, and split code into Tie and Slur + +* Don't put scripts on grace notes. + +* Font_metric uses SCM for name field. -* gcc-2.95 compile fixes +* Various compilation fixes. 1.3.17.jcn2 =========== @@ -100,8 +103,8 @@ with different dot count. See input/test/collision-merge-dotted.fly 1.3.16.jcn1 =========== - * Fixed cross staff slurs. It seems that cross-staff sign - was swapped. +* Fixed cross staff slurs. It seems that cross-staff sign + was swapped. 1.3.15.hwn1 =========== diff --git a/Documentation/faq.texi b/Documentation/faq.texi index a400368adb..a06e8c0665 100644 --- a/Documentation/faq.texi +++ b/Documentation/faq.texi @@ -106,9 +106,9 @@ in subdirectories under @file{~/usr/src/}. @subsubsection Is there an emacs mode? -Yes. It is included with the source archive as mudela-mode.el. If -you have an rpm it is in @file{/usr/doc/lilypond-X/}. You have to install it -yourself. +Yes. It is included with the source archive as @file{lilypond-mode.el}. +If you have an RPM it is in @file{/usr/doc/lilypond-X/}. You have to +install it yourself. @subsubsection How do I create the @file{.tfm} files? diff --git a/Documentation/programmer/regression-test.tely b/Documentation/programmer/regression-test.tely index b84760bfec..dee4b30c7e 100644 --- a/Documentation/programmer/regression-test.tely +++ b/Documentation/programmer/regression-test.tely @@ -112,6 +112,9 @@ can have accidentals, but they are (currently) spaced at a fixed distance. Grace notes (of course) come before the accidentals of the main note. Grace notes can also be positioned after the main note. +Grace notes without beams should have a slash, if @code{flagStyle} is +not set. Main note scripts don't end up on the grace note. + @mudelafile{grace.ly} diff --git a/Documentation/user/properties.itely b/Documentation/user/properties.itely index bafaf66fbb..e4f98b1284 100644 --- a/Documentation/user/properties.itely +++ b/Documentation/user/properties.itely @@ -214,7 +214,7 @@ Then you can set the force property to a suitable value before each note that really needs it (unisons and seconds), and reset it to 0.0 after the note. - @item @code{horizontalNoteShift}@indexcode{horizontalNoteShift} @property{integer} + @item @code{horizontalNoteShift}@indexcode{horizontalNoteShift} @propertytype{integer} Enable LilyPond to shift notes horizontally if they collide with other notes. This is useful when typesetting many voices on one staff. The identifier @code{\shift}@keyindex{shift} is defined to diff --git a/TODO b/TODO index fba7831c56..60e085be67 100644 --- a/TODO +++ b/TODO @@ -10,19 +10,26 @@ Grep -i for TODO, FIXME and ugh/ugr/urg. .* TODO . * use hash tabs iso. alist_ for elt property? -. * tremolos. +. * fix tremolos. . * internationalize GUILE msgs. +. * with lily 1.3.17, i'm seeing tuplet markings slice mercilessly through +whatever stands in their way. for an example, see +http://www4.smart.net/~jcovey/tmp/smith/closing.ps.gz +on page 2, end of the second system. is there any way around this? . * unbroken marks. -. * put property test files in refman. -. * fix slurdotted +. * put property test files in refman. +. * use gnome-print ParseAFM +. * fix slurdotted! . * alignment within @itemize -. * slur dashing. +. * interstaff stems . * junk dstream output. . * agressive type-checking for SCM stuff. +. * \prop slurdir in grace notes . * script columns . * Must stop before this music ends: verse=\lyrics { . * input/bugs/clef.sly: clef changes go missing +. * clean up font metric handling. . * input/test/grace.sly: wierd big spacing on grace notes . * TODO^2: . * make a TODO.texi, like http://www.gnu.org/software/guile/ideas.html @@ -31,8 +38,6 @@ verse=\lyrics { . * context in embedded SCM errors. . * acc at tied note after linebreak. . * fix font-naming and selecting -. * barcheck warning doesn't resync anymore -. * provide settable/invisible span-score-bar bracket . * add context information to warnings Paper: waarschuwing: Kan niet beide uiteinden van bindingsboog vinden @@ -40,7 +45,6 @@ MIDI: pa.ly:33:23: waarschuwing: Schroot verzoek: `Span_req': g' a4 bes8 \grace f8( )es16 d es8 r c | -. * sparse ties. . * chord tonic: placement of accidental C#, Cb (from scm and C++) . * note head on stem err msg in dutch. . * why need to run -C mf twice? @@ -55,7 +59,6 @@ John . * hara kiri _8 clef. . * junk -M ? . * mudela-book doco -. * fix or replace feta-accordion.mf . * bracket pdf hack . * Mondrup: - if I change the property minVerticalAlign in a multi staff score with diff --git a/VERSION b/VERSION index 6ffd469316..da9c5c44cb 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=18 -MY_PATCH_LEVEL=jcn3 +PATCH_LEVEL=19 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/flower/axis.cc b/flower/axis.cc index b4446bed5f..ed55fddc49 100644 --- a/flower/axis.cc +++ b/flower/axis.cc @@ -3,7 +3,7 @@ - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include diff --git a/flower/cpu-timer.cc b/flower/cpu-timer.cc index 6a0a4236bf..b61ea77ff1 100644 --- a/flower/cpu-timer.cc +++ b/flower/cpu-timer.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "cpu-timer.hh" diff --git a/flower/dstream.cc b/flower/dstream.cc index e51f97a39e..72b3d248db 100644 --- a/flower/dstream.cc +++ b/flower/dstream.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys */ #include diff --git a/flower/getopt-long.cc b/flower/getopt-long.cc index 2a594526b8..f78e18a8c7 100644 --- a/flower/getopt-long.cc +++ b/flower/getopt-long.cc @@ -4,15 +4,16 @@ this is (Copyleft) 1996, Han-Wen Nienhuys, */ +#include #include #include #include -#include #include "config.h" #include "getopt-long.hh" #include "international.hh" #include "string-convert.hh" + #if !HAVE_GETTEXT inline char* gettext (char const* s) diff --git a/flower/include/arithmetic-operator.hh b/flower/include/arithmetic-operator.hh index 74841f8b15..499f57a65f 100644 --- a/flower/include/arithmetic-operator.hh +++ b/flower/include/arithmetic-operator.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/axes.hh b/flower/include/axes.hh index b67eb47766..a1f290f8a9 100644 --- a/flower/include/axes.hh +++ b/flower/include/axes.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/cpu-timer.hh b/flower/include/cpu-timer.hh index 2418d70efd..19ad182947 100644 --- a/flower/include/cpu-timer.hh +++ b/flower/include/cpu-timer.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/data-file.hh b/flower/include/data-file.hh index 9fde76b305..9ca3a0cbfb 100644 --- a/flower/include/data-file.hh +++ b/flower/include/data-file.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/dictionary-iter.hh b/flower/include/dictionary-iter.hh index 966211bdaa..eaf0317464 100644 --- a/flower/include/dictionary-iter.hh +++ b/flower/include/dictionary-iter.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/dictionary.hh b/flower/include/dictionary.hh index e29b483a4c..3cb1069b39 100644 --- a/flower/include/dictionary.hh +++ b/flower/include/dictionary.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/direction.hh b/flower/include/direction.hh index 5cce076c0f..2e18ff2a49 100644 --- a/flower/include/direction.hh +++ b/flower/include/direction.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/drul-array.hh b/flower/include/drul-array.hh index 467cf9f40c..75f9861195 100644 --- a/flower/include/drul-array.hh +++ b/flower/include/drul-array.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/dstream.hh b/flower/include/dstream.hh index c207e21e38..22a31ea798 100644 --- a/flower/include/dstream.hh +++ b/flower/include/dstream.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef DSTREAM_HH diff --git a/flower/include/file-path.hh b/flower/include/file-path.hh index bdfa5e3870..15c295ba4b 100644 --- a/flower/include/file-path.hh +++ b/flower/include/file-path.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef PATH_HH diff --git a/flower/include/flower-debug.hh b/flower/include/flower-debug.hh index fe565c3d6d..26bff024b2 100644 --- a/flower/include/flower-debug.hh +++ b/flower/include/flower-debug.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/fproto.hh b/flower/include/flower-proto.hh similarity index 67% rename from flower/include/fproto.hh rename to flower/include/flower-proto.hh index 9983eef245..a900c33dc9 100644 --- a/flower/include/fproto.hh +++ b/flower/include/flower-proto.hh @@ -1,3 +1,4 @@ + /* fproto.hh -- typenames in flowerlib @@ -12,52 +13,30 @@ char const * flower_version_sz(); template struct Link_array; template struct Array; -template struct sstack; template struct Assoc; template struct Hash_table; template struct Hash_table_iter; template struct Dictionary_iter; template struct Dictionary; template struct Dictionary_iter; -template struct List; template struct Link_list; -template struct Pointer_list; -template struct Cursor; -template struct PCursor; -template struct Link; -template struct Handle; template struct Interval_t; template struct PQueue; #include "real.hh" typedef Interval_t Interval; -typedef Interval_t Slice; - -struct Choleski_decomposition; +typedef Interval_t Slice; // junkme. +struct Offset; struct Long_option_init; +struct Rational; struct File_path; -struct Directed_graph_node; struct Getopt_long; -struct Matrix; struct String_data; -struct FlowerString; struct String_handle; struct String_convert; struct String; -struct Matrix_storage; -struct Vector ; -struct MyRational; - - -#if PARANOIA -#ifndef Rational -#define Rational MyRational -#endif -#else -struct Rational; -#endif struct Text_stream; struct Data_file; diff --git a/flower/include/international.hh b/flower/include/international.hh index 5ebbb65aee..c710074c86 100644 --- a/flower/include/international.hh +++ b/flower/include/international.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ diff --git a/flower/include/interval.hh b/flower/include/interval.hh index e02a7495a8..e00db6914e 100644 --- a/flower/include/interval.hh +++ b/flower/include/interval.hh @@ -8,7 +8,7 @@ #define INTERVAL_HH #include -#include "fproto.hh" +#include "flower-proto.hh" #include "real.hh" #include "drul-array.hh" @@ -156,7 +156,7 @@ Interval_t operator *(Interval_t i,T a){ return a*i; } -// again? see fproto.hh +// again? see flower-proto.hh typedef Interval_t Interval; typedef Interval_t Slice; // weird name diff --git a/flower/include/interval.tcc b/flower/include/interval.tcc index f601d03e66..7c51bd18f3 100644 --- a/flower/include/interval.tcc +++ b/flower/include/interval.tcc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/libc-extension.hh b/flower/include/libc-extension.hh index 56a7e7c13e..76a6d7fc47 100644 --- a/flower/include/libc-extension.hh +++ b/flower/include/libc-extension.hh @@ -3,14 +3,14 @@ source file of the flowerlib - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef LIBC_EXTENSION_HH #define LIBC_EXTENSION_HH -#include "fproto.hh" +#include "flower-proto.hh" #include "config.h" #include #include diff --git a/flower/include/offset.hh b/flower/include/offset.hh index 0a5a7a10d5..b9d7fae509 100644 --- a/flower/include/offset.hh +++ b/flower/include/offset.hh @@ -14,6 +14,7 @@ struct Offset; Offset complex_multiply (Offset, Offset); +Offset complex_divide (Offset, Offset); Offset complex_exp (Offset); diff --git a/flower/include/parray.hh b/flower/include/parray.hh index a9baeab836..41099671d6 100644 --- a/flower/include/parray.hh +++ b/flower/include/parray.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/parse-afm.hh b/flower/include/parse-afm.hh new file mode 100644 index 0000000000..3f2d831ccd --- /dev/null +++ b/flower/include/parse-afm.hh @@ -0,0 +1,327 @@ +/* Modified 1999 Morten Welinder: + * 1. ANSI prototype. + * 2. parseFileFree function. + */ +// 2000 HWN: AFM_ prefixes. +/* + * (C) 1988, 1989 by Adobe Systems Incorporated. All rights reserved. + * + * This file may be freely copied and redistributed as long as: + * 1) This entire notice continues to be included in the file, + * 2) If the file has been modified in any way, a notice of such + * modification is conspicuously indicated. + * + * PostScript, Display PostScript, and Adobe are registered trademarks of + * Adobe Systems Incorporated. + * + * ************************************************************************ + * THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO CHANGE WITHOUT + * NOTICE, AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY ADOBE SYSTEMS + * INCORPORATED. ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY OR + * LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO WARRANTY OF ANY + * KIND (EXPRESS, IMPLIED OR STATUTORY) WITH RESPECT TO THIS INFORMATION, + * AND EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. + * ************************************************************************ + */ + +/* ParseAFM.h + * + * This header file is used in conjuction with the parseAFM.c file. + * Together these files provide the functionality to parse Adobe Font + * Metrics files and store the information in predefined data structures. + * It is intended to work with an application program that needs font metric + * information. The program can be used as is by making a procedure call to + * parse an AFM file and have the data stored, or an application developer + * may wish to customize the code. + * + * This header file defines the data structures used as well as the key + * strings that are currently recognized by this version of the AFM parser. + * This program is based on the document "Adobe Font Metrics Files, + * Specification Version 2.0". + * + * AFM files are separated into distinct sections of different data. Because + * of this, the parseAFM program can parse a specified file to only save + * certain sections of information based on the application's needs. A record + * containing the requested information will be returned to the application. + * + * AFM files are divided into five sections of data: + * 1) The Global Font Information + * 2) The Character Metrics Information + * 3) The Track Kerning Data + * 4) The Pair-Wise Kerning Data + * 5) The Composite Character Data + * + * Basically, the application can request any of these sections independent + * of what other sections are requested. In addition, in recognizing that + * many applications will want ONLY the x-width of characters and not all + * of the other character metrics information, there is a way to receive + * only the width information so as not to pay the storage cost for the + * unwanted data. An application should never request both the + * "quick and dirty" char metrics (widths only) and the Character Metrics + * Information since the Character Metrics Information will contain all + * of the character widths as well. + * + * There is a procedure in parseAFM.c, called parseFile, that can be + * called from any application wishing to get information from the AFM File. + * This procedure expects 3 parameters: a vaild file descriptor, a pointer + * to a (FontInfo *) variable (for which space will be allocated and then + * will be filled in with the data requested), and a mask specifying + * which data from the AFM File should be saved in the FontInfo structure. + * + * The flags that can be used to set the appropriate mask are defined below. + * In addition, several commonly used masks have already been defined. + * + * History: + * original: DSM Thu Oct 20 17:39:59 PDT 1988 + * modified: DSM Mon Jul 3 14:17:50 PDT 1989 + * - added 'storageProblem' return code + * - fixed typos + */ + +#include + + + +/* your basic constants */ +#define TRUE 1 +#define FALSE 0 +#define EOL '\n' /* end-of-line indicator */ +#define MAX_NAME 4096 /* max length for identifiers */ +#define BOOL int +#define FLAGS int + + + +/* Flags that can be AND'ed together to specify exactly what + * information from the AFM file should be saved. + */ +#define P_G 0x01 /* 0000 0001 */ /* Global Font Info */ +#define P_W 0x02 /* 0000 0010 */ /* Character Widths ONLY */ +#define P_M 0x06 /* 0000 0110 */ /* All Char Metric Info */ +#define P_P 0x08 /* 0000 1000 */ /* Pair Kerning Info */ +#define P_T 0x10 /* 0001 0000 */ /* Track Kerning Info */ +#define P_C 0x20 /* 0010 0000 */ /* Composite Char Info */ + + +/* Commonly used flags + */ +#define P_GW (P_G | P_W) +#define P_GM (P_G | P_M) +#define P_GMP (P_G | P_M | P_P) +#define P_GMK (P_G | P_M | P_P | P_T) +#define P_GALL (P_G | P_M | P_P | P_T | P_C) + + + +/* Possible return codes from the parseFile procedure. + * + * ok means there were no problems parsing the file. + * + * parseError means that there was some kind of parsing error, but the + * parser went on. This could include problems like the count for any given + * section does not add up to how many entries there actually were, or + * there was a key that was not recognized. The return record may contain + * vaild data or it may not. + * + * earlyEOF means that an End of File was encountered before expected. This + * may mean that the AFM file had been truncated, or improperly formed. + * + * storageProblem means that there were problems allocating storage for + * the data structures that would have contained the AFM data. + */ +#define AFM_ok 0 +#define AFM_parseError -1 +#define AFM_earlyEOF -2 +#define AFM_storageProblem -3 + + + +/************************* TYPES *********************************/ +/* Below are all of the data structure definitions. These structures + * try to map as closely as possible to grouping and naming of data + * in the AFM Files. + */ + + +/* Bounding box definition. Used for the Font BBox as well as the + * Character BBox. + */ +typedef struct +{ + int llx; /* lower left x-position */ + int lly; /* lower left y-position */ + int urx; /* upper right x-position */ + int ury; /* upper right y-position */ +} BBox; + + +/* Global Font information. + * The key that each field is associated with is in comments. For an + * explanation about each key and its value please refer to the AFM + * documentation (full title & version given above). + */ +typedef struct +{ + char *afmVersion; /* key: StartFontMetrics */ + char *fontName; /* key: FontName */ + char *fullName; /* key: FullName */ + char *familyName; /* key: FamilyName */ + char *weight; /* key: Weight */ + float italicAngle; /* key: ItalicAngle */ + BOOL isFixedPitch; /* key: IsFixedPitch */ + BBox fontBBox; /* key: FontBBox */ + int underlinePosition; /* key: UnderlinePosition */ + int underlineThickness; /* key: UnderlineThickness */ + char *version; /* key: Version */ + char *notice; /* key: Notice */ + char *encodingScheme; /* key: EncodingScheme */ + int capHeight; /* key: CapHeight */ + int xHeight; /* key: XHeight */ + int ascender; /* key: Ascender */ + int descender; /* key: Descender */ +} AFM_GlobalFontInfo; + + +/* Ligature definition is a linked list since any character can have + * any number of ligatures. + */ +typedef struct _t_ligature +{ + char *succ, *lig; + struct _t_ligature *next; +} Ligature; + + +/* Character Metric Information. This structure is used only if ALL + * character metric information is requested. If only the character + * widths is requested, then only an array of the character x-widths + * is returned. + * + * The key that each field is associated with is in comments. For an + * explanation about each key and its value please refer to the + * Character Metrics section of the AFM documentation (full title + * & version given above). + */ +typedef struct +{ + int code, /* key: C */ + wx, /* key: WX */ + wy; /* together wx and wy are associated with key: W */ + char *name; /* key: N */ + BBox charBBox; /* key: B */ + Ligature *ligs; /* key: L (linked list; not a fixed number of Ls */ +} AFM_CharMetricInfo; + + +/* Track kerning data structure. + * The fields of this record are the five values associated with every + * TrackKern entry. + * + * For an explanation about each value please refer to the + * Track Kerning section of the AFM documentation (full title + * & version given above). + */ +typedef struct +{ + int degree; + float minPtSize, + minKernAmt, + maxPtSize, + maxKernAmt; +} AFM_TrackKernData; + + +/* Pair Kerning data structure. + * The fields of this record are the four values associated with every + * KP entry. For KPX entries, the yamt will be zero. + * + * For an explanation about each value please refer to the + * Pair Kerning section of the AFM documentation (full title + * & version given above). + */ +typedef struct +{ + char *name1; + char *name2; + int xamt, + yamt; +} AFM_PairKernData; + + +/* AFM_Pcc is a piece of a composite character. This is a sub structure of a + * AFM_CompCharData described below. + * These fields will be filled in with the values from the key AFM_Pcc. + * + * For an explanation about each key and its value please refer to the + * Composite Character section of the AFM documentation (full title + * & version given above). + */ +typedef struct +{ + char *AFM_PccName; + int deltax, + deltay; +} AFM_Pcc; + + +/* Composite Character Information data structure. + * The fields ccName and numOfPieces are filled with the values associated + * with the key CC. The field pieces points to an array (size = numOfPieces) + * of information about each of the parts of the composite character. That + * array is filled in with the values from the key AFM_Pcc. + * + * For an explanation about each key and its value please refer to the + * Composite Character section of the AFM documentation (full title + * & version given above). + */ +typedef struct +{ + char *ccName; + int numOfPieces; + AFM_Pcc *pieces; +} AFM_CompCharData; + + +/* FontInfo + * Record type containing pointers to all of the other data + * structures containing information about a font. + * A a record of this type is filled with data by the + * parseFile function. + */ +typedef struct +{ + AFM_GlobalFontInfo *gfi; /* ptr to a AFM_GlobalFontInfo record */ + int *cwi; /* ptr to 256 element array of just char widths */ + int numOfChars; /* number of entries in char metrics array */ + AFM_CharMetricInfo *cmi; /* ptr to char metrics array */ + int numOfTracks; /* number to entries in track kerning array */ + AFM_TrackKernData *tkd; /* ptr to track kerning array */ + int numOfPairs; /* number to entries in pair kerning array */ + AFM_PairKernData *pkd; /* ptr to pair kerning array */ + int numOfComps; /* number to entries in comp char array */ + AFM_CompCharData *ccd; /* ptr to comp char array */ +} AFM_Font_info; + + + +/************************* PROCEDURES ****************************/ + +/* Call this procedure to do the grunt work of parsing an AFM file. + * + * "fp" should be a valid file pointer to an AFM file. + * + * "fi" is a pointer to a pointer to a FontInfo record sturcture + * (defined above). Storage for the FontInfo structure will be + * allocated in parseFile and the structure will be filled in + * with the requested data from the AFM File. + * + * "flags" is a mask with bits set representing what data should + * be saved. Defined above are valid flags that can be used to set + * the mask, as well as a few commonly used masks. + * + * The possible return codes from parseFile are defined above. + */ + +int parseFile (FILE *fp, AFM_Font_info **fi, FLAGS flags); +void parseFileFree (AFM_Font_info *fi); diff --git a/flower/include/pointer.hh b/flower/include/pointer.hh index 336b51056e..726f3c7e34 100644 --- a/flower/include/pointer.hh +++ b/flower/include/pointer.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/pointer.tcc b/flower/include/pointer.tcc index ec98926d7e..318b5b1437 100644 --- a/flower/include/pointer.tcc +++ b/flower/include/pointer.tcc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/pqueue.hh b/flower/include/pqueue.hh index d4f652cb9e..1661bff73c 100644 --- a/flower/include/pqueue.hh +++ b/flower/include/pqueue.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/rational.hh b/flower/include/rational.hh index e0ca9834d1..1058d784c4 100644 --- a/flower/include/rational.hh +++ b/flower/include/rational.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ @@ -13,7 +13,7 @@ #include "compare.hh" #include "arithmetic-operator.hh" -#include "fproto.hh" +#include "flower-proto.hh" #include "string.hh" /** diff --git a/flower/include/real.hh b/flower/include/real.hh index d2667110a9..73131dd7d3 100644 --- a/flower/include/real.hh +++ b/flower/include/real.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/scalar.hh b/flower/include/scalar.hh index 88905d62c9..4fecbd16e2 100644 --- a/flower/include/scalar.hh +++ b/flower/include/scalar.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/string-convert.hh b/flower/include/string-convert.hh index aa61b9c4de..a96b81b234 100644 --- a/flower/include/string-convert.hh +++ b/flower/include/string-convert.hh @@ -8,7 +8,7 @@ #define STRING_CONVERT_HH #include -#include "fproto.hh" +#include "flower-proto.hh" #include "string.hh" diff --git a/flower/include/string-data.hh b/flower/include/string-data.hh index 6b08fa034f..38670869cd 100644 --- a/flower/include/string-data.hh +++ b/flower/include/string-data.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/string-data.icc b/flower/include/string-data.icc index a63895849e..f15434331a 100644 --- a/flower/include/string-data.icc +++ b/flower/include/string-data.icc @@ -3,7 +3,7 @@ source file of Flower lib - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef STRINGDATA_INL diff --git a/flower/include/string-handle.hh b/flower/include/string-handle.hh index 952a62778d..90f128a736 100644 --- a/flower/include/string-handle.hh +++ b/flower/include/string-handle.hh @@ -3,13 +3,14 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef STRINGHANDLE_HH #define STRINGHANDLE_HH -#include "fproto.hh" + +#include "flower-proto.hh" /** diff --git a/flower/include/string-handle.icc b/flower/include/string-handle.icc index 0ae10ed568..b2404b9ed5 100644 --- a/flower/include/string-handle.icc +++ b/flower/include/string-handle.icc @@ -4,7 +4,7 @@ source file of Flower lib - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef STRINGHANDLE_INL diff --git a/flower/include/string.hh b/flower/include/string.hh index 16f6a81f04..a64cce3014 100644 --- a/flower/include/string.hh +++ b/flower/include/string.hh @@ -12,15 +12,10 @@ #include "arithmetic-operator.hh" -#include "fproto.hh" +#include "flower-proto.hh" #include "string-handle.hh" -class ostream; -/* Libg++ also has a String class. Programming errors can lead to - confusion about which String is in use. Uncomment the following if you have - unexplained crashes after mucking with String - */ -// #define String FlowerString +class ostream; /** diff --git a/flower/include/string.icc b/flower/include/string.icc index da95d373e6..829f31f6bb 100644 --- a/flower/include/string.icc +++ b/flower/include/string.icc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/include/virtual-methods.hh b/flower/include/virtual-methods.hh index f150734f2b..f703f4b398 100644 --- a/flower/include/virtual-methods.hh +++ b/flower/include/virtual-methods.hh @@ -3,15 +3,15 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef VIRTUAL_METHODS_HH #define VIRTUAL_METHODS_HH -#include -#include // size_t + #include +#include "stdlib.h" // size_t #define classname(class_ptr) demangle_classname(typeid(*(class_ptr))) diff --git a/flower/international.cc b/flower/international.cc index 6734a49bff..d605cd501c 100644 --- a/flower/international.cc +++ b/flower/international.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ diff --git a/flower/interval.cc b/flower/interval.cc index 90c4a1fb32..ffcf4782b5 100644 --- a/flower/interval.cc +++ b/flower/interval.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/flower/libc-extension.cc b/flower/libc-extension.cc index 494850a455..7fa57c2ff5 100644 --- a/flower/libc-extension.cc +++ b/flower/libc-extension.cc @@ -4,7 +4,7 @@ source file of the flowerlib - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/flower/offset.cc b/flower/offset.cc index 90f70b73a6..ed2598da61 100644 --- a/flower/offset.cc +++ b/flower/offset.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include @@ -48,6 +48,23 @@ complex_multiply (Offset z1, Offset z2) } +Offset +complex_conjugate (Offset o) +{ + o[Y_AXIS] = - o[Y_AXIS]; + return o; +} + +Offset +complex_divide (Offset z1, Offset z2) +{ + z2 = complex_conjugate (z2); + Offset z = complex_multiply (z1, z2); + z *= 1/z2.length (); + return z; +} + + Offset complex_exp (Offset o) diff --git a/flower/parse-afm.cc b/flower/parse-afm.cc new file mode 100644 index 0000000000..8a32e30194 --- /dev/null +++ b/flower/parse-afm.cc @@ -0,0 +1,1294 @@ +/* Our mods: + +1. FontInfo has become AFM_AFM_Font_info to avoid namespace collisions. +2. Version is a linetoken because Bitstream Charter has a space in the version. +3. Added some necessary #include headers. +4. Added AFM_ prefixes to error codes. +5. Made it recognize both '\n' and '\r' as line terminators. Sheesh! +6. Stopped buffer overflows in token and linetoken. + +Raph Levien writing on 4 Oct 1998, updating 21 Oct 1998 + + +1. parseFileFree function. +2. Leak fix in parseFile. + +Morten Welinder September 1999. + +*/ + +/* + * (C) 1988, 1989, 1990 by Adobe Systems Incorporated. All rights reserved. + * + * This file may be freely copied and redistributed as long as: + * 1) This entire notice continues to be included in the file, + * 2) If the file has been modified in any way, a notice of such + * modification is conspicuously indicated. + * + * PostScript, Display PostScript, and Adobe are registered trademarks of + * Adobe Systems Incorporated. + * + * ************************************************************************ + * THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO CHANGE WITHOUT + * NOTICE, AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY ADOBE SYSTEMS + * INCORPORATED. ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY OR + * LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO WARRANTY OF ANY + * KIND (EXPRESS, IMPLIED OR STATUTORY) WITH RESPECT TO THIS INFORMATION, + * AND EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. + * ************************************************************************ + */ + +/* parseAFM.c + * + * This file is used in conjuction with the parseAFM.h header file. + * This file contains several procedures that are used to parse AFM + * files. It is intended to work with an application program that needs + * font metric information. The program can be used as is by making a + * procedure call to "parseFile" (passing in the expected parameters) + * and having it fill in a data structure with the data from the + * AFM file, or an application developer may wish to customize this + * code. + * + * There is also a file, parseAFMclient.c, that is a sample application + * showing how to call the "parseFile" procedure and how to use the data + * after "parseFile" has returned. + * + * Please read the comments in parseAFM.h and parseAFMclient.c. + * + * History: + * original: DSM Thu Oct 20 17:39:59 PDT 1988 + * modified: DSM Mon Jul 3 14:17:50 PDT 1989 + * - added 'storageProblem' return code + * - fixed bug of not allocating extra byte for string duplication + * - fixed typos + * modified: DSM Tue Apr 3 11:18:34 PDT 1990 + * - added free(ident) at end of parseFile routine + * modified: DSM Tue Jun 19 10:16:29 PDT 1990 + * - changed (width == 250) to (width = 250) in initializeArray + */ + +#include +#include +#include +#include +#include +#include +#include "parse-afm.hh" + +#define lineterm EOL /* line terminating character */ +#define lineterm_alt '\r' /* alternative line terminating character */ +#define normalEOF 1 /* return code from parsing routines used only */ + /* in this module */ +#define Space "space" /* used in string comparison to look for the width */ + /* of the space character to init the widths array */ +#define False "false" /* used in string comparison to check the value of */ + /* boolean keys (e.g. IsFixedPitch) */ + +#define MATCH(A,B) (strncmp((A),(B), MAX_NAME) == 0) + + + +/*************************** GLOBALS ***********************/ + +static char *ident = NULL; /* storage buffer for keywords */ + + +/* "shorts" for fast case statement + * The values of each of these enumerated items correspond to an entry in the + * table of strings defined below. Therefore, if you add a new string as + * new keyword into the keyStrings table, you must also add a corresponding + * parseKey AND it MUST be in the same position! + * + * IMPORTANT: since the sorting algorithm is a binary search, the strings of + * keywords must be placed in lexicographical order, below. [Therefore, the + * enumerated items are not necessarily in lexicographical order, depending + * on the name chosen. BUT, they must be placed in the same position as the + * corresponding key string.] The NOPE shall remain in the last position, + * since it does not correspond to any key string, and it is used in the + * "recognize" procedure to calculate how many possible keys there are. + */ + +enum parseKey { + ASCENDER, CHARBBOX, CODE, COMPCHAR, CAPHEIGHT, COMMENT, + DESCENDER, ENCODINGSCHEME, ENDCHARMETRICS, ENDCOMPOSITES, + ENDFONTMETRICS, ENDKERNDATA, ENDKERNPAIRS, ENDTRACKKERN, + FAMILYNAME, FONTBBOX, FONTNAME, FULLNAME, ISFIXEDPITCH, + ITALICANGLE, KERNPAIR, KERNPAIRXAMT, LIGATURE, CHARNAME, + NOTICE, COMPCHARPIECE, STARTCHARMETRICS, STARTCOMPOSITES, + STARTFONTMETRICS, STARTKERNDATA, STARTKERNPAIRS, + STARTTRACKKERN, TRACKKERN, UNDERLINEPOSITION, + UNDERLINETHICKNESS, VERSION, XYWIDTH, XWIDTH, WEIGHT, XHEIGHT, + NOPE }; + +/* keywords for the system: + * This a table of all of the current strings that are vaild AFM keys. + * Each entry can be referenced by the appropriate parseKey value (an + * enumerated data type defined above). If you add a new keyword here, + * a corresponding parseKey MUST be added to the enumerated data type + * defined above, AND it MUST be added in the same position as the + * string is in this table. + * + * IMPORTANT: since the sorting algorithm is a binary search, the keywords + * must be placed in lexicographical order. And, NULL should remain at the + * end. + */ + +static char *keyStrings[] = { + "Ascender", "B", "C", "CC", "CapHeight", "Comment", + "Descender", "EncodingScheme", "EndCharMetrics", "EndComposites", + "EndFontMetrics", "EndKernData", "EndKernPairs", "EndTrackKern", + "FamilyName", "FontBBox", "FontName", "FullName", "IsFixedPitch", + "ItalicAngle", "KP", "KPX", "L", "N", + "Notice", "PCC", "StartCharMetrics", "StartComposites", + "StartFontMetrics", "StartKernData", "StartKernPairs", + "StartTrackKern", "TrackKern", "UnderlinePosition", + "UnderlineThickness", "Version", "W", "WX", "Weight", "XHeight", + NULL }; + +/*************************** PARSING ROUTINES **************/ + +/*************************** token *************************/ + +/* A "AFM File Conventions" tokenizer. That means that it will + * return the next token delimited by white space. See also + * the `linetoken' routine, which does a similar thing but + * reads all tokens until the next end-of-line. + */ + +static char *token(FILE *stream) +{ + int ch, idx; + + /* skip over white space */ + while ((ch = fgetc(stream)) == ' ' || ch == lineterm || + ch == lineterm_alt || + ch == ',' || ch == '\t' || ch == ';'); + + idx = 0; + while (idx < MAX_NAME - 1 && + ch != EOF && ch != ' ' && ch != lineterm && ch != lineterm_alt + && ch != '\t' && ch != ':' && ch != ';') + { + ident[idx++] = ch; + ch = fgetc(stream); + } /* while */ + + if (ch == EOF && idx < 1) return ((char *)NULL); + if (idx >= 1 && ch != ':' ) ungetc(ch, stream); + if (idx < 1 ) ident[idx++] = ch; /* single-character token */ + ident[idx] = 0; + + return(ident); /* returns pointer to the token */ + +} /* token */ + + +/*************************** linetoken *************************/ + +/* "linetoken" will get read all tokens until the EOL character from + * the given stream. This is used to get any arguments that can be + * more than one word (like Comment lines and FullName). + */ + +static char *linetoken(FILE *stream) +{ + int ch, idx; + + while ((ch = fgetc(stream)) == ' ' || ch == '\t' ); + + idx = 0; + while (idx < MAX_NAME - 1 && + ch != EOF && ch != lineterm && ch != lineterm_alt) + { + ident[idx++] = ch; + ch = fgetc(stream); + } /* while */ + + ungetc(ch, stream); + ident[idx] = 0; + + return(ident); /* returns pointer to the token */ + +} /* linetoken */ + + +/*************************** recognize *************************/ + +/* This function tries to match a string to a known list of + * valid AFM entries (check the keyStrings array above). + * "ident" contains everything from white space through the + * next space, tab, or ":" character. + * + * The algorithm is a standard Knuth binary search. + */ + +static enum parseKey recognize( register char *ident) +{ + int lower = 0, upper = (int) NOPE, midpoint, cmpvalue; + BOOL found = FALSE; + + while ((upper >= lower) && !found) + { + midpoint = (lower + upper)/2; + if (keyStrings[midpoint] == NULL) break; + cmpvalue = strncmp(ident, keyStrings[midpoint], MAX_NAME); + if (cmpvalue == 0) found = TRUE; + else if (cmpvalue < 0) upper = midpoint - 1; + else lower = midpoint + 1; + } /* while */ + + if (found) return (enum parseKey) midpoint; + else return NOPE; + +} /* recognize */ + + +/************************* parseGlobals *****************************/ + +/* This function is called by "parseFile". It will parse the AFM File + * up to the "StartCharMetrics" keyword, which essentially marks the + * end of the Global Font Information and the beginning of the character + * metrics information. + * + * If the caller of "parseFile" specified that it wanted the Global + * Font Information (as defined by the "AFM File Specification" + * document), then that information will be stored in the returned + * data structure. + * + * Any Global Font Information entries that are not found in a + * given file, will have the usual default initialization value + * for its type (i.e. entries of type int will be 0, etc). + * + * This function returns an error code specifying whether there was + * a premature EOF or a parsing error. This return value is used by + * parseFile to determine if there is more file to parse. + */ + +static BOOL parseGlobals(FILE *fp, register AFM_GlobalFontInfo *gfi) +{ + BOOL cont = TRUE, save = (gfi != NULL); + int error = AFM_ok; + register char *keyword; + + while (cont) + { + keyword = token(fp); + + if (keyword == NULL) + /* Have reached an early and unexpected EOF. */ + /* Set flag and stop parsing */ + { + error = AFM_earlyEOF; + break; /* get out of loop */ + } + if (!save) + /* get tokens until the end of the Global Font info section */ + /* without saving any of the data */ + switch (recognize(keyword)) + { + case STARTCHARMETRICS: + cont = FALSE; + break; + case ENDFONTMETRICS: + cont = FALSE; + error = normalEOF; + break; + default: + break; + } /* switch */ + else + /* otherwise parse entire global font info section, */ + /* saving the data */ + switch(recognize(keyword)) + { + case STARTFONTMETRICS: + keyword = token(fp); + gfi->afmVersion = (char *) malloc(strlen(keyword) + 1); + strcpy(gfi->afmVersion, keyword); + break; + case COMMENT: + keyword = linetoken(fp); + break; + case FONTNAME: + keyword = token(fp); + gfi->fontName = (char *) malloc(strlen(keyword) + 1); + strcpy(gfi->fontName, keyword); + break; + case ENCODINGSCHEME: + keyword = token(fp); + gfi->encodingScheme = (char *) + malloc(strlen(keyword) + 1); + strcpy(gfi->encodingScheme, keyword); + break; + case FULLNAME: + keyword = linetoken(fp); + gfi->fullName = (char *) malloc(strlen(keyword) + 1); + strcpy(gfi->fullName, keyword); + break; + case FAMILYNAME: + keyword = linetoken(fp); + gfi->familyName = (char *) malloc(strlen(keyword) + 1); + strcpy(gfi->familyName, keyword); + break; + case WEIGHT: + keyword = token(fp); + gfi->weight = (char *) malloc(strlen(keyword) + 1); + strcpy(gfi->weight, keyword); + break; + case ITALICANGLE: + keyword = token(fp); + gfi->italicAngle = atof(keyword); + if (errno == ERANGE) error = AFM_parseError; + break; + case ISFIXEDPITCH: + keyword = token(fp); + if (MATCH(keyword, False)) + gfi->isFixedPitch = 0; + else + gfi->isFixedPitch = 1; + break; + case UNDERLINEPOSITION: + keyword = token(fp); + gfi->underlinePosition = atoi(keyword); + break; + case UNDERLINETHICKNESS: + keyword = token(fp); + gfi->underlineThickness = atoi(keyword); + break; + case VERSION: + keyword = linetoken(fp); + gfi->version = (char *) malloc(strlen(keyword) + 1); + strcpy(gfi->version, keyword); + break; + case NOTICE: + keyword = linetoken(fp); + gfi->notice = (char *) malloc(strlen(keyword) + 1); + strcpy(gfi->notice, keyword); + break; + case FONTBBOX: + keyword = token(fp); + gfi->fontBBox.llx = atoi(keyword); + keyword = token(fp); + gfi->fontBBox.lly = atoi(keyword); + keyword = token(fp); + gfi->fontBBox.urx = atoi(keyword); + keyword = token(fp); + gfi->fontBBox.ury = atoi(keyword); + break; + case CAPHEIGHT: + keyword = token(fp); + gfi->capHeight = atoi(keyword); + break; + case XHEIGHT: + keyword = token(fp); + gfi->xHeight = atoi(keyword); + break; + case DESCENDER: + keyword = token(fp); + gfi->descender = atoi(keyword); + break; + case ASCENDER: + keyword = token(fp); + gfi->ascender = atoi(keyword); + break; + case STARTCHARMETRICS: + cont = FALSE; + break; + case ENDFONTMETRICS: + cont = FALSE; + error = normalEOF; + break; + case NOPE: + default: + error = AFM_parseError; + break; + } /* switch */ + } /* while */ + + return(error); + +} /* parseGlobals */ + + + +/************************* initializeArray ************************/ + +/* Unmapped character codes are (at Adobe Systems) assigned the + * width of the space character (if one exists) else they get the + * value of 250 ems. This function initializes all entries in the + * char widths array to have this value. Then any mapped character + * codes will be replaced with the width of the appropriate character + * when parsing the character metric section. + + * This function parses the Character Metrics Section looking + * for a space character (by comparing character names). If found, + * the width of the space character will be used to initialize the + * values in the array of character widths. + * + * Before returning, the position of the read/write pointer of the + * file is reset to be where it was upon entering this function. + */ + +static int initializeArray(FILE *fp, register int *cwi) +{ + BOOL cont = TRUE, found = FALSE; + long opos = ftell(fp); + int code = 0, width = 0, i = 0, error = 0; + register char *keyword; + + while (cont) + { + keyword = token(fp); + if (keyword == NULL) + { + error = AFM_earlyEOF; + break; /* get out of loop */ + } + switch(recognize(keyword)) + { + case COMMENT: + keyword = linetoken(fp); + break; + case CODE: + code = atoi(token(fp)); + break; + case XWIDTH: + width = atoi(token(fp)); + break; + case CHARNAME: + keyword = token(fp); + if (MATCH(keyword, Space)) + { + cont = FALSE; + found = TRUE; + } + break; + case ENDCHARMETRICS: + cont = FALSE; + break; + case ENDFONTMETRICS: + cont = FALSE; + error = normalEOF; + break; + case NOPE: + default: + error = AFM_parseError; + break; + } /* switch */ + } /* while */ + + if (!found) + width = 250; + + for (i = 0; i < 256; ++i) + cwi[i] = width; + + fseek(fp, opos, 0); + + return(error); + +} /* initializeArray */ + + +/************************* parseCharWidths **************************/ + +/* This function is called by "parseFile". It will parse the AFM File + * up to the "EndCharMetrics" keyword. It will save the character + * width info (as opposed to all of the character metric information) + * if requested by the caller of parseFile. Otherwise, it will just + * parse through the section without saving any information. + * + * If data is to be saved, parseCharWidths is passed in a pointer + * to an array of widths that has already been initialized by the + * standard value for unmapped character codes. This function parses + * the Character Metrics section only storing the width information + * for the encoded characters into the array using the character code + * as the index into that array. + * + * This function returns an error code specifying whether there was + * a premature EOF or a parsing error. This return value is used by + * parseFile to determine if there is more file to parse. + */ + +static int parseCharWidths(FILE *fp, register int *cwi) +{ + BOOL cont = TRUE, save = (cwi != NULL); + int pos = 0, error = AFM_ok; + register char *keyword; + + while (cont) + { + keyword = token(fp); + /* Have reached an early and unexpected EOF. */ + /* Set flag and stop parsing */ + if (keyword == NULL) + { + error = AFM_earlyEOF; + break; /* get out of loop */ + } + if (!save) + /* get tokens until the end of the Char Metrics section without */ + /* saving any of the data*/ + switch (recognize(keyword)) + { + case ENDCHARMETRICS: + cont = FALSE; + break; + case ENDFONTMETRICS: + cont = FALSE; + error = normalEOF; + break; + default: + break; + } /* switch */ + else + /* otherwise parse entire char metrics section, saving */ + /* only the char x-width info */ + switch(recognize(keyword)) + { + case COMMENT: + keyword = linetoken(fp); + break; + case CODE: + keyword = token(fp); + pos = atoi(keyword); + break; + case XYWIDTH: + /* PROBLEM: Should be no Y-WIDTH when doing "quick & dirty" */ + keyword = token(fp); keyword = token(fp); /* eat values */ + error = AFM_parseError; + break; + case XWIDTH: + keyword = token(fp); + if (pos >= 0) /* ignore unmapped chars */ + cwi[pos] = atoi(keyword); + break; + case ENDCHARMETRICS: + cont = FALSE; + break; + case ENDFONTMETRICS: + cont = FALSE; + error = normalEOF; + break; + case CHARNAME: /* eat values (so doesn't cause AFM_parseError) */ + keyword = token(fp); + break; + case CHARBBOX: + keyword = token(fp); keyword = token(fp); + keyword = token(fp); keyword = token(fp); + break; + case LIGATURE: + keyword = token(fp); keyword = token(fp); + break; + case NOPE: + default: + error = AFM_parseError; + break; + } /* switch */ + } /* while */ + + return(error); + +} /* parseCharWidths */ + + +/************************* parseCharMetrics ************************/ + +/* This function is called by parseFile if the caller of parseFile + * requested that all character metric information be saved + * (as opposed to only the character width information). + * + * parseCharMetrics is passed in a pointer to an array of records + * to hold information on a per character basis. This function + * parses the Character Metrics section storing all character + * metric information for the ALL characters (mapped and unmapped) + * into the array. + * + * This function returns an error code specifying whether there was + * a premature EOF or a parsing error. This return value is used by + * parseFile to determine if there is more file to parse. + */ + +static int parseCharMetrics(FILE *fp, register AFM_Font_info *fi) +{ + BOOL cont = TRUE, firstTime = TRUE; + int error = AFM_ok, count = 0; + register AFM_CharMetricInfo *temp = fi->cmi; + register char *keyword; + + while (cont) + { + keyword = token(fp); + if (keyword == NULL) + { + error = AFM_earlyEOF; + break; /* get out of loop */ + } + switch(recognize(keyword)) + { + case COMMENT: + keyword = linetoken(fp); + break; + case CODE: + if (count < fi->numOfChars) + { + if (firstTime) firstTime = FALSE; + else temp++; + temp->code = atoi(token(fp)); + count++; + } + else + { + error = AFM_parseError; + cont = FALSE; + } + break; + case XYWIDTH: + temp->wx = atoi(token(fp)); + temp->wy = atoi(token(fp)); + break; + case XWIDTH: + temp->wx = atoi(token(fp)); + break; + case CHARNAME: + keyword = token(fp); + temp->name = (char *) malloc(strlen(keyword) + 1); + strcpy(temp->name, keyword); + break; + case CHARBBOX: + temp->charBBox.llx = atoi(token(fp)); + temp->charBBox.lly = atoi(token(fp)); + temp->charBBox.urx = atoi(token(fp)); + temp->charBBox.ury = atoi(token(fp)); + break; + case LIGATURE: { + Ligature **tail = &(temp->ligs); + Ligature *node = *tail; + + if (*tail != NULL) + { + while (node->next != NULL) + node = node->next; + tail = &(node->next); + } + + *tail = (Ligature *) calloc(1, sizeof(Ligature)); + keyword = token(fp); + (*tail)->succ = (char *) malloc(strlen(keyword) + 1); + strcpy((*tail)->succ, keyword); + keyword = token(fp); + (*tail)->lig = (char *) malloc(strlen(keyword) + 1); + strcpy((*tail)->lig, keyword); + break; } + case ENDCHARMETRICS: + cont = FALSE;; + break; + case ENDFONTMETRICS: + cont = FALSE; + error = normalEOF; + break; + case NOPE: + default: + error = AFM_parseError; + break; + } /* switch */ + } /* while */ + + if ((error == AFM_ok) && (count != fi->numOfChars)) + error = AFM_parseError; + + return(error); + +} /* parseCharMetrics */ + + + +/************************* parseAFM_TrackKernData ***********************/ + +/* This function is called by "parseFile". It will parse the AFM File + * up to the "EndTrackKern" or "EndKernData" keywords. It will save the + * track kerning data if requested by the caller of parseFile. + * + * parseAFM_TrackKernData is passed in a pointer to the FontInfo record. + * If data is to be saved, the FontInfo record will already contain + * a valid pointer to storage for the track kerning data. + * + * This function returns an error code specifying whether there was + * a premature EOF or a parsing error. This return value is used by + * parseFile to determine if there is more file to parse. + */ + +static int parseAFM_TrackKernData(FILE *fp, register AFM_Font_info *fi) +{ + BOOL cont = TRUE, save = (fi->tkd != NULL); + int pos = 0, error = AFM_ok, tcount = 0; + register char *keyword; + + while (cont) + { + keyword = token(fp); + + if (keyword == NULL) + { + error = AFM_earlyEOF; + break; /* get out of loop */ + } + if (!save) + /* get tokens until the end of the Track Kerning Data */ + /* section without saving any of the data */ + switch(recognize(keyword)) + { + case ENDTRACKKERN: + case ENDKERNDATA: + cont = FALSE; + break; + case ENDFONTMETRICS: + cont = FALSE; + error = normalEOF; + break; + default: + break; + } /* switch */ + else + /* otherwise parse entire Track Kerning Data section, */ + /* saving the data */ + switch(recognize(keyword)) + { + case COMMENT: + keyword = linetoken(fp); + break; + case TRACKKERN: + if (tcount < fi->numOfTracks) + { + keyword = token(fp); + fi->tkd[pos].degree = atoi(keyword); + keyword = token(fp); + fi->tkd[pos].minPtSize = atof(keyword); + if (errno == ERANGE) error = AFM_parseError; + keyword = token(fp); + fi->tkd[pos].minKernAmt = atof(keyword); + if (errno == ERANGE) error = AFM_parseError; + keyword = token(fp); + fi->tkd[pos].maxPtSize = atof(keyword); + if (errno == ERANGE) error = AFM_parseError; + keyword = token(fp); + fi->tkd[pos++].maxKernAmt = atof(keyword); + if (errno == ERANGE) error = AFM_parseError; + tcount++; + } + else + { + error = AFM_parseError; + cont = FALSE; + } + break; + case ENDTRACKKERN: + case ENDKERNDATA: + cont = FALSE; + break; + case ENDFONTMETRICS: + cont = FALSE; + error = normalEOF; + break; + case NOPE: + default: + error = AFM_parseError; + break; + } /* switch */ + } /* while */ + + if (error == AFM_ok && tcount != fi->numOfTracks) + error = AFM_parseError; + + return(error); + +} /* parseAFM_TrackKernData */ + + +/************************* parseAFM_PairKernData ************************/ + +/* This function is called by "parseFile". It will parse the AFM File + * up to the "EndKernPairs" or "EndKernData" keywords. It will save + * the pair kerning data if requested by the caller of parseFile. + * + * parseAFM_PairKernData is passed in a pointer to the FontInfo record. + * If data is to be saved, the FontInfo record will already contain + * a valid pointer to storage for the pair kerning data. + * + * This function returns an error code specifying whether there was + * a premature EOF or a parsing error. This return value is used by + * parseFile to determine if there is more file to parse. + */ + +static int parseAFM_PairKernData(FILE *fp, register AFM_Font_info *fi) +{ + BOOL cont = TRUE, save = (fi->pkd != NULL); + int pos = 0, error = AFM_ok, pcount = 0; + register char *keyword; + + while (cont) + { + keyword = token(fp); + + if (keyword == NULL) + { + error = AFM_earlyEOF; + break; /* get out of loop */ + } + if (!save) + /* get tokens until the end of the Pair Kerning Data */ + /* section without saving any of the data */ + switch(recognize(keyword)) + { + case ENDKERNPAIRS: + case ENDKERNDATA: + cont = FALSE; + break; + case ENDFONTMETRICS: + cont = FALSE; + error = normalEOF; + break; + default: + break; + } /* switch */ + else + /* otherwise parse entire Pair Kerning Data section, */ + /* saving the data */ + switch(recognize(keyword)) + { + case COMMENT: + keyword = linetoken(fp); + break; + case KERNPAIR: + if (pcount < fi->numOfPairs) + { + keyword = token(fp); + fi->pkd[pos].name1 = (char *) + malloc(strlen(keyword) + 1); + strcpy(fi->pkd[pos].name1, keyword); + keyword = token(fp); + fi->pkd[pos].name2 = (char *) + malloc(strlen(keyword) + 1); + strcpy(fi->pkd[pos].name2, keyword); + keyword = token(fp); + fi->pkd[pos].xamt = atoi(keyword); + keyword = token(fp); + fi->pkd[pos++].yamt = atoi(keyword); + pcount++; + } + else + { + error = AFM_parseError; + cont = FALSE; + } + break; + case KERNPAIRXAMT: + if (pcount < fi->numOfPairs) + { + keyword = token(fp); + fi->pkd[pos].name1 = (char *) + malloc(strlen(keyword) + 1); + strcpy(fi->pkd[pos].name1, keyword); + keyword = token(fp); + fi->pkd[pos].name2 = (char *) + malloc(strlen(keyword) + 1); + strcpy(fi->pkd[pos].name2, keyword); + keyword = token(fp); + fi->pkd[pos++].xamt = atoi(keyword); + pcount++; + } + else + { + error = AFM_parseError; + cont = FALSE; + } + break; + case ENDKERNPAIRS: + case ENDKERNDATA: + cont = FALSE; + break; + case ENDFONTMETRICS: + cont = FALSE; + error = normalEOF; + break; + case NOPE: + default: + error = AFM_parseError; + break; + } /* switch */ + } /* while */ + + if (error == AFM_ok && pcount != fi->numOfPairs) + error = AFM_parseError; + + return(error); + +} /* parseAFM_PairKernData */ + + +/************************* parseAFM_CompCharData **************************/ + +/* This function is called by "parseFile". It will parse the AFM File + * up to the "EndComposites" keyword. It will save the composite + * character data if requested by the caller of parseFile. + * + * parseAFM_CompCharData is passed in a pointer to the FontInfo record, and + * a boolean representing if the data should be saved. + * + * This function will create the appropriate amount of storage for + * the composite character data and store a pointer to the storage + * in the FontInfo record. + * + * This function returns an error code specifying whether there was + * a premature EOF or a parsing error. This return value is used by + * parseFile to determine if there is more file to parse. + */ + +static int parseAFM_CompCharData(FILE *fp, register AFM_Font_info *fi) +{ + BOOL cont = TRUE, firstTime = TRUE, save = (fi->ccd != NULL); + int pos = 0, j = 0, error = AFM_ok, ccount = 0, pcount = 0; + register char *keyword; + + while (cont) + { + keyword = token(fp); + if (keyword == NULL) + /* Have reached an early and unexpected EOF. */ + /* Set flag and stop parsing */ + { + error = AFM_earlyEOF; + break; /* get out of loop */ + } + if (ccount > fi->numOfComps) + { + error = AFM_parseError; + break; /* get out of loop */ + } + if (!save) + /* get tokens until the end of the Composite Character info */ + /* section without saving any of the data */ + switch(recognize(keyword)) + { + case ENDCOMPOSITES: + cont = FALSE; + break; + case ENDFONTMETRICS: + cont = FALSE; + error = normalEOF; + break; + default: + break; + } /* switch */ + else + /* otherwise parse entire Composite Character info section, */ + /* saving the data */ + switch(recognize(keyword)) + { + case COMMENT: + keyword = linetoken(fp); + break; + case COMPCHAR: + if (ccount < fi->numOfComps) + { + keyword = token(fp); + if (pcount != fi->ccd[pos].numOfPieces) + error = AFM_parseError; + pcount = 0; + if (firstTime) firstTime = FALSE; + else pos++; + fi->ccd[pos].ccName = (char *) + malloc(strlen(keyword) + 1); + strcpy(fi->ccd[pos].ccName, keyword); + keyword = token(fp); + fi->ccd[pos].numOfPieces = atoi(keyword); + fi->ccd[pos].pieces = (AFM_Pcc *) + calloc(fi->ccd[pos].numOfPieces, sizeof(AFM_Pcc)); + j = 0; + ccount++; + } + else + { + error = AFM_parseError; + cont = FALSE; + } + break; + case COMPCHARPIECE: + if (pcount < fi->ccd[pos].numOfPieces) + { + keyword = token(fp); + fi->ccd[pos].pieces[j].AFM_PccName = (char *) + malloc(strlen(keyword) + 1); + strcpy(fi->ccd[pos].pieces[j].AFM_PccName, keyword); + keyword = token(fp); + fi->ccd[pos].pieces[j].deltax = atoi(keyword); + keyword = token(fp); + fi->ccd[pos].pieces[j++].deltay = atoi(keyword); + pcount++; + } + else + error = AFM_parseError; + break; + case ENDCOMPOSITES: + cont = FALSE; + break; + case ENDFONTMETRICS: + cont = FALSE; + error = normalEOF; + break; + case NOPE: + default: + error = AFM_parseError; + break; + } /* switch */ + } /* while */ + + if (error == AFM_ok && ccount != fi->numOfComps) + error = AFM_parseError; + + return(error); + +} /* parseAFM_CompCharData */ + + + + +/*************************** 'PUBLIC' FUNCTION ********************/ + + +/*************************** parseFile *****************************/ + +/* parseFile is the only 'public' procedure available. It is called + * from an application wishing to get information from an AFM file. + * The caller of this function is responsible for locating and opening + * an AFM file and handling all errors associated with that task. + * + * parseFile expects 3 parameters: a vaild file pointer, a pointer + * to a (FontInfo *) variable (for which storage will be allocated and + * the data requested filled in), and a mask specifying which + * data from the AFM File should be saved in the FontInfo structure. + * + * The file will be parsed and the requested data will be stored in + * a record of type FontInfo (refer to ParseAFM.h). + * + * parseFile returns an error code as defined in parseAFM.h. + * + * The position of the read/write pointer associated with the file + * pointer upon return of this function is undefined. + */ + +extern int parseFile (FILE *fp, AFM_Font_info **fi, int flags) +{ + + int code = AFM_ok; /* return code from each of the parsing routines */ + int error = AFM_ok; /* used as the return code from this function */ + + register char *keyword; /* used to store a token */ + + + /* storage data for the global variable ident */ + if (!ident) + ident = (char *) calloc(MAX_NAME, sizeof(char)); + if (ident == NULL) {error = AFM_storageProblem; return(error);} + + (*fi) = (AFM_Font_info *) calloc(1, sizeof(AFM_Font_info)); + if ((*fi) == NULL) {error = AFM_storageProblem; return(error);} + + if (flags & P_G) + { + (*fi)->gfi = (AFM_GlobalFontInfo *) calloc(1, sizeof(AFM_GlobalFontInfo)); + if ((*fi)->gfi == NULL) {error = AFM_storageProblem; return(error);} + } + + /* The AFM File begins with Global Font Information. This section */ + /* will be parsed whether or not information should be saved. */ + code = parseGlobals(fp, (*fi)->gfi); + + if (code < 0) error = code; + + /* The Global Font Information is followed by the Character Metrics */ + /* section. Which procedure is used to parse this section depends on */ + /* how much information should be saved. If all of the metrics info */ + /* is wanted, parseCharMetrics is called. If only the character widths */ + /* is wanted, parseCharWidths is called. parseCharWidths will also */ + /* be called in the case that no character data is to be saved, just */ + /* to parse through the section. */ + + if ((code != normalEOF) && (code != AFM_earlyEOF)) + { + (*fi)->numOfChars = atoi(token(fp)); + if (flags & (P_M ^ P_W)) + { + (*fi)->cmi = (AFM_CharMetricInfo *) + calloc((*fi)->numOfChars, sizeof(AFM_CharMetricInfo)); + if ((*fi)->cmi == NULL) {error = AFM_storageProblem; return(error);} + code = parseCharMetrics(fp, *fi); + } + else + { + if (flags & P_W) + { + (*fi)->cwi = (int *) calloc(256, sizeof(int)); + if ((*fi)->cwi == NULL) + { + error = AFM_storageProblem; + return(error); + } + } + /* parse section regardless */ + code = parseCharWidths(fp, (*fi)->cwi); + } /* else */ + } /* if */ + + if ((error != AFM_earlyEOF) && (code < 0)) error = code; + + /* The remaining sections of the AFM are optional. This code will */ + /* look at the next keyword in the file to determine what section */ + /* is next, and then allocate the appropriate amount of storage */ + /* for the data (if the data is to be saved) and call the */ + /* appropriate parsing routine to parse the section. */ + + while ((code != normalEOF) && (code != AFM_earlyEOF)) + { + keyword = token(fp); + if (keyword == NULL) + /* Have reached an early and unexpected EOF. */ + /* Set flag and stop parsing */ + { + code = AFM_earlyEOF; + break; /* get out of loop */ + } + switch(recognize(keyword)) + { + case STARTKERNDATA: + break; + case ENDKERNDATA: + break; + case STARTTRACKKERN: + keyword = token(fp); + if (flags & P_T) + { + (*fi)->numOfTracks = atoi(keyword); + (*fi)->tkd = (AFM_TrackKernData *) + calloc((*fi)->numOfTracks, sizeof(AFM_TrackKernData)); + if ((*fi)->tkd == NULL) + { + error = AFM_storageProblem; + return(error); + } + } /* if */ + code = parseAFM_TrackKernData(fp, *fi); + break; + case STARTKERNPAIRS: + keyword = token(fp); + if (flags & P_P) + { + (*fi)->numOfPairs = atoi(keyword); + (*fi)->pkd = (AFM_PairKernData *) + calloc((*fi)->numOfPairs, sizeof(AFM_PairKernData)); + if ((*fi)->pkd == NULL) + { + error = AFM_storageProblem; + return(error); + } + } /* if */ + code = parseAFM_PairKernData(fp, *fi); + break; + case STARTCOMPOSITES: + keyword = token(fp); + if (flags & P_C) + { + (*fi)->numOfComps = atoi(keyword); + (*fi)->ccd = (AFM_CompCharData *) + calloc((*fi)->numOfComps, sizeof(AFM_CompCharData)); + if ((*fi)->ccd == NULL) + { + error = AFM_storageProblem; + return(error); + } + } /* if */ + code = parseAFM_CompCharData(fp, *fi); + break; + case ENDFONTMETRICS: + code = normalEOF; + break; + case NOPE: + default: + code = AFM_parseError; + break; + } /* switch */ + + if ((error != AFM_earlyEOF) && (code < 0)) error = code; + + } /* while */ + + if ((error != AFM_earlyEOF) && (code < 0)) error = code; + + if (ident != NULL) { free(ident); ident = NULL; } + + return(error); + +} /* parseFile */ + + +void +parseFileFree (AFM_Font_info *fi) +{ + if (fi->gfi) { + free (fi->gfi->afmVersion); + free (fi->gfi->fontName); + free (fi->gfi->fullName); + free (fi->gfi->familyName); + free (fi->gfi->weight); + free (fi->gfi->version); + free (fi->gfi->notice); + free (fi->gfi->encodingScheme); + free (fi->gfi); + } + + /* This contains just scalars. */ + free (fi->cwi); + + if (fi->cmi) { + int i; + for (i = 0; i < fi->numOfChars; i++) { + free (fi->cmi[i].name); + while (fi->cmi[i].ligs) { + Ligature *tmp; + tmp = fi->cmi[i].ligs; + free (tmp->succ); + free (tmp->lig); + free (tmp); + fi->cmi[i].ligs = fi->cmi[i].ligs->next; + } + } + free (fi->cmi); + } + + /* This contains just scalars. */ + free (fi->tkd); + + if (fi->pkd) { + int i; + for (i = 0; i < fi->numOfPairs; i++) { + free (fi->pkd[i].name1); + free (fi->pkd[i].name2); + } + free (fi->pkd); + } + + if (fi->ccd) { + int i, j; + for (i = 0; i < fi->numOfComps; i++) { + free (fi->ccd[i].ccName); + for (j = 0; j < fi->ccd[i].numOfPieces; j++) { + free (fi->ccd[i].pieces[j].AFM_PccName); + } + free (fi->ccd[i].pieces); + } + free (fi->ccd); + } + + free (fi); +} diff --git a/flower/polynomial.cc b/flower/polynomial.cc index 5a231ca6b2..d43cb9e2a7 100644 --- a/flower/polynomial.cc +++ b/flower/polynomial.cc @@ -1,7 +1,7 @@ /* poly.cc -- routines for manipulation of polynomials in one var - (c) 1993--1999 Han-Wen Nienhuys + (c) 1993--2000 Han-Wen Nienhuys */ #include diff --git a/flower/rational.cc b/flower/rational.cc index 29663fe204..a50228330b 100644 --- a/flower/rational.cc +++ b/flower/rational.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include #include diff --git a/flower/scalar.cc b/flower/scalar.cc index 48d4889a4e..1f3f772386 100644 --- a/flower/scalar.cc +++ b/flower/scalar.cc @@ -4,7 +4,7 @@ source file of the Flower Library - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include diff --git a/flower/string-convert.cc b/flower/string-convert.cc index d6d0fb5fa9..0d5c27e117 100644 --- a/flower/string-convert.cc +++ b/flower/string-convert.cc @@ -4,10 +4,10 @@ --*/ +#include #include #include #include -#include #include "libc-extension.hh" #include "string.hh" #include "string-convert.hh" diff --git a/flower/string.cc b/flower/string.cc index a5d0e2169d..b7afe955f2 100644 --- a/flower/string.cc +++ b/flower/string.cc @@ -2,7 +2,7 @@ string.cc - implement String - (c) 1997--1999 Han-Wen Nienhuys & Jan Nieuwenhuizen + (c) 1997--2000 Han-Wen Nienhuys & Jan Nieuwenhuizen */ diff --git a/flower/stringutil.cc b/flower/stringutil.cc index e099162b4d..a4f23ac23e 100644 --- a/flower/stringutil.cc +++ b/flower/stringutil.cc @@ -6,7 +6,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys */ + (c) 1997--2000 Han-Wen Nienhuys */ #ifdef STRING_DEBUG #define memmove mymemmove diff --git a/input/test/grace.ly b/input/test/grace.ly index d9cdb871cd..ee5fe5da8e 100644 --- a/input/test/grace.ly +++ b/input/test/grace.ly @@ -1,6 +1,6 @@ \score {\notes \context Voice = VA \relative c'' { - \grace b8 c4 + \grace b8 c4-\fermata \grace { [c32 cis32] } gis4 \grace { [cis32 dis32] } e4 \grace { [c32 d] }\times 2/3 { [c8 c c] } diff --git a/input/test/no-span.ly b/input/test/no-span.ly deleted file mode 100644 index 74c05787ea..0000000000 --- a/input/test/no-span.ly +++ /dev/null @@ -1,41 +0,0 @@ -%% why non of this any effect? -#(define Span_bar_engraver-visibility #f) -#(define Staff_group_bar_engraver-visibility #f) -#(define Span_score_bar_engraver-visability #f) - -#(assoc-set! bar-break-glyph-alist "bracket" '(nil . nil)) - -\score{ - \context Score < - \context StaffGroup< - \context PianoStaff < - \context Staff = treble { - \property Score.midiInstrument = "church organ" - < - \context Voice=i \notes\relative c { c c c c } - > - } - \context Staff = bass \notes\relative c { c c c c } - > - \context Staff = pedal \notes\relative c { c c c c } - > - > -\paper { - textheight = 280.0 \mm; - \translator { - \StaffGroupContext - minVerticalAlign = 4.0*\staffheight; - maxVerticalAlign = 4.0*\staffheight; -% this doesn't work - barType = #"|" - } - \translator { - \PianoStaffContext - minVerticalAlign = 2.5*\staffheight; - maxVerticalAlign = 2.5*\staffheight; - } - } - \midi { - \tempo 4 = 69; - } -} diff --git a/input/test/tuplet-2.fly b/input/test/tuplet-2.fly new file mode 100644 index 0000000000..d68567193b --- /dev/null +++ b/input/test/tuplet-2.fly @@ -0,0 +1,3 @@ + +\times 2/3 { c''8 c c } +\times 2/3 { c8 c'' c,, } diff --git a/lib/binary-source-file.cc b/lib/binary-source-file.cc index c114b81648..eb6cbbb0ba 100644 --- a/lib/binary-source-file.cc +++ b/lib/binary-source-file.cc @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ diff --git a/lib/include/file-storage.hh b/lib/include/file-storage.hh index 9b514586b8..7fbcccad58 100644 --- a/lib/include/file-storage.hh +++ b/lib/include/file-storage.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lib/include/input.hh b/lib/include/input.hh index a78daa8ef3..74ee72efe3 100644 --- a/lib/include/input.hh +++ b/lib/include/input.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lib/include/mapped-file-storage.hh b/lib/include/mapped-file-storage.hh index ee219a169c..958e0b506f 100644 --- a/lib/include/mapped-file-storage.hh +++ b/lib/include/mapped-file-storage.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lib/include/proto.hh b/lib/include/proto.hh index 540accfc4a..7ddc874434 100644 --- a/lib/include/proto.hh +++ b/lib/include/proto.hh @@ -8,7 +8,7 @@ #ifndef PROTO_HH #define PROTO_HH -#include "fproto.hh" +#include "flower-proto.hh" #include "real.hh" struct Duration; struct Duration_iterator; diff --git a/lib/include/simple-file-storage.hh b/lib/include/simple-file-storage.hh index 7fc21baec3..120267047c 100644 --- a/lib/include/simple-file-storage.hh +++ b/lib/include/simple-file-storage.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lib/include/string-storage.hh b/lib/include/string-storage.hh index 0bc31520c6..ac48e15579 100644 --- a/lib/include/string-storage.hh +++ b/lib/include/string-storage.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ diff --git a/lib/include/warn.hh b/lib/include/warn.hh index cb369d2c32..e63d65ce76 100644 --- a/lib/include/warn.hh +++ b/lib/include/warn.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lib/input.cc b/lib/input.cc index f2dc0a51b3..db7c10ee1f 100644 --- a/lib/input.cc +++ b/lib/input.cc @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include #include "proto.hh" diff --git a/lib/mapped-file-storage.cc b/lib/mapped-file-storage.cc index 176d071bd0..329f21ebf0 100644 --- a/lib/mapped-file-storage.cc +++ b/lib/mapped-file-storage.cc @@ -5,7 +5,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen . Nextstep fixes by tiggr@ics.ele.tue.nl diff --git a/lib/simple-file-storage.cc b/lib/simple-file-storage.cc index 3c92096be2..b7f94acead 100644 --- a/lib/simple-file-storage.cc +++ b/lib/simple-file-storage.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include diff --git a/lib/source-file.cc b/lib/source-file.cc index 4207c07087..c5e5b1dd34 100644 --- a/lib/source-file.cc +++ b/lib/source-file.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen & Han-Wen Nienhuys */ diff --git a/lib/source.cc b/lib/source.cc index e7304d1afc..f3b5874547 100644 --- a/lib/source.cc +++ b/lib/source.cc @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/afm-reader.cc b/lily/afm-reader.cc index 1eb882832b..4f65084daa 100644 --- a/lily/afm-reader.cc +++ b/lily/afm-reader.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/afm.cc b/lily/afm.cc index 71a1e25ea9..ca162249f1 100644 --- a/lily/afm.cc +++ b/lily/afm.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/align-element.cc b/lily/align-element.cc index fed4065602..3ca9684461 100644 --- a/lily/align-element.cc +++ b/lily/align-element.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "align-element.hh" diff --git a/lily/align-note-column-engraver.cc b/lily/align-note-column-engraver.cc index d39720a318..f83c2747ac 100644 --- a/lily/align-note-column-engraver.cc +++ b/lily/align-note-column-engraver.cc @@ -33,8 +33,6 @@ public: Align_note_column_engraver (); }; -ADD_THIS_TRANSLATOR (Align_note_column_engraver); - Align_note_column_engraver::Align_note_column_engraver() { align_item_p_ =0; @@ -114,3 +112,5 @@ Align_note_column_engraver::do_post_move_processing () accidental_l_ =0; } +ADD_THIS_TRANSLATOR(Align_note_column_engraver); + diff --git a/lily/all-font-metrics.cc b/lily/all-font-metrics.cc index 4b6e906139..ef266181ad 100644 --- a/lily/all-font-metrics.cc +++ b/lily/all-font-metrics.cc @@ -36,7 +36,7 @@ All_font_metrics::find_afm (String name) progress_indication ("[" + path); Adobe_font_metric * afm_p = read_afm_file (path); - afm_p->name_str_ = name; + afm_p->name_ = ly_symbol2scm (name.ch_C ()); progress_indication ("]"); afm_p_dict_[sname] = afm_p->self_scm_; @@ -80,7 +80,7 @@ All_font_metrics::find_tfm (String name) return 0; progress_indication ("[" + path); Tex_font_metric * tfm_p = Tex_font_metric_reader::read_file (path); - tfm_p->name_str_ = name; + tfm_p->name_ = ly_symbol2scm (name.ch_C( )); progress_indication ("]"); tfm_p_dict_[sname] = tfm_p->self_scm_; @@ -139,14 +139,7 @@ All_font_metrics::font_descriptions () const return list; } -Font_metric * -unsmob_metrics( SCM s) -{ - if (SMOB_IS_TYPE_B(Font_metric, s)) - return SMOB_TO_TYPE(Font_metric, s); - else - return 0; -} + #include "ly-smobs.icc" IMPLEMENT_SMOBS(Font_metric); diff --git a/lily/atom.cc b/lily/atom.cc index 80abf80772..eccf3b9843 100644 --- a/lily/atom.cc +++ b/lily/atom.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "atom.hh" diff --git a/lily/audio-column.cc b/lily/audio-column.cc index ff76cfc5d2..1dde79a5e9 100644 --- a/lily/audio-column.cc +++ b/lily/audio-column.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #include "audio-column.hh" diff --git a/lily/audio-element.cc b/lily/audio-element.cc index 3a4685af4c..39fbe8f178 100644 --- a/lily/audio-element.cc +++ b/lily/audio-element.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "audio-element.hh" diff --git a/lily/audio-item-info.cc b/lily/audio-item-info.cc index 6ca17ecadf..4be88d038d 100644 --- a/lily/audio-item-info.cc +++ b/lily/audio-item-info.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "audio-element-info.hh" diff --git a/lily/audio-item.cc b/lily/audio-item.cc index 06ccec24e9..089469ba05 100644 --- a/lily/audio-item.cc +++ b/lily/audio-item.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #include "debug.hh" #include "audio-item.hh" diff --git a/lily/audio-staff.cc b/lily/audio-staff.cc index a8d7682ce9..e9993dbfdf 100644 --- a/lily/audio-staff.cc +++ b/lily/audio-staff.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #include "audio-staff.hh" diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index b6674fc384..74761145cd 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -6,7 +6,6 @@ (c) 1999 Jan Nieuwenhuizen */ - #include "beaming.hh" #include "auto-beam-engraver.hh" #include "musical-request.hh" diff --git a/lily/axis-group-element.cc b/lily/axis-group-element.cc index 081b42a22f..7e2cdacf13 100644 --- a/lily/axis-group-element.cc +++ b/lily/axis-group-element.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "axis-group-element.hh" diff --git a/lily/axis-group-engraver.cc b/lily/axis-group-engraver.cc index 0881d72f64..9ae9db6438 100644 --- a/lily/axis-group-engraver.cc +++ b/lily/axis-group-engraver.cc @@ -10,8 +10,6 @@ #include "axis-group-spanner.hh" #include "paper-column.hh" -ADD_THIS_TRANSLATOR (Axis_group_engraver); - Axis_group_engraver::Axis_group_engraver () { staffline_p_ = 0; @@ -65,3 +63,4 @@ Axis_group_engraver::process_acknowledged () elts_.clear (); } +ADD_THIS_TRANSLATOR(Axis_group_engraver); diff --git a/lily/bar-engraver.cc b/lily/bar-engraver.cc index 90178f4666..45636011c0 100644 --- a/lily/bar-engraver.cc +++ b/lily/bar-engraver.cc @@ -17,8 +17,6 @@ #include "engraver-group-engraver.hh" #include "warn.hh" -ADD_THIS_TRANSLATOR (Bar_engraver); - Bar_engraver::Bar_engraver() { bar_p_ =0; @@ -40,7 +38,7 @@ Bar_engraver::create_bar () SCM default_type = get_property ("defaultBarType", 0); if (gh_string_p (default_type)) { - bar_p_->set_elt_property ("default-glyph", default_type); // gu.h + bar_p_->set_elt_property ("glyph", default_type); // gu.h } #if 0 @@ -78,14 +76,14 @@ Bar_engraver::request_bar (String requested_type) return; } - String current = ly_scm2string (bar_p_->get_elt_property ("default-glyph")); + String current = ly_scm2string (bar_p_->get_elt_property ("glyph")); if ((requested_type == "|:" && current== ":|") || (requested_type == ":|" && current == "|:")) requested_type = ":|:"; - bar_p_->set_elt_property ("default-glyph", + bar_p_->set_elt_property ("glyph", ly_str02scm (requested_type.ch_C ())); } @@ -115,7 +113,7 @@ Bar_engraver::do_process_requests() if (which.length_i ()) { create_bar(); - bar_p_->set_elt_property ("default-glyph", ly_str02scm (which.ch_C ())); + bar_p_->set_elt_property ("glyph", ly_str02scm (which.ch_C ())); } if (!bar_p_) @@ -145,3 +143,7 @@ Bar_engraver::do_pre_move_processing() } } +ADD_THIS_TRANSLATOR(Bar_engraver); + + + diff --git a/lily/bar-number-engraver.cc b/lily/bar-number-engraver.cc index 0616ae2142..bf22b44c61 100644 --- a/lily/bar-number-engraver.cc +++ b/lily/bar-number-engraver.cc @@ -3,17 +3,16 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ + #include "bar-number-engraver.hh" #include "timing-translator.hh" #include "timing-engraver.hh" #include "engraver-group-engraver.hh" #include "text-item.hh" -ADD_THIS_TRANSLATOR (Bar_number_engraver); - Bar_number_engraver::Bar_number_engraver() { axis_ = Y_AXIS; @@ -42,3 +41,5 @@ Bar_number_engraver::do_process_requests () } } + +ADD_THIS_TRANSLATOR(Bar_number_engraver); diff --git a/lily/bar.cc b/lily/bar.cc index c3dc7684b8..cfbecaa645 100644 --- a/lily/bar.cc +++ b/lily/bar.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "dimension-cache.hh" @@ -44,14 +44,7 @@ Bar::do_brew_molecule_p () const void Bar::do_pre_processing () { - SCM def = remove_elt_property ("default-glyph"); SCM g = get_elt_property ("glyph"); - if (!gh_string_p (g) && gh_string_p (def)) - { - set_elt_property ("glyph", def); - g = get_elt_property ("glyph"); - } - SCM breakdir = gh_int2scm (break_status_dir ()); if (gh_string_p (g)) diff --git a/lily/base-span-bar-engraver.cc b/lily/base-span-bar-engraver.cc index cc873a5a81..7d4365fd1e 100644 --- a/lily/base-span-bar-engraver.cc +++ b/lily/base-span-bar-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "dimension-cache.hh" @@ -12,8 +12,6 @@ #include "base-span-bar-engraver.hh" #include "axis-align-spanner.hh" -ADD_THIS_TRANSLATOR (Base_span_bar_engraver); - Base_span_bar_engraver::Base_span_bar_engraver() { spanbar_p_ =0; @@ -51,7 +49,7 @@ Base_span_bar_engraver::acknowledge_element (Score_element_info i) --hwn */ { - spanbar_p_ = get_span_bar_p (); + spanbar_p_ = get_span_bar_p(); spanbar_p_->set_parent (bar_l_arr_[0], Y_AXIS); String visnam = String(name()) + "-visibility"; @@ -68,11 +66,9 @@ Base_span_bar_engraver::acknowledge_element (Score_element_info i) } announce_element (Score_element_info (spanbar_p_,0)); - - if (!gh_string_p (spanbar_p_->get_elt_property ("glyph")) - && !gh_string_p (spanbar_p_->get_elt_property ("default-glyph"))) - spanbar_p_-> set_elt_property ("default-glyph", - bar_l_arr_[0]->get_elt_property ("default-glyph")); + if (!gh_string_p (spanbar_p_->get_elt_property ("glyph"))) + spanbar_p_-> set_elt_property ("glyph", + bar_l_arr_[0]->get_elt_property ("glyph")); } } } @@ -91,3 +87,6 @@ Base_span_bar_engraver::do_pre_move_processing() } + +ADD_THIS_TRANSLATOR(Base_span_bar_engraver); + diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index 7a770f6812..ac12b47e5b 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -3,10 +3,9 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ - #include "timing-engraver.hh" #include "engraver-group-engraver.hh" #include "beam-engraver.hh" @@ -18,8 +17,6 @@ #include "beaming.hh" #include "score-engraver.hh" -ADD_THIS_TRANSLATOR (Beam_engraver); - Beam_engraver::Beam_engraver () { beam_p_ = 0; @@ -194,3 +191,7 @@ Beam_engraver::acknowledge_element (Score_element_info info) } } + + +ADD_THIS_TRANSLATOR(Beam_engraver); + diff --git a/lily/beam.cc b/lily/beam.cc index 1daf73682b..6fe8f9b525 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ @@ -14,6 +14,8 @@ * move paper vars to scm */ + + #include // tanh. #include "directional-element-interface.hh" @@ -22,7 +24,7 @@ #include "beam.hh" #include "misc.hh" #include "debug.hh" -#include "leastsquares.hh" +#include "least-squares.hh" #include "stem.hh" #include "paper-def.hh" #include "lookup.hh" @@ -322,7 +324,8 @@ Beam::do_post_processing () set_stem_length (y, dy); } - set_elt_property ("y-position", gh_double2scm (y)); + // UGH. Y is not in staff position unit? + set_elt_property ("y-position", gh_double2scm (y)); } } @@ -344,18 +347,18 @@ Beam::calc_position_and_height (Real* y, Real* dy) const return; } - Least_squares ls; + Array ideals; Real x0 = first_visible_stem ()->hpos_f (); for (int i=0; i < stem_count (); i++) { Stem* s = stem (i); if (s->invisible_b ()) continue; - ls.input.push (Offset (s->hpos_f () - x0, - s->calc_stem_info ().idealy_f_)); + ideals.push (Offset (s->hpos_f () - x0, + s->calc_stem_info ().idealy_f_)); } Real dydx; - ls.minimise (dydx, *y); // duh, takes references + minimise_least_squares (&dydx, y, ideals); // duh, takes references Real dx = last_visible_stem ()->hpos_f () - x0; *dy = dydx * dx; diff --git a/lily/bezier-bow.cc b/lily/bezier-bow.cc index 318a328cb0..65eadb6193 100644 --- a/lily/bezier-bow.cc +++ b/lily/bezier-bow.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ #include @@ -227,6 +227,19 @@ Bezier_bow::to_canonic_form () { flipy (encompass_); } + + while (encompass_.size () > 1 && encompass_[1][X_AXIS] <= 0.0) + { + programming_error ("Degenerate slur: infinite steepness reqd"); + encompass_.del (1); + } + + Real l = encompass_.top ()[X_AXIS]; + while (encompass_.size () > 1 && encompass_.top (1)[X_AXIS] >= l) + { + programming_error ("Degenerate slur: infinite steepness reqd"); + encompass_.del (encompass_.size ()-2); + } } diff --git a/lily/bezier.cc b/lily/bezier.cc index 66a7a55245..28634b473c 100644 --- a/lily/bezier.cc +++ b/lily/bezier.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ #include diff --git a/lily/bow.cc b/lily/bow.cc deleted file mode 100644 index 2fbb65d309..0000000000 --- a/lily/bow.cc +++ /dev/null @@ -1,169 +0,0 @@ -/* - bow.cc -- implement Bow - - source file of the GNU LilyPond music typesetter - - (c) 1997--1999 Han-Wen Nienhuys - Jan Nieuwenhuizen -*/ - -#include "dimension-cache.hh" -#include "bow.hh" -#include "debug.hh" -#include "paper-def.hh" -#include "molecule.hh" -#include "lookup.hh" -#include "bezier-bow.hh" -#include "main.hh" -#include "directional-element-interface.hh" - -Bow::Bow () -{ - dy_f_drul_[LEFT] = dy_f_drul_[RIGHT] = 0.0; - dx_f_drul_[LEFT] = dx_f_drul_[RIGHT] = 0.0; -} - -Molecule* -Bow::do_brew_molecule_p () const -{ - Real thick = paper_l ()->get_var ("slur_thickness"); - Bezier one = get_curve (); - - Molecule a; - SCM d = get_elt_property ("dashed"); - if (gh_number_p (d)) - a = lookup_l ()->dashed_slur (one, thick, gh_scm2int (d)); - else - a = lookup_l ()->slur (one, directional_element (this).get () * thick, thick); - - return new Molecule (a); -} - -Offset -Bow::center () const -{ - Real dy = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]; - Real dx = extent(X_AXIS).length (); - - return Offset (dx / 2, dy); -} - - -Interval -Bow::curve_extent (Axis a) const -{ - return get_curve ().extent (a); -} - -Bezier -Bow::get_curve () const -{ - Bezier_bow b (get_encompass_offset_arr (), directional_element (this).get ()); - - b.ratio_ = paper_l ()->get_var ("slur_ratio"); - b.height_limit_ = paper_l ()->get_var ("slur_height_limit"); - b.rc_factor_ = paper_l ()->get_var ("slur_rc_factor"); - - b.calculate (); - return b.get_curve (); -} - -#if 0 - -/* - TODO: FIXME. - */ - -/* - Clipping - - This function tries to address two issues: - * the tangents of the slur should always point inwards - in the actual slur, i.e. *after rotating back*. - - * slurs shouldn't be too high - let's try : h <= 1.2 b && h <= 3 staffheight? - - We could calculate the tangent of the bezier curve from - both ends going inward, and clip the slur at the point - where the tangent (after rotation) points up (or inward - with a certain maximum angle). - - However, we assume that real clipping is not the best - answer. We expect that moving the outer control point up - if the slur becomes too high will result in a nicer slur - after recalculation. - - Knowing that the tangent is the line through the first - two control points, we'll clip (move the outer control - point upwards) too if the tangent points outwards. - */ - -bool -Bezier_bow::calc_clipping () -{ - Real clip_height = paper_l_->get_var ("slur_clip_height"); - Real clip_ratio = paper_l_->get_var ("slur_clip_ratio"); - Real clip_angle = paper_l_->get_var ("slur_clip_angle"); - - Real b = curve_.control_[3][X_AXIS] - curve_.control_[0][X_AXIS]; - Real clip_h = clip_ratio * b ? begin_h - clip_h; - Real end_dy = 0 >? end_h - clip_h; - - Real pi = M_PI; - Real begin_alpha = (curve_.control_[1] - curve_.control_[0]).arg () + dir_ * alpha_; - Real end_alpha = pi - (curve_.control_[2] - curve_.control_[3]).arg () - dir_ * alpha_; - - Real max_alpha = clip_angle / 90 * pi / 2; - if ((begin_dy < 0) && (end_dy < 0) - && (begin_alpha < max_alpha) && (end_alpha < max_alpha)) - return false; - - transform_back (); - - if ((begin_dy > 0) || (end_dy > 0)) - { - Real dy = (begin_dy + end_dy) / 4; - dy *= cos (alpha_); - encompass_[0][Y_AXIS] += dir_ * dy; - encompass_.top ()[Y_AXIS] += dir_ * dy; - } - else - { - //ugh - Real c = 0.4; - if (begin_alpha >= max_alpha) - begin_dy = 0 >? c * begin_alpha / max_alpha * begin_h; - if (end_alpha >= max_alpha) - end_dy = 0 >? c * end_alpha / max_alpha * end_h; - - encompass_[0][Y_AXIS] += dir_ * begin_dy; - encompass_.top ()[Y_AXIS] += dir_ * end_dy; - - Offset delta = encompass_.top () - encompass_[0]; - alpha_ = delta.arg (); - } - - to_canonic_form (); - - return true; -} -#endif - - - -Array -Bow::get_encompass_offset_arr () const -{ - Array offset_arr; - offset_arr.push (Offset (dx_f_drul_[LEFT], dy_f_drul_[LEFT])); - offset_arr.push (Offset (spanner_length () + dx_f_drul_[RIGHT], - dy_f_drul_[RIGHT])); - - return offset_arr; -} - - diff --git a/lily/boxes.cc b/lily/boxes.cc index 360766706c..6b52a0daee 100644 --- a/lily/boxes.cc +++ b/lily/boxes.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys */ #include "box.hh" diff --git a/lily/break-algorithm.cc b/lily/break-algorithm.cc index 003a9cd321..540c6597c8 100644 --- a/lily/break-algorithm.cc +++ b/lily/break-algorithm.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys */ #include "paper-column.hh" diff --git a/lily/break-align-engraver.cc b/lily/break-align-engraver.cc index ed16e886b9..44d94270a6 100644 --- a/lily/break-align-engraver.cc +++ b/lily/break-align-engraver.cc @@ -5,8 +5,7 @@ (c) 1999 Han-Wen Nienhuys -*/ - + */ #include "engraver.hh" #include "protected-scm.hh" #include "break-align-item.hh" @@ -26,7 +25,9 @@ public: Break_align_engraver (); }; -ADD_THIS_TRANSLATOR (Break_align_engraver); + + +ADD_THIS_TRANSLATOR(Break_align_engraver); void Break_align_engraver::add_column (SCM smob) diff --git a/lily/break-align-item.cc b/lily/break-align-item.cc index 60dce822e4..c2c190fcac 100644 --- a/lily/break-align-item.cc +++ b/lily/break-align-item.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "dimension-cache.hh" diff --git a/lily/breathing-sign-engraver.cc b/lily/breathing-sign-engraver.cc index 0ad42c9abc..669a606353 100644 --- a/lily/breathing-sign-engraver.cc +++ b/lily/breathing-sign-engraver.cc @@ -22,8 +22,6 @@ TODO: #include "note-head.hh" #include "local-key-item.hh" -ADD_THIS_TRANSLATOR (Breathing_sign_engraver); - Breathing_sign_engraver::Breathing_sign_engraver() { @@ -68,3 +66,5 @@ Breathing_sign_engraver::do_post_move_processing() { breathing_sign_req_l_ = 0; } + +ADD_THIS_TRANSLATOR(Breathing_sign_engraver); diff --git a/lily/change-iterator.cc b/lily/change-iterator.cc index 4fa7c519e4..60478378a4 100644 --- a/lily/change-iterator.cc +++ b/lily/change-iterator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "change-iterator.hh" diff --git a/lily/change-translator.cc b/lily/change-translator.cc index 0eb81394f3..b0144488be 100644 --- a/lily/change-translator.cc +++ b/lily/change-translator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "change-translator.hh" diff --git a/lily/chord-name-engraver.cc b/lily/chord-name-engraver.cc index e5e31c38f5..22377b7d63 100644 --- a/lily/chord-name-engraver.cc +++ b/lily/chord-name-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ #include "chord-name-engraver.hh" diff --git a/lily/chord-name.cc b/lily/chord-name.cc index f994dd3452..ba971322fc 100644 --- a/lily/chord-name.cc +++ b/lily/chord-name.cc @@ -266,7 +266,7 @@ Chord_name::do_brew_molecule_p () const { name.inversion_mol = lookup_l ()->text ("", "/", paper_l ()); Musical_pitch p; - scm_to (s, &p); + p = scm_to (s, &p); Molecule mol = pitch2molecule (p); name.inversion_mol.add_at_edge (X_AXIS, RIGHT, mol, 0); } @@ -276,7 +276,7 @@ Chord_name::do_brew_molecule_p () const { name.bass_mol = lookup_l ()->text ("", "/", paper_l ()); Musical_pitch p; - scm_to (s, &p); + p = scm_to (s, &p); Molecule mol = pitch2molecule (p); name.bass_mol.add_at_edge (X_AXIS, RIGHT, mol, 0); } diff --git a/lily/chord-tremolo-engraver.cc b/lily/chord-tremolo-engraver.cc index 6e914015b1..4b6ab0e69b 100644 --- a/lily/chord-tremolo-engraver.cc +++ b/lily/chord-tremolo-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index dd1f55e350..4dd5889831 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys , + (c) 1997--2000 Han-Wen Nienhuys , Mats Bengtsson */ @@ -47,8 +47,6 @@ public: }; -ADD_THIS_TRANSLATOR (Clef_engraver); - Clef_engraver::Clef_engraver() { clef_glyph_ = SCM_EOL; @@ -214,3 +212,8 @@ Clef_engraver::do_post_move_processing() clef_req_l_ = 0; } + + + +ADD_THIS_TRANSLATOR(Clef_engraver); + diff --git a/lily/clef-item.cc b/lily/clef-item.cc index 5bdcfa8111..c63e38b4ec 100644 --- a/lily/clef-item.cc +++ b/lily/clef-item.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include diff --git a/lily/collision-engraver.cc b/lily/collision-engraver.cc index ecca483478..16d0bf30ea 100644 --- a/lily/collision-engraver.cc +++ b/lily/collision-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "note-column.hh" @@ -11,8 +11,6 @@ #include "collision.hh" #include "dimension-cache.hh" -ADD_THIS_TRANSLATOR (Collision_engraver); - void Collision_engraver::process_acknowledged () { @@ -56,3 +54,7 @@ Collision_engraver::Collision_engraver() { col_p_ =0; } + + + +ADD_THIS_TRANSLATOR(Collision_engraver); diff --git a/lily/collision.cc b/lily/collision.cc index edf04de23d..0de6a942f8 100644 --- a/lily/collision.cc +++ b/lily/collision.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "debug.hh" #include "collision.hh" diff --git a/lily/column-x-positions.cc b/lily/column-x-positions.cc index 8c5c6186d7..080c178ce0 100644 --- a/lily/column-x-positions.cc +++ b/lily/column-x-positions.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "column-x-positions.hh" diff --git a/lily/command-request.cc b/lily/command-request.cc index c9f75ead85..6975762e3e 100644 --- a/lily/command-request.cc +++ b/lily/command-request.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "command-request.hh" diff --git a/lily/crescendo.cc b/lily/crescendo.cc index 3fc7f4b44c..ef32c1e7c9 100644 --- a/lily/crescendo.cc +++ b/lily/crescendo.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "molecule.hh" @@ -33,8 +33,8 @@ Crescendo::do_brew_molecule_p () const if (!isdir_b (dir) || !gh_pair_p (dyns)) { - Crescendo* urg= (Crescendo*)this; - urg->set_elt_property ("transparent", SCM_BOOL_T); +Crescendo * me = (Crescendo*)this; + me->set_elt_property ("transparent", SCM_BOOL_T); return new Molecule; } diff --git a/lily/debug.cc b/lily/debug.cc index 9edbf4ac6b..3638dd6c76 100644 --- a/lily/debug.cc +++ b/lily/debug.cc @@ -9,12 +9,8 @@ #include #include - -// libg++ 2.8.0 -// #include #include - #include "debug.hh" #include "dstream.hh" #include "flower-debug.hh" diff --git a/lily/dimension-cache.cc b/lily/dimension-cache.cc index f7757ee820..005499624b 100644 --- a/lily/dimension-cache.cc +++ b/lily/dimension-cache.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ #include "dimension-cache.hh" diff --git a/lily/direction.cc b/lily/direction.cc index f4b46b1f5e..aeddc311a2 100644 --- a/lily/direction.cc +++ b/lily/direction.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/dot-column-engraver.cc b/lily/dot-column-engraver.cc index 6ff73f1a4a..88108cbea8 100644 --- a/lily/dot-column-engraver.cc +++ b/lily/dot-column-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ @@ -11,8 +11,6 @@ #include "rhythmic-head.hh" #include "dot-column.hh" -ADD_THIS_TRANSLATOR (Dot_column_engraver); - Dot_column_engraver::Dot_column_engraver () { dotcol_p_ =0; @@ -48,3 +46,6 @@ Dot_column_engraver::acknowledge_element (Score_element_info info) dotcol_p_->add_head (h); } + +ADD_THIS_TRANSLATOR(Dot_column_engraver); + diff --git a/lily/dot-column.cc b/lily/dot-column.cc index b9868a29b8..61d1c771f2 100644 --- a/lily/dot-column.cc +++ b/lily/dot-column.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "dots.hh" @@ -108,6 +108,6 @@ Dot_column::do_post_processing () for (int i=0; i + (c) 1997--2000 Han-Wen Nienhuys */ #include "dots.hh" diff --git a/lily/duration.cc b/lily/duration.cc index 4d485e477f..7eb75b5423 100644 --- a/lily/duration.cc +++ b/lily/duration.cc @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen Han-Wen Nienhuys */ diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index b02b5aeff7..5f42b8ba80 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -3,9 +3,8 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ - #include "debug.hh" #include "crescendo.hh" #include "musical-request.hh" @@ -45,7 +44,7 @@ protected: virtual void do_post_move_processing(); }; -ADD_THIS_TRANSLATOR (Dynamic_engraver); + Dynamic_engraver::Dynamic_engraver() { @@ -212,6 +211,10 @@ Dynamic_engraver::do_pre_move_processing() typeset_all (); } + + +ADD_THIS_TRANSLATOR(Dynamic_engraver); + void Dynamic_engraver::do_removal_processing () { diff --git a/lily/engraver-group-engraver.cc b/lily/engraver-group-engraver.cc index 04afcf0613..75f16950d0 100644 --- a/lily/engraver-group-engraver.cc +++ b/lily/engraver-group-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "proto.hh" @@ -13,7 +13,8 @@ #include "paper-score.hh" #include "score-element.hh" -ADD_THIS_TRANSLATOR (Engraver_group_engraver); + +ADD_THIS_TRANSLATOR(Engraver_group_engraver); void Engraver_group_engraver::announce_element (Score_element_info info) diff --git a/lily/engraver.cc b/lily/engraver.cc index 6121e82eb1..9688c2b347 100644 --- a/lily/engraver.cc +++ b/lily/engraver.cc @@ -3,7 +3,7 @@ Sourcefile of GNU LilyPond musictypesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "music-list.hh" diff --git a/lily/font-metric.cc b/lily/font-metric.cc index e542a73cfe..2d631be270 100644 --- a/lily/font-metric.cc +++ b/lily/font-metric.cc @@ -10,7 +10,6 @@ #include #include - #include "font-metric.hh" Box @@ -72,6 +71,7 @@ Font_metric::~Font_metric () Font_metric::Font_metric () { self_scm_ = SCM_EOL; + name_ = SCM_EOL; smobify_self (); } @@ -98,7 +98,7 @@ Scaled_font_metric::Scaled_font_metric (Font_metric* m, int s) SCM Font_metric::description () const { - return gh_cons (ly_symbol2scm (name_str_.ch_C()), gh_int2scm (0)); + return gh_cons (name_, gh_int2scm (0)); } @@ -119,17 +119,25 @@ Font_metric::do_smobify_self () SCM Font_metric::mark_smob (SCM s) { - return SCM_EOL; + Font_metric * m = SMOB_TO_TYPE(Font_metric, s); + return m->name_; } int Font_metric::print_smob (SCM s, SCM port, scm_print_state * ) { - scm_puts ("#", port); - + Font_metric *m = unsmob_metrics (s); + scm_puts ("#name_, port); + scm_puts (">", port); return 1; } - - - +Font_metric * +unsmob_metrics( SCM s) +{ + if (SMOB_IS_TYPE_B(Font_metric, s)) + return SMOB_TO_TYPE(Font_metric, s); + else + return 0; +} diff --git a/lily/global-translator.cc b/lily/global-translator.cc index a508197c23..4993504d7b 100644 --- a/lily/global-translator.cc +++ b/lily/global-translator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "global-translator.hh" diff --git a/lily/gourlay-breaking.cc b/lily/gourlay-breaking.cc index d81f170214..beb260f3f5 100644 --- a/lily/gourlay-breaking.cc +++ b/lily/gourlay-breaking.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include // rint diff --git a/lily/grace-engraver-group.cc b/lily/grace-engraver-group.cc index cb9642af84..cb99415a2b 100644 --- a/lily/grace-engraver-group.cc +++ b/lily/grace-engraver-group.cc @@ -6,14 +6,12 @@ (c) 1999 Han-Wen Nienhuys */ - #include "grace-engraver-group.hh" #include "lily-guile.hh" + #include "score-element.hh" #include "musical-request.hh" -ADD_THIS_TRANSLATOR (Grace_engraver_group); - void Grace_engraver_group::start () { @@ -93,6 +91,8 @@ Grace_engraver_group::each (Const_method_pointer method) const if (calling_self_b_) Engraver_group_engraver::each (method); } +ADD_THIS_TRANSLATOR(Grace_engraver_group); + /* don't let the commands trickle up. diff --git a/lily/grace-performer-group.cc b/lily/grace-performer-group.cc index 2266c7b2aa..45c47ca37f 100644 --- a/lily/grace-performer-group.cc +++ b/lily/grace-performer-group.cc @@ -6,9 +6,9 @@ (c) 1999 Jan Nieuwenhuizen */ - #include "grace-performer-group.hh" #include "lily-guile.hh" + #include "audio-element.hh" ADD_THIS_TRANSLATOR (Grace_performer_group); diff --git a/lily/grace-position-engraver.cc b/lily/grace-position-engraver.cc index 3efe927415..1b9fe9534f 100644 --- a/lily/grace-position-engraver.cc +++ b/lily/grace-position-engraver.cc @@ -29,7 +29,6 @@ public: Grace_position_engraver(); }; -ADD_THIS_TRANSLATOR (Grace_position_engraver); Grace_position_engraver::Grace_position_engraver () { @@ -107,3 +106,5 @@ Grace_position_engraver::do_post_move_processing () align_l_ =0; } +ADD_THIS_TRANSLATOR(Grace_position_engraver); + diff --git a/lily/hara-kiri-engraver.cc b/lily/hara-kiri-engraver.cc index d5fecea4fa..0761b36ce3 100644 --- a/lily/hara-kiri-engraver.cc +++ b/lily/hara-kiri-engraver.cc @@ -6,13 +6,10 @@ (c) 1999 Han-Wen Nienhuys */ - #include "hara-kiri-vertical-group-spanner.hh" #include "hara-kiri-engraver.hh" #include "rhythmic-head.hh" -ADD_THIS_TRANSLATOR (Hara_kiri_engraver); - Axis_group_spanner* Hara_kiri_engraver::get_spanner_p () const { @@ -30,3 +27,4 @@ Hara_kiri_engraver::acknowledge_element (Score_element_info i) } } +ADD_THIS_TRANSLATOR(Hara_kiri_engraver); diff --git a/lily/hara-kiri-line-group-engraver.cc b/lily/hara-kiri-line-group-engraver.cc index c2c21d12ce..2d9fe8a916 100644 --- a/lily/hara-kiri-line-group-engraver.cc +++ b/lily/hara-kiri-line-group-engraver.cc @@ -10,6 +10,7 @@ #include "hara-kiri-vertical-group-spanner.hh" #include "hara-kiri-line-group-engraver.hh" + ADD_THIS_TRANSLATOR (Hara_kiri_line_group_engraver); void diff --git a/lily/idealspacing.cc b/lily/idealspacing.cc index 67c87f0ff7..ec5e17d8a9 100644 --- a/lily/idealspacing.cc +++ b/lily/idealspacing.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys */ #include "idealspacing.hh" diff --git a/lily/identifier.cc b/lily/identifier.cc index e8421fb70d..8cf65fae49 100644 --- a/lily/identifier.cc +++ b/lily/identifier.cc @@ -3,10 +3,11 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include + #include "midi-def.hh" #include "paper-def.hh" #include "score.hh" @@ -17,8 +18,6 @@ #include "translator-group.hh" #include "notename-table.hh" - - Identifier::Identifier (int code) { token_code_i_ = code; @@ -26,8 +25,6 @@ Identifier::Identifier (int code) init_b_ = 0; } - - Identifier::Identifier (Identifier const&s) : Input (s) { diff --git a/lily/includable-lexer.cc b/lily/includable-lexer.cc index a001d1e403..2634c1a1db 100644 --- a/lily/includable-lexer.cc +++ b/lily/includable-lexer.cc @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include diff --git a/lily/include/afm.hh b/lily/include/afm.hh index 8c5c0ed9ca..abc185971d 100644 --- a/lily/include/afm.hh +++ b/lily/include/afm.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/afm2.hh b/lily/include/afm2.hh new file mode 100644 index 0000000000..92a9688cca --- /dev/null +++ b/lily/include/afm2.hh @@ -0,0 +1,43 @@ +/* + afm.hh -- declare Adobe_font_metric + + source file of the GNU LilyPond music typesetter + + (c) 1998--2000 Han-Wen Nienhuys + + */ + +#ifndef AFM_HH +#define AFM_HH + +#include "string.hh" +#include "box.hh" +#include "array.hh" +#include "dictionary.hh" +#include "font-metric.hh" + +struct Adobe_font_char_metric : Character_metric { + char_metric_info_; + Adobe_font_char_metric (AFM_CharMetricInfo afm_inf); + virtual Box dimensions () const; +}; + +struct Adobe_font_metric : Font_metric { + AFM_Font_info * font_inf_; + Array ascii_to_metric_idx_; + Dictionary name_to_metric_dict_; + + Character_metric const *get_char (int, bool) const; + Adobe_font_char_metric const &find_char (String name, bool warn=true) const; + Adobe_font_char_metric const &find_ascii (int ascii,bool warn) const; + String str () const; + Adobe_font_metric (AFM_Font_info*); + +}; + +Adobe_font_metric *read_afm_file (String fn); + + + +#endif /* AFM_HH */ + diff --git a/lily/include/align-element.hh b/lily/include/align-element.hh index f97b7c6162..1ba8ea1289 100644 --- a/lily/include/align-element.hh +++ b/lily/include/align-element.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/all-font-metrics.hh b/lily/include/all-font-metrics.hh index f581d65e9e..fa6eb9097c 100644 --- a/lily/include/all-font-metrics.hh +++ b/lily/include/all-font-metrics.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ @@ -38,8 +38,5 @@ public: SCM font_descriptions () const; }; -Font_metric * unsmob_metrics (SCM s); - - #endif /* ALL_FONTS_HH */ diff --git a/lily/include/atom.hh b/lily/include/atom.hh index bd566cf911..931d43f64b 100644 --- a/lily/include/atom.hh +++ b/lily/include/atom.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef ATOM_HH diff --git a/lily/include/audio-column.hh b/lily/include/audio-column.hh index 3cd36d94e8..8b6791933e 100644 --- a/lily/include/audio-column.hh +++ b/lily/include/audio-column.hh @@ -1,7 +1,7 @@ /* audio-column.hh -- declare Audio_column - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #ifndef AUDIO_COLUMN_HH diff --git a/lily/include/audio-element.hh b/lily/include/audio-element.hh index c629bcd2b1..6dff0e01f7 100644 --- a/lily/include/audio-element.hh +++ b/lily/include/audio-element.hh @@ -3,13 +3,14 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef AUDIO_ELEMENT_HH #define AUDIO_ELEMENT_HH + #include #include "virtual-methods.hh" class Audio_element diff --git a/lily/include/audio-item.hh b/lily/include/audio-item.hh index 1c0dac33d3..08c780fecf 100644 --- a/lily/include/audio-item.hh +++ b/lily/include/audio-item.hh @@ -1,12 +1,13 @@ /* audio-item.hh -- declare Audio_items - (c) 1996, 1997--1999 Jan Nieuwenhuizen + (c) 1996, 1997--2000 Jan Nieuwenhuizen */ #ifndef AUDIO_ITEM_HH #define AUDIO_ITEM_HH + #include #include "lily-proto.hh" #include "string.hh" #include "audio-element.hh" diff --git a/lily/include/audio-staff.hh b/lily/include/audio-staff.hh index edcb5f020e..84cb1172bb 100644 --- a/lily/include/audio-staff.hh +++ b/lily/include/audio-staff.hh @@ -1,7 +1,7 @@ /* audio-staff.hh -- declare Audio_staff - (c) 1996, 1997--1999 Jan Nieuwenhuizen + (c) 1996, 1997--2000 Jan Nieuwenhuizen */ #ifndef AUDIO_STAFF_HH diff --git a/lily/include/axis-align-spanner.hh b/lily/include/axis-align-spanner.hh index 04ebf26d35..9fdb72194d 100644 --- a/lily/include/axis-align-spanner.hh +++ b/lily/include/axis-align-spanner.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/axis-group-element.hh b/lily/include/axis-group-element.hh index 3b1264d5fc..969fd7b736 100644 --- a/lily/include/axis-group-element.hh +++ b/lily/include/axis-group-element.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/axis-group-item.hh b/lily/include/axis-group-item.hh index 3f75d905e7..06561d0301 100644 --- a/lily/include/axis-group-item.hh +++ b/lily/include/axis-group-item.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/axis-group-spanner.hh b/lily/include/axis-group-spanner.hh index 9d7e0c8382..a88d9c3dad 100644 --- a/lily/include/axis-group-spanner.hh +++ b/lily/include/axis-group-spanner.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/bar-engraver.hh b/lily/include/bar-engraver.hh index 64f0063470..388cc17149 100644 --- a/lily/include/bar-engraver.hh +++ b/lily/include/bar-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/bar-number-engraver.hh b/lily/include/bar-number-engraver.hh index 0bbe98d4ed..eb1c7de7fa 100644 --- a/lily/include/bar-number-engraver.hh +++ b/lily/include/bar-number-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/bar.hh b/lily/include/bar.hh index a517fc4cdc..21ee05890c 100644 --- a/lily/include/bar.hh +++ b/lily/include/bar.hh @@ -1,7 +1,7 @@ /* bar.hh -- part of GNU LilyPond - (c) 1996--1999 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ #ifndef BAR_HH @@ -15,7 +15,6 @@ class Bar:public Item { public: VIRTUAL_COPY_CONS(Score_element); Bar(); - protected: virtual void do_pre_processing (); virtual Molecule* do_brew_molecule_p () const; diff --git a/lily/include/base-span-bar-engraver.hh b/lily/include/base-span-bar-engraver.hh index 9cf40242f6..d3a360db3b 100644 --- a/lily/include/base-span-bar-engraver.hh +++ b/lily/include/base-span-bar-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ @@ -23,6 +23,7 @@ class Axis_align_spanner; */ class Base_span_bar_engraver : public Engraver { + Span_bar * spanbar_p_; Array bar_l_arr_; public: @@ -36,7 +37,6 @@ protected: horizontal alignment priority, otherwise, hang the spanbar on the acknowledged bar. */ bool use_priority_b_; - Span_bar * spanbar_p_; virtual void acknowledge_element (Score_element_info); virtual void do_pre_move_processing(); diff --git a/lily/include/beam-engraver.hh b/lily/include/beam-engraver.hh index b0001c89df..044cfaddb7 100644 --- a/lily/include/beam-engraver.hh +++ b/lily/include/beam-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/beam.hh b/lily/include/beam.hh index e2908fe5c3..966f3f08e8 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -1,7 +1,7 @@ /* beam.hh -- part of GNU LilyPond - (c) 1996--1999 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ #ifndef BEAM_HH diff --git a/lily/include/bezier.hh b/lily/include/bezier.hh index e9771bfd05..47890afca2 100644 --- a/lily/include/bezier.hh +++ b/lily/include/bezier.hh @@ -1,7 +1,7 @@ /* bezier.hh -- declare Bezier and Bezier_bow - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ #ifndef BEZIER_HH diff --git a/lily/include/bow.hh b/lily/include/bow.hh index 16b9741486..40770af5df 100644 --- a/lily/include/bow.hh +++ b/lily/include/bow.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ @@ -23,20 +23,8 @@ */ class Bow : public Spanner { -public: - Bow (); - Offset center () const; - protected: - virtual Molecule* do_brew_molecule_p () const; - - virtual Array get_encompass_offset_arr () const; - - Interval curve_extent (Axis) const; - Bezier get_curve () const; - - Drul_array dy_f_drul_; - Drul_array dx_f_drul_; }; +#error #endif // BOW_HH diff --git a/lily/include/box.hh b/lily/include/box.hh index c53543d058..bd3a7e7703 100644 --- a/lily/include/box.hh +++ b/lily/include/box.hh @@ -5,7 +5,7 @@ #ifndef BOXES_HH #define BOXES_HH -#include "fproto.hh" +#include "flower-proto.hh" #include "real.hh" #include "interval.hh" #include "offset.hh" diff --git a/lily/include/break-algorithm.hh b/lily/include/break-algorithm.hh index e06ae4aa70..052ad732df 100644 --- a/lily/include/break-algorithm.hh +++ b/lily/include/break-algorithm.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/break-align-item.hh b/lily/include/break-align-item.hh index f5b8378a3b..20d5a3f749 100644 --- a/lily/include/break-align-item.hh +++ b/lily/include/break-align-item.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/change-iterator.hh b/lily/include/change-iterator.hh index d76908dbc1..4ab9d99e4a 100644 --- a/lily/include/change-iterator.hh +++ b/lily/include/change-iterator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/change-translator.hh b/lily/include/change-translator.hh index d69b71ce96..af18db7eb3 100644 --- a/lily/include/change-translator.hh +++ b/lily/include/change-translator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/chord-name-engraver.hh b/lily/include/chord-name-engraver.hh index 761c3a0d7e..c9a9886f6c 100644 --- a/lily/include/chord-name-engraver.hh +++ b/lily/include/chord-name-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ #ifndef CHORD_NAME_ENGRAVER_HH diff --git a/lily/include/chord-tremolo-engraver.hh b/lily/include/chord-tremolo-engraver.hh index 51b5e2a720..0330680c8a 100644 --- a/lily/include/chord-tremolo-engraver.hh +++ b/lily/include/chord-tremolo-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/include/clef-item.hh b/lily/include/clef-item.hh index 8ef0874bac..a5d5585db3 100644 --- a/lily/include/clef-item.hh +++ b/lily/include/clef-item.hh @@ -1,7 +1,7 @@ /* clef-item.hh -- declare Clef_item - (c) 1996--1999 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ #ifndef CLEFITEM_HH diff --git a/lily/include/collision-engraver.hh b/lily/include/collision-engraver.hh index c1e8e1ddc2..ec46aead22 100644 --- a/lily/include/collision-engraver.hh +++ b/lily/include/collision-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/collision.hh b/lily/include/collision.hh index f17e437834..4fe2de3906 100644 --- a/lily/include/collision.hh +++ b/lily/include/collision.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/column-x-positions.hh b/lily/include/column-x-positions.hh index 30ee56c2b2..dd5c323755 100644 --- a/lily/include/column-x-positions.hh +++ b/lily/include/column-x-positions.hh @@ -1,7 +1,7 @@ /* column-x-positions.hh -- part of GNU LilyPond - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef COLUMN_X_POSITIONS_HH diff --git a/lily/include/command-request.hh b/lily/include/command-request.hh index 9b24ac4b35..3bb3474ac0 100644 --- a/lily/include/command-request.hh +++ b/lily/include/command-request.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/crescendo.hh b/lily/include/crescendo.hh index d39f311094..ef7b6f3310 100644 --- a/lily/include/crescendo.hh +++ b/lily/include/crescendo.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/dimension-cache.hh b/lily/include/dimension-cache.hh index 990888c564..52985161a3 100644 --- a/lily/include/dimension-cache.hh +++ b/lily/include/dimension-cache.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/dot-column-engraver.hh b/lily/include/dot-column-engraver.hh index 7ac0448cc6..deec318345 100644 --- a/lily/include/dot-column-engraver.hh +++ b/lily/include/dot-column-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/dot-column.hh b/lily/include/dot-column.hh index 0389f51685..78caaf839d 100644 --- a/lily/include/dot-column.hh +++ b/lily/include/dot-column.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/dots.hh b/lily/include/dots.hh index 33c821a7b4..647a125513 100644 --- a/lily/include/dots.hh +++ b/lily/include/dots.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/duration.hh b/lily/include/duration.hh index 0423d47353..c00fc2fcaa 100644 --- a/lily/include/duration.hh +++ b/lily/include/duration.hh @@ -3,14 +3,14 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #ifndef DURATION_HH #define DURATION_HH -#include "fproto.hh" +#include "flower-proto.hh" #include "rational.hh" diff --git a/lily/include/engraver-group-engraver.hh b/lily/include/engraver-group-engraver.hh index 975a33d87a..f531ca4508 100644 --- a/lily/include/engraver-group-engraver.hh +++ b/lily/include/engraver-group-engraver.hh @@ -4,7 +4,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/engraver.hh b/lily/include/engraver.hh index a073d808ac..c8597b78dd 100644 --- a/lily/include/engraver.hh +++ b/lily/include/engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/file-results.hh b/lily/include/file-results.hh index b6b80057dc..fad91f8a2c 100644 --- a/lily/include/file-results.hh +++ b/lily/include/file-results.hh @@ -3,13 +3,13 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ #ifndef FILE_RESULTS_HH #define FILE_RESULTS_HH -#include "fproto.hh" +#include "flower-proto.hh" void do_one_file (String init_str, String file_str); extern Scope *header_global_p; diff --git a/lily/include/font-metric.hh b/lily/include/font-metric.hh index a26c2e565c..b6c9f78dce 100644 --- a/lily/include/font-metric.hh +++ b/lily/include/font-metric.hh @@ -20,10 +20,12 @@ struct Character_metric virtual ~Character_metric (); }; + + struct Font_metric { Font_metric (); - String name_str_; + SCM name_; virtual SCM description () const; virtual Character_metric const *get_char (int ascii, bool warn) const; virtual ~Font_metric (); @@ -45,6 +47,8 @@ struct Scaled_font_metric : public Font_metric virtual Box text_dimension (String) const; }; +Font_metric * unsmob_metrics (SCM s); + #endif /* FONT_METRIC_HH */ diff --git a/lily/include/font-size-engraver.hh b/lily/include/font-size-engraver.hh index d36ee64683..c0fbb35c04 100644 --- a/lily/include/font-size-engraver.hh +++ b/lily/include/font-size-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/global-translator.hh b/lily/include/global-translator.hh index 674b2af139..ebcb6b34e9 100644 --- a/lily/include/global-translator.hh +++ b/lily/include/global-translator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/gourlay-breaking.hh b/lily/include/gourlay-breaking.hh index fd8fe4b37c..9f00295076 100644 --- a/lily/include/gourlay-breaking.hh +++ b/lily/include/gourlay-breaking.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/header.hh b/lily/include/header.hh index 2a31d99266..c027fc3958 100644 --- a/lily/include/header.hh +++ b/lily/include/header.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/idealspacing.hh b/lily/include/idealspacing.hh index 82d8409330..6b8d2a44ba 100644 --- a/lily/include/idealspacing.hh +++ b/lily/include/idealspacing.hh @@ -1,7 +1,7 @@ /* idealspacing.hh -- part of GNU LilyPond - (c) 1996--1999 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ #ifndef IDEALSPACING_HH diff --git a/lily/include/identifier.hh b/lily/include/identifier.hh index ded6ac4a0e..c80a28770e 100644 --- a/lily/include/identifier.hh +++ b/lily/include/identifier.hh @@ -1,7 +1,7 @@ /* identifier.hh -- part of GNU LilyPond - (c) 1996--1999 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ #ifndef IDENTIFIER_HH @@ -19,7 +19,6 @@ class Notename_table_identifier; class Translator_group_identifier; class Music_identifier; class Articulation_req_identifier; -class Symtables_identifier; class Midi_def_identifier; class Paper_def_identifier; class Real_identifier; @@ -36,7 +35,9 @@ virtual Class * access_content_ ## Class (bool) const { error (#Class + String /** - A declarable data structure in mudela. + A declarable data structure in mudela. + + TODO: use SCM and SMOBS for union datatype. */ struct Identifier : public Input { bool init_b_; @@ -54,7 +55,6 @@ struct Identifier : public Input { IDACCESSOR(Translator_group) IDACCESSOR(Notename_table) IDACCESSOR(Music) - IDACCESSOR(Symtables) IDACCESSOR(Midi_def) IDACCESSOR(Paper_def) IDACCESSOR(Real) @@ -90,7 +90,6 @@ DECLARE_ID_CLASS(Notename_table); DECLARE_ID_CLASS(Real); DECLARE_ID_CLASS(String); DECLARE_ID_CLASS(General_script_def); -DECLARE_ID_CLASS(Symtables); DECLARE_ID_CLASS(Music); DECLARE_ID_CLASS(int); DECLARE_ID_CLASS(Score); diff --git a/lily/include/includable-lexer.hh b/lily/include/includable-lexer.hh index 5acf3cc6c5..6b54d9a573 100644 --- a/lily/include/includable-lexer.hh +++ b/lily/include/includable-lexer.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ @@ -14,7 +14,7 @@ #include "string.hh" #include "parray.hh" -#include "fproto.hh" +#include "flower-proto.hh" #include "proto.hh" // GIGA urg! diff --git a/lily/include/item.hh b/lily/include/item.hh index b9e2fd8130..e8ac64c183 100644 --- a/lily/include/item.hh +++ b/lily/include/item.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef ITEM_HH #define ITEM_HH @@ -47,7 +47,6 @@ public: /// I am really to be broken? bool breakable_b () const; bool broken_b () const; - bool broken_original_b () const; Direction break_status_dir () const; diff --git a/lily/include/key-engraver.hh b/lily/include/key-engraver.hh index fa5dbc4ff7..6e7850290d 100644 --- a/lily/include/key-engraver.hh +++ b/lily/include/key-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/key-item.hh b/lily/include/key-item.hh index ac80432208..6c78e9f29e 100644 --- a/lily/include/key-item.hh +++ b/lily/include/key-item.hh @@ -1,7 +1,7 @@ /* key-item.hh -- part of GNU LilyPond - (c) 1996--1999 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ #ifndef KEYITEM_HH diff --git a/lily/include/key-performer.hh b/lily/include/key-performer.hh index 896db23ba4..335614b91e 100644 --- a/lily/include/key-performer.hh +++ b/lily/include/key-performer.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #ifndef KEY_PERFOMER_HH diff --git a/lily/include/key.hh b/lily/include/key.hh index aa93545331..5c24db2f08 100644 --- a/lily/include/key.hh +++ b/lily/include/key.hh @@ -1,7 +1,7 @@ /* key.hh -- declare Key, Octave_key - (c) 1996--1999 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ #ifndef KEY_HH diff --git a/lily/include/keyword.hh b/lily/include/keyword.hh index 74bcc33c48..2db22765e0 100644 --- a/lily/include/keyword.hh +++ b/lily/include/keyword.hh @@ -1,7 +1,7 @@ /* keyword.hh -- part of GNU LilyPond - (c) 1996--1999 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ #ifndef KEYWORD_HH diff --git a/lily/include/least-squares.hh b/lily/include/least-squares.hh new file mode 100644 index 0000000000..678378eb0a --- /dev/null +++ b/lily/include/least-squares.hh @@ -0,0 +1,19 @@ +/* + leastsquare.hh -- part of GNU LilyPond + + (c) 1996--2000 Han-Wen Nienhuys +*/ + +#ifndef LEASTSQUARE_HH +#define LEASTSQUARE_HH +#include "array.hh" +#include "offset.hh" + + +/** + Least squares minimisation in 2 variables. + */ +void minimise_least_squares (Real * coef, Real * offset, Array); + +#endif // LEASTSQUARE_HH + diff --git a/lily/include/leastsquares.hh b/lily/include/leastsquares.hh index cb89b7bd72..65296f8106 100644 --- a/lily/include/leastsquares.hh +++ b/lily/include/leastsquares.hh @@ -1,24 +1,2 @@ -/* - leastsquare.hh -- part of GNU LilyPond - - (c) 1996--1999 Han-Wen Nienhuys -*/ - -#ifndef LEASTSQUARE_HH -#define LEASTSQUARE_HH -#include "array.hh" -#include "offset.hh" - - -/** - Least squares minimisation in 2 variables. - */ -struct Least_squares { - Array input; - void minimise (Real &coef, Real &offset); - void OK() const; -}; - - -#endif // LEASTSQUARE_HH +#error diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index c9c4e6a997..28cf68fa91 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ #ifndef LILY_GUILE_HH @@ -19,17 +19,14 @@ SCM ly_str02scm (char const*c); SCM ly_eval_str (String s); SCM ly_symbol2scm (char const *); String ly_symbol2string (SCM); -SCM ly_set_x (String name , SCM val); -SCM ly_append (SCM a, SCM b); +SCM ly_offset2scm (Offset o); + SCM ly_eval (SCM a); -SCM ly_func_o (char const* name); SCM ly_parse_scm (char const* s, int* n); SCM ly_quote_scm (SCM s); void ly_display_scm (SCM s); String ly_scm2string (SCM s); -SCM array_to_list (SCM *a , int l); - #include "array.hh" @@ -52,10 +49,10 @@ templatevoid scm_to_array (SCM s, Array* arr); //URG how templates suck! SCM to_scm (int i); -void scm_to (SCM s, int* i); +int scm_to (SCM s, int* i); SCM to_scm (Real r); -void scm_to (SCM s, Real* r); +Real scm_to (SCM s, Real* r); /* snarfing. diff --git a/lily/include/lily-guile.icc b/lily/include/lily-guile.icc index 9fb611a64b..42bc9b772d 100644 --- a/lily/include/lily-guile.icc +++ b/lily/include/lily-guile.icc @@ -25,6 +25,8 @@ array_to_scm (Array arr) Array scm_to_array (SCM s) check scm? + + UGH. junkme. */ templatevoid scm_to_array (SCM s, Array* arr) @@ -32,8 +34,7 @@ scm_to_array (SCM s, Array* arr) arr->clear (); for (; gh_pair_p (s); s= gh_cdr (s)) { - T t; - scm_to (gh_car (s), &t); + T t = scm_to (gh_car (s), (T*) 0); arr->push (t); } } diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index d38f6743c2..52a930409c 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef LILY_PROTO_HH @@ -16,7 +16,6 @@ struct Absolute_dynamic_req; struct Adobe_font_char_metric; struct Adobe_font_metric; struct Align_element; -struct Align_note_column_engraver; struct All_font_metrics; struct Articulation_req; struct Atom; @@ -56,7 +55,6 @@ struct Blank_req; struct Bow; struct Box; struct Bracket_req; -struct Break_align_engraver; struct Break_align_item; struct Break_req; struct CHyphen_req; @@ -88,7 +86,6 @@ struct Dot_column; struct Dots; struct Durational_req; struct Dynamic; -struct Dynamic_engraver; struct Dynamic_req; struct Element_group; struct Element_group_item; @@ -101,8 +98,6 @@ struct Font_metric; struct General_script_def; struct Global_translator; struct Grace_align_item; -struct Grace_position_engraver; -struct Grace_position_performer; struct Hara_kiri_group_spanner; struct Hara_kiri_line_group_engraver; struct Head_column; @@ -131,7 +126,6 @@ struct Lyric_item; struct Lyric_req; struct Mark_req; struct Measure_grouping_req; -struct Melisma_engraver; struct Melodic_req; struct Midi_def; struct Midi_duration; @@ -172,7 +166,6 @@ struct Note_column; struct Note_column_engraver; struct Note_head; struct Note_head_engraver; -struct Note_name_engraver; struct Note_performer; struct Note_req; struct Notename_table; @@ -189,7 +182,6 @@ struct Performer; struct Performer; struct Performer_group_performer; struct Piano_brace; -struct Property_engraver; struct Property_iterator; struct Rational; struct Re_rhythmed_music; @@ -216,7 +208,6 @@ struct Score_element; struct Score_element_info; struct Score_performer; struct Script; -struct Script_column_engraver; struct Script_req; struct Separating_group_spanner; struct Sequential_music; @@ -229,7 +220,6 @@ struct Slur; struct Slur_engraver; struct Spacing_spanner; struct Span_bar; -struct Span_bar_engraver; struct Span_req; struct Span_score_bar; struct Spanner; @@ -240,7 +230,6 @@ struct Staff_performer; struct Staff_side; struct Staff_side_item; struct Staff_symbol; -struct Staff_symbol_engraver; struct Stem; struct Stem_beam_engraver; struct Stem_req; @@ -250,7 +239,6 @@ struct Super_element; struct Symtable; struct Symtables; struct Tempo_req; -struct Tex_engraver; struct Tex_font_char_metric; struct Tex_font_metric; struct Tex_font_metric_reader; diff --git a/lily/include/line-group-group-engraver.hh b/lily/include/line-group-group-engraver.hh index 274301e8b3..72a10c72a5 100644 --- a/lily/include/line-group-group-engraver.hh +++ b/lily/include/line-group-group-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/line-of-score.hh b/lily/include/line-of-score.hh index a6b937a13f..1c65a78ebc 100644 --- a/lily/include/line-of-score.hh +++ b/lily/include/line-of-score.hh @@ -1,7 +1,7 @@ /* line-of-score.hh -- part of GNU LilyPond - (c) 1996--1999 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ #ifndef SCORELINE_HH diff --git a/lily/include/local-key-engraver.hh b/lily/include/local-key-engraver.hh index 260496bd0c..a42051d7cc 100644 --- a/lily/include/local-key-engraver.hh +++ b/lily/include/local-key-engraver.hh @@ -1,7 +1,7 @@ /* local-key-engraver.hh -- declare Local_key_engraver - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/local-key-item.hh b/lily/include/local-key-item.hh index 9fdcb039f5..626af84454 100644 --- a/lily/include/local-key-item.hh +++ b/lily/include/local-key-item.hh @@ -1,7 +1,7 @@ /* local-key-item.hh -- part of GNU LilyPond - (c) 1996--1999 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ #ifndef LOCALKEYITEM_HH diff --git a/lily/include/lookup.hh b/lily/include/lookup.hh index a566f34b7c..5b83aef91e 100644 --- a/lily/include/lookup.hh +++ b/lily/include/lookup.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ @@ -12,7 +12,7 @@ #include "lily-guile.hh" #include "molecule.hh" -#include "fproto.hh" +#include "flower-proto.hh" #include "direction.hh" #include "box.hh" diff --git a/lily/include/lyric-engraver.hh b/lily/include/lyric-engraver.hh index d986205efd..7ed599e275 100644 --- a/lily/include/lyric-engraver.hh +++ b/lily/include/lyric-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/lyric-performer.hh b/lily/include/lyric-performer.hh index d5198fafac..6619ab29ee 100644 --- a/lily/include/lyric-performer.hh +++ b/lily/include/lyric-performer.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ diff --git a/lily/include/main.hh b/lily/include/main.hh index 1645971630..0d7b4ffa1c 100644 --- a/lily/include/main.hh +++ b/lily/include/main.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef MAIN_HH #define MAIN_HH diff --git a/lily/include/mark-engraver.hh b/lily/include/mark-engraver.hh index 314da60c17..0d9dd4eebf 100644 --- a/lily/include/mark-engraver.hh +++ b/lily/include/mark-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ diff --git a/lily/include/midi-def.hh b/lily/include/midi-def.hh index ee91484dda..67cdcef249 100644 --- a/lily/include/midi-def.hh +++ b/lily/include/midi-def.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ diff --git a/lily/include/midi-item.hh b/lily/include/midi-item.hh index f24322e107..b10ad8c5f9 100644 --- a/lily/include/midi-item.hh +++ b/lily/include/midi-item.hh @@ -1,7 +1,7 @@ /* midi-item.hh -- declare Midi items - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #ifndef MIDI_ITEM_HH diff --git a/lily/include/midi-stream.hh b/lily/include/midi-stream.hh index 06c4f84ffc..13132e6d28 100644 --- a/lily/include/midi-stream.hh +++ b/lily/include/midi-stream.hh @@ -1,7 +1,7 @@ /* midi-stream.hh -- declare Midi_stream - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #ifndef MIDI_STREAM_HH diff --git a/lily/include/midi-walker.hh b/lily/include/midi-walker.hh index f732324ece..e899f00572 100644 --- a/lily/include/midi-walker.hh +++ b/lily/include/midi-walker.hh @@ -1,7 +1,7 @@ /* midi-walker.hh -- declare Midi_walker - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/include/minterval.hh b/lily/include/minterval.hh index df194e6d83..f0381848f4 100644 --- a/lily/include/minterval.hh +++ b/lily/include/minterval.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh index 90102b6242..d33a100cdf 100644 --- a/lily/include/molecule.hh +++ b/lily/include/molecule.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef MOLECULE_HH #define MOLECULE_HH diff --git a/lily/include/mudela-version.hh b/lily/include/mudela-version.hh index 0547e21329..f8d8e510ed 100644 --- a/lily/include/mudela-version.hh +++ b/lily/include/mudela-version.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ diff --git a/lily/include/multi-measure-rest-engraver.hh b/lily/include/multi-measure-rest-engraver.hh index aa36e00edf..c976d681f8 100644 --- a/lily/include/multi-measure-rest-engraver.hh +++ b/lily/include/multi-measure-rest-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ #ifndef MULTI_MEASURE_REST_ENGRAVER_HH diff --git a/lily/include/multi-measure-rest.hh b/lily/include/multi-measure-rest.hh index 1d5fc2bcce..adf3c718d8 100644 --- a/lily/include/multi-measure-rest.hh +++ b/lily/include/multi-measure-rest.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ diff --git a/lily/include/music-iterator.hh b/lily/include/music-iterator.hh index f7d9c061e3..754525578a 100644 --- a/lily/include/music-iterator.hh +++ b/lily/include/music-iterator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/music-list.hh b/lily/include/music-list.hh index e36fefec73..98b2ce82ed 100644 --- a/lily/include/music-list.hh +++ b/lily/include/music-list.hh @@ -4,7 +4,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/music-output-def.hh b/lily/include/music-output-def.hh index ee91b59f8a..c19f9ce6fe 100644 --- a/lily/include/music-output-def.hh +++ b/lily/include/music-output-def.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/music-output.hh b/lily/include/music-output.hh index 8c65ab21f6..9ff2f50790 100644 --- a/lily/include/music-output.hh +++ b/lily/include/music-output.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/music-wrapper-iterator.hh b/lily/include/music-wrapper-iterator.hh index 0f8ab73454..97bbe2abc1 100644 --- a/lily/include/music-wrapper-iterator.hh +++ b/lily/include/music-wrapper-iterator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/music-wrapper.hh b/lily/include/music-wrapper.hh index f01a39ff9a..95d7f0bd84 100644 --- a/lily/include/music-wrapper.hh +++ b/lily/include/music-wrapper.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/music.hh b/lily/include/music.hh index 0bd1e966d0..fc8d7162dd 100644 --- a/lily/include/music.hh +++ b/lily/include/music.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/musical-pitch.hh b/lily/include/musical-pitch.hh index 54899cabb4..7bc94b499f 100644 --- a/lily/include/musical-pitch.hh +++ b/lily/include/musical-pitch.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ @@ -45,7 +45,7 @@ struct Musical_pitch : public Input }; SCM to_scm (Musical_pitch p); -void scm_to (SCM s, Musical_pitch* p); +Musical_pitch scm_to (SCM s, Musical_pitch* p); #include "compare.hh" INSTANTIATE_COMPARE(Musical_pitch, Musical_pitch::compare); diff --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index 963f6079fa..37f3d6ad09 100644 --- a/lily/include/musical-request.hh +++ b/lily/include/musical-request.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/my-lily-lexer.hh b/lily/include/my-lily-lexer.hh index cc86ccdac1..5cb3eb0124 100644 --- a/lily/include/my-lily-lexer.hh +++ b/lily/include/my-lily-lexer.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef LEXER_HH @@ -13,8 +13,7 @@ #include "dictionary.hh" #include "lily-proto.hh" -#include "lily-proto.hh" -#include "fproto.hh" +#include "flower-proto.hh" #include "array.hh" #include "string.hh" #include "includable-lexer.hh" @@ -47,8 +46,6 @@ public: Input here_input () const; void start_main_input (); - bool notename_b (String) const; - bool chordmodifier_b (String) const; void set_chordmodifier_table (Notename_table*tab_p); void set_notename_table (Notename_table*tab_p); Identifier*lookup_identifier (String s); diff --git a/lily/include/my-lily-parser.hh b/lily/include/my-lily-parser.hh index 01944e6e2d..4231886b7e 100644 --- a/lily/include/my-lily-parser.hh +++ b/lily/include/my-lily-parser.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/note-column.hh b/lily/include/note-column.hh index 1738e427e2..48f6215d48 100644 --- a/lily/include/note-column.hh +++ b/lily/include/note-column.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/note-head.hh b/lily/include/note-head.hh index d08b85143d..17f2a977f2 100644 --- a/lily/include/note-head.hh +++ b/lily/include/note-head.hh @@ -1,7 +1,7 @@ /* note-head.hh -- part of GNU LilyPond - (c) 1996--1999 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ #ifndef NOTEHEAD_HH diff --git a/lily/include/note-heads-engraver.hh b/lily/include/note-heads-engraver.hh index 9431618b19..1d8d667975 100644 --- a/lily/include/note-heads-engraver.hh +++ b/lily/include/note-heads-engraver.hh @@ -1,7 +1,7 @@ /* head-engraver.hh -- part of GNU LilyPond - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/note-performer.hh b/lily/include/note-performer.hh index 0536786d81..beaae306d9 100644 --- a/lily/include/note-performer.hh +++ b/lily/include/note-performer.hh @@ -1,7 +1,7 @@ /* note-performer.hh -- declare Note_performer - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/include/notename-table.hh b/lily/include/notename-table.hh index 2bbb8e175a..2d84a7ead0 100644 --- a/lily/include/notename-table.hh +++ b/lily/include/notename-table.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/paper-column.hh b/lily/include/paper-column.hh index c898b9faac..16b0585057 100644 --- a/lily/include/paper-column.hh +++ b/lily/include/paper-column.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/paper-def.hh b/lily/include/paper-def.hh index b3147fb9e6..37e35c1b66 100644 --- a/lily/include/paper-def.hh +++ b/lily/include/paper-def.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/paper-outputter.hh b/lily/include/paper-outputter.hh index 5a17fb60f9..09e8f58bdd 100644 --- a/lily/include/paper-outputter.hh +++ b/lily/include/paper-outputter.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/paper-score.hh b/lily/include/paper-score.hh index 3d33f133bc..9938895086 100644 --- a/lily/include/paper-score.hh +++ b/lily/include/paper-score.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/performance.hh b/lily/include/performance.hh index 55e9b44052..e07dc6a89f 100644 --- a/lily/include/performance.hh +++ b/lily/include/performance.hh @@ -1,7 +1,7 @@ /* performance.hh -- declare Performance - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #ifndef PERFORMANCE_HH diff --git a/lily/include/performer-group-performer.hh b/lily/include/performer-group-performer.hh index 16eb2e8ccb..e61a3a352b 100644 --- a/lily/include/performer-group-performer.hh +++ b/lily/include/performer-group-performer.hh @@ -1,7 +1,7 @@ /* performer-group-performer.hh -- declare Performer_group_performer - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/include/performer.hh b/lily/include/performer.hh index ce5b71ad51..9213f81fb4 100644 --- a/lily/include/performer.hh +++ b/lily/include/performer.hh @@ -1,7 +1,7 @@ /* performer.hh -- declare Performer - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/include/pitch-squash-engraver.hh b/lily/include/pitch-squash-engraver.hh index bc1b7be97b..9e06f31b68 100644 --- a/lily/include/pitch-squash-engraver.hh +++ b/lily/include/pitch-squash-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/priority-halign-engraver.hh b/lily/include/priority-halign-engraver.hh index 4bd3e871b7..a3209d8b13 100644 --- a/lily/include/priority-halign-engraver.hh +++ b/lily/include/priority-halign-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/property-iterator.hh b/lily/include/property-iterator.hh index 0ad84e0fd4..f60632a9e8 100644 --- a/lily/include/property-iterator.hh +++ b/lily/include/property-iterator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/protected-scm.hh b/lily/include/protected-scm.hh index 4574b212fc..cbe08a30c0 100644 --- a/lily/include/protected-scm.hh +++ b/lily/include/protected-scm.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/relative-music.hh b/lily/include/relative-music.hh index 2d7cff937b..53e770f76a 100644 --- a/lily/include/relative-music.hh +++ b/lily/include/relative-music.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/repeat-engraver.hh b/lily/include/repeat-engraver.hh index 2a4067e02e..f3887077b3 100644 --- a/lily/include/repeat-engraver.hh +++ b/lily/include/repeat-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ #ifndef REPEAT_ENGRAVER_HH diff --git a/lily/include/request-chord-iterator.hh b/lily/include/request-chord-iterator.hh index dea114deec..fb9b38e042 100644 --- a/lily/include/request-chord-iterator.hh +++ b/lily/include/request-chord-iterator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/request-chord.hh b/lily/include/request-chord.hh index bce7bd295a..c558419bc2 100644 --- a/lily/include/request-chord.hh +++ b/lily/include/request-chord.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/request.hh b/lily/include/request.hh index 496e4209b0..0b8ec16d6a 100644 --- a/lily/include/request.hh +++ b/lily/include/request.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef REQUEST_HH diff --git a/lily/include/rest-collision-engraver.hh b/lily/include/rest-collision-engraver.hh index 20e08e8092..c0de52bdbc 100644 --- a/lily/include/rest-collision-engraver.hh +++ b/lily/include/rest-collision-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/rest-collision.hh b/lily/include/rest-collision.hh index e500c2aa12..8de616c71d 100644 --- a/lily/include/rest-collision.hh +++ b/lily/include/rest-collision.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/rest-engraver.hh b/lily/include/rest-engraver.hh index 17be07afee..a3b6ced3e3 100644 --- a/lily/include/rest-engraver.hh +++ b/lily/include/rest-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/rest.hh b/lily/include/rest.hh index 591c9eb81b..ce95e6396b 100644 --- a/lily/include/rest.hh +++ b/lily/include/rest.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/rhythmic-column-engraver.hh b/lily/include/rhythmic-column-engraver.hh index a830da1f27..f67c6bff58 100644 --- a/lily/include/rhythmic-column-engraver.hh +++ b/lily/include/rhythmic-column-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/rhythmic-head.hh b/lily/include/rhythmic-head.hh index d16d03391c..3de4c87ace 100644 --- a/lily/include/rhythmic-head.hh +++ b/lily/include/rhythmic-head.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/rod.hh b/lily/include/rod.hh index 4d1f13982e..4374f3c4ef 100644 --- a/lily/include/rod.hh +++ b/lily/include/rod.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/scope.hh b/lily/include/scope.hh index 3699953bbb..fb3f140535 100644 --- a/lily/include/scope.hh +++ b/lily/include/scope.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/score-element-info.hh b/lily/include/score-element-info.hh index b9cd13aa27..4d9ede8691 100644 --- a/lily/include/score-element-info.hh +++ b/lily/include/score-element-info.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/score-engraver.hh b/lily/include/score-engraver.hh index 0f32d95c29..669a301f4a 100644 --- a/lily/include/score-engraver.hh +++ b/lily/include/score-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/score-performer.hh b/lily/include/score-performer.hh index 289f694828..839d1a456e 100644 --- a/lily/include/score-performer.hh +++ b/lily/include/score-performer.hh @@ -1,7 +1,7 @@ /* score-performer.hh -- declare Score_performer - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/include/score-priority-engraver.hh b/lily/include/score-priority-engraver.hh index b84174780b..3ec4360f91 100644 --- a/lily/include/score-priority-engraver.hh +++ b/lily/include/score-priority-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/score.hh b/lily/include/score.hh index bc89e7ae8a..a496159b10 100644 --- a/lily/include/score.hh +++ b/lily/include/score.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/script-engraver.hh b/lily/include/script-engraver.hh index 9cdb243775..b4862c1317 100644 --- a/lily/include/script-engraver.hh +++ b/lily/include/script-engraver.hh @@ -1,7 +1,7 @@ /* script-engraver.hh -- part of GNU LilyPond - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/separating-group-spanner.hh b/lily/include/separating-group-spanner.hh index 059a3ae7c8..6deb0fba8e 100644 --- a/lily/include/separating-group-spanner.hh +++ b/lily/include/separating-group-spanner.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/separating-line-group-engraver.hh b/lily/include/separating-line-group-engraver.hh index 363ab36beb..eccb4b0ee4 100644 --- a/lily/include/separating-line-group-engraver.hh +++ b/lily/include/separating-line-group-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/sequential-music-iterator.hh b/lily/include/sequential-music-iterator.hh index 160556cc9d..0d2565abf5 100644 --- a/lily/include/sequential-music-iterator.hh +++ b/lily/include/sequential-music-iterator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef SEQUENTIAL_MUSIC_ITERATOR_HH diff --git a/lily/include/simultaneous-music-iterator.hh b/lily/include/simultaneous-music-iterator.hh index 1671a30ef6..96ec914760 100644 --- a/lily/include/simultaneous-music-iterator.hh +++ b/lily/include/simultaneous-music-iterator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/single-malt-grouping-item.hh b/lily/include/single-malt-grouping-item.hh index 27477b05bd..78c325dcf7 100644 --- a/lily/include/single-malt-grouping-item.hh +++ b/lily/include/single-malt-grouping-item.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/slur-engraver.hh b/lily/include/slur-engraver.hh index ba470672f8..d82cb95cdb 100644 --- a/lily/include/slur-engraver.hh +++ b/lily/include/slur-engraver.hh @@ -1,7 +1,7 @@ /* slur-engraver.hh -- declare Slur_engraver - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/slur.hh b/lily/include/slur.hh index 6e703459a3..2fc37f1df8 100644 --- a/lily/include/slur.hh +++ b/lily/include/slur.hh @@ -1,19 +1,19 @@ /* slur.hh -- declare Slur - (c) 1996--1999 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ #ifndef SLUR_HH #define SLUR_HH -#include "bow.hh" +#include "spanner.hh" #include "rod.hh" /** A #Bow# which tries to drape itself around the stems too. */ -class Slur : public Bow +class Slur : public Spanner { int cross_staff_count () const; Offset encompass_offset (Note_column const* )const; @@ -23,8 +23,13 @@ public: void add_column (Note_column*); + protected: + virtual Molecule* do_brew_molecule_p () const; virtual Array get_encompass_offset_arr () const; + Bezier get_curve () const; + Drul_array dy_f_drul_; + Drul_array dx_f_drul_; virtual Direction get_default_dir () const; virtual void do_post_processing (); diff --git a/lily/include/span-bar.hh b/lily/include/span-bar.hh index 6d6e01c1a2..77b6429fe3 100644 --- a/lily/include/span-bar.hh +++ b/lily/include/span-bar.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/span-score-bar-engraver.hh b/lily/include/span-score-bar-engraver.hh index 9dff3b412c..56844615bf 100644 --- a/lily/include/span-score-bar-engraver.hh +++ b/lily/include/span-score-bar-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ @@ -37,7 +37,6 @@ public: VIRTUAL_COPY_CONS (Translator); virtual Span_bar * get_span_bar_p () const; - virtual void acknowledge_element (Score_element_info); }; /** diff --git a/lily/include/spanner.hh b/lily/include/spanner.hh index ec711110e2..7736ed8610 100644 --- a/lily/include/spanner.hh +++ b/lily/include/spanner.hh @@ -1,7 +1,7 @@ /* spanner.hh -- part of GNU LilyPond - (c) 1996--1999 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ #ifndef SPANNER_HH diff --git a/lily/include/staff-info.hh b/lily/include/staff-info.hh index bc544d0d03..d41b391357 100644 --- a/lily/include/staff-info.hh +++ b/lily/include/staff-info.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/staff-margin-engraver.hh b/lily/include/staff-margin-engraver.hh index 9d899b0e42..3841da0deb 100644 --- a/lily/include/staff-margin-engraver.hh +++ b/lily/include/staff-margin-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ diff --git a/lily/include/staff-performer.hh b/lily/include/staff-performer.hh index 1eb3cda727..4c552e081f 100644 --- a/lily/include/staff-performer.hh +++ b/lily/include/staff-performer.hh @@ -1,7 +1,7 @@ /* staff-performer.hh -- declare Staff_performer - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/include/staff-symbol-referencer.hh b/lily/include/staff-symbol-referencer.hh index d9d05da018..834310db08 100644 --- a/lily/include/staff-symbol-referencer.hh +++ b/lily/include/staff-symbol-referencer.hh @@ -42,7 +42,7 @@ public: int compare_position (Score_element *const&,Score_element *const&); -Staff_symbol_referencer_interface staff_symbol_referencer_interface (Score_element const*); +Staff_symbol_referencer_interface staff_symbol_referencer (Score_element const*); #endif /* STAFF_SYMBOL_REFERENCER_HH */ diff --git a/lily/include/staff-symbol.hh b/lily/include/staff-symbol.hh index 8fde55f94d..ea6a408653 100644 --- a/lily/include/staff-symbol.hh +++ b/lily/include/staff-symbol.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/stem-engraver.hh b/lily/include/stem-engraver.hh index 1971d53754..678a5800bd 100644 --- a/lily/include/stem-engraver.hh +++ b/lily/include/stem-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/stem-info.hh b/lily/include/stem-info.hh index a9fd826e05..f4f87721a1 100644 --- a/lily/include/stem-info.hh +++ b/lily/include/stem-info.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ diff --git a/lily/include/stem-tremolo.hh b/lily/include/stem-tremolo.hh index d17936fbec..9ef3b06829 100644 --- a/lily/include/stem-tremolo.hh +++ b/lily/include/stem-tremolo.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/stem.hh b/lily/include/stem.hh index 41a8a78fe6..2f8298c4d8 100644 --- a/lily/include/stem.hh +++ b/lily/include/stem.hh @@ -1,7 +1,7 @@ /* stem.hh -- declare Stem - (c) 1996--1999 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ #ifndef STEM_HH diff --git a/lily/include/super-element.hh b/lily/include/super-element.hh index 6e541e0a8a..c27d1bd963 100644 --- a/lily/include/super-element.hh +++ b/lily/include/super-element.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/swallow-engraver.hh b/lily/include/swallow-engraver.hh index 64f5f190ee..2ce555683c 100644 --- a/lily/include/swallow-engraver.hh +++ b/lily/include/swallow-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/swallow-perf.hh b/lily/include/swallow-perf.hh index 38b84befe3..a3c123382d 100644 --- a/lily/include/swallow-perf.hh +++ b/lily/include/swallow-perf.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/tempo-performer.hh b/lily/include/tempo-performer.hh index 97c272f131..fc7be5139a 100644 --- a/lily/include/tempo-performer.hh +++ b/lily/include/tempo-performer.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #ifndef TEMPO_PERFORMER_HH diff --git a/lily/include/text-item.hh b/lily/include/text-item.hh index 930af37e10..e3c7a89c33 100644 --- a/lily/include/text-item.hh +++ b/lily/include/text-item.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/tie-engraver.hh b/lily/include/tie-engraver.hh index 7246d0e4f8..bae7f6aa9a 100644 --- a/lily/include/tie-engraver.hh +++ b/lily/include/tie-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/tie.hh b/lily/include/tie.hh index 7fe61a3850..16b3ff13e3 100644 --- a/lily/include/tie.hh +++ b/lily/include/tie.hh @@ -3,20 +3,20 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef TIE_HH #define TIE_HH -#include "bow.hh" +#include "spanner.hh" #include "rod.hh" /** Connect two noteheads. */ -class Tie : public Bow +class Tie : public Spanner { public: Tie (); @@ -24,7 +24,15 @@ public: VIRTUAL_COPY_CONS(Score_element); Note_head* head (Direction) const; + protected: + virtual Molecule* do_brew_molecule_p () const; + virtual Array get_encompass_offset_arr () const; + Bezier get_curve () const; + + Drul_array dy_f_drul_; + Drul_array dx_f_drul_; + virtual void do_add_processing (); virtual void do_post_processing (); virtual Direction get_default_dir() const; diff --git a/lily/include/time-scaled-music-iterator.hh b/lily/include/time-scaled-music-iterator.hh index 192efc9935..28ab473db0 100644 --- a/lily/include/time-scaled-music-iterator.hh +++ b/lily/include/time-scaled-music-iterator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/time-scaled-music.hh b/lily/include/time-scaled-music.hh index 98fb5286ce..21d8e70d87 100644 --- a/lily/include/time-scaled-music.hh +++ b/lily/include/time-scaled-music.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/time-signature-engraver.hh b/lily/include/time-signature-engraver.hh index 39770351c7..aa35e921ee 100644 --- a/lily/include/time-signature-engraver.hh +++ b/lily/include/time-signature-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/time-signature-performer.hh b/lily/include/time-signature-performer.hh index e03514706d..c2c8330715 100644 --- a/lily/include/time-signature-performer.hh +++ b/lily/include/time-signature-performer.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #ifndef TIME_SIGNATURE_PERFORMER_HH diff --git a/lily/include/time-signature.hh b/lily/include/time-signature.hh index fbe2f826b0..f349166731 100644 --- a/lily/include/time-signature.hh +++ b/lily/include/time-signature.hh @@ -1,7 +1,7 @@ /* time_signature.hh -- declare Time_signature - (c) 1996--1999 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ #ifndef METER_HH diff --git a/lily/include/timing-engraver.hh b/lily/include/timing-engraver.hh index bcbbfd6e51..5ac4f8a338 100644 --- a/lily/include/timing-engraver.hh +++ b/lily/include/timing-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/timing-translator.hh b/lily/include/timing-translator.hh index 84ca4d0528..4309878562 100644 --- a/lily/include/timing-translator.hh +++ b/lily/include/timing-translator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/translation-property.hh b/lily/include/translation-property.hh index 8278dd829d..aecce178f2 100644 --- a/lily/include/translation-property.hh +++ b/lily/include/translation-property.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/translator-change.hh b/lily/include/translator-change.hh index 676ffc1b20..508e3d38f0 100644 --- a/lily/include/translator-change.hh +++ b/lily/include/translator-change.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/translator-group.hh b/lily/include/translator-group.hh index 0846cc9f6d..6601498d71 100644 --- a/lily/include/translator-group.hh +++ b/lily/include/translator-group.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/translator.hh b/lily/include/translator.hh index c97234aa15..6c4e314941 100644 --- a/lily/include/translator.hh +++ b/lily/include/translator.hh @@ -3,12 +3,13 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef TRANSLATOR_HH #define TRANSLATOR_HH + #include #include "global-ctor.hh" #include "string.hh" #include "lily-proto.hh" diff --git a/lily/include/transposed-music.hh b/lily/include/transposed-music.hh index 4643e71a75..7ae1db5595 100644 --- a/lily/include/transposed-music.hh +++ b/lily/include/transposed-music.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/tuplet-engraver.hh b/lily/include/tuplet-engraver.hh index b78c6f300c..7b50fb86ec 100644 --- a/lily/include/tuplet-engraver.hh +++ b/lily/include/tuplet-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/include/tuplet-spanner.hh b/lily/include/tuplet-spanner.hh index d56a331a0e..de429e8954 100644 --- a/lily/include/tuplet-spanner.hh +++ b/lily/include/tuplet-spanner.hh @@ -1,7 +1,7 @@ /* plet-spanner.hh -- part of GNU LilyPond - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #ifndef Tuplet_spanner_HH @@ -25,6 +25,8 @@ public: void add_column (Note_column*); void add_beam (Beam*); protected: + void calc_position_and_height (Real*,Real*)const; + virtual Molecule* do_brew_molecule_p () const; VIRTUAL_COPY_CONS(Score_element); virtual void do_add_processing (); diff --git a/lily/include/type-swallow-translator.hh b/lily/include/type-swallow-translator.hh index da857f6c29..76f9670f58 100644 --- a/lily/include/type-swallow-translator.hh +++ b/lily/include/type-swallow-translator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/vertical-align-engraver.hh b/lily/include/vertical-align-engraver.hh index 98e7ed5495..286395fceb 100644 --- a/lily/include/vertical-align-engraver.hh +++ b/lily/include/vertical-align-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/include/volta-spanner.hh b/lily/include/volta-spanner.hh index 9009c0ceb5..a4f32c0354 100644 --- a/lily/include/volta-spanner.hh +++ b/lily/include/volta-spanner.hh @@ -1,7 +1,7 @@ /* volta-spanner.hh -- part of GNU LilyPond - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #ifndef VOLTA_SPANNER_HH diff --git a/lily/item.cc b/lily/item.cc index 524c408fa3..2b70a03e97 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "dimension-cache.hh" @@ -157,11 +157,6 @@ Item::find_broken_piece (Direction d) const -bool -Item::broken_original_b () const -{ - return broken_to_drul_[LEFT] || broken_to_drul_[RIGHT]; -} #if 0 int diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index 861668111d..c94b17811b 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -3,10 +3,9 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ // clean me up - #include "key-engraver.hh" #include "key-item.hh" #include "command-request.hh" @@ -17,8 +16,6 @@ #include "timing-translator.hh" #include "staff-symbol-referencer.hh" -ADD_THIS_TRANSLATOR (Key_engraver); - Key_engraver::Key_engraver () { item_p_ = 0; @@ -204,3 +201,5 @@ Key_engraver::do_post_move_processing () old_accidental_idx_arr_.clear (); } +ADD_THIS_TRANSLATOR (Key_engraver); + diff --git a/lily/key-item.cc b/lily/key-item.cc index 43ddc6931f..56ab8a0506 100644 --- a/lily/key-item.cc +++ b/lily/key-item.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys keyplacement by Mats Bengtsson */ diff --git a/lily/key-performer.cc b/lily/key-performer.cc index 7e09fefbc6..d026cf590d 100644 --- a/lily/key-performer.cc +++ b/lily/key-performer.cc @@ -3,13 +3,16 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #include "key-performer.hh" #include "command-request.hh" #include "audio-item.hh" + + + ADD_THIS_TRANSLATOR (Key_performer); Key_performer::Key_performer () diff --git a/lily/key.cc b/lily/key.cc index 40e5c7de94..199f71526f 100644 --- a/lily/key.cc +++ b/lily/key.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/least-squares.cc b/lily/least-squares.cc new file mode 100644 index 0000000000..737cbd6d58 --- /dev/null +++ b/lily/least-squares.cc @@ -0,0 +1,43 @@ +/* + least-squares.cc -- implement minimise_least_squares + + source file of the GNU LilyPond music typesetter + + (c) 1996--2000 Han-Wen Nienhuys + + */ + +#include "least-squares.hh" +#include "warn.hh" + + +void +minimise_least_squares (Real * coef, Real * offset, + Array input) +{ + Real sx = 0.0; + Real sy = 0.0; + Real sqx =0.0; + Real sxy = 0.0; + + for (int i=0; i < input.size();i++) + { + Real x=input[i][X_AXIS]; + Real y = input[i][Y_AXIS]; + sx += x; + sy += y; + sqx += sqr (x); + sxy += x*y; + } + int N = input.size(); + + *coef =0.0; + *offset =0.; + + Real den = (N*sqx - sqr (sx)); + if (!N || !den) + programming_error ("minimise_least_squares(): Nothing to minimise"); + + *coef = (N * sxy - sx*sy)/den; + *offset = (sy - (*coef) * sx)/N; +} diff --git a/lily/leastsquares.cc b/lily/leastsquares.cc deleted file mode 100644 index 6856c625b3..0000000000 --- a/lily/leastsquares.cc +++ /dev/null @@ -1,42 +0,0 @@ -#include "leastsquares.hh" -#include "warn.hh" - -void -Least_squares::OK() const -{ - assert (input.size() > 1); - Real dx = 0.0; - for (int i=1; i < input.size(); i++) - dx += abs (input[i-1][X_AXIS] - input[i][X_AXIS]); - - assert (dx); -} - -void -Least_squares::minimise (Real &coef, Real &offset) -{ - Real sx = 0.0; - Real sy = 0.0; - Real sqx =0.0; - Real sxy = 0.0; - - for (int i=0; i < input.size();i++) - { - Real x=input[i][X_AXIS]; - Real y = input[i][Y_AXIS]; - sx += x; - sy += y; - sqx += sqr (x); - sxy += x*y; - } - int N = input.size(); - - coef =0.0; - offset =0.; - - Real den = (N*sqx - sqr (sx)); - if (!N || !den) - programming_error ("Least_squares::minimise(): Nothing to minimise"); - coef = (N * sxy - sx*sy)/den; - offset = (sy - coef * sx)/N; -} diff --git a/lily/lexer.ll b/lily/lexer.ll index 83beb3eb8e..9c0369c424 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -25,6 +25,7 @@ #include #include +#include "notename-table.hh" #include "lily-guile.hh" #include "string.hh" #include "string-convert.hh" @@ -467,20 +468,18 @@ My_lily_lexer::pop_state () int My_lily_lexer::scan_escaped_word (String str) { - DEBUG_OUT << "\\word: `" << str<<"'\n"; int l = lookup_keyword (str); if (l != -1) { - DEBUG_OUT << "(keyword)\n"; return l; } Identifier * id = lookup_identifier (str); if (id) { - DEBUG_OUT << "(identifier)\n"; yylval.id = id; return id->token_code_i_; } if ((YYSTATE != notes) && (YYSTATE != chords)) { - if (notename_b (str)) { + if (note_tab_p_->elem_b (str)) + { yylval.pitch = new Musical_pitch (lookup_notename (str)); yylval.pitch->set_spot (Input (source_file_l (), here_ch_C ())); @@ -491,7 +490,7 @@ My_lily_lexer::scan_escaped_word (String str) print_declarations (true); String msg (_f ("unknown escaped string: `\\%s'", str)); LexerError (msg.ch_C ()); - DEBUG_OUT << "(string)"; + yylval.scm = ly_str02scm(str.ch_C()); return STRING; @@ -500,16 +499,14 @@ My_lily_lexer::scan_escaped_word (String str) int My_lily_lexer::scan_bare_word (String str) { - DEBUG_OUT << "word: `" << str<< "'\n"; if ((YYSTATE == notes) || (YYSTATE == chords)) { - if (notename_b (str)) { - DEBUG_OUT << "(notename)\n"; + if (note_tab_p_->elem_b (str)) { yylval.pitch = new Musical_pitch (lookup_notename (str)); yylval.pitch->set_spot (Input (source_file_l (), here_ch_C ())); return (YYSTATE == notes) ? NOTENAME_PITCH : TONICNAME_PITCH; - } else if (chordmodifier_b (str)) { - DEBUG_OUT << "(chordmodifier)\n"; + } else if (chordmodifier_tab_p_->elem_b (str)) + { yylval.pitch = new Musical_pitch (lookup_chordmodifier (str)); yylval.pitch->set_spot (Input (source_file_l (), here_ch_C ())); diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 2edd23ac88..e317ea5438 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen Han-Wen Nienhuys */ @@ -19,6 +19,7 @@ #include "file-path.hh" #include "debug.hh" #include "direction.hh" +#include "offset.hh" SCM ly_str02scm (char const*c) @@ -279,11 +280,13 @@ to_scm (int i) return gh_int2scm (i); } -void -scm_to (SCM s, int* i) +/* + UGR. junkme. + */ +int +scm_to (SCM s, int* ) { - // urg - *i = gh_number_p (s) ? gh_scm2int (s) : 0; + return gh_number_p (s) ? gh_scm2int (s) : 0; } SCM @@ -292,13 +295,12 @@ to_scm (Real r) return gh_double2scm (r); } -void -scm_to (SCM s, Real* r) +Real +scm_to (SCM s, Real* ) { - // urg - *r = gh_number_p (s) ? gh_scm2double (s) : 0; + return gh_number_p (s) ? gh_scm2double (s) : 0; } - + bool to_boolean (SCM s) { @@ -328,3 +330,10 @@ appendable_list_append (SCM l, SCM elt) gh_set_cdr_x (gh_car (l), newcons); gh_set_car_x (l, newcons); } + + +SCM +ly_offset2scm (Offset o) +{ + return gh_cons (gh_double2scm (o[X_AXIS]), gh_double2scm(o[Y_AXIS])); +} diff --git a/lily/line-group-group-engraver.cc b/lily/line-group-group-engraver.cc index 01696bbd56..f30e40959f 100644 --- a/lily/line-group-group-engraver.cc +++ b/lily/line-group-group-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "staff-symbol.hh" @@ -14,8 +14,6 @@ #include "line-group-group-engraver.hh" #include "paper-column.hh" -ADD_THIS_TRANSLATOR (Line_group_engraver_group); - Line_group_engraver_group::Line_group_engraver_group() { staffline_p_ =0; @@ -57,3 +55,8 @@ Line_group_engraver_group::create_line_spanner () staffline_p_->set_axes (Y_AXIS,Y_AXIS); } + + + +ADD_THIS_TRANSLATOR(Line_group_engraver_group); + diff --git a/lily/line-of-score.cc b/lily/line-of-score.cc index 0f313f40e9..69d7f36339 100644 --- a/lily/line-of-score.cc +++ b/lily/line-of-score.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys */ #include "line-of-score.hh" diff --git a/lily/local-key-engraver.cc b/lily/local-key-engraver.cc index 3357c8a174..8ac7cfaf73 100644 --- a/lily/local-key-engraver.cc +++ b/lily/local-key-engraver.cc @@ -1,7 +1,7 @@ /* local-key-engraver.cc -- implement Local_key_engraver - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ // clean up! @@ -19,8 +19,6 @@ #include "grace-align-item.hh" #include "staff-symbol-referencer.hh" -ADD_THIS_TRANSLATOR (Local_key_engraver); - Local_key_engraver::Local_key_engraver() { key_grav_l_ = 0; @@ -196,3 +194,7 @@ Local_key_engraver::do_process_requests() } } + + +ADD_THIS_TRANSLATOR(Local_key_engraver); + diff --git a/lily/local-key-item.cc b/lily/local-key-item.cc index f0bf3e57e6..7541177600 100644 --- a/lily/local-key-item.cc +++ b/lily/local-key-item.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "local-key-item.hh" #include "molecule.hh" diff --git a/lily/lookup.cc b/lily/lookup.cc index 812460e0fc..4c3be3f3f2 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen @@ -29,12 +29,6 @@ #include "atom.hh" #include "lily-guile.hh" -SCM -ly_offset2scm (Offset o) -{ - return gh_list (gh_double2scm (o[X_AXIS]), gh_double2scm(o[Y_AXIS]), - SCM_UNDEFINED); -} Lookup::Lookup () { @@ -94,7 +88,7 @@ Lookup::afm_find (String s, bool warn) const if (!me->afm_l_) { warning (_f ("Can't find font: `%s'", font_name_)); - warning (_f ("(search path: `%s')", global_path.str ().ch_C())); + warning (_f ("(search path `%s')", global_path.str ().ch_C())); error (_ ("Aborting")); } } diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index 103c7176b7..60c59e8141 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ @@ -15,6 +15,7 @@ ADD_THIS_TRANSLATOR (Lyric_engraver); + Lyric_engraver::Lyric_engraver() { text_p_ =0; diff --git a/lily/lyric-performer.cc b/lily/lyric-performer.cc index be719e1c03..5a5be59567 100644 --- a/lily/lyric-performer.cc +++ b/lily/lyric-performer.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #include "lyric-performer.hh" diff --git a/lily/main.cc b/lily/main.cc index a73534fc60..41d2e36e2a 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include @@ -145,7 +145,7 @@ version () "lilypond"); cout << endl; - cout << _f ("Copyright (c) %s by", "1996--1999"); + cout << _f ("Copyright (c) %s by", "1996--2000"); cout << "Han-Wen Nienhuys \n" << "Jan Nieuwenhuizen \n"; } @@ -157,7 +157,7 @@ notice () // GNU GNU? cout << _ ("GNU LilyPond -- The GNU Project music typesetter"); cout << '\n'; - cout << _f ("Copyright (c) %s by", "1996--1999"); + cout << _f ("Copyright (c) %s by", "1996--2000"); cout << '\n'; cout << " Han-Wen Nienhuys \n"; cout << " Jan Nieuwenhuizen \n"; diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index dda6ef8d04..92752b2d9b 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -3,14 +3,14 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ - #include "command-request.hh" #include "mark-engraver.hh" #include "engraver-group-engraver.hh" #include "text-item.hh" + ADD_THIS_TRANSLATOR (Mark_engraver); Mark_engraver::Mark_engraver () diff --git a/lily/melisma-engraver.cc b/lily/melisma-engraver.cc index 9d34b559d5..3a89ad968f 100644 --- a/lily/melisma-engraver.cc +++ b/lily/melisma-engraver.cc @@ -20,7 +20,7 @@ public: bool do_try_music (Music *); }; -ADD_THIS_TRANSLATOR (Melisma_engraver); +ADD_THIS_TRANSLATOR(Melisma_engraver); bool Melisma_engraver::do_try_music (Music *m ) diff --git a/lily/midi-def.cc b/lily/midi-def.cc index 47899ae066..753976a9b6 100644 --- a/lily/midi-def.cc +++ b/lily/midi-def.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #include diff --git a/lily/midi-item.cc b/lily/midi-item.cc index 867b7bad2b..aeaa53ffa2 100644 --- a/lily/midi-item.cc +++ b/lily/midi-item.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #include "proto.hh" diff --git a/lily/midi-stream.cc b/lily/midi-stream.cc index 2db634bdb6..05fb19bc6d 100644 --- a/lily/midi-stream.cc +++ b/lily/midi-stream.cc @@ -3,7 +3,7 @@ // // source file of the GNU LilyPond music typesetter // -// (c) 1997--1999 Jan Nieuwenhuizen +// (c) 1997--2000 Jan Nieuwenhuizen #include #include "string.hh" diff --git a/lily/midi-walker.cc b/lily/midi-walker.cc index 48c408aaa7..be00d45a80 100644 --- a/lily/midi-walker.cc +++ b/lily/midi-walker.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/misc.cc b/lily/misc.cc index d9c56c4a8d..8523cddd86 100644 --- a/lily/misc.cc +++ b/lily/misc.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/molecule.cc b/lily/molecule.cc index 710ee8b397..2243f8517e 100644 --- a/lily/molecule.cc +++ b/lily/molecule.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "interval.hh" diff --git a/lily/mudela-version.cc b/lily/mudela-version.cc index 628815ed8a..7b2e9d58ee 100644 --- a/lily/mudela-version.cc +++ b/lily/mudela-version.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index 852028ec8c..6bb488a547 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -1,7 +1,7 @@ /* multi_measure_rest-engraver.cc -- implement Multi_measure_rest_engraver - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen Han-Wen Nienhuys */ @@ -15,6 +15,7 @@ #include "bar.hh" #include "staff-symbol-referencer.hh" + ADD_THIS_TRANSLATOR (Multi_measure_rest_engraver); Multi_measure_rest_engraver::Multi_measure_rest_engraver () diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index 72a23f5b58..e25dffbbc6 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ @@ -90,7 +90,7 @@ Multi_measure_rest::do_brew_molecule_p () const mol_p->add_molecule (s); Real staff_space - = staff_symbol_referencer_interface (this).staff_space (); + = staff_symbol_referencer (this).staff_space (); if (measures_i_ == 1 && rest_symbol) { mol_p->translate_axis (staff_space, Y_AXIS); diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 81f56ca62a..01e0a5dc5d 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -3,9 +3,8 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ - #include "debug.hh" #include "music-list.hh" #include "music-iterator.hh" diff --git a/lily/music-list.cc b/lily/music-list.cc index 2b2fce2fda..abe444cf6f 100644 --- a/lily/music-list.cc +++ b/lily/music-list.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "music-list.hh" diff --git a/lily/music-output-def.cc b/lily/music-output-def.cc index c05534131b..f1cf79cb65 100644 --- a/lily/music-output-def.cc +++ b/lily/music-output-def.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "scope.hh" diff --git a/lily/music-sequence.cc b/lily/music-sequence.cc index 60e6459a20..2b77780d39 100644 --- a/lily/music-sequence.cc +++ b/lily/music-sequence.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ #include "music-list.hh" diff --git a/lily/music-wrapper-iterator.cc b/lily/music-wrapper-iterator.cc index 1f89d771c6..69429384dc 100644 --- a/lily/music-wrapper-iterator.cc +++ b/lily/music-wrapper-iterator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/music-wrapper.cc b/lily/music-wrapper.cc index 71de46fc45..26807805e7 100644 --- a/lily/music-wrapper.cc +++ b/lily/music-wrapper.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/music.cc b/lily/music.cc index 817b38a802..7b6cf60732 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -3,9 +3,11 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ + #include + #include "music.hh" #include "music-list.hh" #include "debug.hh" diff --git a/lily/musical-pitch.cc b/lily/musical-pitch.cc index d60a1fb832..dc4a5171da 100644 --- a/lily/musical-pitch.cc +++ b/lily/musical-pitch.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ #include "musical-pitch.hh" @@ -22,11 +22,11 @@ to_scm (Musical_pitch p) /* TODO: check -- is_pitch () ? */ -void -scm_to (SCM s, Musical_pitch* p) +Musical_pitch +scm_to (SCM s, Musical_pitch* ) { - *p = Musical_pitch (gh_scm2int (gh_car (s)), - gh_scm2int (gh_cadr (s)), + return Musical_pitch (gh_scm2int (gh_car (s)), + gh_scm2int (gh_cadr (s)), gh_scm2int (gh_caddr (s))); } diff --git a/lily/musical-request.cc b/lily/musical-request.cc index 16bb0d5513..192ea5d48e 100644 --- a/lily/musical-request.cc +++ b/lily/musical-request.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "musical-request.hh" diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index cd1b67f913..211a6b8c47 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include @@ -114,8 +114,8 @@ My_lily_lexer::start_main_input () new_input (main_input_str_, source_global_l); - if (safe_global_b) - allow_includes_b_ = false; + allow_includes_b_ = allow_includes_b_ && !(safe_global_b); + print_declarations(true); } @@ -189,11 +189,6 @@ My_lily_lexer::lookup_chordmodifier (String s) return chordmodifier_tab_p_->get_pitch (s); } -bool -My_lily_lexer::notename_b (String s) const -{ - return note_tab_p_->elem_b (s); -} void My_lily_lexer::set_notename_table (Notename_table *p) @@ -202,11 +197,7 @@ My_lily_lexer::set_notename_table (Notename_table *p) note_tab_p_ = p; } -bool -My_lily_lexer::chordmodifier_b (String s) const -{ - return chordmodifier_tab_p_->elem_b (s); -} + void My_lily_lexer::set_chordmodifier_table (Notename_table *p) diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc index 794e191de7..854f846c1b 100644 --- a/lily/my-lily-parser.cc +++ b/lily/my-lily-parser.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ @@ -30,7 +30,6 @@ My_lily_parser::My_lily_parser (Sources * source_l) lexer_p_ = 0; abbrev_beam_type_i_ = 0; default_duration_.durlog_i_ = 2; - default_pitch_ = Musical_pitch (5*7, 0); error_level_i_ = 0; fatal_error_i_ = 0; @@ -43,8 +42,6 @@ My_lily_parser::~My_lily_parser() delete default_header_p_; } - - void My_lily_parser::set_version_check (bool ig) { @@ -110,56 +107,8 @@ My_lily_parser::set_abbrev_beam (int type_i) abbrev_beam_type_i_ = type_i; } -void -My_lily_parser::set_last_pitch (Musical_pitch const* p) -{ - default_pitch_ = *p; -} - -// junk me -Simultaneous_music* -My_lily_parser::get_word_element (String s, Duration * duration_p) -{ - Simultaneous_music* velt_p = new Request_chord; - - Lyric_req* lreq_p = new Lyric_req; - lreq_p ->text_str_ = s; - lreq_p->duration_ = *duration_p; - lreq_p->set_spot (here_input()); - - velt_p->add_music (lreq_p); - - delete duration_p; - return velt_p; -} - -// junk me -Simultaneous_music * -My_lily_parser::get_rest_element (String s, Duration * duration_p) -{ - Simultaneous_music* velt_p = new Request_chord; - velt_p->set_spot (here_input()); - if (s=="s") - { /* Space */ - Skip_req * skip_p = new Skip_req; - skip_p->duration_ = *duration_p; - skip_p->set_spot (here_input()); - velt_p->add_music (skip_p); - } - else - { - Rest_req * rest_req_p = new Rest_req; - rest_req_p->duration_ = *duration_p; - rest_req_p->set_spot (here_input()); - - velt_p->add_music (rest_req_p); - } - - delete duration_p; - return velt_p; -} // junk me Simultaneous_music * diff --git a/lily/note-column.cc b/lily/note-column.cc index 7216a4a9b4..00fb47af38 100644 --- a/lily/note-column.cc +++ b/lily/note-column.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include // ceil diff --git a/lily/note-head.cc b/lily/note-head.cc index fa911e7ca4..f1b3bf192d 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "misc.hh" diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index 718418fd34..2815ca843d 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -1,7 +1,7 @@ /* head-grav.cc -- part of GNU LilyPond - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "note-head.hh" @@ -12,8 +12,6 @@ #include "dot-column.hh" #include "staff-symbol-referencer.hh" -ADD_THIS_TRANSLATOR (Note_heads_engraver); - Note_heads_engraver::Note_heads_engraver() { } @@ -120,3 +118,8 @@ Note_heads_engraver::do_pre_move_processing() note_req_l_arr_.clear (); } + + + +ADD_THIS_TRANSLATOR(Note_heads_engraver); + diff --git a/lily/note-name-engraver.cc b/lily/note-name-engraver.cc index 8ddcc9a984..a87cea19ff 100644 --- a/lily/note-name-engraver.cc +++ b/lily/note-name-engraver.cc @@ -22,8 +22,6 @@ public: virtual void do_pre_move_processing (); }; -ADD_THIS_TRANSLATOR (Note_name_engraver); - bool Note_name_engraver::do_try_music (Music *m) { @@ -65,3 +63,5 @@ Note_name_engraver::do_pre_move_processing () texts_.clear() ; req_l_arr_.clear (); } + +ADD_THIS_TRANSLATOR(Note_name_engraver); diff --git a/lily/note-performer.cc b/lily/note-performer.cc index 67a88a216f..d2cfe8dea8 100644 --- a/lily/note-performer.cc +++ b/lily/note-performer.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Jan Nieuwenhuizen + (c) 1996, 1997--2000 Jan Nieuwenhuizen */ #include "note-performer.hh" @@ -13,6 +13,7 @@ #include "global-translator.hh" #include "debug.hh" + ADD_THIS_TRANSLATOR (Note_performer); Note_performer::Note_performer () diff --git a/lily/notename-table.cc b/lily/notename-table.cc index 2063f79ee4..f3a85c1ad6 100644 --- a/lily/notename-table.cc +++ b/lily/notename-table.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "notename-table.hh" diff --git a/lily/paper-column.cc b/lily/paper-column.cc index 67d5577bd2..94e22e0e34 100644 --- a/lily/paper-column.cc +++ b/lily/paper-column.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "moment.hh" #include "paper-column.hh" diff --git a/lily/paper-def.cc b/lily/paper-def.cc index 2fedfe4b32..9c6be3c464 100644 --- a/lily/paper-def.cc +++ b/lily/paper-def.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index fd53025c2c..f1df4c15fe 100644 --- a/lily/paper-outputter.cc +++ b/lily/paper-outputter.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ @@ -38,7 +38,7 @@ Paper_outputter::output_header () { if (safe_global_b) { - // ly_set_x ("security-paranoia", SCM_BOOL_T); + gh_define ("security-paranoia", SCM_BOOL_T); } String s = String ("(eval (") + output_global_ch + "-scm 'all-definitions))"; diff --git a/lily/paper-score.cc b/lily/paper-score.cc index 097ef2bc38..0b487a077b 100644 --- a/lily/paper-score.cc +++ b/lily/paper-score.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys */ #include "main.hh" diff --git a/lily/paper-stream.cc b/lily/paper-stream.cc index fa6ec8c7a0..bb4ec7121d 100644 --- a/lily/paper-stream.cc +++ b/lily/paper-stream.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include diff --git a/lily/parser.yy b/lily/parser.yy index 58931e8277..606d9a3f17 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -1159,11 +1159,9 @@ explicit_musical_pitch: musical_pitch: steno_musical_pitch { $$ = $1; - THIS->set_last_pitch ($1); } | explicit_musical_pitch { $$ = $1; - THIS->set_last_pitch ($1); } ; @@ -1391,7 +1389,29 @@ simple_element: $$ = v; } | RESTNAME optional_notemode_duration { - $$ = THIS->get_rest_element (ly_scm2string ($1), $2); + Simultaneous_music* velt_p = new Request_chord; + velt_p->set_spot (THIS->here_input()); + + if (ly_scm2string ($1) =="s") + { /* Space */ + Skip_req * skip_p = new Skip_req; + skip_p->duration_ = *$2; + + skip_p->set_spot (THIS->here_input()); + velt_p->add_music (skip_p); + } + else + { + Rest_req * rest_req_p = new Rest_req; + rest_req_p->duration_ = *$2; + rest_req_p->set_spot (THIS->here_input()); + + velt_p->add_music (rest_req_p); + } + + delete $2; + $$ = velt_p; + } | MEASURES optional_notemode_duration { @@ -1417,7 +1437,17 @@ simple_element: | STRING optional_notemode_duration { if (!THIS->lexer_p_->lyric_state_b ()) THIS->parser_error (_ ("Have to be in Lyric mode for lyrics")); - $$ = THIS->get_word_element (ly_scm2string ($1), $2); + Simultaneous_music* velt_p = new Request_chord; + + Lyric_req* lreq_p = new Lyric_req; + lreq_p ->text_str_ = ly_scm2string ($1); + lreq_p->duration_ = *$2; + lreq_p->set_spot (THIS->here_input()); + + velt_p->add_music (lreq_p); + + delete $2; + $$= velt_p; } | chord { diff --git a/lily/performance.cc b/lily/performance.cc index 99aa0458de..84a8e64b4c 100644 --- a/lily/performance.cc +++ b/lily/performance.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #include diff --git a/lily/performer-group-performer.cc b/lily/performer-group-performer.cc index 6e4f5562b9..583c59a936 100644 --- a/lily/performer-group-performer.cc +++ b/lily/performer-group-performer.cc @@ -3,14 +3,17 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ #include "performer-group-performer.hh" + #include "debug.hh" -ADD_THIS_TRANSLATOR (Performer_group_performer); + +ADD_THIS_TRANSLATOR(Performer_group_performer); + void Performer_group_performer::announce_element (Audio_element_info info) diff --git a/lily/performer.cc b/lily/performer.cc index f0cd2585e2..7ccad7dd2a 100644 --- a/lily/performer.cc +++ b/lily/performer.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/pitch-squash-engraver.cc b/lily/pitch-squash-engraver.cc index a3ce1a0719..21774fb3af 100644 --- a/lily/pitch-squash-engraver.cc +++ b/lily/pitch-squash-engraver.cc @@ -3,16 +3,14 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ - #include "staff-symbol-referencer.hh" + #include "pitch-squash-engraver.hh" #include "note-head.hh" -ADD_THIS_TRANSLATOR (Pitch_squash_engraver); - void Pitch_squash_engraver::acknowledge_element (Score_element_info i) { @@ -22,4 +20,6 @@ Pitch_squash_engraver::acknowledge_element (Score_element_info i) } } +ADD_THIS_TRANSLATOR (Pitch_squash_engraver); + diff --git a/lily/property-engraver.cc b/lily/property-engraver.cc index 3c4fb3f9fe..d2eb399759 100644 --- a/lily/property-engraver.cc +++ b/lily/property-engraver.cc @@ -25,8 +25,6 @@ protected: VIRTUAL_COPY_CONS(Translator); }; -ADD_THIS_TRANSLATOR (Property_engraver); - void Property_engraver::do_creation_processing () { @@ -73,3 +71,5 @@ Property_engraver::apply_properties (SCM p, Score_element *e) e->set_elt_property (ly_symbol2string (elt_prop_name), val); } } + +ADD_THIS_TRANSLATOR(Property_engraver); diff --git a/lily/property-iterator.cc b/lily/property-iterator.cc index 0af9420ebf..06d34035ed 100644 --- a/lily/property-iterator.cc +++ b/lily/property-iterator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "property-iterator.hh" diff --git a/lily/protected-scm.cc b/lily/protected-scm.cc index 1d8fd16b2a..71d6b48273 100644 --- a/lily/protected-scm.cc +++ b/lily/protected-scm.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ #include "protected-scm.hh" diff --git a/lily/relative-octave-music.cc b/lily/relative-octave-music.cc index af18a32b1d..e2552b65a8 100644 --- a/lily/relative-octave-music.cc +++ b/lily/relative-octave-music.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/repeat-engraver.cc b/lily/repeat-engraver.cc index 86b202972e..0e2b52c5f3 100644 --- a/lily/repeat-engraver.cc +++ b/lily/repeat-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ #include "repeat-engraver.hh" diff --git a/lily/request-chord-iterator.cc b/lily/request-chord-iterator.cc index ae44a7c5e7..dac3d2500c 100644 --- a/lily/request-chord-iterator.cc +++ b/lily/request-chord-iterator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "translator-group.hh" diff --git a/lily/request.cc b/lily/request.cc index 67d1e548e2..f5a869b788 100644 --- a/lily/request.cc +++ b/lily/request.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys */ #include "request.hh" diff --git a/lily/rest-collision-engraver.cc b/lily/rest-collision-engraver.cc index e6acb025b2..b2fd168d07 100644 --- a/lily/rest-collision-engraver.cc +++ b/lily/rest-collision-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "debug.hh" @@ -12,9 +12,11 @@ #include "collision.hh" #include "note-column.hh" -ADD_THIS_TRANSLATOR (Rest_collision_engraver); -Rest_collision_engraver::Rest_collision_engraver () + +ADD_THIS_TRANSLATOR(Rest_collision_engraver); + +Rest_collision_engraver::Rest_collision_engraver() { rest_collision_p_ =0; } diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index 117c5db333..6bdfe4eaf2 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include // ceil. diff --git a/lily/rest-engraver.cc b/lily/rest-engraver.cc index cd124711b1..5fe98cf293 100644 --- a/lily/rest-engraver.cc +++ b/lily/rest-engraver.cc @@ -3,17 +3,13 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ - #include "staff-symbol-referencer.hh" #include "rest-engraver.hh" #include "musical-request.hh" #include "dots.hh" #include "rest.hh" - -ADD_THIS_TRANSLATOR (Rest_engraver); - /* Should merge with Note_head_engraver */ @@ -84,3 +80,6 @@ Rest_engraver::do_try_music (Music *req) } return false; } + + +ADD_THIS_TRANSLATOR(Rest_engraver); diff --git a/lily/rest.cc b/lily/rest.cc index 57c5816892..671c59bf72 100644 --- a/lily/rest.cc +++ b/lily/rest.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "molecule.hh" @@ -31,7 +31,7 @@ Rest::do_post_processing () /* UGH. */ - staff_symbol_referencer_interface (d) + staff_symbol_referencer (d) .set_position ((balltype_i () == 7) ? 4 : 3); } } diff --git a/lily/rhythmic-column-engraver.cc b/lily/rhythmic-column-engraver.cc index 574bee6675..6e4aaa96c5 100644 --- a/lily/rhythmic-column-engraver.cc +++ b/lily/rhythmic-column-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "dimension-cache.hh" @@ -15,8 +15,6 @@ #include "dot-column.hh" #include "musical-request.hh" -ADD_THIS_TRANSLATOR (Rhythmic_column_engraver); - Rhythmic_column_engraver::Rhythmic_column_engraver() { stem_l_ =0; @@ -122,3 +120,5 @@ Rhythmic_column_engraver::do_post_move_processing() stem_l_ =0; } +ADD_THIS_TRANSLATOR(Rhythmic_column_engraver); + diff --git a/lily/rhythmic-head.cc b/lily/rhythmic-head.cc index 72807c77cc..a96a750f74 100644 --- a/lily/rhythmic-head.cc +++ b/lily/rhythmic-head.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "rhythmic-head.hh" diff --git a/lily/rod.cc b/lily/rod.cc index c1e8c46b20..cbf1403cdc 100644 --- a/lily/rod.cc +++ b/lily/rod.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ #include "rod.hh" diff --git a/lily/scope.cc b/lily/scope.cc index b3e5dc83ab..e2923fcb80 100644 --- a/lily/scope.cc +++ b/lily/scope.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/score-element-info.cc b/lily/score-element-info.cc index a5d19969d7..c3dd700aef 100644 --- a/lily/score-element-info.cc +++ b/lily/score-element-info.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "score-element-info.hh" diff --git a/lily/score-element.cc b/lily/score-element.cc index 5fe4be4c87..6569b790a1 100644 --- a/lily/score-element.cc +++ b/lily/score-element.cc @@ -3,10 +3,12 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ + #include + #include "group-interface.hh" #include "misc.hh" #include "paper-score.hh" diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 6208952db8..81bf16fa25 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -3,9 +3,8 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ - #include "debug.hh" #include "dimension-cache.hh" #include "line-of-score.hh" @@ -17,9 +16,7 @@ #include "command-request.hh" #include "paper-def.hh" -ADD_THIS_TRANSLATOR (Score_engraver); - -Score_engraver::Score_engraver () +Score_engraver::Score_engraver() { scoreline_l_ =0; command_column_l_ =0; @@ -258,6 +255,8 @@ Score_engraver::forbid_breaks () command_column_l_->remove_elt_property ("breakable"); } +ADD_THIS_TRANSLATOR(Score_engraver); + void Score_engraver::do_add_processing () { diff --git a/lily/score-performer.cc b/lily/score-performer.cc index 73c631b6c2..b4eba3d00b 100644 --- a/lily/score-performer.cc +++ b/lily/score-performer.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Jan Nieuwenhuizen + (c) 1996, 1997--2000 Jan Nieuwenhuizen */ #include "score-performer.hh" @@ -19,8 +19,10 @@ #include "source.hh" #include "audio-staff.hh" + ADD_THIS_TRANSLATOR (Score_performer); + Score_performer::Score_performer () { performance_p_ = 0; diff --git a/lily/score.cc b/lily/score.cc index 6911cdfa58..3eda39de70 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "score.hh" diff --git a/lily/scores.cc b/lily/scores.cc index b3899c2d2e..64787328ac 100644 --- a/lily/scores.cc +++ b/lily/scores.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include #include "main.hh" diff --git a/lily/script-column-engraver.cc b/lily/script-column-engraver.cc index df81722ee6..793ef46e97 100644 --- a/lily/script-column-engraver.cc +++ b/lily/script-column-engraver.cc @@ -31,8 +31,6 @@ protected: }; -ADD_THIS_TRANSLATOR (Script_column_engraver); - Script_column_engraver::Script_column_engraver() { scol_p_ =0; @@ -87,3 +85,4 @@ Script_column_engraver::process_acknowledged () script_l_arr_.clear (); } } +ADD_THIS_TRANSLATOR(Script_column_engraver); diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc index 6e9ca566b6..0e6fe2433d 100644 --- a/lily/script-engraver.cc +++ b/lily/script-engraver.cc @@ -1,7 +1,7 @@ /* script-engraver.cc -- implement Script_engraver - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "script-engraver.hh" @@ -13,11 +13,9 @@ #include "rhythmic-head.hh" #include "dimension-cache.hh" -ADD_THIS_TRANSLATOR (Script_engraver); - -Script_engraver::Script_engraver () +Script_engraver::Script_engraver() { - do_post_move_processing (); + do_post_move_processing(); } bool @@ -101,6 +99,12 @@ Script_engraver::do_process_requests() void Script_engraver::acknowledge_element (Score_element_info inf) { + bool them_grace = to_boolean (inf.elem_l_->get_elt_property ("grace")); + bool us_grace = to_boolean (get_property ("weAreGraceContext",0)); + + if (us_grace != them_grace) + return; + if (Stem *s = dynamic_cast(inf.elem_l_)) { for (int i=0; i < script_p_arr_.size(); i++) @@ -145,4 +149,6 @@ Script_engraver::do_post_move_processing() script_req_l_arr_.clear(); } +ADD_THIS_TRANSLATOR(Script_engraver); + diff --git a/lily/separating-group-spanner.cc b/lily/separating-group-spanner.cc index cc4fd64d35..c00bfd8e13 100644 --- a/lily/separating-group-spanner.cc +++ b/lily/separating-group-spanner.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/separating-line-group-engraver.cc b/lily/separating-line-group-engraver.cc index 53293cedde..9cd56f58b6 100644 --- a/lily/separating-line-group-engraver.cc +++ b/lily/separating-line-group-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ @@ -13,8 +13,6 @@ #include "paper-column.hh" #include "paper-def.hh" -ADD_THIS_TRANSLATOR (Separating_line_group_engraver); - Separating_line_group_engraver::Separating_line_group_engraver () { sep_span_p_ = 0; @@ -77,3 +75,7 @@ Separating_line_group_engraver::do_pre_move_processing () } } + + +ADD_THIS_TRANSLATOR( Separating_line_group_engraver); + diff --git a/lily/sequential-music-iterator.cc b/lily/sequential-music-iterator.cc index 58e0405175..8473d23cd6 100644 --- a/lily/sequential-music-iterator.cc +++ b/lily/sequential-music-iterator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "grace-iterator.hh" #include "translator-group.hh" diff --git a/lily/side-position-interface.cc b/lily/side-position-interface.cc index d261d33eaf..f19cbf83e3 100644 --- a/lily/side-position-interface.cc +++ b/lily/side-position-interface.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ #include // ceil. diff --git a/lily/simultaneous-music-iterator.cc b/lily/simultaneous-music-iterator.cc index 1faaa67c13..7e60780cc9 100644 --- a/lily/simultaneous-music-iterator.cc +++ b/lily/simultaneous-music-iterator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "translator-group.hh" diff --git a/lily/single-malt-grouping-item.cc b/lily/single-malt-grouping-item.cc index 4a9a9d929e..54cce29996 100644 --- a/lily/single-malt-grouping-item.cc +++ b/lily/single-malt-grouping-item.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index 55970b93ff..d5f6f768e7 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -1,7 +1,7 @@ /* slur-grav.cc -- implement Slur_engraver - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "proto.hh" @@ -12,8 +12,6 @@ #include "note-column.hh" #include "translator-group.hh" -ADD_THIS_TRANSLATOR (Slur_engraver); - bool Slur_engraver::do_try_music (Music *req_l) { @@ -124,3 +122,5 @@ Slur_engraver::do_post_move_processing() } } + +ADD_THIS_TRANSLATOR(Slur_engraver); diff --git a/lily/slur.cc b/lily/slur.cc index 30112212c8..e7adc849b4 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ @@ -25,12 +25,15 @@ #include "debug.hh" #include "box.hh" #include "bezier.hh" +#include "bezier-bow.hh" #include "main.hh" #include "cross-staff.hh" #include "group-interface.hh" Slur::Slur () { + dy_f_drul_[LEFT] = dy_f_drul_[RIGHT] = 0.0; + dx_f_drul_[LEFT] = dx_f_drul_[RIGHT] = 0.0; set_elt_property ("note-columns", SCM_EOL); } @@ -322,8 +325,11 @@ Slur::do_post_processing () */ for (int i = 0; i < 3; i++) { - Real height_f = curve_extent (Y_AXIS).length (); - Real width_f = curve_extent (X_AXIS).length (); + Bezier c (get_curve ()); + + + Real height_f = c.extent (X_AXIS).length (); + Real width_f = c.extent (Y_AXIS).length (); dy_f = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]; if (!fix_broken_b) @@ -518,3 +524,123 @@ Slur::get_rods () const } + + + +Molecule* +Slur::do_brew_molecule_p () const +{ + Real thick = paper_l ()->get_var ("slur_thickness"); + Bezier one = get_curve (); + + Molecule a; + SCM d = get_elt_property ("dashed"); + if (gh_number_p (d)) + a = lookup_l ()->dashed_slur (one, thick, gh_scm2int (d)); + else + a = lookup_l ()->slur (one, directional_element (this).get () * thick, thick); + + return new Molecule (a); +} + + + +Bezier +Slur::get_curve () const +{ + Bezier_bow b (get_encompass_offset_arr (), directional_element (this).get ()); + + b.ratio_ = paper_l ()->get_var ("slur_ratio"); + b.height_limit_ = paper_l ()->get_var ("slur_height_limit"); + b.rc_factor_ = paper_l ()->get_var ("slur_rc_factor"); + + b.calculate (); + return b.get_curve (); +} + +#if 0 + +/* + TODO: FIXME. + */ + +/* + Clipping + + This function tries to address two issues: + * the tangents of the slur should always point inwards + in the actual slur, i.e. *after rotating back*. + + * slurs shouldn't be too high + let's try : h <= 1.2 b && h <= 3 staffheight? + + We could calculate the tangent of the bezier curve from + both ends going inward, and clip the slur at the point + where the tangent (after rotation) points up (or inward + with a certain maximum angle). + + However, we assume that real clipping is not the best + answer. We expect that moving the outer control point up + if the slur becomes too high will result in a nicer slur + after recalculation. + + Knowing that the tangent is the line through the first + two control points, we'll clip (move the outer control + point upwards) too if the tangent points outwards. + */ + +bool +Bezier_bow::calc_clipping () +{ + Real clip_height = paper_l_->get_var ("slur_clip_height"); + Real clip_ratio = paper_l_->get_var ("slur_clip_ratio"); + Real clip_angle = paper_l_->get_var ("slur_clip_angle"); + + Real b = curve_.control_[3][X_AXIS] - curve_.control_[0][X_AXIS]; + Real clip_h = clip_ratio * b ? begin_h - clip_h; + Real end_dy = 0 >? end_h - clip_h; + + Real pi = M_PI; + Real begin_alpha = (curve_.control_[1] - curve_.control_[0]).arg () + dir_ * alpha_; + Real end_alpha = pi - (curve_.control_[2] - curve_.control_[3]).arg () - dir_ * alpha_; + + Real max_alpha = clip_angle / 90 * pi / 2; + if ((begin_dy < 0) && (end_dy < 0) + && (begin_alpha < max_alpha) && (end_alpha < max_alpha)) + return false; + + transform_back (); + + if ((begin_dy > 0) || (end_dy > 0)) + { + Real dy = (begin_dy + end_dy) / 4; + dy *= cos (alpha_); + encompass_[0][Y_AXIS] += dir_ * dy; + encompass_.top ()[Y_AXIS] += dir_ * dy; + } + else + { + //ugh + Real c = 0.4; + if (begin_alpha >= max_alpha) + begin_dy = 0 >? c * begin_alpha / max_alpha * begin_h; + if (end_alpha >= max_alpha) + end_dy = 0 >? c * end_alpha / max_alpha * end_h; + + encompass_[0][Y_AXIS] += dir_ * begin_dy; + encompass_.top ()[Y_AXIS] += dir_ * end_dy; + + Offset delta = encompass_.top () - encompass_[0]; + alpha_ = delta.arg (); + } + + to_canonic_form (); + + return true; +} +#endif + + diff --git a/lily/spacing-engraver.cc b/lily/spacing-engraver.cc index 70ff60553e..0082a25ae4 100644 --- a/lily/spacing-engraver.cc +++ b/lily/spacing-engraver.cc @@ -12,8 +12,6 @@ #include "spacing-engraver.hh" #include "spacing-spanner.hh" -ADD_THIS_TRANSLATOR (Spacing_engraver); - inline int compare (Rhythmic_tuple const &a, Rhythmic_tuple const &b) { @@ -113,4 +111,6 @@ Spacing_engraver::do_post_move_processing () stopped_durations_.push (playing_durations_.get ()); } +ADD_THIS_TRANSLATOR(Spacing_engraver); + diff --git a/lily/span-bar-engraver.cc b/lily/span-bar-engraver.cc index b77fb1bf1e..135d978c15 100644 --- a/lily/span-bar-engraver.cc +++ b/lily/span-bar-engraver.cc @@ -1,13 +1,6 @@ -/* - span-bar-engraver.cc -- implement Span_bar_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1997--1999 Han-Wen Nienhuys -*/ - #include "base-span-bar-engraver.hh" + class Span_bar_engraver : public Base_span_bar_engraver { public: @@ -15,9 +8,10 @@ public: VIRTUAL_COPY_CONS (Translator); }; -ADD_THIS_TRANSLATOR (Span_bar_engraver); Span_bar_engraver::Span_bar_engraver () { use_priority_b_ = false; } + +ADD_THIS_TRANSLATOR(Span_bar_engraver); diff --git a/lily/span-bar.cc b/lily/span-bar.cc index d116caf288..4393de2def 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "dimension-cache.hh" #include "span-bar.hh" @@ -54,31 +54,6 @@ Span_bar::do_post_processing () Interval i(get_spanned_interval ()); translate_axis (i.center (), Y_AXIS); - - /* - {[ stacking shift - ugh - */ - SCM me = get_elt_property ("glyph"); - if (gh_string_p (me) && ly_scm2string (me) == "bracket") - { - SCM e = get_elt_property ("other"); - if (e != SCM_UNDEFINED) - { - assert (SMOB_IS_TYPE_B (Score_element, e)); - Score_element* se = SMOB_TO_TYPE (Score_element, e); - SCM her = se->get_elt_property ("glyph"); -#if 0 - // urg x-extent broken? - if (gh_string_p (her) && ly_scm2string (her) == "brace") - se->translate_axis (-extent (X_AXIS).length (), X_AXIS); -#else - if (gh_string_p (her) && ly_scm2string (her) == "brace" - && !to_boolean (get_elt_property ("transparent"))) - se->translate_axis (-paper_l ()->get_var ("interline"), X_AXIS); -#endif - } - } } void diff --git a/lily/span-score-bar-engraver.cc b/lily/span-score-bar-engraver.cc index ecccf6e4a9..98782a58da 100644 --- a/lily/span-score-bar-engraver.cc +++ b/lily/span-score-bar-engraver.cc @@ -4,7 +4,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "span-bar.hh" @@ -12,20 +12,17 @@ #include "paper-def.hh" #include "dimension-cache.hh" -ADD_THIS_TRANSLATOR (Piano_bar_engraver); -ADD_THIS_TRANSLATOR (Staff_group_bar_engraver); -ADD_THIS_TRANSLATOR (Span_score_bar_engraver); - Span_bar* Span_score_bar_engraver::get_span_bar_p () const { Span_bar*s = new Span_bar; - s->set_elt_property ("default-glyph", gh_str02scm ("scorebar")); + s->set_elt_property ("glyph", gh_str02scm ("scorebar")); s->set_elt_property ("break-aligned",SCM_BOOL_T); return s; } + Span_score_bar_engraver::Span_score_bar_engraver () { use_priority_b_ = true; @@ -36,29 +33,16 @@ Piano_bar_engraver::get_span_bar_p () const { Span_bar *s= new Span_bar; s->set_empty (X_AXIS); - s->set_elt_property ("default-glyph", gh_str02scm ("brace")); + s->set_elt_property ("glyph", gh_str02scm ("brace")); return s; } -void -Piano_bar_engraver::acknowledge_element (Score_element_info i) -{ - Base_span_bar_engraver::acknowledge_element (i); - - if (Span_bar * b = dynamic_cast (i.elem_l_)) - { - SCM g = b->get_elt_property ("default-glyph"); - if (gh_string_p (g) && (ly_scm2string (g) == "bracket")) - spanbar_p_->set_elt_property ("other", b->self_scm_); - } -} - Span_bar* Staff_group_bar_engraver::get_span_bar_p () const { Span_bar *s= new Span_bar; s->set_empty (X_AXIS); - s->set_elt_property ("default-glyph", gh_str02scm ("bracket")); + s->set_elt_property ("glyph", gh_str02scm ("bracket")); return s; } @@ -66,16 +50,17 @@ void Staff_group_bar_engraver::acknowledge_element (Score_element_info i) { Base_span_bar_engraver::acknowledge_element (i); - - if (!spanbar_p_) - return; - if (Span_bar * b = dynamic_cast (i.elem_l_)) { - SCM g = b->get_elt_property ("default-glyph"); - if (gh_string_p (g) && (ly_scm2string (g) == "brace")) - spanbar_p_->set_elt_property ("other", b->self_scm_); + SCM gl = b->get_elt_property ("glyph"); + if (gh_string_p (gl) && ly_scm2string (gl) == "brace") + b->translate_axis ( -paper_l ()->get_var ("interline"), + X_AXIS); // ugh } } +ADD_THIS_TRANSLATOR (Piano_bar_engraver); +ADD_THIS_TRANSLATOR (Staff_group_bar_engraver); +ADD_THIS_TRANSLATOR (Span_score_bar_engraver); + diff --git a/lily/spanner.cc b/lily/spanner.cc index 1af6d21283..77d35356b6 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys */ #include "dimension-cache.hh" diff --git a/lily/staff-info.cc b/lily/staff-info.cc index 38d1f6fa8d..10b63d8645 100644 --- a/lily/staff-info.cc +++ b/lily/staff-info.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "proto.hh" diff --git a/lily/staff-margin-engraver.cc b/lily/staff-margin-engraver.cc index 148ce368d5..0ffb6111e8 100644 --- a/lily/staff-margin-engraver.cc +++ b/lily/staff-margin-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1998--2000 Jan Nieuwenhuizen */ #include "staff-margin-engraver.hh" diff --git a/lily/staff-performer.cc b/lily/staff-performer.cc index 92b8c06e0c..a91d2170c4 100644 --- a/lily/staff-performer.cc +++ b/lily/staff-performer.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #include "staff-performer.hh" @@ -13,6 +13,7 @@ #include "audio-item.hh" #include "audio-staff.hh" + ADD_THIS_TRANSLATOR (Staff_performer); Staff_performer::Staff_performer () diff --git a/lily/staff-symbol-engraver.cc b/lily/staff-symbol-engraver.cc index ae325bd35a..03999e46f6 100644 --- a/lily/staff-symbol-engraver.cc +++ b/lily/staff-symbol-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "staff-symbol.hh" @@ -32,7 +32,6 @@ protected: }; -ADD_THIS_TRANSLATOR (Staff_symbol_engraver); Staff_symbol_engraver::~Staff_symbol_engraver() { @@ -75,3 +74,6 @@ Staff_symbol_engraver::acknowledge_element (Score_element_info s) } } + +ADD_THIS_TRANSLATOR(Staff_symbol_engraver); + diff --git a/lily/staff-symbol-referencer.cc b/lily/staff-symbol-referencer.cc index d7d639fcd9..d08cee919e 100644 --- a/lily/staff-symbol-referencer.cc +++ b/lily/staff-symbol-referencer.cc @@ -99,7 +99,7 @@ Staff_symbol_referencer_interface::callback (Dimension_cache const * c) Real off =0.0; if (gh_number_p (pos)) { - Real space = staff_symbol_referencer_interface (sc).staff_space (); + Real space = staff_symbol_referencer (sc).staff_space (); off = gh_scm2double (pos) * space/2.0; } sc->set_elt_property ("staff-position", gh_double2scm (0.0)); @@ -133,7 +133,7 @@ Staff_symbol_referencer_interface::set_position (Real p) } Staff_symbol_referencer_interface -staff_symbol_referencer_interface (Score_element const*e) +staff_symbol_referencer (Score_element const*e) { return e; // gee, I'm so smart! } diff --git a/lily/staff-symbol.cc b/lily/staff-symbol.cc index 75a3f5a2a5..10d7927201 100644 --- a/lily/staff-symbol.cc +++ b/lily/staff-symbol.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "staff-symbol.hh" #include "lookup.hh" diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index f20d105a98..91a679eca6 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "staff-symbol-referencer.hh" @@ -16,8 +16,6 @@ #include "staff-info.hh" #include "translator-group.hh" -ADD_THIS_TRANSLATOR (Stem_engraver); - Stem_engraver::Stem_engraver() { abbrev_req_l_ = 0; @@ -140,3 +138,6 @@ Stem_engraver::do_try_music (Music* r) return false; } + +ADD_THIS_TRANSLATOR(Stem_engraver); + diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc index 1ca152c275..57b35d875e 100644 --- a/lily/stem-tremolo.cc +++ b/lily/stem-tremolo.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/lily/stem.cc b/lily/stem.cc index 18889df2d9..2061caf1c2 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997--1999 Han-Wen Nienhuys + (c) 1996, 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen TODO: This is way too hairy @@ -63,8 +63,8 @@ Stem::head_positions () const Drul_array e (extremal_heads ()); - return Interval (staff_symbol_referencer_interface (e[DOWN]).position_f (), - staff_symbol_referencer_interface( e[UP]).position_f ()); + return Interval (staff_symbol_referencer (e[DOWN]).position_f (), + staff_symbol_referencer( e[UP]).position_f ()); } @@ -457,9 +457,7 @@ Stem::do_brew_molecule_p () const Interval stem_y(y1,y2); stem_y.unite (Interval (y2,y1)); - Real dy = staff_symbol_referencer_interface (this) - .staff_space ()/2.0; - + Real dy = staff_symbol_referencer (this).staff_space ()/2.0; Real head_wid = 0; if (support_head ()) head_wid = support_head ()->extent (X_AXIS).length (); diff --git a/lily/super-element.cc b/lily/super-element.cc index dee963dedd..c46d963f21 100644 --- a/lily/super-element.cc +++ b/lily/super-element.cc @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "super-element.hh" diff --git a/lily/swallow-engraver.cc b/lily/swallow-engraver.cc index 053a8f9560..476184e6cb 100644 --- a/lily/swallow-engraver.cc +++ b/lily/swallow-engraver.cc @@ -3,12 +3,14 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ - #include "swallow-engraver.hh" -ADD_THIS_TRANSLATOR (Swallow_engraver); + + +ADD_THIS_TRANSLATOR(Swallow_engraver); + bool Swallow_engraver::do_try_music (Music*) diff --git a/lily/swallow-perf.cc b/lily/swallow-perf.cc index a7be52b0c6..7cafeaf9ce 100644 --- a/lily/swallow-perf.cc +++ b/lily/swallow-perf.cc @@ -3,9 +3,11 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "swallow-perf.hh" -ADD_THIS_TRANSLATOR (Swallow_performer); + + +ADD_THIS_TRANSLATOR(Swallow_performer); diff --git a/lily/template5.cc b/lily/template5.cc index 22928dedc2..a61b8b8721 100644 --- a/lily/template5.cc +++ b/lily/template5.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include diff --git a/lily/tempo-performer.cc b/lily/tempo-performer.cc index bb9f4ae762..3463d3e8e4 100644 --- a/lily/tempo-performer.cc +++ b/lily/tempo-performer.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #include "tempo-performer.hh" diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc index 3c18529ed7..6d23595fe4 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -3,11 +3,11 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ - #include "dimension-cache.hh" + #include "engraver.hh" #include "side-position-interface.hh" #include "text-item.hh" @@ -34,7 +34,6 @@ protected: virtual void acknowledge_element (Score_element_info); }; -ADD_THIS_TRANSLATOR (Text_engraver); bool Text_engraver::do_try_music (Music *m) @@ -130,3 +129,5 @@ Text_engraver::do_post_move_processing () reqs_.clear (); } +ADD_THIS_TRANSLATOR(Text_engraver); + diff --git a/lily/text-item.cc b/lily/text-item.cc index d51a136385..034173e7c5 100644 --- a/lily/text-item.cc +++ b/lily/text-item.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/tfm.cc b/lily/tfm.cc index a46d2a8dab..7871dede08 100644 --- a/lily/tfm.cc +++ b/lily/tfm.cc @@ -26,8 +26,14 @@ Tex_font_char_metric::Tex_font_char_metric () { exists_b_ = false; code_ = 0;; - width_ = height_ = depth_ = italic_correction_ = 0; - width_fix_ = height_fix_ = depth_fix_ = italic_correction_fix_ = 0; + width_ = 0; + height_ = 0; + depth_ = 0; + italic_correction_ = 0; + width_fix_ = 0; + height_fix_ = 0; + depth_fix_ = 0; + italic_correction_fix_ = 0; } #define APPEND_CHAR_METRIC_ELT(k) outstr += to_str (#k) + " " + to_str (k ## _) + "; " diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index 351dc4442a..29f662c5f0 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -1,9 +1,9 @@ /* - tie-engraver.cc -- implement Tie_engraver + ctie-engraver.cc -- implement Tie_engraver source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ @@ -14,8 +14,6 @@ #include "tie.hh" #include "translator-group.hh" -ADD_THIS_TRANSLATOR (Tie_engraver); - Tie_engraver::Tie_engraver() { req_l_ = 0; @@ -182,6 +180,9 @@ Tie_engraver::do_post_move_processing () past_notes_pq_.delmin (); } +ADD_THIS_TRANSLATOR(Tie_engraver); + + CHead_melodic_tuple::CHead_melodic_tuple () { head_l_ =0; diff --git a/lily/tie-performer.cc b/lily/tie-performer.cc index f8610e76a9..a05b54cce6 100644 --- a/lily/tie-performer.cc +++ b/lily/tie-performer.cc @@ -12,6 +12,7 @@ #include "audio-item.hh" #include "musical-request.hh" + ADD_THIS_TRANSLATOR (Tie_performer); Tie_performer::Tie_performer() diff --git a/lily/tie.cc b/lily/tie.cc index 1743da7314..0ae13646c3 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -3,16 +3,20 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ +#include "lookup.hh" #include "paper-def.hh" #include "tie.hh" #include "note-head.hh" +#include "bezier.hh" #include "paper-column.hh" #include "debug.hh" #include "staff-symbol-referencer.hh" #include "directional-element-interface.hh" +#include "molecule.hh" +#include "bezier-bow.hh" void Tie::set_head (Direction d, Item * head_l) @@ -27,6 +31,9 @@ Tie::set_head (Direction d, Item * head_l) Tie::Tie() { set_elt_property ("heads", gh_cons (SCM_EOL, SCM_EOL)); + dy_f_drul_[LEFT] = dy_f_drul_[RIGHT] = 0.0; + dx_f_drul_[LEFT] = dx_f_drul_[RIGHT] = 0.0; + } Note_head* @@ -212,3 +219,136 @@ Tie::get_rods () const return a; } + + + +Molecule* +Tie::do_brew_molecule_p () const +{ + Real thick = paper_l ()->get_var ("slur_thickness"); + Bezier one = get_curve (); + + Molecule a; + SCM d = get_elt_property ("dashed"); + if (gh_number_p (d)) + a = lookup_l ()->dashed_slur (one, thick, gh_scm2int (d)); + else + a = lookup_l ()->slur (one, directional_element (this).get () * thick, thick); + + return new Molecule (a); +} + + + +Bezier +Tie::get_curve () const +{ + Bezier_bow b (get_encompass_offset_arr (), directional_element (this).get ()); + + b.ratio_ = paper_l ()->get_var ("slur_ratio"); + b.height_limit_ = paper_l ()->get_var ("slur_height_limit"); + b.rc_factor_ = paper_l ()->get_var ("slur_rc_factor"); + + b.calculate (); + return b.get_curve (); +} + +#if 0 + +/* + TODO: FIXME. + */ + +/* + Clipping + + This function tries to address two issues: + * the tangents of the slur should always point inwards + in the actual slur, i.e. *after rotating back*. + + * slurs shouldn't be too high + let's try : h <= 1.2 b && h <= 3 staffheight? + + We could calculate the tangent of the bezier curve from + both ends going inward, and clip the slur at the point + where the tangent (after rotation) points up (or inward + with a certain maximum angle). + + However, we assume that real clipping is not the best + answer. We expect that moving the outer control point up + if the slur becomes too high will result in a nicer slur + after recalculation. + + Knowing that the tangent is the line through the first + two control points, we'll clip (move the outer control + point upwards) too if the tangent points outwards. + */ + +bool +Bezier_Tie::calc_clipping () +{ + Real clip_height = paper_l_->get_var ("slur_clip_height"); + Real clip_ratio = paper_l_->get_var ("slur_clip_ratio"); + Real clip_angle = paper_l_->get_var ("slur_clip_angle"); + + Real b = curve_.control_[3][X_AXIS] - curve_.control_[0][X_AXIS]; + Real clip_h = clip_ratio * b ? begin_h - clip_h; + Real end_dy = 0 >? end_h - clip_h; + + Real pi = M_PI; + Real begin_alpha = (curve_.control_[1] - curve_.control_[0]).arg () + dir_ * alpha_; + Real end_alpha = pi - (curve_.control_[2] - curve_.control_[3]).arg () - dir_ * alpha_; + + Real max_alpha = clip_angle / 90 * pi / 2; + if ((begin_dy < 0) && (end_dy < 0) + && (begin_alpha < max_alpha) && (end_alpha < max_alpha)) + return false; + + transform_back (); + + if ((begin_dy > 0) || (end_dy > 0)) + { + Real dy = (begin_dy + end_dy) / 4; + dy *= cos (alpha_); + encompass_[0][Y_AXIS] += dir_ * dy; + encompass_.top ()[Y_AXIS] += dir_ * dy; + } + else + { + //ugh + Real c = 0.4; + if (begin_alpha >= max_alpha) + begin_dy = 0 >? c * begin_alpha / max_alpha * begin_h; + if (end_alpha >= max_alpha) + end_dy = 0 >? c * end_alpha / max_alpha * end_h; + + encompass_[0][Y_AXIS] += dir_ * begin_dy; + encompass_.top ()[Y_AXIS] += dir_ * end_dy; + + Offset delta = encompass_.top () - encompass_[0]; + alpha_ = delta.arg (); + } + + to_canonic_form (); + + return true; +} +#endif + + + +Array +Tie::get_encompass_offset_arr () const +{ + Array offset_arr; + offset_arr.push (Offset (dx_f_drul_[LEFT], dy_f_drul_[LEFT])); + offset_arr.push (Offset (spanner_length () + dx_f_drul_[RIGHT], + dy_f_drul_[RIGHT])); + + return offset_arr; +} + + diff --git a/lily/time-scaled-music-iterator.cc b/lily/time-scaled-music-iterator.cc index b42884bc99..da04bbf30f 100644 --- a/lily/time-scaled-music-iterator.cc +++ b/lily/time-scaled-music-iterator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/time-scaled-music.cc b/lily/time-scaled-music.cc index 16c38b34d5..4aa1d037af 100644 --- a/lily/time-scaled-music.cc +++ b/lily/time-scaled-music.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/time-signature-engraver.cc b/lily/time-signature-engraver.cc index 7a659d6a3d..965ecbf3c4 100644 --- a/lily/time-signature-engraver.cc +++ b/lily/time-signature-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "time-signature-engraver.hh" @@ -12,8 +12,6 @@ #include "timing-engraver.hh" #include "engraver-group-engraver.hh" -ADD_THIS_TRANSLATOR (Time_signature_engraver); - Time_signature_engraver::Time_signature_engraver() { time_signature_p_ =0; @@ -62,3 +60,6 @@ Time_signature_engraver::do_pre_move_processing() } +ADD_THIS_TRANSLATOR(Time_signature_engraver); + + diff --git a/lily/time-signature-performer.cc b/lily/time-signature-performer.cc index 9a326de1d1..3db298cdc4 100644 --- a/lily/time-signature-performer.cc +++ b/lily/time-signature-performer.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #include "time-signature-performer.hh" diff --git a/lily/time-signature.cc b/lily/time-signature.cc index 456663699e..09e51cf2b0 100644 --- a/lily/time-signature.cc +++ b/lily/time-signature.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996--1999 Han-Wen Nienhuys + (c) 1996--2000 Han-Wen Nienhuys */ diff --git a/lily/timing-engraver.cc b/lily/timing-engraver.cc index 4c02481c38..feb368ba36 100644 --- a/lily/timing-engraver.cc +++ b/lily/timing-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "score-engraver.hh" @@ -12,10 +12,13 @@ #include "score-element-info.hh" #include "multi-measure-rest.hh" -ADD_THIS_TRANSLATOR (Timing_engraver); + + +ADD_THIS_TRANSLATOR(Timing_engraver); + void -Timing_engraver::do_post_move_processing () +Timing_engraver::do_post_move_processing( ) { bar_req_l_ = 0; Timing_translator::do_post_move_processing (); diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index da9c0a5515..479ed456d4 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -4,7 +4,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "debug.hh" @@ -14,8 +14,6 @@ #include "global-translator.hh" #include "multi-measure-rest.hh" -ADD_THIS_TRANSLATOR (Timing_translator); - bool Timing_translator::do_try_music (Music*r) { @@ -109,6 +107,9 @@ Timing_translator::do_pre_move_processing() } } + +ADD_THIS_TRANSLATOR(Timing_translator); + void Timing_translator::do_creation_processing() { diff --git a/lily/translation-property.cc b/lily/translation-property.cc index 42e4364349..45f8de630c 100644 --- a/lily/translation-property.cc +++ b/lily/translation-property.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "translation-property.hh" diff --git a/lily/translator-ctors.cc b/lily/translator-ctors.cc index 253a7edb60..acb9523cc0 100644 --- a/lily/translator-ctors.cc +++ b/lily/translator-ctors.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "proto.hh" diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 6271a01a7f..5331074f1f 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "music-output-def.hh" diff --git a/lily/translator.cc b/lily/translator.cc index d4a5cb9d20..274ef2b412 100644 --- a/lily/translator.cc +++ b/lily/translator.cc @@ -3,12 +3,14 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ + #include "translator.hh" #include "debug.hh" #include "translator-group.hh" + #include "moment.hh" char const* diff --git a/lily/transposed-music.cc b/lily/transposed-music.cc index 4db446b3f7..2547fac08b 100644 --- a/lily/transposed-music.cc +++ b/lily/transposed-music.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/lily/tuplet-engraver.cc b/lily/tuplet-engraver.cc index 9441b7144a..478ad40abd 100644 --- a/lily/tuplet-engraver.cc +++ b/lily/tuplet-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ @@ -15,8 +15,6 @@ #include "beam.hh" #include "music-list.hh" -ADD_THIS_TRANSLATOR (Tuplet_engraver); - bool Tuplet_engraver::do_try_music (Music *r) { @@ -107,3 +105,6 @@ Tuplet_engraver::do_removal_processing () } } +ADD_THIS_TRANSLATOR(Tuplet_engraver); + + diff --git a/lily/tuplet-spanner.cc b/lily/tuplet-spanner.cc index ce9afe2243..348db3f890 100644 --- a/lily/tuplet-spanner.cc +++ b/lily/tuplet-spanner.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ #include "beam.hh" @@ -70,13 +70,8 @@ Tuplet_spanner::do_brew_molecule_p () const Real staff_space = paper_l ()->get_var ("interline"); - - Direction dir = directional_element (this).get (); - Real dy = column_arr.top ()->extent (Y_AXIS) [dir] - - column_arr[0]->extent (Y_AXIS) [dir]; - - + Real dy = gh_scm2double (get_elt_property ("delta-y")); SCM number = get_elt_property ("text"); if (gh_string_p (number)) { @@ -119,24 +114,63 @@ Tuplet_spanner::do_add_processing () set_bounds (RIGHT, column_arr.top ()); } } + +/* + use first -> last note for slope, and then correct for disturbing + notes in between. */ +void +Tuplet_spanner::calc_position_and_height (Real *offset, Real * dy) const +{ + Link_array column_arr= + Group_interface__extract_elements (this, (Note_column*)0, "columns"); + + + Direction d = directional_element (this).get (); + *dy = column_arr.top ()->extent (Y_AXIS) [d] + - column_arr[0]->extent (Y_AXIS) [d]; + + *offset = - d * infinity_f; + Real x0 = column_arr[0]->hpos_f (); + Real x1 = column_arr.top ()->hpos_f (); + for (int i = 0; i < column_arr.size (); i++) + { + Real notey = column_arr[i]->extent (Y_AXIS)[d]; + Real x = column_arr[i]->hpos_f () - x0; + Real tuplety = *dy * x / (x1 -x0); + + if (notey * d > (*offset + tuplety) * d) + *offset = notey - tuplety; + } +} + void Tuplet_spanner::do_post_processing () { + Link_array column_arr= Group_interface__extract_elements (this, (Note_column*)0, "columns"); - + + if (!column_arr.size ()) + { + set_elt_property ("transparent", SCM_BOOL_T); + set_empty (X_AXIS); + set_empty (Y_AXIS); + } Direction d = directional_element (this).get (); if (!d) { d = UP; directional_element (this).set (d); + } - - if (column_arr.size()) - translate_axis (column_arr[0]->extent (Y_AXIS)[d], Y_AXIS); + Real dy, offset; + + calc_position_and_height (&offset, &dy); + set_elt_property ("delta-y", gh_double2scm (dy)); + translate_axis (offset, Y_AXIS); if (scm_ilength (get_elt_property ("beams")) == 1) { @@ -158,7 +192,7 @@ Tuplet_spanner::get_default_dir () const SCM dir_sym =get_elt_property ("dir-forced"); if (gh_number_p (dir_sym)) { - d= (Direction) gh_scm2int (dir_sym); + d= to_dir (dir_sym); if (d != CENTER) return d; } diff --git a/lily/type-swallow-translator.cc b/lily/type-swallow-translator.cc index 93ba989730..1aa529cd52 100644 --- a/lily/type-swallow-translator.cc +++ b/lily/type-swallow-translator.cc @@ -3,13 +3,12 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "type-swallow-translator.hh" #include "musical-request.hh" -DECLARE_REQUEST_SWALLOWER (Skip_req); bool Type_swallow_translator::do_try_music (Music*r) @@ -18,3 +17,7 @@ Type_swallow_translator::do_try_music (Music*r) return true; return false; } + + + +DECLARE_REQUEST_SWALLOWER(Skip_req); diff --git a/lily/vertical-align-engraver.cc b/lily/vertical-align-engraver.cc index 7cc8cadd04..7c99d70ed9 100644 --- a/lily/vertical-align-engraver.cc +++ b/lily/vertical-align-engraver.cc @@ -3,9 +3,8 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ - #include "translator-group.hh" #include "axis-group-engraver.hh" #include "paper-column.hh" @@ -14,8 +13,6 @@ #include "axis-group-spanner.hh" #include "span-bar.hh" -ADD_THIS_TRANSLATOR (Vertical_align_engraver); - Vertical_align_engraver::Vertical_align_engraver() { valign_p_ =0; @@ -82,3 +79,6 @@ Vertical_align_engraver::acknowledge_element (Score_element_info i) } } + + +ADD_THIS_TRANSLATOR(Vertical_align_engraver); diff --git a/lily/volta-spanner.cc b/lily/volta-spanner.cc index 15e2fc8697..9ea8b7a2c7 100644 --- a/lily/volta-spanner.cc +++ b/lily/volta-spanner.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ diff --git a/lily/warn.cc b/lily/warn.cc index 74265b9e31..5513d2524f 100644 --- a/lily/warn.cc +++ b/lily/warn.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "proto.hh" diff --git a/lilypond-mode.el b/lilypond-mode.el new file mode 100644 index 0000000000..962659fe25 --- /dev/null +++ b/lilypond-mode.el @@ -0,0 +1,380 @@ +;;; lilypond-mode.el --- Major mode for editing GNU LilyPond music scores + +;; Copyright (C) 1992,1993,1994 Tim Peters + +;; Author: 1999: Jan Nieuwenhuizen +;; Author: 1997: Han-Wen Nienhuys +;; Author: 1995-1996 Barry A. Warsaw +;; 1992-1994 Tim Peters +;; Created: Feb 1992 +;; Version: 0.0 +;; Last Modified: 12SEP97 +;; Keywords: mudela languages music + +;; This software is provided as-is, without express or implied +;; warranty. Permission to use, copy, modify, distribute or sell this +;; software, without fee, for any purpose and by any individual or +;; organization, is hereby granted, provided that the above copyright +;; notice and this paragraph appear in all copies. + +;; Sigh + +;; This is a cannabalised version of python-mode.el (HWN) +;; Added lily-eval-buffer -- jcn +;; +;; TODO: +;; * lily/ly/lilypond? +;; * fix lily-keymap +;; * mail Tim Peters about silly copyright (notice)? +;; * syntax +;; - should handle block comments too. +;; - handle lexer modes (\header, \melodic, \lyric) etc. +;; - indentation +;; - notenames? +;; - fontlock: \melodic \melodic + + +(defconst lily-version "1.3.19" + "`lilypond-mode' version number.") + +(defconst lily-help-address "hanwen@cs.uu.nl" + "Address accepting submission of bug reports.") + +(defconst lily-font-lock-keywords + (let* ((keywords '("spanrequest" "simultaneous" "sequential" "accepts" + "alternative" "bar" "breathe" + "cadenza" "chordmodifiers" "chords" "clef" "cm" "consists" + "consistsend" "context" + "duration" "font" "grace" "header" "in" "lyrics" + "key" "keysignature" "mark" "musicalpitch" + "time" "times" "midi" "mm" "name" "notenames" + "notes" "partial" "paper" "penalty" "property" "pt" + "relative" "remove" "repeat" "repetitions" "addlyrics" + "scm" "scmfile" "score" "script" + "shape" "skip" "textscript" "tempo" "translator" "transpose" + "type" "version" + )) + (kwregex (mapconcat (lambda (x) (concat "\\\\" x)) keywords "\\|"))) + + (list + (concat ".\\(" kwregex "\\)[^a-zA-Z]") + (concat "^\\(" kwregex "\\)[^a-zA-Z]") + '(".\\(\\\\[a-zA-Z][a-zA-Z]*\\)" 1 font-lock-variable-name-face) + '("^[\t ]*\\([a-zA-Z][_a-zA-Z]*\\) *=" 1 font-lock-variable-name-face) + )) + "Additional expressions to highlight in Mudela mode.") + +;; define a mode-specific abbrev table for those who use such things +(defvar lilypond-mode-abbrev-table nil + "Abbrev table in use in `lilypond-mode' buffers.") + +(define-abbrev-table 'lilypond-mode-abbrev-table nil) + +(defvar lilypond-mode-hook nil + "*Hook called by `lilypond-mode'.") + +(defvar lily-mode-syntax-table nil + "Syntax table used in `lilypond-mode' buffers.") + +;; +(if lily-mode-syntax-table + () + (setq lily-mode-syntax-table (make-syntax-table)) + (mapcar (function + (lambda (x) (modify-syntax-entry + (car x) (cdr x) lily-mode-syntax-table))) + '(( ?\( . "." ) ( ?\) . "." ) + ( ?\[ . "." ) ( ?\] . "." ) + ( ?\{ . "(}" ) ( ?\} . "){" ) + ( ?\< . "(>" )( ?\> . ")>") + ( ?\$ . "." ) ( ?\% . "." ) ( ?\& . "." ) + ( ?\* . "." ) ( ?\+ . "." ) ( ?\- . "." ) + ( ?\/ . "." ) ( ?\= . "." ) + ( ?\| . "." ) (?\\ . "\\" ) + ( ?\_ . "." ) + ( ?\' . "w") + ( ?\" . "\"" ) + ( ?\% . "<") + ( ?\n . ">") + +; FIXME +; ( ?% . ". 124b" ) +; ( ?{ . ". 23" ) + )) + + ) + +(defconst lily-imenu-generic-re "^\\([a-zA-Z_][a-zA-Z0-9_]*\\) *=" + "Regexp matching Identifier definitions.") + +;; Sadly we need this for a macro in Emacs 19. +(eval-when-compile + ;; Imenu isn't used in XEmacs, so just ignore load errors. + (condition-case () + (require 'imenu) + (error nil))) + +(defvar lily-imenu-generic-expression + (list (list nil lily-imenu-generic-re 1)) + "Expression for imenu") + + +;;; we're using some handy compile commands +(require 'compile) + +(defcustom lily-command "lilypond" + "* LilyPond executable." + :type 'string + :group 'lily) + +(defcustom lily-parameters "" + "*." + :type 'string + :group 'lily) + +(defvar lily-regexp-alist + '(("\\([a-zA-Z]?:?[^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2)) + "Regexp used to match LilyPond errors. See `compilation-error-regexp-alist'.") + +(defcustom lily-tex-command "tex" + "*." + :type 'string + :group 'lily) + +(defcustom lily-xdvi-command "xdvi" + "*." + :type 'string + :group 'lily) + +(defun lily-compile-file (command parameters file) + ;; Setting process-setup-function makes exit-message-function work + ;; even when async processes aren't supported. + (let ((command-args (concat command " " parameters " " file))) + (compile-internal command-args "No more errors" "LilyPond"))) + +;; do we still need this, now that we're using compile-internal? +(defun lily-save-buffer () + (if (buffer-modified-p) (save-buffer))) + +;;; return (dir base ext) +(defun split-file-name (name) + (let* ((i (string-match "[^/]*$" name)) + (dir (if (> i 0) (substring name 0 i) "./")) + (file (substring name i (length name))) + (i (string-match "[^.]*$" file))) + (if (and + (> i 0) + (< i (length file))) + (list dir (substring file 0 (- i 1)) (substring file i (length file))) + (list dir file "")))) + +;;;###autoload +(defun lily-eval-buffer () + "Run LilyPond on buffer." + (interactive) + (let ((buffer (buffer-name))) + (if buffer-file-name + (progn + (lily-save-buffer) + (lily-compile-file lily-command lily-parameters buffer)) + (progn + (error "Buffer %s is not associated with a file" buffer) + (lily-eval-region (min-point) (max-point)))))) + +;;;###autoload +(defun lily-eval-region (start end) + "Run LilyPond on region." + (interactive "r") + ;; (message "saving current buffer to temporary file ...") + ;; (write-file tmp-file-with-directory) + ;;(lily-compile-file lily-command "--init=init.fly" "-") + (let ((basename "emacs-lily")) + (write-region start end (concat basename ".fly") nil 'nomsg) + (lily-compile-file lily-command lily-parameters basename))) + +(defun lily-running () + (let ((process (get-process "lilypond"))) + (and process + (eq (process-status process) 'run)))) + +(defun lily-tex-file (basename) + (call-process lily-tex-command nil t nil basename)) + +(defun lily-xdvi-file (basename) + (let ((outbuf (get-buffer-create "*lily-xdvi*")) + (name "xdvi") + (command (concat lily-xdvi-command " " basename))) + (if (get-process "xdvi") + ;; Don't open new xdvi window, but force redisplay + ;; We could make this an option. + (signal-process (process-id (get-process "xdvi")) 'SIGUSR1) + (if (fboundp 'start-process) + (let* ((process-environment (cons "EMACS=t" process-environment)) + (proc (start-process-shell-command name outbuf command))) + ;;(set-process-sentinel proc 'compilation-sentinel) + ;;(set-process-filter proc 'compilation-filter) + (set-marker (process-mark proc) (point) outbuf)) + ;;(setq compilation-in-progress (cons proc compilation-in-progress))) + + ;; No asynchronous processes available. + (message "Executing `%s'..." command) + ;; Fake modeline display as if `start-process' were run. + (setq mode-line-process ":run") + (force-mode-line-update) + (sit-for 0) ; Force redisplay + (call-process shell-file-name nil outbuf nil "-c" command) + (message "Executing `%s'...done" command))))) + + +;;;###autoload +(defun lily-xdvi-buffer () + "Run LilyPond, TeX and Xdvi on buffer." + (interactive) + + (let* ((split (split-file-name buffer-file-name)) + (dir (car split)) + (base (cadr split))) + + ;; we don't really need this... + (let ((tex (concat dir base ".tex")) + (dvi (concat dir base ".dvi"))) + (if (file-exists-p tex) (delete-file tex)) + (if (file-exists-p dvi) (delete-file dvi))) + + (lily-eval-buffer) + (set-buffer "*lilypond*") + + ;;(setq default-directory dir) + (while (lily-running) + (continue-process (get-process "lilypond"))) + (sit-for 0) ; Force redisplay + + (if (= 0 (process-exit-status (get-process "lilypond"))) + (progn + (if (= 0 (lily-tex-file base)) + (lily-xdvi-file base)))))) + +;;;###autoload +(defun lily-xdvi-region (start end) + "Run LilyPond, TeX and Xdvi on region." + (interactive "r") + + (let ((dir default-directory) + (base "emacs-lily")) + + ;; we don't really need this... + (let ((tex (concat dir base ".tex")) + (dvi (concat dir base ".dvi"))) + (if (file-exists-p tex) (delete-file tex)) + (if (file-exists-p dvi) (delete-file dvi))) + + (lily-eval-region start end) + (set-buffer "*lilypond*") + + ;;(setq default-directory dir) + (while (lily-running) + (continue-process (get-process "lilypond"))) + (sit-for 0) ; Force redisplay + + (if (= 0 (process-exit-status (get-process "lilypond"))) + (progn + (if (= 0 (lily-tex-file base)) + (lily-xdvi-file base)))))) + +;;;###autoload +(defun lily-kill-job () + "Kill the currently running LilyPond job." + (interactive) + (quit-process (get-process "lilypond") t)) + +;; hmm +;; (kill-process (get-process "xdvi") t) + +(defvar lily-mode-map () + "Keymap used in `lilypond-mode' buffers.") + +(if lily-mode-map + () + (setq lily-mode-map (make-sparse-keymap)) + ;; this doesn't work, here + ;; I would very much like to have [f9], globally defined as 'compile, + ;; being overidden to 'lily-eval-buffer for LilyPond buffers + (define-key lily-mode-map [C-f9] 'lily-eval-buffer) + ;; urg + ;; add to .emacs: + ;; (global-set-key [C-f9] 'lily-eval-buffer) + ) + +(defun lilypond-mode () + "Major mode for editing Mudela files." + (interactive) + ;; set up local variables + (kill-all-local-variables) + + (make-local-variable 'font-lock-defaults) + (setq font-lock-defaults '(lily-font-lock-keywords)) + + (make-local-variable 'paragraph-separate) + (setq paragraph-separate "^[ \t]*$") + + (make-local-variable 'paragraph-start) + (setq paragraph-start "^[ \t]*$") + + (make-local-variable 'comment-start) + (setq comment-start "%") + + (make-local-variable 'comment-start-skip) + (setq comment-start-skip "%{? *") + + (make-local-variable 'comment-end) + (setq comment-end "\n") + + (make-local-variable 'block-comment-start) + (setq block-comment-start "%{") + + (make-local-variable 'block-comment-end) + (setq block-comment-end "%}") + + ;; (make-local-variable 'comment-column) + ;; (setq comment-column 40) + + (make-local-variable 'imenu-generic-expression) + (setq imenu-generic-expression lily-imenu-generic-expression) + + (make-local-variable 'indent-line-function) + (setq indent-line-function 'indent-relative-maybe) + + ;; + (set-syntax-table lily-mode-syntax-table) + (setq major-mode 'lilypond-mode) + (setq mode-name "Mudela") + (setq local-abbrev-table lilypond-mode-abbrev-table) + (use-local-map lily-mode-map) + + ;; run the mode hook. lily-mode-hook use is deprecated + (run-hooks 'lilypond-mode-hook)) + + +(defun lily-keep-region-active () + ;; do whatever is necessary to keep the region active in XEmacs. + ;; Ignore byte-compiler warnings you might see. Also note that + ;; FSF's Emacs 19 does it differently and doesn't its policy doesn't + ;; require us to take explicit action. + (and (boundp 'zmacs-region-stays) + (setq zmacs-region-stays t))) + + +;;(defun lily-comment-region (beg end &optional arg) +;; "Like `comment-region' but uses double hash (`#') comment starter." +;; (interactive "r\nP") +;; (let ((comment-start lily-block-comment-prefix)) +;; (comment-region beg end arg))) + +(defun lily-version () + "Echo the current version of `lilypond-mode' in the minibuffer." + (interactive) + (message "Using `lilypond-mode' version %s" lily-version) + (lily-keep-region-active)) + +(provide 'lilypond-mode) +;;; lilypond-mode.el ends here diff --git a/ly/engraver.ly b/ly/engraver.ly index 7a2f8dfa59..a65ad4bd38 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -164,7 +164,8 @@ GraceContext=\translator { \consists "Property_engraver"; - stemStyle = #"grace" + stemStyle = #"grace" + flagStyle = #"grace" weAreGraceContext = ##t fontSize = #-1 diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 8bd72aeb38..46c111a224 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.3.18 -Entered-date: 28DEC99 +Version: 1.3.19 +Entered-date: 14JAN00 Description: Keywords: music notation typesetting midi fonts engraving Author: hanwen@cs.uu.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert - 1000k lilypond-1.3.18.tar.gz + 1000k lilypond-1.3.19.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.3.18.tar.gz + 1000k lilypond-1.3.19.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index d3436ae85e..8e1476d177 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 1.3.18 +Version: 1.3.19 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.18.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.19.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond # get Packager from (undocumented?) ~/.rpmmacros! diff --git a/make/toplevel.make.in b/make/toplevel.make.in index 8a33b3279c..60b6f26cf3 100644 --- a/make/toplevel.make.in +++ b/make/toplevel.make.in @@ -17,7 +17,7 @@ SCRIPTS = configure aclocal.m4 README_FILES = DEDICATION COPYING NEWS TODO CHANGES README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt IN_FILES := $(wildcard *.in) -EXTRA_DIST_FILES = dstreamrc mudela-mode.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) +EXTRA_DIST_FILES = dstreamrc lilypond-mode.el vimrc VERSION $(README_FILES) $(SCRIPTS) $(IN_FILES) NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES) # bootstrap stepmake: diff --git a/mf/feta-accordion.mf b/mf/feta-accordion.mf index 2ba90d28d8..2ac7cdecbe 100644 --- a/mf/feta-accordion.mf +++ b/mf/feta-accordion.mf @@ -1,6 +1,6 @@ % -*- Fundamental -*- -accreg_dot_size# := .5interline#; +accreg_dot_size# := .5staff_space#; % FIXME % 'strange turning path' in accSB and others: @@ -11,7 +11,7 @@ accreg_linethickness# := 1.3stafflinethickness#; % This dimention is the same on all registersymbols. % The different symbols should calculate their other % dimensions from this and accreg_dot_size -accreg_lh# := 1.0interline#; +accreg_lh# := 1.0staff_space#; define_pixels(accreg_dot_size, accreg_linethickness, accreg_lh); pen accreg_pen; @@ -133,10 +133,10 @@ enddef; def def_some_vars = save hs, mb, mt, thin, thick, height, width, cOne, cTwo; width = .8staffsize; - height = 2.4interline; - thin = 0.05interline; - thick = 0.2interline; - hs = 0.4interline; + height = 2.4staff_space; + thin = 0.05staff_space; + thick = 0.2staff_space; + hs = 0.4staff_space; mb = .53; mt = .47; cOne = 0.65; @@ -144,7 +144,7 @@ def def_some_vars = enddef; fet_beginchar("accSB", "accSB", "accSB") - set_char_box(.4staffsize#, .4staffsize#, 0, 2.4interline#); + set_char_box(.4staffsize#, .4staffsize#, 0, 2.4staff_space#); def_some_vars; def_B(.35width, .7height); @@ -169,11 +169,11 @@ fet_beginchar("accSB", "accSB", "accSB") currentpicture := currentpicture shifted (-.40width, -.85height); draw (-.5width, 0)--(.5width, 0)--(.5width, -height) --(-.5width, -height)--(-.5width, 0); - currentpicture := currentpicture shifted (0, 2.4interline); + currentpicture := currentpicture shifted (0, 2.4staff_space); fet_endchar; fet_beginchar("accBB", "accBB", "accBB") - set_char_box(.4staffsize#, .4staffsize#, 0, 2.4interline#); + set_char_box(.4staffsize#, .4staffsize#, 0, 2.4staff_space#); def_some_vars; def_B(.35width, .7height); @@ -192,17 +192,17 @@ fet_beginchar("accBB", "accBB", "accBB") currentpicture := currentpicture shifted(-.40width, -.85height); draw (-.5width, 0)--(.5width, 0)--(.5width, -height) --(-.5width, -height)--(-.5width, 0); - currentpicture := currentpicture shifted (0, 2.4interline); + currentpicture := currentpicture shifted (0, 2.4staff_space); fet_endchar; fet_beginchar("accOldEE", "accOldEE", "accOldEE") - set_char_box(interline#, interline#, 0, 2interline#); + set_char_box(staff_space#, staff_space#, 0, 2staff_space#); show w; show h; - r = interline; - lr = .3interline; - ir = .6interline; + r = staff_space; + lr = .3staff_space; + ir = .6staff_space; pickup accreg_pen; draw fullcircle scaled 2r; pickup penrazor; @@ -221,9 +221,9 @@ fet_beginchar("accOldEE", "accOldEE", "accOldEE") fet_endchar; fet_beginchar("accOldEES", "accOldEES", "accOldEES") - set_char_box(interline#, interline#, 0, 2interline#); + set_char_box(staff_space#, staff_space#, 0, 2staff_space#); save r, shy; - r = interline; + r = staff_space; shy = .3; pickup accreg_pen; draw fullcircle scaled 2r; diff --git a/mf/feta-banier.mf b/mf/feta-banier.mf index 28aaa545d5..246f599bfe 100644 --- a/mf/feta-banier.mf +++ b/mf/feta-banier.mf @@ -99,12 +99,12 @@ fet_beginchar("8th Flag (up)", "u3", "eighthflag") hip_depth_ratio, hip_width, foot_depth, foot_width_ratio; - flare# = 1.0 interline#; + flare# = 1.0 staff_space#; hip_depth_ratio = .72; foot_width_ratio = .8; hip_width# = upflag_width# - hip_thickness#/2; - foot_depth# = 3 interline#; + foot_depth# = 3 staff_space#; set_char_box(stemthickness# /2, hip_width# + stemthickness#/2 + right_upflag_space#, @@ -117,7 +117,7 @@ fet_beginchar("8th Flag (up)", "u3", "eighthflag") hip_depth_ratio, foot_width_ratio, hip_thickness, foot_thickness); pickup pencircle scaled stemthickness; - draw (0, 0) .. (0,-2 interline); + draw (0, 0) .. (0,-2 staff_space); fet_endchar; fet_beginchar("16th Flag (up)", "u4", "sixteenthflag") @@ -125,10 +125,10 @@ fet_beginchar("16th Flag (up)", "u4", "sixteenthflag") hip_depth_ratio, hip_width, foot_depth, foot_width_ratio; save flagspace, total_depth, flag_count; - total_depth# = 3.5 interline#; + total_depth# = 3.5 staff_space#; flag_count = 2; - flare# = .85 interline#; - flagspace# = .85 interline#; + flare# = .85 staff_space#; + flagspace# = .85 staff_space#; hip_depth_ratio = .72 ; hip_width# = upflag_width# - hip_thickness#/2; flagspace# + foot_depth# = total_depth#; @@ -150,7 +150,7 @@ fet_beginchar("16th Flag (up)", "u4", "sixteenthflag") .97, 1.00, 1.25, hip_thickness, foot_thickness); pickup pencircle scaled stemthickness; - draw (0, 0) .. (0,-2 interline); + draw (0, 0) .. (0,-2 staff_space); fet_endchar; @@ -160,9 +160,9 @@ fet_beginchar("32nd Flag (up)", "u5", "thirtysecondflag") foot_depth, foot_width_ratio; save flagspace, total_depth, flag_count; flag_count = 3; - total_depth#=4.25 interline#; - flare# = .85 interline#; - flagspace# = .87 interline#; + total_depth#=4.25 staff_space#; + flare# = .85 staff_space#; + flagspace# = .87 staff_space#; hip_depth_ratio = .72 ; hip_width# = upflag_width# - hip_thickness#/2; (flag_count-1) * flagspace# + foot_depth# = total_depth#; @@ -188,7 +188,7 @@ fet_beginchar("32nd Flag (up)", "u5", "thirtysecondflag") .95, 1.05, 1.25, hip_thickness, foot_thickness); pickup pencircle scaled stemthickness; - draw (0, 0) .. (0,-2 interline); + draw (0, 0) .. (0,-2 staff_space); fet_endchar; fet_beginchar("64th Flag (up)", "u6", "sixtyfourthflag") @@ -198,11 +198,11 @@ fet_beginchar("64th Flag (up)", "u6", "sixtyfourthflag") save flagspace, total_depth, flag_count; flag_count = 4; - flare# = .85 interline#; - flagspace# = .9 interline#; + flare# = .85 staff_space#; + flagspace# = .9 staff_space#; hip_depth_ratio = .72 ; hip_width# = upflag_width# - hip_thickness#/2; - total_depth# = 5.25 interline#; + total_depth# = 5.25 staff_space#; (flag_count-1) * flagspace# + foot_depth# = total_depth#; foot_width_ratio = .8; @@ -227,7 +227,7 @@ fet_beginchar("64th Flag (up)", "u6", "sixtyfourthflag") add_flag(flagspace, flare, .95, 1.05, 1.25, hip_thickness, foot_thickness); pickup pencircle scaled stemthickness; - draw (0, 0) .. (0,-2 interline); + draw (0, 0) .. (0,-2 staff_space); fet_endchar; fet_beginchar("grace dash (up)", "ugrace", "gracedash") @@ -235,11 +235,11 @@ fet_beginchar("grace dash (up)", "ugrace", "gracedash") hip_depth_ratio, hip_width, foot_depth; - flare# = 1.0 interline#; + flare# = 1.0 staff_space#; hip_depth_ratio = .72; hip_width# = upflag_width# - hip_thickness#/2; - foot_depth# = 3 interline#; + foot_depth# = 3 staff_space#; define_pixels(flare, hip_width, hip_thickness, foot_depth, foot_thickness); @@ -260,11 +260,11 @@ fet_beginchar("8th (down)", "d3", "deighthflag") save flagspace, total_depth, flag_count; flag_count = 1; - flare# = .99 interline#; - flagspace# = .9 interline#; + flare# = .99 staff_space#; + flagspace# = .9 staff_space#; hip_depth_ratio = .72 ; hip_width# = downflag_width# - hip_thickness#/2; - total_depth# = 2.85 interline#; + total_depth# = 2.85 staff_space#; (flag_count-1) * flagspace# + foot_depth# = total_depth#; foot_width_ratio = .8; @@ -283,7 +283,7 @@ fet_beginchar("8th (down)", "d3", "deighthflag") pickup pencircle scaled stemthickness; - draw (0, 0) .. (0,-2 interline); + draw (0, 0) .. (0,-2 staff_space); y_mirror_char; fet_endchar; @@ -294,11 +294,11 @@ fet_beginchar("16th (down)", "d4", "dsixteenthflag") save flagspace, total_depth, flag_count; flag_count = 2; - flare# = .8 interline#; - flagspace# = .9 interline#; + flare# = .8 staff_space#; + flagspace# = .9 staff_space#; hip_depth_ratio = .85 ; hip_width# = downflag_width# - hip_thickness#/2; - total_depth# = 3.0 interline#; + total_depth# = 3.0 staff_space#; (flag_count-1) * flagspace# + foot_depth# = total_depth#; foot_width_ratio = .95; @@ -320,7 +320,7 @@ fet_beginchar("16th (down)", "d4", "dsixteenthflag") pickup pencircle scaled stemthickness; - draw (0, 0) .. (0,-2 interline); + draw (0, 0) .. (0,-2 staff_space); y_mirror_char; fet_endchar; @@ -331,11 +331,11 @@ fet_beginchar("32nd (down)", "d5", "dthirtysecondflag") save flagspace, total_depth, flag_count; flag_count = 3; - flare# = .84 interline#; - flagspace# = .9 interline#; + flare# = .84 staff_space#; + flagspace# = .9 staff_space#; hip_depth_ratio = .85 ; hip_width# = downflag_width# - hip_thickness#/2; - total_depth# = 3.85 interline#; + total_depth# = 3.85 staff_space#; (flag_count-1) * flagspace# + foot_depth# = total_depth#; foot_width_ratio = .95; @@ -360,7 +360,7 @@ fet_beginchar("32nd (down)", "d5", "dthirtysecondflag") pickup pencircle scaled stemthickness; - draw (0, 0) .. (0,-2 interline); + draw (0, 0) .. (0,-2 staff_space); y_mirror_char; fet_endchar; fet_beginchar("64th (down)", "d6", "dsixtyfourthflag") @@ -370,11 +370,11 @@ fet_beginchar("64th (down)", "d6", "dsixtyfourthflag") save flagspace, total_depth, flag_count; flag_count = 4; - flare# = .8 interline#; - flagspace# = .9 interline#; + flare# = .8 staff_space#; + flagspace# = .9 staff_space#; hip_depth_ratio = .85 ; hip_width# = downflag_width# - hip_thickness#/2; - total_depth# = 4.35 interline#; + total_depth# = 4.35 staff_space#; (flag_count-1) * flagspace# + foot_depth# = total_depth#; foot_width_ratio = .98; @@ -401,7 +401,7 @@ fet_beginchar("64th (down)", "d6", "dsixtyfourthflag") pickup pencircle scaled stemthickness; - draw (0, 0) .. (0,-2 interline); + draw (0, 0) .. (0,-2 staff_space); y_mirror_char; fet_endchar; @@ -411,11 +411,11 @@ fet_beginchar("grace dash (down)", "dgrace", "dgracedash") save flagspace, total_depth, flag_count; flag_count = 1; - flare# = .99 interline#; - flagspace# = .9 interline#; + flare# = .99 staff_space#; + flagspace# = .9 staff_space#; hip_depth_ratio = .72 ; hip_width# = downflag_width# - hip_thickness#/2; - total_depth# = 2.85 interline#; + total_depth# = 2.85 staff_space#; (flag_count-1) * flagspace# + foot_depth# = total_depth#; foot_width_ratio = .8; diff --git a/mf/feta-beugel.mf b/mf/feta-beugel.mf index 7f8558f69b..c51128173a 100644 --- a/mf/feta-beugel.mf +++ b/mf/feta-beugel.mf @@ -15,7 +15,7 @@ def draw_brace( expr height_sharp, width_sharp) = define_pixels (height, width); thin = 2 stafflinethickness; - thick = .5 interline; + thick = .5 staff_space; z2 = .5 [z1, z3]; y3 = y1 + height/2; @@ -40,5 +40,5 @@ enddef; for h := 2 staffsize# step 1 pt# until (7 * staffsize#): - draw_brace(h, interline# ); + draw_brace(h, staff_space# ); endfor diff --git a/mf/feta-bolletjes.mf b/mf/feta-bolletjes.mf index fdeebb8403..efb52eb290 100644 --- a/mf/feta-bolletjes.mf +++ b/mf/feta-bolletjes.mf @@ -18,7 +18,7 @@ numeric black_notehead_width; fet_begingroup("noteheads"); -noteheight#:=interline#+ (1 + overdone_heads) *stafflinethickness#; +noteheight#:=staff_space#+ (1 + overdone_heads) *stafflinethickness#; define_pixels(noteheight); @@ -30,7 +30,7 @@ define_pixels(noteheight); % % % -brevis_wid# := 2 interline#; +brevis_wid# := 2 staff_space#; def draw_brevis(expr brevwid) = save beamheight, head_width; @@ -84,7 +84,7 @@ def draw_longa (expr wid) = x7r = head_width; y7 = y5; % z7 = z5; - z6 - z7 = (stem_width/2, -interline); + z6 - z7 = (stem_width/2, -staff_space); theta = angle(z6-z7)+ 90; penpos7(stem_width, theta); penpos6(1.2 stem_width, theta); @@ -149,15 +149,15 @@ def draw_mensural_open_head (expr wid)= enddef; fet_beginchar("Mensural open head","0mensural","mensuralminimhead") - draw_mensural_open_head (interline#); + draw_mensural_open_head (staff_space#); fet_endchar; fet_beginchar("Mensural open head","1mensural","mensuralsemiminimhead") - draw_mensural_open_head (interline#); + draw_mensural_open_head (staff_space#); fet_endchar; fet_beginchar("Mensural black head","2mensural","fusahead") - draw_mensural_black_head (interline#); + draw_mensural_black_head (staff_space#); fet_endchar; diff --git a/mf/feta-eindelijk.mf b/mf/feta-eindelijk.mf index 96a9249eb4..538b006eb0 100644 --- a/mf/feta-eindelijk.mf +++ b/mf/feta-eindelijk.mf @@ -13,7 +13,7 @@ begingroup thick#:=1/16designsize; define_blacker_pixels(thick); -rthin:=1/8*interline; +rthin:=1/8*staff_space; % rthick:=2rthin; rthick:=2thick+rthin; @@ -25,10 +25,10 @@ enddef; % save stem, ball_crook_stem, ball_crook_balldiam, flare; -% stem#:=1/8*interline#; -stem# = 1/5interline#; -% flare# = 2/3interline#; -flare# = 2/3interline# - 1/8stafflinethickness#; +% stem#:=1/8*staff_space#; +stem# = 1/5staff_space#; +% flare# = 2/3staff_space#; +flare# = 2/3staff_space# - 1/8stafflinethickness#; define_pixels(stem,flare); @@ -38,8 +38,8 @@ ball_crook_balldiam =flare; save block_rest_y, block_rest_x; -block_rest_y# = 5/8 interline#; -block_rest_x# = 3/2 interline#; +block_rest_y# = 5/8 staff_space#; +block_rest_x# = 3/2 staff_space#; define_pixels(block_rest_y, block_rest_x); @@ -90,10 +90,10 @@ fet_endchar; save breve_rest_y, breve_rest_x; -breve_rest_y# = interline#; -breve_rest_x# = 3/5 interline#; -multi_rest_x# = 2 interline#; -multi_rest_y# = 1/3 interline#; +breve_rest_y# = staff_space#; +breve_rest_x# = 3/5 staff_space#; +multi_rest_x# = 2 staff_space#; +multi_rest_y# = 1/3 staff_space#; define_pixels(breve_rest_y, breve_rest_x, multi_rest_x, multi_rest_y); @@ -124,12 +124,12 @@ fet_beginchar("Quarter rest","2","quartrest"); % draw_staff (-2, 2, 0.0); save alpha, yshift, height; alpha:=-50; - yshift# = -1.25 interline#; - height# = 2.8125 interline#; + yshift# = -1.25 staff_space#; + height# = 2.8125 staff_space#; define_pixels (yshift, height); - set_char_box(0, 27/25interline#, + set_char_box(0, 27/25staff_space#, -yshift#, yshift# + height#); @@ -154,15 +154,15 @@ fet_beginchar("Quarter rest","2","quartrest"); z13=z2r+1/2rthin*ne+1/2rthin*nw; y1r = h; - x1l=1/3interline; - z2r=z1+interline*se; + x1l=1/3staff_space; + z2r=z1+staff_space*se; z3=1/2[z2,z4]; - x4=3/8interline; + x4=3/8staff_space; y4= 0; - z5=z4l+1.3interline*se; + z5=z4l+1.3staff_space*se; x6l=x4l; y6l=y4r; - x7=2/5interline; + x7=2/5staff_space; y7= -d; fill z1l{se}..{se}z10..z3l..z11{se}..{se}z5l..z5r{nw}..{nw}z12..z3r..z13{nw}..{nw}z1r.. cycle; @@ -170,8 +170,8 @@ fet_beginchar("Quarter rest","2","quartrest"); penlabels(1,2,3,4,5,6,7); penlabels(10,11,12,13); -% 3/4 interline# + yshift#, -% 18/5interline# + yshift#) +% 3/4 staff_space# + yshift#, +% 18/5staff_space# + yshift#) fet_endchar; @@ -182,14 +182,14 @@ enddef; fet_beginchar("8th rest","3","eighthrest"); % draw_staff (-2, 2, 0.0); save yshift, ballcorrection; - ballcorrection = 0.005 interline; + ballcorrection = 0.005 staff_space; - yshift# := -1.0 interline#; + yshift# := -1.0 staff_space#; define_pixels(yshift); - set_char_box(0, 4/3interline#, -yshift#, yshift# + - 5/3interline#+7/4stafflinethickness#); + set_char_box(0, 4/3staff_space#, -yshift#, yshift# + + 5/3staff_space#+7/4stafflinethickness#); % % The curve is like a valley causing less space between @@ -199,7 +199,7 @@ fet_beginchar("8th rest","3","eighthrest"); x1=w-stem/6; - y1 = yshift + 1.5 interline + flare/4 + ballcorrection; + y1 = yshift + 1.5 staff_space + flare/4 + ballcorrection; rest_crook (z1,w-stem/6); z2-z1=whatever*dir70; y2= yshift + stem/2; @@ -210,29 +210,29 @@ fet_beginchar("8th rest","3","eighthrest"); fet_beginchar("16th rest","4","sixteenthrest"); % draw_staff (-2, 2, 0.0); save yshift, ballcorrection; - ballcorrection = 0.005 interline; + ballcorrection = 0.005 staff_space; - yshift# := - 2 interline#; + yshift# := - 2 staff_space#; define_pixels(yshift); save alpha,cw,h,w, height; alpha=74; - cw#=7/6interline#; - height# = 5/3interline#+interline#+7/4stafflinethickness#; - set_char_box(0, cw#+(height#-3/2interline#)/tand(alpha), + cw#=7/6staff_space#; + height# = 5/3staff_space#+staff_space#+7/4stafflinethickness#; + set_char_box(0, cw#+(height#-3/2staff_space#)/tand(alpha), -yshift#, height# + yshift#); define_pixels(cw); save x,y; x1=w-stem/6; - y1 = yshift + 2.5 interline + flare/4 + ballcorrection; + y1 = yshift + 2.5 staff_space + flare/4 + ballcorrection; z2-z1=whatever*dir alpha; y2= yshift + stem/2; brush(z1,2/3stem,z2,stem); rest_crook (z1,cw); z3-z1=whatever*dir alpha; - y3=y1-interline; + y3=y1-staff_space; rest_crook (z3,cw); penlabels(1,2); fet_endchar; @@ -240,68 +240,68 @@ fet_beginchar("16th rest","4","sixteenthrest"); fet_beginchar("32th rest","5","thirtysecondrest"); % draw_staff (-2, 2, 0.0); save yshift, ballcorrection; - ballcorrection = 0.005 interline; + ballcorrection = 0.005 staff_space; - yshift# := -2 interline#; + yshift# := -2 staff_space#; define_pixels(yshift); save alpha,cw,h; alpha=76; - cw#=7/6interline#; - h#=5/3interline#+2interline#+7/4stafflinethickness#; + cw#=7/6staff_space#; + h#=5/3staff_space#+2staff_space#+7/4stafflinethickness#; - set_char_box(0, cw#+(h#-3/2interline#)/tand(alpha), + set_char_box(0, cw#+(h#-3/2staff_space#)/tand(alpha), -yshift#,yshift# +h#); define_pixels(cw); save x,y; x1=w-stem/6; - y1 = yshift + 3.5 interline + flare/4 + ballcorrection; + y1 = yshift + 3.5 staff_space + flare/4 + ballcorrection; z2-z1=whatever*dir alpha; y2=stem/2 + yshift; brush(z1,2/3stem,z2,stem); rest_crook (z1,cw); z3-z1=whatever*dir alpha; - y3=y1-interline; + y3=y1-staff_space; rest_crook (z3,cw); z4-z1=whatever*dir alpha; - y4=y1-2interline; + y4=y1-2staff_space; rest_crook (z4,cw); fet_endchar; fet_beginchar("64th rest","6","sixtyfourthrest"); % draw_staff (-2, 2, 0.0); save yshift, ballcorrection; - ballcorrection = 0.005 interline; + ballcorrection = 0.005 staff_space; - yshift# := -3 interline#; + yshift# := -3 staff_space#; define_pixels(yshift); save alpha,cw,h,w; alpha=78; - cw#=7/6interline#; - h#=5/3interline#+3interline#+7/4stafflinethickness#; - w#=cw#+(h#-3/2interline#)/tand(alpha); + cw#=7/6staff_space#; + h#=5/3staff_space#+3staff_space#+7/4stafflinethickness#; + w#=cw#+(h#-3/2staff_space#)/tand(alpha); set_char_box(0,w#,-yshift# ,yshift# + h#); define_pixels(cw); save x,y; x1=w-stem/6; - y1 = yshift + 4.5 interline + flare/4 + ballcorrection; + y1 = yshift + 4.5 staff_space + flare/4 + ballcorrection; z2-z1=whatever*dir alpha; y2=stem/2 + yshift; brush (z1,2/3stem,z2,stem); rest_crook (z1,cw); z3-z1=whatever*dir alpha; - y3=y1-interline; + y3=y1-staff_space; rest_crook (z3,cw); z4-z1=whatever*dir alpha; - y4=y1-2interline; + y4=y1-2staff_space; rest_crook (z4,cw); z5-z1=whatever*dir alpha; - y5=y1-3interline; + y5=y1-3staff_space; rest_crook (z5,cw); fet_endchar; @@ -309,36 +309,36 @@ fet_beginchar("64th rest","6","sixtyfourthrest"); fet_beginchar("128th rest","7","hundredtwentyeighthrest"); % draw_staff (-2, 2, 0.0); save yshift, ballcorrection; - ballcorrection = 0.005 interline; + ballcorrection = 0.005 staff_space; - yshift# := -3 interline#; + yshift# := -3 staff_space#; define_pixels(yshift); save alpha,cw,h,w; alpha=78; - cw#=7/6interline#; - h#=5/3interline#+4interline#+7/4stafflinethickness#; - w#=cw#+(h#-3/2interline#)/tand(alpha); + cw#=7/6staff_space#; + h#=5/3staff_space#+4staff_space#+7/4stafflinethickness#; + w#=cw#+(h#-3/2staff_space#)/tand(alpha); set_char_box(0,w#, -yshift#,yshift# + h#); define_pixels(cw); save x,y; x1=w-stem/6; - y1 = yshift + 5.5 interline + flare/4 + ballcorrection; + y1 = yshift + 5.5 staff_space + flare/4 + ballcorrection; z2-z1=whatever*dir alpha; y2=stem/2 + yshift; brush (z1,2/3stem,z2,stem); rest_crook (z1,cw); z3-z1=whatever*dir alpha; - y3=y1-interline; + y3=y1-staff_space; rest_crook (z3,cw); z4-z1=whatever*dir alpha; - y4=y1-2interline; + y4=y1-2staff_space; rest_crook (z4,cw); z5-z1=whatever*dir alpha; - y5=y1-3interline; + y5=y1-3staff_space; rest_crook (z5,cw); z6-z1=whatever*dir alpha; - y6=y1-4interline; + y6=y1-4staff_space; rest_crook (z6,cw); fet_endchar; @@ -347,7 +347,7 @@ endgroup; % Rest symbols for mensural notation: -mensrestsize# = .8interline#; +mensrestsize# = .8staff_space#; fet_beginchar("Mensural 4th rest","2mensural","minimarest") set_char_box(0,mensrestsize#,0,mensrestsize#); @@ -376,7 +376,7 @@ fet_beginchar("Mensural 8th rest","3mensural","fusarest") fet_endchar fet_beginchar("Mensural 16th rest","4mensural","semifusarest") - set_char_box(0,mensrestsize#,0,interline#); + set_char_box(0,mensrestsize#,0,staff_space#); pickup pencircle scaled 2 stafflinethickness; rt x1 = w; bot y1 = 0; diff --git a/mf/feta-haak.mf b/mf/feta-haak.mf index 76bd6bd4c7..72a48313e9 100644 --- a/mf/feta-haak.mf +++ b/mf/feta-haak.mf @@ -15,7 +15,7 @@ def draw_bracket( expr height_sharp, width_sharp) = define_pixels (height, width); thin = 2 stafflinethickness; - thick = .5 interline; + thick = .5 staff_space; pickup pencircle scaled thin; lft x1 = 0; @@ -30,7 +30,7 @@ def draw_bracket( expr height_sharp, width_sharp) = bot y4 = y1 - thick + thin/2; alpha = 50; - z5 = z1 + (width, 3/4interline); + z5 = z1 + (width, 3/4staff_space); % need silly z6? % strange turning path when invoked via MakeTeXTFM...? @@ -69,6 +69,6 @@ enddef; % for h := staffsize# step 1 pt# until (1.1 * staffsize#): for h := staffsize# step 1 pt# until (7 * staffsize#): - draw_bracket(h, 2interline# ); + draw_bracket(h, 2staff_space# ); endfor diff --git a/mf/feta-klef.mf b/mf/feta-klef.mf index 9ec3c74e8b..3bd3971f45 100644 --- a/mf/feta-klef.mf +++ b/mf/feta-klef.mf @@ -11,7 +11,7 @@ fet_begingroup("clefs"); % -% [Ross] says that clefs take 1 interline space on the left and right +% [Ross] says that clefs take 1 staff_space space on the left and right % def set_horizontal_spacing = save left_space ,right_space; @@ -24,7 +24,7 @@ enddef; % "arrow" def draw_c_clef (expr reduction) = save hair, norm, reduced_il, right_edge; - reduced_il#=interline#*reduction; + reduced_il#=staff_space#*reduction; norm#:=2/3reduced_il#; hair#:=1/6norm#; @@ -101,7 +101,7 @@ fet_endchar; def draw_bass_clef(expr exact_center, reduction) = save reduced_il, left_tilt, left_thick, ball_to_right; - reduced_il# = interline# * reduction; + reduced_il# = staff_space# * reduction; set_horizontal_spacing; ball_to_right# = 2.1 reduced_il#; @@ -125,7 +125,7 @@ def draw_bass_clef(expr exact_center, reduction) = x3l - x1l = ball_to_right; x2 = .5 [x1,x3]; x3l - x3r = .48 reduced_il; - y3l = -0.05 interline; + y3l = -0.05 staff_space; x4 = x1l - stafflinethickness; y4 = -2.2 reduced_il; z5 = (x3l + 1/3 reduced_il, .5 reduced_il); @@ -146,7 +146,7 @@ def draw_bass_clef(expr exact_center, reduction) = penlabels(1,2,3,4); save dot_diam; - 2 dot_diam = reduction* (interline - stafflinethickness); + 2 dot_diam = reduction* (staff_space - stafflinethickness); pickup pencircle scaled dot_diam; draw z5; draw z5 yscaled -1; @@ -158,10 +158,10 @@ fet_beginchar("F clef ", "F", "bassclef") if test = 1: draw_staff(-3,1); fi; - draw_bass_clef((.5 interline#, 0), 1.0); + draw_bass_clef((.5 staff_space#, 0), 1.0); fet_endchar; fet_beginchar("F clef (reduced)", "F_change", "cbassclef") - draw_bass_clef((.4 interline#, 0),0.8); + draw_bass_clef((.4 staff_space#, 0),0.8); fet_endchar; @@ -189,7 +189,7 @@ def draw_gclef (expr exact_center, reduction)= save reduced_il, downstroke_dir, downstroke_angle, hair, center; save breapth_factor, inner_thick_end, thinness, thickness, thinnib; save inner_start_angle, thinness, thinpen; - reduced_il# = interline# * reduction; + reduced_il# = staff_space# * reduction; define_pixels(reduced_il); pair downstroke_dir, center; @@ -302,10 +302,10 @@ fet_beginchar("G clef", "G", "trebleclef") if test = 1: draw_staff(-1,3); fi; - draw_gclef((1.7 interline#,0), 1.0); + draw_gclef((1.7 staff_space#,0), 1.0); fet_endchar; fet_beginchar("G clef", "G_change", "ctrebleclef") - draw_gclef((1.3 interline#,0), .8); + draw_gclef((1.3 staff_space#,0), .8); fet_endchar; fet_endgroup("clefs"); diff --git a/mf/feta-macros.mf b/mf/feta-macros.mf index e0b10ca447..47e415c70d 100644 --- a/mf/feta-macros.mf +++ b/mf/feta-macros.mf @@ -20,7 +20,7 @@ enddef; def draw_staff(expr first, last, offset)= pickup pencircle scaled stafflinethickness; for i:= first step 1 until last: - draw (- interline, (i + offset) * interline) .. (4 interline,( i+ offset)* interline); + draw (- staff_space, (i + offset) * staff_space) .. (4 staff_space,( i+ offset)* staff_space); endfor enddef; diff --git a/mf/feta-params.mf b/mf/feta-params.mf index 6c1ea69a09..21b365958f 100644 --- a/mf/feta-params.mf +++ b/mf/feta-params.mf @@ -1,22 +1,22 @@ stafflines = 5; -interline#:=staffsize#/(stafflines-1); +staff_space#:=staffsize#/(stafflines-1); % URG! -font_x_height interline# ; +font_x_height staff_space# ; % % [D.K.Roush & J.S.Gourlay] say this should be 0.072 % We know better % generally, the "blackness" of most chars depends on this. % -stafflinethickness#:=0.1 interline#; +stafflinethickness#:=0.1 staff_space#; stemthickness# := stafflinethickness#; ledgerlinethickness# := 2 stafflinethickness#; -define_pixels(interline, stemthickness); +define_pixels(staff_space, stemthickness); define_pixels(stafflinethickness,ledgerlinethickness); % diff --git a/mf/feta-puntje.mf b/mf/feta-puntje.mf index 70812b44a6..62a1076013 100644 --- a/mf/feta-puntje.mf +++ b/mf/feta-puntje.mf @@ -1,7 +1,7 @@ fet_begingroup("dots"); save dot_diam; -2 dot_diam# = interline# - stafflinethickness#; +2 dot_diam# = staff_space# - stafflinethickness#; define_pixels(dot_diam); fet_beginchar("duration dot","dot", "dot") @@ -12,9 +12,9 @@ fet_endchar; fet_beginchar("repeat dots", "repeatcolon", "repeatcolon") pickup pencircle scaled dot_diam; - draw (dot_diam/2, interline/2); + draw (dot_diam/2, staff_space/2); addto currentpicture also currentpicture yscaled -1; - set_char_box(0, dot_diam#, interline#/2, interline#/2); + set_char_box(0, dot_diam#, staff_space#/2, staff_space#/2); fet_endchar; diff --git a/mf/feta-schrift.mf b/mf/feta-schrift.mf index 6f5a6c967f..c3fdc46c0d 100644 --- a/mf/feta-schrift.mf +++ b/mf/feta-schrift.mf @@ -19,7 +19,7 @@ def draw_fermata = % suggest ca 80 degrees iso half-circle alpha := 10; - radius# = 1.25 interline#; + radius# = 1.25 staff_space#; crook_thinness# = 1.5stafflinethickness#; crook_fatness# = 4 stafflinethickness#; @@ -67,7 +67,7 @@ fet_endchar; fet_beginchar("Thumb", "thumb", "thumb") save thin, height, width, thick; height# = 5/4 width#; - height# = interline#; + height# = staff_space#; thin = 1.2 stafflinethickness; thick = 2 thin; set_char_box(width#/2, width#/2, height#/2, height#/2); @@ -92,7 +92,7 @@ fet_endchar; % % `\accent' is TeX reserved. fet_beginchar("> accent", "sforzato", "sforzatoaccent") - set_char_box(.9 interline#, .9 interline#, .5 interline#, .5 interline#); + set_char_box(.9 staff_space#, .9 staff_space#, .5 staff_space#, .5 staff_space#); save thickness, diminish; thickness = 3/2 stafflinethickness; @@ -135,7 +135,7 @@ fet_endchar; def draw_staccatissimo = save radius, height; - height# = .8 interline#; + height# = .8 staff_space#; radius# = 2 stafflinethickness#; define_pixels(radius, height); @@ -161,7 +161,7 @@ fet_beginchar("portato/single tenuto", "tenuto", "tenuto") thick# = 1.4 stafflinethickness#; define_pixels(thick); - set_char_box(.6 interline#, .6 interline#, thick#/2,thick#/2); + set_char_box(.6 staff_space#, .6 staff_space#, thick#/2,thick#/2); pickup pencircle scaled thick; lft x1 = -b; rt x2 = w; @@ -172,7 +172,7 @@ fet_endchar; def draw_marcato = save fat_factor, thinness; - set_char_box(interline#/2, interline#/2, 0, 1.1 interline#); + set_char_box(staff_space#/2, staff_space#/2, 0, 1.1 staff_space#); fat_factor = .3; thinness = stafflinethickness; @@ -215,7 +215,7 @@ fet_endchar; fet_beginchar("open (unstopped)", "open", "ouvert") save thin, height, width, thick; height# = 5/4 width#; - height# = interline#; + height# = staff_space#; thin = 1.2 stafflinethickness; thick = 1.4 thin; set_char_box(width#/2, width#/2, height#/2, height#/2); @@ -234,7 +234,7 @@ fet_endchar; fet_beginchar("plus (stopped)", "stopped", "plusstop") save thick, size; thick = 2 stafflinethickness; - size# = 1.1 interline#; + size# = 1.1 staff_space#; set_char_box(size#/2, size#/2, size#/2, size#/2); pickup pencircle scaled thick; @@ -254,7 +254,7 @@ fet_beginchar("Upbow", "upbow", "upbow") save ht, wd, thick; thick = 1.4 stafflinethickness; - wd# = 1.3 interline#; + wd# = 1.3 staff_space#; ht# = 1.6 wd#; @@ -276,10 +276,10 @@ fet_beginchar("Downbow", "downbow", "downbow") save wd; define_pixels(wd) - wd# = 1.5 interline#; + wd# = 1.5 staff_space#; stemthick = 1.2 stafflinethickness; - set_char_box(wd#/2, wd#/2, 0, 4/3 interline#); + set_char_box(wd#/2, wd#/2, 0, 4/3 staff_space#); beamheight = 4/10 h; @@ -317,8 +317,8 @@ def draw_turn = save turndir; pair turndir; - wd# = 35/16 interline#; - ht# = 18/17 interline#; + wd# = 35/16 staff_space#; + ht# = 18/17 staff_space#; darkness = 1.20 stafflinethickness; set_char_box(wd#/2, wd#/2, ht#/2, ht#/2); @@ -399,7 +399,7 @@ fet_beginchar("Trill (`tr')","trill","trill") ascender_extra# = 1/2 ex#; ascender# = ascender_extra# + ex#; - ex# = 1.5 interline#; + ex# = 1.5 staff_space#; kerning# = .75 ex#; start_nib_angle = 20; bulb_size = 0.47; @@ -415,7 +415,7 @@ fet_beginchar("Trill (`tr')","trill","trill") slant = .2; local_copy(transform)(currenttransform); - currenttransform := currenttransform slanted slant shifted (- interline, 0) ; + currenttransform := currenttransform slanted slant shifted (- staff_space, 0) ; y1 = ascender; x1l = 0; @@ -481,7 +481,7 @@ fet_beginchar("Trill (`tr')","trill","trill") --- z9r{up} .. z8r{left} .. z7r{z5-z7} -- cycle; fill r_p; - set_char_box(interline# , interline#, 0,ascender#); + set_char_box(staff_space# , staff_space#, 0,ascender#); penpos11(1/4 r_fatness, -20); @@ -500,10 +500,10 @@ fet_endchar; def draw_heel = save radius, thickness, wall; - radius# := .5 interline#; + radius# := .5 staff_space#; define_pixels(radius); - set_char_box(radius#, radius#, radius#, 2/3 interline#); + set_char_box(radius#, radius#, radius#, 2/3 staff_space#); thickness := 1.5 stafflinethickness; pickup pencircle scaled thickness; @@ -536,7 +536,7 @@ def draw_toe = save ht,wd; thickness := 1.5 stafflinethickness; - ht# := 1.5 interline#; + ht# := 1.5 staff_space#; wd# := 1/3 ht#; define_pixels(ht,wd); @@ -587,10 +587,10 @@ fet_beginchar("Flageolet", "flageolet", "flageolet") fet_endchar; fet_beginchar("Repeatsign", "repeatsign", "repeatsign") - set_char_box(interline#, interline#, interline#, interline#); + set_char_box(staff_space#, staff_space#, staff_space#, staff_space#); save dot_diam; - 2 dot_diam# = interline# - stafflinethickness#; + 2 dot_diam# = staff_space# - stafflinethickness#; define_pixels(dot_diam); penpos1(dot_diam,0); @@ -601,8 +601,8 @@ fet_beginchar("Repeatsign", "repeatsign", "repeatsign") penlabels (1,2); pickup pencircle scaled dot_diam; - draw (-interline/2, interline/2); - draw (interline/2, -interline/2); + draw (-staff_space/2, staff_space/2); + draw (staff_space/2, -staff_space/2); fet_endchar; fet_beginchar("Segno", "segno", "segno") @@ -611,8 +611,8 @@ fet_beginchar("Segno", "segno", "segno") save turndir; pair turndir; - ht# = 3 interline#; - wd# = 2 interline#; + ht# = 3 staff_space#; + wd# = 2 staff_space#; darkness = 1.20 stafflinethickness; set_char_box(wd#/2, wd#/2, ht#/2, ht#/2); @@ -669,8 +669,8 @@ fet_beginchar("Coda", "coda", "coda") save thin, thick, codawidth, codaheight; thin# = 1.2 stafflinethickness#; thick# = 3.5 stafflinethickness#; - codawidth# = 2/3 interline#; - codaheight# = 1 interline#; + codawidth# = 2/3 staff_space#; + codaheight# = 1 staff_space#; define_pixels(thin, thick, codawidth, codaheight); set_char_box(codawidth#+thick#, codawidth#+thick#, diff --git a/mf/feta-slag.mf b/mf/feta-slag.mf index 413ecf5b9e..47ec9438ab 100644 --- a/mf/feta-slag.mf +++ b/mf/feta-slag.mf @@ -10,13 +10,13 @@ % this file is included by feta-scripts.mf tfat := 1/2; -%twidth# := 0.5interline#; -%theight# := 0.55interline#; +%twidth# := 0.5staff_space#; +%theight# := 0.55staff_space#; % tthin# := stafflinethickness#; tthin# := 1.6stafflinethickness#; -twidth# := 2/3interline#; -theight# := 1/2interline#; +twidth# := 2/3staff_space#; +theight# := 1/2staff_space#; % uhg/ uhuh? % toverlap# := tfat*twidth#+tthin#; diff --git a/mf/feta-sleur.mf b/mf/feta-sleur.mf index 6d98d4dfc7..40a4e84885 100644 --- a/mf/feta-sleur.mf +++ b/mf/feta-sleur.mf @@ -11,8 +11,8 @@ % mode_setup; %% staffsize#=16pt#; -% interline#:=staffsize#/4; -% stafflinethickness#:=0.1interline#; +% staff_space#:=staffsize#/4; +% stafflinethickness#:=0.1staff_space#; pi:=3.14159; @@ -25,7 +25,7 @@ sleur_pen#:=stafflinethickness#; slurheightlimit#:=staffsize#/2; slurthick#:=1.8stafflinethickness#; -define_pixels(staffsize,interline,stafflinethickness); +define_pixels(staffsize,staff_space,stafflinethickness); define_pixels(sleur_pen,slurheightlimit,slurthick); sluralpha:=2slurheightlimit#/pi; diff --git a/mf/feta-timesig.mf b/mf/feta-timesig.mf index 4cdf404b32..488e8ea732 100644 --- a/mf/feta-timesig.mf +++ b/mf/feta-timesig.mf @@ -10,8 +10,8 @@ fet_begingroup("timesig"); def set_C_width = save left_width, right_width; - left_width# := 0.9 interline#; - right_width# := .7 interline#; + left_width# := 0.9 staff_space#; + right_width# := .7 staff_space#; define_pixels(left_width,right_width); enddef; @@ -20,20 +20,20 @@ def draw_C = hair# := stafflinethickness#; - bulb_rad# := 0.4 interline#; + bulb_rad# := 0.4 staff_space#; define_pixels(hair, bulb_rad); left_fatness = 0.55; x1r = x5r; - y1r = .45 interline; - z2 = (0, interline); + y1r = .45 staff_space; + z2 = (0, staff_space); z3r = (-left_width, 0); - z4 = (0, -interline); - z5r = (right_width - stafflinethickness, -0.4 interline); + z4 = (0, -staff_space); + z5r = (right_width - stafflinethickness, -0.4 staff_space); penpos1(hair, 0); penpos2(stafflinethickness, 90); - penpos3(left_fatness * interline, 180); + penpos3(left_fatness * staff_space, 180); penpos4(stafflinethickness, -90); penpos5(hair, -5); @@ -49,16 +49,16 @@ enddef; fet_beginchar ("4/4 meter", "C4/4", "fourfourmeter") set_C_width; - set_char_box(left_width# + interline#, right_width# + interline#, - interline#, interline#); + set_char_box(left_width# + staff_space#, right_width# + staff_space#, + staff_space#, staff_space#); draw_C; fet_endchar; fet_beginchar ("2/2 meter", "C2/2", "allabreve") set_C_width; - set_char_box(left_width# + interline#, right_width# + interline#, - 1.4 interline#, 1.4 interline#); + set_char_box(left_width# + staff_space#, right_width# + staff_space#, + 1.4 staff_space#, 1.4 staff_space#); draw_C; save excentricity; @@ -72,13 +72,13 @@ path threequartercircle; threequartercircle = halfcircle & quartercircle rotated 180; save Cdiameter,Cthickness; -Cdiameter# := 3/2 interline#; +Cdiameter# := 3/2 staff_space#; Cthickness# := 2 stafflinethickness#; define_pixels(Cdiameter,Cthickness); %% tempus imperfectum cum prolatione imperfecta fet_beginchar ("Mensural 4/4 meter", "old4/4", "oldfourfourmeter") - set_char_box(.5 Cdiameter# + interline#, .5 Cdiameter# + interline#, + set_char_box(.5 Cdiameter# + staff_space#, .5 Cdiameter# + staff_space#, .5 Cdiameter#, .5 Cdiameter#); pickup pencircle scaled Cthickness; @@ -87,8 +87,8 @@ fet_endchar; %% tempus imperfectum cum prolatione imperfecta proportio dupla fet_beginchar ("Mensural 2/2 meter", "old2/2", "oldallabreve") - set_char_box(.5 Cdiameter# + interline#, .5 Cdiameter# + interline#, - interline#, interline#); + set_char_box(.5 Cdiameter# + staff_space#, .5 Cdiameter# + staff_space#, + staff_space#, staff_space#); pickup pencircle scaled Cthickness; draw threequartercircle rotated 45 scaled Cdiameter; @@ -97,7 +97,7 @@ fet_endchar; %% tempus perfectum cum prolatione imperfecta fet_beginchar ("Mensural 3/2 meter", "old3/2", "oldthreetwometer") - set_char_box(.5 Cdiameter# + interline#, .5 Cdiameter# + interline#, + set_char_box(.5 Cdiameter# + staff_space#, .5 Cdiameter# + staff_space#, .5 Cdiameter#, .5 Cdiameter#); pickup pencircle scaled Cthickness; @@ -106,7 +106,7 @@ fet_endchar; %% tempus imperfectum cum prolatione perfecta fet_beginchar ("Mensural 6/4 meter", "old6/4", "oldsixfourmeter") - set_char_box(.5 Cdiameter# + interline#, .5 Cdiameter# + interline#, + set_char_box(.5 Cdiameter# + staff_space#, .5 Cdiameter# + staff_space#, .5 Cdiameter#, .5 Cdiameter#); pickup pencircle scaled Cthickness; @@ -117,7 +117,7 @@ fet_endchar; %% tempus perfectum cum prolatione perfecta fet_beginchar ("Mensural 9/4 meter", "old9/4", "oldninefourmeter") - set_char_box(.5 Cdiameter# + interline#, .5 Cdiameter# + interline#, + set_char_box(.5 Cdiameter# + staff_space#, .5 Cdiameter# + staff_space#, .5 Cdiameter#, .5 Cdiameter#); pickup pencircle scaled Cthickness; @@ -128,8 +128,8 @@ fet_endchar; %% tempus perfectum cum prolatione imperfecta proportio dupla fet_beginchar ("Mensural 3/4 meter", "old3/4", "oldthreefourmeter") - set_char_box(.5 Cdiameter# + interline#, .5 Cdiameter# + interline#, - interline#, interline#); + set_char_box(.5 Cdiameter# + staff_space#, .5 Cdiameter# + staff_space#, + staff_space#, staff_space#); pickup pencircle scaled Cthickness; draw fullcircle scaled Cdiameter; @@ -138,8 +138,8 @@ fet_endchar; %% tempus imperfectum cum prolatione perfecta proportio dupla fet_beginchar ("Mensural 6/8 meter", "old6/8", "oldsixeightmeter") - set_char_box(.5 Cdiameter# + interline#, .5 Cdiameter# + interline#, - interline#, interline#); + set_char_box(.5 Cdiameter# + staff_space#, .5 Cdiameter# + staff_space#, + staff_space#, staff_space#); pickup pencircle scaled Cthickness; draw threequartercircle rotated 45 scaled Cdiameter; @@ -150,8 +150,8 @@ fet_endchar; %% tempus perfectum cum prolatione perfecta proportio dupla fet_beginchar ("Mensural 9/8 meter", "old9/8", "oldnineeight") - set_char_box(.5 Cdiameter# + interline#, .5 Cdiameter# + interline#, - interline#, interline#); + set_char_box(.5 Cdiameter# + staff_space#, .5 Cdiameter# + staff_space#, + staff_space#, staff_space#); pickup pencircle scaled Cthickness; draw fullcircle scaled Cdiameter; @@ -162,7 +162,7 @@ fet_endchar; %% tempus imperfectum cum prolatione imperfecta diminutio simplex fet_beginchar ("Mensural 4/8 meter", "old4/8", "oldfoureightmeter") - set_char_box(.5 Cdiameter# + interline#, .5 Cdiameter# + interline#, + set_char_box(.5 Cdiameter# + staff_space#, .5 Cdiameter# + staff_space#, .5 Cdiameter#, .5 Cdiameter#); pickup pencircle scaled Cthickness; @@ -171,7 +171,7 @@ fet_endchar; %% tempus imperfectum cum prolatione perfecta diminutio simplex fet_beginchar ("Mensural 6/8 meter", "old6/8alt", "oldsixeightmeteralt") - set_char_box(.5 Cdiameter# + interline#, .5 Cdiameter# + interline#, + set_char_box(.5 Cdiameter# + staff_space#, .5 Cdiameter# + staff_space#, .5 Cdiameter#, .5 Cdiameter#); pickup pencircle scaled Cthickness; @@ -182,8 +182,8 @@ fet_endchar; %% tempus imperfectum cum prolatione imperfecta diminutio duplex fet_beginchar ("Mensural 2/4 meter", "old2/4", "oldtwofourmeter") - set_char_box(.5 Cdiameter# + interline#, .5 Cdiameter# + interline#, - interline#, interline#); + set_char_box(.5 Cdiameter# + staff_space#, .5 Cdiameter# + staff_space#, + staff_space#, staff_space#); pickup pencircle scaled Cthickness; draw threequartercircle rotated 225 scaled Cdiameter; diff --git a/mf/feta-toevallig.mf b/mf/feta-toevallig.mf index d4f94c5362..a5d6325621 100644 --- a/mf/feta-toevallig.mf +++ b/mf/feta-toevallig.mf @@ -27,13 +27,13 @@ fet_begingroup("accidentals"); % this fact % fet_beginchar("Sharp" , "1", "sharp"); - set_char_box(0, 1.1 interline#, 1.5 interline#, - 1.5 interline#); + set_char_box(0, 1.1 staff_space#, 1.5 staff_space#, + 1.5 staff_space#); save interbeam, interstem, beamheight, beamwidth, stemwidth; - interbeam := 1.05 interline; + interbeam := 1.05 staff_space; interstem := 7/16 ; beamheight := 4 stafflinethickness; beamwidth := w; @@ -70,8 +70,8 @@ fet_beginchar("Sharp" , "1", "sharp"); pickup pencircle scaled stemwidth; x3 = x4 = xpart center; - bot y3 = -1.5 interline + ypart center; - top y4 = 1.5 interline + ypart center; + bot y3 = -1.5 staff_space + ypart center; + top y4 = 1.5 staff_space + ypart center; path stem; stem := z3 .. z4; @@ -83,7 +83,7 @@ fet_beginchar("Sharp" , "1", "sharp"); fet_endchar; fet_beginchar( "Natural", "0", "natural") - set_char_box(0, 8/12 interline#, 1.5 interline#, 1.5 interline#); + set_char_box(0, 8/12 staff_space#, 1.5 staff_space#, 1.5 staff_space#); save interbeam, interstem, beamheight, beamwidth, stemwidth; @@ -98,7 +98,7 @@ fet_beginchar( "Natural", "0", "natural") pickup penrazor scaled beamheight rotated 90; - top y2 = interline - 3/2 stafflinethickness ; + top y2 = staff_space - 3/2 stafflinethickness ; slope = stafflinethickness / interstem; draw z1 .. z2; @@ -108,7 +108,7 @@ fet_beginchar( "Natural", "0", "natural") pickup pencircle scaled stemwidth; xpart z3 = xpart z1; xpart z4 = xpart z2; - top y3 = 1.5 interline; + top y3 = 1.5 staff_space; top y4 = beamtop; draw (xpart z1, -y4) .. z3; @@ -139,8 +139,8 @@ def draw_meta_flat(expr xcenter, w, crook_fatness) = bottom_stem_thick = 1.2 stafflinethickness; - z1 = (0, 2 interline) + center; - z2 = (0, - 1/2 interline)+ center; + z1 = (0, 2 staff_space) + center; + z2 = (0, - 1/2 staff_space)+ center; penpos1(top_stem_thick, 0); penpos2(bottom_stem_thick, 0); @@ -148,22 +148,22 @@ def draw_meta_flat(expr xcenter, w, crook_fatness) = fill simple_serif(z1r, z1l, 30) -- z2l -- z2r -- cycle; - y3l = (interline - stafflinethickness)/2 + ypart center; + y3l = (staff_space - stafflinethickness)/2 + ypart center; z3l = whatever [z2r,z1r]; z3r = .26 [z2r, z1r]; - z4 = (3/8 interline, interline/2) + center; + z4 = (3/8 staff_space, staff_space/2) + center; penpos4(whatever, 53); y4l - y4r = 2 crook_thinness ; % y4l - y4r = 6/20[crook_thinness, crook_fatness] ; - y5r = 1/4 interline + ypart center; + y5r = 1/4 staff_space + ypart center; x5l = w + xpart center; penpos5(crook_fatness, -175); - z8 = (0, - interline/2 - stafflinethickness/2) + center; + z8 = (0, - staff_space/2 - stafflinethickness/2) + center; z9 = (x5,0); @@ -183,7 +183,7 @@ def draw_meta_flat(expr xcenter, w, crook_fatness) = x8r = xpart center - bottom_stem_thick/2; penlabels(range 0 thru 10); - z10 = (bottom_stem_thick/2, -1/5 interline) + center; + z10 = (bottom_stem_thick/2, -1/5 staff_space) + center; unfill z3r{up} .. z4r{right} .. tension .9 .. z6r --- @@ -204,8 +204,8 @@ enddef; % unfortunately, 600dpi is not enough to show the brush of the stem. % fet_beginchar("Flat", "-1", "flat") - set_char_box(1.2 stafflinethickness#, .8 interline#, .5 interline#, 2 interline#); - draw_meta_flat(0, w, 1/3 interline); + set_char_box(1.2 stafflinethickness#, .8 staff_space#, .5 staff_space#, 2 staff_space#); + draw_meta_flat(0, w, 1/3 staff_space); fet_endchar; @@ -214,18 +214,18 @@ fet_beginchar("Double flat", "-2", "flatflat") left_wid = .7; right_wid = .8; overlap = .05; - set_char_box(1.2 stafflinethickness#, (left_wid + right_wid -overlap) *interline#, .5 interline#, 2 interline#); - draw_meta_flat(0, left_wid* interline, 1/3 interline); - draw_meta_flat((left_wid - overlap) *interline, - right_wid *interline, 1/3 interline); + set_char_box(1.2 stafflinethickness#, (left_wid + right_wid -overlap) *staff_space#, .5 staff_space#, 2 staff_space#); + draw_meta_flat(0, left_wid* staff_space, 1/3 staff_space); + draw_meta_flat((left_wid - overlap) *staff_space, + right_wid *staff_space, 1/3 staff_space); fet_endchar; fet_beginchar("Double sharp", "2", "sharpsharp") - set_char_box(0, interline#, .5 interline#, .5 interline#); + set_char_box(0, staff_space#, .5 staff_space#, .5 staff_space#); save klaverblad, klaversteel; - klaversteel = 1/15 interline; - klaverblad = .35 interline; + klaversteel = 1/15 staff_space; + klaverblad = .35 staff_space; z1 = (klaversteel, 0); z2 = (w/2 - klaverblad / 10, h - klaverblad); @@ -234,7 +234,7 @@ fet_beginchar("Double sharp", "2", "sharpsharp") z5 = z1 reflectedabout((0,0), (1,1)); labels(1,2,3,4,5); - pickup pencircle scaled 1/20 interline; + pickup pencircle scaled 1/20 staff_space; filldraw z1{dir 45} .. {right}z2 -- z3 -- z4{down} .. {dir 225}z5 .. cycle; @@ -253,10 +253,10 @@ fet_endchar; def draw_paren = save leftindent; - leftindent# := .2 interline#; + leftindent# := .2 staff_space#; define_pixels(leftindent); - set_char_box(0, .5 interline#+stafflinethickness#, - interline#, interline#); + set_char_box(0, .5 staff_space#+stafflinethickness#, + staff_space#, staff_space#); z1 = (leftindent,h); z2 = (w-stafflinethickness,0); z3 = (leftindent,-d); diff --git a/midi2ly/duration-convert.cc b/midi2ly/duration-convert.cc index ac46fd7a60..5dfec5c262 100644 --- a/midi2ly/duration-convert.cc +++ b/midi2ly/duration-convert.cc @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ #include diff --git a/midi2ly/duration-iter.cc b/midi2ly/duration-iter.cc index abb467d1c1..c5028e6259 100644 --- a/midi2ly/duration-iter.cc +++ b/midi2ly/duration-iter.cc @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys Jan Nieuwenhuizen */ #include diff --git a/midi2ly/duration.cc b/midi2ly/duration.cc index b2a5f84643..0ef7270d06 100644 --- a/midi2ly/duration.cc +++ b/midi2ly/duration.cc @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen Han-Wen Nienhuys diff --git a/midi2ly/include/duration-convert.hh b/midi2ly/include/duration-convert.hh index 980c62a6f5..0b750a1716 100644 --- a/midi2ly/include/duration-convert.hh +++ b/midi2ly/include/duration-convert.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/midi2ly/include/duration-iter.hh b/midi2ly/include/duration-iter.hh index 5dd9c4a601..bb9dac6f0c 100644 --- a/midi2ly/include/duration-iter.hh +++ b/midi2ly/include/duration-iter.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Han-Wen Nienhuys + (c) 1998--2000 Han-Wen Nienhuys */ diff --git a/midi2ly/include/duration.hh b/midi2ly/include/duration.hh index 28580b63af..f43bf2ecb5 100644 --- a/midi2ly/include/duration.hh +++ b/midi2ly/include/duration.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--1999 Jan Nieuwenhuizen + (c) 1997--2000 Jan Nieuwenhuizen */ @@ -12,7 +12,7 @@ #ifndef DURATION_HH #define DURATION_HH -#include "fproto.hh" +#include "flower-proto.hh" #include "rational.hh" #include "plet.hh" diff --git a/midi2ly/include/plet.hh b/midi2ly/include/plet.hh index 42ef83b435..e538b99a3c 100644 --- a/midi2ly/include/plet.hh +++ b/midi2ly/include/plet.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ diff --git a/midi2ly/main.cc b/midi2ly/main.cc index 260379e376..6a683a03e4 100644 --- a/midi2ly/main.cc +++ b/midi2ly/main.cc @@ -57,7 +57,7 @@ version () "midi2ly"); cout << endl; - cout << _f ("Copyright (c) %s by", "1996--1999"); + cout << _f ("Copyright (c) %s by", "1996--2000"); cout << "Han-Wen Nienhuys \n" << "Jan Nieuwenhuizen \n"; } diff --git a/midi2ly/plet.cc b/midi2ly/plet.cc index e567515b7e..8ffdf5d763 100644 --- a/midi2ly/plet.cc +++ b/midi2ly/plet.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--1999 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #include "plet.hh" diff --git a/mudela-mode.el b/mudela-mode.el deleted file mode 100644 index b059317a69..0000000000 --- a/mudela-mode.el +++ /dev/null @@ -1,198 +0,0 @@ -;;; mudela-mode.el --- Major mode for editing Mudela programs - - -;; Copyright (C) 1992,1993,1994 Tim Peters - -;; Author: 1997: Han-Wen Nienhuys -;; Author: 1995-1996 Barry A. Warsaw -;; 1992-1994 Tim Peters -;; Created: Feb 1992 -;; Version: 0.0 -;; Last Modified: 12SEP97 -;; Keywords: mudela languages music - -;; This software is provided as-is, without express or implied -;; warranty. Permission to use, copy, modify, distribute or sell this -;; software, without fee, for any purpose and by any individual or -;; organization, is hereby granted, provided that the above copyright -;; notice and this paragraph appear in all copies. - - - -;; Kyrie Eleison; it is my first real Elisp file -;; This is a cannabalised version of python-mode.el (HWN) -;; -;; TODO: -;; * should handle block comments too. -;; * handle lexer modes (\header, \melodic, \lyric) etc. -;; * indentation -;; * notenames? -;; * fontlock: \melodic \melodic -;; - -(defconst mu-version "1.2.16-dk1" - "`mudela-mode' version number.") - -(defconst mu-help-address "hanwen@cs.uu.nl" - "Address accepting submission of bug reports.") - -(defconst mudela-font-lock-keywords - (let* ((keywords '("spanrequest" "simultaneous" "sequential" "accepts" - "alternative" "bar" "breathe" - "cadenza" "chordmodifiers" "chords" "clef" "cm" "consists" - "consistsend" "context" - "duration" "font" "grace" "header" "in" "lyrics" - "key" "keysignature" "mark" "musicalpitch" - "time" "times" "midi" "mm" "name" "notenames" - "notes" "partial" "paper" "penalty" "property" "pt" - "relative" "remove" "repeat" "repetitions" "addlyrics" - "scm" "scmfile" "score" "script" - "shape" "skip" "textscript" "tempo" "translator" "transpose" - "type" "version" - )) - (kwregex (mapconcat (lambda (x) (concat "\\\\" x)) keywords "\\|"))) - - (list - (concat ".\\(" kwregex "\\)[^a-zA-Z]") - (concat "^\\(" kwregex "\\)[^a-zA-Z]") - '(".\\(\\\\[a-zA-Z][a-zA-Z]*\\)" 1 font-lock-variable-name-face) - '("^[\t ]*\\([a-zA-Z][_a-zA-Z]*\\) *=" 1 font-lock-variable-name-face) - )) - "Additional expressions to highlight in Mudela mode.") - -;; define a mode-specific abbrev table for those who use such things -(defvar mudela-mode-abbrev-table nil - "Abbrev table in use in `mudela-mode' buffers.") - -(define-abbrev-table 'mudela-mode-abbrev-table nil) - -(defvar mudela-mode-hook nil - "*Hook called by `mudela-mode'.") - -(defvar mu-mode-map () - "Keymap used in `mudela-mode' buffers.") - -(if mu-mode-map - () - (setq mu-mode-map (make-sparse-keymap)) - ;; (define-key mu-mode-map "\C-c\C-c" 'mu-foo-bar) - ) - -(defvar mu-mode-syntax-table nil - "Syntax table used in `mudela-mode' buffers.") - -;; -(if mu-mode-syntax-table - () - (setq mu-mode-syntax-table (make-syntax-table)) - (mapcar (function - (lambda (x) (modify-syntax-entry - (car x) (cdr x) mu-mode-syntax-table))) - '(( ?\( . "." ) ( ?\) . "." ) - ( ?\[ . "." ) ( ?\] . "." ) - ( ?\{ . "(}" ) ( ?\} . "){" ) - ( ?\< . "(>" )( ?\> . ")>") - ( ?\$ . "." ) ( ?\% . "." ) ( ?\& . "." ) - ( ?\* . "." ) ( ?\+ . "." ) ( ?\- . "." ) - ( ?\/ . "." ) ( ?\= . "." ) - ( ?\| . "." ) (?\\ . "\\" ) - ( ?\_ . "." ) - ( ?\' . "w") - ( ?\" . "\"" ) - ( ?\% . "<") - ( ?\n . ">") - -; FIXME -; ( ?% . ". 124b" ) -; ( ?{ . ". 23" ) - )) - - ) - -(defconst mu-imenu-generic-re "^\\([a-zA-Z_][a-zA-Z0-9_]*\\) *=" - "Regexp matching Identifier definitions.") - -;; Sadly we need this for a macro in Emacs 19. -(eval-when-compile - ;; Imenu isn't used in XEmacs, so just ignore load errors. - (condition-case () - (require 'imenu) - (error nil))) - -(defvar mu-imenu-generic-expression - (list (list nil mu-imenu-generic-re 1)) - "Expression for imenu") - -(defun mudela-mode () - "Major mode for editing Mudela files." - (interactive) - ;; set up local variables - (kill-all-local-variables) - - (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults '(mudela-font-lock-keywords)) - - (make-local-variable 'paragraph-separate) - (setq paragraph-separate "^[ \t]*$") - - (make-local-variable 'paragraph-start) - (setq paragraph-start "^[ \t]*$") - - (make-local-variable 'comment-start) - (setq comment-start "%") - - (make-local-variable 'comment-start-skip) - (setq comment-start-skip "%{? *") - - (make-local-variable 'comment-end) - (setq comment-end "\n") - - (make-local-variable 'block-comment-start) - (setq block-comment-start "%{") - - (make-local-variable 'block-comment-end) - (setq block-comment-end "%}") - - ;; (make-local-variable 'comment-column) - ;; (setq comment-column 40) - - (make-local-variable 'imenu-generic-expression) - (setq imenu-generic-expression mu-imenu-generic-expression) - - (make-local-variable 'indent-line-function) - (setq indent-line-function 'indent-relative-maybe) - - ;; - (set-syntax-table mu-mode-syntax-table) - (setq major-mode 'mudela-mode) - (setq mode-name "Mudela") - (setq local-abbrev-table mudela-mode-abbrev-table) - (use-local-map mu-mode-map) - - ;; run the mode hook. mu-mode-hook use is deprecated - (run-hooks 'mudela-mode-hook)) - - -(defun mu-keep-region-active () - ;; do whatever is necessary to keep the region active in XEmacs. - ;; Ignore byte-compiler warnings you might see. Also note that - ;; FSF's Emacs 19 does it differently and doesn't its policy doesn't - ;; require us to take explicit action. - (and (boundp 'zmacs-region-stays) - (setq zmacs-region-stays t))) - - -;;(defun mu-comment-region (beg end &optional arg) -;; "Like `comment-region' but uses double hash (`#') comment starter." -;; (interactive "r\nP") -;; (let ((comment-start mu-block-comment-prefix)) -;; (comment-region beg end arg))) - -(defun mu-version () - "Echo the current version of `mudela-mode' in the minibuffer." - (interactive) - (message "Using `mudela-mode' version %s" mu-version) - (mu-keep-region-active)) - -(provide 'mu-mode) -;;; mudela-mode.el ends here diff --git a/mutopia/J.S.Bach/pa.ly b/mutopia/J.S.Bach/pa.ly index 8967924d08..94132512ba 100644 --- a/mutopia/J.S.Bach/pa.ly +++ b/mutopia/J.S.Bach/pa.ly @@ -226,6 +226,7 @@ pedal = \notes \relative c, { +% these should be two separate scores... \score{ \context Score < \context StaffGroup< @@ -245,19 +246,26 @@ pedal = \notes \relative c, { > \paper { - textheight = 280.0 \mm; - % landscape: -- does not work? ly2dvi -L - %textheight = 160.0 \mm; - %linewidth = 290.0 \mm; + %textheight = 280.0 \mm; + % landscape: + textheight = 160.0 \mm; + linewidth = 290.0 \mm; +%{ \translator { \OrchestralScoreContext minVerticalAlign = 4.0*\staffheight; maxVerticalAlign = 4.0*\staffheight; } +%} \translator { + \StaffGroupContext + minVerticalAlign = 4.0*\staffheight; + maxVerticalAlign = 4.0*\staffheight; + } + \translator { \PianoStaffContext - minVerticalAlign = 2.5*\staffheight; - maxVerticalAlign = 2.5*\staffheight; + minVerticalAlign = 2.5*\staffheight; + maxVerticalAlign = 2.5*\staffheight; } } \midi { diff --git a/po/fr.po b/po/fr.po index 18ca69f561..e004b1aad7 100644 --- a/po/fr.po +++ b/po/fr.po @@ -352,7 +352,7 @@ msgstr "Ne peut pas ouvrir `%s'\n" #: lookup.cc:104 #, c-format msgid "Search path %s\n" -msgstr "Chemin de recherche" +msgstr "Chemin de recherche %s\n" #: lookup.cc:105 msgid "Aborting" diff --git a/po/nl.po b/po/nl.po index dffd167186..1aa64ac334 100644 --- a/po/nl.po +++ b/po/nl.po @@ -604,7 +604,7 @@ msgstr "Moet veertje zetten tussen verschillende kolommen" #: paper-def.cc:95 #, c-format msgid "unknown paper variable: `%s'" -msgstr "onbekende papier varanderlijke: `%s'" +msgstr "onbekende papier veranderlijke: `%s'" #: paper-def.cc:99 msgid "not a real variable" diff --git a/scm/generic-property.scm b/scm/generic-property.scm index 296f70b8c2..533c663b89 100644 --- a/scm/generic-property.scm +++ b/scm/generic-property.scm @@ -61,21 +61,11 @@ (define generic-bar-properties (cons "Staff_bar" (list - (list 'barSize number? 'bar-size) - (list 'barType symbol? 'glyph) - ) - ) - ) - -(define generic-span-bar-properties - (cons "Span_bar" (list - (list 'barSize number? 'bar-size) - (list 'barType symbol? 'glyph) - ) + (list 'barSize number? 'bar-size)) ) ) -(define staff-symbol-properties +(define generic-staff-symbol-properties (cons "Staff_symbol" (list (list 'numberOfStaffLines number? 'line-count) (list 'staffSpace number? 'staff-space) @@ -159,6 +149,7 @@ generic-timesig-properties generic-clef-properties generic-collision-properties + generic-staff-symbol-properties generic-All-properties ) ) diff --git a/scm/lily.scm b/scm/lily.scm index 96941d93f8..d18cdbf12f 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -61,7 +61,7 @@ (control->string c) (string-append (string-append (number->string (car c)) " ") - (string-append (number->string (cadr c)) " "))) + (string-append (number->string (cdr c)) " "))) (define (font i) @@ -89,6 +89,7 @@ ;; Score_span_bars are only visible at start of line ;; i.e. if break_dir == RIGHT == 1 (define Span_bar_engraver-visibility non-postbreak-visibility) +(define Base_span_bar_engraver-visibility non-postbreak-visibility) (define mark-visibility non-prebreak-visibility) (define Span_score_bar_engraver-visibility postbreak-only-visibility) (define Piano_bar_engraver-visibility postbreak-only-visibility) @@ -747,25 +748,22 @@ ; ; How should a bar line behave at a break? ; - -; move this to paper.scm? -; to override, see input/test/no-span.ly -(define bar-break-glyph-alist - '((":|:" . (":|" . "|:")) - ("|" . ("|" . "")) - ("|s" . (nil . "|")) - ("|:" . ("|" . "|:")) - ("|." . ("|." . nil)) - (":|" . (":|" . nil)) - ("||" . ("||" . nil)) - (".|." . (".|." . nil)) - ("scorebar" . (nil . "scorepostbreak")) - ("brace" . (nil . "brace")) - ("bracket" . (nil . "bracket")) - )) - (define (break-barline glyph dir) - (let ((result (assoc glyph bar-break-glyph-alist))) + (let ((result (assoc glyph + '((":|:" . (":|" . "|:")) + ("|" . ("|" . "")) + ("|s" . (nil . "|")) + ("|:" . ("|" . "|:")) + ("|." . ("|." . nil)) + (":|" . (":|" . nil)) + ("||" . ("||" . nil)) + (".|." . (".|." . nil)) + ("scorebar" . (nil . "scorepostbreak")) + ("brace" . (nil . "brace")) + ("bracket" . (nil . "bracket")) + ) + ))) + (if (equal? result #f) (ly-warn (string-append "Unknown bar glyph: `" glyph "'")) (index-cell (cdr result) dir)) -- 2.39.2