From 1676f9b39b5df8ef6bdbef2a9b63d3f6ba64dace Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 23:24:29 +0000 Subject: [PATCH] lilypond-1.3.71 --- config.hh.in | 4 +- configure.in | 2 + flower/axis.cc | 1 + flower/binary-source-file.cc | 2 +- flower/direction.cc | 1 + flower/include/axes.hh | 2 +- flower/include/file-storage.hh | 2 +- flower/include/flower-proto.hh | 12 +- flower/include/input.hh | 2 +- flower/include/proto.hh | 22 +- flower/include/rational.hh | 2 +- flower/include/source-file.hh | 2 +- flower/include/source.hh | 2 +- flower/input.cc | 2 +- flower/mapped-file-storage.cc | 2 +- flower/source-file.cc | 2 +- flower/source.cc | 2 +- input/scarlatti-paper.ly | 25 ++ input/scarlatti-properties.ly | 15 + lily/beam.cc | 1 + lily/engraver-group-engraver.cc | 2 +- lily/extender-engraver.cc | 2 +- lily/font-metric.cc | 1 + lily/hyphen-engraver.cc | 2 +- lily/identifier.cc | 2 + lily/include/all-font-metrics.hh | 2 +- lily/include/audio-column.hh | 2 +- lily/include/audio-staff.hh | 1 - lily/include/beam.hh | 1 - lily/include/dimensions.hh | 2 +- lily/include/identifier.hh | 1 - lily/include/includable-lexer.hh | 3 +- lily/include/item.hh | 1 - lily/include/keyword.hh | 3 + lily/include/lily-guile.hh | 3 +- lily/include/lily-proto.hh | 444 +++++++++++---------------- lily/include/lookup.hh | 15 +- lily/include/midi-def.hh | 5 - lily/include/midi-item.hh | 1 - lily/include/midi-walker.hh | 1 - lily/include/music-list.hh | 1 + lily/include/music-output-def.hh | 12 +- lily/include/my-lily-lexer.hh | 2 - lily/include/paper-def.hh | 16 +- lily/include/score.hh | 3 - lily/include/tfm.hh | 4 + lily/include/translator-group.hh | 5 +- lily/include/translator.hh | 2 - lily/midi-def.cc | 28 +- lily/midi-item.cc | 1 - lily/multi-measure-rest-engraver.cc | 1 - lily/music-list.cc | 5 - lily/music-output-def.cc | 2 + lily/music-sequence.cc | 6 + lily/music.cc | 2 - lily/my-lily-parser.cc | 2 +- lily/paper-def.cc | 47 +-- lily/parser.yy | 6 +- lily/repeated-music.cc | 9 +- lily/script.cc | 4 +- lily/slur-engraver.cc | 1 - lily/slur.cc | 2 +- lily/spacing-engraver.cc | 2 +- lily/spacing-spanner.cc | 2 +- lily/sustain-pedal.cc | 1 + lily/system-start-delimiter.cc | 2 +- lily/template5.cc | 1 - lily/tie-engraver.cc | 10 +- lily/tie.cc | 8 +- lily/translator-ctors.cc | 1 - lily/translator-group.cc | 16 +- lily/warn.cc | 1 - lilypond-mode.el | 2 +- midi2ly/duration.cc | 2 +- midi2ly/include/midi-parser.hh | 2 +- midi2ly/include/midi-score-parser.hh | 2 +- midi2ly/include/midi-track-parser.hh | 2 +- midi2ly/include/midi2ly-global.hh | 4 +- midi2ly/include/mudela-column.hh | 14 +- midi2ly/include/mudela-score.hh | 2 +- midi2ly/include/mudela-staff.hh | 2 +- midi2ly/version.cc | 2 +- 82 files changed, 374 insertions(+), 464 deletions(-) create mode 100644 input/scarlatti-paper.ly create mode 100644 input/scarlatti-properties.ly diff --git a/config.hh.in b/config.hh.in index 833c0eec00..4272e0b1c7 100644 --- a/config.hh.in +++ b/config.hh.in @@ -31,5 +31,5 @@ #define DIRSEP '@DIRSEP@' #define PATHSEP '@PATHSEP@' -/* define GUILE-ification */ -#undef HAVE_LIBGUILE +/* define if no assert */ +#define HAVE_ASSERT_H 1 diff --git a/configure.in b/configure.in index 9d2b9cc58b..07ca6f4bc4 100644 --- a/configure.in +++ b/configure.in @@ -14,6 +14,7 @@ AC_CONFIG_SUBDIRS(stepmake) # Uncomment the configuration options your package needs. AC_STEPMAKE_COMPILE # AC_HAVE_HEADERS(limits.h malloc.h string.h unistd.h values.h) +AC_HAVE_HEADERS(assert.h) printing_b=no AC_ARG_ENABLE(printing, @@ -61,3 +62,4 @@ AC_PATH_PROG(PERL, perl, error) AC_STEPMAKE_END +# ugh, hack. diff --git a/flower/axis.cc b/flower/axis.cc index ed55fddc49..8814f7723e 100644 --- a/flower/axis.cc +++ b/flower/axis.cc @@ -8,6 +8,7 @@ #include #include "axes.hh" +#include "string.hh" String axis_name_str (Axis a) diff --git a/flower/binary-source-file.cc b/flower/binary-source-file.cc index eb6cbbb0ba..a551244489 100644 --- a/flower/binary-source-file.cc +++ b/flower/binary-source-file.cc @@ -10,7 +10,7 @@ #include // INT_MAX #include -#include "proto.hh" +#include "flower-proto.hh" #include "string.hh" #include "source-file.hh" #include "binary-source-file.hh" diff --git a/flower/direction.cc b/flower/direction.cc index aeddc311a2..f28077dc85 100644 --- a/flower/direction.cc +++ b/flower/direction.cc @@ -8,6 +8,7 @@ */ #include "direction.hh" +#include "string.hh" String direction_str (Direction d, Axis a) diff --git a/flower/include/axes.hh b/flower/include/axes.hh index a1f290f8a9..c863fdda1f 100644 --- a/flower/include/axes.hh +++ b/flower/include/axes.hh @@ -17,7 +17,7 @@ enum Axis { }; -#include "string.hh" // ugh +class String; String axis_name_str (Axis); diff --git a/flower/include/file-storage.hh b/flower/include/file-storage.hh index 7fbcccad58..5af256f710 100644 --- a/flower/include/file-storage.hh +++ b/flower/include/file-storage.hh @@ -10,7 +10,7 @@ #ifndef FILE_STORAGE_HH #define FILE_STORAGE_HH -#include "proto.hh" +#include "flower-proto.hh" /** diff --git a/flower/include/flower-proto.hh b/flower/include/flower-proto.hh index a900c33dc9..cad9bff1f2 100644 --- a/flower/include/flower-proto.hh +++ b/flower/include/flower-proto.hh @@ -1,6 +1,6 @@ /* - fproto.hh -- typenames in flowerlib + fflower-proto.hh -- typenames in flowerlib (c) 1996 Han-Wen Nienhuys */ @@ -52,6 +52,16 @@ typedef long long I64; typedef unsigned char Byte; +struct Duration; +struct Duration_iterator; +struct Source_file; +struct Binary_source_file; +struct Sources; +struct File_storage; +struct Mapped_file_storage; +struct Simple_file_storage; + + #endif // FPROTO_HH diff --git a/flower/include/input.hh b/flower/include/input.hh index 1c9e61ccbf..44f2bb90da 100644 --- a/flower/include/input.hh +++ b/flower/include/input.hh @@ -10,7 +10,7 @@ #ifndef INPUT_HH #define INPUT_HH -#include "proto.hh" +#include "flower-proto.hh" /** Base class for anything that records its poisition in the parse file. diff --git a/flower/include/proto.hh b/flower/include/proto.hh index 7ddc874434..65296f8106 100644 --- a/flower/include/proto.hh +++ b/flower/include/proto.hh @@ -1,22 +1,2 @@ -/* - proto.hh -- part of LilyPond - - (c) 1996,97 Han-Wen Nienhuys -*/ - -#ifndef PROTO_HH -#define PROTO_HH - -#include "flower-proto.hh" -#include "real.hh" -struct Duration; -struct Duration_iterator; -struct Source_file; -struct Binary_source_file; -struct Sources; -struct File_storage; -struct Mapped_file_storage; -struct Simple_file_storage; - -#endif // PROTO_HH +#error diff --git a/flower/include/rational.hh b/flower/include/rational.hh index 1058d784c4..69a9ab1bd2 100644 --- a/flower/include/rational.hh +++ b/flower/include/rational.hh @@ -14,7 +14,7 @@ #include "compare.hh" #include "arithmetic-operator.hh" #include "flower-proto.hh" -#include "string.hh" +class String; /** Rational numbers. Included is support for + and - infinity. diff --git a/flower/include/source-file.hh b/flower/include/source-file.hh index 560ab09ed9..26c0b021f4 100644 --- a/flower/include/source-file.hh +++ b/flower/include/source-file.hh @@ -6,7 +6,7 @@ #ifndef SOURCE_FILE_HH #define SOURCE_FILE_HH -#include "proto.hh" +#include "flower-proto.hh" #include "string.hh" #include "interval.hh" diff --git a/flower/include/source.hh b/flower/include/source.hh index 711f453c05..20ebdb02f3 100644 --- a/flower/include/source.hh +++ b/flower/include/source.hh @@ -6,7 +6,7 @@ #ifndef SOURCE_HH #define SOURCE_HH #include "cons.hh" -#include "proto.hh" +#include "flower-proto.hh" /** a set of sourcefiles. diff --git a/flower/input.cc b/flower/input.cc index a33552ec8a..7483606ba0 100644 --- a/flower/input.cc +++ b/flower/input.cc @@ -6,7 +6,7 @@ (c) 1997--2000 Han-Wen Nienhuys */ #include -#include "proto.hh" +#include "flower-proto.hh" #include "input.hh" #include "string.hh" #include "source.hh" diff --git a/flower/mapped-file-storage.cc b/flower/mapped-file-storage.cc index 2c5ad32708..ebc81fca30 100644 --- a/flower/mapped-file-storage.cc +++ b/flower/mapped-file-storage.cc @@ -30,7 +30,7 @@ #endif #include "string.hh" -#include "proto.hh" +#include "flower-proto.hh" #include "warn.hh" #include "file-storage.hh" diff --git a/flower/source-file.cc b/flower/source-file.cc index c5e5b1dd34..65e4674b46 100644 --- a/flower/source-file.cc +++ b/flower/source-file.cc @@ -12,7 +12,7 @@ #include #include "string.hh" -#include "proto.hh" +#include "flower-proto.hh" #include "warn.hh" #include "source-file.hh" #include "simple-file-storage.hh" diff --git a/flower/source.cc b/flower/source.cc index f3b5874547..8623548e25 100644 --- a/flower/source.cc +++ b/flower/source.cc @@ -11,7 +11,7 @@ #include "killing-cons.tcc" #include "binary-source-file.hh" #include "string.hh" -#include "proto.hh" +#include "flower-proto.hh" #include "source-file.hh" #include "source.hh" #include "file-path.hh" diff --git a/input/scarlatti-paper.ly b/input/scarlatti-paper.ly new file mode 100644 index 0000000000..8ed8e1e2a7 --- /dev/null +++ b/input/scarlatti-paper.ly @@ -0,0 +1,25 @@ +\paper{ + %my standard paper block + 0=\font "feta19" + -1=\font "feta16" + arithmetic_multiplier=7.\pt; + indent=0.; + linewidth=188.\mm; + forced_stem_shorten0=0.; + forced_stem_shorten1=0.; + forced_stem_shorten2=0.; + forced_stem_shorten3=0.; + \translator{ + \PianoStaffContext + maxVerticalAlign=42.\pt; + minVerticalAlign=42.\pt; + } + \translator{\StaffContext + timeSignatureStyle="C";} + \translator{\VoiceContext + noStemExtend = ##t + tupletVisibility = ##f + } +} + + diff --git a/input/scarlatti-properties.ly b/input/scarlatti-properties.ly new file mode 100644 index 0000000000..3a86facf1c --- /dev/null +++ b/input/scarlatti-properties.ly @@ -0,0 +1,15 @@ + + +rh=\property Thread.noteHeadStyle=##f +lh=\property Thread.noteHeadStyle = #'diamond +n=\property Thread.fontSize=#0 +sm=\property Thread.fontSize=#-1 +su=\property Voice.verticalDirection=#1 +sd=\property Voice.verticalDirection=#-1 +zs=\property Voice.forceHorizontalShift=#0.0 +ls=\property Voice.forceHorizontalShift=#-0.6 +sls=\property Voice.forceHorizontalShift=#-0.22 +rs=\property Voice.forceHorizontalShift=#0.6 +srs=\property Voice.forceHorizontalShift=#0.22 +ab=\property Voice.noAutoBeaming=##f +xb=\property Voice.noAutoBeaming=##t diff --git a/lily/beam.cc b/lily/beam.cc index 9e59ec6485..32bffce8dc 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -10,6 +10,7 @@ /* [TODO] + * shorter! (now +- 1000 lines) * less hairy code * move paper vars to scm diff --git a/lily/engraver-group-engraver.cc b/lily/engraver-group-engraver.cc index a3e71087cd..db7a7d79dd 100644 --- a/lily/engraver-group-engraver.cc +++ b/lily/engraver-group-engraver.cc @@ -6,7 +6,7 @@ (c) 1997--2000 Han-Wen Nienhuys */ -#include "proto.hh" +#include "flower-proto.hh" #include "engraver-group-engraver.hh" #include "engraver.hh" #include "debug.hh" diff --git a/lily/extender-engraver.cc b/lily/extender-engraver.cc index 4be468180c..21a246d713 100644 --- a/lily/extender-engraver.cc +++ b/lily/extender-engraver.cc @@ -6,7 +6,7 @@ */ -#include "proto.hh" +#include "flower-proto.hh" #include "musical-request.hh" #include "lyric-extender.hh" #include "paper-column.hh" diff --git a/lily/font-metric.cc b/lily/font-metric.cc index 220eb2a469..4443aa6399 100644 --- a/lily/font-metric.cc +++ b/lily/font-metric.cc @@ -13,6 +13,7 @@ #include "ly-smobs.icc" #include "font-metric.hh" +#include "string.hh" Box Font_metric::text_dimension (String text) const diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc index cb276bcf4e..9625b16f02 100644 --- a/lily/hyphen-engraver.cc +++ b/lily/hyphen-engraver.cc @@ -4,7 +4,7 @@ (c) 1999 Glen Prideaux */ -#include "proto.hh" +#include "flower-proto.hh" #include "musical-request.hh" #include "hyphen-spanner.hh" #include "paper-column.hh" diff --git a/lily/identifier.cc b/lily/identifier.cc index c35350b07d..c82598ed5e 100644 --- a/lily/identifier.cc +++ b/lily/identifier.cc @@ -6,6 +6,7 @@ (c) 1997--2000 Han-Wen Nienhuys */ + /* JUNKTHIS! */ @@ -19,6 +20,7 @@ #include "translator-group.hh" #include "ly-smobs.icc" + IMPLEMENT_UNSMOB(Identifier, identifier); IMPLEMENT_SMOBS(Identifier); diff --git a/lily/include/all-font-metrics.hh b/lily/include/all-font-metrics.hh index 02d59dae09..b01ad19119 100644 --- a/lily/include/all-font-metrics.hh +++ b/lily/include/all-font-metrics.hh @@ -10,7 +10,7 @@ #ifndef ALL_FONTS_HH #define ALL_FONTS_HH -#include "dictionary.hh" + #include "file-path.hh" #include "lily-proto.hh" #include "font-metric.hh" diff --git a/lily/include/audio-column.hh b/lily/include/audio-column.hh index 5b6f8d4d8a..fb7e150d67 100644 --- a/lily/include/audio-column.hh +++ b/lily/include/audio-column.hh @@ -7,7 +7,7 @@ #ifndef AUDIO_COLUMN_HH #define AUDIO_COLUMN_HH -#include "proto.hh" +#include "flower-proto.hh" #include "lily-proto.hh" #include "moment.hh" #include "parray.hh" diff --git a/lily/include/audio-staff.hh b/lily/include/audio-staff.hh index 89d701b81f..0413ad0508 100644 --- a/lily/include/audio-staff.hh +++ b/lily/include/audio-staff.hh @@ -7,7 +7,6 @@ #ifndef AUDIO_STAFF_HH #define AUDIO_STAFF_HH -#include "proto.hh" #include "parray.hh" #include "lily-proto.hh" #include "audio-element.hh" diff --git a/lily/include/beam.hh b/lily/include/beam.hh index b83254e1c5..5a434fd9ed 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -36,7 +36,6 @@ public: static Real rest_collision_callback (Score_element *,Axis); Beam (SCM); static void add_stem (Score_element*,Score_element*); - static void set_grouping (Score_element*,Rhythmic_grouping def, Rhythmic_grouping current); static void set_beaming (Score_element*,Beaming_info_list *); static void set_stemlens (Score_element*); static int get_multiplicity (Score_element*me); diff --git a/lily/include/dimensions.hh b/lily/include/dimensions.hh index 896af5dc42..8fe9487fcd 100644 --- a/lily/include/dimensions.hh +++ b/lily/include/dimensions.hh @@ -2,7 +2,7 @@ #define DIMENSIONS_HH #include "real.hh" -#include "string.hh" +class String; const Real INCH_TO_PT=72.270; const Real CM_TO_PT=INCH_TO_PT/2.54; diff --git a/lily/include/identifier.hh b/lily/include/identifier.hh index adceafb6c9..cb9b8b6fdf 100644 --- a/lily/include/identifier.hh +++ b/lily/include/identifier.hh @@ -77,7 +77,6 @@ struct Class ## _identifier : Identifier {\ DECLARE_ID_CLASS(Translator_group); DECLARE_ID_CLASS(Duration); -DECLARE_ID_CLASS(General_script_def); DECLARE_ID_CLASS(Music); DECLARE_ID_CLASS(Score); DECLARE_ID_CLASS(Request); diff --git a/lily/include/includable-lexer.hh b/lily/include/includable-lexer.hh index 6b54d9a573..1be193910a 100644 --- a/lily/include/includable-lexer.hh +++ b/lily/include/includable-lexer.hh @@ -14,8 +14,7 @@ #include "string.hh" #include "parray.hh" -#include "flower-proto.hh" -#include "proto.hh" +#include "lily-proto.hh" // GIGA urg! typedef struct yy_buffer_state *YY_BUFFER_STATE; diff --git a/lily/include/item.hh b/lily/include/item.hh index 16f298f7f2..3a84af0def 100644 --- a/lily/include/item.hh +++ b/lily/include/item.hh @@ -10,7 +10,6 @@ #include "box.hh" -#include "string.hh" #include "score-element.hh" #include "drul-array.hh" #include "protected-scm.hh" diff --git a/lily/include/keyword.hh b/lily/include/keyword.hh index 2db22765e0..6edecf9c52 100644 --- a/lily/include/keyword.hh +++ b/lily/include/keyword.hh @@ -14,6 +14,9 @@ struct Keyword_ent int tokcode; }; +/* + junkme, use hash table. + */ struct Keyword_table { Keyword_ent *table; diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index 89ff1a2c29..3dc1f64f16 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -9,11 +9,10 @@ #ifndef LILY_GUILE_HH #define LILY_GUILE_HH -#include "string.hh" - #include #include #include "direction.hh" +#include "flower-proto.hh" #ifndef SCM_PACK #define SCM_PACK(x) ((SCM) x) diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index e2c3393a5b..b63843e6d1 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -1,274 +1,192 @@ /* - lily-proto.hh -- declare class names. + lily-proto.hh -- declare class names. - source file of the GNU LilyPond music typesetter + source file of the GNU LilyPond music typesetter - (c) 1997--2000 Han-Wen Nienhuys + (c) 1997--2000 Han-Wen Nienhuys */ #ifndef LILY_PROTO_HH #define LILY_PROTO_HH -#include "proto.hh" +#include "flower-proto.hh" -struct Absolute_dynamic_req; -struct Adobe_font_char_metric; -struct Adobe_font_metric; -struct Align_element; -struct All_font_metrics; -struct Articulation_req; -struct Audio_column; -struct Audio_dynamic; -struct Audio_element; -struct Audio_element_info; -struct Audio_instrument; -struct Audio_item; -struct Audio_key; -struct Audio_note; -struct Audio_note_off; -struct Audio_staff; -struct Audio_tempo; -struct Audio_text; -struct Audio_tie; -struct Audio_time_signature; -struct Auto_beam_engraver; -struct Axis_align_item; -struct Bar; -struct Bar_column; -struct Bar_column_engraver; -struct Bar_engraver; -struct Bar_req; -struct Barcheck_req; -struct Bass_req; -struct Beam; -struct Beam_engraver; -struct Beaming_info; -struct Beaming_info_list; -struct Bezier; -struct Bezier_bow; -struct Blank_req; -struct Bow; -struct Box; -struct Bracket_req; -struct Break_align_item; -struct Break_req; -struct CHyphen_req; -struct Cadenza_req; -struct Change_iterator; -struct Change_translator; -struct Chord; -struct Chord_name; -struct Chord_name_engraver; -struct Chord_tremolo_engraver; -struct Clef_change_req; -struct Clef_engraver; -struct Clef_item; -struct Clef_performer; -struct Collision; -struct Collision_engraver; -struct Column_info; -struct Column_spring; -struct Column_x_positions; -struct Command_req; -struct Command_script_req; -struct Command_tie_engraver; -struct Crescendo ; -struct Dimension_cache; -struct Dynamic_performer; -struct Spanner; -struct Dot_column; -struct Dots; -struct Durational_req; -struct Dynamic; -struct Dynamic_req; -struct Element_group; -struct Element_group_item; -struct Engraver; -struct Engraver_group_engraver; -struct Extender; -struct Extender_req; -struct Folded_repeat_iterator; -struct Font_metric; -struct General_script_def; -struct Global_translator; -struct Grace_align_item; -struct Hara_kiri_group_spanner; -struct Hara_kiri_line_group_engraver; -struct Head_column; -struct Idealspacing; -struct Identifier; -struct Input_file; -struct Inversion_req; -struct Item; -struct Key; -struct Key_change_req; -struct Key_engraver; -struct Key_item; -struct Key_performer; -struct Keyword; -struct Keyword_table; -struct Left_edge_item; -struct Lily_stream; -struct Line_group_engraver; -struct Line_of_score; -struct Line_of_staff; -struct Linestaff; -struct Local_key; -struct Local_key_engraver; -struct Local_key_item; -struct Lookup; -struct Lyric_item; -struct Lyric_req; -struct Mark_req; -struct Measure_grouping_req; -struct Melodic_req; -struct Midi_def; -struct Midi_duration; -struct Midi_dynamic; -struct Midi_header; -struct Midi_item; -struct Midi_key; -struct Midi_note; -struct Midi_note_event; -struct Midi_note_off; -struct Midi_output; -struct Midi_score; -struct Midi_stream; -struct Midi_tempo; -struct Midi_time_signature; -struct Midi_track; -struct Midi_walker; -struct Mixed_qp; -struct Molecule; -struct Multi_measure_rest; -struct Multi_measure_rest_engraver; -struct Multi_measure_rest_req; -struct Music; -struct Music_iterator; -struct Music_list; -struct Music_list_iterator; -struct Music_output; -struct Music_output_def; -struct Music_sequence; -struct Music_wrapper; -struct Music_wrapper_iterator; -struct Musical_pitch; -struct Musical_req; -struct Musical_script_req; -struct Musical_span_req; -struct My_lily_lexer; -struct My_lily_parser; -struct Note_column; -struct Note_column_engraver; -struct Note_head; -struct Note_head_engraver; -struct Note_performer; -struct Note_req; -struct Notename_table; -struct Offset; -struct Paper_column; -struct Polynomial; -struct Paper_def; -struct Paper_outputter; -struct Paper_score; -struct Paper_stream; -struct Partial_measure_req; -struct Performance; -struct Performer; -struct Performer; -struct Performer_group_performer; -struct Piano_brace; -struct Property_iterator; -struct Rational; -struct Re_rhythmed_music; -struct Relative_octave_music; -struct Repeat_engraver; -struct Repeated_music; -struct Repeated_music; -struct Repeated_music_iterator; -struct Request; -struct Request_chord; -struct Request_column; -struct Rest; -struct Rest_collision; -struct Rest_collision_engraver; -struct Rest_req; -struct Rhythmic_grouping; -struct Rhythmic_grouping_req; -struct Rhythmic_head; -struct Rhythmic_req; -struct Scope; -struct Score; -struct Score_column; -struct Score_element; -struct Score_element_info; -struct Score_performer; -struct Script; -struct Script_req; -struct Separating_group_spanner; -struct Sequential_music; -struct Simple_music; -struct Simple_spacer; -struct Simultaneous_music; -struct Single_malt_grouping_item; -struct Skip_req; -struct Slur; -struct Slur_bezier_bow; -struct Slur_engraver; -struct Spacing_spanner; -struct Span_bar; -struct Span_req; -struct Span_score_bar; -struct Spanner; -struct Spring; -struct Spring_spacer; -struct Staff_bracket; -struct Staff_performer; -struct Staff_side; -struct Staff_side_item; -struct Staff_symbol; -struct Stem; -struct Stem_beam_engraver; -struct Stem_req; -struct Stem_tremolo; -struct String; -struct Super_element; -struct Symtable; -struct Symtables; -struct Tempo_req; -struct Tex_font_char_metric; -struct Tex_font_metric; -struct Tex_font_metric_reader; -struct Text_def; -struct Text_engraver; -struct Text_gob; -struct Item ; -struct Text_req; -struct Text_spanner; -struct Tie; -struct Tie_engraver; -struct Tie_req; -struct Time_description; -struct Time_scaled_music; -struct Time_scaled_music_iterator; -struct Time_signature; -struct Time_signature_change_req; -struct Time_signature_engraver; -struct Time_signature_performer; -struct Timing_engraver; -struct Timing_req; -struct Timing_translator; -struct Tonic_req; -struct Translation_property; -struct Translator; -struct Translator_group; -struct Tremolo_req; -struct Tuplet_spanner; -struct Unfolded_repeat_iterator; -struct Vertical_brace; -struct Volta_spanner; -struct Moment; - -#endif // LILY_PROTO_HH +class Adobe_font_metric; +class All_font_metrics; +class Articulation_req; +class Audio_column; +class Audio_dynamic; +class Audio_element; +class Audio_instrument; +class Audio_item; +class Audio_key; +class Audio_note; +class Audio_piano_pedal; +class Audio_staff; +class Audio_tempo; +class Audio_text; +class Audio_tie; +class Audio_time_signature; +class Auto_change_iterator; +class Auto_change_music; +class Axis_group_engraver; +class Bar_engraver; +class Bar_req; +class Bar_req_collect_engraver; +class Barcheck_req; +class Base_span_bar_engraver; +class Bass_req; +class Beaming_info_list; +class Bezier; +class Bezier_bow; +class Break_algorithm; +class Break_req; +class Breathing_sign_req; +class Busy_playing_req; +class Change_iterator; +class Change_translator; +class Chord_tremolo_iterator; +class Clef_change_req; +class Column_x_positions; +class Context_specced_music; +class Engraver; +class Engraver; +class Engraver_group_engraver; +class Extender_req; +class Folded_repeat_iterator; +class Font_metric; +class Font_size_engraver; +class Global_translator; +class Gourlay_breaking; +class Grace_engraver_group; +class Grace_iterator; +class Grace_music; +class Grace_performer_group; +class Hara_kiri_engraver; +class Hara_kiri_line_group_engraver; +class Hyphen_req; +class Identifier; +class Includable_lexer; +class Input; +class Inversion_req; +class Item; +class Key_change_req; +class Key_performer; +class Keyword_ent; +class Keyword_table; +class Line_group_engraver_group; +class Line_of_score; +class Local_key_item; +class Lookup; +class Lyric_combine_music; +class Lyric_combine_music_iterator; +class Lyric_engraver; +class Lyric_performer; +class Lyric_req; +class Mark_req; +class Melisma_playing_req; +class Melisma_req; +class Melodic_req; +class Midi_chunk; +class Midi_def; +class Midi_duration; +class Midi_dynamic; +class Midi_header; +class Midi_instrument; +class Midi_item; +class Midi_key; +class Midi_note; +class Midi_note_event; +class Midi_note_off; +class Midi_piano_pedal; +class Midi_stream; +class Midi_tempo; +class Midi_text; +class Midi_time_signature; +class Midi_track; +class Molecule; +class Moment; +class Music; +class Music_iterator; +class Music_list; +class Music_output; +class Music_output_def; +class Music_sequence; +class Music_wrapper; +class Music_wrapper_iterator; +class Musical_pitch; +class Musical_req; +class My_lily_lexer; +class Note_performer; +class Note_req; +class Output_property; +class Paper_column; +class Paper_def; +class Paper_outputter; +class Paper_score; +class Paper_stream; +class Performance; +class Performer; +class Performer_group_performer; +class Piano_bar_engraver; +class Pitch_interrogate_req; +class Pitch_squash_engraver; +class Property_iterator; +class Rational; +class Relative_octave_music; +class Repeated_music; +class Request; +class Request_chord; +class Request_chord_iterator; +class Rest_req; +class Rhythmic_req; +class Scaled_font_metric; +class Scheme_hash_table; +class Scope; +class Score; +class Score_element; +class Score_engraver; +class Score_performer; +class Script_req; +class Sequential_music; +class Sequential_music_iterator; +class Simple_music_iterator; +class Simple_spacer; +class Simultaneous_music; +class Simultaneous_music_iterator; +class Skip_req; +class Slur_bezier_bow; +class Span_req; +class Span_score_bar_engraver; +class Spanner; +class Staff_group_bar_engraver; +class Staff_performer; +class Swallow_engraver; +class Swallow_performer; +class Tempo_performer; +class Tempo_req; +class Tex_font_metric; +class Text_script_req; +class Tie; +class Tie_performer; +class Tie_req; +class Time_scaled_music; +class Time_scaled_music_iterator; +class Time_signature_change_req; +class Time_signature_performer; +class Timing_engraver; +class Timing_req; +class Timing_translator; +class Tonic_req; +class Translation_property; +class Translator; +class Translator_change; +class Translator_group; +class Transposed_music; +class Tremolo_req; +class Type_swallow_translator; +class Unfolded_repeat_iterator; +class yyFlexLexer; +#endif // LILY_PROTO_HH; diff --git a/lily/include/lookup.hh b/lily/include/lookup.hh index 4563501ecc..d0f5e33f2c 100644 --- a/lily/include/lookup.hh +++ b/lily/include/lookup.hh @@ -10,7 +10,9 @@ #ifndef LOOKUP_HH #define LOOKUP_HH +#include "smobs.hh" #include "lily-guile.hh" +#include "string.hh" #include "molecule.hh" #include "flower-proto.hh" #include "direction.hh" @@ -22,14 +24,19 @@ */ class Lookup { -public: - String font_name_; - Adobe_font_metric * afm_l_; Lookup (); Lookup (Lookup const&); + friend class Brutus; // kai su, teknon. (make GCC shut up.) + +public: + DECLARE_SMOBS; + static SCM make_lookup (); + String font_name_; + Adobe_font_metric * afm_l_; + Molecule afm_find (String, bool warn=true) const; Molecule accordion (SCM arg, Real interline_f) const; @@ -41,5 +48,5 @@ public: static Molecule filledbox (Box b) ; static Molecule text (String style, String text, Paper_def*) ; }; - +Lookup* unsmob_lookup (SCM); #endif // LOOKUP_HH diff --git a/lily/include/midi-def.hh b/lily/include/midi-def.hh index 6d65f6baea..adf7a3e792 100644 --- a/lily/include/midi-def.hh +++ b/lily/include/midi-def.hh @@ -25,15 +25,10 @@ class Midi_def : public Music_output_def { public: VIRTUAL_COPY_CONS(Music_output_def); - /// duration of whole note measured in seconds. - Moment whole_in_seconds_mom_; - Midi_def(); ~Midi_def(); - Real length_mom_to_seconds_f (Moment); int get_tempo_i (Moment moment); - void print() const; void set_tempo (Moment moment, int count_per_minute_i); virtual int get_next_default_count () const; static void reset_default_count(); diff --git a/lily/include/midi-item.hh b/lily/include/midi-item.hh index 2dac25e853..2fc7721c21 100644 --- a/lily/include/midi-item.hh +++ b/lily/include/midi-item.hh @@ -10,7 +10,6 @@ #include "cons.hh" #include "string.hh" #include "lily-proto.hh" -#include "proto.hh" #include "moment.hh" #include "audio-item.hh" diff --git a/lily/include/midi-walker.hh b/lily/include/midi-walker.hh index 522660ee45..9b4c88ca90 100644 --- a/lily/include/midi-walker.hh +++ b/lily/include/midi-walker.hh @@ -8,7 +8,6 @@ #ifndef MIDI_WALKER_HH #define MIDI_WALKER_HH -#include "proto.hh" #include "pqueue.hh" #include "lily-proto.hh" #include "moment.hh" diff --git a/lily/include/music-list.hh b/lily/include/music-list.hh index 98b2ce82ed..386cf49fae 100644 --- a/lily/include/music-list.hh +++ b/lily/include/music-list.hh @@ -37,6 +37,7 @@ public: Music_sequence (Music_list *l_p); VIRTUAL_COPY_CONS(Music); + Musical_pitch do_relative_octave (Musical_pitch p, bool b); virtual void transpose (Musical_pitch ); virtual void compress (Moment); diff --git a/lily/include/music-output-def.hh b/lily/include/music-output-def.hh index 4b4c0f3d1c..eb20e22d11 100644 --- a/lily/include/music-output-def.hh +++ b/lily/include/music-output-def.hh @@ -13,8 +13,6 @@ #include "string.hh" #include "lily-proto.hh" #include "virtual-methods.hh" -#include "dictionary.hh" -#include "scm-hash.hh" /** Definition of how to output mudela. @@ -24,15 +22,12 @@ class Music_output_def Scope *translator_p_dict_p_; public: Scope *scope_p_; - - Array filename_str_arr_; - + + VIRTUAL_COPY_CONS(Music_output_def); Music_output_def (Music_output_def const&); Music_output_def (); virtual ~Music_output_def (); - - VIRTUAL_COPY_CONS(Music_output_def); - + virtual int get_next_default_count () const; virtual void print () const; Global_translator *get_global_translator_p (); @@ -40,7 +35,6 @@ public: String get_default_output () const; void assign_translator (Translator_group*); Translator * find_translator_l (String) const; - virtual int get_next_default_count () const; }; #endif // Music_output_DEF_HH diff --git a/lily/include/my-lily-lexer.hh b/lily/include/my-lily-lexer.hh index b3113bf94b..f731d0d545 100644 --- a/lily/include/my-lily-lexer.hh +++ b/lily/include/my-lily-lexer.hh @@ -51,8 +51,6 @@ public: Input here_input () const; void start_main_input (); - void set_chordmodifier_table (Notename_table*tab_p); - void set_notename_table (Notename_table*tab_p); SCM lookup_identifier (String s); void push_note_state(); diff --git a/lily/include/paper-def.hh b/lily/include/paper-def.hh index a91f537879..8d4c326c75 100644 --- a/lily/include/paper-def.hh +++ b/lily/include/paper-def.hh @@ -19,6 +19,7 @@ #include "array.hh" #include "interval.hh" #include "music-output-def.hh" +#include "protected-scm.hh" /** @@ -46,45 +47,34 @@ */ class Paper_def : public Music_output_def { - map *lookup_p_tab_p_; - static int default_count_i_; - + Protected_scm lookup_alist_; protected: VIRTUAL_COPY_CONS(Music_output_def); public: virtual ~Paper_def (); - + static int default_count_i_; /* JUNKME */ Real get_realvar (SCM symbol) const; Real get_var (String id) const; - SCM get_scmvar (String id)const; void reinit (); Paper_def (); void set_lookup (int, Lookup*); - Paper_def (Paper_def const&); /** The distance between beams of multiplicity_i JUNKME */ Real interbeam_f (int multiplicity_i) const; - Interval line_dimensions_int (int) const; - void print () const; - Lookup const * lookup_l (int sz) const; // TODO naming - - virtual int get_next_default_count () const; static void reset_default_count(); - void output_settings (Paper_outputter*) const; - Paper_stream* paper_stream_p () const; String base_output_str () const; diff --git a/lily/include/score.hh b/lily/include/score.hh index a496159b10..7be4e5c20b 100644 --- a/lily/include/score.hh +++ b/lily/include/score.hh @@ -10,9 +10,6 @@ #ifndef SCORE_HH #define SCORE_HH -#include "array.hh" -#include "lily-proto.hh" -#include "string.hh" #include "input.hh" #include "lily-proto.hh" #include "parray.hh" diff --git a/lily/include/tfm.hh b/lily/include/tfm.hh index bf482a6780..0481ad1b7e 100644 --- a/lily/include/tfm.hh +++ b/lily/include/tfm.hh @@ -10,6 +10,10 @@ */ +/* + TODO: aren't there standard libs? Ideally it is better to just link + to a C-library. */ + #ifndef TFM_HH #define TFM_HH diff --git a/lily/include/translator-group.hh b/lily/include/translator-group.hh index 47c2ef1135..8ceac15def 100644 --- a/lily/include/translator-group.hh +++ b/lily/include/translator-group.hh @@ -16,13 +16,12 @@ #include "translator.hh" #include "cons.hh" #include "parray.hh" -#include "scm-hash.hh" // egcs typedef void (Translator::*Method_pointer)(void); typedef void (Translator::*Const_method_pointer)(void) const; - +class Scheme_hash_table; /** Make some kind of Elements from Requests. Elements are made by hierarchically grouped Translators */ @@ -30,7 +29,7 @@ class Translator_group : public virtual Translator { Array consists_str_arr_; Array accepts_str_arr_; Array consists_end_str_arr_; - Scheme_hash_table properties_dict_; + Scheme_hash_table *properties_dict_; int iterator_count_; friend class Interpretation_context_handle; diff --git a/lily/include/translator.hh b/lily/include/translator.hh index 6352c005dc..a40fd07275 100644 --- a/lily/include/translator.hh +++ b/lily/include/translator.hh @@ -10,13 +10,11 @@ #ifndef TRANSLATOR_HH #define TRANSLATOR_HH -#include #include "global-ctor.hh" #include "string.hh" #include "lily-proto.hh" #include "virtual-methods.hh" #include "lily-guile.hh" -#include "dictionary.hh" #include "parray.hh" #include "input.hh" diff --git a/lily/midi-def.cc b/lily/midi-def.cc index 1915e82071..1013399eac 100644 --- a/lily/midi-def.cc +++ b/lily/midi-def.cc @@ -9,10 +9,9 @@ #include #include "misc.hh" #include "midi-def.hh" -#include "translator.hh" #include "performance.hh" -#include "score-performer.hh" #include "debug.hh" +#include "scope.hh" Midi_def::Midi_def() { @@ -24,20 +23,13 @@ Midi_def::~Midi_def() { } -Real -Midi_def::length_mom_to_seconds_f (Moment mom) -{ - if (!mom) - return 0; - - return Moment (whole_in_seconds_mom_) * mom; -} int Midi_def::get_tempo_i (Moment one_beat_mom) { - Moment wholes_per_min = Moment(60) /Moment(whole_in_seconds_mom_); + Moment w = *unsmob_moment (scope_p_->scm_elem ("whole-in-seconds")); + Moment wholes_per_min = Moment(60) /w; int beats_per_min = wholes_per_min / one_beat_mom; return int (beats_per_min); } @@ -46,20 +38,12 @@ void Midi_def::set_tempo (Moment one_beat_mom, int beats_per_minute_i) { Moment beats_per_second = Moment (beats_per_minute_i) / Moment (60); - whole_in_seconds_mom_ = Moment(1)/Moment(beats_per_second * one_beat_mom); -} -void -Midi_def::print() const -{ -#ifndef NPRINT - DEBUG_OUT << "MIDI {\n"; - Music_output_def::print (); - DEBUG_OUT << "4/min: " << Moment (60) / (whole_in_seconds_mom_ * Moment (4)); - DEBUG_OUT << "}\n"; -#endif + Moment *m = new Moment (Moment(1)/Moment(beats_per_second * one_beat_mom)); + scope_p_->set ("whole-in-seconds", smobify (m)); } + int Midi_def::default_count_i_=0; int diff --git a/lily/midi-item.cc b/lily/midi-item.cc index e91572455d..9806910b55 100644 --- a/lily/midi-item.cc +++ b/lily/midi-item.cc @@ -6,7 +6,6 @@ (c) 1997--2000 Jan Nieuwenhuizen */ -#include "proto.hh" #include "debug.hh" #include "misc.hh" #include "string.hh" diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index 6a5d06ed7d..214ea14fc2 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -5,7 +5,6 @@ Han-Wen Nienhuys */ -#include "proto.hh" #include "musical-request.hh" #include "multi-measure-rest.hh" #include "paper-column.hh" diff --git a/lily/music-list.cc b/lily/music-list.cc index abe444cf6f..5824cc7ada 100644 --- a/lily/music-list.cc +++ b/lily/music-list.cc @@ -53,11 +53,6 @@ Simultaneous_music::to_relative_octave (Musical_pitch p) } -Musical_pitch -Music_sequence::do_relative_octave (Musical_pitch p, bool b) -{ - return music_p_list_p_->do_relative_octave (p, b); -} Musical_pitch diff --git a/lily/music-output-def.cc b/lily/music-output-def.cc index 6b4ee8b519..07895d86e2 100644 --- a/lily/music-output-def.cc +++ b/lily/music-output-def.cc @@ -6,6 +6,7 @@ (c) 1997--2000 Han-Wen Nienhuys */ +#include "dictionary.hh" #include "scope.hh" #include "debug.hh" #include "music-output-def.hh" @@ -100,3 +101,4 @@ Music_output_def::get_default_output () const return gh_string_p (s) ? ly_scm2string (s) : String (""); } + diff --git a/lily/music-sequence.cc b/lily/music-sequence.cc index 2b77780d39..9d5801d2f2 100644 --- a/lily/music-sequence.cc +++ b/lily/music-sequence.cc @@ -78,3 +78,9 @@ Music_sequence::length_i () const { return cons_list_size_i (music_p_list_p_->head_); } + +Musical_pitch +Music_sequence::do_relative_octave (Musical_pitch p, bool b) +{ + return music_p_list_p_->do_relative_octave (p, b); +} diff --git a/lily/music.cc b/lily/music.cc index 7b6cf60732..4b1f842458 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -6,8 +6,6 @@ (c) 1997--2000 Han-Wen Nienhuys */ - #include - #include "music.hh" #include "music-list.hh" #include "debug.hh" diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc index 286c938429..dbdbeabd18 100644 --- a/lily/my-lily-parser.cc +++ b/lily/my-lily-parser.cc @@ -41,7 +41,7 @@ My_lily_parser::~My_lily_parser() } void -My_lily_parser::set_version_check (bool ig) +My_lily_parser::set_version_check (bool ) { } diff --git a/lily/paper-def.cc b/lily/paper-def.cc index bae8a1b395..9eec211a70 100644 --- a/lily/paper-def.cc +++ b/lily/paper-def.cc @@ -20,32 +20,24 @@ Paper_def::Paper_def () { - lookup_p_tab_p_ = new map; + lookup_alist_ = SCM_EOL; } Paper_def::~Paper_def () { - for (map::const_iterator ai = lookup_p_tab_p_->begin(); - ai != lookup_p_tab_p_->end (); ai++) - { - delete (*ai).second; - } - - delete lookup_p_tab_p_; } -Paper_def::Paper_def (Paper_def const&s) - : Music_output_def (s) +Paper_def::Paper_def (Paper_def const&src) + : Music_output_def (src) { - lookup_p_tab_p_ = new map; - - for (map::const_iterator ai = s.lookup_p_tab_p_->begin(); - ai != s.lookup_p_tab_p_->end (); ai++) + SCM n = SCM_EOL; + for (SCM s = src.lookup_alist_; gh_pair_p(s); s = gh_cdr (s)) { - Lookup * l = new Lookup (* (*ai).second); - set_lookup ((*ai).first, l); + n = scm_acons (gh_caar(s), gh_cdar (s), n); } + + lookup_alist_ = n; } @@ -97,12 +89,7 @@ Paper_def::line_dimensions_int (int n) const void Paper_def::set_lookup (int i, Lookup*l) { - map :: const_iterator it (lookup_p_tab_p_->find (i)); - if (it != lookup_p_tab_p_->end ()) - { - delete (*it).second; - } - (*lookup_p_tab_p_)[i] = l; + lookup_alist_ = scm_assq_set_x(lookup_alist_, gh_int2scm (i), l->self_scm_); } @@ -124,25 +111,18 @@ Paper_def::print () const { #ifndef NPRINT Music_output_def::print (); - DEBUG_OUT << "Paper {"; - for (map::const_iterator ai = lookup_p_tab_p_->begin(); - ai != lookup_p_tab_p_->end (); ai++) - { - DEBUG_OUT << "Lookup: " << (*ai).first - << " = " << (*ai).second->font_name_ << '\n'; - } - DEBUG_OUT << "}\n"; + if (flower_dstream) + gh_display (lookup_alist_); #endif } Lookup const * Paper_def::lookup_l (int i) const { - return (*lookup_p_tab_p_)[i]; + SCM l = scm_assq (gh_int2scm(i), lookup_alist_); + return l == SCM_BOOL_F ? 0 : unsmob_lookup (gh_cdr (l)); } - - int Paper_def::default_count_i_ = 0; int @@ -167,7 +147,6 @@ Paper_def::paper_stream_p () const outname += String (".") + output_global_ch; progress_indication (_f ("paper output to %s...", outname == "-" ? String ("") : outname)); - target_str_global_array.push (outname); return new Paper_stream (outname); diff --git a/lily/parser.yy b/lily/parser.yy index fb8a04b914..d2449736ed 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -422,12 +422,12 @@ translator_spec_body: $$ = tg; } | translator_spec_body STRING '=' embedded_scm { - Translator_group* tg = dynamic_cast ($$); + Translator_group* tg = $$; tg->set_property (ly_scm2string ($2), $4); } | translator_spec_body STRING '=' identifier_init semicolon { SCM v = gh_int2scm (0); - if (gh_string_p ($4) || gh_number_p ($4)) + if (gh_string_p ($4) || gh_number_p ($4) || gh_boolean_p ($4)) v = $4; else THIS->parser_error (_("Wrong type for property value")); @@ -551,7 +551,7 @@ music_output_def_body: delete $2; } | music_output_def_body bare_int '=' FONT STRING { // ugh, what a syntax - Lookup * l = new Lookup; + Lookup * l =unsmob_lookup (Lookup::make_lookup()); l->font_name_ = ly_scm2string ($5); dynamic_cast ($$)->set_lookup ($2, l); } diff --git a/lily/repeated-music.cc b/lily/repeated-music.cc index acdccf98f1..82d1c9fe9c 100644 --- a/lily/repeated-music.cc +++ b/lily/repeated-music.cc @@ -61,9 +61,14 @@ Repeated_music::to_relative_octave (Musical_pitch p) if (repeat_body_p_) p = repeat_body_p_->to_relative_octave (p); + Musical_pitch last = p ; if (alternatives_p_) - p = alternatives_p_->do_relative_octave (p, false); - return p; + for (Cons *i = alternatives_p_->music_p_list_p_->head_; i ; i = i->next_) + { + last = i->car_->to_relative_octave (p); + } + + return last; } diff --git a/lily/script.cc b/lily/script.cc index c4b3e004de..9cc53480a5 100644 --- a/lily/script.cc +++ b/lily/script.cc @@ -65,11 +65,11 @@ Script::brew_molecule (SCM smob) bool Script::has_interface (Score_element*me) { - return me->has_interface ("script-interface"); + return me->has_interface (ly_symbol2scm ("script-interface")); } void Script::set_interface (Score_element*me) { - return me->set_interface ("script-interface"); + return me->set_interface (ly_symbol2scm ("script-interface")); } diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index 8cd767edcd..893c0c4bed 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -4,7 +4,6 @@ (c) 1997--2000 Han-Wen Nienhuys */ -#include "proto.hh" #include "musical-request.hh" #include "slur-engraver.hh" #include "slur.hh" diff --git a/lily/slur.cc b/lily/slur.cc index 9b751ab6e8..f93069848d 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -478,7 +478,7 @@ Slur::get_curve (Score_element*me) bool Slur::has_interface (Score_element*me) { - return me->has_interface ("slur-interface"); + return me->has_interface (ly_symbol2scm ("slur-interface")); } diff --git a/lily/spacing-engraver.cc b/lily/spacing-engraver.cc index df45ee44f6..4dc344b8c0 100644 --- a/lily/spacing-engraver.cc +++ b/lily/spacing-engraver.cc @@ -9,7 +9,7 @@ #include "musical-request.hh" #include "paper-column.hh" -#include "spacing-engraver.hh" + #include "spacing-spanner.hh" #include "engraver.hh" #include "pqueue.hh" diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 9ba7119034..234be7314e 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -288,7 +288,7 @@ Spacing_spanner::stem_dir_correction (Score_element*me, Score_element*l, Score_e if (d1 == d2) return 0.0; - bool err = false; + Real correction = 0.0; Real ssc = me->paper_l ()->get_var("stemSpacingCorrection"); diff --git a/lily/sustain-pedal.cc b/lily/sustain-pedal.cc index eb13be365b..f3efc6e76b 100644 --- a/lily/sustain-pedal.cc +++ b/lily/sustain-pedal.cc @@ -9,6 +9,7 @@ #include "score-element.hh" #include "molecule.hh" #include "lookup.hh" +#include "string.hh" // update comment --hwn /* diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index 23bf7e7fac..41b0dc3238 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -14,7 +14,7 @@ #include "molecule.hh" #include "lookup.hh" #include "all-font-metrics.hh" -#include "spanner.hh" +#include "score-element.hh" Molecule System_start_delimiter::staff_bracket (Score_element*me,Real height) diff --git a/lily/template5.cc b/lily/template5.cc index a61b8b8721..8a4e1c8b40 100644 --- a/lily/template5.cc +++ b/lily/template5.cc @@ -7,7 +7,6 @@ */ #include -#include "proto.hh" #include "string.hh" #include "moment.hh" #include "real.hh" diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index 09c4d47c60..d3ac6c48cd 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -1,5 +1,5 @@ /* - ctie-engraver.cc -- implement Tie_engraver + tie-engraver.cc -- implement Tie_engraver source file of the GNU LilyPond music typesetter @@ -44,6 +44,9 @@ inline int compare (CHead_melodic_tuple const &a, CHead_melodic_tuple const &b) class Tie_engraver : public Engraver { PQueue past_notes_pq_; + Moment end_mom_; + Moment next_end_mom_; + Tie_req *req_l_; Array now_heads_; Array stopped_heads_; @@ -80,6 +83,9 @@ Tie_engraver::do_try_music (Music *m) { if (Tie_req * c = dynamic_cast (m)) { + /* if (end_mom_ > now_mom ()) + return false; + */ req_l_ = c; SCM m = get_property ("automaticMelismata"); bool am = gh_boolean_p (m) &&gh_scm2bool (m); @@ -116,8 +122,6 @@ Tie_engraver::do_process_music () if (req_l_) { Moment now = now_mom (); - Link_array nharr; - stopped_heads_.clear (); while (past_notes_pq_.size () && past_notes_pq_.front ().end_ == now) diff --git a/lily/tie.cc b/lily/tie.cc index 13acee6ea7..85332353a8 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -223,9 +223,15 @@ Tie::get_curve () const b.set_default_bezier (h_inf, r_0); Bezier c = b.get_bezier (); - /* should do me for slurs as well. */ + /* + Avoid colliding of the horizontal part with stafflines. + + should do me for slurs as well. + + */ Array horizontal (c.solve_derivative (Offset (1,0))); + if (horizontal.size ()) { /* diff --git a/lily/translator-ctors.cc b/lily/translator-ctors.cc index 53dee7207d..ca1e6d516f 100644 --- a/lily/translator-ctors.cc +++ b/lily/translator-ctors.cc @@ -6,7 +6,6 @@ (c) 1997--2000 Han-Wen Nienhuys */ -#include "proto.hh" #include "translator.hh" #include "dictionary.hh" #include "debug.hh" diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 4a7f6046e7..4e1bf9212a 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -11,7 +11,7 @@ #include "translator.hh" #include "debug.hh" #include "moment.hh" - +#include "scm-hash.hh" #include "killing-cons.tcc" Translator_group::Translator_group (Translator_group const&s) @@ -21,19 +21,21 @@ Translator_group::Translator_group (Translator_group const&s) consists_end_str_arr_ = s.consists_end_str_arr_; accepts_str_arr_ = s.accepts_str_arr_; iterator_count_ =0; - properties_dict_ = s.properties_dict_; + properties_dict_ = new Scheme_hash_table (*s.properties_dict_); } Translator_group::~Translator_group () { assert (removable_b()); trans_p_list_.junk (); + delete properties_dict_; } Translator_group::Translator_group() { iterator_count_ = 0; + properties_dict_ = new Scheme_hash_table ; } void @@ -356,7 +358,7 @@ Translator_group::do_print() const if (!flower_dstream) return ; - gh_display (properties_dict_.self_scm_); + gh_display (properties_dict_->self_scm_); if (status == ORPHAN) { DEBUG_OUT << "consists of: "; @@ -432,7 +434,7 @@ Translator_group::do_add_processing () Translator_group* Translator_group::where_defined (SCM sym) const { - if (properties_dict_.elem_b (sym)) + if (properties_dict_->elem_b (sym)) { return (Translator_group*)this; } @@ -443,9 +445,9 @@ Translator_group::where_defined (SCM sym) const SCM Translator_group::get_property (SCM sym) const { - if (properties_dict_.elem_b (sym)) + if (properties_dict_->elem_b (sym)) { - return properties_dict_.get (sym); + return properties_dict_->get (sym); } if (daddy_trans_l_) @@ -458,6 +460,6 @@ Translator_group::get_property (SCM sym) const void Translator_group::set_property (String id, SCM val) { - properties_dict_.set (ly_symbol2scm (id.ch_C()), val); + properties_dict_->set (ly_symbol2scm (id.ch_C()), val); } diff --git a/lily/warn.cc b/lily/warn.cc index 5513d2524f..b371ddabe8 100644 --- a/lily/warn.cc +++ b/lily/warn.cc @@ -6,7 +6,6 @@ (c) 1997--2000 Han-Wen Nienhuys */ -#include "proto.hh" #include "debug.hh" #include "my-lily-lexer.hh" #include "moment.hh" diff --git a/lilypond-mode.el b/lilypond-mode.el index 8a4c7ccf6f..b035151c54 100644 --- a/lilypond-mode.el +++ b/lilypond-mode.el @@ -38,7 +38,7 @@ (defconst lily-font-lock-keywords (let* ((keywords '("spanrequest" "simultaneous" "sequential" "accepts" - "alternative" "bar" "breathe" + "autochange" "alternative" "bar" "breathe" "cadenza" "chordmodifiers" "chords" "clef" "cm" "consists" "consistsend" "context" "duration" "font" "grace" "header" "in" "lyrics" diff --git a/midi2ly/duration.cc b/midi2ly/duration.cc index 0ef7270d06..2780baec6d 100644 --- a/midi2ly/duration.cc +++ b/midi2ly/duration.cc @@ -12,7 +12,7 @@ #include -#include "proto.hh" +#include "flower-proto.hh" #include "string.hh" #include "source-file.hh" #include "source.hh" diff --git a/midi2ly/include/midi-parser.hh b/midi2ly/include/midi-parser.hh index 25fb357f64..d4b498dc0f 100644 --- a/midi2ly/include/midi-parser.hh +++ b/midi2ly/include/midi-parser.hh @@ -35,7 +35,7 @@ #endif -#include "proto.hh" +#include "flower-proto.hh" #include "rational.hh" #include "midi2ly-proto.hh" diff --git a/midi2ly/include/midi-score-parser.hh b/midi2ly/include/midi-score-parser.hh index fca4fdf006..de2e1db51e 100644 --- a/midi2ly/include/midi-score-parser.hh +++ b/midi2ly/include/midi-score-parser.hh @@ -11,7 +11,7 @@ #define MIDI_SCORE_PARSER_HH #include "midi-parser.hh" -#include "proto.hh" +#include "flower-proto.hh" #include "midi2ly-proto.hh" #include "parray.hh" diff --git a/midi2ly/include/midi-track-parser.hh b/midi2ly/include/midi-track-parser.hh index 4dd95fe82d..21d6988a3b 100644 --- a/midi2ly/include/midi-track-parser.hh +++ b/midi2ly/include/midi-track-parser.hh @@ -10,7 +10,7 @@ #ifndef MIDI_TRACK_PARSER_HH #define MIDI_TRACK_PARSER_HH -#include "proto.hh" +#include "flower-proto.hh" #include "cons.hh" #include "rational.hh" #include "midi2ly-proto.hh" diff --git a/midi2ly/include/midi2ly-global.hh b/midi2ly/include/midi2ly-global.hh index 38bf84720a..ab870e9571 100644 --- a/midi2ly/include/midi2ly-global.hh +++ b/midi2ly/include/midi2ly-global.hh @@ -1,5 +1,5 @@ // -// midi2ly-global.hh -- declare global (sic) stuff for midi2ly +// midi2ly-global.hh -- declare global stuff for midi2ly // // copyright 1997 Jan Nieuwenhuizen @@ -9,7 +9,7 @@ #include #include "string.hh" -#include "proto.hh" +#include "flower-proto.hh" #define monitor_p_g &cout enum Verbose { QUIET_ver, BRIEF_ver, NORMAL_ver, VERBOSE_ver, DEBUG_ver }; diff --git a/midi2ly/include/mudela-column.hh b/midi2ly/include/mudela-column.hh index 6c348afbc4..ca682b29e4 100644 --- a/midi2ly/include/mudela-column.hh +++ b/midi2ly/include/mudela-column.hh @@ -6,7 +6,7 @@ #ifndef MUDELA_COLUMN_HH #define MUDELA_COLUMN_HH -#include "proto.hh" +#include "flower-proto.hh" #include "midi2ly-proto.hh" #include "rational.hh" #include "cons.hh" @@ -15,14 +15,14 @@ class Mudela_column { public: - Mudela_column (Mudela_score* mudela_score_l, Rational mom); + Mudela_column (Mudela_score* mudela_score_l, Rational mom); - void add_item (Mudela_item* mudela_item_l); - Rational at_mom (); + void add_item (Mudela_item* mudela_item_l); + Rational at_mom (); - Cons_list mudela_item_l_list_; - Rational at_mom_; - Mudela_score* mudela_score_l_; + Cons_list mudela_item_l_list_; + Rational at_mom_; + Mudela_score* mudela_score_l_; }; #endif // MUDELA_COLUMN_HH diff --git a/midi2ly/include/mudela-score.hh b/midi2ly/include/mudela-score.hh index 2a8006a5cd..27162e4938 100644 --- a/midi2ly/include/mudela-score.hh +++ b/midi2ly/include/mudela-score.hh @@ -7,7 +7,7 @@ #define MUDELA_SCORE_HH #include "midi2ly-proto.hh" -#include "proto.hh" +#include "flower-proto.hh" #include "cons.hh" #include "parray.hh" diff --git a/midi2ly/include/mudela-staff.hh b/midi2ly/include/mudela-staff.hh index 6f51077d57..38be04823c 100644 --- a/midi2ly/include/mudela-staff.hh +++ b/midi2ly/include/mudela-staff.hh @@ -7,7 +7,7 @@ #define MUDELA_STAFF_HH #include "midi2ly-proto.hh" -#include "proto.hh" +#include "flower-proto.hh" #include "cons.hh" #include "string.hh" diff --git a/midi2ly/version.cc b/midi2ly/version.cc index 360b0f886a..e1159f289f 100644 --- a/midi2ly/version.cc +++ b/midi2ly/version.cc @@ -1,4 +1,4 @@ -#include "proto.hh" +#include "flower-proto.hh" #include "string.hh" const char * midi2ly_version_sz(); -- 2.39.5