From a6ee9dcd388111e842064a8d46ab06c4897a00d2 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Fri, 26 Jul 2002 00:23:32 +0000 Subject: [PATCH] ``slikken kreng'' * lily, flower: Ran buildscripts/ontgaar.py. See also http://lilypond.org/wiki/?CodingStandards. --- ChangeLog | 3 + buildscripts/ontgaar.py | 33 +-- flower/axis.cc | 4 +- flower/binary-source-file.cc | 48 ++-- flower/direction.cc | 2 +- flower/file-path.cc | 58 ++--- flower/getopt-long.cc | 196 +++++++------- flower/hash.cc | 2 +- flower/include/array.hh | 40 +-- flower/include/array.icc | 16 +- flower/include/axes.hh | 2 +- flower/include/binary-source-file.hh | 6 +- flower/include/cons.hh | 6 +- flower/include/direction.hh | 2 +- flower/include/file-path.hh | 4 +- flower/include/file-storage.hh | 4 +- flower/include/flower-proto.hh | 2 +- flower/include/getopt-long.hh | 32 +-- flower/include/input.hh | 10 +- flower/include/interval.hh | 4 +- flower/include/interval.tcc | 4 +- flower/include/libc-extension.hh | 6 +- flower/include/mapped-file-storage.hh | 6 +- flower/include/offset.hh | 2 +- flower/include/parray.hh | 40 +-- flower/include/pqueue.hh | 20 +- flower/include/rational.hh | 2 +- flower/include/simple-file-storage.hh | 8 +- flower/include/source-file.hh | 46 ++-- flower/include/source.hh | 8 +- flower/include/string-convert.hh | 54 ++-- flower/include/string-data.hh | 26 +- flower/include/string-data.icc | 108 ++++---- flower/include/string-handle.hh | 16 +- flower/include/string-handle.icc | 32 +-- flower/include/string-storage.hh | 4 +- flower/include/string.hh | 66 ++--- flower/include/warn.hh | 4 +- flower/input.cc | 52 ++-- flower/international.cc | 6 +- flower/interval.cc | 8 +- flower/libc-extension.cc | 42 +-- flower/mapped-file-storage.cc | 28 +- flower/offset.cc | 6 +- flower/polynomial.cc | 6 +- flower/rational.cc | 8 +- flower/simple-file-storage.cc | 38 +-- flower/source-file.cc | 194 +++++++------- flower/source.cc | 34 +-- flower/string-convert.cc | 166 ++++++------ flower/string.cc | 170 ++++++------- flower/warn.cc | 8 +- lily/a2-engraver.cc | 64 ++--- lily/accidental-engraver.cc | 128 +++++----- lily/accidental-placement.cc | 2 +- lily/accidental.cc | 4 +- lily/afm.cc | 6 +- lily/all-font-metrics.cc | 38 +-- lily/ambitus-engraver.cc | 32 +-- lily/ambitus.cc | 22 +- lily/arpeggio-engraver.cc | 14 +- lily/arpeggio.cc | 12 +- lily/audio-column.cc | 6 +- lily/audio-element-info.cc | 22 +- lily/audio-item.cc | 26 +- lily/audio-staff.cc | 6 +- lily/auto-beam-engraver.cc | 134 +++++----- lily/auto-change-iterator.cc | 20 +- lily/axis-group-engraver.cc | 48 ++-- lily/bar-check-iterator.cc | 6 +- lily/bar-engraver.cc | 26 +- lily/bar-line.cc | 4 +- lily/bar-number-engraver.cc | 30 +-- lily/beam-engraver.cc | 84 +++--- lily/beam-quanting.cc | 2 +- lily/beam.cc | 17 +- lily/bezier.cc | 20 +- lily/break-algorithm.cc | 24 +- lily/break-align-engraver.cc | 36 +-- lily/break-align-interface.cc | 14 +- lily/breathing-sign-engraver.cc | 32 +-- lily/change-iterator.cc | 28 +- lily/chord-name-engraver.cc | 18 +- lily/chord-name.cc | 2 +- lily/chord-tremolo-engraver.cc | 58 ++--- lily/chord-tremolo-iterator.cc | 24 +- lily/chord.cc | 38 +-- lily/clef-engraver.cc | 58 ++--- lily/clef.cc | 2 +- lily/collision-engraver.cc | 32 +-- lily/column-x-positions.cc | 2 +- lily/command-request.cc | 10 +- lily/completion-note-heads-engraver.cc | 56 ++-- lily/custos-engraver.cc | 24 +- lily/custos.cc | 6 +- lily/cxx-function-smob.cc | 2 +- lily/dimension-cache.cc | 4 +- lily/dimensions.cc | 4 +- lily/dot-column-engraver.cc | 12 +- lily/dot-column.cc | 4 +- lily/duration.cc | 44 ++-- lily/dynamic-engraver.cc | 154 +++++------ lily/dynamic-performer.cc | 30 +-- lily/engraver-group-engraver.cc | 16 +- lily/engraver.cc | 20 +- lily/extender-engraver.cc | 62 ++--- lily/fingering-engraver.cc | 12 +- lily/folded-repeat-iterator.cc | 70 ++--- lily/font-interface.cc | 32 +-- lily/font-metric.cc | 6 +- lily/font-size-engraver.cc | 4 +- lily/global-ctor.cc | 12 +- lily/global-translator.cc | 8 +- lily/gourlay-breaking.cc | 52 ++-- lily/grace-iterator.cc | 2 +- lily/grob-info.cc | 20 +- lily/grob-interface.cc | 14 +- lily/grob-pitch-tuple.cc | 4 +- lily/grob-pq-engraver.cc | 8 +- lily/grob-scheme.cc | 12 +- lily/grob.cc | 56 ++-- lily/group-interface.cc | 4 +- lily/hairpin.cc | 2 +- lily/hyphen-engraver.cc | 62 ++--- lily/hyphen-spanner.cc | 10 +- lily/includable-lexer.cc | 20 +- lily/include/afm.hh | 2 +- lily/include/audio-column.hh | 6 +- lily/include/audio-element-info.hh | 8 +- lily/include/audio-item.hh | 18 +- lily/include/audio-staff.hh | 4 +- lily/include/bezier.hh | 6 +- lily/include/break-algorithm.hh | 4 +- lily/include/chord-tremolo-iterator.hh | 2 +- lily/include/column-x-positions.hh | 2 +- lily/include/command-request.hh | 2 +- lily/include/custos.hh | 2 +- lily/include/dimension-cache.hh | 4 +- lily/include/duration.hh | 6 +- lily/include/engraver-group-engraver.hh | 2 +- lily/include/engraver.hh | 4 +- lily/include/file-results.hh | 10 +- lily/include/folded-repeat-iterator.hh | 4 +- lily/include/global-translator.hh | 4 +- lily/include/grob-info.hh | 6 +- lily/include/grob-pitch-tuple.hh | 2 +- lily/include/grob.hh | 16 +- lily/include/hyphen-spanner.hh | 2 +- lily/include/includable-lexer.hh | 6 +- lily/include/interpretation-context-handle.hh | 4 +- lily/include/item.hh | 2 +- lily/include/ligature-engraver.hh | 4 +- lily/include/lily-guile.hh | 4 +- lily/include/lily-version.hh | 6 +- lily/include/lilypond-input-version.hh | 10 +- lily/include/line-group-group-engraver.hh | 2 +- lily/include/ly-smobs.icc | 4 +- lily/include/lyric-combine-music-iterator.hh | 4 +- lily/include/lyric-combine-music.hh | 4 +- lily/include/lyric-phrasing-engraver.hh | 14 +- lily/include/main.hh | 4 +- lily/include/midi-def.hh | 4 +- lily/include/midi-item.hh | 78 +++--- lily/include/midi-stream.hh | 6 +- lily/include/midi-walker.hh | 10 +- lily/include/moment.hh | 2 +- lily/include/music-iterator.hh | 10 +- lily/include/music-output-def.hh | 8 +- lily/include/music-output.hh | 10 +- lily/include/music-wrapper-iterator.hh | 2 +- lily/include/musical-request.hh | 2 +- lily/include/my-lily-lexer.hh | 12 +- lily/include/my-lily-parser.hh | 24 +- lily/include/note-collision.hh | 2 +- lily/include/note-column.hh | 2 +- lily/include/note-head.hh | 2 +- lily/include/paper-column.hh | 6 +- lily/include/paper-def.hh | 4 +- lily/include/paper-score.hh | 4 +- lily/include/part-combine-music-iterator.hh | 4 +- lily/include/part-combine-music.hh | 4 +- lily/include/percent-repeat-iterator.hh | 2 +- lily/include/performance.hh | 4 +- lily/include/performer-group-performer.hh | 2 +- lily/include/performer.hh | 6 +- lily/include/pitch.hh | 14 +- lily/include/request-chord-iterator.hh | 4 +- lily/include/request.hh | 4 +- lily/include/rhythmic-head.hh | 4 +- lily/include/rod.hh | 2 +- lily/include/scaled-font-metric.hh | 4 +- lily/include/score-engraver.hh | 16 +- lily/include/score-performer.hh | 8 +- lily/include/score.hh | 8 +- lily/include/sequential-iterator.hh | 2 +- lily/include/simple-spacer.hh | 14 +- lily/include/simultaneous-music-iterator.hh | 2 +- lily/include/slur-bezier-bow.hh | 4 +- lily/include/slur.hh | 2 +- lily/include/spanner.hh | 2 +- lily/include/spring.hh | 8 +- lily/include/staff-symbol-referencer.hh | 4 +- lily/include/staff-symbol.hh | 2 +- lily/include/stem.hh | 2 +- lily/include/system.hh | 4 +- lily/include/tfm-reader.hh | 8 +- lily/include/tfm.hh | 8 +- lily/include/tie.hh | 4 +- lily/include/translator-change.hh | 4 +- lily/include/translator-def.hh | 2 +- lily/include/translator-group.hh | 20 +- lily/include/translator.hh | 18 +- lily/include/type-swallow-translator.hh | 4 +- lily/input-smob.cc | 8 +- lily/instrument-name-engraver.cc | 22 +- lily/interpretation-context-handle.cc | 30 +-- lily/item.cc | 16 +- lily/key-engraver.cc | 62 ++--- lily/key-performer.cc | 36 +-- lily/key-signature-interface.cc | 2 +- lily/kpath.cc | 2 +- lily/lexer.ll | 84 +++--- lily/ligature-bracket.cc | 6 +- lily/ligature-engraver.cc | 48 ++-- lily/lily-guile.cc | 34 +-- lily/lily-version.cc | 8 +- lily/lilypond-version.cc | 24 +- lily/line-spanner.cc | 16 +- lily/lookup.cc | 70 ++--- lily/lyric-combine-music-iterator.cc | 42 +-- lily/lyric-combine-music.cc | 16 +- lily/lyric-engraver.cc | 32 +-- lily/lyric-extender.cc | 2 +- lily/lyric-performer.cc | 36 +-- lily/lyric-phrasing-engraver.cc | 36 +-- lily/main.cc | 72 +++--- lily/mark-engraver.cc | 70 ++--- lily/melisma-engraver.cc | 4 +- lily/mensural-ligature-engraver.cc | 92 +++---- lily/mensural-ligature.cc | 6 +- lily/midi-def.cc | 8 +- lily/midi-item.cc | 240 +++++++++--------- lily/midi-stream.cc | 28 +- lily/midi-walker.cc | 50 ++-- lily/molecule.cc | 14 +- lily/moment.cc | 12 +- lily/multi-measure-rest-engraver.cc | 106 ++++---- lily/multi-measure-rest.cc | 18 +- lily/music-iterator.cc | 32 +-- lily/music-output-def.cc | 12 +- lily/music-wrapper-iterator.cc | 26 +- lily/music.cc | 10 +- lily/my-lily-lexer.cc | 28 +- lily/my-lily-parser.cc | 46 ++-- lily/new-accidental-engraver.cc | 184 +++++++------- lily/note-collision.cc | 44 ++-- lily/note-column.cc | 14 +- lily/note-head-line-engraver.cc | 14 +- lily/note-head.cc | 18 +- lily/note-heads-engraver.cc | 46 ++-- lily/note-name-engraver.cc | 16 +- lily/note-performer.cc | 68 ++--- lily/note-spacing.cc | 20 +- lily/output-property-engraver.cc | 4 +- lily/output-property-music-iterator.cc | 6 +- lily/paper-column.cc | 12 +- lily/paper-def.cc | 22 +- lily/paper-outputter.cc | 38 +-- lily/paper-score.cc | 52 ++-- lily/parser.yy | 202 +++++++-------- lily/part-combine-music-iterator.cc | 94 +++---- lily/part-combine-music.cc | 18 +- lily/percent-repeat-engraver.cc | 42 +-- lily/percent-repeat-iterator.cc | 30 +-- lily/performance.cc | 46 ++-- lily/performer-group-performer.cc | 18 +- lily/performer.cc | 18 +- lily/phrasing-slur-engraver.cc | 72 +++--- lily/piano-pedal-engraver.cc | 152 +++++------ lily/piano-pedal-performer.cc | 26 +- lily/pitch-squash-engraver.cc | 4 +- lily/pitch.cc | 156 ++++++------ lily/porrectus-engraver.cc | 50 ++-- lily/porrectus.cc | 12 +- lily/property-iterator.cc | 36 +-- lily/repeat-acknowledge-engraver.cc | 8 +- lily/request-chord-iterator.cc | 22 +- lily/rest-collision-engraver.cc | 28 +- lily/rest-engraver.cc | 54 ++-- lily/rest.cc | 4 +- lily/rhythmic-column-engraver.cc | 46 ++-- lily/rhythmic-head.cc | 12 +- lily/rod.cc | 8 +- lily/scaled-font-metric.cc | 18 +- lily/scm-option.cc | 2 +- lily/score-engraver.cc | 146 +++++------ lily/score-performer.cc | 32 +-- lily/score.cc | 70 ++--- lily/scores.cc | 86 +++---- lily/script-column-engraver.cc | 36 +-- lily/script-engraver.cc | 64 ++--- lily/script.cc | 2 +- lily/separating-group-spanner.cc | 4 +- lily/separating-line-group-engraver.cc | 62 ++--- lily/separation-item.cc | 8 +- lily/sequential-iterator.cc | 60 ++--- lily/sequential-music-iterator.cc | 8 +- lily/side-position-interface.cc | 4 +- lily/simple-music-iterator.cc | 2 +- lily/simple-spacer.cc | 86 +++---- lily/simultaneous-music-iterator.cc | 12 +- lily/slur-bezier-bow.cc | 10 +- lily/slur-engraver.cc | 74 +++--- lily/slur.cc | 72 +++--- lily/spaceable-grob.cc | 4 +- lily/spacing-engraver.cc | 22 +- lily/spacing-spanner.cc | 26 +- lily/span-arpeggio-engraver.cc | 6 +- lily/span-bar-engraver.cc | 40 +-- lily/span-bar.cc | 6 +- lily/span-dynamic-performer.cc | 76 +++--- lily/spanner.cc | 60 ++--- lily/spring-smob.cc | 6 +- lily/staff-collecting-engraver.cc | 6 +- lily/staff-performer.cc | 90 +++---- lily/staff-spacing.cc | 12 +- lily/staff-symbol-engraver.cc | 22 +- lily/staff-symbol-referencer.cc | 20 +- lily/staff-symbol.cc | 6 +- lily/stanza-number-engraver.cc | 2 +- lily/stem-engraver.cc | 78 +++--- lily/stem-tremolo.cc | 2 +- lily/stem.cc | 48 ++-- lily/streams.cc | 4 +- lily/sustain-pedal.cc | 6 +- lily/syllable-group.cc | 100 ++++---- lily/system-start-delimiter-engraver.cc | 16 +- lily/system-start-delimiter.cc | 2 +- lily/system.cc | 56 ++-- lily/tab-note-heads-engraver.cc | 68 ++--- lily/template5.cc | 4 +- lily/tempo-performer.cc | 36 +-- lily/text-engraver.cc | 14 +- lily/text-item.cc | 2 +- lily/text-spanner-engraver.cc | 6 +- lily/text-spanner.cc | 4 +- lily/tfm-reader.cc | 46 ++-- lily/tfm.cc | 20 +- lily/thread-devnull-engraver.cc | 4 +- lily/tie-column.cc | 4 +- lily/tie-engraver.cc | 52 ++-- lily/tie-performer.cc | 64 ++--- lily/tie.cc | 18 +- lily/time-scaled-music-iterator.cc | 6 +- lily/time-signature-engraver.cc | 20 +- lily/time-signature-performer.cc | 14 +- lily/time-signature.cc | 6 +- lily/timing-engraver.cc | 4 +- lily/timing-translator.cc | 40 +-- lily/translator-ctors.cc | 18 +- lily/translator-def.cc | 36 +-- lily/translator-group.cc | 68 ++--- lily/translator.cc | 18 +- lily/tuplet-bracket.cc | 72 +++--- lily/tuplet-engraver.cc | 52 ++-- lily/type-swallow-translator.cc | 2 +- lily/unfolded-repeat-iterator.cc | 24 +- lily/vertical-align-engraver.cc | 24 +- lily/voice-devnull-engraver.cc | 10 +- lily/volta-bracket.cc | 16 +- lily/volta-engraver.cc | 70 ++--- lily/warn.cc | 2 +- 372 files changed, 4955 insertions(+), 4948 deletions(-) diff --git a/ChangeLog b/ChangeLog index cf29e44743..2ee7626c74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2002-07-26 Jan Nieuwenhuizen + * lily, flower: Ran buildscripts/ontgaar.py. See also + http://lilypond.org/wiki/?CodingStandards. + * Documentation/GNUmakefile: Remove regression-test stuff. (deep-WWW-clean): Remove wiki-dump. Fixes web-clean target. diff --git a/buildscripts/ontgaar.py b/buildscripts/ontgaar.py index 4e84c2a465..51b277e494 100644 --- a/buildscripts/ontgaar.py +++ b/buildscripts/ontgaar.py @@ -20,22 +20,23 @@ Mandatory suffixes: Optional suffixes: - _b : _b, bool - _p : _p as in lispy pair_p ()? - _x : _x, x-coor - _y : _y, y-coor - - _byte : _byte - _char : _char - _count : _count counter - _drul : _drul Drul_array - _global : _global global var - _grob : _grob Grob - _req : _req Request - _scm : _scm SCM - _str : _str C string - _str0 : _str0 C string - _string : _string C++ string + _b : bool + _p : as in lispy pair_p ()? + _x : x-coor + _y : y-coor + + _byte : + _char : + _count : counter + _drul : Drul_array + _global : global var + _grob : Grob + _mom : moment + _req : Request + _scm : SCM + _str : C string + _str0 : C string + _string : C++ string Prefixes: get_ : diff --git a/flower/axis.cc b/flower/axis.cc index 299e6b5443..b9fc00b004 100644 --- a/flower/axis.cc +++ b/flower/axis.cc @@ -11,9 +11,9 @@ #include "string.hh" String -axis_name_str (Axis a) +axis_name_string (Axis a) { - return to_str (char (a + 'x')); + return to_string (char (a + 'x')); } diff --git a/flower/binary-source-file.cc b/flower/binary-source-file.cc index 4cc1d02f5b..bd6a4f84d3 100644 --- a/flower/binary-source-file.cc +++ b/flower/binary-source-file.cc @@ -16,8 +16,8 @@ #include "binary-source-file.hh" #include "string-convert.hh" -Binary_source_file::Binary_source_file (String& filename_str) - : Source_file (filename_str) +Binary_source_file::Binary_source_file (String& filename_string) + : Source_file (filename_string) { } @@ -26,44 +26,44 @@ Binary_source_file::~Binary_source_file () } String -Binary_source_file::error_str (char const* pos_ch_C) const +Binary_source_file::error_string (char const* pos_str0) const { assert (this); - if (!in_b (pos_ch_C)) + if (!in_b (pos_str0)) return ""; - char const* begin_ch_C = pos_ch_C - 8 >? ch_C (); - char const* end_ch_C = pos_ch_C + 7 ? to_str0 (); + char const* end_str0 = pos_str0 + 7 = 0) { - p.root = path.left_str (i); - path = path.right_str (path.length_i () - i - 1); + p.root = path.left_string (i); + path = path.right_string (path.length () - i - 1); } - i = path.index_last_i (DIRSEP); + i = path.index_last (DIRSEP); if (i >= 0) { - p.dir = path.left_str (i); - path = path.right_str (path.length_i () - i - 1); + p.dir = path.left_string (i); + path = path.right_string (path.length () - i - 1); } - i = path.index_last_i ('.'); + i = path.index_last ('.'); if (i >= 0) { - p.base = path.left_str (i); - p.ext = path.right_str (path.length_i () - i - 1); + p.base = path.left_string (i); + p.ext = path.right_string (path.length () - i - 1); } else p.base = path; @@ -136,13 +136,13 @@ File_path::parse_path (String p) int l; - while ((l = p.length_i ()) ) + while ((l = p.length ()) ) { - int i = p.index_i (PATHSEP); + int i = p.index (PATHSEP); if (i <0) i = l; - add (p.left_str (i)); - p = p.right_str (l- i - 1); + add (p.left_string (i)); + p = p.right_string (l- i - 1); } } @@ -159,15 +159,15 @@ File_path::parse_path (String p) String File_path::find (String nm) const { - if (!nm.length_i () || (nm == "-") ) + if (!nm.length () || (nm == "-") ) return nm; for (int i=0; i < size (); i++) { String path = elem (i); - String sep = to_str (DIRSEP); - String right (path.right_str (1)); - if (path.length_i () && right != sep) - path += to_str (DIRSEP); + String sep = to_string (DIRSEP); + String right (path.right_string (1)); + if (path.length () && right != sep) + path += to_string (DIRSEP); path += nm; @@ -177,7 +177,7 @@ File_path::find (String nm) const Check if directory. TODO: encapsulate for autoconf */ struct stat sbuf; - if (stat (path.ch_C (), &sbuf) == ENOENT) + if (stat (path.to_str0 (), &sbuf) == ENOENT) continue; if (! (sbuf.st_mode & __S_IFREG)) @@ -185,14 +185,14 @@ File_path::find (String nm) const #endif #if !STAT_MACROS_BROKEN struct stat sbuf; - if (stat (path.ch_C (), &sbuf) == ENOENT) + if (stat (path.to_str0 (), &sbuf) == ENOENT) continue; if (S_ISDIR (sbuf.st_mode)) continue; #endif - FILE *f = fopen (path.ch_C (), "r"); // ugh! + FILE *f = fopen (path.to_str0 (), "r"); // ugh! if (f) { fclose (f); @@ -210,7 +210,7 @@ File_path::try_add (String s) { if (s == "") s = "."; - FILE * f = fopen (s.ch_C (), "r"); + FILE * f = fopen (s.to_str0 (), "r"); if (!f) return false; fclose (f); @@ -231,7 +231,7 @@ File_path::add (String s) } String -File_path::str () const +File_path::string () const { String s; for (int i=0; i< size (); i++) diff --git a/flower/getopt-long.cc b/flower/getopt-long.cc index c081f3028a..59cb97161a 100644 --- a/flower/getopt-long.cc +++ b/flower/getopt-long.cc @@ -28,11 +28,11 @@ gettext (char const* s) #endif long -Getopt_long::argument_to_i () +Getopt_long::get_argument_index () { long l; - if (!optional_argument_ch_C_ - || sscanf (optional_argument_ch_C_, "%ld", &l) != 1) + if (!optional_argument_str0_ + || sscanf (optional_argument_str0_, "%ld", &l) != 1) report (E_ILLEGALARG); return l; @@ -41,66 +41,66 @@ Getopt_long::argument_to_i () const Long_option_init * Getopt_long::parselong () { - char const *optnm = arg_value_ch_a_a_[array_index_i_] + 2 ; + char const *optnm = arg_value_char_a_a_[array_index_] + 2 ; assert (*optnm); char const *endopt = strchr (optnm, '='); int searchlen = (endopt) ? endopt - optnm : strlen (optnm); - found_option_l_=0; - for (int i=0; i< table_len_i_; i++) + found_option_=0; + for (int i=0; i< table_len_; i++) { - char const *ln = option_a_[i].longname_sz_; + char const *ln = option_a_[i].longname_str0_; if (ln && !strncmp (ln, optnm, searchlen)) { - found_option_l_ = option_a_+i; + found_option_ = option_a_+i; break; } } - if (!found_option_l_) + if (!found_option_) { report (E_UNKNOWNOPTION); return 0; } - array_index_i_++; - argument_index_i_ = 0; + array_index_++; + argument_index_ = 0; - if (found_option_l_->take_arg_sz_) + if (found_option_->take_arg_str0_) { if (endopt) - optional_argument_ch_C_ = endopt +1; // a '=' + optional_argument_str0_ = endopt +1; // a '=' else { - optional_argument_ch_C_ = arg_value_ch_a_a_[array_index_i_]; - array_index_i_++; + optional_argument_str0_ = arg_value_char_a_a_[array_index_]; + array_index_++; } - if (!optional_argument_ch_C_) + if (!optional_argument_str0_) report (E_ARGEXPECT); } else { - optional_argument_ch_C_ = 0; + optional_argument_str0_ = 0; if (endopt) report (E_NOARGEXPECT); } - return found_option_l_; + return found_option_; } String -Long_option_init::str () const +Long_option_init::string () const { String str; - if (shortname_ch_) - str += "-" + shortname_ch_; - if (shortname_ch_ && longname_sz_) + if (shortname_char_) + str += "-" + shortname_char_; + if (shortname_char_ && longname_str0_) str += ", "; - if (longname_sz_) - str += String ("`--") + longname_sz_ + "'"; + if (longname_str0_) + str += String ("`--") + longname_str0_ + "'"; return str; } @@ -108,24 +108,24 @@ String Long_option_init::str_for_help () const { String s; - if (shortname_ch_) - s = "-" + to_str (shortname_ch_); + if (shortname_char_) + s = "-" + to_string (shortname_char_); else s = " "; - s = s + ((shortname_ch_ && longname_sz_) ? "," : " "); + s = s + ((shortname_char_ && longname_str0_) ? "," : " "); - if (longname_sz_) - s = s + "--" + longname_sz_; + if (longname_str0_) + s = s + "--" + longname_str0_; - if (take_arg_sz_) + if (take_arg_str0_) { - if (longname_sz_) + if (longname_str0_) s = s + "="; else s = s + " "; - s = s + gettext (take_arg_sz_); + s = s + gettext (take_arg_str0_); } return s; } @@ -138,78 +138,78 @@ Getopt_long::report (Errorcod c) if (!error_out_) return; - String str = arg_value_ch_a_a_[0]; + String str = arg_value_char_a_a_[0]; str += ": "; switch (c) { case E_ARGEXPECT: str += _f ("option `%s' requires an argument", - found_option_l_->str ()); + found_option_->string ()); break; case E_NOARGEXPECT: str += _f ("option `%s' doesn't allow an argument", - found_option_l_->str ()); + found_option_->string ()); break; case E_UNKNOWNOPTION: str += _f ("unrecognized option: `%s'", - String (argument_index_i_ - ? String ("-" + String_convert::form_str ("%c", - arg_value_ch_a_a_[array_index_i_][argument_index_i_])) - : String (arg_value_ch_a_a_[array_index_i_]))); + String (argument_index_ + ? String ("-" + String_convert::form_string ("%c", + arg_value_char_a_a_[array_index_][argument_index_])) + : String (arg_value_char_a_a_[array_index_]))); break; case E_ILLEGALARG: str += _f ("invalid argument `%s' to option `%s'", - optional_argument_ch_C_, found_option_l_->str ()); + optional_argument_str0_, found_option_->string ()); break; default: assert (false); } - fprintf(error_out_, "%s\n", str.ch_C()); + fprintf(error_out_, "%s\n", str.to_str0 ()); exit (2); } const Long_option_init * Getopt_long::parseshort () { - char c=arg_value_ch_a_a_[array_index_i_][argument_index_i_]; - found_option_l_=0; + char c=arg_value_char_a_a_[array_index_][argument_index_]; + found_option_=0; assert (c); - for (int i=0; i < table_len_i_; i++) - if (option_a_[i].shortname_ch_ == c) + for (int i=0; i < table_len_; i++) + if (option_a_[i].shortname_char_ == c) { - found_option_l_ = option_a_+i; + found_option_ = option_a_+i; break; } - if (!found_option_l_) + if (!found_option_) { report (E_UNKNOWNOPTION); return 0; } - argument_index_i_++; - if (!found_option_l_->take_arg_sz_) + argument_index_++; + if (!found_option_->take_arg_str0_) { - optional_argument_ch_C_ = 0; - return found_option_l_; + optional_argument_str0_ = 0; + return found_option_; } - optional_argument_ch_C_ = arg_value_ch_a_a_[array_index_i_] + argument_index_i_; + optional_argument_str0_ = arg_value_char_a_a_[array_index_] + argument_index_; - array_index_i_ ++; - argument_index_i_ = 0; + array_index_ ++; + argument_index_ = 0; - if (!optional_argument_ch_C_[0]) + if (!optional_argument_str0_[0]) { - optional_argument_ch_C_ = arg_value_ch_a_a_[array_index_i_]; - array_index_i_ ++; + optional_argument_str0_ = arg_value_char_a_a_[array_index_]; + array_index_ ++; } - if (!optional_argument_ch_C_) + if (!optional_argument_str0_) { report (E_ARGEXPECT); } - return found_option_l_; + return found_option_; } const Long_option_init * @@ -222,25 +222,25 @@ Getopt_long::operator () () if (!ok ()) return 0; - if (argument_index_i_) + if (argument_index_) return parseshort (); - const char * argument_C = arg_value_ch_a_a_[array_index_i_]; + const char * argument = arg_value_char_a_a_[array_index_]; - if (argument_C[0] != '-') + if (argument[0] != '-') return 0; - if (argument_C[1] == '-') {// what to do with "command -- bla" - if (argument_C[2]) + if (argument[1] == '-') {// what to do with "command -- bla" + if (argument[2]) return parselong (); else return 0; } else { - if (argument_C[ 1 ]) + if (argument[ 1 ]) { - argument_index_i_ = 1; + argument_index_ = 1; return parseshort (); } else @@ -256,43 +256,43 @@ Getopt_long::Getopt_long (int c, char **v, Long_option_init *lo) { option_a_ = lo; error_out_ = stderr; - arg_value_ch_a_a_ = v; - argument_count_i_ = c; - array_index_i_ = 1; - argument_index_i_ = 0; + arg_value_char_a_a_ = v; + argument_count_ = c; + array_index_ = 1; + argument_index_ = 0; // reached end of option table? - table_len_i_ =0; - for (int i = 0; option_a_[i].longname_sz_ ||option_a_[i].shortname_ch_; i++) - table_len_i_ ++; + table_len_ =0; + for (int i = 0; option_a_[i].longname_str0_ ||option_a_[i].shortname_char_; i++) + table_len_ ++; } bool Getopt_long::ok () const { - return array_index_i_ < argument_count_i_; + return array_index_ < argument_count_; } void Getopt_long::next () { error_ = E_NOERROR; - while (array_index_i_ < argument_count_i_ - && !arg_value_ch_a_a_[array_index_i_][argument_index_i_]) + while (array_index_ < argument_count_ + && !arg_value_char_a_a_[array_index_][argument_index_]) { - array_index_i_++; - argument_index_i_ = 0; + array_index_++; + argument_index_ = 0; } } char const * Getopt_long::current_arg () { - if (array_index_i_ >= argument_count_i_) + if (array_index_ >= argument_count_) return 0; - char const * a = arg_value_ch_a_a_[array_index_i_]; - return a + argument_index_i_; + char const * a = arg_value_char_a_a_[array_index_]; + return a + argument_index_; } char const * @@ -301,8 +301,8 @@ Getopt_long::get_next_arg () char const * a = current_arg (); if (a) { - array_index_i_ ++; - argument_index_i_= 0; + array_index_ ++; + argument_index_= 0; } return a; } @@ -311,23 +311,23 @@ Getopt_long::get_next_arg () const int EXTRA_SPACES = 5; String -Long_option_init::table_str (Long_option_init *l) +Long_option_init::table_string (Long_option_init *l) { String argstr = "ARG"; String tabstr = ""; int wid = 0; - for (int i=0; l[i].shortname_ch_ || l[i].longname_sz_; i++) + for (int i=0; l[i].shortname_char_ || l[i].longname_str0_; i++) { - wid = wid >? l[i].str_for_help ().length_i (); + wid = wid >? l[i].str_for_help ().length (); } - for (int i=0; l[i].shortname_ch_ || l[i].longname_sz_; i++) + for (int i=0; l[i].shortname_char_ || l[i].longname_str0_; i++) { String s = " " + l[i].str_for_help (); - s += String_convert::char_str (' ', wid - s.length_i () + EXTRA_SPACES); + s += String_convert::char_string (' ', wid - s.length () + EXTRA_SPACES); - tabstr += s + gettext (l[i].help_sz_) + "\n"; + tabstr += s + gettext (l[i].help_str0_) + "\n"; } @@ -337,19 +337,19 @@ Long_option_init::table_str (Long_option_init *l) int Long_option_init::compare (Long_option_init const &a, Long_option_init const &b) { - if (a.shortname_ch_ && b.shortname_ch_ && a.shortname_ch_- b.shortname_ch_) - return a.shortname_ch_ - b.shortname_ch_; + if (a.shortname_char_ && b.shortname_char_ && a.shortname_char_- b.shortname_char_) + return a.shortname_char_ - b.shortname_char_; - if (b.shortname_ch_ && a.longname_sz_) + if (b.shortname_char_ && a.longname_str0_) { - char s[2] = {b.shortname_ch_, 0}; - return strcmp (a.longname_sz_, s); + char s[2] = {b.shortname_char_, 0}; + return strcmp (a.longname_str0_, s); } - if (a.shortname_ch_ && b.longname_sz_) + if (a.shortname_char_ && b.longname_str0_) { - char s[2] = {a.shortname_ch_, 0}; - return strcmp (s, b.longname_sz_); + char s[2] = {a.shortname_char_, 0}; + return strcmp (s, b.longname_str0_); } - return strcmp (a.longname_sz_, b.longname_sz_); + return strcmp (a.longname_str0_, b.longname_str0_); } diff --git a/flower/hash.cc b/flower/hash.cc index c33e7ed53d..7232c368bd 100644 --- a/flower/hash.cc +++ b/flower/hash.cc @@ -32,7 +32,7 @@ prime_list (int idx) unsigned int string_hash (String s) { - const char* str = s.ch_C (); + const char* str = s.to_str0 (); unsigned int result = 0; while (1) { char c = *str++; diff --git a/flower/include/array.hh b/flower/include/array.hh index 4e9710c1e2..209feaa95a 100644 --- a/flower/include/array.hh +++ b/flower/include/array.hh @@ -39,17 +39,17 @@ protected: int max_; /// the data itself - T *array_p_; + T *array_; /// stretch or shrink array. void remax (int newmax) { T* newarr = new T[newmax]; size_ = (newmax < size_) ? newmax : size_; - arrcpy (newarr, array_p_, size_); + arrcpy (newarr, array_, size_); - delete[] array_p_; - array_p_ = newarr; + delete[] array_; + array_ = newarr; max_ = newmax; } int size_; @@ -75,19 +75,19 @@ public: Array (T *tp, int n) { - array_p_ = new T[n]; + array_ = new T[n]; max_ =size_ = n; - arrcpy (array_p_, tp, n); + arrcpy (array_, tp, n); } Array () - { array_p_ = 0; max_ =0; size_ =0; } + { array_ = 0; max_ =0; size_ =0; } // ugh, get around gcc 2.8.1 ice; see bezier.cc Array (int i) { max_ = size_ = i; - array_p_ = new T[i]; + array_ = new T[i]; } @@ -101,28 +101,28 @@ public: } ~Array () - { delete[] array_p_; } + { delete[] array_; } /// return a "new"ed copy of array - T* copy_array () const + T* copys () const { T* Tarray = new T[size_]; - arrcpy (Tarray, array_p_, size_); + arrcpy (Tarray, array_, size_); return Tarray; } - T const *access_array () const + T const *accesses () const { - return array_p_; + return array_; } void operator= (Array const & src) { set_size (src.size_); - arrcpy (array_p_,src.array_p_, size_); + arrcpy (array_,src.array_, size_); } Array (Array const & src) { - array_p_ = src.copy_array (); + array_ = src.copys (); max_ = size_ = src.size_; } @@ -131,7 +131,7 @@ public: remax (size_); } - T * remove_array_p (); + T * remove_array (); /// access element T &operator[] (int i) @@ -147,7 +147,7 @@ public: T &elem_ref (int i) const { assert (i >=0&&i=0&& i < size_); - arrcpy (array_p_+i, array_p_+i+1, size_-i-1); + arrcpy (array_+i, array_+i+1, size_-i-1); size_--; } // quicksort. @@ -239,7 +239,7 @@ public: { int s = size_; set_size (size_ + src.size_); - arrcpy (array_p_+s,src.array_p_, src.size_); + arrcpy (array_+s,src.array_, src.size_); } Array slice (int lower, int upper) const; void reverse (); diff --git a/flower/include/array.icc b/flower/include/array.icc index 47636d3354..839da9cce1 100644 --- a/flower/include/array.icc +++ b/flower/include/array.icc @@ -44,8 +44,8 @@ Array::insert (T k, int j) assert (j >=0 && j<= size_); set_size (size_+1); for (int i=size_-1; i > j; i--) - array_p_[i] = array_p_[i-1]; - array_p_[j] = k; + array_[i] = array_[i-1]; + array_[j] = k; } template INLINE void @@ -61,7 +61,7 @@ Array::sort (int (*compare) (T const&,T const&), int lower, int upper) swap (lower, (lower+upper)/2); int last = lower; for (int i= lower +1; i <= upper; i++) - if (compare (array_p_[i], array_p_[lower]) < 0) + if (compare (array_[i], array_[lower]) < 0) swap (++last,i); swap (lower, last); sort (compare, lower, last-1); @@ -81,17 +81,17 @@ void Array::OK () const { assert (max_ >= size_ && size_ >=0); - if (max_) assert (array_p_); + if (max_) assert (array_); } template INLINE T * -Array::remove_array_p () +Array::remove_array () { - T * p = array_p_; + T * p = array_; size_ = 0; max_ = 0; - array_p_ =0; + array_ =0; return p; } @@ -103,7 +103,7 @@ Array::slice (int lower, int upper) const Array r; int s =upper-lower; r.set_size (s); - arrcpy (r.array_p_, array_p_ + lower, s); + arrcpy (r.array_, array_ + lower, s); return r; } diff --git a/flower/include/axes.hh b/flower/include/axes.hh index 77653eb0f8..74d44ac8a3 100644 --- a/flower/include/axes.hh +++ b/flower/include/axes.hh @@ -19,7 +19,7 @@ enum Axis { class String; -String axis_name_str (Axis); +String axis_name_string (Axis); /** diff --git a/flower/include/binary-source-file.hh b/flower/include/binary-source-file.hh index ee59497890..639e05ca1b 100644 --- a/flower/include/binary-source-file.hh +++ b/flower/include/binary-source-file.hh @@ -11,7 +11,7 @@ class Binary_source_file : public Source_file { public: - Binary_source_file (String& filename_str ); + Binary_source_file (String& filename_string ); virtual ~Binary_source_file (); U8 get_U8 (); @@ -20,8 +20,8 @@ public: Byte get_Byte () {return get_U8 (); } int get_int () { return get_U32 (); } - virtual String error_str (char const* pos_ch_C ) const; - virtual int line_i (char const* pos_ch_C ) const; + virtual String error_string (char const* pos_str0 ) const; + virtual int get_line (char const* pos_str0 ) const; }; #endif // BINARY_SOURCE_FILE_HH diff --git a/flower/include/cons.hh b/flower/include/cons.hh index 81161dd5ce..922ce5b32d 100644 --- a/flower/include/cons.hh +++ b/flower/include/cons.hh @@ -57,7 +57,7 @@ Cons *remove_cons (Cons **pp) return knip; } -template int cons_list_size_i (Cons *l) +template int cons_list_size (Cons *l) { int i=0; while (l) @@ -155,9 +155,9 @@ public: { junk (); } - int size_i () + int size () { - return cons_list_size_i (head_); + return cons_list_size (head_); } }; diff --git a/flower/include/direction.hh b/flower/include/direction.hh index 902f2fa2b8..5ff8da855d 100644 --- a/flower/include/direction.hh +++ b/flower/include/direction.hh @@ -55,6 +55,6 @@ flip (Direction *i) { */ template T minmax (Direction d, T, T); -// String direction_str (Direction, Axis); +// String direction_string (Direction, Axis); #endif // DIRECTION_HH diff --git a/flower/include/file-path.hh b/flower/include/file-path.hh index c7eb980c3b..b3bf47d5aa 100644 --- a/flower/include/file-path.hh +++ b/flower/include/file-path.hh @@ -30,7 +30,7 @@ public: String base; String ext; - String str () const; + String string () const; }; class File_path : private Array @@ -39,7 +39,7 @@ public: String find (String nm) const; Array::push; - String str ()const; + String string ()const; bool try_add (String str); void add (String); void parse_path (String); diff --git a/flower/include/file-storage.hh b/flower/include/file-storage.hh index 5af256f710..4a44c63965 100644 --- a/flower/include/file-storage.hh +++ b/flower/include/file-storage.hh @@ -19,8 +19,8 @@ class File_storage { public: - virtual char const* ch_C () const=0; - virtual int length_i () const=0; + virtual char const* to_str0 () const=0; + virtual int length () const=0; virtual ~File_storage (){} }; diff --git a/flower/include/flower-proto.hh b/flower/include/flower-proto.hh index d946063901..0d36f06e79 100644 --- a/flower/include/flower-proto.hh +++ b/flower/include/flower-proto.hh @@ -9,7 +9,7 @@ #define FPROTO_HH -char const * flower_version_sz (); +char const * flower_version_str0 (); template struct Link_array; template struct Array; diff --git a/flower/include/getopt-long.hh b/flower/include/getopt-long.hh index 58efbfe211..35720d8a68 100644 --- a/flower/include/getopt-long.hh +++ b/flower/include/getopt-long.hh @@ -8,18 +8,18 @@ a struct this for initialising the commandline options. */ struct Long_option_init { - char const * take_arg_sz_; - char const * longname_sz_; - char shortname_ch_; + char const * take_arg_str0_; + char const * longname_str0_; + char shortname_char_; - char const * help_sz_; + char const * help_str0_; - String str () const; + String string () const; String str_for_help () const; // NO constructor! static int compare (Long_option_init const&,Long_option_init const&); - static String table_str (Long_option_init *); + static String table_string (Long_option_init *); }; @@ -36,13 +36,13 @@ class Getopt_long { /// the option info. const Long_option_init *option_a_; - int table_len_i_; + int table_len_; - /// if doing short option, arg_value_ch_a_a_[optind][optindind] is processed next. - int argument_index_i_; + /// if doing short option, arg_value_char_a_a_[optind][optindind] is processed next. + int argument_index_; /// the option found - const Long_option_init *found_option_l_; + const Long_option_init *found_option_; public: @@ -52,19 +52,19 @@ public: E_ILLEGALARG } ; /// argument. Set to 0 if not present - char const * optional_argument_ch_C_; + char const * optional_argument_str0_; /// current error status Errorcod error_; - /// arg_value_ch_a_a_[array_index_i_] will be processed next. - int array_index_i_; + /// arg_value_char_a_a_[array_index_] will be processed next. + int array_index_; /// the arguments - char **arg_value_ch_a_a_; + char **arg_value_char_a_a_; /// the arg. count - int argument_count_i_; + int argument_count_; FILE *error_out_; @@ -81,7 +81,7 @@ public: /// return an integer (with err. detect) - long argument_to_i (); + long get_argument_index (); /** diff --git a/flower/include/input.hh b/flower/include/input.hh index a9baf330b3..4b12e25fb8 100644 --- a/flower/include/input.hh +++ b/flower/include/input.hh @@ -16,8 +16,8 @@ Base class for anything that records its poisition in the parse file. */ class Input { - char const *defined_ch_C_ ; - Source_file * source_file_l_; + char const *defined_str0_ ; + Source_file * source_file_; public: void warning (String) const; // should use member func? @@ -26,11 +26,11 @@ public: void message (String) const; void set_spot (Input const &); Input spot () const; - String location_str () const; - String line_number_str () const; + String location_string () const; + String line_number_string () const; - String file_str ()const; + String file_string ()const; int line_number ()const; int column_number ()const; diff --git a/flower/include/interval.hh b/flower/include/interval.hh index 0d445b2366..d5158f415e 100644 --- a/flower/include/interval.hh +++ b/flower/include/interval.hh @@ -23,7 +23,7 @@ struct Interval_t : public Drul_array { /* ************** */ static T infinity () ; - static String T_to_str (T arg); + static String T_to_string (T arg); T center () const { assert (!empty_b ()); return (elem (LEFT) + elem (RIGHT)) / T (2); @@ -86,7 +86,7 @@ struct Interval_t : public Drul_array { Real linear_combination (Real x) const { return ((1.0 - x) * Real (elem (LEFT)) + (x + 1.0) * Real (elem (RIGHT))) * 0.5; } - String str () const; + String string () const; bool elem_b (T r); void negate () { diff --git a/flower/include/interval.tcc b/flower/include/interval.tcc index 60f23fab09..ad531418d3 100644 --- a/flower/include/interval.tcc +++ b/flower/include/interval.tcc @@ -127,13 +127,13 @@ intersect (Interval_t x, Interval_t const &y) template String -Interval_t::str () const +Interval_t::string () const { if (empty_b ()) return "[empty]"; String s ("["); - return s + T_to_str (elem (LEFT)) + String ("," ) + T_to_str (elem (RIGHT) ) + String ("]" ); + return s + T_to_string (elem (LEFT)) + String ("," ) + T_to_string (elem (RIGHT) ) + String ("]" ); } template diff --git a/flower/include/libc-extension.hh b/flower/include/libc-extension.hh index bc76e9400b..4a90fc6c50 100644 --- a/flower/include/libc-extension.hh +++ b/flower/include/libc-extension.hh @@ -15,8 +15,8 @@ #include #include -char* strnlwr (char* start_l ,int n); -char* strnupr (char* start_l, int n); +char* strnlwr (char* start ,int n); +char* strnupr (char* start, int n); #if !HAVE_MEMMEM // GNU extension. void *memmem (void const * haystack, int haystack_len, @@ -38,7 +38,7 @@ int isinf (double x); #endif Byte *memrchr (Byte const * p, int n, char c); -Byte *strrev (Byte* byte_l, int length_i); +Byte *strrev (Byte* byte, int length_i); #endif // LIBC_EXTENSION_HH diff --git a/flower/include/mapped-file-storage.hh b/flower/include/mapped-file-storage.hh index 958e0b506f..a936401b6d 100644 --- a/flower/include/mapped-file-storage.hh +++ b/flower/include/mapped-file-storage.hh @@ -22,8 +22,8 @@ class Mapped_file_storage:public File_storage public: Mapped_file_storage (String); protected: - virtual char const* ch_C () const; - virtual int length_i () const; + virtual char const* to_str0 () const; + virtual int length () const; virtual ~Mapped_file_storage (); private: void open (String name); @@ -31,7 +31,7 @@ private: void map (); void unmap (); - int fildes_i_; + int fildes_; off_t size_off_; caddr_t data_caddr_; }; diff --git a/flower/include/offset.hh b/flower/include/offset.hh index ad0134651e..cc22f84da6 100644 --- a/flower/include/offset.hh +++ b/flower/include/offset.hh @@ -74,7 +74,7 @@ public: 0.0; } - String str () const; + String string () const; void mirror (Axis); Real arg () const; diff --git a/flower/include/parray.hh b/flower/include/parray.hh index eb259ede4b..08fe766f5d 100644 --- a/flower/include/parray.hh +++ b/flower/include/parray.hh @@ -87,21 +87,21 @@ public: { return (T*&) Array::top (i); } - void substitute (T *old, T*new_l) + void substitute (T *old, T*new_p) { int i; - while ((i = find_i (old)) >=0) - if (new_l) - elem_ref (i) =new_l; + while ((i = find_index (old)) >=0) + if (new_p) + elem_ref (i) =new_p; else del (i); } - void unordered_substitute (T* old, T * new_l) + void unordered_substitute (T* old, T * new_p) { int i; - while ((i = find_i (old)) >=0) - if (new_l) - elem_ref (i) =new_l; + while ((i = find_index (old)) >=0) + if (new_p) + elem_ref (i) =new_p; else { unordered_del (i); } @@ -115,11 +115,11 @@ public: int lower = -1, int upper = -1); void uniq () { - Link_array l_arr; + Link_array ls; for (int i=0; i < size (); i++) if (!i || elem (i-1) != elem (i)) - l_arr.push (elem (i)); - *this = l_arr; + ls.push (elem (i)); + *this = ls; } Array::del; Array::unordered_del; @@ -148,9 +148,9 @@ public: } - T ** access_array () const + T ** accesses () const { - return (T**) Array::access_array (); + return (T**) Array::accesses (); } T * get (int i) { @@ -165,15 +165,15 @@ public: { Array::concat (a2); } - int find_i (T const * t) const { + int find_index (T const * t) const { for (int i=0; i < size (); i++) if (elem (i) == t) return i; return -1; } - T *find_l (T const *t) const + T *find (T const *t) const { - int i = find_i (t); + int i = find_index (t); if (i >= 0) return elem (i); else @@ -184,7 +184,7 @@ public: template Link_array -typecast_array (Link_array const &a, T * /* dummy */ ) +typecasts (Link_array const &a, T * /* dummy */ ) { Link_array ret; for (int i=a.size (); i-- ; ) @@ -216,7 +216,7 @@ Link_array::sort (int (*compare)(T *const&,T *const&), int lower, int upper) template void -junk_pointer_array (Link_array &a) +junk_pointers (Link_array &a) { for (int i=0; i < a.size (); i++) { @@ -232,7 +232,7 @@ junk_pointer_array (Link_array &a) */ template int -binsearch_array (Array const &arr, T t, int (*compare) (T const&,T const&)) +binsearchs (Array const &arr, T t, int (*compare) (T const&,T const&)) { int lo; int hi; @@ -263,7 +263,7 @@ binsearch_array (Array const &arr, T t, int (*compare) (T const&,T const&)) template int -binsearch_link_array (Link_array const &arr, T *t, +binsearch_links (Link_array const &arr, T *t, int (*compare) (T *const&,T *const&), int lo = 0, int hi = -1 ) { diff --git a/flower/include/pqueue.hh b/flower/include/pqueue.hh index 4ccd72d176..319b975d10 100644 --- a/flower/include/pqueue.hh +++ b/flower/include/pqueue.hh @@ -34,20 +34,20 @@ int compare (PQueue_ent const &e1 , PQueue_ent const &e2) { */ template class PQueue { - Array heap_arr_; + Array heap_array_; T &elt (int i) { - return heap_arr_[i-1]; + return heap_array_[i-1]; } T const&elt (int i) const { - return heap_arr_[i-1]; + return heap_array_[i-1]; } public: /** acces an heap element. Careful with this, as changing the priority might fuck up the invariants @param 1 <= i < size () */ - T& operator[] (int i) { return heap_arr_[i]; } - T operator[] (int i) const { return heap_arr_[i]; } + T& operator[] (int i) { return heap_array_[i]; } + T operator[] (int i) const { return heap_array_[i]; } void OK () const { #ifndef NDEBUG @@ -56,10 +56,10 @@ public: #endif } T front () const { return elt (1); } - int size () const { return heap_arr_.size (); } + int size () const { return heap_array_.size (); } void insert (T v) { - heap_arr_.push (v); - int i = heap_arr_.size (); + heap_array_.push (v); + int i = heap_array_.size (); int j = i / 2 ; while (j) { if (compare (elt (j), v) > 0) { @@ -80,7 +80,7 @@ public: } void delmin () { assert (size ()); - T last = heap_arr_.top (); + T last = heap_array_.top (); int mini=2; int lasti=1; @@ -95,7 +95,7 @@ public: mini *= 2; } elt (lasti) = last; - heap_arr_.pop (); + heap_array_.pop (); OK (); } T get () { diff --git a/flower/include/rational.hh b/flower/include/rational.hh index 5b4402f4c4..427eab9bf6 100644 --- a/flower/include/rational.hh +++ b/flower/include/rational.hh @@ -70,7 +70,7 @@ public: Rational &operator %= (Rational); static int compare (Rational const&, Rational const&); int sign () const; - String str () const; + String string () const; }; IMPLEMENT_ARITHMETIC_OPERATOR (Rational, / ); diff --git a/flower/include/simple-file-storage.hh b/flower/include/simple-file-storage.hh index 120267047c..f551ed8c57 100644 --- a/flower/include/simple-file-storage.hh +++ b/flower/include/simple-file-storage.hh @@ -17,14 +17,14 @@ */ class Simple_file_storage : public File_storage { - char * data_p_; - int len_i_; + char * data_; + int len_; void load_stdin (); void load_file (String); public: - virtual char const*ch_C () const; - virtual int length_i () const; + virtual char const*to_str0 () const; + virtual int length () const; virtual ~Simple_file_storage (); Simple_file_storage (String); }; diff --git a/flower/include/source-file.hh b/flower/include/source-file.hh index 777213267d..6e4be63601 100644 --- a/flower/include/source-file.hh +++ b/flower/include/source-file.hh @@ -25,42 +25,42 @@ class Source_file public: /** Ugh! filename gets changed! The path to the opened file may change, since it might be searched in multiple directories. */ - Source_file (String filename_str_r ); + Source_file (String filename_string_r ); - Source_file (String name_str, String data_str); + Source_file (String name_string, String data_string); virtual ~Source_file (); - char const* ch_C () const; - virtual String error_str (char const* pos_ch_C ) const; - std::istream * istream_l (); - bool in_b (char const* pos_ch_C ) const; - int length_i () const; - virtual int line_i (char const* pos_ch_C ) const; - String name_str () const; - String file_line_column_str (char const* ch_C ) const; + char const* to_str0 () const; + virtual String error_string (char const* pos_str0 ) const; + std::istream * get_istream (); + bool in_b (char const* pos_str0 ) const; + int length () const; + virtual int get_line (char const* pos_str0 ) const; + String name_string () const; + String file_line_column_string (char const* str0 ) const; // return start + n - char const* seek_ch_C (int n); + char const* seek_str0 (int n); // return here + n bytes - char const* forward_ch_C (int n); - char const* pos_ch_C () { return pos_ch_C_; } - String get_str (int n); - void set_pos (char const * pos_ch_C); + char const* forward_str0 (int n); + char const* pos_str0 () { return pos_str0_; } + String get_string (int n); + void set_pos (char const * pos_str0); public: - Slice line_slice (char const* pos_ch_C) const; - String line_str (char const* pos_ch_C) const; - int column_i (char const* pos_ch_C) const; - int char_i (char const* pos_ch_C) const; + Slice line_slice (char const* pos_str0) const; + String line_string (char const* pos_str0) const; + int get_column (char const* pos_str0) const; + int get_char (char const* pos_str0) const; /* DOCUMENT-ME */ - char const* pos_ch_C_; + char const* pos_str0_; private: - String name_str_; - std::istream* istream_p_; - File_storage * storage_p_; + String name_string_; + std::istream* istream_; + File_storage * storage_; }; #endif // SOURCE_FILE_HH // diff --git a/flower/include/source.hh b/flower/include/source.hh index 58192e812c..82b557b111 100644 --- a/flower/include/source.hh +++ b/flower/include/source.hh @@ -20,10 +20,10 @@ public: Sources (); ~Sources (); - Source_file * get_file_l (String &filename ); - Source_file* sourcefile_l (char const* ch_C ); - void add (Source_file* sourcefile_p ); - void set_path (File_path*p_C); + Source_file * get_file (String &filename ); + Source_file* get_sourcefile (char const* str0 ); + void add (Source_file* sourcefile ); + void set_path (File_path*p); void set_binary (bool); const File_path * path_C_; diff --git a/flower/include/string-convert.hh b/flower/include/string-convert.hh index d7dcb1fef3..6e109e604a 100644 --- a/flower/include/string-convert.hh +++ b/flower/include/string-convert.hh @@ -15,36 +15,36 @@ /** The functor String_convert handles all conversions to/from String (some time, anyway). The class is quite empty from data view. */ class String_convert { - static int hex2bin_i (String hex_str, String& bin_str_r); - static int hex2nibble_i (Byte byte); + static int hex2bin (String hex_string, String& bin_string_r); + static int hex2nibble (Byte byte); static Byte nibble2hex_byte (Byte byte); public: static String pad_to (String s, int length); - static String bool_str (bool b); - static String bin2dec_str (String bin_str); - static String bin2hex_str (String bin_str); - static String dec2bin_str (String str); - static int bin2_i (String bin_str); - static unsigned bin2_u (String bin_str); - static String char_str (char c, int n); - static int dec2_i (String dec_str); - static double dec2_f (String dec_str); - static String double_str (double f, char const* fmt=0); - static String form_str (char const* format, ...); - static String vform_str (char const* format, va_list args); - static int hex2_i (String str); - static unsigned hex2_u (String str); - static String hex2bin_str (String str); - static String int_str (int i, char const *fmt=0 ); - static String long_str (long); - static String i2hex_str (int i, int length_i, char ch); - static String u2hex_str (unsigned u, int length_i, char ch); - static String i2dec_str (int i, int length_i, char ch); - static String rational_str (Rational); - static String pointer_str (void const *); - static String precision_str (double x, int n); - static Array split_arr (String str, char c); - static String i64_str (I64, char const * fmt = 0); + static String bool_string (bool b); + static String bin2dec (String bin_string); + static String bin2hex (String bin_string); + static String dec2bin (String str); + static int bin2int (String bin_string); + static unsigned bin2unsigned (String bin_string); + static String char_string (char c, int n); + static int dec2int (String dec_string); + static double dec2double (String dec_string); + static String double_string (double f, char const* fmt=0); + static String form_string (char const* format, ...); + static String vform_string (char const* format, va_list args); + static int hex2int (String str); + static unsigned hex2unsigned (String str); + static String hex2bin (String str); + static String int_string (int i, char const *fmt=0 ); + static String long_string (long); + static String int2hex (int i, int length_i, char ch); + static String unsigned2hex (unsigned u, int length_i, char ch); + static String int2dec (int i, int length_i, char ch); + static String rational_string (Rational); + static String pointer_string (void const *); + static String precision_string (double x, int n); + static Array split (String str, char c); + static String i64_string (I64, char const * fmt = 0); }; #endif // __STRING_CONVERT_HH // diff --git a/flower/include/string-data.hh b/flower/include/string-data.hh index 764dd8f0cd..188946e77c 100644 --- a/flower/include/string-data.hh +++ b/flower/include/string-data.hh @@ -20,8 +20,8 @@ class String_data { friend class String_handle; int maxlen; // maxlen is arraysize-1 - int length_i_; - Byte* data_byte_p_; + int length_; + Byte* data_byte_; int references; /// init to "" @@ -33,13 +33,13 @@ friend class String_handle; ~String_data (); /** POST: maxlen >= j. - @param j, maximum stringlength_i_. + @param j, maximum stringlength_. contents thrown away. */ void setmax (int j); /** POST: maxlen >= j. - @param j, maximum stringlength_i_. + @param j, maximum stringlength_. contents are kept if it grows. */ void remax (int j); @@ -54,27 +54,27 @@ friend class String_handle; void tighten (); // assignment. - void set (Byte const* byte_C, int length_i); + void set (Byte const* byte, int length_i); - void set (char const* ch_C); + void set (char const* str0); /// concatenation. - void append (Byte const* byte_C, int length_i); + void append (Byte const* byte, int length_i); - void operator += (char const* ch_C); + void operator += (char const* str0); - char const* ch_C () const; + char const* to_str0 () const; - char* ch_l (); + char* get_str0 (); - Byte const* byte_C () const; + Byte const* to_bytes () const; // idem, non const - Byte* byte_l (); + Byte* get_bytes (); void trunc (int j); - /** access element. not really safe. Can alter length_i_ without + /** access element. not really safe. Can alter length_ without #String_data# knowing it. */ Byte &operator [] (int j); Byte operator [] (int j) const; diff --git a/flower/include/string-data.icc b/flower/include/string-data.icc index 73a8b9c671..bb3f9c7da1 100644 --- a/flower/include/string-data.icc +++ b/flower/include/string-data.icc @@ -26,8 +26,8 @@ String_data::OKW () INLINE void String_data::OK () { - assert (maxlen >= length_i_); - assert (bool (data_byte_p_)); + assert (maxlen >= length_); + assert (bool (data_byte_)); assert (references >= 1); } @@ -37,25 +37,25 @@ String_data::String_data () { references=0; maxlen = INITIALMAX; - data_byte_p_ = new Byte[maxlen + 1]; - data_byte_p_[0] = 0; - length_i_ = 0; + data_byte_ = new Byte[maxlen + 1]; + data_byte_[0] = 0; + length_ = 0; } INLINE String_data::String_data (String_data const &src) { references=0; - maxlen = length_i_ = src.length_i_; - data_byte_p_ = new Byte[maxlen+1]; // should calc GNU 8byte overhead. - memcpy (data_byte_p_, src.data_byte_p_, length_i_ + 1); + maxlen = length_ = src.length_; + data_byte_ = new Byte[maxlen+1]; // should calc GNU 8byte overhead. + memcpy (data_byte_, src.data_byte_, length_ + 1); } INLINE String_data::~String_data () { assert (references == 0); - delete[] data_byte_p_; + delete[] data_byte_; } INLINE void @@ -64,17 +64,17 @@ String_data::setmax (int j) OKW (); if (j > maxlen) { - delete data_byte_p_; + delete data_byte_; maxlen = j; - data_byte_p_ = new Byte[maxlen + 1]; + data_byte_ = new Byte[maxlen + 1]; - data_byte_p_[0] = 0; - length_i_ = 0; + data_byte_[0] = 0; + length_ = 0; } } /* this is all quite hairy: - update of length_i_ + update of length_ update of maxlen alloc of buffer copying of buffer @@ -89,90 +89,90 @@ String_data::remax (int j) if (j > maxlen) { Byte *p = new Byte[j + 1]; - memcpy (p, data_byte_p_, (maxlen = 0 && j <= length_i_); - data_byte_p_[j] = 0; - length_i_ = j; + assert (j >= 0 && j <= length_); + data_byte_[j] = 0; + length_ = j; } INLINE bool String_data::is_binary_bo () const { - // return !memchr (data_byte_p_, length_i_, 0); - return ((int)strlen ((char const*)data_byte_p_) != length_i_ ); + // return !memchr (data_byte_, length_, 0); + return ((int)strlen ((char const*)data_byte_) != length_ ); } INLINE Byte& String_data::operator [] (int j) { - assert (j >= 0 && j <= length_i_); - return data_byte_p_[j] ; + assert (j >= 0 && j <= length_); + return data_byte_[j] ; } INLINE Byte String_data::operator [] (int j) const { - assert (j >= 0 && j <= length_i_); - return data_byte_p_[j]; + assert (j >= 0 && j <= length_); + return data_byte_[j]; } diff --git a/flower/include/string-handle.hh b/flower/include/string-handle.hh index 610531cf1e..41d8b7081e 100644 --- a/flower/include/string-handle.hh +++ b/flower/include/string-handle.hh @@ -39,24 +39,24 @@ public: ~String_handle (); String_handle (String_handle const & src); - Byte const* byte_C () const; - char const* ch_C () const; - Byte* byte_l (); - char* ch_l (); + Byte const* to_bytes () const; + char const* to_str0 () const; + Byte* get_bytes (); + char* get_str0 (); bool is_binary_bo () const; void operator = (String_handle const &src); void operator += (char const *s); Byte operator[] (int j) const; /** Access elements. WARNING: NOT SAFE - don't use this for loops. Use byte_C () + don't use this for loops. Use to_bytes () */ Byte &operator[] (int j); - void append (Byte const* byte_C, int length_i); - void set (Byte const* byte_C, int length_i); + void append (Byte const* byte, int length_i); + void set (Byte const* byte, int length_i); void operator = (char const *p); void trunc (int j); - int length_i () const; + int length () const; }; #ifdef STRING_UTILS_INLINED diff --git a/flower/include/string-handle.icc b/flower/include/string-handle.icc index decb241bff..7facf72523 100644 --- a/flower/include/string-handle.icc +++ b/flower/include/string-handle.icc @@ -59,29 +59,29 @@ String_handle::String_handle (String_handle const & src) } INLINE Byte* -String_handle::byte_l () +String_handle::get_bytes () { copy (); - return data->byte_l (); + return data->get_bytes (); } INLINE char* -String_handle::ch_l () +String_handle::get_str0 () { copy (); - return (char*)data->byte_l (); + return (char*)data->get_bytes (); } INLINE Byte -const* String_handle::byte_C () const +const* String_handle::to_bytes () const { - return data->byte_C (); + return data->to_bytes (); } INLINE char const* -String_handle::ch_C () const +String_handle::to_str0 () const { - return (char const*)data->byte_C (); + return (char const*)data->to_bytes (); } INLINE void @@ -108,26 +108,26 @@ String_handle::operator[] (int j) const } // !NOT SAFE! -// don't use this for loops. Use byte_C () +// don't use this for loops. Use to_bytes () INLINE Byte & String_handle::operator[] (int j) { copy (); // hmm. Not efficient - return data->byte_l ()[j]; + return data->get_bytes ()[j]; } INLINE void -String_handle::append (Byte const* byte_C, int length_i) +String_handle::append (Byte const* byte, int length_i) { copy (); - data->append (byte_C, length_i); + data->append (byte, length_i); } INLINE void -String_handle::set (Byte const* byte_C, int length_i) +String_handle::set (Byte const* byte, int length_i) { copy (); - data->set (byte_C, length_i); + data->set (byte, length_i); } INLINE void @@ -144,9 +144,9 @@ String_handle::trunc (int j) } INLINE int -String_handle::length_i () const +String_handle::length () const { - return data->length_i_; + return data->length_; } INLINE bool diff --git a/flower/include/string-storage.hh b/flower/include/string-storage.hh index ac48e15579..dfe49c8c47 100644 --- a/flower/include/string-storage.hh +++ b/flower/include/string-storage.hh @@ -22,8 +22,8 @@ public: String_storage (String s) : String (s) { } protected: - virtual char const* ch_C () const { return String::ch_C (); } - virtual int length_i () const { return String::length_i (); } + virtual char const* to_str0 () const { return String::to_str0 (); } + virtual int length () const { return String::length (); } }; #endif /* STRING_STORAGE_HH */ diff --git a/flower/include/string.hh b/flower/include/string.hh index 921afb2a65..5f9f53ca72 100644 --- a/flower/include/string.hh +++ b/flower/include/string.hh @@ -43,7 +43,7 @@ class ostream; indexing (index_i, index_any_i, last_index_i) \item - cutting (left_str, right_str, mid_str) + cutting (left_string, right_string, mid_string) \item concat (+=, +) @@ -72,16 +72,16 @@ public: /// String s = "abc"; String (char const* source); - String (Byte const* byte_C, int length_i); + String (Byte const* byte, int length_i); /// return "new"-ed copy of contents - Byte* copy_byte_p () const; - char* copy_ch_p () const; + Byte* get_copy_byte () const; + char* get_copy_str0 () const; - char const* ch_C () const; - Byte const* byte_C () const; - char* ch_l (); - Byte* byte_l (); + char const* to_str0 () const; + Byte const* to_bytes () const; + char* get_str0 (); + Byte* get_bytes (); String &operator = (String const & source); @@ -101,42 +101,42 @@ public: char operator [] (int n) const; /// return n leftmost chars - String left_str (int n) const; + String left_string (int n) const; /// return n rightmost chars - String right_str (int n) const; + String right_string (int n) const; /// return uppercase of *this - String upper_str () const; + String upper_string () const; /// return lowercase of *this - String lower_str () const; + String lower_string () const; /// return the "esrever" of *this - String reversed_str () const; + String reversed_string () const; - /// return a piece starting at index_i (first char = index_i 0), length n - String cut_str (int index_i, int n) const; + /// return a piece starting at index (first char = index_i 0), length n + String cut_string (int index_i, int n) const; /// cut out a middle piece, return remainder - String nomid_str (int index_i, int n) const; + String nomid_string (int index_i, int n) const; /// signed comparison, analogous to memcmp; - static int compare_i (String const & s1,const String& s2); + static int compare (String const & s1,const String& s2); /// index of rightmost c - int index_last_i (char c) const; + int index_last (char c) const; /// index of rightmost element of string (???) - int index_last_i (char const* string) const; + int index_last (char const* string) const; - int index_i (char c) const; + int index (char c) const; /// index of leftmost occurance of STRING - int index_i (String) const; + int index (String) const; - int index_any_i (String) const; + int index_any (String) const; void to_upper (); void to_lower (); @@ -147,13 +147,13 @@ public: #endif /// the length of the string - int length_i () const; + int length () const; /// convert to an integer - int value_i () const; + int to_int () const; /// convert to a double - double value_f () const; + double to_double () const; }; /* @@ -168,14 +168,14 @@ public: */ /// for completeness (=handy) -inline String to_str (String s) { return s; } +inline String to_string (String s) { return s; } /// "cccc" -String to_str (char c, int n = 1); -String to_str (int i, char const* format = 0); -String to_str (double f , char const* format = 0); -String to_str (long b); -String to_str (bool b); -String to_str (char const* format, ... ); +String to_string (char c, int n = 1); +String to_string (int i, char const* format = 0); +String to_string (double f , char const* format = 0); +String to_string (long b); +String to_string (bool b); +String to_string (char const* format, ... ); /* technically incorrect, but lets keep it here: this is a @@ -186,7 +186,7 @@ String to_str (char const* format, ... ); #include "compare.hh" -INSTANTIATE_COMPARE (String const &, String::compare_i); +INSTANTIATE_COMPARE (String const &, String::compare); #ifdef STRING_UTILS_INLINED #ifndef INLINE diff --git a/flower/include/warn.hh b/flower/include/warn.hh index e63d65ce76..8564bd99bf 100644 --- a/flower/include/warn.hh +++ b/flower/include/warn.hh @@ -13,7 +13,7 @@ #include "string.hh" void programming_error (String s); -void warning (String message_str); -void error (String message_str); +void warning (String message_string); +void error (String message_string); void non_fatal_error (String); #endif // WARN_HH diff --git a/flower/input.cc b/flower/input.cc index 98bbab4ee9..381907d635 100644 --- a/flower/input.cc +++ b/flower/input.cc @@ -16,14 +16,14 @@ Input::Input (Source_file*s, char const *cl) { - source_file_l_=s; - defined_ch_C_=cl; + source_file_=s; + defined_str0_=cl; } Input::Input () { - source_file_l_ = 0; - defined_ch_C_ = 0; + source_file_ = 0; + defined_str0_ = 0; } Input @@ -48,7 +48,7 @@ Input::set_spot (Input const &i) */ void -Input::message (String message_str) const +Input::message (String message_string) const { String str; @@ -69,22 +69,22 @@ Input::message (String message_str) const if (col > 0) str += "\n"; - if (source_file_l_) - str += location_str () + String (": "); + if (source_file_) + str += location_string () + String (": "); - str += message_str; - if (source_file_l_) + str += message_string; + if (source_file_) { str += ":\n"; - str += source_file_l_->error_str (defined_ch_C_); + str += source_file_->error_string (defined_str0_); } - fprintf (stderr, "%s\n", str.ch_C()); + fprintf (stderr, "%s\n", str.to_str0 ()); } void -Input::warning (String message_str) const +Input::warning (String message_string) const { - message (_ ("warning: ") + message_str); + message (_ ("warning: ") + message_string); } void Input::error (String s) const @@ -98,28 +98,28 @@ Input::non_fatal_error (String s) const message (_ ("non fatal error: ") + s); } String -Input::location_str () const +Input::location_string () const { - if (source_file_l_) - return source_file_l_->file_line_column_str (defined_ch_C_); + if (source_file_) + return source_file_->file_line_column_string (defined_str0_); else return " (" + _ ("position unknown") + ")"; } String -Input::line_number_str () const +Input::line_number_string () const { - if (source_file_l_) - return to_str (source_file_l_->line_i (defined_ch_C_)); + if (source_file_) + return to_string (source_file_->get_line (defined_str0_)); else return "?"; } String -Input::file_str () const +Input::file_string () const { - if (source_file_l_) - return source_file_l_->name_str (); + if (source_file_) + return source_file_->name_string (); else return ""; } @@ -128,8 +128,8 @@ Input::file_str () const int Input::line_number () const { - if (source_file_l_) - return source_file_l_->line_i (defined_ch_C_); + if (source_file_) + return source_file_->get_line (defined_str0_); else return 0; @@ -138,8 +138,8 @@ Input::line_number () const int Input::column_number () const { - if (source_file_l_) - return source_file_l_->column_i (defined_ch_C_); + if (source_file_) + return source_file_->get_column (defined_str0_); else return 0; diff --git a/flower/international.cc b/flower/international.cc index d605cd501c..8414e3a238 100644 --- a/flower/international.cc +++ b/flower/international.cc @@ -33,7 +33,7 @@ _f (char const* format, ...) { va_list args; va_start (args, format); - String str = String_convert::vform_str (gettext (format), args); + String str = String_convert::vform_string (gettext (format), args); va_end (args); return str; } @@ -41,6 +41,6 @@ _f (char const* format, ...) String _f (char const* format, String s, String s2, String s3) { - return String_convert::form_str (gettext (format), s.ch_C (), s2.ch_C (), - s3.ch_C ()); + return String_convert::form_string (gettext (format), s.to_str0 (), s2.to_str0 (), + s3.to_str0 ()); } diff --git a/flower/interval.cc b/flower/interval.cc index ffcf4782b5..e3873147fc 100644 --- a/flower/interval.cc +++ b/flower/interval.cc @@ -18,9 +18,9 @@ Interval_t::infinity () } String -Interval_t::T_to_str (Real r) +Interval_t::T_to_string (Real r) { - return to_str (r); + return to_string (r); } @@ -31,9 +31,9 @@ Interval_t::infinity () } String -Interval_t::T_to_str (int i) +Interval_t::T_to_string (int i) { - return to_str (i); + return to_string (i); } template INTERVAL__INSTANTIATE (int); diff --git a/flower/libc-extension.cc b/flower/libc-extension.cc index 3986cc8ad0..f584bb4c87 100644 --- a/flower/libc-extension.cc +++ b/flower/libc-extension.cc @@ -17,25 +17,25 @@ urg: why soo wierd? */ char* -strnlwr (char* start_l ,int n) +strnlwr (char* start ,int n) { - char * p = start_l + n; - while (--p >= start_l) + char * p = start + n; + while (--p >= start) { *p = tolower (*p); /* a macro on some compilers */ } - return start_l; + return start; } char* -strnupr (char* start_l, int n) +strnupr (char* start, int n) { - char * p = start_l + n; - while (--p >= start_l) + char * p = start + n; + while (--p >= start) { *p = toupper (*p); /* a macro on some compilers */ } - return start_l; + return start; } @@ -58,10 +58,10 @@ _memmem (Byte const *haystack, int haystack_len, is the spice of life */ while (haystack < end_haystack) { - Byte const *subneedle_l = needle; - Byte const *subhaystack_l = haystack; - while (subneedle_l < end_needle) - if (*subneedle_l++ != *subhaystack_l++) + Byte const *subneedle = needle; + Byte const *subhaystack = haystack; + while (subneedle < end_needle) + if (*subneedle++ != *subhaystack++) goto next; // completed the needle. Gotcha. @@ -76,9 +76,9 @@ void * memmem (void const *haystack, int haystack_len, void const *needle,int needle_len) { - Byte const* haystack_byte_c_l = (Byte const*)haystack; - Byte const* needle_byte_c_l = (Byte const*)needle; - return _memmem (haystack_byte_c_l, haystack_len, needle_byte_c_l, needle_len); + Byte const* haystack_byte_c = (Byte const*)haystack; + Byte const* needle_byte_c = (Byte const*)needle; + return _memmem (haystack_byte_c, haystack_len, needle_byte_c, needle_len); } #endif @@ -106,18 +106,18 @@ my_swap (T &t1, T &t2, T &tmp) } Byte* -strrev (Byte* byte_l, int length_i) +strrev (Byte* byte, int length_i) { Byte tmp_byte; - Byte* left_l = byte_l; - Byte* right_l = byte_l + length_i; + Byte* left = byte; + Byte* right = byte + length_i; - while (right_l > left_l) + while (right > left) { - my_swap (*right_l-- , *left_l++ , tmp_byte); + my_swap (*right-- , *left++ , tmp_byte); } - return byte_l; + return byte; } #if ! HAVE_SNPRINTF diff --git a/flower/mapped-file-storage.cc b/flower/mapped-file-storage.cc index ebc81fca30..f9baca9a5a 100644 --- a/flower/mapped-file-storage.cc +++ b/flower/mapped-file-storage.cc @@ -37,13 +37,13 @@ Mapped_file_storage::Mapped_file_storage (String s) { data_caddr_ = 0; - fildes_i_ = 0; + fildes_ = 0; size_off_ = 0; open (s); } char const* -Mapped_file_storage::ch_C () const +Mapped_file_storage::to_str0 () const { return (char const*)data_caddr_; } @@ -51,7 +51,7 @@ Mapped_file_storage::ch_C () const void Mapped_file_storage::map () { - if (fildes_i_ == -1) + if (fildes_ == -1) return; #ifdef __NeXT__ @@ -60,7 +60,7 @@ Mapped_file_storage::map () vm_offset_t address; kern_return_t r; - r = map_fd (fildes_i_, (vm_offset_t) 0, &address, TRUE, size_off_); + r = map_fd (fildes_, (vm_offset_t) 0, &address, TRUE, size_off_); if (r != KERN_SUCCESS) warning (String ("map_fd: ") + mach_error_string (r)); else @@ -68,7 +68,7 @@ Mapped_file_storage::map () } #else - data_caddr_ = (caddr_t)mmap ((void*)0, size_off_, PROT_READ, MAP_SHARED, fildes_i_, 0); + data_caddr_ = (caddr_t)mmap ((void*)0, size_off_, PROT_READ, MAP_SHARED, fildes_, 0); if ((int)data_caddr_ == -1) warning (_ ("can't map file") + ": " + strerror (errno)); @@ -78,19 +78,19 @@ Mapped_file_storage::map () void -Mapped_file_storage::open (String name_str) +Mapped_file_storage::open (String name_string) { - fildes_i_ = ::open (name_str.ch_C (), O_RDONLY); + fildes_ = ::open (name_string.to_str0 (), O_RDONLY); - if (fildes_i_ == -1) + if (fildes_ == -1) { - warning (_f ("can't open file: `%s'", name_str) + warning (_f ("can't open file: `%s'", name_string) + ": " + strerror (errno)); return; } struct stat file_stat; - fstat (fildes_i_, &file_stat); + fstat (fildes_, &file_stat); size_off_ = file_stat.st_size; map (); } @@ -120,15 +120,15 @@ void Mapped_file_storage::close () { unmap (); - if (fildes_i_) + if (fildes_) { - ::close (fildes_i_); - fildes_i_ = 0; + ::close (fildes_); + fildes_ = 0; } } int -Mapped_file_storage::length_i () const +Mapped_file_storage::length () const { return size_off_; } diff --git a/flower/offset.cc b/flower/offset.cc index d797f5f96b..92d2937b0a 100644 --- a/flower/offset.cc +++ b/flower/offset.cc @@ -15,11 +15,11 @@ #ifndef STANDALONE String -Offset::str () const +Offset::string () const { String s; - s = String (" (") + to_str (coordinate_a_[X_AXIS]) + ", " - + to_str (coordinate_a_[Y_AXIS]) + ")"; + s = String (" (") + to_string (coordinate_a_[X_AXIS]) + ", " + + to_string (coordinate_a_[Y_AXIS]) + ")"; return s; } #endif diff --git a/flower/polynomial.cc b/flower/polynomial.cc index df8847fe04..f5d4b38fe3 100644 --- a/flower/polynomial.cc +++ b/flower/polynomial.cc @@ -237,8 +237,8 @@ Polynomial::solve_cubic ()const /* use Cardano's formula */ - Real cb_p = p * p * p; - Real D = q * q + cb_p; + Real cb = p * p * p; + Real D = q * q + cb; if (iszero (D)) { if (iszero (q)) { /* one triple solution */ @@ -252,7 +252,7 @@ Polynomial::solve_cubic ()const sol.push (-u); } } else if (D < 0) { /* Casus irreducibilis: three real solutions */ - Real phi = 1.0 / 3 * acos (-q / sqrt (-cb_p)); + Real phi = 1.0 / 3 * acos (-q / sqrt (-cb)); Real t = 2 * sqrt (-p); sol.push (t * cos (phi)); diff --git a/flower/rational.cc b/flower/rational.cc index 4c7c293e35..b27c50b516 100644 --- a/flower/rational.cc +++ b/flower/rational.cc @@ -21,7 +21,7 @@ Rational::operator double () const ostream & operator << (ostream &o, Rational r) { - o << r.str (); + o << r.string (); return o; } #endif @@ -275,16 +275,16 @@ Rational::operator -= (Rational r) } String -Rational::str () const +Rational::string () const { if (infty_b ()) { String s (sign_ > 0 ? "" : "-" ); return String (s + "infinity"); } - String s = to_str (num ()); + String s = to_string (num ()); if (den () != 1 && num ()) - s += "/" + to_str (den ()); + s += "/" + to_string (den ()); return s; } diff --git a/flower/simple-file-storage.cc b/flower/simple-file-storage.cc index 8feb1a5843..10fd7902ff 100644 --- a/flower/simple-file-storage.cc +++ b/flower/simple-file-storage.cc @@ -20,14 +20,14 @@ void Simple_file_storage::load_stdin () { - len_i_ = 0; + len_ = 0; int c; - Array ch_arr; + Array chs; while ((c = fgetc (stdin)) != EOF) - ch_arr.push (c); - len_i_ = ch_arr.size (); - data_p_ = ch_arr.remove_array_p (); + chs.push (c); + len_ = chs.size (); + data_ = chs.remove_array (); } void @@ -37,7 +37,7 @@ Simple_file_storage::load_file (String s) let's hope that "b" opens anything binary, and does not apply CR/LF translation */ - FILE * f = fopen (s.ch_C (), "rb"); + FILE * f = fopen (s.to_str0 (), "rb"); if (!f) { @@ -46,14 +46,14 @@ Simple_file_storage::load_file (String s) } int ret = fseek (f, 0, SEEK_END); - len_i_ = ftell (f); + len_ = ftell (f); rewind (f); - data_p_ = new char[len_i_+1]; - data_p_[len_i_] = 0; - ret = fread (data_p_, sizeof (char), len_i_, f); + data_ = new char[len_+1]; + data_[len_] = 0; + ret = fread (data_, sizeof (char), len_, f); - if (ret!=len_i_) - warning (_f ("Huh? Got %d, expected %d characters", ret, len_i_)); + if (ret!=len_) + warning (_f ("Huh? Got %d, expected %d characters", ret, len_)); fclose (f); } @@ -71,8 +71,8 @@ Simple_file_storage::load_file (String s) Simple_file_storage::Simple_file_storage (String s) { - data_p_ = 0; - len_i_ = 0; + data_ = 0; + len_ = 0; if ((s == "-")) load_stdin (); @@ -81,19 +81,19 @@ Simple_file_storage::Simple_file_storage (String s) } char const* -Simple_file_storage::ch_C () const +Simple_file_storage::to_str0 () const { - return data_p_; + return data_; } int -Simple_file_storage::length_i () const +Simple_file_storage::length () const { - return len_i_; + return len_; } Simple_file_storage::~Simple_file_storage () { - delete []data_p_; + delete []data_; } diff --git a/flower/source-file.cc b/flower/source-file.cc index 1598cf1e51..a27e1f7780 100644 --- a/flower/source-file.cc +++ b/flower/source-file.cc @@ -13,7 +13,7 @@ #include #else #include -#define istringstream(x) istrstream(x, length_i ()) +#define istringstream(x) istrstream(x, length ()) #endif #include "string.hh" @@ -23,126 +23,126 @@ #include "simple-file-storage.hh" #include "string-storage.hh" -Source_file::Source_file (String filename_str) +Source_file::Source_file (String filename_string) { - name_str_ = filename_str; - istream_p_ = 0; - storage_p_ = new Simple_file_storage (filename_str); - pos_ch_C_ = ch_C (); + name_string_ = filename_string; + istream_ = 0; + storage_ = new Simple_file_storage (filename_string); + pos_str0_ = to_str0 (); } -Source_file::Source_file (String name_str, String data_str) +Source_file::Source_file (String name_string, String data_string) { - name_str_ = name_str; - istream_p_ = 0; - storage_p_ = new String_storage (data_str); - pos_ch_C_ = ch_C (); + name_string_ = name_string; + istream_ = 0; + storage_ = new String_storage (data_string); + pos_str0_ = to_str0 (); } std::istream* -Source_file::istream_l () +Source_file::get_istream () { /* - if (!name_str_.length_i ()) + if (!name_string_.length ()) return &cin; */ - if (!istream_p_) + if (!istream_) { - if (length_i ()) // can-t this be done without such a hack? - istream_p_ = new std::istringstream (ch_C ()); + if (length ()) // can-t this be done without such a hack? + istream_ = new std::istringstream (to_str0 ()); else { - istream_p_ = new std::istringstream (""); - istream_p_->setstate (std::ios::eofbit); - // istream_p_->set (ios::eofbit); + istream_ = new std::istringstream (""); + istream_->setstate (std::ios::eofbit); + // istream_->set (ios::eofbit); } } - return istream_p_; + return istream_; } String -Source_file::file_line_column_str (char const *context_ch_C) const +Source_file::file_line_column_string (char const *context_str0) const { - if (!ch_C ()) + if (!to_str0 ()) return " (" + _ ("position unknown") + ")"; else - return name_str () + ":" + to_str (line_i (context_ch_C)) - + ":" + to_str (char_i (context_ch_C)); + return name_string () + ":" + to_string (get_line (context_str0)) + + ":" + to_string (get_char (context_str0)); } String -Source_file::name_str () const +Source_file::name_string () const { - return name_str_; + return name_string_; } Source_file::~Source_file () { - delete istream_p_; - istream_p_ = 0; - delete storage_p_; + delete istream_; + istream_ = 0; + delete storage_; } Slice -Source_file::line_slice (char const* pos_ch_C) const +Source_file::line_slice (char const* pos_str0) const { - if (!in_b (pos_ch_C)) + if (!in_b (pos_str0)) return Slice (0,0); - char const* data_ch_C = ch_C (); - char const * eof_C_ = data_ch_C + length_i (); + char const* data_str0 = to_str0 (); + char const * eof_C_ = data_str0 + length (); - if (pos_ch_C == eof_C_) - pos_ch_C --; - char const* begin_ch_C = pos_ch_C; - while (begin_ch_C > data_ch_C) - if (*--begin_ch_C == '\n') + if (pos_str0 == eof_C_) + pos_str0 --; + char const* begin_str0 = pos_str0; + while (begin_str0 > data_str0) + if (*--begin_str0 == '\n') { - begin_ch_C++; + begin_str0++; break; } - char const* end_ch_C = pos_ch_C; - while (end_ch_C < eof_C_) - if (*end_ch_C++ == '\n') + char const* end_str0 = pos_str0; + while (end_str0 < eof_C_) + if (*end_str0++ == '\n') { - end_ch_C--; + end_str0--; break; } - return Slice (begin_ch_C - data_ch_C, end_ch_C - data_ch_C); + return Slice (begin_str0 - data_str0, end_str0 - data_str0); } String -Source_file::line_str (char const* pos_ch_C) const +Source_file::line_string (char const* pos_str0) const { - if (!in_b (pos_ch_C)) + if (!in_b (pos_str0)) return ""; - Slice line = line_slice (pos_ch_C); - char const* data_ch_C = ch_C (); - return String ((Byte const*)data_ch_C + line[LEFT], line.length ()); + Slice line = line_slice (pos_str0); + char const* data_str0 = to_str0 (); + return String ((Byte const*)data_str0 + line[LEFT], line.length ()); } int -Source_file::char_i (char const* pos_ch_C) const +Source_file::get_char (char const* pos_str0) const { - if (!in_b (pos_ch_C)) + if (!in_b (pos_str0)) return 0; - char const* data_ch_C = ch_C (); - return pos_ch_C - (line_slice (pos_ch_C)[SMALLER] + data_ch_C); + char const* data_str0 = to_str0 (); + return pos_str0 - (line_slice (pos_str0)[SMALLER] + data_str0); } int -Source_file::column_i (char const* pos_ch_C) const +Source_file::get_column (char const* pos_str0) const { - if (!in_b (pos_ch_C)) + if (!in_b (pos_str0)) return 0; - int ch_i = char_i (pos_ch_C); - String line = line_str (pos_ch_C); + int ch_i = get_char (pos_str0); + String line = line_string (pos_str0); int col_i = 0; for (int i = 0; i < ch_i; i++) @@ -155,95 +155,95 @@ Source_file::column_i (char const* pos_ch_C) const } String -Source_file::error_str (char const* pos_ch_C) const +Source_file::error_string (char const* pos_str0) const { - if (!in_b (pos_ch_C)) + if (!in_b (pos_str0)) return " (" + _ ("position unknown") + ")"; - int ch_i = char_i (pos_ch_C); - String line = line_str (pos_ch_C); - String context = line.left_str (ch_i) - + to_str ('\n') - + to_str (' ', column_i (pos_ch_C)) - + line.cut_str (ch_i, INT_MAX); + int ch_i = get_char (pos_str0); + String line = line_string (pos_str0); + String context = line.left_string (ch_i) + + to_string ('\n') + + to_string (' ', get_column (pos_str0)) + + line.cut_string (ch_i, INT_MAX); return context; } bool -Source_file::in_b (char const* pos_ch_C) const +Source_file::in_b (char const* pos_str0) const { - return (pos_ch_C && (pos_ch_C >= ch_C ()) && (pos_ch_C <= ch_C () + length_i ())); + return (pos_str0 && (pos_str0 >= to_str0 ()) && (pos_str0 <= to_str0 () + length ())); } int -Source_file::line_i (char const* pos_ch_C) const +Source_file::get_line (char const* pos_str0) const { - if (!in_b (pos_ch_C)) + if (!in_b (pos_str0)) return 0; int i = 1; - char const* scan_ch_C = ch_C (); - if (!scan_ch_C) + char const* scan_str0 = to_str0 (); + if (!scan_str0) return 0; - while (scan_ch_C < pos_ch_C) - if (*scan_ch_C++ == '\n') + while (scan_str0 < pos_str0) + if (*scan_str0++ == '\n') i++; return i; } int -Source_file::length_i () const +Source_file::length () const { - return storage_p_->length_i (); + return storage_->length (); } char const * -Source_file::ch_C () const +Source_file::to_str0 () const { - return storage_p_->ch_C (); + return storage_->to_str0 (); } void -Source_file::set_pos (char const * pos_ch_C) +Source_file::set_pos (char const * pos_str0) { - if (in_b (pos_ch_C)) - pos_ch_C_ = pos_ch_C; + if (in_b (pos_str0)) + pos_str0_ = pos_str0; else - error (error_str (pos_ch_C) + "invalid pos"); + error (error_string (pos_str0) + "invalid pos"); } char const* -Source_file::seek_ch_C (int n) +Source_file::seek_str0 (int n) { - char const* new_ch_C = ch_C () + n; + char const* new_str0 = to_str0 () + n; if (n < 0) - new_ch_C += length_i (); - if (in_b (new_ch_C)) - pos_ch_C_ = new_ch_C; + new_str0 += length (); + if (in_b (new_str0)) + pos_str0_ = new_str0; else - error (error_str (new_ch_C) + "seek past eof"); + error (error_string (new_str0) + "seek past eof"); - return pos_ch_C_; + return pos_str0_; } char const* -Source_file::forward_ch_C (int n) +Source_file::forward_str0 (int n) { - char const* old_pos_C = pos_ch_C_; - char const* new_ch_C = pos_ch_C_ + n; - if (in_b (new_ch_C)) - pos_ch_C_ = new_ch_C; + char const* old_pos = pos_str0_; + char const* new_str0 = pos_str0_ + n; + if (in_b (new_str0)) + pos_str0_ = new_str0; else - error (error_str (new_ch_C) + "forward past eof"); + error (error_string (new_str0) + "forward past eof"); - return old_pos_C; + return old_pos; } String -Source_file::get_str (int n) +Source_file::get_string (int n) { - String str = String ((Byte const*)forward_ch_C (n), n); + String str = String ((Byte const*)forward_str0 (n), n); return str; } diff --git a/flower/source.cc b/flower/source.cc index 8623548e25..cffc7989ab 100644 --- a/flower/source.cc +++ b/flower/source.cc @@ -30,39 +30,39 @@ Sources::set_binary (bool bo) } void -Sources::set_path (File_path *f_C) +Sources::set_path (File_path *f) { - path_C_ = f_C; + path_C_ = f; } /** open a file - @param file_str the file to be opened, name might be changed if it + @param file_string the file to be opened, name might be changed if it is found in a search path. UGH! @return 0 if no file found */ Source_file* -Sources::get_file_l (String &file_str) //UGH +Sources::get_file (String &file_string) //UGH { - if ((file_str != "-") && path_C_) + if ((file_string != "-") && path_C_) { - String file_str_o = path_C_->find (file_str); - if ((file_str_o == "") && (file_str != "")) + String file_string_o = path_C_->find (file_string); + if ((file_string_o == "") && (file_string != "")) return 0; - file_str = file_str_o; + file_string = file_string_o; } - Source_file * f_p = (!binary_b_) ? - new Source_file (file_str) : new Binary_source_file (file_str); - add (f_p); - return f_p; + Source_file * f = (!binary_b_) ? + new Source_file (file_string) : new Binary_source_file (file_string); + add (f); + return f; } void -Sources::add (Source_file* sourcefile_p) +Sources::add (Source_file* sourcefile) { - sourcefile_p_list_ = new Killing_cons (sourcefile_p, sourcefile_p_list_); + sourcefile_p_list_ = new Killing_cons (sourcefile, sourcefile_p_list_); } Sources::~Sources () @@ -70,16 +70,16 @@ Sources::~Sources () delete sourcefile_p_list_; } /** - search the list for file whose map contains pointer #ch_C# + search the list for file whose map contains pointer #str0# @return 0 if not found. */ Source_file* -Sources::sourcefile_l (char const* ch_C) +Sources::get_sourcefile (char const* str0) { for (Cons *i = sourcefile_p_list_; i; i = i->next_) - if (i->car_->in_b (ch_C)) + if (i->car_->in_b (str0)) return i->car_; return 0; } diff --git a/flower/string-convert.cc b/flower/string-convert.cc index d44857c423..6981551d30 100644 --- a/flower/string-convert.cc +++ b/flower/string-convert.cc @@ -28,60 +28,60 @@ static const int STRING_BUFFER_LEN=1024; String -String_convert::bool_str (bool b) +String_convert::bool_string (bool b) { return String (b ? "true" : "false"); } String -String_convert::bin2hex_str (String bin_str) +String_convert::bin2hex (String bin_string) { String str; - Byte const* byte_C = bin_str.byte_C (); - for (int i = 0; i < bin_str.length_i (); i++) + Byte const* byte = bin_string.to_bytes (); + for (int i = 0; i < bin_string.length (); i++) { - str += to_str ((char)nibble2hex_byte (*byte_C >> 4)); - str += to_str ((char)nibble2hex_byte (*byte_C++)); + str += to_string ((char)nibble2hex_byte (*byte >> 4)); + str += to_string ((char)nibble2hex_byte (*byte++)); } return str; } int -String_convert::bin2_i (String bin_str) +String_convert::bin2int (String bin_string) { - return bin2_u (bin_str); + return bin2unsigned (bin_string); } unsigned -String_convert::bin2_u (String bin_str) +String_convert::bin2unsigned (String bin_string) { - assert (bin_str.length_i () <= (int)sizeof (unsigned)); + assert (bin_string.length () <= (int)sizeof (unsigned)); unsigned result_u = 0; - for (int i = 0; i < bin_str.length_i (); i++) + for (int i = 0; i < bin_string.length (); i++) { result_u <<= 8; - result_u += (Byte)bin_str[ i ]; + result_u += (Byte)bin_string[ i ]; } return result_u; } // breendet imp from String int -String_convert::dec2_i (String dec_str) +String_convert::dec2int (String dec_string) { - if (!dec_str.length_i ()) + if (!dec_string.length ()) return 0; long l = 0; - int conv = sscanf (dec_str.ch_C (), "%ld", &l); + int conv = sscanf (dec_string.to_str0 (), "%ld", &l); assert (conv); return (int)l; } String -String_convert::i64_str (I64 i64, char const* fmt) +String_convert::i64_string (I64 i64, char const* fmt) { char buffer[STRING_BUFFER_LEN]; snprintf (buffer, STRING_BUFFER_LEN, @@ -91,50 +91,50 @@ String_convert::i64_str (I64 i64, char const* fmt) } // breendet imp from String double -String_convert::dec2_f (String dec_str) +String_convert::dec2double (String dec_string) { - if (!dec_str.length_i ()) + if (!dec_string.length ()) return 0; double d = 0; - int conv = sscanf (dec_str.ch_C (), "%lf", &d); + int conv = sscanf (dec_string.to_str0 (), "%lf", &d); assert (conv); return d; } int -String_convert::hex2bin_i (String hex_str, String& bin_str_r) +String_convert::hex2bin (String hex_string, String& bin_string_r) { - if (hex_str.length_i () % 2) - hex_str = "0" + hex_str; + if (hex_string.length () % 2) + hex_string = "0" + hex_string; - bin_str_r = ""; - Byte const* byte_C= hex_str.byte_C (); + bin_string_r = ""; + Byte const* byte= hex_string.to_bytes (); int i = 0; - while (i < hex_str.length_i ()) + while (i < hex_string.length ()) { - int high_i = hex2nibble_i (*byte_C++); - int low_i = hex2nibble_i (*byte_C++); + int high_i = hex2nibble (*byte++); + int low_i = hex2nibble (*byte++); if (high_i < 0 || low_i < 0) return 1; // illegal char - bin_str_r += to_str ((char) (high_i << 4 | low_i), 1 ); + bin_string_r += to_string ((char) (high_i << 4 | low_i), 1 ); i += 2; } return 0; } String -String_convert::hex2bin_str (String hex_str) +String_convert::hex2bin (String hex_string) { String str; // silly, asserts should alway be "on"! - // assert (!hex2bin_i (hex_str, str) ); - int error_i = hex2bin_i (hex_str, str); + // assert (!hex2bin (hex_string, str) ); + int error_i = hex2bin (hex_string, str); assert (!error_i); return str; } int -String_convert::hex2nibble_i (Byte byte) +String_convert::hex2nibble (Byte byte) { if (byte >= '0' && byte <= '9') return byte - '0'; @@ -145,25 +145,25 @@ String_convert::hex2nibble_i (Byte byte) return -1; } -// stupido. Should use int_str () +// stupido. Should use int_string () String -String_convert::i2dec_str (int i, int length_i, char ch) +String_convert::int2dec (int i, int length_i, char ch) { - char fill_ch = ch; - if (fill_ch) - fill_ch = '0'; + char fill_char = ch; + if (fill_char) + fill_char = '0'; // ugh - String dec_str = to_str (i); + String dec_string = to_string (i); // ugh - return to_str (fill_ch, length_i - dec_str.length_i ()) + dec_str; + return to_string (fill_char, length_i - dec_string.length ()) + dec_string; } -// stupido. Should use int_str () +// stupido. Should use int_string () String -String_convert::u2hex_str (unsigned u, int length_i, char fill_ch) +String_convert::unsigned2hex (unsigned u, int length_i, char fill_char) { String str; if (!u) @@ -172,24 +172,24 @@ String_convert::u2hex_str (unsigned u, int length_i, char fill_ch) #if 1 // both go... while (u) { - str = to_str ((char) ((u % 16)["0123456789abcdef"] ) ) + str; + str = to_string ((char) ((u % 16)["0123456789abcdef"] ) ) + str; u /= 16; } #else - str += int_str (u, "%x"); // hmm. %lx vs. %x -> portability? + str += int_string (u, "%x"); // hmm. %lx vs. %x -> portability? #endif - str = to_str (fill_ch, length_i - str.length_i ()) + str; - while ((str.length_i () > length_i) && (str[ 0 ] == 'f' ) ) - str = str.cut_str (2, INT_MAX); + str = to_string (fill_char, length_i - str.length ()) + str; + while ((str.length () > length_i) && (str[ 0 ] == 'f' ) ) + str = str.cut_string (2, INT_MAX); return str; } String -String_convert::i2hex_str (int i, int length_i, char fill_ch) +String_convert::int2hex (int i, int length_i, char fill_char) { - return u2hex_str ((unsigned)i, length_i, fill_ch); + return unsigned2hex ((unsigned)i, length_i, fill_char); } Byte @@ -207,7 +207,7 @@ String_convert::nibble2hex_byte (Byte byte) #fmt# is a printf style format, default assumes "%d" as format. */ String -String_convert::int_str (int i, char const* fmt) +String_convert::int_string (int i, char const* fmt) { char buffer[STRING_BUFFER_LEN]; snprintf (buffer, STRING_BUFFER_LEN, @@ -216,7 +216,7 @@ String_convert::int_str (int i, char const* fmt) } String -String_convert::form_str (char const* format, ...) +String_convert::form_string (char const* format, ...) { va_list args; va_start (args, format); @@ -227,7 +227,7 @@ String_convert::form_str (char const* format, ...) } String -String_convert::vform_str (char const* format, va_list args) +String_convert::vform_string (char const* format, va_list args) { char buffer[STRING_BUFFER_LEN]; vsnprintf (buffer, STRING_BUFFER_LEN, format, args); @@ -240,7 +240,7 @@ String_convert::vform_str (char const* format, va_list args) @param #fmt# is a printf style format, default assumes "%lf" as format */ String -String_convert::double_str (double f, char const* fmt) +String_convert::double_string (double f, char const* fmt) { char buf[STRING_BUFFER_LEN]; @@ -255,24 +255,24 @@ Make a string from a single character. #n# is a repetition count, default value is 1 */ String -String_convert::char_str (char c, int n) +String_convert::char_string (char c, int n) { n = n >= 0 ? n : 0; - char* ch_p = new char[ n ]; - memset (ch_p, c, n); - String s ((Byte*)ch_p, n); - delete[] ch_p; + char* ch = new char[ n ]; + memset (ch, c, n); + String s ((Byte*)ch, n); + delete[] ch; return s; } String -String_convert::rational_str (Rational r) +String_convert::rational_string (Rational r) { - return r.str (); + return r.string (); } String -String_convert::pointer_str (void const *l) +String_convert::pointer_string (void const *l) { char buffer[STRING_BUFFER_LEN]; snprintf (buffer, STRING_BUFFER_LEN, "%p", l); // assume radix 10 @@ -286,30 +286,30 @@ String_convert::pointer_str (void const *l) #n# is the number of nonzero digits */ String -String_convert::precision_str (double x, int n) +String_convert::precision_string (double x, int n) { - String format = "%." + to_str (0 >? n - 1) + "e"; - String str = double_str (abs (x), format.ch_C ()); + String format = "%." + to_string (0 >? n - 1) + "e"; + String str = double_string (abs (x), format.to_str0 ()); - int exp = str.right_str (3).value_i (); - str = str.left_str (str.length_i () - 4); + int exp = str.right_string (3).to_int (); + str = str.left_string (str.length () - 4); - while (str[str.length_i () - 1] == '0') - str = str.left_str (str.length_i () - 1); - if (str[str.length_i () - 1] == '.') - str = str.left_str (str.length_i () - 1); + while (str[str.length () - 1] == '0') + str = str.left_string (str.length () - 1); + if (str[str.length () - 1] == '.') + str = str.left_string (str.length () - 1); if (exp == 0) return (sign (x) > 0 ? str : "-" + str); - str = str.left_str (1) + str.cut_str (2, INT_MAX); + str = str.left_string (1) + str.cut_string (2, INT_MAX); int dot = 1 + exp; if (dot <= 0) - str = "0." + to_str ('0', -dot) + str; - else if (dot >= str.length_i ()) - str += to_str ('0', dot - str.length_i ()); - else if (( dot > 0) && (dot < str.length_i ())) - str = str.left_str (dot) + "." + str.cut_str (dot, INT_MAX); + str = "0." + to_string ('0', -dot) + str; + else if (dot >= str.length ()) + str += to_string ('0', dot - str.length ()); + else if (( dot > 0) && (dot < str.length ())) + str = str.left_string (dot) + "." + str.cut_string (dot, INT_MAX); else assert (0); @@ -317,27 +317,27 @@ String_convert::precision_str (double x, int n) } Array -String_convert::split_arr (String str, char c) +String_convert::split (String str, char c) { Array a; - int i = str.index_i (c); + int i = str.index (c); while (i >=0) { - String s = str.left_str (i); + String s = str.left_string (i); a.push (s); while (str[++i] == c) ; - str = str.cut_str (i, INT_MAX); - i = str.index_i (c); + str = str.cut_string (i, INT_MAX); + i = str.index (c); } - if (str.length_i ()) + if (str.length ()) a.push (str); return a; } String -String_convert::long_str (long l) +String_convert::long_string (long l) { char s[STRING_BUFFER_LEN]; sprintf (s,"%ld", l); @@ -347,5 +347,5 @@ String_convert::long_str (long l) String String_convert::pad_to (String s, int n) { - return s + to_str (' ' , (n - s.length_i ()) >? 0); + return s + to_string (' ' , (n - s.length ()) >? 0); } diff --git a/flower/string.cc b/flower/string.cc index 9bd27bc231..c0e2e99c72 100644 --- a/flower/string.cc +++ b/flower/string.cc @@ -29,18 +29,18 @@ void* mymemmove (void* dest, void const* src, size_t n); // return array, alloced with new. Byte* -String::copy_byte_p () const +String::get_copy_byte () const { - Byte const* src = strh_.byte_C (); - Byte* dest = new Byte[strh_.length_i () + 1]; - memcpy (dest, src, strh_.length_i () + 1); + Byte const* src = strh_.to_bytes (); + Byte* dest = new Byte[strh_.length () + 1]; + memcpy (dest, src, strh_.length () + 1); return dest; } char* -String::copy_ch_p () const +String::get_copy_str0 () const { - return (char*)copy_byte_p (); + return (char*)get_copy_byte (); } @@ -55,9 +55,9 @@ String::operator = (String const&source) } -String::String (Byte const* byte_l, int len_i) +String::String (Byte const* byte, int len_i) { - strh_.set (byte_l, len_i); + strh_.set (byte, len_i); } /** @@ -65,40 +65,40 @@ String::String (Byte const* byte_l, int len_i) String_convert:: */ String -to_str (char c, int n) +to_string (char c, int n) { - return String_convert::char_str (c, n); + return String_convert::char_string (c, n); } String -to_str (double f, char const* format) +to_string (double f, char const* format) { - return String_convert::double_str (f, format); + return String_convert::double_string (f, format); } String -to_str (int i, char const * format) +to_string (int i, char const * format) { - return String_convert::int_str (i, format); + return String_convert::int_string (i, format); } String -to_str (bool b) +to_string (bool b) { - return String_convert::bool_str (b); + return String_convert::bool_string (b); } String -to_str (long b) +to_string (long b) { - return String_convert::long_str (b); + return String_convert::long_string (b); } String -to_str (char const* format, ... ) +to_string (char const* format, ... ) { va_list args; va_start (args, format); - String str = String_convert::vform_str (format, args); + String str = String_convert::vform_string (format, args); va_end (args); return str; } @@ -107,7 +107,7 @@ to_str (char const* format, ... ) void String::append (String s) { - strh_.append (s.byte_C (), s.length_i ()); + strh_.append (s.to_bytes (), s.length ()); } void String::operator += (String s) @@ -123,55 +123,55 @@ String::prepend (String s) } int -String::length_i () const +String::length () const { - return strh_.length_i (); + return strh_.length (); } Byte const* -String::byte_C () const +String::to_bytes () const { - return strh_.byte_C (); + return strh_.to_bytes (); } char const* -String::ch_C () const +String::to_str0 () const { - return strh_.ch_C (); + return strh_.to_str0 (); } Byte* -String::byte_l () +String::get_bytes () { - return strh_.byte_l (); + return strh_.get_bytes (); } char* -String::ch_l () +String::get_str0 () { - return strh_.ch_l (); + return strh_.get_str0 (); } bool String::empty_b () const { - return !length_i (); + return !length (); } /** Do a signed comparison, analogous to memcmp; */ int -String::compare_i (String const& s1, String const& s2) +String::compare (String const& s1, String const& s2) { - Byte const* p1 = s1.byte_C (); - Byte const* p2 = s2.byte_C (); + Byte const* p1 = s1.to_bytes (); + Byte const* p2 = s2.to_bytes (); if (p1 == p2) return 0; /* don't forget the terminating '\0' */ - int f = (s1.length_i () = 0) { index_i += next_i; - next_i = right_str (length_i () - index_i - len).index_i (string ); + next_i = right_string (length () - index_i - len).index (string ); } return index_i; } @@ -215,16 +215,16 @@ String::index_last_i (char const* string) const // UGK! /** find a character. @return - the index of the leftmost character #c# (0 <= return < length_i ()), + the index of the leftmost character #c# (0 <= return < length ()), or -1 if not found. - ? should return length_i ()?, as in string.left_str (index_i (delimiter)) + ? should return length ()?, as in string.left_string (index (delimiter)) */ int -String::index_i (char c) const +String::index (char c) const { - char const* me = strh_.ch_C (); - char const* p = (char const *) memchr (me,c, length_i ()); + char const* me = strh_.to_str0 (); + char const* p = (char const *) memchr (me,c, length ()); if (p) return p - me; return -1; @@ -237,12 +237,12 @@ String::index_i (char c) const 1 index of leftmost occurrence of #searchfor# */ int -String::index_i (String searchfor) const +String::index (String searchfor) const { - char const* me = strh_.ch_C (); + char const* me = strh_.to_str0 (); char const* p = (char const *) - memmem (me, length_i (), searchfor.ch_C (), searchfor.length_i ()); + memmem (me, length (), searchfor.to_str0 (), searchfor.length ()); if (p) return p - me; @@ -260,28 +260,28 @@ String::index_i (String searchfor) const */ int -String::index_any_i (String set) const +String::index_any (String set) const { - int n = length_i (); + int n = length (); if (!n) return -1; - void const * me_l = (void const *) strh_.ch_C (); - for (int i=0; i < set.length_i (); i++) + void const * me = (void const *) strh_.to_str0 (); + for (int i=0; i < set.length (); i++) { - char * found= (char*) memchr (me_l, set[i], n ); + char * found= (char*) memchr (me, set[i], n ); if (found) { - return found - (char const*)me_l; + return found - (char const*)me; } } return -1; } String -String::left_str (int n) const +String::left_string (int n) const { - if (n >= length_i ()) + if (n >= length ()) return *this; String retval; @@ -294,20 +294,20 @@ String::left_str (int n) const } String -String::right_str (int n) const +String::right_string (int n) const { - if (n > length_i ()) + if (n > length ()) return *this; if (n < 1) return ""; - return String (strh_.byte_C () + length_i () - n, n); + return String (strh_.to_bytes () + length () - n, n); } String -String::nomid_str (int index_i, int n) const +String::nomid_string (int index_i, int n) const { if (index_i < 0) { @@ -318,12 +318,12 @@ String::nomid_str (int index_i, int n) const return *this; return - left_str (index_i) + - right_str (length_i () - index_i - n) ; + left_string (index_i) + + right_string (length () - index_i - n) ; } String -String::cut_str (int index_i, int n) const +String::cut_string (int index_i, int n) const { if (index_i <0) { @@ -331,17 +331,17 @@ String::cut_str (int index_i, int n) const index_i=0; } - if (!length_i () || (index_i < 0) || (index_i >= length_i () ) || (n < 1 ) ) + if (!length () || (index_i < 0) || (index_i >= length () ) || (n < 1 ) ) return String (); - if ((n > length_i ()) || (index_i + n > length_i () ) ) - n = length_i () - index_i; + if ((n > length ()) || (index_i + n > length () ) ) + n = length () - index_i; - return String (byte_C () + index_i, n); + return String (to_bytes () + index_i, n); } String -String::upper_str () const +String::upper_string () const { String str = *this; str.to_upper (); @@ -350,43 +350,43 @@ String::upper_str () const void String::to_upper () { - char *s = (char*)strh_.byte_l (); - strnupr (s ,length_i ()); + char *s = (char*)strh_.get_bytes (); + strnupr (s ,length ()); } void String::to_lower () { - char* s = strh_.ch_l (); - strnlwr (s,length_i ()); + char* s = strh_.get_str0 (); + strnlwr (s,length ()); } String -String::lower_str () const +String::lower_string () const { String str = *this; str.to_lower (); return str; } String -String::reversed_str () const +String::reversed_string () const { String str = *this; - strrev (str.byte_l (), str.length_i ()); + strrev (str.get_bytes (), str.length ()); return str; } int -String::value_i () const +String::to_int () const { - return String_convert::dec2_i (*this); + return String_convert::dec2int (*this); } double -String::value_f () const +String::to_double () const { - return String_convert::dec2_f (*this); + return String_convert::dec2double (*this); } #ifdef STREAM_SUPPORT @@ -402,9 +402,9 @@ void String::print_on (ostream& os) const { if (!strh_.is_binary_bo ()) - os << ch_C (); + os << to_str0 (); else - for (int i = 0; i < length_i (); i++) + for (int i = 0; i < length (); i++) os << (Byte) (*this)[ i ]; } #endif diff --git a/flower/warn.cc b/flower/warn.cc index aef1f38333..a0a36a8aa8 100644 --- a/flower/warn.cc +++ b/flower/warn.cc @@ -15,19 +15,19 @@ void message (String s) { - fputs (s.ch_C (), stderr); + fputs (s.to_str0 (), stderr); } void warning (String s) { - message (_f ("warning: %s\n", s.ch_C ())); + message (_f ("warning: %s\n", s.to_str0 ())); } void non_fatal_error (String s) { - message (_f ("error: %s\n", s.ch_C ())); + message (_f ("error: %s\n", s.to_str0 ())); } void @@ -41,6 +41,6 @@ void programming_error (String s) { message (_f ("programming error: %s (Continuing; cross thumbs)\n", - s.ch_C ())); + s.to_str0 ())); } diff --git a/lily/a2-engraver.cc b/lily/a2-engraver.cc index fdbd361a1e..ec3ecf9161 100644 --- a/lily/a2-engraver.cc +++ b/lily/a2-engraver.cc @@ -26,7 +26,7 @@ protected: virtual void process_acknowledged_grobs (); virtual void stop_translation_timestep (); private: - Item* text_p_; + Item* text_; enum State { SOLO, SPLIT_INTERVAL, UNIRHYTHM, UNISILENCE, UNISON } state_; }; @@ -34,7 +34,7 @@ private: A2_engraver::A2_engraver () { - text_p_ = 0; + text_ = 0; state_ = UNISILENCE; } @@ -43,7 +43,7 @@ A2_engraver::process_acknowledged_grobs () { if (!to_boolean (get_property ("combineParts"))) return ; - if (!text_p_) + if (!text_) { SCM unison = get_property ("unison"); SCM solo = get_property ("solo"); @@ -52,18 +52,18 @@ A2_engraver::process_acknowledged_grobs () if (solo_adue == SCM_BOOL_T && ((solo == SCM_BOOL_T && state_ != SOLO) || (unison == SCM_BOOL_T && state_ != UNISON - && daddy_trans_l_->id_str_.left_str (3) == "one"))) + && daddy_trans_->id_string_.left_string (3) == "one"))) { - text_p_ = new Item (get_property ("TextScript")); - Side_position_interface::set_axis (text_p_, Y_AXIS); - announce_grob(text_p_, SCM_EOL); + text_ = new Item (get_property ("TextScript")); + Side_position_interface::set_axis (text_, Y_AXIS); + announce_grob(text_, SCM_EOL); Direction dir = UP; SCM text = SCM_EOL; if (solo == SCM_BOOL_T) { state_ = SOLO; - if (daddy_trans_l_->id_str_.left_str (3) == "one") + if (daddy_trans_->id_string_.left_string (3) == "one") { text = get_property ("soloText"); } @@ -76,12 +76,12 @@ A2_engraver::process_acknowledged_grobs () else if (unison == SCM_BOOL_T) { state_ = UNISON; - if (daddy_trans_l_->id_str_.left_str (3) == "one") + if (daddy_trans_->id_string_.left_string (3) == "one") text = get_property ("aDueText"); } - Side_position_interface::set_direction (text_p_, dir); - text_p_->set_grob_property ("text", text); + Side_position_interface::set_direction (text_, dir); + text_->set_grob_property ("text", text); } } } @@ -92,19 +92,19 @@ A2_engraver::acknowledge_grob (Grob_info i) if (!to_boolean (get_property ("combineParts"))) return ; - if (text_p_) + if (text_) { - if (Note_head::has_interface (i.grob_l_)) + if (Note_head::has_interface (i.grob_)) { - Grob*t = text_p_; - Side_position_interface::add_support (t, i.grob_l_); + Grob*t = text_; + Side_position_interface::add_support (t, i.grob_); if (Side_position_interface::get_axis (t) == X_AXIS && !t->get_parent (Y_AXIS)) - t->set_parent (i.grob_l_, Y_AXIS); + t->set_parent (i.grob_, Y_AXIS); } - if (Stem::has_interface (i.grob_l_)) + if (Stem::has_interface (i.grob_)) { - Side_position_interface::add_support (text_p_, i.grob_l_); + Side_position_interface::add_support (text_, i.grob_); } } @@ -131,27 +131,27 @@ A2_engraver::acknowledge_grob (Grob_info i) state_ = UNIRHYTHM; Direction d = CENTER; - if (daddy_trans_l_->id_str_.left_str (3) == "one") + if (daddy_trans_->id_string_.left_string (3) == "one") d = UP; - else if (daddy_trans_l_->id_str_.left_str (3) == "two") + else if (daddy_trans_->id_string_.left_string (3) == "two") d = DOWN; /* Must only set direction for VoiceCombines, not for StaffCombines: we can't detect that here, so we use yet another property */ if (!to_boolean (get_property ("noDirection")) - && (Stem::has_interface (i.grob_l_) - || Slur::has_interface (i.grob_l_) - || Tie::has_interface (i.grob_l_) + && (Stem::has_interface (i.grob_) + || Slur::has_interface (i.grob_) + || Tie::has_interface (i.grob_) /* Usually, dynamics are removed by *_devnull_engravers for the second voice. On the one hand, we don't want all dynamics for the first voice to be placed above the staff. On the other hand, colliding of scripts may be worse. So, we don't set directions for these when we're playing solo. */ - || (i.grob_l_->internal_has_interface (ly_symbol2scm + || (i.grob_->internal_has_interface (ly_symbol2scm ("dynamic-interface")) && state_ != SOLO) - || (i.grob_l_->internal_has_interface (ly_symbol2scm + || (i.grob_->internal_has_interface (ly_symbol2scm ("text-interface")) && state_ != SOLO) )) @@ -174,28 +174,28 @@ A2_engraver::acknowledge_grob (Grob_info i) { /* Blunt axe method: every grob gets a propertysetting. */ - i.grob_l_->set_grob_property ("direction", gh_int2scm (d)); + i.grob_->set_grob_property ("direction", gh_int2scm (d)); } } /* Should we have separate state variable for being "rest while other has solo?" */ - if (Multi_measure_rest::has_interface (i.grob_l_) && d) + if (Multi_measure_rest::has_interface (i.grob_) && d) if (state_ == UNIRHYTHM && unisilence != SCM_BOOL_T) { - i.grob_l_->set_grob_property ("staff-position", gh_int2scm (d * 6)); + i.grob_->set_grob_property ("staff-position", gh_int2scm (d * 6)); } } void A2_engraver::stop_translation_timestep () { - if (text_p_) + if (text_) { - Side_position_interface::add_staff_support (text_p_); - typeset_grob (text_p_); - text_p_ = 0; + Side_position_interface::add_staff_support (text_); + typeset_grob (text_); + text_ = 0; } } diff --git a/lily/accidental-engraver.cc b/lily/accidental-engraver.cc index edb22455c5..f4c07abbcf 100644 --- a/lily/accidental-engraver.cc +++ b/lily/accidental-engraver.cc @@ -79,9 +79,9 @@ public: /* The next */ - Array accidental_arr_; + Array accidentals_; - Link_array tie_arr_; + Link_array ties_; }; @@ -107,13 +107,13 @@ Accidental_engraver::initialize () { last_keysig_ = get_property ("keySignature"); - Translator_group * trans_ = daddy_trans_l_; + Translator_group * trans_ = daddy_trans_; while (trans_) { trans_ -> set_property ("localKeySignature", ly_deep_copy (last_keysig_)); - trans_ = trans_->daddy_trans_l_; + trans_ = trans_->daddy_trans_; } - set_property_on_children (daddy_trans_l_,"localKeySignature", last_keysig_); + set_property_on_children (daddy_trans_,"localKeySignature", last_keysig_); } /* @@ -125,12 +125,12 @@ calculates the number of accidentals on basis of the current local key sig */ static int -number_accidentals (SCM sig, Note_req * note_l, Pitch *pitch, SCM curbarnum, SCM lazyness, +number_accidentals (SCM sig, Note_req * note, Pitch *pitch, SCM curbarnum, SCM lazyness, bool ignore_octave_b) { - int n = pitch->notename_i_; - int o = pitch->octave_i_; - int a = pitch->alteration_i_; + int n = pitch->notename_; + int o = pitch->octave_; + int a = pitch->alteration_; int curbarnum_i = gh_scm2int (curbarnum); int accbarnum_i = 0; @@ -159,7 +159,7 @@ number_accidentals (SCM sig, Note_req * note_l, Pitch *pitch, SCM curbarnum, SCM int num; if (a == p - && !to_boolean (note_l->get_mus_property ("force-accidental")) + && !to_boolean (note->get_mus_property ("force-accidental")) && gh_number_p (prev_acc)) num = 0; else if ( (abs (a)get_property ("localKeySignature"); + SCM localsig = origin->get_property ("localKeySignature"); bool same_octave_b = gh_eq_p (ly_symbol2scm ("same-octave"), type); @@ -198,13 +198,13 @@ number_accidentals (Note_req * note_l, Pitch *pitch, Translator_group * origin_l if (same_octave_b || any_octave_b) { int n = number_accidentals - (localsig, note_l, pitch, curbarnum, lazyness, any_octave_b); + (localsig, note, pitch, curbarnum, lazyness, any_octave_b); diff = diff || (n < 0); number = max (number, abs (n)); } else warning (_f ("unknown accidental typesetting: %s. Ignored", - ly_symbol2string (type).ch_C ())); + ly_symbol2string (type).to_str0 ())); } @@ -215,15 +215,15 @@ number_accidentals (Note_req * note_l, Pitch *pitch, Translator_group * origin_l { String context = ly_symbol2string (ly_car (accidentals)); - while (origin_l && !origin_l->is_alias_b (context)) - origin_l = origin_l->daddy_trans_l_; + while (origin && !origin->is_alias_b (context)) + origin = origin->daddy_trans_; - if (!origin_l) + if (!origin) warning (_f ("Symbol is not a parent context: %s. Ignored", - context.ch_C ())); + context.to_str0 ())); } else warning (_f ("Accidental typesetting must be pair or context-name: %s", - ly_scm2string (ly_car (accidentals)).ch_C ())); + ly_scm2string (ly_car (accidentals)).to_str0 ())); accidentals = ly_cdr (accidentals); } @@ -233,7 +233,7 @@ number_accidentals (Note_req * note_l, Pitch *pitch, Translator_group * origin_l void Accidental_engraver::process_acknowledged_grobs () { - if (accidental_arr_.size () && !accidental_arr_.top().done_) + if (accidentals_.size () && !accidentals_.top().done_) { //SCM localsig = get_property ("localKeySignature"); SCM accidentals = get_property ("autoAccidentals"); @@ -241,19 +241,19 @@ Accidental_engraver::process_acknowledged_grobs () SCM barnum = get_property ("currentBarNumber"); bool extra_natural_b = get_property ("extraNatural") == SCM_BOOL_T; - for (int i = 0; i < accidental_arr_.size (); i++) + for (int i = 0; i < accidentals_.size (); i++) { - if (accidental_arr_[i].done_ ) + if (accidentals_[i].done_ ) continue; - accidental_arr_[i].done_ = true; - Grob * support_l = accidental_arr_[i].head_; - Note_req * note_l = accidental_arr_[i].melodic_; - Translator_group * origin_l = accidental_arr_[i].origin_; - - Pitch * pitch = unsmob_pitch (note_l->get_mus_property ("pitch")); - int num = number_accidentals (note_l, pitch, origin_l, accidentals, barnum); - int num_caut = number_accidentals (note_l, pitch, origin_l, cautionaries, barnum); - bool cautionary = to_boolean (note_l->get_mus_property ("cautionary")); + accidentals_[i].done_ = true; + Grob * support = accidentals_[i].head_; + Note_req * note = accidentals_[i].melodic_; + Translator_group * origin = accidentals_[i].origin_; + + Pitch * pitch = unsmob_pitch (note->get_mus_property ("pitch")); + int num = number_accidentals (note, pitch, origin, accidentals, barnum); + int num_caut = number_accidentals (note, pitch, origin, cautionaries, barnum); + bool cautionary = to_boolean (note->get_mus_property ("cautionary")); if (abs (num_caut) > abs (num)) { @@ -270,8 +270,8 @@ Accidental_engraver::process_acknowledged_grobs () Grob *tie_break_reminder = 0; bool tie_changes = false; - for (int j = 0; j < tie_arr_.size (); j++) - if (support_l == Tie::head (tie_arr_[j], RIGHT)) + for (int j = 0; j < ties_.size (); j++) + if (support == Tie::head (ties_[j], RIGHT)) { tie_changes = different; @@ -282,14 +282,14 @@ Accidental_engraver::process_acknowledged_grobs () Maybe check property noTieBreakForceAccidental? */ if (different) - tie_break_reminder = tie_arr_[j]; + tie_break_reminder = ties_[j]; break; } if (num) { Grob * a = new Item (get_property ("Accidental")); - a->set_parent (support_l, Y_AXIS); + a->set_parent (support, Y_AXIS); if (!accidental_placement_) { @@ -301,7 +301,7 @@ Accidental_engraver::process_acknowledged_grobs () announce_grob (a, SCM_EOL); - SCM accs = gh_cons (gh_int2scm (pitch->alteration_i_), SCM_EOL); + SCM accs = gh_cons (gh_int2scm (pitch->alteration_), SCM_EOL); if (num == 2 && extra_natural_b) accs = gh_cons (gh_int2scm (0), accs); @@ -322,10 +322,10 @@ Accidental_engraver::process_acknowledged_grobs () } - support_l->set_grob_property ("accidental-grob", a->self_scm ()); + support->set_grob_property ("accidental-grob", a->self_scm ()); a->set_grob_property ("accidentals", accs); - accidental_arr_[i].accidental_ = a; + accidentals_[i].accidental_ = a; /* We add the accidentals to the support of the arpeggio, so it is put left of the accidentals. @@ -345,9 +345,9 @@ Accidental_engraver::process_acknowledged_grobs () */ - int n = pitch->notename_i_; - int o = pitch->octave_i_; - int a = pitch->alteration_i_; + int n = pitch->notename_; + int o = pitch->octave_; + int a = pitch->alteration_; SCM on_s = gh_cons (gh_int2scm (o), gh_int2scm (n)); /* @@ -368,9 +368,9 @@ Accidental_engraver::process_acknowledged_grobs () */ - while (origin_l) + while (origin) { - SCM localsig = origin_l->get_property ("localKeySignature"); + SCM localsig = origin->get_property ("localKeySignature"); if (tie_changes) { /* @@ -389,8 +389,8 @@ Accidental_engraver::process_acknowledged_grobs () localsig = ly_assoc_front_x (localsig, on_s, gh_cons (gh_int2scm (a), barnum)); } - origin_l->set_property ("localKeySignature", localsig); - origin_l = origin_l->daddy_trans_l_; + origin->set_property ("localKeySignature", localsig); + origin = origin->daddy_trans_; } } } @@ -405,9 +405,9 @@ Accidental_engraver::finalize () void Accidental_engraver::stop_translation_timestep () { - for (int i = 0; i < accidental_arr_.size(); i++) + for (int i = 0; i < accidentals_.size(); i++) { - Grob *a = accidental_arr_[i].accidental_; + Grob *a = accidentals_[i].accidental_; if (a) { typeset_grob (a); @@ -418,32 +418,32 @@ Accidental_engraver::stop_translation_timestep () typeset_grob(accidental_placement_); accidental_placement_ = 00; - accidental_arr_.clear(); + accidentals_.clear(); arpeggios_.clear (); - tie_arr_.clear (); + ties_.clear (); } void Accidental_engraver::acknowledge_grob (Grob_info info) { - Note_req * note_l = dynamic_cast (info.music_cause ()); + Note_req * note = dynamic_cast (info.music_cause ()); - if (note_l && Rhythmic_head::has_interface (info.grob_l_)) + if (note && Rhythmic_head::has_interface (info.grob_)) { Accidental_entry entry ; - entry.head_ = info.grob_l_; - entry.origin_ = info.origin_trans_l_->daddy_trans_l_; - entry.melodic_ = note_l; + entry.head_ = info.grob_; + entry.origin_ = info.origin_trans_->daddy_trans_; + entry.melodic_ = note; - accidental_arr_.push (entry); + accidentals_.push (entry); } - else if (Tie::has_interface (info.grob_l_)) + else if (Tie::has_interface (info.grob_)) { - tie_arr_.push (info.grob_l_); + ties_.push (info.grob_); } - else if (Arpeggio::has_interface (info.grob_l_)) + else if (Arpeggio::has_interface (info.grob_)) { - arpeggios_.push (info.grob_l_); + arpeggios_.push (info.grob_); } } @@ -458,13 +458,13 @@ Accidental_engraver::process_music () */ if (last_keysig_ != sig) { - Translator_group * trans_ = daddy_trans_l_; + Translator_group * trans_ = daddy_trans_; while (trans_) { trans_ -> set_property ("localKeySignature", ly_deep_copy (sig)); - trans_ = trans_->daddy_trans_l_; + trans_ = trans_->daddy_trans_; } - set_property_on_children(daddy_trans_l_,"localKeySignature", sig); + set_property_on_children(daddy_trans_,"localKeySignature", sig); last_keysig_ = sig; } diff --git a/lily/accidental-placement.cc b/lily/accidental-placement.cc index 69feb745fb..d7c4e866be 100644 --- a/lily/accidental-placement.cc +++ b/lily/accidental-placement.cc @@ -54,7 +54,7 @@ Accidental_placement::add_accidental (Grob* me, Grob* a) Pitch *p= unsmob_pitch (mcause->get_mus_property ("pitch")); - int n = p->notename_i_; + int n = p->notename_; SCM accs = me->get_grob_property ("accidental-grobs"); SCM key = gh_int2scm (n); diff --git a/lily/accidental.cc b/lily/accidental.cc index 39d43277c4..658be717d5 100644 --- a/lily/accidental.cc +++ b/lily/accidental.cc @@ -32,7 +32,7 @@ Accidental_interface::after_line_breaking (SCM smob) Grob *me = unsmob_grob (smob); Grob *tie = unsmob_grob (me->get_grob_property ("tie")); - if (tie && !tie->original_l_) + if (tie && !tie->original_) { me->suicide (); } @@ -148,7 +148,7 @@ Accidental_interface::brew_molecule (SCM smob) Molecule acc (fm->find_by_name (String ("accidentals-") + style + - to_str (gh_scm2int(entry)))); + to_string (gh_scm2int(entry)))); mol.add_at_edge (X_AXIS, RIGHT, acc, 0.1); } diff --git a/lily/afm.cc b/lily/afm.cc index 3db634c589..e9d770e46d 100644 --- a/lily/afm.cc +++ b/lily/afm.cc @@ -72,7 +72,7 @@ Adobe_font_metric::find_char_metric (String nm, bool warn) const { if (warn) { - warning (_f ("can't find character called: `%s'", nm.ch_C ())); + warning (_f ("can't find character called: `%s'", nm.to_str0 ())); } return 0; } @@ -101,7 +101,7 @@ Adobe_font_metric::get_char (int code) const SCM read_afm_file (String nm) { - FILE *f = fopen (nm.ch_C () , "r"); + FILE *f = fopen (nm.to_str0 () , "r"); char s[2048]; char *check_key = "TfmCheckSum"; fgets (s, sizeof (s), f); @@ -122,7 +122,7 @@ read_afm_file (String nm) if (ok) { - error (_f ("Error parsing AFM file: `%s'", nm.ch_C ())); + error (_f ("Error parsing AFM file: `%s'", nm.to_str0 ())); exit (2); } fclose (f); diff --git a/lily/all-font-metrics.cc b/lily/all-font-metrics.cc index 6e00f0dce7..ada8954edb 100644 --- a/lily/all-font-metrics.cc +++ b/lily/all-font-metrics.cc @@ -18,7 +18,7 @@ #include "scm-hash.hh" #include "kpath.hh" -static const char * default_font_sz_ = "cmr10"; +static const char * default_font_str0_ = "cmr10"; All_font_metrics::All_font_metrics (String path) { @@ -37,9 +37,9 @@ All_font_metrics::~All_font_metrics () Adobe_font_metric * All_font_metrics::find_afm (String name) { - SCM sname = ly_symbol2scm (name.ch_C ()); + SCM sname = ly_symbol2scm (name.to_str0 ()); - SCM name_str = ly_str02scm (name.ch_C ()); + SCM name_string = ly_str02scm (name.to_str0 ()); SCM val; @@ -52,8 +52,8 @@ All_font_metrics::find_afm (String name) if (path.empty_b ()) { - String p = ly_find_afm (name.ch_C ()); - if (p.length_i ()) + String p = ly_find_afm (name.to_str0 ()); + if (p.length ()) path = p; } @@ -65,7 +65,7 @@ All_font_metrics::find_afm (String name) val = read_afm_file (path); unsmob_metrics (val)->path_ = path; - unsmob_metrics (val)->description_ = gh_cons (name_str, gh_double2scm (1.0)); + unsmob_metrics (val)->description_ = gh_cons (name_string, gh_double2scm (1.0)); if (verbose_global_b) progress_indication ("]"); @@ -93,11 +93,11 @@ All_font_metrics::find_afm (String name) if (tfm && tfm->info_.checksum != afm->checksum_) { String s = _f ("checksum mismatch for font file: `%s'", - path.ch_C ()); - s += " " + _f ("does not match: `%s'", tfm->path_.ch_C ()); // FIXME + path.to_str0 ()); + s += " " + _f ("does not match: `%s'", tfm->path_.to_str0 ()); // FIXME s += "\n"; - s += " TFM: " + to_str ((int) tfm->info_.checksum); - s += " AFM: " + to_str ((int) afm->checksum_); + s += " TFM: " + to_string ((int) tfm->info_.checksum); + s += " AFM: " + to_string ((int) afm->checksum_); s += "\n"; s += _ (" Rebuild all .afm files, and remove all .pk and .tfm files. Rerun with -V to show font paths."); @@ -113,8 +113,8 @@ All_font_metrics::find_afm (String name) Tex_font_metric * All_font_metrics::find_tfm (String name) { - SCM sname = ly_symbol2scm (name.ch_C ()); - SCM name_str = ly_str02scm (name.ch_C ()); + SCM sname = ly_symbol2scm (name.to_str0 ()); + SCM name_string = ly_str02scm (name.to_str0 ()); SCM val; if (!tfm_p_dict_->try_retrieve (sname, &val)) @@ -123,8 +123,8 @@ All_font_metrics::find_tfm (String name) if (path.empty_b ()) { - String p = ly_find_tfm (name.ch_C ()); - if (p.length_i ()) + String p = ly_find_tfm (name.to_str0 ()); + if (p.length ()) path = p; } @@ -142,7 +142,7 @@ All_font_metrics::find_tfm (String name) progress_indication ("]"); unsmob_metrics (val)->path_ = path; - unsmob_metrics (val)->description_ = gh_cons (name_str, gh_double2scm (1.0)); + unsmob_metrics (val)->description_ = gh_cons (name_string, gh_double2scm (1.0)); tfm_p_dict_->set (sname, val); scm_gc_unprotect_object (val); @@ -164,10 +164,10 @@ All_font_metrics::find_font (String name) if (f) return f; - warning (_f ("can't find font: `%s'", name.ch_C ())); + warning (_f ("can't find font: `%s'", name.to_str0 ())); warning (_ ("Loading default font")); - String def_name = default_font_sz_; + String def_name = default_font_str0_; /* we're in emergency recovery mode here anyway, so don't try to do @@ -180,8 +180,8 @@ All_font_metrics::find_font (String name) if (f) return f; - error (_f ("can't find default font: `%s'", def_name.ch_C ())); - error (_f ("(search path: `%s')", search_path_.str ())); + error (_f ("can't find default font: `%s'", def_name.to_str0 ())); + error (_f ("(search path: `%s')", search_path_.string ())); error (_ ("Giving up")); return 0; diff --git a/lily/ambitus-engraver.cc b/lily/ambitus-engraver.cc index adfa5b8f77..b3c8cc4c2c 100644 --- a/lily/ambitus-engraver.cc +++ b/lily/ambitus-engraver.cc @@ -71,14 +71,14 @@ TRANSLATOR_DECLARATIONS(Ambitus_engraver); private: void create_ambitus (); - Item *ambitus_p_; + Item *ambitus_; int/*bool*/ is_typeset; Pitch pitch_min, pitch_max; }; Ambitus_engraver::Ambitus_engraver () { - ambitus_p_ = 0; + ambitus_ = 0; is_typeset = 0; /* @@ -98,7 +98,7 @@ Ambitus_engraver::process_music () * Otherwise, if a voice begins with a rest, the ambitus grob will * be placed after the rest. */ - if (!ambitus_p_) { + if (!ambitus_) { create_ambitus (); } } @@ -106,7 +106,7 @@ Ambitus_engraver::process_music () void Ambitus_engraver::stop_translation_timestep () { - if (ambitus_p_ && !is_typeset) + if (ambitus_ && !is_typeset) { /* * Evaluate centralCPosition not until now, since otherwise we @@ -115,15 +115,15 @@ Ambitus_engraver::stop_translation_timestep () * assumed to be 0. */ SCM c0 = get_property ("centralCPosition"); - ambitus_p_->set_grob_property ("centralCPosition", c0); + ambitus_->set_grob_property ("centralCPosition", c0); /* * Similar for keySignature. */ SCM key_signature = get_property ("keySignature"); - ambitus_p_->set_grob_property ("keySignature", key_signature); + ambitus_->set_grob_property ("keySignature", key_signature); - typeset_grob (ambitus_p_); + typeset_grob (ambitus_); is_typeset = 1; } } @@ -131,10 +131,10 @@ Ambitus_engraver::stop_translation_timestep () void Ambitus_engraver::acknowledge_grob (Grob_info info) { - Item *item = dynamic_cast (info.grob_l_); + Item *item = dynamic_cast (info.grob_); if (item) { - if (Note_head::has_interface (info.grob_l_)) + if (Note_head::has_interface (info.grob_)) { Note_req *nr = dynamic_cast (info.music_cause ()); if (nr) @@ -163,20 +163,20 @@ void Ambitus_engraver::create_ambitus () { SCM basicProperties = get_property ("Ambitus"); - ambitus_p_ = new Item (basicProperties); is_typeset = 0; - announce_grob (ambitus_p_, SCM_EOL); + ambitus_ = new Item (basicProperties); is_typeset = 0; + announce_grob (ambitus_, SCM_EOL); } void Ambitus_engraver::finalize () { - if (ambitus_p_) + if (ambitus_) { if (Pitch::compare (pitch_min, pitch_max) <= 0) { - ambitus_p_->set_grob_property ("pitch-min", + ambitus_->set_grob_property ("pitch-min", pitch_min.smobbed_copy ()); - ambitus_p_->set_grob_property ("pitch-max", + ambitus_->set_grob_property ("pitch-max", pitch_max.smobbed_copy ()); } else // have not seen any pitch, so forget about the ambitus @@ -187,9 +187,9 @@ Ambitus_engraver::finalize () * global timesig/clef definitions. */ #if 0 - ambitus_p_->warning("empty ambitus range [ignored]"); + ambitus_->warning("empty ambitus range [ignored]"); #endif - ambitus_p_->suicide(); + ambitus_->suicide(); } } } diff --git a/lily/ambitus.cc b/lily/ambitus.cc index c09f557f1b..8b5cf38395 100644 --- a/lily/ambitus.cc +++ b/lily/ambitus.cc @@ -45,16 +45,16 @@ * Possible return values: * * 0: do not show any accidental - * 1: show pitch->alteration_i_ only - * 2: show pitch->alteration_i_, preceded by a natural sign + * 1: show pitch->alteration_ only + * 2: show pitch->alteration_, preceded by a natural sign */ static int number_accidentals (SCM key_signature, Pitch *pitch, bool ignore_octave_b, bool force_accidental) { - int notename = pitch->notename_i_; - int octave = pitch->octave_i_; - int alteration = pitch->alteration_i_; + int notename = pitch->notename_; + int octave = pitch->octave_; + int alteration = pitch->alteration_; if (force_accidental) // ignore key signature return 1; @@ -101,12 +101,12 @@ add_accidentals (Item *me, Molecule *head, int num_acc, { if (!num_acc) return; - if (pitch->alteration_i_) + if (pitch->alteration_) { Molecule accidental (Font_interface::get_default_font (me)-> find_by_name (String ("accidentals-") + accidentals_style + - to_str (pitch->alteration_i_))); + to_string (pitch->alteration_))); accidental.translate_axis (yoffs, Y_AXIS); head->add_at_edge (X_AXIS, LEFT, accidental, 0.1); } @@ -115,7 +115,7 @@ add_accidentals (Item *me, Molecule *head, int num_acc, Molecule natural (Font_interface::get_default_font (me)-> find_by_name (String ("accidentals-") + accidentals_style + - to_str ("0"))); + to_string ("0"))); natural.translate_axis (yoffs, Y_AXIS); head->add_at_edge (X_AXIS, LEFT, natural, 0.1); } @@ -142,7 +142,7 @@ Ambitus::brew_molecule (SCM smob) if (Font_interface::get_default_font (me)->find_by_name (note_head_style).empty_b ()) { String message = "Ambitus: no such note head: `" + note_head_style + "'"; - me->warning (_ (message.ch_C ())); + me->warning (_ (message.to_str0 ())); return SCM_EOL; } @@ -191,8 +191,8 @@ Ambitus::brew_molecule (SCM smob) if (to_boolean (me->get_grob_property ("join-heads")) && ((p_max - p_min) >= 3)) { - Real linethickness = me->paper_l ()->get_var ("linethickness"); - Real blotdiameter = me->paper_l ()->get_var ("blotdiameter"); + Real linethickness = me->get_paper ()->get_var ("linethickness"); + Real blotdiameter = me->get_paper ()->get_var ("blotdiameter"); Interval x_extent = 0.5 * Interval (-linethickness, +linethickness); Interval y_extent = 0.5 * Interval (p_min + 1.35, p_max - 1.35); Box line_box (x_extent, y_extent); diff --git a/lily/arpeggio-engraver.cc b/lily/arpeggio-engraver.cc index 8aee3f9397..407f026510 100644 --- a/lily/arpeggio-engraver.cc +++ b/lily/arpeggio-engraver.cc @@ -57,25 +57,25 @@ Arpeggio_engraver::acknowledge_grob (Grob_info info) { if (arpeggio_) { - if (Stem::has_interface (info.grob_l_)) + if (Stem::has_interface (info.grob_)) { if (!arpeggio_->get_parent (Y_AXIS)) - arpeggio_->set_parent (info.grob_l_, Y_AXIS); + arpeggio_->set_parent (info.grob_, Y_AXIS); - Pointer_group_interface::add_grob (arpeggio_, ly_symbol2scm ("stems"), info.grob_l_); + Pointer_group_interface::add_grob (arpeggio_, ly_symbol2scm ("stems"), info.grob_); } /* We can't catch local key items (accidentals) from Voice context, see Local_key_engraver */ - else if (Rhythmic_head::has_interface (info.grob_l_)) + else if (Rhythmic_head::has_interface (info.grob_)) { - Side_position_interface::add_support (arpeggio_, info.grob_l_); + Side_position_interface::add_support (arpeggio_, info.grob_); } - else if (Note_column::has_interface (info.grob_l_ )) + else if (Note_column::has_interface (info.grob_ )) { - info.grob_l_->set_grob_property ("arpeggio", arpeggio_->self_scm ()); + info.grob_->set_grob_property ("arpeggio", arpeggio_->self_scm ()); } } } diff --git a/lily/arpeggio.cc b/lily/arpeggio.cc index 73fad5482e..8944cc61be 100644 --- a/lily/arpeggio.cc +++ b/lily/arpeggio.cc @@ -28,7 +28,7 @@ Arpeggio::brew_molecule (SCM smob) for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) { Grob * stem = unsmob_grob (ly_car (s)); - common = common->common_refpoint (Staff_symbol_referencer::staff_symbol_l (stem), + common = common->common_refpoint (Staff_symbol_referencer::get_staff_symbol (stem), Y_AXIS); } @@ -46,7 +46,7 @@ Arpeggio::brew_molecule (SCM smob) for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) { Grob * stem = unsmob_grob (ly_car (s)); - Grob * ss = Staff_symbol_referencer::staff_symbol_l (stem); + Grob * ss = Staff_symbol_referencer::get_staff_symbol (stem); Interval iv =Stem::head_positions (stem); iv *= Staff_symbol::staff_space (ss)/2.0; @@ -84,7 +84,7 @@ Arpeggio::brew_molecule (SCM smob) mol.translate_axis (heads[LEFT], Y_AXIS); if (dir) mol.add_at_edge (Y_AXIS, dir, - fm->find_by_name ("scripts-arpeggio-arrow-" + to_str (dir)), 0.0); + fm->find_by_name ("scripts-arpeggio-arrow-" + to_string (dir)), 0.0); return mol.smobbed_copy () ; } @@ -102,7 +102,7 @@ Arpeggio::brew_chord_bracket (SCM smob) for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) { Grob * stem = unsmob_grob (ly_car (s)); - common = common->common_refpoint (Staff_symbol_referencer::staff_symbol_l (stem), + common = common->common_refpoint (Staff_symbol_referencer::get_staff_symbol (stem), Y_AXIS); } @@ -112,13 +112,13 @@ Arpeggio::brew_chord_bracket (SCM smob) for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = ly_cdr (s)) { Grob * stem = unsmob_grob (ly_car (s)); - Grob * ss = Staff_symbol_referencer::staff_symbol_l (stem); + Grob * ss = Staff_symbol_referencer::get_staff_symbol (stem); Interval iv = Stem::head_positions (stem); iv *= Staff_symbol::staff_space (ss)/2.0; heads.unite (iv + ss->relative_coordinate (common, Y_AXIS) - my_y); } - Real lt = me->paper_l ()->get_var ("linethickness"); + Real lt = me->get_paper ()->get_var ("linethickness"); Real sp = 1.5 * Staff_symbol_referencer::staff_space (me); Real dy = heads.length() + sp; Real x = 0.7; diff --git a/lily/audio-column.cc b/lily/audio-column.cc index 15050f57ee..52a63e767c 100644 --- a/lily/audio-column.cc +++ b/lily/audio-column.cc @@ -15,14 +15,14 @@ Audio_column::Audio_column (Moment at_mom) { at_mom_ = at_mom; - performance_l_ = 0; + performance_ = 0; } void Audio_column::add_audio_item (Audio_item* l) { - audio_item_l_arr_.push (l); - l->audio_column_l_ = this; + audio_items_.push (l); + l->audio_column_ = this; } Moment diff --git a/lily/audio-element-info.cc b/lily/audio-element-info.cc index fcd1073e14..9ecd1fb4e5 100644 --- a/lily/audio-element-info.cc +++ b/lily/audio-element-info.cc @@ -9,31 +9,31 @@ #include "audio-element-info.hh" #include "translator-group.hh" -Audio_element_info::Audio_element_info (Audio_element*s_l, Music *r_l) +Audio_element_info::Audio_element_info (Audio_element*s, Music *r) { - elem_l_ = s_l; - origin_trans_l_ =0; - req_l_ = r_l; + elem_ = s; + origin_trans_ =0; + req_ = r; } Audio_element_info::Audio_element_info () { - elem_l_ = 0; - req_l_ = 0; - origin_trans_l_ =0; + elem_ = 0; + req_ = 0; + origin_trans_ =0; } Link_array -Audio_element_info::origin_trans_l_arr (Translator* end) const +Audio_element_info::origin_transes (Translator* end) const { - Translator * t = origin_trans_l_; + Translator * t = origin_trans_; Link_array r; do { r.push (t); - t = t->daddy_trans_l_; - } while (t && t != end->daddy_trans_l_); + t = t->daddy_trans_; + } while (t && t != end->daddy_trans_); return r; } diff --git a/lily/audio-item.cc b/lily/audio-item.cc index 68ed3bc4cb..fc34cd457b 100644 --- a/lily/audio-item.cc +++ b/lily/audio-item.cc @@ -10,14 +10,14 @@ #include "midi-item.hh" #include "audio-column.hh" -Audio_instrument::Audio_instrument (String instrument_str) +Audio_instrument::Audio_instrument (String instrument_string) { - str_ = instrument_str; + str_ = instrument_string; } Audio_item::Audio_item () { - audio_column_l_ = 0; + audio_column_ = 0; } Audio_note::Audio_note (Pitch p, Moment m, int transposing_i) @@ -25,7 +25,7 @@ Audio_note::Audio_note (Pitch p, Moment m, int transposing_i) pitch_ = p; length_mom_ = m; tied_ = 0; - transposing_i_ = transposing_i; + transposing_ = transposing_i; } void @@ -53,18 +53,18 @@ Audio_dynamic::Audio_dynamic (Real volume) Audio_tempo::Audio_tempo (int per_minute_4_i) { - per_minute_4_i_ = per_minute_4_i; + per_minute_4_ = per_minute_4_i; } Audio_time_signature::Audio_time_signature (int beats, int one_beat) { - beats_i_ = beats; - one_beat_i_ = one_beat; + beats_ = beats; + one_beat_ = one_beat; } -Audio_text::Audio_text (Audio_text::Type type, String text_str) +Audio_text::Audio_text (Audio_text::Type type, String text_string) { - text_str_ = text_str; + text_string_ = text_string; type_ = type; } @@ -75,13 +75,13 @@ Audio_tie::Audio_tie () } void -Audio_tie::set_note (Direction d, Audio_note* note_l) +Audio_tie::set_note (Direction d, Audio_note* note) { assert (!note_l_drul_[d]); - note_l_drul_[d] = note_l; - //set_bound (d, head_l); + note_l_drul_[d] = note; + //set_bound (d, head); - // add_dependency (head_l); + // add_dependency (head); } diff --git a/lily/audio-staff.cc b/lily/audio-staff.cc index 73bb4e8ebc..f3a9e2181d 100644 --- a/lily/audio-staff.cc +++ b/lily/audio-staff.cc @@ -15,7 +15,7 @@ void Audio_staff::add_audio_item (Audio_item* l) { - audio_item_l_arr_.push (l); + audio_items_.push (l); } @@ -23,8 +23,8 @@ void Audio_staff::output (Midi_stream& midi_stream_r, int track_i) { Midi_track midi_track; - midi_track.number_i_ = track_i; - midi_track.channel_i_ = channel_i_; + midi_track.number_ = track_i; + midi_track.channel_ = channel_; for (Midi_walker i (this, &midi_track); i.ok (); i++) i.process (); midi_stream_r << midi_track; diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index 0690d1ccc8..55d8ab3e66 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -38,7 +38,7 @@ private: bool test_moment (Direction, Moment); void consider_begin (Moment); void consider_end (Moment); - Spanner* create_beam_p (); + Spanner* create_beam (); void begin_beam (); void end_beam (); void junk_beam (); @@ -49,11 +49,11 @@ private: shortest_mom is the shortest note in the beam. */ Moment shortest_mom_; - Spanner *finished_beam_p_; - Link_array* stem_l_arr_p_; + Spanner *finished_beam_; + Link_array* stems_; - int count_i_; + int count_; Moment last_add_mom_; /* Projected ending of the beam we're working on. @@ -66,22 +66,22 @@ private: Moment beat_length_; // We act as if beam were created, and start a grouping anyway. - Beaming_info_list*grouping_p_; + Beaming_info_list*grouping_; SCM beam_settings_ ; // ugh. should protect ? - Beaming_info_list*finished_grouping_p_; + Beaming_info_list*finished_grouping_; }; Auto_beam_engraver::Auto_beam_engraver () { - count_i_ = 0; - stem_l_arr_p_ = 0; + count_ = 0; + stems_ = 0; shortest_mom_ = Moment (Rational (1, 8)); - finished_beam_p_ = 0; - finished_grouping_p_ = 0; - grouping_p_ = 0; + finished_beam_ = 0; + finished_grouping_ = 0; + grouping_ = 0; beam_settings_ = SCM_EOL; } @@ -204,7 +204,7 @@ void Auto_beam_engraver::consider_begin (Moment test_mom) { bool on = to_boolean (get_property ("autoBeaming")); - if (!stem_l_arr_p_ && on) + if (!stems_ && on) { bool b = test_moment (START, test_mom); if (b) @@ -215,7 +215,7 @@ Auto_beam_engraver::consider_begin (Moment test_mom) void Auto_beam_engraver::consider_end (Moment test_mom) { - if (stem_l_arr_p_) + if (stems_) { /* Allow already started autobeam to end: don't check for autoBeaming */ @@ -226,39 +226,39 @@ Auto_beam_engraver::consider_end (Moment test_mom) } Spanner* -Auto_beam_engraver::create_beam_p () +Auto_beam_engraver::create_beam () { if (to_boolean (get_property ("skipTypesetting"))) { return 0; } - Spanner* beam_p = new Spanner (beam_settings_); - for (int i = 0; i < stem_l_arr_p_->size (); i++) + Spanner* beam = new Spanner (beam_settings_); + for (int i = 0; i < stems_->size (); i++) { /* watch out for stem tremolos and abbreviation beams */ - if (Stem::beam_l ((*stem_l_arr_p_)[i])) + if (Stem::get_beam ((*stems_)[i])) { - scm_gc_unprotect_object (beam_p->self_scm ()); + scm_gc_unprotect_object (beam->self_scm ()); return 0; } - Beam::add_stem (beam_p, (*stem_l_arr_p_)[i]); + Beam::add_stem (beam, (*stems_)[i]); } - announce_grob(beam_p, SCM_EOL); + announce_grob(beam, SCM_EOL); - return beam_p; + return beam; } void Auto_beam_engraver::begin_beam () { - assert (!stem_l_arr_p_); - stem_l_arr_p_ = new Link_array; - assert (!grouping_p_); - grouping_p_ = new Beaming_info_list; + assert (!stems_); + stems_ = new Link_array; + assert (!grouping_); + grouping_ = new Beaming_info_list; beam_settings_ = get_property ("Beam"); beam_start_moment_ = now_mom (); @@ -271,12 +271,12 @@ Auto_beam_engraver::begin_beam () void Auto_beam_engraver::junk_beam () { - assert (stem_l_arr_p_); + assert (stems_); - delete stem_l_arr_p_; - stem_l_arr_p_ = 0; - delete grouping_p_; - grouping_p_ = 0; + delete stems_; + stems_ = 0; + delete grouping_; + grouping_ = 0; beam_settings_ = SCM_EOL; shortest_mom_ = Moment (Rational (1, 8)); @@ -285,19 +285,19 @@ Auto_beam_engraver::junk_beam () void Auto_beam_engraver::end_beam () { - if (stem_l_arr_p_->size () < 2) + if (stems_->size () < 2) { junk_beam (); } else { - finished_beam_p_ = create_beam_p (); - if (finished_beam_p_) - finished_grouping_p_ = grouping_p_; - delete stem_l_arr_p_; - stem_l_arr_p_ = 0; - grouping_p_ = 0; + finished_beam_ = create_beam (); + if (finished_beam_) + finished_grouping_ = grouping_; + delete stems_; + stems_ = 0; + grouping_ = 0; beam_settings_ = SCM_EOL; } @@ -307,26 +307,26 @@ Auto_beam_engraver::end_beam () void Auto_beam_engraver::typeset_beam () { - if (finished_beam_p_) + if (finished_beam_) { - finished_grouping_p_->beamify(beat_length_, subdivide_beams_); - Beam::set_beaming (finished_beam_p_, finished_grouping_p_); - typeset_grob (finished_beam_p_); - finished_beam_p_ = 0; + finished_grouping_->beamify(beat_length_, subdivide_beams_); + Beam::set_beaming (finished_beam_, finished_grouping_); + typeset_grob (finished_beam_); + finished_beam_ = 0; - delete finished_grouping_p_; - finished_grouping_p_= 0; + delete finished_grouping_; + finished_grouping_= 0; } } void Auto_beam_engraver::start_translation_timestep () { - count_i_ = 0; + count_ = 0; /* don't beam over skips */ - if (stem_l_arr_p_) + if (stems_) { Moment now = now_mom (); if (extend_mom_ < now) @@ -348,7 +348,7 @@ Auto_beam_engraver::finalize () /* finished beams may be typeset */ typeset_beam (); /* but unfinished may need another announce/acknowledge pass */ - if (stem_l_arr_p_) + if (stems_) junk_beam (); } @@ -356,25 +356,25 @@ Auto_beam_engraver::finalize () void Auto_beam_engraver::acknowledge_grob (Grob_info info) { - if (stem_l_arr_p_) + if (stems_) { - if (Beam::has_interface (info.grob_l_)) + if (Beam::has_interface (info.grob_)) { end_beam (); } - else if (Bar_line::has_interface (info.grob_l_)) + else if (Bar_line::has_interface (info.grob_)) { end_beam (); } - else if (Rest::has_interface (info.grob_l_)) + else if (Rest::has_interface (info.grob_)) { end_beam (); } } - if (Stem::has_interface (info.grob_l_)) + if (Stem::has_interface (info.grob_)) { - Item* stem_l = dynamic_cast (info.grob_l_); + Item* stem = dynamic_cast (info.grob_); Rhythmic_req *rhythmic_req = dynamic_cast (info.music_cause ()); if (!rhythmic_req) @@ -386,16 +386,16 @@ Auto_beam_engraver::acknowledge_grob (Grob_info info) /* Don't (start) auto-beam over empty stems; skips or rests */ - if (!Stem::head_count (stem_l)) + if (!Stem::head_count (stem)) { - if (stem_l_arr_p_) + if (stems_) end_beam (); return; } - if (Stem::beam_l (stem_l)) + if (Stem::get_beam (stem)) { - if (stem_l_arr_p_) + if (stems_) junk_beam (); return ; } @@ -404,7 +404,7 @@ Auto_beam_engraver::acknowledge_grob (Grob_info info) if (durlog <= 2) { - if (stem_l_arr_p_) + if (stems_) end_beam (); return; } @@ -444,14 +444,14 @@ Auto_beam_engraver::acknowledge_grob (Grob_info info) consider_begin (shortest_mom_); #endif - if (!stem_l_arr_p_) + if (!stems_) return; Moment now = now_mom (); - grouping_p_->add_stem (now - beam_start_moment_ + beam_start_location_, + grouping_->add_stem (now - beam_start_moment_ + beam_start_location_, durlog - 2); - stem_l_arr_p_->push (stem_l); + stems_->push (stem); last_add_mom_ = now; extend_mom_ = (extend_mom_ >? now) + rhythmic_req->length_mom (); } @@ -460,14 +460,14 @@ Auto_beam_engraver::acknowledge_grob (Grob_info info) void Auto_beam_engraver::process_acknowledged_grobs () { - if (!count_i_) + if (!count_) { consider_end (shortest_mom_); consider_begin (shortest_mom_); } - else if (count_i_ > 1) + else if (count_ > 1) { - if (stem_l_arr_p_) + if (stems_) { Moment now = now_mom (); if ((extend_mom_ < now) @@ -475,7 +475,7 @@ Auto_beam_engraver::process_acknowledged_grobs () { end_beam (); } - else if (!stem_l_arr_p_->size ()) + else if (!stems_->size ()) { junk_beam (); } @@ -483,10 +483,10 @@ Auto_beam_engraver::process_acknowledged_grobs () } /* - count_i_++ -> + count_++ -> auto-beam-engraver.cc:459: warning: value computed is not used (gcc: 2.96) */ - count_i_ = count_i_ + 1; + count_ = count_ + 1; } ENTER_DESCRIPTION(Auto_beam_engraver, /* descr */ "Generate beams based on measure characteristics and observed diff --git a/lily/auto-change-iterator.cc b/lily/auto-change-iterator.cc index bed3c0264d..e5ae076708 100644 --- a/lily/auto-change-iterator.cc +++ b/lily/auto-change-iterator.cc @@ -18,7 +18,7 @@ void Auto_change_iterator::change_to (Music_iterator *it, String to_type, String to_id) { - Translator_group * current = it->report_to_l (); + Translator_group * current = it->report_to (); Translator_group * last = 0; /* @@ -31,13 +31,13 @@ Auto_change_iterator::change_to (Music_iterator *it, String to_type, If \translator Staff = bass, then look for Staff = * */ - while (current && current->type_str_ != to_type) + while (current && current->type_string_ != to_type) { last = current; - current = current->daddy_trans_l_; + current = current->daddy_trans_; } - if (current && current->id_str_ == to_id) + if (current && current->id_string_ == to_id) { String msg; msg += _ ("Can't switch translators, I'm there already"); @@ -47,8 +47,8 @@ Auto_change_iterator::change_to (Music_iterator *it, String to_type, if (last) { Translator_group * dest = - it->report_to_l ()->find_create_translator_l (to_type, to_id); - current->remove_translator_p (last); + it->report_to ()->find_create_translator (to_type, to_id); + current->remove_translator (last); dest->add_used_group_translator (last); } else @@ -57,7 +57,7 @@ Auto_change_iterator::change_to (Music_iterator *it, String to_type, We could change the current translator's id, but that would make errors hard to catch - last->translator_id_str_ = change_l ()->change_to_id_str_; + last->translator_id_string_ = get_change ()->change_to_id_string_; */ // error (_ ("I'm one myself")); } @@ -80,7 +80,7 @@ Auto_change_iterator::change_to (Music_iterator *it, String to_type, Array Auto_change_iterator::pending_pitch (Moment m) const { - Music_iterator * iter = child_iter_p_ ->clone (); + Music_iterator * iter = child_iter_ ->clone (); Array ps; while (1) { @@ -130,8 +130,8 @@ Auto_change_iterator::process (Moment m) { where_dir_ = s; String to_id = (s >= 0) ? "up" : "down"; - String wh = ly_scm2string (music_l ()->get_mus_property ("what")); - change_to (child_iter_p_, wh, to_id); + String wh = ly_scm2string (get_music ()->get_mus_property ("what")); + change_to (child_iter_, wh, to_id); } } } diff --git a/lily/axis-group-engraver.cc b/lily/axis-group-engraver.cc index 563db5c28c..9bca1ce3c7 100644 --- a/lily/axis-group-engraver.cc +++ b/lily/axis-group-engraver.cc @@ -19,13 +19,13 @@ class Axis_group_engraver : public Engraver { protected: - Spanner *staffline_p_; + Spanner *staffline_; Link_array elts_; virtual void initialize (); virtual void finalize (); virtual void acknowledge_grob (Grob_info); virtual void process_acknowledged_grobs (); - virtual Spanner* get_spanner_p () const; + virtual Spanner* get_spanner () const; virtual void add_element (Grob*) ; public: TRANSLATOR_DECLARATIONS(Axis_group_engraver ); @@ -35,23 +35,23 @@ TRANSLATOR_DECLARATIONS(Axis_group_engraver ); Axis_group_engraver::Axis_group_engraver () { - staffline_p_ = 0; + staffline_ = 0; } void Axis_group_engraver::initialize () { - staffline_p_ = get_spanner_p (); + staffline_ = get_spanner (); Grob * it = unsmob_grob (get_property ("currentCommandColumn")); - staffline_p_->set_bound (LEFT,it); + staffline_->set_bound (LEFT,it); - announce_grob(staffline_p_, SCM_EOL); + announce_grob(staffline_, SCM_EOL); } Spanner* -Axis_group_engraver::get_spanner_p () const +Axis_group_engraver::get_spanner () const { return new Spanner (get_property ("VerticalAxisGroup")); } @@ -59,43 +59,43 @@ Axis_group_engraver::get_spanner_p () const void Axis_group_engraver::finalize () { - String type = daddy_grav_l ()->type_str_ ; + String type = get_daddy_grav ()->type_string_ ; SCM dims = get_property ("verticalExtent"); if (gh_pair_p (dims) && gh_number_p (ly_car (dims)) && gh_number_p (ly_cdr (dims))) { - staffline_p_->set_extent (Grob::preset_extent_proc, Y_AXIS); - staffline_p_->set_grob_property ("extent-Y", dims); + staffline_->set_extent (Grob::preset_extent_proc, Y_AXIS); + staffline_->set_grob_property ("extent-Y", dims); } dims = get_property ("minimumVerticalExtent"); if (gh_pair_p (dims) && gh_number_p (ly_car (dims)) && gh_number_p (ly_cdr (dims))) - staffline_p_->set_grob_property ("minimum-extent-Y", dims); + staffline_->set_grob_property ("minimum-extent-Y", dims); dims = get_property ("extraVerticalExtent"); if (gh_pair_p (dims) && gh_number_p (ly_car (dims)) && gh_number_p (ly_cdr (dims))) - staffline_p_->set_grob_property ("extra-extent-Y", dims); + staffline_->set_grob_property ("extra-extent-Y", dims); Grob * it = unsmob_grob (get_property ("currentCommandColumn")); - staffline_p_->set_bound (RIGHT,it); + staffline_->set_bound (RIGHT,it); - typeset_grob (staffline_p_); - staffline_p_ = 0; + typeset_grob (staffline_); + staffline_ = 0; } void Axis_group_engraver::acknowledge_grob (Grob_info i) { - elts_.push (i.grob_l_); + elts_.push (i.grob_); } /* - maybe should check if our parent_l is set, because we now get a + maybe should check if our parent is set, because we now get a cyclic parent relationship if we have two Axis_group_engravers in the context. */ void @@ -116,7 +116,7 @@ Axis_group_engraver::process_acknowledged_grobs () void Axis_group_engraver::add_element (Grob*e) { - Axis_group_interface::add_element (staffline_p_, e); + Axis_group_interface::add_element (staffline_, e); } //////////////////////////////////////////////////////// @@ -128,7 +128,7 @@ Axis_group_engraver::add_element (Grob*e) class Hara_kiri_engraver : public Axis_group_engraver { protected: - virtual Spanner*get_spanner_p ()const; + virtual Spanner*get_spanner ()const; virtual void acknowledge_grob (Grob_info); virtual void add_element (Grob *e); public: @@ -138,12 +138,12 @@ public: void Hara_kiri_engraver::add_element (Grob*e) { - Hara_kiri_group_spanner::add_element (staffline_p_, e); + Hara_kiri_group_spanner::add_element (staffline_, e); } Spanner* -Hara_kiri_engraver::get_spanner_p () const +Hara_kiri_engraver::get_spanner () const { Spanner * sp = new Spanner (get_property ("HaraKiriVerticalGroup")); @@ -154,10 +154,10 @@ void Hara_kiri_engraver::acknowledge_grob (Grob_info i) { Axis_group_engraver::acknowledge_grob (i); - if (Rhythmic_head::has_interface (i.grob_l_) - || i.grob_l_->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface"))) + if (Rhythmic_head::has_interface (i.grob_) + || i.grob_->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface"))) { - Hara_kiri_group_spanner::add_interesting_item (staffline_p_, i.grob_l_); + Hara_kiri_group_spanner::add_interesting_item (staffline_, i.grob_); } } diff --git a/lily/bar-check-iterator.cc b/lily/bar-check-iterator.cc index eef193136e..6405496abc 100644 --- a/lily/bar-check-iterator.cc +++ b/lily/bar-check-iterator.cc @@ -44,7 +44,7 @@ Bar_check_iterator::process (Moment m) Simple_music_iterator::process(m); if (!m.to_bool ()) { - Translator_group *tr = report_to_l (); + Translator_group *tr = report_to (); SCM mp = tr->get_property ("measurePosition"); SCM sync= tr->get_property ("barCheckSynchronize"); @@ -55,8 +55,8 @@ Bar_check_iterator::process (Moment m) if (where->main_part_) { - music_l ()->origin ()->warning (_f ("barcheck failed at: %s", - where->str ())); + get_music ()->origin ()->warning (_f ("barcheck failed at: %s", + where->string ())); if (to_boolean (sync)) { tr = tr->where_defined (ly_symbol2scm("measurePosition")); diff --git a/lily/bar-engraver.cc b/lily/bar-engraver.cc index 71d918dfb2..494ef46383 100644 --- a/lily/bar-engraver.cc +++ b/lily/bar-engraver.cc @@ -23,7 +23,7 @@ class Bar_engraver : public Engraver { public: TRANSLATOR_DECLARATIONS( Bar_engraver ); - void request_bar (String type_str); + void request_bar (String type_string); protected: virtual void finalize (); @@ -34,25 +34,25 @@ private: void typeset_bar (); void create_bar (); - Item * bar_p_; + Item * bar_; }; Bar_engraver::Bar_engraver () { - bar_p_ =0; + bar_ =0; } void Bar_engraver::create_bar () { - if (!bar_p_) + if (!bar_) { - bar_p_ = new Item (get_property ("BarLine")); + bar_ = new Item (get_property ("BarLine")); SCM gl = get_property ("whichBar"); - if (scm_equal_p (gl, bar_p_->get_grob_property ("glyph")) != SCM_BOOL_T) - bar_p_->set_grob_property ("glyph", gl); + if (scm_equal_p (gl, bar_->get_grob_property ("glyph")) != SCM_BOOL_T) + bar_->set_grob_property ("glyph", gl); - announce_grob(bar_p_, SCM_EOL); + announce_grob(bar_, SCM_EOL); } } @@ -77,7 +77,7 @@ Bar_engraver::finalize () void Bar_engraver::process_acknowledged_grobs () { - if (!bar_p_ && gh_string_p (get_property ("whichBar"))) + if (!bar_ && gh_string_p (get_property ("whichBar"))) { create_bar (); } @@ -86,10 +86,10 @@ Bar_engraver::process_acknowledged_grobs () void Bar_engraver::typeset_bar () { - if (bar_p_) + if (bar_) { - typeset_grob (bar_p_); - bar_p_ =0; + typeset_grob (bar_); + bar_ =0; } } @@ -99,7 +99,7 @@ Bar_engraver::typeset_bar () void Bar_engraver::stop_translation_timestep () { - if (!bar_p_) + if (!bar_) { top_engraver ()->forbid_breaks (); // guh. Use properties! } diff --git a/lily/bar-line.cc b/lily/bar-line.cc index 1499a34bde..f54d33c961 100644 --- a/lily/bar-line.cc +++ b/lily/bar-line.cc @@ -53,7 +53,7 @@ Bar_line::compound_barline (Grob*me, String str, Real h) Real hair = gh_scm2double (me->get_grob_property ("hair-thickness")); Real fatline = gh_scm2double (me->get_grob_property ("thick-thickness")); - Real staffline = me->paper_l ()->get_var ("linethickness"); + Real staffline = me->get_paper ()->get_var ("linethickness"); Real staff_space = Staff_symbol_referencer::staff_space (me); kern *= staffline; @@ -175,7 +175,7 @@ Bar_line::get_staff_bar_size (SCM smob) SCM size = me->get_grob_property ("bar-size"); if (gh_number_p (size)) return gh_double2scm (gh_scm2double (size)*ss); - else if (Staff_symbol_referencer::staff_symbol_l (me)) + else if (Staff_symbol_referencer::get_staff_symbol (me)) { /* If there is no staff-symbol, we get -1 from the next diff --git a/lily/bar-number-engraver.cc b/lily/bar-number-engraver.cc index ae63850005..697187003c 100644 --- a/lily/bar-number-engraver.cc +++ b/lily/bar-number-engraver.cc @@ -28,7 +28,7 @@ staff-group, add padding to the bar number. class Bar_number_engraver : public Engraver { protected: - Item* text_p_; + Item* text_; protected: virtual void stop_translation_timestep (); virtual void acknowledge_grob (Grob_info); @@ -62,8 +62,8 @@ Bar_number_engraver::process_music () create_items (); // guh. - text_p_->set_grob_property ("text", - ly_str02scm (to_str (gh_scm2int (bn)).ch_C ())); + text_->set_grob_property ("text", + ly_str02scm (to_string (gh_scm2int (bn)).to_str0 ())); } } @@ -73,33 +73,33 @@ Bar_number_engraver::process_music () Bar_number_engraver::Bar_number_engraver () { - text_p_ =0; + text_ =0; } void Bar_number_engraver::acknowledge_grob (Grob_info inf) { - Grob * s = inf.grob_l_; - if (text_p_ + Grob * s = inf.grob_; + if (text_ && dynamic_cast (s) && s->get_grob_property ("break-align-symbol") == ly_symbol2scm ("left-edge")) { /* By default this would land on the Paper_column -- so why doesn't it work when you leave this out? */ - text_p_->set_parent (s, X_AXIS); + text_->set_parent (s, X_AXIS); } } void Bar_number_engraver::stop_translation_timestep () { - if (text_p_) + if (text_) { - text_p_->set_grob_property ("side-support-elements", get_property ("stavesFound")); - typeset_grob (text_p_); - text_p_ =0; + text_->set_grob_property ("side-support-elements", get_property ("stavesFound")); + typeset_grob (text_); + text_ =0; } } @@ -107,14 +107,14 @@ Bar_number_engraver::stop_translation_timestep () void Bar_number_engraver::create_items () { - if (text_p_) + if (text_) return; SCM b = get_property ("BarNumber"); - text_p_ = new Item (b); - Side_position_interface::set_axis (text_p_,Y_AXIS); + text_ = new Item (b); + Side_position_interface::set_axis (text_,Y_AXIS); - announce_grob(text_p_, SCM_EOL); + announce_grob(text_, SCM_EOL); } ENTER_DESCRIPTION(Bar_number_engraver, diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index 99c15143bf..2a9f951a81 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -24,12 +24,12 @@ class Beam_engraver : public Engraver protected: Drul_array reqs_drul_; - Spanner *finished_beam_p_; - Spanner *beam_p_; + Spanner *finished_beam_; + Spanner *beam_; Span_req * prev_start_req_; - Beaming_info_list * beam_info_p_; - Beaming_info_list * finished_beam_info_p_; + Beaming_info_list * beam_info_; + Beaming_info_list * finished_beam_info_; /// location within measure where beam started. Moment beam_start_location_; @@ -84,10 +84,10 @@ Beam_engraver::valid_end_moment() Beam_engraver::Beam_engraver () { - beam_p_ = 0; - finished_beam_p_ =0; - finished_beam_info_p_=0; - beam_info_p_ =0; + beam_ = 0; + finished_beam_ =0; + finished_beam_info_=0; + beam_info_ =0; reqs_drul_[LEFT] = reqs_drul_[RIGHT] =0; prev_start_req_ =0; @@ -103,9 +103,9 @@ Beam_engraver::try_music (Music *m) { reqs_drul_[START] = 0; reqs_drul_[STOP] = 0; - if (beam_p_) - beam_p_->suicide (); - beam_p_ = 0; + if (beam_) + beam_->suicide (); + beam_ = 0; } else if (scm_equal_p (c->get_mus_property ("span-type"), ly_str02scm ("beam")) == SCM_BOOL_T) @@ -139,7 +139,7 @@ Beam_engraver::try_music (Music *m) void Beam_engraver::set_melisma (bool m) { - daddy_trans_l_->set_property ("beamMelismaBusy", m ? SCM_BOOL_T :SCM_BOOL_F); + daddy_trans_->set_property ("beamMelismaBusy", m ? SCM_BOOL_T :SCM_BOOL_F); } void @@ -148,39 +148,39 @@ Beam_engraver::process_music () if (reqs_drul_[STOP]) { prev_start_req_ =0; - finished_beam_p_ = beam_p_; - finished_beam_info_p_ = beam_info_p_; + finished_beam_ = beam_; + finished_beam_info_ = beam_info_; - beam_info_p_ =0; - beam_p_ = 0; + beam_info_ =0; + beam_ = 0; } - if (beam_p_) + if (beam_) { top_engraver ()->forbid_breaks (); } if (reqs_drul_[START]) { - if (beam_p_) + if (beam_) { reqs_drul_[START]->origin ()->warning (_ ("already have a beam")); return; } prev_start_req_ = reqs_drul_[START]; - beam_p_ = new Spanner (get_property ("Beam")); + beam_ = new Spanner (get_property ("Beam")); SCM smp = get_property ("measurePosition"); Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); beam_start_location_ = mp; beam_start_mom_ = now_mom (); - beam_info_p_ = new Beaming_info_list; + beam_info_ = new Beaming_info_list; /* urg, must copy to Auto_beam_engraver too */ - announce_grob(beam_p_, reqs_drul_[START]->self_scm()); + announce_grob(beam_, reqs_drul_[START]->self_scm()); } } @@ -189,14 +189,14 @@ Beam_engraver::process_music () void Beam_engraver::typeset_beam () { - if (finished_beam_p_) + if (finished_beam_) { - finished_beam_info_p_->beamify(beat_length_, subdivide_beams_); - Beam::set_beaming (finished_beam_p_, finished_beam_info_p_); - typeset_grob (finished_beam_p_); - delete finished_beam_info_p_; - finished_beam_info_p_ =0; - finished_beam_p_ = 0; + finished_beam_info_->beamify(beat_length_, subdivide_beams_); + Beam::set_beaming (finished_beam_, finished_beam_info_); + typeset_grob (finished_beam_); + delete finished_beam_info_; + finished_beam_info_ =0; + finished_beam_ = 0; } } @@ -206,7 +206,7 @@ Beam_engraver::start_translation_timestep () reqs_drul_ [START] =0; reqs_drul_[STOP] = 0; - if (beam_p_) + if (beam_) { SCM m = get_property ("automaticMelismata"); SCM b = get_property ("autoBeaming"); @@ -229,36 +229,36 @@ void Beam_engraver::finalize () { typeset_beam (); - if (beam_p_) + if (beam_) { prev_start_req_->origin ()->warning (_ ("unterminated beam")); /* we don't typeset it, (we used to, but it was commented out. Reason unknown) */ - beam_p_->suicide (); - delete beam_info_p_; + beam_->suicide (); + delete beam_info_; } } void Beam_engraver::acknowledge_grob (Grob_info info) { - if (beam_p_) + if (beam_) { - if (Rest::has_interface (info.grob_l_)) + if (Rest::has_interface (info.grob_)) { - info.grob_l_->add_offset_callback (Beam::rest_collision_callback_proc, Y_AXIS); + info.grob_->add_offset_callback (Beam::rest_collision_callback_proc, Y_AXIS); } - else if (Stem::has_interface (info.grob_l_)) + else if (Stem::has_interface (info.grob_)) { Moment now = now_mom(); if (!valid_start_moment ()) return ; - Item *stem_l = dynamic_cast (info.grob_l_); - if (Stem::beam_l (stem_l)) + Item *stem = dynamic_cast (info.grob_); + if (Stem::get_beam (stem)) return; Rhythmic_req *rhythmic_req = dynamic_cast (info.music_cause ()); @@ -287,12 +287,12 @@ Beam_engraver::acknowledge_grob (Grob_info info) */ } - stem_l->set_grob_property ("duration-log", + stem->set_grob_property ("duration-log", gh_int2scm (durlog)); Moment stem_location = now - beam_start_mom_ + beam_start_location_; - beam_info_p_->add_stem (stem_location, + beam_info_->add_stem (stem_location, (durlog- 2) >? 0); - Beam::add_stem (beam_p_, stem_l); + Beam::add_stem (beam_, stem); } } } @@ -336,7 +336,7 @@ Grace_beam_engraver::valid_start_moment() bool Grace_beam_engraver::valid_end_moment () { - return beam_p_ && last_stem_added_at_.grace_part_ != Rational(0); + return beam_ && last_stem_added_at_.grace_part_ != Rational(0); } diff --git a/lily/beam-quanting.cc b/lily/beam-quanting.cc index 6f5733f0d5..ba6fcf3f9c 100644 --- a/lily/beam-quanting.cc +++ b/lily/beam-quanting.cc @@ -74,7 +74,7 @@ Beam::quanting (SCM smob) Real ss = Staff_symbol_referencer::staff_space (me); Real thickness = gh_scm2double (me->get_grob_property ("thickness")) / ss; - Real slt = me->paper_l ()->get_var ("linethickness") / ss; + Real slt = me->get_paper ()->get_var ("linethickness") / ss; SCM sdy = me->get_grob_property ("least-squares-dy"); diff --git a/lily/beam.cc b/lily/beam.cc index 655e760322..f1da1fec87 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -63,7 +63,7 @@ Beam::add_stem (Grob *me, Grob *s) s->add_dependency (me); - assert (!Stem::beam_l (s)); + assert (!Stem::get_beam (s)); s->set_grob_property ("beam", me->self_scm ()); add_bound_item (dynamic_cast (me), dynamic_cast (s)); @@ -104,7 +104,7 @@ Beam::space_function (SCM smob, SCM beam_count) Grob *me = unsmob_grob (smob); Real staff_space = Staff_symbol_referencer::staff_space (me); - Real line = me->paper_l ()->get_var ("linethickness"); + Real line = me->get_paper ()->get_var ("linethickness"); Real thickness = gh_scm2double (me->get_grob_property ("thickness")) * staff_space; @@ -279,7 +279,7 @@ Beam::brew_molecule (SCM grob) SCM gap = me->get_grob_property ("gap"); Molecule the_beam; - Real lt = me->paper_l ()->get_var ("linethickness"); + Real lt = me->get_paper ()->get_var ("linethickness"); for (int i = 0; i< stems.size(); i++) { Grob * st =stems[i]; @@ -408,16 +408,16 @@ Beam::brew_molecule (SCM grob) String str; if (1) { - str += to_str (gh_scm2int (me->get_grob_property ("best-idx"))); + str += to_string (gh_scm2int (me->get_grob_property ("best-idx"))); str += ":"; } - str += to_str (gh_scm2double (me->get_grob_property ("quant-score")), + str += to_string (gh_scm2double (me->get_grob_property ("quant-score")), "%.2f"); SCM properties = Font_interface::font_alist_chain (me); - Molecule tm = Text_item::text2molecule (me, ly_str02scm (str.ch_C ()), properties); + Molecule tm = Text_item::text2molecule (me, ly_str02scm (str.to_str0 ()), properties); the_beam.add_at_edge (Y_AXIS, UP, tm, 5.0); } #endif @@ -486,7 +486,10 @@ Beam::set_stem_directions (Grob *me, Direction d) Grob *s = stems[i]; /* For knees, non-forced stems should probably have their natural direction. In any case, when knee, beam direction is - foe. */ + foe. + + TODO: for x staff knees, set direction pointing to 'the other' staff, rather than natural. + */ if (knee_b(me)) Stem::get_direction (s); // this actually sets it, if necessary else diff --git a/lily/bezier.cc b/lily/bezier.cc index 6d22b1d6b6..e165817f24 100644 --- a/lily/bezier.cc +++ b/lily/bezier.cc @@ -30,28 +30,28 @@ binomial_coefficient (Real over , int under) } void -scale (Array* arr_p, Real x , Real y) +scale (Array* array, Real x , Real y) { - for (int i = 0; i < arr_p->size (); i++) + for (int i = 0; i < array->size (); i++) { - (*arr_p)[i][X_AXIS] = x* (*arr_p)[i][X_AXIS]; - (*arr_p)[i][Y_AXIS] = y* (*arr_p)[i][Y_AXIS]; + (*array)[i][X_AXIS] = x* (*array)[i][X_AXIS]; + (*array)[i][Y_AXIS] = y* (*array)[i][Y_AXIS]; } } void -rotate (Array* arr_p, Real phi) +rotate (Array* array, Real phi) { Offset rot (complex_exp (Offset (0, phi))); - for (int i = 0; i < arr_p->size (); i++) - (*arr_p)[i] = complex_multiply (rot, (*arr_p)[i]); + for (int i = 0; i < array->size (); i++) + (*array)[i] = complex_multiply (rot, (*array)[i]); } void -translate (Array* arr_p, Offset o) +translate (Array* array, Offset o) { - for (int i = 0; i < arr_p->size (); i++) - (*arr_p)[i] += o; + for (int i = 0; i < array->size (); i++) + (*array)[i] += o; } /* diff --git a/lily/break-algorithm.cc b/lily/break-algorithm.cc index 24b49f72f4..65cd2825d3 100644 --- a/lily/break-algorithm.cc +++ b/lily/break-algorithm.cc @@ -21,14 +21,14 @@ Array Break_algorithm::find_break_indices () const { - Link_array all = pscore_l_->system_->column_l_arr (); + Link_array all = pscore_->system_->columns (); Array retval; for (int i=0; i < all.size (); i++) if (Item::breakable_b (all[i])) retval.push (i); - if (linewidth_f_ <=0) + if (linewidth_ <=0) while (retval.size () >2) retval.del (1); @@ -39,14 +39,14 @@ Break_algorithm::find_break_indices () const Link_array Break_algorithm::find_breaks () const { - Link_array all = pscore_l_->system_->column_l_arr (); + Link_array all = pscore_->system_->columns (); Link_array retval; for (int i=0; i < all.size (); i++) if (Item::breakable_b (all[i])) retval.push (all[i]); - if (linewidth_f_ <=0) + if (linewidth_ <=0) while (retval.size () >2) retval.del (1); @@ -64,20 +64,20 @@ Break_algorithm::generate_spacing_problem (Link_array const &curline, this is hardcoded, but this shouldn't happen anyway. used to be get_var ("loose_column_distance"); */ - sp->default_space_f_ = 1.0; + sp->default_space_ = 1.0; - sp->indent_f_ = line[LEFT]; + sp->indent_ = line[LEFT]; /* sort out how interfacing this should work; */ if (line.empty_b ()) { - sp->line_len_f_ = -1; + sp->line_len_ = -1; } else - sp->line_len_f_ = line.length (); + sp->line_len_ = line.length (); sp->add_columns (curline); @@ -87,15 +87,15 @@ Break_algorithm::generate_spacing_problem (Link_array const &curline, Break_algorithm::Break_algorithm () { - pscore_l_ = 0; - linewidth_f_ = 0; + pscore_ = 0; + linewidth_ = 0; } void Break_algorithm::set_pscore (Paper_score*s) { - pscore_l_ = s; - linewidth_f_ = s->paper_l_->get_var ("linewidth"); + pscore_ = s; + linewidth_ = s->paper_->get_var ("linewidth"); } Array diff --git a/lily/break-align-engraver.cc b/lily/break-align-engraver.cc index ee8ea34361..c4d9bc893c 100644 --- a/lily/break-align-engraver.cc +++ b/lily/break-align-engraver.cc @@ -16,7 +16,7 @@ class Break_align_engraver : public Engraver { - Item *align_l_; + Item *align_; Protected_scm column_alist_; void add_to_group (SCM,Item*); protected: @@ -33,7 +33,7 @@ void Break_align_engraver::add_column (SCM smob) { Grob * e = unsmob_grob (smob); - Break_align_interface::add_element (align_l_,e); + Break_align_interface::add_element (align_,e); typeset_grob (e); } @@ -66,10 +66,10 @@ Break_align_engraver::stop_translation_timestep () column_alist_ = SCM_EOL; - if (align_l_) + if (align_) { - typeset_grob (align_l_); - align_l_ = 0; + typeset_grob (align_); + align_ = 0; } } @@ -77,43 +77,43 @@ Break_align_engraver::stop_translation_timestep () Break_align_engraver::Break_align_engraver () { column_alist_ = SCM_EOL; - align_l_ =0; + align_ =0; } void Break_align_engraver::acknowledge_grob (Grob_info inf) { - if (Item * item_l = dynamic_cast (inf.grob_l_)) + if (Item * item = dynamic_cast (inf.grob_)) { - if (item_l->empty_b (X_AXIS) || item_l->get_parent (X_AXIS)) + if (item->empty_b (X_AXIS) || item->get_parent (X_AXIS)) return; - SCM bp=item_l->get_grob_property ("breakable"); + SCM bp=item->get_grob_property ("breakable"); bool breakable = (to_boolean (bp)); if (!breakable) return ; - SCM align_name = item_l->get_grob_property ("break-align-symbol"); + SCM align_name = item->get_grob_property ("break-align-symbol"); if (!gh_symbol_p (align_name)) return ; - if (!align_l_) + if (!align_) { - align_l_ = new Item (get_property ("BreakAlignment")); + align_ = new Item (get_property ("BreakAlignment")); - announce_grob (align_l_, SCM_EOL); + announce_grob (align_, SCM_EOL); Item * edge = new Item (get_property ("LeftEdge")); add_to_group (edge->get_grob_property ("break-align-symbol"), edge); announce_grob(edge, SCM_EOL); } - add_to_group (align_name, item_l); + add_to_group (align_name, item); } } void -Break_align_engraver::add_to_group(SCM align_name, Item*item_l) +Break_align_engraver::add_to_group(SCM align_name, Item*item) { SCM s = scm_assoc (align_name, column_alist_); Item * group = 0; @@ -128,13 +128,13 @@ Break_align_engraver::add_to_group(SCM align_name, Item*item_l) group = new Item (get_property ("BreakAlignGroup")); group->set_grob_property ("break-align-symbol", align_name); - group->set_parent (align_l_, Y_AXIS); - announce_grob(group, item_l->self_scm()); + group->set_parent (align_, Y_AXIS); + announce_grob(group, item->self_scm()); column_alist_ = scm_assoc_set_x (column_alist_, align_name, group->self_scm ()); } - Axis_group_interface::add_element (group, item_l); + Axis_group_interface::add_element (group, item); } ENTER_DESCRIPTION(Break_align_engraver, diff --git a/lily/break-align-interface.cc b/lily/break-align-interface.cc index a4205c00c7..0a1678172e 100644 --- a/lily/break-align-interface.cc +++ b/lily/break-align-interface.cc @@ -155,17 +155,17 @@ Break_align_interface::do_alignment (Grob *me) bool entry_found = gh_pair_p (entry); if (!entry_found) { - String sym_str; - if(gh_symbol_p(rsym)) - sym_str = ly_symbol2string (rsym); + String sym_string; + if(gh_symbol_p (rsym)) + sym_string = ly_symbol2string (rsym); - String orig_str ; + String orig_string ; if (unsmob_grob (l->get_grob_property ("cause"))) - orig_str = unsmob_grob (l->get_grob_property ("cause"))->name (); + orig_string = unsmob_grob (l->get_grob_property ("cause"))->name (); programming_error (_f("No spacing entry from %s to `%s'", - orig_str.ch_C (), - sym_str.ch_C())); + orig_string.to_str0 (), + sym_string.to_str0 ())); } Real distance = 1.0; diff --git a/lily/breathing-sign-engraver.cc b/lily/breathing-sign-engraver.cc index 0ba27cc05d..e4fc055153 100644 --- a/lily/breathing-sign-engraver.cc +++ b/lily/breathing-sign-engraver.cc @@ -27,28 +27,28 @@ public: TRANSLATOR_DECLARATIONS(Breathing_sign_engraver); protected: - virtual bool try_music (Music *req_l); + virtual bool try_music (Music *req); virtual void process_acknowledged_grobs (); virtual void stop_translation_timestep (); virtual void start_translation_timestep (); private: - Breathing_sign_req * breathing_sign_req_l_; - Grob * breathing_sign_p_; + Breathing_sign_req * breathing_sign_req_; + Grob * breathing_sign_; }; Breathing_sign_engraver::Breathing_sign_engraver () { - breathing_sign_p_ = 0; - breathing_sign_req_l_ = 0; + breathing_sign_ = 0; + breathing_sign_req_ = 0; } bool -Breathing_sign_engraver::try_music (Music*r_l) +Breathing_sign_engraver::try_music (Music*r) { - if (Breathing_sign_req * b= dynamic_cast (r_l)) + if (Breathing_sign_req * b= dynamic_cast (r)) { - breathing_sign_req_l_ = b; + breathing_sign_req_ = b; return true; } @@ -58,30 +58,30 @@ Breathing_sign_engraver::try_music (Music*r_l) void Breathing_sign_engraver::process_acknowledged_grobs () { - if (breathing_sign_req_l_ && ! breathing_sign_p_) + if (breathing_sign_req_ && ! breathing_sign_) { SCM b = get_property ("BreathingSign"); - breathing_sign_p_ = new Item (b); + breathing_sign_ = new Item (b); - announce_grob(breathing_sign_p_, breathing_sign_req_l_->self_scm()); - breathing_sign_req_l_ = 0; + announce_grob(breathing_sign_, breathing_sign_req_->self_scm()); + breathing_sign_req_ = 0; } } void Breathing_sign_engraver::stop_translation_timestep () { - if (breathing_sign_p_) + if (breathing_sign_) { - typeset_grob (breathing_sign_p_); - breathing_sign_p_ = 0; + typeset_grob (breathing_sign_); + breathing_sign_ = 0; } } void Breathing_sign_engraver::start_translation_timestep () { - breathing_sign_req_l_ = 0; + breathing_sign_req_ = 0; } diff --git a/lily/change-iterator.cc b/lily/change-iterator.cc index 6d0ba3d1c2..747fd35dc7 100644 --- a/lily/change-iterator.cc +++ b/lily/change-iterator.cc @@ -16,8 +16,8 @@ void Change_iterator::error (String reason) { - String to_type = ly_scm2string (music_l ()->get_mus_property ("change-to-type")); - String to_id = ly_scm2string (music_l ()->get_mus_property ("change-to-id")); + String to_type = ly_scm2string (get_music ()->get_mus_property ("change-to-type")); + String to_id = ly_scm2string (get_music ()->get_mus_property ("change-to-id")); String warn1 = _f ("can't change `%s' to `%s'", to_type, to_id) + ": " + reason; @@ -25,10 +25,10 @@ Change_iterator::error (String reason) GUHG! */ String warn2= "Change_iterator::process (): " - + report_to_l ()->type_str_ + " = `" - + report_to_l ()->id_str_ + "': "; + + report_to ()->type_string_ + " = `" + + report_to ()->id_string_ + "': "; warning (warn2); - music_l ()->origin ()->warning (warn1); + get_music ()->origin ()->warning (warn1); } /* @@ -37,24 +37,24 @@ Change_iterator::error (String reason) void Change_iterator::process (Moment m) { - Translator_group * current = report_to_l (); + Translator_group * current = report_to (); Translator_group * last = 0; - String to_type = ly_scm2string (music_l ()->get_mus_property ("change-to-type")); - String to_id = ly_scm2string (music_l ()->get_mus_property ("change-to-id")); + String to_type = ly_scm2string (get_music ()->get_mus_property ("change-to-type")); + String to_id = ly_scm2string (get_music ()->get_mus_property ("change-to-id")); /* find the type of translator that we're changing. If \translator Staff = bass, then look for Staff = * */ - while (current && current->type_str_ != to_type) + while (current && current->type_string_ != to_type) { last = current; - current = current->daddy_trans_l_; + current = current->daddy_trans_; } - if (current && current->id_str_ == to_id) + if (current && current->id_string_ == to_id) { String msg; msg += _ ("Can't switch translators, I'm there already"); @@ -64,8 +64,8 @@ Change_iterator::process (Moment m) if (last) { Translator_group * dest = - report_to_l ()->find_create_translator_l (to_type, to_id); - current->remove_translator_p (last); + report_to ()->find_create_translator (to_type, to_id); + current->remove_translator (last); dest->add_used_group_translator (last); } else @@ -74,7 +74,7 @@ Change_iterator::process (Moment m) We could change the current translator's id, but that would make errors hard to catch - last->translator_id_str_ = change_l ()->change_to_id_str_; + last->translator_id_string_ = get_change ()->change_to_id_string_; */ error (_ ("I'm one myself")); } diff --git a/lily/chord-name-engraver.cc b/lily/chord-name-engraver.cc index 005f7ff30f..bbccd04afe 100644 --- a/lily/chord-name-engraver.cc +++ b/lily/chord-name-engraver.cc @@ -30,7 +30,7 @@ protected: private: void add_note (Note_req *); - Item* chord_name_p_; + Item* chord_name_; Protected_scm chord_; Protected_scm last_chord_; @@ -40,7 +40,7 @@ private: Chord_name_engraver::Chord_name_engraver () { - chord_name_p_ = 0; + chord_name_ = 0; chord_ = gh_cons (SCM_EOL, gh_cons (SCM_EOL, SCM_EOL)); last_chord_ = chord_; } @@ -79,24 +79,24 @@ Chord_name_engraver::process_music () { if (ly_car (chord_) != SCM_EOL) { - chord_name_p_ = new Item (get_property ("ChordName")); - chord_name_p_->set_grob_property ("chord", chord_); - announce_grob(chord_name_p_, SCM_EOL); + chord_name_ = new Item (get_property ("ChordName")); + chord_name_->set_grob_property ("chord", chord_); + announce_grob(chord_name_, SCM_EOL); SCM s = get_property ("chordChanges"); if (to_boolean (s) && ly_car (last_chord_) != SCM_EOL && gh_equal_p (chord_, last_chord_)) - chord_name_p_->set_grob_property ("begin-of-line-visible", SCM_BOOL_T); + chord_name_->set_grob_property ("begin-of-line-visible", SCM_BOOL_T); } } void Chord_name_engraver::stop_translation_timestep () { - if (chord_name_p_) + if (chord_name_) { - typeset_grob (chord_name_p_); + typeset_grob (chord_name_); } - chord_name_p_ = 0; + chord_name_ = 0; if (ly_car (chord_) != SCM_EOL) last_chord_ = chord_; diff --git a/lily/chord-name.cc b/lily/chord-name.cc index f02c8421fc..e2ec6929e9 100644 --- a/lily/chord-name.cc +++ b/lily/chord-name.cc @@ -26,7 +26,7 @@ Chord_name::after_line_breaking (SCM smob) SCM s = me->get_grob_property ("begin-of-line-visible"); if (to_boolean (s)) { - if (Paper_column::rank_i (me->column_l ()) - + if (Paper_column::get_rank (me->get_column ()) - me->get_system ()->spanned_rank_iv ()[LEFT] > 1) me->suicide (); } diff --git a/lily/chord-tremolo-engraver.cc b/lily/chord-tremolo-engraver.cc index 2bf00410fb..b677471bd8 100644 --- a/lily/chord-tremolo-engraver.cc +++ b/lily/chord-tremolo-engraver.cc @@ -48,13 +48,13 @@ protected: /// moment (global time) where beam started. Moment start_mom_; Moment stop_mom_; - int flags_i_ ; + int flags_ ; /// location within measure where beam started. Moment beam_start_location_; bool sequential_body_b_; - Spanner * beam_p_; - Spanner * finished_beam_p_; + Spanner * beam_; + Spanner * finished_beam_; Item * stem_tremolo_; protected: virtual void finalize (); @@ -67,9 +67,9 @@ protected: Chord_tremolo_engraver::Chord_tremolo_engraver () { - beam_p_ = finished_beam_p_ = 0; + beam_ = finished_beam_ = 0; repeat_ =0; - flags_i_ = 0; + flags_ = 0; stem_tremolo_ = 0; sequential_body_b_ = false; } @@ -90,7 +90,7 @@ Chord_tremolo_engraver::try_music (Music * m) Rational total_dur = l.main_part_; Rational note_dur = (total_dur / Rational (repeat_->repeat_count ())); - flags_i_ = intlog2 ((total_dur / note_dur).num ()); + flags_ = intlog2 ((total_dur / note_dur).num ()); return true; } @@ -103,26 +103,26 @@ Chord_tremolo_engraver::process_music () { if (repeat_) { - if (sequential_body_b_ && !beam_p_) + if (sequential_body_b_ && !beam_) { - beam_p_ = new Spanner (get_property ("Beam")); - beam_p_->set_grob_property ("chord-tremolo", SCM_BOOL_T); + beam_ = new Spanner (get_property ("Beam")); + beam_->set_grob_property ("chord-tremolo", SCM_BOOL_T); SCM smp = get_property ("measurePosition"); Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); beam_start_location_ = mp; - announce_grob(beam_p_, repeat_->self_scm()); + announce_grob(beam_, repeat_->self_scm()); } else if (!sequential_body_b_ && !stem_tremolo_) { - if (flags_i_) + if (flags_) { stem_tremolo_ = new Item (get_property ("StemTremolo")); announce_grob(stem_tremolo_, repeat_->self_scm()); stem_tremolo_->set_grob_property ("flag-count", - gh_int2scm (flags_i_)); + gh_int2scm (flags_)); } } @@ -132,20 +132,20 @@ void Chord_tremolo_engraver::finalize () { typeset_beam (); - if (beam_p_) + if (beam_) { repeat_->origin ()->warning (_ ("unterminated chord tremolo")); - beam_p_->suicide (); + beam_->suicide (); } } void Chord_tremolo_engraver::typeset_beam () { - if (finished_beam_p_) + if (finished_beam_) { - typeset_grob (finished_beam_p_); - finished_beam_p_ = 0; + typeset_grob (finished_beam_); + finished_beam_ = 0; } } @@ -153,22 +153,22 @@ Chord_tremolo_engraver::typeset_beam () void Chord_tremolo_engraver::acknowledge_grob (Grob_info info) { - if (beam_p_ && Stem::has_interface (info.grob_l_)) + if (beam_ && Stem::has_interface (info.grob_)) { - Grob * s = info.grob_l_; - Stem::set_beaming (s, flags_i_, LEFT); - Stem::set_beaming (s, flags_i_, RIGHT); + Grob * s = info.grob_; + Stem::set_beaming (s, flags_, LEFT); + Stem::set_beaming (s, flags_, RIGHT); SCM d = s->get_grob_property ("direction"); if (Stem::duration_log (s) != 1) { - beam_p_->set_grob_property ("gap", gh_double2scm (0.8)); + beam_->set_grob_property ("gap", gh_double2scm (0.8)); } s->set_grob_property ("direction", d); if (dynamic_cast (info.music_cause ())) { - Beam::add_stem (beam_p_, s); + Beam::add_stem (beam_, s); } else { @@ -179,10 +179,10 @@ Chord_tremolo_engraver::acknowledge_grob (Grob_info info) ::warning (s); } } - else if (stem_tremolo_ && Stem::has_interface (info.grob_l_)) + else if (stem_tremolo_ && Stem::has_interface (info.grob_)) { - Stem_tremolo::set_stem (stem_tremolo_, info.grob_l_); - stem_tremolo_->set_parent (info.grob_l_,X_AXIS); + Stem_tremolo::set_stem (stem_tremolo_, info.grob_); + stem_tremolo_->set_parent (info.grob_,X_AXIS); } } @@ -190,12 +190,12 @@ Chord_tremolo_engraver::acknowledge_grob (Grob_info info) void Chord_tremolo_engraver::start_translation_timestep () { - if (beam_p_ && stop_mom_ == now_mom ()) + if (beam_ && stop_mom_ == now_mom ()) { - finished_beam_p_ = beam_p_; + finished_beam_ = beam_; repeat_ = 0; - beam_p_ = 0; + beam_ = 0; } } diff --git a/lily/chord-tremolo-iterator.cc b/lily/chord-tremolo-iterator.cc index e3364847d0..7cec33c302 100644 --- a/lily/chord-tremolo-iterator.cc +++ b/lily/chord-tremolo-iterator.cc @@ -20,22 +20,22 @@ void Chord_tremolo_iterator::construct_children () { - Repeated_music * rep = dynamic_cast (music_l ()); + Repeated_music * rep = dynamic_cast (get_music ()); factor_ = Moment (Rational(1, 1)); - child_iter_p_ = get_iterator_p (rep->body ()); + child_iter_ = get_iterator (rep->body ()); } Chord_tremolo_iterator::Chord_tremolo_iterator () { factor_ = 1; - child_iter_p_ = 0; + child_iter_ = 0; } Chord_tremolo_iterator::Chord_tremolo_iterator (Chord_tremolo_iterator const &src) : Music_iterator (src) { factor_ = src.factor_; - child_iter_p_ = src.child_iter_p_ ? src.child_iter_p_->clone () : 0; + child_iter_ = src.child_iter_ ? src.child_iter_->clone () : 0; } void @@ -43,37 +43,37 @@ Chord_tremolo_iterator::process (Moment m) { if (!m.to_bool () ) { - Music_iterator *yeah = try_music (music_l ()); + Music_iterator *yeah = try_music (get_music ()); if (yeah) - set_translator (yeah->report_to_l ()); + set_translator (yeah->report_to ()); else - music_l ()->origin ()->warning (_ ("no one to print a tremolos")); + get_music ()->origin ()->warning (_ ("no one to print a tremolos")); } - child_iter_p_->process (factor_ * m); + child_iter_->process (factor_ * m); } Moment Chord_tremolo_iterator::pending_moment () const { - return child_iter_p_->pending_moment () / factor_; + return child_iter_->pending_moment () / factor_; } bool Chord_tremolo_iterator::ok () const { - return child_iter_p_ && child_iter_p_->ok (); + return child_iter_ && child_iter_->ok (); } Chord_tremolo_iterator::~Chord_tremolo_iterator () { - delete child_iter_p_; + delete child_iter_; } Music_iterator* Chord_tremolo_iterator::try_music_in_children (Music *m) const { - return child_iter_p_->try_music (m); + return child_iter_->try_music (m); } diff --git a/lily/chord.cc b/lily/chord.cc index f0ef3685bc..5150bb0b3c 100644 --- a/lily/chord.cc +++ b/lily/chord.cc @@ -81,8 +81,8 @@ Chord::member_notename (SCM p, SCM pitches) Urg, eindelijk gevonden: () != #f, kan maar niet aan wennen. Anders kon iets korter... */ - if (unsmob_pitch (p)->notename_i_ - == unsmob_pitch (ly_car (i))->notename_i_) + if (unsmob_pitch (p)->notename_ + == unsmob_pitch (ly_car (i))->notename_) { member = ly_car (i); break; @@ -104,10 +104,10 @@ Chord::member_pitch (SCM p, SCM pitches) { for (SCM i = pitches; gh_pair_p (i); i = ly_cdr (i)) { - if (unsmob_pitch (p)->notename_i_ - == unsmob_pitch (ly_car (i))->notename_i_ - && unsmob_pitch (p)->alteration_i_ - == unsmob_pitch (ly_car (i))->alteration_i_) + if (unsmob_pitch (p)->notename_ + == unsmob_pitch (ly_car (i))->notename_ + && unsmob_pitch (p)->alteration_ + == unsmob_pitch (ly_car (i))->alteration_) { member = ly_car (i); break; @@ -123,10 +123,10 @@ SCM Chord::step_scm (SCM tonic, SCM p) { /* De Pitch intervaas is nog beetje sleutelgat? */ - int i = unsmob_pitch (p)->notename_i_ - - unsmob_pitch (tonic)->notename_i_ - + (unsmob_pitch (p)->octave_i_ - - unsmob_pitch (tonic)->octave_i_) * 7; + int i = unsmob_pitch (p)->notename_ + - unsmob_pitch (tonic)->notename_ + + (unsmob_pitch (p)->octave_ + - unsmob_pitch (tonic)->octave_) * 7; while (i < 0) i += 7; i++; @@ -165,10 +165,10 @@ Chord::missing_thirds (SCM pitches) SCM p = ly_car (i); int step = gh_scm2int (step_scm (tonic, p)); - if (unsmob_pitch (last)->notename_i_ == unsmob_pitch (p)->notename_i_) + if (unsmob_pitch (last)->notename_ == unsmob_pitch (p)->notename_) { - int third = (unsmob_pitch (last)->notename_i_ - - unsmob_pitch (tonic)-> notename_i_ + 7) % 7; + int third = (unsmob_pitch (last)->notename_ + - unsmob_pitch (tonic)-> notename_ + 7) % 7; last = ly_pitch_transpose (last, scm_vector_ref (thirds, gh_int2scm (third))); } @@ -177,8 +177,8 @@ Chord::missing_thirds (SCM pitches) while (step > gh_scm2int (step_scm (tonic, last))) { missing = gh_cons (last, missing); - int third = (unsmob_pitch (last)->notename_i_ - - unsmob_pitch (tonic)->notename_i_ + 7) % 7; + int third = (unsmob_pitch (last)->notename_ + - unsmob_pitch (tonic)->notename_ + 7) % 7; last = ly_pitch_transpose (last, scm_vector_ref (thirds, gh_int2scm (third))); } @@ -239,9 +239,9 @@ Chord::tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub) This chord modifier stuff should really be fixed Cmaj7 yields C 7/7- */ - if (p->octave_i () == -100) + if (p->get_octave () == -100) { - p->octave_i_ = 0; + p->octave_ = 0; dim_b = true; } } @@ -311,7 +311,7 @@ Chord::tonic_add_sub_to_pitches (SCM tonic, SCM add, SCM sub) for (SCM i = sub; gh_pair_p (i); i = ly_cdr (i)) warning (_f ("invalid subtraction: not part of chord: %s", - unsmob_pitch (ly_car (i))->str ())); + unsmob_pitch (ly_car (i))->string ())); return pitches; } @@ -340,7 +340,7 @@ Chord::get_chord (SCM tonic, SCM add, SCM sub, SCM inversion, SCM bass, SCM dur) } else warning (_f ("invalid inversion pitch: not part of chord: %s", - unsmob_pitch (inversion)->str ())); + unsmob_pitch (inversion)->string ())); } /* Bass is easy, just add if requested */ diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index b45775ff78..b36fc2dc8a 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -34,8 +34,8 @@ protected: virtual void process_music (); virtual void acknowledge_grob (Grob_info); private: - Item * clef_p_; - Item * octavate_p_; + Item * clef_; + Item * octavate_; SCM prev_glyph_; SCM prev_cpos_; @@ -47,9 +47,9 @@ private: Clef_engraver::Clef_engraver () { - clef_p_ = 0; + clef_ = 0; octave_dir_ = CENTER; - octavate_p_ = 0; + octavate_ = 0; /* will trigger a clef at the start since #f != ' () @@ -65,8 +65,8 @@ Clef_engraver::set_glyph () SCM basic = ly_symbol2scm ("Clef"); - daddy_trans_l_->execute_single_pushpop_property (basic, glyph_sym, SCM_UNDEFINED); - daddy_trans_l_->execute_single_pushpop_property (basic, glyph_sym, glyph); + daddy_trans_->execute_single_pushpop_property (basic, glyph_sym, SCM_UNDEFINED); + daddy_trans_->execute_single_pushpop_property (basic, glyph_sym, glyph); } /** @@ -76,10 +76,10 @@ Clef_engraver::set_glyph () void Clef_engraver::acknowledge_grob (Grob_info info) { - Item * item =dynamic_cast (info.grob_l_); + Item * item =dynamic_cast (info.grob_); if (item) { - if (Bar_line::has_interface (info.grob_l_) + if (Bar_line::has_interface (info.grob_) && gh_string_p (get_property ("clefGlyph"))) create_clef (); @@ -89,31 +89,31 @@ Clef_engraver::acknowledge_grob (Grob_info info) void Clef_engraver::create_clef () { - if (!clef_p_) + if (!clef_) { Item *c= new Item (get_property ("Clef")); announce_grob(c, SCM_EOL); - clef_p_ = c; + clef_ = c; } SCM cpos = get_property ("clefPosition"); if (gh_number_p (cpos)) - Staff_symbol_referencer::set_position (clef_p_, gh_scm2int (cpos)); + Staff_symbol_referencer::set_position (clef_, gh_scm2int (cpos)); SCM oct = get_property ("clefOctavation"); if (gh_number_p (oct) && gh_scm2int (oct)) { Item * g = new Item (get_property ("OctavateEight")); - Side_position_interface::add_support (g,clef_p_); + Side_position_interface::add_support (g,clef_); - g->set_parent (clef_p_, Y_AXIS); - g->set_parent (clef_p_, X_AXIS); + g->set_parent (clef_, Y_AXIS); + g->set_parent (clef_, X_AXIS); g->set_grob_property ("direction", gh_int2scm (sign (gh_scm2int (oct)))); - octavate_p_ = g; - announce_grob(octavate_p_, SCM_EOL); + octavate_ = g; + announce_grob(octavate_, SCM_EOL); } } @@ -141,7 +141,7 @@ Clef_engraver::inspect_clef_properties () set_glyph (); create_clef (); - clef_p_->set_grob_property ("non-default", SCM_BOOL_T); + clef_->set_grob_property ("non-default", SCM_BOOL_T); prev_cpos_ = clefpos; prev_glyph_ = glyph; @@ -150,7 +150,7 @@ Clef_engraver::inspect_clef_properties () if (to_boolean (force_clef)) { - Translator_group * w = daddy_trans_l_->where_defined (ly_symbol2scm ("forceClef")); + Translator_group * w = daddy_trans_->where_defined (ly_symbol2scm ("forceClef")); w->set_property ("forceClef", SCM_EOL); } } @@ -159,34 +159,34 @@ Clef_engraver::inspect_clef_properties () void Clef_engraver::stop_translation_timestep () { - if (clef_p_) + if (clef_) { SCM vis = 0; - if (to_boolean (clef_p_->get_grob_property ("non-default"))) + if (to_boolean (clef_->get_grob_property ("non-default"))) { vis = get_property ("explicitClefVisibility"); } if (vis) { - clef_p_->set_grob_property ("break-visibility", vis); - if (octavate_p_) + clef_->set_grob_property ("break-visibility", vis); + if (octavate_) { - octavate_p_->set_grob_property ("break-visibility", vis); + octavate_->set_grob_property ("break-visibility", vis); } } - typeset_grob (clef_p_); - clef_p_ =0; + typeset_grob (clef_); + clef_ =0; - if (octavate_p_) + if (octavate_) { - Side_position_interface::add_staff_support (octavate_p_); - typeset_grob (octavate_p_); + Side_position_interface::add_staff_support (octavate_); + typeset_grob (octavate_); } - octavate_p_ = 0; + octavate_ = 0; } } diff --git a/lily/clef.cc b/lily/clef.cc index bac75e343f..96ffec7e96 100644 --- a/lily/clef.cc +++ b/lily/clef.cc @@ -32,7 +32,7 @@ Clef::before_line_breaking (SCM smob) && !to_boolean (s->get_grob_property ("full-size-change"))) { str += "_change"; - s->set_grob_property ("glyph-name", ly_str02scm (str.ch_C ())); + s->set_grob_property ("glyph-name", ly_str02scm (str.to_str0 ())); } } else diff --git a/lily/collision-engraver.cc b/lily/collision-engraver.cc index 0841c72fb5..f6bbb7e1a7 100644 --- a/lily/collision-engraver.cc +++ b/lily/collision-engraver.cc @@ -16,8 +16,8 @@ collect Note_column, and as soon as there are 2 or more, put them in a collision object. */ class Collision_engraver : public Engraver { - Item * col_p_; - Link_array note_column_l_arr_; + Item * col_; + Link_array note_columns_; protected: virtual void acknowledge_grob (Grob_info); @@ -31,45 +31,45 @@ public: void Collision_engraver::process_acknowledged_grobs () { - if (col_p_ || note_column_l_arr_.size () < 2) + if (col_ || note_columns_.size () < 2) return ; - if (!col_p_) + if (!col_) { - col_p_ = new Item (get_property ("NoteCollision")); - announce_grob (col_p_, SCM_EOL); + col_ = new Item (get_property ("NoteCollision")); + announce_grob (col_, SCM_EOL); } - for (int i=0; i< note_column_l_arr_.size (); i++) - Note_collision_interface::add_column (col_p_,note_column_l_arr_[i]); + for (int i=0; i< note_columns_.size (); i++) + Note_collision_interface::add_column (col_,note_columns_[i]); } void Collision_engraver::acknowledge_grob (Grob_info i) { - if (Note_column::has_interface (i.grob_l_)) + if (Note_column::has_interface (i.grob_)) { /*should check Y axis? */ - if (Note_column::rest_b (i.grob_l_) || i.grob_l_->get_parent (X_AXIS)) + if (Note_column::rest_b (i.grob_) || i.grob_->get_parent (X_AXIS)) return ; - note_column_l_arr_.push (i.grob_l_); + note_columns_.push (i.grob_); } } void Collision_engraver::stop_translation_timestep () { - if (col_p_) + if (col_) { - typeset_grob (col_p_); - col_p_ =0; + typeset_grob (col_); + col_ =0; } - note_column_l_arr_.clear (); + note_columns_.clear (); } Collision_engraver::Collision_engraver () { - col_p_ =0; + col_ =0; } diff --git a/lily/column-x-positions.cc b/lily/column-x-positions.cc index 0958c2e431..7863ac0463 100644 --- a/lily/column-x-positions.cc +++ b/lily/column-x-positions.cc @@ -13,7 +13,7 @@ Column_x_positions::Column_x_positions () { satisfies_constraints_b_ = false; - force_f_ = 0; + force_ = 0; } diff --git a/lily/command-request.cc b/lily/command-request.cc index 55cc30cd1f..9bcd708a06 100644 --- a/lily/command-request.cc +++ b/lily/command-request.cc @@ -32,10 +32,10 @@ Key_change_req::transpose (Pitch p) orig.transpose (p); - SCM key = gh_cons (gh_int2scm (orig.octave_i ()), - gh_int2scm (orig.notename_i_)); + SCM key = gh_cons (gh_int2scm (orig.get_octave ()), + gh_int2scm (orig.notename_)); - newlist = gh_cons (gh_cons (key, gh_int2scm (orig.alteration_i_)), + newlist = gh_cons (gh_cons (key, gh_int2scm (orig.alteration_)), newlist); } else if (gh_number_p (key)) @@ -43,8 +43,8 @@ Key_change_req::transpose (Pitch p) Pitch orig (0, gh_scm2int (key), gh_scm2int (alter)); orig.transpose (p); - key =gh_int2scm (orig.notename_i_); - alter = gh_int2scm (orig.alteration_i_); + key =gh_int2scm (orig.notename_); + alter = gh_int2scm (orig.alteration_); newlist = gh_cons (gh_cons (key, alter), newlist); } } diff --git a/lily/completion-note-heads-engraver.cc b/lily/completion-note-heads-engraver.cc index ffb9724127..14d4d405c2 100644 --- a/lily/completion-note-heads-engraver.cc +++ b/lily/completion-note-heads-engraver.cc @@ -34,10 +34,10 @@ class Completion_heads_engraver : public Engraver { - Link_array note_p_arr_; + Link_array notes_; - Link_array dot_p_arr_; - Link_array note_req_l_arr_; + Link_array dots_; + Link_array note_reqs_; Link_array scratch_note_reqs_; Moment note_end_mom_; @@ -53,7 +53,7 @@ public: protected: virtual void initialize (); virtual void start_translation_timestep (); - virtual bool try_music (Music *req_l) ; + virtual bool try_music (Music *req) ; virtual void process_music (); virtual void stop_translation_timestep (); }; @@ -69,7 +69,7 @@ Completion_heads_engraver::try_music (Music *m) { if (Note_req * n =dynamic_cast (m)) { - note_req_l_arr_.push (n); + note_reqs_.push (n); first_b_ = true; Moment musiclen = m->length_mom (); @@ -85,7 +85,7 @@ Completion_heads_engraver::try_music (Music *m) } else if (dynamic_cast (m)) { - return note_req_l_arr_.size (); + return note_reqs_.size (); } return false; @@ -157,7 +157,7 @@ Completion_heads_engraver::process_music () } else { - orig = unsmob_duration (note_req_l_arr_[0]->get_mus_property ("duration")); + orig = unsmob_duration (note_reqs_[0]->get_mus_property ("duration")); note_dur = *orig; } @@ -179,36 +179,36 @@ Completion_heads_engraver::process_music () if (orig && note_dur.length_mom() != orig->length_mom()) { if (!scratch_note_reqs_.size ()) - for (int i = 0; i < note_req_l_arr_.size (); i++) + for (int i = 0; i < note_reqs_.size (); i++) { - Music * m = note_req_l_arr_[i]->clone (); + Music * m = note_reqs_[i]->clone (); scratch_note_reqs_.push (m); } } for (int i = 0; - left_to_do_ && i < note_req_l_arr_.size (); i++) + left_to_do_ && i < note_reqs_.size (); i++) { - Item *note_p = new Item (get_property ("NoteHead")); + Item *note = new Item (get_property ("NoteHead")); - Music * req = note_req_l_arr_[i]; + Music * req = note_reqs_[i]; if (scratch_note_reqs_.size()) { req = scratch_note_reqs_[i]; - SCM pits = note_req_l_arr_[i]->get_mus_property ("pitch"); + SCM pits = note_reqs_[i]->get_mus_property ("pitch"); req->set_mus_property ("pitch",pits); } req->set_mus_property ("duration", note_dur.smobbed_copy ()); - note_p->set_grob_property ("duration-log", + note->set_grob_property ("duration-log", gh_int2scm (note_dur.duration_log ())); int dots= note_dur.dot_count (); if (dots) { Item * d = new Item (get_property ("Dots")); - Rhythmic_head::set_dots (note_p, d); + Rhythmic_head::set_dots (note, d); /* measly attempt to save an eeny-weenie bit of memory. @@ -216,9 +216,9 @@ Completion_heads_engraver::process_music () if (dots != gh_scm2int (d->get_grob_property ("dot-count"))) d->set_grob_property ("dot-count", gh_int2scm (dots)); - d->set_parent (note_p, Y_AXIS); + d->set_parent (note, Y_AXIS); announce_grob (d, SCM_EOL); - dot_p_arr_.push (d); + dots_.push (d); } Pitch *pit =unsmob_pitch (req->get_mus_property ("pitch")); @@ -228,9 +228,9 @@ Completion_heads_engraver::process_music () if (gh_number_p (c0)) pos += gh_scm2int (c0); - note_p->set_grob_property ("staff-position", gh_int2scm (pos)); - announce_grob (note_p,req->self_scm ()); - note_p_arr_.push (note_p); + note->set_grob_property ("staff-position", gh_int2scm (pos)); + announce_grob (note,req->self_scm ()); + notes_.push (note); } left_to_do_ -= note_dur.length_mom (); @@ -250,17 +250,17 @@ Completion_heads_engraver::process_music () void Completion_heads_engraver::stop_translation_timestep () { - for (int i=0; i < note_p_arr_.size (); i++) + for (int i=0; i < notes_.size (); i++) { - typeset_grob (note_p_arr_[i]); + typeset_grob (notes_[i]); } - note_p_arr_.clear (); + notes_.clear (); - for (int i=0; i < dot_p_arr_.size (); i++) + for (int i=0; i < dots_.size (); i++) { - typeset_grob (dot_p_arr_[i]); + typeset_grob (dots_[i]); } - dot_p_arr_.clear (); + dots_.clear (); for (int i = scratch_note_reqs_.size(); i--;) { @@ -278,7 +278,7 @@ Completion_heads_engraver::start_translation_timestep () Moment now = now_mom (); if (note_end_mom_.main_part_ <= now.main_part_) { - note_req_l_arr_.clear (); + note_reqs_.clear (); } if (left_to_do_) @@ -286,7 +286,7 @@ Completion_heads_engraver::start_translation_timestep () if (!tie_req) tie_req = new Tie_req; - bool succ = daddy_trans_l_->try_music (tie_req); + bool succ = daddy_trans_->try_music (tie_req); if (!succ) { programming_error ("Completion_heads_engraver: no-one to make tie."); diff --git a/lily/custos-engraver.cc b/lily/custos-engraver.cc index 4e9d281743..b16c637029 100644 --- a/lily/custos-engraver.cc +++ b/lily/custos-engraver.cc @@ -34,7 +34,7 @@ TRANSLATOR_DECLARATIONS( Custos_engraver); private: Item * create_custos (); bool custos_permitted; - Link_array custos_arr_; + Link_array custodes_; Array pitches_; }; @@ -55,11 +55,11 @@ Custos_engraver::stop_translation_timestep () void Custos_engraver::start_translation_timestep () { - for (int i = custos_arr_.size (); i--;) + for (int i = custodes_.size (); i--;) { - typeset_grob (custos_arr_[i]); + typeset_grob (custodes_[i]); } - custos_arr_.clear (); + custodes_.clear (); pitches_.clear (); custos_permitted = false; @@ -69,12 +69,12 @@ Custos_engraver::start_translation_timestep () void Custos_engraver::acknowledge_grob (Grob_info info) { - Item *item = dynamic_cast (info.grob_l_); + Item *item = dynamic_cast (info.grob_); if (item) { - if (Bar_line::has_interface (info.grob_l_)) + if (Bar_line::has_interface (info.grob_)) custos_permitted = true; - else if (Note_head::has_interface (info.grob_l_)) + else if (Note_head::has_interface (info.grob_)) { /* @@ -126,7 +126,7 @@ Custos_engraver::create_custos () Item* custos = new Item (basicProperties); announce_grob(custos, SCM_EOL); - custos_arr_.push (custos); + custodes_.push (custos); return custos; } @@ -134,12 +134,12 @@ Custos_engraver::create_custos () void Custos_engraver::finalize () { - for (int i = custos_arr_.size (); i--;) + for (int i = custodes_.size (); i--;) { - custos_arr_[i]->suicide (); - typeset_grob (custos_arr_[i]); + custodes_[i]->suicide (); + typeset_grob (custodes_[i]); } - custos_arr_.clear (); + custodes_.clear (); } diff --git a/lily/custos.cc b/lily/custos.cc index 0a196792de..b69617f8f1 100644 --- a/lily/custos.cc +++ b/lily/custos.cc @@ -61,7 +61,7 @@ Custos::brew_molecule (SCM smob) Direction neutral_direction = to_dir (me->get_grob_property ("neutral-direction")); - int pos = (int)rint (Staff_symbol_referencer::position_f (me)); + int pos = (int)rint (Staff_symbol_referencer::get_position (me)); int sz = Staff_symbol_referencer::line_count (me)-1; if (pos < neutral_pos) @@ -89,13 +89,13 @@ Custos::brew_molecule (SCM smob) if (molecule.empty_b ()) { String message = "no such custos: `" + idx + "'"; - warning (_ (message.ch_C ())); + warning (_ (message.to_str0 ())); return SCM_EOL; } else { // add ledger lines - int pos = (int)rint (Staff_symbol_referencer::position_f (me)); + int pos = (int)rint (Staff_symbol_referencer::get_position (me)); int interspaces = Staff_symbol_referencer::line_count (me)-1; if (abs (pos) - interspaces > 1) { diff --git a/lily/cxx-function-smob.cc b/lily/cxx-function-smob.cc index 6ad764d796..4bdd4df701 100644 --- a/lily/cxx-function-smob.cc +++ b/lily/cxx-function-smob.cc @@ -31,7 +31,7 @@ free_smob (SCM) return 0; } -LY_DEFINE(cxx_function_type_p, "c++-function?", 1, 0, 0, (SCM x), +LY_DEFINE(cxx_function_type, "c++-function?", 1, 0, 0, (SCM x), "Is this an encapsulated C++ function ?") { return (SCM_CELL_TYPE (x)) == callback_tag ? SCM_BOOL_T : SCM_BOOL_F; diff --git a/lily/dimension-cache.cc b/lily/dimension-cache.cc index f3d0226bb4..9c7fae5d74 100644 --- a/lily/dimension-cache.cc +++ b/lily/dimension-cache.cc @@ -20,7 +20,7 @@ Dimension_cache::Dimension_cache (Dimension_cache const &d) offset_ = d.offset_; offset_callbacks_ = d.offset_callbacks_; offsets_left_ = d.offsets_left_; - parent_l_ = d.parent_l_; + parent_ = d.parent_; } Dimension_cache::Dimension_cache () @@ -37,7 +37,7 @@ Dimension_cache::init () offset_callbacks_ = SCM_EOL; offset_ =0.0; - parent_l_ =0; + parent_ =0; } diff --git a/lily/dimensions.cc b/lily/dimensions.cc index ba33ccdff3..20d9b8e32e 100644 --- a/lily/dimensions.cc +++ b/lily/dimensions.cc @@ -7,8 +7,8 @@ String print_dimen (Real r) { - String s = to_str (r, "%.3f"); - if (s.index_i ("NaN") != -1) + String s = to_string (r, "%.3f"); + if (s.index ("NaN") != -1) { warning (_ ("NaN")); s = "0.0"; diff --git a/lily/dot-column-engraver.cc b/lily/dot-column-engraver.cc index 22609e6e66..10fd4a5448 100644 --- a/lily/dot-column-engraver.cc +++ b/lily/dot-column-engraver.cc @@ -18,7 +18,7 @@ class Dot_column_engraver : public Engraver { Grob *dotcol_ ; Grob * stem_; - Link_array head_l_arr_; + Link_array heads_; public: TRANSLATOR_DECLARATIONS( Dot_column_engraver ); @@ -52,14 +52,14 @@ Dot_column_engraver::stop_translation_timestep () typeset_grob (dotcol_); dotcol_ =0; } - head_l_arr_.clear (); + heads_.clear (); stem_ =0; } void Dot_column_engraver::acknowledge_grob (Grob_info info) { - Grob *d = unsmob_grob (info.grob_l_->get_grob_property ("dot")); + Grob *d = unsmob_grob (info.grob_->get_grob_property ("dot")); if (d) { if (!dotcol_) @@ -68,11 +68,11 @@ Dot_column_engraver::acknowledge_grob (Grob_info info) announce_grob(dotcol_, SCM_EOL); } - Dot_column::add_head (dotcol_, info.grob_l_); + Dot_column::add_head (dotcol_, info.grob_); } - else if (Stem::has_interface (info.grob_l_)) + else if (Stem::has_interface (info.grob_)) { - stem_ = info.grob_l_; + stem_ = info.grob_; } } diff --git a/lily/dot-column.cc b/lily/dot-column.cc index 46b963e6d0..3b33e6e198 100644 --- a/lily/dot-column.cc +++ b/lily/dot-column.cc @@ -43,7 +43,7 @@ Dot_column::side_position (SCM element_smob, SCM axis) Grob * stem = unsmob_grob (me->get_grob_property ("stem")); if (stem - && !Stem::beam_l (stem) + && !Stem::get_beam (stem) && Stem::duration_log (stem) > 2 && !Stem::invisible_b (stem) ) @@ -95,7 +95,7 @@ Dot_column::do_shifts (SCM l) int conflicts = 0; for (int i=0; i < dots.size (); i++) { - Real p = Staff_symbol_referencer::position_f (dots[i]); + Real p = Staff_symbol_referencer::get_position (dots[i]); for (int j=0; j < taken_posns.size (); j++) { if (taken_posns[j] == (int) p) diff --git a/lily/duration.cc b/lily/duration.cc index 43dea75b30..bda828854a 100644 --- a/lily/duration.cc +++ b/lily/duration.cc @@ -27,15 +27,15 @@ Duration::compare (Duration const &left, Duration const &right) Duration::Duration () { - durlog_i_ = 0; - dots_i_ = 0; + durlog_ = 0; + dots_ = 0; factor_ = Rational (1,1); } Duration::Duration (int l, int d) { - durlog_i_ = l; - dots_i_ = d; + durlog_ = l; + dots_ = d; factor_ = Rational (1,1); } @@ -50,14 +50,14 @@ Duration::compressed (Rational m) const Rational Duration::length_mom () const { - Rational mom (1 << abs (durlog_i_)); + Rational mom (1 << abs (durlog_)); - if (durlog_i_> 0) + if (durlog_> 0) mom = Rational (1)/mom; Rational delta = mom; - for (int d = dots_i_; d; d--) + for (int d = dots_; d; d--) { delta /= Rational (2); mom += delta; @@ -69,19 +69,19 @@ Duration::length_mom () const String -Duration::str () const +Duration::string () const { String s; - if (durlog_i_ < 0 ) - s = "log = " + to_str (durlog_i_); + if (durlog_ < 0 ) + s = "log = " + to_string (durlog_); else - s = to_str (1 << durlog_i_); + s = to_string (1 << durlog_); - s += to_str ('.', dots_i_); + s += to_string ('.', dots_); if (factor_ != Moment (Rational (1,1))) { - s += "*" + factor_.str (); + s += "*" + factor_.string (); } return s; } @@ -102,7 +102,7 @@ Duration::print_smob (SCM s, SCM port, scm_print_state *) Duration *r = (Duration *) ly_cdr (s); scm_puts ("#str ().ch_C ()), port); + scm_display (ly_str02scm (r->string ().to_str0 ()), port); scm_puts (" >", port); return 1; @@ -114,8 +114,8 @@ Duration::equal_p (SCM a , SCM b) Duration *p = (Duration *) ly_cdr (a); Duration *q = (Duration *) ly_cdr (b); - bool eq = p->dots_i_ == q->dots_i_ - && p->durlog_i_ == q->durlog_i_ + bool eq = p->dots_ == q->dots_ + && p->durlog_ == q->durlog_ && p->factor_ == q->factor_; return eq ? SCM_BOOL_T : SCM_BOOL_F; @@ -151,20 +151,20 @@ dots. ") { - SCM_ASSERT_TYPE(gh_number_p(length), length, SCM_ARG1, __FUNCTION__, "integer"); - SCM_ASSERT_TYPE(gh_number_p(dotcount), dotcount, SCM_ARG2, __FUNCTION__, "integer"); + SCM_ASSERT_TYPE(gh_number_p (length), length, SCM_ARG1, __FUNCTION__, "integer"); + SCM_ASSERT_TYPE(gh_number_p (dotcount), dotcount, SCM_ARG2, __FUNCTION__, "integer"); bool compress = false; if (num != SCM_UNDEFINED) { - SCM_ASSERT_TYPE(gh_number_p(num), length, SCM_ARG3, __FUNCTION__, "integer"); + SCM_ASSERT_TYPE(gh_number_p (num), length, SCM_ARG3, __FUNCTION__, "integer"); compress = true; } else num = gh_int2scm (1); if (den != SCM_UNDEFINED) - SCM_ASSERT_TYPE(gh_number_p(den), length, SCM_ARG4, __FUNCTION__, "integer"); + SCM_ASSERT_TYPE(gh_number_p (den), length, SCM_ARG4, __FUNCTION__, "integer"); else den = gh_int2scm (1); @@ -236,12 +236,12 @@ Duration::smobbed_copy ()const int Duration::duration_log () const { - return durlog_i_; + return durlog_; } int Duration::dot_count () const { - return dots_i_; + return dots_; } diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 0def592438..194a86b2b0 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -39,11 +39,11 @@ */ class Dynamic_engraver : public Engraver { - Item * script_p_; - Spanner * finished_cresc_p_; - Spanner * cresc_p_; + Item * script_; + Spanner * finished_cresc_; + Spanner * cresc_; - Text_script_req* script_req_l_; + Text_script_req* script_req_; Span_req * current_cresc_req_; Drul_array accepted_spanreqs_drul_; @@ -51,8 +51,8 @@ class Dynamic_engraver : public Engraver Spanner* line_spanner_; Spanner* finished_line_spanner_; - Link_array pending_column_arr_; - Link_array pending_element_arr_; + Link_array pending_columns_; + Link_array pending_elements_; void typeset_all (); @@ -61,7 +61,7 @@ TRANSLATOR_DECLARATIONS(Dynamic_engraver ); protected: virtual void finalize (); virtual void acknowledge_grob (Grob_info); - virtual bool try_music (Music *req_l); + virtual bool try_music (Music *req); virtual void stop_translation_timestep (); virtual void process_music (); virtual void start_translation_timestep (); @@ -72,14 +72,14 @@ protected: Dynamic_engraver::Dynamic_engraver () { - script_p_ = 0; - finished_cresc_p_ = 0; + script_ = 0; + finished_cresc_ = 0; line_spanner_ = 0; finished_line_spanner_ = 0; current_cresc_req_ = 0; - cresc_p_ =0; + cresc_ =0; - script_req_l_ = 0; + script_req_ = 0; accepted_spanreqs_drul_[START] = 0; accepted_spanreqs_drul_[STOP] = 0; } @@ -87,7 +87,7 @@ Dynamic_engraver::Dynamic_engraver () void Dynamic_engraver::start_translation_timestep () { - script_req_l_ = 0; + script_req_ = 0; accepted_spanreqs_drul_[START] = 0; accepted_spanreqs_drul_[STOP] = 0; } @@ -98,7 +98,7 @@ Dynamic_engraver::try_music (Music * m) if (dynamic_cast (m) && m->get_mus_property ("text-type") == ly_symbol2scm ("dynamic")) { - script_req_l_ = dynamic_cast (m); + script_req_ = dynamic_cast (m); return true; } else if (Span_req* s = dynamic_cast (m)) @@ -115,9 +115,9 @@ Dynamic_engraver::try_music (Music * m) It will disappear by itself when stop_translation_timestep () finds that there is nothing to support anymore. */ - if (cresc_p_) - cresc_p_->suicide (); - cresc_p_ = 0; + if (cresc_) + cresc_->suicide (); + cresc_ = 0; } else if (t == "crescendo" || t == "decrescendo") @@ -132,15 +132,15 @@ Dynamic_engraver::try_music (Music * m) void Dynamic_engraver::process_music () { - if (accepted_spanreqs_drul_[START] || accepted_spanreqs_drul_[STOP] || script_req_l_) + if (accepted_spanreqs_drul_[START] || accepted_spanreqs_drul_[STOP] || script_req_) { if (!line_spanner_) { line_spanner_ = new Spanner (get_property ("DynamicLineSpanner")); Music * rq = accepted_spanreqs_drul_[START]; - if (script_req_l_) - rq = script_req_l_ ; + if (script_req_) + rq = script_req_ ; announce_grob(line_spanner_, rq ? rq->self_scm(): SCM_EOL); } } @@ -160,18 +160,18 @@ Dynamic_engraver::process_music () maybe we should leave dynamic texts to the text-engraver and simply acknowledge them? */ - if (script_req_l_) + if (script_req_) { - script_p_ = new Item (get_property ("DynamicText")); - script_p_->set_grob_property ("text", - script_req_l_->get_mus_property ("text")); + script_ = new Item (get_property ("DynamicText")); + script_->set_grob_property ("text", + script_req_->get_mus_property ("text")); - if (Direction d = script_req_l_->get_direction ()) + if (Direction d = script_req_->get_direction ()) Directional_element_interface::set (line_spanner_, d); - Axis_group_interface::add_element (line_spanner_, script_p_); + Axis_group_interface::add_element (line_spanner_, script_); - announce_grob(script_p_, script_req_l_->self_scm()); + announce_grob(script_, script_req_->self_scm()); } if (accepted_spanreqs_drul_[STOP]) @@ -181,7 +181,7 @@ Dynamic_engraver::process_music () there are no new dynamics. */ - if (!cresc_p_) + if (!cresc_) { accepted_spanreqs_drul_[STOP]->origin ()->warning (_ ("can't find start of (de)crescendo")); @@ -189,16 +189,16 @@ Dynamic_engraver::process_music () } else { - assert (!finished_cresc_p_ && cresc_p_); + assert (!finished_cresc_ && cresc_); - cresc_p_->set_bound (RIGHT, script_p_ - ? script_p_ + cresc_->set_bound (RIGHT, script_ + ? script_ : unsmob_grob (get_property ("currentMusicalColumn"))); - add_bound_item (line_spanner_, cresc_p_->get_bound (RIGHT)); + add_bound_item (line_spanner_, cresc_->get_bound (RIGHT)); - finished_cresc_p_ = cresc_p_; - cresc_p_ = 0; + finished_cresc_ = cresc_; + cresc_ = 0; current_cresc_req_ = 0; } } @@ -227,11 +227,11 @@ Dynamic_engraver::process_music () /* ugh. Use push/pop? */ - SCM s = get_property ((start_type + "Spanner").ch_C ()); + SCM s = get_property ((start_type + "Spanner").to_str0 ()); if (!gh_symbol_p (s) || s == ly_symbol2scm ("hairpin")) { - cresc_p_ = new Spanner (get_property ("Hairpin")); - cresc_p_->set_grob_property ("grow-direction", + cresc_ = new Spanner (get_property ("Hairpin")); + cresc_->set_grob_property ("grow-direction", gh_int2scm ((start_type == "crescendo") ? BIGGER : SMALLER)); @@ -243,32 +243,32 @@ Dynamic_engraver::process_music () */ else { - cresc_p_ = new Spanner (get_property ("TextSpanner")); - cresc_p_->set_grob_property ("type", s); - daddy_trans_l_->set_property ((start_type - + "Spanner").ch_C(), SCM_UNDEFINED); - s = get_property ((start_type + "Text").ch_C ()); + cresc_ = new Spanner (get_property ("TextSpanner")); + cresc_->set_grob_property ("type", s); + daddy_trans_->set_property ((start_type + + "Spanner").to_str0 (), SCM_UNDEFINED); + s = get_property ((start_type + "Text").to_str0 ()); /* - FIXME: use markup_p () to check type. + FIXME: use get_markup () to check type. */ if (gh_string_p (s) || gh_pair_p (s)) { - cresc_p_->set_grob_property ("edge-text", + cresc_->set_grob_property ("edge-text", gh_cons (s, ly_str02scm (""))); - daddy_trans_l_->set_property ((start_type + "Text").ch_C(), + daddy_trans_->set_property ((start_type + "Text").to_str0 (), SCM_EOL); } } - cresc_p_->set_bound (LEFT, script_p_ - ? script_p_ + cresc_->set_bound (LEFT, script_ + ? script_ : unsmob_grob (get_property ("currentMusicalColumn"))); - Axis_group_interface::add_element (line_spanner_, cresc_p_); + Axis_group_interface::add_element (line_spanner_, cresc_); - add_bound_item (line_spanner_, cresc_p_->get_bound (LEFT)); + add_bound_item (line_spanner_, cresc_->get_bound (LEFT)); - announce_grob(cresc_p_, accepted_spanreqs_drul_[START]->self_scm()); + announce_grob(cresc_, accepted_spanreqs_drul_[START]->self_scm()); } } } @@ -299,14 +299,14 @@ Dynamic_engraver::finalize () typeset_all (); } - if (cresc_p_ - && !cresc_p_->live()) - cresc_p_ = 0; - if (cresc_p_) + if (cresc_ + && !cresc_->live()) + cresc_ = 0; + if (cresc_) { current_cresc_req_->origin ()->warning (_ ("unterminated (de)crescendo")); - cresc_p_->suicide (); - cresc_p_ = 0; + cresc_->suicide (); + cresc_ = 0; } } @@ -319,33 +319,33 @@ Dynamic_engraver::typeset_all () Hmm, how to do this, cleanly? Maybe just check at typeset_grob ()? */ - if (finished_cresc_p_ - && !finished_cresc_p_->live()) - finished_cresc_p_ = 0; + if (finished_cresc_ + && !finished_cresc_->live()) + finished_cresc_ = 0; if (finished_line_spanner_ && !finished_line_spanner_->live()) finished_line_spanner_ = 0; - if (finished_cresc_p_) + if (finished_cresc_) { - if (!finished_cresc_p_->get_bound (RIGHT)) + if (!finished_cresc_->get_bound (RIGHT)) { - finished_cresc_p_->set_bound (RIGHT, script_p_ - ? script_p_ + finished_cresc_->set_bound (RIGHT, script_ + ? script_ : unsmob_grob (get_property ("currentMusicalColumn"))); if (finished_line_spanner_) add_bound_item (finished_line_spanner_, - finished_cresc_p_->get_bound (RIGHT)); + finished_cresc_->get_bound (RIGHT)); } - typeset_grob (finished_cresc_p_); - finished_cresc_p_ =0; + typeset_grob (finished_cresc_); + finished_cresc_ =0; } - if (script_p_) + if (script_) { - typeset_grob (script_p_); - script_p_ = 0; + typeset_grob (script_); + script_ = 0; } if (finished_line_spanner_) { @@ -392,30 +392,30 @@ Dynamic_engraver::acknowledge_grob (Grob_info i) if (!line_spanner_) return ; - if (Note_column::has_interface (i.grob_l_)) + if (Note_column::has_interface (i.grob_)) { if (line_spanner_ /* Don't refill killed spanner */ && line_spanner_->live()) { - Side_position_interface::add_support (line_spanner_,i.grob_l_); - add_bound_item (line_spanner_,dynamic_cast (i.grob_l_)); + Side_position_interface::add_support (line_spanner_,i.grob_); + add_bound_item (line_spanner_,dynamic_cast (i.grob_)); } - if (script_p_ && !script_p_->get_parent (X_AXIS)) + if (script_ && !script_->get_parent (X_AXIS)) { - script_p_->set_parent (i.grob_l_, X_AXIS); + script_->set_parent (i.grob_, X_AXIS); } } - else if (Script_interface::has_interface (i.grob_l_) && script_p_) + else if (Script_interface::has_interface (i.grob_) && script_) { - SCM p = i.grob_l_->get_grob_property ("script-priority"); + SCM p = i.grob_->get_grob_property ("script-priority"); if (gh_number_p (p) - && gh_scm2int (p) < gh_scm2int (script_p_->get_grob_property ("script-priority"))) + && gh_scm2int (p) < gh_scm2int (script_->get_grob_property ("script-priority"))) { - Side_position_interface::add_support (line_spanner_, i.grob_l_); + Side_position_interface::add_support (line_spanner_, i.grob_); } } diff --git a/lily/dynamic-performer.cc b/lily/dynamic-performer.cc index 86a1b5e0a2..28e3dbf9fe 100644 --- a/lily/dynamic-performer.cc +++ b/lily/dynamic-performer.cc @@ -24,27 +24,27 @@ class Dynamic_performer : public Performer public: TRANSLATOR_DECLARATIONS(Dynamic_performer); protected: - virtual bool try_music (Music* req_l); + virtual bool try_music (Music* req); virtual void stop_translation_timestep (); virtual void create_audio_elements (); private: - Music* script_req_l_; - Audio_dynamic* audio_p_; + Music* script_req_; + Audio_dynamic* audio_; }; Dynamic_performer::Dynamic_performer () { - script_req_l_ = 0; - audio_p_ = 0; + script_req_ = 0; + audio_ = 0; } void Dynamic_performer::create_audio_elements () { - if (script_req_l_) + if (script_req_) { SCM proc = get_property ("dynamicAbsoluteVolumeFunction"); @@ -52,7 +52,7 @@ Dynamic_performer::create_audio_elements () if (gh_procedure_p (proc)) { // urg - svolume = gh_call1 (proc, script_req_l_->get_mus_property ("text")); + svolume = gh_call1 (proc, script_req_->get_mus_property ("text")); } Real volume = 0.5; @@ -102,32 +102,32 @@ Dynamic_performer::create_audio_elements () } } - audio_p_ = new Audio_dynamic (volume); - Audio_element_info info (audio_p_, script_req_l_); + audio_ = new Audio_dynamic (volume); + Audio_element_info info (audio_, script_req_); announce_element (info); - script_req_l_ = 0; + script_req_ = 0; } } void Dynamic_performer::stop_translation_timestep () { - if (audio_p_) + if (audio_) { - play_element (audio_p_); - audio_p_ = 0; + play_element (audio_); + audio_ = 0; } } bool Dynamic_performer::try_music (Music* r) { - if (!script_req_l_) + if (!script_req_) { if (dynamic_cast (r) && r->get_mus_property ("text-type") == ly_symbol2scm ("dynamic")) { - script_req_l_ = r; + script_req_ = r; return true; } } diff --git a/lily/engraver-group-engraver.cc b/lily/engraver-group-engraver.cc index 71dab3bd09..ebf3881147 100644 --- a/lily/engraver-group-engraver.cc +++ b/lily/engraver-group-engraver.cc @@ -16,7 +16,7 @@ void Engraver_group_engraver::announce_grob (Grob_info info) { - announce_info_arr_.push (info); + announce_infos_.push (info); Engraver::announce_grob (info); } @@ -68,7 +68,7 @@ SCM find_acknowledge_engravers (SCM gravlist, SCM meta); void Engraver_group_engraver::acknowledge_grobs () { - if (!announce_info_arr_.size ()) + if (!announce_infos_.size ()) return ; SCM tab = get_property ("acknowledgeHashTable"); @@ -76,11 +76,11 @@ Engraver_group_engraver::acknowledge_grobs () SCM meta_sym = ly_symbol2scm ("meta"); - for (int j =0; j < announce_info_arr_.size (); j++) + for (int j =0; j < announce_infos_.size (); j++) { - Grob_info info = announce_info_arr_[j]; + Grob_info info = announce_infos_[j]; - SCM meta = info.grob_l_->internal_get_grob_property (meta_sym); + SCM meta = info.grob_->internal_get_grob_property (meta_sym); SCM nm = scm_assoc (name_sym, meta); if (gh_pair_p (nm)) nm = ly_cdr (nm); @@ -109,7 +109,7 @@ Engraver_group_engraver::acknowledge_grobs () { Translator * t = unsmob_translator (ly_car (p)); Engraver * eng = dynamic_cast (t); - if (eng && eng!= info.origin_trans_l_) + if (eng && eng!= info.origin_trans_) eng->acknowledge_grob (info); } } @@ -129,10 +129,10 @@ Engraver_group_engraver::do_announces () do { acknowledge_grobs (); - announce_info_arr_.clear (); + announce_infos_.clear (); process_acknowledged_grobs_in_simple_children (); } - while (announce_info_arr_.size ()); + while (announce_infos_.size ()); } diff --git a/lily/engraver.cc b/lily/engraver.cc index 449ebd0ce0..02bf0e1074 100644 --- a/lily/engraver.cc +++ b/lily/engraver.cc @@ -17,7 +17,7 @@ void Engraver::announce_grob (Grob_info inf) { - daddy_grav_l ()->announce_grob (inf); + get_daddy_grav ()->announce_grob (inf); } void @@ -32,9 +32,9 @@ Engraver::announce_grob (Grob* e, SCM cause) e->set_grob_property ("cause", cause); Grob_info i (e); - if (!i.origin_trans_l_) - i.origin_trans_l_ = this; - daddy_grav_l ()->announce_grob (i); + if (!i.origin_trans_) + i.origin_trans_ = this; + get_daddy_grav ()->announce_grob (i); } @@ -42,15 +42,15 @@ Engraver::announce_grob (Grob* e, SCM cause) void Engraver::typeset_grob (Grob*p) { - daddy_grav_l ()->typeset_grob (p); + get_daddy_grav ()->typeset_grob (p); } Engraver_group_engraver* -Engraver::daddy_grav_l () const +Engraver::get_daddy_grav () const { - return (daddy_trans_l_) - ? dynamic_cast (daddy_trans_l_) + return (daddy_trans_) + ? dynamic_cast (daddy_trans_) : 0; } @@ -74,8 +74,8 @@ Engraver::top_engraver () const if (dynamic_cast((Engraver*)this)) return dynamic_cast ((Engraver*)this); - if (daddy_trans_l_) - return dynamic_cast (daddy_trans_l_)->top_engraver (); + if (daddy_trans_) + return dynamic_cast (daddy_trans_)->top_engraver (); programming_error ("No score engraver!"); return 0; diff --git a/lily/extender-engraver.cc b/lily/extender-engraver.cc index a6bcd2593e..914eefbe63 100644 --- a/lily/extender-engraver.cc +++ b/lily/extender-engraver.cc @@ -28,10 +28,10 @@ then. */ class Extender_engraver : public Engraver { - Grob *last_lyric_l_; - Grob *current_lyric_l_; - Extender_req* req_l_; - Spanner* extender_p_; + Grob *last_lyric_; + Grob *current_lyric_; + Extender_req* req_; + Spanner* extender_; public: TRANSLATOR_DECLARATIONS(Extender_engraver); @@ -51,24 +51,24 @@ private: Extender_engraver::Extender_engraver () { - current_lyric_l_ = 0; - last_lyric_l_ = 0; - extender_p_ = 0; - req_l_ = 0; + current_lyric_ = 0; + last_lyric_ = 0; + extender_ = 0; + req_ = 0; } void Extender_engraver::acknowledge_grob (Grob_info i) { // -> text_item - if (i.grob_l_->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface"))) + if (i.grob_->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface"))) { - current_lyric_l_ = i.grob_l_; - if (extender_p_ - && !extender_p_->get_bound (RIGHT) + current_lyric_ = i.grob_; + if (extender_ + && !extender_->get_bound (RIGHT) ) { - Lyric_extender::set_textitem (extender_p_, RIGHT, dynamic_cast (i.grob_l_)); + Lyric_extender::set_textitem (extender_, RIGHT, dynamic_cast (i.grob_)); } } } @@ -79,10 +79,10 @@ Extender_engraver::try_music (Music* r) { if (Extender_req* p = dynamic_cast (r)) { - if (req_l_) + if (req_) return false; - req_l_ = p; + req_ = p; return true; } return false; @@ -91,29 +91,29 @@ Extender_engraver::try_music (Music* r) void Extender_engraver::finalize () { - if (extender_p_) + if (extender_) { - req_l_->origin ()->warning (_ ("unterminated extender")); - extender_p_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn"))); + req_->origin ()->warning (_ ("unterminated extender")); + extender_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn"))); } } void Extender_engraver::process_music () { - if (req_l_ && ! extender_p_) + if (req_ && ! extender_) { - if (!last_lyric_l_) + if (!last_lyric_) { - req_l_->origin ()->warning (_ ("Nothing to connect extender to on the left. Ignoring extender request.")); + req_->origin ()->warning (_ ("Nothing to connect extender to on the left. Ignoring extender request.")); return; } - extender_p_ = new Spanner (get_property ("LyricExtender")); + extender_ = new Spanner (get_property ("LyricExtender")); - Lyric_extender::set_textitem (extender_p_, LEFT, last_lyric_l_); - announce_grob(extender_p_, req_l_->self_scm()); + Lyric_extender::set_textitem (extender_, LEFT, last_lyric_); + announce_grob(extender_, req_->self_scm()); } } @@ -121,23 +121,23 @@ Extender_engraver::process_music () void Extender_engraver::stop_translation_timestep () { - if (extender_p_) + if (extender_) { - typeset_grob (extender_p_); - extender_p_ = 0; + typeset_grob (extender_); + extender_ = 0; } - if (current_lyric_l_) + if (current_lyric_) { - last_lyric_l_ = current_lyric_l_; - current_lyric_l_ =0; + last_lyric_ = current_lyric_; + current_lyric_ =0; } } void Extender_engraver::start_translation_timestep () { - req_l_ = 0; + req_ = 0; } diff --git a/lily/fingering-engraver.cc b/lily/fingering-engraver.cc index e5df1718f5..120b580e28 100644 --- a/lily/fingering-engraver.cc +++ b/lily/fingering-engraver.cc @@ -54,21 +54,21 @@ void Fingering_engraver::acknowledge_grob (Grob_info inf) { - if (Stem::has_interface (inf.grob_l_)) + if (Stem::has_interface (inf.grob_)) { for (int i=0; i < fingerings_.size (); i++) { - Side_position_interface::add_support (fingerings_[i],inf.grob_l_); + Side_position_interface::add_support (fingerings_[i],inf.grob_); } } - else if (Rhythmic_head::has_interface (inf.grob_l_)) + else if (Rhythmic_head::has_interface (inf.grob_)) { Music * mc =inf.music_cause (); Pitch * mp = mc? unsmob_pitch (mc->get_mus_property ("pitch")) :0; for (int i=0; i < fingerings_.size (); i++) { Grob*t = fingerings_[i]; - Side_position_interface::add_support (t,inf.grob_l_); + Side_position_interface::add_support (t,inf.grob_); Pitch *fp = unsmob_pitch (t->get_grob_property ("pitch")); if (fp) { @@ -78,13 +78,13 @@ Fingering_engraver::acknowledge_grob (Grob_info inf) if (*fp == *mp) { Axis other = other_axis (Side_position_interface::get_axis (t)); - t->set_parent (inf.grob_l_, other); + t->set_parent (inf.grob_, other); } } else { if (!t->get_parent (X_AXIS)) - t->set_parent (inf.grob_l_, X_AXIS); + t->set_parent (inf.grob_, X_AXIS); } } } diff --git a/lily/folded-repeat-iterator.cc b/lily/folded-repeat-iterator.cc index 2fff7f1127..016db26f40 100644 --- a/lily/folded-repeat-iterator.cc +++ b/lily/folded-repeat-iterator.cc @@ -21,47 +21,47 @@ Folded_repeat_iterator::Folded_repeat_iterator () { - main_iter_p_ = 0; - alternative_iter_p_ = 0; + main_iter_ = 0; + alternative_iter_ = 0; } bool Folded_repeat_iterator::ok () const { - return main_iter_p_ || alternative_iter_p_; + return main_iter_ || alternative_iter_; } Folded_repeat_iterator::~Folded_repeat_iterator () { - delete main_iter_p_; - delete alternative_iter_p_; + delete main_iter_; + delete alternative_iter_; } Folded_repeat_iterator::Folded_repeat_iterator (Folded_repeat_iterator const &src) : Music_iterator (src) { - main_iter_p_ = src.main_iter_p_ ? src.main_iter_p_->clone () : 0; - alternative_iter_p_ = src.alternative_iter_p_ ? src.alternative_iter_p_->clone () : 0; + main_iter_ = src.main_iter_ ? src.main_iter_->clone () : 0; + alternative_iter_ = src.alternative_iter_ ? src.alternative_iter_->clone () : 0; main_length_mom_ = src.main_length_mom_; } Moment Folded_repeat_iterator::pending_moment () const { - if (main_iter_p_) + if (main_iter_) { - return main_iter_p_->pending_moment (); + return main_iter_->pending_moment (); } else - return main_length_mom_ + alternative_iter_p_->pending_moment (); + return main_length_mom_ + alternative_iter_->pending_moment (); } void Folded_repeat_iterator::construct_children () { - Repeated_music * mus = dynamic_cast (music_l ()); - main_iter_p_ = get_iterator_p (mus->body ()); - if (!main_iter_p_->ok ()) + Repeated_music * mus = dynamic_cast (get_music ()); + main_iter_ = get_iterator (mus->body ()); + if (!main_iter_->ok ()) { leave_body (); enter_alternative (); @@ -73,30 +73,30 @@ Folded_repeat_iterator::process (Moment m) { if (!m.to_bool () ) { - bool success = try_music (music_l ()); + bool success = try_music (get_music ()); if (!success) - music_l ()->origin ()->warning (_ ("no one to print a repeat brace")); + get_music ()->origin ()->warning (_ ("no one to print a repeat brace")); } - if (main_iter_p_) + if (main_iter_) { - main_iter_p_->process (m); - if (!main_iter_p_->ok ()) + main_iter_->process (m); + if (!main_iter_->ok ()) leave_body (); } - if (!main_iter_p_ && !alternative_iter_p_) + if (!main_iter_ && !alternative_iter_) { enter_alternative (); } - if (alternative_iter_p_) + if (alternative_iter_) { - alternative_iter_p_->process (m - main_length_mom_); - if (!alternative_iter_p_->ok ()) + alternative_iter_->process (m - main_length_mom_); + if (!alternative_iter_->ok ()) { - delete alternative_iter_p_; - alternative_iter_p_ =0; + delete alternative_iter_; + alternative_iter_ =0; } } } @@ -104,24 +104,24 @@ Folded_repeat_iterator::process (Moment m) void Folded_repeat_iterator::leave_body () { - Repeated_music * mus = dynamic_cast (music_l ()); - delete main_iter_p_; - main_iter_p_ = 0; + Repeated_music * mus = dynamic_cast (get_music ()); + delete main_iter_; + main_iter_ = 0; main_length_mom_ += mus->body ()->length_mom (); } void Folded_repeat_iterator::enter_alternative () { - Repeated_music * mus = dynamic_cast (music_l ()); + Repeated_music * mus = dynamic_cast (get_music ()); if (mus->alternatives ()) { Simultaneous_music_iterator * s = new Simultaneous_music_iterator; s->separate_contexts_b_ = true; - s->init_translator (mus, report_to_l ()); + s->init_translator (mus, report_to ()); - alternative_iter_p_ = s; - alternative_iter_p_->construct_children (); + alternative_iter_ = s; + alternative_iter_->construct_children (); } } @@ -129,12 +129,12 @@ Folded_repeat_iterator::enter_alternative () Music_iterator* Folded_repeat_iterator::try_music_in_children (Music * m) const { - if (main_iter_p_) + if (main_iter_) { - return main_iter_p_->try_music (m); + return main_iter_->try_music (m); } - if (alternative_iter_p_) - return alternative_iter_p_->try_music (m); + if (alternative_iter_) + return alternative_iter_->try_music (m); return 0; } diff --git a/lily/font-interface.cc b/lily/font-interface.cc index 28a88c5469..7c1fb26bd8 100644 --- a/lily/font-interface.cc +++ b/lily/font-interface.cc @@ -39,7 +39,7 @@ Font_interface::font_alist_chain (Grob *me) Ugh: why the defaults? */ SCM defaults = ly_cdr (scm_assoc (ly_symbol2scm ("font-defaults"), - me->paper_l ()->style_sheet_)); + me->get_paper ()->style_sheet_)); SCM ch = me->get_property_alist_chain (defaults); @@ -107,7 +107,7 @@ Font_interface::get_font (Grob *me, SCM chain) if (!gh_string_p (name)) { - SCM ss = me->paper_l ()->style_sheet_; + SCM ss = me->get_paper ()->style_sheet_; SCM proc = ly_cdr (scm_assoc (ly_symbol2scm ("properties-to-font"), ss)); @@ -121,7 +121,7 @@ Font_interface::get_font (Grob *me, SCM chain) SCM mag = me->get_grob_property ("font-magnification"); Real rmag = gh_number_p (mag) ? gh_scm2double (mag) : 1.0; - Font_metric *fm = me->paper_l ()->find_font (name, rmag); + Font_metric *fm = me->get_paper ()->find_font (name, rmag); return fm; } @@ -130,7 +130,7 @@ Font_interface::add_style (Grob* me, SCM style, SCM chain) { assert (gh_symbol_p (style)); - SCM sheet = me->paper_l ()->style_sheet_; + SCM sheet = me->get_paper ()->style_sheet_; SCM style_alist = ly_cdr (scm_assoc (ly_symbol2scm ("style-alist"), sheet)); SCM entry = scm_assoc (style, style_alist); @@ -161,7 +161,7 @@ so a 14% speedup. */ -static SCM shape_sym, family_sym, series_sym, rel_sz_sym, design_sz_sym, wild_sym; +static SCM shape_sym, family_sym, series_sym, rel_str0_sym, design_str0_sym, wild_sym; static void @@ -170,8 +170,8 @@ init_syms () shape_sym = scm_permanent_object (ly_symbol2scm ("font-shape")); family_sym = scm_permanent_object (ly_symbol2scm ("font-family")); series_sym = scm_permanent_object (ly_symbol2scm ("font-series")); - rel_sz_sym = scm_permanent_object (ly_symbol2scm ("font-relative-size")); - design_sz_sym = scm_permanent_object (ly_symbol2scm ("font-design-size")); + rel_str0_sym = scm_permanent_object (ly_symbol2scm ("font-relative-size")); + design_str0_sym = scm_permanent_object (ly_symbol2scm ("font-design-size")); wild_sym = scm_permanent_object (ly_symbol2scm ("*")); } @@ -193,8 +193,8 @@ Font_interface::properties_to_font_name (SCM fonts, SCM alist_chain) SCM series = SCM_BOOL_F; - SCM point_sz = ly_assoc_chain (design_sz_sym, alist_chain); - SCM rel_sz = SCM_BOOL_F; + SCM point_str0 = ly_assoc_chain (design_str0_sym, alist_chain); + SCM rel_str0 = SCM_BOOL_F; shape = ly_assoc_chain (shape_sym, alist_chain); family = ly_assoc_chain (family_sym, alist_chain); @@ -208,13 +208,13 @@ Font_interface::properties_to_font_name (SCM fonts, SCM alist_chain) series = ly_cdr (series); - if (gh_pair_p (point_sz)) - point_sz = ly_cdr (point_sz); + if (gh_pair_p (point_str0)) + point_str0 = ly_cdr (point_str0); else { - rel_sz = ly_assoc_chain (rel_sz_sym, alist_chain); - if (gh_pair_p (rel_sz)) - rel_sz = ly_cdr (rel_sz); + rel_str0 = ly_assoc_chain (rel_str0_sym, alist_chain); + if (gh_pair_p (rel_str0)) + rel_str0 = ly_cdr (rel_str0); } for (SCM s = fonts ; gh_pair_p (s); s = ly_cdr (s)) @@ -228,7 +228,7 @@ Font_interface::properties_to_font_name (SCM fonts, SCM alist_chain) if (!wild_compare (scm_list_ref (qlist, gh_int2scm (3)), family)) continue; - if (point_sz == SCM_BOOL_F && !wild_compare (ly_car (qlist), rel_sz)) + if (point_str0 == SCM_BOOL_F && !wild_compare (ly_car (qlist), rel_str0)) continue; SCM qname = ly_cdar (s); @@ -236,7 +236,7 @@ Font_interface::properties_to_font_name (SCM fonts, SCM alist_chain) } warning (_ ("couldn't find any font satisfying ")); - scm_write (scm_list_n (point_sz, shape, series , family, rel_sz, SCM_UNDEFINED), scm_current_error_port ()); + scm_write (scm_list_n (point_str0, shape, series , family, rel_str0, SCM_UNDEFINED), scm_current_error_port ()); scm_flush (scm_current_error_port ()); return ly_str02scm ("cmr10"); diff --git a/lily/font-metric.cc b/lily/font-metric.cc index c2c9999d8f..8fd2a49931 100644 --- a/lily/font-metric.cc +++ b/lily/font-metric.cc @@ -23,14 +23,14 @@ Font_metric::text_dimension (String text) const Interval ydims; Real w=0.0; - for (int i = 0; i < text.length_i (); i++) + for (int i = 0; i < text.length (); i++) { switch (text[i]) { case '\\': // accent marks use width of base letter - if (i +1 < text.length_i ()) + if (i +1 < text.length ()) { if (text[i+1]=='\'' || text[i+1]=='`' || text[i+1]=='"' || text[i+1]=='^') @@ -45,7 +45,7 @@ Font_metric::text_dimension (String text) const } } - for (i++; (i < text.length_i ()) && !isspace (text[i]) + for (i++; (i < text.length ()) && !isspace (text[i]) && text[i]!='{' && text[i]!='}'; i++) ; // ugh. diff --git a/lily/font-size-engraver.cc b/lily/font-size-engraver.cc index 41874eeae3..c72b06a85f 100644 --- a/lily/font-size-engraver.cc +++ b/lily/font-size-engraver.cc @@ -36,9 +36,9 @@ Font_size_engraver::acknowledge_grob (Grob_info gi) if (gh_number_p (sz) && gh_scm2int (sz) - && !gh_number_p (gi.grob_l_->get_grob_property ("font-relative-size"))) + && !gh_number_p (gi.grob_->get_grob_property ("font-relative-size"))) { - gi.grob_l_->set_grob_property ("font-relative-size", sz); + gi.grob_->set_grob_property ("font-relative-size", sz); } } diff --git a/lily/global-ctor.cc b/lily/global-ctor.cc index da204ebd86..a4e585078e 100644 --- a/lily/global-ctor.cc +++ b/lily/global-ctor.cc @@ -9,19 +9,19 @@ #include "global-ctor.hh" #include "array.hh" -static Array *ctor_global_static_arr_p_; +static Array *ctor_global_statics_; void add_constructor (Global_ctor c) { - if (!ctor_global_static_arr_p_) - ctor_global_static_arr_p_ = new Array; - ctor_global_static_arr_p_->push (c); + if (!ctor_global_statics_) + ctor_global_statics_ = new Array; + ctor_global_statics_->push (c); } void call_constructors () { - for (int i=0; i < ctor_global_static_arr_p_->size (); i++) - (ctor_global_static_arr_p_->elem (i)) (); + for (int i=0; i < ctor_global_statics_->size (); i++) + (ctor_global_statics_->elem (i)) (); } diff --git a/lily/global-translator.cc b/lily/global-translator.cc index 0f6d75c117..0c079c40d2 100644 --- a/lily/global-translator.cc +++ b/lily/global-translator.cc @@ -42,7 +42,7 @@ Global_translator::sneaky_insert_extra_moment (Moment w) } int -Global_translator::moments_left_i () const +Global_translator::get_moments_left () const { return extra_mom_pq_.size (); } @@ -63,7 +63,7 @@ Global_translator::now_mom () const Music_output* -Global_translator::get_output_p () +Global_translator::get_output () { return 0; } @@ -88,7 +88,7 @@ Global_translator::run_iterator_on_me (Music_iterator * iter) prev_mom_ = now_mom_ = iter->pending_moment (); bool first = true; - while (iter->ok () || moments_left_i ()) + while (iter->ok () || get_moments_left ()) { Moment w; w.set_infinite (1); @@ -99,7 +99,7 @@ Global_translator::run_iterator_on_me (Music_iterator * iter) w = sneaky_insert_extra_moment (w); - // printf ("proccing %s\n ", w.str().ch_C()); + // printf ("proccing %s\n ", w.string ().to_str0 ()); diff --git a/lily/gourlay-breaking.cc b/lily/gourlay-breaking.cc index 2823649959..c16e044049 100644 --- a/lily/gourlay-breaking.cc +++ b/lily/gourlay-breaking.cc @@ -29,20 +29,20 @@ struct Break_node { considered: this path has infinite energy */ - int prev_break_i_; + int prev_break_; /** Which system number so far? */ - int line_i_; + int line_; - Real demerits_f_; + Real demerits_; Column_x_positions line_config_; Break_node () { - prev_break_i_ = -1; - line_i_ = 0; - demerits_f_ = 0; + prev_break_ = -1; + line_ = 0; + demerits_ = 0; } }; @@ -57,7 +57,7 @@ Gourlay_breaking::do_solve () const { Array optimal_paths; Link_array all = - pscore_l_->system_->column_l_arr (); + pscore_->system_->columns (); Array breaks = find_break_indices (); @@ -78,7 +78,7 @@ Gourlay_breaking::do_solve () const Real minimal_demerits = infinity_f; - bool ragged = to_boolean (pscore_l_->paper_l_->get_scmvar ("raggedright")); + bool ragged = to_boolean (pscore_->paper_->get_scmvar ("raggedright")); for (int start_idx = break_idx; start_idx--;) { @@ -91,13 +91,13 @@ Gourlay_breaking::do_solve () const cp.cols_ = line; Interval line_dims - = pscore_l_->paper_l_->line_dimensions_int (optimal_paths[start_idx].line_i_); + = pscore_->paper_->line_dimensions_int (optimal_paths[start_idx].line_); Simple_spacer * sp = generate_spacing_problem (line, line_dims); sp->solve (&cp, ragged); delete sp; - if (fabs (cp.force_f_) > worst_force) - worst_force = fabs (cp.force_f_); + if (fabs (cp.force_) > worst_force) + worst_force = fabs (cp.force_); /* We remember this solution as a "should always work @@ -107,11 +107,11 @@ Gourlay_breaking::do_solve () const Real this_demerits; - if (optimal_paths[start_idx].demerits_f_ >= infinity_f) + if (optimal_paths[start_idx].demerits_ >= infinity_f) this_demerits = infinity_f; else this_demerits = combine_demerits (optimal_paths[start_idx].line_config_, cp) - + optimal_paths[start_idx].demerits_f_; + + optimal_paths[start_idx].demerits_; if (this_demerits < minimal_demerits) { @@ -132,26 +132,26 @@ Gourlay_breaking::do_solve () const Break_node bnod; if (minimal_start_idx < 0) { - bnod.demerits_f_ = infinity_f; + bnod.demerits_ = infinity_f; bnod.line_config_ = backup_sol; - bnod.prev_break_i_ = break_idx - 1; + bnod.prev_break_ = break_idx - 1; } else { - bnod.prev_break_i_ = minimal_start_idx; - bnod.demerits_f_ = minimal_demerits; + bnod.prev_break_ = minimal_start_idx; + bnod.demerits_ = minimal_demerits; bnod.line_config_ = minimal_sol; } - bnod.line_i_ = optimal_paths[bnod.prev_break_i_].line_i_ + 1; + bnod.line_ = optimal_paths[bnod.prev_break_].line_ + 1; optimal_paths.push (bnod); if (! (break_idx % HAPPY_DOTS_I)) - progress_indication (String ("[") + to_str (break_idx) + "]"); + progress_indication (String ("[") + to_string (break_idx) + "]"); } /* do the last one */ if (breaks.size () % HAPPY_DOTS_I) - progress_indication (String ("[") + to_str (breaks.size()) + "]"); + progress_indication (String ("[") + to_string (breaks.size()) + "]"); progress_indication ("\n"); @@ -163,15 +163,15 @@ Gourlay_breaking::do_solve () const for (int i = optimal_paths.size ()-1; i> 0;) { final_breaks.push (i); - int prev = optimal_paths[i].prev_break_i_; + int prev = optimal_paths[i].prev_break_; assert (i > prev); i = prev; } if (verbose_global_b) - printf ("Optimal demerits: %f\n", optimal_paths.top ().demerits_f_); + printf ("Optimal demerits: %f\n", optimal_paths.top ().demerits_); - if (optimal_paths.top ().demerits_f_ >= infinity_f) + if (optimal_paths.top ().demerits_ >= infinity_f) warning (_ ("No feasible line breaking found")); for (int i= final_breaks.size (); i--;) @@ -205,7 +205,7 @@ Gourlay_breaking::combine_demerits (Column_x_positions const &prev, { Real break_penalties = 0.0; Grob * pc = this_one.cols_.top (); - if (pc->original_l_) + if (pc->original_) { SCM pen = pc->get_grob_property ("penalty"); if (gh_number_p (pen) && fabs (gh_scm2double (pen)) < 10000) @@ -218,10 +218,10 @@ Gourlay_breaking::combine_demerits (Column_x_positions const &prev, /* Q: do want globally non-cramped lines, or locally equally cramped lines. */ - Real demerit = abs (this_one.force_f_) + 0.1 *abs (prev.force_f_ - this_one.force_f_) + Real demerit = abs (this_one.force_) + 0.1 *abs (prev.force_ - this_one.force_) + break_penalties; #else - Real demerit = abs (this_one.force_f_) + break_penalties; + Real demerit = abs (this_one.force_) + break_penalties; #endif if (!this_one.satisfies_constraints_b_) diff --git a/lily/grace-iterator.cc b/lily/grace-iterator.cc index 1b5053fa92..4d99819fa6 100644 --- a/lily/grace-iterator.cc +++ b/lily/grace-iterator.cc @@ -17,7 +17,7 @@ Grace_iterator::~Grace_iterator () { - // child_iter_p_ = 0; + // child_iter_ = 0; } diff --git a/lily/grob-info.cc b/lily/grob-info.cc index 9b4d540e0e..fff2596a9d 100644 --- a/lily/grob-info.cc +++ b/lily/grob-info.cc @@ -11,36 +11,36 @@ #include "music.hh" #include "translator-group.hh" -Grob_info::Grob_info (Grob*s_l) +Grob_info::Grob_info (Grob*s) { - grob_l_ = s_l; - origin_trans_l_ = 0; + grob_ = s; + origin_trans_ = 0; } Grob_info::Grob_info () { - grob_l_ = 0; - origin_trans_l_ = 0; + grob_ = 0; + origin_trans_ = 0; } Music* Grob_info::music_cause () { - SCM cause = grob_l_->get_grob_property ("cause"); + SCM cause = grob_->get_grob_property ("cause"); return unsmob_music (cause); } Link_array -Grob_info::origin_trans_l_arr (Translator* end) const +Grob_info::origin_transes (Translator* end) const { - Translator * t = origin_trans_l_; + Translator * t = origin_trans_; Link_array r; do { r.push (t); - t = t->daddy_trans_l_; - } while (t && t != end->daddy_trans_l_); + t = t->daddy_trans_; + } while (t && t != end->daddy_trans_); return r; } diff --git a/lily/grob-interface.cc b/lily/grob-interface.cc index 572e858c31..09786eb36f 100644 --- a/lily/grob-interface.cc +++ b/lily/grob-interface.cc @@ -22,8 +22,8 @@ void add_interface (const char * symbol, LY_DEFINE(ly_add_interface, "ly-add-interface", 3,0,0, (SCM a, SCM b, SCM c), "Add an interface description.") { - SCM_ASSERT_TYPE (gh_symbol_p(a), a, SCM_ARG1, __FUNCTION__, "symbol"); - SCM_ASSERT_TYPE (gh_string_p(b), b, SCM_ARG2, __FUNCTION__, "string"); + SCM_ASSERT_TYPE (gh_symbol_p (a), a, SCM_ARG1, __FUNCTION__, "symbol"); + SCM_ASSERT_TYPE (gh_string_p (b), b, SCM_ARG2, __FUNCTION__, "string"); SCM_ASSERT_TYPE (gh_list_p(c), c, SCM_ARG3, __FUNCTION__, "list of syms"); if (!gh_vector_p (all_ifaces)) { @@ -66,8 +66,8 @@ check_interfaces_for_property (Grob const *me, SCM sym) SCM iface = scm_hashq_ref (all_ifaces , gh_car (ifs), SCM_BOOL_F); if (iface == SCM_BOOL_F) { - String msg = to_str ("Unknown interface `%s'", - ly_scm2string (scm_symbol_to_string (gh_car(ifs))).ch_C()); + String msg = to_string ("Unknown interface `%s'", + ly_scm2string (scm_symbol_to_string (gh_car(ifs))).to_str0 ()); programming_error (msg); continue; } @@ -77,9 +77,9 @@ check_interfaces_for_property (Grob const *me, SCM sym) if (!found) { - String str = to_str("Grob %s has no interface for property %s", - me->name ().ch_C(), - ly_symbol2string(sym).ch_C()); + String str = to_string ("Grob %s has no interface for property %s", + me->name ().to_str0 (), + ly_symbol2string(sym).to_str0 ()); programming_error (str); } } diff --git a/lily/grob-pitch-tuple.cc b/lily/grob-pitch-tuple.cc index 0fa7d34b31..2bfc994269 100644 --- a/lily/grob-pitch-tuple.cc +++ b/lily/grob-pitch-tuple.cc @@ -21,13 +21,13 @@ int compare (Grob_pitch_tuple const &a, Grob_pitch_tuple const &b) Grob_pitch_tuple::Grob_pitch_tuple () { - head_l_ =0; + head_ =0; end_ = 0; } Grob_pitch_tuple::Grob_pitch_tuple (Grob *h, Melodic_req*m, Moment mom) { - head_l_ = h; + head_ = h; pitch_ = *unsmob_pitch (m->get_mus_property ("pitch")); end_ = mom; } diff --git a/lily/grob-pq-engraver.cc b/lily/grob-pq-engraver.cc index b2540b8fa0..0dfe3f7828 100644 --- a/lily/grob-pq-engraver.cc +++ b/lily/grob-pq-engraver.cc @@ -50,7 +50,7 @@ Grob_pq_engraver::Grob_pq_engraver() void Grob_pq_engraver::initialize () { - daddy_trans_l_->set_property ("busyGrobs", SCM_EOL); + daddy_trans_->set_property ("busyGrobs", SCM_EOL); } void @@ -72,7 +72,7 @@ Grob_pq_engraver::acknowledge_grob (Grob_info gi) l.main_part_ = 0; } - current_grobs_.push (Grob_mom (gi.grob_l_, n + l)); + current_grobs_.push (Grob_mom (gi.grob_, n + l)); } } @@ -128,7 +128,7 @@ Grob_pq_engraver::stop_translation_timestep () } current_grobs_.clear (); - daddy_trans_l_->set_property ("busyGrobs", start); + daddy_trans_->set_property ("busyGrobs", start); } void @@ -146,7 +146,7 @@ Grob_pq_engraver::start_translation_timestep () } if (start_busy != busy) - daddy_trans_l_->set_property ("busyGrobs", busy); + daddy_trans_->set_property ("busyGrobs", busy); } diff --git a/lily/grob-scheme.cc b/lily/grob-scheme.cc index 6d1c8b771b..ca76123c66 100644 --- a/lily/grob-scheme.cc +++ b/lily/grob-scheme.cc @@ -10,7 +10,7 @@ LY_DEFINE(ly_set_grob_property,"ly-set-grob-property!", 3, 0, 0, { Grob * sc = unsmob_grob (grob); SCM_ASSERT_TYPE(sc, grob, SCM_ARG1, __FUNCTION__, "grob"); - SCM_ASSERT_TYPE(gh_symbol_p(sym), sym, SCM_ARG2, __FUNCTION__, "symbol"); + SCM_ASSERT_TYPE(gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol"); if (!type_check_assignment (sym, val, ly_symbol2scm ("backend-type?"))) error ("typecheck failed"); @@ -46,7 +46,7 @@ initially read from @file{scm/grob-description.scm}. { Grob * sc = unsmob_grob (grob); SCM_ASSERT_TYPE(sc, grob, SCM_ARG1, __FUNCTION__, "grob"); - SCM_ASSERT_TYPE(gh_symbol_p(sym), sym, SCM_ARG2, __FUNCTION__, "symbol"); + SCM_ASSERT_TYPE(gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol"); return sc->internal_get_grob_property (sym); } @@ -69,9 +69,9 @@ LY_DEFINE(ly_get_paper_var,"ly-get-paper-variable", 2, 0, 0, { Grob * sc = unsmob_grob (grob); SCM_ASSERT_TYPE(sc, grob, SCM_ARG1, __FUNCTION__, "grob"); - SCM_ASSERT_TYPE(gh_symbol_p(sym), sym, SCM_ARG2, __FUNCTION__, "symbol"); + SCM_ASSERT_TYPE(gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol"); - return sc->paper_l() ->get_scmvar_scm (sym); + return sc->get_paper () ->get_scmvar_scm (sym); } @@ -86,7 +86,7 @@ grob @var{refp}") SCM_ASSERT_TYPE(sc, grob, SCM_ARG1, __FUNCTION__, "grob"); SCM_ASSERT_TYPE(ref, refp, SCM_ARG2, __FUNCTION__, "grob"); - SCM_ASSERT_TYPE(ly_axis_p(axis), axis, SCM_ARG3, __FUNCTION__, "axis"); + SCM_ASSERT_TYPE(ly_axis_p (axis), axis, SCM_ARG3, __FUNCTION__, "axis"); return ly_interval2scm ( sc->extent (ref, Axis (gh_scm2int (axis)))); } @@ -97,7 +97,7 @@ for the Y-axis.") { Grob * sc = unsmob_grob (grob); SCM_ASSERT_TYPE(sc, grob, SCM_ARG1, __FUNCTION__, "grob"); - SCM_ASSERT_TYPE(ly_axis_p(axis), axis, SCM_ARG2, __FUNCTION__, "axis"); + SCM_ASSERT_TYPE(ly_axis_p (axis), axis, SCM_ARG2, __FUNCTION__, "axis"); Grob * par = sc->get_parent (Axis (gh_scm2int (axis))); return par ? par->self_scm() : SCM_EOL; diff --git a/lily/grob.cc b/lily/grob.cc index 3a1855320e..9d4707c97e 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -46,9 +46,9 @@ Grob::Grob (SCM basicprops) fixme: default should be no callback. */ - pscore_l_=0; - status_c_ = 0; - original_l_ = 0; + pscore_=0; + status_ = 0; + original_ = 0; immutable_property_alist_ = basicprops; mutable_property_alist_ = SCM_EOL; @@ -121,7 +121,7 @@ Grob::Grob (SCM basicprops) Grob::Grob (Grob const&s) : dim_cache_ (s.dim_cache_) { - original_l_ = (Grob*) &s; + original_ = (Grob*) &s; immutable_property_alist_ = s.immutable_property_alist_; mutable_property_alist_ = SCM_EOL; @@ -130,8 +130,8 @@ Grob::Grob (Grob const&s) No properties are copied. That is the job of handle_broken_dependencies. */ - status_c_ = s.status_c_; - pscore_l_ = s.pscore_l_; + status_ = s.status_; + pscore_ = s.pscore_; smobify_self (); @@ -189,24 +189,24 @@ Grob::preset_extent (SCM element_smob, SCM scm_axis) Paper_def* -Grob::paper_l () const +Grob::get_paper () const { - return pscore_l_ ? pscore_l_->paper_l_ : 0; + return pscore_ ? pscore_->paper_ : 0; } void Grob::calculate_dependencies (int final, int busy, SCM funcname) { - if (status_c_ >= final) + if (status_ >= final) return; - if (status_c_== busy) + if (status_== busy) { programming_error ("Element is busy, come back later"); return; } - status_c_= busy; + status_= busy; for (SCM d = get_grob_property ("dependencies"); gh_pair_p (d); d = ly_cdr (d)) @@ -220,7 +220,7 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname) if (gh_procedure_p (proc)) gh_call1 (proc, this->self_scm ()); - status_c_= final; + status_= final; } Molecule * @@ -333,7 +333,7 @@ Return the original Grob of @var{grob} { Grob *me = unsmob_grob (grob); SCM_ASSERT_TYPE (me, grob, SCM_ARG1, __FUNCTION__, "grob"); - return me->original_l_ ? me->original_l_->self_scm () : me->self_scm (); + return me->original_ ? me->original_->self_scm () : me->self_scm (); } void @@ -353,14 +353,14 @@ void Grob::handle_broken_dependencies () { Spanner * s= dynamic_cast (this); - if (original_l_ && s) + if (original_ && s) return; if (s) { - for (int i = 0; i< s->broken_into_l_arr_ .size (); i++) + for (int i = 0; i< s->broken_intos_ .size (); i++) { - Grob * sc = s->broken_into_l_arr_[i]; + Grob * sc = s->broken_intos_[i]; System * l = sc->get_system (); sc->substitute_mutable_properties (l ? l->self_scm () : SCM_UNDEFINED, @@ -424,11 +424,11 @@ Grob::handle_prebroken_dependencies () Don't do this in the derived method, since we want to keep access to mutable_property_alist_ centralized. */ - if (original_l_) + if (original_) { Item * it = dynamic_cast (this); substitute_mutable_properties (gh_int2scm (it->break_status_dir ()), - original_l_->mutable_property_alist_); + original_->mutable_property_alist_); } } @@ -470,10 +470,10 @@ Grob::relative_coordinate (Grob const*refp, Axis a) const not ask for the absolute coordinate (ie. REFP == nil.) */ - if (refp == dim_cache_[a].parent_l_) + if (refp == dim_cache_[a].parent_) return get_offset (a); else - return get_offset (a) + dim_cache_[a].parent_l_->relative_coordinate (refp, a); + return get_offset (a) + dim_cache_[a].parent_->relative_coordinate (refp, a); } @@ -579,8 +579,8 @@ Grob::common_refpoint (Grob const* s, Axis a) const I don't like the quadratic aspect of this code, but I see no other way. The largest chain of parents might be 10 high or so, so it shouldn't be a real issue. */ - for (Grob const *c = this; c; c = c->dim_cache_[a].parent_l_) - for (Grob const * d = s; d; d = d->dim_cache_[a].parent_l_) + for (Grob const *c = this; c; c = c->dim_cache_[a].parent_) + for (Grob const * d = s; d; d = d->dim_cache_[a].parent_) if (d == c) return (Grob*)d; @@ -666,7 +666,7 @@ Grob::set_extent (SCM dc, Axis a) void Grob::set_parent (Grob *g, Axis a) { - dim_cache_[a].parent_l_ = g; + dim_cache_[a].parent_ = g; } MAKE_SCHEME_CALLBACK (Grob,fixup_refpoint,1); @@ -762,8 +762,8 @@ Grob::mark_smob (SCM ses) */ } - if (s->original_l_) - scm_gc_mark (s->original_l_->self_scm ()); + if (s->original_) + scm_gc_mark (s->original_->self_scm ()); s->do_derived_mark (); return s->mutable_property_alist_; @@ -775,7 +775,7 @@ Grob::print_smob (SCM s, SCM port, scm_print_state *) Grob *sc = (Grob *) ly_cdr (s); scm_puts ("#name ().ch_C (), port); + scm_puts ((char *)sc->name ().to_str0 (), port); /* don't try to print properties, that is too much hassle. @@ -808,7 +808,7 @@ Grob::internal_has_interface (SCM k) /** Return Array of Grobs in SCM list L */ Link_array -ly_scm2grob_array (SCM l) +ly_scm2grobs (SCM l) { Link_array arr; @@ -824,7 +824,7 @@ ly_scm2grob_array (SCM l) /** Return SCM list of Grob array A */ SCM -ly_grob_array2scm (Link_array a) +ly_grobs2scm (Link_array a) { SCM s = SCM_EOL; for (int i = a.size (); i; i--) diff --git a/lily/group-interface.cc b/lily/group-interface.cc index 4b4fd9c4b1..e518792ef8 100644 --- a/lily/group-interface.cc +++ b/lily/group-interface.cc @@ -19,13 +19,13 @@ Group_interface::add_thing (Grob*me, SCM sym, SCM thing) void Group_interface::add_thing (Grob*me, String name, SCM thing) { - add_thing (me, ly_symbol2scm (name.ch_C()), thing); + add_thing (me, ly_symbol2scm (name.to_str0 ()), thing); } int Group_interface::count (Grob *me, String name) { - return scm_ilength (me->get_grob_property (name.ch_C ())); + return scm_ilength (me->get_grob_property (name.to_str0 ())); } diff --git a/lily/hairpin.cc b/lily/hairpin.cc index 458a7b5361..63095505e5 100644 --- a/lily/hairpin.cc +++ b/lily/hairpin.cc @@ -24,7 +24,7 @@ Hairpin::brew_molecule (SCM smob) Grob *me= unsmob_grob (smob); Spanner *spanner = dynamic_cast (me); - Real line = me->paper_l ()->get_var ("linethickness"); + Real line = me->get_paper ()->get_var ("linethickness"); SCM s = me->get_grob_property ("grow-direction"); if (!ly_dir_p (s)) diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc index 0ab7aa9591..6d5fd573f7 100644 --- a/lily/hyphen-engraver.cc +++ b/lily/hyphen-engraver.cc @@ -22,10 +22,10 @@ then. */ class Hyphen_engraver : public Engraver { - Grob *last_lyric_l_; - Grob *current_lyric_l_; - Hyphen_req* req_l_; - Spanner* hyphen_p_; + Grob *last_lyric_; + Grob *current_lyric_; + Hyphen_req* req_; + Spanner* hyphen_; public: TRANSLATOR_DECLARATIONS(Hyphen_engraver); @@ -44,24 +44,24 @@ private: Hyphen_engraver::Hyphen_engraver () { - current_lyric_l_ = 0; - last_lyric_l_ = 0; - hyphen_p_ = 0; - req_l_ = 0; + current_lyric_ = 0; + last_lyric_ = 0; + hyphen_ = 0; + req_ = 0; } void Hyphen_engraver::acknowledge_grob (Grob_info i) { // -> text-item - if (i.grob_l_->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface"))) + if (i.grob_->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface"))) { - current_lyric_l_ = i.grob_l_; - if (hyphen_p_ - && !hyphen_p_->get_bound (RIGHT) + current_lyric_ = i.grob_; + if (hyphen_ + && !hyphen_->get_bound (RIGHT) ) { - Hyphen_spanner (hyphen_p_).set_textitem (RIGHT, i.grob_l_); + Hyphen_spanner (hyphen_).set_textitem (RIGHT, i.grob_); } } } @@ -72,10 +72,10 @@ Hyphen_engraver::try_music (Music* r) { if (Hyphen_req* p = dynamic_cast (r)) { - if (req_l_) + if (req_) return false; - req_l_ = p; + req_ = p; return true; } return false; @@ -84,28 +84,28 @@ Hyphen_engraver::try_music (Music* r) void Hyphen_engraver::finalize () { - if (hyphen_p_) + if (hyphen_) { - req_l_->origin ()->warning (_ ("unterminated hyphen")); - hyphen_p_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn"))); + req_->origin ()->warning (_ ("unterminated hyphen")); + hyphen_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn"))); } } void Hyphen_engraver::process_acknowledged_grobs () { - if (req_l_ &&! hyphen_p_) + if (req_ &&! hyphen_) { - if (!last_lyric_l_) + if (!last_lyric_) { - req_l_->origin ()->warning (_ ("Nothing to connect hyphen to on the left. Ignoring hyphen request.")); + req_->origin ()->warning (_ ("Nothing to connect hyphen to on the left. Ignoring hyphen request.")); return; } - hyphen_p_ = new Spanner (get_property ("LyricHyphen")); + hyphen_ = new Spanner (get_property ("LyricHyphen")); - Hyphen_spanner (hyphen_p_).set_textitem (LEFT, last_lyric_l_); - announce_grob(hyphen_p_, req_l_->self_scm()); + Hyphen_spanner (hyphen_).set_textitem (LEFT, last_lyric_); + announce_grob(hyphen_, req_->self_scm()); } } @@ -113,23 +113,23 @@ Hyphen_engraver::process_acknowledged_grobs () void Hyphen_engraver::stop_translation_timestep () { - if (hyphen_p_) + if (hyphen_) { - typeset_grob (hyphen_p_); - hyphen_p_ = 0; + typeset_grob (hyphen_); + hyphen_ = 0; } - if (current_lyric_l_) + if (current_lyric_) { - last_lyric_l_ = current_lyric_l_; - current_lyric_l_ =0; + last_lyric_ = current_lyric_; + current_lyric_ =0; } } void Hyphen_engraver::start_translation_timestep () { - req_l_ = 0; + req_ = 0; } diff --git a/lily/hyphen-spanner.cc b/lily/hyphen-spanner.cc index 8231c4b2a6..ee5c20bc20 100644 --- a/lily/hyphen-spanner.cc +++ b/lily/hyphen-spanner.cc @@ -45,7 +45,7 @@ Hyphen_spanner::brew_molecule (SCM smob) } while (flip (&d) != LEFT); - Real lt = sp->paper_l ()->get_var ("linethickness"); + Real lt = sp->get_paper ()->get_var ("linethickness"); Real th = gh_scm2double (sp->get_grob_property ("thickness")) * lt ; Real h = gh_scm2double (sp->get_grob_property ("height")); @@ -80,7 +80,7 @@ Hyphen_spanner::brew_molecule (SCM smob) the offset for stuff */ /* This test for being on the first column has been shamelessly ripped from spanner.cc */ - Paper_column *sc = dynamic_cast (sp->get_bound (LEFT)->column_l ()); + Paper_column *sc = dynamic_cast (sp->get_bound (LEFT)->get_column ()); if (sc != NULL && sc->break_status_dir () == RIGHT) { @@ -105,13 +105,13 @@ Hyphen_spanner::brew_molecule (SCM smob) void Hyphen_spanner::set_textitem (Direction d, Grob* b) { - elt_l_->set_bound (d, b); - elt_l_->add_dependency (b); + elt_->set_bound (d, b); + elt_->add_dependency (b); } Hyphen_spanner::Hyphen_spanner (Spanner*s) { - elt_l_ = s; + elt_ = s; } diff --git a/lily/includable-lexer.cc b/lily/includable-lexer.cc index 914934bf95..9da3464bc4 100644 --- a/lily/includable-lexer.cc +++ b/lily/includable-lexer.cc @@ -43,18 +43,18 @@ Includable_lexer::new_input (String s, Sources * global_sources) return; } - Source_file * sl = global_sources->get_file_l (s); + Source_file * sl = global_sources->get_file (s); if (!sl) { String msg = _f ("can't find file: `%s'", s); msg += "\n"; - msg += _f ("(search path: `%s')", global_sources->path_C_->str ().ch_C ()); + msg += _f ("(search path: `%s')", global_sources->path_C_->string ().to_str0 ()); msg += "\n"; - LexerError (msg.ch_C ()); + LexerError (msg.to_str0 ()); return; } - filename_str_arr_.push (sl->name_str ()); + filename_strings_.push (sl->name_string ()); char_count_stack_.push (0); if (yy_current_buffer) @@ -72,7 +72,7 @@ Includable_lexer::new_input (String s, Sources * global_sources) filelength but a BUFFERSIZE. Maybe this is why reading stdin fucks up. */ - yy_switch_to_buffer (yy_create_buffer (sl->istream_l (), YY_BUF_SIZE)); + yy_switch_to_buffer (yy_create_buffer (sl->get_istream (), YY_BUF_SIZE)); } void @@ -80,7 +80,7 @@ Includable_lexer::new_input (String name, String data, Sources* sources) { Source_file* file = new Source_file (name, data); sources->add (file); - filename_str_arr_.push (name); + filename_strings_.push (name); char_count_stack_.push (0); if (yy_current_buffer) @@ -90,7 +90,7 @@ Includable_lexer::new_input (String name, String data, Sources* sources) progress_indication (String ("[") + name); include_stack_.push (file); - yy_switch_to_buffer (yy_create_buffer (file->istream_l (), YY_BUF_SIZE)); + yy_switch_to_buffer (yy_create_buffer (file->get_istream (), YY_BUF_SIZE)); } /** pop the inputstack. conceptually this is a destructor, but it @@ -117,11 +117,11 @@ Includable_lexer::close_input () } char const* -Includable_lexer::here_ch_C () const +Includable_lexer::here_str0 () const { if (include_stack_.empty ()) return 0; - return include_stack_.top ()->ch_C () + char_count_stack_.top (); + return include_stack_.top ()->to_str0 () + char_count_stack_.top (); } Includable_lexer::~Includable_lexer () @@ -142,7 +142,7 @@ Includable_lexer::add_lexed_char (int count) } Source_file* -Includable_lexer::source_file_l () const +Includable_lexer::get_source_file () const { if (include_stack_.empty ()) return 0; diff --git a/lily/include/afm.hh b/lily/include/afm.hh index 5679d83279..e60686d837 100644 --- a/lily/include/afm.hh +++ b/lily/include/afm.hh @@ -27,7 +27,7 @@ struct Adobe_font_metric : Font_metric AFM_CharMetricInfo const *find_char_metric (String name, bool warn=true) const; AFM_CharMetricInfo const *find_ascii_metric (int, bool warn=true) const; - String str () const; + String string () const; ~Adobe_font_metric (); static SCM make_afm (AFM_Font_info*, unsigned); diff --git a/lily/include/audio-column.hh b/lily/include/audio-column.hh index 89cfb4ce62..f31f107b3a 100644 --- a/lily/include/audio-column.hh +++ b/lily/include/audio-column.hh @@ -21,12 +21,12 @@ class Audio_column : public Audio_element { public: Audio_column (Moment at_mom); - void add_audio_item (Audio_item* i_l); + void add_audio_item (Audio_item* i); Moment at_mom () const; void print () const; - Link_array audio_item_l_arr_; - Performance * performance_l_; + Link_array audio_items_; + Performance * performance_; private: Audio_column (Audio_column const&); diff --git a/lily/include/audio-element-info.hh b/lily/include/audio-element-info.hh index be38ba8014..174a2d7eda 100644 --- a/lily/include/audio-element-info.hh +++ b/lily/include/audio-element-info.hh @@ -17,10 +17,10 @@ Data container for broadcasts */ struct Audio_element_info { - Audio_element * elem_l_; - Music *req_l_; - Translator * origin_trans_l_; - Link_array origin_trans_l_arr (Translator*) const; + Audio_element * elem_; + Music *req_; + Translator * origin_trans_; + Link_array origin_transes (Translator*) const; Audio_element_info (Audio_element*, Music*); Audio_element_info (); diff --git a/lily/include/audio-item.hh b/lily/include/audio-item.hh index b8acab77c0..bd64140e19 100644 --- a/lily/include/audio-item.hh +++ b/lily/include/audio-item.hh @@ -27,7 +27,7 @@ class Audio_item : public Audio_element public: Audio_item (); - Audio_column* audio_column_l_; + Audio_column* audio_column_; private: @@ -55,7 +55,7 @@ public: class Audio_instrument : public Audio_item { public: - Audio_instrument (String instrument_str); + Audio_instrument (String instrument_string); String str_; }; @@ -71,14 +71,14 @@ public: Moment length_mom_; Moment delayed_mom_; Moment delayed_until_mom_; - int transposing_i_; + int transposing_; Audio_note* tied_; }; class Audio_piano_pedal : public Audio_item { public: - String type_str_; + String type_string_; Direction dir_; }; @@ -90,10 +90,10 @@ public: MARKER, CUE_POINT }; - Audio_text (Audio_text::Type type, String text_str); + Audio_text (Audio_text::Type type, String text_string); Type type_; - String text_str_; + String text_string_; }; class Audio_tempo : public Audio_item @@ -101,7 +101,7 @@ class Audio_tempo : public Audio_item public: Audio_tempo (int per_minute_4_i); - int per_minute_4_i_; + int per_minute_4_; }; class Audio_tie : public Audio_item @@ -117,8 +117,8 @@ class Audio_time_signature : public Audio_item public: Audio_time_signature (int beats, int one_beat); - int beats_i_; - int one_beat_i_; + int beats_; + int one_beat_; }; #endif // AUDIO_ITEM_HH diff --git a/lily/include/audio-staff.hh b/lily/include/audio-staff.hh index 1e48087048..99f418ca4e 100644 --- a/lily/include/audio-staff.hh +++ b/lily/include/audio-staff.hh @@ -15,8 +15,8 @@ struct Audio_staff : public Audio_element { void add_audio_item (Audio_item* l); void output (Midi_stream& midi_stream_r, int track_i); - Link_array audio_item_l_arr_; - int channel_i_; + Link_array audio_items_; + int channel_; }; #endif // AUDIO_STAFF_HH diff --git a/lily/include/bezier.hh b/lily/include/bezier.hh index 5a960c4810..1e79fac676 100644 --- a/lily/include/bezier.hh +++ b/lily/include/bezier.hh @@ -46,9 +46,9 @@ public: Offset control_[4]; }; -void scale (Array* arr_p, Real xscale, Real yscale); -void rotate (Array* arr_p, Real phi); -void translate (Array* arr_p, Offset o); +void scale (Array* array, Real xscale, Real yscale); +void rotate (Array* array, Real phi); +void translate (Array* array, Offset o); #endif // BEZIER_HH diff --git a/lily/include/break-algorithm.hh b/lily/include/break-algorithm.hh index 67d0c02297..adcd966d43 100644 --- a/lily/include/break-algorithm.hh +++ b/lily/include/break-algorithm.hh @@ -24,8 +24,8 @@ */ class Break_algorithm { protected: - Paper_score *pscore_l_; - Real linewidth_f_; + Paper_score *pscore_; + Real linewidth_; /// search all pcols which are breakable. Link_array find_breaks () const; diff --git a/lily/include/chord-tremolo-iterator.hh b/lily/include/chord-tremolo-iterator.hh index fe35294b9b..e9583bf704 100644 --- a/lily/include/chord-tremolo-iterator.hh +++ b/lily/include/chord-tremolo-iterator.hh @@ -29,7 +29,7 @@ protected: private: Moment factor_; - Music_iterator * child_iter_p_; + Music_iterator * child_iter_; }; diff --git a/lily/include/column-x-positions.hh b/lily/include/column-x-positions.hh index 23e27419f8..57a5624d74 100644 --- a/lily/include/column-x-positions.hh +++ b/lily/include/column-x-positions.hh @@ -17,7 +17,7 @@ struct Column_x_positions Link_array loose_cols_; Array config_; - Real force_f_; + Real force_; bool satisfies_constraints_b_; Column_x_positions (); diff --git a/lily/include/command-request.hh b/lily/include/command-request.hh index 0d05e7dbf5..434222fdc3 100644 --- a/lily/include/command-request.hh +++ b/lily/include/command-request.hh @@ -30,7 +30,7 @@ public: }; /* - int metronome_i_; + int metronome_; */ class Tempo_req : public Request { diff --git a/lily/include/custos.hh b/lily/include/custos.hh index 18a421d84d..697799ad13 100644 --- a/lily/include/custos.hh +++ b/lily/include/custos.hh @@ -17,7 +17,7 @@ struct Custos static bool has_interface (Grob*); private: - static void add_streepjes (Grob* me, int pos, int interspaces, Molecule* custos_p_); + static void add_streepjes (Grob* me, int pos, int interspaces, Molecule* custos_); static Molecule create_ledger_line (Interval x_extent, Grob *me) ; }; diff --git a/lily/include/dimension-cache.hh b/lily/include/dimension-cache.hh index 8897dc6fd4..bb808d418c 100644 --- a/lily/include/dimension-cache.hh +++ b/lily/include/dimension-cache.hh @@ -33,7 +33,7 @@ struct Dimension_cache SCM dimension_; /** - The offset wrt. to the center of #parent_l_# + The offset wrt. to the center of #parent_# */ Real offset_; @@ -44,7 +44,7 @@ struct Dimension_cache /** What to call to find extent. Nil means empty. */ - Grob * parent_l_; + Grob * parent_; Dimension_cache (Dimension_cache const&); Dimension_cache (); diff --git a/lily/include/duration.hh b/lily/include/duration.hh index f301fe296a..fff532d980 100644 --- a/lily/include/duration.hh +++ b/lily/include/duration.hh @@ -22,7 +22,7 @@ public: Duration (); Duration (int, int); - String str () const; + String string () const; Duration compressed (Rational) const; Rational length_mom () const ; @@ -38,8 +38,8 @@ public: private: /// Logarithm of the base duration. - int durlog_i_; - int dots_i_; + int durlog_; + int dots_; Rational factor_; }; diff --git a/lily/include/engraver-group-engraver.hh b/lily/include/engraver-group-engraver.hh index ab0f38543c..aa2ee35b89 100644 --- a/lily/include/engraver-group-engraver.hh +++ b/lily/include/engraver-group-engraver.hh @@ -26,7 +26,7 @@ class Engraver_group_engraver : public Engraver, public virtual Translator_group { protected: - Array announce_info_arr_; + Array announce_infos_; diff --git a/lily/include/engraver.hh b/lily/include/engraver.hh index 9f85a293eb..6712a339bb 100644 --- a/lily/include/engraver.hh +++ b/lily/include/engraver.hh @@ -28,7 +28,7 @@ protected: /* Call this when you're finished with ELEM_P. */ - virtual void typeset_grob (Grob*elem_p); + virtual void typeset_grob (Grob*elem); /* take note of item/spanner put item in spanner. Adjust local key; etc. @@ -51,7 +51,7 @@ protected: Score_engraver * top_engraver () const; public: - Engraver_group_engraver * daddy_grav_l () const; + Engraver_group_engraver * get_daddy_grav () const; /** override other ctor */ diff --git a/lily/include/file-results.hh b/lily/include/file-results.hh index 7f9e98b1b0..af58d0d2a4 100644 --- a/lily/include/file-results.hh +++ b/lily/include/file-results.hh @@ -11,11 +11,11 @@ #define FILE_RESULTS_HH #include "flower-proto.hh" -void do_one_file (String init_str, String file_str); -extern Scheme_hash_table *global_header_p; -extern Array target_str_global_array; -extern Array inclusion_global_array; -extern Link_array score_global_array; +void do_one_file (String init_string, String file_string); +extern Scheme_hash_table *global_header; +extern Array target_string_globals; +extern Array inclusion_globals; +extern Link_array score_globals; void do_scores (); void clear_scores (); diff --git a/lily/include/folded-repeat-iterator.hh b/lily/include/folded-repeat-iterator.hh index 5c88ca7dff..c5c087c94f 100644 --- a/lily/include/folded-repeat-iterator.hh +++ b/lily/include/folded-repeat-iterator.hh @@ -38,8 +38,8 @@ protected: virtual Music_iterator *try_music_in_children (Music *) const; private: - Music_iterator * main_iter_p_; - Music_iterator * alternative_iter_p_; + Music_iterator * main_iter_; + Music_iterator * alternative_iter_; Moment main_length_mom_; }; diff --git a/lily/include/global-translator.hh b/lily/include/global-translator.hh index ab59e7bf52..c59cc3fb43 100644 --- a/lily/include/global-translator.hh +++ b/lily/include/global-translator.hh @@ -24,12 +24,12 @@ public: Moment now_mom_; Global_translator (); - int moments_left_i () const; + int get_moments_left () const; Moment sneaky_insert_extra_moment (Moment); void add_moment_to_process (Moment); void run_iterator_on_me (Music_iterator*); - virtual Music_output *get_output_p (); + virtual Music_output *get_output (); virtual void prepare (Moment); virtual void one_time_step (); virtual void finish (); diff --git a/lily/include/grob-info.hh b/lily/include/grob-info.hh index bba4bc1248..72bf3821d6 100644 --- a/lily/include/grob-info.hh +++ b/lily/include/grob-info.hh @@ -18,14 +18,14 @@ Data container for broadcasts. */ struct Grob_info { - Translator * origin_trans_l_; + Translator * origin_trans_; friend class Engraver; - Grob * grob_l_; + Grob * grob_; public: Music * music_cause (); - Link_array origin_trans_l_arr (Translator*) const; + Link_array origin_transes (Translator*) const; Grob_info (Grob*); Grob_info (); }; diff --git a/lily/include/grob-pitch-tuple.hh b/lily/include/grob-pitch-tuple.hh index 04a0decb81..e174ed668e 100644 --- a/lily/include/grob-pitch-tuple.hh +++ b/lily/include/grob-pitch-tuple.hh @@ -16,7 +16,7 @@ source file of the GNU LilyPond music typesetter struct Grob_pitch_tuple { Pitch pitch_; - Grob *head_l_; + Grob *head_; Moment end_; Grob_pitch_tuple (); diff --git a/lily/include/grob.hh b/lily/include/grob.hh index 7a96394050..0b3c277d22 100644 --- a/lily/include/grob.hh +++ b/lily/include/grob.hh @@ -43,7 +43,7 @@ private: void substitute_mutable_properties(SCM,SCM); public: - Grob *original_l_; + Grob *original_; /** Administration: Where are we?. This is mainly used by Super_element and @@ -51,7 +51,7 @@ public: 0 means ORPHAN, */ - char status_c_; + char status_; /* @@ -59,7 +59,7 @@ public: elements, I think it is safe to assume that we will not have scores being formatted multithreadedly. */ - Paper_score *pscore_l_; + Paper_score *pscore_; Dimension_cache dim_cache_[NO_AXES]; Grob (SCM basic_props); @@ -82,7 +82,7 @@ public: /* related classes. */ - Paper_def *paper_l () const; + Paper_def *get_paper () const; /** add a dependency. It may be the 0 pointer, in which case, it is ignored. @@ -96,7 +96,7 @@ public: /** Recursively track all dependencies of this Grob. The - status_c_ field is used as a mark-field. It is marked with + status_ field is used as a mark-field. It is marked with #busy# during execution of this function, and marked with #final# when finished. @@ -152,7 +152,7 @@ public: void set_parent (Grob* e, Axis); - Grob *get_parent (Axis a) const { return dim_cache_[a].parent_l_; } + Grob *get_parent (Axis a) const { return dim_cache_[a].parent_; } DECLARE_SCHEME_CALLBACK (fixup_refpoint, (SCM)); }; @@ -166,8 +166,8 @@ Grob*common_refpoint_of_array (Link_array const&, Grob * , Axis a); void set_break_subsititution (SCM criterion); SCM substitute_mutable_property_alist (SCM alist); -Link_array ly_scm2grob_array (SCM l); -SCM ly_grob_array2scm (Link_array a); +Link_array ly_scm2grobs (SCM l); +SCM ly_grobs2scm (Link_array a); #endif // STAFFELEM_HH diff --git a/lily/include/hyphen-spanner.hh b/lily/include/hyphen-spanner.hh index f4ed165ccf..3bf5dca0d5 100644 --- a/lily/include/hyphen-spanner.hh +++ b/lily/include/hyphen-spanner.hh @@ -12,7 +12,7 @@ struct Hyphen_spanner { public: - Spanner* elt_l_; + Spanner* elt_; Hyphen_spanner (Spanner*); void set_textitem (Direction, Grob*); bool has_interface (Grob*); diff --git a/lily/include/includable-lexer.hh b/lily/include/includable-lexer.hh index f7a8342da2..adff5283bd 100644 --- a/lily/include/includable-lexer.hh +++ b/lily/include/includable-lexer.hh @@ -38,14 +38,14 @@ public: ~Includable_lexer (); /// store dependencies for Makefile stuff. - Array filename_str_arr_; + Array filename_strings_; - Source_file* source_file_l () const; + Source_file* get_source_file () const; void new_input (String s, Sources*); void new_input (String name, String data, Sources*); void add_lexed_char (int); - char const * here_ch_C () const; + char const * here_str0 () const; }; diff --git a/lily/include/interpretation-context-handle.hh b/lily/include/interpretation-context-handle.hh index cca37ff5b8..0dbf9431a5 100644 --- a/lily/include/interpretation-context-handle.hh +++ b/lily/include/interpretation-context-handle.hh @@ -21,10 +21,10 @@ public: bool try_music (Music *); void operator = (Interpretation_context_handle const&); Interpretation_context_handle (Interpretation_context_handle const&); - Translator_group * report_to_l () const; + Translator_group * report_to () const; private: - Translator_group * report_to_l_; + Translator_group * report_to_; void down (); void up (Translator_group*); }; diff --git a/lily/include/item.hh b/lily/include/item.hh index 82f5e7c516..37eb33f267 100644 --- a/lily/include/item.hh +++ b/lily/include/item.hh @@ -39,7 +39,7 @@ public: Grob *find_broken_piece (System *) const; virtual System *get_system () const; - virtual Paper_column *column_l () const; + virtual Paper_column *get_column () const; virtual void handle_prebroken_dependencies (); static bool has_interface (Grob *); protected: diff --git a/lily/include/ligature-engraver.hh b/lily/include/ligature-engraver.hh index 975d0d2f9b..5e8efb7eeb 100644 --- a/lily/include/ligature-engraver.hh +++ b/lily/include/ligature-engraver.hh @@ -24,8 +24,8 @@ protected: virtual void try_stop_ligature (); virtual Spanner *create_ligature_spanner (); - Spanner *finished_ligature_p_; - Spanner *ligature_p_; + Spanner *finished_ligature_; + Spanner *ligature_; SCM brew_ligature_primitive_proc; public: diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index 1d2b3839c2..a14f2be4aa 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -134,7 +134,7 @@ SCM my_gh_symbol2scm (const char* x); */ #define ly_symbol2scm(x) ({ static SCM cached; \ SCM value = cached; /* We store this one locally, since G++ -O2 fucks up else */ \ - if ( __builtin_constant_p ((x)))\ + if ( get___builtin_constant ((x)))\ { if (!cached)\ value = cached = scm_gc_protect_object (my_gh_symbol2scm((x)));\ } else\ @@ -190,7 +190,7 @@ inline bool ly_pair_p (SCM x) { return SCM_NFALSEP (scm_pair_p (x)); } #endif inline bool ly_symbol_p (SCM x) { return SCM_SYMBOLP (x); } inline bool ly_number_p (SCM x) { return SCM_NUMBERP (x); } -inline bool ly_procedure_p (SCM x) { return SCM_NFALSEP (scm_procedure_p(x)); } +inline bool ly_procedure_p (SCM x) { return SCM_NFALSEP (scm_procedure_p (x)); } /* display and print newline. diff --git a/lily/include/lily-version.hh b/lily/include/lily-version.hh index 0319579617..f5f4b28b29 100644 --- a/lily/include/lily-version.hh +++ b/lily/include/lily-version.hh @@ -12,9 +12,9 @@ #include "string.hh" -String version_str (); -String gnu_lilypond_str (); -String gnu_lilypond_version_str (); +String version_string (); +String gnu_lilypond_string (); +String gnu_lilypond_version_string (); #endif // LILY_VERSION_HH diff --git a/lily/include/lilypond-input-version.hh b/lily/include/lilypond-input-version.hh index ce8e9f0355..aaa23d6871 100644 --- a/lily/include/lilypond-input-version.hh +++ b/lily/include/lilypond-input-version.hh @@ -17,13 +17,13 @@ struct Lilypond_version Lilypond_version (int major, int minor, int patch); Lilypond_version (String str); - String str () const; + String string () const; operator int () const; - int major_i_; - int minor_i_; - int patch_i_; - String extra_patch_str_; + int major_; + int minor_; + int patch_; + String extra_patch_string_; }; extern Lilypond_version oldest_version; diff --git a/lily/include/line-group-group-engraver.hh b/lily/include/line-group-group-engraver.hh index b6fb352802..a37ecc05bb 100644 --- a/lily/include/line-group-group-engraver.hh +++ b/lily/include/line-group-group-engraver.hh @@ -21,7 +21,7 @@ class Line_group_engraver_group : public Engraver_group_engraver { protected: - Spanner *staffline_p_; + Spanner *staffline_; virtual void create_line_spanner (); virtual void initialize (); diff --git a/lily/include/ly-smobs.icc b/lily/include/ly-smobs.icc index a2e418a4c4..9dbf3698c6 100644 --- a/lily/include/ly-smobs.icc +++ b/lily/include/ly-smobs.icc @@ -14,12 +14,12 @@ #define IMPLEMENT_TYPE_P(CL, FUNCNAME)\ -void init_type_p_ ## CL ()\ +void init_type_ ## CL ()\ {\ scm_c_define_gsubr (FUNCNAME, 1, 0, 0, (Scheme_function_unknown) CL::smob_p);\ ly_add_function_documentation (FUNCNAME, "(SCM x)", "Check if @var{x} is a " #CL " object");\ }\ -ADD_SCM_INIT_FUNC (init_type_p_ ## CL, init_type_p_ ## CL) +ADD_SCM_INIT_FUNC (init_type_ ## CL, init_type_ ## CL) #ifndef SCM_CELL_TYPE #define SCM_CELL_TYPE(X) SCM_CAR (X) diff --git a/lily/include/lyric-combine-music-iterator.hh b/lily/include/lyric-combine-music-iterator.hh index 1dc586da02..49251c0fe1 100644 --- a/lily/include/lyric-combine-music-iterator.hh +++ b/lily/include/lyric-combine-music-iterator.hh @@ -31,8 +31,8 @@ protected: private: bool get_busy_status ()const ; - Music_iterator * music_iter_p_; - Music_iterator * lyric_iter_p_; + Music_iterator * music_iter_; + Music_iterator * lyric_iter_; }; #endif /* LYRIC_COMBINE_MUSIC_ITERATOR_HH */ diff --git a/lily/include/lyric-combine-music.hh b/lily/include/lyric-combine-music.hh index 0997839a78..b468b5b36e 100644 --- a/lily/include/lyric-combine-music.hh +++ b/lily/include/lyric-combine-music.hh @@ -15,8 +15,8 @@ class Lyric_combine_music : public Music { public: - Music * music_l () const; - Music * lyrics_l () const; + Music * get_music () const; + Music * get_lyrics () const; Lyric_combine_music (); Lyric_combine_music (SCM); diff --git a/lily/include/lyric-phrasing-engraver.hh b/lily/include/lyric-phrasing-engraver.hh index db170135bf..d3a8339d2a 100644 --- a/lily/include/lyric-phrasing-engraver.hh +++ b/lily/include/lyric-phrasing-engraver.hh @@ -86,20 +86,20 @@ private: */ Protected_scm voice_alist_; - Grob * any_notehead_l_; + Grob * any_notehead_; }; class Syllable_group { bool first_in_phrase_b_; - Grob * notehead_l_; + Grob * notehead_; Link_array lyric_list_; - Grob * longest_lyric_l_; - Grob * shortest_lyric_l_; - int alignment_i_; + Grob * longest_lyric_; + Grob * shortest_lyric_; + int alignment_; bool melisma_b_; - Real group_translation_f_; + Real group_translation_; public: static SCM make_entry (); void set_first_in_phrase (bool f); @@ -111,7 +111,7 @@ public: int lyric_count () { return lyric_list_.size (); } void clear (); bool is_empty (); - bool set_lyric_align (const char *punc, Grob *default_notehead_l); + bool set_lyric_align (const char *punc, Grob *default_notehead); void adjust_melisma_align (); int appropriate_alignment (const char *punc); Real amount_to_translate (); diff --git a/lily/include/main.hh b/lily/include/main.hh index 80c18a3e83..ff061cde45 100644 --- a/lily/include/main.hh +++ b/lily/include/main.hh @@ -36,10 +36,10 @@ extern bool internal_type_checking_global_b; /* misc */ -extern All_font_metrics *all_fonts_global_p; +extern All_font_metrics *all_fonts_global; extern int exit_status_global; extern File_path global_path; extern int score_count_global; -extern Sources* source_global_l; +extern Sources* source_global; #endif /* MAIN_HH */ diff --git a/lily/include/midi-def.hh b/lily/include/midi-def.hh index b1233d7aa7..4363b9b028 100644 --- a/lily/include/midi-def.hh +++ b/lily/include/midi-def.hh @@ -20,14 +20,14 @@ definitions for midi output. Rather empty */ class Midi_def : public Music_output_def { - static int score_count_i_; + static int score_count_; public: VIRTUAL_COPY_CONS (Music_output_def); Midi_def (); - int get_tempo_i (Moment moment); + int get_tempo (Moment moment); void set_tempo (Moment moment, int count_per_minute_i); virtual int get_next_score_count () const; static void reset_score_count (); diff --git a/lily/include/midi-item.hh b/lily/include/midi-item.hh index cbf9a6740f..8739912a6d 100644 --- a/lily/include/midi-item.hh +++ b/lily/include/midi-item.hh @@ -25,13 +25,13 @@ public: virtual ~Midi_item (); /// factory - static Midi_item* midi_p (Audio_item* a); + static Midi_item* get_midi (Audio_item* a); - static String i2varint_str (int i); + static String i2varint_string (int i); - virtual String str () const = 0; + virtual String string () const = 0; - int channel_i_; + int channel_; }; /** @@ -40,11 +40,11 @@ public: class Midi_event { public: - Midi_event (Moment delta_mom, Midi_item* midi_l); + Midi_event (Moment delta_mom, Midi_item* midi); Moment delta_mom_; - Midi_item* midi_p_; - String str () const; + Midi_item* midi_; + String string () const; }; /** @@ -53,14 +53,14 @@ public: class Midi_chunk : public Midi_item { public: - void set (String header_str, String data_str, String footer_str); - virtual String str () const; - virtual String data_str () const; + void set (String header_string, String data_string, String footer_string); + virtual String string () const; + virtual String data_string () const; private: - String data_str_; - String footer_str_; - String header_str_; + String data_string_; + String footer_string_; + String header_string_; }; class Midi_duration : public Midi_item @@ -68,8 +68,8 @@ class Midi_duration : public Midi_item public: Midi_duration (Real seconds_f); - virtual String str () const; - Real seconds_f_; + virtual String string () const; + Real seconds_; }; class Midi_header : public Midi_chunk @@ -86,9 +86,9 @@ class Midi_instrument : public Midi_item public: Midi_instrument (Audio_instrument*); - virtual String str () const; + virtual String string () const; - Audio_instrument* audio_l_; + Audio_instrument* audio_; }; @@ -97,9 +97,9 @@ class Midi_key : public Midi_item public: Midi_key (Audio_key*); - virtual String str () const; + virtual String string () const; - Audio_key* audio_l_; + Audio_key* audio_; }; class Midi_time_signature : public Midi_item @@ -107,10 +107,10 @@ class Midi_time_signature : public Midi_item public: Midi_time_signature (Audio_time_signature*); - virtual String str () const; + virtual String string () const; - Audio_time_signature* audio_l_; - int clocks_per_1_i_; + Audio_time_signature* audio_; + int clocks_per_1_; }; /** @@ -122,12 +122,12 @@ public: Midi_note (Audio_note*); Moment length_mom () const; - int pitch_i () const; - virtual String str () const; + int get_pitch () const; + virtual String string () const; - Audio_note* audio_l_; + Audio_note* audio_; - static int const c0_pitch_i_c_ = 60; + static int const c0_pitch_i_ = 60; Byte dynamic_byte_; }; @@ -139,9 +139,9 @@ class Midi_note_off : public Midi_note public: Midi_note_off (Midi_note*); - virtual String str () const; + virtual String string () const; - Midi_note* on_l_; + Midi_note* on_; Byte aftertouch_byte_; }; @@ -155,9 +155,9 @@ public: Midi_text (Audio_text*); - virtual String str () const; + virtual String string () const; - Audio_text* audio_l_; + Audio_text* audio_; }; class Midi_dynamic : public Midi_item @@ -165,9 +165,9 @@ class Midi_dynamic : public Midi_item public: Midi_dynamic (Audio_dynamic*); - virtual String str () const; + virtual String string () const; - Audio_dynamic* audio_l_; + Audio_dynamic* audio_; }; class Midi_piano_pedal : public Midi_item @@ -175,9 +175,9 @@ class Midi_piano_pedal : public Midi_item public: Midi_piano_pedal (Audio_piano_pedal*); - virtual String str () const; + virtual String string () const; - Audio_piano_pedal* audio_l_; + Audio_piano_pedal* audio_; }; class Midi_tempo : public Midi_item @@ -185,15 +185,15 @@ class Midi_tempo : public Midi_item public: Midi_tempo (Audio_tempo*); - virtual String str () const; + virtual String string () const; - Audio_tempo* audio_l_; + Audio_tempo* audio_; }; class Midi_track : public Midi_chunk { public: - int number_i_; + int number_; /* Compensate for starting grace notes. @@ -202,8 +202,8 @@ public: Midi_track (); - void add (Moment delta_time_mom, Midi_item* midi_l); - virtual String data_str () const; + void add (Moment delta_time_mom, Midi_item* midi); + virtual String data_string () const; }; #endif // MIDI_ITEM_HH diff --git a/lily/include/midi-stream.hh b/lily/include/midi-stream.hh index 995c048332..67a5bac7a1 100644 --- a/lily/include/midi-stream.hh +++ b/lily/include/midi-stream.hh @@ -12,7 +12,7 @@ /// Midi outputfile struct Midi_stream { - Midi_stream (String filename_str); + Midi_stream (String filename_string); ~Midi_stream (); Midi_stream& operator << ( String str); @@ -21,8 +21,8 @@ struct Midi_stream { void open (); - std::ostream* os_p_; - String filename_str_; + std::ostream* os_; + String filename_string_; }; #endif // MIDI_STREAM_HH diff --git a/lily/include/midi-walker.hh b/lily/include/midi-walker.hh index ee83933997..1f1f50ba1c 100644 --- a/lily/include/midi-walker.hh +++ b/lily/include/midi-walker.hh @@ -26,7 +26,7 @@ int compare (Midi_note_event const& left, Midi_note_event const& right); class Midi_walker { public: - Midi_walker (Audio_staff* audio_staff_l, Midi_track* midi_track_l); + Midi_walker (Audio_staff* audio_staff, Midi_track* midi_track); ~Midi_walker (); void process (); @@ -34,14 +34,14 @@ public: bool ok () const; private: - void do_start_note (Midi_note* note_p); + void do_start_note (Midi_note* note); void do_stop_notes (Moment now_mom); void output_event (Moment now_mom, Midi_item* l); - Midi_track* track_l_; - Audio_staff* staff_l_; + Midi_track* track_; + Audio_staff* staff_; int index_; - Link_array * item_l_arr_l_; + Link_array * items_; PQueue stop_note_queue; Moment last_mom_; }; diff --git a/lily/include/moment.hh b/lily/include/moment.hh index 96f2843cef..65f42149d3 100644 --- a/lily/include/moment.hh +++ b/lily/include/moment.hh @@ -47,7 +47,7 @@ public: Deliver a copy of THIS as a smobified SCM */ SCM smobbed_copy () const; - String str () const; + String string () const; static int compare (Moment const&, Moment const&); }; diff --git a/lily/include/music-iterator.hh b/lily/include/music-iterator.hh index 25f6a93ebb..759a55abb7 100644 --- a/lily/include/music-iterator.hh +++ b/lily/include/music-iterator.hh @@ -80,14 +80,14 @@ public: /** The translation unit that we this iterator is reporting to now. */ - Translator_group* report_to_l () const; + Translator_group* report_to () const; void set_translator (Translator_group*); /** Get an iterator matching the type of MUS, and use TRANS to find an accompanying translation unit */ - static Music_iterator* static_get_iterator_p (Music * mus); + static Music_iterator* get_static_get_iterator (Music * mus); void init_translator (Music *, Translator_group *); virtual Moment pending_moment () const; @@ -106,14 +106,14 @@ public: /** Get an iterator for MUS, inheriting the translation unit from THIS. */ - Music_iterator* get_iterator_p (Music *) const; + Music_iterator* get_iterator (Music *) const; virtual Music_iterator* try_music_in_children (Music *) const; - Music * music_l () const; + Music * get_music () const; private: Interpretation_context_handle handle_; - Music * music_l_; + Music * music_; }; diff --git a/lily/include/music-output-def.hh b/lily/include/music-output-def.hh index 54b8954c53..0b554ffdec 100644 --- a/lily/include/music-output-def.hh +++ b/lily/include/music-output-def.hh @@ -34,11 +34,11 @@ public: Music_output_def (); virtual int get_next_score_count () const; - Global_translator *get_global_translator_p (); - Translator_group *get_group_translator_p (String type) const; + Global_translator *get_global_translator (); + Translator_group *get_group_translator (String type) const; void assign_translator (SCM transdef); - SCM find_translator_l (SCM name) const; - String outname_str () ; + SCM find_translator (SCM name) const; + String outname_string () ; DECLARE_SMOBS (Music_output_def,); }; diff --git a/lily/include/music-output.hh b/lily/include/music-output.hh index c15ac41ff5..d8efb9314a 100644 --- a/lily/include/music-output.hh +++ b/lily/include/music-output.hh @@ -19,16 +19,16 @@ class Music_output { public: - Scheme_hash_table * header_l_; - String default_out_str_; - String origin_str_; - int errorlevel_i_; + Scheme_hash_table * header_; + String default_out_string_; + String origin_string_; + int errorlevel_; virtual void process () {} virtual ~Music_output (){} Music_output () { - errorlevel_i_ = 0; + errorlevel_ = 0; } }; diff --git a/lily/include/music-wrapper-iterator.hh b/lily/include/music-wrapper-iterator.hh index 62f60b272a..ad031f588d 100644 --- a/lily/include/music-wrapper-iterator.hh +++ b/lily/include/music-wrapper-iterator.hh @@ -37,7 +37,7 @@ protected: virtual void process (Moment); virtual Music_iterator *try_music_in_children (Music *) const; - Music_iterator *child_iter_p_; + Music_iterator *child_iter_; }; #endif /* MUSIC_WRAPPER_ITERATOR_HH */ diff --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index efcde57b4f..f7f62efc35 100644 --- a/lily/include/musical-request.hh +++ b/lily/include/musical-request.hh @@ -61,7 +61,7 @@ protected: class Articulation_req : public Script_req { public: - String get_articulation_str (); + String get_articulation_string (); protected: virtual bool do_equal_b (Request const*) const; diff --git a/lily/include/my-lily-lexer.hh b/lily/include/my-lily-lexer.hh index 40701e2355..8bdcd6ee47 100644 --- a/lily/include/my-lily-lexer.hh +++ b/lily/include/my-lily-lexer.hh @@ -29,8 +29,8 @@ void set_lexer (); class My_lily_lexer : public Includable_lexer { public: - String main_input_str_; - void * lexval_l; + String main_input_string_; + void * lexval; Scheme_hash_table * toplevel_variable_tab_; bool main_input_b_; @@ -40,9 +40,9 @@ public: Protected_scm chordmodifier_tab_; Protected_scm pitchname_tab_; - Link_array scope_l_arr_; - Keyword_table * keytable_p_; - int errorlevel_i_; + Link_array scopes_; + Keyword_table * keytable_; + int errorlevel_; My_lily_lexer (); ~My_lily_lexer (); @@ -59,7 +59,7 @@ public: void push_lyric_state (); void pop_state (); void LexerError (char const *); - void set_identifier (SCM name_str, SCM); + void set_identifier (SCM name_string, SCM); bool note_state_b () const; bool chord_state_b () const; bool lyric_state_b () const; diff --git a/lily/include/my-lily-parser.hh b/lily/include/my-lily-parser.hh index b0482d7458..8d514f7b7d 100644 --- a/lily/include/my-lily-parser.hh +++ b/lily/include/my-lily-parser.hh @@ -30,23 +30,23 @@ class My_lily_parser { public: - My_lily_parser (Sources * sources_l); + My_lily_parser (Sources * sources); ~My_lily_parser (); void do_init_file (); - void parse_file ( String init_str, String file_str); + void parse_file ( String init_string, String file_string); void set_version_check (bool ignore); public: Duration default_duration_; - Scheme_hash_table *default_header_p_; + Scheme_hash_table *default_header_; - int fatal_error_i_; - Sources * source_l_; - int error_level_i_; + int fatal_error_; + Sources * source_; + int error_level_; - My_lily_lexer * lexer_p_; + My_lily_lexer * lexer_; bool ignore_version_b_; SCM last_beam_start_; @@ -65,13 +65,13 @@ public: DECLARE_SCHEME_CALLBACK (paper_description, ()); private: - Array define_spot_array_; + Array define_spots_; - char const* here_ch_C () const; + char const* here_str0 () const; - Simultaneous_music * get_chord (Pitch tonic, Array* add_arr_p, - Array* sub_arr_p, Pitch* inversion_p, - Pitch* bass_p, Duration d); + Simultaneous_music * get_chord (Pitch tonic, Array* adds, + Array* subs, Pitch* inversion, + Pitch* bass, Duration d); void set_chord_tremolo (int type_i); void set_last_duration (Duration const *); diff --git a/lily/include/note-collision.hh b/lily/include/note-collision.hh index f15b950be0..c355819c4c 100644 --- a/lily/include/note-collision.hh +++ b/lily/include/note-collision.hh @@ -36,7 +36,7 @@ public: static Drul_array< Link_array > get_clash_groups (Grob *me); DECLARE_SCHEME_CALLBACK (force_shift_callback, (SCM element, SCM axis)); static void do_shifts (Grob*); - static void add_column (Grob*me,Grob*ncol_l); + static void add_column (Grob*me,Grob*ncol); static bool has_interface(Grob*); }; #endif // COLLISION_HH diff --git a/lily/include/note-column.hh b/lily/include/note-column.hh index 7279048660..688ff1400b 100644 --- a/lily/include/note-column.hh +++ b/lily/include/note-column.hh @@ -41,7 +41,7 @@ public: static bool rest_b (Grob*me); static bool has_interface (Grob*); - static Item *stem_l (Grob*); + static Item *get_stem (Grob*); }; #endif // NOTE_COLUMN_HH diff --git a/lily/include/note-head.hh b/lily/include/note-head.hh index aba379dec6..e5dee66a61 100644 --- a/lily/include/note-head.hh +++ b/lily/include/note-head.hh @@ -27,7 +27,7 @@ public: DECLARE_SCHEME_CALLBACK (brew_ez_molecule, (SCM )); static bool has_interface (Grob*); static Real stem_attachment_coordinate (Grob *, Axis a); - static int balltype_i (Grob*) ; + static int get_balltype (Grob*) ; }; #endif // NOTEHEAD_HH diff --git a/lily/include/paper-column.hh b/lily/include/paper-column.hh index ed1d0edc49..b7bb944576 100644 --- a/lily/include/paper-column.hh +++ b/lily/include/paper-column.hh @@ -20,15 +20,15 @@ public: VIRTUAL_COPY_CONS (Grob); static bool has_interface (Grob*); - int rank_i_; + int rank_; virtual void do_break_processing (); - virtual Paper_column *column_l () const; + virtual Paper_column *get_column () const; virtual System *get_system () const; /// if lines are broken then this column is in #line# System *system_; - static int rank_i (Grob*); + static int get_rank (Grob*); DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM)); DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM)); diff --git a/lily/include/paper-def.hh b/lily/include/paper-def.hh index 5987e6527f..2744224538 100644 --- a/lily/include/paper-def.hh +++ b/lily/include/paper-def.hh @@ -52,7 +52,7 @@ protected: public: SCM font_descriptions ()const; virtual ~Paper_def (); - static int score_count_i_; + static int score_count_; /* JUNKME @@ -70,7 +70,7 @@ public: virtual int get_next_score_count () const; static void reset_score_count (); void output_settings (Paper_outputter*) const; - Paper_outputter* paper_outputter_p () ; + Paper_outputter* get_paper_outputter () ; Font_metric * find_font (SCM name, Real mag); diff --git a/lily/include/paper-score.hh b/lily/include/paper-score.hh index 8a46e6f93e..7fa408332e 100644 --- a/lily/include/paper-score.hh +++ b/lily/include/paper-score.hh @@ -25,9 +25,9 @@ class Paper_score : public Music_output { SCM main_smob_; public: - Paper_def *paper_l_; + Paper_def *paper_; - Paper_outputter *outputter_l_; + Paper_outputter *outputter_; System *system_; Paper_score (); diff --git a/lily/include/part-combine-music-iterator.hh b/lily/include/part-combine-music-iterator.hh index dce3f001ff..713c333048 100644 --- a/lily/include/part-combine-music-iterator.hh +++ b/lily/include/part-combine-music-iterator.hh @@ -34,8 +34,8 @@ private: void change_to (Music_iterator*, String, String); int get_state (Moment m); - Music_iterator * first_iter_p_; - Music_iterator * second_iter_p_; + Music_iterator * first_iter_; + Music_iterator * second_iter_; Moment first_until_; Moment second_until_; int state_; diff --git a/lily/include/part-combine-music.hh b/lily/include/part-combine-music.hh index 5284782f2b..289684e86e 100644 --- a/lily/include/part-combine-music.hh +++ b/lily/include/part-combine-music.hh @@ -19,8 +19,8 @@ public: VIRTUAL_COPY_CONS (Music); Part_combine_music (SCM l); - Music * first_l () const; - Music * second_l () const; + Music * get_first () const; + Music * get_second () const; virtual void transpose (Pitch); diff --git a/lily/include/percent-repeat-iterator.hh b/lily/include/percent-repeat-iterator.hh index 71d220224d..c73e995cb9 100644 --- a/lily/include/percent-repeat-iterator.hh +++ b/lily/include/percent-repeat-iterator.hh @@ -28,7 +28,7 @@ protected: virtual Music_iterator *try_music_in_children (Music *) const; private: - Music_iterator * child_iter_p_; + Music_iterator * child_iter_; Moment finish_mom_; }; diff --git a/lily/include/performance.hh b/lily/include/performance.hh index 48382aedfb..6d5006ed17 100644 --- a/lily/include/performance.hh +++ b/lily/include/performance.hh @@ -29,9 +29,9 @@ public: void print () const; void process (); - Link_array audio_staff_l_arr_; + Link_array audio_staffs_; Cons *audio_elem_p_list_; - Midi_def * midi_l_; + Midi_def * midi_; }; #endif // PERFORMANCE_HH diff --git a/lily/include/performer-group-performer.hh b/lily/include/performer-group-performer.hh index c027dd5a86..5c62007166 100644 --- a/lily/include/performer-group-performer.hh +++ b/lily/include/performer-group-performer.hh @@ -24,7 +24,7 @@ public: virtual void do_announces (); virtual void announce_element (Audio_element_info); protected: - Array announce_info_arr_; + Array announce_infos_; void create_audio_elements (); private: diff --git a/lily/include/performer.hh b/lily/include/performer.hh index c3e40c4296..740aed658c 100644 --- a/lily/include/performer.hh +++ b/lily/include/performer.hh @@ -23,14 +23,14 @@ class Performer : public virtual Translator public: VIRTUAL_COPY_CONS (Translator); friend class Performer_group_performer; - Performer_group_performer* daddy_perf_l () const; + Performer_group_performer* get_daddy_perf () const; protected: virtual void announce_element (Audio_element_info); virtual void acknowledge_audio_element (Audio_element_info); virtual void create_audio_elements (); - virtual int get_tempo_i () const; - virtual void play_element (Audio_element * elem_p ); + virtual int get_tempo () const; + virtual void play_element (Audio_element * elem ); }; diff --git a/lily/include/pitch.hh b/lily/include/pitch.hh index fca3791ee9..14db50a263 100644 --- a/lily/include/pitch.hh +++ b/lily/include/pitch.hh @@ -26,13 +26,13 @@ public: // fixme */ /// 0 is c, 6 is b - int notename_i_; + int notename_; /// 0 natural, 1 sharp, etc - int alteration_i_; + int alteration_; /// 0 is central c - int octave_i_; + int octave_; /* mutators, so JUNKME. */ @@ -42,9 +42,9 @@ public: // fixme public: - int octave_i () const; - int notename_i () const; - int alteration_i () const; + int get_octave () const; + int get_notename () const; + int get_alteration () const; void normalise (); /* @@ -61,7 +61,7 @@ public: int steps () const; /// return pitch from central c (in halfnotes) int semitone_pitch () const; - String str () const; + String string () const; diff --git a/lily/include/request-chord-iterator.hh b/lily/include/request-chord-iterator.hh index 08532a5df4..645b1c200b 100644 --- a/lily/include/request-chord-iterator.hh +++ b/lily/include/request-chord-iterator.hh @@ -17,11 +17,11 @@ */ class Request_chord_iterator : public Simple_music_iterator { - Request_chord * elt_l () const; + Request_chord * get_elt () const; /** Find a bottom notation context to deliver requests to. */ - virtual Translator_group* get_req_translator_l (); + virtual Translator_group* get_req_translator (); /* diff --git a/lily/include/request.hh b/lily/include/request.hh index b612cb76fb..34bbf79f6a 100644 --- a/lily/include/request.hh +++ b/lily/include/request.hh @@ -52,8 +52,8 @@ public: */ class Span_req : public virtual Request { public: - String get_span_type_str () const; - void set_span_type_str (String); + String get_span_type_string () const; + void set_span_type_string (String); void set_span_dir (Direction d); Direction get_span_dir () const; diff --git a/lily/include/rhythmic-head.hh b/lily/include/rhythmic-head.hh index 1da23356b1..c1f70e66f7 100644 --- a/lily/include/rhythmic-head.hh +++ b/lily/include/rhythmic-head.hh @@ -18,8 +18,8 @@ class Rhythmic_head public: static int duration_log (Grob*); static void set_dots (Grob*,Item *); - static Item * stem_l (Grob*) ; - static Item * dots_l (Grob*) ; + static Item * get_stem (Grob*) ; + static Item * get_dots (Grob*) ; static int dot_count (Grob*) ; DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM )); static bool has_interface (Grob*); diff --git a/lily/include/rod.hh b/lily/include/rod.hh index a493cd5ba6..491b5cff5f 100644 --- a/lily/include/rod.hh +++ b/lily/include/rod.hh @@ -17,7 +17,7 @@ struct Rod { Drul_array item_l_drul_; - Real distance_f_; + Real distance_; /** translate the rod so as to refer to Paper_columns diff --git a/lily/include/scaled-font-metric.hh b/lily/include/scaled-font-metric.hh index 9192da365b..9bf35f619d 100644 --- a/lily/include/scaled-font-metric.hh +++ b/lily/include/scaled-font-metric.hh @@ -23,8 +23,8 @@ struct Scaled_font_metric : public Font_metric virtual int count () const; protected: virtual Box get_char (int)const; - Font_metric *orig_l_; - Real magnification_f_; + Font_metric *orig_; + Real magnification_; Scaled_font_metric (Font_metric*,Real); }; diff --git a/lily/include/score-engraver.hh b/lily/include/score-engraver.hh index 90cf036259..390a4451e5 100644 --- a/lily/include/score-engraver.hh +++ b/lily/include/score-engraver.hh @@ -20,29 +20,29 @@ class Score_engraver : public Engraver_group_engraver, public Global_translator { System *system_; - int breaks_i_; + int breaks_; - Link_array elem_p_arr_; + Link_array elems_; - Paper_column* command_column_l_; - Paper_column* musical_column_l_; + Paper_column* command_column_; + Paper_column* musical_column_; void make_columns (); void set_columns (Paper_column*,Paper_column*); void typeset_all (); public: TRANSLATOR_DECLARATIONS(Score_engraver); - Paper_score * pscore_p_; + Paper_score * pscore_; void forbid_breaks (); - virtual Music_output *get_output_p (); + virtual Music_output *get_output (); protected: virtual void prepare (Moment); virtual void finish (); virtual void one_time_step (); - virtual int depth_i () const { return Global_translator::depth_i ();} + virtual int get_depth () const { return Global_translator::get_depth ();} protected: /* Engraver_group_engraver interface */ @@ -52,7 +52,7 @@ protected: virtual void initialize (); virtual void finalize (); virtual void announce_grob (Grob_info); - virtual void typeset_grob (Grob*elem_p); + virtual void typeset_grob (Grob*elem); virtual void stop_translation_timestep (); }; diff --git a/lily/include/score-performer.hh b/lily/include/score-performer.hh index 792ab2d886..1c7f73404b 100644 --- a/lily/include/score-performer.hh +++ b/lily/include/score-performer.hh @@ -20,7 +20,7 @@ class Score_performer: public: TRANSLATOR_DECLARATIONS(Score_performer); ~Score_performer (); - Performance *performance_p_; + Performance *performance_; protected: virtual void finish (); @@ -29,14 +29,14 @@ protected: virtual void start (); virtual void initialize (); virtual void announce_element (Audio_element_info); - virtual int get_tempo_i () const; + virtual int get_tempo () const; virtual void play_element (Audio_element* p); - virtual Music_output *get_output_p (); + virtual Music_output *get_output (); private: void header (Midi_stream&); - Audio_column* audio_column_l_; + Audio_column* audio_column_; }; #endif // SCORE_PERFORMER_HH diff --git a/lily/include/score.hh b/lily/include/score.hh index 91db170187..ff0a311243 100644 --- a/lily/include/score.hh +++ b/lily/include/score.hh @@ -20,11 +20,11 @@ class Score: public Input { public: /// paper_, staves_ and commands_ form the problem definition. - Link_array def_p_arr_; + Link_array defs_; SCM music_; - Scheme_hash_table * header_p_; + Scheme_hash_table * header_; - int errorlevel_i_; + int errorlevel_; /// construction Score (); @@ -32,7 +32,7 @@ public: void process (); - void add_output (Music_output_def *def_p); + void add_output (Music_output_def *def); DECLARE_SMOBS (Score,foo); private: void run_translator (Music_output_def*); diff --git a/lily/include/sequential-iterator.hh b/lily/include/sequential-iterator.hh index 5749b88fbf..09159dac36 100644 --- a/lily/include/sequential-iterator.hh +++ b/lily/include/sequential-iterator.hh @@ -71,7 +71,7 @@ protected: protected: Moment here_mom_; - Music_iterator * iter_p_; + Music_iterator * iter_; Protected_scm list_; SCM cursor_; diff --git a/lily/include/simple-spacer.hh b/lily/include/simple-spacer.hh index cbb9cfe7b0..4fd52e591d 100644 --- a/lily/include/simple-spacer.hh +++ b/lily/include/simple-spacer.hh @@ -16,11 +16,11 @@ struct Spring_description { - Real ideal_f_; - Real hooke_f_; + Real ideal_; + Real hooke_; bool active_b_; - Real block_force_f_; + Real block_force_; Real length (Real force) const; Spring_description (); @@ -33,10 +33,10 @@ struct Simple_spacer Array springs_; Link_array spaced_cols_; Link_array loose_cols_; - Real force_f_; - Real indent_f_; - Real line_len_f_; - Real default_space_f_; + Real force_; + Real indent_; + Real line_len_; + Real default_space_; int active_count_; bool compression_penalty_b_; diff --git a/lily/include/simultaneous-music-iterator.hh b/lily/include/simultaneous-music-iterator.hh index 555a49652b..8d25491da1 100644 --- a/lily/include/simultaneous-music-iterator.hh +++ b/lily/include/simultaneous-music-iterator.hh @@ -24,7 +24,7 @@ public: /// make a new context for every child. bool separate_contexts_b_; - int cursor_i_; + int cursor_; virtual void construct_children (); virtual Moment pending_moment () const; diff --git a/lily/include/slur-bezier-bow.hh b/lily/include/slur-bezier-bow.hh index f690b202fe..63fd5749ff 100644 --- a/lily/include/slur-bezier-bow.hh +++ b/lily/include/slur-bezier-bow.hh @@ -35,9 +35,9 @@ public: void minimise_enclosed_area (Real beauty, SCM props); Real fit_factor () const; void blow_fit (); - Real enclosed_area_f () const; + Real get_enclosed_area () const; private: - Array area_x_gradients_array (Real area); + Array area_x_gradientses (Real area); }; #endif /* SLUR_BEZIER_BOW_HH */ diff --git a/lily/include/slur.hh b/lily/include/slur.hh index c711310415..8bd33b21ea 100644 --- a/lily/include/slur.hh +++ b/lily/include/slur.hh @@ -18,7 +18,7 @@ public: DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM)); static void set_interface (Grob*); static bool has_interface (Grob*); - static Array get_encompass_offset_arr (Grob *me); + static Array get_encompass_offsets (Grob *me); static Bezier get_curve (Grob *me); static Direction get_default_dir (Grob *me); DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM)); diff --git a/lily/include/spanner.hh b/lily/include/spanner.hh index 63274734bd..1dcc0b3c0e 100644 --- a/lily/include/spanner.hh +++ b/lily/include/spanner.hh @@ -35,7 +35,7 @@ class Spanner : public Grob { public: DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM)); - Link_array broken_into_l_arr_; + Link_array broken_intos_; // todo: move to somewhere else. Real get_broken_left_end_align () const; diff --git a/lily/include/spring.hh b/lily/include/spring.hh index 94db15a7a0..af5821e9a1 100644 --- a/lily/include/spring.hh +++ b/lily/include/spring.hh @@ -17,9 +17,9 @@ struct Spring_smob { Grob *other_; - Real distance_f_; + Real distance_; bool expand_only_b_; - Real strength_f_; + Real strength_; DECLARE_SIMPLE_SMOBS(Spring_smob,dummy); public: @@ -30,13 +30,13 @@ DECLARE_UNSMOB(Spring_smob, spring); struct Spring{ Drul_array item_l_drul_; - Real distance_f_; + Real distance_; bool expand_only_b_; /* TODO: make 2 strengths: one for stretching, and one for shrinking. */ - Real strength_f_; + Real strength_; void add_to_cols (); void set_to_cols (); Spring (); diff --git a/lily/include/staff-symbol-referencer.hh b/lily/include/staff-symbol-referencer.hh index 531497d988..78f76d3f14 100644 --- a/lily/include/staff-symbol-referencer.hh +++ b/lily/include/staff-symbol-referencer.hh @@ -33,11 +33,11 @@ public: */ static Real staff_space (Grob*); - static Grob * staff_symbol_l (Grob*); + static Grob * get_staff_symbol (Grob*); static bool on_staffline (Grob*); static bool on_staffline (Grob*,int); static int line_count (Grob*); - static Real position_f (Grob*); + static Real get_position (Grob*); static Real staff_radius (Grob*); }; diff --git a/lily/include/staff-symbol.hh b/lily/include/staff-symbol.hh index 497b7472fe..0f2419525c 100644 --- a/lily/include/staff-symbol.hh +++ b/lily/include/staff-symbol.hh @@ -20,7 +20,7 @@ class Staff_symbol { public: static Real staff_space (Grob*) ; - static int steps_i (Grob*) ; + static int get_steps (Grob*) ; static int line_count (Grob*); DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM )); static bool has_interface (Grob*); diff --git a/lily/include/stem.hh b/lily/include/stem.hh index db82579fd3..0ffdc8bf16 100644 --- a/lily/include/stem.hh +++ b/lily/include/stem.hh @@ -20,7 +20,7 @@ public: static Array note_head_positions (Grob*); static int duration_log (Grob*) ; static void set_beaming (Grob*,int, Direction d); - static Grob * beam_l (Grob*); + static Grob * get_beam (Grob*); static Grob * first_head (Grob*) ; static Grob * last_head (Grob*) ; static Drul_array extremal_heads (Grob*); diff --git a/lily/include/system.hh b/lily/include/system.hh index e02e890c49..8921eb62f1 100644 --- a/lily/include/system.hh +++ b/lily/include/system.hh @@ -22,7 +22,7 @@ represents a system (i.e. a line of music). class System : public Spanner { public: - int rank_i_; + int rank_; void post_processing (bool); System (SCM); @@ -35,7 +35,7 @@ public: static bool has_interface (Grob*); Link_array broken_col_range (Item const*, Item const*) const; - Link_array column_l_arr () const; + Link_array columns () const; void add_column (Paper_column*); void typeset_grob (Grob*); diff --git a/lily/include/tfm-reader.hh b/lily/include/tfm-reader.hh index cb3955f96f..06e14a4e0e 100644 --- a/lily/include/tfm-reader.hh +++ b/lily/include/tfm-reader.hh @@ -19,15 +19,15 @@ class Tex_font_metric_reader { private: - Real get_U32_fix_f (); - Real get_U32_fix_scaled_f (); - String get_bcpl_str (); + Real get_U32_fix (); + Real get_U32_fix_scaled (); + String get_bcpl_string (); void read_header (); void read_params (); void read_char_metrics (); Tex_font_char_metric read_char_metric (Char_code code); Tex_font_char_metric read_char (); - void read_lig_kern_program (Array* ligature_arr_p, Array * kern_arr_p); + void read_lig_kern_program (Array* ligatures, Array * kerns); Binary_source_file input_; diff --git a/lily/include/tfm.hh b/lily/include/tfm.hh index 5d0d2f1189..53cfa1c140 100644 --- a/lily/include/tfm.hh +++ b/lily/include/tfm.hh @@ -135,10 +135,10 @@ struct Tex_font_char_metric Char_code code_; Real width_, height_, depth_, italic_correction_; Fix width_fix_, height_fix_, depth_fix_, italic_correction_fix_; - Array kern_arr_; - Array ligature_arr_; + Array kerns_; + Array ligatures_; - String str () const; + String string () const; Tex_font_char_metric (); Box dimensions () const; @@ -154,7 +154,7 @@ public: virtual Box get_char (int) const; Tex_font_char_metric const *find_ascii (int ascii, bool warn=true) const; - String str () const; + String string () const; diff --git a/lily/include/tie.hh b/lily/include/tie.hh index 76592aefa8..186da434a9 100644 --- a/lily/include/tie.hh +++ b/lily/include/tie.hh @@ -17,11 +17,11 @@ class Tie { public: - static void set_head (Grob*,Direction, Item*head_l); + static void set_head (Grob*,Direction, Item*head); static void set_interface (Grob*); static bool has_interface (Grob*); static Grob * head (Grob*,Direction) ; - static Real position_f (Grob*) ; + static Real get_position (Grob*) ; DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM )); static Direction get_default_dir (Grob*) ; static SCM get_control_points (SCM); diff --git a/lily/include/translator-change.hh b/lily/include/translator-change.hh index 3dbaa9090a..d372c27a0c 100644 --- a/lily/include/translator-change.hh +++ b/lily/include/translator-change.hh @@ -10,8 +10,8 @@ #ifndef TRANSLATOR_CHANGE_HH #define TRANSLATOR_CHANGE_HH -/** Change the nesting of the current translation. Uses the type_str_ - and id_str_ differently. +/** Change the nesting of the current translation. Uses the type_string_ + and id_string_ differently. */ class Translator_change : public Music { diff --git a/lily/include/translator-def.hh b/lily/include/translator-def.hh index 5973f9bee1..15dd6b5d9a 100644 --- a/lily/include/translator-def.hh +++ b/lily/include/translator-def.hh @@ -45,7 +45,7 @@ public: void add_push_property (SCM,SCM,SCM); void add_pop_property (SCM,SCM); void add_property_assign (SCM, SCM); - Link_array path_to_acceptable_translator (SCM type_str, Music_output_def* odef) const; + Link_array path_to_acceptable_translator (SCM type_string, Music_output_def* odef) const; Translator_group * instantiate (Music_output_def*); SCM to_alist () const; diff --git a/lily/include/translator-group.hh b/lily/include/translator-group.hh index 74a3490d3c..c4582238f0 100644 --- a/lily/include/translator-group.hh +++ b/lily/include/translator-group.hh @@ -45,25 +45,25 @@ public: void internal_set_property (SCM var_sym, SCM value); Translator_group *where_defined (SCM name_sym) const; - String id_str_; + String id_string_; VIRTUAL_COPY_CONS (Translator); Translator_group (Translator_group const &); Translator_group (); - void add_fresh_group_translator (Translator *trans_p); - void add_used_group_translator (Translator *trans_p); + void add_fresh_group_translator (Translator *trans); + void add_used_group_translator (Translator *trans); /// Score_register = 0, Staff_registers = 1, etc) - Translator_group* ancestor_l (int l=1); - int depth_i () const; + Translator_group* get_ancestor (int l=1); + int get_depth () const; bool is_bottom_translator_b () const; bool removable_b () const; - void terminate_translator (Translator*r_l); - Translator *remove_translator_p (Translator*trans_l); + void terminate_translator (Translator*r); + Translator *remove_translator (Translator*trans); void check_removal (); // Translator *get_simple_translator (String) const; - Translator_group *find_existing_translator_l (String n, String id); - Translator_group *find_create_translator_l (String n, String id); + Translator_group *find_existing_translator (String n, String id); + Translator_group *find_create_translator (String n, String id); Link_array path_to_acceptable_translator (String alias, Music_output_def*) const; Translator_group*get_default_interpreter (); @@ -71,7 +71,7 @@ public: bool try_music_on_nongroup_children (Music *m); virtual void do_announces (); - virtual bool try_music (Music* req_l); + virtual bool try_music (Music* req); virtual void stop_translation_timestep (); virtual void start_translation_timestep (); virtual void initialize (); diff --git a/lily/include/translator.hh b/lily/include/translator.hh index 230fcba3d6..bcfc75b91f 100644 --- a/lily/include/translator.hh +++ b/lily/include/translator.hh @@ -36,8 +36,8 @@ class Translator { void init (); public: - Music_output_def * output_def_l_; - String type_str_; + Music_output_def * output_def_; + String type_string_; bool is_alias_b (String) const; @@ -45,12 +45,12 @@ public: Translator (Translator const &); - Translator_group * daddy_trans_l_ ; + Translator_group * daddy_trans_ ; void removal_processing (); /** ask daddy for a feature */ - Music_output_def *output_def_l () const; + Music_output_def *get_output_def () const; SCM internal_get_property (SCM symbol) const; @@ -77,7 +77,7 @@ public: true: request swallowed. Don't try to put the request elsewhere. */ - virtual bool try_music (Music *req_l); + virtual bool try_music (Music *req); virtual void stop_translation_timestep (); virtual void start_translation_timestep (); virtual void do_announces () ; @@ -95,7 +95,7 @@ static void _ ## T ## _adder () {\ T *t = new T;\ T::static_description_ = t->static_translator_description ();\ scm_permanent_object (T::static_description_);\ - t->type_str_ = classname (t);\ + t->type_string_ = classname (t);\ add_translator (t);\ }\ SCM T::translator_description() const\ @@ -136,9 +136,9 @@ classname::static_translator_description () const \ -extern Dictionary *global_translator_dict_p; -void add_translator (Translator*trans_p); +extern Dictionary *global_translator_dict; +void add_translator (Translator*trans); -Translator*get_translator_l (String s); +Translator*get_translator (String s); DECLARE_UNSMOB(Translator,translator); #endif // TRANSLATOR_HH diff --git a/lily/include/type-swallow-translator.hh b/lily/include/type-swallow-translator.hh index 20878b33ca..96a783a256 100644 --- a/lily/include/type-swallow-translator.hh +++ b/lily/include/type-swallow-translator.hh @@ -18,7 +18,7 @@ class Type_swallow_translator : public virtual Translator { protected: - String swallow_str_; + String swallow_string_; bool try_music (Music*); public: VIRTUAL_COPY_CONS (Translator); @@ -29,7 +29,7 @@ struct TYPE ## _swallow_translator : public Type_swallow_translator { \ TRANSLATOR_DECLARATIONS (TYPE ## _swallow_translator); \ }; \ TYPE ## _swallow_translator :: TYPE ## _swallow_translator() {\ - swallow_str_ = #TYPE; \ + swallow_string_ = #TYPE; \ } \ ENTER_DESCRIPTION(TYPE ## _swallow_translator, \ "Swallow requests of " #TYPE " type.", \ diff --git a/lily/input-smob.cc b/lily/input-smob.cc index 0ea9b3664c..2e45db0b8e 100644 --- a/lily/input-smob.cc +++ b/lily/input-smob.cc @@ -23,8 +23,8 @@ SCM mark_smob (SCM) static int print_smob (SCM s, SCM port, scm_print_state *) { - String str = "#location_str () + ">"; - scm_puts (str.ch_C (), port); + String str = "#location_string () + ">"; + scm_puts (str.to_str0 (), port); return 1; } @@ -39,7 +39,7 @@ free_smob (SCM s) We don't use IMPLEMENT_TYPE_P, since the smobification part is implemented separately from the class. */ -LY_DEFINE(ly_input_p, "ly-input-location?", 1, 0, 0, +LY_DEFINE(ly_input, "ly-input-location?", 1, 0, 0, (SCM x), "Return whether @var{x} is an input location") { @@ -53,7 +53,7 @@ location in @var{sip}.") Input *ip = unsmob_input(sip); SCM_ASSERT_TYPE(ip, sip, SCM_ARG1, __FUNCTION__, "input location"); - SCM_ASSERT_TYPE(gh_string_p(msg), msg, SCM_ARG2, __FUNCTION__, "string"); + SCM_ASSERT_TYPE(gh_string_p (msg), msg, SCM_ARG2, __FUNCTION__, "string"); String m = ly_scm2string (msg); diff --git a/lily/instrument-name-engraver.cc b/lily/instrument-name-engraver.cc index 650ebecc8e..0a72163b1f 100644 --- a/lily/instrument-name-engraver.cc +++ b/lily/instrument-name-engraver.cc @@ -42,7 +42,7 @@ Instrument_name_engraver::Instrument_name_engraver () void Instrument_name_engraver::initialize () { - daddy_trans_l_->set_property ("instrumentSupport", SCM_EOL); + daddy_trans_->set_property ("instrumentSupport", SCM_EOL); } void @@ -77,7 +77,7 @@ Instrument_name_engraver::create_text (SCM txt) void Instrument_name_engraver::acknowledge_grob (Grob_info i) { - if (Bar_line::has_interface (i.grob_l_)) + if (Bar_line::has_interface (i.grob_)) { SCM s = get_property ("instrument"); @@ -85,14 +85,14 @@ Instrument_name_engraver::acknowledge_grob (Grob_info i) s = get_property ("instr"); /* - FIXME: use markup_p () to check type. + FIXME: use get_markup () to check type. */ if (gh_string_p (s) || gh_pair_p (s)) create_text (s); } - if (dynamic_cast (i.grob_l_) - && i.grob_l_->internal_has_interface (ly_symbol2scm ("dynamic-interface"))) + if (dynamic_cast (i.grob_) + && i.grob_->internal_has_interface (ly_symbol2scm ("dynamic-interface"))) return; /* @@ -106,15 +106,15 @@ Instrument_name_engraver::acknowledge_grob (Grob_info i) without staffs as well. */ - if (dynamic_cast (i.grob_l_) - && ((Axis_group_interface::has_interface (i.grob_l_) - && Axis_group_interface::axis_b (i.grob_l_, Y_AXIS))) - && !Align_interface::has_interface (i.grob_l_)) + if (dynamic_cast (i.grob_) + && ((Axis_group_interface::has_interface (i.grob_) + && Axis_group_interface::axis_b (i.grob_, Y_AXIS))) + && !Align_interface::has_interface (i.grob_)) { - SCM nl = gh_cons (i.grob_l_->self_scm (), + SCM nl = gh_cons (i.grob_->self_scm (), get_property ("instrumentSupport")); - daddy_trans_l_->set_property ("instrumentSupport", nl); + daddy_trans_->set_property ("instrumentSupport", nl); } } diff --git a/lily/interpretation-context-handle.cc b/lily/interpretation-context-handle.cc index 176dbbe97d..3c1e38153a 100644 --- a/lily/interpretation-context-handle.cc +++ b/lily/interpretation-context-handle.cc @@ -11,71 +11,71 @@ Interpretation_context_handle::Interpretation_context_handle () { - report_to_l_ =0; + report_to_ =0; } Interpretation_context_handle::Interpretation_context_handle (Interpretation_context_handle const&s) { - report_to_l_ =0; - if (s.report_to_l_) - up (s.report_to_l_); + report_to_ =0; + if (s.report_to_) + up (s.report_to_); } Interpretation_context_handle* Interpretation_context_handle::clone () const { Interpretation_context_handle* handle = new Interpretation_context_handle; - handle->report_to_l_ = this->report_to_l_; + handle->report_to_ = this->report_to_; return handle; } Interpretation_context_handle::~Interpretation_context_handle () { - if (report_to_l_) + if (report_to_) down (); } void Interpretation_context_handle::up (Translator_group*t) { - report_to_l_ = t; + report_to_ = t; t->iterator_count_ ++; } void Interpretation_context_handle::down () { - report_to_l_->iterator_count_ --; - report_to_l_ = 0; + report_to_->iterator_count_ --; + report_to_ = 0; } bool Interpretation_context_handle::try_music (Music *m) { - return report_to_l_->try_music (m); + return report_to_->try_music (m); } void Interpretation_context_handle::operator = (Interpretation_context_handle const &s) { - set_translator (s.report_to_l_); + set_translator (s.report_to_); } void Interpretation_context_handle::set_translator (Translator_group*trans) { - if (report_to_l_ ==trans) + if (report_to_ ==trans) return; - if (report_to_l_) + if (report_to_) down (); if (trans) up (trans); } Translator_group* -Interpretation_context_handle::report_to_l ()const +Interpretation_context_handle::report_to ()const { - return report_to_l_; + return report_to_; } diff --git a/lily/item.cc b/lily/item.cc index 3b64230848..12d4d48a47 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -36,7 +36,7 @@ Item::Item (Item const &s) bool Item::breakable_b (Grob*me) { - if (me->original_l_) + if (me->original_) return false; if (!dynamic_cast (me)) @@ -47,10 +47,10 @@ Item::breakable_b (Grob*me) } Paper_column * -Item::column_l () const +Item::get_column () const { Item *parent = dynamic_cast (get_parent (X_AXIS)); - return parent ? parent->column_l () : 0; + return parent ? parent->get_column () : 0; } System * @@ -69,9 +69,9 @@ Item::copy_breakable_items () do { Grob * dolly = clone (); - Item * item_p = dynamic_cast (dolly); - pscore_l_->system_->typeset_grob (item_p); - new_copies[i] =item_p; + Item * item = dynamic_cast (dolly); + pscore_->system_->typeset_grob (item); + new_copies[i] =item; } while (flip (&i) != LEFT); broken_to_drul_= new_copies; @@ -129,9 +129,9 @@ Item::find_prebroken_piece (Direction d) const Direction Item::break_status_dir () const { - if (original_l_) + if (original_) { - Item * i = dynamic_cast (original_l_); + Item * i = dynamic_cast (original_); return (i->broken_to_drul_[LEFT] == this) ? LEFT : RIGHT; } diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index 8cbd43b105..52cedb5136 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -25,8 +25,8 @@ class Key_engraver : public Engraver { void create_key (bool); void read_req (Key_change_req const * r); - Key_change_req * keyreq_l_; - Item * item_p_; + Key_change_req * keyreq_; + Item * item_; public: TRANSLATOR_DECLARATIONS(Key_engraver); @@ -34,7 +34,7 @@ public: protected: virtual void initialize (); virtual void finalize (); - virtual bool try_music (Music *req_l); + virtual bool try_music (Music *req); virtual void stop_translation_timestep (); virtual void start_translation_timestep (); virtual void process_music (); @@ -50,56 +50,56 @@ Key_engraver::finalize () Key_engraver::Key_engraver () { - keyreq_l_ = 0; - item_p_ = 0; + keyreq_ = 0; + item_ = 0; } void Key_engraver::create_key (bool def) { - if (!item_p_) + if (!item_) { - item_p_ = new Item (get_property ("KeySignature")); + item_ = new Item (get_property ("KeySignature")); - item_p_->set_grob_property ("c0-position", + item_->set_grob_property ("c0-position", get_property ("centralCPosition")); // todo: put this in basic props. - item_p_->set_grob_property ("old-accidentals", get_property ("lastKeySignature")); - item_p_->set_grob_property ("new-accidentals", get_property ("keySignature")); + item_->set_grob_property ("old-accidentals", get_property ("lastKeySignature")); + item_->set_grob_property ("new-accidentals", get_property ("keySignature")); - announce_grob(item_p_, keyreq_l_ ? keyreq_l_->self_scm() : SCM_EOL); + announce_grob(item_, keyreq_ ? keyreq_->self_scm() : SCM_EOL); } if (!def) { SCM vis = get_property ("explicitKeySignatureVisibility"); if (gh_procedure_p (vis)) - item_p_->set_grob_property ("break-visibility",vis); + item_->set_grob_property ("break-visibility",vis); } } bool -Key_engraver::try_music (Music * req_l) +Key_engraver::try_music (Music * req) { - if (Key_change_req *kc = dynamic_cast (req_l)) + if (Key_change_req *kc = dynamic_cast (req)) { - if (keyreq_l_ && !keyreq_l_->equal_b (kc)) + if (keyreq_ && !keyreq_->equal_b (kc)) { kc->origin ()->warning (_ ("Conflicting key signatures found.")); - keyreq_l_->origin ()->warning (_ ("This was the other key definition.")); + keyreq_->origin ()->warning (_ ("This was the other key definition.")); return false; } - if (!keyreq_l_) + if (!keyreq_) { /* do this only once, just to be on the safe side. */ - keyreq_l_ = kc; - read_req (keyreq_l_); + keyreq_ = kc; + read_req (keyreq_); } return true; @@ -111,7 +111,7 @@ Key_engraver::try_music (Music * req_l) void Key_engraver::acknowledge_grob (Grob_info info) { - if (Clef::has_interface (info.grob_l_)) + if (Clef::has_interface (info.grob_)) { SCM c = get_property ("createKeyOnClefChange"); if (to_boolean (c)) @@ -119,7 +119,7 @@ Key_engraver::acknowledge_grob (Grob_info info) create_key (false); } } - else if (Bar_line::has_interface (info.grob_l_) + else if (Bar_line::has_interface (info.grob_) && gh_pair_p (get_property ("keySignature"))) { create_key (true); @@ -130,7 +130,7 @@ Key_engraver::acknowledge_grob (Grob_info info) void Key_engraver::process_music () { - if (keyreq_l_ || + if (keyreq_ || get_property ("lastKeySignature") != get_property ("keySignature")) create_key (false); } @@ -139,10 +139,10 @@ Key_engraver::process_music () void Key_engraver::stop_translation_timestep () { - if (item_p_) + if (item_) { - typeset_grob (item_p_); - item_p_ = 0; + typeset_grob (item_); + item_ = 0; } } @@ -171,27 +171,27 @@ Key_engraver::read_req (Key_change_req const * r) accs = gh_cons (ly_car (s), accs); #if 0 - daddy_trans_l_->set_property ("lastKeySignature", + daddy_trans_->set_property ("lastKeySignature", get_property ("keySignature")); #endif - daddy_trans_l_->set_property ("keySignature", accs); + daddy_trans_->set_property ("keySignature", accs); } void Key_engraver::start_translation_timestep () { - keyreq_l_ = 0; - daddy_trans_l_->set_property ("lastKeySignature", get_property ("keySignature")); + keyreq_ = 0; + daddy_trans_->set_property ("lastKeySignature", get_property ("keySignature")); } void Key_engraver::initialize () { - daddy_trans_l_->set_property ("keySignature", SCM_EOL); - daddy_trans_l_->set_property ("lastKeySignature", SCM_EOL); + daddy_trans_->set_property ("keySignature", SCM_EOL); + daddy_trans_->set_property ("lastKeySignature", SCM_EOL); } diff --git a/lily/key-performer.cc b/lily/key-performer.cc index 77fe3a9b62..7401a637de 100644 --- a/lily/key-performer.cc +++ b/lily/key-performer.cc @@ -20,19 +20,19 @@ public: ~Key_performer (); protected: - virtual bool try_music (Music* req_l); + virtual bool try_music (Music* req); virtual void create_audio_elements (); virtual void stop_translation_timestep (); private: - Key_change_req* key_req_l_; - Audio_key* audio_p_; + Key_change_req* key_req_; + Audio_key* audio_; }; Key_performer::Key_performer () { - key_req_l_ = 0; - audio_p_ = 0; + key_req_ = 0; + audio_ = 0; } Key_performer::~Key_performer () @@ -42,9 +42,9 @@ Key_performer::~Key_performer () void Key_performer::create_audio_elements () { - if (key_req_l_) + if (key_req_) { - SCM pitchlist = key_req_l_->get_mus_property ("pitch-alist"); + SCM pitchlist = key_req_->get_mus_property ("pitch-alist"); SCM proc = scm_primitive_eval (ly_symbol2scm ("accidentals-in-key")); SCM acc = gh_call1 (proc, pitchlist); proc = scm_primitive_eval (ly_symbol2scm ("major-key")); @@ -58,7 +58,7 @@ Key_performer::create_audio_elements () -gh_scm2int (ly_cdar (pitchlist))); my_do.transpose (to_c); - to_c.alteration_i_ -= my_do.alteration_i_; + to_c.alteration_ -= my_do.alteration_; Key_change_req *key = new Key_change_req; key->set_mus_property ("pitch-alist", scm_list_copy (pitchlist)); @@ -66,32 +66,32 @@ Key_performer::create_audio_elements () SCM c_pitchlist = key->get_mus_property ("pitch-alist"); SCM major = gh_call1 (proc, c_pitchlist); - audio_p_ = new Audio_key (gh_scm2int (acc), major == SCM_BOOL_T); - Audio_element_info info (audio_p_, key_req_l_); + audio_ = new Audio_key (gh_scm2int (acc), major == SCM_BOOL_T); + Audio_element_info info (audio_, key_req_); announce_element (info); - key_req_l_ = 0; + key_req_ = 0; } } void Key_performer::stop_translation_timestep () { - if (audio_p_) + if (audio_) { - play_element (audio_p_); - audio_p_ = 0; + play_element (audio_); + audio_ = 0; } } bool -Key_performer::try_music (Music* req_l) +Key_performer::try_music (Music* req) { - if (Key_change_req *kc = dynamic_cast (req_l)) + if (Key_change_req *kc = dynamic_cast (req)) { - if (key_req_l_) + if (key_req_) warning (_ ("FIXME: key change merge")); - key_req_l_ = kc; + key_req_ = kc; return true; } diff --git a/lily/key-signature-interface.cc b/lily/key-signature-interface.cc index 16215ce541..7b3c9ab3a1 100644 --- a/lily/key-signature-interface.cc +++ b/lily/key-signature-interface.cc @@ -131,7 +131,7 @@ Key_signature_interface::brew_molecule (SCM smob) int pos = alteration_pos (what, alter, c0p); Molecule m = Font_interface::get_default_font (me)-> - find_by_name (String ("accidentals-") + style + to_str (alter)); + find_by_name (String ("accidentals-") + style + to_string (alter)); m.translate_axis (pos * inter, Y_AXIS); mol.add_at_edge (X_AXIS, LEFT, m, 0); } diff --git a/lily/kpath.cc b/lily/kpath.cc index 473b955120..9579aae41f 100644 --- a/lily/kpath.cc +++ b/lily/kpath.cc @@ -54,7 +54,7 @@ ly_find_tfm (char const * name) { String p = global_path.find (String (name) + ".tfm"); - if (p.length_i ()) + if (p.length ()) return p; #if (KPATHSEA && HAVE_KPSE_FIND_FILE) diff --git a/lily/lexer.ll b/lily/lexer.ll index 76d17e4c13..295613c172 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -65,7 +65,7 @@ valid_version_b (String s); yylval.string = new String #define yylval \ - (*(YYSTYPE*)lexval_l) + (*(YYSTYPE*)lexval) #define YY_USER_ACTION add_lexed_char (YYLeng ()); /* @@ -152,7 +152,7 @@ HYPHEN -- } \"[^"]*\" { /* got the version number */ String s (YYText ()+1); - s = s.left_str (s.index_last_i ('"')); + s = s.left_string (s.index_last ('"')); yy_pop_state (); if (!valid_version_b (s)) @@ -172,7 +172,7 @@ HYPHEN -- yy_pop_state (); } <> { - LexerError (_ ("EOF found inside a comment").ch_C ()); + LexerError (_ ("EOF found inside a comment").to_str0 ()); if (! close_input ()) yyterminate (); // can't move this, since it actually rets a YY_NULL } @@ -194,25 +194,25 @@ HYPHEN -- } \"[^"]*\";? { /* got the include file name */ String s (YYText ()+1); - s = s.left_str (s.index_last_i ('"')); + s = s.left_string (s.index_last ('"')); - new_input (s,source_global_l); + new_input (s,source_global); yy_pop_state (); } \\{BLACK}*;?{WHITE} { /* got the include identifier */ String s = YYText () + 1; strip_trailing_white (s); - if (s.length_i () && (s[s.length_i () - 1] == ';')) - s = s.left_str (s.length_i () - 1); + if (s.length () && (s[s.length () - 1] == ';')) + s = s.left_string (s.length () - 1); SCM sid = lookup_identifier (s); if (gh_string_p (sid)) { - new_input (ly_scm2string (sid), source_global_l); + new_input (ly_scm2string (sid), source_global); yy_pop_state (); } else { String msg (_f ("wrong or undefined identifier: `%s'", s )); - LexerError (msg.ch_C ()); + LexerError (msg.to_str0 ()); SCM err = scm_current_error_port (); scm_puts ("This value was found in the table: ", err); scm_display (sid, err); @@ -232,12 +232,12 @@ HYPHEN -- } \\\${BLACK}*{WHITE} { String s=YYText () + 2; - s=s.left_str (s.length_i () - 1); + s=s.left_string (s.length () - 1); return scan_escaped_word (s); } \${BLACK}*{WHITE} { String s=YYText () + 1; - s=s.left_str (s.length_i () - 1); + s=s.left_string (s.length () - 1); return scan_bare_word (s); } \\\${BLACK}* { // backup rule @@ -251,7 +251,7 @@ HYPHEN -- # { //embedded scm //char const* s = YYText () + 1; - char const* s = here_ch_C (); + char const* s = here_str0 (); int n = 0; if (main_input_b_ && safe_global_b) { error (_ ("Can't evaluate Scheme in safe mode")); @@ -293,11 +293,11 @@ HYPHEN -- } {DIGIT} { - yylval.i = String_convert::dec2_i (String (YYText ())); + yylval.i = String_convert::dec2int (String (YYText ())); return DIGIT; } {UNSIGNED} { - yylval.i = String_convert::dec2_i (String (YYText ())); + yylval.i = String_convert::dec2int (String (YYText ())); return UNSIGNED; } @@ -311,7 +311,7 @@ HYPHEN -- } { \\{ESCAPED} { - *yylval.string += to_str (escaped_char (YYText ()[1])); + *yylval.string += to_string (escaped_char (YYText ()[1])); } [^\\"]+ { *yylval.string += YYText (); @@ -322,7 +322,7 @@ HYPHEN -- /* yylval is union. Must remember STRING before setting SCM*/ String *sp = yylval.string; - yylval.scm = ly_str02scm (sp->ch_C ()); + yylval.scm = ly_str02scm (sp->to_str0 ()); delete sp; return STRING; } @@ -340,7 +340,7 @@ HYPHEN -- return FRACTION; } {UNSIGNED} { - yylval.i = String_convert::dec2_i (String (YYText ())); + yylval.i = String_convert::dec2int (String (YYText ())); return UNSIGNED; } {NOTECOMMAND} { @@ -355,11 +355,11 @@ HYPHEN -- return yylval.i = HYPHEN; s = lyric_fudge (s); - char c = s[s.length_i () - 1]; + char c = s[s.length () - 1]; if (c == '{' || c == '}') // brace open is for not confusing dumb tools. here_input ().warning ( _ ("Brace found at end of lyric. Did you forget a space?")); - yylval.scm = ly_str02scm (s.ch_C ()); + yylval.scm = ly_str02scm (s.to_str0 ()); return STRING; @@ -380,7 +380,7 @@ HYPHEN -- return FRACTION; } {UNSIGNED} { - yylval.i = String_convert::dec2_i (String (YYText ())); + yylval.i = String_convert::dec2int (String (YYText ())); return UNSIGNED; } \" { @@ -428,7 +428,7 @@ HYPHEN -- } {UNSIGNED} { - yylval.i = String_convert::dec2_i (String (YYText ())); + yylval.i = String_convert::dec2int (String (YYText ())); return UNSIGNED; } @@ -475,7 +475,7 @@ HYPHEN -- <*>. { String msg = _f ("invalid character: `%c'", YYText ()[0]); - LexerError (msg.ch_C ()); + LexerError (msg.to_str0 ()); return YYText ()[0]; } @@ -515,7 +515,7 @@ My_lily_lexer::scan_escaped_word (String str) { // use more SCM for this. - SCM sym = ly_symbol2scm (str.ch_C ()); + SCM sym = ly_symbol2scm (str.to_str0 ()); int l = lookup_keyword (str); if (l != -1) { @@ -561,9 +561,9 @@ My_lily_lexer::scan_escaped_word (String str) } } String msg (_f ("unknown escaped string: `\\%s'", str)); - LexerError (msg.ch_C ()); + LexerError (msg.to_str0 ()); - yylval.scm = ly_str02scm (str.ch_C ()); + yylval.scm = ly_str02scm (str.to_str0 ()); return STRING; } @@ -571,7 +571,7 @@ My_lily_lexer::scan_escaped_word (String str) int My_lily_lexer::scan_bare_word (String str) { - SCM sym = ly_symbol2scm (str.ch_C ()); + SCM sym = ly_symbol2scm (str.to_str0 ()); if ((YYSTATE == notes) || (YYSTATE == chords)) { SCM pitch = scm_hashq_get_handle (pitchname_tab_, sym); if (gh_pair_p (pitch)) { @@ -584,7 +584,7 @@ My_lily_lexer::scan_bare_word (String str) } } - yylval.scm = ly_str02scm (str.ch_C ()); + yylval.scm = ly_str02scm (str.to_str0 ()); return STRING; } @@ -620,22 +620,22 @@ void strip_leading_white (String&s) { int i=0; - for (; i < s.length_i (); i++) + for (; i < s.length (); i++) if (!isspace (s[i])) break; - s = s.nomid_str (0, i); + s = s.nomid_string (0, i); } void strip_trailing_white (String&s) { - int i=s.length_i (); + int i=s.length (); while (i--) if (!isspace (s[i])) break; - s = s.left_str (i+1); + s = s.left_string (i+1); } @@ -651,7 +651,7 @@ valid_version_b (String s) Lilypond_version ver (s); if (! ((ver >= oldest_version) && (ver <= current))) { - non_fatal_error (_f ("incorrect lilypond version: %s (%s, %s)", ver.str (), oldest_version.str (), current.str ())); + non_fatal_error (_f ("incorrect lilypond version: %s (%s, %s)", ver.string (), oldest_version.string (), current.string ())); non_fatal_error (_ ("Consider converting the input with the convert-ly script")); return false; } @@ -662,7 +662,7 @@ valid_version_b (String s) String lyric_fudge (String s) { - char * chars =s.copy_ch_p (); + char * chars =s.get_copy_str0 (); for (char * p = chars; *p ; p++) { @@ -674,10 +674,10 @@ lyric_fudge (String s) delete[] chars; int i =0; - if ((i=s.index_i ("\\,")) != -1) // change "\," to TeX's "\c " + if ((i=s.index ("\\,")) != -1) // change "\," to TeX's "\c " { - * (s.ch_l () + i + 1) = 'c'; - s = s.left_str (i+2) + " " + s.right_str (s.length_i ()-i-2); + * (s.get_str0 () + i + 1) = 'c'; + s = s.left_string (i+2) + " " + s.right_string (s.length ()-i-2); } return s; @@ -689,13 +689,13 @@ Convert "NUM/DEN" into a '(NUM . DEN) cons. SCM scan_fraction (String frac) { - int i = frac.index_i ('/'); - int l = frac.length_i (); - String left = frac.left_str (i); - String right = frac.right_str (l - i - 1); + int i = frac.index ('/'); + int l = frac.length (); + String left = frac.left_string (i); + String right = frac.right_string (l - i - 1); - int n = String_convert::dec2_i (left); - int d = String_convert::dec2_i (right); + int n = String_convert::dec2int (left); + int d = String_convert::dec2int (right); return gh_cons (gh_int2scm (n), gh_int2scm (d)); } diff --git a/lily/ligature-bracket.cc b/lily/ligature-bracket.cc index eb190aca44..dc71d8088b 100644 --- a/lily/ligature-bracket.cc +++ b/lily/ligature-bracket.cc @@ -43,10 +43,10 @@ Ligature_bracket::brew_molecule (SCM smob) { Grob *me = unsmob_grob (smob); Spanner *spanner = dynamic_cast (me); - Real blotdiameter = me->paper_l ()->get_var ("blotdiameter"); + Real blotdiameter = me->get_paper ()->get_var ("blotdiameter"); Real staff_space = Staff_symbol_referencer::staff_space (me); - Real thickness = me->paper_l ()->get_var ("linethickness"); + Real thickness = me->get_paper ()->get_var ("linethickness"); SCM grob_thickness = me->get_grob_property ("thickness"); if (gh_number_p (grob_thickness)) thickness *= gh_scm2double (grob_thickness); @@ -109,7 +109,7 @@ Ligature_bracket::brew_molecule (SCM smob) { Molecule right_edge = brew_edge (RIGHT, thickness, edge_width, edge_height, blotdiameter); - Grob *staff_symbol = Staff_symbol_referencer::staff_symbol_l (me); + Grob *staff_symbol = Staff_symbol_referencer::get_staff_symbol (me); Grob *right_common_bound_x = right_bound->common_refpoint (staff_symbol, X_AXIS); diff --git a/lily/ligature-engraver.cc b/lily/ligature-engraver.cc index cda7f26dde..2afaad2192 100644 --- a/lily/ligature-engraver.cc +++ b/lily/ligature-engraver.cc @@ -33,8 +33,8 @@ */ Ligature_engraver::Ligature_engraver () { - ligature_p_ = 0; - finished_ligature_p_ = 0; + ligature_ = 0; + finished_ligature_ = 0; reqs_drul_[LEFT] = reqs_drul_[RIGHT] = 0; prev_start_req_ = 0; last_bound = 0; @@ -51,9 +51,9 @@ Ligature_engraver::try_music (Music *m) { reqs_drul_[START] = 0; reqs_drul_[STOP] = 0; - if (ligature_p_) - ligature_p_->suicide (); - ligature_p_ = 0; + if (ligature_) + ligature_->suicide (); + ligature_ = 0; } else if (scm_equal_p (req_->get_mus_property ("span-type"), ly_str02scm ("ligature")) == SCM_BOOL_T) @@ -77,7 +77,7 @@ Ligature_engraver::process_music () { if (reqs_drul_[STOP]) { - if (!ligature_p_) + if (!ligature_) reqs_drul_[STOP]->origin ()->warning (_ ("can't find start of ligature")); else { @@ -87,32 +87,32 @@ Ligature_engraver::process_music () } else { - ligature_p_->set_bound (RIGHT, last_bound); + ligature_->set_bound (RIGHT, last_bound); } } prev_start_req_ = 0; - finished_ligature_p_ = ligature_p_; - ligature_p_ = 0; + finished_ligature_ = ligature_; + ligature_ = 0; } last_bound = unsmob_grob (get_property ("currentMusicalColumn")); - if (ligature_p_) + if (ligature_) { // TODO: maybe forbid breaks only if not transcribing top_engraver ()->forbid_breaks (); } if (reqs_drul_[START]) { - if (ligature_p_) + if (ligature_) { reqs_drul_[START]->origin ()->warning (_ ("already have a ligature")); return; } prev_start_req_ = reqs_drul_[START]; - ligature_p_ = create_ligature_spanner (); + ligature_ = create_ligature_spanner (); brew_ligature_primitive_proc = - ligature_p_->get_grob_property ("ligature-primitive-callback"); + ligature_->get_grob_property ("ligature-primitive-callback"); if (brew_ligature_primitive_proc == SCM_EOL) { warning ("Ligature_engraver: ligature-primitive-callback undefined"); @@ -125,12 +125,12 @@ Ligature_engraver::process_music () } else { - ligature_p_->set_bound (LEFT, bound); + ligature_->set_bound (LEFT, bound); } ligature_start_mom_ = now_mom (); - announce_grob(ligature_p_, reqs_drul_[START]->self_scm()); + announce_grob(ligature_, reqs_drul_[START]->self_scm()); } } @@ -144,10 +144,10 @@ Ligature_engraver::start_translation_timestep () void Ligature_engraver::try_stop_ligature () { - if (finished_ligature_p_) + if (finished_ligature_) { - typeset_grob (finished_ligature_p_); - finished_ligature_p_ = 0; + typeset_grob (finished_ligature_); + finished_ligature_ = 0; } } @@ -161,24 +161,24 @@ void Ligature_engraver::finalize () { try_stop_ligature (); - if (ligature_p_) + if (ligature_) { prev_start_req_->origin ()->warning (_ ("unterminated ligature")); - ligature_p_->suicide (); + ligature_->suicide (); } } void Ligature_engraver::acknowledge_grob (Grob_info info) { - if (ligature_p_) + if (ligature_) { - if (Ligature_head::has_interface (info.grob_l_)) + if (Ligature_head::has_interface (info.grob_)) { - info.grob_l_->set_grob_property ("ligature-primitive-callback", + info.grob_->set_grob_property ("ligature-primitive-callback", brew_ligature_primitive_proc); } - else if (Rest::has_interface (info.grob_l_)) + else if (Rest::has_interface (info.grob_)) { info.music_cause ()->origin ()->warning (_ ("ligature may not contain rest; ignoring rest")); prev_start_req_->origin ()->warning (_ ("ligature was started here")); diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index e67cc0fbc5..53028fb926 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -159,7 +159,7 @@ gulp_file_to_string (String fn) { String e = _f ("can't find file: `%s'", fn); e += " "; - e += _f ("(load path: `%s')", global_path.str ()); + e += _f ("(load path: `%s')", global_path.string ()); error (e); } else if (verbose_global_b) @@ -167,7 +167,7 @@ gulp_file_to_string (String fn) Simple_file_storage f (s); - String result (f.ch_C ()); + String result (f.to_str0 ()); if (verbose_global_b) progress_indication ("]"); return result; @@ -180,7 +180,7 @@ file is looked up using the lilypond search path. ") { - return ly_str02scm (gulp_file_to_string (ly_scm2string (name)).ch_C ()); + return ly_str02scm (gulp_file_to_string (ly_scm2string (name)).to_str0 ()); } @@ -194,7 +194,7 @@ file is looked up using the lilypond search path. void read_lily_scm_file (String fn) { - gh_eval_str ((char *) gulp_file_to_string (fn).ch_C ()); + gh_eval_str ((char *) gulp_file_to_string (fn).to_str0 ()); } extern "C" { @@ -243,7 +243,7 @@ LY_DEFINE(ly_warning,"ly-warn", 1, 0, 0, return SCM_BOOL_T; } -LY_DEFINE(ly_isdir_p, "dir?", 1,0, 0, (SCM s), +LY_DEFINE(ly_isdir, "dir?", 1,0, 0, (SCM s), "type predicate. A direction is a -1, 0 or 1, where -1 represents left or down and 1 represents right or up. ") @@ -652,8 +652,8 @@ String print_scm_val (SCM val) { String realval = ly_scm2string (ly_write2scm (val)); - if (realval.length_i () > 200) - realval = realval.left_str (100) + "\n :\n :\n" + realval.right_str (100); + if (realval.length () > 200) + realval = realval.left_string (100) + "\n :\n :\n" + realval.right_string (100); return realval; } @@ -673,35 +673,35 @@ type_check_assignment (SCM sym, SCM val, SCM type_symbol) return ok; - SCM type_p = SCM_EOL; + SCM type = SCM_EOL; if (gh_symbol_p (sym)) - type_p = scm_object_property (sym, type_symbol); + type = scm_object_property (sym, type_symbol); - if (type_p != SCM_EOL && !gh_procedure_p (type_p)) + if (type != SCM_EOL && !gh_procedure_p (type)) { warning (_f ("Can't find property type-check for `%s' (%s). Perhaps you made a typing error? Doing assignment anyway.", - ly_symbol2string (sym).ch_C (), - ly_symbol2string (type_symbol).ch_C () + ly_symbol2string (sym).to_str0 (), + ly_symbol2string (type_symbol).to_str0 () )); } else { if (val != SCM_EOL - && gh_procedure_p (type_p) - && gh_call1 (type_p, val) == SCM_BOOL_F) + && gh_procedure_p (type) + && gh_call1 (type, val) == SCM_BOOL_F) { SCM errport = scm_current_error_port (); ok = false; SCM typefunc = scm_primitive_eval (ly_symbol2scm ("type-name")); - SCM type_name = gh_call1 (typefunc, type_p); + SCM type_name = gh_call1 (typefunc, type); scm_puts (_f ("Type check for `%s' failed; value `%s' must be of type `%s'", - ly_symbol2string (sym).ch_C (), + ly_symbol2string (sym).to_str0 (), print_scm_val (val), - ly_scm2string (type_name).ch_C ()).ch_C (), + ly_scm2string (type_name).to_str0 ()).to_str0 (), errport); scm_puts ("\n", errport); } diff --git a/lily/lily-version.cc b/lily/lily-version.cc index 978e2654f8..95f503e610 100644 --- a/lily/lily-version.cc +++ b/lily/lily-version.cc @@ -11,7 +11,7 @@ #include "lily-version.hh" String -version_str () +version_string () { String str = MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL; String mpl ("." MY_PATCH_LEVEL); @@ -21,16 +21,16 @@ version_str () } String -gnu_lilypond_str () +gnu_lilypond_string () { String str = "GNU LilyPond"; return str; } String -gnu_lilypond_version_str () +gnu_lilypond_version_string () { - String str = gnu_lilypond_str () + " " + version_str (); + String str = gnu_lilypond_string () + " " + version_string (); return str; } diff --git a/lily/lilypond-version.cc b/lily/lilypond-version.cc index 0c51d73c12..b773723a93 100644 --- a/lily/lilypond-version.cc +++ b/lily/lilypond-version.cc @@ -13,35 +13,35 @@ Lilypond_version::Lilypond_version (int major, int minor, int patch) { - major_i_ = major; - minor_i_ = minor; - patch_i_ = patch; + major_ = major; + minor_ = minor; + patch_ = patch; } Lilypond_version::Lilypond_version (String str) { Array version; - version = String_convert::split_arr (str, '.'); + version = String_convert::split (str, '.'); - major_i_ = version[0].value_i (); - minor_i_ = version[1].value_i (); - patch_i_ = 0; + major_ = version[0].to_int (); + minor_ = version[1].to_int (); + patch_ = 0; if (version.size () >= 3) - patch_i_ = version[2].value_i (); + patch_ = version[2].to_int (); if (version.size () >= 4) - extra_patch_str_ = version[3]; + extra_patch_string_ = version[3]; } String -Lilypond_version::str () const +Lilypond_version::string () const { - return to_str (major_i_) + "." + to_str (minor_i_) + "." + to_str (patch_i_); + return to_string (major_) + "." + to_string (minor_) + "." + to_string (patch_); } Lilypond_version::operator int () const { // ugh - return 100000 * major_i_ + 1000 * minor_i_ + patch_i_; + return 100000 * major_ + 1000 * minor_ + patch_; } diff --git a/lily/line-spanner.cc b/lily/line-spanner.cc index 5ba97cf8e3..1b19bf0b25 100644 --- a/lily/line-spanner.cc +++ b/lily/line-spanner.cc @@ -114,9 +114,9 @@ Line_spanner::get_broken_offset (Grob *me, Direction dir) if (!bound->break_status_dir ()) { Grob *common[] = { - bound->common_refpoint (Staff_symbol_referencer::staff_symbol_l (me), + bound->common_refpoint (Staff_symbol_referencer::get_staff_symbol (me), X_AXIS), - bound->common_refpoint (Staff_symbol_referencer::staff_symbol_l (me), + bound->common_refpoint (Staff_symbol_referencer::get_staff_symbol (me), Y_AXIS) }; @@ -133,15 +133,15 @@ Line_spanner::broken_trend_offset (Grob *me, Direction dir) the unbroken line-spanner would have had. From slur */ Offset o; - if (Spanner *mother = dynamic_cast (me->original_l_)) + if (Spanner *mother = dynamic_cast (me->original_)) { - for (int i = dir == LEFT ? 0 : mother->broken_into_l_arr_.size () - 1; - dir == LEFT ? i < mother->broken_into_l_arr_.size () : i > 0; + for (int i = dir == LEFT ? 0 : mother->broken_intos_.size () - 1; + dir == LEFT ? i < mother->broken_intos_.size () : i > 0; dir == LEFT ? i++ : i--) { - if (mother->broken_into_l_arr_[i - dir] == me) + if (mother->broken_intos_[i - dir] == me) { - Grob *neighbour = mother->broken_into_l_arr_[i]; + Grob *neighbour = mother->broken_intos_[i]; Offset neighbour_o = get_broken_offset (neighbour, dir); Offset me_o = get_broken_offset (me, -dir); // Hmm, why not return me_o[X], but recalc in brew_mol? @@ -244,7 +244,7 @@ Line_spanner::brew_molecule (SCM smob) } - Real thick = me->paper_l ()->get_var ("linethickness"); + Real thick = me->get_paper ()->get_var ("linethickness"); SCM s = me->get_grob_property ("thickness"); if (gh_number_p (s)) diff --git a/lily/lookup.cc b/lily/lookup.cc index 157b474ade..75003693ba 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -328,33 +328,33 @@ Lookup::accordion (SCM s, Real staff_space, Font_metric *fm) { Molecule r = fm->find_by_name ("accordion-accDiscant"); m.add_molecule (r); - if (reg.left_str (1) == "F") + if (reg.left_string (1) == "F") { Molecule d = fm->find_by_name ("accordion-accDot"); d.translate_axis (staff_space * 2.5 PT, Y_AXIS); m.add_molecule (d); - reg = reg.right_str (reg.length_i ()-1); + reg = reg.right_string (reg.length ()-1); } int eflag = 0x00; - if (reg.left_str (3) == "EEE") + if (reg.left_string (3) == "EEE") { eflag = 0x07; - reg = reg.right_str (reg.length_i ()-3); + reg = reg.right_string (reg.length ()-3); } - else if (reg.left_str (2) == "EE") + else if (reg.left_string (2) == "EE") { eflag = 0x05; - reg = reg.right_str (reg.length_i ()-2); + reg = reg.right_string (reg.length ()-2); } - else if (reg.left_str (2) == "Eh") + else if (reg.left_string (2) == "Eh") { eflag = 0x04; - reg = reg.right_str (reg.length_i ()-2); + reg = reg.right_string (reg.length ()-2); } - else if (reg.left_str (1) == "E") + else if (reg.left_string (1) == "E") { eflag = 0x02; - reg = reg.right_str (reg.length_i ()-1); + reg = reg.right_string (reg.length ()-1); } if (eflag & 0x02) { @@ -376,7 +376,7 @@ Lookup::accordion (SCM s, Real staff_space, Font_metric *fm) d.translate_axis (-0.8 * staff_space PT, X_AXIS); m.add_molecule (d); } - if (reg.left_str (2) == "SS") + if (reg.left_string (2) == "SS") { Molecule d = fm->find_by_name ("accordion-accDot"); d.translate_axis (0.5 * staff_space PT, Y_AXIS); @@ -384,26 +384,26 @@ Lookup::accordion (SCM s, Real staff_space, Font_metric *fm) m.add_molecule (d); d.translate_axis (-0.8 * staff_space PT, X_AXIS); m.add_molecule (d); - reg = reg.right_str (reg.length_i ()-2); + reg = reg.right_string (reg.length ()-2); } - if (reg.left_str (1) == "S") + if (reg.left_string (1) == "S") { Molecule d = fm->find_by_name ("accordion-accDot"); d.translate_axis (0.5 * staff_space PT, Y_AXIS); m.add_molecule (d); - reg = reg.right_str (reg.length_i ()-1); + reg = reg.right_string (reg.length ()-1); } } else if (sym == "Freebase") { Molecule r = fm->find_by_name ("accordion-accFreebase"); m.add_molecule (r); - if (reg.left_str (1) == "F") + if (reg.left_string (1) == "F") { Molecule d = fm->find_by_name ("accordion-accDot"); d.translate_axis (staff_space * 1.5 PT, Y_AXIS); m.add_molecule (d); - reg = reg.right_str (reg.length_i ()-1); + reg = reg.right_string (reg.length ()-1); } if (reg == "E") { @@ -416,22 +416,22 @@ Lookup::accordion (SCM s, Real staff_space, Font_metric *fm) { Molecule r = fm->find_by_name ("accordion-accBayanbase"); m.add_molecule (r); - if (reg.left_str (1) == "T") + if (reg.left_string (1) == "T") { Molecule d = fm->find_by_name ("accordion-accDot"); d.translate_axis (staff_space * 2.5 PT, Y_AXIS); m.add_molecule (d); - reg = reg.right_str (reg.length_i ()-1); + reg = reg.right_string (reg.length ()-1); } /* include 4' reed just for completeness. You don't want to use this. */ - if (reg.left_str (1) == "F") + if (reg.left_string (1) == "F") { Molecule d = fm->find_by_name ("accordion-accDot"); d.translate_axis (staff_space * 1.5 PT, Y_AXIS); m.add_molecule (d); - reg = reg.right_str (reg.length_i ()-1); + reg = reg.right_string (reg.length ()-1); } - if (reg.left_str (2) == "EE") + if (reg.left_string (2) == "EE") { Molecule d = fm->find_by_name ("accordion-accDot"); d.translate_axis (staff_space * 0.5 PT, Y_AXIS); @@ -439,55 +439,55 @@ Lookup::accordion (SCM s, Real staff_space, Font_metric *fm) m.add_molecule (d); d.translate_axis (-0.8 * staff_space PT, X_AXIS); m.add_molecule (d); - reg = reg.right_str (reg.length_i ()-2); + reg = reg.right_string (reg.length ()-2); } - if (reg.left_str (1) == "E") + if (reg.left_string (1) == "E") { Molecule d = fm->find_by_name ("accordion-accDot"); d.translate_axis (staff_space * 0.5 PT, Y_AXIS); m.add_molecule (d); - reg = reg.right_str (reg.length_i ()-1); + reg = reg.right_string (reg.length ()-1); } } else if (sym == "Stdbase") { Molecule r = fm->find_by_name ("accordion-accStdbase"); m.add_molecule (r); - if (reg.left_str (1) == "T") + if (reg.left_string (1) == "T") { Molecule d = fm->find_by_name ("accordion-accDot"); d.translate_axis (staff_space * 3.5 PT, Y_AXIS); m.add_molecule (d); - reg = reg.right_str (reg.length_i ()-1); + reg = reg.right_string (reg.length ()-1); } - if (reg.left_str (1) == "F") + if (reg.left_string (1) == "F") { Molecule d = fm->find_by_name ("accordion-accDot"); d.translate_axis (staff_space * 2.5 PT, Y_AXIS); m.add_molecule (d); - reg = reg.right_str (reg.length_i ()-1); + reg = reg.right_string (reg.length ()-1); } - if (reg.left_str (1) == "M") + if (reg.left_string (1) == "M") { Molecule d = fm->find_by_name ("accordion-accDot"); d.translate_axis (staff_space * 2 PT, Y_AXIS); d.translate_axis (staff_space PT, X_AXIS); m.add_molecule (d); - reg = reg.right_str (reg.length_i ()-1); + reg = reg.right_string (reg.length ()-1); } - if (reg.left_str (1) == "E") + if (reg.left_string (1) == "E") { Molecule d = fm->find_by_name ("accordion-accDot"); d.translate_axis (staff_space * 1.5 PT, Y_AXIS); m.add_molecule (d); - reg = reg.right_str (reg.length_i ()-1); + reg = reg.right_string (reg.length ()-1); } - if (reg.left_str (1) == "S") + if (reg.left_string (1) == "S") { Molecule d = fm->find_by_name ("accordion-accDot"); d.translate_axis (staff_space * 0.5 PT, Y_AXIS); m.add_molecule (d); - reg = reg.right_str (reg.length_i ()-1); + reg = reg.right_string (reg.length ()-1); } } /* ugh maybe try to use regular font for S.B. and B.B and only use one font @@ -564,7 +564,7 @@ may be negative. The thickness is given by @var{t}.") SCM_ASSERT_TYPE(ly_axis_p (a), a, SCM_ARG1, __FUNCTION__, "axis") ; SCM_ASSERT_TYPE(ly_number_pair_p (iv), iv, SCM_ARG2, __FUNCTION__, "number pair") ; SCM_ASSERT_TYPE(gh_number_p (t), a, SCM_ARG3, __FUNCTION__, "number") ; - SCM_ASSERT_TYPE(gh_number_p(p), a, SCM_ARG4, __FUNCTION__, "number") ; + SCM_ASSERT_TYPE(gh_number_p (p), a, SCM_ARG4, __FUNCTION__, "number") ; return Lookup::bracket ((Axis)gh_scm2int (a), ly_scm2interval (iv), diff --git a/lily/lyric-combine-music-iterator.cc b/lily/lyric-combine-music-iterator.cc index 9c51b2d177..75a7d89e68 100644 --- a/lily/lyric-combine-music-iterator.cc +++ b/lily/lyric-combine-music-iterator.cc @@ -35,31 +35,31 @@ Lyric_combine_music_iterator::Lyric_combine_music_iterator () melisma_start_req->set_span_dir (START); melisma_stop_req->set_span_dir (STOP); - music_iter_p_ =0; - lyric_iter_p_ =0; + music_iter_ =0; + lyric_iter_ =0; } Moment Lyric_combine_music_iterator::pending_moment () const { - Moment musnext = music_iter_p_->pending_moment (); + Moment musnext = music_iter_->pending_moment (); return musnext; } bool Lyric_combine_music_iterator::ok () const { - return music_iter_p_->ok (); + return music_iter_->ok (); } void Lyric_combine_music_iterator::construct_children () { - Lyric_combine_music const * m = dynamic_cast (music_l ()); + Lyric_combine_music const * m = dynamic_cast (get_music ()); - music_iter_p_ = get_iterator_p (m->music_l ()); - lyric_iter_p_ = get_iterator_p (m->lyrics_l ()); + music_iter_ = get_iterator (m->get_music ()); + lyric_iter_ = get_iterator (m->get_lyrics ()); } bool @@ -72,7 +72,7 @@ Lyric_combine_music_iterator::get_busy_status () const if (try_music (busy_req)) return true; - Translator_group * tr = music_iter_p_->report_to_l (); + Translator_group * tr = music_iter_->report_to (); SCM grobs = tr->get_property ("busyGrobs"); Moment now = tr->now_mom(); @@ -96,29 +96,29 @@ Lyric_combine_music_iterator::get_busy_status () const void Lyric_combine_music_iterator::process (Moment m) { - Moment my_next = music_iter_p_->pending_moment (); + Moment my_next = music_iter_->pending_moment (); if (my_next > m) return; - music_iter_p_->process (m); + music_iter_->process (m); if ( get_busy_status ()) { bool melisma_b = try_music (melisma_playing_req); if (!melisma_b) { - if (lyric_iter_p_->ok ()) + if (lyric_iter_->ok ()) { // FIXME #if 0 // devise a new way for this if (melisma_b && !melisma_started_b_) - lyric_iter_p_->try_music (melisma_start_req); + lyric_iter_->try_music (melisma_start_req); else if (melisma_started_b_) - lyric_iter_p_->try_music (melisma_stop_req); + lyric_iter_->try_music (melisma_stop_req); #endif - Moment m= lyric_iter_p_->pending_moment (); - lyric_iter_p_->process (m); + Moment m= lyric_iter_->pending_moment (); + lyric_iter_->process (m); } } } @@ -127,25 +127,25 @@ Lyric_combine_music_iterator::process (Moment m) Lyric_combine_music_iterator::~Lyric_combine_music_iterator () { - delete lyric_iter_p_; - delete music_iter_p_; + delete lyric_iter_; + delete music_iter_; } Lyric_combine_music_iterator::Lyric_combine_music_iterator (Lyric_combine_music_iterator const & src) : Music_iterator (src) { - lyric_iter_p_ = src.lyric_iter_p_ ? src.lyric_iter_p_->clone () : 0; - music_iter_p_ = src.music_iter_p_ ? src.music_iter_p_->clone () : 0; + lyric_iter_ = src.lyric_iter_ ? src.lyric_iter_->clone () : 0; + music_iter_ = src.music_iter_ ? src.music_iter_->clone () : 0; } Music_iterator* Lyric_combine_music_iterator::try_music_in_children (Music *m) const { - Music_iterator * i = music_iter_p_->try_music (m); + Music_iterator * i = music_iter_->try_music (m); if (i) return i; else - return lyric_iter_p_->try_music (m); + return lyric_iter_->try_music (m); } diff --git a/lily/lyric-combine-music.cc b/lily/lyric-combine-music.cc index 3ab20f6d33..861f2f1886 100644 --- a/lily/lyric-combine-music.cc +++ b/lily/lyric-combine-music.cc @@ -22,34 +22,34 @@ Lyric_combine_music::Lyric_combine_music (SCM l) void Lyric_combine_music::transpose (Pitch p) { - music_l ()->transpose (p); - lyrics_l () ->transpose (p); + get_music ()->transpose (p); + get_lyrics () ->transpose (p); } Moment Lyric_combine_music::length_mom () const { - return music_l ()->length_mom (); + return get_music ()->length_mom (); } Pitch Lyric_combine_music::to_relative_octave (Pitch p) { - p = music_l ()->to_relative_octave (p); - return lyrics_l () ->to_relative_octave (p); + p = get_music ()->to_relative_octave (p); + return get_lyrics () ->to_relative_octave (p); } void Lyric_combine_music::compress (Moment m) { - music_l ()->compress (m); + get_music ()->compress (m); } Music* -Lyric_combine_music::music_l () const +Lyric_combine_music::get_music () const { SCM l = get_mus_property ("elements"); if (!gh_pair_p (l)) @@ -59,7 +59,7 @@ Lyric_combine_music::music_l () const Music* -Lyric_combine_music::lyrics_l () const +Lyric_combine_music::get_lyrics () const { SCM l = get_mus_property ("elements"); if (!gh_pair_p (l)) diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index dca8de3e89..07cec49ce6 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -29,8 +29,8 @@ protected: public: TRANSLATOR_DECLARATIONS(Lyric_engraver); private: - Lyric_req * req_l_; - Item* text_p_; + Lyric_req * req_; + Item* text_; }; @@ -38,8 +38,8 @@ private: Lyric_engraver::Lyric_engraver () { - text_p_ =0; - req_l_ =0; + text_ =0; + req_ =0; } bool @@ -47,9 +47,9 @@ Lyric_engraver::try_music (Music*r) { if (Lyric_req* l = dynamic_cast (r)) { - if (req_l_) + if (req_) return false; - req_l_ =l; + req_ =l; return true; } return false; @@ -58,11 +58,11 @@ Lyric_engraver::try_music (Music*r) void Lyric_engraver::process_acknowledged_grobs () { - if (req_l_) + if (req_) { - text_p_= new Item (get_property ("LyricText")); + text_= new Item (get_property ("LyricText")); - text_p_->set_grob_property ("text", req_l_->get_mus_property ("text")); + text_->set_grob_property ("text", req_->get_mus_property ("text")); /* We can't reach the notehead where we're centered from here. So @@ -71,27 +71,27 @@ Lyric_engraver::process_acknowledged_grobs () (UGH UGH, pulled amount of space out of thin air) */ - text_p_->translate_axis (0.66, X_AXIS); + text_->translate_axis (0.66, X_AXIS); - announce_grob(text_p_, req_l_->self_scm()); - req_l_ = 0; + announce_grob(text_, req_->self_scm()); + req_ = 0; } } void Lyric_engraver::stop_translation_timestep () { - if (text_p_) + if (text_) { - typeset_grob (text_p_); - text_p_ =0; + typeset_grob (text_); + text_ =0; } } void Lyric_engraver::start_translation_timestep () { - req_l_ =0; + req_ =0; } diff --git a/lily/lyric-extender.cc b/lily/lyric-extender.cc index 104cc9e76c..68ffc5b559 100644 --- a/lily/lyric-extender.cc +++ b/lily/lyric-extender.cc @@ -26,7 +26,7 @@ Lyric_extender::brew_molecule (SCM smob) Real leftext = l->extent (l, X_AXIS).length (); - Real sl = sp->paper_l ()->get_var ("linethickness"); + Real sl = sp->get_paper ()->get_var ("linethickness"); Real righttrim = 0.5; // default to half a space gap on the right diff --git a/lily/lyric-performer.cc b/lily/lyric-performer.cc index fe5ca56d11..71ec186684 100644 --- a/lily/lyric-performer.cc +++ b/lily/lyric-performer.cc @@ -17,13 +17,13 @@ public: TRANSLATOR_DECLARATIONS(Lyric_performer); protected: - virtual bool try_music (Music* req_l); + virtual bool try_music (Music* req); virtual void stop_translation_timestep (); virtual void create_audio_elements (); private: - Link_array lreq_arr_; - Audio_text* audio_p_; + Link_array lreqs_; + Audio_text* audio_; }; @@ -31,7 +31,7 @@ private: Lyric_performer::Lyric_performer () { - audio_p_ = 0; + audio_ = 0; } @@ -39,35 +39,35 @@ void Lyric_performer::create_audio_elements () { // FIXME: won't work with fancy lyrics - if (lreq_arr_.size () - && gh_string_p (lreq_arr_[0]->get_mus_property ("text")) - && ly_scm2string (lreq_arr_[0]->get_mus_property ("text")).length_i ()) + if (lreqs_.size () + && gh_string_p (lreqs_[0]->get_mus_property ("text")) + && ly_scm2string (lreqs_[0]->get_mus_property ("text")).length ()) { - audio_p_ = new Audio_text (Audio_text::LYRIC, - ly_scm2string (lreq_arr_[0]->get_mus_property ("text"))); - Audio_element_info info (audio_p_, lreq_arr_[0]); + audio_ = new Audio_text (Audio_text::LYRIC, + ly_scm2string (lreqs_[0]->get_mus_property ("text"))); + Audio_element_info info (audio_, lreqs_[0]); announce_element (info); } - lreq_arr_.clear (); + lreqs_.clear (); } void Lyric_performer::stop_translation_timestep () { - if (audio_p_) + if (audio_) { - play_element (audio_p_); - audio_p_ = 0; + play_element (audio_); + audio_ = 0; } - lreq_arr_.clear (); + lreqs_.clear (); } bool -Lyric_performer::try_music (Music* req_l) +Lyric_performer::try_music (Music* req) { - if (Lyric_req *lr = dynamic_cast (req_l)) + if (Lyric_req *lr = dynamic_cast (req)) { - lreq_arr_.push (lr); + lreqs_.push (lr); return true; } return false; diff --git a/lily/lyric-phrasing-engraver.cc b/lily/lyric-phrasing-engraver.cc index 9966d3362e..483d85d2c4 100644 --- a/lily/lyric-phrasing-engraver.cc +++ b/lily/lyric-phrasing-engraver.cc @@ -79,7 +79,7 @@ String trim_suffix (String &id); Lyric_phrasing_engraver::Lyric_phrasing_engraver () { voice_alist_ = SCM_EOL; - any_notehead_l_ = 0; + any_notehead_ = 0; } Lyric_phrasing_engraver::~Lyric_phrasing_engraver () @@ -103,7 +103,7 @@ Lyric_phrasing_engraver::finalize () Syllable_group * Lyric_phrasing_engraver::lookup_context_id (const String &context_id) { - SCM key = ly_str02scm (context_id.ch_C ()); + SCM key = ly_str02scm (context_id.to_str0 ()); if (! gh_null_p (voice_alist_)) { SCM s = scm_assoc (key, voice_alist_); @@ -138,8 +138,8 @@ Lyric_phrasing_engraver::record_notehead (const String &context_id, { Syllable_group * v = lookup_context_id (context_id); v->set_notehead (notehead); - if (!any_notehead_l_) - any_notehead_l_ = notehead; + if (!any_notehead_) + any_notehead_ = notehead; } void @@ -152,7 +152,7 @@ Lyric_phrasing_engraver::record_lyric (const String &context_id, Grob * lyric) void Lyric_phrasing_engraver::record_extender (const String &context_id, Grob * extender) { - SCM key = ly_str02scm (context_id.ch_C ()); + SCM key = ly_str02scm (context_id.to_str0 ()); if (! gh_null_p (voice_alist_)) { SCM s = scm_assoc (key, voice_alist_); @@ -185,18 +185,18 @@ Lyric_phrasing_engraver::acknowledge_grob (Grob_info i) return; - Grob *h = i.grob_l_; + Grob *h = i.grob_; if (Note_head::has_interface (h)) { /* caught a note head ... do something with it */ /* what's its Voice context name? */ - String voice_context_id = get_context_id (i.origin_trans_l_->daddy_trans_l_, "Voice"); + String voice_context_id = get_context_id (i.origin_trans_->daddy_trans_, "Voice"); record_notehead (voice_context_id, h); /* is it in a melisma ? */ - if (to_boolean (i.origin_trans_l_->get_property ("melismaEngraverBusy"))) + if (to_boolean (i.origin_trans_->get_property ("melismaEngraverBusy"))) { record_melisma (voice_context_id); } @@ -209,13 +209,13 @@ Lyric_phrasing_engraver::acknowledge_grob (Grob_info i) /* what's its LyricsVoice context name? */ String voice_context_id; - SCM voice_context_scm = i.origin_trans_l_->get_property ("associatedVoice"); + SCM voice_context_scm = i.origin_trans_->get_property ("associatedVoice"); if (gh_string_p (voice_context_scm)) { voice_context_id = ly_scm2string (voice_context_scm); } else { - voice_context_id = get_context_id (i.origin_trans_l_->daddy_trans_l_, "LyricsVoice"); + voice_context_id = get_context_id (i.origin_trans_->daddy_trans_, "LyricsVoice"); voice_context_id = trim_suffix (voice_context_id); } record_lyric (voice_context_id, h); @@ -237,7 +237,7 @@ Lyric_phrasing_engraver::acknowledge_grob (Grob_info i) */ if (h->internal_has_interface (ly_symbol2scm ("lyric-extender-interface"))) { - String voice_context_id = get_context_id (i.origin_trans_l_->daddy_trans_l_, "LyricsVoice"); + String voice_context_id = get_context_id (i.origin_trans_->daddy_trans_, "LyricsVoice"); record_extender (trim_suffix (voice_context_id), h); return; } @@ -246,14 +246,14 @@ Lyric_phrasing_engraver::acknowledge_grob (Grob_info i) String get_context_id (Translator_group * ancestor, const char *type) { - while (ancestor != 0 && ancestor->type_str_ != type) + while (ancestor != 0 && ancestor->type_string_ != type) { - ancestor = ancestor->daddy_trans_l_; + ancestor = ancestor->daddy_trans_; } if (ancestor != 0) { - return ancestor->id_str_; + return ancestor->id_string_; } return ""; @@ -262,10 +262,10 @@ get_context_id (Translator_group * ancestor, const char *type) String trim_suffix (String &id) { - int index = id.index_i ('-'); + int index = id.index ('-'); if (index >= 0) { - return id.left_str (index); + return id.left_string (index); } return id; } @@ -297,7 +297,7 @@ Lyric_phrasing_engraver::process_acknowledged_grobs () /* TODO: give context for warning. */ - if (! entry->set_lyric_align (punc.ch_C (), any_notehead_l_)) + if (! entry->set_lyric_align (punc.to_str0 (), any_notehead_)) warning (_ ("lyrics found without any matching notehead")); // is this note melismatic? If so adjust alignment of previous one. @@ -338,7 +338,7 @@ Lyric_phrasing_engraver::stop_translation_timestep () } entry->next_lyric (); } - any_notehead_l_ = 0; + any_notehead_ = 0; } diff --git a/lily/main.cc b/lily/main.cc index 62ad88655f..c6a45e4e67 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -79,7 +79,7 @@ String init_scheme_code_string = "(begin #t "; */ -All_font_metrics *all_fonts_global_p; +All_font_metrics *all_fonts_global; int exit_status_global; File_path global_path; @@ -133,7 +133,7 @@ static Long_option_init options_static[] = { void identify (FILE *out) { - fputs (gnu_lilypond_version_str ().ch_C (), out); + fputs (gnu_lilypond_version_string ().to_str0 (), out); } void @@ -154,25 +154,25 @@ usage () { std::cout << "\n"; /* No version number or newline here. It confuses help2man. */ - std::cout << _f ("Usage: %s [OPTION]... FILE...", "lilypond").ch_C (); + std::cout << _f ("Usage: %s [OPTION]... FILE...", "lilypond").to_str0 (); std::cout << "\n\n"; - std::cout << _ ("Typeset music and or play MIDI from FILE").ch_C (); + std::cout << _ ("Typeset music and or play MIDI from FILE").to_str0 (); std::cout << "\n\n"; std::cout << _ ( "LilyPond is a music typesetter. It produces beautiful sheet music\n" "using a high level description file as input. LilyPond is part of \n" "the GNU Project.\n" -).ch_C (); +).to_str0 (); std::cout << '\n'; - std::cout << _ ("Options:").ch_C (); + std::cout << _ ("Options:").to_str0 (); std::cout << '\n'; - std::cout << Long_option_init::table_str (options_static).ch_C (); + std::cout << Long_option_init::table_string (options_static).to_str0 (); std::cout << '\n'; std::cout << std::endl; - std::cout << _f ("Report bugs to %s", "bug-lilypond@gnu.org").ch_C () << std::endl; + std::cout << _f ("Report bugs to %s", "bug-lilypond@gnu.org").to_str0 () << std::endl; } void @@ -184,10 +184,10 @@ version () "This is free software. It is covered by the GNU General Public License,\n" "and you are welcome to change it and/or distribute copies of it under\n" "certain conditions. Invoke as `%s --warranty' for more information.\n", - "lilypond").ch_C (); + "lilypond").to_str0 (); std::cout << std::endl; - std::cout << _f ("Copyright (c) %s by", "1996--2002").ch_C (); + std::cout << _f ("Copyright (c) %s by", "1996--2002").to_str0 (); std::cout << '\n'; std::cout << " Han-Wen Nienhuys \n"; std::cout << " Jan Nieuwenhuizen \n"; @@ -197,9 +197,9 @@ void notice () { std::cout << '\n'; - std::cout << _ ("GNU LilyPond -- The music typesetter").ch_C (); + std::cout << _ ("GNU LilyPond -- The music typesetter").to_str0 (); std::cout << '\n'; - std::cout << _f ("Copyright (c) %s by", "1996--2002").ch_C (); + std::cout << _f ("Copyright (c) %s by", "1996--2002").to_str0 (); std::cout << '\n'; std::cout << " Han-Wen Nienhuys \n"; std::cout << " Jan Nieuwenhuizen \n"; @@ -217,7 +217,7 @@ notice () " You should have received a copy (refer to the file COPYING) of the\n" "GNU General Public License along with this program; if not, write to\n" "the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,\n" - "USA.\n").ch_C (); + "USA.\n").to_str0 (); } @@ -246,11 +246,11 @@ setup_paths () if (!String (prefix_directory[0]).empty_b ()) { lily_locale_dir = String (prefix_directory[0]) + "/share/locale"; - bindtextdomain (name.ch_C (), lily_locale_dir.ch_C ()); + bindtextdomain (name.to_str0 (), lily_locale_dir.to_str0 ()); } else - bindtextdomain (name.ch_C (), LOCALEDIR); - textdomain (name.ch_C ()); + bindtextdomain (name.to_str0 (), LOCALEDIR); + textdomain (name.to_str0 ()); #endif global_path.add (""); @@ -264,13 +264,13 @@ setup_paths () / sizeof (*prefix_directory); i++) for (char **s = suffixes; *s; s++) { - String p = prefix_directory[i] + to_str ('/') + String (*s); + String p = prefix_directory[i] + to_string ('/') + String (*s); global_path.add (p); #if !KPATHSEA /* Urg: GNU make's $ (word) index starts at 1 */ int i = 1; - while (global_path.try_add (p + to_str (".") + to_str (i))) + while (global_path.try_add (p + to_string (".") + to_string (i))) i++; #endif } @@ -298,11 +298,11 @@ distill_inname (String str) if (*extensions[i] && !p.ext.empty_b ()) p.ext += "."; p.ext += extensions[i]; - if (!global_path.find (p.str ()).empty_b ()) + if (!global_path.find (p.string ()).empty_b ()) break; } /* Reshuffle extension */ - p = split_path (p.str ()); + p = split_path (p.string ()); } return p; } @@ -322,7 +322,7 @@ prepend_load_path (String dir) String s = "(set! %load-path (cons \"" + dir + "\" %load-path))"; - scm_c_eval_string (s.ch_C ()); + scm_c_eval_string (s.to_str0 ()); } void @@ -347,10 +347,10 @@ main_prog (void *, int, char **) std::cout << std::endl; call_constructors (); - all_fonts_global_p = new All_font_metrics (global_path.str ()); + all_fonts_global = new All_font_metrics (global_path.string ()); init_scheme_code_string += ")"; - gh_eval_str ((char *)init_scheme_code_string.ch_C ()); + gh_eval_str ((char *)init_scheme_code_string.to_str0 ()); int p=0; const char *arg = oparser_p_static->get_next_arg (); @@ -372,7 +372,7 @@ main_prog (void *, int, char **) /* By default, use base name of input file for output file name */ Path outpath = inpath; - if (inpath.str () != "-") + if (inpath.string () != "-") outpath.ext = format_to_ext (output_format_global); /* By default, write output to cwd; do not copy directory part @@ -393,8 +393,8 @@ main_prog (void *, int, char **) /* Burp: output name communication goes through _global */ String save_output_name_global = output_name_global; - output_name_global = outpath.str (); - do_one_file (init, inpath.str ()); + output_name_global = outpath.string (); + do_one_file (init, inpath.string ()); output_name_global = save_output_name_global; p++; @@ -409,7 +409,7 @@ static int sane_putenv (char const* key, char const* value, bool overwrite) { if (overwrite || !getenv (key)) - return putenv ((char*)((String (key) + "=" + value).ch_C ())); + return putenv ((char*)((String (key) + "=" + value).to_str0 ())); return -1; } @@ -438,7 +438,7 @@ main (int argc, char **argv) oparser_p_static = new Getopt_long (argc, argv, options_static); while (Long_option_init const * opt = (*oparser_p_static) ()) { - switch (opt->shortname_ch_) + switch (opt->shortname_char_) { case 'v': version (); @@ -446,16 +446,16 @@ main (int argc, char **argv) break; case 'o': { - String s = oparser_p_static->optional_argument_ch_C_; + String s = oparser_p_static->optional_argument_str0_; Path p = split_path (s); if (s != "-" && p.ext.empty_b ()) p.ext = format_to_ext (output_format_global); - output_name_global = p.str (); + output_name_global = p.string (); } break; case 'e': init_scheme_code_string += - oparser_p_static->optional_argument_ch_C_; + oparser_p_static->optional_argument_str0_; break; case 'w': notice (); @@ -469,19 +469,19 @@ main (int argc, char **argv) "This option is for developers only.\n"; exit (0); } - output_format_global = oparser_p_static->optional_argument_ch_C_; + output_format_global = oparser_p_static->optional_argument_str0_; break; case 'P': - dependency_prefix_global = oparser_p_static->optional_argument_ch_C_; + dependency_prefix_global = oparser_p_static->optional_argument_str0_; break; case 'H': - dump_header_fieldnames_global.push (oparser_p_static->optional_argument_ch_C_); + dump_header_fieldnames_global.push (oparser_p_static->optional_argument_str0_); break; case 'I': - global_path.push (oparser_p_static->optional_argument_ch_C_); + global_path.push (oparser_p_static->optional_argument_str0_); break; case 'i': - init_name_global = oparser_p_static->optional_argument_ch_C_; + init_name_global = oparser_p_static->optional_argument_str0_; break; case 'h': help_b = true; diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index f495cf9501..4bbda42824 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -29,18 +29,18 @@ class Mark_engraver : public Engraver public: TRANSLATOR_DECLARATIONS(Mark_engraver); protected: - Item* text_p_; + Item* text_; protected: virtual void stop_translation_timestep (); virtual void acknowledge_grob (Grob_info); void create_items (Request*); - virtual bool try_music (Music *req_l); + virtual bool try_music (Music *req); virtual void start_translation_timestep (); virtual void process_music (); private: - Mark_req * mark_req_l_; + Mark_req * mark_req_; }; @@ -49,32 +49,32 @@ private: Mark_engraver::Mark_engraver () { - text_p_ =0; - mark_req_l_ = 0; + text_ =0; + mark_req_ = 0; } void Mark_engraver::acknowledge_grob (Grob_info inf) { - Grob * s = inf.grob_l_; - if (text_p_ && Bar_line::has_interface (s)) + Grob * s = inf.grob_; + if (text_ && Bar_line::has_interface (s)) { /* Ugh. Figure out how to do this right at beginning of line, (without creating class Bar_script : public Item). */ - text_p_->set_parent (s, X_AXIS); + text_->set_parent (s, X_AXIS); } } void Mark_engraver::stop_translation_timestep () { - if (text_p_) + if (text_) { - text_p_->set_grob_property ("side-support-elements" , get_property ("stavesFound")); - typeset_grob (text_p_); - text_p_ =0; + text_->set_grob_property ("side-support-elements" , get_property ("stavesFound")); + typeset_grob (text_); + text_ =0; } } @@ -82,34 +82,34 @@ Mark_engraver::stop_translation_timestep () void Mark_engraver::create_items (Request *rq) { - if (text_p_) + if (text_) return; SCM s = get_property ("RehearsalMark"); - text_p_ = new Item (s); + text_ = new Item (s); - announce_grob(text_p_, rq->self_scm()); + announce_grob(text_, rq->self_scm()); } void Mark_engraver::start_translation_timestep () { - mark_req_l_ = 0; + mark_req_ = 0; } bool -Mark_engraver::try_music (Music* r_l) +Mark_engraver::try_music (Music* r) { - if (Mark_req *mr = dynamic_cast (r_l)) + if (Mark_req *mr = dynamic_cast (r)) { - if (mark_req_l_ && mr->equal_b (mark_req_l_)) + if (mark_req_ && mr->equal_b (mark_req_)) return true; - if (mark_req_l_) + if (mark_req_) return false; - mark_req_l_ = mr; + mark_req_ = mr; return true; } return false; @@ -124,9 +124,9 @@ Mark_engraver::try_music (Music* r_l) void Mark_engraver::process_music () { - if (mark_req_l_) + if (mark_req_) { - create_items (mark_req_l_); + create_items (mark_req_); String t; @@ -134,9 +134,9 @@ Mark_engraver::process_music () automatic marks. */ - SCM m = mark_req_l_->get_mus_property ("label"); + SCM m = mark_req_->get_mus_property ("label"); if (gh_pair_p (m)) // markup text - text_p_->set_grob_property ("text",m); + text_->set_grob_property ("text",m); else { if (!gh_string_p (m) && !gh_number_p (m)) @@ -145,7 +145,7 @@ Mark_engraver::process_music () if (gh_number_p (m)) { int mark_count = gh_scm2int (m); - t = to_str (mark_count); + t = to_string (mark_count); mark_count ++; m = gh_int2scm (mark_count); } @@ -153,26 +153,26 @@ Mark_engraver::process_music () { t = ly_scm2string (m); String next; - if (t.length_i ()) + if (t.length ()) { char c = t[0]; c++; - next = to_str (c); + next = to_string (c); } - m = ly_str02scm (next.ch_C ()); + m = ly_str02scm (next.to_str0 ()); } else { m = gh_int2scm (1); } - daddy_trans_l_->set_property ("rehearsalMark", m); + daddy_trans_->set_property ("rehearsalMark", m); - text_p_->set_grob_property ("text", - ly_str02scm (t.ch_C ())); + text_->set_grob_property ("text", + ly_str02scm (t.to_str0 ())); String style = "mark-number"; - for (int i=0; i < t.length_i (); i++) + for (int i=0; i < t.length (); i++) { if (!isdigit (t[i])) { @@ -180,8 +180,8 @@ Mark_engraver::process_music () break; } } - SCM st = ly_symbol2scm (style.ch_C ()); - text_p_->set_grob_property ("font-style", st); + SCM st = ly_symbol2scm (style.to_str0 ()); + text_->set_grob_property ("font-style", st); } } diff --git a/lily/melisma-engraver.cc b/lily/melisma-engraver.cc index fc982526ed..fd35082cdf 100644 --- a/lily/melisma-engraver.cc +++ b/lily/melisma-engraver.cc @@ -39,11 +39,11 @@ Melisma_engraver::try_music (Music *m) || (to_boolean (tie)) || (to_boolean (beam))) { - daddy_trans_l_->set_property ("melismaEngraverBusy",SCM_BOOL_T); + daddy_trans_->set_property ("melismaEngraverBusy",SCM_BOOL_T); return true; } } - daddy_trans_l_->set_property ("melismaEngraverBusy",SCM_BOOL_F); + daddy_trans_->set_property ("melismaEngraverBusy",SCM_BOOL_F); return false; } Melisma_engraver::Melisma_engraver() diff --git a/lily/mensural-ligature-engraver.cc b/lily/mensural-ligature-engraver.cc index 9be0e8a0cf..733e5dfffa 100644 --- a/lily/mensural-ligature-engraver.cc +++ b/lily/mensural-ligature-engraver.cc @@ -69,7 +69,7 @@ * implemented, such as a Vaticana_ligature_engraver. There will be * redundant code between these engravers and the * Mensural_ligature_engraver. In particular these are functions - * set_column_l_, fold_up_primitives, join_primitives, and + * set_column_, fold_up_primitives, join_primitives, and * ackowledge_grob; further the code for handling accidentals. It is * not appropriate to put these things into Ligature_engraver, since, * for example, Ligature_bracket_engraver does not share any of this @@ -80,8 +80,8 @@ */ class Mensural_ligature_engraver : public Ligature_engraver { - Real distance_f_; - Array primitives_arr_; + Real distance_; + Array primitives_; protected: virtual void acknowledge_grob (Grob_info); @@ -97,19 +97,19 @@ private: void propagate_properties (); void fold_up_primitives (); void join_primitives (); - void set_column_l (Item *item, Paper_column *new_col); + void get_set_column (Item *item, Paper_column *new_col); }; Mensural_ligature_engraver::Mensural_ligature_engraver () { - distance_f_ = 0; + distance_ = 0; } Spanner * Mensural_ligature_engraver::create_ligature_spanner () { - distance_f_ = 0; + distance_ = 0; return new Spanner (get_property ("MensuralLigature")); } @@ -117,7 +117,7 @@ Mensural_ligature_engraver::create_ligature_spanner () * TODO: move this function to class Item? */ void -Mensural_ligature_engraver::set_column_l (Item *item, Paper_column *column) +Mensural_ligature_engraver::get_set_column (Item *item, Paper_column *column) { Item *parent = dynamic_cast (item->get_parent (X_AXIS)); if (!parent) @@ -127,18 +127,18 @@ Mensural_ligature_engraver::set_column_l (Item *item, Paper_column *column) } String name = parent->name (); - if (!String::compare_i (name, "PaperColumn")) + if (!String::compare (name, "PaperColumn")) { // Change column not only for targeted item (NoteColumn), but // also for all associated grobs (NoteSpacing, SeparationItem). - Grob *sl = Staff_symbol_referencer::staff_symbol_l (item); + Grob *sl = Staff_symbol_referencer::get_staff_symbol (item); for (SCM tail = parent->get_grob_property ("elements"); gh_pair_p (tail); tail = ly_cdr (tail)) { Item *sibling = unsmob_item (ly_car (tail)); if ((sibling) && - (Staff_symbol_referencer::staff_symbol_l (sibling) == sl)) + (Staff_symbol_referencer::get_staff_symbol (sibling) == sl)) { sibling->set_parent (column, X_AXIS); } @@ -146,7 +146,7 @@ Mensural_ligature_engraver::set_column_l (Item *item, Paper_column *column) } else { - set_column_l (parent, column); + get_set_column (parent, column); } } @@ -265,11 +265,11 @@ Mensural_ligature_engraver::apply_transition (int state, int input, int i) { int output = transition_output[state][input]; Item *last_last_primitive = (i > 1) ? - dynamic_cast (primitives_arr_[i-2].grob_l_) : 0; + dynamic_cast (primitives_[i-2].grob_) : 0; Item *last_primitive = (i > 0) ? - dynamic_cast (primitives_arr_[i-1].grob_l_) : 0; - Item *primitive = (i < primitives_arr_.size ()) ? - dynamic_cast (primitives_arr_[i].grob_l_) : 0; + dynamic_cast (primitives_[i-1].grob_) : 0; + Item *primitive = (i < primitives_.size ()) ? + dynamic_cast (primitives_[i].grob_) : 0; switch (output) { case MLP_NONE: @@ -327,7 +327,7 @@ Mensural_ligature_engraver::apply_transition (int state, int input, int i) void Mensural_ligature_engraver::transform_heads () { - if (primitives_arr_.size () < 2) + if (primitives_.size () < 2) { warning (_f ("ligature with less than 2 heads -> skipping")); return; @@ -335,12 +335,12 @@ Mensural_ligature_engraver::transform_heads () int state = STATE_START; Pitch last_pitch, pitch; bool have_last_pitch = 0, have_pitch = 0; - for (int i = 0; i < primitives_arr_.size (); i++) { + for (int i = 0; i < primitives_.size (); i++) { last_pitch = pitch; have_last_pitch = have_pitch; - Grob_info info = primitives_arr_[i]; + Grob_info info = primitives_[i]; int duration_log = - Note_head::balltype_i (dynamic_cast (info.grob_l_)); + Note_head::get_balltype (dynamic_cast (info.grob_)); Note_req *nr = dynamic_cast (info.music_cause ()); if (!nr) { @@ -389,7 +389,7 @@ Mensural_ligature_engraver::transform_heads () // TODO: if (state == STATE_ERROR) { ... } } - state = apply_transition (state, INPUT_AE, primitives_arr_.size ()); + state = apply_transition (state, INPUT_AE, primitives_.size ()); // TODO: if (state == STATE_ERROR) { ... } } @@ -421,23 +421,23 @@ void Mensural_ligature_engraver::propagate_properties () { SCM thickness_scm = - finished_ligature_p_->get_grob_property ("thickness"); + finished_ligature_->get_grob_property ("thickness"); Real thickness = (thickness_scm != SCM_EOL) ? gh_scm2double (thickness_scm) : 1.4; - thickness *= finished_ligature_p_->paper_l ()->get_var ("linethickness"); + thickness *= finished_ligature_->get_paper ()->get_var ("linethickness"); /* * FIXME: Since character "noteheads--1mensural" is defined in * parmesan font only, the right-hand expression in the * following assignment evaluates to a width of 0.0, in case - * font-family of finished_ligature_p_ is _not_ set to "ancient" + * font-family of finished_ligature_ is _not_ set to "ancient" * (by default, it is; see grob properties of MensuralLigature * in scm/grob-description.scm). This may arise severe problems * in the future when switching between fonts (e.g. mensural * versus neo-mensural). */ Real head_width = - Font_interface::get_default_font (finished_ligature_p_)-> + Font_interface::get_default_font (finished_ligature_)-> find_by_name ("noteheads--1mensural").extent (X_AXIS).length (); if (head_width == 0.0) { @@ -445,16 +445,16 @@ Mensural_ligature_engraver::propagate_properties () } SCM flexa_width_scm = - finished_ligature_p_->get_grob_property ("flexa-width"); + finished_ligature_->get_grob_property ("flexa-width"); Real flexa_width = (flexa_width_scm != SCM_EOL) ? gh_scm2double (flexa_width_scm) : 2.0; - flexa_width *= Staff_symbol_referencer::staff_space (finished_ligature_p_); + flexa_width *= Staff_symbol_referencer::staff_space (finished_ligature_); Real half_flexa_width = 0.5 * (flexa_width + thickness); - for (int i = 0; i < primitives_arr_.size (); i++) + for (int i = 0; i < primitives_.size (); i++) { - Item *primitive = dynamic_cast (primitives_arr_[i].grob_l_); + Item *primitive = dynamic_cast (primitives_[i].grob_); int output = gh_scm2int (primitive->get_grob_property ("primitive")); primitive->set_grob_property ("thickness", gh_double2scm (thickness)); @@ -477,7 +477,7 @@ Mensural_ligature_engraver::propagate_properties () primitive->set_grob_property ("flexa-width", gh_double2scm (flexa_width)); set_delta_pitch (primitive, - primitives_arr_[i], primitives_arr_[i+1]); + primitives_[i], primitives_[i+1]); break; default: programming_error (_f ("unexpected case fall-through")); @@ -490,29 +490,29 @@ void Mensural_ligature_engraver::fold_up_primitives () { Item *first = 0; - for (int i = 0; i < primitives_arr_.size (); i++) + for (int i = 0; i < primitives_.size (); i++) { - Item *current = dynamic_cast (primitives_arr_[i].grob_l_); + Item *current = dynamic_cast (primitives_[i].grob_); if (i == 0) { first = current; } - set_column_l (current, first->column_l ()); + get_set_column (current, first->get_column ()); if (i > 0) { #if 0 Rod r; - r.distance_f_ = distance_f_; + r.distance_ = distance_; r.item_l_drul_[LEFT] = first; r.item_l_drul_[RIGHT] = current; r.add_to_cols (); #endif - current->translate_axis (distance_f_, X_AXIS); + current->translate_axis (distance_, X_AXIS); } - distance_f_ += + distance_ += gh_scm2double (current->get_grob_property ("head-width")) - gh_scm2double (current->get_grob_property ("thickness")); } @@ -522,14 +522,14 @@ void Mensural_ligature_engraver::join_primitives () { Pitch last_pitch; - for (int i = 0; i < primitives_arr_.size (); i++) + for (int i = 0; i < primitives_.size (); i++) { - Grob_info info = primitives_arr_[i]; + Grob_info info = primitives_[i]; Note_req *nr = dynamic_cast (info.music_cause ()); Pitch pitch = *unsmob_pitch (nr->get_mus_property ("pitch")); if (i > 0) { - Item *primitive = dynamic_cast (info.grob_l_); + Item *primitive = dynamic_cast (info.grob_); int output = gh_scm2int (primitive->get_grob_property ("primitive")); if (output & MLP_ANY) { @@ -545,20 +545,20 @@ Mensural_ligature_engraver::join_primitives () void Mensural_ligature_engraver::try_stop_ligature () { - if (finished_ligature_p_) + if (finished_ligature_) { transform_heads (); propagate_properties (); fold_up_primitives (); join_primitives (); - for (int i = 0; i < primitives_arr_.size (); i++) + for (int i = 0; i < primitives_.size (); i++) { - typeset_grob (primitives_arr_[i].grob_l_); + typeset_grob (primitives_[i].grob_); } - primitives_arr_.clear (); - finished_ligature_p_ = 0; + primitives_.clear (); + finished_ligature_ = 0; } } @@ -566,11 +566,11 @@ void Mensural_ligature_engraver::acknowledge_grob (Grob_info info) { Ligature_engraver::acknowledge_grob (info); - if (ligature_p_) + if (ligature_) { - if (Note_head::has_interface (info.grob_l_)) + if (Note_head::has_interface (info.grob_)) { - primitives_arr_.push (info); + primitives_.push (info); } } } diff --git a/lily/mensural-ligature.cc b/lily/mensural-ligature.cc index 9581e56724..fc7a44e0c5 100644 --- a/lily/mensural-ligature.cc +++ b/lily/mensural-ligature.cc @@ -150,7 +150,7 @@ internal_brew_primitive (Grob *me, bool ledger_take_space) else { programming_error (_f ("Mensural_ligature: thickness undefined on flexa %d; assuming 1.4", primitive)); - thickness = 1.4 * me->paper_l ()->get_var ("linethickness"); + thickness = 1.4 * me->get_paper ()->get_var ("linethickness"); } } @@ -215,7 +215,7 @@ internal_brew_primitive (Grob *me, bool ledger_take_space) int join_left = gh_scm2int (join_left_scm); if (!join_left) programming_error (_f ("Menusral_ligature: (join_left == 0)")); - Real blotdiameter = (me->paper_l ()->get_var ("blotdiameter")); + Real blotdiameter = (me->get_paper ()->get_var ("blotdiameter")); Interval x_extent = Interval (0, thickness); Interval y_extent = (join_left > 0) ? Interval (-join_left * 0.5 * staff_space, 0) : @@ -227,7 +227,7 @@ internal_brew_primitive (Grob *me, bool ledger_take_space) out.add_molecule (stem); } - int pos = (int)rint (Staff_symbol_referencer::position_f (me)); + int pos = (int)rint (Staff_symbol_referencer::get_position (me)); add_ledger_lines(me, &out, pos, 0, ledger_take_space); if (primitive & MLP_FLEXA) { diff --git a/lily/midi-def.cc b/lily/midi-def.cc index fa8f01643c..2684973f56 100644 --- a/lily/midi-def.cc +++ b/lily/midi-def.cc @@ -20,7 +20,7 @@ Midi_def::Midi_def () } int -Midi_def::get_tempo_i (Moment one_beat_mom) +Midi_def::get_tempo (Moment one_beat_mom) { SCM wis = ly_symbol2scm ("whole-in-seconds"); Moment *w = unsmob_moment (variable_tab_->get (wis)); @@ -50,16 +50,16 @@ Midi_def::set_tempo (Moment one_beat_mom, int beats_per_minute_i) } -int Midi_def::score_count_i_=0; +int Midi_def::score_count_=0; int Midi_def::get_next_score_count () const { - return score_count_i_++; + return score_count_++; } void Midi_def::reset_score_count () { - score_count_i_ = 0; + score_count_ = 0; } diff --git a/lily/midi-item.cc b/lily/midi-item.cc index 22176a87aa..f13edbbd0a 100644 --- a/lily/midi-item.cc +++ b/lily/midi-item.cc @@ -20,12 +20,12 @@ #include "killing-cons.tcc" Midi_item* -Midi_item::midi_p (Audio_item* a) +Midi_item::get_midi (Audio_item* a) { if (Audio_key* i = dynamic_cast (a)) return new Midi_key (i); else if (Audio_instrument* i = dynamic_cast (a)) - return i->str_.length_i () ? new Midi_instrument (i) : 0; + return i->str_.length () ? new Midi_instrument (i) : 0; else if (Audio_note* i = dynamic_cast (a)) return new Midi_note (i); else if (Audio_dynamic* i = dynamic_cast (a)) @@ -37,7 +37,7 @@ Midi_item::midi_p (Audio_item* a) else if (Audio_time_signature* i = dynamic_cast (a)) return new Midi_time_signature (i); else if (Audio_text* i = dynamic_cast (a)) - //return i->text_str_.length_i () ? new Midi_text (i) : 0; + //return i->text_string_.length () ? new Midi_text (i) : 0; return new Midi_text (i); else assert (0); @@ -47,64 +47,64 @@ Midi_item::midi_p (Audio_item* a) } void -Midi_chunk::set (String header_str, String data_str, String footer_str) +Midi_chunk::set (String header_string, String data_string, String footer_string) { - data_str_ = data_str; - footer_str_ = footer_str; - header_str_ = header_str; + data_string_ = data_string; + footer_string_ = footer_string; + header_string_ = header_string; } String -Midi_chunk::data_str () const +Midi_chunk::data_string () const { - return data_str_; + return data_string_; } String -Midi_chunk::str () const -{ - String str = header_str_; - String dat = data_str (); - String length_str = String_convert::i2hex_str (dat.length_i () - + footer_str_.length_i (), 8, '0'); - length_str = String_convert::hex2bin_str (length_str); - str += length_str; +Midi_chunk::string () const +{ + String str = header_string_; + String dat = data_string (); + String length_string = String_convert::int2hex (dat.length () + + footer_string_.length (), 8, '0'); + length_string = String_convert::hex2bin (length_string); + str += length_string; str += dat; - str += footer_str_; + str += footer_string_; return str; } Midi_duration::Midi_duration (Real seconds_f) { - seconds_f_ = seconds_f; + seconds_ = seconds_f; } String -Midi_duration::str () const +Midi_duration::string () const { - return String (""; + return String (""; } -Midi_event::Midi_event (Moment delta_mom, Midi_item* midi_p) +Midi_event::Midi_event (Moment delta_mom, Midi_item* midi) { delta_mom_ = delta_mom; - midi_p_ = midi_p; + midi_ = midi; } /* ugh. midi output badly broken since grace note hackage. */ String -Midi_event::str () const +Midi_event::string () const { Rational rat_dt = (delta_mom_.main_part_ * Rational (384) + delta_mom_.grace_part_ * Rational (100))*Rational (4); int delta_i = int (rat_dt); - String delta_str = Midi_item::i2varint_str (delta_i); - String midi_str = midi_p_->str (); - assert (midi_str.length_i ()); - return delta_str + midi_str; + String delta_string = Midi_item::i2varint_string (delta_i); + String midi_string = midi_->string (); + assert (midi_string.length ()); + return delta_string + midi_string; } @@ -112,45 +112,45 @@ Midi_header::Midi_header (int format_i, int tracks_i, int clocks_per_4_i) { String str; - String format_str = String_convert::i2hex_str (format_i, 4, '0'); - str += String_convert::hex2bin_str (format_str); + String format_string = String_convert::int2hex (format_i, 4, '0'); + str += String_convert::hex2bin (format_string); - String tracks_str = String_convert::i2hex_str (tracks_i, 4, '0'); - str += String_convert::hex2bin_str (tracks_str); + String tracks_string = String_convert::int2hex (tracks_i, 4, '0'); + str += String_convert::hex2bin (tracks_string); - String tempo_str = String_convert::i2hex_str (clocks_per_4_i, 4, '0'); - str += String_convert::hex2bin_str (tempo_str); + String tempo_string = String_convert::int2hex (clocks_per_4_i, 4, '0'); + str += String_convert::hex2bin (tempo_string); set ("MThd", str, ""); } Midi_instrument::Midi_instrument (Audio_instrument* a) { - audio_l_ = a; - audio_l_->str_.to_lower (); + audio_ = a; + audio_->str_.to_lower (); } String -Midi_instrument::str() const +Midi_instrument::string () const { Byte program_byte = 0; bool found = false; SCM proc = scm_primitive_eval (ly_symbol2scm ("midi-program")); - SCM program = gh_call1 (proc, ly_symbol2scm (audio_l_->str_.ch_C())); + SCM program = gh_call1 (proc, ly_symbol2scm (audio_->str_.to_str0 ())); found = (program != SCM_BOOL_F); if (found) program_byte = gh_scm2int(program); else - warning (_f ("no such instrument: `%s'", audio_l_->str_.ch_C ())); + warning (_f ("no such instrument: `%s'", audio_->str_.to_str0 ())); - String str = to_str ((char) (0xc0 + channel_i_)); //YIKES! FIXME: Should be track. -rz - str += to_str ((char)program_byte); + String str = to_string ((char) (0xc0 + channel_)); //YIKES! FIXME: Should be track. -rz + str += to_string ((char)program_byte); return str; } Midi_item::Midi_item () { - channel_i_ = 0; + channel_ = 0; } Midi_item::~Midi_item () @@ -158,7 +158,7 @@ Midi_item::~Midi_item () } String -Midi_item::i2varint_str (int i) +Midi_item::i2varint_string (int i) { int buffer_i = i & 0x7f; while ((i >>= 7) > 0) @@ -171,7 +171,7 @@ Midi_item::i2varint_str (int i) String str; while (1) { - str += to_str ((char)buffer_i); + str += to_string ((char)buffer_i); if (buffer_i & 0x80) buffer_i >>= 8; else @@ -182,51 +182,51 @@ Midi_item::i2varint_str (int i) Midi_key::Midi_key (Audio_key*a) { - audio_l_ = a; + audio_ = a; } String -Midi_key::str () const +Midi_key::string () const { String str = "ff5902"; - str += String_convert::i2hex_str (audio_l_->accidentals_, 2, '0'); - if (audio_l_->major_) - str += String_convert::i2hex_str (0, 2, '0'); + str += String_convert::int2hex (audio_->accidentals_, 2, '0'); + if (audio_->major_) + str += String_convert::int2hex (0, 2, '0'); else - str += String_convert::i2hex_str (1, 2, '0'); - return String_convert::hex2bin_str (str); + str += String_convert::int2hex (1, 2, '0'); + return String_convert::hex2bin (str); } Midi_time_signature::Midi_time_signature (Audio_time_signature* a) { - audio_l_ = a; - clocks_per_1_i_ = 18; + audio_ = a; + clocks_per_1_ = 18; } String -Midi_time_signature::str () const +Midi_time_signature::string () const { - int num = audio_l_->beats_i_; - int den = audio_l_->one_beat_i_; + int num = audio_->beats_; + int den = audio_->one_beat_; String str = "ff5804"; - str += String_convert::i2hex_str (num, 2, '0'); - str += String_convert::i2hex_str (intlog2 (den) , 2, '0'); - str += String_convert::i2hex_str (clocks_per_1_i_, 2, '0'); - str += String_convert::i2hex_str (8, 2, '0'); - return String_convert::hex2bin_str (str); + str += String_convert::int2hex (num, 2, '0'); + str += String_convert::int2hex (intlog2 (den) , 2, '0'); + str += String_convert::int2hex (clocks_per_1_, 2, '0'); + str += String_convert::int2hex (8, 2, '0'); + return String_convert::hex2bin (str); } Midi_note::Midi_note (Audio_note* a) { - audio_l_ = a; + audio_ = a; dynamic_byte_ = 0x7f; } Moment Midi_note::length_mom () const { - Moment m = audio_l_->length_mom_; + Moment m = audio_->length_mom_; #if 0 //junkme? if (m < Moment (Rational (1, 1000))) @@ -239,9 +239,9 @@ Midi_note::length_mom () const } int -Midi_note::pitch_i () const +Midi_note::get_pitch () const { - int p = audio_l_->pitch_.semitone_pitch () + audio_l_->transposing_i_; + int p = audio_->pitch_.semitone_pitch () + audio_->transposing_; if (p == INT_MAX) { warning (_ ("silly pitch")); @@ -251,22 +251,22 @@ Midi_note::pitch_i () const } String -Midi_note::str () const +Midi_note::string () const { - Byte status_byte = (char) (0x90 + channel_i_); + Byte status_byte = (char) (0x90 + channel_); - String str = to_str ((char)status_byte); - str += to_str ((char) (pitch_i () + c0_pitch_i_c_)); + String str = to_string ((char)status_byte); + str += to_string ((char) (get_pitch () + c0_pitch_i_)); - str += to_str ((char)dynamic_byte_); + str += to_string ((char)dynamic_byte_); return str; } Midi_note_off::Midi_note_off (Midi_note* n) - : Midi_note (n->audio_l_) + : Midi_note (n->audio_) { - on_l_ = n; - channel_i_ = n->channel_i_; + on_ = n; + channel_ = n->channel_; // Anybody who hears any difference, or knows how this works? // 0 should definitely be avoided, notes stick on some sound cards. @@ -276,26 +276,26 @@ Midi_note_off::Midi_note_off (Midi_note* n) } String -Midi_note_off::str () const +Midi_note_off::string () const { - Byte status_byte = (char) (0x80 + channel_i_); + Byte status_byte = (char) (0x80 + channel_); - String str = to_str ((char)status_byte); - str += to_str ((char) (pitch_i () + Midi_note::c0_pitch_i_c_)); - str += to_str ((char)aftertouch_byte_); + String str = to_string ((char)status_byte); + str += to_string ((char) (get_pitch () + Midi_note::c0_pitch_i_)); + str += to_string ((char)aftertouch_byte_); return str; } Midi_dynamic::Midi_dynamic (Audio_dynamic* a) { - audio_l_ = a; + audio_ = a; } String -Midi_dynamic::str () const +Midi_dynamic::string () const { - Byte status_byte = (char) (0xB0 + channel_i_); - String str = to_str ((char)status_byte); + Byte status_byte = (char) (0xB0 + channel_); + String str = to_string ((char)status_byte); /* Main volume controller (per channel): @@ -304,66 +304,66 @@ Midi_dynamic::str () const */ static Real const full_scale = 127; - int volume = (int) (audio_l_->volume_*full_scale); + int volume = (int) (audio_->volume_*full_scale); if (volume <= 0) volume = 1; if (volume > full_scale) volume = (int)full_scale; - str += to_str ((char)0x07); - str += to_str ((char)volume); + str += to_string ((char)0x07); + str += to_string ((char)volume); return str; } Midi_piano_pedal::Midi_piano_pedal (Audio_piano_pedal* a) { - audio_l_ = a; + audio_ = a; } String -Midi_piano_pedal::str () const +Midi_piano_pedal::string () const { - Byte status_byte = (char) (0xB0 + channel_i_); - String str = to_str ((char)status_byte); + Byte status_byte = (char) (0xB0 + channel_); + String str = to_string ((char)status_byte); - if (audio_l_->type_str_ == "Sostenuto") - str += to_str ((char)0x42); - else if (audio_l_->type_str_ == "Sustain") - str += to_str ((char)0x40); - else if (audio_l_->type_str_ == "UnaCorda") - str += to_str ((char)0x43); + if (audio_->type_string_ == "Sostenuto") + str += to_string ((char)0x42); + else if (audio_->type_string_ == "Sustain") + str += to_string ((char)0x40); + else if (audio_->type_string_ == "UnaCorda") + str += to_string ((char)0x43); - int pedal = ((1 - audio_l_->dir_) / 2) * 0x7f; - str += to_str ((char)pedal); + int pedal = ((1 - audio_->dir_) / 2) * 0x7f; + str += to_string ((char)pedal); return str; } Midi_tempo::Midi_tempo (Audio_tempo* a) { - audio_l_ = a; + audio_ = a; } String -Midi_tempo::str () const +Midi_tempo::string () const { - int useconds_per_4_i = 60 * (int)1e6 / audio_l_->per_minute_4_i_; + int useconds_per_4_i = 60 * (int)1e6 / audio_->per_minute_4_; String str = "ff5103"; - str += String_convert::i2hex_str (useconds_per_4_i, 6, '0'); - return String_convert::hex2bin_str (str); + str += String_convert::int2hex (useconds_per_4_i, 6, '0'); + return String_convert::hex2bin (str); } Midi_text::Midi_text (Audio_text* a) { - audio_l_ = a; + audio_ = a; } String -Midi_text::str () const +Midi_text::string () const { - String str = "ff" + String_convert::i2hex_str (audio_l_->type_, 2, '0'); - str = String_convert::hex2bin_str (str); - str += i2varint_str (audio_l_->text_str_.length_i ()); - str += audio_l_->text_str_; + String str = "ff" + String_convert::int2hex (audio_->type_, 2, '0'); + str = String_convert::hex2bin (str); + str += i2varint_string (audio_->text_string_.length ()); + str += audio_->text_string_; return str; } @@ -384,9 +384,9 @@ Midi_track::Midi_track () // mi = 0: major key // mi = 1: minor key - number_i_ = 0; + number_ = 0; - char const* data_ch_C = "" + char const* data_str0 = "" // "00" "ff58" "0404" "0218" "08" // "00" "ff51" "0307" "a120" // why a key at all, in midi? @@ -396,34 +396,34 @@ Midi_track::Midi_track () // "00" "ff59" "02" "ff" "00" ; - String data_str; + String data_string; // only for format 0 (currently using format 1)? - data_str += String_convert::hex2bin_str (data_ch_C); + data_string += String_convert::hex2bin (data_str0); - char const* footer_ch_C = "00" "ff2f" "00"; - String footer_str = String_convert::hex2bin_str (footer_ch_C); + char const* footer_str0 = "00" "ff2f" "00"; + String footer_string = String_convert::hex2bin (footer_str0); - set ("MTrk", data_str, footer_str); + set ("MTrk", data_string, footer_string); } void -Midi_track::add (Moment delta_time_mom, Midi_item* midi_p) +Midi_track::add (Moment delta_time_mom, Midi_item* midi) { assert (delta_time_mom >= Moment (0)); - Midi_event * e = new Midi_event (delta_time_mom, midi_p); + Midi_event * e = new Midi_event (delta_time_mom, midi); event_p_list_.append (new Killing_cons (e, 0)); } String -Midi_track::data_str () const +Midi_track::data_string () const { - String str = Midi_chunk::data_str (); + String str = Midi_chunk::data_string (); if (midi_debug_global_b) str += "\n"; for (Cons *i=event_p_list_.head_; i; i = i->next_) { - str += i->car_->str (); + str += i->car_->string (); if (midi_debug_global_b) str += "\n"; } diff --git a/lily/midi-stream.cc b/lily/midi-stream.cc index 315da95860..95f956dea5 100644 --- a/lily/midi-stream.cc +++ b/lily/midi-stream.cc @@ -19,47 +19,47 @@ Midi_stream::Midi_stream (String filename) { - filename_str_ = filename; - os_p_ = open_file_stream (filename, std::ios::out|std::ios::binary); + filename_string_ = filename; + os_ = open_file_stream (filename, std::ios::out|std::ios::binary); } Midi_stream::~Midi_stream () { - close_file_stream (os_p_); + close_file_stream (os_); } Midi_stream& Midi_stream::operator << (String str) { - Byte * b = str.byte_l(); - for (int sz = str.length_i (); sz--;) - *os_p_ << *b ++; + Byte * b = str.get_bytes (); + for (int sz = str.length (); sz--;) + *os_ << *b ++; return *this; } Midi_stream& Midi_stream::operator << (Midi_item const& midi_c_r) { - String str = midi_c_r.str (); + String str = midi_c_r.string (); if (midi_debug_global_b) { - str = String_convert::bin2hex_str (str) + "\n"; + str = String_convert::bin2hex (str) + "\n"; // ugh, should have separate debugging output with Midi*::print routines - int i = str.index_i ("0a"); + int i = str.index ("0a"); while (i >= 0) { str[i] = '\n'; str[i + 1] = '\t'; - i = str.index_i ("0a"); + i = str.index ("0a"); } } else { - Byte * b = str.byte_l(); - for (int sz = str.length_i (); sz--;) - *os_p_ << *b++; + Byte * b = str.get_bytes (); + for (int sz = str.length (); sz--;) + *os_ << *b++; } return *this; @@ -69,7 +69,7 @@ Midi_stream& Midi_stream::operator << (int i) { // output binary string ourselves - *this << Midi_item::i2varint_str (i); + *this << Midi_item::i2varint_string (i); return *this; } diff --git a/lily/midi-walker.cc b/lily/midi-walker.cc index b544dc3fb0..40aa3af5e7 100644 --- a/lily/midi-walker.cc +++ b/lily/midi-walker.cc @@ -33,11 +33,11 @@ compare (Midi_note_event const& left, Midi_note_event const& right) return 0; } -Midi_walker::Midi_walker (Audio_staff* audio_staff_l, Midi_track* track_l) +Midi_walker::Midi_walker (Audio_staff* audio_staff, Midi_track* track) { - track_l_ = track_l; + track_ = track; index_= 0; - item_l_arr_l_ = &audio_staff_l->audio_item_l_arr_; + items_ = &audio_staff->audio_items_; last_mom_ = 0; } @@ -52,16 +52,16 @@ Midi_walker::~Midi_walker () Find out if start_note event is needed, and do it if needed. */ void -Midi_walker::do_start_note (Midi_note* note_p) +Midi_walker::do_start_note (Midi_note* note) { - Audio_item* ptr = (*item_l_arr_l_)[index_]; - Moment stop_mom = note_p->length_mom () + ptr->audio_column_l_->at_mom (); + Audio_item* ptr = (*items_)[index_]; + Moment stop_mom = note->length_mom () + ptr->audio_column_->at_mom (); bool play_start = true; for (int i=0; i < stop_note_queue.size (); i++) { /* if this pith already in queue */ - if (stop_note_queue[i].val->pitch_i () == note_p->pitch_i ()) + if (stop_note_queue[i].val->get_pitch () == note->get_pitch ()) { if (stop_note_queue[i].key < stop_mom) { @@ -76,22 +76,22 @@ Midi_walker::do_start_note (Midi_note* note_p) { /* skip this stopnote, don't play the start note */ - delete note_p; - note_p = 0; + delete note; + note = 0; break; } } } - if (note_p) + if (note) { Midi_note_event e; - e.val = new Midi_note_off (note_p); + e.val = new Midi_note_off (note); e.key = stop_mom; stop_note_queue.insert (e); if (play_start) - output_event (ptr->audio_column_l_->at_mom (), note_p); + output_event (ptr->audio_column_->at_mom (), note); } } @@ -111,9 +111,9 @@ Midi_walker::do_stop_notes (Moment max_mom) } Moment stop_mom = e.key; - Midi_note* note_p = e.val; + Midi_note* note = e.val; - output_event (stop_mom, note_p); + output_event (stop_mom, note); } } @@ -136,33 +136,33 @@ Midi_walker::output_event (Moment now_mom, Midi_item* l) } - track_l_->add (delta_t, l); + track_->add (delta_t, l); } void Midi_walker::process () { - Audio_item* audio_p = (*item_l_arr_l_)[index_]; - do_stop_notes (audio_p->audio_column_l_->at_mom ()); + Audio_item* audio = (*items_)[index_]; + do_stop_notes (audio->audio_column_->at_mom ()); - if (Midi_item* midi_p = Midi_item::midi_p (audio_p)) + if (Midi_item* midi = Midi_item::get_midi (audio)) { - midi_p->channel_i_ = track_l_->channel_i_; - //midi_p->channel_i_ = track_l_->number_i_; - if (Midi_note* note_p = dynamic_cast (midi_p)) + midi->channel_ = track_->channel_; + //midi->channel_ = track_->number_; + if (Midi_note* note = dynamic_cast (midi)) { - if (note_p->length_mom ().to_bool ()) - do_start_note (note_p); + if (note->length_mom ().to_bool ()) + do_start_note (note); } else - output_event (audio_p->audio_column_l_->at_mom (), midi_p); + output_event (audio->audio_column_->at_mom (), midi); } } bool Midi_walker::ok () const { - return index_ size (); + return index_ size (); } void diff --git a/lily/molecule.cc b/lily/molecule.cc index e748b5d77b..1a5efa8c76 100644 --- a/lily/molecule.cc +++ b/lily/molecule.cc @@ -146,7 +146,7 @@ smaller than @code{B}, and is often negative. { Molecule* m = unsmob_molecule (mol); SCM_ASSERT_TYPE (m, mol, SCM_ARG1, __FUNCTION__, "molecule"); - SCM_ASSERT_TYPE (ly_axis_p(axis), axis, SCM_ARG2, __FUNCTION__, "axis"); + SCM_ASSERT_TYPE (ly_axis_p (axis), axis, SCM_ARG2, __FUNCTION__, "axis"); SCM_ASSERT_TYPE (ly_number_pair_p (np), np, SCM_ARG3, __FUNCTION__, "number pair"); Interval iv = ly_scm2interval (np); @@ -163,7 +163,7 @@ LY_DEFINE(ly_get_molecule_extent, { Molecule *m = unsmob_molecule (mol); SCM_ASSERT_TYPE (m, mol, SCM_ARG1, __FUNCTION__, "molecule"); - SCM_ASSERT_TYPE (ly_axis_p(axis), axis, SCM_ARG2, __FUNCTION__, "axis"); + SCM_ASSERT_TYPE (ly_axis_p (axis), axis, SCM_ARG2, __FUNCTION__, "axis"); return ly_interval2scm (m->extent (Axis (gh_scm2int (axis)))); } @@ -184,9 +184,9 @@ space to add in between measured in global staff space.") Molecule result; - SCM_ASSERT_TYPE(ly_axis_p(axis), axis, SCM_ARG2, __FUNCTION__, "axis"); + SCM_ASSERT_TYPE(ly_axis_p (axis), axis, SCM_ARG2, __FUNCTION__, "axis"); SCM_ASSERT_TYPE(ly_dir_p (direction), direction, SCM_ARG3, __FUNCTION__, "dir"); - SCM_ASSERT_TYPE(gh_number_p(padding), padding, SCM_ARG4, __FUNCTION__, "number"); + SCM_ASSERT_TYPE(gh_number_p (padding), padding, SCM_ARG4, __FUNCTION__, "number"); if (m1) result = *m1; @@ -283,7 +283,7 @@ LY_DEFINE(ly_align_to_x,"ly-align-to!", 3, 0, 0, (SCM mol, SCM axis, SCM dir), "Align @var{mol} using its own extents.") { SCM_ASSERT_TYPE(unsmob_molecule (mol), mol, SCM_ARG1, __FUNCTION__, "molecule"); - SCM_ASSERT_TYPE(ly_axis_p(axis), axis, SCM_ARG2, __FUNCTION__, "axis"); + SCM_ASSERT_TYPE(ly_axis_p (axis), axis, SCM_ARG2, __FUNCTION__, "axis"); SCM_ASSERT_TYPE(ly_dir_p (dir), dir, SCM_ARG3, __FUNCTION__, "dir"); unsmob_molecule (mol)->align_to ((Axis)gh_scm2int (axis), Direction (gh_scm2int (dir))); @@ -325,8 +325,8 @@ Molecule::print_smob (SCM , SCM port, scm_print_state *) scm_puts ("#str ()); - scm_puts ((char *)str.ch_C (), port); + String string (r->string ()); + scm_puts ((char *)str.to_str0 (), port); #endif scm_puts (" >", port); diff --git a/lily/moment.cc b/lily/moment.cc index 29747441da..b3d2fbcaa8 100644 --- a/lily/moment.cc +++ b/lily/moment.cc @@ -37,8 +37,8 @@ Moment::print_smob (SCM s, SCM port, scm_print_state *) Moment *r = (Moment *) ly_cdr (s); scm_puts ("#str (); - scm_puts ((char *)str.ch_C (), port); + String str = r->string (); + scm_puts ((char *)str.to_str0 (), port); scm_puts (" >", port); return 1; @@ -182,12 +182,12 @@ Moment::set_infinite (int k) String -Moment::str () const +Moment::string () const { - String s = main_part_.str (); + String s = main_part_.string (); if (grace_part_) { - s += "G" + grace_part_.str (); + s += "G" + grace_part_.string (); } return s; } @@ -206,7 +206,7 @@ Moment::operator - () const std::ostream & operator << (std::ostream &os, Moment const &m) { - os << m.str (); + os << m.string (); return os; } #endif diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index 4f1115a98a..38318d19b9 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -32,30 +32,30 @@ protected: virtual void finalize (); private: - Span_req * new_req_l_; - Span_req * busy_span_req_l_; - Span_req * stop_req_l_; - int start_measure_i_; + Span_req * new_req_; + Span_req * busy_span_req_; + Span_req * stop_req_; + int start_measure_; Moment start_moment_; - Spanner *mmrest_p_; - Spanner *lastrest_p_; + Spanner *mmrest_; + Spanner *lastrest_; }; Multi_measure_rest_engraver::Multi_measure_rest_engraver () { - start_measure_i_ = 0; - mmrest_p_ = lastrest_p_ =0; - new_req_l_ = busy_span_req_l_ = stop_req_l_ =0; + start_measure_ = 0; + mmrest_ = lastrest_ =0; + new_req_ = busy_span_req_ = stop_req_ =0; } bool -Multi_measure_rest_engraver::try_music (Music* req_l) +Multi_measure_rest_engraver::try_music (Music* req) { - if (Span_req * sp = dynamic_cast (req_l)) + if (Span_req * sp = dynamic_cast (req)) { if (scm_equal_p (sp->get_mus_property ("span-type"), @@ -63,11 +63,11 @@ Multi_measure_rest_engraver::try_music (Music* req_l) { if (sp->get_span_dir () == STOP) { - stop_req_l_ = sp; + stop_req_ = sp; } - else if (sp->get_span_dir () == START && !new_req_l_) + else if (sp->get_span_dir () == START && !new_req_) { - new_req_l_ = sp; + new_req_ = sp; } return true; } @@ -78,30 +78,30 @@ Multi_measure_rest_engraver::try_music (Music* req_l) void Multi_measure_rest_engraver::process_music () { - if (new_req_l_ && stop_req_l_) - stop_req_l_ = 0; + if (new_req_ && stop_req_) + stop_req_ = 0; - if (new_req_l_) + if (new_req_) start_moment_ = now_mom (); - if (stop_req_l_) + if (stop_req_) { - busy_span_req_l_ =0; - stop_req_l_ = 0; + busy_span_req_ =0; + stop_req_ = 0; } - if (new_req_l_) + if (new_req_) { - busy_span_req_l_ = new_req_l_; - new_req_l_ =0; + busy_span_req_ = new_req_; + new_req_ =0; } - if (busy_span_req_l_ && !mmrest_p_) + if (busy_span_req_ && !mmrest_) { - mmrest_p_ = new Spanner (get_property ("MultiMeasureRest")); + mmrest_ = new Spanner (get_property ("MultiMeasureRest")); - announce_grob(mmrest_p_, busy_span_req_l_->self_scm()); - start_measure_i_ + announce_grob(mmrest_, busy_span_req_->self_scm()); + start_measure_ = gh_scm2int (get_property ("currentBarNumber")); } @@ -109,10 +109,10 @@ Multi_measure_rest_engraver::process_music () { Grob *cmc = unsmob_grob (get_property( "currentCommandColumn")); Item *it = dynamic_cast (cmc); - if (mmrest_p_) - add_bound_item (mmrest_p_, it); - if (lastrest_p_) - add_bound_item (lastrest_p_,it); + if (mmrest_) + add_bound_item (mmrest_, it); + if (lastrest_) + add_bound_item (lastrest_,it); } } @@ -122,30 +122,30 @@ Multi_measure_rest_engraver::stop_translation_timestep () SCM smp = get_property ("measurePosition"); Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); - if (mmrest_p_ && (now_mom () >= start_moment_) + if (mmrest_ && (now_mom () >= start_moment_) && !mp.to_bool () - && mmrest_p_->get_bound (LEFT) && mmrest_p_->get_bound (RIGHT)) + && mmrest_->get_bound (LEFT) && mmrest_->get_bound (RIGHT)) { - typeset_grob (mmrest_p_); + typeset_grob (mmrest_); /* - we must keep mmrest_p_ around to set measure-count, so - no mmrest_p_ = 0 here. + we must keep mmrest_ around to set measure-count, so + no mmrest_ = 0 here. */ } - if (lastrest_p_) + if (lastrest_) { /* sanity check */ - if (lastrest_p_->get_bound (LEFT) && lastrest_p_->get_bound (RIGHT) - && lastrest_p_->get_bound (LEFT) != lastrest_p_->get_bound (RIGHT)) - typeset_grob (lastrest_p_); - lastrest_p_ = 0; + if (lastrest_->get_bound (LEFT) && lastrest_->get_bound (RIGHT) + && lastrest_->get_bound (LEFT) != lastrest_->get_bound (RIGHT)) + typeset_grob (lastrest_); + lastrest_ = 0; } - if (new_req_l_) + if (new_req_) { - busy_span_req_l_ = new_req_l_; - new_req_l_ =0; + busy_span_req_ = new_req_; + new_req_ =0; } } @@ -156,13 +156,13 @@ Multi_measure_rest_engraver::start_translation_timestep () SCM smp = get_property ("measurePosition"); Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); - if (mmrest_p_ && !mp.to_bool ()) + if (mmrest_ && !mp.to_bool ()) { - lastrest_p_ = mmrest_p_; + lastrest_ = mmrest_; int cur = gh_scm2int (get_property ("currentBarNumber")); - lastrest_p_->set_grob_property ("measure-count", - gh_int2scm (cur - start_measure_i_)); - mmrest_p_ = 0; + lastrest_->set_grob_property ("measure-count", + gh_int2scm (cur - start_measure_)); + mmrest_ = 0; } } @@ -170,10 +170,10 @@ Multi_measure_rest_engraver::start_translation_timestep () void Multi_measure_rest_engraver::finalize () { - if (mmrest_p_) - typeset_grob (mmrest_p_); - if (lastrest_p_) - typeset_grob (lastrest_p_); + if (mmrest_) + typeset_grob (mmrest_); + if (lastrest_) + typeset_grob (lastrest_); } ENTER_DESCRIPTION(Multi_measure_rest_engraver, diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index 1d60568d45..dee5de1135 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -37,7 +37,7 @@ Multi_measure_rest::percent (SCM smob) Direction d = LEFT; do { - Item * col = sp->get_bound (d)->column_l (); + Item * col = sp->get_bound (d)->get_column (); Interval coldim = col->extent (0, X_AXIS); @@ -84,7 +84,7 @@ Multi_measure_rest::brew_molecule (SCM smob) Grob *common = sp->get_bound (LEFT)->common_refpoint (sp->get_bound (RIGHT), X_AXIS); do { - Item * col = sp->get_bound (d)->column_l (); + Item * col = sp->get_bound (d)->get_column (); Interval coldim = col->extent (common, X_AXIS); @@ -116,7 +116,7 @@ Multi_measure_rest::brew_molecule (SCM smob) if (measures > gh_scm2int (s)) { Molecule s = Text_item::text2molecule (me, - ly_str02scm (to_str (measures).ch_C ()), + ly_str02scm (to_string (measures).to_str0 ()), alist_chain); s.align_to (X_AXIS, CENTER); @@ -170,7 +170,7 @@ Multi_measure_rest::symbol_molecule (Grob *me, Real space) /* ugh. */ - if (Staff_symbol_referencer::position_f (me) == 0.0) + if (Staff_symbol_referencer::get_position (me) == 0.0) s.translate_axis (staff_space, Y_AXIS); s.translate_axis ((space - s.extent (X_AXIS).length ())/2, X_AXIS); @@ -191,7 +191,7 @@ Multi_measure_rest::big_rest (Grob *me, Real width) Real thick = gh_scm2double (me->get_grob_property ("thickness")); Real ss = Staff_symbol_referencer::staff_space (me); - Real slt = me->paper_l ()->get_var ("linethickness"); + Real slt = me->get_paper ()->get_var ("linethickness"); Real y = slt * thick/2 * ss; Box b(Interval (0, width), Interval (-y, y)); Real ythick = slt * ss; @@ -241,7 +241,7 @@ Multi_measure_rest::church_rest (Grob*me, Font_metric *musfont, int measures, l --; } - Molecule r (musfont->find_by_name ("rests-" + to_str (k))); + Molecule r (musfont->find_by_name ("rests-" + to_string (k))); if (k == 0) { Real staff_space = Staff_symbol_referencer::staff_space (me); @@ -295,8 +295,8 @@ Multi_measure_rest::set_spacing_rods (SCM smob) return SCM_UNSPECIFIED; } - Item * l = sp->get_bound (LEFT)->column_l (); - Item * r = sp->get_bound (RIGHT)->column_l (); + Item * l = sp->get_bound (LEFT)->get_column (); + Item * r = sp->get_bound (RIGHT)->get_column (); Item * lb = l->find_prebroken_piece (RIGHT); Item * rb = r->find_prebroken_piece (LEFT); @@ -317,7 +317,7 @@ Multi_measure_rest::set_spacing_rods (SCM smob) rod.item_l_drul_[RIGHT] = r; - rod.distance_f_ = l->extent (l, X_AXIS)[BIGGER] - r->extent (r, X_AXIS)[SMALLER] + rod.distance_ = l->extent (l, X_AXIS)[BIGGER] - r->extent (r, X_AXIS)[SMALLER] + sym_width + 2.0; // 2.0 = magic! rod.add_to_cols (); diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index e478c40a0d..dcb596a117 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -24,7 +24,7 @@ Music_iterator::Music_iterator () Music_iterator::Music_iterator (Music_iterator const& src) { handle_ = *src.handle_.clone (); - music_l_ = src.music_l_; + music_ = src.music_; music_length_ = src.music_length_; start_mom_ = src.start_mom_; } @@ -37,9 +37,9 @@ Music_iterator::~Music_iterator () Translator_group* -Music_iterator::report_to_l () const +Music_iterator::report_to () const { - return handle_.report_to_l (); + return handle_.report_to (); } @@ -83,7 +83,7 @@ Music_iterator::get_pending_events (Moment)const } Music_iterator* -Music_iterator::static_get_iterator_p (Music *m) +Music_iterator::get_static_get_iterator (Music *m) { Music_iterator * p =0; @@ -101,7 +101,7 @@ Music_iterator::static_get_iterator_p (Music *m) p = new Simple_music_iterator ; } - p->music_l_ = m; + p->music_ = m; assert (m); p->music_length_ = m->length_mom (); p->start_mom_ = m->start_mom (); @@ -123,9 +123,9 @@ Music_iterator::music_start_mom ()const } void -Music_iterator::init_translator (Music *m, Translator_group *report_l) +Music_iterator::init_translator (Music *m, Translator_group *report) { - music_l_ = m; + music_ = m; assert (m); if (Context_specced_music * csm =dynamic_cast (m)) { @@ -140,22 +140,22 @@ Music_iterator::init_translator (Music *m, Translator_group *report_l) c_id = ly_scm2string (ci); Translator_group* a - =report_l->find_create_translator_l (c_type, c_id); + =report->find_create_translator (c_type, c_id); set_translator (a); } - if (! report_to_l ()) - set_translator (report_l); + if (! report_to ()) + set_translator (report); } Music_iterator* -Music_iterator::get_iterator_p (Music *m) const +Music_iterator::get_iterator (Music *m) const { - Music_iterator*p = static_get_iterator_p (m); - p->init_translator (m, report_to_l ()); + Music_iterator*p = get_static_get_iterator (m); + p->init_translator (m, report_to ()); p->construct_children (); return p; @@ -170,7 +170,7 @@ Music_iterator::get_iterator_p (Music *m) const Music_iterator* Music_iterator::try_music (Music *m) const { - bool b = report_to_l ()->try_music ((Music*)m); // ugh + bool b = report_to ()->try_music ((Music*)m); // ugh Music_iterator * it = b ? (Music_iterator*) this : 0; // ugh if (!it) it = try_music_in_children (m); @@ -186,7 +186,7 @@ Music_iterator::try_music_in_children (Music *) const IMPLEMENT_CTOR_CALLBACK (Music_iterator); Music * -Music_iterator::music_l () const +Music_iterator::get_music () const { - return music_l_; + return music_; } diff --git a/lily/music-output-def.cc b/lily/music-output-def.cc index 96f86c2659..4381e4f2ba 100644 --- a/lily/music-output-def.cc +++ b/lily/music-output-def.cc @@ -92,7 +92,7 @@ Music_output_def::assign_translator (SCM transdef) find the translator for NAME. NAME may be a string or a symbol. */ SCM -Music_output_def::find_translator_l (SCM name) const +Music_output_def::find_translator (SCM name) const { if (gh_string_p (name)) name = scm_string_to_symbol (name); @@ -104,10 +104,10 @@ Music_output_def::find_translator_l (SCM name) const Global_translator * -Music_output_def::get_global_translator_p () +Music_output_def::get_global_translator () { SCM key = ly_symbol2scm ("Score"); - Translator_def * t = unsmob_translator_def (find_translator_l (key)); + Translator_def * t = unsmob_translator_def (find_translator (key)); if (!t) error (_f ("can't find `%s' context", "Score")); @@ -137,15 +137,15 @@ Music_output_def::print_smob (SCM s, SCM p, scm_print_state *) ugh: should move into Music_output_def (complication: .midi and .tex need separate counts.) */ String -Music_output_def::outname_str () +Music_output_def::outname_string () { String out = output_name_global; int def = get_next_score_count (); if (def && out != "-") { Path p = split_path (out); - p.base += "-" + to_str (def); - out = p.str (); + p.base += "-" + to_string (def); + out = p.string (); } return out; } diff --git a/lily/music-wrapper-iterator.cc b/lily/music-wrapper-iterator.cc index cf5097245f..4980c9344f 100644 --- a/lily/music-wrapper-iterator.cc +++ b/lily/music-wrapper-iterator.cc @@ -12,35 +12,35 @@ Music_wrapper_iterator::Music_wrapper_iterator () { - child_iter_p_ =0; + child_iter_ =0; } Music_wrapper_iterator::Music_wrapper_iterator (Music_wrapper_iterator const &src) : Music_iterator (src) { - if (src.child_iter_p_) - child_iter_p_ = src.child_iter_p_->clone (); + if (src.child_iter_) + child_iter_ = src.child_iter_->clone (); else - child_iter_p_ = 0; + child_iter_ = 0; } Music_wrapper_iterator::~Music_wrapper_iterator () { - delete child_iter_p_; + delete child_iter_; } void Music_wrapper_iterator::construct_children () { - child_iter_p_ = - get_iterator_p (dynamic_cast (music_l ())->element ()); + child_iter_ = + get_iterator (dynamic_cast (get_music ())->element ()); } bool Music_wrapper_iterator::ok () const { - return child_iter_p_ && child_iter_p_->ok (); + return child_iter_ && child_iter_->ok (); } void Music_wrapper_iterator::skip (Moment m) @@ -54,31 +54,31 @@ Music_wrapper_iterator::skip (Moment m) iter->process () */ - child_iter_p_->skip (m); + child_iter_->skip (m); } void Music_wrapper_iterator::process (Moment m) { - child_iter_p_->process (m); + child_iter_->process (m); } SCM Music_wrapper_iterator::get_pending_events (Moment m)const { - return child_iter_p_->get_pending_events (m); + return child_iter_->get_pending_events (m); } Moment Music_wrapper_iterator::pending_moment () const { - return child_iter_p_->pending_moment (); + return child_iter_->pending_moment (); } Music_iterator* Music_wrapper_iterator::try_music_in_children (Music *m) const { - return child_iter_p_->try_music (m); + return child_iter_->try_music (m); } IMPLEMENT_CTOR_CALLBACK (Music_wrapper_iterator); diff --git a/lily/music.cc b/lily/music.cc index a5b8c72b81..e105072304 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -154,10 +154,10 @@ Music::transpose (Pitch delta) Pitch np = *p; np.transpose (delta); - if (abs (np.alteration_i_) > 2) + if (abs (np.alteration_) > 2) { warning (_f ("Transposition by %s makes accidental larger than two", - delta.str ())); + delta.string ())); } set_mus_property ("pitch", np.smobbed_copy ()); @@ -221,7 +221,7 @@ LY_DEFINE(ly_get_mus_property, { Music * sc = unsmob_music (mus); SCM_ASSERT_TYPE(sc, mus, SCM_ARG1, __FUNCTION__, "music"); - SCM_ASSERT_TYPE(gh_symbol_p(sym), sym, SCM_ARG2, __FUNCTION__, "symbol"); + SCM_ASSERT_TYPE(gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol"); return sc->internal_get_mus_property (sym); } @@ -233,7 +233,7 @@ LY_DEFINE(ly_set_mus_property, { Music * sc = unsmob_music (mus); SCM_ASSERT_TYPE(sc, mus, SCM_ARG1, __FUNCTION__, "grob"); - SCM_ASSERT_TYPE(gh_symbol_p(sym), sym, SCM_ARG2, __FUNCTION__, "symbol"); + SCM_ASSERT_TYPE(gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol"); bool ok = type_check_assignment (sym, val, ly_symbol2scm ("music-type?")); if (ok) @@ -258,7 +258,7 @@ Music is the data type that music expressions are stored in. The data type does not yet offer many manipulations. ") { - SCM_ASSERT_TYPE(gh_string_p(type), type, SCM_ARG1, __FUNCTION__, "string"); + SCM_ASSERT_TYPE(gh_string_p (type), type, SCM_ARG1, __FUNCTION__, "string"); SCM s = make_music (ly_scm2string (type))->self_scm (); scm_gc_unprotect_object (s); diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index bcfc85c40b..538729df9d 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -95,29 +95,29 @@ static Keyword_ent the_key_tab[]={ My_lily_lexer::My_lily_lexer () { - keytable_p_ = new Keyword_table (the_key_tab); + keytable_ = new Keyword_table (the_key_tab); toplevel_variable_tab_ = new Scheme_hash_table ; - scope_l_arr_.push (toplevel_variable_tab_); + scopes_.push (toplevel_variable_tab_); - errorlevel_i_ = 0; + errorlevel_ = 0; main_input_b_ = false; } int My_lily_lexer::lookup_keyword (String s) { - return keytable_p_->lookup (s.ch_C ()); + return keytable_->lookup (s.to_str0 ()); } SCM My_lily_lexer::lookup_identifier (String s) { - SCM sym = ly_symbol2scm (s.ch_C ()); + SCM sym = ly_symbol2scm (s.to_str0 ()); - for (int i = scope_l_arr_.size (); i--;) + for (int i = scopes_.size (); i--;) { SCM val = SCM_UNSPECIFIED; - if (scope_l_arr_[i]->try_retrieve (sym, &val)) + if (scopes_[i]->try_retrieve (sym, &val)) return val; } return SCM_UNSPECIFIED; @@ -126,7 +126,7 @@ My_lily_lexer::lookup_identifier (String s) void My_lily_lexer::start_main_input () { - new_input (main_input_str_, source_global_l); + new_input (main_input_string_, source_global); allow_includes_b_ = allow_includes_b_ && ! (safe_global_b); } @@ -143,12 +143,12 @@ My_lily_lexer::set_identifier (SCM name, SCM s) free (str); } - scope_l_arr_.top ()->set (scm_string_to_symbol (name), s); + scopes_.top ()->set (scm_string_to_symbol (name), s); } My_lily_lexer::~My_lily_lexer () { - delete keytable_p_; + delete keytable_; scm_gc_unprotect_object (toplevel_variable_tab_->self_scm ()); } @@ -163,8 +163,8 @@ My_lily_lexer::LexerError (char const *s) } else { - errorlevel_i_ |= 1; - Input spot (source_file_l (),here_ch_C ()); + errorlevel_ |= 1; + Input spot (get_source_file (),here_str0 ()); spot.error (s); } } @@ -190,6 +190,6 @@ My_lily_lexer::escaped_char (char c) const Input My_lily_lexer::here_input () const { - Source_file * f_l= source_file_l (); - return Input (f_l, (char*)here_ch_C ()); + Source_file * f= get_source_file (); + return Input (f, (char*)here_str0 ()); } diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc index fcba6c4691..4dbf2cca64 100644 --- a/lily/my-lily-parser.cc +++ b/lily/my-lily-parser.cc @@ -15,22 +15,22 @@ #include "file-results.hh" #include "scm-hash.hh" -My_lily_parser::My_lily_parser (Sources * source_l) +My_lily_parser::My_lily_parser (Sources * source) { - source_l_ = source_l; - lexer_p_ = 0; + source_ = source; + lexer_ = 0; default_duration_ = Duration (2,0); - error_level_i_ = 0; + error_level_ = 0; last_beam_start_ = SCM_EOL; - default_header_p_ =0; + default_header_ =0; } My_lily_parser::~My_lily_parser () { - delete lexer_p_; - if (default_header_p_) - scm_gc_unprotect_object (default_header_p_->self_scm()); + delete lexer_; + if (default_header_) + scm_gc_unprotect_object (default_header_->self_scm()); } void @@ -41,46 +41,46 @@ My_lily_parser::set_version_check (bool) void My_lily_parser::parse_file (String init, String s) { - lexer_p_ = new My_lily_lexer; + lexer_ = new My_lily_lexer; - lexer_p_->main_input_str_ = s; + lexer_->main_input_string_ = s; progress_indication (_ ("Parsing...")); set_yydebug (0); - lexer_p_->new_input (init, source_l_); + lexer_->new_input (init, source_); do_yyparse (); progress_indication ("\n"); - if (!define_spot_array_.empty ()) + if (!define_spots_.empty ()) { - define_spot_array_.top ().warning (_ ("Braces don't match")); - error_level_i_ = 1; + define_spots_.top ().warning (_ ("Braces don't match")); + error_level_ = 1; } - inclusion_global_array = lexer_p_->filename_str_arr_; + inclusion_globals = lexer_->filename_strings_; - error_level_i_ = error_level_i_ | lexer_p_->errorlevel_i_; // ugh naming. + error_level_ = error_level_ | lexer_->errorlevel_; // ugh naming. } void My_lily_parser::push_spot () { - define_spot_array_.push (here_input ()); + define_spots_.push (here_input ()); } char const * -My_lily_parser::here_ch_C () const +My_lily_parser::here_str0 () const { - return lexer_p_->here_ch_C (); + return lexer_->here_str0 (); } void My_lily_parser::parser_error (String s) { here_input ().error (s); - error_level_i_ = 1; + error_level_ = 1; exit_status_global = 1; } @@ -89,13 +89,13 @@ My_lily_parser::parser_error (String s) Input My_lily_parser::pop_spot () { - return define_spot_array_.pop (); + return define_spots_.pop (); } Input My_lily_parser::here_input () const { - return lexer_p_->here_input (); + return lexer_->here_input (); } // move me? @@ -111,7 +111,7 @@ My_lily_parser::paper_description () { My_lily_parser * me = current_parser; - Music_output_def *id = unsmob_music_output_def (me->lexer_p_->lookup_identifier ("$defaultpaper")); + Music_output_def *id = unsmob_music_output_def (me->lexer_->lookup_identifier ("$defaultpaper")); Paper_def *p = dynamic_cast (id->clone ()); SCM al = p->translator_tab_->to_alist (); diff --git a/lily/new-accidental-engraver.cc b/lily/new-accidental-engraver.cc index 262c3060ac..76e64a7970 100644 --- a/lily/new-accidental-engraver.cc +++ b/lily/new-accidental-engraver.cc @@ -88,9 +88,9 @@ protected: /* The next */ - Array accidental_arr_; + Array accidentals_; - Link_array tie_arr_; + Link_array ties_; }; @@ -131,7 +131,7 @@ static void merge_property_on_family (Translator_group * trans, const char * from_sym, const char * to_sym) { merge_property_on_children (trans, from_sym, to_sym); - trans = trans->daddy_trans_l_; + trans = trans->daddy_trans_; while (trans) { SCM from = trans->get_property(from_sym); @@ -139,7 +139,7 @@ static void merge_property_on_family (Translator_group * trans, to = merge_alists_front_x(from, to); trans->set_property (to_sym, to); trans->set_property (from_sym, SCM_EOL); - trans = trans->daddy_trans_l_; + trans = trans->daddy_trans_; } } @@ -155,11 +155,11 @@ static void set_property_on_children (Translator_group * trans, const char * sym static void set_property_on_family(Translator_group * trans, const char * sym, SCM val) { set_property_on_children (trans, sym, val); - trans = trans->daddy_trans_l_; + trans = trans->daddy_trans_; while (trans) { trans -> set_property (sym, ly_deep_copy (val)); - trans = trans->daddy_trans_l_; + trans = trans->daddy_trans_; } } @@ -178,12 +178,12 @@ calculates the number of accidentals on basis of the current local key sig */ static int -number_accidentals (SCM sig, Note_req * note_l, Pitch *pitch, SCM curbarnum, SCM lazyness, +number_accidentals (SCM sig, Note_req * note, Pitch *pitch, SCM curbarnum, SCM lazyness, bool ignore_octave_b) { - int n = pitch->notename_i_; - int o = pitch->octave_i_; - int a = pitch->alteration_i_; + int n = pitch->notename_; + int o = pitch->octave_; + int a = pitch->alteration_; int curbarnum_i = gh_scm2int (curbarnum); int accbarnum_i = 0; @@ -212,7 +212,7 @@ number_accidentals (SCM sig, Note_req * note_l, Pitch *pitch, SCM curbarnum, SCM int num; if (a == p - && !to_boolean (note_l->get_mus_property ("force-accidental")) + && !to_boolean (note->get_mus_property ("force-accidental")) && gh_number_p (prev_acc)) num = 0; else if ( (abs (a)get_property ("localKeySignature"); + SCM localsig = origin->get_property ("localKeySignature"); bool same_octave_b = gh_eq_p (ly_symbol2scm ("same-octave"), type); @@ -251,13 +251,13 @@ number_accidentals (Note_req * note_l, Pitch *pitch, Translator_group * origin_l if (same_octave_b || any_octave_b) { int n = number_accidentals - (localsig, note_l, pitch, curbarnum, lazyness, any_octave_b); + (localsig, note, pitch, curbarnum, lazyness, any_octave_b); diff = diff || (n < 0); number = max (number, abs (n)); } else warning (_f ("unknown accidental typesetting: %s. Ignored", - ly_symbol2string (type).ch_C ())); + ly_symbol2string (type).to_str0 ())); } @@ -268,15 +268,15 @@ number_accidentals (Note_req * note_l, Pitch *pitch, Translator_group * origin_l { String context = ly_symbol2string (ly_car (accidentals)); - while (origin_l && !origin_l->is_alias_b (context)) - origin_l = origin_l->daddy_trans_l_; + while (origin && !origin->is_alias_b (context)) + origin = origin->daddy_trans_; - if (!origin_l) + if (!origin) warning (_f ("Symbol is not a parent context: %s. Ignored", - context.ch_C ())); + context.to_str0 ())); } else warning (_f ("Accidental typesetting must be pair or context-name: %s", - ly_scm2string (ly_car (accidentals)).ch_C ())); + ly_scm2string (ly_car (accidentals)).to_str0 ())); accidentals = ly_cdr (accidentals); } @@ -296,40 +296,40 @@ New_accidental_engraver::process_grobs_first_pass () SCM cautionaries = get_property ("autoCautionaries"); SCM barnum = get_property ("currentBarNumber"); - for (int i = 0; i < accidental_arr_.size (); i++) + for (int i = 0; i < accidentals_.size (); i++) { - if (accidental_arr_[i].pass_done_ >= 1) + if (accidentals_[i].pass_done_ >= 1) continue; - accidental_arr_[i].pass_done_ = 1; + accidentals_[i].pass_done_ = 1; - Grob * support_l = accidental_arr_[i].head_; - Note_req * note_l = accidental_arr_[i].melodic_; - Translator_group * origin_l = accidental_arr_[i].origin_; - Pitch * pitch = unsmob_pitch (note_l->get_mus_property ("pitch")); + Grob * support = accidentals_[i].head_; + Note_req * note = accidentals_[i].melodic_; + Translator_group * origin = accidentals_[i].origin_; + Pitch * pitch = unsmob_pitch (note->get_mus_property ("pitch")); int num; - num = number_accidentals (note_l, pitch, origin_l, accidentals, barnum); - accidental_arr_[i].number_accidentals_ = abs(num); - accidental_arr_[i].different_ = num<0; + num = number_accidentals (note, pitch, origin, accidentals, barnum); + accidentals_[i].number_accidentals_ = abs(num); + accidentals_[i].different_ = num<0; - num = number_accidentals (note_l, pitch, origin_l, cautionaries, barnum); - accidental_arr_[i].number_cautionaries_ = abs(num); - accidental_arr_[i].different_ = accidental_arr_[i].different_ || num<0; + num = number_accidentals (note, pitch, origin, cautionaries, barnum); + accidentals_[i].number_cautionaries_ = abs(num); + accidentals_[i].different_ = accidentals_[i].different_ || num<0; bool tie_changes = false; - for (int j = 0; j < tie_arr_.size (); j++) - if (support_l == Tie::head (tie_arr_[j], RIGHT)) - tie_changes = accidental_arr_[i].different_; - int n = pitch->notename_i_; - int o = pitch->octave_i_; - int a = pitch->alteration_i_; + for (int j = 0; j < ties_.size (); j++) + if (support == Tie::head (ties_[j], RIGHT)) + tie_changes = accidentals_[i].different_; + int n = pitch->notename_; + int o = pitch->octave_; + int a = pitch->alteration_; SCM o_s = gh_int2scm (o); SCM n_s = gh_int2scm (n); SCM on_s = gh_cons (o_s,n_s); - while (origin_l) + while (origin) { - SCM sigch = origin_l->get_property ("localKeySignatureChanges"); + SCM sigch = origin->get_property ("localKeySignatureChanges"); SCM alt; if (tie_changes) /* @@ -359,8 +359,8 @@ New_accidental_engraver::process_grobs_first_pass () if(other_alt_any_oct && !other_alt_same_oct) { sigch = ly_assoc_front_x (sigch, on_s, gh_cons(SCM_BOOL_T,barnum)); } - origin_l->set_property ("localKeySignatureChanges", sigch); - origin_l = origin_l->daddy_trans_l_; + origin->set_property ("localKeySignatureChanges", sigch); + origin = origin->daddy_trans_; } } } @@ -373,52 +373,52 @@ New_accidental_engraver::process_grobs_second_pass () SCM barnum = get_property ("currentBarNumber"); bool extra_natural_b = get_property ("extraNatural") == SCM_BOOL_T; - for (int i = 0; i < accidental_arr_.size (); i++) + for (int i = 0; i < accidentals_.size (); i++) { - if (accidental_arr_[i].pass_done_ >= 2) + if (accidentals_[i].pass_done_ >= 2) continue; - accidental_arr_[i].pass_done_ = 2; - Grob * support_l = accidental_arr_[i].head_; - Note_req * note_l = accidental_arr_[i].melodic_; - Translator_group * origin_l = accidental_arr_[i].origin_; + accidentals_[i].pass_done_ = 2; + Grob * support = accidentals_[i].head_; + Note_req * note = accidentals_[i].melodic_; + Translator_group * origin = accidentals_[i].origin_; - Pitch * pitch = unsmob_pitch (note_l->get_mus_property ("pitch")); + Pitch * pitch = unsmob_pitch (note->get_mus_property ("pitch")); int num; - num = number_accidentals (note_l, pitch, origin_l, accidentals, barnum); - accidental_arr_[i].number_accidentals_ = - max (accidental_arr_[i].number_accidentals_, abs(num)); - accidental_arr_[i].different_ = accidental_arr_[i].different_ || num<0; + num = number_accidentals (note, pitch, origin, accidentals, barnum); + accidentals_[i].number_accidentals_ = + max (accidentals_[i].number_accidentals_, abs(num)); + accidentals_[i].different_ = accidentals_[i].different_ || num<0; - num = number_accidentals (note_l, pitch, origin_l, cautionaries, barnum); - accidental_arr_[i].number_cautionaries_ = - max (accidental_arr_[i].number_cautionaries_, abs(num)); - accidental_arr_[i].different_ = accidental_arr_[i].different_ || num<0; + num = number_accidentals (note, pitch, origin, cautionaries, barnum); + accidentals_[i].number_cautionaries_ = + max (accidentals_[i].number_cautionaries_, abs(num)); + accidentals_[i].different_ = accidentals_[i].different_ || num<0; - bool cautionary = to_boolean (note_l->get_mus_property ("cautionary")); + bool cautionary = to_boolean (note->get_mus_property ("cautionary")); - if (accidental_arr_[i].number_cautionaries_ >accidental_arr_[i].number_accidentals_ ) + if (accidentals_[i].number_cautionaries_ >accidentals_[i].number_accidentals_ ) { - num = accidental_arr_[i].number_cautionaries_; + num = accidentals_[i].number_cautionaries_; cautionary = true; } else - num = accidental_arr_[i].number_accidentals_; + num = accidentals_[i].number_accidentals_; bool tie_changes = false; Grob *tie_break_reminder = 0; - for (int j = 0; j < tie_arr_.size (); j++) - if (support_l == Tie::head (tie_arr_[j], RIGHT)) + for (int j = 0; j < ties_.size (); j++) + if (support == Tie::head (ties_[j], RIGHT)) { - tie_changes = accidental_arr_[i].different_; - tie_break_reminder = tie_arr_[j]; + tie_changes = accidentals_[i].different_; + tie_break_reminder = ties_[j]; } if (num) { Grob * a = new Item (get_property ("Accidental")); - a->set_parent (support_l, Y_AXIS); + a->set_parent (support, Y_AXIS); if (!accidental_placement_) { @@ -430,7 +430,7 @@ New_accidental_engraver::process_grobs_second_pass () announce_grob (a, SCM_EOL); - SCM accs = gh_cons (gh_int2scm (pitch->alteration_i_), SCM_EOL); + SCM accs = gh_cons (gh_int2scm (pitch->alteration_), SCM_EOL); if (num == 2 && extra_natural_b) accs = gh_cons (gh_int2scm (0), accs); @@ -445,10 +445,10 @@ New_accidental_engraver::process_grobs_second_pass () } - support_l->set_grob_property ("accidental-grob", a->self_scm ()); + support->set_grob_property ("accidental-grob", a->self_scm ()); a->set_grob_property ("accidentals", accs); - accidental_arr_[i].accidental_ = a; + accidentals_[i].accidental_ = a; /* We add the accidentals to the support of the arpeggio, so it is put left of the accidentals. @@ -462,7 +462,7 @@ New_accidental_engraver::process_grobs_second_pass () void New_accidental_engraver::process_acknowledged_grobs () { - if (accidental_arr_.size () && accidental_arr_.top().pass_done_ < 1) + if (accidentals_.size () && accidentals_.top().pass_done_ < 1) process_grobs_first_pass (); } @@ -475,13 +475,13 @@ New_accidental_engraver::finalize () void New_accidental_engraver::stop_translation_timestep () { - merge_property_on_family(daddy_trans_l_, "localKeySignatureChanges", "localKeySignature"); - if (accidental_arr_.size () && accidental_arr_.top().pass_done_ < 2) + merge_property_on_family(daddy_trans_, "localKeySignatureChanges", "localKeySignature"); + if (accidentals_.size () && accidentals_.top().pass_done_ < 2) process_grobs_second_pass (); - for (int i = 0; i < accidental_arr_.size(); i++) + for (int i = 0; i < accidentals_.size(); i++) { - Grob *a = accidental_arr_[i].accidental_; + Grob *a = accidentals_[i].accidental_; if (a) { typeset_grob (a); @@ -492,33 +492,33 @@ New_accidental_engraver::stop_translation_timestep () typeset_grob(accidental_placement_); accidental_placement_ = 00; - set_property_on_family(daddy_trans_l_, "localKeySignatureChanges", SCM_EOL); - accidental_arr_.clear(); + set_property_on_family(daddy_trans_, "localKeySignatureChanges", SCM_EOL); + accidentals_.clear(); arpeggios_.clear (); - tie_arr_.clear (); + ties_.clear (); } void New_accidental_engraver::acknowledge_grob (Grob_info info) { - Note_req * note_l = dynamic_cast (info.music_cause ()); + Note_req * note = dynamic_cast (info.music_cause ()); - if (note_l && Rhythmic_head::has_interface (info.grob_l_)) + if (note && Rhythmic_head::has_interface (info.grob_)) { New_accidental_entry entry ; - entry.head_ = info.grob_l_; - entry.origin_ = info.origin_trans_l_->daddy_trans_l_; - entry.melodic_ = note_l; + entry.head_ = info.grob_; + entry.origin_ = info.origin_trans_->daddy_trans_; + entry.melodic_ = note; - accidental_arr_.push (entry); + accidentals_.push (entry); } - else if (Tie::has_interface (info.grob_l_)) + else if (Tie::has_interface (info.grob_)) { - tie_arr_.push (info.grob_l_); + ties_.push (info.grob_); } - else if (Arpeggio::has_interface (info.grob_l_)) + else if (Arpeggio::has_interface (info.grob_)) { - arpeggios_.push (info.grob_l_); + arpeggios_.push (info.grob_); } } @@ -533,8 +533,8 @@ New_accidental_engraver::process_music () */ if (last_keysig_ != sig) { - set_property_on_family(daddy_trans_l_, "localKeySignature", sig); - set_property_on_family(daddy_trans_l_, "localKeySignatureChanges", SCM_EOL); //This souldn't be neccesary + set_property_on_family(daddy_trans_, "localKeySignature", sig); + set_property_on_family(daddy_trans_, "localKeySignatureChanges", SCM_EOL); //This souldn't be neccesary last_keysig_ = sig; } } diff --git a/lily/note-collision.cc b/lily/note-collision.cc index bb50797597..911d8332d3 100644 --- a/lily/note-collision.cc +++ b/lily/note-collision.cc @@ -52,8 +52,8 @@ check_meshing_chords (Grob*me, Grob *cu =clash_groups[UP][0]; Grob *cd =clash_groups[DOWN][0]; - Grob * nu_l= Note_column::first_head (cu); - Grob * nd_l = Note_column::first_head (cd); + Grob * nu= Note_column::first_head (cu); + Grob * nd = Note_column::first_head (cd); @@ -83,8 +83,8 @@ check_meshing_chords (Grob*me, /* Let's not crash. */ - if (!Note_column::stem_l (cu) - || !Note_column::stem_l (cd)) + if (!Note_column::get_stem (cu) + || !Note_column::get_stem (cd)) return ; @@ -101,8 +101,8 @@ check_meshing_chords (Grob*me, */ - Array ups = Stem::note_head_positions (Note_column::stem_l (cu)); - Array dps = Stem::note_head_positions (Note_column::stem_l (cd)); + Array ups = Stem::note_head_positions (Note_column::get_stem (cu)); + Array dps = Stem::note_head_positions (Note_column::get_stem (cd)); /* they're too far apart to collide. @@ -120,13 +120,13 @@ check_meshing_chords (Grob*me, don't merge whole notes (or longer, like breve, longa, maxima) */ - int upball_type = Note_head::balltype_i (nu_l); - int dnball_type = Note_head::balltype_i (nd_l); + int upball_type = Note_head::get_balltype (nu); + int dnball_type = Note_head::get_balltype (nd); merge_possible = merge_possible && (upball_type > 0); if (!to_boolean (me->get_grob_property ("merge-differently-dotted"))) - merge_possible = merge_possible && Rhythmic_head::dot_count (nu_l) == Rhythmic_head::dot_count (nd_l); + merge_possible = merge_possible && Rhythmic_head::dot_count (nu) == Rhythmic_head::dot_count (nd); if (!to_boolean (me->get_grob_property ("merge-differently-headed"))) @@ -137,10 +137,10 @@ check_meshing_chords (Grob*me, Can't merge quarter and half notes. */ merge_possible = merge_possible && - !((Rhythmic_head::duration_log (nu_l) == 1 - && Rhythmic_head::duration_log (nd_l) == 2) - ||(Rhythmic_head::duration_log (nu_l) == 2 - && Rhythmic_head::duration_log (nd_l) == 1)); + !((Rhythmic_head::duration_log (nu) == 1 + && Rhythmic_head::duration_log (nd) == 2) + ||(Rhythmic_head::duration_log (nu) == 2 + && Rhythmic_head::duration_log (nd) == 1)); int i = 0, j=0; while (i < ups.size () && j < dps.size ()) @@ -185,7 +185,7 @@ check_meshing_chords (Grob*me, for full collisions, the right hand head may obscure dots, so make sure the dotted heads go to the right. */ - if ((Rhythmic_head::dot_count (nu_l) > Rhythmic_head::dot_count (nd_l) + if ((Rhythmic_head::dot_count (nu) > Rhythmic_head::dot_count (nd) && full_collide)) shift_amount = 1; @@ -199,9 +199,9 @@ check_meshing_chords (Grob*me, Grob *wipe_ball = 0; if (upball_type < dnball_type) - wipe_ball = nd_l; + wipe_ball = nd; else if (upball_type > dnball_type) - wipe_ball = nu_l; + wipe_ball = nu; if (wipe_ball) { @@ -219,7 +219,7 @@ check_meshing_chords (Grob*me, /* we're meshing. */ - else if (Rhythmic_head::dot_count (nu_l) || Rhythmic_head::dot_count (nd_l)) + else if (Rhythmic_head::dot_count (nu) || Rhythmic_head::dot_count (nd)) shift_amount *= 0.1; else shift_amount *= 0.25; @@ -271,7 +271,7 @@ Note_collision_interface::do_shifts (Grob* me) Grob * s = unsmob_grob (ly_caar (autos)); Real amount = gh_scm2double (ly_cdar (autos)); - if (!done.find_l (s)) + if (!done.find (s)) s->translate_axis (amount * wid, X_AXIS); } } @@ -422,11 +422,11 @@ Note_collision_interface::forced_shift (Grob *me) } void -Note_collision_interface::add_column (Grob*me,Grob* ncol_l) +Note_collision_interface::add_column (Grob*me,Grob* ncol) { - ncol_l->add_offset_callback (Note_collision_interface::force_shift_callback_proc, X_AXIS); - Axis_group_interface::add_element (me, ncol_l); - me->add_dependency (ncol_l); + ncol->add_offset_callback (Note_collision_interface::force_shift_callback_proc, X_AXIS); + Axis_group_interface::add_element (me, ncol); + me->add_dependency (ncol); } diff --git a/lily/note-column.cc b/lily/note-column.cc index 8b479cd38b..c15584ea11 100644 --- a/lily/note-column.cc +++ b/lily/note-column.cc @@ -36,7 +36,7 @@ Note_column::shift_compare (Grob *const &p1, Grob *const&p2) } Item * -Note_column::stem_l (Grob*me) +Note_column::get_stem (Grob*me) { SCM s = me->get_grob_property ("stem"); return unsmob_item (s); @@ -54,7 +54,7 @@ Note_column::head_positions_interval (Grob *me) { Grob *se = unsmob_grob (ly_car (h)); - int j = int (Staff_symbol_referencer::position_f (se)); + int j = int (Staff_symbol_referencer::get_position (se)); iv.unite (Slice (j,j)); } return iv; @@ -75,11 +75,11 @@ Note_column::dir (Grob* me) void -Note_column::set_stem (Grob*me,Grob * stem_l) +Note_column::set_stem (Grob*me,Grob * stem) { - me->set_grob_property ("stem", stem_l->self_scm ()); - me->add_dependency (stem_l); - Axis_group_interface::add_element (me, stem_l); + me->set_grob_property ("stem", stem->self_scm ()); + me->add_dependency (stem); + Axis_group_interface::add_element (me, stem); } void @@ -123,7 +123,7 @@ Note_column::set_dotcol (Grob*me,Grob *d) Grob* Note_column::first_head (Grob*me) { - Grob * st = stem_l (me); + Grob * st = get_stem (me); return st? Stem::first_head (st): 0; } diff --git a/lily/note-head-line-engraver.cc b/lily/note-head-line-engraver.cc index a0c78b518e..eb2fc894d5 100644 --- a/lily/note-head-line-engraver.cc +++ b/lily/note-head-line-engraver.cc @@ -75,16 +75,16 @@ Note_head_line_engraver::try_music (Music* m) void Note_head_line_engraver::acknowledge_grob (Grob_info info) { - if (Rhythmic_head::has_interface (info.grob_l_)) + if (Rhythmic_head::has_interface (info.grob_)) { - head_ = info.grob_l_; + head_ = info.grob_; if (to_boolean (get_property ("followVoice"))) { - Translator_group * tr = daddy_trans_l_; - while (tr && tr->type_str_ != "Staff") - tr = tr->daddy_trans_l_ ; + Translator_group * tr = daddy_trans_; + while (tr && tr->type_string_ != "Staff") + tr = tr->daddy_trans_ ; - if (tr && tr->type_str_ == "Staff" && tr != last_staff_) + if (tr && tr->type_string_ == "Staff" && tr != last_staff_) { if (last_head_) follow_ = true; @@ -117,7 +117,7 @@ Note_head_line_engraver::process_acknowledged_grobs () /* Note, mustn't set y-parent of breakable symbol to simple item: one of the two broken parts won't have an y-parent! */ /* X parent is set by set_bound */ - line_->set_parent (Staff_symbol_referencer::staff_symbol_l (last_head_), + line_->set_parent (Staff_symbol_referencer::get_staff_symbol (last_head_), Y_AXIS); SCM c = last_req_? last_req_->self_scm () : SCM_EOL; diff --git a/lily/note-head.cc b/lily/note-head.cc index 379ee656eb..39aeb99c7a 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -73,9 +73,9 @@ Note_head::brew_ledger_lines (Grob *me, if (lines_i) { Real ledgerlinethickness = - (me->paper_l ()->get_var ("ledgerlinethickness")); + (me->get_paper ()->get_var ("ledgerlinethickness")); Real blotdiameter = ledgerlinethickness; - // (me->paper_l ()->get_var ("blotdiameter")); + // (me->get_paper ()->get_var ("blotdiameter")); Interval y_extent = Interval (-0.5*(ledgerlinethickness), +0.5*(ledgerlinethickness)); @@ -116,7 +116,7 @@ internal_brew_molecule (Grob *me, bool ledger_take_space) UGH: use grob-property. */ - SCM log = gh_int2scm (Note_head::balltype_i (me)); + SCM log = gh_int2scm (Note_head::get_balltype (me)); SCM exp = scm_list_n (ly_symbol2scm ("find-notehead-symbol"), log, ly_quote_scm (style), SCM_UNDEFINED); @@ -124,11 +124,11 @@ internal_brew_molecule (Grob *me, bool ledger_take_space) Molecule out = Font_interface::get_default_font (me)->find_by_name (name); if (out.empty_b()) { - warning (_f("Symbol not found, ", name.ch_C())); + warning (_f("Symbol not found, ", name.to_str0 ())); } int interspaces = Staff_symbol_referencer::line_count (me)-1; - int pos = (int)rint (Staff_symbol_referencer::position_f (me)); + int pos = (int)rint (Staff_symbol_referencer::get_position (me)); if (abs (pos) - interspaces > 1) { Interval hd = out.extent (X_AXIS); @@ -190,7 +190,7 @@ SCM Note_head::brew_ez_molecule (SCM smob) { Grob *me = unsmob_grob (smob); - int l = Note_head::balltype_i (me); + int l = Note_head::get_balltype (me); int b = (l >= 2); @@ -199,7 +199,7 @@ Note_head::brew_ez_molecule (SCM smob) Pitch* pit = unsmob_pitch (spitch); char s[2] = "a"; - s[0] = (pit->notename_i_ + 2)%7 + 'a'; + s[0] = (pit->notename_ + 2)%7 + 'a'; s[0] = toupper (s[0]); SCM charstr = ly_str02scm (s); @@ -212,7 +212,7 @@ Note_head::brew_ez_molecule (SCM smob) Box bx (Interval (0, 1.0), Interval (-0.5, 0.5)); Molecule m (bx, at); - int pos = (int)rint (Staff_symbol_referencer::position_f (me)); + int pos = (int)rint (Staff_symbol_referencer::get_position (me)); int interspaces = Staff_symbol_referencer::line_count (me)-1; if (abs (pos) - interspaces > 1) { @@ -247,7 +247,7 @@ Note_head::stem_attachment_coordinate (Grob *me, Axis a) int -Note_head::balltype_i (Grob*me) +Note_head::get_balltype (Grob*me) { SCM s = me->get_grob_property ("duration-log"); return gh_number_p (s) ? gh_scm2int (s) note_p_arr_; + Link_array notes_; - Link_array dot_p_arr_; - Link_array note_req_l_arr_; + Link_array dots_; + Link_array note_reqs_; public: TRANSLATOR_DECLARATIONS(Note_heads_engraver); protected: virtual void start_translation_timestep (); - virtual bool try_music (Music *req_l) ; + virtual bool try_music (Music *req) ; virtual void process_music (); virtual void stop_translation_timestep (); @@ -49,12 +49,12 @@ Note_heads_engraver::try_music (Music *m) { if (Note_req * n =dynamic_cast (m)) { - note_req_l_arr_.push (n); + note_reqs_.push (n); return true; } else if (dynamic_cast (m)) { - return note_req_l_arr_.size (); + return note_reqs_.size (); } else if (Span_req *req_ = dynamic_cast (m)) { @@ -77,29 +77,29 @@ Note_heads_engraver::try_music (Music *m) void Note_heads_engraver::process_music () { - for (int i=0; i < note_req_l_arr_.size (); i++) + for (int i=0; i < note_reqs_.size (); i++) { - Item *note_p = + Item *note = new Item (get_property ((in_ligature) ? "LigatureHead" : "NoteHead")); - Music * req = note_req_l_arr_[i]; + Music * req = note_reqs_[i]; Duration dur = *unsmob_duration (req->get_mus_property ("duration")); - note_p->set_grob_property ("duration-log", gh_int2scm (dur.duration_log ())); + note->set_grob_property ("duration-log", gh_int2scm (dur.duration_log ())); if (dur.dot_count ()) { Item * d = new Item (get_property ("Dots")); - Rhythmic_head::set_dots (note_p, d); + Rhythmic_head::set_dots (note, d); if (dur.dot_count () != gh_scm2int (d->get_grob_property ("dot-count"))) d->set_grob_property ("dot-count", gh_int2scm (dur.dot_count ())); - d->set_parent (note_p, Y_AXIS); + d->set_parent (note, Y_AXIS); announce_grob (d, SCM_EOL); - dot_p_arr_.push (d); + dots_.push (d); } Pitch *pit =unsmob_pitch (req->get_mus_property ("pitch")); @@ -109,28 +109,28 @@ Note_heads_engraver::process_music () if (gh_number_p (c0)) pos += gh_scm2int (c0); - note_p->set_grob_property ("staff-position", gh_int2scm (pos)); - announce_grob (note_p,req->self_scm()); - note_p_arr_.push (note_p); + note->set_grob_property ("staff-position", gh_int2scm (pos)); + announce_grob (note,req->self_scm()); + notes_.push (note); } } void Note_heads_engraver::stop_translation_timestep () { - for (int i=0; i < note_p_arr_.size (); i++) + for (int i=0; i < notes_.size (); i++) { - typeset_grob (note_p_arr_[i]); + typeset_grob (notes_[i]); } - note_p_arr_.clear (); - for (int i=0; i < dot_p_arr_.size (); i++) + notes_.clear (); + for (int i=0; i < dots_.size (); i++) { - typeset_grob (dot_p_arr_[i]); + typeset_grob (dots_[i]); } - dot_p_arr_.clear (); + dots_.clear (); - note_req_l_arr_.clear (); + note_reqs_.clear (); } void diff --git a/lily/note-name-engraver.cc b/lily/note-name-engraver.cc index c5c2849a09..37133e5e3b 100644 --- a/lily/note-name-engraver.cc +++ b/lily/note-name-engraver.cc @@ -16,7 +16,7 @@ class Note_name_engraver : public Engraver public: TRANSLATOR_DECLARATIONS(Note_name_engraver); - Link_array req_l_arr_; + Link_array reqs_; Link_array texts_; virtual bool try_music (Music*m); virtual void process_acknowledged_grobs (); @@ -28,7 +28,7 @@ Note_name_engraver::try_music (Music *m) { if (Note_req *r = dynamic_cast (m)) { - req_l_arr_.push (r); + reqs_.push (r); return true; } return false; @@ -40,17 +40,17 @@ Note_name_engraver::process_acknowledged_grobs () if (texts_.size ()) return; String s ; - for (int i=0; i < req_l_arr_.size (); i++) + for (int i=0; i < reqs_.size (); i++) { if (i) s += " "; - s += unsmob_pitch (req_l_arr_[i]->get_mus_property ("pitch"))->str (); + s += unsmob_pitch (reqs_[i]->get_mus_property ("pitch"))->string (); } - if (s.length_i ()) + if (s.length ()) { Item * t = new Item (get_property ("NoteName")); - t->set_grob_property ("text", ly_str02scm (s.ch_C ())); - announce_grob(t, req_l_arr_[0]->self_scm()); + t->set_grob_property ("text", ly_str02scm (s.to_str0 ())); + announce_grob(t, reqs_[0]->self_scm()); texts_.push (t); } } @@ -63,7 +63,7 @@ Note_name_engraver::stop_translation_timestep () typeset_grob (texts_[i]); } texts_.clear () ; - req_l_arr_.clear (); + reqs_.clear (); } diff --git a/lily/note-performer.cc b/lily/note-performer.cc index b6076e94f5..fafcc82941 100644 --- a/lily/note-performer.cc +++ b/lily/note-performer.cc @@ -21,22 +21,22 @@ public: TRANSLATOR_DECLARATIONS(Note_performer); protected: - virtual bool try_music (Music *req_l) ; + virtual bool try_music (Music *req) ; virtual void stop_translation_timestep (); virtual void create_audio_elements (); - Global_translator* global_translator_l (); + Global_translator* get_global_translator (); private: - Array note_req_l_arr_; - Array note_p_arr_; - Array delayed_p_arr_; + Array note_reqs_; + Array notes_; + Array delayeds_; }; void Note_performer::create_audio_elements () { - if (note_req_l_arr_.size ()) + if (note_reqs_.size ()) { int transposing_i = 0; //urg @@ -44,32 +44,32 @@ Note_performer::create_audio_elements () if (gh_number_p (prop)) transposing_i = gh_scm2int (prop); - while (note_req_l_arr_.size ()) + while (note_reqs_.size ()) { - Note_req* n = note_req_l_arr_.pop (); + Note_req* n = note_reqs_.pop (); Pitch pit = * unsmob_pitch (n->get_mus_property ("pitch")); Audio_note* p = new Audio_note (pit, n->length_mom (), transposing_i); Audio_element_info info (p, n); announce_element (info); - note_p_arr_.push (p); + notes_.push (p); } - note_req_l_arr_.clear (); + note_reqs_.clear (); } } Global_translator* -Note_performer::global_translator_l () +Note_performer::get_global_translator () { Translator *t = this; - Global_translator *global_l =0; + Global_translator *global =0; do { - t = t->daddy_trans_l_ ; - global_l = dynamic_cast (t); + t = t->daddy_trans_ ; + global = dynamic_cast (t); } - while (!global_l); + while (!global); - return global_l; + return global; } @@ -79,47 +79,47 @@ Note_performer::stop_translation_timestep () // why don't grace notes show up here? // --> grace notes effectively do not get delayed - Global_translator* global_l = global_translator_l (); - for (int i=0; i < note_p_arr_.size (); i++) + Global_translator* global = get_global_translator (); + for (int i=0; i < notes_.size (); i++) { - Audio_note* n = note_p_arr_[i]; + Audio_note* n = notes_[i]; Moment m= n->delayed_until_mom_; if (m.to_bool ()) { - global_l->add_moment_to_process (m); - delayed_p_arr_.push (n); - note_p_arr_[i] = 0; - note_p_arr_.del (i); + global->add_moment_to_process (m); + delayeds_.push (n); + notes_[i] = 0; + notes_.del (i); i--; } } Moment now = now_mom (); - for (int i=0; i < note_p_arr_.size (); i++) + for (int i=0; i < notes_.size (); i++) { - play_element (note_p_arr_[i]); + play_element (notes_[i]); } - note_p_arr_.clear (); - note_req_l_arr_.clear (); - for (int i=0; i < delayed_p_arr_.size (); i++) + notes_.clear (); + note_reqs_.clear (); + for (int i=0; i < delayeds_.size (); i++) { - Audio_note* n = delayed_p_arr_[i]; + Audio_note* n = delayeds_[i]; if (n->delayed_until_mom_ <= now) { play_element (n); - delayed_p_arr_[i] = 0; - delayed_p_arr_.del (i); + delayeds_[i] = 0; + delayeds_.del (i); i--; } } } bool -Note_performer::try_music (Music* req_l) +Note_performer::try_music (Music* req) { - if (Note_req *nr = dynamic_cast (req_l)) + if (Note_req *nr = dynamic_cast (req)) { - note_req_l_arr_.push (nr); + note_reqs_.push (nr); return true; } return false; diff --git a/lily/note-spacing.cc b/lily/note-spacing.cc index 8d2ac6e0a7..2d3e7b19d3 100644 --- a/lily/note-spacing.cc +++ b/lily/note-spacing.cc @@ -49,7 +49,7 @@ Note_spacing::get_spacing (Grob *me, Item* right_col, if (!it) continue; - Item *it_col = it->column_l (); + Item *it_col = it->get_column (); if (d == RIGHT && right_col != it_col) continue; @@ -127,7 +127,7 @@ Note_spacing::left_column (Grob *me) if (!me->live()) return 0; - return dynamic_cast (me)->column_l (); + return dynamic_cast (me)->get_column (); } /* @@ -152,8 +152,8 @@ Note_spacing::right_column (Grob*me) { Item * ri = unsmob_item (gh_car (s)); - Item * col = ri->column_l (); - int rank = Paper_column::rank_i (col); + Item * col = ri->get_column (); + int rank = Paper_column::get_rank (col); if (rank < min_rank) { @@ -171,7 +171,7 @@ Note_spacing::right_column (Grob*me) SCM newright = SCM_EOL; for (SCM s = right ; gh_pair_p (s) ; s =gh_cdr (s)) { - if (unsmob_item (gh_car (s))->column_l () == mincol) + if (unsmob_item (gh_car (s))->get_column () == mincol) newright = gh_cons (gh_car (s), newright); } @@ -181,7 +181,7 @@ Note_spacing::right_column (Grob*me) if (!mincol) { /* - int r = Paper_column::rank_i (dynamic_cast(me)->column_l ()); + int r = Paper_column::get_rank (dynamic_cast(me)->get_column ()); programming_error (_f("Spacing wish column %d has no right item.", r)); */ @@ -231,13 +231,13 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, if (d == RIGHT) acc_right = acc_right || Note_column::accidentals (it); - Grob *stem = Note_column::stem_l (it); + Grob *stem = Note_column::get_stem (it); if (!stem) { if (d == RIGHT && Separation_item::has_interface (it)) { - if (it->column_l () != rcolumn) + if (it->get_column () != rcolumn) { it = it->find_prebroken_piece (rcolumn->break_status_dir ()); } @@ -258,7 +258,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, return ; } - beams_drul[d] = Stem::beam_l (stem); + beams_drul[d] = Stem::get_beam (stem); Direction sd = Stem::get_direction (stem); @@ -273,7 +273,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn, hanging from the note. */ if (d == LEFT - && Stem::duration_log (stem) > 2 && !Stem::beam_l (stem)) + && Stem::duration_log (stem) > 2 && !Stem::get_beam (stem)) { return; diff --git a/lily/output-property-engraver.cc b/lily/output-property-engraver.cc index 25c156f539..2c494b8317 100644 --- a/lily/output-property-engraver.cc +++ b/lily/output-property-engraver.cc @@ -60,12 +60,12 @@ Output_property_engraver::acknowledge_grob (Grob_info inf) should typecheck pred. */ SCM result=gh_apply (pred, - scm_list_n (inf.grob_l_->self_scm (), SCM_UNDEFINED)); + scm_list_n (inf.grob_->self_scm (), SCM_UNDEFINED)); if (to_boolean (result)) { SCM sym = o->get_mus_property ("grob-property"); SCM val = o->get_mus_property ("grob-value"); - inf.grob_l_->internal_set_grob_property (sym, val); + inf.grob_->internal_set_grob_property (sym, val); } } } diff --git a/lily/output-property-music-iterator.cc b/lily/output-property-music-iterator.cc index fa8ada0ad1..a6e096d46e 100644 --- a/lily/output-property-music-iterator.cc +++ b/lily/output-property-music-iterator.cc @@ -15,10 +15,10 @@ Output_property_music_iterator::process (Moment m) { if (last_processed_mom_ < Moment (0)) { - bool accepted = try_music (music_l ()); + bool accepted = try_music (get_music ()); if (!accepted) - music_l ()->origin ()->warning (_f ("Junking request: `%s'", - classname (music_l ()))); + get_music ()->origin ()->warning (_f ("Junking request: `%s'", + classname (get_music ()))); } skip (m); diff --git a/lily/paper-column.cc b/lily/paper-column.cc index 6cb5c2f48d..5373d06f34 100644 --- a/lily/paper-column.cc +++ b/lily/paper-column.cc @@ -50,9 +50,9 @@ Paper_column::do_break_processing () int -Paper_column::rank_i (Grob*me) +Paper_column::get_rank (Grob*me) { - return dynamic_cast (me)->rank_i_; + return dynamic_cast (me)->rank_; } System* @@ -62,7 +62,7 @@ Paper_column::get_system () const } Paper_column* -Paper_column::column_l () const +Paper_column::get_column () const { return (Paper_column*) (this); } @@ -71,7 +71,7 @@ Paper_column::Paper_column (SCM l) : Item (l) // guh.? { system_=0; - rank_i_ = -1; + rank_ = -1; } Moment @@ -118,10 +118,10 @@ Paper_column::brew_molecule (SCM p) { Grob *me = unsmob_grob (p); - String r = to_str (Paper_column::rank_i (me)); + String r = to_string (Paper_column::get_rank (me)); SCM properties = Font_interface::font_alist_chain (me); - Molecule t = Text_item::text2molecule (me, ly_str02scm (r.ch_C()), + Molecule t = Text_item::text2molecule (me, ly_str02scm (r.to_str0 ()), properties); t.align_to (X_AXIS, CENTER); t.align_to (Y_AXIS, DOWN); diff --git a/lily/paper-def.cc b/lily/paper-def.cc index 90c9460931..1dae6c8f72 100644 --- a/lily/paper-def.cc +++ b/lily/paper-def.cc @@ -16,7 +16,7 @@ #include "scaled-font-metric.hh" #include "main.hh" #include "scm-hash.hh" -#include "file-results.hh" // urg? header_global_p +#include "file-results.hh" // urg? header_global #include "paper-outputter.hh" /* @@ -42,13 +42,13 @@ Paper_def::Paper_def (Paper_def const&src) Real Paper_def::get_var (String s) const { - return get_realvar (ly_symbol2scm (s.ch_C ())); + return get_realvar (ly_symbol2scm (s.to_str0 ())); } SCM Paper_def::get_scmvar (String s) const { - return variable_tab_->get (ly_symbol2scm (s.ch_C ())); + return variable_tab_->get (ly_symbol2scm (s.to_str0 ())); } @@ -100,33 +100,33 @@ Paper_def::line_dimensions_int (int n) const -int Paper_def::score_count_i_ = 0; +int Paper_def::score_count_ = 0; int Paper_def::get_next_score_count () const { - return score_count_i_ ++; + return score_count_ ++; } void Paper_def::reset_score_count () { - score_count_i_ = 0; + score_count_ = 0; } Paper_outputter* -Paper_def::paper_outputter_p () +Paper_def::get_paper_outputter () { - String outname = outname_str (); + String outname = outname_string (); progress_indication (_f ("paper output to `%s'...", outname == "-" ? String ("") : outname)); - target_str_global_array.push (outname); + target_string_globals.push (outname); Paper_outputter * po = new Paper_outputter (outname); Path p = split_path (outname); p.ext = ""; - po->basename_ = p.str (); + po->basename_ = p.string (); return po; } @@ -149,7 +149,7 @@ Paper_def::find_font (SCM fn, Real m) m /= gh_scm2double (ssc); } - Font_metric* f = all_fonts_global_p->find_font (ly_scm2string (fn)); + Font_metric* f = all_fonts_global->find_font (ly_scm2string (fn)); SCM val = Scaled_font_metric::make_scaled_font_metric (f, m); scaled_fonts_ = scm_acons (key, val, scaled_fonts_); diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index 65c4e384d7..9cbce394f6 100644 --- a/lily/paper-outputter.cc +++ b/lily/paper-outputter.cc @@ -35,11 +35,11 @@ Paper_outputter::Paper_outputter (String name) gh_define ("security-paranoia", SCM_BOOL_T); } - file_ = scm_open_file (ly_str02scm (name.ch_C()), + file_ = scm_open_file (ly_str02scm (name.to_str0 ()), ly_str02scm ("w")); SCM exp = scm_list_n (ly_symbol2scm ("find-dumper"), - ly_str02scm (output_format_global.ch_C()), + ly_str02scm (output_format_global.to_str0 ()), SCM_UNDEFINED); output_func_ = scm_primitive_eval (exp); @@ -57,16 +57,16 @@ Paper_outputter::output_header () String generate = _ (", at "); time_t t (time (0)); generate += ctime (&t); - generate = generate.left_str (generate.length_i () - 1); + generate = generate.left_string (generate.length () - 1); /* Make fixed length time stamps */ - generate = generate + to_str (' ' * (120 - generate.length_i ())>? 0) ; + generate = generate + to_string (' ' * (120 - generate.length ())>? 0) ; String creator = "lelie"; - SCM args_scm = scm_list_n (ly_str02scm (creator.ch_C ()), - ly_str02scm (generate.ch_C ()), SCM_UNDEFINED); + SCM args_scm = scm_list_n (ly_str02scm (creator.to_str0 ()), + ly_str02scm (generate.to_str0 ()), SCM_UNDEFINED); SCM scm = gh_cons (ly_symbol2scm ("header"), args_scm); @@ -80,7 +80,7 @@ void Paper_outputter::output_comment (String str) { output_scheme (scm_list_n (ly_symbol2scm ("comment"), - ly_str02scm ((char*)str.ch_C ()), + ly_str02scm ((char*)str.to_str0 ()), SCM_UNDEFINED) ); } @@ -119,11 +119,11 @@ Paper_outputter::output_scope (Scheme_hash_table *scope, String prefix) void Paper_outputter::output_version () { - String id_str = "Lily was here"; - id_str += String_convert::pad_to (String (", ") + version_str (), 40); + String id_string = "Lily was here"; + id_string += String_convert::pad_to (String (", ") + version_string (), 40); - output_String_def ("lilypondtagline", id_str); - output_String_def ("LilyPondVersion", version_str ()); + output_String_def ("lilypondtagline", id_string); + output_String_def ("LilyPondVersion", version_string ()); output_String_def ("lilypondpaperunit", String (INTERNAL_UNIT)); } @@ -133,8 +133,8 @@ Paper_outputter::output_Real_def (String k, Real v) { SCM scm = scm_list_n (ly_symbol2scm ("lily-def"), - ly_str02scm (k.ch_l ()), - ly_str02scm (to_str (v).ch_l ()), + ly_str02scm (k.get_str0 ()), + ly_str02scm (to_string (v).get_str0 ()), SCM_UNDEFINED); output_scheme (scm); } @@ -144,8 +144,8 @@ Paper_outputter::output_String_def (String k, String v) { SCM scm = scm_list_n (ly_symbol2scm ("lily-def"), - ly_str02scm (k.ch_l ()), - ly_str02scm (v.ch_l ()), + ly_str02scm (k.get_str0 ()), + ly_str02scm (v.get_str0 ()), SCM_UNDEFINED); output_scheme (scm); } @@ -154,8 +154,8 @@ void Paper_outputter::output_int_def (String k, int v) { SCM scm = scm_list_n (ly_symbol2scm ("lily-def"), - ly_str02scm (k.ch_l ()), - ly_str02scm (to_str (v).ch_l ()), + ly_str02scm (k.get_str0 ()), + ly_str02scm (to_string (v).get_str0 ()), SCM_UNDEFINED); output_scheme (scm); } @@ -164,7 +164,7 @@ void Paper_outputter::write_header_field_to_file (String filename, SCM key, SCM value) { output_scheme (scm_list_n (ly_symbol2scm ("header-to-file"), - ly_str02scm (filename.ch_C()), + ly_str02scm (filename.to_str0 ()), ly_quote_scm (key), value, SCM_UNDEFINED)); } @@ -178,7 +178,7 @@ Paper_outputter::write_header_fields_to_file (Scheme_hash_table * header) for (int i = 0; i < dump_header_fieldnames_global.size (); i++) { String key = dump_header_fieldnames_global[i]; - SCM val = gh_assoc (ly_symbol2scm (key.ch_C ()), fields); + SCM val = gh_assoc (ly_symbol2scm (key.to_str0 ()), fields); String s; /* Only write header field to file if it exists */ if (gh_pair_p (val)) diff --git a/lily/paper-score.cc b/lily/paper-score.cc index 013694388c..0e68e23171 100644 --- a/lily/paper-score.cc +++ b/lily/paper-score.cc @@ -24,8 +24,8 @@ Paper_score::Paper_score () { - paper_l_ =0; - outputter_l_ =0; + paper_ =0; + outputter_ =0; system_ = 0; main_smob_ = SCM_EOL; } @@ -38,7 +38,7 @@ Paper_score::typeset_line (System *l) system_ = l; // ugh. } main_smob_ = gh_cons (l->self_scm (), main_smob_); - l->pscore_l_ = this; + l->pscore_ = this; /* We don't unprotect l->self_scm (), we haven't got any place else to @@ -55,13 +55,13 @@ Paper_score::Paper_score (Paper_score const &s) Array Paper_score::calc_breaking () { - Break_algorithm *algorithm_p=0; + Break_algorithm *algorithm=0; Array sol; - algorithm_p = new Gourlay_breaking ; - algorithm_p->set_pscore (this); - sol = algorithm_p->solve (); - delete algorithm_p; + algorithm = new Gourlay_breaking ; + algorithm->set_pscore (this); + sol = algorithm->solve (); + delete algorithm; return sol; } @@ -81,7 +81,7 @@ Paper_score::process () /* Be sure to set breakability on first & last column. */ - Link_array pc (system_->column_l_arr ()); + Link_array pc (system_->columns ()); pc[0]->set_grob_property ("breakable", SCM_BOOL_T); pc.top ()->set_grob_property ("breakable", SCM_BOOL_T); @@ -91,44 +91,44 @@ Paper_score::process () Array breaking = calc_breaking (); system_->break_into_pieces (breaking); - outputter_l_ = paper_l_->paper_outputter_p (); + outputter_ = paper_->get_paper_outputter (); ; - outputter_l_->output_header (); - outputter_l_->output_version (); + outputter_->output_header (); + outputter_->output_version (); progress_indication ("\n"); - if (global_header_p) + if (global_header) { - outputter_l_->output_scope (global_header_p, "lilypond"); - outputter_l_->write_header_fields_to_file (global_header_p); + outputter_->output_scope (global_header, "lilypond"); + outputter_->write_header_fields_to_file (global_header); } - if (header_l_) + if (header_) { - outputter_l_->output_scope (header_l_, "lilypond"); - outputter_l_->write_header_fields_to_file (header_l_); + outputter_->output_scope (header_, "lilypond"); + outputter_->write_header_fields_to_file (header_); } - outputter_l_->output_comment (_ ("Outputting Score, defined at: ")); - outputter_l_->output_comment (origin_str_); + outputter_->output_comment (_ ("Outputting Score, defined at: ")); + outputter_->output_comment (origin_string_); - if (paper_l_->variable_tab_) - outputter_l_->output_scope (paper_l_->variable_tab_, "lilypondpaper"); + if (paper_->variable_tab_) + outputter_->output_scope (paper_->variable_tab_, "lilypondpaper"); SCM scm = scm_list_n (ly_symbol2scm ("header-end"), SCM_UNDEFINED); - outputter_l_->output_scheme (scm); + outputter_->output_scheme (scm); system_->output_lines (); scm = scm_list_n (ly_symbol2scm ("end-output"), SCM_UNDEFINED); - outputter_l_->output_scheme (scm); + outputter_->output_scheme (scm); progress_indication ("\n"); // huh? - delete outputter_l_; - outputter_l_ = 0; + delete outputter_; + outputter_ = 0; if (verbose_global_b) ly_display_scm (scm_gc_stats ()); diff --git a/lily/parser.yy b/lily/parser.yy index 9bac8a5683..19cd1d3216 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -66,7 +66,7 @@ bool regular_identifier_b (SCM id) { String str = ly_scm2string (id); - char const *s = str.ch_C() ; + char const *s = str.to_str0 () ; bool v = true; while (*s && v) @@ -120,10 +120,10 @@ set_music_properties (Music *p, SCM a) #define YYERROR_VERBOSE 1 -#define YYPARSE_PARAM my_lily_parser_l -#define YYLEX_PARAM my_lily_parser_l +#define YYPARSE_PARAM my_lily_parser +#define YYLEX_PARAM my_lily_parser #define THIS\ - ((My_lily_parser *) my_lily_parser_l) + ((My_lily_parser *) my_lily_parser) #define yyerror THIS->parser_error #define ARRAY_SIZE(a,s) if (a.size () != s) THIS->parser_error (_f ("Expecting %d arguments", s)) @@ -155,13 +155,13 @@ of the parse stack onto the heap. */ %{ int -yylex (YYSTYPE *s, void * v_l) +yylex (YYSTYPE *s, void * v) { - My_lily_parser *pars_l = (My_lily_parser*) v_l; - My_lily_lexer * lex_l = pars_l->lexer_p_; + My_lily_parser *pars = (My_lily_parser*) v; + My_lily_lexer * lex = pars->lexer_; - lex_l->lexval_l = (void*) s; - return lex_l->yylex (); + lex->lexval = (void*) s; + return lex->yylex (); } @@ -336,33 +336,33 @@ lilypond: /* empty */ | lilypond toplevel_expression {} | lilypond assignment { } | lilypond error { - THIS->error_level_i_ = 1; + THIS->error_level_ = 1; } | lilypond INVALID { - THIS->error_level_i_ = 1; + THIS->error_level_ = 1; } ; toplevel_expression: notenames_block { - THIS->lexer_p_->pitchname_tab_ = $1; + THIS->lexer_->pitchname_tab_ = $1; } | chordmodifiers_block { - THIS->lexer_p_->chordmodifier_tab_ = $1; + THIS->lexer_->chordmodifier_tab_ = $1; } | lilypond_header { - if (global_header_p) - scm_gc_unprotect_object (global_header_p->self_scm ()); - global_header_p = $1; + if (global_header) + scm_gc_unprotect_object (global_header->self_scm ()); + global_header = $1; } | score_block { - score_global_array.push ($1); + score_globals.push ($1); } | output_def { if (dynamic_cast ($1)) - THIS->lexer_p_->set_identifier (gh_str02scm ("$defaultpaper"), $1->self_scm ()); + THIS->lexer_->set_identifier (gh_str02scm ("$defaultpaper"), $1->self_scm ()); else if (dynamic_cast ($1)) - THIS->lexer_p_->set_identifier (gh_str02scm ("$defaultmidi"), $1->self_scm ()); + THIS->lexer_->set_identifier (gh_str02scm ("$defaultmidi"), $1->self_scm ()); } | embedded_scm { // junk value @@ -403,7 +403,7 @@ notenames_body: lilypond_header_body: { $$ = new Scheme_hash_table; - THIS->lexer_p_-> scope_l_arr_.push ($$); + THIS->lexer_-> scopes_.push ($$); } | lilypond_header_body assignment { @@ -413,7 +413,7 @@ lilypond_header_body: lilypond_header: HEADER '{' lilypond_header_body '}' { $$ = $3; - THIS->lexer_p_->scope_l_arr_.pop (); + THIS->lexer_->scopes_.pop (); } ; @@ -437,7 +437,7 @@ assignment: ip.warning (_ ("Identifier should have alphabetic characters only")); } - THIS->lexer_p_->set_identifier ($1, $4); + THIS->lexer_->set_identifier ($1, $4); /* TODO: devise standard for protection in parser. @@ -558,10 +558,10 @@ score_block: /*cont*/ '{' score_body '}' { THIS->pop_spot (); $$ = $4; - if (!$$->def_p_arr_.size ()) + if (!$$->defs_.size ()) { Music_output_def *id = - unsmob_music_output_def (THIS->lexer_p_->lookup_identifier ("$defaultpaper")); + unsmob_music_output_def (THIS->lexer_->lookup_identifier ("$defaultpaper")); $$->add_output (id ? id->clone () : new Paper_def ); } } @@ -590,7 +590,7 @@ score_body: } | score_body lilypond_header { scm_gc_unprotect_object ($2->self_scm ()); - $$->header_p_ = $2; + $$->header_ = $2; } | score_body output_def { $$->add_output ($2); @@ -607,13 +607,13 @@ score_body: output_def: music_output_def_body '}' { $$ = $1; - THIS-> lexer_p_-> scope_l_arr_.pop (); + THIS-> lexer_-> scopes_.pop (); } ; music_output_def_body: MIDI '{' { - Music_output_def *id = unsmob_music_output_def (THIS->lexer_p_->lookup_identifier ("$defaultmidi")); + Music_output_def *id = unsmob_music_output_def (THIS->lexer_->lookup_identifier ("$defaultmidi")); Midi_def* p =0; @@ -623,29 +623,29 @@ music_output_def_body: p = new Midi_def; $$ = p; - THIS->lexer_p_->scope_l_arr_.push (p->variable_tab_); + THIS->lexer_->scopes_.push (p->variable_tab_); } | PAPER '{' { - Music_output_def *id = unsmob_music_output_def (THIS->lexer_p_->lookup_identifier ("$defaultpaper")); + Music_output_def *id = unsmob_music_output_def (THIS->lexer_->lookup_identifier ("$defaultpaper")); Paper_def *p = 0; if (id) p = dynamic_cast (id->clone ()); else p = new Paper_def; - THIS-> lexer_p_-> scope_l_arr_.push (p->variable_tab_); + THIS-> lexer_-> scopes_.push (p->variable_tab_); $$ = p; } | PAPER '{' MUSIC_OUTPUT_DEF_IDENTIFIER { Music_output_def *p = unsmob_music_output_def ($3); p = p->clone (); - THIS->lexer_p_->scope_l_arr_.push (p->variable_tab_); + THIS->lexer_->scopes_.push (p->variable_tab_); $$ = p; } | MIDI '{' MUSIC_OUTPUT_DEF_IDENTIFIER { Music_output_def *p = unsmob_music_output_def ($3); p = p->clone (); - THIS->lexer_p_->scope_l_arr_.push (p->variable_tab_); + THIS->lexer_->scopes_.push (p->variable_tab_); $$ = p; } | music_output_def_body assignment { @@ -854,8 +854,8 @@ Composite_music: Sequential_music_iterator in combination with grace notes. */ - SCM start = THIS->lexer_p_->lookup_identifier ("startGraceMusic"); - SCM stop = THIS->lexer_p_->lookup_identifier ("stopGraceMusic"); + SCM start = THIS->lexer_->lookup_identifier ("startGraceMusic"); + SCM stop = THIS->lexer_->lookup_identifier ("stopGraceMusic"); Music *startm = unsmob_music (start); Music *stopm = unsmob_music (stop); @@ -947,13 +947,13 @@ Composite_music: $$ = m; } | NOTES - { THIS->lexer_p_->push_note_state (); } + { THIS->lexer_->push_note_state (); } Music { $$ = $3; - THIS->lexer_p_->pop_state (); + THIS->lexer_->pop_state (); } | FIGURES - { THIS->lexer_p_->push_figuredbass_state (); } + { THIS->lexer_->push_figuredbass_state (); } Music { Music * chm = new Untransposable_music () ; @@ -961,10 +961,10 @@ Composite_music: $$ = chm; scm_gc_unprotect_object ($3->self_scm()); - THIS->lexer_p_->pop_state (); + THIS->lexer_->pop_state (); } | CHORDS - { THIS->lexer_p_->push_chord_state (); } + { THIS->lexer_->push_chord_state (); } Music { Music * chm = new Un_relativable_music ; @@ -972,14 +972,14 @@ Composite_music: scm_gc_unprotect_object ($3->self_scm()); $$ = chm; - THIS->lexer_p_->pop_state (); + THIS->lexer_->pop_state (); } | LYRICS - { THIS->lexer_p_->push_lyric_state (); } + { THIS->lexer_->push_lyric_state (); } Music { $$ = $3; - THIS->lexer_p_->pop_state (); + THIS->lexer_->pop_state (); } | relative_music { $$ = $1; } | re_rhythmed_music { $$ = $1; } @@ -1308,11 +1308,11 @@ shorthand_command_req: verbose_command_req: COMMANDSPANREQUEST bare_int STRING { /*TODO: junkme */ - Span_req * sp_p = new Span_req; - sp_p-> set_span_dir ( Direction ($2)); - sp_p->set_mus_property ("span-type",$3); - sp_p->set_spot (THIS->here_input ()); - $$ = sp_p; + Span_req * sp = new Span_req; + sp-> set_span_dir ( Direction ($2)); + sp->set_mus_property ("span-type",$3); + sp->set_spot (THIS->here_input ()); + $$ = sp; } | MARK DEFAULT { Mark_req * m = new Mark_req; @@ -1334,24 +1334,24 @@ verbose_command_req: $$ = b; } | SKIP duration_length { - Skip_req * skip_p = new Skip_req; - skip_p->set_mus_property ("duration", $2); + Skip_req * skip = new Skip_req; + skip->set_mus_property ("duration", $2); - $$ = skip_p; + $$ = skip; } | tempo_request { $$ = $1; } | KEY DEFAULT { - Key_change_req *key_p= new Key_change_req; - $$ = key_p; + Key_change_req *key= new Key_change_req; + $$ = key; } | KEY NOTENAME_PITCH SCM_IDENTIFIER { - Key_change_req *key_p= new Key_change_req; + Key_change_req *key= new Key_change_req; - key_p->set_mus_property ("pitch-alist", $3); - ((Music*)key_p)->transpose (* unsmob_pitch ($2)); - $$ = key_p; + key->set_mus_property ("pitch-alist", $3); + ((Music*)key)->transpose (* unsmob_pitch ($2)); + $$ = key; } ; @@ -1376,7 +1376,7 @@ request_that_take_dir: gen_text_def | verbose_request | script_abbreviation { - SCM s = THIS->lexer_p_->lookup_identifier ("dash" + ly_scm2string ($1)); + SCM s = THIS->lexer_->lookup_identifier ("dash" + ly_scm2string ($1)); Articulation_req *a = new Articulation_req; if (gh_string_p (s)) a->set_mus_property ("articulation-type", s); @@ -1412,11 +1412,11 @@ verbose_request: $$ = d; } | SPANREQUEST bare_int STRING { - Span_req * sp_p = new Span_req; - sp_p->set_span_dir ( Direction ($2)); - sp_p->set_mus_property ("span-type", $3); - sp_p->set_spot (THIS->here_input ()); - $$ = sp_p; + Span_req * sp = new Span_req; + sp->set_span_dir ( Direction ($2)); + sp->set_mus_property ("span-type", $3); + sp->set_spot (THIS->here_input ()); + $$ = sp; } | tremolo_type { Tremolo_req* a = new Tremolo_req; @@ -1469,13 +1469,13 @@ steno_pitch: } | NOTENAME_PITCH sup_quotes { Pitch p = *unsmob_pitch ($1); - p.octave_i_ += $2; + p.octave_ += $2; $$ = p.smobbed_copy (); } | NOTENAME_PITCH sub_quotes { Pitch p =* unsmob_pitch ($1); - p.octave_i_ += -$2; + p.octave_ += -$2; $$ = p.smobbed_copy (); } @@ -1491,13 +1491,13 @@ steno_tonic_pitch: } | TONICNAME_PITCH sup_quotes { Pitch p = *unsmob_pitch ($1); - p.octave_i_ += $2; + p.octave_ += $2; $$ = p.smobbed_copy (); } | TONICNAME_PITCH sub_quotes { Pitch p =* unsmob_pitch ($1); - p.octave_i_ += -$2; + p.octave_ += -$2; $$ = p.smobbed_copy (); } @@ -1535,7 +1535,7 @@ verbose_duration: extender_req: EXTENDER { - if (!THIS->lexer_p_->lyric_state_b ()) + if (!THIS->lexer_->lyric_state_b ()) THIS->parser_error (_ ("Have to be in Lyric mode for lyrics")); $$ = new Extender_req; } @@ -1543,7 +1543,7 @@ extender_req: hyphen_req: HYPHEN { - if (!THIS->lexer_p_->lyric_state_b ()) + if (!THIS->lexer_->lyric_state_b ()) THIS->parser_error (_ ("Have to be in Lyric mode for lyrics")); $$ = new Hyphen_req; } @@ -1628,10 +1628,10 @@ gen_text_def: $$ = t; } | DIGIT { - String ds = to_str ($1); + String ds = to_string ($1); Text_script_req* t = new Text_script_req; SCM finger = ly_symbol2scm ("finger"); - t->set_mus_property ("text", ly_str02scm (ds.ch_C ())); + t->set_mus_property ("text", ly_str02scm (ds.to_str0 ())); t->set_mus_property ("text-type" , finger); t->set_spot (THIS->here_input ()); $$ = t; @@ -1800,7 +1800,7 @@ bass_figure: Music *m = unsmob_music ($1); if ($2) { SCM salter =m->get_mus_property ("alteration"); - int alter = gh_number_p( salter) ? gh_scm2int (salter) : 0; + int alter = gh_number_p ( salter) ? gh_scm2int (salter) : 0; m->set_mus_property ("alteration", gh_int2scm (alter + $2)); } else { @@ -1851,7 +1851,7 @@ simple_element: pitch exclamations questions optional_notemode_duration optional_rest { Input i = THIS->pop_spot (); - if (!THIS->lexer_p_->note_state_b ()) + if (!THIS->lexer_->note_state_b ()) THIS->parser_error (_ ("Have to be in Note mode for notes")); Music *n = 0; @@ -1893,22 +1893,22 @@ simple_element: SCM e = SCM_UNDEFINED; if (ly_scm2string ($1) =="s") { /* Space */ - Skip_req * skip_p = new Skip_req; - skip_p->set_mus_property ("duration" ,$2); - skip_p->set_spot (i); - e = skip_p->self_scm (); + Skip_req * skip = new Skip_req; + skip->set_mus_property ("duration" ,$2); + skip->set_spot (i); + e = skip->self_scm (); } else { - Rest_req * rest_req_p = new Rest_req; - rest_req_p->set_mus_property ("duration", $2); - rest_req_p->set_spot (i); - e = rest_req_p->self_scm (); + Rest_req * rest_req = new Rest_req; + rest_req->set_mus_property ("duration", $2); + rest_req->set_spot (i); + e = rest_req->self_scm (); } - Simultaneous_music* velt_p = new Request_chord (SCM_EOL); - velt_p-> set_mus_property ("elements", scm_list_n (e,SCM_UNDEFINED)); - velt_p->set_spot (i); + Simultaneous_music* velt = new Request_chord (SCM_EOL); + velt-> set_mus_property ("elements", scm_list_n (e,SCM_UNDEFINED)); + velt->set_spot (i); - $$ = velt_p; + $$ = velt; } | MULTI_MEASURE_REST optional_notemode_duration { Input i = THIS->pop_spot (); @@ -1938,19 +1938,19 @@ simple_element: | STRING optional_notemode_duration { Input i = THIS->pop_spot (); - Lyric_req* lreq_p = new Lyric_req; - lreq_p->set_mus_property ("text", $1); - lreq_p->set_mus_property ("duration",$2); - lreq_p->set_spot (i); - Simultaneous_music* velt_p = new Request_chord (SCM_EOL); - velt_p->set_mus_property ("elements", scm_list_n (lreq_p->self_scm (), SCM_UNDEFINED)); + Lyric_req* lreq = new Lyric_req; + lreq->set_mus_property ("text", $1); + lreq->set_mus_property ("duration",$2); + lreq->set_spot (i); + Simultaneous_music* velt = new Request_chord (SCM_EOL); + velt->set_mus_property ("elements", scm_list_n (lreq->self_scm (), SCM_UNDEFINED)); - $$= velt_p; + $$= velt; } | chord { Input i = THIS->pop_spot (); - if (!THIS->lexer_p_->chord_state_b ()) + if (!THIS->lexer_->chord_state_b ()) THIS->parser_error (_ ("Have to be in Chord mode for chords")); $$ = $1; } @@ -2025,26 +2025,26 @@ chord_step: chord_note: bare_unsigned { Pitch m; - m.notename_i_ = ($1 - 1) % 7; - m.octave_i_ = $1 > 7 ? 1 : 0; - m.alteration_i_ = 0; + m.notename_ = ($1 - 1) % 7; + m.octave_ = $1 > 7 ? 1 : 0; + m.alteration_ = 0; $$ = m.smobbed_copy (); } | bare_unsigned '+' { Pitch m; - m.notename_i_ = ($1 - 1) % 7; - m.octave_i_ = $1 > 7 ? 1 : 0; - m.alteration_i_ = 1; + m.notename_ = ($1 - 1) % 7; + m.octave_ = $1 > 7 ? 1 : 0; + m.alteration_ = 1; $$ = m.smobbed_copy (); } | bare_unsigned CHORD_MINUS { Pitch m; - m.notename_i_ = ($1 - 1) % 7; - m.octave_i_ = $1 > 7 ? 1 : 0; - m.alteration_i_ = -1; + m.notename_ = ($1 - 1) % 7; + m.octave_ = $1 > 7 ? 1 : 0; + m.alteration_ = -1; $$ = m.smobbed_copy (); } diff --git a/lily/part-combine-music-iterator.cc b/lily/part-combine-music-iterator.cc index 46c29221e6..7a9c5b254e 100644 --- a/lily/part-combine-music-iterator.cc +++ b/lily/part-combine-music-iterator.cc @@ -16,23 +16,23 @@ Part_combine_music_iterator::Part_combine_music_iterator () { - first_iter_p_ = 0; - second_iter_p_ = 0; + first_iter_ = 0; + second_iter_ = 0; first_until_ = 0; second_until_ = 0; } Part_combine_music_iterator::~Part_combine_music_iterator () { - delete second_iter_p_; - delete first_iter_p_; + delete second_iter_; + delete first_iter_; } Part_combine_music_iterator::Part_combine_music_iterator (Part_combine_music_iterator const &src) : Music_iterator (src) { - second_iter_p_ = src.second_iter_p_ ? src.second_iter_p_->clone () : 0; - first_iter_p_ = src.first_iter_p_ ? src.first_iter_p_->clone () : 0; + second_iter_ = src.second_iter_ ? src.second_iter_->clone () : 0; + first_iter_ = src.first_iter_ ? src.first_iter_->clone () : 0; first_until_ = src.first_until_; second_until_ = src.second_until_; @@ -45,34 +45,34 @@ Part_combine_music_iterator::pending_moment () const { Moment p; p.set_infinite (1); - if (first_iter_p_->ok ()) - p = p pending_moment (); + if (first_iter_->ok ()) + p = p pending_moment (); - if (second_iter_p_->ok ()) - p = p pending_moment (); + if (second_iter_->ok ()) + p = p pending_moment (); return p; } bool Part_combine_music_iterator::ok () const { - return first_iter_p_->ok () || second_iter_p_->ok (); + return first_iter_->ok () || second_iter_->ok (); } void Part_combine_music_iterator::construct_children () { - Part_combine_music const * m = dynamic_cast (music_l ()); + Part_combine_music const * m = dynamic_cast (get_music ()); - first_iter_p_ = get_iterator_p (m->first_l ()); - second_iter_p_ = get_iterator_p (m->second_l ()); + first_iter_ = get_iterator (m->get_first ()); + second_iter_ = get_iterator (m->get_second ()); } void Part_combine_music_iterator::change_to (Music_iterator *it, String to_type, String to_id) { - Translator_group * current = it->report_to_l (); + Translator_group * current = it->report_to (); Translator_group * last = 0; /* @@ -85,13 +85,13 @@ Part_combine_music_iterator::change_to (Music_iterator *it, String to_type, If \translator Staff = bass, then look for Staff = * */ - while (current && current->type_str_ != to_type) + while (current && current->type_string_ != to_type) { last = current; - current = current->daddy_trans_l_; + current = current->daddy_trans_; } - if (current && current->id_str_ == to_id) + if (current && current->id_string_ == to_id) { String msg; msg += _ ("Can't switch translators, I'm there already"); @@ -101,8 +101,8 @@ Part_combine_music_iterator::change_to (Music_iterator *it, String to_type, if (last) { Translator_group * dest = - it->report_to_l ()->find_create_translator_l (to_type, to_id); - current->remove_translator_p (last); + it->report_to ()->find_create_translator (to_type, to_id); + current->remove_translator (last); dest->add_used_group_translator (last); } else @@ -111,12 +111,12 @@ Part_combine_music_iterator::change_to (Music_iterator *it, String to_type, We could change the current translator's id, but that would make errors hard to catch - last->translator_id_str_ = change_l ()->change_to_id_str_; + last->translator_id_string_ = get_change ()->change_to_id_string_; */ - error (_f ("I'm one myself: `%s'", to_type.ch_C ())); + error (_f ("I'm one myself: `%s'", to_type.to_str0 ())); } else - error (_f ("none of these in my family: `%s'", to_id.ch_C ())); + error (_f ("none of these in my family: `%s'", to_id.to_str0 ())); } @@ -148,12 +148,12 @@ int Part_combine_music_iterator::get_state (Moment) { int state = UNKNOWN; - Part_combine_music const *p = dynamic_cast (music_l ()); + Part_combine_music const *p = dynamic_cast (get_music ()); String w = ly_scm2string (p->get_mus_property ("what")); - Translator_group *first_translator = first_iter_p_->report_to_l ()->find_create_translator_l (w, "one" + suffix_); + Translator_group *first_translator = first_iter_->report_to ()->find_create_translator (w, "one" + suffix_); SCM s = first_translator->get_property ("changeMoment"); if (!gh_pair_p (s)) @@ -177,8 +177,8 @@ Part_combine_music_iterator::get_state (Moment) Moment diff_until = diff_mom + now; bool first = true; - Music_iterator *first_iter = first_iter_p_->clone (); - Music_iterator *second_iter = second_iter_p_->clone (); + Music_iterator *first_iter = first_iter_->clone (); + Music_iterator *second_iter = second_iter_->clone (); Moment last_pending (-1); Moment pending = now; @@ -337,8 +337,8 @@ Part_combine_music_iterator::process (Moment m) */ if (suffix_.empty_b ()) - suffix_ = first_iter_p_->report_to_l () - ->daddy_trans_l_->id_str_.cut_str (3, INT_MAX); + suffix_ = first_iter_->report_to () + ->daddy_trans_->id_string_.cut_string (3, INT_MAX); int state = get_state (m); if (state) @@ -347,11 +347,11 @@ Part_combine_music_iterator::process (Moment m) state = state_; Part_combine_music const *p = - dynamic_cast (music_l ()); + dynamic_cast (get_music ()); - bool previously_combined_b = first_iter_p_->report_to_l ()->daddy_trans_l_ - == second_iter_p_->report_to_l ()->daddy_trans_l_; + bool previously_combined_b = first_iter_->report_to ()->daddy_trans_ + == second_iter_->report_to ()->daddy_trans_; bool combine_b = previously_combined_b; @@ -374,16 +374,16 @@ Part_combine_music_iterator::process (Moment m) if (combine_b && combine_b != previously_combined_b) { - if (second_iter_p_ && second_iter_p_->ok ()) - second_iter_p_->try_music (abort_req); + if (second_iter_ && second_iter_->ok ()) + second_iter_->try_music (abort_req); } String w = ly_scm2string (p->get_mus_property ("what")); if (combine_b != previously_combined_b) - change_to (second_iter_p_, w, (combine_b ? "one" : "two") + change_to (second_iter_, w, (combine_b ? "one" : "two") + suffix_); - Translator_group *first_translator = first_iter_p_->report_to_l ()->find_create_translator_l (w, "one" + suffix_); - Translator_group *second_translator = second_iter_p_->report_to_l ()->find_create_translator_l (w, "two" + suffix_); + Translator_group *first_translator = first_iter_->report_to ()->find_create_translator (w, "one" + suffix_); + Translator_group *second_translator = second_iter_->report_to ()->find_create_translator (w, "two" + suffix_); /* Hmm */ @@ -419,21 +419,21 @@ Part_combine_music_iterator::process (Moment m) first_translator->set_property ("othersolo", b2); second_translator->set_property ("othersolo", b1); - if (first_iter_p_->ok ()) - first_iter_p_->process (m); + if (first_iter_->ok ()) + first_iter_->process (m); - if (second_iter_p_->ok ()) - second_iter_p_->process (m); + if (second_iter_->ok ()) + second_iter_->process (m); } Music_iterator* Part_combine_music_iterator::try_music_in_children (Music *m) const { - Music_iterator * i = first_iter_p_->try_music (m); + Music_iterator * i = first_iter_->try_music (m); if (i) return i; else - return second_iter_p_->try_music (m); + return second_iter_->try_music (m); } @@ -441,10 +441,10 @@ SCM Part_combine_music_iterator::get_pending_events (Moment m)const { SCM s = SCM_EOL; - if (first_iter_p_) - s = gh_append2 (s,first_iter_p_->get_pending_events (m)); - if (second_iter_p_) - s = gh_append2 (second_iter_p_->get_pending_events (m),s); + if (first_iter_) + s = gh_append2 (s,first_iter_->get_pending_events (m)); + if (second_iter_) + s = gh_append2 (second_iter_->get_pending_events (m),s); return s; } diff --git a/lily/part-combine-music.cc b/lily/part-combine-music.cc index 4a48799d9e..7ab0a6f95a 100644 --- a/lily/part-combine-music.cc +++ b/lily/part-combine-music.cc @@ -21,32 +21,32 @@ Part_combine_music::Part_combine_music (SCM l) void Part_combine_music::transpose (Pitch p) { - first_l ()->transpose (p); - second_l () ->transpose (p); + get_first ()->transpose (p); + get_second () ->transpose (p); } Moment Part_combine_music::length_mom () const { - return first_l ()->length_mom (); + return get_first ()->length_mom (); } Pitch Part_combine_music::to_relative_octave (Pitch p) { - p = first_l ()->to_relative_octave (p); - return second_l ()->to_relative_octave (p); + p = get_first ()->to_relative_octave (p); + return get_second ()->to_relative_octave (p); } void Part_combine_music::compress (Moment m) { - first_l ()->compress (m); - second_l ()->compress (m); + get_first ()->compress (m); + get_second ()->compress (m); } Music* -Part_combine_music::first_l () const +Part_combine_music::get_first () const { SCM l = get_mus_property ("elements"); if (!gh_pair_p (l)) @@ -56,7 +56,7 @@ Part_combine_music::first_l () const Music* -Part_combine_music::second_l () const +Part_combine_music::get_second () const { SCM l = get_mus_property ("elements"); if (!gh_pair_p (l)) diff --git a/lily/percent-repeat-engraver.cc b/lily/percent-repeat-engraver.cc index f31329b7b6..74c87e873b 100644 --- a/lily/percent-repeat-engraver.cc +++ b/lily/percent-repeat-engraver.cc @@ -58,8 +58,8 @@ protected: Item * beat_slash_; Item * double_percent_; - Spanner * perc_p_; - Spanner * finished_perc_p_; + Spanner * perc_; + Spanner * finished_perc_; Item * stem_tremolo_; protected: virtual void finalize (); @@ -71,7 +71,7 @@ protected: Percent_repeat_engraver::Percent_repeat_engraver () { - perc_p_ = finished_perc_p_ = 0; + perc_ = finished_perc_ = 0; repeat_ =0; stem_tremolo_ = 0; @@ -120,17 +120,17 @@ Percent_repeat_engraver::try_music (Music * m) repeat_ = rp; - Global_translator *global_l =0; + Global_translator *global =0; Translator *t = this; do { - t = t->daddy_trans_l_ ; - global_l = dynamic_cast (t); + t = t->daddy_trans_ ; + global = dynamic_cast (t); } - while (!global_l); + while (!global); for (int i = 0; i < count; i++) - global_l->add_moment_to_process (now + Moment (1+i) * body_length_); + global->add_moment_to_process (now + Moment (1+i) * body_length_); return true; } @@ -150,12 +150,12 @@ Percent_repeat_engraver::process_music () } else if (repeat_sign_type_ == MEASURE) { - finished_perc_p_ = perc_p_; + finished_perc_ = perc_; typeset_perc (); - perc_p_ = new Spanner (get_property ("PercentRepeat")); + perc_ = new Spanner (get_property ("PercentRepeat")); SCM col =get_property ("currentCommandColumn"); - perc_p_->set_bound (LEFT, unsmob_grob (col)); - announce_grob(perc_p_, repeat_->self_scm()); + perc_->set_bound (LEFT, unsmob_grob (col)); + announce_grob(perc_, repeat_->self_scm()); } else if (repeat_sign_type_ == DOUBLE_MEASURE) @@ -177,22 +177,22 @@ void Percent_repeat_engraver::finalize () { typeset_perc (); - if (perc_p_) + if (perc_) { repeat_->origin ()->warning (_ ("unterminated chord tremolo")); - perc_p_->suicide (); + perc_->suicide (); } } void Percent_repeat_engraver::typeset_perc () { - if (finished_perc_p_) + if (finished_perc_) { SCM col =get_property ("currentCommandColumn"); - finished_perc_p_->set_bound (RIGHT, unsmob_grob (col)); - typeset_grob (finished_perc_p_); - finished_perc_p_ = 0; + finished_perc_->set_bound (RIGHT, unsmob_grob (col)); + typeset_grob (finished_perc_); + finished_perc_ = 0; } if (beat_slash_) @@ -216,13 +216,13 @@ Percent_repeat_engraver::start_translation_timestep () { if (stop_mom_ == now_mom ()) { - if (perc_p_) + if (perc_) { - finished_perc_p_ = perc_p_; + finished_perc_ = perc_; typeset_perc (); } repeat_ = 0; - perc_p_ = 0; + perc_ = 0; repeat_sign_type_ = UNKNOWN; } } diff --git a/lily/percent-repeat-iterator.cc b/lily/percent-repeat-iterator.cc index c60877d948..3bce52030a 100644 --- a/lily/percent-repeat-iterator.cc +++ b/lily/percent-repeat-iterator.cc @@ -22,22 +22,22 @@ Percent_repeat_iterator::Percent_repeat_iterator () Percent_repeat_iterator::Percent_repeat_iterator (Percent_repeat_iterator const & p) : Music_iterator (p) { - child_iter_p_ = p.child_iter_p_ ? p.child_iter_p_->clone (): 0; + child_iter_ = p.child_iter_ ? p.child_iter_->clone (): 0; finish_mom_ = p.finish_mom_ ; } bool Percent_repeat_iterator::ok () const { - return child_iter_p_; + return child_iter_; } void Percent_repeat_iterator::construct_children () { - Repeated_music * mus =dynamic_cast (music_l ()); + Repeated_music * mus =dynamic_cast (get_music ()); finish_mom_ = mus->length_mom (); - child_iter_p_ = get_iterator_p (mus->body ()); + child_iter_ = get_iterator (mus->body ()); } @@ -46,28 +46,28 @@ Percent_repeat_iterator::process (Moment m) { if (!m.to_bool ()) { - Music_iterator *yeah = try_music (music_l ()); + Music_iterator *yeah = try_music (get_music ()); if (yeah) - set_translator (yeah->report_to_l ()); + set_translator (yeah->report_to ()); else - music_l ()->origin ()->warning ( _ ("no one to print a percent")); + get_music ()->origin ()->warning ( _ ("no one to print a percent")); } - if (child_iter_p_->ok ()) - child_iter_p_->process (m); + if (child_iter_->ok ()) + child_iter_->process (m); if (finish_mom_ <= m ) { - delete child_iter_p_; - child_iter_p_ = 0; + delete child_iter_; + child_iter_ = 0; } } Moment Percent_repeat_iterator::pending_moment ()const { - if (child_iter_p_->ok ()) - return child_iter_p_->pending_moment (); + if (child_iter_->ok ()) + return child_iter_->pending_moment (); else return finish_mom_ ; } @@ -75,11 +75,11 @@ Percent_repeat_iterator::pending_moment ()const Music_iterator* Percent_repeat_iterator::try_music_in_children (Music *m) const { - return child_iter_p_->try_music (m); + return child_iter_->try_music (m); } Percent_repeat_iterator::~Percent_repeat_iterator () { - delete child_iter_p_; + delete child_iter_; } diff --git a/lily/performance.cc b/lily/performance.cc index 1a941c6697..bbaadb50da 100644 --- a/lily/performance.cc +++ b/lily/performance.cc @@ -27,7 +27,7 @@ Performance::Performance () { - midi_l_ =0; + midi_ =0; audio_elem_p_list_ = 0; } @@ -40,7 +40,7 @@ Performance::~Performance () void Performance::output (Midi_stream& midi_stream) { - int tracks_i = audio_staff_l_arr_.size () + 1; + int tracks_i = audio_staffs_.size () + 1; // ugh int clocks_per_4_i = 384; @@ -50,11 +50,11 @@ Performance::output (Midi_stream& midi_stream) progress_indication ("\n"); progress_indication (_ ("Track ... ")); int channel = 0; - for (int i =0; i < audio_staff_l_arr_.size (); i++) + for (int i =0; i < audio_staffs_.size (); i++) { - Audio_staff *s = audio_staff_l_arr_[i]; + Audio_staff *s = audio_staffs_[i]; if (verbose_global_b) - progress_indication ("[" + to_str (i)) ; + progress_indication ("[" + to_string (i)) ; /* MIDI players tend to ignore instrument settings on @@ -62,8 +62,8 @@ Performance::output (Midi_stream& midi_stream) */ if (channel == 9) channel++; - if (s->channel_i_ < 0) - s->channel_i_ = channel; + if (s->channel_ < 0) + s->channel_ = channel; s->output (midi_stream, channel++); if (verbose_global_b) progress_indication ("]"); @@ -76,13 +76,13 @@ Performance::output_header_track (Midi_stream& midi_stream) { Midi_track midi_track; - midi_track.channel_i_ = 9; + midi_track.channel_ = 9; // perhaps multiple text events? - String id_str; + String id_string; String str = String (_ ("Creator: ")); - id_str = String_convert::pad_to (gnu_lilypond_version_str (), 30); - str += id_str; + id_string = String_convert::pad_to (gnu_lilypond_version_string (), 30); + str += id_string; /* This seems silly, but in fact the audio elements should @@ -94,7 +94,7 @@ Performance::output_header_track (Midi_stream& midi_stream) /* Better not translate this */ str = "Generated automatically by: "; - str += id_str; + str += id_string; Audio_text generate_a (Audio_text::TEXT, str); Midi_text generate (&generate_a); @@ -103,7 +103,7 @@ Performance::output_header_track (Midi_stream& midi_stream) str = _ ("at "); time_t t (time (0)); str += ctime (&t); - str = str.left_str (str.length_i () - 1); + str = str.left_string (str.length () - 1); str = String_convert::pad_to (str, 60); Audio_text at_a (Audio_text::TEXT, str); @@ -111,20 +111,20 @@ Performance::output_header_track (Midi_stream& midi_stream) midi_track.add (Moment (0), &at); - str = _f ("from musical definition: %s", origin_str_); + str = _f ("from musical definition: %s", origin_string_); Audio_text from_a (Audio_text::TEXT, str); Midi_text from (&from_a); midi_track.add (Moment (0), &from); Audio_text track_name_a (Audio_text::TRACK_NAME, "Track " - + String_convert::i2dec_str (0, 0, '0')); + + String_convert::int2dec (0, 0, '0')); Midi_text track_name (&track_name_a); midi_track.add (Moment (0), &track_name); // Some sequencers read track 0 last. - // Audio_tempo tempo_a (midi_l_->get_tempo_i (Moment (Rational (1, 4)))); + // Audio_tempo tempo_a (midi_->get_tempo (Moment (Rational (1, 4)))); // Midi_tempo tempo (&tempo_a); // midi_track.add (Moment (0), &tempo); @@ -136,11 +136,11 @@ Performance::add_element (Audio_element *p) { if (Audio_staff*s=dynamic_cast (p)) { - audio_staff_l_arr_.push (s); + audio_staffs_.push (s); } else if (Audio_column *c = dynamic_cast (p)) { - c->performance_l_ = this; + c->performance_ = this; } audio_elem_p_list_ = new Killing_cons (p, audio_elem_p_list_); } @@ -152,22 +152,22 @@ Performance::process () String out = output_name_global; if (out == "-") out = "lelie.midi"; - int def = midi_l_->get_next_score_count (); + int def = midi_->get_next_score_count (); if (def) { Path p = split_path (out); - p.base += "-" + to_str (def); - out = p.str (); + p.base += "-" + to_string (def); + out = p.string (); } /* Maybe a bit crude, but we had this before */ Path p = split_path (out); p.ext = "midi"; - out = p.str (); + out = p.string (); Midi_stream midi_stream (out); progress_indication (_f ("MIDI output to `%s'...", out)); - target_str_global_array.push (out); + target_string_globals.push (out); output (midi_stream); progress_indication ("\n"); diff --git a/lily/performer-group-performer.cc b/lily/performer-group-performer.cc index e97182933d..9a10e3d16f 100644 --- a/lily/performer-group-performer.cc +++ b/lily/performer-group-performer.cc @@ -25,7 +25,7 @@ ENTER_DESCRIPTION(Performer_group_performer, void Performer_group_performer::announce_element (Audio_element_info info) { - announce_info_arr_.push (info); + announce_infos_.push (info); Performer::announce_element (info); } @@ -46,15 +46,15 @@ Performer_group_performer::create_audio_elements () void Performer_group_performer::acknowledge_audio_elements () { - for (int j =0; j < announce_info_arr_.size (); j++) + for (int j =0; j < announce_infos_.size (); j++) { - Audio_element_info info = announce_info_arr_[j]; + Audio_element_info info = announce_infos_[j]; for (SCM p = simple_trans_list_; gh_pair_p (p); p = ly_cdr (p)) { Translator * t = unsmob_translator (ly_car (p)); Performer * eng = dynamic_cast (t); - if (eng && eng!= info.origin_trans_l_) + if (eng && eng!= info.origin_trans_) eng->acknowledge_audio_element (info); } } @@ -72,20 +72,20 @@ Performer_group_performer::do_announces () create_audio_elements (); - while (announce_info_arr_.size ()) + while (announce_infos_.size ()) { acknowledge_audio_elements (); - announce_info_arr_.clear (); + announce_infos_.clear (); create_audio_elements (); } - if (announce_info_arr_.size ()) + if (announce_infos_.size ()) { #if 0 //printf? -> include printf ("do_announces: elt: %s\n", - classname (announce_info_arr_[0].elem_l_)); + classname (announce_infos_[0].elem_)); #endif - announce_info_arr_.clear (); + announce_infos_.clear (); } } diff --git a/lily/performer.cc b/lily/performer.cc index 5fe1d64916..2e88c19550 100644 --- a/lily/performer.cc +++ b/lily/performer.cc @@ -14,20 +14,20 @@ void Performer::play_element (Audio_element* p) { - daddy_perf_l ()->play_element (p); + get_daddy_perf ()->play_element (p); } int -Performer::get_tempo_i () const +Performer::get_tempo () const { - return daddy_perf_l ()->get_tempo_i (); + return get_daddy_perf ()->get_tempo (); } Performer_group_performer* -Performer::daddy_perf_l () const +Performer::get_daddy_perf () const { - return (daddy_trans_l_) - ?dynamic_cast (daddy_trans_l_) + return (daddy_trans_) + ?dynamic_cast (daddy_trans_) : 0; } @@ -45,7 +45,7 @@ Performer::create_audio_elements () void Performer::announce_element (Audio_element_info i) { - if (!i.origin_trans_l_) - i.origin_trans_l_= this; - daddy_perf_l ()->announce_element (i); + if (!i.origin_trans_) + i.origin_trans_= this; + get_daddy_perf ()->announce_element (i); } diff --git a/lily/phrasing-slur-engraver.cc b/lily/phrasing-slur-engraver.cc index b1e621a910..9240e78542 100644 --- a/lily/phrasing-slur-engraver.cc +++ b/lily/phrasing-slur-engraver.cc @@ -14,10 +14,10 @@ class Phrasing_slur_engraver : public Engraver { - Link_array requests_arr_; - Link_array new_phrasing_slur_req_l_arr_; + Link_array requestses_; + Link_array new_phrasing_slur_reqs_; Link_array phrasing_slur_l_stack_; - Link_array end_phrasing_slur_l_arr_; + Link_array end_phrasing_slurs_; Moment last_start_; protected: @@ -39,9 +39,9 @@ Phrasing_slur_engraver::Phrasing_slur_engraver () } bool -Phrasing_slur_engraver::try_music (Music *req_l) +Phrasing_slur_engraver::try_music (Music *req) { - if (Span_req *sl = dynamic_cast (req_l)) + if (Span_req *sl = dynamic_cast (req)) { String t = ly_scm2string (sl->get_mus_property ("span-type")); if (t == "abort") @@ -51,13 +51,13 @@ Phrasing_slur_engraver::try_music (Music *req_l) phrasing_slur_l_stack_[i]->suicide (); } phrasing_slur_l_stack_.clear (); - for (int i = 0; i < end_phrasing_slur_l_arr_.size (); i++) + for (int i = 0; i < end_phrasing_slurs_.size (); i++) { - end_phrasing_slur_l_arr_[i]->suicide (); + end_phrasing_slurs_[i]->suicide (); } - end_phrasing_slur_l_arr_.clear (); - requests_arr_.clear (); - new_phrasing_slur_req_l_arr_.clear (); + end_phrasing_slurs_.clear (); + requestses_.clear (); + new_phrasing_slur_reqs_.clear (); } else if (t == "phrasing-slur") { @@ -68,14 +68,14 @@ Phrasing_slur_engraver::try_music (Music *req_l) { if (now_mom () > last_start_) { - new_phrasing_slur_req_l_arr_.push (sl); + new_phrasing_slur_reqs_.push (sl); last_start_ = now_mom (); return true; } } else { - new_phrasing_slur_req_l_arr_.push (sl); + new_phrasing_slur_reqs_.push (sl); return true; } } @@ -86,13 +86,13 @@ Phrasing_slur_engraver::try_music (Music *req_l) void Phrasing_slur_engraver::acknowledge_grob (Grob_info info) { - if (Note_column::has_interface (info.grob_l_)) + if (Note_column::has_interface (info.grob_)) { - Grob *e =info.grob_l_; + Grob *e =info.grob_; for (int i = 0; i < phrasing_slur_l_stack_.size (); i++) Slur::add_column (phrasing_slur_l_stack_[i], e); - for (int i = 0; i < end_phrasing_slur_l_arr_.size (); i++) - Slur::add_column (end_phrasing_slur_l_arr_[i], e); + for (int i = 0; i < end_phrasing_slurs_.size (); i++) + Slur::add_column (end_phrasing_slurs_[i], e); } } @@ -112,61 +112,61 @@ Phrasing_slur_engraver::finalize () } phrasing_slur_l_stack_.clear (); - for (int i=0; i < requests_arr_.size (); i++) + for (int i=0; i < requestses_.size (); i++) { - requests_arr_[i]->origin ()->warning (_ ("unterminated phrasing slur")); + requestses_[i]->origin ()->warning (_ ("unterminated phrasing slur")); } } void Phrasing_slur_engraver::process_acknowledged_grobs () { - Link_array start_phrasing_slur_l_arr; - for (int i=0; i< new_phrasing_slur_req_l_arr_.size (); i++) + Link_array start_phrasing_slurs; + for (int i=0; i< new_phrasing_slur_reqs_.size (); i++) { - Span_req* phrasing_slur_req_l = new_phrasing_slur_req_l_arr_[i]; + Span_req* phrasing_slur_req = new_phrasing_slur_reqs_[i]; // end phrasing slur: move the phrasing slur to other array - if (phrasing_slur_req_l->get_span_dir () == STOP) + if (phrasing_slur_req->get_span_dir () == STOP) { if (phrasing_slur_l_stack_.empty ()) - phrasing_slur_req_l->origin ()->warning (_f ("can't find start of phrasing slur")); + phrasing_slur_req->origin ()->warning (_f ("can't find start of phrasing slur")); else { Grob* phrasing_slur = phrasing_slur_l_stack_.pop (); - end_phrasing_slur_l_arr_.push (phrasing_slur); - requests_arr_.pop (); + end_phrasing_slurs_.push (phrasing_slur); + requestses_.pop (); } } - else if (phrasing_slur_req_l->get_span_dir () == START) + else if (phrasing_slur_req->get_span_dir () == START) { // push a new phrasing_slur onto stack. // (use temp. array to wait for all phrasing_slur STOPs) Grob* phrasing_slur = new Spanner (get_property ("PhrasingSlur")); Slur::set_interface (phrasing_slur); // can't remove. - start_phrasing_slur_l_arr.push (phrasing_slur); - requests_arr_.push (phrasing_slur_req_l); - announce_grob(phrasing_slur, phrasing_slur_req_l->self_scm()); + start_phrasing_slurs.push (phrasing_slur); + requestses_.push (phrasing_slur_req); + announce_grob(phrasing_slur, phrasing_slur_req->self_scm()); } } - for (int i=0; i < start_phrasing_slur_l_arr.size (); i++) - phrasing_slur_l_stack_.push (start_phrasing_slur_l_arr[i]); - new_phrasing_slur_req_l_arr_.clear (); + for (int i=0; i < start_phrasing_slurs.size (); i++) + phrasing_slur_l_stack_.push (start_phrasing_slurs[i]); + new_phrasing_slur_reqs_.clear (); } void Phrasing_slur_engraver::stop_translation_timestep () { - for (int i = 0; i < end_phrasing_slur_l_arr_.size (); i++) + for (int i = 0; i < end_phrasing_slurs_.size (); i++) { - typeset_grob (end_phrasing_slur_l_arr_[i]); + typeset_grob (end_phrasing_slurs_[i]); } - end_phrasing_slur_l_arr_.clear (); + end_phrasing_slurs_.clear (); } void Phrasing_slur_engraver::start_translation_timestep () { - new_phrasing_slur_req_l_arr_.clear (); + new_phrasing_slur_reqs_.clear (); } diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index 666cda769e..ee9e6e6dd8 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -25,11 +25,11 @@ struct Pedal_info { char const * name_; - Span_req* start_req_l_; + Span_req* start_req_; Drul_array req_l_drul_; - Item* item_p_; - Spanner* bracket_p_; // A single portion of a pedal bracket - Spanner* finished_bracket_p_; + Item* item_; + Spanner* bracket_; // A single portion of a pedal bracket + Spanner* finished_bracket_; /* This grob contains all the pedals of the same type on the same staff @@ -66,7 +66,7 @@ private: Why 4, why not 3. Why not 3423 ? ---hwn. */ - Spanner *previous_p_ [4]; + Spanner *previous_ [4]; int spanner_count_; @@ -95,7 +95,7 @@ Piano_pedal_engraver::initialize () spanner_count_ = 0; for (int i = 0; i < 3; ++i) - previous_p_[i] = 0; + previous_[i] = 0; char * names [] = { "Sostenuto", "Sustain", "UnaCorda", 0 }; @@ -103,15 +103,15 @@ Piano_pedal_engraver::initialize () do { p->name_ = *np; - p->item_p_ = 0; - p->bracket_p_ = 0; - p->finished_bracket_p_ = 0; + p->item_ = 0; + p->bracket_ = 0; + p->finished_bracket_ = 0; p->line_spanner_ = 0; p->finished_line_spanner_ = 0; p->current_bracket_req_ = 0; p->req_l_drul_[START] = 0; p->req_l_drul_[STOP] = 0; - p->start_req_l_ = 0; + p->start_req_ = 0; p++; } @@ -132,16 +132,16 @@ Piano_pedal_engraver::acknowledge_grob (Grob_info info) { for (Pedal_info*p = info_list_; p && p->name_; p ++) { - if (Note_column::has_interface (info.grob_l_)) + if (Note_column::has_interface (info.grob_)) { if (p->line_spanner_) { - Side_position_interface::add_support (p->line_spanner_, info.grob_l_); + Side_position_interface::add_support (p->line_spanner_, info.grob_); - add_bound_item (p->line_spanner_,info.grob_l_); + add_bound_item (p->line_spanner_,info.grob_); } - if (p->bracket_p_) - add_bound_item (p->bracket_p_,info.grob_l_); + if (p->bracket_) + add_bound_item (p->bracket_,info.grob_); } } @@ -159,9 +159,9 @@ Piano_pedal_engraver::try_music (Music *m) p->req_l_drul_[START] = 0; p->req_l_drul_[STOP] = 0; - if (p->bracket_p_) - p->bracket_p_->suicide (); /* as in dynamic-engraver.cc */ - p->bracket_p_ = 0; + if (p->bracket_) + p->bracket_->suicide (); /* as in dynamic-engraver.cc */ + p->bracket_ = 0; } if (scm_equal_p (s->get_mus_property ("span-type"), ly_str02scm (p->name_))==SCM_BOOL_T) @@ -184,7 +184,7 @@ Piano_pedal_engraver::process_acknowledged_grobs () if (!p->line_spanner_) { String name = String (p->name_) + "PedalLineSpanner"; - p->line_spanner_ = new Spanner (get_property (name.ch_C ())); + p->line_spanner_ = new Spanner (get_property (name.to_str0 ())); Side_position_interface::set_axis (p->line_spanner_, Y_AXIS); Music * rq = (p->req_l_drul_[START] ? p->req_l_drul_[START] : p->req_l_drul_[STOP]); announce_grob (p->line_spanner_, rq->self_scm ()); @@ -194,11 +194,11 @@ Piano_pedal_engraver::process_acknowledged_grobs () These can be text items or text-spanners */ SCM type = ly_cdr (scm_assoc (ly_symbol2scm ("pedal-type"), - get_property ( (String (p->name_) + "Pedal").ch_C ()))); + get_property ( (String (p->name_) + "Pedal").to_str0 ()))); if (type == ly_symbol2scm ("text") || // Ped. *Ped. * type == ly_symbol2scm ("mixed") ) // Ped. _____/\____| { - if (! p->item_p_) + if (! p->item_) create_text_grobs (p, type); } if (type == ly_symbol2scm ("bracket") || // |_________/\____| @@ -216,7 +216,7 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, SCM pedaltype) { SCM b; SCM s = SCM_EOL; - SCM strings = get_property ( ("pedal" + String (p->name_) + "Strings").ch_C ()); + SCM strings = get_property ( ("pedal" + String (p->name_) + "Strings").to_str0 ()); if (scm_ilength (strings) >= 3) { @@ -224,7 +224,7 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, SCM pedaltype) { if (pedaltype == ly_symbol2scm ("text")) { - if (!p->start_req_l_) + if (!p->start_req_) { p->req_l_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: `%s'", p->name_)); } @@ -232,14 +232,14 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, SCM pedaltype) { s = ly_cadr (strings); } - p->start_req_l_ = p->req_l_drul_[START]; + p->start_req_ = p->req_l_drul_[START]; } } else if (p->req_l_drul_[STOP]) { if (pedaltype == ly_symbol2scm ("text")) { - if (!p->start_req_l_) + if (!p->start_req_) { p->req_l_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: `%s'", p->name_)); } @@ -248,33 +248,33 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, SCM pedaltype) s = ly_caddr (strings); spanner_count_ --; } - p->start_req_l_ = 0; + p->start_req_ = 0; } } else if (p->req_l_drul_[START]) { - p->start_req_l_ = p->req_l_drul_[START]; + p->start_req_ = p->req_l_drul_[START]; s = ly_car (strings); if (pedaltype == ly_symbol2scm ("text")) { spanner_count_ ++; - previous_p_[spanner_count_] = p->line_spanner_; + previous_[spanner_count_] = p->line_spanner_; if (spanner_count_ > 1) // add extra space below the previous already-occuring pedal Side_position_interface::add_support (p->line_spanner_, - previous_p_[spanner_count_ - 1]); + previous_[spanner_count_ - 1]); } } if (gh_string_p (s)) { String propname = String (p->name_) + "Pedal"; - b = get_property (propname.ch_C ()); - p->item_p_ = new Item (b); - p->item_p_->set_grob_property ("text", s); - Axis_group_interface::add_element (p->line_spanner_, p->item_p_); + b = get_property (propname.to_str0 ()); + p->item_ = new Item (b); + p->item_->set_grob_property ("text", s); + Axis_group_interface::add_element (p->line_spanner_, p->item_); - announce_grob (p->item_p_, + announce_grob (p->item_, (p->req_l_drul_[START] ? p->req_l_drul_[START] : p->req_l_drul_[STOP])->self_scm ()); @@ -294,45 +294,45 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, SCM pedaltype) if (p->req_l_drul_[STOP]) { - if (!p->start_req_l_) + if (!p->start_req_) { p->req_l_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: `%s'", p->name_)); } else if (!p->req_l_drul_[START]) spanner_count_ -- ; - assert (!p->finished_bracket_p_ && p->bracket_p_); + assert (!p->finished_bracket_ && p->bracket_); Grob *cmc = unsmob_grob (get_property ("currentMusicalColumn")); - p->bracket_p_->set_bound (RIGHT, cmc); + p->bracket_->set_bound (RIGHT, cmc); /* Set properties so that the molecule-creating function will know whether the right edge should be flared ___/ */ - SCM eleft = ly_car (p->bracket_p_->get_grob_property ("edge-widen")); + SCM eleft = ly_car (p->bracket_->get_grob_property ("edge-widen")); SCM eright = (p->req_l_drul_[START] ? edge_width_drul_[RIGHT] : gh_double2scm (0)); - p->bracket_p_->set_grob_property ("edge-widen", gh_cons (eleft, eright)); + p->bracket_->set_grob_property ("edge-widen", gh_cons (eleft, eright)); - p->finished_bracket_p_ = p->bracket_p_; - p->bracket_p_ = 0; + p->finished_bracket_ = p->bracket_; + p->bracket_ = 0; p->current_bracket_req_ = 0; - p->start_req_l_ = p->req_l_drul_[START]; + p->start_req_ = p->req_l_drul_[START]; } if (p->req_l_drul_[START]) { - p->start_req_l_ = p->req_l_drul_[START]; + p->start_req_ = p->req_l_drul_[START]; p->current_bracket_req_ = p->req_l_drul_[START]; - p->bracket_p_ = new Spanner (get_property ("PianoPedalBracket")); + p->bracket_ = new Spanner (get_property ("PianoPedalBracket")); /* Set properties so that the molecule-creating function will know whether the left edge should be flared \___ */ - SCM ew = p->bracket_p_->get_grob_property ("edge-widen"); + SCM ew = p->bracket_->get_grob_property ("edge-widen"); edge_width_drul_[LEFT] = ly_car (ew); edge_width_drul_[RIGHT] = ly_cdr (ew); @@ -340,13 +340,13 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, SCM pedaltype) edge_width_drul_[LEFT] : gh_double2scm (0)); SCM eright = gh_double2scm (0); - p->bracket_p_->set_grob_property ("edge-widen", gh_cons (eleft, eright)); + p->bracket_->set_grob_property ("edge-widen", gh_cons (eleft, eright)); /* Set this property for 'mixed style' pedals, Ped._______/\ , so the molecule function will shorten the ____ line by the length of the Ped. text. */ - p->bracket_p_->set_grob_property ("text-start", + p->bracket_->set_grob_property ("text-start", pedaltype == ly_symbol2scm ("mixed") ? gh_bool2scm ( (bool) ! p->req_l_drul_[STOP]) : gh_bool2scm (false)); @@ -355,23 +355,23 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, SCM pedaltype) Mixed style: Store a pointer to the preceding text for use in calculating the length of the line */ - if (p->item_p_) - p->bracket_p_->set_grob_property ("pedal-text", p->item_p_->self_scm ()); + if (p->item_) + p->bracket_->set_grob_property ("pedal-text", p->item_->self_scm ()); - p->bracket_p_->set_bound (LEFT, unsmob_grob (get_property ("currentMusicalColumn"))); - Axis_group_interface::add_element (p->line_spanner_, p->bracket_p_); + p->bracket_->set_bound (LEFT, unsmob_grob (get_property ("currentMusicalColumn"))); + Axis_group_interface::add_element (p->line_spanner_, p->bracket_); - add_bound_item (p->line_spanner_, p->bracket_p_->get_bound (LEFT)); - announce_grob (p->bracket_p_, p->req_l_drul_[START]->self_scm ()); + add_bound_item (p->line_spanner_, p->bracket_->get_bound (LEFT)); + announce_grob (p->bracket_, p->req_l_drul_[START]->self_scm ()); if (!p->req_l_drul_[STOP]) { spanner_count_ ++; - previous_p_[spanner_count_] = p->line_spanner_; + previous_[spanner_count_] = p->line_spanner_; if (spanner_count_ > 1) // position new pedal spanner below the current one - Side_position_interface::add_support (p->line_spanner_, previous_p_[spanner_count_ - 1]); + Side_position_interface::add_support (p->line_spanner_, previous_[spanner_count_ - 1]); } } @@ -396,14 +396,14 @@ Piano_pedal_engraver::finalize () p->finished_line_spanner_ = p->line_spanner_; typeset_all (); } - if (p->bracket_p_ - && !p->bracket_p_->live()) - p->bracket_p_ = 0; - if (p->bracket_p_) + if (p->bracket_ + && !p->bracket_->live()) + p->bracket_ = 0; + if (p->bracket_) { p->current_bracket_req_->origin ()->warning (_ ("unterminated pedal bracket")); - p->bracket_p_->suicide (); - p->bracket_p_ = 0; + p->bracket_->suicide (); + p->bracket_ = 0; } } } @@ -414,7 +414,7 @@ Piano_pedal_engraver::stop_translation_timestep () { for (Pedal_info*p = info_list_; p && p->name_; p ++) { - if (!p->bracket_p_) + if (!p->bracket_) { p->finished_line_spanner_ = p->line_spanner_; p->line_spanner_ = 0; @@ -437,15 +437,15 @@ Piano_pedal_engraver::typeset_all () if (p->finished_line_spanner_ && !p->finished_line_spanner_->live ()) p->finished_line_spanner_ = 0; - if (p->finished_bracket_p_ - && !p->finished_bracket_p_->live()) - p->finished_bracket_p_ = 0; + if (p->finished_bracket_ + && !p->finished_bracket_->live()) + p->finished_bracket_ = 0; if (p->name_ == String ("Sustain")) - sustain = p->item_p_; + sustain = p->item_; - if (p->item_p_) + if (p->item_) { /* Hmm. @@ -454,24 +454,24 @@ Piano_pedal_engraver::typeset_all () { if (sustain) { - Side_position_interface::add_support (p->item_p_,sustain); + Side_position_interface::add_support (p->item_,sustain); } } - typeset_grob (p->item_p_); - p->item_p_ = 0; + typeset_grob (p->item_); + p->item_ = 0; } - if (p->finished_bracket_p_) + if (p->finished_bracket_) { - Grob * l = p->finished_bracket_p_->get_bound (LEFT); - Grob * r = p->finished_bracket_p_->get_bound (RIGHT); + Grob * l = p->finished_bracket_->get_bound (LEFT); + Grob * r = p->finished_bracket_->get_bound (RIGHT); if (!r) { - p->finished_bracket_p_->set_bound (RIGHT, unsmob_grob (get_property ("currentMusicalColumn"))); + p->finished_bracket_->set_bound (RIGHT, unsmob_grob (get_property ("currentMusicalColumn"))); } - typeset_grob (p->finished_bracket_p_); - p->finished_bracket_p_ =0; + typeset_grob (p->finished_bracket_); + p->finished_bracket_ =0; } if (p->finished_line_spanner_) diff --git a/lily/piano-pedal-performer.cc b/lily/piano-pedal-performer.cc index fd32e92684..675ed9140d 100644 --- a/lily/piano-pedal-performer.cc +++ b/lily/piano-pedal-performer.cc @@ -19,7 +19,7 @@ class Piano_pedal_performer : public Performer struct Pedal_info { char const *name_; - Span_req* start_req_l_; + Span_req* start_req_; Drul_array req_l_drul_; }; @@ -35,7 +35,7 @@ protected: virtual void start_translation_timestep (); private: - Link_array audio_p_arr_; + Link_array audios_; Pedal_info * info_alist_; }; @@ -62,7 +62,7 @@ Piano_pedal_performer::initialize () p->name_ = *np; p->req_l_drul_[START] = 0; p->req_l_drul_[STOP] = 0; - p->start_req_l_ = 0; + p->start_req_ = 0; p++; } @@ -77,27 +77,27 @@ Piano_pedal_performer::create_audio_elements () { if (p->req_l_drul_[STOP]) { - if (!p->start_req_l_) + if (!p->start_req_) { p->req_l_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: `%s'", String (p->name_))); } else { Audio_piano_pedal* a = new Audio_piano_pedal; - a->type_str_ = String (p->name_); + a->type_string_ = String (p->name_); a->dir_ = STOP; - audio_p_arr_.push (a); + audios_.push (a); } - p->start_req_l_ = 0; + p->start_req_ = 0; } if (p->req_l_drul_[START]) { - p->start_req_l_ = p->req_l_drul_[START]; + p->start_req_ = p->req_l_drul_[START]; Audio_piano_pedal* a = new Audio_piano_pedal; - a->type_str_ = String (p->name_); + a->type_string_ = String (p->name_); a->dir_ = START; - audio_p_arr_.push (a); + audios_.push (a); } p->req_l_drul_[START] = 0; p->req_l_drul_[STOP] = 0; @@ -107,9 +107,9 @@ Piano_pedal_performer::create_audio_elements () void Piano_pedal_performer::stop_translation_timestep () { - for (int i=0; i< audio_p_arr_.size (); i++) - play_element (audio_p_arr_[i]); - audio_p_arr_.clear (); + for (int i=0; i< audios_.size (); i++) + play_element (audios_[i]); + audios_.clear (); } void diff --git a/lily/pitch-squash-engraver.cc b/lily/pitch-squash-engraver.cc index 3df136ee21..8008d4d9cc 100644 --- a/lily/pitch-squash-engraver.cc +++ b/lily/pitch-squash-engraver.cc @@ -22,9 +22,9 @@ void Pitch_squash_engraver::acknowledge_grob (Grob_info i) { SCM newpos = get_property ("squashedPosition"); - if (Note_head::has_interface (i.grob_l_)) + if (Note_head::has_interface (i.grob_)) { - i.grob_l_->set_grob_property ("staff-position", newpos); + i.grob_->set_grob_property ("staff-position", newpos); } } diff --git a/lily/pitch.cc b/lily/pitch.cc index 06c19f5473..3be10e2153 100644 --- a/lily/pitch.cc +++ b/lily/pitch.cc @@ -15,16 +15,16 @@ Pitch::Pitch (int o, int n, int a) { - notename_i_ = n; - alteration_i_ = a; - octave_i_ = o; + notename_ = n; + alteration_ = a; + octave_ = o; if (n < 0 || n >= 7 || a < -2 || a > 2) { String s = _ ("Pitch arguments out of range"); - s += ": alteration = " + to_str (a); - s += ", notename = " + to_str (n); + s += ": alteration = " + to_string (a); + s += ", notename = " + to_string (n); warning (s); } normalise (); @@ -32,17 +32,17 @@ Pitch::Pitch (int o, int n, int a) Pitch::Pitch () { - notename_i_ = 0; - alteration_i_ = 0; - octave_i_ = 0; + notename_ = 0; + alteration_ = 0; + octave_ = 0; } int Pitch::compare (Pitch const &m1, Pitch const &m2) { - int o= m1.octave_i_ - m2.octave_i_; - int n = m1.notename_i_ - m2.notename_i_; - int a = m1.alteration_i_ - m2.alteration_i_; + int o= m1.octave_ - m2.octave_; + int n = m1.notename_ - m2.notename_; + int a = m1.alteration_ - m2.alteration_; if (o) return o; @@ -56,7 +56,7 @@ Pitch::compare (Pitch const &m1, Pitch const &m2) int Pitch::steps () const { - return notename_i_ + octave_i_*7; + return notename_ + octave_*7; } /* @@ -70,57 +70,57 @@ static Byte pitch_byte_a[ ] = { 0, 2, 4, 5, 7, 9, 11 }; int Pitch::semitone_pitch () const { - int o = octave_i_; - int n = notename_i_; + int o = octave_; + int n = notename_; while (n < 0) { n += 7; o --; } - return (o + n / 7) * 12 + pitch_byte_a[n % 7] + alteration_i_; + return (o + n / 7) * 12 + pitch_byte_a[n % 7] + alteration_; } void Pitch::normalise () { int pitch = semitone_pitch (); - while (notename_i_ >= 7) + while (notename_ >= 7) { - notename_i_ -= 7; - octave_i_++; - alteration_i_ -= semitone_pitch () - pitch; + notename_ -= 7; + octave_++; + alteration_ -= semitone_pitch () - pitch; } - while (notename_i_ < 0) + while (notename_ < 0) { - notename_i_ += 7; - octave_i_--; - alteration_i_ -= semitone_pitch () - pitch; + notename_ += 7; + octave_--; + alteration_ -= semitone_pitch () - pitch; } - while (alteration_i_ >= 3) + while (alteration_ >= 3) { - if (notename_i_ == 6) + if (notename_ == 6) { - notename_i_ = 0; - octave_i_++; + notename_ = 0; + octave_++; } else - notename_i_++; + notename_++; - alteration_i_ = 0; - alteration_i_ -= semitone_pitch () - pitch; + alteration_ = 0; + alteration_ -= semitone_pitch () - pitch; } - while (alteration_i_ <= -3) + while (alteration_ <= -3) { - if (notename_i_ == 0) + if (notename_ == 0) { - notename_i_ = 6; - octave_i_--; + notename_ = 6; + octave_--; } else - notename_i_--; + notename_--; - alteration_i_ = 0; - alteration_i_ -= semitone_pitch () - pitch; + alteration_ = 0; + alteration_ -= semitone_pitch () - pitch; } } @@ -130,12 +130,12 @@ Pitch::transpose (Pitch delta) { int old_semi = semitone_pitch (); int delta_semi = delta.semitone_pitch (); - octave_i_ += delta.octave_i_; - notename_i_ += delta.notename_i_; + octave_ += delta.octave_; + notename_ += delta.notename_; int new_semi = semitone_pitch (); int delta_acc = new_semi - old_semi - delta_semi; - alteration_i_ -= delta_acc; + alteration_ -= delta_acc; normalise (); } @@ -147,24 +147,24 @@ Pitch::transpose (Pitch delta) char const *accname[] = {"eses", "es", "", "is" , "isis"}; String -Pitch::str () const +Pitch::string () const { - int n = (notename_i_ + 2) % 7; - String s = to_str (char (n + 'a')); - if (alteration_i_) - s += String (accname[alteration_i_ + 2]); + int n = (notename_ + 2) % 7; + String s = to_string (char (n + 'a')); + if (alteration_) + s += String (accname[alteration_ + 2]); - if (octave_i_ >= 0) + if (octave_ >= 0) { - int o = octave_i_ + 1; + int o = octave_ + 1; while (o--) s += "'"; } - else if (octave_i_ < 0) + else if (octave_ < 0) { - int o = (-octave_i_) - 1; + int o = (-octave_) - 1; while (o--) - s += to_str (','); + s += to_string (','); } return s; @@ -177,16 +177,16 @@ Pitch::str () const Pitch Pitch::to_relative_octave (Pitch p) { - int oct_mod = octave_i_ + 1; // account for c' = octave 1 iso. 0 4 + int oct_mod = octave_ + 1; // account for c' = octave 1 iso. 0 4 Pitch up_pitch (p); Pitch down_pitch (p); - up_pitch.alteration_i_ = alteration_i_; - down_pitch.alteration_i_ = alteration_i_; + up_pitch.alteration_ = alteration_; + down_pitch.alteration_ = alteration_; Pitch n = *this; - up_pitch.up_to (notename_i_); - down_pitch.down_to (notename_i_); + up_pitch.up_to (notename_); + down_pitch.down_to (notename_); int h = p.steps (); if (abs (up_pitch.steps () - h) < abs (down_pitch.steps () - h)) @@ -194,7 +194,7 @@ Pitch::to_relative_octave (Pitch p) else n = down_pitch; - n.octave_i_ += oct_mod; + n.octave_ += oct_mod; *this = n; return *this; @@ -203,21 +203,21 @@ Pitch::to_relative_octave (Pitch p) void Pitch::up_to (int notename) { - if (notename_i_ > notename) + if (notename_ > notename) { - octave_i_ ++; + octave_ ++; } - notename_i_ = notename; + notename_ = notename; } void Pitch::down_to (int notename) { - if (notename_i_ < notename) + if (notename_ < notename) { - octave_i_ --; + octave_ --; } - notename_i_ = notename; + notename_ = notename; } LY_DEFINE(ly_pitch_transpose, @@ -255,7 +255,7 @@ Pitch::print_smob (SCM s, SCM port, scm_print_state *) Pitch *r = (Pitch *) ly_cdr (s); scm_puts ("#str ().ch_C ()), port); + scm_display (ly_str02scm (r->string ().to_str0 ()), port); scm_puts (" >", port); return 1; @@ -267,9 +267,9 @@ Pitch::equal_p (SCM a , SCM b) Pitch *p = (Pitch *) ly_cdr (a); Pitch *q = (Pitch *) ly_cdr (b); - bool eq = p->notename_i_ == q->notename_i_ - && p->octave_i_ == q->octave_i_ - && p->alteration_i_ == q->alteration_i_; + bool eq = p->notename_ == q->notename_ + && p->octave_ == q->octave_ + && p->alteration_ == q->alteration_; return eq ? SCM_BOOL_T : SCM_BOOL_F; } @@ -301,9 +301,9 @@ flats, or positive for sharps. ") { - SCM_ASSERT_TYPE(gh_number_p(o), o, SCM_ARG1, __FUNCTION__, "number"); - SCM_ASSERT_TYPE(gh_number_p(n), n, SCM_ARG2, __FUNCTION__, "number"); - SCM_ASSERT_TYPE(gh_number_p(a), a, SCM_ARG3, __FUNCTION__, "number"); + SCM_ASSERT_TYPE(gh_number_p (o), o, SCM_ARG1, __FUNCTION__, "number"); + SCM_ASSERT_TYPE(gh_number_p (n), n, SCM_ARG2, __FUNCTION__, "number"); + SCM_ASSERT_TYPE(gh_number_p (a), a, SCM_ARG3, __FUNCTION__, "number"); Pitch p (gh_scm2int (o), gh_scm2int (n), gh_scm2int (a)); return p.smobbed_copy (); @@ -316,7 +316,7 @@ LY_DEFINE(pitch_octave, "pitch-octave", 1, 0, 0, { Pitch *p = unsmob_pitch (pp); SCM_ASSERT_TYPE(p, pp, SCM_ARG1, __FUNCTION__, "Pitch"); - int q = p->octave_i (); + int q = p->get_octave (); return gh_int2scm (q); } @@ -327,7 +327,7 @@ LY_DEFINE(pitch_alteration, "pitch-alteration", 1, 0, 0, { Pitch *p = unsmob_pitch (pp); SCM_ASSERT_TYPE(p, pp, SCM_ARG1, __FUNCTION__, "Pitch"); - int q = p->alteration_i (); + int q = p->get_alteration (); return gh_int2scm (q); } @@ -338,7 +338,7 @@ LY_DEFINE(pitch_notename, "pitch-notename", 1, 0, 0, { Pitch *p = unsmob_pitch (pp); SCM_ASSERT_TYPE(p, pp, SCM_ARG1, __FUNCTION__, "Pitch"); - int q = p->notename_i (); + int q = p->get_notename (); return gh_int2scm (q); } @@ -376,20 +376,20 @@ Pitch::smobbed_copy ()const } int -Pitch::octave_i ()const +Pitch::get_octave ()const { - return octave_i_; + return octave_; } int -Pitch::notename_i () const +Pitch::get_notename () const { - return notename_i_; + return notename_; } int -Pitch::alteration_i () const +Pitch::get_alteration () const { - return alteration_i_; + return alteration_; } diff --git a/lily/porrectus-engraver.cc b/lily/porrectus-engraver.cc index 3219ebe0be..cf1b8962f5 100644 --- a/lily/porrectus-engraver.cc +++ b/lily/porrectus-engraver.cc @@ -46,7 +46,7 @@ public: TRANSLATOR_DECLARATIONS(Porrectus_engraver); protected: - virtual bool try_music (Music *req_l); + virtual bool try_music (Music *req); virtual void process_music (); virtual void process_acknowledged_grobs (); virtual void stop_translation_timestep (); @@ -55,23 +55,23 @@ protected: private: PQueue past_notes_pq_; - Porrectus_req *porrectus_req_l_; + Porrectus_req *porrectus_req_; Array left_heads_; Array right_heads_; - Link_array porrectus_p_arr_; + Link_array porrectuses_; }; Porrectus_engraver::Porrectus_engraver () { - porrectus_req_l_ = 0; + porrectus_req_ = 0; } bool Porrectus_engraver::try_music (Music *m) { - if (Porrectus_req *req_l_ = dynamic_cast (m)) + if (Porrectus_req *req_ = dynamic_cast (m)) { - porrectus_req_l_ = req_l_; + porrectus_req_ = req_; return true; } else @@ -81,30 +81,30 @@ Porrectus_engraver::try_music (Music *m) void Porrectus_engraver::process_music () { - if (porrectus_req_l_) + if (porrectus_req_) { top_engraver ()->forbid_breaks (); } } void -Porrectus_engraver::acknowledge_grob (Grob_info info_l_) +Porrectus_engraver::acknowledge_grob (Grob_info info_) { - if (Rhythmic_head::has_interface (info_l_.grob_l_)) + if (Rhythmic_head::has_interface (info_.grob_)) { - Note_req *note_req_l_ = dynamic_cast (info_l_.music_cause ()); - if (!note_req_l_) + Note_req *note_req_ = dynamic_cast (info_.music_cause ()); + if (!note_req_) return; - right_heads_.push (Grob_pitch_tuple (info_l_.grob_l_, note_req_l_, + right_heads_.push (Grob_pitch_tuple (info_.grob_, note_req_, now_mom () + - note_req_l_->length_mom ())); + note_req_->length_mom ())); } } void Porrectus_engraver::process_acknowledged_grobs () { - if (porrectus_req_l_) + if (porrectus_req_) { left_heads_.sort (Grob_pitch_tuple::pitch_compare); right_heads_.sort (Grob_pitch_tuple::pitch_compare); @@ -113,16 +113,16 @@ Porrectus_engraver::process_acknowledged_grobs () while ((i >= 0) && (j >= 0)) { - Item *left_head = dynamic_cast (left_heads_[i].head_l_); - Item *right_head = dynamic_cast (right_heads_[j].head_l_); + Item *left_head = dynamic_cast (left_heads_[i].head_); + Item *right_head = dynamic_cast (right_heads_[j].head_); left_head->set_grob_property("transparent", gh_bool2scm(true)); right_head->set_grob_property("transparent", gh_bool2scm(true)); - Grob *porrectus_p_ = new Item (get_property ("Porrectus")); - Porrectus::set_left_head(porrectus_p_, left_head); - Porrectus::set_right_head(porrectus_p_, right_head); - porrectus_p_arr_.push (porrectus_p_); - announce_grob(porrectus_p_, porrectus_req_l_->self_scm()); + Grob *porrectus_ = new Item (get_property ("Porrectus")); + Porrectus::set_left_head(porrectus_, left_head); + Porrectus::set_right_head(porrectus_, right_head); + porrectuses_.push (porrectus_); + announce_grob(porrectus_, porrectus_req_->self_scm()); past_notes_pq_. insert (right_heads_[i]); left_heads_.del (i); @@ -142,17 +142,17 @@ Porrectus_engraver::stop_translation_timestep () } right_heads_.clear (); - for (int i = 0; i < porrectus_p_arr_.size (); i++) + for (int i = 0; i < porrectuses_.size (); i++) { - typeset_grob (porrectus_p_arr_[i]); + typeset_grob (porrectuses_[i]); } - porrectus_p_arr_.clear (); + porrectuses_.clear (); } void Porrectus_engraver::start_translation_timestep () { - porrectus_req_l_ = 0; + porrectus_req_ = 0; Moment now = now_mom (); while (past_notes_pq_.size () && past_notes_pq_.front ().end_ < now) past_notes_pq_.delmin (); diff --git a/lily/porrectus.cc b/lily/porrectus.cc index b4947c43b5..8b05d26b76 100644 --- a/lily/porrectus.cc +++ b/lily/porrectus.cc @@ -128,7 +128,7 @@ Porrectus::brew_molecule (SCM smob) if (auto_properties) // determine add_stem and stem_direction automatically from durations { - if (String::compare_i (style, "mensural") != 0) + if (String::compare (style, "mensural") != 0) me->warning (String("auto-property should be used for\r\n") + String("mensural style porrectus only; trying anyway")); @@ -165,8 +165,8 @@ Porrectus::brew_molecule (SCM smob) } } - Real left_position_f = Staff_symbol_referencer::position_f (left_head); - Real right_position_f = Staff_symbol_referencer::position_f (right_head); + Real left_position_f = Staff_symbol_referencer::get_position (left_head); + Real right_position_f = Staff_symbol_referencer::get_position (right_head); Real interval = right_position_f - left_position_f; Molecule molecule; @@ -182,7 +182,7 @@ Porrectus::brew_molecule (SCM smob) line_thickness = 1.0; } Real thickness = - line_thickness * me->paper_l ()->get_var ("linethickness"); + line_thickness * me->get_paper ()->get_var ("linethickness"); SCM porrectus_width_scm = me->get_grob_property ("width"); Real porrectus_width; @@ -196,11 +196,11 @@ Porrectus::brew_molecule (SCM smob) } Real width = porrectus_width * Staff_symbol_referencer::staff_space (me); - if (String::compare_i (style, "vaticana") == 0) + if (String::compare (style, "vaticana") == 0) molecule = brew_vaticana_molecule (me, interval, solid, width, thickness, add_stem, stem_direction); - else if (String::compare_i (style, "mensural") == 0) + else if (String::compare (style, "mensural") == 0) molecule = brew_mensural_molecule (me, interval, solid, width, thickness, add_stem, stem_direction); diff --git a/lily/property-iterator.cc b/lily/property-iterator.cc index 7b2dddb1da..480b506858 100644 --- a/lily/property-iterator.cc +++ b/lily/property-iterator.cc @@ -21,15 +21,15 @@ bool check_grob(Music *mus, SCM sym); void Property_iterator::process (Moment m) { - SCM sym = music_l ()->get_mus_property ("symbol"); + SCM sym = get_music ()->get_mus_property ("symbol"); if (gh_symbol_p (sym)) { - SCM val = music_l ()->get_mus_property ("value"); + SCM val = get_music ()->get_mus_property ("value"); bool ok= true; if (val != SCM_EOL) ok = type_check_assignment (sym, val, ly_symbol2scm ("translation-type?")); if (ok) - report_to_l ()->internal_set_property (sym, val); + report_to ()->internal_set_property (sym, val); } Simple_music_iterator::process (m); } @@ -37,9 +37,9 @@ Property_iterator::process (Moment m) void Property_unset_iterator::process (Moment m) { - SCM sym = music_l ()->get_mus_property ("symbol"); + SCM sym = get_music ()->get_mus_property ("symbol"); type_check_assignment (sym, SCM_EOL, ly_symbol2scm ("translation-type?")); - report_to_l ()->unset_property (sym); + report_to ()->unset_property (sym); Simple_music_iterator::process (m); } @@ -56,8 +56,8 @@ check_grob(Music *mus, SCM sym) } - SCM type_p = scm_object_property (sym, ly_symbol2scm ("translation-type?")); - bool ok = type_p == list_p; + SCM type = scm_object_property (sym, ly_symbol2scm ("translation-type?")); + bool ok = type == list_p; if (!ok) { @@ -69,17 +69,17 @@ check_grob(Music *mus, SCM sym) void Push_property_iterator::process (Moment m) { - SCM sym = music_l ()->get_mus_property ("symbol"); - if (check_grob (music_l (), sym)) + SCM sym = get_music ()->get_mus_property ("symbol"); + if (check_grob (get_music (), sym)) { - SCM eprop = music_l ()->get_mus_property ("grob-property"); - SCM val = music_l ()->get_mus_property ("grob-value"); + SCM eprop = get_music ()->get_mus_property ("grob-property"); + SCM val = get_music ()->get_mus_property ("grob-value"); - if (to_boolean (music_l ()->get_mus_property ("pop-first"))) - Translator_def::apply_pushpop_property (report_to_l (), + if (to_boolean (get_music ()->get_mus_property ("pop-first"))) + Translator_def::apply_pushpop_property (report_to (), sym, eprop, SCM_UNDEFINED); - Translator_def::apply_pushpop_property (report_to_l (), sym, eprop, val); + Translator_def::apply_pushpop_property (report_to (), sym, eprop, val); } Simple_music_iterator::process (m); } @@ -87,11 +87,11 @@ Push_property_iterator::process (Moment m) void Pop_property_iterator::process (Moment m) { - SCM sym = music_l ()->get_mus_property ("symbol"); - if (check_grob (music_l (), sym)) + SCM sym = get_music ()->get_mus_property ("symbol"); + if (check_grob (get_music (), sym)) { - SCM eprop = music_l ()->get_mus_property ("grob-property"); - Translator_def::apply_pushpop_property (report_to_l (), sym, eprop, SCM_UNDEFINED); + SCM eprop = get_music ()->get_mus_property ("grob-property"); + Translator_def::apply_pushpop_property (report_to (), sym, eprop, SCM_UNDEFINED); } Simple_music_iterator::process (m); } diff --git a/lily/repeat-acknowledge-engraver.cc b/lily/repeat-acknowledge-engraver.cc index a62d7a37d1..8a95a7ba32 100644 --- a/lily/repeat-acknowledge-engraver.cc +++ b/lily/repeat-acknowledge-engraver.cc @@ -38,7 +38,7 @@ void Repeat_acknowledge_engraver::initialize () { first_b_ = true; - daddy_trans_l_->set_property ("repeatCommands", SCM_EOL); + daddy_trans_->set_property ("repeatCommands", SCM_EOL); } @@ -50,9 +50,9 @@ void Repeat_acknowledge_engraver::start_translation_timestep () { first_b_ = true; - Translator_group * tr = daddy_trans_l_->where_defined (ly_symbol2scm ("repeatCommands")); + Translator_group * tr = daddy_trans_->where_defined (ly_symbol2scm ("repeatCommands")); if (!tr) - tr = daddy_trans_l_; + tr = daddy_trans_; tr->set_property ("repeatCommands", SCM_EOL); } @@ -105,7 +105,7 @@ Repeat_acknowledge_engraver::process_music () { if (s != "" || (volta_found && !gh_string_p (wb))) { - daddy_trans_l_->set_property ("whichBar", ly_str02scm (s.ch_C ())); + daddy_trans_->set_property ("whichBar", ly_str02scm (s.to_str0 ())); } } } diff --git a/lily/request-chord-iterator.cc b/lily/request-chord-iterator.cc index f70602fdfb..009302da5d 100644 --- a/lily/request-chord-iterator.cc +++ b/lily/request-chord-iterator.cc @@ -22,27 +22,27 @@ Request_chord_iterator::Request_chord_iterator (Request_chord_iterator const &sr } Translator_group* -Request_chord_iterator::get_req_translator_l () +Request_chord_iterator::get_req_translator () { - assert (report_to_l ()); - if (report_to_l ()->is_bottom_translator_b ()) - return report_to_l (); + assert (report_to ()); + if (report_to ()->is_bottom_translator_b ()) + return report_to (); - set_translator (report_to_l ()->get_default_interpreter ()); - return report_to_l (); + set_translator (report_to ()->get_default_interpreter ()); + return report_to (); } void Request_chord_iterator::construct_children () { Simple_music_iterator::construct_children (); - get_req_translator_l (); + get_req_translator (); } Request_chord* -Request_chord_iterator::elt_l () const +Request_chord_iterator::get_elt () const { - return (Request_chord*) music_l (); + return (Request_chord*) get_music (); } SCM @@ -51,7 +51,7 @@ Request_chord_iterator::get_pending_events (Moment) const SCM s = SCM_EOL; if (last_processed_mom_ < Moment (0)) { - Music_sequence * ms = dynamic_cast (music_l ()); + Music_sequence * ms = dynamic_cast (get_music ()); for (SCM m = ms->music_list (); gh_pair_p (m); m = ly_cdr (m)) { @@ -66,7 +66,7 @@ Request_chord_iterator::process (Moment m) { if (last_processed_mom_ < Moment (0)) { - for (SCM s = dynamic_cast (music_l ())->music_list (); + for (SCM s = dynamic_cast (get_music ())->music_list (); gh_pair_p (s); s = ly_cdr (s)) { Music *mus = unsmob_music (ly_car (s)); diff --git a/lily/rest-collision-engraver.cc b/lily/rest-collision-engraver.cc index fc1e71e383..b5aaa7722e 100644 --- a/lily/rest-collision-engraver.cc +++ b/lily/rest-collision-engraver.cc @@ -14,9 +14,9 @@ class Rest_collision_engraver : public Engraver { - Item* rest_collision_p_; + Item* rest_collision_; - Link_array note_column_l_arr_; + Link_array note_columns_; protected: virtual void acknowledge_grob (Grob_info); virtual void process_acknowledged_grobs (); @@ -29,38 +29,38 @@ public: Rest_collision_engraver::Rest_collision_engraver () { - rest_collision_p_ =0; + rest_collision_ =0; } void Rest_collision_engraver::process_acknowledged_grobs () { - if (rest_collision_p_ || note_column_l_arr_.size () < 2) + if (rest_collision_ || note_columns_.size () < 2) return; - rest_collision_p_ = new Item (get_property ("RestCollision")); + rest_collision_ = new Item (get_property ("RestCollision")); - announce_grob(rest_collision_p_, SCM_EOL); - for (int i=0; i< note_column_l_arr_.size (); i++) - Rest_collision::add_column (rest_collision_p_,note_column_l_arr_[i]); + announce_grob(rest_collision_, SCM_EOL); + for (int i=0; i< note_columns_.size (); i++) + Rest_collision::add_column (rest_collision_,note_columns_[i]); } void Rest_collision_engraver::acknowledge_grob (Grob_info i) { - if (Note_column::has_interface (i.grob_l_)) - note_column_l_arr_.push (i.grob_l_); + if (Note_column::has_interface (i.grob_)) + note_columns_.push (i.grob_); } void Rest_collision_engraver::stop_translation_timestep () { - if (rest_collision_p_) + if (rest_collision_) { - typeset_grob (rest_collision_p_); - rest_collision_p_ = 0; + typeset_grob (rest_collision_); + rest_collision_ = 0; } - note_column_l_arr_.clear (); + note_columns_.clear (); } ENTER_DESCRIPTION(Rest_collision_engraver, /* descr */ "Handles collisions of rests.", diff --git a/lily/rest-engraver.cc b/lily/rest-engraver.cc index 2bb3506c49..96d1698249 100644 --- a/lily/rest-engraver.cc +++ b/lily/rest-engraver.cc @@ -15,9 +15,9 @@ class Rest_engraver : public Engraver { - Rest_req *rest_req_l_; - Item * dot_p_; - Grob* rest_p_; + Rest_req *rest_req_; + Item * dot_; + Grob* rest_; protected: virtual bool try_music (Music *); virtual void stop_translation_timestep (); @@ -34,59 +34,59 @@ public: */ Rest_engraver::Rest_engraver () { - rest_req_l_ =0; - rest_p_ =0; - dot_p_ =0; + rest_req_ =0; + rest_ =0; + dot_ =0; } void Rest_engraver::start_translation_timestep () { - rest_req_l_ =0; + rest_req_ =0; } void Rest_engraver::stop_translation_timestep () { - if (rest_p_) + if (rest_) { - typeset_grob (rest_p_); - rest_p_ =0; + typeset_grob (rest_); + rest_ =0; } - if (dot_p_) + if (dot_) { - typeset_grob (dot_p_); - dot_p_ =0; + typeset_grob (dot_); + dot_ =0; } } void Rest_engraver::process_music () { - if (rest_req_l_ && !rest_p_) + if (rest_req_ && !rest_) { - rest_p_ = new Item (get_property ("Rest")); + rest_ = new Item (get_property ("Rest")); - int durlog = unsmob_duration (rest_req_l_->get_mus_property ("duration"))-> duration_log (); + int durlog = unsmob_duration (rest_req_->get_mus_property ("duration"))-> duration_log (); - rest_p_->set_grob_property ("duration-log", + rest_->set_grob_property ("duration-log", gh_int2scm (durlog)); - int dots =unsmob_duration (rest_req_l_->get_mus_property ("duration"))->dot_count (); + int dots =unsmob_duration (rest_req_->get_mus_property ("duration"))->dot_count (); if (dots) { - dot_p_ = new Item (get_property ("Dots")); + dot_ = new Item (get_property ("Dots")); - Rhythmic_head::set_dots (rest_p_, dot_p_); - dot_p_->set_parent (rest_p_, Y_AXIS); - dot_p_->set_grob_property ("dot-count", gh_int2scm (dots)); - announce_grob (dot_p_, SCM_EOL); + Rhythmic_head::set_dots (rest_, dot_); + dot_->set_parent (rest_, Y_AXIS); + dot_->set_grob_property ("dot-count", gh_int2scm (dots)); + announce_grob (dot_, SCM_EOL); } - Pitch *p = unsmob_pitch (rest_req_l_->get_mus_property ("pitch")); + Pitch *p = unsmob_pitch (rest_req_->get_mus_property ("pitch")); /* This is ridiculous -- rests don't have pitch, but we act as if @@ -99,10 +99,10 @@ Rest_engraver::process_music () if (gh_number_p (c0)) pos += gh_scm2int (c0); - rest_p_->set_grob_property ("staff-position", gh_int2scm (pos)); + rest_->set_grob_property ("staff-position", gh_int2scm (pos)); } - announce_grob(rest_p_, rest_req_l_->self_scm()); + announce_grob(rest_, rest_req_->self_scm()); } } @@ -111,7 +111,7 @@ Rest_engraver::try_music (Music *m) { if (Rest_req *r = dynamic_cast (m)) { - rest_req_l_ = r; + rest_req_ = r; return true; } return false; diff --git a/lily/rest.cc b/lily/rest.cc index 953fcf5449..7375e107f5 100644 --- a/lily/rest.cc +++ b/lily/rest.cc @@ -48,7 +48,7 @@ Rest::glyph_name (Grob * me, int balltype, String style) if (balltype == 0 || balltype == 1) { Real rad = Staff_symbol_referencer::staff_radius (me) * 2.0; - Real pos = Staff_symbol_referencer::position_f (me); + Real pos = Staff_symbol_referencer::get_position (me); /* Figure out when the rest is far enough outside the staff. This @@ -61,7 +61,7 @@ Rest::glyph_name (Grob * me, int balltype, String style) (pos <= -rad -2 || pos > rad)); } - return ("rests-") + to_str (balltype) + return ("rests-") + to_string (balltype) + (ledger_b ? "o" : "") + style; } diff --git a/lily/rhythmic-column-engraver.cc b/lily/rhythmic-column-engraver.cc index bb62742443..7099ecae8b 100644 --- a/lily/rhythmic-column-engraver.cc +++ b/lily/rhythmic-column-engraver.cc @@ -47,10 +47,10 @@ class Rhythmic_column_engraver :public Engraver { - Link_array rhead_l_arr_; - Grob * stem_l_; + Link_array rheads_; + Grob * stem_; Grob * note_column_; - Grob * dotcol_l_; + Grob * dotcol_; Grob * last_spacing_; Grob * spacing_; @@ -71,16 +71,16 @@ Rhythmic_column_engraver::Rhythmic_column_engraver () spacing_ =0 ; last_spacing_ = 0; - stem_l_ =0; + stem_ =0; note_column_=0; - dotcol_l_ =0; + dotcol_ =0; } void Rhythmic_column_engraver::process_acknowledged_grobs () { - if (rhead_l_arr_.size ()) + if (rheads_.size ()) { if (!note_column_) { @@ -101,28 +101,28 @@ Rhythmic_column_engraver::process_acknowledged_grobs () } - for (int i=0; i < rhead_l_arr_.size (); i++) + for (int i=0; i < rheads_.size (); i++) { - if (!rhead_l_arr_[i]->get_parent (X_AXIS)) - Note_column::add_head (note_column_, rhead_l_arr_[i]); + if (!rheads_[i]->get_parent (X_AXIS)) + Note_column::add_head (note_column_, rheads_[i]); } - rhead_l_arr_.set_size (0); + rheads_.set_size (0); } if (note_column_) { - if (dotcol_l_ - && !dotcol_l_->get_parent (X_AXIS)) + if (dotcol_ + && !dotcol_->get_parent (X_AXIS)) { - Note_column::set_dotcol (note_column_, dotcol_l_); + Note_column::set_dotcol (note_column_, dotcol_); } - if (stem_l_ - && !stem_l_->get_parent (X_AXIS)) + if (stem_ + && !stem_->get_parent (X_AXIS)) { - Note_column::set_stem (note_column_, stem_l_); - stem_l_ = 0; + Note_column::set_stem (note_column_, stem_); + stem_ = 0; } } @@ -131,20 +131,20 @@ Rhythmic_column_engraver::process_acknowledged_grobs () void Rhythmic_column_engraver::acknowledge_grob (Grob_info i) { - Item * item = dynamic_cast (i.grob_l_); + Item * item = dynamic_cast (i.grob_); if (!item || item->get_parent (X_AXIS)) return ; if (Stem::has_interface (item)) { - stem_l_ = item; + stem_ = item; } else if (Rhythmic_head::has_interface (item)) { - rhead_l_arr_.push (item); + rheads_.push (item); } else if (Dot_column::has_interface (item)) { - dotcol_l_ = item; + dotcol_ = item; } } @@ -168,8 +168,8 @@ Rhythmic_column_engraver::stop_translation_timestep () void Rhythmic_column_engraver::start_translation_timestep () { - dotcol_l_ =0; - stem_l_ =0; + dotcol_ =0; + stem_ =0; } diff --git a/lily/rhythmic-head.cc b/lily/rhythmic-head.cc index 18f341cebc..a2a17bf62e 100644 --- a/lily/rhythmic-head.cc +++ b/lily/rhythmic-head.cc @@ -15,14 +15,14 @@ Item* -Rhythmic_head::dots_l (Grob*me) +Rhythmic_head::get_dots (Grob*me) { SCM s = me->get_grob_property ("dot"); return unsmob_item (s); } Item* -Rhythmic_head::stem_l (Grob*me) +Rhythmic_head::get_stem (Grob*me) { SCM s = me->get_grob_property ("stem"); return unsmob_item (s); @@ -31,14 +31,14 @@ Rhythmic_head::stem_l (Grob*me) int Rhythmic_head::dot_count (Grob*me) { - return dots_l (me) - ? gh_scm2int (dots_l (me)->get_grob_property ("dot-count")) : 0; + return get_dots (me) + ? gh_scm2int (get_dots (me)->get_grob_property ("dot-count")) : 0; } void -Rhythmic_head::set_dots (Grob*me,Item *dot_l) +Rhythmic_head::set_dots (Grob*me,Item *dot) { - me->set_grob_property ("dot", dot_l->self_scm ()); + me->set_grob_property ("dot", dot->self_scm ()); } diff --git a/lily/rod.cc b/lily/rod.cc index 14f710ff4b..78ac26b05c 100644 --- a/lily/rod.cc +++ b/lily/rod.cc @@ -14,7 +14,7 @@ Rod::Rod () { - distance_f_ = 0.0; + distance_ = 0.0; item_l_drul_[LEFT] = item_l_drul_[RIGHT] =0; } @@ -25,8 +25,8 @@ Rod::columnize () { Direction d = LEFT; do { - Paper_column * pc = item_l_drul_[d]->column_l (); - distance_f_ += - d * item_l_drul_[d]->relative_coordinate (pc, X_AXIS); + Paper_column * pc = item_l_drul_[d]->get_column (); + distance_ += - d * item_l_drul_[d]->relative_coordinate (pc, X_AXIS); item_l_drul_[d] = pc; } while ((flip (&d))!=LEFT); @@ -39,6 +39,6 @@ Rod::add_to_cols () if (item_l_drul_[LEFT] != item_l_drul_[RIGHT]) Spaceable_grob::add_rod (item_l_drul_[LEFT], item_l_drul_[RIGHT], - distance_f_); + distance_); } diff --git a/lily/scaled-font-metric.cc b/lily/scaled-font-metric.cc index d911d26e2b..be07d25d8d 100644 --- a/lily/scaled-font-metric.cc +++ b/lily/scaled-font-metric.cc @@ -14,12 +14,12 @@ Scaled_font_metric::Scaled_font_metric (Font_metric* m, Real magn) { - magnification_f_ = magn; + magnification_ = magn; SCM desc = m->description_; Real total_mag = magn * gh_scm2double (ly_cdr (desc)); description_ = gh_cons (ly_car (desc), gh_double2scm (total_mag)); - orig_l_ = m; + orig_ = m; } SCM @@ -32,9 +32,9 @@ Scaled_font_metric::make_scaled_font_metric (Font_metric*m, Real s) Molecule Scaled_font_metric::find_by_name (String s) const { - Molecule m = orig_l_->find_by_name (s); + Molecule m = orig_->find_by_name (s); Box b = m.extent_box (); - b.scale (magnification_f_); + b.scale (magnification_); Molecule q (b,fontify_atom ((Font_metric*) this, m.get_expr ())); return q ; @@ -43,22 +43,22 @@ Scaled_font_metric::find_by_name (String s) const Box Scaled_font_metric::get_char (int i) const { - Box b = orig_l_->get_char (i); - b.scale (magnification_f_); + Box b = orig_->get_char (i); + b.scale (magnification_); return b; } Box Scaled_font_metric::text_dimension (String t) const { - Box b (orig_l_->text_dimension (t)); + Box b (orig_->text_dimension (t)); - b.scale (magnification_f_); + b.scale (magnification_); return b; } int Scaled_font_metric::count () const { - return orig_l_->count (); + return orig_->count (); } diff --git a/lily/scm-option.cc b/lily/scm-option.cc index 504c6089f0..49e917e2a2 100644 --- a/lily/scm-option.cc +++ b/lily/scm-option.cc @@ -83,7 +83,7 @@ variables. Usage: (set-lily-option SYMBOL VAL) possible options for SYMBOL are : -").ch_C()<< std::endl; +").to_str0 ()<< std::endl; std::cout << " help (any-symbol)"<< std::endl; std::cout << " internal-type-checking (boolean)"<< std::endl; diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 6afab4d7dd..66b95a2518 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -29,10 +29,10 @@ Score_engraver::Score_engraver () { system_ =0; - command_column_l_ =0; - musical_column_l_ =0; - breaks_i_ =0; - pscore_p_ = 0; + command_column_ =0; + musical_column_ =0; + breaks_ =0; + pscore_ = 0; } void @@ -41,19 +41,19 @@ Score_engraver::make_columns () /* ugh. */ - if (!command_column_l_) + if (!command_column_) { set_columns (new Paper_column (get_property ("NonMusicalPaperColumn")), new Paper_column (get_property ("PaperColumn"))); - command_column_l_->set_grob_property ("breakable", SCM_BOOL_T); + command_column_->set_grob_property ("breakable", SCM_BOOL_T); - Grob_info i1 (command_column_l_); - i1.origin_trans_l_ = this; + Grob_info i1 (command_column_); + i1.origin_trans_ = this; - Grob_info i2 (musical_column_l_); - i2.origin_trans_l_ = this; + Grob_info i2 (musical_column_); + i2.origin_trans_ = this; announce_grob (i1); @@ -73,8 +73,8 @@ Score_engraver::prepare (Moment w) */ make_columns (); - command_column_l_->set_grob_property ("when", now_mom_.smobbed_copy ()); - musical_column_l_->set_grob_property ("when", now_mom_.smobbed_copy ()); + command_column_->set_grob_property ("when", now_mom_.smobbed_copy ()); + musical_column_->set_grob_property ("when", now_mom_.smobbed_copy ()); Translator_group::start_translation_timestep(); @@ -83,8 +83,8 @@ Score_engraver::prepare (Moment w) void Score_engraver::finish () { - if ((breaks_i_%8)) - progress_indication ("[" + to_str (breaks_i_) + "]"); + if ((breaks_%8)) + progress_indication ("[" + to_string (breaks_) + "]"); check_removal (); removal_processing (); @@ -98,25 +98,25 @@ void Score_engraver::initialize () { Font_metric *fm = - all_fonts_global_p->find_afm("feta20"); + all_fonts_global->find_afm("feta20"); if (!fm) error (_("Could not find feta20.afm. Fonts have not been installed properly; Aborting")); unsmob_translator_def (definition_)->apply_property_operations (this); - assert (dynamic_cast (output_def_l_)); - assert (!daddy_trans_l_); - pscore_p_ = new Paper_score; - pscore_p_->paper_l_ = dynamic_cast (output_def_l_); + assert (dynamic_cast (output_def_)); + assert (!daddy_trans_); + pscore_ = new Paper_score; + pscore_->paper_ = dynamic_cast (output_def_); SCM props = get_property ("System"); - pscore_p_->typeset_line (new System (props)); + pscore_->typeset_line (new System (props)); make_columns (); - system_ = pscore_p_->system_; - system_->set_bound (LEFT, command_column_l_); - command_column_l_->set_grob_property ("breakable", SCM_BOOL_T); + system_ = pscore_->system_; + system_->set_bound (LEFT, command_column_); + command_column_->set_grob_property ("breakable", SCM_BOOL_T); Engraver_group_engraver::initialize (); } @@ -148,9 +148,9 @@ Score_engraver::one_time_step () check_removal (); - for (int i = announce_info_arr_.size(); i--;) + for (int i = announce_infos_.size(); i--;) { - Grob *g = announce_info_arr_[i].grob_l_; + Grob *g = announce_infos_[i].grob_; if (!dynamic_cast (g)) // ugh. { @@ -160,34 +160,34 @@ Score_engraver::one_time_step () g->programming_error (msg); } } - announce_info_arr_.clear (); + announce_infos_.clear (); } void Score_engraver::announce_grob (Grob_info info) { - announce_info_arr_.push (info); - pscore_p_->system_->typeset_grob (info.grob_l_); + announce_infos_.push (info); + pscore_->system_->typeset_grob (info.grob_); } void -Score_engraver::typeset_grob (Grob *elem_p) +Score_engraver::typeset_grob (Grob *elem) { - if (!elem_p) + if (!elem) programming_error ("Score_engraver: empty elt\n"); else - elem_p_arr_.push (elem_p); + elems_.push (elem); } void Score_engraver::typeset_all () { - for (int i =0; i < elem_p_arr_.size (); i++) + for (int i =0; i < elems_.size (); i++) { - Grob * elem_p = elem_p_arr_[i]; + Grob * elem = elems_[i]; - if (Spanner *s = dynamic_cast (elem_p)) + if (Spanner *s = dynamic_cast (elem)) { /* do something sensible if spanner not @@ -197,14 +197,14 @@ Score_engraver::typeset_all () do { if (!s->get_bound (d)) { - s->set_bound (d, command_column_l_); + s->set_bound (d, command_column_); /* don't warn for empty/suicided spanners, it makes real warningsinvisible. maybe should be junked earlier? */ - if (!elem_p->live()) + if (!elem->live()) ; // gdb hook else - elem_p->warning (_f ("unbound spanner `%s'", s->name ().ch_C ())); + elem->warning (_f ("unbound spanner `%s'", s->name ().to_str0 ())); } } while (flip (&d) != LEFT); @@ -214,17 +214,17 @@ Score_engraver::typeset_all () } else { - if (!elem_p->get_parent (X_AXIS)) + if (!elem->get_parent (X_AXIS)) { - bool br = to_boolean (elem_p->get_grob_property ("breakable")); - Axis_group_interface::add_element (br ? command_column_l_ : musical_column_l_, elem_p); + bool br = to_boolean (elem->get_grob_property ("breakable")); + Axis_group_interface::add_element (br ? command_column_ : musical_column_, elem); } } - if (!elem_p->get_parent (Y_AXIS)) - Axis_group_interface::add_element (system_, elem_p); + if (!elem->get_parent (Y_AXIS)) + Axis_group_interface::add_element (system_, elem); } - elem_p_arr_.clear (); + elems_.clear (); } void @@ -234,45 +234,45 @@ Score_engraver::stop_translation_timestep () Engraver_group_engraver::stop_translation_timestep (); typeset_all (); - if (to_boolean (command_column_l_->get_grob_property ("breakable"))) + if (to_boolean (command_column_->get_grob_property ("breakable"))) { - breaks_i_ ++; - if (! (breaks_i_%8)) - progress_indication ("[" + to_str (breaks_i_) + "]"); + breaks_ ++; + if (! (breaks_%8)) + progress_indication ("[" + to_string (breaks_) + "]"); } - system_->add_column (command_column_l_); - system_->add_column (musical_column_l_); + system_->add_column (command_column_); + system_->add_column (musical_column_); - command_column_l_ = 0; - musical_column_l_ = 0; + command_column_ = 0; + musical_column_ = 0; } void -Score_engraver::set_columns (Paper_column *new_command_l, - Paper_column *new_musical_l) +Score_engraver::set_columns (Paper_column *new_command, + Paper_column *new_musical) { - assert (!command_column_l_ && !musical_column_l_); + assert (!command_column_ && !musical_column_); - command_column_l_ = new_command_l; - musical_column_l_ = new_musical_l; - if (new_command_l) + command_column_ = new_command; + musical_column_ = new_musical; + if (new_command) { - set_property ("currentCommandColumn", new_command_l->self_scm ()); + set_property ("currentCommandColumn", new_command->self_scm ()); } - if (new_musical_l) + if (new_musical) { - set_property ("currentMusicalColumn", new_musical_l->self_scm ()); + set_property ("currentMusicalColumn", new_musical->self_scm ()); } } Music_output* -Score_engraver::get_output_p () +Score_engraver::get_output () { - Music_output * o = pscore_p_; - pscore_p_=0; + Music_output * o = pscore_; + pscore_=0; return o; } @@ -288,7 +288,7 @@ Score_engraver::try_music (Music*r) gotcha = true; - SCM pen = command_column_l_->get_grob_property ("penalty"); + SCM pen = command_column_->get_grob_property ("penalty"); Real total_penalty = gh_number_p (pen) ? gh_scm2double (pen) : 0.0; @@ -300,7 +300,7 @@ Score_engraver::try_music (Music*r) if (total_penalty > 10000.0) // ugh. arbitrary. forbid_breaks (); - command_column_l_->set_grob_property ("penalty", + command_column_->set_grob_property ("penalty", gh_double2scm (total_penalty)); } } @@ -316,24 +316,24 @@ Score_engraver::forbid_breaks () /* result is junked. */ - if (command_column_l_) - command_column_l_->remove_grob_property ("breakable"); + if (command_column_) + command_column_->remove_grob_property ("breakable"); } void Score_engraver::acknowledge_grob (Grob_info gi) { - if (Staff_spacing::has_interface (gi.grob_l_)) + if (Staff_spacing::has_interface (gi.grob_)) { - Pointer_group_interface::add_grob (command_column_l_, + Pointer_group_interface::add_grob (command_column_, ly_symbol2scm ("spacing-wishes"), - gi.grob_l_); + gi.grob_); } - if (Note_spacing::has_interface (gi.grob_l_)) + if (Note_spacing::has_interface (gi.grob_)) { - Pointer_group_interface::add_grob (musical_column_l_, + Pointer_group_interface::add_grob (musical_column_, ly_symbol2scm ("spacing-wishes"), - gi.grob_l_); + gi.grob_); } } diff --git a/lily/score-performer.cc b/lily/score-performer.cc index d79efd76fc..04262d3b8a 100644 --- a/lily/score-performer.cc +++ b/lily/score-performer.cc @@ -28,7 +28,7 @@ ENTER_DESCRIPTION(Score_performer, Score_performer::Score_performer () { - performance_p_ = 0; + performance_ = 0; } @@ -41,23 +41,23 @@ Score_performer::play_element (Audio_element * p) { if (Audio_item * i=dynamic_cast (p)) { - audio_column_l_->add_audio_item (i); + audio_column_->add_audio_item (i); } - performance_p_->add_element (p); + performance_->add_element (p); } void Score_performer::announce_element (Audio_element_info info) { - announce_info_arr_.push (info); + announce_infos_.push (info); /* huh? copied from score-engraver, but this way staff gets in list twice - if (Audio_item* i = dynamic_cast (info.elem_l_)) - performance_p_->add_element (i); + if (Audio_item* i = dynamic_cast (info.elem_)) + performance_->add_element (i); */ } @@ -65,8 +65,8 @@ void Score_performer::prepare (Moment m) { Global_translator::prepare (m); - audio_column_l_ = new Audio_column (m); - play_element (audio_column_l_); + audio_column_ = new Audio_column (m); + play_element (audio_column_); start_translation_timestep (); } @@ -88,9 +88,9 @@ Score_performer::start () int -Score_performer::get_tempo_i () const +Score_performer::get_tempo () const { - return performance_p_->midi_l_->get_tempo_i (Moment (Rational (1, 4))); + return performance_->midi_->get_tempo (Moment (Rational (1, 4))); } void @@ -101,10 +101,10 @@ Score_performer::finish () } Music_output * -Score_performer::get_output_p () +Score_performer::get_output () { - Music_output * o = performance_p_; - performance_p_ =0; + Music_output * o = performance_; + performance_ =0; return o; } @@ -112,9 +112,9 @@ void Score_performer::initialize () { unsmob_translator_def (definition_)->apply_property_operations (this); - assert (dynamic_cast (output_def_l_)); - performance_p_ = new Performance; - performance_p_->midi_l_ = dynamic_cast (output_def_l_); + assert (dynamic_cast (output_def_)); + performance_ = new Performance; + performance_->midi_ = dynamic_cast (output_def_); Translator_group::initialize (); } diff --git a/lily/score.cc b/lily/score.cc index 94a3a25298..4f203c8033 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -29,9 +29,9 @@ Score::Score () : Input () { - header_p_ = 0; + header_ = 0; music_ = SCM_EOL; - errorlevel_i_ = 0; + errorlevel_ = 0; smobify_self (); } @@ -46,21 +46,21 @@ Score::Score (Score const &s) : Input (s) { music_ = SCM_EOL; - header_p_ = 0; + header_ = 0; smobify_self (); Music * m =unsmob_music (s.music_); music_ = m?m->clone ()->self_scm () : SCM_EOL; scm_gc_unprotect_object (music_); - for (int i=0; i < s.def_p_arr_.size (); i++) - def_p_arr_.push (s.def_p_arr_[i]->clone ()); - errorlevel_i_ = s.errorlevel_i_; - if (s.header_p_) + for (int i=0; i < s.defs_.size (); i++) + defs_.push (s.defs_[i]->clone ()); + errorlevel_ = s.errorlevel_; + if (s.header_) { - header_p_ = (s.header_p_) ? new Scheme_hash_table (*s.header_p_): 0; + header_ = (s.header_) ? new Scheme_hash_table (*s.header_): 0; - scm_gc_unprotect_object (header_p_->self_scm ()); + scm_gc_unprotect_object (header_->self_scm ()); } } @@ -80,7 +80,7 @@ Score::~Score () #endif void -Score::run_translator (Music_output_def *odef_l) +Score::run_translator (Music_output_def *odef) { @@ -101,8 +101,8 @@ Score::run_translator (Music_output_def *odef_l) store_locations_global_b = (gh_eval_str ("point-and-click") != SCM_BOOL_F); Cpu_timer timer; - Global_translator * trans_p = odef_l->get_global_translator_p (); - if (!trans_p) + Global_translator * trans = odef->get_global_translator (); + if (!trans) { programming_error ("no toplevel translator"); return ; @@ -110,10 +110,10 @@ Score::run_translator (Music_output_def *odef_l) progress_indication (_ ("Interpreting music...")); Music * music = unsmob_music (music_); - trans_p->final_mom_ = music->length_mom (); + trans->final_mom_ = music->length_mom (); - Music_iterator * iter = Music_iterator::static_get_iterator_p (music); - iter->init_translator (music, trans_p); + Music_iterator * iter = Music_iterator::get_static_get_iterator (music); + iter->init_translator (music, trans); iter->construct_children (); @@ -121,32 +121,32 @@ Score::run_translator (Music_output_def *odef_l) { delete iter; warning (_ ("Need music in a score")); - errorlevel_i_ =1; + errorlevel_ =1; return ; } - trans_p->start (); - trans_p->run_iterator_on_me (iter); + trans->start (); + trans->run_iterator_on_me (iter); delete iter; - trans_p->finish (); + trans->finish (); - if (errorlevel_i_) + if (errorlevel_) { // should we? hampers debugging. warning (_ ("Errors found/*, not processing score*/")); } - Music_output * output = trans_p->get_output_p (); - scm_gc_unprotect_object (trans_p->self_scm ()); + Music_output * output = trans->get_output (); + scm_gc_unprotect_object (trans->self_scm ()); if (verbose_global_b) progress_indication (_f ("elapsed time: %.2f seconds", timer.read ())); - if (!header_p_) - header_p_ = new Scheme_hash_table; // ugh + if (!header_) + header_ = new Scheme_hash_table; // ugh - output->header_l_ = header_p_; - output->origin_str_ = location_str (); + output->header_ = header_; + output->origin_string_ = location_string (); progress_indication ("\n"); output->process (); @@ -167,12 +167,12 @@ Score::process () return; - for (int i=0; i < def_p_arr_.size (); i++) + for (int i=0; i < defs_.size (); i++) { if (no_paper_global_b - && dynamic_cast (def_p_arr_[i])) + && dynamic_cast (defs_[i])) continue; - run_translator (def_p_arr_[i]); + run_translator (defs_[i]); } } @@ -180,9 +180,9 @@ Score::process () void -Score::add_output (Music_output_def *pap_p) +Score::add_output (Music_output_def *pap) { - def_p_arr_.push (pap_p); + defs_.push (pap); } IMPLEMENT_SMOBS (Score); @@ -193,10 +193,10 @@ SCM Score::mark_smob (SCM s) { Score * sc = (Score*) SCM_CELL_WORD_1 (s); - if (sc->header_p_) - scm_gc_mark (sc->header_p_->self_scm ()); - for (int i = sc->def_p_arr_.size (); i--;) - scm_gc_mark (sc->def_p_arr_[i]->self_scm ()); + if (sc->header_) + scm_gc_mark (sc->header_->self_scm ()); + for (int i = sc->defs_.size (); i--;) + scm_gc_mark (sc->defs_[i]->self_scm ()); return sc->music_; } diff --git a/lily/scores.cc b/lily/scores.cc index 5073a1daa2..edb7704f18 100644 --- a/lily/scores.cc +++ b/lily/scores.cc @@ -31,11 +31,11 @@ #include "lily-version.hh" #include "scm-hash.hh" -Sources* source_global_l = 0; -Array inclusion_global_array; -Array target_str_global_array; -Link_array score_global_array; -Scheme_hash_table * global_header_p; +Sources* source_global = 0; +Array inclusion_globals; +Array target_string_globals; +Link_array score_globals; +Scheme_hash_table * global_header; void write_dependency_file (String fn, Array targets, @@ -43,13 +43,13 @@ void write_dependency_file (String fn, Array targets, { const int WRAPWIDTH = 65; - progress_indication (_f ("dependencies output to `%s'...", fn.ch_C ())); + progress_indication (_f ("dependencies output to `%s'...", fn.to_str0 ())); progress_indication ("\n"); - FILE * f = fopen (fn.ch_C (), "w"); + FILE * f = fopen (fn.to_str0 (), "w"); if (!f) warning (_f ("can't open file: `%s'", fn)); - fprintf (f, "# Generated automatically by: %s\n", gnu_lilypond_version_str ().ch_C()); + fprintf (f, "# Generated automatically by: %s\n", gnu_lilypond_version_string ().to_str0 ()); String out; for (int i=0; i < targets.size (); i ++) @@ -58,25 +58,25 @@ void write_dependency_file (String fn, Array targets, for (int i=0; i < deps.size (); i ++) { - if (out.length_i () > WRAPWIDTH) + if (out.length () > WRAPWIDTH) { - fprintf (f, "%s\\\n", out.ch_C()); + fprintf (f, "%s\\\n", out.to_str0 ()); out = " "; } String dep = deps[i]; if (!dependency_prefix_global.empty_b ()) { #if 0//thinko? - if (stat (dep.ch_C (), &stat_buf) == -1 && errno == ENOENT) + if (stat (dep.to_str0 (), &stat_buf) == -1 && errno == ENOENT) ; //make emacs happy #else - if (dep.index_i ('/') < 0) + if (dep.index ('/') < 0) #endif dep = dependency_prefix_global + dep; } out += " " + dep; } - fprintf (f, "%s\n", out.ch_C()); + fprintf (f, "%s\n", out.to_str0 ()); } void @@ -86,9 +86,9 @@ do_deps () { Path p = split_path (output_name_global); p.ext = "dep"; - write_dependency_file (p.str (), - target_str_global_array, - inclusion_global_array); + write_dependency_file (p.string (), + target_string_globals, + inclusion_globals); } } @@ -96,20 +96,20 @@ do_deps () void do_scores () { - if (!global_header_p) - global_header_p = new Scheme_hash_table; - for (int i=0; i < score_global_array.size (); i++) + if (!global_header) + global_header = new Scheme_hash_table; + for (int i=0; i < score_globals.size (); i++) { - Score* is_p = score_global_array[i]; + Score* is = score_globals[i]; - if (is_p->errorlevel_i_) + if (is->errorlevel_) { - is_p->warning (_ ("Score contains errors; will not process it")); + is->warning (_ ("Score contains errors; will not process it")); exit_status_global |= 1; } else { - is_p->process (); + is->process (); } } do_deps (); @@ -118,43 +118,43 @@ do_scores () void clear_scores () { - for (int i=0; i < score_global_array.size (); i++) - scm_gc_unprotect_object (score_global_array[i]->self_scm ()); - score_global_array.clear (); + for (int i=0; i < score_globals.size (); i++) + scm_gc_unprotect_object (score_globals[i]->self_scm ()); + score_globals.clear (); - inclusion_global_array.clear (); - if (global_header_p) - scm_gc_unprotect_object (global_header_p ->self_scm ()); - global_header_p =0; + inclusion_globals.clear (); + if (global_header) + scm_gc_unprotect_object (global_header ->self_scm ()); + global_header =0; } void -do_one_file (String init_str, String file_str) +do_one_file (String init_string, String file_string) { - if (init_str.length_i () && global_path.find (init_str).empty_b ()) + if (init_string.length () && global_path.find (init_string).empty_b ()) { - warning (_f ("can't find file: `%s'", init_str)); - warning (_f ("(search path: `%s')", global_path.str ().ch_C ())); + warning (_f ("can't find file: `%s'", init_string)); + warning (_f ("(search path: `%s')", global_path.string ().to_str0 ())); return; } - if ((file_str != "-") && global_path.find (file_str).empty_b ()) + if ((file_string != "-") && global_path.find (file_string).empty_b ()) { - warning (_f ("can't find file: `%s'", file_str)); + warning (_f ("can't find file: `%s'", file_string)); return; } Sources sources; - source_global_l = &sources; - source_global_l->set_path (&global_path); + source_global = &sources; + source_global->set_path (&global_path); { - My_lily_parser parser (source_global_l); + My_lily_parser parser (source_global); parser.set_version_check (false); - progress_indication (_f ("Now processing: `%s'", file_str.ch_C ())); + progress_indication (_f ("Now processing: `%s'", file_string.to_str0 ())); progress_indication ("\n"); - parser.parse_file (init_str, file_str); + parser.parse_file (init_string, file_string); - if (parser.error_level_i_) + if (parser.error_level_) { exit_status_global = 1; } @@ -162,6 +162,6 @@ do_one_file (String init_str, String file_str) do_scores (); clear_scores (); } - source_global_l = 0; + source_global = 0; } diff --git a/lily/script-column-engraver.cc b/lily/script-column-engraver.cc index 58aa49bcce..6141568630 100644 --- a/lily/script-column-engraver.cc +++ b/lily/script-column-engraver.cc @@ -17,8 +17,8 @@ Script_column, that will fix the collisions. */ class Script_column_engraver : public Engraver { - Grob *scol_p_; - Link_array script_l_arr_; + Grob *scol_; + Link_array scripts_; public: TRANSLATOR_DECLARATIONS(Script_column_engraver); @@ -32,36 +32,36 @@ protected: Script_column_engraver::Script_column_engraver () { - scol_p_ =0; + scol_ =0; } void Script_column_engraver::stop_translation_timestep () { - if (scol_p_) + if (scol_) { - typeset_grob (scol_p_); - scol_p_ =0; + typeset_grob (scol_); + scol_ =0; } } void Script_column_engraver::start_translation_timestep () { - script_l_arr_.clear (); + scripts_.clear (); } void Script_column_engraver::acknowledge_grob (Grob_info inf) { - Item *thing = dynamic_cast (inf.grob_l_); - if (thing && Side_position_interface::has_interface (inf.grob_l_)) // ugh FIXME + Item *thing = dynamic_cast (inf.grob_); + if (thing && Side_position_interface::has_interface (inf.grob_)) // ugh FIXME { if (!Item::breakable_b (thing) - && Side_position_interface::get_axis (inf.grob_l_) == Y_AXIS) + && Side_position_interface::get_axis (inf.grob_) == Y_AXIS) { - script_l_arr_.push (thing); + scripts_.push (thing); } } } @@ -69,17 +69,17 @@ Script_column_engraver::acknowledge_grob (Grob_info inf) void Script_column_engraver::process_acknowledged_grobs () { - if (!scol_p_ && script_l_arr_.size () > 1) + if (!scol_ && scripts_.size () > 1) { - scol_p_ = new Item (get_property ("ScriptColumn")); - announce_grob(scol_p_, SCM_EOL); + scol_ = new Item (get_property ("ScriptColumn")); + announce_grob(scol_, SCM_EOL); } - if (scol_p_) + if (scol_) { - for (int i=0; i < script_l_arr_.size (); i++) - Script_column::add_staff_sided (scol_p_, script_l_arr_[i]); - script_l_arr_.clear (); + for (int i=0; i < scripts_.size (); i++) + Script_column::add_staff_sided (scol_, scripts_[i]); + scripts_.clear (); } } diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc index 924bde701f..455ab600eb 100644 --- a/lily/script-engraver.cc +++ b/lily/script-engraver.cc @@ -14,8 +14,8 @@ class Script_engraver : public Engraver { - Link_array script_p_arr_; - Link_array script_req_l_arr_; + Link_array scripts_; + Link_array script_reqs_; public: TRANSLATOR_DECLARATIONS(Script_engraver); @@ -31,20 +31,20 @@ protected: void Script_engraver::initialize () { - script_req_l_arr_.clear (); + script_reqs_.clear (); } bool -Script_engraver::try_music (Music *r_l) +Script_engraver::try_music (Music *r) { - if (Articulation_req *mr = dynamic_cast (r_l)) + if (Articulation_req *mr = dynamic_cast (r)) { - for (int i=0; i < script_req_l_arr_.size (); i++) + for (int i=0; i < script_reqs_.size (); i++) { - if (script_req_l_arr_[i]->equal_b (mr)) + if (script_reqs_[i]->equal_b (mr)) return true; } - script_req_l_arr_.push (mr); + script_reqs_.push (mr); return true; } return false; @@ -53,9 +53,9 @@ Script_engraver::try_music (Music *r_l) void Script_engraver::process_music () { - for (int i=0; i < script_req_l_arr_.size (); i++) + for (int i=0; i < script_reqs_.size (); i++) { - Articulation_req* l=script_req_l_arr_[i]; + Articulation_req* l=script_reqs_[i]; SCM alist = get_property ("scriptDefinitions"); SCM art = scm_assoc (l->get_mus_property ("articulation-type"), alist); @@ -63,7 +63,7 @@ Script_engraver::process_music () if (art == SCM_BOOL_F) { String a = ly_scm2string (l->get_mus_property ("articulation-type")); - l->origin ()->warning (_f ("Don't know how to interpret articulation `%s'", a.ch_C ())); + l->origin ()->warning (_f ("Don't know how to interpret articulation `%s'", a.to_str0 ())); continue; } @@ -114,7 +114,7 @@ Script_engraver::process_music () p->set_grob_property ("script-priority", gh_int2scm (priority)); - script_p_arr_.push (p); + scripts_.push (p); announce_grob (p, l->self_scm()); } @@ -123,33 +123,33 @@ Script_engraver::process_music () void Script_engraver::acknowledge_grob (Grob_info inf) { - if (Stem::has_interface (inf.grob_l_)) + if (Stem::has_interface (inf.grob_)) { - for (int i=0; i < script_p_arr_.size (); i++) + for (int i=0; i < scripts_.size (); i++) { - Grob*e = script_p_arr_[i]; + Grob*e = scripts_[i]; - e->set_grob_property ("direction-source", inf.grob_l_->self_scm ()); - e->add_dependency (inf.grob_l_); - Side_position_interface::add_support (e, inf.grob_l_); + e->set_grob_property ("direction-source", inf.grob_->self_scm ()); + e->add_dependency (inf.grob_); + Side_position_interface::add_support (e, inf.grob_); } } - else if (Rhythmic_head::has_interface (inf.grob_l_)) + else if (Rhythmic_head::has_interface (inf.grob_)) { - for (int i=0; i < script_p_arr_.size (); i++) + for (int i=0; i < scripts_.size (); i++) { - Grob *e = script_p_arr_[i]; + Grob *e = scripts_[i]; if (Side_position_interface::get_axis (e) == X_AXIS && !e->get_parent (Y_AXIS)) { - e->set_parent (inf.grob_l_, Y_AXIS); - e->add_dependency (inf.grob_l_); // ?? + e->set_parent (inf.grob_, Y_AXIS); + e->add_dependency (inf.grob_); // ?? } - Side_position_interface::add_support (e,inf.grob_l_); + Side_position_interface::add_support (e,inf.grob_); } } - else if (Note_column::has_interface (inf.grob_l_)) + else if (Note_column::has_interface (inf.grob_)) { /* @@ -160,14 +160,14 @@ Script_engraver::acknowledge_grob (Grob_info inf) Script_interface::before_line_breaking (). */ - for (int i=0; i < script_p_arr_.size (); i++) + for (int i=0; i < scripts_.size (); i++) { - Grob *e = script_p_arr_[i]; + Grob *e = scripts_[i]; if (!e->get_parent (X_AXIS) && Side_position_interface::get_axis (e) == Y_AXIS) { - e->set_parent (inf.grob_l_, X_AXIS); + e->set_parent (inf.grob_, X_AXIS); } } } @@ -176,26 +176,26 @@ Script_engraver::acknowledge_grob (Grob_info inf) void Script_engraver::stop_translation_timestep () { - for (int i=0; i < script_p_arr_.size (); i++) + for (int i=0; i < scripts_.size (); i++) { /* TODO: junk staff-support. */ - Grob * sc = script_p_arr_[i]; + Grob * sc = scripts_[i]; if (to_boolean (sc->get_grob_property ("staff-support"))) { Side_position_interface::add_staff_support (sc); } typeset_grob (sc); } - script_p_arr_.clear (); + scripts_.clear (); } void Script_engraver::start_translation_timestep () { - script_req_l_arr_.clear (); + script_reqs_.clear (); } diff --git a/lily/script.cc b/lily/script.cc index 7fc2c4843b..7a8630dd7c 100644 --- a/lily/script.cc +++ b/lily/script.cc @@ -61,7 +61,7 @@ Script_interface::before_line_breaking (SCM smob) if (Grob * par = me->get_parent (X_AXIS)) { - Grob * stem = Note_column::stem_l (par); + Grob * stem = Note_column::get_stem (par); if (stem && Stem::first_head (stem)) { me->set_parent (Stem::first_head (stem), X_AXIS); diff --git a/lily/separating-group-spanner.cc b/lily/separating-group-spanner.cc index 4cd8c8ef32..d841599246 100644 --- a/lily/separating-group-spanner.cc +++ b/lily/separating-group-spanner.cc @@ -43,7 +43,7 @@ Separating_group_spanner::find_rods (Item * r, SCM next) rod.item_l_drul_[LEFT] = lb; rod.item_l_drul_[RIGHT] = r; - rod.distance_f_ = li[RIGHT] - ri[LEFT]; + rod.distance_ = li[RIGHT] - ri[LEFT]; rod.add_to_cols (); } } @@ -57,7 +57,7 @@ Separating_group_spanner::find_rods (Item * r, SCM next) rod.item_l_drul_[LEFT] =l; rod.item_l_drul_[RIGHT]=r; - rod.distance_f_ = li[RIGHT] - ri[LEFT]; + rod.distance_ = li[RIGHT] - ri[LEFT]; rod.add_to_cols (); break; diff --git a/lily/separating-line-group-engraver.cc b/lily/separating-line-group-engraver.cc index 4973fb3bd4..28ea1082c0 100644 --- a/lily/separating-line-group-engraver.cc +++ b/lily/separating-line-group-engraver.cc @@ -40,14 +40,14 @@ struct Spacings class Separating_line_group_engraver : public Engraver { protected: - Item * break_malt_p_; - Item * musical_malt_p_; - Item * last_musical_malt_p_; + Item * break_malt_; + Item * musical_malt_; + Item * last_musical_malt_; Spacings current_spacings_; Spacings last_spacings_; - Spanner * sep_span_p_; + Spanner * sep_span_; virtual void acknowledge_grob (Grob_info); virtual void initialize (); @@ -60,18 +60,18 @@ public: Separating_line_group_engraver::Separating_line_group_engraver () { - sep_span_p_ = 0; - break_malt_p_ = 0; - musical_malt_p_ =0; + sep_span_ = 0; + break_malt_ = 0; + musical_malt_ =0; } void Separating_line_group_engraver::initialize () { - sep_span_p_ = new Spanner (get_property ("SeparatingGroupSpanner")); + sep_span_ = new Spanner (get_property ("SeparatingGroupSpanner")); - announce_grob(sep_span_p_, SCM_EOL); - sep_span_p_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn"))); + announce_grob(sep_span_, SCM_EOL); + sep_span_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn"))); } void @@ -80,9 +80,9 @@ Separating_line_group_engraver::finalize () SCM ccol = get_property ("currentCommandColumn"); Grob *column = unsmob_grob (ccol); - sep_span_p_->set_bound (RIGHT, unsmob_grob (ccol)); - typeset_grob (sep_span_p_); - sep_span_p_ =0; + sep_span_->set_bound (RIGHT, unsmob_grob (ccol)); + typeset_grob (sep_span_); + sep_span_ =0; for (int i= 0 ; i < last_spacings_.note_spacings_.size(); i++) { @@ -92,7 +92,7 @@ Separating_line_group_engraver::finalize () } if(last_spacings_.staff_spacing_ - && last_spacings_.staff_spacing_->column_l () == column) + && last_spacings_.staff_spacing_->get_column () == column) { last_spacings_.staff_spacing_->suicide (); } @@ -101,7 +101,7 @@ Separating_line_group_engraver::finalize () void Separating_line_group_engraver::acknowledge_grob (Grob_info i) { - Item * it = dynamic_cast (i.grob_l_); + Item * it = dynamic_cast (i.grob_); if (!it) return; if (it->get_parent (X_AXIS) @@ -120,8 +120,8 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i) } bool ib =Item::breakable_b (it); - Item *&p_ref_ (ib ? break_malt_p_ - : musical_malt_p_); + Item *&p_ref_ (ib ? break_malt_ + : musical_malt_); if (!p_ref_) { @@ -131,11 +131,11 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i) p_ref_->set_grob_property ("breakable", SCM_BOOL_T); announce_grob(p_ref_, SCM_EOL); - if (p_ref_ == break_malt_p_) + if (p_ref_ == break_malt_) { Item *it = new Item (get_property ("StaffSpacing")); current_spacings_.staff_spacing_ = it; - it->set_grob_property ("left-items", gh_cons (break_malt_p_->self_scm (), SCM_EOL)); + it->set_grob_property ("left-items", gh_cons (break_malt_->self_scm (), SCM_EOL)); announce_grob(it, SCM_EOL); @@ -144,14 +144,14 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i) for (; i--;) Pointer_group_interface::add_grob (last_spacings_.note_spacings_[i], ly_symbol2scm ("right-items"), - break_malt_p_); + break_malt_); } else if (last_spacings_.staff_spacing_) { last_spacings_.staff_spacing_->set_grob_property ("right-items", - gh_cons (break_malt_p_->self_scm(), SCM_EOL)); + gh_cons (break_malt_->self_scm(), SCM_EOL)); } } } @@ -171,12 +171,12 @@ Separating_line_group_engraver::start_translation_timestep () void Separating_line_group_engraver::stop_translation_timestep () { - if (break_malt_p_) + if (break_malt_) { - Separating_group_spanner::add_spacing_unit (sep_span_p_, break_malt_p_); - typeset_grob (break_malt_p_); + Separating_group_spanner::add_spacing_unit (sep_span_, break_malt_); + typeset_grob (break_malt_); - break_malt_p_ =0; + break_malt_ =0; } if (Item * sp = current_spacings_.staff_spacing_) @@ -185,9 +185,9 @@ Separating_line_group_engraver::stop_translation_timestep () TODO: should really look at the left-items of following note-spacing grobs. */ - if (musical_malt_p_) + if (musical_malt_) Pointer_group_interface::add_grob (sp, ly_symbol2scm ("right-items"), - musical_malt_p_); + musical_malt_); typeset_grob (sp); } @@ -200,13 +200,13 @@ Separating_line_group_engraver::stop_translation_timestep () current_spacings_.clear (); - if (musical_malt_p_) + if (musical_malt_) { - Separating_group_spanner::add_spacing_unit (sep_span_p_, musical_malt_p_); - typeset_grob (musical_malt_p_); + Separating_group_spanner::add_spacing_unit (sep_span_, musical_malt_); + typeset_grob (musical_malt_); } - musical_malt_p_ =0; + musical_malt_ =0; } diff --git a/lily/separation-item.cc b/lily/separation-item.cc index f318a62f7e..19962fef3a 100644 --- a/lily/separation-item.cc +++ b/lily/separation-item.cc @@ -37,7 +37,7 @@ Separation_item::conditional_width (Grob * me, Grob * left) Interval w = width (me); Item *item = dynamic_cast (me); - Paper_column * pc = item->column_l (); + Paper_column * pc = item->get_column (); for (SCM s = me->get_grob_property ("conditional-elements"); gh_pair_p (s); s = ly_cdr (s)) @@ -47,7 +47,7 @@ Separation_item::conditional_width (Grob * me, Grob * left) continue; Item *il = unsmob_item (elt); - if (pc != il->column_l ()) + if (pc != il->get_column ()) { /* this shouldn't happen, but let's continue anyway. */ programming_error (_ ("Separation_item: I've been drinking too much")); @@ -85,7 +85,7 @@ Separation_item::width (Grob *me) } Item *item = dynamic_cast (me); - Paper_column * pc = item->column_l (); + Paper_column * pc = item->get_column (); Interval w; for (SCM s = me->get_grob_property ("elements"); gh_pair_p (s); s = ly_cdr (s)) @@ -95,7 +95,7 @@ Separation_item::width (Grob *me) continue; Item *il = unsmob_item (elt); - if (pc != il->column_l ()) + if (pc != il->get_column ()) { /* this shouldn't happen, but let's continue anyway. */ programming_error (_ ("Separation_item: I've been drinking too much")); diff --git a/lily/sequential-iterator.cc b/lily/sequential-iterator.cc index 1668af4d59..64247fd727 100644 --- a/lily/sequential-iterator.cc +++ b/lily/sequential-iterator.cc @@ -40,9 +40,9 @@ Grace_fixup *get_grace_fixups (SCM cursor); if (gh_pair_p (cursor_)) - iter_p_->music_l_ == unsmob_music (ly_car (cursor_)) + iter_->music_ == unsmob_music (ly_car (cursor_)) else - iter_p_ == 0; + iter_ == 0; The length of musiclist from start to up to cursor_ (cursor_ not including), is summed @@ -54,7 +54,7 @@ Sequential_iterator::Sequential_iterator () { here_mom_ = Moment (0); grace_fixups_ = 0; - iter_p_ =0; + iter_ =0; } SCM @@ -70,15 +70,15 @@ Sequential_iterator::Sequential_iterator (Sequential_iterator const &src) cursor_ = src.cursor_; list_ = src.cursor_; here_mom_ = src.here_mom_; - if (src.iter_p_) - iter_p_ = src.iter_p_->clone (); + if (src.iter_) + iter_ = src.iter_->clone (); else - iter_p_ = 0; + iter_ = 0; } Sequential_iterator::~Sequential_iterator () { - delete iter_p_; + delete iter_; } @@ -143,19 +143,19 @@ Sequential_iterator::construct_children () list_ = get_music_list (); cursor_ = list_; - iter_p_ = gh_pair_p (cursor_) ? get_iterator_p (unsmob_music (ly_car (cursor_))) : 0; - while (iter_p_ && !iter_p_->ok ()) + iter_ = gh_pair_p (cursor_) ? get_iterator (unsmob_music (ly_car (cursor_))) : 0; + while (iter_ && !iter_->ok ()) { next_element (true); } - here_mom_ = music_l ()->start_mom (); + here_mom_ = get_music ()->start_mom (); grace_fixups_ = get_grace_fixups (cursor_); /* - iter_p_->ok () is tautology, but what the heck. + iter_->ok () is tautology, but what the heck. */ - if (iter_p_ && iter_p_->ok ()) + if (iter_ && iter_->ok ()) descend_to_child (); } @@ -167,7 +167,7 @@ Sequential_iterator::construct_children () void Sequential_iterator::next_element (bool side_effect) { - Moment len =iter_p_->music_length_mom () - iter_p_->music_start_mom (); + Moment len =iter_->music_length_mom () - iter_->music_start_mom (); assert (!grace_fixups_ || grace_fixups_->start_ >= here_mom_); if (len.main_part_ && grace_fixups_ && @@ -196,13 +196,13 @@ Sequential_iterator::next_element (bool side_effect) here_mom_ += len; } - delete iter_p_; + delete iter_; cursor_ = ly_cdr (cursor_); if (gh_pair_p (cursor_)) - iter_p_ = get_iterator_p (unsmob_music (ly_car (cursor_))); + iter_ = get_iterator (unsmob_music (ly_car (cursor_))); else - iter_p_ = 0; + iter_ = 0; } /* @@ -242,7 +242,7 @@ Sequential_iterator::get_pending_events (Moment until)const dynamic_cast (clone ()); while (me->ok ()) { - SCM nm = me->iter_p_->get_pending_events (until - me->here_mom_); + SCM nm = me->iter_->get_pending_events (until - me->here_mom_); s = gh_append2 (nm, s); Moment m = 0; @@ -282,12 +282,12 @@ Sequential_iterator::skip (Moment until) /* do the stuff/note/rest preceding a grace. */ - iter_p_->skip (iter_p_->music_length_mom ()); + iter_->skip (iter_->music_length_mom ()); } - else if (iter_p_->music_length_mom () >= until - here_mom_) - iter_p_->skip (until - here_mom_ + iter_p_->music_start_mom ()); + else if (iter_->music_length_mom () >= until - here_mom_) + iter_->skip (until - here_mom_ + iter_->music_start_mom ()); - if (iter_p_->ok ()) + if (iter_->ok ()) return ; next_element (false); @@ -297,7 +297,7 @@ Sequential_iterator::skip (Moment until) void Sequential_iterator::process (Moment until) { - while (iter_p_) + while (iter_) { if (grace_fixups_ && grace_fixups_->start_ == here_mom_ @@ -307,10 +307,10 @@ Sequential_iterator::process (Moment until) /* do the stuff/note/rest preceding a grace. */ - iter_p_->process (iter_p_->music_length_mom ()); + iter_->process (iter_->music_length_mom ()); } else - iter_p_->process (until - here_mom_ + iter_p_->music_start_mom ()); + iter_->process (until - here_mom_ + iter_->music_start_mom ()); /* if the iter is still OK, there must be events left that have @@ -318,7 +318,7 @@ Sequential_iterator::process (Moment until) TIME > LEFT */ - if (iter_p_->ok ()) + if (iter_->ok ()) return ; descend_to_child (); @@ -329,13 +329,13 @@ Sequential_iterator::process (Moment until) Moment Sequential_iterator::pending_moment () const { - Moment cp = iter_p_->pending_moment (); + Moment cp = iter_->pending_moment (); /* Fix-up a grace note halfway in the music. */ if (grace_fixups_ && here_mom_ == grace_fixups_->start_ - && grace_fixups_->length_ + iter_p_->music_start_mom () == cp) + && grace_fixups_->length_ + iter_->music_start_mom () == cp) { return here_mom_ + grace_fixups_->length_ + Moment (0, grace_fixups_->grace_start_); } @@ -343,20 +343,20 @@ Sequential_iterator::pending_moment () const /* Fix-up a grace note at the start of the music. */ - return cp + here_mom_ - iter_p_->music_start_mom (); + return cp + here_mom_ - iter_->music_start_mom (); } bool Sequential_iterator::ok () const { - return iter_p_; + return iter_; } Music_iterator* Sequential_iterator::try_music_in_children (Music *m) const { - return iter_p_ ? iter_p_->try_music (m) : 0; + return iter_ ? iter_->try_music (m) : 0; } IMPLEMENT_CTOR_CALLBACK (Sequential_iterator); diff --git a/lily/sequential-music-iterator.cc b/lily/sequential-music-iterator.cc index 6de624e0eb..1079706bb6 100644 --- a/lily/sequential-music-iterator.cc +++ b/lily/sequential-music-iterator.cc @@ -18,13 +18,13 @@ void Sequential_music_iterator::descend_to_child () { - Translator_group * child_report = child_report = iter_p_->report_to_l (); - Translator_group * me_report = report_to_l (); + Translator_group * child_report = child_report = iter_->report_to (); + Translator_group * me_report = report_to (); Translator_group * c = child_report; while (c && c != me_report) { - c= c->daddy_trans_l_; + c= c->daddy_trans_; } if (c == me_report) @@ -37,5 +37,5 @@ IMPLEMENT_CTOR_CALLBACK (Sequential_music_iterator); SCM Sequential_music_iterator::get_music_list()const { - return dynamic_cast (music_l ())->music_list (); + return dynamic_cast (get_music ())->music_list (); } diff --git a/lily/side-position-interface.cc b/lily/side-position-interface.cc index 7117d64e2f..2b7ae5f9d8 100644 --- a/lily/side-position-interface.cc +++ b/lily/side-position-interface.cc @@ -167,7 +167,7 @@ Side_position_interface::quantised_position (SCM element_smob, SCM) if (Staff_symbol_referencer::has_interface (me)) { - Real p = Staff_symbol_referencer::position_f (me); + Real p = Staff_symbol_referencer::get_position (me); Real rp = directed_round (p, d); Real rad = Staff_symbol_referencer::staff_radius (me) *2 ; int ip = int (rp); @@ -218,7 +218,7 @@ Side_position_interface::aligned_side (SCM element_smob, SCM axis) void Side_position_interface::add_staff_support (Grob*me) { - Grob* st = Staff_symbol_referencer::staff_symbol_l (me); + Grob* st = Staff_symbol_referencer::get_staff_symbol (me); if (st && get_axis (me) == Y_AXIS) { add_support (me,st); diff --git a/lily/simple-music-iterator.cc b/lily/simple-music-iterator.cc index 0497ef770c..5c7ebc6271 100644 --- a/lily/simple-music-iterator.cc +++ b/lily/simple-music-iterator.cc @@ -55,7 +55,7 @@ Simple_music_iterator::skip (Moment m) uncommented because setting MUSIC_L_ = 0 causes core dumps with grace notes. */ - // music_l_ = 0; + // music_ = 0; last_processed_mom_ = m; } diff --git a/lily/simple-spacer.cc b/lily/simple-spacer.cc index 97d0c2f14d..fef3caea83 100644 --- a/lily/simple-spacer.cc +++ b/lily/simple-spacer.cc @@ -64,9 +64,9 @@ Simple_spacer::Simple_spacer () */ compression_penalty_b_ = false; active_count_ = 0; - force_f_ = 0.; - indent_f_ =0.0; - default_space_f_ = 20 PT; + force_ = 0.; + indent_ =0.0; + default_space_ = 20 PT; } void @@ -87,11 +87,11 @@ Simple_spacer::add_rod (int l, int r, Real dist) */ Real total_dist = 0.; for (int i = l ; i < r; i++) - total_dist += springs_[i].ideal_f_; + total_dist += springs_[i].ideal_; if (total_dist < dist) for (int i = l ; i < r; i++) - springs_[i].ideal_f_ *= dist/total_dist; + springs_[i].ideal_ *= dist/total_dist; return; } @@ -100,11 +100,11 @@ Simple_spacer::add_rod (int l, int r, Real dist) Real block_stretch = dist - d; Real block_force = c * block_stretch; - force_f_ = force_f_ >? block_force; + force_ = force_ >? block_force; for (int i=l; i < r; i++) - springs_[i].block_force_f_ = block_force >? - springs_[i].block_force_f_ ; + springs_[i].block_force_ = block_force >? + springs_[i].block_force_ ; } Real @@ -112,7 +112,7 @@ Simple_spacer::range_ideal_len (int l, int r) const { Real d =0.; for (int i=l; i < r; i++) - d += springs_[i].ideal_f_; + d += springs_[i].ideal_; return d; } @@ -123,7 +123,7 @@ Simple_spacer::range_stiffness (int l, int r) const for (int i=l; i < r; i++) { if (springs_[i].active_b_) - den += 1 / springs_[i].hooke_f_; + den += 1 / springs_[i].hooke_; } return 1 / den; @@ -136,7 +136,7 @@ Simple_spacer::active_blocking_force () const for (int i=0; i < springs_.size (); i++) if (springs_[i].active_b_) { - bf = bf >? springs_[i].block_force_f_; + bf = bf >? springs_[i].block_force_; } return bf; } @@ -148,7 +148,7 @@ Simple_spacer::active_springs_stiffness () const for (int i=0; i < springs_.size (); i++) if (springs_[i].active_b_) { - den += 1 / springs_[i].hooke_f_; + den += 1 / springs_[i].hooke_; } return 1/den; } @@ -159,7 +159,7 @@ Simple_spacer::set_active_states () /* float comparison is safe, since force is only copied. */ for (int i=0 ; i = force_f_) + && springs_[i].block_force_ >= force_) { springs_[i].active_b_ = false; active_count_ --; @@ -171,7 +171,7 @@ Simple_spacer::configuration_length () const { Real l =0.; for (int i=0; i < springs_.size (); i++) - l += springs_[i].length (force_f_); + l += springs_[i].length (force_); return l; } @@ -187,12 +187,12 @@ Simple_spacer::my_solve_linelen () { while (active_b ()) { - force_f_ = active_blocking_force (); + force_ = active_blocking_force (); Real conf = configuration_length (); - if (conf < line_len_f_) + if (conf < line_len_) { - force_f_ += (line_len_f_ - conf) * active_springs_stiffness (); + force_ += (line_len_ - conf) * active_springs_stiffness (); break; } else @@ -206,9 +206,9 @@ Simple_spacer::my_solve_natural_len () { while (active_b ()) { - force_f_ = active_blocking_force () >? 0.0; + force_ = active_blocking_force () >? 0.0; - if (force_f_ < 1e-8) // ugh., + if (force_ < 1e-8) // ugh., break; set_active_states (); @@ -246,16 +246,16 @@ Simple_spacer::add_columns (Link_array const &icols) Spring_description desc; if (spring) { - desc.ideal_f_ = spring->distance_f_; - desc.hooke_f_ = spring->strength_f_; + desc.ideal_ = spring->distance_; + desc.hooke_ = spring->strength_; } else { programming_error (_f("No spring between column %d and next one", - Paper_column::rank_i (cols[i]) + Paper_column::get_rank (cols[i]) )); - desc.hooke_f_ = 1.0; - desc.ideal_f_ = default_space_f_; + desc.hooke_ = 1.0; + desc.ideal_ = default_space_; continue; } @@ -264,18 +264,18 @@ Simple_spacer::add_columns (Link_array const &icols) { programming_error ("Insane spring found. Setting to unit spring."); - desc.hooke_f_ = 1.0; - desc.ideal_f_ = 1.0; + desc.hooke_ = 1.0; + desc.ideal_ = 1.0; } - if (isinf (desc.hooke_f_)) + if (isinf (desc.hooke_)) { desc.active_b_ = false; springs_.push (desc); } else { - desc.block_force_f_ = - desc.hooke_f_ * desc.ideal_f_; // block at distance 0 + desc.block_force_ = - desc.hooke_ * desc.ideal_; // block at distance 0 springs_.push (desc); active_count_ ++; @@ -294,7 +294,7 @@ Simple_spacer::add_columns (Link_array const &icols) gh_pair_p (s); s = ly_cdr (s)) { Grob * other = unsmob_grob (ly_caar (s)); - int oi = cols.find_i (other); + int oi = cols.find_index (other); if (oi >= 0) { add_rod (i, oi, gh_scm2double (ly_cdar (s))); @@ -305,7 +305,7 @@ Simple_spacer::add_columns (Link_array const &icols) /* TODO: should support natural length on only the last line. */ - if (line_len_f_ < 0) + if (line_len_ < 0) my_solve_natural_len (); else my_solve_linelen (); @@ -316,8 +316,8 @@ Simple_spacer::add_columns (Link_array const &icols) void Simple_spacer::solve (Column_x_positions *positions, bool ragged) const { - positions->force_f_ = force_f_; - if ((force_f_ < 0)) + positions->force_ = force_; + if ((force_ < 0)) { /* @@ -327,13 +327,13 @@ Simple_spacer::solve (Column_x_positions *positions, bool ragged) const maybe this should be tunable? */ if (compression_penalty_b_) - ; // positions->force_f_ *= 2; // hmm. + ; // positions->force_ *= 2; // hmm. } - positions->config_.push (indent_f_); + positions->config_.push (indent_); for (int i=0; i config_.push (positions->config_.top () + l); /* we have l>= 0 here, up to rounding errors @@ -342,7 +342,7 @@ Simple_spacer::solve (Column_x_positions *positions, bool ragged) const positions->cols_ = spaced_cols_; positions->loose_cols_ = loose_cols_; - positions->satisfies_constraints_b_ = (line_len_f_ < 0) || active_b (); + positions->satisfies_constraints_b_ = (line_len_ < 0) || active_b (); /* @@ -366,7 +366,7 @@ Simple_spacer::solve (Column_x_positions *positions, bool ragged) const positions->satisfies_constraints_b_ = positions->satisfies_constraints_b_ && break_satisfy; - if (ragged && force_f_ < 0) + if (ragged && force_ < 0) positions->satisfies_constraints_b_ = false; } @@ -374,23 +374,23 @@ Simple_spacer::solve (Column_x_positions *positions, bool ragged) const Spring_description::Spring_description () { - ideal_f_ =0.0; - hooke_f_ =0.0; + ideal_ =0.0; + hooke_ =0.0; active_b_ = true; - block_force_f_ = 0.0; + block_force_ = 0.0; } bool Spring_description::sane_b () const { - return (hooke_f_ > 0) && !isinf (ideal_f_) && !isnan (ideal_f_); + return (hooke_ > 0) && !isinf (ideal_) && !isnan (ideal_); } Real Spring_description::length (Real f) const { if (!active_b_) - f = block_force_f_; - return ideal_f_ + f / hooke_f_ ; + f = block_force_; + return ideal_ + f / hooke_ ; } diff --git a/lily/simultaneous-music-iterator.cc b/lily/simultaneous-music-iterator.cc index f496b63784..dcdf880ab5 100644 --- a/lily/simultaneous-music-iterator.cc +++ b/lily/simultaneous-music-iterator.cc @@ -50,22 +50,22 @@ Simultaneous_music_iterator::construct_children () { int j = 0; - SCM i = music_l ()->get_mus_property ("elements"); + SCM i = get_music ()->get_mus_property ("elements"); for (; gh_pair_p (i); i = ly_cdr (i), j++) { Music *mus = unsmob_music (ly_car (i)); - Music_iterator * mi = static_get_iterator_p (mus); + Music_iterator * mi = get_static_get_iterator (mus); /* if separate_contexts_b_ is set, create a new context with the number number as name */ Translator_group * t = (j && separate_contexts_b_) - ? report_to_l ()->find_create_translator_l (report_to_l ()->type_str_, - to_str (j)) - : report_to_l (); + ? report_to ()->find_create_translator (report_to ()->type_string_, + to_string (j)) + : report_to (); if (!t) - t = report_to_l (); + t = report_to (); mi->init_translator (mus, t); mi->construct_children (); diff --git a/lily/slur-bezier-bow.cc b/lily/slur-bezier-bow.cc index 54620e6606..004a494d3a 100644 --- a/lily/slur-bezier-bow.cc +++ b/lily/slur-bezier-bow.cc @@ -83,7 +83,7 @@ Slur_bezier_bow::blow_fit () Real -Slur_bezier_bow::enclosed_area_f () const +Slur_bezier_bow::get_enclosed_area () const { Real a = 0; for (int i=0; i < encompass_.size (); i++) @@ -124,7 +124,7 @@ Slur_bezier_bow::enclosed_area_f () const } Array -Slur_bezier_bow::area_x_gradients_array (Real area) +Slur_bezier_bow::area_x_gradientses (Real area) { Real len = curve_.control_[3][X_AXIS]; Real grow = len / 10.0; @@ -133,7 +133,7 @@ Slur_bezier_bow::area_x_gradients_array (Real area) { Real r = curve_.control_[i+1][X_AXIS]; curve_.control_[i+1][X_AXIS] += grow; - da[i] = (enclosed_area_f () - area) / grow; + da[i] = (get_enclosed_area () - area) / grow; curve_.control_[i+1][X_AXIS] = r; } return da; @@ -162,11 +162,11 @@ Slur_bezier_bow::minimise_enclosed_area (Real beauty, for (int i=0; i < steps; i++) { - Real area = enclosed_area_f (); + Real area = get_enclosed_area (); if (area <= beautiful) break; - Array da = area_x_gradients_array (area); + Array da = area_x_gradientses (area); // urg Real pct = pct_c0 + pct_c3 * length * length * length; diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index 42ede51908..cbecdf3c40 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -14,10 +14,10 @@ class Slur_engraver : public Engraver { - Link_array requests_arr_; - Link_array new_slur_req_l_arr_; + Link_array requestses_; + Link_array new_slur_reqs_; Link_array slur_l_stack_; - Link_array end_slur_l_arr_; + Link_array end_slurs_; Moment last_start_; void set_melisma (bool); @@ -40,9 +40,9 @@ Slur_engraver::Slur_engraver () } bool -Slur_engraver::try_music (Music *req_l) +Slur_engraver::try_music (Music *req) { - if (Span_req *sl = dynamic_cast (req_l)) + if (Span_req *sl = dynamic_cast (req)) { String t = ly_scm2string (sl->get_mus_property ("span-type")); if (t == "abort") @@ -52,13 +52,13 @@ Slur_engraver::try_music (Music *req_l) slur_l_stack_[i]->suicide (); } slur_l_stack_.clear (); - for (int i = 0; i < end_slur_l_arr_.size (); i++) + for (int i = 0; i < end_slurs_.size (); i++) { - end_slur_l_arr_[i]->suicide (); + end_slurs_[i]->suicide (); } - end_slur_l_arr_.clear (); - requests_arr_.clear (); - new_slur_req_l_arr_.clear (); + end_slurs_.clear (); + requestses_.clear (); + new_slur_reqs_.clear (); } else if (t == "slur") { @@ -69,14 +69,14 @@ Slur_engraver::try_music (Music *req_l) { if (now_mom () > last_start_) { - new_slur_req_l_arr_.push (sl); + new_slur_reqs_.push (sl); last_start_ = now_mom (); return true; } } else { - new_slur_req_l_arr_.push (sl); + new_slur_reqs_.push (sl); return true; } } @@ -87,19 +87,19 @@ Slur_engraver::try_music (Music *req_l) void Slur_engraver::set_melisma (bool m) { - daddy_trans_l_->set_property ("slurMelismaBusy", m ? SCM_BOOL_T :SCM_BOOL_F); + daddy_trans_->set_property ("slurMelismaBusy", m ? SCM_BOOL_T :SCM_BOOL_F); } void Slur_engraver::acknowledge_grob (Grob_info info) { - if (Note_column::has_interface (info.grob_l_)) + if (Note_column::has_interface (info.grob_)) { - Grob *e =info.grob_l_; + Grob *e =info.grob_; for (int i = 0; i < slur_l_stack_.size (); i++) Slur::add_column (slur_l_stack_[i], e); - for (int i = 0; i < end_slur_l_arr_.size (); i++) - Slur::add_column (end_slur_l_arr_[i], e); + for (int i = 0; i < end_slurs_.size (); i++) + Slur::add_column (end_slurs_[i], e); } } @@ -119,64 +119,64 @@ Slur_engraver::finalize () } slur_l_stack_.clear (); - for (int i=0; i < requests_arr_.size (); i++) + for (int i=0; i < requestses_.size (); i++) { - requests_arr_[i]->origin ()->warning (_ ("unterminated slur")); + requestses_[i]->origin ()->warning (_ ("unterminated slur")); } } void Slur_engraver::process_acknowledged_grobs () { - Link_array start_slur_l_arr; - for (int i=0; i< new_slur_req_l_arr_.size (); i++) + Link_array start_slurs; + for (int i=0; i< new_slur_reqs_.size (); i++) { - Span_req* slur_req_l = new_slur_req_l_arr_[i]; + Span_req* slur_req = new_slur_reqs_[i]; // end slur: move the slur to other array - if (slur_req_l->get_span_dir () == STOP) + if (slur_req->get_span_dir () == STOP) { if (slur_l_stack_.empty ()) /* How to shut up this warning, when Voice_devnull_engraver has eaten start request? */ - slur_req_l->origin ()->warning (_f ("can't find start of slur")); + slur_req->origin ()->warning (_f ("can't find start of slur")); else { Grob* slur = slur_l_stack_.pop (); - end_slur_l_arr_.push (slur); - requests_arr_.pop (); + end_slurs_.push (slur); + requestses_.pop (); } } - else if (slur_req_l->get_span_dir () == START) + else if (slur_req->get_span_dir () == START) { // push a new slur onto stack. // (use temp. array to wait for all slur STOPs) Grob* slur = new Spanner (get_property ("Slur")); Slur::set_interface (slur); // cannot remove yet! - start_slur_l_arr.push (slur); - requests_arr_.push (slur_req_l); - announce_grob (slur, slur_req_l->self_scm ()); + start_slurs.push (slur); + requestses_.push (slur_req); + announce_grob (slur, slur_req->self_scm ()); } } - for (int i=0; i < start_slur_l_arr.size (); i++) - slur_l_stack_.push (start_slur_l_arr[i]); - new_slur_req_l_arr_.clear (); + for (int i=0; i < start_slurs.size (); i++) + slur_l_stack_.push (start_slurs[i]); + new_slur_reqs_.clear (); } void Slur_engraver::stop_translation_timestep () { - for (int i = 0; i < end_slur_l_arr_.size (); i++) + for (int i = 0; i < end_slurs_.size (); i++) { - typeset_grob (end_slur_l_arr_[i]); + typeset_grob (end_slurs_[i]); } - end_slur_l_arr_.clear (); + end_slurs_.clear (); } void Slur_engraver::start_translation_timestep () { - new_slur_req_l_arr_.clear (); + new_slur_reqs_.clear (); SCM m = get_property ("automaticMelismata"); if (to_boolean (m)) { diff --git a/lily/slur.cc b/lily/slur.cc index bc7d291bf5..a81985c0e0 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -96,13 +96,13 @@ Slur::de_uglyfy (Grob*me, Slur_bezier_bow* bb, Real default_height) Direction Slur::get_default_dir (Grob*me) { - Link_array encompass_arr = + Link_array encompasses = Pointer_group_interface__extract_grobs (me, (Grob*)0, "note-columns"); Direction d = DOWN; - for (int i=0; i < encompass_arr.size (); i ++) + for (int i=0; i < encompasses.size (); i ++) { - if (Note_column::dir (encompass_arr[i]) < 0) + if (Note_column::dir (encompasses[i]) < 0) { d = UP; break; @@ -138,7 +138,7 @@ Slur::check_slope (Grob *me) SCM s = me->get_grob_property ("slope-limit"); if (gh_number_p (s)) { - Array encompass = get_encompass_offset_arr (me); + Array encompass = get_encompass_offsets (me); Drul_array attachment; attachment[LEFT] = encompass[0]; attachment[RIGHT] = encompass.top (); @@ -262,15 +262,15 @@ Slur::broken_trend_offset (Grob *me, Direction dir) the unbroken slur would have had. */ Offset o; - if (Spanner *mother = dynamic_cast (me->original_l_)) + if (Spanner *mother = dynamic_cast (me->original_)) { - for (int i = dir == LEFT ? 0 : mother->broken_into_l_arr_.size () - 1; - dir == LEFT ? i < mother->broken_into_l_arr_.size () : i > 0; + for (int i = dir == LEFT ? 0 : mother->broken_intos_.size () - 1; + dir == LEFT ? i < mother->broken_intos_.size () : i > 0; dir == LEFT ? i++ : i--) { - if (mother->broken_into_l_arr_[i - dir] == me) + if (mother->broken_intos_[i - dir] == me) { - Grob *neighbour = mother->broken_into_l_arr_[i]; + Grob *neighbour = mother->broken_intos_[i]; if (dir == RIGHT) neighbour->set_grob_property ("direction", me->get_grob_property ("direction")); @@ -315,7 +315,7 @@ Slur::get_attachment (Grob *me, Direction dir, if (Note_column::has_interface (sp->get_bound (dir))) { Grob * n =sp->get_bound (dir); - if ((stem = Note_column::stem_l (n))) + if ((stem = Note_column::get_stem (n))) { Real x_extent; if (Grob *head = Note_column::first_head (n)) @@ -352,7 +352,7 @@ Slur::get_attachment (Grob *me, Direction dir, */ Real stem_thickness = gh_scm2double (stem->get_grob_property ("thickness")) - * stem->paper_l ()->get_var ("linethickness"); + * stem->get_paper ()->get_var ("linethickness"); o += Offset (0.5 * x_extent * (1 + Stem::get_direction (stem)) - ((dir + 1)/2) * stem_thickness @@ -415,19 +415,19 @@ Slur::encompass_offset (Grob*me, Grob **common) { Offset o; - Grob* stem_l = unsmob_grob (col->get_grob_property ("stem")); + Grob* stem = unsmob_grob (col->get_grob_property ("stem")); Direction dir = Directional_element_interface::get (me); - if (!stem_l) + if (!stem) { me->warning (_ ("Slur over rest?")); o[X_AXIS] = col->relative_coordinate (common[X_AXIS], X_AXIS); o[Y_AXIS] = col->relative_coordinate (common[Y_AXIS], Y_AXIS); return o; } - Direction stem_dir = Directional_element_interface::get (stem_l); - o[X_AXIS] = stem_l->relative_coordinate (0, X_AXIS); + Direction stem_dir = Directional_element_interface::get (stem); + o[X_AXIS] = stem->relative_coordinate (0, X_AXIS); /* Simply set x to middle of notehead @@ -440,9 +440,9 @@ Slur::encompass_offset (Grob*me, o[X_AXIS] -= 0.5 * stem_dir * x_extent; if ((stem_dir == dir) - && !stem_l->extent (stem_l, Y_AXIS).empty_b ()) + && !stem->extent (stem, Y_AXIS).empty_b ()) { - o[Y_AXIS] = stem_l->extent (common[Y_AXIS], Y_AXIS)[dir]; + o[Y_AXIS] = stem->extent (common[Y_AXIS], Y_AXIS)[dir]; } else { @@ -458,7 +458,7 @@ Slur::encompass_offset (Grob*me, } Array -Slur::get_encompass_offset_arr (Grob *me) +Slur::get_encompass_offsets (Grob *me) { Spanner*sp = dynamic_cast (me); SCM eltlist = me->get_grob_property ("note-columns"); @@ -469,53 +469,53 @@ Slur::get_encompass_offset_arr (Grob *me) common[X_AXIS] = common[X_AXIS]->common_refpoint (sp->get_bound (RIGHT), X_AXIS); common[X_AXIS] = common[X_AXIS]->common_refpoint (sp->get_bound (LEFT), X_AXIS); - Link_array encompass_arr = ly_scm2grob_array (eltlist); - Array offset_arr; + Link_array encompasses = ly_scm2grobs (eltlist); + Array offsets; Offset origin (me->relative_coordinate (common[X_AXIS], X_AXIS), me->relative_coordinate (common[Y_AXIS], Y_AXIS)); int first = 1; - int last = encompass_arr.size () - 2; + int last = encompasses.size () - 2; - offset_arr.push (get_attachment (me, LEFT, common)); + offsets.push (get_attachment (me, LEFT, common)); /* left is broken edge */ - if (encompass_arr[0] != sp->get_bound (LEFT)) + if (encompasses[0] != sp->get_bound (LEFT)) { first--; // ? - offset_arr[0][Y_AXIS] -= - encompass_arr[0]->relative_coordinate (common[Y_AXIS], Y_AXIS) + offsets[0][Y_AXIS] -= + encompasses[0]->relative_coordinate (common[Y_AXIS], Y_AXIS) - me->relative_coordinate (common[Y_AXIS], Y_AXIS); } /* right is broken edge */ - if (encompass_arr.top () != sp->get_bound (RIGHT)) + if (encompasses.top () != sp->get_bound (RIGHT)) { last++; } for (int i = first; i <= last; i++) { - Offset o (encompass_offset (me, encompass_arr[i], common)); - offset_arr.push (o - origin); + Offset o (encompass_offset (me, encompasses[i], common)); + offsets.push (o - origin); } - offset_arr.push (Offset (sp->spanner_length (), 0) + get_attachment (me, RIGHT,common)); + offsets.push (Offset (sp->spanner_length (), 0) + get_attachment (me, RIGHT,common)); - if (encompass_arr[0] != sp->get_bound (LEFT)) + if (encompasses[0] != sp->get_bound (LEFT)) { - offset_arr.top ()[Y_AXIS] -= encompass_arr.top ()->relative_coordinate (common[Y_AXIS], Y_AXIS) + offsets.top ()[Y_AXIS] -= encompasses.top ()->relative_coordinate (common[Y_AXIS], Y_AXIS) - me->relative_coordinate (common[Y_AXIS], Y_AXIS); } - return offset_arr; + return offsets; } @@ -550,7 +550,7 @@ Slur::brew_molecule (SCM smob) return SCM_EOL; } - Real thick = me->paper_l ()->get_var ("linethickness") * + Real thick = me->get_paper ()->get_var ("linethickness") * gh_scm2double (me->get_grob_property ("thickness")); Bezier one = get_curve (me); @@ -580,7 +580,7 @@ Slur::set_control_points (Grob*me) Real r_0 = gh_scm2double (ly_cdr (r_0_scm)); Real h_inf = staff_space * gh_scm2double (ly_cdr (h_inf_scm)); - Slur_bezier_bow bb (get_encompass_offset_arr (me), + Slur_bezier_bow bb (get_encompass_offsets (me), Directional_element_interface::get (me), h_inf, r_0); @@ -607,7 +607,7 @@ Slur::set_control_points (Grob*me) Real beautiful = length * default_height * sb; - Real area = bb.enclosed_area_f (); + Real area = bb.get_enclosed_area (); /* Slurs that fit beautifully are not ugly @@ -666,7 +666,7 @@ Slur::get_curve (Grob*me) i++; } - Array enc (get_encompass_offset_arr (me)); + Array enc (get_encompass_offsets (me)); Direction dir = Directional_element_interface::get (me); Real x1 = enc[0][X_AXIS]; diff --git a/lily/spaceable-grob.cc b/lily/spaceable-grob.cc index 4b684c6563..5be0e8ded7 100644 --- a/lily/spaceable-grob.cc +++ b/lily/spaceable-grob.cc @@ -82,8 +82,8 @@ Spaceable_grob::add_spring (Grob*me, Grob * p, Real d, Real strength, bool expan #endif Spring_smob spring; - spring.strength_f_ = strength; - spring.distance_f_ = d; + spring.strength_ = strength; + spring.distance_ = d; spring.expand_only_b_ = expand_only; spring.other_ = p; diff --git a/lily/spacing-engraver.cc b/lily/spacing-engraver.cc index fcb5d5c8dc..52db863682 100644 --- a/lily/spacing-engraver.cc +++ b/lily/spacing-engraver.cc @@ -44,7 +44,7 @@ class Spacing_engraver : public Engraver Array now_durations_; Array stopped_durations_; Moment now_; - Spanner * spacing_p_; + Spanner * spacing_; TRANSLATOR_DECLARATIONS(Spacing_engraver); protected: @@ -70,35 +70,35 @@ Rhythmic_tuple::time_compare (Rhythmic_tuple const &h1, Spacing_engraver::Spacing_engraver () { - spacing_p_ = 0; + spacing_ = 0; } void Spacing_engraver::initialize () { - spacing_p_ =new Spanner (get_property ("SpacingSpanner")); - spacing_p_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn"))); - announce_grob(spacing_p_, SCM_EOL); + spacing_ =new Spanner (get_property ("SpacingSpanner")); + spacing_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn"))); + announce_grob(spacing_, SCM_EOL); } void Spacing_engraver::finalize () { Grob * p = unsmob_grob (get_property ("currentCommandColumn")); - spacing_p_->set_bound (RIGHT, p); - typeset_grob (spacing_p_); - spacing_p_ =0; + spacing_->set_bound (RIGHT, p); + typeset_grob (spacing_); + spacing_ =0; } void Spacing_engraver::acknowledge_grob (Grob_info i) { - if (Note_spacing::has_interface (i.grob_l_) || Staff_spacing::has_interface (i.grob_l_)) + if (Note_spacing::has_interface (i.grob_) || Staff_spacing::has_interface (i.grob_)) { - Pointer_group_interface::add_grob (spacing_p_, ly_symbol2scm ("wishes"), i.grob_l_); + Pointer_group_interface::add_grob (spacing_, ly_symbol2scm ("wishes"), i.grob_); } - if (i.grob_l_->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface"))) + if (i.grob_->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface"))) return; /* diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index b8d7b56a25..4cd183f9e4 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -98,7 +98,7 @@ loose_column (Grob *l, Grob *c, Grob *r) if (!l_neighbor || !r_neighbor) return false; - l_neighbor = l_neighbor->column_l(); + l_neighbor = l_neighbor->get_column (); r_neighbor = dynamic_cast (Note_spacing::right_column (r_neighbor)); if (l == l_neighbor && r == r_neighbor) @@ -238,7 +238,7 @@ Spacing_spanner::prune_loose_colunms (Grob*me,Link_array *cols, Rational s while (flip (&d) != LEFT); Rod r; - r.distance_f_ = dists[LEFT] + dists[RIGHT]; + r.distance_ = dists[LEFT] + dists[RIGHT]; r.item_l_drul_[LEFT] = dynamic_cast (cols->elem(i-1)); r.item_l_drul_[RIGHT] = dynamic_cast (cols->elem (i+1)); @@ -270,7 +270,7 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array cols) { Item * wish = dynamic_cast (unsmob_grob (gh_car (s))); - Item * lc = wish->column_l (); + Item * lc = wish->get_column (); Grob * right = Note_spacing::right_column (wish); if (!right) @@ -278,8 +278,8 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array cols) Item * rc = dynamic_cast (right); - int right_rank = Paper_column::rank_i (rc); - int left_rank = Paper_column::rank_i (lc); + int right_rank = Paper_column::get_rank (rc); + int left_rank = Paper_column::get_rank (lc); /* update the left column. @@ -302,7 +302,7 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array cols) && unsmob_grob (gh_car (left_neighs))) { Item * it = dynamic_cast (unsmob_grob (gh_car (left_neighs))); - maxrank = Paper_column::rank_i (it->column_l()); + maxrank = Paper_column::get_rank (it->get_column ()); } if (left_rank >= maxrank) @@ -361,7 +361,7 @@ Spacing_spanner::set_springs (SCM smob) { Grob *me = unsmob_grob (smob); - Link_array all (me->pscore_l_->system_->column_l_arr ()) ; + Link_array all (me->pscore_->system_->columns ()) ; set_explicit_neighbor_columns (all); @@ -376,7 +376,7 @@ Spacing_spanner::set_springs (SCM smob) global_shortest = find_shortest (me, all); if (verbose_global_b) { - progress_indication (_f("Global shortest duration is %s\n", global_shortest.str())); + progress_indication (_f("Global shortest duration is %s\n", global_shortest.string ())); } } prune_loose_colunms (me, &all, global_shortest); @@ -569,7 +569,7 @@ Spacing_spanner::musical_column_spacing (Grob *me, Item * lc, Item *rc, Real inc Item *wish_rcol = Note_spacing::right_column (wish); if (Note_spacing::left_column (wish) != lc - || (wish_rcol != rc && wish_rcol != rc->original_l_)) + || (wish_rcol != rc && wish_rcol != rc->original_)) continue; /* @@ -592,7 +592,7 @@ Spacing_spanner::musical_column_spacing (Grob *me, Item * lc, Item *rc, Real inc max_fixed_note_space = increment; } - bool ragged = to_boolean (me->paper_l ()->get_scmvar ("raggedright")); + bool ragged = to_boolean (me->get_paper ()->get_scmvar ("raggedright")); /* Whatever we do, the fixed space is smaller than the real @@ -704,7 +704,7 @@ Spacing_spanner::breakable_column_spacing (Grob*me, Item* l, Item *r,Moment shor pointer munging. */ - assert (spacing_grob-> column_l () == l); + assert (spacing_grob-> get_column () == l); Staff_spacing::get_spacing_params (spacing_grob, &space, &fixed_space); @@ -749,7 +749,7 @@ Spacing_spanner::breakable_column_spacing (Grob*me, Item* l, Item *r,Moment shor works on all architectures. */ - bool ragged = to_boolean (me->paper_l ()->get_scmvar ("raggedright")); + bool ragged = to_boolean (me->get_paper ()->get_scmvar ("raggedright")); Real strength = (ragged) ? 1.0 : 1 / (max_space - max_fixed); Real distance = (ragged) ? max_fixed : max_space; Spaceable_grob::add_spring (l, r, distance, strength, false); @@ -818,7 +818,7 @@ Spacing_spanner::note_spacing (Grob*me, Grob *lc, Grob *rc, if (! shortest_playing_len.to_bool ()) { - programming_error ("can't find a ruling note at " + Paper_column::when_mom (lc).str ()); + programming_error ("can't find a ruling note at " + Paper_column::when_mom (lc).string ()); shortest_playing_len = 1; } diff --git a/lily/span-arpeggio-engraver.cc b/lily/span-arpeggio-engraver.cc index 3797b2efa9..137c5a7063 100644 --- a/lily/span-arpeggio-engraver.cc +++ b/lily/span-arpeggio-engraver.cc @@ -43,10 +43,10 @@ Span_arpeggio_engraver::Span_arpeggio_engraver () void Span_arpeggio_engraver::acknowledge_grob (Grob_info info) { - if (info.origin_trans_l_arr (this).size () - && Arpeggio::has_interface (info.grob_l_)) + if (info.origin_transes (this).size () + && Arpeggio::has_interface (info.grob_)) { - arpeggios_.push (info.grob_l_); + arpeggios_.push (info.grob_); } } diff --git a/lily/span-bar-engraver.cc b/lily/span-bar-engraver.cc index 3561ce7b69..053a88c7c5 100644 --- a/lily/span-bar-engraver.cc +++ b/lily/span-bar-engraver.cc @@ -25,8 +25,8 @@ */ class Span_bar_engraver : public Engraver { - Item * spanbar_p_; - Link_array bar_l_arr_; + Item * spanbar_; + Link_array bars_; public: TRANSLATOR_DECLARATIONS(Span_bar_engraver); @@ -39,7 +39,7 @@ protected: Span_bar_engraver::Span_bar_engraver () { - spanbar_p_ =0; + spanbar_ =0; } @@ -47,40 +47,40 @@ Span_bar_engraver::Span_bar_engraver () void Span_bar_engraver::acknowledge_grob (Grob_info i) { - int depth = i.origin_trans_l_arr (this).size (); + int depth = i.origin_transes (this).size (); if (depth > 1 - && Bar_line::has_interface (i.grob_l_)) + && Bar_line::has_interface (i.grob_)) { - Item * it = dynamic_cast (i.grob_l_); - bar_l_arr_.push (it); + Item * it = dynamic_cast (i.grob_); + bars_.push (it); - if (bar_l_arr_.size () >= 2 && !spanbar_p_) + if (bars_.size () >= 2 && !spanbar_) { - spanbar_p_ = new Item (get_property ("SpanBar")); + spanbar_ = new Item (get_property ("SpanBar")); - spanbar_p_->set_parent (bar_l_arr_[0], X_AXIS); + spanbar_->set_parent (bars_[0], X_AXIS); - announce_grob (spanbar_p_, SCM_EOL); + announce_grob (spanbar_, SCM_EOL); } } } void Span_bar_engraver::stop_translation_timestep () { - if (spanbar_p_) + if (spanbar_) { - for (int i=0; i < bar_l_arr_.size () ; i++) - Span_bar::add_bar (spanbar_p_,bar_l_arr_[i]); + for (int i=0; i < bars_.size () ; i++) + Span_bar::add_bar (spanbar_,bars_[i]); SCM vissym =ly_symbol2scm ("break-visibility"); - SCM vis = bar_l_arr_[0]->internal_get_grob_property (vissym); - if (scm_equal_p (spanbar_p_->internal_get_grob_property (vissym), vis) != SCM_BOOL_T) - spanbar_p_->internal_set_grob_property (vissym, vis); + SCM vis = bars_[0]->internal_get_grob_property (vissym); + if (scm_equal_p (spanbar_->internal_get_grob_property (vissym), vis) != SCM_BOOL_T) + spanbar_->internal_set_grob_property (vissym, vis); - typeset_grob (spanbar_p_); - spanbar_p_ =0; + typeset_grob (spanbar_); + spanbar_ =0; } - bar_l_arr_.set_size (0); + bars_.set_size (0); } diff --git a/lily/span-bar.cc b/lily/span-bar.cc index 0ee31140fa..45cfa80e15 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -74,7 +74,7 @@ Span_bar::brew_molecule (SCM smobbed_me) if (!gh_string_p (glyph)) return SCM_EOL; - String glyph_str = ly_scm2string (glyph); + String glyph_string = ly_scm2string (glyph); // compose span_bar_mol Molecule span_bar_mol; @@ -101,7 +101,7 @@ Span_bar::brew_molecule (SCM smobbed_me) else { Molecule interbar - = Bar_line::compound_barline (staff_bar, glyph_str, l.length()); + = Bar_line::compound_barline (staff_bar, glyph_string, l.length()); interbar.translate_axis (l.center (), Y_AXIS); span_bar_mol.add_molecule (interbar); } @@ -218,7 +218,7 @@ Span_bar::evaluate_glyph (Grob*me) type = ".|."; } - gl = ly_str02scm (type.ch_C ()); + gl = ly_str02scm (type.to_str0 ()); if (scm_equal_p (me->internal_get_grob_property (glyph_symbol), gl) != SCM_BOOL_T) me->internal_set_grob_property (glyph_symbol, gl); } diff --git a/lily/span-dynamic-performer.cc b/lily/span-dynamic-performer.cc index 46a3b3f8ca..8f6cfc95e0 100644 --- a/lily/span-dynamic-performer.cc +++ b/lily/span-dynamic-performer.cc @@ -13,7 +13,7 @@ struct Audio_dynamic_tuple { - Audio_dynamic* audio_l_; + Audio_dynamic* audio_; Moment mom_; }; @@ -33,12 +33,12 @@ protected: virtual void start_translation_timestep (); private: - Audio_dynamic* audio_p_; + Audio_dynamic* audio_; Real last_volume_; - Span_req* span_start_req_l_; + Span_req* span_start_req_; Drul_array span_req_l_drul_; - Array dynamic_tuple_arr_; - Array finished_dynamic_tuple_arr_; + Array dynamic_tuples_; + Array finished_dynamic_tuples_; Direction dir_; Direction finished_dir_; }; @@ -47,15 +47,15 @@ Span_dynamic_performer::Span_dynamic_performer () { span_req_l_drul_[START] = 0; span_req_l_drul_[STOP] = 0; - span_start_req_l_ = 0; - audio_p_ = 0; + span_start_req_ = 0; + audio_ = 0; last_volume_ = 0; } void Span_dynamic_performer::acknowledge_audio_element (Audio_element_info i) { - if (Audio_dynamic * d = dynamic_cast (i.elem_l_)) + if (Audio_dynamic * d = dynamic_cast (i.elem_)) { last_volume_ = d->volume_; } @@ -64,20 +64,20 @@ Span_dynamic_performer::acknowledge_audio_element (Audio_element_info i) void Span_dynamic_performer::process_music () { - if (span_start_req_l_ || span_req_l_drul_[START]) + if (span_start_req_ || span_req_l_drul_[START]) { - audio_p_ = new Audio_dynamic (0); - Audio_element_info info (audio_p_, span_req_l_drul_[START] + audio_ = new Audio_dynamic (0); + Audio_element_info info (audio_, span_req_l_drul_[START] ? span_req_l_drul_[START] : span_req_l_drul_[STOP]); announce_element (info); - Audio_dynamic_tuple a = { audio_p_, now_mom () }; - dynamic_tuple_arr_.push (a); + Audio_dynamic_tuple a = { audio_, now_mom () }; + dynamic_tuples_.push (a); } if (span_req_l_drul_[STOP]) { - if (!span_start_req_l_) + if (!span_start_req_) { span_req_l_drul_[STOP]->origin ()->warning (_ ("can't find start of (de)crescendo")); span_req_l_drul_[STOP] = 0; @@ -85,34 +85,34 @@ Span_dynamic_performer::process_music () else { finished_dir_ = dir_; - finished_dynamic_tuple_arr_ = dynamic_tuple_arr_; + finished_dynamic_tuples_ = dynamic_tuples_; } - dynamic_tuple_arr_.clear (); - span_start_req_l_ = 0; + dynamic_tuples_.clear (); + span_start_req_ = 0; } if (span_req_l_drul_[START]) { String t = ly_scm2string (span_req_l_drul_[START]->get_mus_property ("span-type")); dir_ = (t == "crescendo") ? RIGHT : LEFT; - span_start_req_l_ = span_req_l_drul_[START]; + span_start_req_ = span_req_l_drul_[START]; - dynamic_tuple_arr_.clear (); - Audio_dynamic_tuple a = { audio_p_, now_mom () }; - dynamic_tuple_arr_.push (a); + dynamic_tuples_.clear (); + Audio_dynamic_tuple a = { audio_, now_mom () }; + dynamic_tuples_.push (a); } if (span_req_l_drul_[STOP]) { - finished_dynamic_tuple_arr_.top ().audio_l_->volume_ = last_volume_; + finished_dynamic_tuples_.top ().audio_->volume_ = last_volume_; } if (span_req_l_drul_[START]) { - dynamic_tuple_arr_[0].audio_l_->volume_ = last_volume_; + dynamic_tuples_[0].audio_->volume_ = last_volume_; } - span_start_req_l_ = 0; + span_start_req_ = 0; span_req_l_drul_[START] = 0; span_req_l_drul_[STOP] = 0; } @@ -120,10 +120,10 @@ Span_dynamic_performer::process_music () void Span_dynamic_performer::stop_translation_timestep () { - if (finished_dynamic_tuple_arr_.size () > 1) + if (finished_dynamic_tuples_.size () > 1) { - Real start_volume = finished_dynamic_tuple_arr_[0].audio_l_->volume_; - Real dv = finished_dynamic_tuple_arr_.top ().audio_l_->volume_ + Real start_volume = finished_dynamic_tuples_[0].audio_->volume_; + Real dv = finished_dynamic_tuples_.top ().audio_->volume_ - start_volume; /* urg. @@ -141,25 +141,25 @@ Span_dynamic_performer::stop_translation_timestep () // urg. 20%: about two volume steps dv = (Real)finished_dir_ * 0.2; if (!start_volume) - start_volume = finished_dynamic_tuple_arr_.top - ().audio_l_->volume_ - dv; + start_volume = finished_dynamic_tuples_.top + ().audio_->volume_ - dv; } - Moment start_mom = finished_dynamic_tuple_arr_[0].mom_; - Moment dt = finished_dynamic_tuple_arr_.top ().mom_ - start_mom; - for (int i=0; i < finished_dynamic_tuple_arr_.size (); i++) + Moment start_mom = finished_dynamic_tuples_[0].mom_; + Moment dt = finished_dynamic_tuples_.top ().mom_ - start_mom; + for (int i=0; i < finished_dynamic_tuples_.size (); i++) { - Audio_dynamic_tuple* a = &finished_dynamic_tuple_arr_[i]; + Audio_dynamic_tuple* a = &finished_dynamic_tuples_[i]; Real volume = start_volume + dv * (Real) (a->mom_ - start_mom).main_part_ / (Real)dt.main_part_; - a->audio_l_->volume_ = volume; + a->audio_->volume_ = volume; } - finished_dynamic_tuple_arr_.clear (); + finished_dynamic_tuples_.clear (); } - if (audio_p_) + if (audio_) { - play_element (audio_p_); - audio_p_ = 0; + play_element (audio_); + audio_ = 0; } } diff --git a/lily/spanner.cc b/lily/spanner.cc index 9859c2b055..09f2367aca 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -32,8 +32,8 @@ Return broken-into list for @var{spanner}. SCM_ASSERT_TYPE (me, spanner, SCM_ARG1, __FUNCTION__, "spanner"); SCM s = SCM_EOL; - for (int i = me->broken_into_l_arr_.size (); i; i--) - s = gh_cons (me->broken_into_l_arr_[i-1]->self_scm (), s); + for (int i = me->broken_intos_.size (); i; i--) + s = gh_cons (me->broken_intos_[i-1]->self_scm (), s); return s; } @@ -57,9 +57,9 @@ Spanner::do_break_processing () { if (!parent->spanned_rank_iv ().contains_b (this->spanned_rank_iv ())) { - programming_error (to_str ("Spanner `%s' is not fully contained in parent spanner `%s'.", - name ().ch_C (), - parent->name ().ch_C ())); + programming_error (to_string ("Spanner `%s' is not fully contained in parent spanner `%s'.", + name ().to_str0 (), + parent->name ().to_str0 ())); } } } @@ -80,20 +80,20 @@ Spanner::do_break_processing () programming_error ("no broken bound"); else if (bound->get_system ()) { - Spanner * span_p = dynamic_cast (clone ()); - span_p->set_bound (LEFT, bound); - span_p->set_bound (RIGHT, bound); + Spanner * span = dynamic_cast (clone ()); + span->set_bound (LEFT, bound); + span->set_bound (RIGHT, bound); - assert (span_p->get_system ()); - span_p->get_system ()->typeset_grob (span_p); - broken_into_l_arr_.push (span_p); + assert (span->get_system ()); + span->get_system ()->typeset_grob (span); + broken_intos_.push (span); } } while ((flip (&d))!= LEFT); } else { - Link_array break_points = pscore_l_->system_->broken_col_range (left,right); + Link_array break_points = pscore_->system_->broken_col_range (left,right); break_points.insert (left,0); break_points.push (right); @@ -117,9 +117,9 @@ Spanner::do_break_processing () continue; } - Spanner *span_p = dynamic_cast (clone ()); - span_p->set_bound (LEFT,bounds[LEFT]); - span_p->set_bound (RIGHT,bounds[RIGHT]); + Spanner *span = dynamic_cast (clone ()); + span->set_bound (LEFT,bounds[LEFT]); + span->set_bound (RIGHT,bounds[RIGHT]); if (!bounds[LEFT]->get_system () @@ -127,16 +127,16 @@ Spanner::do_break_processing () || bounds[LEFT]->get_system () != bounds[RIGHT]->get_system ()) { programming_error ("bounds of spanner are invalid"); - span_p->suicide (); + span->suicide (); } else { - bounds[LEFT]->get_system ()->typeset_grob (span_p); - broken_into_l_arr_.push (span_p); + bounds[LEFT]->get_system ()->typeset_grob (span); + broken_intos_.push (span); } } } - broken_into_l_arr_.sort (Spanner::compare); + broken_intos_.sort (Spanner::compare); } void @@ -158,11 +158,11 @@ Spanner::spanned_rank_iv () if (spanned_drul_[LEFT]) { - iv[LEFT] = Paper_column::rank_i (spanned_drul_[LEFT]->column_l ()); + iv[LEFT] = Paper_column::get_rank (spanned_drul_[LEFT]->get_column ()); } if (spanned_drul_[RIGHT]) { - iv[RIGHT] = Paper_column::rank_i (spanned_drul_[RIGHT]->column_l ()); + iv[RIGHT] = Paper_column::get_rank (spanned_drul_[RIGHT]->get_column ()); } return iv; } @@ -253,25 +253,25 @@ Spanner::get_system () const Grob* Spanner::find_broken_piece (System*l) const { - int idx = binsearch_link_array (broken_into_l_arr_, (Spanner*)l, Spanner::compare); + int idx = binsearch_links (broken_intos_, (Spanner*)l, Spanner::compare); if (idx < 0) return 0; else - return broken_into_l_arr_ [idx]; + return broken_intos_ [idx]; } int Spanner::compare (Spanner * const &p1, Spanner * const &p2) { - return p1->get_system ()->rank_i_ - p2->get_system ()->rank_i_; + return p1->get_system ()->rank_ - p2->get_system ()->rank_; } bool Spanner::broken_b () const { - return broken_into_l_arr_.size (); + return broken_intos_.size (); } @@ -284,7 +284,7 @@ Spanner::broken_b () const Real Spanner::get_broken_left_end_align () const { - Paper_column *sc = dynamic_cast (spanned_drul_[LEFT]->column_l ()); + Paper_column *sc = dynamic_cast (spanned_drul_[LEFT]->get_column ()); // Relevant only if left span point is first column in line if (sc != NULL && @@ -307,7 +307,7 @@ Spanner::do_derived_mark () { /* We'd be fucked if this is called before spanned_drul_[] is inited. */ - if (status_c_ == ORPHAN) + if (status_ == ORPHAN) return SCM_EOL; Direction d = LEFT; @@ -316,8 +316,8 @@ Spanner::do_derived_mark () scm_gc_mark (spanned_drul_[d]->self_scm ()); while (flip (&d) != LEFT); - for (int i= broken_into_l_arr_.size () ; i--;) - scm_gc_mark (broken_into_l_arr_[i]->self_scm ()); + for (int i= broken_intos_.size () ; i--;) + scm_gc_mark (broken_intos_[i]->self_scm ()); return SCM_EOL; } @@ -349,7 +349,7 @@ Spanner::set_spacing_rods (SCM smob) Spanner*sp = dynamic_cast (me); r.item_l_drul_[LEFT] = sp->get_bound (LEFT); r.item_l_drul_[RIGHT] = sp->get_bound (RIGHT); - r.distance_f_ = + r.distance_ = gh_scm2double (me->get_grob_property ("minimum-length")) * 1.0; diff --git a/lily/spring-smob.cc b/lily/spring-smob.cc index 3ab9618ef0..72218e8a7e 100644 --- a/lily/spring-smob.cc +++ b/lily/spring-smob.cc @@ -13,8 +13,8 @@ Spring_smob::Spring_smob() { - distance_f_ =0.; - strength_f_ =1.0; + distance_ =0.; + strength_ =1.0; expand_only_b_ = false; other_ = 0; } @@ -29,7 +29,7 @@ int Spring_smob::print_smob (SCM s, SCM p, scm_print_state *) { Spring_smob *ss = unsmob_spring (s); - scm_puts (_f("#", ss->distance_f_).ch_C(), p); + scm_puts (_f("#", ss->distance_).to_str0 (), p); return 1; } diff --git a/lily/staff-collecting-engraver.cc b/lily/staff-collecting-engraver.cc index 0b1ca24a89..efc7f8df37 100644 --- a/lily/staff-collecting-engraver.cc +++ b/lily/staff-collecting-engraver.cc @@ -26,12 +26,12 @@ Staff_collecting_engraver::Staff_collecting_engraver () void Staff_collecting_engraver::acknowledge_grob (Grob_info gi) { - if (Staff_symbol::has_interface (gi.grob_l_)) + if (Staff_symbol::has_interface (gi.grob_)) { SCM staffs = get_property ("stavesFound"); - staffs = gh_cons (gi.grob_l_->self_scm (), staffs); + staffs = gh_cons (gi.grob_->self_scm (), staffs); - daddy_trans_l_->set_property ("stavesFound", staffs); + daddy_trans_->set_property ("stavesFound", staffs); } } diff --git a/lily/staff-performer.cc b/lily/staff-performer.cc index 2479dc3ae4..56d31210b1 100644 --- a/lily/staff-performer.cc +++ b/lily/staff-performer.cc @@ -23,8 +23,8 @@ public: TRANSLATOR_DECLARATIONS(Staff_performer); ~Staff_performer (); - String new_instrument_str (); - String instrument_str_; + String new_instrument_string (); + String instrument_string_; protected: virtual void play_element (Audio_element* p); @@ -34,22 +34,22 @@ protected: virtual void stop_translation_timestep (); private: - Audio_staff* audio_staff_p_; - Audio_instrument* instrument_p_; - Audio_text* instrument_name_p_; - Audio_text* name_p_; - Audio_tempo* tempo_p_; + Audio_staff* audio_staff_; + Audio_instrument* instrument_; + Audio_text* instrument_name_; + Audio_text* name_; + Audio_tempo* tempo_; }; ENTER_DESCRIPTION (Staff_performer, "","","","","" ); Staff_performer::Staff_performer () { - audio_staff_p_ = 0; - instrument_p_ = 0; - instrument_name_p_ = 0; - name_p_ = 0; - tempo_p_ = 0; + audio_staff_ = 0; + instrument_ = 0; + instrument_name_ = 0; + name_ = 0; + tempo_ = 0; } Staff_performer::~Staff_performer () @@ -59,14 +59,14 @@ Staff_performer::~Staff_performer () void Staff_performer::initialize () { - audio_staff_p_ = new Audio_staff; - announce_element (Audio_element_info (audio_staff_p_, 0)); + audio_staff_ = new Audio_staff; + announce_element (Audio_element_info (audio_staff_, 0)); - name_p_ = new Audio_text (Audio_text::TRACK_NAME, id_str_); - announce_element (Audio_element_info (name_p_, 0)); + name_ = new Audio_text (Audio_text::TRACK_NAME, id_string_); + announce_element (Audio_element_info (name_, 0)); - tempo_p_ = new Audio_tempo (get_tempo_i ()); - announce_element (Audio_element_info (tempo_p_, 0)); + tempo_ = new Audio_tempo (get_tempo ()); + announce_element (Audio_element_info (tempo_, 0)); Performer_group_performer::initialize (); } @@ -74,13 +74,13 @@ Staff_performer::initialize () void Staff_performer::create_audio_elements () { - String str = new_instrument_str (); - if (str.length_i ()) + String str = new_instrument_string (); + if (str.length ()) { - instrument_name_p_ = new Audio_text (Audio_text::INSTRUMENT_NAME, str); - announce_element (Audio_element_info (instrument_name_p_, 0)); - instrument_p_ = new Audio_instrument (str); - announce_element (Audio_element_info (instrument_p_, 0)); + instrument_name_ = new Audio_text (Audio_text::INSTRUMENT_NAME, str); + announce_element (Audio_element_info (instrument_name_, 0)); + instrument_ = new Audio_instrument (str); + announce_element (Audio_element_info (instrument_, 0)); } Performer_group_performer::create_audio_elements (); } @@ -89,27 +89,27 @@ void Staff_performer::stop_translation_timestep () { SCM proc = scm_primitive_eval (ly_symbol2scm ("percussion-p")); - SCM drums_p = gh_call1 (proc, ly_symbol2scm (instrument_str_.ch_C())); - audio_staff_p_->channel_i_ = (drums_p == SCM_BOOL_T ? 9 : -1 ); - if (name_p_) + SCM drums = gh_call1 (proc, ly_symbol2scm (instrument_string_.to_str0 ())); + audio_staff_->channel_ = (drums == SCM_BOOL_T ? 9 : -1 ); + if (name_) { - play_element (name_p_); - name_p_ = 0; + play_element (name_); + name_ = 0; } - if (tempo_p_) + if (tempo_) { - play_element (tempo_p_); - tempo_p_ = 0; + play_element (tempo_); + tempo_ = 0; } - if (instrument_name_p_) + if (instrument_name_) { - play_element (instrument_name_p_); - instrument_name_p_ = 0; + play_element (instrument_name_); + instrument_name_ = 0; } - if (instrument_p_) + if (instrument_) { - play_element (instrument_p_); - instrument_p_ = 0; + play_element (instrument_); + instrument_ = 0; } Performer_group_performer::stop_translation_timestep (); } @@ -118,12 +118,12 @@ void Staff_performer::finalize () { Performer_group_performer::finalize (); - Performer::play_element (audio_staff_p_); - audio_staff_p_ = 0; + Performer::play_element (audio_staff_); + audio_staff_ = 0; } String -Staff_performer::new_instrument_str () +Staff_performer::new_instrument_string () { // mustn't ask Score for instrument: it will return piano! SCM minstr = get_property ("midiInstrument"); @@ -132,12 +132,12 @@ Staff_performer::new_instrument_str () minstr = get_property ("instrument"); if (!gh_string_p (minstr) - || ly_scm2string (minstr) == instrument_str_) + || ly_scm2string (minstr) == instrument_string_) return ""; - instrument_str_ = ly_scm2string (minstr); + instrument_string_ = ly_scm2string (minstr); - return instrument_str_; + return instrument_string_; } void @@ -145,7 +145,7 @@ Staff_performer::play_element (Audio_element* p) { if (Audio_item *ai = dynamic_cast (p)) { - audio_staff_p_->add_audio_item (ai); + audio_staff_->add_audio_item (ai); } Performer::play_element (p); } diff --git a/lily/staff-spacing.cc b/lily/staff-spacing.cc index 09c170db51..cf931c2f23 100644 --- a/lily/staff-spacing.cc +++ b/lily/staff-spacing.cc @@ -33,7 +33,7 @@ Staff_spacing::next_note_correction (Grob * me, if (!g || !Note_column::has_interface (g)) return 0.0; - Item *col =dynamic_cast (g)->column_l (); + Item *col =dynamic_cast (g)->get_column (); Real max_corr = 0. >? (- g->extent (col, X_AXIS)[LEFT]); /* @@ -64,7 +64,7 @@ Staff_spacing::next_note_correction (Grob * me, max_corr *= 0.75; if (!bar_size.empty_b()) - if (Grob *stem = Note_column::stem_l (g)) + if (Grob *stem = Note_column::get_stem (g)) { Direction d = Stem::get_direction (stem); if (d == DOWN) @@ -101,8 +101,8 @@ Staff_spacing::bar_y_positions (Grob *bar_grob) { SCM glyph = bar_grob->get_grob_property ("glyph"); - String glyph_str = gh_string_p (glyph) ? ly_scm2string (glyph) : ""; - if (glyph_str.left_str (1) == "|" || glyph_str.left_str (1) == ".") + String glyph_string = gh_string_p (glyph) ? ly_scm2string (glyph) : ""; + if (glyph_string.left_string (1) == "|" || glyph_string.left_string (1) == ".") { SCM sz = Bar_line::get_staff_bar_size (bar_grob->self_scm()); bar_size = Interval (-1,1); @@ -147,7 +147,7 @@ Grob* Staff_spacing::extremal_break_aligned_grob (Grob *separation_item, Direction d, Interval * last_ext) { - Grob *left_col = dynamic_cast (separation_item)->column_l (); + Grob *left_col = dynamic_cast (separation_item)->get_column (); last_ext->set_empty (); Grob *last_grob = 0; for (SCM s = separation_item->get_grob_property ("elements"); @@ -190,7 +190,7 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed) separation_item = cand ; } - // printf ("doing col %d\n" , Paper_column::rank_i(left_col)); + // printf ("doing col %d\n" , Paper_column::get_rank (left_col)); if (!separation_item) { diff --git a/lily/staff-symbol-engraver.cc b/lily/staff-symbol-engraver.cc index dff7448e12..7e19c900c5 100644 --- a/lily/staff-symbol-engraver.cc +++ b/lily/staff-symbol-engraver.cc @@ -18,7 +18,7 @@ Manage the staff symbol. */ class Staff_symbol_engraver : public Engraver { - Spanner *span_p_; + Spanner *span_; public: TRANSLATOR_DECLARATIONS(Staff_symbol_engraver); @@ -32,39 +32,39 @@ protected: Staff_symbol_engraver::~Staff_symbol_engraver () { - assert (!span_p_); + assert (!span_); } Staff_symbol_engraver::Staff_symbol_engraver () { - span_p_ = 0; + span_ = 0; } void Staff_symbol_engraver::initialize () { - span_p_ = new Spanner (get_property ("StaffSymbol")); + span_ = new Spanner (get_property ("StaffSymbol")); - span_p_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn"))); + span_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn"))); - announce_grob(span_p_, SCM_EOL); + announce_grob(span_, SCM_EOL); } void Staff_symbol_engraver::finalize () { - span_p_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn"))); - typeset_grob (span_p_); - span_p_ =0; + span_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn"))); + typeset_grob (span_); + span_ =0; } void Staff_symbol_engraver::acknowledge_grob (Grob_info s) { - s.grob_l_->set_grob_property ("staff-symbol", span_p_->self_scm ()); + s.grob_->set_grob_property ("staff-symbol", span_->self_scm ()); // remove this. probly not necessary? - s.grob_l_->add_dependency (span_p_); // UGH. UGH. UGH + s.grob_->add_dependency (span_); // UGH. UGH. UGH } diff --git a/lily/staff-symbol-referencer.cc b/lily/staff-symbol-referencer.cc index 2d05d1f11a..fd7bcd2791 100644 --- a/lily/staff-symbol-referencer.cc +++ b/lily/staff-symbol-referencer.cc @@ -22,14 +22,14 @@ Staff_symbol_referencer::has_interface (Grob*e) int Staff_symbol_referencer::line_count (Grob*me) { - Grob *st = staff_symbol_l (me); + Grob *st = get_staff_symbol (me); return st ? Staff_symbol::line_count (st) : 0; } bool Staff_symbol_referencer::on_staffline (Grob*me) { - return on_staffline (me, (int) rint (position_f (me))); + return on_staffline (me, (int) rint (get_position (me))); } bool @@ -40,7 +40,7 @@ Staff_symbol_referencer::on_staffline (Grob*me, int pos) } Grob* -Staff_symbol_referencer::staff_symbol_l (Grob*me) +Staff_symbol_referencer::get_staff_symbol (Grob*me) { SCM st = me->get_grob_property ("staff-symbol"); return unsmob_grob (st); @@ -49,7 +49,7 @@ Staff_symbol_referencer::staff_symbol_l (Grob*me) Real Staff_symbol_referencer::staff_space (Grob*me) { - Grob * st = staff_symbol_l (me); + Grob * st = get_staff_symbol (me); if (st) return Staff_symbol::staff_space (st); @@ -57,10 +57,10 @@ Staff_symbol_referencer::staff_space (Grob*me) } Real -Staff_symbol_referencer::position_f (Grob*me) +Staff_symbol_referencer::get_position (Grob*me) { Real p =0.0; - Grob * st = staff_symbol_l (me); + Grob * st = get_staff_symbol (me); Grob * c = st ? me->common_refpoint (st, Y_AXIS) : 0; if (st && c) { @@ -121,10 +121,10 @@ Staff_symbol_referencer::callback (SCM element_smob, SCM) void Staff_symbol_referencer::set_position (Grob*me,Real p) { - Grob * st = staff_symbol_l (me); + Grob * st = get_staff_symbol (me); if (st && me->common_refpoint (st, Y_AXIS)) { - Real oldpos = position_f (me); + Real oldpos = get_position (me); me->set_grob_property ("staff-position", gh_double2scm (p - oldpos)); } else @@ -153,8 +153,8 @@ Staff_symbol_referencer::staff_radius (Grob*me) int compare_position (Grob *const &a, Grob * const &b) { - return sign (Staff_symbol_referencer::position_f ((Grob*)a) - - Staff_symbol_referencer::position_f ((Grob*)b)); + return sign (Staff_symbol_referencer::get_position ((Grob*)a) - + Staff_symbol_referencer::get_position ((Grob*)b)); } diff --git a/lily/staff-symbol.cc b/lily/staff-symbol.cc index b50a924260..f669bc57f2 100644 --- a/lily/staff-symbol.cc +++ b/lily/staff-symbol.cc @@ -63,9 +63,9 @@ Staff_symbol::brew_molecule (SCM smob) width = 0; } - Real t = me->paper_l ()->get_var ("linethickness"); + Real t = me->get_paper ()->get_var ("linethickness"); SCM my_thick = me->get_grob_property("thickness"); - if (gh_number_p(my_thick)) + if (gh_number_p (my_thick)) t *= gh_scm2double (my_thick); int l = Staff_symbol::line_count (me); @@ -86,7 +86,7 @@ Staff_symbol::brew_molecule (SCM smob) } int -Staff_symbol::steps_i (Grob*me) +Staff_symbol::get_steps (Grob*me) { return line_count (me) * 2; } diff --git a/lily/stanza-number-engraver.cc b/lily/stanza-number-engraver.cc index 813137bc8e..cf64afb4d1 100644 --- a/lily/stanza-number-engraver.cc +++ b/lily/stanza-number-engraver.cc @@ -48,7 +48,7 @@ Stanza_number_engraver::process_music () if (gh_string_p (s) || gh_pair_p (s)) /* - if (i.grob_l_->internal_has_interface (symbol ("lyric-syllable-interface"))) + if (i.grob_->internal_has_interface (symbol ("lyric-syllable-interface"))) Tried catching lyric items to generate stanza numbers, but it spoils lyric spacing. diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index f58edbfaaa..eb2bf92e11 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -30,28 +30,28 @@ protected: virtual bool try_music (Music*); private: - Grob *stem_p_; - Grob *tremolo_p_; - Rhythmic_req *rhythmic_req_l_; - Tremolo_req* tremolo_req_l_; + Grob *stem_; + Grob *tremolo_; + Rhythmic_req *rhythmic_req_; + Tremolo_req* tremolo_req_; }; Stem_engraver::Stem_engraver () { - tremolo_req_l_ = 0; - stem_p_ = 0; - tremolo_p_ = 0; - rhythmic_req_l_ =0; + tremolo_req_ = 0; + stem_ = 0; + tremolo_ = 0; + rhythmic_req_ =0; } void Stem_engraver::acknowledge_grob (Grob_info i) { - Grob* h = i.grob_l_; + Grob* h = i.grob_; if (Rhythmic_head::has_interface (h)) { - if (Rhythmic_head::stem_l (h)) + if (Rhythmic_head::get_stem (h)) return; /* Reverted to the old method so chord tremolos work again. /MB @@ -61,13 +61,13 @@ Stem_engraver::acknowledge_grob (Grob_info i) if (rhythmic_req) duration_log = unsmob_duration (rhythmic_req->get_mus_property ("duration"))-> duration_log (); - if (!stem_p_) + if (!stem_) { - stem_p_ = new Item (get_property ("Stem")); + stem_ = new Item (get_property ("Stem")); - stem_p_->set_grob_property ("duration-log", gh_int2scm (duration_log)); + stem_->set_grob_property ("duration-log", gh_int2scm (duration_log)); - if (tremolo_req_l_) + if (tremolo_req_) { /* Stem tremolo is never applied to a note by default, @@ -78,18 +78,18 @@ Stem_engraver::acknowledge_grob (Grob_info i) the first and last (quarter) note bothe get one tremolo flag. */ - int requested_type = gh_scm2int (tremolo_req_l_->get_mus_property ("tremolo-type")); + int requested_type = gh_scm2int (tremolo_req_->get_mus_property ("tremolo-type")); SCM f = get_property ("tremoloFlags"); if (!requested_type && gh_number_p (f)) requested_type = gh_scm2int (f); else - daddy_trans_l_->set_property ("tremoloFlags", gh_int2scm (requested_type)); + daddy_trans_->set_property ("tremoloFlags", gh_int2scm (requested_type)); if (requested_type) { - tremolo_p_ = new Item (get_property ("StemTremolo")); - announce_grob(tremolo_p_, tremolo_req_l_->self_scm()); + tremolo_ = new Item (get_property ("StemTremolo")); + announce_grob(tremolo_, tremolo_req_->self_scm()); /* The number of tremolo flags is the number of flags of @@ -100,50 +100,50 @@ Stem_engraver::acknowledge_grob (Grob_info i) - (duration_log > 2 ? duration_log - 2 : 0); if (tremolo_flags < 0) tremolo_flags = 0; - tremolo_p_->set_grob_property ("flag-count", + tremolo_->set_grob_property ("flag-count", gh_int2scm (tremolo_flags)); - tremolo_p_->set_parent (stem_p_, X_AXIS); + tremolo_->set_parent (stem_, X_AXIS); } } /* We announce the cause of the head as cause of the stem. The stem needs a rhythmic structure to fit it into a beam. */ - announce_grob(stem_p_, i.music_cause ()->self_scm()); + announce_grob(stem_, i.music_cause ()->self_scm()); } - if (Stem::duration_log (stem_p_) != duration_log) + if (Stem::duration_log (stem_) != duration_log) { - i.music_cause ()->origin ()->warning (_f ("Adding note head to incompatible stem (type = %d)", 1 << Stem::duration_log (stem_p_))); + i.music_cause ()->origin ()->warning (_f ("Adding note head to incompatible stem (type = %d)", 1 << Stem::duration_log (stem_))); } - Stem::add_head (stem_p_,h); + Stem::add_head (stem_,h); } } void Stem_engraver::stop_translation_timestep () { - if (tremolo_p_) + if (tremolo_) { - Stem_tremolo::set_stem (tremolo_p_, stem_p_); - typeset_grob (tremolo_p_); - tremolo_p_ = 0; + Stem_tremolo::set_stem (tremolo_, stem_); + typeset_grob (tremolo_); + tremolo_ = 0; } - if (stem_p_) + if (stem_) { SCM prop = get_property ("stemLeftBeamCount"); if (gh_number_p (prop)) { - Stem::set_beaming (stem_p_,gh_scm2int (prop),LEFT); - daddy_trans_l_->unset_property (ly_symbol2scm ("stemLeftBeamCount")); + Stem::set_beaming (stem_,gh_scm2int (prop),LEFT); + daddy_trans_->unset_property (ly_symbol2scm ("stemLeftBeamCount")); } prop = get_property ("stemRightBeamCount"); if (gh_number_p (prop)) { - Stem::set_beaming (stem_p_,gh_scm2int (prop), RIGHT); - daddy_trans_l_->unset_property (ly_symbol2scm ("stemRightBeamCount")); + Stem::set_beaming (stem_,gh_scm2int (prop), RIGHT); + daddy_trans_->unset_property (ly_symbol2scm ("stemRightBeamCount")); } @@ -158,18 +158,18 @@ Stem_engraver::stop_translation_timestep () (docme) */ - SCM dir = stem_p_->get_grob_property ("direction"); + SCM dir = stem_->get_grob_property ("direction"); if (gh_number_p (dir) && to_dir (dir)) { - stem_p_->set_grob_property ("dir-forced", SCM_BOOL_T); + stem_->set_grob_property ("dir-forced", SCM_BOOL_T); } - typeset_grob (stem_p_); - stem_p_ = 0; + typeset_grob (stem_); + stem_ = 0; } - tremolo_req_l_ = 0; + tremolo_req_ = 0; } bool @@ -177,7 +177,7 @@ Stem_engraver::try_music (Music* r) { if (Tremolo_req* a = dynamic_cast (r)) { - tremolo_req_l_ = a; + tremolo_req_ = a; return true; } return false; diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc index 7151943e7a..06c9d7991e 100644 --- a/lily/stem-tremolo.cc +++ b/lily/stem-tremolo.cc @@ -61,7 +61,7 @@ Stem_tremolo::brew_molecule (SCM smob) { Grob *me= unsmob_grob (smob); Grob * stem = unsmob_grob (me->get_grob_property ("stem")); - Grob * beam = Stem::beam_l (stem); + Grob * beam = Stem::get_beam (stem); Real dydx; if (beam) diff --git a/lily/stem.cc b/lily/stem.cc index fb0243ae45..ceefac9709 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -65,8 +65,8 @@ Stem::head_positions (Grob*me) Drul_array e (extremal_heads (me)); - return Interval (Staff_symbol_referencer::position_f (e[DOWN]), - Staff_symbol_referencer::position_f (e[UP])); + return Interval (Staff_symbol_referencer::get_position (e[DOWN]), + Staff_symbol_referencer::get_position (e[UP])); } @@ -193,7 +193,7 @@ Stem::extremal_heads (Grob*me) Grob * n = unsmob_grob (ly_car (s)); - int p = int (Staff_symbol_referencer::position_f (n)); + int p = int (Staff_symbol_referencer::get_position (n)); Direction d = LEFT; do { @@ -221,7 +221,7 @@ Stem::note_head_positions (Grob *me) for (SCM s = me->get_grob_property ("note-heads"); gh_pair_p (s); s = ly_cdr (s)) { Grob * n = unsmob_grob (ly_car (s)); - int p = int (Staff_symbol_referencer::position_f (n)); + int p = int (Staff_symbol_referencer::get_position (n)); ps.push (p); } @@ -246,7 +246,7 @@ Stem::add_head (Grob*me, Grob *n) bool Stem::invisible_b (Grob*me) { - return ! (head_count (me) && Note_head::balltype_i (support_head (me)) >= 1); + return ! (head_count (me) && Note_head::get_balltype (support_head (me)) >= 1); } Direction @@ -342,16 +342,16 @@ Stem::get_default_stem_end_position (Grob*me) good typesetting practice. */ - if (!beam_l (me) && dir == UP + if (!get_beam (me) && dir == UP && duration_log (me) > 2) { Grob * closest_to_flag = extremal_heads (me)[dir]; Grob * dots = closest_to_flag - ? Rhythmic_head::dots_l (closest_to_flag ) : 0; + ? Rhythmic_head::get_dots (closest_to_flag ) : 0; if (dots) { - Real dp = Staff_symbol_referencer::position_f (dots); + Real dp = Staff_symbol_referencer::get_position (dots); Real flagy = flag (me).extent (Y_AXIS)[-dir] * 2 / Staff_symbol_referencer::staff_space (me); @@ -414,7 +414,7 @@ Stem::position_noteheads (Grob*me) Real thick = 0.0; if (invisible) thick = gh_scm2double (me->get_grob_property ("thickness")) - * me->paper_l ()->get_var ("linethickness"); + * me->get_paper ()->get_var ("linethickness"); Grob *hed = support_head (me); @@ -426,10 +426,10 @@ Stem::position_noteheads (Grob*me) } bool parity= true; // todo: make me settable. - int lastpos = int (Staff_symbol_referencer::position_f (heads[0])); + int lastpos = int (Staff_symbol_referencer::get_position (heads[0])); for (int i=1; i < heads.size (); i ++) { - Real p = Staff_symbol_referencer::position_f (heads[i]); + Real p = Staff_symbol_referencer::get_position (heads[i]); int dy =abs (lastpos- (int)p); if (dy <= 1) @@ -538,7 +538,7 @@ Stem::flag (Grob*me) } bool adjust = to_boolean (me->get_grob_property ("adjust-if-on-staffline")); - if (String::compare_i (style, "mensural") == 0) + if (String::compare (style, "mensural") == 0) /* Mensural notation: For notes on staff lines, use different flags than for notes between staff lines. The idea is that flags are always vertically aligned with the staff lines, @@ -574,7 +574,7 @@ Stem::flag (Grob*me) */ Grob *first = first_head(me); int sz = Staff_symbol_referencer::line_count (me)-1; - int p = (int)rint (Staff_symbol_referencer::position_f (first)); + int p = (int)rint (Staff_symbol_referencer::get_position (first)); staffline_offs = (((p ^ sz) & 0x1) == 0) ? "1" : "0"; } else @@ -587,12 +587,12 @@ Stem::flag (Grob*me) staffline_offs = ""; } char c = (get_direction (me) == UP) ? 'u' : 'd'; - String index_str - = String ("flags-") + style + to_str (c) + staffline_offs + to_str (duration_log (me)); + String index_string + = String ("flags-") + style + to_string (c) + staffline_offs + to_string (duration_log (me)); Molecule m - = Font_interface::get_default_font (me)->find_by_name (index_str); + = Font_interface::get_default_font (me)->find_by_name (index_string); if (!fstyle.empty_b ()) - m.add_molecule (Font_interface::get_default_font (me)->find_by_name (String ("flags-") + to_str (c) + fstyle)); + m.add_molecule (Font_interface::get_default_font (me)->find_by_name (String ("flags-") + to_string (c) + fstyle)); return m; } @@ -644,14 +644,14 @@ Stem::brew_molecule (SCM smob) Grob * lh = last_head (me); if (!lh) return SCM_EOL; - y1 = Staff_symbol_referencer::position_f (lh); + y1 = Staff_symbol_referencer::get_position (lh); } else { Grob * lh = first_head (me); if (!lh) return SCM_EOL; - y1 = Staff_symbol_referencer::position_f (lh); + y1 = Staff_symbol_referencer::get_position (lh); } Real y2 = stem_end_position (me); @@ -678,14 +678,14 @@ Stem::brew_molecule (SCM smob) { Real stem_width = gh_scm2double (me->get_grob_property ("thickness")) // URG - * me->paper_l ()->get_var ("linethickness"); + * me->get_paper ()->get_var ("linethickness"); Molecule ss =Lookup::filledbox (Box (Interval (-stem_width/2, stem_width/2), Interval (stem_y[DOWN]*dy, stem_y[UP]*dy))); mol.add_molecule (ss); } - if (!beam_l (me) && abs (duration_log (me)) > 2) + if (!get_beam (me) && abs (duration_log (me)) > 2) { Molecule fl = flag (me); fl.translate_axis (stem_y[d]*dy, Y_AXIS); @@ -738,7 +738,7 @@ Stem::off_callback (SCM element_smob, SCM) { Real rule_thick = gh_scm2double (me->get_grob_property ("thickness")) - * me->paper_l ()->get_var ("linethickness"); + * me->get_paper ()->get_var ("linethickness"); r += - d * rule_thick * 0.5; @@ -750,7 +750,7 @@ Stem::off_callback (SCM element_smob, SCM) Grob* -Stem::beam_l (Grob*me) +Stem::get_beam (Grob*me) { SCM b= me->get_grob_property ("beam"); return unsmob_grob (b); @@ -798,7 +798,7 @@ Stem::calc_stem_info (Grob*me) Real staff_space = Staff_symbol_referencer::staff_space (me); Real half_space = staff_space / 2; - Grob * beam = beam_l (me); + Grob * beam = get_beam (me); int beam_count = beam_multiplicity(me).length()+1; Real beam_translation= Beam::get_beam_translation (beam); Real thick = gh_scm2double (beam->get_grob_property ("thickness")); diff --git a/lily/streams.cc b/lily/streams.cc index 3214cabcfa..ebc42cc15f 100644 --- a/lily/streams.cc +++ b/lily/streams.cc @@ -30,9 +30,9 @@ open_file_stream (String filename, int mode) { Path p = split_path (filename); if (!p.dir.empty_b ()) - if (mkdir (p.dir.ch_C (), 0777) == -1 && errno != EEXIST) + if (mkdir (p.dir.to_str0 (), 0777) == -1 && errno != EEXIST) error (_f ("can't create directory: `%s'", p.dir)); - os = new std::ofstream (filename.ch_C (), mode); + os = new std::ofstream (filename.to_str0 (), mode); } if (!*os) error (_f ("can't open file: `%s'", filename)); diff --git a/lily/sustain-pedal.cc b/lily/sustain-pedal.cc index 8c0cbed08f..c679e55ed0 100644 --- a/lily/sustain-pedal.cc +++ b/lily/sustain-pedal.cc @@ -46,16 +46,16 @@ Sustain_pedal::brew_molecule (SCM smob) return mol.smobbed_copy (); String text = ly_scm2string (glyph); - for (int i = 0; i < text.length_i (); i++) + for (int i = 0; i < text.length (); i++) { String idx ("pedal-"); - if (text.cut_str (i, 3) == "Ped") + if (text.cut_string (i, 3) == "Ped") { idx += "Ped"; i += 2; } else - idx += String (&text.byte_C ()[i], 1); + idx += String (&text.to_bytes ()[i], 1); Molecule m = Font_interface::get_default_font (e)->find_by_name (idx); if (!m.empty_b ()) mol.add_at_edge (X_AXIS, RIGHT, m, 0); diff --git a/lily/syllable-group.cc b/lily/syllable-group.cc index 506f6a466d..0c180e78e7 100644 --- a/lily/syllable-group.cc +++ b/lily/syllable-group.cc @@ -25,25 +25,25 @@ Syllable_group::Syllable_group () void Syllable_group::clear () { - notehead_l_=0; + notehead_=0; lyric_list_.clear (); - longest_lyric_l_=0; - shortest_lyric_l_=0; + longest_lyric_=0; + shortest_lyric_=0; melisma_b_ = false; - group_translation_f_ = 0.0; + group_translation_ = 0.0; } void Syllable_group::copy (Syllable_group *from) { - notehead_l_ = from->notehead_l_; + notehead_ = from->notehead_; lyric_list_ = from->lyric_list_; - longest_lyric_l_ = from->longest_lyric_l_; - shortest_lyric_l_ = from->shortest_lyric_l_; + longest_lyric_ = from->longest_lyric_; + shortest_lyric_ = from->shortest_lyric_; melisma_b_ = from->melisma_b_; - alignment_i_ = from->alignment_i_; + alignment_ = from->alignment_; first_in_phrase_b_ = from->first_in_phrase_b_; - group_translation_f_ = from->group_translation_f_; + group_translation_ = from->group_translation_; } void @@ -55,9 +55,9 @@ Syllable_group::set_first_in_phrase (bool f) void Syllable_group::set_notehead (Grob * notehead) { - if (!notehead_l_) { + if (!notehead_) { /* there should only be a single notehead, so silently ignore any extras */ - notehead_l_=notehead; + notehead_=notehead; } } @@ -66,21 +66,21 @@ Syllable_group::add_lyric (Grob * lyric) { lyric_list_.push (lyric); /* record longest and shortest lyrics */ - if (longest_lyric_l_) { - if (lyric->extent (lyric,X_AXIS).length () > (longest_lyric_l_->extent (longest_lyric_l_, X_AXIS)).length ()) - longest_lyric_l_ = lyric; - if (lyric->extent (lyric, X_AXIS).length () < (shortest_lyric_l_->extent (shortest_lyric_l_, X_AXIS)).length ()) - shortest_lyric_l_ = lyric; + if (longest_lyric_) { + if (lyric->extent (lyric,X_AXIS).length () > (longest_lyric_->extent (longest_lyric_, X_AXIS)).length ()) + longest_lyric_ = lyric; + if (lyric->extent (lyric, X_AXIS).length () < (shortest_lyric_->extent (shortest_lyric_, X_AXIS)).length ()) + shortest_lyric_ = lyric; } else - longest_lyric_l_ = shortest_lyric_l_ = lyric; + longest_lyric_ = shortest_lyric_ = lyric; } void Syllable_group::add_extender (Grob * extender) { - if (notehead_l_ && melisma_b_) { - dynamic_cast (extender)->set_bound (RIGHT, notehead_l_); + if (notehead_ && melisma_b_) { + dynamic_cast (extender)->set_bound (RIGHT, notehead_); // should the extender finish at the right of the last note of the melisma, or the left? // Comments in lyric-extender.hh say left, but right looks better to me. GP. @@ -90,12 +90,12 @@ Syllable_group::add_extender (Grob * extender) // Right: Real ss = 1.0; extender->set_grob_property ("right-trim-amount", - gh_double2scm (-notehead_l_->extent (notehead_l_, X_AXIS).length ()/ss)); + gh_double2scm (-notehead_->extent (notehead_, X_AXIS).length ()/ss)); } } bool -Syllable_group::set_lyric_align (const char *punc, Grob *default_notehead_l) +Syllable_group::set_lyric_align (const char *punc, Grob *default_notehead) { if (lyric_list_.size ()==0) { // No lyrics: nothing to do. @@ -103,29 +103,29 @@ Syllable_group::set_lyric_align (const char *punc, Grob *default_notehead_l) } Grob * lyric; - alignment_i_ = appropriate_alignment (punc); + alignment_ = appropriate_alignment (punc); // If there was no notehead in the matching voice context, use the first // notehead caught from any voice context (any port in a storm). - if (!notehead_l_) { - notehead_l_ = default_notehead_l; + if (!notehead_) { + notehead_ = default_notehead; } - group_translation_f_ = amount_to_translate (); + group_translation_ = amount_to_translate (); // set the x alignment of each lyric for (int l = 0; l < lyric_list_.size (); l++) { lyric = lyric_list_[l]; - lyric->set_grob_property ("self-alignment-X", gh_int2scm (alignment_i_)); + lyric->set_grob_property ("self-alignment-X", gh_int2scm (alignment_)); // centre on notehead ... if we have one. - if (notehead_l_) { - lyric->set_parent (notehead_l_, X_AXIS); + if (notehead_) { + lyric->set_parent (notehead_, X_AXIS); lyric->add_offset_callback (Self_alignment_interface::centered_on_parent_proc, X_AXIS); // reference is on the right of the notehead; move it left half way, and add translation - lyric->translate_axis (group_translation_f_- (notehead_l_->extent (notehead_l_, X_AXIS)).center (), X_AXIS); + lyric->translate_axis (group_translation_- (notehead_->extent (notehead_, X_AXIS)).center (), X_AXIS); } } - return (notehead_l_); + return (notehead_); } /** determine the distance to translate lyrics to get correct alignment @@ -140,22 +140,22 @@ Real Syllable_group::amount_to_translate () { Real translate = 0.0; - if (alignment_i_ != CENTER) { - switch (alignment_i_) { + if (alignment_ != CENTER) { + switch (alignment_) { // FIXME: do we really know the lyric extent here? Some font sizing comes later? case LEFT: - translate = longest_lyric_l_->extent (longest_lyric_l_, X_AXIS).length () / gh_scm2double (longest_lyric_l_->get_grob_property("begin-alignment")); + translate = longest_lyric_->extent (longest_lyric_, X_AXIS).length () / gh_scm2double (longest_lyric_->get_grob_property("begin-alignment")); break; case RIGHT: - translate = longest_lyric_l_->extent (longest_lyric_l_, X_AXIS).length () / gh_scm2double (longest_lyric_l_->get_grob_property("end-alignment")); + translate = longest_lyric_->extent (longest_lyric_, X_AXIS).length () / gh_scm2double (longest_lyric_->get_grob_property("end-alignment")); break; } - if (!gh_scm2bool(longest_lyric_l_->get_grob_property("ignore-length-mismatch"))) { - Real l = shortest_lyric_l_->extent (shortest_lyric_l_, X_AXIS).length (); + if (!gh_scm2bool(longest_lyric_->get_grob_property("ignore-length-mismatch"))) { + Real l = shortest_lyric_->extent (shortest_lyric_, X_AXIS).length (); translate = l longest_lyric_l_->get_grob_property ("alignment"); + SCM s=this->longest_lyric_->get_grob_property ("alignment"); if (s!=SCM_EOL) { return gh_scm2int (s); } @@ -185,10 +185,10 @@ Syllable_group::appropriate_alignment (const char *punc) for (int l = 0; l < lyric_list_.size () && end_phrase; l++) { lyric = lyric_list_[l]; SCM lyric_scm = lyric->get_grob_property ("text"); - String lyric_str = gh_string_p (lyric_scm)?ly_scm2string (lyric_scm):""; + String lyric_string = gh_string_p (lyric_scm)?ly_scm2string (lyric_scm):""; char lastchar; - if (lyric_str.length_i ()>0) { - lastchar = lyric_str[lyric_str.length_i ()-1]; + if (lyric_string.length ()>0) { + lastchar = lyric_string[lyric_string.length ()-1]; /* If it doesn't end in punctuation then it ain't an end of phrase */ if (! strchr (punc, lastchar)) { /* @@ -204,8 +204,8 @@ Syllable_group::appropriate_alignment (const char *punc) FIXME: The extra space throws alignment out a bit. */ if (lastchar == ' ') { - if (lyric_str.length_i ()>1) { - lastchar = lyric_str[lyric_str.length_i ()-2]; + if (lyric_string.length ()>1) { + lastchar = lyric_string[lyric_string.length ()-2]; if (strchr (punc, lastchar)) end_phrase=false; } @@ -227,20 +227,20 @@ Syllable_group::appropriate_alignment (const char *punc) void Syllable_group::adjust_melisma_align () { - if (notehead_l_ && lyric_list_.size ()) { + if (notehead_ && lyric_list_.size ()) { // override any previous offset adjustments - Real translation = -group_translation_f_; + Real translation = -group_translation_; // melisma aligning: - switch (alignment_i_) { + switch (alignment_) { // case LEFT: // that's all case CENTER: // move right so smallest lyric is left-aligned on notehead - translation += (shortest_lyric_l_->extent (shortest_lyric_l_, X_AXIS)).length ()/2; + translation += (shortest_lyric_->extent (shortest_lyric_, X_AXIS)).length ()/2; break; case RIGHT: // move right so smallest lyric is left-aligned on notehead - translation += (shortest_lyric_l_->extent (shortest_lyric_l_, X_AXIS)).length (); + translation += (shortest_lyric_->extent (shortest_lyric_, X_AXIS)).length (); break; } - group_translation_f_ += translation; + group_translation_ += translation; for (int l = 0; l < lyric_list_.size (); l++) { lyric_list_[l]->translate_axis (translation, X_AXIS); } @@ -257,7 +257,7 @@ Syllable_group::is_empty () void Syllable_group::next_lyric () { - first_in_phrase_b_ = (alignment_i_ == RIGHT); + first_in_phrase_b_ = (alignment_ == RIGHT); clear (); } diff --git a/lily/system-start-delimiter-engraver.cc b/lily/system-start-delimiter-engraver.cc index bb2eac76cf..0a577fd27d 100644 --- a/lily/system-start-delimiter-engraver.cc +++ b/lily/system-start-delimiter-engraver.cc @@ -32,17 +32,17 @@ protected: void System_start_delimiter_engraver::acknowledge_grob (Grob_info inf) { - if (Staff_symbol::has_interface (inf.grob_l_)) + if (Staff_symbol::has_interface (inf.grob_)) { /* don't add as Axis_group_interface::add_element (delim_,), because that would set the parent as well */ - Pointer_group_interface::add_grob (delim_, ly_symbol2scm ("elements"), inf.grob_l_); + Pointer_group_interface::add_grob (delim_, ly_symbol2scm ("elements"), inf.grob_); } - else if (System_start_delimiter::has_interface (inf.grob_l_)) + else if (System_start_delimiter::has_interface (inf.grob_)) { - SCM gl = inf.grob_l_->get_grob_property ("glyph"); + SCM gl = inf.grob_->get_grob_property ("glyph"); SCM my_gl = delim_->get_grob_property ("glyph"); /* @@ -50,13 +50,13 @@ System_start_delimiter_engraver::acknowledge_grob (Grob_info inf) */ if (gh_string_p (gl) && gh_equal_p (gl, ly_str02scm ("brace")) && gh_string_p (my_gl) && gh_equal_p (my_gl, ly_str02scm ("bracket"))) - inf.grob_l_->translate_axis (-0.8, X_AXIS); // ugh + inf.grob_->translate_axis (-0.8, X_AXIS); // ugh else if (gh_string_p (gl) && gh_equal_p (gl, ly_str02scm ("bracket")) && gh_string_p (my_gl) && gh_equal_p (my_gl, ly_str02scm ("bracket"))) { - inf.grob_l_->translate_axis ( -0.8, X_AXIS); // ugh - inf.grob_l_->set_grob_property ("arch-height", - gh_double2scm(gh_scm2double(inf.grob_l_->get_grob_property + inf.grob_->translate_axis ( -0.8, X_AXIS); // ugh + inf.grob_->set_grob_property ("arch-height", + gh_double2scm(gh_scm2double(inf.grob_->get_grob_property ("arch-height"))+0.5)); } } diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index b19ca86d3b..c3a7db4b14 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -62,7 +62,7 @@ Will not fix it since I'm not sure. Molecule System_start_delimiter::simple_bar (Grob*me,Real h) { - Real w = me->paper_l ()->get_var ("linethickness") * + Real w = me->get_paper ()->get_var ("linethickness") * gh_scm2double (me->get_grob_property ("thickness")); return Lookup::filledbox (Box (Interval (0,w), Interval (-h/2, h/2))); } diff --git a/lily/system.cc b/lily/system.cc index cf353f92cc..94ca07ebe3 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -36,7 +36,7 @@ fixup_refpoints (SCM s) System::System (SCM s) : Spanner (s) { - rank_i_ = 0; + rank_ = 0; } int @@ -46,11 +46,11 @@ System::element_count () const } void -System::typeset_grob (Grob * elem_p) +System::typeset_grob (Grob * elem) { - elem_p->pscore_l_ = pscore_l_; - Pointer_group_interface::add_grob (this, ly_symbol2scm ("all-elements"),elem_p); - scm_gc_unprotect_object (elem_p->self_scm ()); + elem->pscore_ = pscore_; + Pointer_group_interface::add_grob (this, ly_symbol2scm ("all-elements"),elem); + scm_gc_unprotect_object (elem->self_scm ()); } void @@ -81,9 +81,9 @@ System::output_lines () fixups must be done in broken line_of_scores, because new elements are put over there. */ int count = 0; - for (int i=0; i < broken_into_l_arr_.size (); i++) + for (int i=0; i < broken_intos_.size (); i++) { - Grob *se = broken_into_l_arr_[i]; + Grob *se = broken_intos_[i]; SCM all = se->get_grob_property ("all-elements"); for (SCM s = all; gh_pair_p (s); s = ly_cdr (s)) { @@ -109,21 +109,21 @@ System::output_lines () progress_indication (_f ("Element count %d.", count + element_count ())); - for (int i=0; i < broken_into_l_arr_.size (); i++) + for (int i=0; i < broken_intos_.size (); i++) { - System *system = dynamic_cast (broken_into_l_arr_[i]); + System *system = dynamic_cast (broken_intos_[i]); if (verbose_global_b) progress_indication ("["); - system->post_processing (i+1 == broken_into_l_arr_.size ()); + system->post_processing (i+1 == broken_intos_.size ()); if (verbose_global_b) { - progress_indication (to_str (i)); + progress_indication (to_string (i)); progress_indication ("]"); } - if (i < broken_into_l_arr_.size () - 1) + if (i < broken_intos_.size () - 1) { SCM lastcol = ly_car (system->get_grob_property ("columns")); Grob* e = unsmob_grob (lastcol); @@ -132,7 +132,7 @@ System::output_lines () SCM inter = e->internal_get_grob_property (between); if (gh_string_p (inter)) { - pscore_l_->outputter_l_ + pscore_->outputter_ ->output_scheme (scm_list_n (between, inter, SCM_UNDEFINED)); } @@ -176,12 +176,12 @@ set_loose_columns (System* which, Column_x_positions const *posns) if (!left && l) { - left = l->column_l (); + left = l->get_column (); } divide_over ++; - loose = right = r->column_l (); + loose = right = r->get_column (); } while (1); @@ -258,10 +258,10 @@ System::break_into_pieces (Array const &breaking) for (int i=0; i < breaking.size (); i++) { System *system = dynamic_cast (clone ()); - system->rank_i_ = i; + system->rank_ = i; // system->set_immutable_grob_property ("rank", gh_int2scm (i)); Link_array c (breaking[i].cols_); - pscore_l_->typeset_line (system); + pscore_->typeset_line (system); system->set_bound (LEFT,c[0]); system->set_bound (RIGHT,c.top ()); @@ -271,7 +271,7 @@ System::break_into_pieces (Array const &breaking) dynamic_cast (c[j])->system_ = system; } set_loose_columns (system, &breaking[i]); - broken_into_l_arr_.push (system); + broken_intos_.push (system); } } @@ -291,8 +291,8 @@ System::output_molecule (SCM expr, Offset o) Input * ip = unsmob_input (head); - pscore_l_->outputter_l_->output_scheme (scm_list_n (ly_symbol2scm ("define-origin"), - ly_str02scm (ip->file_str ().ch_C ()), + pscore_->outputter_->output_scheme (scm_list_n (ly_symbol2scm ("define-origin"), + ly_str02scm (ip->file_string ().to_str0 ()), gh_int2scm (ip->line_number ()), gh_int2scm (ip->column_number ()), SCM_UNDEFINED)); @@ -300,7 +300,7 @@ System::output_molecule (SCM expr, Offset o) } else if (head == ly_symbol2scm ("no-origin")) { - pscore_l_->outputter_l_->output_scheme (scm_list_n (head, SCM_UNDEFINED)); + pscore_->outputter_->output_scheme (scm_list_n (head, SCM_UNDEFINED)); expr = ly_cadr (expr); } else if (head == ly_symbol2scm ("translate-molecule")) @@ -315,7 +315,7 @@ System::output_molecule (SCM expr, Offset o) } else { - pscore_l_->outputter_l_-> + pscore_->outputter_-> output_scheme (scm_list_n (ly_symbol2scm ("placebox"), gh_double2scm (o[X_AXIS]), gh_double2scm (o[Y_AXIS]), @@ -330,7 +330,7 @@ System::output_molecule (SCM expr, Offset o) void System::output_scheme (SCM s) { - pscore_l_->outputter_l_->output_scheme (s); + pscore_->outputter_->output_scheme (s); } void @@ -340,7 +340,7 @@ System::add_column (Paper_column*p) SCM cs = me->get_grob_property ("columns"); Grob * prev = gh_pair_p (cs) ? unsmob_grob (ly_car (cs)) : 0; - p->rank_i_ = prev ? Paper_column::rank_i (prev) + 1 : 0; + p->rank_ = prev ? Paper_column::get_rank (prev) + 1 : 0; me->set_grob_property ("columns", gh_cons (p->self_scm (), cs)); @@ -419,7 +419,7 @@ System::post_processing (bool last_line) /* font defs; */ - SCM font_names = ly_quote_scm (paper_l ()->font_descriptions ()); + SCM font_names = ly_quote_scm (get_paper ()->font_descriptions ()); output_scheme (scm_list_n (ly_symbol2scm ("define-fonts"), font_names, SCM_UNDEFINED)); @@ -485,8 +485,8 @@ System::broken_col_range (Item const*l, Item const*r) const { Link_array ret; - l = l->column_l (); - r = r->column_l (); + l = l->get_column (); + r = r->get_column (); SCM s = get_grob_property ("columns"); while (gh_pair_p (s) && ly_car (s) != r->self_scm ()) @@ -513,7 +513,7 @@ System::broken_col_range (Item const*l, Item const*r) const disrupt the spacing problem. */ Link_array -System::column_l_arr ()const +System::columns ()const { Link_array acs = Pointer_group_interface__extract_grobs (this, (Grob*) 0, "columns"); diff --git a/lily/tab-note-heads-engraver.cc b/lily/tab-note-heads-engraver.cc index 07694ca84d..6c6e9e43d1 100644 --- a/lily/tab-note-heads-engraver.cc +++ b/lily/tab-note-heads-engraver.cc @@ -21,17 +21,17 @@ */ class Tab_note_heads_engraver : public Engraver { - Link_array note_p_arr_; + Link_array notes_; - Link_array dot_p_arr_; - Link_array note_req_l_arr_; - Link_array tabstring_req_arr_; + Link_array dots_; + Link_array note_reqs_; + Link_array tabstring_reqs_; public: TRANSLATOR_DECLARATIONS(Tab_note_heads_engraver); protected: virtual void start_translation_timestep (); - virtual bool try_music (Music *req_l) ; + virtual bool try_music (Music *req) ; virtual void process_music (); virtual void stop_translation_timestep (); @@ -47,21 +47,21 @@ Tab_note_heads_engraver::try_music (Music *m) { if (Note_req * n =dynamic_cast (m)) { - note_req_l_arr_.push (n); + note_reqs_.push (n); return true; } else if (Text_script_req * ts = dynamic_cast (m)) { if (m->get_mus_property ("text-type") != ly_symbol2scm ("finger")) return false; - //if (tabstring_req_arr_.size () < note_req_l_arr_.size ()) { - tabstring_req_arr_.push (ts); + //if (tabstring_reqs_.size () < note_reqs_.size ()) { + tabstring_reqs_.push (ts); //} return true; } else if (dynamic_cast (m)) { - return note_req_l_arr_.size (); + return note_reqs_.size (); } return false; @@ -72,42 +72,42 @@ void Tab_note_heads_engraver::process_music () { /* - for (int i=0; i < tabstring_req_arr_.size (); i++) { - Music * tabstring_req = tabstring_req_arr_[i]; + for (int i=0; i < tabstring_reqs_.size (); i++) { + Music * tabstring_req = tabstring_reqs_[i]; size_t lenp; - char* tab_string_as_str = gh_scm2newstr(tabstring_req->get_mus_property ("text"), &lenp); + char* tab_string_as_string = gh_scm2newstr(tabstring_req->get_mus_property ("text"), &lenp); } */ - for (int i=0; i < note_req_l_arr_.size (); i++) + for (int i=0; i < note_reqs_.size (); i++) { - Item * note_p = new Item (get_property ("TabNoteHead")); + Item * note = new Item (get_property ("TabNoteHead")); - Music * req = note_req_l_arr_[i]; + Music * req = note_reqs_[i]; - Music * tabstring_req = tabstring_req_arr_[i]; + Music * tabstring_req = tabstring_reqs_[i]; size_t lenp; - char* tab_string_as_str = gh_scm2newstr(tabstring_req->get_mus_property ("text"), &lenp); - int tab_string = atoi(tab_string_as_str); + char* tab_string_as_string = gh_scm2newstr(tabstring_req->get_mus_property ("text"), &lenp); + int tab_string = atoi(tab_string_as_string); Duration dur = *unsmob_duration (req->get_mus_property ("duration")); - note_p->set_grob_property ("duration-log", gh_int2scm (dur.duration_log ())); + note->set_grob_property ("duration-log", gh_int2scm (dur.duration_log ())); if (dur.dot_count ()) { Item * d = new Item (get_property ("Dots")); - Rhythmic_head::set_dots (note_p, d); + Rhythmic_head::set_dots (note, d); if (dur.dot_count () != gh_scm2int (d->get_grob_property ("dot-count"))) d->set_grob_property ("dot-count", gh_int2scm (dur.dot_count ())); - d->set_parent (note_p, Y_AXIS); + d->set_parent (note, Y_AXIS); announce_grob (d, SCM_EOL); - dot_p_arr_.push (d); + dots_.push (d); } SCM stringTunings = get_property ("stringTunings"); @@ -125,32 +125,32 @@ Tab_note_heads_engraver::process_music () SCM scm_pitch = req->get_mus_property ("pitch"); SCM proc = get_property ("tablatureFormat"); SCM text = gh_call3 (proc, gh_int2scm (tab_string), stringTunings, scm_pitch); - note_p->set_grob_property ("text", text); + note->set_grob_property ("text", text); - note_p->set_grob_property ("staff-position", gh_int2scm (pos)); - announce_grob (note_p, req->self_scm()); - note_p_arr_.push (note_p); + note->set_grob_property ("staff-position", gh_int2scm (pos)); + announce_grob (note, req->self_scm()); + notes_.push (note); } } void Tab_note_heads_engraver::stop_translation_timestep () { - for (int i=0; i < note_p_arr_.size (); i++) + for (int i=0; i < notes_.size (); i++) { - typeset_grob (note_p_arr_[i]); + typeset_grob (notes_[i]); } - note_p_arr_.clear (); - for (int i=0; i < dot_p_arr_.size (); i++) + notes_.clear (); + for (int i=0; i < dots_.size (); i++) { - typeset_grob (dot_p_arr_[i]); + typeset_grob (dots_[i]); } - dot_p_arr_.clear (); + dots_.clear (); - note_req_l_arr_.clear (); + note_reqs_.clear (); - tabstring_req_arr_.clear (); + tabstring_reqs_.clear (); } void diff --git a/lily/template5.cc b/lily/template5.cc index 362acdd01e..af9b565719 100644 --- a/lily/template5.cc +++ b/lily/template5.cc @@ -22,9 +22,9 @@ Interval_t::infinity () } String -Interval_t::T_to_str (Rational a) +Interval_t::T_to_string (Rational a) { - return a.str (); + return a.string (); } diff --git a/lily/tempo-performer.cc b/lily/tempo-performer.cc index 3c37f69de6..a6d864b5c7 100644 --- a/lily/tempo-performer.cc +++ b/lily/tempo-performer.cc @@ -18,13 +18,13 @@ public: protected: - virtual bool try_music (Music* req_l); + virtual bool try_music (Music* req); virtual void stop_translation_timestep (); virtual void create_audio_elements (); private: - Tempo_req* tempo_req_l_; - Audio_tempo* audio_p_; + Tempo_req* tempo_req_; + Audio_tempo* audio_; }; ENTER_DESCRIPTION (Tempo_performer, "","","","","" ); @@ -32,8 +32,8 @@ ENTER_DESCRIPTION (Tempo_performer, "","","","","" ); Tempo_performer::Tempo_performer () { - tempo_req_l_ = 0; - audio_p_ = 0; + tempo_req_ = 0; + audio_ = 0; } Tempo_performer::~Tempo_performer () @@ -44,42 +44,42 @@ Tempo_performer::~Tempo_performer () void Tempo_performer::create_audio_elements () { - if (tempo_req_l_) + if (tempo_req_) { - SCM met = tempo_req_l_->get_mus_property ("metronome-count"); - Duration *d = unsmob_duration (tempo_req_l_->get_mus_property ("duration")); + SCM met = tempo_req_->get_mus_property ("metronome-count"); + Duration *d = unsmob_duration (tempo_req_->get_mus_property ("duration")); Rational r = (d->length_mom () / Moment (Rational (1, 4)) * Moment (gh_scm2int (met))).main_part_; - audio_p_ = new Audio_tempo (int (r)); + audio_ = new Audio_tempo (int (r)); - Audio_element_info info (audio_p_, tempo_req_l_); + Audio_element_info info (audio_, tempo_req_); announce_element (info); - tempo_req_l_ = 0; + tempo_req_ = 0; } } void Tempo_performer::stop_translation_timestep () { - if (audio_p_) + if (audio_) { - play_element (audio_p_); - audio_p_ = 0; + play_element (audio_); + audio_ = 0; } } bool -Tempo_performer::try_music (Music* req_l) +Tempo_performer::try_music (Music* req) { - if (tempo_req_l_) + if (tempo_req_) return false; if (Tempo_req *t = - dynamic_cast (req_l)) + dynamic_cast (req)) { - tempo_req_l_ = t; + tempo_req_ = t; return true; } diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc index 9df187cf54..a448d15ef8 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -49,30 +49,30 @@ Text_engraver::try_music (Music *m) void Text_engraver::acknowledge_grob (Grob_info inf) { - if (Rhythmic_head::has_interface (inf.grob_l_)) + if (Rhythmic_head::has_interface (inf.grob_)) { for (int i=0; i < texts_.size (); i++) { Grob*t = texts_[i]; - Side_position_interface::add_support (t,inf.grob_l_); + Side_position_interface::add_support (t,inf.grob_); /* ugh. */ if (Side_position_interface::get_axis (t) == X_AXIS && !t->get_parent (Y_AXIS)) - t->set_parent (inf.grob_l_, Y_AXIS); + t->set_parent (inf.grob_, Y_AXIS); else if (Side_position_interface::get_axis (t) == Y_AXIS && !t->get_parent (X_AXIS)) - t->set_parent (inf.grob_l_, X_AXIS); + t->set_parent (inf.grob_, X_AXIS); } } - if (Stem::has_interface (inf.grob_l_)) + if (Stem::has_interface (inf.grob_)) { for (int i=0; i < texts_.size (); i++) { - Side_position_interface::add_support (texts_[i],inf.grob_l_); + Side_position_interface::add_support (texts_[i],inf.grob_); } } } @@ -89,7 +89,7 @@ Text_engraver::process_acknowledged_grobs () // URG: Text vs TextScript String basic = "TextScript"; - Item *text = new Item (get_property (basic.ch_C ())); + Item *text = new Item (get_property (basic.to_str0 ())); /* FIXME -> need to use basic props. diff --git a/lily/text-item.cc b/lily/text-item.cc index fc2671925f..3891298670 100644 --- a/lily/text-item.cc +++ b/lily/text-item.cc @@ -111,7 +111,7 @@ Molecule Text_item::markup_text2molecule (Grob *me, SCM markup_text, SCM alist_chain) { - SCM sheet = me->paper_l ()->style_sheet_; + SCM sheet = me->get_paper ()->style_sheet_; SCM f = ly_cdr (scm_assoc (ly_symbol2scm ("markup-to-properties"), sheet)); SCM markup = ly_car (markup_text); diff --git a/lily/text-spanner-engraver.cc b/lily/text-spanner-engraver.cc index ac3f08c7ba..8e26e7d501 100644 --- a/lily/text-spanner-engraver.cc +++ b/lily/text-spanner-engraver.cc @@ -134,10 +134,10 @@ Text_spanner_engraver::process_acknowledged_grobs () void Text_spanner_engraver::acknowledge_grob (Grob_info info) { - if (span_ && Note_column::has_interface (info.grob_l_)) + if (span_ && Note_column::has_interface (info.grob_)) { - Side_position_interface::add_support (span_, info.grob_l_); - add_bound_item (span_, dynamic_cast (info.grob_l_)); + Side_position_interface::add_support (span_, info.grob_); + add_bound_item (span_, dynamic_cast (info.grob_)); } } diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index a29ffe614e..8a7efdc6d3 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -133,7 +133,7 @@ Text_spanner::brew_molecule (SCM smob) /* ugh */ - Real thick = me->paper_l ()->get_var ("linethickness"); + Real thick = me->get_paper ()->get_var ("linethickness"); SCM st = me->get_grob_property ("thickness"); if (gh_number_p (st)) { @@ -195,7 +195,7 @@ void Text_spanner::setup_pedal_bracket(Spanner *me) { - Real thick = me->paper_l ()->get_var ("linethickness"); + Real thick = me->get_paper ()->get_var ("linethickness"); SCM st = me->get_grob_property ("thickness"); if (gh_number_p (st)) { diff --git a/lily/tfm-reader.cc b/lily/tfm-reader.cc index 062b7c688d..5822424008 100644 --- a/lily/tfm-reader.cc +++ b/lily/tfm-reader.cc @@ -14,7 +14,7 @@ #include "warn.hh" #include "warn.hh" -#define format_str String_convert::form_str +#define format_string String_convert::form_string #define FIX_UNITY \ (1 << 20) static const Real fix_to_real (Fix f); @@ -43,7 +43,7 @@ fix_to_real (Fix f) /* Most quantities are fixed-point fractions. */ Real -Tex_font_metric_reader::get_U32_fix_f () +Tex_font_metric_reader::get_U32_fix () { return fix_to_real (input_.get_U32 ()); } @@ -51,16 +51,16 @@ Tex_font_metric_reader::get_U32_fix_f () /* Dimensions are a `Fix' scaled by the design size. */ Real -Tex_font_metric_reader::get_U32_fix_scaled_f () +Tex_font_metric_reader::get_U32_fix_scaled () { - return get_U32_fix_f () * info_.design_size; + return get_U32_fix () * info_.design_size; } String -Tex_font_metric_reader::get_bcpl_str () +Tex_font_metric_reader::get_bcpl_string () { U8 length_u8 = input_.get_U8 (); - String str = input_.get_str (length_u8); + String str = input_.get_string (length_u8); return str; } @@ -104,15 +104,15 @@ Tex_font_metric_reader::read_header () if (header_length < 2) error (_f ("TFM header of `%s' has only %u word (s)", - input_.name_str ().ch_C (), header_length)); + input_.name_string ().to_str0 (), header_length)); info_.checksum = input_.get_U32 (); - info_.design_size = get_U32_fix_f (); + info_.design_size = get_U32_fix (); /* Although the coding scheme might be interesting to the caller, the font family and face byte probably aren't. So we don't read them. */ info_.coding_scheme = header_length > 2 - ? get_bcpl_str () : "unspecified"; + ? get_bcpl_string () : "unspecified"; } @@ -131,14 +131,14 @@ Tex_font_metric_reader::read_params () //brrr /* Move to the beginning of the parameter table in the file. */ - input_.seek_ch_C (-4 * header_.param_word_count); + input_.seek_str0 (-4 * header_.param_word_count); /* It's unlikely but possible that this TFM file has more fontdimens than we can deal with. */ if (header_.param_word_count > TFM_MAX_FONTDIMENS) { warning (_f ("%s: TFM file has %u parameters, which is more than the %u I can handle", - input_.name_str ().ch_C (), + input_.name_string ().to_str0 (), header_.param_word_count, TFM_MAX_FONTDIMENS)); header_.param_word_count = TFM_MAX_FONTDIMENS; @@ -146,10 +146,10 @@ Tex_font_metric_reader::read_params () /* The first parameter is different than all the rest, because it isn't scaled by the design size. */ - info_.parameters[ (TFM_SLANT_PARAMETER) - 1] = get_U32_fix_f (); + info_.parameters[ (TFM_SLANT_PARAMETER) - 1] = get_U32_fix (); for (Char_code i = 2; i <= header_.param_word_count; i++) - info_.parameters[i - 1] = get_U32_fix_scaled_f (); + info_.parameters[i - 1] = get_U32_fix_scaled (); } @@ -184,7 +184,7 @@ Tex_font_metric_reader::read_char_metric (Char_code code) //brr /* Move to the appropriate place in the `char_info' array. */ - input_.seek_ch_C (header_.char_info_pos + (code - info_.first_charcode) * 4); + input_.seek_str0 (header_.char_info_pos + (code - info_.first_charcode) * 4); /* Read the character. */ tfm_char = read_char (); @@ -222,7 +222,7 @@ Tex_font_metric_reader::read_char () #define GET_CHAR_DIMEN(d) \ if (d##_index != 0) \ { \ - input_.seek_ch_C (header_. d##_pos + d##_index*4); \ + input_.seek_str0 (header_. d##_pos + d##_index*4); \ tfm_char.d##_fix_ = input_.get_U32 (); \ tfm_char.d##_ = fix_to_real (tfm_char.d##_fix_) \ * info_.design_size; \ @@ -241,8 +241,8 @@ Tex_font_metric_reader::read_char () if (tag == 1) { - input_.seek_ch_C (header_.lig_kern_pos + remainder * 4); - read_lig_kern_program (&tfm_char.ligature_arr_, &tfm_char.kern_arr_); + input_.seek_str0 (header_.lig_kern_pos + remainder * 4); + read_lig_kern_program (&tfm_char.ligatures_, &tfm_char.kerns_); } /* We don't handle the other tags. */ @@ -257,7 +257,7 @@ Tex_font_metric_reader::read_char () #define KERN_FLAG 128 void -Tex_font_metric_reader::read_lig_kern_program (Array * ligature_arr_p, Array * kern_arr_p) +Tex_font_metric_reader::read_lig_kern_program (Array * ligatures, Array * kerns) { bool end_b; @@ -275,12 +275,12 @@ Tex_font_metric_reader::read_lig_kern_program (Array * ligature_ar Tfm_kern kern_element; kern_element.character = next_char; - char const* old_pos = input_.pos_ch_C (); - input_.seek_ch_C (header_.kern_pos + remainder * 4); - kern_element.kern = get_U32_fix_scaled_f (); + char const* old_pos = input_.pos_str0 (); + input_.seek_str0 (header_.kern_pos + remainder * 4); + kern_element.kern = get_U32_fix_scaled (); input_.set_pos (old_pos); - kern_arr_p->push (kern_element); + kerns->push (kern_element); } else @@ -288,7 +288,7 @@ Tex_font_metric_reader::read_lig_kern_program (Array * ligature_ar Tfm_ligature ligature_element; ligature_element.character = next_char; ligature_element.ligature = remainder; - ligature_arr_p->push (ligature_element); + ligatures->push (ligature_element); } } while (!end_b); diff --git a/lily/tfm.cc b/lily/tfm.cc index 23bd86aef7..d68df68feb 100644 --- a/lily/tfm.cc +++ b/lily/tfm.cc @@ -49,10 +49,10 @@ Tex_font_char_metric::Tex_font_char_metric () italic_correction_fix_ = 0; } -#define APPEND_CHAR_METRIC_ELT(k) outstr += to_str (#k) + " " + to_str (k ## _) + "; " +#define APPEND_CHAR_METRIC_ELT(k) outstr += to_string (#k) + " " + to_string (k ## _) + "; " String -Tex_font_char_metric::str () const +Tex_font_char_metric::string () const { String outstr ; @@ -109,11 +109,11 @@ Tex_font_metric::get_char (int a) const String -Tex_font_metric::str () const +Tex_font_metric::string () const { String outstr; for (int i=0; i < char_metrics_.size (); i++) - outstr += char_metrics_[i].str (); + outstr += char_metrics_[i].string (); return outstr; } @@ -124,13 +124,13 @@ Tex_font_metric::str () const SCM Tex_font_metric::make_tfm (String fn) { - Tex_font_metric * tfm_p = new Tex_font_metric; + Tex_font_metric * tfm = new Tex_font_metric; Tex_font_metric_reader reader (fn); - tfm_p->info_ = reader.info_; - tfm_p->header_ = reader.header_; - tfm_p->char_metrics_ = reader.char_metrics_; - tfm_p->ascii_to_metric_idx_ = reader.ascii_to_metric_idx_; + tfm->info_ = reader.info_; + tfm->header_ = reader.header_; + tfm->char_metrics_ = reader.char_metrics_; + tfm->ascii_to_metric_idx_ = reader.ascii_to_metric_idx_; - return tfm_p->self_scm (); + return tfm->self_scm (); } diff --git a/lily/thread-devnull-engraver.cc b/lily/thread-devnull-engraver.cc index 96e397f69f..19f4621f43 100644 --- a/lily/thread-devnull-engraver.cc +++ b/lily/thread-devnull-engraver.cc @@ -36,14 +36,14 @@ Thread_devnull_engraver::acknowledge_grob (Grob_info i) if (s == ly_symbol2scm ("always") || (s == SCM_EOL && to_boolean (get_property ("soloADue")) - && ((daddy_trans_l_->id_str_.left_str (3) == "two" + && ((daddy_trans_->id_string_.left_string (3) == "two" && (to_boolean (get_property ("unison")) || to_boolean (get_property ("unisilence")))) /* Maybe this should be optional? */ || to_boolean (get_property ("othersolo"))))) { - i.grob_l_->suicide (); + i.grob_->suicide (); } } Thread_devnull_engraver::Thread_devnull_engraver(){} diff --git a/lily/tie-column.cc b/lily/tie-column.cc index e364bf7f03..1ebdff1235 100644 --- a/lily/tie-column.cc +++ b/lily/tie-column.cc @@ -41,7 +41,7 @@ int tie_compare (Grob* const & s1, Grob* const & s2) { - return sign (Tie::position_f (s1) - Tie::position_f (s2)); + return sign (Tie::get_position (s1) - Tie::get_position (s2)); } /* @@ -94,7 +94,7 @@ Tie_column::set_directions (Grob*me) for (int i=ties.size (); i--;) { Grob * t = ties[i]; - Real p = Tie::position_f (t); + Real p = Tie::get_position (t); Direction d = (Direction) sign (p); if (!d) d = UP; diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index 72cb2e06d4..e5f9efddf9 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -33,12 +33,12 @@ class Tie_engraver : public Engraver Moment end_mom_; Moment next_end_mom_; - Tie_req *req_l_; + Tie_req *req_; Link_array now_heads_; Link_array stopped_heads_; - Link_array tie_p_arr_; + Link_array ties_; - Spanner * tie_column_p_; + Spanner * tie_column_; void set_melisma (bool); @@ -57,8 +57,8 @@ public: Tie_engraver::Tie_engraver () { - req_l_ = 0; - tie_column_p_ = 0; + req_ = 0; + tie_column_ = 0; } @@ -70,7 +70,7 @@ Tie_engraver::try_music (Music *m) /* if (end_mom_ > now_mom ()) return false; */ - req_l_ = c; + req_ = c; SCM m = get_property ("automaticMelismata"); bool am = gh_boolean_p (m) &&gh_scm2bool (m); if (am) @@ -85,15 +85,15 @@ Tie_engraver::try_music (Music *m) void Tie_engraver::set_melisma (bool m) { - daddy_trans_l_->set_property ("tieMelismaBusy", m ? SCM_BOOL_T : SCM_BOOL_F); + daddy_trans_->set_property ("tieMelismaBusy", m ? SCM_BOOL_T : SCM_BOOL_F); } void Tie_engraver::acknowledge_grob (Grob_info i) { - if (Note_head::has_interface (i.grob_l_)) + if (Note_head::has_interface (i.grob_)) { - now_heads_.push (i.grob_l_); + now_heads_.push (i.grob_); } } @@ -110,7 +110,7 @@ head_pitch_compare (Grob *const&a,Grob *const&b) void Tie_engraver::process_acknowledged_grobs () { - if (req_l_) + if (req_) { now_heads_.sort (&head_pitch_compare); /* @@ -159,8 +159,8 @@ Tie_engraver::process_acknowledged_grobs () Tie::set_head (p,LEFT, dynamic_cast (unsmob_grob (ly_car (pair)))); Tie::set_head (p,RIGHT, dynamic_cast (unsmob_grob (ly_cdr (pair)))); - tie_p_arr_.push (p); - announce_grob(p, req_l_->self_scm()); + ties_.push (p); + announce_grob(p, req_->self_scm()); } else for (SCM s = head_list; gh_pair_p (s); s = ly_cdr (s)) { @@ -170,17 +170,17 @@ Tie_engraver::process_acknowledged_grobs () Tie::set_head (p, LEFT, dynamic_cast (unsmob_grob (ly_caar (s)))); Tie::set_head (p, RIGHT, dynamic_cast (unsmob_grob (ly_cdar (s)))); - tie_p_arr_.push (p); - announce_grob(p, req_l_->self_scm()); + ties_.push (p); + announce_grob(p, req_->self_scm()); } - if (tie_p_arr_.size () > 1 && !tie_column_p_) + if (ties_.size () > 1 && !tie_column_) { - tie_column_p_ = new Spanner (get_property ("TieColumn")); + tie_column_ = new Spanner (get_property ("TieColumn")); - for (int i = tie_p_arr_.size (); i--;) - Tie_column::add_tie (tie_column_p_,tie_p_arr_ [i]); - announce_grob(tie_column_p_, SCM_EOL); + for (int i = ties_.size (); i--;) + Tie_column::add_tie (tie_column_,ties_ [i]); + announce_grob(tie_column_, SCM_EOL); } } } @@ -189,7 +189,7 @@ Tie_engraver::process_acknowledged_grobs () void Tie_engraver::stop_translation_timestep () { - req_l_ = 0; + req_ = 0; now_heads_.clear (); @@ -197,15 +197,15 @@ Tie_engraver::stop_translation_timestep () we don't warn for no ties, since this happens naturally when you use skipTypesetting. */ - for (int i=0; i< tie_p_arr_.size (); i++) + for (int i=0; i< ties_.size (); i++) { - typeset_tie (tie_p_arr_[i]); + typeset_tie (ties_[i]); } - tie_p_arr_.clear (); - if (tie_column_p_) + ties_.clear (); + if (tie_column_) { - typeset_grob (tie_column_p_); - tie_column_p_ =0; + typeset_grob (tie_column_); + tie_column_ =0; } } diff --git a/lily/tie-performer.cc b/lily/tie-performer.cc index 413e65fabc..b721cc963c 100644 --- a/lily/tie-performer.cc +++ b/lily/tie-performer.cc @@ -14,8 +14,8 @@ #include "performer.hh" struct CNote_melodic_tuple { - Melodic_req *req_l_ ; - Audio_note *note_l_; + Melodic_req *req_ ; + Audio_note *note_; Moment end_; CNote_melodic_tuple (); CNote_melodic_tuple (Audio_note*, Melodic_req*, Moment); @@ -43,10 +43,10 @@ public: private: bool done_; PQueue past_notes_pq_; - Tie_req *req_l_; + Tie_req *req_; Array now_notes_; Array stopped_notes_; - Link_array tie_p_arr_; + Link_array ties_; protected: virtual void initialize (); @@ -60,7 +60,7 @@ protected: Tie_performer::Tie_performer () { - req_l_ = 0; + req_ = 0; done_ = false; } @@ -70,18 +70,18 @@ ENTER_DESCRIPTION (Tie_performer, "", "", "", "", ""); void Tie_performer::initialize () { - req_l_ = 0; + req_ = 0; } bool Tie_performer::try_music (Music *m) { - if (!req_l_) + if (!req_) { if (Tie_req * c = dynamic_cast (m)) { - req_l_ = c; + req_ = c; return true; } } @@ -91,9 +91,9 @@ Tie_performer::try_music (Music *m) void Tie_performer::acknowledge_audio_element (Audio_element_info i) { - if (Audio_note *nh = dynamic_cast (i.elem_l_)) + if (Audio_note *nh = dynamic_cast (i.elem_)) { - Note_req * m = dynamic_cast (i.req_l_); + Note_req * m = dynamic_cast (i.req_); if (!m) return; now_notes_.push (CNote_melodic_tuple (nh, m, now_mom ()+ m->length_mom ())); @@ -103,7 +103,7 @@ Tie_performer::acknowledge_audio_element (Audio_element_info i) void Tie_performer::create_audio_elements () { - if (req_l_ && ! done_) + if (req_ && ! done_) { Moment now = now_mom (); Link_array nharr; @@ -116,7 +116,7 @@ Tie_performer::create_audio_elements () return; } - if (req_l_) + if (req_) { now_notes_.sort (CNote_melodic_tuple::pitch_compare); stopped_notes_.sort (CNote_melodic_tuple::pitch_compare); @@ -126,8 +126,8 @@ Tie_performer::create_audio_elements () while (i < now_notes_.size () && j < stopped_notes_.size ()) { int comp - = Pitch::compare (*unsmob_pitch (now_notes_[i].req_l_->get_mus_property ("pitch")), - *unsmob_pitch (stopped_notes_[j].req_l_->get_mus_property ("pitch"))); + = Pitch::compare (*unsmob_pitch (now_notes_[i].req_->get_mus_property ("pitch")), + *unsmob_pitch (stopped_notes_[j].req_->get_mus_property ("pitch"))); if (comp) { @@ -142,13 +142,13 @@ Tie_performer::create_audio_elements () made. Not infallible. Due to reordering in sort (), we will make the wrong ties when notenotes are added. */ - if (tie_count > tie_p_arr_.size ()) + if (tie_count > ties_.size ()) { Audio_tie * p = new Audio_tie; - p->set_note (LEFT, stopped_notes_[j].note_l_); - p->set_note (RIGHT, now_notes_[i].note_l_); - tie_p_arr_.push (p); - announce_element (Audio_element_info (p, req_l_)); + p->set_note (LEFT, stopped_notes_[j].note_); + p->set_note (RIGHT, now_notes_[i].note_); + ties_.push (p); + announce_element (Audio_element_info (p, req_)); } i++; j++; @@ -156,9 +156,9 @@ Tie_performer::create_audio_elements () } } - if (!tie_p_arr_.size ()) + if (!ties_.size ()) { - req_l_->origin ()->warning (_ ("No ties were created!")); + req_->origin ()->warning (_ ("No ties were created!")); } } } @@ -173,18 +173,18 @@ Tie_performer::stop_translation_timestep () } now_notes_.clear (); - for (int i=0; i< tie_p_arr_.size (); i++) + for (int i=0; i< ties_.size (); i++) { - //play_element (tie_p_arr_[i]); - tie_p_arr_[i]->note_l_drul_[RIGHT]->tie_to (tie_p_arr_[i]->note_l_drul_[LEFT]); + //play_element (ties_[i]); + ties_[i]->note_l_drul_[RIGHT]->tie_to (ties_[i]->note_l_drul_[LEFT]); } - tie_p_arr_.clear (); + ties_.clear (); } void Tie_performer::start_translation_timestep () { - req_l_ =0; + req_ =0; done_ = false; Moment now = now_mom (); while (past_notes_pq_.size () && past_notes_pq_.front ().end_ < now) @@ -194,15 +194,15 @@ Tie_performer::start_translation_timestep () CNote_melodic_tuple::CNote_melodic_tuple () { - note_l_ =0; - req_l_ =0; + note_ =0; + req_ =0; end_ = 0; } CNote_melodic_tuple::CNote_melodic_tuple (Audio_note *h, Melodic_req*m, Moment mom) { - note_l_ = h; - req_l_ = m; + note_ = h; + req_ = m; end_ = mom; } @@ -210,8 +210,8 @@ int CNote_melodic_tuple::pitch_compare (CNote_melodic_tuple const&h1, CNote_melodic_tuple const &h2) { - SCM p1 = h1.req_l_->get_mus_property ("pitch"); - SCM p2 = h2.req_l_->get_mus_property ("pitch"); + SCM p1 = h1.req_->get_mus_property ("pitch"); + SCM p2 = h2.req_->get_mus_property ("pitch"); return Pitch::compare (*unsmob_pitch (p1), *unsmob_pitch (p2)); } diff --git a/lily/tie.cc b/lily/tie.cc index 14c3d7be5f..65f2f24aac 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -63,10 +63,10 @@ Tie::head (Grob*me, Direction d) } Real -Tie::position_f (Grob*me) +Tie::get_position (Grob*me) { Direction d = head (me,LEFT) ? LEFT:RIGHT; - return Staff_symbol_referencer::position_f (head (me,d)); + return Staff_symbol_referencer::get_position (head (me,d)); } @@ -81,8 +81,8 @@ Tie::position_f (Grob*me) Direction Tie::get_default_dir (Grob*me) { - Item * sl = head (me,LEFT) ? Rhythmic_head::stem_l (head (me,LEFT)) :0; - Item * sr = head (me,RIGHT) ? Rhythmic_head::stem_l (head (me,RIGHT)) :0; + Item * sl = head (me,LEFT) ? Rhythmic_head::get_stem (head (me,LEFT)) :0; + Item * sr = head (me,RIGHT) ? Rhythmic_head::get_stem (head (me,RIGHT)) :0; if (sl && sr) { @@ -198,16 +198,16 @@ Tie::get_control_points (SCM smob) */ - Real ypos = Tie::position_f (me) * staff_space/2 + Real ypos = Tie::get_position (me) * staff_space/2 + dir * gh_scm2double (me->get_grob_property ("y-offset"));; /* Make sure we don't start on a dots */ - if (Note_head::has_interface (l) && Rhythmic_head::dots_l (l)) + if (Note_head::has_interface (l) && Rhythmic_head::get_dots (l)) { - Grob* dots = Rhythmic_head::dots_l(l); - if(fabs (staff_space * Staff_symbol_referencer::position_f (dots) /2 + Grob* dots = Rhythmic_head::get_dots (l); + if(fabs (staff_space * Staff_symbol_referencer::get_position (dots) /2 - ypos) < 0.5) { ypos += 0.5 * dir ; @@ -312,7 +312,7 @@ Tie::brew_molecule (SCM smob) Real thick = gh_scm2double (me->get_grob_property ("thickness")) - * me->paper_l ()->get_var ("linethickness"); + * me->get_paper ()->get_var ("linethickness"); Bezier b; int i = 0; diff --git a/lily/time-scaled-music-iterator.cc b/lily/time-scaled-music-iterator.cc index db0c669030..4c1e81343e 100644 --- a/lily/time-scaled-music-iterator.cc +++ b/lily/time-scaled-music-iterator.cc @@ -18,11 +18,11 @@ Time_scaled_music_iterator::process (Moment m) { if (!m.to_bool ()) { - Music_iterator *yeah = try_music (music_l ()); + Music_iterator *yeah = try_music (get_music ()); if (yeah) - set_translator (yeah->report_to_l ()); + set_translator (yeah->report_to ()); else - music_l ()->origin ()->warning (_ ("no one to print a tuplet start bracket")); + get_music ()->origin ()->warning (_ ("no one to print a tuplet start bracket")); } Music_wrapper_iterator::process (m); diff --git a/lily/time-signature-engraver.cc b/lily/time-signature-engraver.cc index 1471129cd3..5d3d7a6fb7 100644 --- a/lily/time-signature-engraver.cc +++ b/lily/time-signature-engraver.cc @@ -16,7 +16,7 @@ */ class Time_signature_engraver : public Engraver { - Item * time_signature_p_; + Item * time_signature_; SCM last_time_fraction_; protected: @@ -29,7 +29,7 @@ public: Time_signature_engraver::Time_signature_engraver () { - time_signature_p_ =0; + time_signature_ =0; last_time_fraction_ = SCM_BOOL_F; } @@ -40,24 +40,24 @@ Time_signature_engraver::process_music () not rigorously safe, since the value might get GC'd and reallocated in the same spot */ SCM fr= get_property ("timeSignatureFraction"); - if (!time_signature_p_ && last_time_fraction_ != fr) + if (!time_signature_ && last_time_fraction_ != fr) { last_time_fraction_ = fr; - time_signature_p_ = new Item (get_property ("TimeSignature")); - time_signature_p_->set_grob_property ("fraction",fr); + time_signature_ = new Item (get_property ("TimeSignature")); + time_signature_->set_grob_property ("fraction",fr); - if (time_signature_p_) - announce_grob(time_signature_p_, SCM_EOL); + if (time_signature_) + announce_grob(time_signature_, SCM_EOL); } } void Time_signature_engraver::stop_translation_timestep () { - if (time_signature_p_) + if (time_signature_) { - typeset_grob (time_signature_p_); - time_signature_p_ =0; + typeset_grob (time_signature_); + time_signature_ =0; } } diff --git a/lily/time-signature-performer.cc b/lily/time-signature-performer.cc index 71a20bafea..4aad0091e3 100644 --- a/lily/time-signature-performer.cc +++ b/lily/time-signature-performer.cc @@ -25,14 +25,14 @@ protected: SCM prev_fraction_; private: - Audio_time_signature* audio_p_; + Audio_time_signature* audio_; }; Time_signature_performer::Time_signature_performer () { prev_fraction_ = SCM_BOOL_F; - audio_p_ = 0; + audio_ = 0; } Time_signature_performer::~Time_signature_performer () @@ -50,8 +50,8 @@ Time_signature_performer::create_audio_elements () int b = gh_scm2int (ly_car (fr)); int o = gh_scm2int (ly_cdr (fr)); - audio_p_ = new Audio_time_signature (b,o); - Audio_element_info info (audio_p_, 0); + audio_ = new Audio_time_signature (b,o); + Audio_element_info info (audio_, 0); announce_element (info); } @@ -60,10 +60,10 @@ Time_signature_performer::create_audio_elements () void Time_signature_performer::stop_translation_timestep () { - if (audio_p_) + if (audio_) { - play_element (audio_p_); - audio_p_ = 0; + play_element (audio_); + audio_ = 0; } } diff --git a/lily/time-signature.cc b/lily/time-signature.cc index 892baf6950..ef04a4f336 100644 --- a/lily/time-signature.cc +++ b/lily/time-signature.cc @@ -68,7 +68,7 @@ Time_signature::special_time_signature (Grob*me, String s, int n, int d) /* First guess: s contains only the signature style, append fraction. */ - String symbolname = "timesig-" + s + to_str (n) + "/" + to_str (d); + String symbolname = "timesig-" + s + to_string (n) + "/" + to_string (d); Molecule m = feta->find_by_name (symbolname); if (!m.empty_b ()) @@ -96,10 +96,10 @@ Time_signature::time_signature (Grob*me,int num, int den) SCM chain = Font_interface::font_alist_chain (me); Molecule n = Text_item::text2molecule (me, - ly_str02scm (to_str (num).ch_C ()), + ly_str02scm (to_string (num).to_str0 ()), chain); Molecule d = Text_item::text2molecule (me, - ly_str02scm (to_str (den).ch_C ()), + ly_str02scm (to_string (den).to_str0 ()), chain); n.align_to (X_AXIS, CENTER); d.align_to (X_AXIS, CENTER); diff --git a/lily/timing-engraver.cc b/lily/timing-engraver.cc index e8d49a7771..db7693c1b3 100644 --- a/lily/timing-engraver.cc +++ b/lily/timing-engraver.cc @@ -76,14 +76,14 @@ Timing_engraver::start_translation_timestep () } } - daddy_trans_l_->set_property ("whichBar", which); + daddy_trans_->set_property ("whichBar", which); } void Timing_engraver::stop_translation_timestep () { Timing_translator::stop_translation_timestep (); - daddy_trans_l_->set_property ("whichBar", SCM_EOL); + daddy_trans_->set_property ("whichBar", SCM_EOL); last_moment_ = now_mom (); } diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index 43ce9c83d0..2fb3654523 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -19,13 +19,13 @@ void Timing_translator::stop_translation_timestep () { Translator *t = this; - Global_translator *global_l =0; + Global_translator *global =0; do { - t = t->daddy_trans_l_ ; - global_l = dynamic_cast (t); + t = t->daddy_trans_ ; + global = dynamic_cast (t); } - while (!global_l); + while (!global); /* allbars == ! skipbars */ SCM sb = get_property ("skipBars"); @@ -45,21 +45,21 @@ Timing_translator::stop_translation_timestep () moment. A waste of cpu? */ && !now.grace_part_) - global_l->add_moment_to_process (now + barleft); + global->add_moment_to_process (now + barleft); } } void Timing_translator::initialize () { - daddy_trans_l_->set_property ("timing" , SCM_BOOL_T); - daddy_trans_l_->set_property ("currentBarNumber" , gh_int2scm (1)); + daddy_trans_->set_property ("timing" , SCM_BOOL_T); + daddy_trans_->set_property ("currentBarNumber" , gh_int2scm (1)); - daddy_trans_l_->set_property ("timeSignatureFraction", + daddy_trans_->set_property ("timeSignatureFraction", gh_cons (gh_int2scm (4), gh_int2scm (4))); - daddy_trans_l_->set_property ("measurePosition", Moment (Rational (0)).smobbed_copy ()); - daddy_trans_l_->set_property ("measureLength", Moment (Rational (1)).smobbed_copy ()); - daddy_trans_l_->set_property ("beatLength", Moment (Rational (1,4)).smobbed_copy ()); + daddy_trans_->set_property ("measurePosition", Moment (Rational (0)).smobbed_copy ()); + daddy_trans_->set_property ("measureLength", Moment (Rational (1)).smobbed_copy ()); + daddy_trans_->set_property ("beatLength", Moment (Rational (1,4)).smobbed_copy ()); } Rational @@ -97,16 +97,16 @@ void Timing_translator::start_translation_timestep () { Translator *t = this; - Global_translator *global_l =0; + Global_translator *global =0; do { - t = t->daddy_trans_l_ ; - global_l = dynamic_cast (t); + t = t->daddy_trans_ ; + global = dynamic_cast (t); } - while (!global_l); + while (!global); - Moment now = global_l->now_mom_; - Moment dt = now - global_l -> prev_mom_; + Moment now = global->now_mom_; + Moment dt = now - global -> prev_mom_; if (dt < Moment (0)) { programming_error ("Moving backwards in time"); @@ -126,7 +126,7 @@ Timing_translator::start_translation_timestep () else { measposp = now; - daddy_trans_l_->set_property ("measurePosition", measposp.smobbed_copy ()); + daddy_trans_->set_property ("measurePosition", measposp.smobbed_copy ()); } measposp += dt; @@ -148,8 +148,8 @@ Timing_translator::start_translation_timestep () b ++; } - daddy_trans_l_->set_property ("currentBarNumber", gh_int2scm (b)); - daddy_trans_l_->set_property ("measurePosition", measposp.smobbed_copy ()); + daddy_trans_->set_property ("currentBarNumber", gh_int2scm (b)); + daddy_trans_->set_property ("measurePosition", measposp.smobbed_copy ()); } ENTER_DESCRIPTION (Timing_translator, "","","","","" ); diff --git a/lily/translator-ctors.cc b/lily/translator-ctors.cc index 65f6528b83..e1fe319db7 100644 --- a/lily/translator-ctors.cc +++ b/lily/translator-ctors.cc @@ -17,15 +17,15 @@ /* UGH. Dictionary is deprecated */ -Dictionary *global_translator_dict_p=0; +Dictionary *global_translator_dict=0; LY_DEFINE(ly_get_all_translators,"ly-get-all-translators", 0, 0, 0, (), "Return an list of a all translator objects that may be instantiated during a lilypond run.") { SCM l = SCM_EOL; - for (std::map::const_iterator (ci (global_translator_dict_p->begin())); - ci != global_translator_dict_p->end (); ci++) + for (std::map::const_iterator (ci (global_translator_dict->begin())); + ci != global_translator_dict->end (); ci++) { l = scm_cons ((*ci).second->self_scm (), l); } @@ -35,18 +35,18 @@ during a lilypond run.") void add_translator (Translator *t) { - if (!global_translator_dict_p) - global_translator_dict_p = new Dictionary; + if (!global_translator_dict) + global_translator_dict = new Dictionary; - (*global_translator_dict_p)[classname (t)] = t; + (*global_translator_dict)[classname (t)] = t; } Translator* -get_translator_l (String s) +get_translator (String s) { - if (global_translator_dict_p->elem_b (s)) + if (global_translator_dict->elem_b (s)) { - Translator* t = (*global_translator_dict_p)[s]; + Translator* t = (*global_translator_dict)[s]; return t; } diff --git a/lily/translator-def.cc b/lily/translator-def.cc index e4b8a239cd..7db483d56a 100644 --- a/lily/translator-def.cc +++ b/lily/translator-def.cc @@ -83,7 +83,7 @@ SCM Translator_def::modify_definition (SCM list, SCM str, bool add) { String s = ly_scm2string (str); - if (!get_translator_l (s)) + if (!get_translator (s)) error (_ ("Program has no such type")); if (add) @@ -150,40 +150,40 @@ Translator_def::apply_pushpop_property (Translator_group* me,SCM sym, SCM eprop, Link_array -Translator_def::path_to_acceptable_translator (SCM type_str, Music_output_def* odef) const +Translator_def::path_to_acceptable_translator (SCM type_string, Music_output_def* odef) const { - assert (gh_string_p (type_str)); + assert (gh_string_p (type_string)); - Link_array accepted_arr; + Link_array accepteds; for (SCM s = accepts_name_list_; gh_pair_p (s); s = ly_cdr (s)) { - Translator_def *t = unsmob_translator_def (odef->find_translator_l (ly_car (s))); + Translator_def *t = unsmob_translator_def (odef->find_translator (ly_car (s))); if (!t) continue; - accepted_arr.push (t); + accepteds.push (t); } Link_array best_result; - for (int i=0; i < accepted_arr.size (); i++) + for (int i=0; i < accepteds.size (); i++) { /* don't check aliases, because \context Staff should not create RhythmicStaff. */ - if (gh_equal_p (accepted_arr[i]->type_name_, type_str)) + if (gh_equal_p (accepteds[i]->type_name_, type_string)) { - best_result.push (accepted_arr[i]); + best_result.push (accepteds[i]); return best_result; } } int best_depth= INT_MAX; - for (int i=0; i < accepted_arr.size (); i++) + for (int i=0; i < accepteds.size (); i++) { - Translator_def * g = accepted_arr[i]; + Translator_def * g = accepteds[i]; Link_array result - = g->path_to_acceptable_translator (type_str, odef); + = g->path_to_acceptable_translator (type_string, odef); if (result.size () && result.size () < best_depth) { result.insert (g,0); @@ -204,7 +204,7 @@ trans_list (SCM namelist, Translator_group*tg) SCM l = SCM_EOL; for (SCM s = namelist; gh_pair_p (s) ; s = ly_cdr (s)) { - Translator * t = get_translator_l (ly_scm2string (ly_car (s))); + Translator * t = get_translator (ly_scm2string (ly_car (s))); if (!t) warning (_f ("can't find: `%s'", s)); else @@ -213,8 +213,8 @@ trans_list (SCM namelist, Translator_group*tg) SCM str = tr->self_scm (); l = gh_cons (str, l); - tr->daddy_trans_l_ = tg; - tr->output_def_l_ = tg->output_def_l_; + tr->daddy_trans_ = tg; + tr->output_def_ = tg->output_def_; scm_gc_unprotect_object (str); } @@ -226,13 +226,13 @@ trans_list (SCM namelist, Translator_group*tg) Translator_group * Translator_def::instantiate (Music_output_def* md) { - Translator * g = get_translator_l (ly_scm2string (translator_group_type_)); + Translator * g = get_translator (ly_scm2string (translator_group_type_)); g = g->clone (); Translator_group *tg = dynamic_cast (g); - tg->output_def_l_ = md; + tg->output_def_ = md; tg->definition_ = self_scm (); - tg->type_str_ = ly_scm2string (type_name_); + tg->type_string_ = ly_scm2string (type_name_); /* TODO: ugh. we're reversing CONSISTS_NAME_LIST_ here diff --git a/lily/translator-group.cc b/lily/translator-group.cc index f37563c6c2..8a1e58d746 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -70,8 +70,8 @@ Translator_group::add_translator (SCM list, Translator *t) Must append, since list ordering must be preserved. */ list = gh_append2 (list, gh_cons (t->self_scm (), SCM_EOL)); - t->daddy_trans_l_ = this; - t->output_def_l_ = output_def_l_; + t->daddy_trans_ = this; + t->output_def_ = output_def_; return list; } @@ -104,9 +104,9 @@ Translator_group::removable_b () const } Translator_group * -Translator_group::find_existing_translator_l (String n, String id) +Translator_group::find_existing_translator (String n, String id) { - if (is_alias_b (n) && (id_str_ == id || id.empty_b ())) + if (is_alias_b (n) && (id_string_ == id || id.empty_b ())) return this; Translator_group* r = 0; @@ -114,7 +114,7 @@ Translator_group::find_existing_translator_l (String n, String id) { Translator * t = unsmob_translator (ly_car (p)); - r = dynamic_cast (t)->find_existing_translator_l (n, id); + r = dynamic_cast (t)->find_existing_translator (n, id); } return r; @@ -124,14 +124,14 @@ Translator_group::find_existing_translator_l (String n, String id) Translator_group* -Translator_group::find_create_translator_l (String n, String id) +Translator_group::find_create_translator (String n, String id) { - Translator_group * existing = find_existing_translator_l (n,id); + Translator_group * existing = find_existing_translator (n,id); if (existing) return existing; Link_array path - = unsmob_translator_def (definition_)->path_to_acceptable_translator (ly_str02scm ((char*)n.ch_C ()), output_def_l ()); + = unsmob_translator_def (definition_)->path_to_acceptable_translator (ly_str02scm ((char*)n.to_str0 ()), get_output_def ()); if (path.size ()) { @@ -140,10 +140,10 @@ Translator_group::find_create_translator_l (String n, String id) // start at 1. The first one (index 0) will be us. for (int i=0; i < path.size (); i++) { - Translator_group * new_group = path[i]->instantiate (output_def_l_); + Translator_group * new_group = path[i]->instantiate (output_def_); if (i == path.size () -1) - new_group->id_str_ = id; + new_group->id_string_ = id; current->add_fresh_group_translator (new_group); current = new_group; } @@ -152,8 +152,8 @@ Translator_group::find_create_translator_l (String n, String id) } Translator_group *ret = 0; - if (daddy_trans_l_) - ret = daddy_trans_l_->find_create_translator_l (n,id); + if (daddy_trans_) + ret = daddy_trans_->find_create_translator (n,id); else { warning (_f ("can't find or create `%s' called `%s'", n, id)); @@ -179,34 +179,34 @@ Translator_group::try_music (Music* m) { bool hebbes_b = try_music_on_nongroup_children (m); - if (!hebbes_b && daddy_trans_l_) - hebbes_b = daddy_trans_l_->try_music (m); + if (!hebbes_b && daddy_trans_) + hebbes_b = daddy_trans_->try_music (m); return hebbes_b ; } int -Translator_group::depth_i () const +Translator_group::get_depth () const { - return (daddy_trans_l_) ? daddy_trans_l_->depth_i () + 1 : 0; + return (daddy_trans_) ? daddy_trans_->get_depth () + 1 : 0; } Translator_group* -Translator_group::ancestor_l (int level) +Translator_group::get_ancestor (int level) { - if (!level || !daddy_trans_l_) + if (!level || !daddy_trans_) return this; - return daddy_trans_l_->ancestor_l (level-1); + return daddy_trans_->get_ancestor (level-1); } void -Translator_group::terminate_translator (Translator*r_l) +Translator_group::terminate_translator (Translator*r) { - r_l->removal_processing (); + r->removal_processing (); /* Return value ignored. GC does the rest. */ - remove_translator_p (r_l); + remove_translator (r); } @@ -214,13 +214,13 @@ Translator_group::terminate_translator (Translator*r_l) Remove a translator from the hierarchy. */ Translator * -Translator_group::remove_translator_p (Translator*trans_l) +Translator_group::remove_translator (Translator*trans) { - assert (trans_l); + assert (trans); - trans_group_list_ = scm_delq_x (trans_l->self_scm (), trans_group_list_); - trans_l->daddy_trans_l_ = 0; - return trans_l; + trans_group_list_ = scm_delq_x (trans->self_scm (), trans_group_list_); + trans->daddy_trans_ = 0; + return trans; } bool @@ -236,15 +236,15 @@ Translator_group::get_default_interpreter () if (!is_bottom_translator_b ()) { SCM nm = unsmob_translator_def (definition_)->default_child_context_name (); - SCM st = output_def_l ()->find_translator_l (nm); + SCM st = get_output_def ()->find_translator (nm); Translator_def *t = unsmob_translator_def (st); if (!t) { - warning (_f ("can't find or create: `%s'", ly_scm2string (nm).ch_C ())); + warning (_f ("can't find or create: `%s'", ly_scm2string (nm).to_str0 ())); t = unsmob_translator_def (this->definition_); } - Translator_group *tg = t->instantiate (output_def_l_); + Translator_group *tg = t->instantiate (output_def_); add_fresh_group_translator (tg); if (!tg->is_bottom_translator_b ()) @@ -282,7 +282,7 @@ Translator_group::where_defined (SCM sym) const return (Translator_group*)this; } - return (daddy_trans_l_) ? daddy_trans_l_->where_defined (sym) : 0; + return (daddy_trans_) ? daddy_trans_->where_defined (sym) : 0; } /* @@ -295,8 +295,8 @@ Translator_group::internal_get_property (SCM sym) const if (properties_dict ()->try_retrieve (sym, &val)) return val; - if (daddy_trans_l_) - return daddy_trans_l_->internal_get_property (sym); + if (daddy_trans_) + return daddy_trans_->internal_get_property (sym); return val; } @@ -416,7 +416,7 @@ LY_DEFINE(ly_get_context_property, Translator *t = unsmob_translator (context); Translator_group* tr= dynamic_cast (t); SCM_ASSERT_TYPE(tr, context, SCM_ARG1, __FUNCTION__, "Translator group"); - SCM_ASSERT_TYPE(gh_symbol_p(name), name, SCM_ARG2, __FUNCTION__, "symbol"); + SCM_ASSERT_TYPE(gh_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol"); return tr->internal_get_property (name); diff --git a/lily/translator.cc b/lily/translator.cc index 897b30a0cf..2c1100d4e8 100644 --- a/lily/translator.cc +++ b/lily/translator.cc @@ -27,21 +27,21 @@ Translator::init () trans_group_list_ = SCM_EOL; properties_scm_ = SCM_EOL; definition_ = SCM_EOL; - daddy_trans_l_ =0; + daddy_trans_ =0; } Translator::Translator () { init (); - output_def_l_ = 0; + output_def_ = 0; smobify_self (); } Translator::Translator (Translator const &s) { init (); - output_def_l_ = s.output_def_l_; - type_str_ = s.type_str_; + output_def_ = s.output_def_; + type_string_ = s.type_string_; smobify_self (); } @@ -49,7 +49,7 @@ Translator::Translator (Translator const &s) bool Translator::is_alias_b (String s) const { - bool b = s == type_str_; + bool b = s == type_string_; for (SCM a = unsmob_translator_def (definition_)->type_aliases_; !b && gh_pair_p (a); a = ly_cdr (a)) @@ -68,7 +68,7 @@ Translator::try_music (Music *) Moment Translator::now_mom () const { - return daddy_trans_l_->now_mom (); + return daddy_trans_->now_mom (); } void @@ -83,15 +83,15 @@ Translator::do_announces () } Music_output_def * -Translator::output_def_l () const +Translator::get_output_def () const { - return output_def_l_; + return output_def_; } SCM Translator::internal_get_property (SCM sym) const { - return daddy_trans_l_->internal_get_property (sym); + return daddy_trans_->internal_get_property (sym); } void diff --git a/lily/tuplet-bracket.cc b/lily/tuplet-bracket.cc index dadd51f04b..b00c319c23 100644 --- a/lily/tuplet-bracket.cc +++ b/lily/tuplet-bracket.cc @@ -44,10 +44,10 @@ static Grob* get_x_bound_grob (Grob *g, Direction my_dir) { - if (Note_column::stem_l (g) + if (Note_column::get_stem (g) && Note_column::dir (g) == my_dir) { - g = Note_column::stem_l (g); + g = Note_column::get_stem (g); } return g; } @@ -60,11 +60,11 @@ Tuplet_bracket::parallel_beam (Grob *me, Link_array const &cols, bool *equ /* ugh: code dup. */ - Grob *s1 = Note_column::stem_l (cols[0]); - Grob *s2 = Note_column::stem_l (cols.top()); + Grob *s1 = Note_column::get_stem (cols[0]); + Grob *s2 = Note_column::get_stem (cols.top()); - Grob*b1 = s1 ? Stem::beam_l (s1) : 0; - Grob*b2 = s2 ? Stem::beam_l (s2) : 0; + Grob*b1 = s1 ? Stem::get_beam (s1) : 0; + Grob*b2 = s2 ? Stem::get_beam (s2) : 0; Spanner*sp = dynamic_cast (me); @@ -100,14 +100,14 @@ Tuplet_bracket::brew_molecule (SCM smob) { Grob *me= unsmob_grob (smob); Molecule mol; - Link_array column_arr= + Link_array columns= Pointer_group_interface__extract_grobs (me, (Grob*)0, "note-columns"); - if (!column_arr.size ()) + if (!columns.size ()) return mol.smobbed_copy (); bool equally_long = false; - Grob * par_beam = parallel_beam (me, column_arr, &equally_long); + Grob * par_beam = parallel_beam (me, columns, &equally_long); Spanner*sp = dynamic_cast (me); @@ -133,11 +133,11 @@ Tuplet_bracket::brew_molecule (SCM smob) else if (numb == ly_symbol2scm ("if-no-beam")) number_visibility = !par_beam; - Grob * commonx = column_arr[0]->common_refpoint (column_arr.top (),X_AXIS); + Grob * commonx = columns[0]->common_refpoint (columns.top (),X_AXIS); Direction dir = Directional_element_interface::get (me); - Grob * lgr = get_x_bound_grob (column_arr[0], dir); - Grob * rgr = get_x_bound_grob (column_arr.top(), dir); + Grob * lgr = get_x_bound_grob (columns[0], dir); + Grob * rgr = get_x_bound_grob (columns.top(), dir); Real x0 = lgr->extent (commonx,X_AXIS)[LEFT]; Real x1 = rgr->extent (commonx,X_AXIS)[RIGHT]; @@ -162,7 +162,7 @@ Tuplet_bracket::brew_molecule (SCM smob) if (bracket_visibility) { - Real lt = me->paper_l ()->get_var ("linethickness"); + Real lt = me->get_paper ()->get_var ("linethickness"); SCM thick = me->get_grob_property ("thickness"); if (gh_number_p (thick)) @@ -256,7 +256,7 @@ Tuplet_bracket::make_bracket (Axis protusion_axis, void Tuplet_bracket::calc_position_and_height (Grob*me,Real *offset, Real * dy) { - Link_array column_arr= + Link_array columns= Pointer_group_interface__extract_grobs (me, (Grob*)0, "note-columns"); @@ -270,17 +270,17 @@ Tuplet_bracket::calc_position_and_height (Grob*me,Real *offset, Real * dy) Use outer non-rest columns to determine slope */ int l = 0; - while (l = l && Note_column::rest_b (column_arr[r])) + int r = columns.size ()- 1; + while (r >= l && Note_column::rest_b (columns[r])) r--; if (l < r) { - *dy = column_arr[r]->extent (commony, Y_AXIS) [dir] - - column_arr[l]->extent (commony, Y_AXIS) [dir] ; + *dy = columns[r]->extent (commony, Y_AXIS) [dir] + - columns[l]->extent (commony, Y_AXIS) [dir] ; } else * dy = 0; @@ -288,13 +288,13 @@ Tuplet_bracket::calc_position_and_height (Grob*me,Real *offset, Real * dy) *offset = - dir * infinity_f; - if (!column_arr.size ()) + if (!columns.size ()) return; - Grob * lgr = get_x_bound_grob (column_arr[0], dir); - Grob * rgr = get_x_bound_grob (column_arr.top(), dir); + Grob * lgr = get_x_bound_grob (columns[0], dir); + Grob * rgr = get_x_bound_grob (columns.top(), dir); Real x0 = lgr->extent (commonx,X_AXIS)[LEFT]; Real x1 = rgr->extent (commonx,X_AXIS)[RIGHT]; @@ -302,14 +302,14 @@ Tuplet_bracket::calc_position_and_height (Grob*me,Real *offset, Real * dy) /* Slope. */ - Real factor = column_arr.size () > 1 ? 1/ (x1 - x0) : 1.0; + Real factor = columns.size () > 1 ? 1/ (x1 - x0) : 1.0; - for (int i = 0; i < column_arr.size (); i++) + for (int i = 0; i < columns.size (); i++) { - Real notey = column_arr[i]->extent (commony, Y_AXIS)[dir] + Real notey = columns[i]->extent (commony, Y_AXIS)[dir] - me->relative_coordinate (commony, Y_AXIS); - Real x = column_arr[i]->relative_coordinate (commonx, X_AXIS) - x0; + Real x = columns[i]->relative_coordinate (commonx, X_AXIS) - x0; Real tuplety = *dy * x * factor; if (notey * dir > (*offset + tuplety) * dir) @@ -344,15 +344,15 @@ Tuplet_bracket::calc_position_and_height (Grob*me,Real *offset, Real * dy) void Tuplet_bracket::calc_dy (Grob*me,Real * dy) { - Link_array column_arr= + Link_array columns= Pointer_group_interface__extract_grobs (me, (Grob*)0, "note-columns"); /* ugh. refps. */ Direction d = Directional_element_interface::get (me); - *dy = column_arr.top ()->extent (column_arr.top (), Y_AXIS) [d] - - column_arr[0]->extent (column_arr[0], Y_AXIS) [d]; + *dy = columns.top ()->extent (columns.top (), Y_AXIS) [d] + - columns[0]->extent (columns[0], Y_AXIS) [d]; } @@ -364,14 +364,14 @@ SCM Tuplet_bracket::before_line_breaking (SCM smob) { Grob *me = unsmob_grob (smob); - Link_array column_arr= + Link_array columns= Pointer_group_interface__extract_grobs (me, (Grob*)0, "note-columns"); - for (int i = column_arr.size(); i--;) + for (int i = columns.size(); i--;) { - Grob * s =Note_column::stem_l (column_arr[i]); - Grob * b = s ? Stem::beam_l (s): 0; + Grob * s =Note_column::get_stem (columns[i]); + Grob * b = s ? Stem::get_beam (s): 0; if (b) me->add_dependency (b); } @@ -384,10 +384,10 @@ SCM Tuplet_bracket::after_line_breaking (SCM smob) { Grob * me = unsmob_grob (smob); - Link_array column_arr= + Link_array columns= Pointer_group_interface__extract_grobs (me, (Grob*)0, "note-columns"); - if (!column_arr.size ()) + if (!columns.size ()) { me->suicide (); return SCM_UNSPECIFIED; @@ -407,7 +407,7 @@ Tuplet_bracket::after_line_breaking (SCM smob) } bool equally_long = false; - Grob * par_beam = parallel_beam (me, column_arr, &equally_long); + Grob * par_beam = parallel_beam (me, columns, &equally_long); /* We follow the beam only if there is one, and we are next to it. diff --git a/lily/tuplet-engraver.cc b/lily/tuplet-engraver.cc index e0ba3e4d2a..2f4b38ffd4 100644 --- a/lily/tuplet-engraver.cc +++ b/lily/tuplet-engraver.cc @@ -23,14 +23,14 @@ public: TRANSLATOR_DECLARATIONS(Tuplet_engraver); protected: - Link_array time_scaled_music_arr_; - /// when does the scaled music stop? Array order is synced with time_scaled_music_arr_ + Link_array time_scaled_musics_; + /// when does the scaled music stop? Array order is synced with time_scaled_musics_ Array stop_moments_; - /// when does the current spanner stop? Array order is synced with time_scaled_music_arr_ + /// when does the current spanner stop? Array order is synced with time_scaled_musics_ Array span_stop_moments_; - /// The spanners. Array order is synced with time_scaled_music_arr_ - Link_array started_span_p_arr_; + /// The spanners. Array order is synced with time_scaled_musics_ + Link_array started_spanners_; virtual void finalize (); virtual void acknowledge_grob (Grob_info); @@ -47,7 +47,7 @@ Tuplet_engraver::try_music (Music *r) Music *el = c->element (); if (!dynamic_cast (el)) { - time_scaled_music_arr_.push (c); + time_scaled_musics_.push (c); Rational m = now_mom ().main_part_ + c->length_mom ().main_part_; stop_moments_.push (m); @@ -69,38 +69,38 @@ Tuplet_engraver::process_acknowledged_grobs () if (to_boolean (v)) return; - for (int i= 0; i < time_scaled_music_arr_.size (); i++) + for (int i= 0; i < time_scaled_musics_.size (); i++) { - if (i < started_span_p_arr_.size () && started_span_p_arr_[i]) + if (i < started_spanners_.size () && started_spanners_[i]) continue; Spanner* glep = new Spanner (get_property ("TupletBracket")); - if (i >= started_span_p_arr_.size ()) - started_span_p_arr_.push (glep); + if (i >= started_spanners_.size ()) + started_spanners_.push (glep); else - started_span_p_arr_[i] = glep; + started_spanners_[i] = glep; SCM proc = get_property ("tupletNumberFormatFunction"); if (gh_procedure_p (proc)) { - SCM t = gh_apply (proc, scm_list_n (time_scaled_music_arr_[i]->self_scm (), SCM_UNDEFINED)); + SCM t = gh_apply (proc, scm_list_n (time_scaled_musics_[i]->self_scm (), SCM_UNDEFINED)); glep->set_grob_property ("text", t); } - announce_grob(glep, time_scaled_music_arr_ [i]->self_scm()); + announce_grob(glep, time_scaled_musics_ [i]->self_scm()); } } void Tuplet_engraver::acknowledge_grob (Grob_info i) { - if (Note_column::has_interface (i.grob_l_)) + if (Note_column::has_interface (i.grob_)) { - for (int j =0; j (i.grob_l_)); + for (int j =0; j (i.grob_)); } } @@ -114,14 +114,14 @@ Tuplet_engraver::start_translation_timestep () if (unsmob_moment (s)) tsd = unsmob_moment (s)->main_part_; - for (int i= started_span_p_arr_.size (); i--;) + for (int i= started_spanners_.size (); i--;) { if (now.main_part_ >= span_stop_moments_[i]) { - if (started_span_p_arr_[i]) + if (started_spanners_[i]) { - typeset_grob (started_span_p_arr_[i]); - started_span_p_arr_[i] =0; + typeset_grob (started_spanners_[i]); + started_spanners_[i] =0; } if (tsd.to_bool ()) @@ -130,10 +130,10 @@ Tuplet_engraver::start_translation_timestep () if (now.main_part_ >= stop_moments_[i]) { - started_span_p_arr_.del (i); + started_spanners_.del (i); stop_moments_.del (i); span_stop_moments_.del (i); - time_scaled_music_arr_.del (i); + time_scaled_musics_.del (i); } } } @@ -141,10 +141,10 @@ Tuplet_engraver::start_translation_timestep () void Tuplet_engraver::finalize () { - for (int i=0; i < started_span_p_arr_.size (); i++) + for (int i=0; i < started_spanners_.size (); i++) { - if (started_span_p_arr_[i]) - typeset_grob (started_span_p_arr_[i]); + if (started_spanners_[i]) + typeset_grob (started_spanners_[i]); } } diff --git a/lily/type-swallow-translator.cc b/lily/type-swallow-translator.cc index 194bd605b3..b483c39c18 100644 --- a/lily/type-swallow-translator.cc +++ b/lily/type-swallow-translator.cc @@ -13,7 +13,7 @@ bool Type_swallow_translator::try_music (Music*r) { - if (classname (r) == swallow_str_) + if (classname (r) == swallow_string_) return true; return false; } diff --git a/lily/unfolded-repeat-iterator.cc b/lily/unfolded-repeat-iterator.cc index 95e5b04162..ff5cf9603d 100644 --- a/lily/unfolded-repeat-iterator.cc +++ b/lily/unfolded-repeat-iterator.cc @@ -28,10 +28,10 @@ Unfolded_repeat_iterator::get_music_list () const SCM l = SCM_EOL; SCM *tail = &l; - SCM body = music_l ()->get_mus_property ("element"); - SCM alts = music_l ()->get_mus_property ("elements"); + SCM body = get_music ()->get_mus_property ("element"); + SCM alts = get_music ()->get_mus_property ("elements"); int alt_count = scm_ilength (alts); - int rep_count = gh_scm2int (music_l ()->get_mus_property ("repeat-count")); + int rep_count = gh_scm2int (get_music ()->get_mus_property ("repeat-count")); for (int i = 0; i < rep_count; i++) { @@ -81,8 +81,8 @@ Volta_repeat_iterator::Volta_repeat_iterator() SCM Volta_repeat_iterator::get_music_list()const { - return gh_cons (music_l ()->get_mus_property ("element"), - music_l ()->get_mus_property ("elements")); + return gh_cons (get_music ()->get_mus_property ("element"), + get_music ()->get_mus_property ("elements")); } void @@ -90,10 +90,10 @@ Volta_repeat_iterator::construct_children () { Sequential_iterator::construct_children(); - SCM alts = music_l ()->get_mus_property ("elements"); + SCM alts = get_music ()->get_mus_property ("elements"); alt_count_ = scm_ilength (alts); - rep_count_ = gh_scm2int (music_l ()->get_mus_property ("repeat-count")); + rep_count_ = gh_scm2int (get_music ()->get_mus_property ("repeat-count")); done_count_ = 0; } @@ -105,9 +105,9 @@ void Volta_repeat_iterator::add_repeat_command (SCM what) { SCM reps = ly_symbol2scm ("repeatCommands"); - SCM current_reps = report_to_l ()->internal_get_property (reps); + SCM current_reps = report_to ()->internal_get_property (reps); - Translator_group * where = report_to_l ()->where_defined (reps); + Translator_group * where = report_to ()->where_defined (reps); if (where && current_reps == SCM_EOL || gh_pair_p (current_reps)) { @@ -128,7 +128,7 @@ Volta_repeat_iterator::next_element (bool side_effect) { if (alt_count_) { - String repstr = to_str (rep_count_ - alt_count_ + done_count_) + "."; + String repstr = to_string (rep_count_ - alt_count_ + done_count_) + "."; if (done_count_ > 1) { add_repeat_command (scm_list_n (ly_symbol2scm ("volta"), SCM_BOOL_F, SCM_UNDEFINED)); @@ -141,12 +141,12 @@ Volta_repeat_iterator::next_element (bool side_effect) if (done_count_ == 1 && alt_count_ < rep_count_) { - repstr = "1.--" + to_str (rep_count_ - alt_count_ + done_count_) + "."; + repstr = "1.--" + to_string (rep_count_ - alt_count_ + done_count_) + "."; } if (done_count_ <= alt_count_) add_repeat_command (scm_list_n (ly_symbol2scm ("volta"), - ly_str02scm (repstr.ch_C ()), SCM_UNDEFINED)); + ly_str02scm (repstr.to_str0 ()), SCM_UNDEFINED)); } else { diff --git a/lily/vertical-align-engraver.cc b/lily/vertical-align-engraver.cc index 444168570f..7e266f7cf4 100644 --- a/lily/vertical-align-engraver.cc +++ b/lily/vertical-align-engraver.cc @@ -15,7 +15,7 @@ class Vertical_align_engraver : public Engraver { - Spanner * valign_p_; + Spanner * valign_; bool qualifies_b (Grob_info) const; public: TRANSLATOR_DECLARATIONS(Vertical_align_engraver); @@ -27,33 +27,33 @@ protected: Vertical_align_engraver::Vertical_align_engraver () { - valign_p_ =0; + valign_ =0; } void Vertical_align_engraver::initialize () { - valign_p_ =new Spanner (get_property ("VerticalAlignment")); - valign_p_->set_bound (LEFT,unsmob_grob (get_property ("currentCommandColumn"))); - announce_grob(valign_p_ , SCM_EOL); + valign_ =new Spanner (get_property ("VerticalAlignment")); + valign_->set_bound (LEFT,unsmob_grob (get_property ("currentCommandColumn"))); + announce_grob(valign_ , SCM_EOL); } void Vertical_align_engraver::finalize () { - valign_p_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn"))); - typeset_grob (valign_p_); - valign_p_ =0; + valign_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn"))); + typeset_grob (valign_); + valign_ =0; } bool Vertical_align_engraver::qualifies_b (Grob_info i) const { - int sz = i.origin_trans_l_arr ((Translator*)this).size () ; + int sz = i.origin_transes ((Translator*)this).size () ; - return sz > 1 && Axis_group_interface::has_interface (i.grob_l_) - && !i.grob_l_->get_parent (Y_AXIS) && Axis_group_interface::axis_b (i.grob_l_, Y_AXIS); + return sz > 1 && Axis_group_interface::has_interface (i.grob_) + && !i.grob_->get_parent (Y_AXIS) && Axis_group_interface::axis_b (i.grob_, Y_AXIS); } void @@ -61,7 +61,7 @@ Vertical_align_engraver::acknowledge_grob (Grob_info i) { if (qualifies_b (i)) { - Align_interface::add_element (valign_p_,i.grob_l_, get_property ("verticalAlignmentChildCallback")); + Align_interface::add_element (valign_,i.grob_, get_property ("verticalAlignmentChildCallback")); } } diff --git a/lily/voice-devnull-engraver.cc b/lily/voice-devnull-engraver.cc index 786e7a07aa..eb47ba180b 100644 --- a/lily/voice-devnull-engraver.cc +++ b/lily/voice-devnull-engraver.cc @@ -45,7 +45,7 @@ Voice_devnull_engraver::try_music (Music *m) if (gh_equal_p (s, ly_symbol2scm ("always")) || (s == SCM_EOL - && daddy_trans_l_->id_str_.left_str (3) == "two" + && daddy_trans_->id_string_.left_string (3) == "two" && (to_boolean (get_property ("unison")) || to_boolean (get_property ("unisilence"))))) { @@ -95,14 +95,14 @@ Voice_devnull_engraver::acknowledge_grob (Grob_info i) soloADue requirement */ if (s == ly_symbol2scm ("always") || (s == SCM_EOL - && daddy_trans_l_->id_str_.left_str (3) == "two" + && daddy_trans_->id_string_.left_string (3) == "two" && (to_boolean (get_property ("unison")) || to_boolean (get_property ("unisilence"))))) #else if (s == ly_symbol2scm ("always") || (s == SCM_EOL && to_boolean (get_property ("soloADue")) - && ((daddy_trans_l_->id_str_.left_str (3) == "two" + && ((daddy_trans_->id_string_.left_string (3) == "two" && (to_boolean (get_property ("unison")) || to_boolean (get_property ("unisilence")))) @@ -111,9 +111,9 @@ Voice_devnull_engraver::acknowledge_grob (Grob_info i) #endif for (char const **p = junk_interfaces; *p; p++) - if (i.grob_l_->internal_has_interface (ly_symbol2scm (*p))) + if (i.grob_->internal_has_interface (ly_symbol2scm (*p))) { - i.grob_l_->suicide (); + i.grob_->suicide (); return; } } diff --git a/lily/volta-bracket.cc b/lily/volta-bracket.cc index 446d3dac3b..4bfc990130 100644 --- a/lily/volta-bracket.cc +++ b/lily/volta-bracket.cc @@ -36,17 +36,17 @@ SCM Volta_bracket_interface::brew_molecule (SCM smob) { Grob *me = unsmob_grob (smob); - Link_array bar_arr + Link_array bars = Pointer_group_interface__extract_grobs (me, (Item*)0, "bars"); - if (!bar_arr.size ()) + if (!bars.size ()) return SCM_EOL; - Spanner *orig_span = dynamic_cast (me->original_l_); + Spanner *orig_span = dynamic_cast (me->original_); - bool first_bracket = orig_span && (orig_span->broken_into_l_arr_[0] == (Spanner*)me); + bool first_bracket = orig_span && (orig_span->broken_intos_[0] == (Spanner*)me); - bool last_bracket = orig_span && (orig_span->broken_into_l_arr_.top () == (Spanner*)me); + bool last_bracket = orig_span && (orig_span->broken_intos_.top () == (Spanner*)me); bool no_vertical_start = orig_span && !first_bracket; bool no_vertical_end = orig_span && !last_bracket; @@ -60,12 +60,12 @@ Volta_bracket_interface::brew_molecule (SCM smob) else return SCM_EOL; - const char* cs = str.ch_C(); + const char* cs = str.to_str0 (); no_vertical_end |= (strcmp(cs,":|")!=0 && strcmp(cs,"|:")!=0 && strcmp(cs,"|.")!=0 && strcmp(cs,":|:")!=0 && strcmp(cs,".|")!=0); - Real staff_thick = me->paper_l ()->get_var ("linethickness"); + Real staff_thick = me->get_paper ()->get_var ("linethickness"); Real half_space = 0.5; Item * bound = dynamic_cast (me)->get_bound (LEFT); @@ -76,7 +76,7 @@ Volta_bracket_interface::brew_molecule (SCM smob) Real left =0.; if (bound->break_status_dir () == RIGHT) { - Paper_column *pc = bound->column_l (); + Paper_column *pc = bound->get_column (); left = pc->extent (pc, X_AXIS)[RIGHT] - bound->relative_coordinate (pc, X_AXIS); } else diff --git a/lily/volta-engraver.cc b/lily/volta-engraver.cc index cd5dfeafe9..587a9e0981 100644 --- a/lily/volta-engraver.cc +++ b/lily/volta-engraver.cc @@ -34,17 +34,17 @@ protected: virtual void process_acknowledged_grobs (); Moment started_mom_; - Spanner *volta_span_p_; - Spanner *end_volta_span_p_; + Spanner *volta_span_; + Spanner *end_volta_span_; SCM staff_; - SCM start_str_; + SCM start_string_; }; Volta_engraver::Volta_engraver () { staff_ = SCM_EOL; - volta_span_p_ = 0; - end_volta_span_p_ = 0; + volta_span_ = 0; + end_volta_span_ = 0; } @@ -77,7 +77,7 @@ Volta_engraver::process_music () SCM cs = get_property ("repeatCommands"); bool end = false; - start_str_ = SCM_EOL; + start_string_ = SCM_EOL; while (gh_pair_p (cs)) { SCM c = ly_car (cs); @@ -88,13 +88,13 @@ Volta_engraver::process_music () if (ly_cadr (c) == SCM_BOOL_F) end = true; else - start_str_ = ly_cadr (c); + start_string_ = ly_cadr (c); } cs = ly_cdr (cs); } - if (volta_span_p_) + if (volta_span_) { SCM l (get_property ("voltaSpannerDuration")); Moment now = now_mom (); @@ -106,28 +106,28 @@ Volta_engraver::process_music () } - if (end && !volta_span_p_) + if (end && !volta_span_) { warning (_ ("No volta spanner to end")); // fixme: be more verbose. } else if (end) { - end_volta_span_p_ = volta_span_p_; - volta_span_p_ =0; + end_volta_span_ = volta_span_; + volta_span_ =0; } - if (gh_string_p (start_str_) && volta_span_p_) + if (gh_string_p (start_string_) && volta_span_) { warning (_ ("Already have a volta spanner. Stopping that one prematurely.")); - if (end_volta_span_p_) + if (end_volta_span_) { warning (_ ("Also have a stopped spanner. Giving up.")); return ; } - end_volta_span_p_ = volta_span_p_; - volta_span_p_ = 0; + end_volta_span_ = volta_span_; + volta_span_ = 0; } } @@ -137,36 +137,36 @@ Volta_engraver::process_music () void Volta_engraver::process_acknowledged_grobs () { - if (!volta_span_p_ && gh_string_p (start_str_)) + if (!volta_span_ && gh_string_p (start_string_)) { started_mom_ = now_mom () ; - volta_span_p_ = new Spanner (get_property ("VoltaBracket")); + volta_span_ = new Spanner (get_property ("VoltaBracket")); - announce_grob (volta_span_p_, SCM_EOL); - volta_span_p_->set_grob_property ("text", start_str_); + announce_grob (volta_span_, SCM_EOL); + volta_span_->set_grob_property ("text", start_string_); } } void Volta_engraver::acknowledge_grob (Grob_info i) { - if (Item* item = dynamic_cast (i.grob_l_)) + if (Item* item = dynamic_cast (i.grob_)) { if (Note_column::has_interface (item)) { - if (volta_span_p_) - Volta_bracket_interface::add_column (volta_span_p_,item); + if (volta_span_) + Volta_bracket_interface::add_column (volta_span_,item); } if (Bar_line::has_interface (item)) { - if (volta_span_p_) - Volta_bracket_interface::add_bar (volta_span_p_, item); - if (end_volta_span_p_) - Volta_bracket_interface::add_bar (end_volta_span_p_ , item); + if (volta_span_) + Volta_bracket_interface::add_bar (volta_span_, item); + if (end_volta_span_) + Volta_bracket_interface::add_bar (end_volta_span_ , item); } } - else if (Staff_symbol::has_interface (i.grob_l_)) + else if (Staff_symbol::has_interface (i.grob_)) { /* We only want to know about a single staff: then we add to the @@ -175,20 +175,20 @@ Volta_engraver::acknowledge_grob (Grob_info i) staff_ = SCM_UNDEFINED; if (staff_ != SCM_UNDEFINED) - staff_ = i.grob_l_->self_scm(); + staff_ = i.grob_->self_scm(); } } void Volta_engraver::finalize () { - if (volta_span_p_) + if (volta_span_) { - typeset_grob (volta_span_p_); + typeset_grob (volta_span_); } - if (end_volta_span_p_) + if (end_volta_span_) { - typeset_grob (end_volta_span_p_); + typeset_grob (end_volta_span_); } } @@ -197,10 +197,10 @@ Volta_engraver::finalize () void Volta_engraver::stop_translation_timestep () { - if (end_volta_span_p_) + if (end_volta_span_) { - typeset_grob (end_volta_span_p_); - end_volta_span_p_ =0; + typeset_grob (end_volta_span_); + end_volta_span_ =0; } } diff --git a/lily/warn.cc b/lily/warn.cc index f942e1cda9..71b81ec1a3 100644 --- a/lily/warn.cc +++ b/lily/warn.cc @@ -13,7 +13,7 @@ void progress_indication (String s) { - fputs (s.ch_C(), stderr); + fputs (s.to_str0 (), stderr); fflush (stderr); } -- 2.39.2