From 7a5eb1c2db0adec374fecdb8ada84b8167072acd Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 20:11:26 +0000 Subject: [PATCH] lilypond-0.1.61 --- bin/clean-diaper.sh | 8 +- flower/axis.cc | 2 +- flower/choleski.cc | 2 +- flower/cpu-timer.cc | 2 +- flower/directed-graph.cc | 2 +- flower/dstream.cc | 2 +- flower/file-path.cc | 111 +++++ flower/full-storage.cc | 2 +- flower/include/acursor.hh | 2 +- flower/include/arithmetic-operator.hh | 2 +- flower/include/axes.hh | 2 +- flower/include/cpu-timer.hh | 2 +- flower/include/cursor.icc | 2 +- flower/include/data-file.hh | 2 +- flower/include/diagonal-storage.hh | 2 +- flower/include/dictionary-iter.hh | 2 +- flower/include/dictionary.hh | 2 +- flower/include/directed-graph.hh | 2 +- flower/include/dstream.hh | 2 +- flower/include/file-path.hh | 47 +++ flower/include/flower-debug.hh | 2 +- flower/include/fproto.hh | 2 + flower/include/full-storage.hh | 2 +- flower/include/full-storage.icc | 2 +- flower/include/international.hh | 2 +- flower/include/interval.hh | 6 +- flower/include/interval.tcc | 2 +- flower/include/iterate.hh | 2 +- flower/include/libc-extension.hh | 2 +- flower/include/list.icc | 2 +- flower/include/list.tcc | 2 +- flower/include/matrix-storage.hh | 2 +- flower/include/matrix.hh | 2 +- flower/include/nscalar.hh | 2 +- flower/include/parray.hh | 2 +- flower/include/plist.icc | 2 +- flower/include/plist.tcc | 2 +- flower/include/pointer.hh | 2 +- flower/include/pointer.tcc | 2 +- flower/include/pqueue.hh | 2 +- flower/include/priorities.hh | 2 +- flower/include/rational.hh | 2 +- flower/include/real.hh | 2 +- flower/include/scalar.hh | 2 +- flower/include/string-data.hh | 2 +- flower/include/string-data.icc | 2 +- flower/include/string-handle.hh | 2 +- flower/include/string-handle.icc | 2 +- flower/include/string.icc | 2 +- flower/include/virtual-methods.hh | 2 +- flower/interval.cc | 24 +- flower/libc-extension.cc | 2 +- flower/matrix-debug.cc | 2 +- flower/matrix.cc | 2 +- flower/nscalar.cc | 2 +- flower/offset.cc | 2 +- flower/rational.cc | 2 +- flower/scalar.cc | 2 +- flower/string.cc | 2 +- flower/stringutil.cc | 2 +- lib/binary-source-file.cc | 2 +- lib/include/duration-convert.hh | 99 ++--- lib/include/duration-iter.hh | 47 +++ lib/include/duration.hh | 7 +- lib/include/file-storage.hh | 2 +- lib/include/input.hh | 2 +- lib/include/mapped-file-storage.hh | 2 +- lib/include/plet.hh | 2 +- lib/include/simple-file-storage.hh | 2 +- lib/include/warn.hh | 2 +- lib/input.cc | 2 +- lib/mapped-file-storage.cc | 2 +- lib/moment.cc | 2 +- lib/plet.cc | 2 +- lib/simple-file-storage.cc | 2 +- lib/source-file.cc | 2 +- lib/source.cc | 4 +- lib/template.cc | 2 +- lily/abbrev.cc | 2 +- lily/abbreviation-beam-engraver.cc | 2 +- lily/abbreviation-beam.cc | 2 +- lily/atom.cc | 2 +- lily/audio-column.cc | 2 +- lily/audio-element.cc | 2 +- lily/audio-item.cc | 2 +- lily/audio-staff.cc | 2 +- lily/axis-group-administration.cc | 2 +- lily/axis-group-element.cc | 2 +- lily/axis-group-item.cc | 2 +- lily/axis-group-spanner.cc | 2 +- lily/bar-column-grav.cc | 2 +- lily/bar-column.cc | 2 +- lily/bar-grav.cc | 2 +- lily/bar-number-grav.cc | 14 +- lily/bar.cc | 2 +- lily/beam-grav.cc | 6 +- lily/beam-swallow-trans.cc | 2 +- lily/beam.cc | 384 +++++++++--------- lily/bezier.cc | 90 ++-- lily/bow.cc | 23 +- lily/boxes.cc | 2 +- lily/break-align-item.cc | 2 +- lily/break.cc | 2 +- lily/change-iterator.cc | 2 +- lily/change-translator.cc | 2 +- lily/chord-iterator.cc | 2 +- lily/clef-grav.cc | 2 +- lily/clef-item.cc | 2 +- lily/col-info.cc | 2 +- lily/colhpos.cc | 2 +- lily/collision-grav.cc | 2 +- lily/collision.cc | 2 +- lily/command-request.cc | 2 +- lily/crescendo.cc | 2 +- lily/dot-column.cc | 2 +- lily/dots.cc | 2 +- lily/dynamic-grav.cc | 2 +- lily/encompass-info.cc | 65 +++ lily/engraver-group.cc | 2 +- lily/engraver.cc | 2 +- lily/file-results.cc | 1 + lily/general-script-def.cc | 2 +- lily/global-translator.cc | 2 +- lily/gourlay-breaking.cc | 2 +- lily/graphical-element.cc | 2 +- lily/grouping.cc | 2 +- lily/head-grav.cc | 2 +- lily/header.cc | 2 +- lily/horizontal-align-item.cc | 2 +- lily/horizontal-group-item.cc | 2 +- lily/horizontal-vertical-group-item.cc | 2 +- lily/idealspacing.cc | 2 +- lily/identifier.cc | 5 +- lily/includable-lexer.cc | 5 +- lily/include/abbrev.hh | 2 +- lily/include/abbreviation-beam-engraver.hh | 2 +- lily/include/abbreviation-beam.hh | 2 +- lily/include/atom.hh | 2 +- lily/include/audio-column.hh | 2 +- lily/include/audio-element.hh | 2 +- lily/include/audio-item.hh | 2 +- lily/include/audio-staff.hh | 2 +- lily/include/axis-group-administration.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-align-grav.hh | 2 +- lily/include/bar-column-grav.hh | 2 +- lily/include/bar-column.hh | 2 +- lily/include/bar-grav.hh | 2 +- lily/include/bar-number-grav.hh | 2 +- lily/include/beam-grav.hh | 2 +- lily/include/beam-swallow-trans.hh | 2 +- lily/include/beam.hh | 16 +- lily/include/bow.hh | 2 +- lily/include/break-align-item.hh | 2 +- lily/include/break-caching.hh | 2 +- lily/include/break.hh | 2 +- lily/include/change-iterator.hh | 2 +- lily/include/change-translator.hh | 2 +- lily/include/chord-iterator.hh | 2 +- lily/include/clef-grav.hh | 2 +- lily/include/col-info.hh | 2 +- lily/include/colhpos.hh | 2 +- lily/include/collision-grav.hh | 2 +- lily/include/collision.hh | 2 +- lily/include/command-request.hh | 2 +- lily/include/crescendo.hh | 2 +- lily/include/direction.hh | 2 +- lily/include/dot-column-grav.hh | 2 +- lily/include/dot-column.hh | 2 +- lily/include/dots.hh | 2 +- lily/include/drul-array.hh | 2 +- lily/include/dynamic-grav.hh | 2 +- lily/include/elem-group.hh | 2 +- lily/include/encompass-info.hh | 25 ++ lily/include/engraver-group.hh | 2 +- lily/include/engraver.hh | 2 +- lily/include/file-results.hh | 24 ++ lily/include/general-script-def.hh | 2 +- lily/include/global-translator.hh | 2 +- lily/include/gourlay-breaking.hh | 2 +- lily/include/graphical-element.hh | 2 +- lily/include/head-grav.hh | 2 +- lily/include/header.hh | 2 +- lily/include/horizontal-align-item.hh | 2 +- lily/include/horizontal-group-elem.hh | 2 +- lily/include/horizontal-group-item.hh | 2 +- .../include/horizontal-vertical-group-elem.hh | 2 +- .../include/horizontal-vertical-group-item.hh | 2 +- lily/include/identifier.hh | 38 +- lily/include/includable-lexer.hh | 4 +- lily/include/ineq-constrained-qp.hh | 2 +- lily/include/item.hh | 2 +- lily/include/key-grav.hh | 2 +- lily/include/key-performer.hh | 2 +- lily/include/lily-proto.hh | 2 +- lily/include/line-group-grav.hh | 2 +- lily/include/line-spacer.hh | 2 +- lily/include/linear-programming.hh | 2 +- lily/include/linespace.hh | 2 +- lily/include/local-key-grav.hh | 2 +- lily/include/lookup.hh | 11 +- lily/include/lyric-engraver.hh | 2 +- lily/include/lyric-performer.hh | 2 +- lily/include/main.hh | 7 +- lily/include/meter-grav.hh | 2 +- lily/include/meter-performer.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/misc.hh | 16 +- lily/include/molecule.hh | 2 +- lily/include/music-iterator.hh | 2 +- lily/include/music-list.hh | 2 +- lily/include/music-output-def.hh | 5 +- lily/include/music-output.hh | 2 +- lily/include/music.hh | 2 +- lily/include/musical-request.hh | 2 +- lily/include/my-lily-lexer.hh | 6 +- lily/include/my-lily-parser.hh | 3 +- lily/include/note-column.hh | 2 +- lily/include/note-performer.hh | 2 +- lily/include/notename-table.hh | 2 +- lily/include/outputter.hh | 2 +- lily/include/p-col.hh | 2 +- lily/include/p-score.hh | 2 +- lily/include/paper-def.hh | 2 +- lily/include/performance.hh | 2 +- lily/include/performer-group-performer.hh | 2 +- lily/include/performer.hh | 2 +- lily/include/pitch-squash-grav.hh | 2 +- lily/include/plet-engraver.hh | 2 +- lily/include/plet-spanner.hh | 2 +- lily/include/plet-swallow-engraver.hh | 2 +- lily/include/priority-halign-grav.hh | 2 +- lily/include/property-iterator.hh | 2 +- lily/include/qlp.hh | 2 +- lily/include/qlpsolve.hh | 2 +- lily/include/request-iterator.hh | 2 +- lily/include/request.hh | 2 +- lily/include/rest-collision-grav.hh | 2 +- lily/include/rest-collision.hh | 2 +- lily/include/rest-grav.hh | 2 +- lily/include/rest.hh | 2 +- lily/include/rhythmic-column-grav.hh | 2 +- lily/include/rhythmic-head.hh | 2 +- lily/include/score-bar.hh | 2 +- lily/include/score-column.hh | 2 +- lily/include/score-elem-info.hh | 2 +- lily/include/score-grav.hh | 2 +- lily/include/score-performer.hh | 2 +- lily/include/score-priority-grav.hh | 2 +- lily/include/score.hh | 2 +- lily/include/script-column.hh | 2 +- lily/include/script-grav.hh | 2 +- lily/include/single-malt-grouping-item.hh | 2 +- lily/include/slur-grav.hh | 2 +- lily/include/span-bar-grav.hh | 2 +- lily/include/span-bar.hh | 2 +- lily/include/span-score-bar-grav.hh | 2 +- lily/include/span-score-bar.hh | 2 +- lily/include/spring-spacer.hh | 2 +- lily/include/staff-info.hh | 2 +- lily/include/staff-performer.hh | 2 +- lily/include/staff-side.hh | 2 +- lily/include/staff-sym-grav.hh | 2 +- lily/include/staff-sym.hh | 2 +- lily/include/stem-grav.hh | 2 +- lily/include/stem-info.hh | 8 +- lily/include/stem.hh | 3 + lily/include/super-elem.hh | 2 +- lily/include/swallow-grav.hh | 2 +- lily/include/swallow-perf.hh | 2 +- lily/include/symtable.hh | 2 +- lily/include/tex.hh | 2 +- lily/include/tie-grav.hh | 2 +- lily/include/tie.hh | 2 +- lily/include/timing-grav.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 | 2 +- lily/include/type-swallow-trans.hh | 2 +- lily/include/vertical-align-elem.hh | 2 +- lily/include/vertical-align-grav.hh | 2 +- lily/include/vertical-align-spanner.hh | 2 +- lily/include/vertical-group-elem.hh | 2 +- lily/include/vertical-group-spanner.hh | 2 +- lily/include/voice-iterator.hh | 2 +- lily/include/word-wrap.hh | 2 +- lily/ineq-constrained-qp.cc | 2 +- lily/item.cc | 2 +- lily/key-grav.cc | 2 +- lily/key-item.cc | 2 +- lily/key-performer.cc | 2 +- lily/key.cc | 2 +- lily/lexerinit.cc | 2 +- lily/line-group-grav.cc | 2 +- lily/line-spacer.cc | 2 +- lily/linear-programming.cc | 2 +- lily/local-key-grav.cc | 2 +- lily/local-key-item.cc | 2 +- lily/lookup.cc | 11 +- lily/lyric-grav.cc | 2 +- lily/lyric-performer.cc | 2 +- lily/main.cc | 69 +--- lily/meter-grav.cc | 2 +- lily/meter-performer.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 | 82 +++- lily/molecule.cc | 2 +- lily/music-iterator.cc | 2 +- lily/music-list.cc | 2 +- lily/music-output-def.cc | 3 +- lily/music.cc | 2 +- lily/musical-request.cc | 2 +- lily/my-lily-lexer.cc | 15 +- lily/my-lily-parser.cc | 65 +-- lily/note-column.cc | 2 +- lily/note-head.cc | 2 +- lily/note-performer.cc | 2 +- lily/notename-table.cc | 2 +- lily/outputter.cc | 2 +- lily/p-col.cc | 2 +- lily/p-score.cc | 18 +- lily/paper-def.cc | 2 +- lily/performance.cc | 4 +- lily/performer-group-performer.cc | 2 +- lily/performer.cc | 2 +- lily/pitch-squash-grav.cc | 2 +- lily/plet-engraver.cc | 2 +- lily/plet-spanner.cc | 2 +- lily/plet-swallow-engraver.cc | 2 +- lily/priority-halign-grav.cc | 2 +- lily/property-iterator.cc | 2 +- lily/ps-plet.cc | 4 +- lily/qlp.cc | 2 +- lily/qlpsolve.cc | 2 +- lily/request-iterator.cc | 2 +- lily/request.cc | 2 +- lily/rest-collision-grav.cc | 2 +- lily/rest-collision.cc | 2 +- lily/rest-grav.cc | 2 +- lily/rest.cc | 2 +- lily/rhythmic-column-grav.cc | 2 +- lily/rhythmic-head.cc | 2 +- lily/score-bar.cc | 2 +- lily/score-column.cc | 2 +- lily/score-elem-info.cc | 2 +- lily/score-elem.cc | 2 +- lily/score-grav.cc | 2 +- lily/score-performer.cc | 2 +- lily/score-priority-grav.cc | 2 +- lily/score.cc | 2 +- lily/scoreline.cc | 2 +- lily/scores.cc | 112 ++++- lily/script-column.cc | 2 +- lily/script-def.cc | 2 +- lily/script-grav.cc | 2 +- lily/script.cc | 2 +- lily/slur-grav.cc | 2 +- lily/slur.cc | 187 ++++----- lily/span-bar-grav.cc | 2 +- lily/span-bar.cc | 2 +- lily/span-score-bar-grav.cc | 2 +- lily/span-score-bar.cc | 2 +- lily/spanner.cc | 2 +- lily/spring-spacer.cc | 2 +- lily/staff-info.cc | 2 +- lily/staff-performer.cc | 2 +- lily/staff-side.cc | 2 +- lily/staff-sym-grav.cc | 2 +- lily/staff-sym.cc | 2 +- lily/stem-grav.cc | 2 +- lily/stem-info.cc | 71 +++- lily/stem.cc | 3 +- lily/super-elem.cc | 2 +- lily/swallow-grav.cc | 2 +- lily/swallow-perf.cc | 2 +- lily/symtable.cc | 2 +- lily/template1.cc | 2 +- lily/template2.cc | 2 +- lily/template3.cc | 2 +- lily/template4.cc | 2 +- lily/template5.cc | 14 +- lily/template7.cc | 2 +- lily/template8.cc | 2 +- lily/tex-beam.cc | 33 +- lily/tex-stream.cc | 2 +- lily/tex.cc | 2 +- lily/text-def.cc | 2 +- lily/text-item.cc | 2 +- lily/text-spanner.cc | 2 +- lily/tie-grav.cc | 2 +- lily/tie.cc | 37 +- lily/time-description.cc | 2 +- lily/timing-grav.cc | 2 +- lily/timing-translator.cc | 2 +- lily/translation-property.cc | 2 +- lily/translator-ctors.cc | 2 +- lily/translator-group.cc | 2 +- lily/translator.cc | 2 +- lily/type-swallow-trans.cc | 2 +- lily/vertical-align-elem.cc | 2 +- lily/vertical-align-grav.cc | 2 +- lily/vertical-align-spanner.cc | 2 +- lily/vertical-group-elem.cc | 2 +- lily/vertical-group-spanner.cc | 2 +- lily/voice-iterator.cc | 2 +- lily/warn.cc | 2 +- lily/word-wrap.cc | 2 +- mi2mu/include/mi2mu-proto.hh | 2 +- mi2mu/include/midi-parser.hh | 2 +- mi2mu/include/midi-score-parser.hh | 2 +- mi2mu/include/midi-track-parser.hh | 2 +- mi2mu/main.cc | 2 +- mi2mu/midi-parser.cc | 2 +- mi2mu/midi-score-parser.cc | 2 +- mi2mu/midi-track-parser.cc | 2 +- mi2mu/mudela-stream.cc | 4 +- 427 files changed, 1523 insertions(+), 1079 deletions(-) create mode 100644 flower/file-path.cc create mode 100644 flower/include/file-path.hh create mode 100644 lib/include/duration-iter.hh create mode 100644 lily/encompass-info.cc create mode 100644 lily/file-results.cc create mode 100644 lily/include/encompass-info.hh create mode 100644 lily/include/file-results.hh diff --git a/bin/clean-diaper.sh b/bin/clean-diaper.sh index 06be9040ae..47c2a069db 100644 --- a/bin/clean-diaper.sh +++ b/bin/clean-diaper.sh @@ -1,7 +1,9 @@ #!/bin/sh # unclobber current dir. -rm -vf *.aux *.log *.orig *~ +rm -vf *.aux *.log *.orig *~ *dvi *.dep + +# subdirs rm -vf `grep -li "^% Creator: GNU LilyPond" *.out *.tex` rm -vf `grep -li "Creator: mi2mu" *.midi.ly` rm -vf `grep -li "%Creator: dvipsk" *.ps` @@ -11,8 +13,10 @@ rm -vf `find -name 'core'` rm -vf `find -name '*.orig'` rm -vf `find -name '*.rej'` + + + # docxx mess -rm -vf *dvi rm -vf *.class HIER*.html dxxgifs.tex gifs.db icon?.gif logo.gif down.gif \ aindex.html index.html diff --git a/flower/axis.cc b/flower/axis.cc index ff8566988d..92a1dea001 100644 --- a/flower/axis.cc +++ b/flower/axis.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include diff --git a/flower/choleski.cc b/flower/choleski.cc index 5c803ab0a8..5793fceae4 100644 --- a/flower/choleski.cc +++ b/flower/choleski.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "choleski.hh" diff --git a/flower/cpu-timer.cc b/flower/cpu-timer.cc index 1a6b0e83a6..a4d79a3776 100644 --- a/flower/cpu-timer.cc +++ b/flower/cpu-timer.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "cpu-timer.hh" diff --git a/flower/directed-graph.cc b/flower/directed-graph.cc index 50dafedf13..5c61a41963 100644 --- a/flower/directed-graph.cc +++ b/flower/directed-graph.cc @@ -3,7 +3,7 @@ source file FlowerLib - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "directed-graph.hh" diff --git a/flower/dstream.cc b/flower/dstream.cc index 28f7a472aa..7857d33338 100644 --- a/flower/dstream.cc +++ b/flower/dstream.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include diff --git a/flower/file-path.cc b/flower/file-path.cc new file mode 100644 index 0000000000..e6f9c4cff7 --- /dev/null +++ b/flower/file-path.cc @@ -0,0 +1,111 @@ +/* + path.cc - manipulation of paths and filenames. +*/ +#include +#include "file-path.hh" +#include "flower-debug.hh" + +#ifndef DIRSEP +#define DIRSEP '/' +#endif + +#ifndef PATHSEP +#define PATHSEP ':' +#endif + +/** + @param path the original full filename + @return 4 components of the path. They can be empty +*/ +void +split_path (String path, + String &drive, String &dirs, String &filebase, String &extension) +{ + // peel off components, one by one. + int di = path.index_i (':'); + if (di >= 0) + { + drive = path.left_str (di + 1); + path = path.right_str (path.length_i () - di -1); + } + else + drive = ""; + + di = path.index_last_i (DIRSEP); + if (di >=0) + { + dirs = path.left_str (di + 1); + path = path.right_str (path.length_i ()-di -1); + } + else + dirs = ""; + + di = path.index_last_i ('.'); + if (di >= 0) + { + filebase = path.left_str (di); + extension =path.right_str (path.length_i ()-di); + } + else + { + extension = ""; + filebase = path; + } +} + +void +File_path::parse_path (String p) +{ + int l; + + while ( (l = p.length_i ()) ) + { + int i = p.index_i(PATHSEP); + if (i <0) + i = l; + add (p.left_str(i)); + p = p.right_str (l- i - 1); + } +} + + + + +/** find a file. + It will search in the current dir, in the construction-arg, and + in any other added path, in this order. + */ +String +File_path::find (String nm) const +{ + fdebug << _("looking for ") << nm << ": "; + if (!nm.length_i() || (nm == "-") ) + return nm; + for (int i=0; i < size(); i++) + { + String path = elem(i); + String sep (DIRSEP); + String right(path.right_str (1)); + if (path.length_i () && right != sep) + path += DIRSEP; + + path += nm; + + fdebug << path << "? "; + FILE *f = fopen (path.ch_C(), "r"); // ugh! + if (f) + { + fdebug << _("found\n"); + fclose (f); + return path; + } + } + fdebug << "\n"; + return ""; +} + +void +File_path::add (String s) +{ + push (s); +} diff --git a/flower/full-storage.cc b/flower/full-storage.cc index 8389854361..4fc5605cfb 100644 --- a/flower/full-storage.cc +++ b/flower/full-storage.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include "full-storage.hh" diff --git a/flower/include/acursor.hh b/flower/include/acursor.hh index 51ae3ea4d2..d49dbd6b4e 100644 --- a/flower/include/acursor.hh +++ b/flower/include/acursor.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/arithmetic-operator.hh b/flower/include/arithmetic-operator.hh index 6b95340495..4a472819e3 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/axes.hh b/flower/include/axes.hh index 82e561eb9f..786e5157b7 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/cpu-timer.hh b/flower/include/cpu-timer.hh index 3205c42b35..65def573e5 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/cursor.icc b/flower/include/cursor.icc index 15549fb737..a000736b1e 100644 --- a/flower/include/cursor.icc +++ b/flower/include/cursor.icc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/data-file.hh b/flower/include/data-file.hh index 93cd3f2bc5..f371c39092 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/diagonal-storage.hh b/flower/include/diagonal-storage.hh index f3883e1ca4..ae9572d5b7 100644 --- a/flower/include/diagonal-storage.hh +++ b/flower/include/diagonal-storage.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/dictionary-iter.hh b/flower/include/dictionary-iter.hh index b80bb14924..414d62b77f 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/dictionary.hh b/flower/include/dictionary.hh index 87af9f9f7a..2e16bed201 100644 --- a/flower/include/dictionary.hh +++ b/flower/include/dictionary.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/directed-graph.hh b/flower/include/directed-graph.hh index 5c9b8bc8b0..33c9e4ee23 100644 --- a/flower/include/directed-graph.hh +++ b/flower/include/directed-graph.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/dstream.hh b/flower/include/dstream.hh index d9f896e434..c1c04f3921 100644 --- a/flower/include/dstream.hh +++ b/flower/include/dstream.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef DSTREAM_HH diff --git a/flower/include/file-path.hh b/flower/include/file-path.hh new file mode 100644 index 0000000000..67d3129f10 --- /dev/null +++ b/flower/include/file-path.hh @@ -0,0 +1,47 @@ +/* + path.hh -- declare File_path + + source file of the Flower Library + + (c) 1997--1998 Han-Wen Nienhuys +*/ + +#ifndef PATH_HH +#define PATH_HH +#include "string.hh" +#include "varray.hh" + + +/** + search in directories for a file. + + Abstraction of PATH variable. An interface for searching input files. + Search a number of dirs for a file. + + TODO: add a unix style PATH interface + Should use kpathsea? + +*/ + +class File_path : private Array +{ +public: + /// locate a file in the search path + String find (String nm) const; + + /// add to end of path. + Array::push; + void add (String str); + void parse_path (String); +}; + +/** split a path into its components. + + @params path + + @return + String &drive, String &dirs, String &filebase, String &extension + */ +void split_path (String path, String &drive, String &dirs, String &filebase, String &extension); + +#endif diff --git a/flower/include/flower-debug.hh b/flower/include/flower-debug.hh index b3855d1566..5c8138e946 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/fproto.hh b/flower/include/fproto.hh index 5c491d6114..96cbfc5db6 100644 --- a/flower/include/fproto.hh +++ b/flower/include/fproto.hh @@ -17,6 +17,7 @@ typedef int i32; /// (i64) typedef long long I64; +template struct Link_array; template struct Array; template struct sstack; template struct Assoc; @@ -35,6 +36,7 @@ template struct PQueue; #include "real.hh" typedef Interval_t Interval; +typedef Interval_t Slice; struct Choleski_decomposition; diff --git a/flower/include/full-storage.hh b/flower/include/full-storage.hh index 10438e3a7e..4d68e12828 100644 --- a/flower/include/full-storage.hh +++ b/flower/include/full-storage.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/full-storage.icc b/flower/include/full-storage.icc index a1b4c1bf41..008f4169f5 100644 --- a/flower/include/full-storage.icc +++ b/flower/include/full-storage.icc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/international.hh b/flower/include/international.hh index b14cc3bfaf..730b9924e6 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/interval.hh b/flower/include/interval.hh index 2d7488aeef..f33bcb5aa0 100644 --- a/flower/include/interval.hh +++ b/flower/include/interval.hh @@ -171,12 +171,10 @@ Interval_t operator *(Interval_t i,T a){ return a*i; } +// again? see fproto.hh typedef Interval_t Interval; - - +typedef Interval_t Slice; #endif // INTERVAL_HH - - diff --git a/flower/include/interval.tcc b/flower/include/interval.tcc index 01dbbb1695..d6c93b48f2 100644 --- a/flower/include/interval.tcc +++ b/flower/include/interval.tcc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/iterate.hh b/flower/include/iterate.hh index 65b092d1d5..d68226777f 100644 --- a/flower/include/iterate.hh +++ b/flower/include/iterate.hh @@ -3,7 +3,7 @@ source file of the flowerlib - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/libc-extension.hh b/flower/include/libc-extension.hh index 2497910a29..051077b6e7 100644 --- a/flower/include/libc-extension.hh +++ b/flower/include/libc-extension.hh @@ -3,7 +3,7 @@ source file of the flowerlib - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/list.icc b/flower/include/list.icc index 3f930f02b9..7192c4d9f6 100644 --- a/flower/include/list.icc +++ b/flower/include/list.icc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1996,1997 + (c) 1996, 1997--1998 Jan Nieuwenhuizen Han-Wen Nienhuys */ diff --git a/flower/include/list.tcc b/flower/include/list.tcc index c5084dce05..6cba533848 100644 --- a/flower/include/list.tcc +++ b/flower/include/list.tcc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef LIST_CC #define LIST_CC diff --git a/flower/include/matrix-storage.hh b/flower/include/matrix-storage.hh index 7cb3f4c3d4..581e6ee937 100644 --- a/flower/include/matrix-storage.hh +++ b/flower/include/matrix-storage.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/matrix.hh b/flower/include/matrix.hh index 660b2d776f..64ba718215 100644 --- a/flower/include/matrix.hh +++ b/flower/include/matrix.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/nscalar.hh b/flower/include/nscalar.hh index d1b361b70d..774f2e7dc1 100644 --- a/flower/include/nscalar.hh +++ b/flower/include/nscalar.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/parray.hh b/flower/include/parray.hh index e1e5972020..c6caad2c2f 100644 --- a/flower/include/parray.hh +++ b/flower/include/parray.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/plist.icc b/flower/include/plist.icc index d81b322e48..d149e8ebc8 100644 --- a/flower/include/plist.icc +++ b/flower/include/plist.icc @@ -1,7 +1,7 @@ /* -*-c++-*- plist.icc -- part of flowerlib - (c) 1996,1997 Han-Wen Nienhuys& Jan Nieuwenhuizen + (c) 1996, 1997--1998 Han-Wen Nienhuys& Jan Nieuwenhuizen */ #ifndef PLIST_INL diff --git a/flower/include/plist.tcc b/flower/include/plist.tcc index ee6889faef..794e0b0fc1 100644 --- a/flower/include/plist.tcc +++ b/flower/include/plist.tcc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/pointer.hh b/flower/include/pointer.hh index cc8097c360..803af25ab9 100644 --- a/flower/include/pointer.hh +++ b/flower/include/pointer.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/pointer.tcc b/flower/include/pointer.tcc index 4ce1302189..4c82e7d27e 100644 --- a/flower/include/pointer.tcc +++ b/flower/include/pointer.tcc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/pqueue.hh b/flower/include/pqueue.hh index cc352cb2da..67726d47f1 100644 --- a/flower/include/pqueue.hh +++ b/flower/include/pqueue.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/priorities.hh b/flower/include/priorities.hh index 59949bd860..4b804ba275 100644 --- a/flower/include/priorities.hh +++ b/flower/include/priorities.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/rational.hh b/flower/include/rational.hh index 587a7f63f1..3c15f76c4f 100644 --- a/flower/include/rational.hh +++ b/flower/include/rational.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/real.hh b/flower/include/real.hh index 3b030c4cba..05e214ac16 100644 --- a/flower/include/real.hh +++ b/flower/include/real.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/scalar.hh b/flower/include/scalar.hh index 457c78af04..e8c58e684e 100644 --- a/flower/include/scalar.hh +++ b/flower/include/scalar.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/string-data.hh b/flower/include/string-data.hh index 0b71643e98..7695bedde6 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/string-data.icc b/flower/include/string-data.icc index 7d62f1ffcb..599b9d82a6 100644 --- a/flower/include/string-data.icc +++ b/flower/include/string-data.icc @@ -3,7 +3,7 @@ source file of Flower lib - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef STRINGDATA_INL diff --git a/flower/include/string-handle.hh b/flower/include/string-handle.hh index ccd149b9cf..08b957c51f 100644 --- a/flower/include/string-handle.hh +++ b/flower/include/string-handle.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/string-handle.icc b/flower/include/string-handle.icc index 51db730a22..6f9d908f57 100644 --- a/flower/include/string-handle.icc +++ b/flower/include/string-handle.icc @@ -4,7 +4,7 @@ source file of Flower lib - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef STRINGHANDLE_INL diff --git a/flower/include/string.icc b/flower/include/string.icc index 8a03288c04..3bdbb0336e 100644 --- a/flower/include/string.icc +++ b/flower/include/string.icc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/include/virtual-methods.hh b/flower/include/virtual-methods.hh index 278ed57190..2ce3d40569 100644 --- a/flower/include/virtual-methods.hh +++ b/flower/include/virtual-methods.hh @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/interval.cc b/flower/interval.cc index d4ca0f40f4..2a71fea232 100644 --- a/flower/interval.cc +++ b/flower/interval.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -11,13 +11,10 @@ #include "real.hh" #include "interval.tcc" - -template INTERVAL__INSTANTIATE(Real); - - +template INTERVAL__INSTANTIATE (Real); Real -Interval_t::infinity() +Interval_t::infinity () { return HUGE_VAL; } @@ -27,3 +24,18 @@ Interval_t::T_to_str (Real r) { return String (r); } + +template INTERVAL__INSTANTIATE (int); + +int +Interval_t::infinity () +{ + return INT_MAX; +} + +String +Interval_t::T_to_str (int i) +{ + return String (i); +} + diff --git a/flower/libc-extension.cc b/flower/libc-extension.cc index f44b468e85..c7f1b4bd08 100644 --- a/flower/libc-extension.cc +++ b/flower/libc-extension.cc @@ -4,7 +4,7 @@ source file of the flowerlib - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include #include diff --git a/flower/matrix-debug.cc b/flower/matrix-debug.cc index 5a6149720c..82080f2a6d 100644 --- a/flower/matrix-debug.cc +++ b/flower/matrix-debug.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/matrix.cc b/flower/matrix.cc index 09a7668a05..314447220a 100644 --- a/flower/matrix.cc +++ b/flower/matrix.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "matrix.hh" diff --git a/flower/nscalar.cc b/flower/nscalar.cc index c8b829dd15..75bbe6bad4 100644 --- a/flower/nscalar.cc +++ b/flower/nscalar.cc @@ -3,6 +3,6 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/flower/offset.cc b/flower/offset.cc index 3085f246b5..d92c3af31a 100644 --- a/flower/offset.cc +++ b/flower/offset.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include diff --git a/flower/rational.cc b/flower/rational.cc index df18b4cbcd..a7b7d696c8 100644 --- a/flower/rational.cc +++ b/flower/rational.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include #include "rational.hh" diff --git a/flower/scalar.cc b/flower/scalar.cc index 79bfd53d5f..bdd2452ad7 100644 --- a/flower/scalar.cc +++ b/flower/scalar.cc @@ -3,7 +3,7 @@ source file of the Flower Library - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include diff --git a/flower/string.cc b/flower/string.cc index 65279ce037..366abcd6bf 100644 --- a/flower/string.cc +++ b/flower/string.cc @@ -2,7 +2,7 @@ string.cc - implement String - (c) 1997 Han-Wen Nienhuys & Jan Nieuwenhuizen + (c) 1997--1998 Han-Wen Nienhuys & Jan Nieuwenhuizen */ diff --git a/flower/stringutil.cc b/flower/stringutil.cc index f8332672f0..f10adcb623 100644 --- a/flower/stringutil.cc +++ b/flower/stringutil.cc @@ -6,7 +6,7 @@ source file of the LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys */ + (c) 1997--1998 Han-Wen Nienhuys */ #ifdef STRING_DEBUG #define memmove mymemmove diff --git a/lib/binary-source-file.cc b/lib/binary-source-file.cc index 75d7ce24ca..971d4d0c21 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 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ diff --git a/lib/include/duration-convert.hh b/lib/include/duration-convert.hh index 7473638323..82e102d4c8 100644 --- a/lib/include/duration-convert.hh +++ b/lib/include/duration-convert.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -32,81 +32,52 @@ */ struct Duration_convert { - /* Urgh. statics. - */ - static bool const midi_as_plet_b_s = true; - static bool no_quantify_b_s; - static bool no_double_dots_b_s; - static bool no_triplets_b_s; - static int no_smaller_than_i_s; - static Array dur_array_s; - - /// Return number of ticks in (ticks, division_1) representation - static int dur2ticks_i (Duration dur ); + /* Urgh. statics. + */ + static bool const midi_as_plet_b_s = true; + static bool no_quantify_b_s; + static bool no_double_dots_b_s; + static bool no_triplets_b_s; + static int no_smaller_than_i_s; + static Array dur_array_s; + + /// Return number of ticks in (ticks, division_1) representation + static int dur2ticks_i (Duration dur ); - /// Return the type_i representation of note length i - static int i2_type (int i); + /// Return the type_i representation of note length i + static int i2_type (int i); - /// Return the note length corresponding to the type_i representation - /// Return 0 if longer than whole note. - static int type2_i (int type); + /// Return the note length corresponding to the type_i representation + /// Return 0 if longer than whole note. + static int type2_i (int type); - /// Return Moment representation (fraction of whole note). - static Moment dur2_mom (Duration dur ); + /// Return Moment representation (fraction of whole note). + static Moment dur2_mom (Duration dur ); - /// Return Mudela string representation. - static String dur2_str (Duration dur ); + /// Return Mudela string representation. + static String dur2_str (Duration dur ); - /// Return duration from Moment (fraction of whole) representation. - static Duration mom2_dur (Moment mom ); + /// Return duration from Moment (fraction of whole) representation. + static Duration mom2_dur (Moment mom ); - /// Return standardised duration, best guess if not exact. - static Duration mom2standardised_dur (Moment mom ); + /// Return standardised duration, best guess if not exact. + static Duration mom2standardised_dur (Moment mom ); - /// Return plet factor (not a Moment: should use Rational?). - static Moment plet_factor_mom (Duration dur ); + /// Return plet factor (not a Moment: should use Rational?). + static Moment plet_factor_mom (Duration dur ); - static void set_array (); + static void set_array (); - /** Return synchronisation factor for mom, so that + /** Return synchronisation factor for mom, so that mom2_dur (mom / sync_f ) will return the duration dur. - */ - static Real sync_f (Duration dur, Moment mom ); + */ + static Real sync_f (Duration dur, Moment mom ); - /// Return exact duration, in midi-ticks if not-exact. - static Duration ticks2_dur (int ticks_i ); + /// Return exact duration, in midi-ticks if not-exact. + static Duration ticks2_dur (int ticks_i ); - /// Return standardised duration, best guess if not exact. - static Duration ticks2standardised_dur (int ticks_i ); -}; - -/// (iter_dur) -struct Duration_iterator { - /// start at shortest: 128:2/3 - Duration_iterator (); - - // **** what about these three here ? - /// return forward_dur (); - Duration operator ++(int); - - /// return ok () - operator bool (); - - /// return dur () - Duration operator ()(); - // **** - - /// return current dur - Duration dur (); - - /// return dur (), step to next - Duration forward_dur (); - - /// durations left? - bool ok (); - -private: - Duration cursor_dur_; + /// Return standardised duration, best guess if not exact. + static Duration ticks2standardised_dur (int ticks_i ); }; diff --git a/lib/include/duration-iter.hh b/lib/include/duration-iter.hh new file mode 100644 index 0000000000..1c01ac7b8a --- /dev/null +++ b/lib/include/duration-iter.hh @@ -0,0 +1,47 @@ +/* + duration-iter.hh -- declare Duration_iterator + + source file of the GNU LilyPond music typesetter + + (c) 1998 Han-Wen Nienhuys + + */ + +#ifndef DURATION_ITER_HH +#define DURATION_ITER_HH + +/// (iter_dur) +struct Duration_iterator { + + /// start at shortest: 128:2/3 + Duration_iterator (); + + // **** what about these three here ? + /// return forward_dur (); + Duration operator ++(int); + + /// return ok () + operator bool (); + + /// return dur () + Duration operator ()(); + + + /// return current dur + Duration dur (); + + /// return dur (), step to next + Duration forward_dur (); + + /// durations left? + bool ok (); + +private: + + Duration cursor_dur_; +}; + + + +#endif /* DURATION_ITER_HH */ + diff --git a/lib/include/duration.hh b/lib/include/duration.hh index 69eaf8dcaf..59c968f751 100644 --- a/lib/include/duration.hh +++ b/lib/include/duration.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ @@ -15,9 +15,6 @@ #include "fproto.hh" #include "moment.hh" #include "plet.hh" -// ugh, to get me in lily lib -extern bool no_triplets_bo_g; - /** Class to handle "musical" durations. This means: balltype 1,2,4,etc. and dots. @@ -30,7 +27,7 @@ struct Duration { bool plet_b (); String str () const; void set_plet (int,int ); - void set_plet (Duration ); + static bool duration_type_b (int t); void set_ticks (int ticks_i ); Moment length () const ; // zo naai mij diff --git a/lib/include/file-storage.hh b/lib/include/file-storage.hh index 1ac150f592..b2e679bb57 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lib/include/input.hh b/lib/include/input.hh index f82ba2d224..767a2e76b8 100644 --- a/lib/include/input.hh +++ b/lib/include/input.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lib/include/mapped-file-storage.hh b/lib/include/mapped-file-storage.hh index 4ca29a3006..506bbc978f 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lib/include/plet.hh b/lib/include/plet.hh index ecedcc4d43..de32eb1753 100644 --- a/lib/include/plet.hh +++ b/lib/include/plet.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lib/include/simple-file-storage.hh b/lib/include/simple-file-storage.hh index 4deb0969ff..4f4bd59199 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lib/include/warn.hh b/lib/include/warn.hh index 45edc4ba40..a65c4aa19a 100644 --- a/lib/include/warn.hh +++ b/lib/include/warn.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lib/input.cc b/lib/input.cc index e9cc3fd007..c50b3b7335 100644 --- a/lib/input.cc +++ b/lib/input.cc @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "proto.hh" #include "input.hh" diff --git a/lib/mapped-file-storage.cc b/lib/mapped-file-storage.cc index c318925b4e..17d451d1a6 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys Jan Nieuwenhuizen . Nextstep fixes by tiggr@ics.ele.tue.nl diff --git a/lib/moment.cc b/lib/moment.cc index ef1fa46def..d29ce9065b 100644 --- a/lib/moment.cc +++ b/lib/moment.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include diff --git a/lib/plet.cc b/lib/plet.cc index 84579eca71..9a098cc4c9 100644 --- a/lib/plet.cc +++ b/lib/plet.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "plet.hh" diff --git a/lib/simple-file-storage.cc b/lib/simple-file-storage.cc index a8e98aaeb8..561ab838c9 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include diff --git a/lib/source-file.cc b/lib/source-file.cc index b6153c984a..c14dcccd6f 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 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen & Han-Wen Nienhuys */ diff --git a/lib/source.cc b/lib/source.cc index d350b487ca..5d384f757e 100644 --- a/lib/source.cc +++ b/lib/source.cc @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -15,7 +15,7 @@ #include "plist.hh" #include "source-file.hh" #include "source.hh" -#include "path.hh" +#include "file-path.hh" Sources::Sources () { diff --git a/lib/template.cc b/lib/template.cc index 2ea84593a9..6c117a2a60 100644 --- a/lib/template.cc +++ b/lib/template.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "source-file.hh" diff --git a/lily/abbrev.cc b/lily/abbrev.cc index d91899c756..54088537b6 100644 --- a/lily/abbrev.cc +++ b/lily/abbrev.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/abbreviation-beam-engraver.cc b/lily/abbreviation-beam-engraver.cc index e8e8ef0614..ca62b92d24 100644 --- a/lily/abbreviation-beam-engraver.cc +++ b/lily/abbreviation-beam-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/abbreviation-beam.cc b/lily/abbreviation-beam.cc index d9a4e5bac8..6637d19f0f 100644 --- a/lily/abbreviation-beam.cc +++ b/lily/abbreviation-beam.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/atom.cc b/lily/atom.cc index 68d85f8e0e..8c5c2f80e4 100644 --- a/lily/atom.cc +++ b/lily/atom.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "atom.hh" #include "tex.hh" diff --git a/lily/audio-column.cc b/lily/audio-column.cc index e0dbd2efff..2f5ad611a6 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 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #include "audio-column.hh" diff --git a/lily/audio-element.cc b/lily/audio-element.cc index 77aaeb44f5..18f265c46e 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "audio-element.hh" diff --git a/lily/audio-item.cc b/lily/audio-item.cc index 60a6badc8d..81b0285ba6 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 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #include "debug.hh" #include "audio-item.hh" diff --git a/lily/audio-staff.cc b/lily/audio-staff.cc index 6dc14d1180..d35fb23a58 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 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #include "audio-staff.hh" diff --git a/lily/axis-group-administration.cc b/lily/axis-group-administration.cc index 11eb1263b7..bf42295aee 100644 --- a/lily/axis-group-administration.cc +++ b/lily/axis-group-administration.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "interval.hh" #include "axis-group-administration.hh" diff --git a/lily/axis-group-element.cc b/lily/axis-group-element.cc index b97b94cf61..b4061af7f5 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "axis-group-element.hh" diff --git a/lily/axis-group-item.cc b/lily/axis-group-item.cc index 5362516f02..2706fa8faa 100644 --- a/lily/axis-group-item.cc +++ b/lily/axis-group-item.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "axis-group-item.hh" #include "p-col.hh" diff --git a/lily/axis-group-spanner.cc b/lily/axis-group-spanner.cc index 5cace351e3..344b4060cc 100644 --- a/lily/axis-group-spanner.cc +++ b/lily/axis-group-spanner.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "axis-group-spanner.hh" diff --git a/lily/bar-column-grav.cc b/lily/bar-column-grav.cc index e4219fdb38..7afced803a 100644 --- a/lily/bar-column-grav.cc +++ b/lily/bar-column-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/bar-column.cc b/lily/bar-column.cc index 05710d8706..57bf47660d 100644 --- a/lily/bar-column.cc +++ b/lily/bar-column.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "bar.hh" diff --git a/lily/bar-grav.cc b/lily/bar-grav.cc index 4b8e1d4472..b711bf4a07 100644 --- a/lily/bar-grav.cc +++ b/lily/bar-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "bar-grav.hh" diff --git a/lily/bar-number-grav.cc b/lily/bar-number-grav.cc index 9a24c2739b..be49f69b3f 100644 --- a/lily/bar-number-grav.cc +++ b/lily/bar-number-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -12,6 +12,7 @@ #include "text-def.hh" #include "command-request.hh" #include "bar.hh" +#include "stem.hh" #include "time-description.hh" Bar_number_engraver::Bar_number_engraver() @@ -20,6 +21,7 @@ Bar_number_engraver::Bar_number_engraver() } static Command_script_req dummy; +static Stem support; void Bar_number_engraver::acknowledge_element (Score_elem_info i) @@ -38,9 +40,15 @@ Bar_number_engraver::acknowledge_element (Score_elem_info i) script_p_->specs_l_ = td_p; script_p_->breakable_b_ = true; + + // ugh, howto move this up? script_p_->dir_ = UP; -// script_p_->y_ += 2; - script_p_->y_ = 8; +//// script_p_->y_ += 2; + script_p_->y_ = 10; + + support.dir_ = UP; + support.set_stemend (10); + script_p_->set_stem (&support); announce_element (Score_elem_info (script_p_, &dummy)); } diff --git a/lily/bar.cc b/lily/bar.cc index 0a699a26ab..701bbd7b86 100644 --- a/lily/bar.cc +++ b/lily/bar.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "bar.hh" diff --git a/lily/beam-grav.cc b/lily/beam-grav.cc index 8cd5958f17..9a3f9586c2 100644 --- a/lily/beam-grav.cc +++ b/lily/beam-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "duration-convert.hh" #include "time-description.hh" @@ -56,9 +56,9 @@ Beam_engraver::do_process_requests() if (prop.isnum_b ()) beam_p_->damping_i_ = prop; - prop = get_property ("beamquantisaton"); + prop = get_property ("beamquantisation"); if (prop.isnum_b ()) - beam_p_->quantisation_ = (Beam::Quantise)(int)prop; + beam_p_->quantisation_ = (Beam::Quantisation)(int)prop; announce_element (Score_elem_info (beam_p_, span_reqs_drul_[LEFT])); } diff --git a/lily/beam-swallow-trans.cc b/lily/beam-swallow-trans.cc index cf23d55088..38418fc333 100644 --- a/lily/beam-swallow-trans.cc +++ b/lily/beam-swallow-trans.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/beam.cc b/lily/beam.cc index c3991ea3ca..fef050e58b 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -3,13 +3,20 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998, 1998 Han-Wen Nienhuys + Jan Nieuwenhuizen - TODO +*/ - Less hairy code. knee: ([\stem 1; c8 \stem -1; c8] -*/ +/* + [TODO] + * lowest beam of (UP) beam must never be lower than second staffline + * centre beam symbol + * less hairy code + * redo grouping + * (future) knee: ([\stem 1; c8 \stem -1; c8] + */ #include @@ -29,25 +36,15 @@ #include "lookup.hh" #include "grouping.hh" #include "stem-info.hh" -//#include "main.hh" // experimental features +#include "main.hh" // experimental features IMPLEMENT_IS_TYPE_B1 (Beam, Spanner); -// ugh, hardcoded -const Real MINIMUM_STEMLEN[] = { - 0, // just in case - 5, - 4, - 3, - 2, - 2, -}; - Beam::Beam () { slope_f_ = 0; - left_y_ = 0.0; + left_y_ = 0; damping_i_ = 1; quantisation_ = NORMAL; multiple_i_ = 0; @@ -70,7 +67,12 @@ Molecule* Beam::brew_molecule_p () const { Molecule *mol_p = new Molecule; - Real inter_f = paper ()->internote_f (); + + Real interline_f = paper ()->interline_f (); + Real internote_f = interline_f / 2; + Real staffline_f = paper ()->rule_thickness (); + Real beam_f = 0.48 * (interline_f - staffline_f); + Real x0 = stems_[0]->hpos_f (); for (int j=0; j hpos_f ()-x0; - sb.translate (Offset (x, (x * slope_f_ + left_y_)* inter_f)); + sb.translate (Offset (x, (x * slope_f_ + left_y_) * internote_f)); mol_p->add (sb); } - mol_p->translate_axis (x0 - spanned_drul_[LEFT]->absolute_coordinate (X_AXIS), X_AXIS); + mol_p->translate_axis (x0 + - spanned_drul_[LEFT]->absolute_coordinate (X_AXIS), X_AXIS); + return mol_p; } @@ -181,16 +185,22 @@ Beam::set_default_dir () } /* - should use minimum energy formulation (cf linespacing) -*/ + See Documentation/tex/fonts.doc + */ void Beam::solve_slope () { + /* + should use minimum energy formulation (cf linespacing) + */ + + assert (multiple_i_); Array sinfo; for (int j=0; j mult_i_ = multiple_i_; i->set_default_extents (); if (i->invisible_b ()) continue; @@ -208,12 +218,12 @@ Beam::solve_slope () else { - Real leftx = sinfo[0].x; + Real leftx = sinfo[0].x_; Least_squares l; for (int i=0; i < sinfo.size (); i++) { - sinfo[i].x -= leftx; - l.input.push (Offset (sinfo[i].x, sinfo[i].idealy_f_)); + sinfo[i].x_ -= leftx; + l.input.push (Offset (sinfo[i].x_, sinfo[i].idealy_f_)); } l.minimise (slope_f_, left_y_); @@ -222,7 +232,7 @@ Beam::solve_slope () Real dy = 0.0; for (int i=0; i < sinfo.size (); i++) { - Real y = sinfo[i].x * slope_f_ + left_y_; + Real y = sinfo[i].x_ * slope_f_ + left_y_; Real my = sinfo[i].miny_f_; if (my - y > dy) @@ -240,205 +250,197 @@ Beam::solve_slope () if (damping_i_) slope_f_ = 0.6 * tanh (slope_f_) / damping_i_; - quantise_yspan (); + quantise_dy (); - // y-values traditionally use internote dimension: therefore slope = (y/in)/x - // but mf and beam-lookup use PT dimension for y (as used for x-values) - // ugh --- there goes our simplified but careful quantisation Real sl = slope_f_ * paper ()->internote_f (); paper ()->lookup_l ()->beam (sl, 20 PT, 1 PT); slope_f_ = sl / paper ()->internote_f (); } void -Beam::quantise_yspan () +Beam::quantise_dy () { /* [Ross] (simplification of) Try to set slope_f_ complying with y-span of: - zero - - beam_thickness / 2 + staffline_thickness / 2 - - beam_thickness + staffline_thickness + - beam_f / 2 + staffline_f / 2 + - beam_f + staffline_f + n * interline */ - if (!quantisation_) + if (quantisation_ <= NONE) return; Real interline_f = paper ()->interline_f (); Real internote_f = interline_f / 2; - Real staffline_thickness = paper ()->rule_thickness (); - Real beam_thickness = 0.48 * (interline_f - staffline_thickness); - - const int QUANTS = 3; - Real qdy[QUANTS] = { - 0, - beam_thickness / 2 + staffline_thickness / 2, - beam_thickness + staffline_thickness - }; - - Real xspan_f = stems_.top ()->hpos_f () - stems_[0]->hpos_f (); - // y-values traditionally use internote dimension: therefore slope = (y/in)/x - Real yspan_f = xspan_f * abs (slope_f_ * internote_f); - int yspan_i = (int)(yspan_f / interline_f); - Real q = (yspan_f / interline_f - yspan_i) * interline_f; - int i = 0; - for (; i < QUANTS - 1; i++) - if ((q >= qdy[i]) && (q <= qdy[i + 1])) - { - if (q - qdy[i] < qdy[i + 1] - q) - break; - else - { - i++; - break; - } - } - q = qdy[i]; + Real staffline_f = paper ()->rule_thickness (); + Real beam_f = 0.48 * (interline_f - staffline_f); + + Real dx_f = stems_.top ()->hpos_f () - stems_[0]->hpos_f (); + + // dim(y) = internote; so slope = (y/internote)/x + Real dy_f = dx_f * abs (slope_f_ * internote_f); + + Real quanty_f = 0.0; + + /* UGR. ICE in 2.8.1; bugreport filed. */ + Array allowed_fraction (3); + allowed_fraction[0] = 0; + allowed_fraction[1] = (beam_f / 2 + staffline_f / 2); + allowed_fraction[2] = (beam_f + staffline_f); - yspan_f = (Real)yspan_i * interline_f + q; - // y-values traditionally use internote dimension: therefore slope = (y/in)/x - slope_f_ = yspan_f / xspan_f / internote_f * sign (slope_f_); + + Interval iv = quantise_iv (allowed_fraction, interline_f, dy_f); + quanty_f = (dy_f - iv.min () <= iv.max () - dy_f) + ? iv.min () + : iv.max (); + + + slope_f_ = (quanty_f / dx_f) / internote_f * sign (slope_f_); } +static int test_pos = 0; + + +/* + + Prevent interference from stafflines and beams. See Documentation/tex/fonts.doc + + */ void -Beam::quantise_left_y (Beam::Pos pos, bool extend_b) +Beam::quantise_left_y (bool extend_b) { - /* - quantising left y should suffice, as slope is quantised too - if extend then stems must not get shorter + /* + we only need to quantise the start of the beam as dy is quantised too + if extend_b then stems must *not* get shorter */ - if (!quantisation_) + if (quantisation_ <= NONE) return; + /* + ---------------------------------------------------------- + ######## + ######## + ######## + --------------########------------------------------------ + ######## + + hang straddle sit inter hang + */ + + Real interbeam_f = paper ()->interbeam_f (); Real interline_f = paper ()->interline_f (); Real internote_f = interline_f / 2; - Real staffline_thickness = paper ()->rule_thickness (); - Real beam_thickness = 0.48 * (interline_f - staffline_thickness); + Real staffline_f = paper ()->rule_thickness (); + Real beam_f = 0.48 * (interline_f - staffline_f); + Real symbol_f = beam_f + interbeam_f * (multiple_i_ - 1); - const int QUANTS = 7; - Real qy[QUANTS] = - { - 0, - beam_thickness / 2, - beam_thickness, - interline_f / 2 + beam_thickness / 2 + staffline_thickness / 2, - interline_f, - interline_f + beam_thickness / 2, - interline_f + beam_thickness - }; - /* - ugh, using i triggers gcc 2.7.2.1 internal compiler error (far down): - for (int i = 0; i < QUANTS; i++) + Real straddle = 0; + Real sit = beam_f / 2 - staffline_f / 2; + Real inter = interline_f / 2; + Real hang = interline_f - beam_f / 2 + staffline_f / 2; + + /* + Put all allowed positions into an array. + Whether a position is allowed or not depends on + strictness of quantisation, multiplicity and direction. + + For simplicity, we'll assume dir = UP and correct if + dir = DOWN afterwards. */ - - // fixme! - for (int ii = 0; ii < QUANTS; ii++) - qy[ii] -= 0.5 *beam_thickness; - Pos qpos[QUANTS] = - { - HANG, - STRADDLE, - SIT, - INTER, - HANG, - STRADDLE, - SIT - }; - - // y-values traditionally use internote dimension - Real y = left_y_ * internote_f; - int y_i = (int)floor(y / interline_f); - y = (y / interline_f - y_i) * interline_f; - - if (y < 0) - for (int ii = 0; ii < QUANTS; ii++) - qy[ii] -= interline_f; - - int lower_i = 0; - int i = 0; - for (; i < QUANTS; i++) + + // dim(left_y_) = internote + Real dy_f = dir_ * left_y_ * internote_f; + + Array allowed_position; + if (quantisation_ != TEST) { - if (qy[i] > y) - break; - // found if lower_i is allowed, and nearer (from below) y than new pos - if ((pos & qpos[lower_i]) && (y - qy[lower_i] < y - qy[i])) - break; - // if new pos is allowed or old pos isn't: assign new pos - if ((pos & qpos[i]) || !(pos & qpos[lower_i])) - lower_i = i; + if (quantisation_ <= NORMAL) + { + if ((multiple_i_ <= 2) || (abs (dy_f) >= staffline_f / 2)) + allowed_position.push (straddle); + if ((multiple_i_ <= 1) || (abs (dy_f) >= staffline_f / 2)) + allowed_position.push (sit); + allowed_position.push (hang); + } + else + // TODO: check and fix TRADITIONAL + { + if ((multiple_i_ <= 2) || (abs (dy_f) >= staffline_f / 2)) + allowed_position.push (straddle); + if ((multiple_i_ <= 1) && (dy_f <= staffline_f / 2)) + allowed_position.push (sit); + if (dy_f >= -staffline_f / 2) + allowed_position.push (hang); + } } - - int upper_i = QUANTS - 1; - for (i = QUANTS - 1; i >= 0; i--) + else { - if (qy[i] < y) - break; - // found if upper_i is allowed, and nearer (from above) y than new pos - if ((pos & qpos[upper_i]) && (qy[upper_i] - y < qy[i] - y)) - break; - // if new pos is allowed or old pos isn't: assign new pos - if ((pos & qpos[i]) || !(pos & qpos[upper_i])) - upper_i = i; + if (test_pos == 0) + { + allowed_position.push (hang); + cout << "hang" << hang << endl; + } + else if (test_pos==1) + { + allowed_position.push (straddle); + cout << "straddle" << straddle << endl; + } + else if (test_pos==2) + { + allowed_position.push (sit); + cout << "sit" << sit << endl; + } + else if (test_pos==3) + { + allowed_position.push (inter); + cout << "inter" << inter << endl; + } } - // y-values traditionally use internote dimension - Real upper_y = (qy[upper_i] + interline_f * y_i) / internote_f; - Real lower_y = (qy[lower_i] + interline_f * y_i) / internote_f; +#if 0 + // this currently never happens + Real q = (dy_f / interline_f - dy_i) * interline_f; + if ((quantisation_ < NORMAL) && (q < interline_f / 3 - beam_f / 2)) + allowed_position.push (inter); +#endif + Interval iv = quantise_iv (allowed_position, interline_f, dy_f); + + Real quanty_f = dy_f - iv.min () <= iv.max () - dy_f ? iv.min () : iv.max (); if (extend_b) - left_y_ = (dir_ > 0 ? upper_y : lower_y); - else - left_y_ = (upper_y - y < y - lower_y ? upper_y : lower_y); + quanty_f = iv.max (); + + // dim(left_y_) = internote + left_y_ = dir_ * quanty_f / internote_f; } void Beam::set_stemlens () { - Real x0 = stems_[0]->hpos_f (); - Real dy = 0; - + Real interbeam_f = paper ()->interbeam_f (); Real interline_f = paper ()->interline_f (); Real internote_f = interline_f / 2; - Real staffline_thickness = paper ()->rule_thickness (); - Real beam_thickness = 0.48 * (interline_f - staffline_thickness); - Real interbeam_f = paper ()->interbeam_f (); - if (multiple_i_ > 3) - interbeam_f += 2.0 * staffline_thickness / 4; - Real xspan_f = stems_.top ()->hpos_f () - stems_[0]->hpos_f (); - /* - ugh, y values are in "internote" dimension - */ - Real yspan_f = xspan_f * abs (slope_f_ * internote_f); - int yspan_i = (int)(yspan_f / interline_f); - - Pos left_pos = NONE; + Real staffline_f = paper ()->rule_thickness (); + Real beam_f = 0.48 * (interline_f - staffline_f); - if ((yspan_f < staffline_thickness / 2) || (quantisation_ == NORMAL)) - left_pos = (Pos)(STRADDLE | SIT | HANG); - else - left_pos = (Pos) (sign (slope_f_) > 0 ? STRADDLE | HANG - : SIT | STRADDLE); - - /* - ugh, slope currently mangled by availability mf chars... - be more generous regarding beam position between stafflines + /* + if we have more than three beams they must open-up + in order to not collide with staff lines */ - Real q = (yspan_f / interline_f - yspan_i) * interline_f; - if ((quantisation_ < NORMAL) && (q < interline_f / 3 - beam_thickness / 2)) - left_pos = (Pos) (left_pos | INTER); - - - if (multiple_i_ > 1) - left_pos = (Pos) (dir_ > 0 ? HANG : SIT); + if (multiple_i_ > 3) + interbeam_f += 2.0 * staffline_f / 4; + Real x0 = stems_[0]->hpos_f (); + Real dy = 0; // ugh, rounding problems! (enge floots) - const Real EPSILON = interline_f / 10; + Real epsilon = staffline_f / 8; do { left_y_ += dy * dir_; - quantise_left_y (left_pos, dy); + quantise_left_y (dy); dy = 0; for (int i=0; i < stems_.size (); i++) { @@ -448,19 +450,29 @@ Beam::set_stemlens () Real x = s->hpos_f () - x0; s->set_stemend (left_y_ + slope_f_ * x); - Real y = s->stem_length_f (); - // duh: -// int mult_i = stems_[i]->beams_left_i_ >? stems_[i]->beams_right_i_; - int mult_i = multiple_i_; - if (mult_i > 1) - // dim(y) = internote - y -= (Real)(mult_i - 1) * interbeam_f / internote_f; - if (y < MINIMUM_STEMLEN[mult_i]) - dy = dy >? (MINIMUM_STEMLEN[mult_i] - y); + Real y = s->stem_end_f () * dir_; + Stem_info info (s); + if (y < info.miny_f_) + dy = dy >? info.miny_f_ - y; } - } while (abs (dy) > EPSILON); + } while (abs (dy) > epsilon); + + // ugh asymmetric symbol ? + if (dir_ == UP) + left_y_ -= dir_ * staffline_f / 4; + + if ((multiple_i_ >= 3) && (dir_ == UP)) + left_y_ -= dir_ * staffline_f / 4; + + test_pos++; + test_pos %= 4; } +/* + FIXME + ugh. this is broken and should be rewritten. + - [c8. c32 c32] + */ void Beam::set_grouping (Rhythmic_grouping def, Rhythmic_grouping cur) { @@ -506,15 +518,16 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const assert (!next || next->hpos_f () > here->hpos_f ()); assert (!prev || prev->hpos_f () < here->hpos_f ()); - Real staffline_thickness = paper ()->rule_thickness (); + Real staffline_f = paper ()->rule_thickness (); Real interbeam_f = paper ()->interbeam_f (); Real internote_f =paper ()->internote_f (); Real interline_f = 2 * internote_f; - Real beamheight_f = 0.48 * (interline_f - staffline_thickness); + Real beamheight_f = 0.48 * (interline_f - staffline_f); + if (multiple_i_ > 3) - interbeam_f += 2.0 * staffline_thickness / 4; + interbeam_f += 2.0 * staffline_f / 4; Real dy = interbeam_f; - Real stemdx = staffline_thickness; + Real stemdx = staffline_f; Real sl = slope_f_* internote_f; paper ()->lookup_l ()->beam (sl, 20 PT, 1 PT); @@ -591,3 +604,4 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const */ return leftbeams; } + diff --git a/lily/bezier.cc b/lily/bezier.cc index 5fea339288..2267e2d42c 100644 --- a/lily/bezier.cc +++ b/lily/bezier.cc @@ -8,6 +8,7 @@ #include #include "bezier.hh" +#include "misc.hh" #ifndef STANDALONE #include "direction.hh" @@ -94,21 +95,20 @@ Bezier::set (Array points) Real Bezier::y (Real x) { - for (int i = 1; i < curve_.size (); i++ ) - { - if (x < curve_[i].x () || (i == curve_.size () - 1)) - { - Offset z1 = curve_[i-1]; - Offset z2 = curve_[i]; - Real multiplier = (x - z2.x ()) / (z1.x () - z2.x ()); - Real y = z1.y () * multiplier + (1.0 - multiplier) *z2.y(); - - return y; - } - } - assert (false); - // silly c++ - return 0; + // ugh + // bounds func should be templatised to take array of offsets too? + Array positions; + for (int i = 0; i < curve_.size (); i++) + positions.push (curve_[i].x ()); + + Slice slice = get_bounds_slice (positions, x); + // ugh + Offset z1 = curve_[0 >? slice.max () - 1]; + Offset z2 = curve_[1 >? slice.max ()]; + Real multiplier = (x - z2.x ()) / (z1.x () - z2.x ()); + Real y = z1.y () * multiplier + (1.0 - multiplier) * z2.y(); + + return y; } @@ -139,10 +139,13 @@ Bezier_bow::blow_fit () return; #ifndef STANDALONE - Real epsilon = paper_l_->rule_thickness (); + Real internote_f = paper_l_->internote_f (); #else - Real epsilon = 1.5 * 0.4 PT; + Real internote_f = STAFFHEIGHT / 8; #endif + + //urg + Real epsilon = internote_f / 2; if (abs (dy2 - dy1) < epsilon) return; @@ -223,7 +226,9 @@ Bezier_bow::calc () 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 ( <= 1.5 staffheight?) + + * 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 @@ -249,28 +254,28 @@ Bezier_bow::calc_clipping () Real staffsize_f = STAFFHEIGHT; #endif - Real clip_h = staffsize_f; + Real b = control_[3].x () - control_[0].x (); + Real clip_h = 1.2 * b ? begin_h - clip_h; + Real end_dy = 0 >? end_h - clip_h; Real pi = M_PI; Real begin_alpha = (control_[1] - control_[0]).arg () + alpha_; Real end_alpha = pi - (control_[2] - control_[3]).arg () - alpha_; - Real max_alpha = 1.1 * pi/2; + Real max_alpha = (100.0 / 90) * pi/2; if ((begin_dy < 0) && (end_dy < 0) && (begin_alpha < max_alpha) && (end_alpha < max_alpha)) return false; encompass_.rotate (alpha_); - // ugh origin_.y () *= dir_; encompass_.translate (origin_); bool again = true; - //ugh + if ((begin_dy > 0) || (end_dy > 0)) { Real dy = (begin_dy + end_dy) / 4; @@ -281,33 +286,21 @@ Bezier_bow::calc_clipping () else { //ugh - Real c = -0.4; + Real c = 0.4; if (begin_alpha >= max_alpha) - begin_dy = c * begin_alpha / max_alpha * begin_h; + begin_dy = 0 >? c * begin_alpha / max_alpha * begin_h; if (end_alpha >= max_alpha) - end_dy = c * end_alpha / max_alpha * end_h; + end_dy = 0 >? c * end_alpha / max_alpha * end_h; - Real dy = end_dy >? begin_dy; + encompass_[0].y () += begin_dy; + encompass_[encompass_.size () - 1].y () += end_dy; - if (!experimental_features_global_b) - { - encompass_[0].y () += dy; - encompass_[encompass_.size () - 1].y () += dy; - } - else - { - encompass_[0].y () += begin_dy; - encompass_[encompass_.size () - 1].y () += end_dy; - - Offset delta = encompass_[encompass_.size () - 1] - encompass_[0]; - alpha_ = delta.arg (); - alpha_ *= dir_; - } + Offset delta = encompass_[encompass_.size () - 1] - encompass_[0]; + alpha_ = delta.arg (); } origin_ = encompass_[0]; encompass_.translate (-origin_); - // ugh origin_.y () *= dir_; encompass_.rotate (-alpha_); @@ -317,7 +310,6 @@ Bezier_bow::calc_clipping () void Bezier_bow::calc_controls () { - // try clipping twice for (int i = 0; i < 3; i++) { if (i && !calc_clipping ()) @@ -458,8 +450,10 @@ bool Bezier_bow::check_fit_bo () { for (int i = 1; i < encompass_.size () - 1; i++) - if (encompass_[i].y () > y (encompass_[i].x ())) - return false; + if ((encompass_[i].x () > encompass_[0].x ()) + && (encompass_[i].x () < encompass_[encompass_.size () -1].x ())) + if (encompass_[i].y () > y (encompass_[i].x ())) + return false; return true; } @@ -468,7 +462,9 @@ Bezier_bow::check_fit_f () { Real dy = 0; for (int i = 1; i < encompass_.size () - 1; i++) - dy = dy >? (encompass_[i].y () - y (encompass_[i].x ())); + if ((encompass_[i].x () > encompass_[0].x ()) + && (encompass_[i].x () < encompass_[encompass_.size () -1].x ())) + dy = dy >? (encompass_[i].y () - y (encompass_[i].x ())); return dy; } diff --git a/lily/bow.cc b/lily/bow.cc index 48477b9837..770fd8a973 100644 --- a/lily/bow.cc +++ b/lily/bow.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys Jan Nieuwenhuizen */ @@ -87,26 +87,19 @@ Bow::get_controls () const Array Bow::get_encompass_offset_arr () const { - Real dx = width (). length (); - dx += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]); - Real left_x = 0; - Real interline = paper ()->interline_f (); - if (dx < 2.0 * interline) - { - left_x = - 3.0 * interline; - dx = 2.0 * interline; - } - Real dy = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]; + Offset d (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT], + dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]); + d.x() += width (). length (); #define RESIZE_ICE #ifndef RESIZE_ICE Array notes; - notes.push (Offset (left_x, 0)); - notes.push (Offset (left_x + dx, dy)); + notes.push (Offset 0, 0)); + notes.push (d); #else Array notes (2); - notes[0] = Offset (left_x, 0); - notes[1] = Offset (left_x + dx, dy); + notes[0] = Offset (0, 0); + notes[1] = Offset (d); #endif return notes; diff --git a/lily/boxes.cc b/lily/boxes.cc index 1529c70749..0e9befcad2 100644 --- a/lily/boxes.cc +++ b/lily/boxes.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include "boxes.hh" diff --git a/lily/break-align-item.cc b/lily/break-align-item.cc index b2ffbaee60..b95f5fd41e 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "break-align-item.hh" diff --git a/lily/break.cc b/lily/break.cc index 2b29b433f5..f25ac5e32f 100644 --- a/lily/break.cc +++ b/lily/break.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include "score-column.hh" diff --git a/lily/change-iterator.cc b/lily/change-iterator.cc index 883e963e9f..681ac2ae0f 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "change-iterator.hh" diff --git a/lily/change-translator.cc b/lily/change-translator.cc index be406c792d..54bbed8e81 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "change-translator.hh" diff --git a/lily/chord-iterator.cc b/lily/chord-iterator.cc index a21a7862cc..2d37445ae4 100644 --- a/lily/chord-iterator.cc +++ b/lily/chord-iterator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "translator-group.hh" diff --git a/lily/clef-grav.cc b/lily/clef-grav.cc index 5812e7fc5d..d7ce0c4df0 100644 --- a/lily/clef-grav.cc +++ b/lily/clef-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys , + (c) 1997--1998 Han-Wen Nienhuys , Mats Bengtsson */ diff --git a/lily/clef-item.cc b/lily/clef-item.cc index 0d1a185923..eda65592b9 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include diff --git a/lily/col-info.cc b/lily/col-info.cc index 769bc5ed72..85287257b0 100644 --- a/lily/col-info.cc +++ b/lily/col-info.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "p-col.hh" diff --git a/lily/colhpos.cc b/lily/colhpos.cc index a220298777..1e90ffeb37 100644 --- a/lily/colhpos.cc +++ b/lily/colhpos.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "colhpos.hh" diff --git a/lily/collision-grav.cc b/lily/collision-grav.cc index f1b7112390..6a6dcef13c 100644 --- a/lily/collision-grav.cc +++ b/lily/collision-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "note-column.hh" diff --git a/lily/collision.cc b/lily/collision.cc index 17c57cf338..2da1e0ddae 100644 --- a/lily/collision.cc +++ b/lily/collision.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "debug.hh" #include "collision.hh" diff --git a/lily/command-request.cc b/lily/command-request.cc index a0b6227cec..6742e6bee7 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "command-request.hh" diff --git a/lily/crescendo.cc b/lily/crescendo.cc index 400b6709a0..0dee71825b 100644 --- a/lily/crescendo.cc +++ b/lily/crescendo.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "molecule.hh" diff --git a/lily/dot-column.cc b/lily/dot-column.cc index 58a16c1ce5..4c44095826 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "dots.hh" diff --git a/lily/dots.cc b/lily/dots.cc index 041e80a8cb..20cf87a515 100644 --- a/lily/dots.cc +++ b/lily/dots.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "dots.hh" diff --git a/lily/dynamic-grav.cc b/lily/dynamic-grav.cc index 44580b64ba..9a0913c129 100644 --- a/lily/dynamic-grav.cc +++ b/lily/dynamic-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "debug.hh" #include "crescendo.hh" diff --git a/lily/encompass-info.cc b/lily/encompass-info.cc new file mode 100644 index 0000000000..193ef482b5 --- /dev/null +++ b/lily/encompass-info.cc @@ -0,0 +1,65 @@ +/* + encompass-info.cc -- implement Encompass_info + + source file of the GNU LilyPond music typesetter + + (c) 1998 Jan Nieuwenhuizen + +*/ + +#include "proto.hh" +#include "stem.hh" +#include "note-column.hh" +#include "paper-def.hh" +#include "encompass-info.hh" + +Encompass_info::Encompass_info () +{ + assert (0); +} + +Encompass_info::Encompass_info (Note_column const* note, Direction dir) +{ + Paper_def* paper = note->paper (); + Real interline = paper->interline_f (); + Real notewidth = paper->note_width (); + Real internote = interline / 2; + + Stem* stem = note->stem_l_; + /* + set o_.x () to middle of notehead or on eo_.x ()act o_.x () position of stem, + according to slur direction + */ + o_.x () = stem->hpos_f (); + + if (stem->dir_ != dir) + { + o_.x () += 0.5 * notewidth; + // ugh + if (dir == DOWN) + o_.x () -= 0.5 * notewidth; + else + o_.x () += 0.5 * notewidth; + } + else if (stem->dir_ == UP) + o_.x () += 1.0 * notewidth; + +// o_.x () -= left_o_.x (); + + o_.y () = stem->height ()[dir]; + + /* + leave a gap: slur mustn't touch head/stem + */ + if (stem->dir_ != dir) + o_.y () += 3.0 * internote * dir; + else + o_.y () += 2.0 * internote * dir; + + // ugh + if (dir == DOWN) + o_.y () += 1.5 * internote * dir; + +// o_.y () -= left_o_.y (); +} + diff --git a/lily/engraver-group.cc b/lily/engraver-group.cc index 29ce749fab..bd6873d0d2 100644 --- a/lily/engraver-group.cc +++ b/lily/engraver-group.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "proto.hh" diff --git a/lily/engraver.cc b/lily/engraver.cc index 2786941a92..2ccf335069 100644 --- a/lily/engraver.cc +++ b/lily/engraver.cc @@ -3,7 +3,7 @@ Sourcefile of GNU LilyPond musictypesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "music-list.hh" diff --git a/lily/file-results.cc b/lily/file-results.cc new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/lily/file-results.cc @@ -0,0 +1 @@ + diff --git a/lily/general-script-def.cc b/lily/general-script-def.cc index e434e35609..9d7b657880 100644 --- a/lily/general-script-def.cc +++ b/lily/general-script-def.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/global-translator.cc b/lily/global-translator.cc index 33ff9f81a1..3620c52d69 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "global-translator.hh" diff --git a/lily/gourlay-breaking.cc b/lily/gourlay-breaking.cc index 05c2a722b3..58e08b959c 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "gourlay-breaking.hh" diff --git a/lily/graphical-element.cc b/lily/graphical-element.cc index 79c298928b..f9273f0ee3 100644 --- a/lily/graphical-element.cc +++ b/lily/graphical-element.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "graphical-element.hh" diff --git a/lily/grouping.cc b/lily/grouping.cc index dfc59748e8..2bdaed7db1 100644 --- a/lily/grouping.cc +++ b/lily/grouping.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "debug.hh" diff --git a/lily/head-grav.cc b/lily/head-grav.cc index 61256ed63a..104b5678de 100644 --- a/lily/head-grav.cc +++ b/lily/head-grav.cc @@ -1,7 +1,7 @@ /* head-grav.cc -- part of GNU LilyPond - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "note-head.hh" diff --git a/lily/header.cc b/lily/header.cc index fb1e02205b..39dffd5dbf 100644 --- a/lily/header.cc +++ b/lily/header.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "string.hh" diff --git a/lily/horizontal-align-item.cc b/lily/horizontal-align-item.cc index e5fe2e8d56..82a81c2300 100644 --- a/lily/horizontal-align-item.cc +++ b/lily/horizontal-align-item.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "horizontal-align-item.hh" diff --git a/lily/horizontal-group-item.cc b/lily/horizontal-group-item.cc index 6b3afaf3da..a894ba5214 100644 --- a/lily/horizontal-group-item.cc +++ b/lily/horizontal-group-item.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "p-col.hh" diff --git a/lily/horizontal-vertical-group-item.cc b/lily/horizontal-vertical-group-item.cc index 2b70f21c62..dd40fb8182 100644 --- a/lily/horizontal-vertical-group-item.cc +++ b/lily/horizontal-vertical-group-item.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/idealspacing.cc b/lily/idealspacing.cc index 7497d3b66a..64c1866fd8 100644 --- a/lily/idealspacing.cc +++ b/lily/idealspacing.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include "idealspacing.hh" diff --git a/lily/identifier.cc b/lily/identifier.cc index 107bd2417d..82156417d1 100644 --- a/lily/identifier.cc +++ b/lily/identifier.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include @@ -24,9 +24,8 @@ IMPLEMENT_IS_TYPE_B(Identifier); Identifier::~Identifier() { - if (!accessed_b_ && !init_b_) - warning (_("Variable not used")); } + void Identifier::error (String expect) { diff --git a/lily/includable-lexer.cc b/lily/includable-lexer.cc index 3728476203..2d3b45597d 100644 --- a/lily/includable-lexer.cc +++ b/lily/includable-lexer.cc @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "includable-lexer.hh" #include "source-file.hh" @@ -30,7 +30,7 @@ Includable_lexer::new_input (String s, Sources * global_sources) LexerError (msg.ch_C ()); return; } - + filename_str_arr_.push (sl->name_str ()); char_count_stack_.push (0); if (yy_current_buffer) @@ -46,6 +46,7 @@ Includable_lexer::new_input (String s, Sources * global_sources) */ yy_switch_to_buffer (yy_create_buffer (sl->istream_l (), YY_BUF_SIZE)); + } /** pop the inputstack. conceptually this is a destructor, but it diff --git a/lily/include/abbrev.hh b/lily/include/abbrev.hh index 9428be7dc2..ace2cffa53 100644 --- a/lily/include/abbrev.hh +++ b/lily/include/abbrev.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/abbreviation-beam-engraver.hh b/lily/include/abbreviation-beam-engraver.hh index 3a9afc14dc..df3244e4dd 100644 --- a/lily/include/abbreviation-beam-engraver.hh +++ b/lily/include/abbreviation-beam-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/include/abbreviation-beam.hh b/lily/include/abbreviation-beam.hh index 9a29de18af..f6eb933e70 100644 --- a/lily/include/abbreviation-beam.hh +++ b/lily/include/abbreviation-beam.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/include/atom.hh b/lily/include/atom.hh index 4b76e4018c..b145383d7d 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef ATOM_HH diff --git a/lily/include/audio-column.hh b/lily/include/audio-column.hh index 273675f611..6065e43a68 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 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #ifndef AUDIO_COLUMN_HH diff --git a/lily/include/audio-element.hh b/lily/include/audio-element.hh index c870887c6f..6fe2a8e068 100644 --- a/lily/include/audio-element.hh +++ b/lily/include/audio-element.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/audio-item.hh b/lily/include/audio-item.hh index 3e3c00c4fb..3edfa01e48 100644 --- a/lily/include/audio-item.hh +++ b/lily/include/audio-item.hh @@ -1,7 +1,7 @@ /* audio-item.hh -- declare Audio_items - (c) 1996, 1997 Jan Nieuwenhuizen + (c) 1996, 1997--1998 Jan Nieuwenhuizen */ #ifndef AUDIO_ITEM_HH diff --git a/lily/include/audio-staff.hh b/lily/include/audio-staff.hh index 430c5f2c8a..12f3d9c1e8 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 Jan Nieuwenhuizen + (c) 1996, 1997--1998 Jan Nieuwenhuizen */ #ifndef AUDIO_STAFF_HH diff --git a/lily/include/axis-group-administration.hh b/lily/include/axis-group-administration.hh index d7e33e4c7e..7933590884 100644 --- a/lily/include/axis-group-administration.hh +++ b/lily/include/axis-group-administration.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/axis-group-element.hh b/lily/include/axis-group-element.hh index b79b70084e..f3bfb3f702 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/axis-group-item.hh b/lily/include/axis-group-item.hh index 1059bdaeed..c61a081020 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/axis-group-spanner.hh b/lily/include/axis-group-spanner.hh index 15b132d366..64c2df98b2 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/bar-align-grav.hh b/lily/include/bar-align-grav.hh index 7da9dfaf3d..a6579db197 100644 --- a/lily/include/bar-align-grav.hh +++ b/lily/include/bar-align-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/bar-column-grav.hh b/lily/include/bar-column-grav.hh index c05b2a5414..9e058984f5 100644 --- a/lily/include/bar-column-grav.hh +++ b/lily/include/bar-column-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/bar-column.hh b/lily/include/bar-column.hh index 43fac9672d..84c32113ea 100644 --- a/lily/include/bar-column.hh +++ b/lily/include/bar-column.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/bar-grav.hh b/lily/include/bar-grav.hh index d62fb3ecea..7677f5279d 100644 --- a/lily/include/bar-grav.hh +++ b/lily/include/bar-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/bar-number-grav.hh b/lily/include/bar-number-grav.hh index 5db9c041a2..b57a8040a8 100644 --- a/lily/include/bar-number-grav.hh +++ b/lily/include/bar-number-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/beam-grav.hh b/lily/include/beam-grav.hh index 81b68adfc1..cbfe1bb7d5 100644 --- a/lily/include/beam-grav.hh +++ b/lily/include/beam-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/beam-swallow-trans.hh b/lily/include/beam-swallow-trans.hh index 7291fd0157..760704fc50 100644 --- a/lily/include/beam-swallow-trans.hh +++ b/lily/include/beam-swallow-trans.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/beam.hh b/lily/include/beam.hh index 3729be625c..5294d719d0 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -16,13 +16,11 @@ beam and that point in the correct direction */ class Beam: public Directional_spanner { public: - /** The beams (especially at small slopes) should be prevented to - conflict with the stafflines. This necessitates some quantisation - of start and end posititons of the beam. + /** + The beams should be prevented to conflict with the stafflines, + especially at small slopes. */ - enum Pos { NONE, SIT = 1, STRADDLE = 2, HANG = 4, INTER = 8 }; - // ugh, silly C++ (Pos::NONE vs Quantise::NONE) - enum Quantise { NUNE, NORMAL, TRADITIONAL }; + enum Quantisation { NONE, NORMAL, TRADITIONAL, TEST }; Link_array stems_; /// the slope of the beam in posns / point (dimension) @@ -33,7 +31,7 @@ public: /// should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams int damping_i_; /// should beam pos / slope be quantised? 0: no, 1: yes, 2: traditional - Quantise quantisation_; + Quantisation quantisation_; /// maximum number of beams (for opening-up of beam-spacing) int multiple_i_; @@ -56,10 +54,10 @@ protected: virtual void do_print() const; - virtual void quantise_left_y (Beam::Pos pos, bool extend_b); + virtual void quantise_left_y (bool extend_b); virtual Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const; virtual void solve_slope (); - virtual void quantise_yspan (); + virtual void quantise_dy (); virtual Molecule*brew_molecule_p () const; }; diff --git a/lily/include/bow.hh b/lily/include/bow.hh index ffa9db31a4..4dbf2ead70 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/break-align-item.hh b/lily/include/break-align-item.hh index 6ef6818b3d..9d800f8ca6 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/break-caching.hh b/lily/include/break-caching.hh index 676be223df..188360d013 100644 --- a/lily/include/break-caching.hh +++ b/lily/include/break-caching.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/break.hh b/lily/include/break.hh index c6c9058e51..4499686f10 100644 --- a/lily/include/break.hh +++ b/lily/include/break.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/change-iterator.hh b/lily/include/change-iterator.hh index 69bd360a7b..e4adf804e1 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/change-translator.hh b/lily/include/change-translator.hh index ade016e1d5..8c759717ed 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/chord-iterator.hh b/lily/include/chord-iterator.hh index a3adc4a381..0a3c9fa64a 100644 --- a/lily/include/chord-iterator.hh +++ b/lily/include/chord-iterator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/clef-grav.hh b/lily/include/clef-grav.hh index ffd499920a..61318648ed 100644 --- a/lily/include/clef-grav.hh +++ b/lily/include/clef-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/col-info.hh b/lily/include/col-info.hh index 8e64f68d46..49694352d0 100644 --- a/lily/include/col-info.hh +++ b/lily/include/col-info.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/colhpos.hh b/lily/include/colhpos.hh index 3c42dd98cb..01a87167ba 100644 --- a/lily/include/colhpos.hh +++ b/lily/include/colhpos.hh @@ -1,7 +1,7 @@ /* colhpos.hh -- part of GNU LilyPond - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef COLHPOS_HH diff --git a/lily/include/collision-grav.hh b/lily/include/collision-grav.hh index 996165c3a3..6cf18d7dbc 100644 --- a/lily/include/collision-grav.hh +++ b/lily/include/collision-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/collision.hh b/lily/include/collision.hh index 08b0706572..9d47efb513 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/command-request.hh b/lily/include/command-request.hh index 11491edc41..9a12dc8e19 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/crescendo.hh b/lily/include/crescendo.hh index 6c8a9df805..0b62f65810 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/direction.hh b/lily/include/direction.hh index 358c482517..416b3fc33f 100644 --- a/lily/include/direction.hh +++ b/lily/include/direction.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/dot-column-grav.hh b/lily/include/dot-column-grav.hh index 38db1b569a..e2e3b660fd 100644 --- a/lily/include/dot-column-grav.hh +++ b/lily/include/dot-column-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/dot-column.hh b/lily/include/dot-column.hh index 01e3e3d3e5..9d8d5e552a 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/dots.hh b/lily/include/dots.hh index 5463934a21..846cf0364f 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/drul-array.hh b/lily/include/drul-array.hh index 962fd2b6c2..9169a57828 100644 --- a/lily/include/drul-array.hh +++ b/lily/include/drul-array.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/dynamic-grav.hh b/lily/include/dynamic-grav.hh index a44e3cc801..29d3e2fa73 100644 --- a/lily/include/dynamic-grav.hh +++ b/lily/include/dynamic-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/elem-group.hh b/lily/include/elem-group.hh index 59bb03cdf0..6ad1d1d243 100644 --- a/lily/include/elem-group.hh +++ b/lily/include/elem-group.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/encompass-info.hh b/lily/include/encompass-info.hh new file mode 100644 index 0000000000..6180ba3677 --- /dev/null +++ b/lily/include/encompass-info.hh @@ -0,0 +1,25 @@ +/* + encompass-info.hh -- declare Encompass_info + + source file of the GNU LilyPond music typesetter + + (c) 1998 Jan Nieuwenhuizen + +*/ + +#ifndef ENCOMPASS_INFO_HH +#define ENCOMPASS_INFO_HH + +#include "lily-proto.hh" +#include "direction.hh" +#include "offset.hh" + +struct Encompass_info +{ + Encompass_info (); + Encompass_info (Note_column const*, Direction); + + Offset o_; +}; + +#endif // ENCOMPASS_INFO_HH diff --git a/lily/include/engraver-group.hh b/lily/include/engraver-group.hh index 72f14f3c3c..125021cdf6 100644 --- a/lily/include/engraver-group.hh +++ b/lily/include/engraver-group.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/engraver.hh b/lily/include/engraver.hh index 9814b24fbe..f6b4f6bafa 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 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/file-results.hh b/lily/include/file-results.hh new file mode 100644 index 0000000000..3d6df5e9d6 --- /dev/null +++ b/lily/include/file-results.hh @@ -0,0 +1,24 @@ +/* + file-results.hh -- declare + + source file of the GNU LilyPond music typesetter + + (c) 1998 Han-Wen Nienhuys + + */ + +#ifndef FILE_RESULTS_HH +#define FILE_RESULTS_HH +#include "fproto.hh" + +void do_one_file (String init_str, String file_str); + +extern Array target_str_global_array; +extern Array inclusion_global_array; +extern Link_array score_global_array; +void do_scores (); +void clear_scores (); + + +#endif /* FILE_RESULTS_HH */ + diff --git a/lily/include/general-script-def.hh b/lily/include/general-script-def.hh index 4faf568ae9..024468e343 100644 --- a/lily/include/general-script-def.hh +++ b/lily/include/general-script-def.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/global-translator.hh b/lily/include/global-translator.hh index dbcc8a5254..dddfacb0b2 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/gourlay-breaking.hh b/lily/include/gourlay-breaking.hh index d8c3472a14..f01df23848 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/graphical-element.hh b/lily/include/graphical-element.hh index aff7de6793..6dce57708b 100644 --- a/lily/include/graphical-element.hh +++ b/lily/include/graphical-element.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/head-grav.hh b/lily/include/head-grav.hh index 66411a4ea8..8841f4e7e8 100644 --- a/lily/include/head-grav.hh +++ b/lily/include/head-grav.hh @@ -1,7 +1,7 @@ /* head-grav.hh -- part of GNU LilyPond - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/header.hh b/lily/include/header.hh index e74aadc236..4877f396f6 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/horizontal-align-item.hh b/lily/include/horizontal-align-item.hh index 7ae19db88b..da0794d760 100644 --- a/lily/include/horizontal-align-item.hh +++ b/lily/include/horizontal-align-item.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/horizontal-group-elem.hh b/lily/include/horizontal-group-elem.hh index 8d3adfb48a..db851583cc 100644 --- a/lily/include/horizontal-group-elem.hh +++ b/lily/include/horizontal-group-elem.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/horizontal-group-item.hh b/lily/include/horizontal-group-item.hh index 568c257c64..d94e0df1a4 100644 --- a/lily/include/horizontal-group-item.hh +++ b/lily/include/horizontal-group-item.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/horizontal-vertical-group-elem.hh b/lily/include/horizontal-vertical-group-elem.hh index 9080872395..ed4c3a7713 100644 --- a/lily/include/horizontal-vertical-group-elem.hh +++ b/lily/include/horizontal-vertical-group-elem.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/horizontal-vertical-group-item.hh b/lily/include/horizontal-vertical-group-item.hh index 1aa8c8b82c..50e1e9ef56 100644 --- a/lily/include/horizontal-vertical-group-item.hh +++ b/lily/include/horizontal-vertical-group-item.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/identifier.hh b/lily/include/identifier.hh index fc077f60ab..b7365e5650 100644 --- a/lily/include/identifier.hh +++ b/lily/include/identifier.hh @@ -13,7 +13,7 @@ #include "virtual-methods.hh" #define IDACCESSOR( Input_staff, staff)\ - virtual Input_staff * staff () { error (#Input_staff); return 0; } +virtual Input_staff * staff () { error (#Input_staff); return 0; } /** A declarable data structure in mudela. @@ -21,17 +21,17 @@ */ struct Identifier : public Input { - bool init_b_; - bool accessed_b_; - int token_code_i_; + bool init_b_; + bool accessed_b_; + int token_code_i_; - Identifier (int code) ; - virtual ~Identifier() ; + Identifier (int code) ; + virtual ~Identifier() ; - void print() const; - DECLARE_MY_RUNTIME_TYPEINFO; - void error (String); - IDACCESSOR(Translator, translator) + void print() const; + DECLARE_MY_RUNTIME_TYPEINFO; + void error (String); + IDACCESSOR(Translator, translator) IDACCESSOR(Music, music) IDACCESSOR(General_script_def, script) IDACCESSOR(Symtables, symtables) @@ -44,20 +44,20 @@ struct Identifier : public Input { IDACCESSOR(int, intid) IDACCESSOR(Duration, duration) -protected: - virtual void do_print() const=0; + protected: + virtual void do_print() const=0; private: - Identifier (Identifier const&); + Identifier (Identifier const&); }; #define DECLARE_ID_CLASS(Idclass, Class, accessor) \ struct Idclass : Identifier {\ - Class *data_p_; \ - DECLARE_MY_RUNTIME_TYPEINFO; \ - Idclass (Class*st, int code);\ - virtual Class* accessor ();\ - ~Idclass();\ - virtual void do_print() const; \ + Class *data_p_; \ + DECLARE_MY_RUNTIME_TYPEINFO; \ + Idclass (Class*st, int code);\ + virtual Class* accessor ();\ + ~Idclass();\ + virtual void do_print() const; \ }\ diff --git a/lily/include/includable-lexer.hh b/lily/include/includable-lexer.hh index f9dce9696d..9cf7087369 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -30,6 +30,8 @@ protected: Array include_stack_; Array char_count_stack_; public: + /// store dependencies for Makefile stuff. + Array filename_str_arr_; Source_file* source_file_l () const; void new_input (String s,Sources*); diff --git a/lily/include/ineq-constrained-qp.hh b/lily/include/ineq-constrained-qp.hh index 5cb5c43eb9..3b23cb898f 100644 --- a/lily/include/ineq-constrained-qp.hh +++ b/lily/include/ineq-constrained-qp.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/item.hh b/lily/include/item.hh index 64bcca5e70..0a20e76148 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef ITEM_HH #define ITEM_HH diff --git a/lily/include/key-grav.hh b/lily/include/key-grav.hh index b81605e547..59ab88c661 100644 --- a/lily/include/key-grav.hh +++ b/lily/include/key-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/key-performer.hh b/lily/include/key-performer.hh index 903e7f66b0..f76b9e11fd 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 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #ifndef KEY_PERFOMER_HH diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index 9adfb26c09..670125e1c7 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef LILY_PROTO_HH diff --git a/lily/include/line-group-grav.hh b/lily/include/line-group-grav.hh index 5316de9a8a..f6d4e6b35f 100644 --- a/lily/include/line-group-grav.hh +++ b/lily/include/line-group-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/line-spacer.hh b/lily/include/line-spacer.hh index d91901bdfe..1bc88f52c2 100644 --- a/lily/include/line-spacer.hh +++ b/lily/include/line-spacer.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/linear-programming.hh b/lily/include/linear-programming.hh index 1490edfede..08eefad823 100644 --- a/lily/include/linear-programming.hh +++ b/lily/include/linear-programming.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/linespace.hh b/lily/include/linespace.hh index 396c840a12..a468fad24f 100644 --- a/lily/include/linespace.hh +++ b/lily/include/linespace.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #error diff --git a/lily/include/local-key-grav.hh b/lily/include/local-key-grav.hh index d7c37829bb..b61446b760 100644 --- a/lily/include/local-key-grav.hh +++ b/lily/include/local-key-grav.hh @@ -1,7 +1,7 @@ /* local-key-grav.hh -- declare Local_key_engraver - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/lookup.hh b/lily/include/lookup.hh index 4e924397b1..9b291ee9ab 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef LOOKUPSYMS_HH @@ -32,9 +32,8 @@ struct Lookup { Atom fill (Box b) const; Atom beam_element (int,int,Real=0) const; - /// round slope to closest TeXslope - Atom beam (Real&,Real, Real) const; - Atom ps_beam (Real, Real, Real)const; + Atom beam (Real,Real, Real) const; + Atom ps_beam (Real, Real, Real) const; Atom streepje (int type) const; @@ -52,10 +51,10 @@ struct Lookup { Atom dots () const; Atom slur (Array controls) const; - Atom plet (Real &dy, Real &dx, Direction dir) const; + Atom plet (Real dy, Real dx, Direction dir) const; Atom text (String style, String text, int align = 1) const; Atom script (String idx) const; - Atom hairpin (Real & width, bool decresc, bool continued) const; + Atom hairpin (Real width, bool decresc, bool continued) const; Atom dynamic (String) const; }; diff --git a/lily/include/lyric-engraver.hh b/lily/include/lyric-engraver.hh index 96b6d1dbd0..195e4f92dc 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/lyric-performer.hh b/lily/include/lyric-performer.hh index c8a476037d..2660f89002 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 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ diff --git a/lily/include/main.hh b/lily/include/main.hh index 646f82638a..e5c3191723 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef MAIN_HH #define MAIN_HH @@ -24,6 +24,11 @@ extern bool no_paper_global_b; extern bool no_timestamps_global_b; extern int exit_status_i_; extern bool experimental_features_global_b; +extern bool dependency_global_b; +extern bool version_ignore_global_b; + +extern Array get_inclusion_names (); +extern void set_inclusion_names (Array); extern String default_outname_base_global; extern String default_outname_suffix_global; diff --git a/lily/include/meter-grav.hh b/lily/include/meter-grav.hh index 90d19b1fdb..3abe46230b 100644 --- a/lily/include/meter-grav.hh +++ b/lily/include/meter-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/meter-performer.hh b/lily/include/meter-performer.hh index fa2f06e9ff..f3fe174dd1 100644 --- a/lily/include/meter-performer.hh +++ b/lily/include/meter-performer.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #ifndef METER_PERFOMER_HH diff --git a/lily/include/midi-def.hh b/lily/include/midi-def.hh index 9d58a1b311..98951c10f1 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 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ diff --git a/lily/include/midi-item.hh b/lily/include/midi-item.hh index 55df8f34ee..ca89bacec1 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 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #ifndef MIDI_ITEM_HH diff --git a/lily/include/midi-stream.hh b/lily/include/midi-stream.hh index 87e8ec5d27..f3a3781ed3 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 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #ifndef MIDI_STREAM_HH diff --git a/lily/include/midi-walker.hh b/lily/include/midi-walker.hh index 492553ec8b..c7a20f76ac 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 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/include/minterval.hh b/lily/include/minterval.hh index f1c1e1677d..bb56394a7d 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/misc.hh b/lily/include/misc.hh index 28e55399ec..35a10dfaf9 100644 --- a/lily/include/misc.hh +++ b/lily/include/misc.hh @@ -1,13 +1,10 @@ #ifndef MISC_HH #define MISC_HH -#include "lily-proto.hh" #include "real.hh" -#include "moment.hh" -#include "scalar.hh" -#include "grouping.hh" +#include "varray.hh" +#include "interval.hh" -Moment wholes (int dur, int dots); double log_2(double x) ; int intlog2(int d); #if ! defined(_ABS_) @@ -23,6 +20,15 @@ sign (int i) { else return 0; } +#ifndef STANDALONE +#include "lily-proto.hh" Interval itemlist_width (const Array &its); +#endif + +int get_lower_bound (Array const& positions, Real x); +Slice get_bounds_slice (Array const& positions, Real x); +Interval get_bounds_iv (Array const& positions, Real x); +Interval quantise_iv (Array const& positions, Real period, Real x); #endif + diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh index ddea093d0e..3faccc45f8 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef MOLECULE_HH #define MOLECULE_HH diff --git a/lily/include/music-iterator.hh b/lily/include/music-iterator.hh index d543a858c9..f3f6b4e155 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/music-list.hh b/lily/include/music-list.hh index f084c19ecb..21c3ca9056 100644 --- a/lily/include/music-list.hh +++ b/lily/include/music-list.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/music-output-def.hh b/lily/include/music-output-def.hh index 2c8fa3093a..b4cd413412 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -23,6 +23,9 @@ class Music_output_def { public: Dictionary translator_p_dict_; + Array filename_str_arr_; + + Music_output_def (Music_output_def const&); Music_output_def (); diff --git a/lily/include/music-output.hh b/lily/include/music-output.hh index f777f1b6bb..6f2807ff2c 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/music.hh b/lily/include/music.hh index 767c109a53..c59cb5b88b 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index e46153c9f7..329b1cd0d0 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/my-lily-lexer.hh b/lily/include/my-lily-lexer.hh index 6b659ad7d9..8aa5319c28 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef LEXER_HH @@ -33,8 +33,9 @@ class My_lily_lexer : public Includable_lexer { bool post_quotes_b_; char escaped_char(char) const; public: + String main_input_str_; void * lexval_l; - + Notename_table *note_tab_p_; Dictionary *identifier_p_dict_p_; Keyword_table * keytable_p_; @@ -42,6 +43,7 @@ public: /* *************** */ + void start_main_input (); void clear_notenames(); Identifier*lookup_identifier (String s); Melodic_req* lookup_melodic_req_l (String s); diff --git a/lily/include/my-lily-parser.hh b/lily/include/my-lily-parser.hh index b5cbd87154..63b520ecab 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ @@ -70,7 +70,6 @@ public: void set_debug(); void set_yydebug (bool); - void print_declarations(); bool ignore_version_b_; public: void do_init_file(); diff --git a/lily/include/note-column.hh b/lily/include/note-column.hh index b2be9b3479..960349f403 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/note-performer.hh b/lily/include/note-performer.hh index 661e378dc1..c3b77ea415 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 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/include/notename-table.hh b/lily/include/notename-table.hh index 2e9b0bd9fd..96dcccb84c 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/outputter.hh b/lily/include/outputter.hh index 4b80892990..cb842e4c6c 100644 --- a/lily/include/outputter.hh +++ b/lily/include/outputter.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/p-col.hh b/lily/include/p-col.hh index 918800a7c6..5ab02c8410 100644 --- a/lily/include/p-col.hh +++ b/lily/include/p-col.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/p-score.hh b/lily/include/p-score.hh index f8c87557a0..60ebda08cd 100644 --- a/lily/include/p-score.hh +++ b/lily/include/p-score.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/paper-def.hh b/lily/include/paper-def.hh index 4bf3b9589c..671faf456e 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 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/performance.hh b/lily/include/performance.hh index 962f01fa4d..923575769d 100644 --- a/lily/include/performance.hh +++ b/lily/include/performance.hh @@ -1,7 +1,7 @@ /* performance.hh -- declare Performance - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #ifndef PERFORMANCE_HH diff --git a/lily/include/performer-group-performer.hh b/lily/include/performer-group-performer.hh index da592ef9bf..f5bcb61b4a 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 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/include/performer.hh b/lily/include/performer.hh index 8335f87bc3..5d17b6afef 100644 --- a/lily/include/performer.hh +++ b/lily/include/performer.hh @@ -1,7 +1,7 @@ /* performer.hh -- declare Performer - (c) 1996, 1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/include/pitch-squash-grav.hh b/lily/include/pitch-squash-grav.hh index dc68980ea1..9f224fa6ab 100644 --- a/lily/include/pitch-squash-grav.hh +++ b/lily/include/pitch-squash-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/plet-engraver.hh b/lily/include/plet-engraver.hh index 16d0beab35..7de90d4526 100644 --- a/lily/include/plet-engraver.hh +++ b/lily/include/plet-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #ifndef PLET_ENGRAVER_HH diff --git a/lily/include/plet-spanner.hh b/lily/include/plet-spanner.hh index 8caa2d0147..1625721bf4 100644 --- a/lily/include/plet-spanner.hh +++ b/lily/include/plet-spanner.hh @@ -1,7 +1,7 @@ /* plet-spanner.hh -- part of GNU LilyPond - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #ifndef PLET_SPANNER_HH diff --git a/lily/include/plet-swallow-engraver.hh b/lily/include/plet-swallow-engraver.hh index be361205c0..8dd6affd4e 100644 --- a/lily/include/plet-swallow-engraver.hh +++ b/lily/include/plet-swallow-engraver.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/priority-halign-grav.hh b/lily/include/priority-halign-grav.hh index 4d6fdb6a7d..b591a40eb4 100644 --- a/lily/include/priority-halign-grav.hh +++ b/lily/include/priority-halign-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/property-iterator.hh b/lily/include/property-iterator.hh index 08eb9bf547..f0dfbb5fb9 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/qlp.hh b/lily/include/qlp.hh index e40b34ff07..82371d363c 100644 --- a/lily/include/qlp.hh +++ b/lily/include/qlp.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef QLP_HH diff --git a/lily/include/qlpsolve.hh b/lily/include/qlpsolve.hh index db985df6c5..dc2aaa5663 100644 --- a/lily/include/qlpsolve.hh +++ b/lily/include/qlpsolve.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/request-iterator.hh b/lily/include/request-iterator.hh index 866bb7e929..8f7a30b4c8 100644 --- a/lily/include/request-iterator.hh +++ b/lily/include/request-iterator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/request.hh b/lily/include/request.hh index e93f493176..ccdf48422b 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef REQUEST_HH diff --git a/lily/include/rest-collision-grav.hh b/lily/include/rest-collision-grav.hh index b763e4c63b..0e99b48b75 100644 --- a/lily/include/rest-collision-grav.hh +++ b/lily/include/rest-collision-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/rest-collision.hh b/lily/include/rest-collision.hh index cbeaf6fbe8..4d39f54347 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/rest-grav.hh b/lily/include/rest-grav.hh index 974955c2c6..67006a98af 100644 --- a/lily/include/rest-grav.hh +++ b/lily/include/rest-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/rest.hh b/lily/include/rest.hh index 028e7f8c32..65cddc848e 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/rhythmic-column-grav.hh b/lily/include/rhythmic-column-grav.hh index b9a2e6c78f..52e0904e3b 100644 --- a/lily/include/rhythmic-column-grav.hh +++ b/lily/include/rhythmic-column-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/rhythmic-head.hh b/lily/include/rhythmic-head.hh index 361591012d..84a1728b0a 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/score-bar.hh b/lily/include/score-bar.hh index 9ee61c5b0f..298404da5d 100644 --- a/lily/include/score-bar.hh +++ b/lily/include/score-bar.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/score-column.hh b/lily/include/score-column.hh index 624c49ef31..961de68e2b 100644 --- a/lily/include/score-column.hh +++ b/lily/include/score-column.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/score-elem-info.hh b/lily/include/score-elem-info.hh index 5e327a4b0e..edd695c4b9 100644 --- a/lily/include/score-elem-info.hh +++ b/lily/include/score-elem-info.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/score-grav.hh b/lily/include/score-grav.hh index 6348cdadf0..4f11fd0f8f 100644 --- a/lily/include/score-grav.hh +++ b/lily/include/score-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/score-performer.hh b/lily/include/score-performer.hh index b093ae090e..3aa4d4ba7e 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 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/include/score-priority-grav.hh b/lily/include/score-priority-grav.hh index 48ed10e7b1..8b6ab1c1a7 100644 --- a/lily/include/score-priority-grav.hh +++ b/lily/include/score-priority-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/score.hh b/lily/include/score.hh index 8d9666b0c5..667e443402 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/script-column.hh b/lily/include/script-column.hh index 335ed551fe..1b7328b1e5 100644 --- a/lily/include/script-column.hh +++ b/lily/include/script-column.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/script-grav.hh b/lily/include/script-grav.hh index e0463fcf49..e8040c5372 100644 --- a/lily/include/script-grav.hh +++ b/lily/include/script-grav.hh @@ -1,7 +1,7 @@ /* script-grav.hh -- part of GNU LilyPond - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/single-malt-grouping-item.hh b/lily/include/single-malt-grouping-item.hh index a220ee4c19..0e69c49ded 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/slur-grav.hh b/lily/include/slur-grav.hh index a27e051895..64dd45251c 100644 --- a/lily/include/slur-grav.hh +++ b/lily/include/slur-grav.hh @@ -1,7 +1,7 @@ /* slur-grav.hh -- declare Slur_engraver - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/span-bar-grav.hh b/lily/include/span-bar-grav.hh index 59a99f5f8b..c7e6241e84 100644 --- a/lily/include/span-bar-grav.hh +++ b/lily/include/span-bar-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/span-bar.hh b/lily/include/span-bar.hh index af20eca67f..4d0744de01 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/span-score-bar-grav.hh b/lily/include/span-score-bar-grav.hh index 39da0ab69c..bf4b88aa44 100644 --- a/lily/include/span-score-bar-grav.hh +++ b/lily/include/span-score-bar-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/span-score-bar.hh b/lily/include/span-score-bar.hh index 193dc8c1d0..f42205b38e 100644 --- a/lily/include/span-score-bar.hh +++ b/lily/include/span-score-bar.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/spring-spacer.hh b/lily/include/spring-spacer.hh index 27d2f15333..ea94a97c68 100644 --- a/lily/include/spring-spacer.hh +++ b/lily/include/spring-spacer.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/staff-info.hh b/lily/include/staff-info.hh index 72cf266383..9f03ca73d5 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/staff-performer.hh b/lily/include/staff-performer.hh index 063b3c1b05..3352e85b77 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 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/include/staff-side.hh b/lily/include/staff-side.hh index 226c70411c..9762887458 100644 --- a/lily/include/staff-side.hh +++ b/lily/include/staff-side.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/staff-sym-grav.hh b/lily/include/staff-sym-grav.hh index 9ec528d767..ff65bf6663 100644 --- a/lily/include/staff-sym-grav.hh +++ b/lily/include/staff-sym-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/staff-sym.hh b/lily/include/staff-sym.hh index 5051dd9e07..258818db1e 100644 --- a/lily/include/staff-sym.hh +++ b/lily/include/staff-sym.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/stem-grav.hh b/lily/include/stem-grav.hh index d0695a395f..78a9236544 100644 --- a/lily/include/stem-grav.hh +++ b/lily/include/stem-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/stem-info.hh b/lily/include/stem-info.hh index 5fa4da6461..83ebeaf74b 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 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ @@ -13,13 +13,13 @@ #include "real.hh" struct Stem_info { - Real x; + Real x_; int dir_; Real idealy_f_; Real miny_f_; - int beams_i_; + int mult_i_; - Stem_info(); + Stem_info (); Stem_info (Stem const *); }; diff --git a/lily/include/stem.hh b/lily/include/stem.hh index 1a63a17eb0..e9e5cac4c4 100644 --- a/lily/include/stem.hh +++ b/lily/include/stem.hh @@ -66,6 +66,9 @@ public: int beams_left_i_; int beams_right_i_; + /// maximum number of beams + int mult_i_; + Direction dir_; /* *************** */ diff --git a/lily/include/super-elem.hh b/lily/include/super-elem.hh index e5e4393887..4ee998706e 100644 --- a/lily/include/super-elem.hh +++ b/lily/include/super-elem.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/swallow-grav.hh b/lily/include/swallow-grav.hh index 7cc4a905f1..601477fcd2 100644 --- a/lily/include/swallow-grav.hh +++ b/lily/include/swallow-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/swallow-perf.hh b/lily/include/swallow-perf.hh index 9f8f551462..699990c4db 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/symtable.hh b/lily/include/symtable.hh index 8c36ee6cbf..71724eb0ad 100644 --- a/lily/include/symtable.hh +++ b/lily/include/symtable.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/tex.hh b/lily/include/tex.hh index 80850cafa9..43a35d2ad3 100644 --- a/lily/include/tex.hh +++ b/lily/include/tex.hh @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/tie-grav.hh b/lily/include/tie-grav.hh index 299e92a376..834d91ed55 100644 --- a/lily/include/tie-grav.hh +++ b/lily/include/tie-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/tie.hh b/lily/include/tie.hh index a1100653ae..d983e16491 100644 --- a/lily/include/tie.hh +++ b/lily/include/tie.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/timing-grav.hh b/lily/include/timing-grav.hh index 4c0c431bcf..22c7274a34 100644 --- a/lily/include/timing-grav.hh +++ b/lily/include/timing-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/timing-translator.hh b/lily/include/timing-translator.hh index 02da3a2488..82aa0e19de 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/translation-property.hh b/lily/include/translation-property.hh index 7fba807720..686f0d938d 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/translator-change.hh b/lily/include/translator-change.hh index a357307f5e..0220ed70f5 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/translator-group.hh b/lily/include/translator-group.hh index 1cc3a0b3c3..3e00c5b0e1 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/translator.hh b/lily/include/translator.hh index c2ddcb131a..1684809af5 100644 --- a/lily/include/translator.hh +++ b/lily/include/translator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/type-swallow-trans.hh b/lily/include/type-swallow-trans.hh index 0bebd32512..76208a06cf 100644 --- a/lily/include/type-swallow-trans.hh +++ b/lily/include/type-swallow-trans.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/vertical-align-elem.hh b/lily/include/vertical-align-elem.hh index a01e2c5164..b4962c34a0 100644 --- a/lily/include/vertical-align-elem.hh +++ b/lily/include/vertical-align-elem.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/vertical-align-grav.hh b/lily/include/vertical-align-grav.hh index 4f26048eee..c61ba39d02 100644 --- a/lily/include/vertical-align-grav.hh +++ b/lily/include/vertical-align-grav.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/vertical-align-spanner.hh b/lily/include/vertical-align-spanner.hh index 489586505f..df8be95bc5 100644 --- a/lily/include/vertical-align-spanner.hh +++ b/lily/include/vertical-align-spanner.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/vertical-group-elem.hh b/lily/include/vertical-group-elem.hh index 5e46c66fd5..f60623e7dc 100644 --- a/lily/include/vertical-group-elem.hh +++ b/lily/include/vertical-group-elem.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/vertical-group-spanner.hh b/lily/include/vertical-group-spanner.hh index 405c65a0b7..678137e29f 100644 --- a/lily/include/vertical-group-spanner.hh +++ b/lily/include/vertical-group-spanner.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/voice-iterator.hh b/lily/include/voice-iterator.hh index 49bfbfc553..a9fec21204 100644 --- a/lily/include/voice-iterator.hh +++ b/lily/include/voice-iterator.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/include/word-wrap.hh b/lily/include/word-wrap.hh index a7d69ff083..7465c279e6 100644 --- a/lily/include/word-wrap.hh +++ b/lily/include/word-wrap.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/ineq-constrained-qp.cc b/lily/ineq-constrained-qp.cc index 4ff8adcc20..70856b56dc 100644 --- a/lily/ineq-constrained-qp.cc +++ b/lily/ineq-constrained-qp.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include "ineq-constrained-qp.hh" #include "qlpsolve.hh" diff --git a/lily/item.cc b/lily/item.cc index 8b2297ce5c..20f52f0553 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "p-score.hh" diff --git a/lily/key-grav.cc b/lily/key-grav.cc index 60c2f2dbce..fe98853726 100644 --- a/lily/key-grav.cc +++ b/lily/key-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys Todo: key undo, special keys. diff --git a/lily/key-item.cc b/lily/key-item.cc index d80f01670d..93abfa0575 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 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys keyplacement by Mats Bengtsson */ diff --git a/lily/key-performer.cc b/lily/key-performer.cc index bca4c5c106..527cf06cbb 100644 --- a/lily/key-performer.cc +++ b/lily/key-performer.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #include "key-performer.hh" diff --git a/lily/key.cc b/lily/key.cc index 56a6278cfa..9e8b9d40c5 100644 --- a/lily/key.cc +++ b/lily/key.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys TODO transposition. diff --git a/lily/lexerinit.cc b/lily/lexerinit.cc index 6f5cd27f26..8b184bb7ad 100644 --- a/lily/lexerinit.cc +++ b/lily/lexerinit.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include diff --git a/lily/line-group-grav.cc b/lily/line-group-grav.cc index 465a23d819..0ae8eca24e 100644 --- a/lily/line-group-grav.cc +++ b/lily/line-group-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "staff-sym.hh" diff --git a/lily/line-spacer.cc b/lily/line-spacer.cc index 3e518e022c..95b77e24c6 100644 --- a/lily/line-spacer.cc +++ b/lily/line-spacer.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/linear-programming.cc b/lily/linear-programming.cc index 83c4823db1..eed55a9b37 100644 --- a/lily/linear-programming.cc +++ b/lily/linear-programming.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/local-key-grav.cc b/lily/local-key-grav.cc index ec84f240bf..474a5910ce 100644 --- a/lily/local-key-grav.cc +++ b/lily/local-key-grav.cc @@ -1,7 +1,7 @@ /* local-key-reg.cc -- implement Local_key_engraver - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "musical-request.hh" diff --git a/lily/local-key-item.cc b/lily/local-key-item.cc index a2ddd1b43e..ea45b32d44 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "dimen.hh" #include "local-key-item.hh" diff --git a/lily/lookup.cc b/lily/lookup.cc index b0212b2f91..bbdfd3c111 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys TODO This doth suck. We should have PS output, and read spacing info from TFMs @@ -192,21 +192,21 @@ Lookup::streepje (int type) const } Atom -Lookup::hairpin (Real &wid, bool decresc, bool continued) const +Lookup::hairpin (Real width, bool decresc, bool continued) const { String embed; Atom ret; Real height = paper_l_->get_var ("barsize") / 6; embed = "\\embeddedps{\n" ; - embed += String (wid) + " " + embed += String (width) + " " + String (height) + " " + String (continued ? height/2 : 0) + + " draw_" + String(decresc ? "de" : "") + "cresc}\n"; ret.tex_ = embed; - ret.dim_.x () = Interval (0,wid); - ret.dim_.y () = Interval (-2*height,2*height); + ret.dim_.x () = Interval (0, width); + ret.dim_.y () = Interval (-2*height, 2*height); return ret; } @@ -290,7 +290,6 @@ Lookup::vbracket (Real &y) const Atom bracket = (*symtables_p_)("param")->lookup ("bracket"); Interval ydims = bracket.dim_[Y_AXIS]; - Real min_y = ydims[LEFT]; Real max_y = ydims[RIGHT]; Real step = 1.0 PT; diff --git a/lily/lyric-grav.cc b/lily/lyric-grav.cc index 182658cd5f..f90dcde52c 100644 --- a/lily/lyric-grav.cc +++ b/lily/lyric-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "lyric-engraver.hh" diff --git a/lily/lyric-performer.cc b/lily/lyric-performer.cc index f55844044c..d81875c95e 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 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #include "lyric-performer.hh" diff --git a/lily/main.cc b/lily/main.cc index 743b8e6a9e..2049462714 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include @@ -15,18 +15,20 @@ #include "misc.hh" #include "string.hh" #include "main.hh" -#include "path.hh" +#include "file-path.hh" #include "config.hh" -#include "source.hh" +#include "file-results.hh" #include "debug.hh" -#include "my-lily-parser.hh" -static bool version_ignore_b = false; -Sources* source_global_l = 0; + +bool version_ignore_global_b = false; bool no_paper_global_b = false; bool no_timestamps_global_b = false; +String default_outname_base_global = "lelie"; +int default_count_global; bool experimental_features_global_b = false; +bool dependency_global_b = false; int exit_status_i_; @@ -37,11 +39,11 @@ Long_option_init theopts[] = { {0, "warranty", 'w'}, {0, "help", 'h'}, {0, "test", 't'}, - {0, "debug", 'd'}, + {0, "debug", 'D'}, {1, "init", 'i'}, {1, "include", 'I'}, {0, "no-paper", 'M'}, - + {0, "dependencies", 'd'}, {0, "no-timestamps", 'T'}, {0, "ignore-version", 'V'}, {0,0,0} @@ -55,7 +57,8 @@ usage () "Typeset and or produce midi output from mudela-file or stdin\n" "\n" "Options:\n" - " -d, --debug enable debugging output\n" + " -D, --debug enable debugging output\n" + " -d, --dependencies write dependency files for every output\n" " -I, --include=DIR add DIR to search path\n" " -i, --init=FILE use FILE as init file\n" " -h, --help this help\n" @@ -112,49 +115,8 @@ notice () } -static File_path path; + File_path path; -void -do_one_file (String init_str, String file_str) -{ - if (init_str.length_i () && path.find (init_str).empty_b ()) - { - error (_("Can not find `") + init_str +"\'"); - return ; - } - if (file_str.length_i () && path.find (file_str).empty_b ()) - { - error (_("Can not find `") + file_str + "'"); - return ; - } - - Sources sources; - source_global_l = &sources; - source_global_l->set_path (&path); - { - My_lily_parser parser (source_global_l); - parser.set_version_check (version_ignore_b); - parser.parse_file (init_str, file_str); - - if (file_str.length_i () && file_str[0] != '-') - { - String a,b,c,d; - split_path (file_str, a, b, c, d); - default_outname_base_global = c; - } - else - default_outname_base_global = "lelie"; - - if (parser.error_level_i_) - { - exit_status_i_ = 1; - } - else - do_scores (); - clear_scores (); - } - source_global_l = 0; -} void identify () @@ -209,9 +171,12 @@ main (int argc, char **argv) exit (0); break; case 'V': - version_ignore_b = true; + version_ignore_global_b = true; break; case 'd': + dependency_global_b = true; + break; + case 'D': set_debug (true); break; case 'M': diff --git a/lily/meter-grav.cc b/lily/meter-grav.cc index 9b11835eaf..f14d00a4ed 100644 --- a/lily/meter-grav.cc +++ b/lily/meter-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "meter-grav.hh" diff --git a/lily/meter-performer.cc b/lily/meter-performer.cc index b7206c2b78..44849ab744 100644 --- a/lily/meter-performer.cc +++ b/lily/meter-performer.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #include "meter-performer.hh" diff --git a/lily/midi-def.cc b/lily/midi-def.cc index 0e85a4849f..6eff15ea8e 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 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #include diff --git a/lily/midi-item.cc b/lily/midi-item.cc index 05f0be08a1..46c5f3420b 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 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #include "proto.hh" diff --git a/lily/midi-stream.cc b/lily/midi-stream.cc index a9abaa677b..89aab84a8b 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 Jan Nieuwenhuizen +// (c) 1997--1998 Jan Nieuwenhuizen #include #include "string.hh" diff --git a/lily/midi-walker.cc b/lily/midi-walker.cc index 38fbad9953..75f7af9321 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/misc.cc b/lily/misc.cc index d150d55792..c9cb8e5dcf 100644 --- a/lily/misc.cc +++ b/lily/misc.cc @@ -3,14 +3,17 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998, 1998 Han-Wen Nienhuys + Jan Nieuwenhuizen */ #include -#include "item.hh" #include "misc.hh" -#include "moment.hh" + +#ifndef STANDALONE +#include "item.hh" +#endif int intlog2(int d) { @@ -29,7 +32,7 @@ log_2(double x) { return log (x) /log (2.0); } -#if 1 +#ifndef STANDALONE Interval itemlist_width (const Array &its) { @@ -45,3 +48,74 @@ itemlist_width (const Array &its) } #endif + + +/* + TODO + group in some Array_* + make more generic / templatise + */ +int +get_lower_bound (Array const& positions, Real x) +{ + if (x < positions[0]) + return 0; + for (int i = 1; i < positions.size (); i++) + if (x < positions[i]) + return i - 1; + return positions.size () - 1; +} + +Slice +get_bounds_slice (Array const& positions, Real x) +{ + int l = get_lower_bound (positions, x); + int u = positions.size () - 1 const& positions, Real x) +{ + Slice slice = get_bounds_slice (positions, x); + return Interval (positions[slice.min ()], positions[slice.max ()]); +} + +// silly name +Interval +quantise_iv (Array const& positions, Real period, Real x) +{ + /* + ugh + assume that + * positions are sorted, + * positions are nonnegative + * period starts at zero + */ + + int n = (int)(x / period); + Real frac = (x / period - n) * period; + if (frac < 0) + { + frac += period; + n--; + } + + Slice slice = get_bounds_slice (positions, frac); + Interval iv(positions[slice.min ()], positions[slice.max ()]); + + if (slice.min () == slice.max ()) + { + if (slice.min () == 0) + iv.min () = - period + positions.top (); + else + iv.max () = period + positions[0]; + } + + iv += period * n; + + return iv; +} + diff --git a/lily/molecule.cc b/lily/molecule.cc index f054a28021..613fc0ea1d 100644 --- a/lily/molecule.cc +++ b/lily/molecule.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "interval.hh" diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 9c79248914..e6a65fdadb 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "debug.hh" #include "music-list.hh" diff --git a/lily/music-list.cc b/lily/music-list.cc index 93a64e6a01..84934a99c5 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/music-output-def.cc b/lily/music-output-def.cc index 297584d539..2e9a287863 100644 --- a/lily/music-output-def.cc +++ b/lily/music-output-def.cc @@ -3,9 +3,10 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ + #include "debug.hh" #include "music-output-def.hh" #include "global-translator.hh" diff --git a/lily/music.cc b/lily/music.cc index 443088c952..298dd2dc5c 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/musical-request.cc b/lily/musical-request.cc index 0def2d2f51..3469aaff33 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "musical-request.hh" diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index 43495eb06c..77f13bf18e 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include @@ -19,6 +19,7 @@ #include "debug.hh" #include "source-file.hh" #include "parseconstruct.hh" +#include "main.hh" static Keyword_ent the_key_tab[]={ {"accepts", ACCEPTS}, @@ -92,6 +93,18 @@ My_lily_lexer::lookup_identifier (String s) return (*identifier_p_dict_p_)[s]; } +void +My_lily_lexer::start_main_input () +{ + if (!monitor->silent_b ("InitDeclarations") && check_debug) + print_declarations (true); + if (!monitor->silent_b ("InitLexer") && check_debug) + set_debug (1); + + new_input (main_input_str_, source_global_l); + + print_declarations(true); +} void My_lily_lexer::set_identifier (String name_str, Identifier*i) diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc index d267732e97..beb8d7df3c 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "my-lily-parser.hh" @@ -15,7 +15,7 @@ #include "command-request.hh" #include "parser.hh" #include "header.hh" - +#include "file-results.hh" My_lily_parser::My_lily_parser (Sources * source_l) { @@ -50,57 +50,20 @@ My_lily_parser::set_version_check (bool ig) { ignore_version_b_ = ig; } -void -My_lily_parser::set_debug() -{ -#ifndef NPRINT - String s = ""; - if (init_parse_b_) - s = "Init"; - set_yydebug (!monitor->silent_b (s+"Parser") && check_debug); - lexer_p_->set_debug (!monitor->silent_b (s+"Lexer") && check_debug); -#endif -} - -void -My_lily_parser::print_declarations() -{ -#ifndef NPRINT - String s = ""; - - if (init_parse_b_) - s = "Init"; - if (!monitor->silent_b (s+"Declarations") && check_debug) - { - lexer_p_->print_declarations (init_parse_b_); - } -#endif -} void My_lily_parser::parse_file (String init, String s) { lexer_p_ = new My_lily_lexer; init_str_ = init; + lexer_p_->main_input_str_ = s; *mlog << _("Parsing ... "); - init_parse_b_ = true; - set_debug(); - lexer_p_->new_input (init, source_l_); - do_yyparse(); - - if (error_level_i_) - { - error (_("Found errors in init files")); - } - print_declarations(); - init_parse_b_ = false; - set_debug(); - lexer_p_->new_input (s , source_l_); - do_yyparse(); - print_declarations(); + set_yydebug (!monitor->silent_b ("Parser") && check_debug); + lexer_p_->new_input (init, source_l_); + do_yyparse (); if (!define_spot_array_.empty()) @@ -108,6 +71,8 @@ My_lily_parser::parse_file (String init, String s) warning (_("Braces don't match.")); error_level_i_ = 1; } + + inclusion_global_array = lexer_p_->filename_str_arr_; } void @@ -157,7 +122,14 @@ void My_lily_parser::set_last_duration (Duration const *d) { if (last_duration_mode_b_) - default_duration_ = *d; + { + default_duration_ = *d; + /* + forget plet part, + sticky plet factor only within plet brackets + */ + default_duration_.set_plet (1, 1); + } } @@ -194,8 +166,9 @@ My_lily_parser::get_rest_element (String s, Duration * duration_p) else if ((duration_p->plet_.type_i_ == 1) && (duration_p->plet_.iso_i_ > 1)) { Multi_measure_rest_req* m = new Multi_measure_rest_req; - plet_.iso_i_ = 1; - default_duration_.plet_.iso_i_ = 1; + // these shouldn't be necessary anymore +// plet_.iso_i_ = 1; +// default_duration_.plet_.iso_i_ = 1; m->duration_ = *duration_p; m->set_spot (here_input()); velt_p->add (m); diff --git a/lily/note-column.cc b/lily/note-column.cc index 540922d4f0..c82d2c42c2 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "dot-column.hh" #include "note-column.hh" diff --git a/lily/note-head.cc b/lily/note-head.cc index 7a728aaa82..3ae349b28b 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "misc.hh" diff --git a/lily/note-performer.cc b/lily/note-performer.cc index 4b60d69229..6679f61ba6 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 Jan Nieuwenhuizen + (c) 1996, 1997--1998 Jan Nieuwenhuizen */ #include "note-performer.hh" diff --git a/lily/notename-table.cc b/lily/notename-table.cc index 049f0cdfcb..1f3bc99210 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "notename-table.hh" diff --git a/lily/outputter.cc b/lily/outputter.cc index 81ef2c793e..d3df3f600f 100644 --- a/lily/outputter.cc +++ b/lily/outputter.cc @@ -4,7 +4,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "outputter.hh" diff --git a/lily/p-col.cc b/lily/p-col.cc index 7da23d8d90..e776b62c92 100644 --- a/lily/p-col.cc +++ b/lily/p-col.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "p-col.hh" diff --git a/lily/p-score.cc b/lily/p-score.cc index 02033ab93e..51c9a4b019 100644 --- a/lily/p-score.cc +++ b/lily/p-score.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include "main.hh" @@ -23,7 +23,7 @@ #include "word-wrap.hh" #include "gourlay-breaking.hh" #include "outputter.hh" - +#include "file-results.hh" // sucking Cygnus egcs - w32 #include "list.tcc" #include "cursor.tcc" @@ -199,17 +199,21 @@ void Paper_score::tex_output () { // output - String outname = paper_l_->outfile_str_ ; - if (outname.empty_b ()) + String base_outname = paper_l_->outfile_str_ ; + if (base_outname.empty_b ()) { - outname = default_outname_base_global; + base_outname = default_outname_base_global; int def = paper_l_->get_next_default_count (); if (def) { - outname += "-" + String(def); + base_outname += "-" + String(def); } - outname += ".tex"; } + + String outname = base_outname + ".tex"; + target_str_global_array.push (outname); + + *mlog << _("TeX output to ") << outname << " ...\n"; Tex_stream tex_out (outname); diff --git a/lily/paper-def.cc b/lily/paper-def.cc index 92b126428c..20e412dde8 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include diff --git a/lily/performance.cc b/lily/performance.cc index 8a6d3c7987..81e281d659 100644 --- a/lily/performance.cc +++ b/lily/performance.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #include @@ -18,6 +18,7 @@ #include "audio-staff.hh" #include "performance.hh" #include "score.hh" +#include "file-results.hh" Performance::Performance () { @@ -137,6 +138,7 @@ Performance::process() Midi_stream midi_stream (out); *mlog << _("MIDI output to ") << out<< " ..." << endl; + target_str_global_array.push (out); output (midi_stream); *mlog << endl; diff --git a/lily/performer-group-performer.cc b/lily/performer-group-performer.cc index 525b6202fc..a33b967e43 100644 --- a/lily/performer-group-performer.cc +++ b/lily/performer-group-performer.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/performer.cc b/lily/performer.cc index ed171b5a70..b62f37ec07 100644 --- a/lily/performer.cc +++ b/lily/performer.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys Jan Nieuwenhuizen */ diff --git a/lily/pitch-squash-grav.cc b/lily/pitch-squash-grav.cc index 5671dd4af8..a11b61b29e 100644 --- a/lily/pitch-squash-grav.cc +++ b/lily/pitch-squash-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/plet-engraver.cc b/lily/plet-engraver.cc index d94a858634..d4fc9005de 100644 --- a/lily/plet-engraver.cc +++ b/lily/plet-engraver.cc @@ -1,7 +1,7 @@ /* plet-engraver.cc -- implement Plet_engraver - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #include "proto.hh" diff --git a/lily/plet-spanner.cc b/lily/plet-spanner.cc index bb9980c263..6e578441c6 100644 --- a/lily/plet-spanner.cc +++ b/lily/plet-spanner.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #include "atom.hh" diff --git a/lily/plet-swallow-engraver.cc b/lily/plet-swallow-engraver.cc index 1f837ad9f0..c139576158 100644 --- a/lily/plet-swallow-engraver.cc +++ b/lily/plet-swallow-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "musical-request.hh" diff --git a/lily/priority-halign-grav.cc b/lily/priority-halign-grav.cc index a42c4a552e..76fc2b8046 100644 --- a/lily/priority-halign-grav.cc +++ b/lily/priority-halign-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "bar.hh" diff --git a/lily/property-iterator.cc b/lily/property-iterator.cc index 2a191dead8..61a1b933c3 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "property-iterator.hh" diff --git a/lily/ps-plet.cc b/lily/ps-plet.cc index 8d08783f15..8d08d22b2b 100644 --- a/lily/ps-plet.cc +++ b/lily/ps-plet.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #include @@ -17,7 +17,7 @@ #include "string-convert.hh" Atom -Lookup::plet (Real& dy , Real& dx, Direction dir) const +Lookup::plet (Real dy , Real dx, Direction dir) const { String ps = "\\embeddedps{\n"; diff --git a/lily/qlp.cc b/lily/qlp.cc index 635cba40a0..f77534e3e4 100644 --- a/lily/qlp.cc +++ b/lily/qlp.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "debug.hh" diff --git a/lily/qlpsolve.cc b/lily/qlpsolve.cc index 3d45207eab..78e0704277 100644 --- a/lily/qlpsolve.cc +++ b/lily/qlpsolve.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys TODO: try fixed point arithmetic, to speed up lily. diff --git a/lily/request-iterator.cc b/lily/request-iterator.cc index 3d833b94d1..19be49a8d3 100644 --- a/lily/request-iterator.cc +++ b/lily/request-iterator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "translator-group.hh" diff --git a/lily/request.cc b/lily/request.cc index 488b2cad95..920cc79ca5 100644 --- a/lily/request.cc +++ b/lily/request.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include "request.hh" diff --git a/lily/rest-collision-grav.cc b/lily/rest-collision-grav.cc index 119adcf2b7..3729f28e7e 100644 --- a/lily/rest-collision-grav.cc +++ b/lily/rest-collision-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "debug.hh" diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index f1263ffcbe..38f0a65db8 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "debug.hh" diff --git a/lily/rest-grav.cc b/lily/rest-grav.cc index 762cbd6e36..5791c6bd66 100644 --- a/lily/rest-grav.cc +++ b/lily/rest-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "rest-grav.hh" diff --git a/lily/rest.cc b/lily/rest.cc index 0028373cf5..e46f3f8673 100644 --- a/lily/rest.cc +++ b/lily/rest.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "molecule.hh" diff --git a/lily/rhythmic-column-grav.cc b/lily/rhythmic-column-grav.cc index 7cba706c24..e6d5b66c04 100644 --- a/lily/rhythmic-column-grav.cc +++ b/lily/rhythmic-column-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "rhythmic-column-grav.hh" diff --git a/lily/rhythmic-head.cc b/lily/rhythmic-head.cc index 616b8bf8cd..99e2f52680 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "rhythmic-head.hh" diff --git a/lily/score-bar.cc b/lily/score-bar.cc index 5780eaff1e..1882347664 100644 --- a/lily/score-bar.cc +++ b/lily/score-bar.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/score-column.cc b/lily/score-column.cc index 0da2f640cb..9f40322a0a 100644 --- a/lily/score-column.cc +++ b/lily/score-column.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "debug.hh" diff --git a/lily/score-elem-info.cc b/lily/score-elem-info.cc index 4bfd4c2a16..e86ca93860 100644 --- a/lily/score-elem-info.cc +++ b/lily/score-elem-info.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "score-elem-info.hh" diff --git a/lily/score-elem.cc b/lily/score-elem.cc index e81d7e0563..c207e75a4f 100644 --- a/lily/score-elem.cc +++ b/lily/score-elem.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "outputter.hh" #include "p-score.hh" diff --git a/lily/score-grav.cc b/lily/score-grav.cc index 06f54eca51..cfce99e6b3 100644 --- a/lily/score-grav.cc +++ b/lily/score-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "super-elem.hh" diff --git a/lily/score-performer.cc b/lily/score-performer.cc index 9db18a916f..7d596f90b9 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 Jan Nieuwenhuizen + (c) 1996, 1997--1998 Jan Nieuwenhuizen */ #include "score-performer.hh" diff --git a/lily/score-priority-grav.cc b/lily/score-priority-grav.cc index 9e2e2cc918..a0f44cb5ba 100644 --- a/lily/score-priority-grav.cc +++ b/lily/score-priority-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/score.cc b/lily/score.cc index 8e88f8ad36..d30579839a 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "score.hh" diff --git a/lily/scoreline.cc b/lily/scoreline.cc index 4a2df191c4..77eeead39e 100644 --- a/lily/scoreline.cc +++ b/lily/scoreline.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include "scoreline.hh" diff --git a/lily/scores.cc b/lily/scores.cc index 5badc05fb0..4a25a85a0f 100644 --- a/lily/scores.cc +++ b/lily/scores.cc @@ -3,9 +3,9 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ - +#include #include "main.hh" #include "score.hh" #include "string.hh" @@ -13,20 +13,62 @@ #include "header.hh" #include "debug.hh" #include "parray.hh" +#include "file-path.hh" +#include "file-results.hh" +#include "my-lily-parser.hh" +#include "source.hh" + +Sources* source_global_l = 0; +Array inclusion_global_array; +Array target_str_global_array; +Link_array score_global_array; + + +void write_dependency_file (String fn, Array targets, + Array deps) +{ + const int WRAPWIDTH = 65; + + + cout << "Writing dependency file " << fn << " ...\n"; + ofstream f (fn.ch_C ()); + if (!f) + warning ( _("Can't open dependency file `" + fn + "\'")); + + f << "# Automatically generated by " << get_version_str () << "\n"; + String out; + for (int i=0; i < targets.size (); i ++) + out += targets[i] + " "; + out += ": "; + for (int i=0; i < deps.size (); i ++) + { + if (out.length_i() > WRAPWIDTH) + { + f << out << "\\\n"; + out = " "; + } + out += " " + deps[i]; + } + f << out << endl; +} -static Link_array global_score_array; -String default_outname_suffix_global = ""; -String default_outname_base_global = "lelie"; -int default_count_global; +void +do_deps() +{ + if (dependency_global_b) + { + write_dependency_file (default_outname_base_global + ".dep", target_str_global_array, + inclusion_global_array); + } +} void do_scores() { - for (int i=0; i < global_score_array.size(); i++) + for (int i=0; i < score_global_array.size(); i++) { -// Score *&is_p = global_score_array[i]; - Score* is_p = global_score_array[i]; + Score* is_p = score_global_array[i]; if (!is_p->header_p_) is_p->header_p_ = new Header; @@ -43,21 +85,61 @@ do_scores() is_p->process(); } } + do_deps (); } void clear_scores () { - for (int i=0; i < global_score_array.size(); i++) + for (int i=0; i < score_global_array.size(); i++) { - delete global_score_array[i]; + delete score_global_array[i]; } - global_score_array.clear(); + score_global_array.clear(); + inclusion_global_array.clear (); } +extern File_path path; + void -add_score (Score * s) +do_one_file (String init_str, String file_str) { - global_score_array.push (s); -} + if (init_str.length_i () && path.find (init_str).empty_b ()) + { + error (_("Can not find `") + init_str +"\'"); + return ; + } + if (file_str.length_i () && path.find (file_str).empty_b ()) + { + error (_("Can not find `") + file_str + "'"); + return ; + } + + Sources sources; + source_global_l = &sources; + source_global_l->set_path (&path); + { + My_lily_parser parser (source_global_l); + parser.set_version_check (version_ignore_global_b); + parser.parse_file (init_str, file_str); + + if (file_str.length_i () && file_str[0] != '-') + { + String a,b,c,d; + split_path (file_str, a, b, c, d); + default_outname_base_global = c; + } + else + default_outname_base_global = "lelie"; + + if (parser.error_level_i_) + { + exit_status_i_ = 1; + } + else + do_scores (); + clear_scores (); + } + source_global_l = 0; +} diff --git a/lily/script-column.cc b/lily/script-column.cc index 47a508e2c2..7d11acf61e 100644 --- a/lily/script-column.cc +++ b/lily/script-column.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "script-column.hh" diff --git a/lily/script-def.cc b/lily/script-def.cc index e16eed4c09..5a9c3a65b3 100644 --- a/lily/script-def.cc +++ b/lily/script-def.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include "debug.hh" diff --git a/lily/script-grav.cc b/lily/script-grav.cc index 597fe0809a..7d281253fe 100644 --- a/lily/script-grav.cc +++ b/lily/script-grav.cc @@ -1,7 +1,7 @@ /* script-reg.cc -- implement Script_engraver - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "script-grav.hh" diff --git a/lily/script.cc b/lily/script.cc index 491e6d655f..4014ed729c 100644 --- a/lily/script.cc +++ b/lily/script.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "script-def.hh" #include "musical-request.hh" diff --git a/lily/slur-grav.cc b/lily/slur-grav.cc index 732c4bd91d..55133511a3 100644 --- a/lily/slur-grav.cc +++ b/lily/slur-grav.cc @@ -1,7 +1,7 @@ /* slur-grav.cc -- implement Slur_engraver - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "proto.hh" diff --git a/lily/slur.cc b/lily/slur.cc index 4df6464f91..f091c426ca 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997 Han-Wen Nienhuys + (c) 1996, 1997--1998, 1998 Han-Wen Nienhuys Jan Nieuwenhuizen */ @@ -25,6 +25,7 @@ #include "debug.hh" #include "boxes.hh" #include "bezier.hh" +#include "encompass-info.hh" // #include "main.hh" IMPLEMENT_IS_TYPE_B1(Slur,Bow); @@ -93,8 +94,11 @@ Slur::do_post_processing () encompass_arr_.sort (Note_column_compare); if (!dir_) set_default_dir (); - Real interline_f = paper ()->interline_f (); - Real inter_f = interline_f / 2; + + Real interline = paper ()->interline_f (); + Real internote = interline / 2; + Real notewidth = paper ()->note_width (); + Real const SLUR_MIN = 2.0 * interline; /* [OSU]: slur and tie placement @@ -109,21 +113,23 @@ Slur::do_post_processing () * suggested gap = ss / 5; */ // jcn: 1/5 seems so small? - Real gap_f = interline_f / 2; // 5; + Real gap_f = interline / 2; // 5; Drul_array extrema; extrema[LEFT] = encompass_arr_[0]; extrema[RIGHT] = encompass_arr_.top (); Direction d=LEFT; - Real nw_f = paper ()->note_width (); do { + /* + broken slur + */ if (extrema[d] != spanned_drul_[d]) { dx_f_drul_[d] = -d - *(spanned_drul_[d]->width ().length () -0.5*nw_f); + *(spanned_drul_[d]->width ().length () -0.5*notewidth); Direction u = d; flip(&u); if ((extrema[u] == spanned_drul_[u]) && extrema[u]->stem_l_) @@ -131,147 +137,114 @@ Slur::do_post_processing () dy_f_drul_[d] = extrema[u]->stem_l_->height ()[dir_]; dy_f_drul_[u] = extrema[u]->stem_l_->height ()[dir_]; } + + // prebreak + if (d == RIGHT) + { + dx_f_drul_[LEFT] = spanned_drul_[LEFT]->width ().length (); +// dx_f_drul_[LEFT] -= 2 * notewidth; + + // urg + if (encompass_arr_.size () > 1) + dx_f_drul_[RIGHT] += notewidth; + } + + // postbreak + if (d == LEFT) + dy_f_drul_[d] += 2.0 * dir_ * internote; } + /* + normal slur + */ else if (extrema[d]->stem_l_ && !extrema[d]->stem_l_->transparent_b_) { dy_f_drul_[d] = (int)rint (extrema[d]->stem_l_->height ()[dir_]); - dx_f_drul_[d] += 0.5 * nw_f - d * gap_f; + dx_f_drul_[d] += 0.5 * notewidth - d * gap_f; if (dir_ == extrema[d]->stem_l_->dir_) { if (dir_ == d) - dx_f_drul_[d] += 0.5 * (dir_ * d) * d * nw_f; + dx_f_drul_[d] += 0.5 * (dir_ * d) * d * notewidth; else - dx_f_drul_[d] += 0.25 * (dir_ * d) * d * nw_f; + dx_f_drul_[d] += 0.25 * (dir_ * d) * d * notewidth; } } else { dy_f_drul_[d] = (int)rint (extrema[d]->head_positions_interval () - [dir_])* inter_f; + [dir_])* internote; } - dy_f_drul_[d] += dir_ * interline_f; + dy_f_drul_[d] += dir_ * interline; } while (flip(&d) != LEFT); + + // now that both are set, do dependent + do + { + /* + broken slur + */ + if (extrema[d] != spanned_drul_[d]) + { + // pre and post + if (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT] < SLUR_MIN) + { + dx_f_drul_[d] -= d * SLUR_MIN + - (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]); + dx_f_drul_[d] = dx_f_drul_[(Direction)-d] + d * SLUR_MIN; + } + dy_f_drul_[d] = dy_f_drul_[(Direction)-d]; + } + } + while (flip(&d) != LEFT); } Array Slur::get_encompass_offset_arr () const { - Real interline = paper ()->interline_f (); - Real notewidth = paper ()->note_width (); - Real internote = interline / 2; - - Stem* left_stem = encompass_arr_[0]->stem_l_; - Real left_x = left_stem->hpos_f (); - left_x += dx_f_drul_[LEFT]; + Offset left = Offset (dx_f_drul_[LEFT], dy_f_drul_[LEFT]); + left.x () += encompass_arr_[0]->stem_l_->hpos_f (); - Real left_y = dy_f_drul_[LEFT]; + Offset d = Offset (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT], + dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]); + d.x () += width ().length (); - Real dx = width ().length (); - dx += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]); - dx = dx ? 2.0 * interline; - - Real dy = (dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]); - if (abs (dy) > 1000) - dy = sign (dy) * 1000; - - Real start_x = 0; - Real start_y = left_y - dy_f_drul_[LEFT]; int first = 1; int last = encompass_arr_.size () - 1; - // broken slur first part + // prebreak if (encompass_arr_[0] != spanned_drul_[LEFT]) - { - first = 0; - left_x = spanned_drul_[LEFT]->width ().length (); - left_x -= 2 * notewidth; - // urg - start_x = left_x - 2 * notewidth; + first--; - // urg - if (encompass_arr_.size () > 1) - dx += notewidth; - - if (dx < 2.0 * interline) - { - left_x -= 2.0 * interline - dx; - dx = 2.0 * interline; - start_x = left_x; - } + // postbreak + if (encompass_arr_.top () != spanned_drul_[RIGHT]) + last++; - if (dir_ == UP) - left_y = left_y >? dy_f_drul_[LEFT]; - else - left_y = left_y notes; + notes.push (Offset (0,0)); - // broken slur second part - if (encompass_arr_.top () != spanned_drul_[RIGHT]) + for (int i = first; i < last; i++) { - left_y += 2.0 * dir_ * internote; - start_y = left_y - dy_f_drul_[LEFT]; - last += 1; - dy = 0; + Encompass_info info (encompass_arr_[i], dir_); + notes.push (info.o_ - left); } + notes.push (d); -#define RESIZE_ICE -#ifndef RESIZE_ICE - Array notes; - notes.push (Offset (start_x, start_y)); #else + int n = last - first + 2; Array notes (n); - notes[0] = Offset (start_x, start_y); -#endif + notes[0] = Offset (0,0); + for (int i = first; i < last; i++) { - Stem* stem = encompass_arr_[i]->stem_l_; - /* - set x to middle of notehead or on exact x position of stem, - according to slur direction - */ - Real x = stem->hpos_f (); - - if (stem->dir_ != dir_) - { - x += 0.5 * notewidth; - // ugh - if (dir_ == DOWN) - x -= 0.5 * notewidth; - else - x += 0.5 * notewidth; - } - else if (stem->dir_ == UP) - x += 1.0 * notewidth; - - x -= left_x; - - Real y = stem->height ()[dir_]; - - /* - leave a gap: slur mustn't touch head/stem - */ - y += 2.5 * internote * dir_; - - // ugh - if (dir_ == DOWN) - y += 1.5 * internote * dir_; - - y -= left_y; - -#ifndef RESIZE_ICE - notes.push (Offset (x, y)); + Encompass_info info (encompass_arr_[i], dir_); + notes[i - first + 1] = info.o_ - left; } - notes.push (Offset (start_x + dx, start_y + dy)); -#else - notes[i - first + 1] = Offset (x, y); - } - notes[n - 1] = Offset (start_x + dx, start_y + dy); + notes[n - 1] = Offset (d); + #endif return notes; diff --git a/lily/span-bar-grav.cc b/lily/span-bar-grav.cc index 727fe56c76..bacdcb3624 100644 --- a/lily/span-bar-grav.cc +++ b/lily/span-bar-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "span-bar.hh" diff --git a/lily/span-bar.cc b/lily/span-bar.cc index a371dc019d..e89b05352f 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "dimen.hh" diff --git a/lily/span-score-bar-grav.cc b/lily/span-score-bar-grav.cc index 78f949d1f0..8497cdc7c1 100644 --- a/lily/span-score-bar-grav.cc +++ b/lily/span-score-bar-grav.cc @@ -4,7 +4,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "span-score-bar.hh" diff --git a/lily/span-score-bar.cc b/lily/span-score-bar.cc index ffd7ce0763..6e921573c9 100644 --- a/lily/span-score-bar.cc +++ b/lily/span-score-bar.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "span-score-bar.hh" diff --git a/lily/spanner.cc b/lily/spanner.cc index 85221d3c94..839cf0d9b4 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include "debug.hh" diff --git a/lily/spring-spacer.cc b/lily/spring-spacer.cc index db27da7950..ac4b00b623 100644 --- a/lily/spring-spacer.cc +++ b/lily/spring-spacer.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996, 1997, 1998 Han-Wen Nienhuys + (c) 1996, 1997--1998, 1998 Han-Wen Nienhuys */ diff --git a/lily/staff-info.cc b/lily/staff-info.cc index 383df71ce1..1dbbd8407a 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "proto.hh" diff --git a/lily/staff-performer.cc b/lily/staff-performer.cc index 7270d20282..8bc8a049f9 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 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #include "staff-performer.hh" diff --git a/lily/staff-side.cc b/lily/staff-side.cc index 404283066c..7b99d06f99 100644 --- a/lily/staff-side.cc +++ b/lily/staff-side.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "interval.hh" diff --git a/lily/staff-sym-grav.cc b/lily/staff-sym-grav.cc index 6aab67dece..2e09bb5777 100644 --- a/lily/staff-sym-grav.cc +++ b/lily/staff-sym-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "staff-sym-grav.hh" diff --git a/lily/staff-sym.cc b/lily/staff-sym.cc index b22a36592f..d4b5f35eaf 100644 --- a/lily/staff-sym.cc +++ b/lily/staff-sym.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "staff-sym.hh" #include "lookup.hh" diff --git a/lily/stem-grav.cc b/lily/stem-grav.cc index 544da9c59f..a809545931 100644 --- a/lily/stem-grav.cc +++ b/lily/stem-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "stem-grav.hh" diff --git a/lily/stem-info.cc b/lily/stem-info.cc index 34aadfc976..11990ea3e7 100644 --- a/lily/stem-info.cc +++ b/lily/stem-info.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ @@ -23,14 +23,13 @@ Stem_info::Stem_info () Stem_info::Stem_info (Stem const *s) { - x = s->hpos_f (); + x_ = s->hpos_f (); dir_ = s->dir_; - beams_i_ = 0 >? (abs (s->flag_i_) - 2); + mult_i_ = s->mult_i_; /* [todo] - * get algorithm - * runtime + * get algorithm runtime Breitkopf + H\"artel: miny_f_ = interline + #beams * interbeam @@ -45,22 +44,54 @@ Stem_info::Stem_info (Stem const *s) */ Real internote_f = s->paper ()->internote_f (); - Real interline_f = 2 * internote_f; - Real notehead_y = interline_f; - // huh? why do i seem to need the / 2 ? + Real interline_f = 2.0 * internote_f; Real interbeam_f = s->paper ()->interbeam_f (); - // Real interbeam_f = s->paper ()->interbeam_f () / 2; - // perhaps bo dim (y) = internote? + Real staffline_f = s->paper ()->rule_thickness (); + Real beam_f = 0.48 * (interline_f - staffline_f); - idealy_f_ = dir_ * s->stem_begin_f () + beams_i_ * interbeam_f; - if (beams_i_ < 3) - idealy_f_ += 2 * interline_f; - else - idealy_f_ += 1.5 * interline_f; - idealy_f_ /= internote_f; - miny_f_ = dir_ * s->stem_begin_f () + 2 + beams_i_ * interbeam_f / internote_f; - - idealy_f_ = miny_f_ >? idealy_f_; - // assert (miny_f_ <= idealy_f_); + if (check_debug && !monitor->silent_b ("Stem_info")) + { + static int i = 1; + cout << "******" << i++ << "******" << endl; + cout << "begin_f: " << s->stem_begin_f () * dir_ << endl; + // urg urg urg + cout << "chord_f/i: " << s->chord_start_f () * dir_ / internote_f << endl; + } + + /* + For simplicity, we'll assume dir = UP and correct if + dir = DOWN afterwards. + */ + idealy_f_ = s->chord_start_f () * dir_ / internote_f; + idealy_f_ *= internote_f; + + idealy_f_ += interbeam_f * mult_i_; + + miny_f_ = idealy_f_; + + // B"arenreiter + if (mult_i_ < 3) + idealy_f_ += 2.0 * interline_f; + else + idealy_f_ += 1.5 * interline_f; + + miny_f_ += 1.0 * interline_f; + + // lowest beam of (UP) beam must never be lower than second staffline + miny_f_ = miny_f_ >? (- 2 * internote_f - beam_f + + (mult_i_ > 0) * beam_f + interbeam_f * (mult_i_ - 1)); + + idealy_f_ /= internote_f; + miny_f_ /= internote_f; + + if (check_debug && !monitor->silent_b ("Stem_info")) + { + cout << "dir_: " << dir_ << endl; + cout << "mult_i_: " << mult_i_ << endl; + cout << "idealy_f_: " << idealy_f_ << endl; + cout << "miny_f_: " << miny_f_ << endl; + } + + idealy_f_ = miny_f_ >? idealy_f_; } diff --git a/lily/stem.cc b/lily/stem.cc index 25fa1c13ff..a2361b4fe8 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys TODO: This is way too hairy */ @@ -32,6 +32,7 @@ Stem::Stem () beam_l_ = 0; beams_left_i_ = 0; beams_right_i_ = 0; + mult_i_ = 0; yextent_drul_[DOWN] = yextent_drul_[UP] = 0; flag_i_ = 2; diff --git a/lily/super-elem.cc b/lily/super-elem.cc index 3e9d8d0f70..ca153eb5da 100644 --- a/lily/super-elem.cc +++ b/lily/super-elem.cc @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "super-elem.hh" diff --git a/lily/swallow-grav.cc b/lily/swallow-grav.cc index a8fbfcd0f3..8c32a81a52 100644 --- a/lily/swallow-grav.cc +++ b/lily/swallow-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "swallow-grav.hh" diff --git a/lily/swallow-perf.cc b/lily/swallow-perf.cc index 6d8c55936e..5f2cbb2873 100644 --- a/lily/swallow-perf.cc +++ b/lily/swallow-perf.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "swallow-perf.hh" diff --git a/lily/symtable.cc b/lily/symtable.cc index 0be5fbf742..52ef9fefc0 100644 --- a/lily/symtable.cc +++ b/lily/symtable.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "misc.hh" diff --git a/lily/template1.cc b/lily/template1.cc index 3eee319eae..b4a5dbf209 100644 --- a/lily/template1.cc +++ b/lily/template1.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include "proto.hh" diff --git a/lily/template2.cc b/lily/template2.cc index 6aaeba4633..b9ea8f4ace 100644 --- a/lily/template2.cc +++ b/lily/template2.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "line-spacer.hh" diff --git a/lily/template3.cc b/lily/template3.cc index 672a7b2c24..5191f663c5 100644 --- a/lily/template3.cc +++ b/lily/template3.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "atom.hh" diff --git a/lily/template4.cc b/lily/template4.cc index 062c1e1a8d..8ff8142c7e 100644 --- a/lily/template4.cc +++ b/lily/template4.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #ifndef __CYGWIN32__ diff --git a/lily/template5.cc b/lily/template5.cc index 29bb496ff4..98b3dc89fd 100644 --- a/lily/template5.cc +++ b/lily/template5.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include @@ -15,7 +15,6 @@ #include "interval.tcc" template INTERVAL__INSTANTIATE(Rational); -template INTERVAL__INSTANTIATE(int); #include "compare.hh" @@ -33,14 +32,3 @@ Interval_t::T_to_str (Rational a) return a.str (); } -int -Interval_t::infinity() -{ - return INT_MAX; -} - -String -Interval_t::T_to_str (int i) -{ - return String (i); -} diff --git a/lily/template7.cc b/lily/template7.cc index e430260907..c38954bf2d 100644 --- a/lily/template7.cc +++ b/lily/template7.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "proto.hh" diff --git a/lily/template8.cc b/lily/template8.cc index 0f27440cff..2d24fce40a 100644 --- a/lily/template8.cc +++ b/lily/template8.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include "proto.hh" diff --git a/lily/tex-beam.cc b/lily/tex-beam.cc index 0a1de1398d..f2d07eb855 100644 --- a/lily/tex-beam.cc +++ b/lily/tex-beam.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ /* @@ -38,13 +38,13 @@ Lookup::rule_symbol (Real height, Real width) const } Atom -Lookup::beam(Real &slope, Real width, Real y_thick) const +Lookup::beam(Real slope, Real width, Real thick) const { - Atom a( ps_beam (slope, width, y_thick)); - Real slope_y =slope * width; - Real min_y = (0 ? slope_y) + y_thick/2; + Atom a (ps_beam (slope, width, thick)); + Real height = slope * width; + Real min_y = (0 ? height) + thick/2; a.dim_[X_AXIS] = Interval(0, width); a.dim_[Y_AXIS] = Interval(min_y, max_y); @@ -52,29 +52,14 @@ Lookup::beam(Real &slope, Real width, Real y_thick) const } Atom -Lookup::ps_beam (Real slope, Real width, Real y_thickness)const +Lookup::ps_beam (Real slope, Real width, Real thick) const { String ps = "\\embeddedps{\n"; - ps += String (width) + " "+ String (slope) + " " + String (y_thickness) + ps += String (width) + " "+ String (slope) + " " + String (thick) + " draw_beam}"; - /* - beam parts are rarely wider than 100pt: - precision of 4 yields maximum (half beam spanning half a page) - error of: 1%% * 3*72pt === 0.2pt = 0.07mm - */ - String width_str = String_convert::precision_str (width, 4); - String slope_str = String_convert::precision_str (slope, 4); - String thick_str = String_convert::precision_str (y_thickness, 3); - String name = "feta-beum-" + width_str + "-" + slope_str + "-" + thick_str; - - int i; - while ((i = name.index_i ('.')) != -1) - name[i]= 'x'; - - - Atom s; s.tex_ = ps; return s; } + diff --git a/lily/tex-stream.cc b/lily/tex-stream.cc index ed8ef91a53..91f26921b3 100644 --- a/lily/tex-stream.cc +++ b/lily/tex-stream.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/tex.cc b/lily/tex.cc index 19285561c1..04f3e9cf4a 100644 --- a/lily/tex.cc +++ b/lily/tex.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include "dimen.hh" diff --git a/lily/text-def.cc b/lily/text-def.cc index b81f2f5f96..6fdf2542d2 100644 --- a/lily/text-def.cc +++ b/lily/text-def.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1996,1997 Han-Wen Nienhuys + (c) 1996, 1997--1998 Han-Wen Nienhuys */ #include "debug.hh" diff --git a/lily/text-item.cc b/lily/text-item.cc index c471fa1453..6384ba2582 100644 --- a/lily/text-item.cc +++ b/lily/text-item.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index 9a4406b24a..1e4a53b2fb 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "molecule.hh" diff --git a/lily/tie-grav.cc b/lily/tie-grav.cc index 453a955072..a690cb36a1 100644 --- a/lily/tie-grav.cc +++ b/lily/tie-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "tie-grav.hh" diff --git a/lily/tie.cc b/lily/tie.cc index 799bebaaab..0d17f409ce 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "paper-def.hh" @@ -61,10 +61,12 @@ Tie::do_add_processing() void Tie::do_post_processing() { - Real nw_f = paper ()->note_width (); - Real interline_f = paper ()->interline_f (); assert (head_l_drul_[LEFT] || head_l_drul_[RIGHT]); + Real notewidth = paper ()->note_width (); + Real interline_f = paper ()->interline_f (); + Real const TIE_MIN = 2.0 * interline_f; + /* [OSU]: slur and tie placement @@ -91,24 +93,43 @@ Tie::do_post_processing() do { + // tie attached to outer notehead if (head_l_drul_[d] && head_l_drul_[d]->extremal_i_) { - /* normal tie between noteheads, with gap of space */ if (d == LEFT) - dx_f_drul_[d] += nw_f; + dx_f_drul_[d] += notewidth; dx_f_drul_[d] += -d * gap_f; /* attach to outer 3/4 end of head */ dy_f_drul_[d] += dir_ * 0.25 * interline_f; } + // tie attached to inner notehead else if (head_l_drul_[d]) { - dx_f_drul_[d] += d*0.5 * nw_f; + dx_f_drul_[d] += d*0.5 * notewidth; } + // uhm? loose end of tie // tie attached to stem else { - dy_f_drul_[d] = dy_f_drul_[(Direction) -d]; dx_f_drul_[d] = -d * (spanned_drul_[d]->width ().length () - -0.5 * nw_f); + -0.5 * notewidth); + } + } + while (flip(&d) != LEFT); + + // now that both are set, do dependent + do + { + // tie attached to outer notehead + if (!head_l_drul_[d]) + { + if (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT] < TIE_MIN) + { + dx_f_drul_[d] -= d * TIE_MIN + - (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]); + dx_f_drul_[d] = dx_f_drul_[(Direction)-d] + d * TIE_MIN; + } + + dy_f_drul_[d] = dy_f_drul_[(Direction) -d]; } } while (flip(&d) != LEFT); diff --git a/lily/time-description.cc b/lily/time-description.cc index 1437a7c441..e2b87d0fee 100644 --- a/lily/time-description.cc +++ b/lily/time-description.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "time-description.hh" diff --git a/lily/timing-grav.cc b/lily/timing-grav.cc index 8da02d6161..17f110fda3 100644 --- a/lily/timing-grav.cc +++ b/lily/timing-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "score-grav.hh" #include "timing-grav.hh" diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index de93a9206f..b244db903c 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "timing-translator.hh" diff --git a/lily/translation-property.cc b/lily/translation-property.cc index 483036be50..a5bc9d4850 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "translation-property.hh" diff --git a/lily/translator-ctors.cc b/lily/translator-ctors.cc index 2da67c365d..7a65215c81 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "proto.hh" diff --git a/lily/translator-group.cc b/lily/translator-group.cc index b91f254c38..5846c2bb37 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 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "music-output-def.hh" diff --git a/lily/translator.cc b/lily/translator.cc index 5655da8a15..ae5562579e 100644 --- a/lily/translator.cc +++ b/lily/translator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/lily/type-swallow-trans.cc b/lily/type-swallow-trans.cc index b90ced5d1b..bd85e40514 100644 --- a/lily/type-swallow-trans.cc +++ b/lily/type-swallow-trans.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "type-swallow-trans.hh" diff --git a/lily/vertical-align-elem.cc b/lily/vertical-align-elem.cc index 8cc0ecfd49..dbd8e4b8eb 100644 --- a/lily/vertical-align-elem.cc +++ b/lily/vertical-align-elem.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "vertical-align-elem.hh" diff --git a/lily/vertical-align-grav.cc b/lily/vertical-align-grav.cc index fe773a9375..8024ab5a50 100644 --- a/lily/vertical-align-grav.cc +++ b/lily/vertical-align-grav.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "p-col.hh" diff --git a/lily/vertical-align-spanner.cc b/lily/vertical-align-spanner.cc index 94a8c5ee72..cc8c0da9ab 100644 --- a/lily/vertical-align-spanner.cc +++ b/lily/vertical-align-spanner.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "vertical-align-spanner.hh" diff --git a/lily/vertical-group-elem.cc b/lily/vertical-group-elem.cc index ade65c5dd6..79e22317e0 100644 --- a/lily/vertical-group-elem.cc +++ b/lily/vertical-group-elem.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "vertical-group-elem.hh" diff --git a/lily/vertical-group-spanner.cc b/lily/vertical-group-spanner.cc index abae14aa02..c3a4c2a94c 100644 --- a/lily/vertical-group-spanner.cc +++ b/lily/vertical-group-spanner.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "vertical-group-spanner.hh" diff --git a/lily/voice-iterator.cc b/lily/voice-iterator.cc index a5b3d60711..971b22a924 100644 --- a/lily/voice-iterator.cc +++ b/lily/voice-iterator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "translator-group.hh" diff --git a/lily/warn.cc b/lily/warn.cc index 86604d5853..33261d8f5a 100644 --- a/lily/warn.cc +++ b/lily/warn.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "proto.hh" diff --git a/lily/word-wrap.cc b/lily/word-wrap.cc index c41e3ed9b2..d8c0804788 100644 --- a/lily/word-wrap.cc +++ b/lily/word-wrap.cc @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #include "word-wrap.hh" diff --git a/mi2mu/include/mi2mu-proto.hh b/mi2mu/include/mi2mu-proto.hh index da4d89ba54..c5cc781671 100644 --- a/mi2mu/include/mi2mu-proto.hh +++ b/mi2mu/include/mi2mu-proto.hh @@ -3,7 +3,7 @@ source file of mi2mu, part of the GNU LilyPond package, - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ diff --git a/mi2mu/include/midi-parser.hh b/mi2mu/include/midi-parser.hh index 3c1b491f65..cc883e2a1b 100644 --- a/mi2mu/include/midi-parser.hh +++ b/mi2mu/include/midi-parser.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ diff --git a/mi2mu/include/midi-score-parser.hh b/mi2mu/include/midi-score-parser.hh index f9c8b646d8..c13ea02727 100644 --- a/mi2mu/include/midi-score-parser.hh +++ b/mi2mu/include/midi-score-parser.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ diff --git a/mi2mu/include/midi-track-parser.hh b/mi2mu/include/midi-track-parser.hh index f973209655..0115adecd5 100644 --- a/mi2mu/include/midi-track-parser.hh +++ b/mi2mu/include/midi-track-parser.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ diff --git a/mi2mu/main.cc b/mi2mu/main.cc index 7f89342476..3ae4f39905 100644 --- a/mi2mu/main.cc +++ b/mi2mu/main.cc @@ -7,7 +7,7 @@ #include #include "string-convert.hh" #include "lgetopt.hh" -#include "path.hh" +#include "file-path.hh" #include "duration-convert.hh" #include "source.hh" diff --git a/mi2mu/midi-parser.cc b/mi2mu/midi-parser.cc index f1b71122e1..ad8e020d26 100644 --- a/mi2mu/midi-parser.cc +++ b/mi2mu/midi-parser.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #include diff --git a/mi2mu/midi-score-parser.cc b/mi2mu/midi-score-parser.cc index 7a787d062f..b0cac0c889 100644 --- a/mi2mu/midi-score-parser.cc +++ b/mi2mu/midi-score-parser.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #include "moment.hh" diff --git a/mi2mu/midi-track-parser.cc b/mi2mu/midi-track-parser.cc index fd87d2a7e9..ffc3380da3 100644 --- a/mi2mu/midi-track-parser.cc +++ b/mi2mu/midi-track-parser.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Jan Nieuwenhuizen + (c) 1997--1998 Jan Nieuwenhuizen */ #include diff --git a/mi2mu/mudela-stream.cc b/mi2mu/mudela-stream.cc index 42ba6695c3..2a869d647c 100644 --- a/mi2mu/mudela-stream.cc +++ b/mi2mu/mudela-stream.cc @@ -3,7 +3,7 @@ // // source file of the LilyPond music typesetter // -// (c) 1997 Jan Nieuwenhuizen +// (c) 1997--1998, 1998 Jan Nieuwenhuizen #include #include @@ -91,7 +91,7 @@ Mudela_stream::header() *os_p_ << filename_str_g; *os_p_ << "\n\n"; // ugh - *os_p_ << "\\version \"0.1.9\";\n"; + *os_p_ << "\\version \"0.1.10\";\n"; } void -- 2.39.5