]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.136.jcn3
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 11 Mar 2001 16:49:25 +0000 (17:49 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 11 Mar 2001 16:49:25 +0000 (17:49 +0100)
1.3.136.jcn3
============

* Finished () beautification.

* Bugfix: grob-description.scm: Script::after_line_breaking ->
before_line_breaking.

1.3.136.hwn1
============

* Percent style repeats.

* Named music creation: (ly-make-music "Note_req")

 1.3.136.jcn2

435 files changed:
CHANGES
Documentation/user/internals.itely
Documentation/user/refman.itely
VERSION
flower/axis.cc
flower/binary-source-file.cc
flower/cpu-timer.cc
flower/data-file.cc
flower/direction.cc
flower/dstream.cc
flower/file-path.cc
flower/getopt-long.cc
flower/include/array.hh
flower/include/array.icc
flower/include/axes.hh
flower/include/compare.hh
flower/include/cons.hh
flower/include/data-file.hh
flower/include/dictionary.hh
flower/include/direction.hh
flower/include/drul-array.hh
flower/include/dstream.hh
flower/include/flower-proto.hh
flower/include/getopt-long.hh
flower/include/hash-table-iter.hh
flower/include/hash-table.hh
flower/include/interval.hh
flower/include/interval.tcc
flower/include/killing-cons.tcc
flower/include/offset.hh
flower/include/parray.hh
flower/include/parse-afm.hh
flower/include/pointer.hh
flower/include/pointer.tcc
flower/include/polynomial.hh
flower/include/pqueue.hh
flower/include/rational.hh
flower/include/real.hh
flower/include/source.hh
flower/include/string-convert.hh
flower/include/string-data.hh
flower/include/string-data.icc
flower/include/string-handle.hh
flower/include/string-handle.icc
flower/include/string.hh
flower/include/string.icc
flower/include/text-db.hh
flower/include/text-stream.hh
flower/include/virtual-methods.hh
flower/input.cc
flower/offset.cc
flower/parse-afm.cc
flower/polynomial.cc
flower/rational.cc
flower/rtti.cc
flower/simple-file-storage.cc
flower/source-file.cc
flower/string-convert.cc
flower/string.cc
flower/text-db.cc
flower/text-stream.cc
flower/warn.cc
input/regression/repeat-volta.ly
input/test/music-creation.ly [new file with mode: 0644]
lily/GNUmakefile
lily/afm.cc
lily/align-interface.cc
lily/align-note-column-engraver.cc
lily/all-font-metrics.cc
lily/arpeggio.cc
lily/audio-column.cc
lily/audio-element-info.cc
lily/audio-element.cc
lily/audio-staff.cc
lily/auto-beam-engraver.cc
lily/auto-change-iterator.cc
lily/axis-group-engraver.cc
lily/axis-group-interface.cc
lily/bar-engraver.cc
lily/bar-number-engraver.cc
lily/bar.cc
lily/beam-engraver.cc
lily/beam.cc
lily/beaming-info.cc
lily/bezier-bow.cc
lily/bezier.cc
lily/box.cc
lily/break-algorithm.cc
lily/break-align-engraver.cc
lily/break-align-item.cc
lily/breathing-sign-engraver.cc
lily/breathing-sign.cc
lily/change-iterator.cc
lily/chord-tremolo-engraver.cc
lily/chord-tremolo-iterator.cc
lily/chord.cc
lily/clef-engraver.cc
lily/clef-item.cc
lily/collision-engraver.cc
lily/collision.cc
lily/column-x-positions.cc
lily/command-request.cc
lily/context-specced-music.cc
lily/custos-engraver.cc
lily/custos.cc
lily/cxx-function-smob.cc
lily/debug.cc
lily/dimension-cache.cc
lily/directional-element-interface.cc
lily/dot-column-engraver.cc
lily/dot-column.cc
lily/dots.cc
lily/duration.cc
lily/dynamic-engraver.cc
lily/dynamic-performer.cc
lily/engraver-group-engraver.cc
lily/engraver.cc
lily/extender-engraver.cc
lily/folded-repeat-iterator.cc
lily/font-interface.cc
lily/font-metric.cc
lily/gdb.cc
lily/global-ctor.cc
lily/global-translator.cc
lily/gourlay-breaking.cc
lily/grace-align-item.cc
lily/grace-engraver-group.cc
lily/grace-iterator.cc
lily/grace-music.cc
lily/grace-performer-group.cc
lily/grace-position-engraver.cc
lily/grob-info.cc
lily/grob.cc
lily/group-interface.cc
lily/hairpin.cc
lily/hara-kiri-group-spanner.cc
lily/hyphen-engraver.cc
lily/hyphen-spanner.cc
lily/includable-lexer.cc
lily/include/align-interface.hh
lily/include/arpeggio.hh
lily/include/audio-column.hh
lily/include/audio-element-info.hh
lily/include/audio-item.hh
lily/include/axis-group-interface.hh
lily/include/bar.hh
lily/include/beam.hh
lily/include/beaming.hh
lily/include/box.hh
lily/include/break-algorithm.hh
lily/include/break-align-item.hh
lily/include/breathing-sign.hh
lily/include/chord-name.hh
lily/include/chord-tremolo-iterator.hh
lily/include/chord.hh
lily/include/clef.hh
lily/include/collision.hh
lily/include/column-x-positions.hh
lily/include/command-request.hh
lily/include/context-specced-music.hh
lily/include/custos.hh
lily/include/dimension-cache-callback.hh
lily/include/dimension-cache.hh
lily/include/directional-element-interface.hh
lily/include/dot-column.hh
lily/include/dots.hh
lily/include/duration.hh
lily/include/engraver-group-engraver.hh
lily/include/engraver.hh
lily/include/font-interface.hh
lily/include/font-metric.hh
lily/include/global-ctor.hh
lily/include/global-translator.hh
lily/include/gourlay-breaking.hh
lily/include/grace-align-item.hh
lily/include/grace-engraver-group.hh
lily/include/grace-music.hh
lily/include/grace-performer-group.hh
lily/include/grob-info.hh
lily/include/grob.hh
lily/include/hara-kiri-group-spanner.hh
lily/include/hyphen-spanner.hh
lily/include/interpretation-context-handle.hh
lily/include/item.hh
lily/include/key-item.hh
lily/include/kpath.hh
lily/include/lily-guile.hh
lily/include/lily-proto.hh
lily/include/line-group-group-engraver.hh
lily/include/line-of-score.hh
lily/include/ly-smobs.icc
lily/include/lyric-combine-music.hh
lily/include/lyric-extender.hh
lily/include/lyric-phrasing-engraver.hh
lily/include/main.hh
lily/include/midi-def.hh
lily/include/midi-stream.hh
lily/include/midi-walker.hh
lily/include/minmax.tcc
lily/include/misc.hh
lily/include/molecule.hh
lily/include/moment.hh
lily/include/multi-measure-rest.hh
lily/include/music-constructor.hh [new file with mode: 0644]
lily/include/music-iterator.hh
lily/include/music-list.hh
lily/include/music-output-def.hh
lily/include/music-output.hh
lily/include/music-sequence.hh
lily/include/music-wrapper-iterator.hh
lily/include/music-wrapper.hh
lily/include/music.hh
lily/include/musical-request.hh
lily/include/my-lily-lexer.hh
lily/include/my-lily-parser.hh
lily/include/note-column.hh
lily/include/note-head.hh
lily/include/paper-column.hh
lily/include/paper-def.hh
lily/include/paper-outputter.hh
lily/include/paper-score.hh
lily/include/paper-stream.hh
lily/include/part-combine-music.hh
lily/include/percent-repeat-iterator.hh [new file with mode: 0644]
lily/include/performance.hh
lily/include/performer-group-performer.hh
lily/include/performer.hh
lily/include/pitch.hh
lily/include/protected-scm.hh
lily/include/relative-music.hh
lily/include/repeated-music.hh
lily/include/request-chord-iterator.hh
lily/include/request.hh
lily/include/rest-collision.hh
lily/include/rest.hh
lily/include/rhythmic-head.hh
lily/include/scm-hash.hh
lily/include/score-engraver.hh
lily/include/score-performer.hh
lily/include/score.hh
lily/include/script-column.hh
lily/include/script.hh
lily/include/separating-group-spanner.hh
lily/include/side-position-interface.hh
lily/include/smobs.hh
lily/include/spacing-spanner.hh
lily/include/span-bar.hh
lily/include/spanner.hh
lily/include/staff-symbol-referencer.hh
lily/include/staff-symbol.hh
lily/include/stem.hh
lily/include/swallow-perf.hh
lily/include/symbol-cache.hh
lily/include/system-start-delimiter.hh
lily/include/text-item.hh
lily/include/tie-column.hh
lily/include/tie.hh
lily/include/time-scaled-music.hh
lily/include/time-signature.hh
lily/include/timing-translator.hh
lily/include/translation-property.hh
lily/include/translator-def.hh
lily/include/translator-group.hh
lily/include/translator.hh
lily/include/transposed-music.hh
lily/include/tuplet-spanner.hh
lily/include/type-swallow-translator.hh
lily/include/unfolded-repeat-iterator.hh
lily/include/volta-spanner.hh
lily/input-smob.cc
lily/instrument-name-engraver.cc
lily/interpretation-context-handle.cc
lily/item.cc
lily/key-engraver.cc
lily/key-item.cc
lily/key-performer.cc
lily/keyword.cc
lily/kpath.cc
lily/least-squares.cc
lily/lexer.ll
lily/lily-guile.cc
lily/line-group-group-engraver.cc
lily/line-of-score.cc
lily/line-spanner.cc
lily/local-key-engraver.cc
lily/local-key-item.cc
lily/lookup.cc
lily/lyric-combine-music-iterator.cc
lily/lyric-combine-music.cc
lily/lyric-engraver.cc
lily/lyric-extender.cc
lily/lyric-performer.cc
lily/lyric-phrasing-engraver.cc
lily/main.cc
lily/mark-engraver.cc
lily/melisma-engraver.cc
lily/midi-def.cc
lily/midi-item.cc
lily/midi-walker.cc
lily/misc.cc
lily/molecule.cc
lily/moment.cc
lily/multi-measure-rest-engraver.cc
lily/multi-measure-rest.cc
lily/music-constructor.cc [new file with mode: 0644]
lily/music-ctor.cc [new file with mode: 0644]
lily/music-iterator.cc
lily/music-list.cc
lily/music-output-def.cc
lily/music-sequence.cc
lily/music-wrapper-iterator.cc
lily/music-wrapper.cc
lily/music.cc
lily/musical-request.cc
lily/my-lily-lexer.cc
lily/my-lily-parser.cc
lily/note-column.cc
lily/note-head.cc
lily/note-heads-engraver.cc
lily/note-name-engraver.cc
lily/note-performer.cc
lily/output-property-engraver.cc
lily/output-property-music-iterator.cc
lily/paper-column.cc
lily/paper-def.cc
lily/paper-outputter.cc
lily/paper-score.cc
lily/parser.yy
lily/part-combine-music-iterator.cc
lily/part-combine-music.cc
lily/percent-repeat-engraver.cc [new file with mode: 0644]
lily/percent-repeat-iterator.cc [new file with mode: 0644]
lily/performance.cc
lily/performer-group-performer.cc
lily/performer.cc
lily/phrasing-slur-engraver.cc
lily/piano-pedal-engraver.cc
lily/piano-pedal-performer.cc
lily/pitch.cc
lily/property-engraver.cc
lily/property-inspect.cc
lily/property-iterator.cc
lily/protected-scm.cc
lily/relative-octave-music.cc
lily/repeat-acknowledge-engraver.cc
lily/repeated-music.cc
lily/request-chord-iterator.cc
lily/rest-collision-engraver.cc
lily/rest-collision.cc
lily/rest-engraver.cc
lily/rest.cc
lily/rhythmic-column-engraver.cc
lily/rod.cc
lily/scaled-font-metric.cc
lily/scm-hash.cc
lily/scope.cc
lily/score-engraver.cc
lily/score-performer.cc
lily/score.cc
lily/scores.cc
lily/script-column-engraver.cc
lily/script-column.cc
lily/script-engraver.cc
lily/script.cc
lily/separating-group-spanner.cc
lily/separating-line-group-engraver.cc
lily/separation-item.cc
lily/sequential-music-iterator.cc
lily/side-position-interface.cc
lily/simple-music-iterator.cc
lily/simple-spacer.cc
lily/simultaneous-music-iterator.cc
lily/slur-bezier-bow.cc
lily/slur-engraver.cc
lily/slur.cc
lily/spaceable-element.cc
lily/spacing-engraver.cc
lily/spacing-spanner.cc
lily/span-bar-engraver.cc
lily/span-bar.cc
lily/span-dynamic-performer.cc
lily/spanner.cc
lily/staff-performer.cc
lily/staff-symbol-engraver.cc
lily/staff-symbol-referencer.cc
lily/staff-symbol.cc
lily/stanza-number-engraver.cc
lily/stem-engraver.cc
lily/stem-tremolo.cc
lily/stem.cc
lily/sustain-pedal.cc
lily/swallow-perf.cc
lily/syllable-group.cc
lily/symbol-cache.cc
lily/system-start-delimiter-engraver.cc
lily/system-start-delimiter.cc
lily/template5.cc
lily/tempo-performer.cc
lily/text-engraver.cc
lily/text-item.cc
lily/text-spanner-engraver.cc
lily/tfm-reader.cc
lily/tfm.cc
lily/tie-column.cc
lily/tie-engraver.cc
lily/tie-performer.cc
lily/tie.cc
lily/time-scaled-music-iterator.cc
lily/time-scaled-music.cc
lily/time-signature-engraver.cc
lily/time-signature-performer.cc
lily/time-signature.cc
lily/timing-engraver.cc
lily/timing-translator.cc
lily/translator-ctors.cc
lily/translator-def.cc
lily/translator-group.cc
lily/translator.cc
lily/transposed-music.cc
lily/tuplet-bracket.cc
lily/tuplet-engraver.cc
lily/type-swallow-translator.cc
lily/unfolded-repeat-iterator.cc
lily/vertical-align-engraver.cc
lily/voice-devnull-engraver.cc
lily/volta-engraver.cc
lily/volta-spanner.cc
ly/engraver.ly
mf/feta-bolletjes.mf
mf/feta-klef.mf
mf/feta-puntje.mf
scm/c++.scm
scm/clef.scm
scm/grob-description.scm
scm/output-lib.scm

diff --git a/CHANGES b/CHANGES
index 3da27c528ee60f4f1da4a3adafe604f06cc1fe69..61b05eba1bfd3d89d757ce6a49d3a85cd4888085 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,19 @@
-1.3.136.jcn2
+1.3.136.jcn3
+============
+
+* Finished () beautification.
+
+* Bugfix: grob-description.scm: Script::after_line_breaking ->
+before_line_breaking.
+
+1.3.136.hwn1
+============
+
+* Percent style repeats. 
+
+* Named music creation: (ly-make-music "Note_req")
+
+ 1.3.136.jcn2
 ============
 
 * Bugfix and small addition to convert-ly.
@@ -11,9 +26,6 @@
 Coriolan from 1143 to 283.  Part combiner still gives rise to many
 foreseeable warnings.
 
-1.3.136.jcn1
-============
-
 * Bugfix: install gettext.py into @datadir@/python and use that path
 from ly2dvi.  Debian or RedHat installs could/should move gettext.py
 into /usr/share/lib/python/1.x/site-packages or so.
@@ -43,6 +55,16 @@ editorial decisions dated 1936.  Arguably, because most of these small
 changes can be found in other editions, some of which even are
 commonplace modernisations.
 
+1.3.136.uu1
+===========
+
+* Added noteheadtypes: "slash","triangle","xcircle" ; completed
+noteheadtype "cross" ; added (ugly) tab-clef ; changed percussion
+clef, fixed "repeat dots on even number of stafflines"-bug. (Rune
+Zedeler)
+
+* Use complete version number for /var/lib/texmf/ paths.
+
 1.3.136
 =======
 
index 3f37cc89b7c06c0e62f9ea5d2509c1110937fcfa..3664cef1c354e737e6e351c717008c36dd96b249 100644 (file)
@@ -456,6 +456,10 @@ Get the property @var{sym} of music expression @var{m}.
 Set property @var{sym} in music expression @var{m} to @var{val}.
 @end defun
 
+@defun ly-make-music name
+Make a music object/expression of type @var{name}. Warning: this
+interface will likely change in the near future.
+@end defun
 
 @node Molecules
 @section Molecules
index 9dfeaf081a44d77e53d5a2b8ea068bb708197fdb..fb6f39694ef65bd3abbf2620ecf6d6f82ca7a882 100644 (file)
@@ -1320,9 +1320,8 @@ This is a short-cut for doing
 @end example
 
 You are encouraged to use @code{\repeat} for repetitions.  See
-@ref{Repeats}, and the documentation of @code{whichBar} in
-@ref{(lilypond-internals)LilyPond context properties}.
-
+@ref{Repeats}, and the documentation of @code{whichBar} in the generated
+docuemntation.
 
 [FIXME]
 
@@ -1376,6 +1375,11 @@ practical for anything right now.
 
 @item tremolo
 Make tremolo beams.
+
+@item percent
+Make  measure repeats. These look like percent signs.
+
+
 @end table  
 
 @menu
@@ -1383,6 +1387,7 @@ Make tremolo beams.
 * Manual repeat commands::      
 * Tremolo repeats::             
 * Tremolo subdivision::         
+* Measure repeats::             
 @end menu
 
 @node Repeat syntax
@@ -1541,6 +1546,21 @@ default argument saves a lot of typing.
 
 
 
+@node Measure repeats
+@subsection Measure repeats
+
+@cindex percent repeats
+@cindex measure repeats
+
+In the @code{percent} style, a note pattern can be repeated. It is
+printed once, and then the pattern is replaced with a special sign.
+
+@lilypond[verbatim,singleline]
+ \context Voice { \repeat  "percent" 5  { c'1 } }  
+@end lilypond
+
+At present, only repeats of whole measures are supported.
+
 
 @c . {Piano music}
 @node Piano music
diff --git a/VERSION b/VERSION
index f21e2fd23de8460e8d60097a180d16ec2504df56..7b236227d927140a08fe9915786bc30135341d25 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=136
-MY_PATCH_LEVEL=jcn2
+MY_PATCH_LEVEL=jcn3
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 8814f7723ef0843bc92709d0638f4678f00c2917..0bf70a244eca3e39b31c6c4bb79b19c152e8c647 100644 (file)
 String
 axis_name_str (Axis a)
 {
-  return to_str (char(a + 'x'));
+  return to_str (char (a + 'x'));
 }
 
 /*
   TODO inline these.
  */
 Axis
-post_incr(Axis &a)
+post_incr (Axis &a)
 {
-  assert(a < NO_AXES);
+  assert (a < NO_AXES);
   Axis b= a;
-  a = Axis(int(a) + 1);
+  a = Axis (int (a) + 1);
   return b;
 }
 
 Axis
-incr(Axis &a)
+incr (Axis &a)
 {
-  assert(a < NO_AXES);
-  a = Axis(int(a) + 1);
+  assert (a < NO_AXES);
+  a = Axis (int (a) + 1);
   return a;
 }
 
index a551244489b1483b7016762f07512e9c8787927e..4cc1d02f5b94c0ac163d05890d9cd23c222135eb 100644 (file)
@@ -63,7 +63,7 @@ Binary_source_file::line_i (char const* pos_ch_C) const
 U8
 Binary_source_file::get_U8 ()
 {
-  return *(U8*)forward_ch_C (1);
+  return * (U8*)forward_ch_C (1);
 }
 
 
@@ -80,7 +80,7 @@ Binary_source_file::get_U16 ()
 
 
 U32
-Binary_source_file::get_U32()
+Binary_source_file::get_U32 ()
 {
   U32 b;
   
index b61ea77ff184dbe5ca93a810bf1c2dc4e50017b0..56eee1a2ced4539037b19a4fd87b0dd8ac7870f0 100644 (file)
@@ -13,7 +13,7 @@
 #ifdef CLK_TCK
 #define CLOCKS_PER_SEC  CLK_TCK
 #elif defined _SC_CLK_TCK
-#define CLOCKS_PER_SEC  sysconf(_SC_CLK_TCK)
+#define CLOCKS_PER_SEC  sysconf (_SC_CLK_TCK)
 #else
 #error cannot determine CLOCKS_PER_SEC
 #endif
@@ -34,5 +34,5 @@ Real
 Cpu_timer::read ()
 {
   clock_t stop = clock ();
-  return (stop-start_clock_)/Real(CLOCKS_PER_SEC);
+  return (stop-start_clock_)/Real (CLOCKS_PER_SEC);
 }
index 8339524cd0519681bf43544581773714ce906320..9f4c16b115fb6dea2693a352955b9a8751f9ba8b 100644 (file)
 #include "data-file.hh"
 
 void
-Data_file::gobble_white()
+Data_file::gobble_white ()
 {
   char c;
 
-  while ((c=data_get()) == ' ' ||c == '\t')
-    if (eof_b())
+  while ((c=data_get ()) == ' ' ||c == '\t')
+    if (eof_b ())
       return;
 
   data_unget (c);
 }
 
 String
-Data_file::get_word()
+Data_file::get_word ()
 {// should handle escape seq's
   String s;
 
   while (1)
     {
-      char     c  = data_get();
+      char     c  = data_get ();
       
-      if  (eof_b ())
+      if (eof_b ())
        break;
 
       if (isspace (c))
@@ -49,7 +49,7 @@ Data_file::get_word()
        {
          rawmode= true;
 
-         while ((c  = data_get()) != '\"')
+         while ((c  = data_get ()) != '\"')
            if (eof_b ())
              error (_ ("EOF in a string"));
            else
@@ -66,12 +66,12 @@ Data_file::get_word()
 }
 
 char
-Data_file::data_get()
+Data_file::data_get ()
 {
-  char c =  get();
+  char c =  get ();
   if (!rawmode && c == '#') // gobble comment
     {
-      while (!eof_b () && (c = get()) != '\n')
+      while (!eof_b () && (c = get ()) != '\n')
        ;
       return '\n';
     }
@@ -80,23 +80,23 @@ Data_file::data_get()
 }
 
 String
-Data_file::get_line()
+Data_file::get_line ()
 {
   char c;
   String s;
 
-  while (!eof_b () && (c  = data_get()) != '\n')
+  while (!eof_b () && (c  = data_get ()) != '\n')
     s += to_str (c);
   return s;
 }
 
 void
-Data_file::gobble_leading_white()
+Data_file::gobble_leading_white ()
 {
   // eat blank lines.
   while (!eof_b ())
     {
-      char c = data_get();
+      char c = data_get ();
       if (!isspace (c))
        {
          data_unget (c);
@@ -108,7 +108,7 @@ Data_file::gobble_leading_white()
 Data_file::Data_file (String s)
   : Text_stream (s) 
 {
-  //*mlog << "(" << s << flush;        
+  //*mlog << " (" << s << flush;       
   rawmode=  false;     
 }
 
index f28077dc85ebbe92509508336957ca07a5c253c9..797174755bc9e8e86d04617faa99b1b3e7d5c2cf 100644 (file)
 String
 direction_str (Direction d, Axis a)
 {
-  String s("center");
+  String s ("center");
   if (a == Y_AXIS)
     {
-       s =( d == UP ? "up" : "down");
+       s = ( d == UP ? "up" : "down");
     }
   else if (a == X_AXIS)
     {
index abdd5c3db08737ea87293c7dcff465d27085e149..c157fe5049d2ed83daeb4414a4e209e7830106d8 100644 (file)
@@ -57,13 +57,13 @@ Dstream::identify_as (String name)
     idx = cl;
   else
     {
     (*silent_dict_p_)[idx] = default_silence_b_;
+ (*silent_dict_p_)[idx] = default_silence_b_;
     }
   local_silence_b_ = (*silent_dict_p_)[idx];
   if (current_classname_str_ != idx && !local_silence_b_)
     {
       current_classname_str_=idx;
-      if (!(*silent_dict_p_)["Dstream"])
+      if (! (*silent_dict_p_)["Dstream"])
        *os_l_ << "[" << current_classname_str_ << ":]"; // messy.
     }
   return *this;
@@ -81,28 +81,28 @@ Dstream::silent_b (String s) const
 }
 
 Dstream &
-Dstream::operator<<(void const *v_l)
+Dstream::operator<< (void const *v_l)
 {
   output (String_convert::pointer_str (v_l));
   return *this;
 }
 
 Dstream &
-Dstream::operator <<(String s)
+Dstream::operator << (String s)
 {
   output (s);
   return *this;
 }
 
 Dstream &
-Dstream::operator <<(const char * s)
+Dstream::operator << (const char * s)
 {
   output (String (s));
   return *this;
 }
 
 Dstream &
-Dstream::operator <<(char c)
+Dstream::operator << (char c)
 {
   output (to_str (c));
   return *this;
@@ -111,19 +111,19 @@ Dstream::operator <<(char c)
 Dstream&
 Dstream::operator << (Real r)
 {
-  output (to_str  (r));
+  output (to_str (r));
   return *this;
 }
 Dstream &
-Dstream::operator <<(Rational c)
+Dstream::operator << (Rational c)
 {
   output (c.str ());
   return *this;
 }
 Dstream &
-Dstream::operator <<(int i)
+Dstream::operator << (int i)
 {
-  output (to_str(i));
+  output (to_str (i));
   return *this;
 }
   
@@ -148,7 +148,7 @@ Dstream::output (String s)
        indent_level_i_ -= INDTAB;
        *os_l_ << *cp           ;
 
-       assert  (indent_level_i_>=0) ;
+       assert (indent_level_i_>=0) ;
        break;
 
       case '\n':
@@ -181,12 +181,12 @@ Dstream::Dstream (ostream *r, char const * cfg_nm)
   Text_db cfg (fn);
   while (!cfg.eof_b ()){
     Text_record  r (cfg++);
-    if (r.size() != 2)
+    if (r.size () != 2)
       {
        r.message (_ ("not enough fields in Dstream init"));
        continue;
       }
   (*silent_dict_p_)[r[0]] = r[1] == "1";
+ (*silent_dict_p_)[r[0]] = r[1] == "1";
   }
 
   if ((*silent_dict_p_).elem_b ("Dstream_default_silence"))
@@ -194,14 +194,14 @@ Dstream::Dstream (ostream *r, char const * cfg_nm)
 }
 
 
-Dstream::~Dstream()
+Dstream::~Dstream ()
 {
   delete silent_dict_p_;
   assert (!indent_level_i_) ;
 }
 
 void
-Dstream::clear_silence()
+Dstream::clear_silence ()
 {
   delete silent_dict_p_;
   silent_dict_p_ = 0;
index f290b83628b471a71da6e7857a1a65d6f8198e6a..b078fbc3b6631064bbf5e39fa32465bc0082df9d 100644 (file)
@@ -83,12 +83,12 @@ File_path::parse_path (String p)
 {
   int l;
   
-  while ( (l = p.length_i ()) )
+  while ((l = p.length_i ()) )
     {
-      int i = p.index_i(PATHSEP);
+      int i = p.index_i (PATHSEP);
       if (i <0) 
        i = l;
-      add (p.left_str(i));
+      add (p.left_str (i));
       p = p.right_str (l- i - 1);
     }
 }
@@ -107,13 +107,13 @@ String
 File_path::find (String nm) const
 {
   DEBUG_OUT << "looking for" << nm << ": ";
-  if (!nm.length_i() || (nm == "-") )
+  if (!nm.length_i () || (nm == "-") )
     return nm;
-  for (int i=0; i < size(); i++)
+  for (int i=0; i < size (); i++)
     {
-      String path  = elem(i);
+      String path  = elem (i);
       String sep = to_str (DIRSEP);
-      String right(path.right_str (1));
+      String right (path.right_str (1));
       if (path.length_i () && right != sep)
        path += to_str (DIRSEP);
 
@@ -126,10 +126,10 @@ 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.ch_C (), &sbuf) == ENOENT)
        continue;
       
-      if (!(sbuf.st_mode & __S_IFREG))
+      if (! (sbuf.st_mode & __S_IFREG))
        continue;
 #endif
 #if !STAT_MACROS_BROKEN
@@ -141,7 +141,7 @@ File_path::find (String nm) const
        continue;
 #endif
 
-      FILE *f = fopen (path.ch_C(), "r"); // ugh!
+      FILE *f = fopen (path.ch_C (), "r"); // ugh!
       if (f)
        {
          DEBUG_OUT << "found\n";
@@ -161,7 +161,7 @@ File_path::try_add (String s)
 {
   if (s == "")
     s =  ".";
-  FILE  * f = fopen (s.ch_C(), "r");
+  FILE  * f = fopen (s.ch_C (), "r");
   if (!f)
     return false;
   fclose (f);
index 22d5c05600a2b2d5474f63fbce107a8470ce4d3b..8e210efe2006bba701020b0ab3b76b8ecbfcd65f 100644 (file)
@@ -27,7 +27,7 @@ gettext (char const* s)
 #endif
 
 long
-Getopt_long::argument_to_i()
+Getopt_long::argument_to_i ()
 {
   long l;
   if (!optional_argument_ch_C_
@@ -38,7 +38,7 @@ Getopt_long::argument_to_i()
 }
 
 const Long_option_init *
-Getopt_long::parselong()
+Getopt_long::parselong ()
 {
   char const *optnm = arg_value_ch_a_a_[array_index_i_] + 2 ;
   assert (*optnm);
@@ -168,7 +168,7 @@ Getopt_long::report (Errorcod c)
 }
 
 const Long_option_init *
-Getopt_long::parseshort()
+Getopt_long::parseshort ()
 {
   char c=arg_value_ch_a_a_[array_index_i_][argument_index_i_];
   found_option_l_=0;
@@ -212,17 +212,17 @@ Getopt_long::parseshort()
 }
 
 const Long_option_init *
-Getopt_long::operator()()
+Getopt_long::operator () ()
 {
-  if (!ok())
+  if (!ok ())
     return 0;
 
-  next();
+  next ();
   if (!ok ())
     return 0;
 
   if (argument_index_i_)
-    return parseshort();
+    return parseshort ();
 
   const char * argument_C = arg_value_ch_a_a_[array_index_i_];
 
@@ -231,7 +231,7 @@ Getopt_long::operator()()
 
   if (argument_C[1] == '-') {// what to do with "command  --  bla"
     if (argument_C[2])
-      return parselong();
+      return parselong ();
     else
       return 0;
   }
@@ -240,7 +240,7 @@ Getopt_long::operator()()
       if (argument_C[ 1 ])
        {
          argument_index_i_ = 1;
-         return parseshort();
+         return parseshort ();
        }
       else
        {
@@ -268,13 +268,13 @@ Getopt_long::Getopt_long (int c, char  **v, Long_option_init *lo)
 }
 
 bool
-Getopt_long::ok() const
+Getopt_long::ok () const
 {
   return  array_index_i_ < argument_count_i_;
 }
 
 void
-Getopt_long::next()
+Getopt_long::next ()
 {
   error_ = E_NOERROR;
   while (array_index_i_ < argument_count_i_
@@ -286,7 +286,7 @@ Getopt_long::next()
 }
 
 char const *
-Getopt_long::current_arg()
+Getopt_long::current_arg ()
 {
   if (array_index_i_ >= argument_count_i_)
     return 0;
@@ -295,9 +295,9 @@ Getopt_long::current_arg()
 }
 
 char const *
-Getopt_long::get_next_arg()
+Getopt_long::get_next_arg ()
 {
-  char const * a = current_arg();
+  char const * a = current_arg ();
   if (a)
     {
       array_index_i_ ++;
index f8f6e352fdc7a0a92c7b609bfb7b2c1ea2f70c62..4e9710c1e2228195f442cf2502d483d0deaf512e 100644 (file)
@@ -56,19 +56,19 @@ protected:
 
 public:
   /// check invariants
-  void OK() const ;
+  void OK () const ;
   /** report the size_.
       @see 
       {setsize_}
   */
 
-  int size() const  
+  int size () const  
     {
       return size_;
     }
     
-  /// POST: size() == 0
-  void clear() 
+  /// POST: size () == 0
+  void clear () 
     {
       size_ = 0;
     }
@@ -80,7 +80,7 @@ public:
       arrcpy (array_p_, tp, n);      
     }
   
-  Array() 
+  Array () 
     { array_p_ = 0; max_ =0; size_ =0; }
 
   // ugh, get around gcc 2.8.1 ice; see bezier.cc
@@ -92,7 +92,7 @@ public:
 
 
   /** set the size_ to #s#.
-      POST: size() == s.
+      POST: size () == s.
       Warning: contents are unspecified */
   void set_size (int s) 
     {
@@ -100,11 +100,11 @@ public:
       size_ = s;    
     }
     
-  ~Array() 
+  ~Array () 
     { delete[] array_p_; }
 
   /// return a  "new"ed copy of array 
-  T* copy_array() const 
+  T* copy_array () const 
     {
       T* Tarray = new T[size_];
       arrcpy (Tarray, array_p_, size_);
@@ -115,19 +115,19 @@ public:
     {
       return array_p_;
     }
-  void operator=(Array const & src) 
+  void operator= (Array const & src) 
     {
       set_size (src.size_);
       arrcpy (array_p_,src.array_p_, size_);
     }
   Array (Array const & src) 
     {
-      array_p_ = src.copy_array();
+      array_p_ = src.copy_array ();
       max_ = size_ = src.size_;        
     }
 
   /// tighten array size_.
-  void tighten_maxsize()     {
+  void tighten_maxsize ()     {
     remax (size_);
   }
     
@@ -161,16 +161,16 @@ public:
       if (size_ == max_)
        remax (2*max_ + 1);
 
-      // T::operator=(T &) is called here. Safe to use with automatic
+      // T::operator= (T &) is called here. Safe to use with automatic
       // vars
       array_p_[size_++] = x;
     }
   /// remove and return last entry 
-  T pop() 
+  T pop () 
     {
-      assert (!empty());
+      assert (!empty ());
       T l = top (0);
-      set_size (size()-1);
+      set_size (size ()-1);
       return l;
     }
   /// access last entry
@@ -205,8 +205,8 @@ public:
   void swap (int i,int j) 
     {
       T t ((*this)[i]);
     (*this)[i]=(*this)[j];
     (*this)[j]=t;
(*this)[i]= (*this)[j];
+ (*this)[j]=t;
     }
   bool empty () const 
     { return !size_; }
@@ -223,8 +223,8 @@ public:
     }
   void unordered_del (int i)
     {
-      elem_ref (i) = top();
-      set_size (size() -1);
+      elem_ref (i) = top ();
+      set_size (size () -1);
     }
   void del (int i) 
     {
@@ -233,7 +233,7 @@ public:
       size_--;
     }
   // quicksort.
-  void sort (int (*compare)(T const&,T const&),
+  void sort (int (*compare) (T const&,T const&),
             int lower = -1, int upper = -1);
   void concat (Array<T> const &src) 
     {
@@ -242,7 +242,7 @@ public:
       arrcpy (array_p_+s,src.array_p_, src.size_);     
     }
   Array<T> slice (int lower, int upper) const; 
-  void reverse();
+  void reverse ();
 };
 
 #include "array.icc"
index 71de84a8acb485f9111560a96f9bac5426c92cb0..6ede38df668f381e996a7565ff1c9b007530049e 100644 (file)
@@ -49,7 +49,7 @@ Array<T>::insert (T k, int j)
 }
 
 template<class T> INLINE void
-Array<T>::sort (int (*compare)(T const&,T const&),
+Array<T>::sort (int (*compare) (T const&,T const&),
           int lower = -1, int upper = -1) 
 {
   if (lower < 0) 
@@ -79,7 +79,7 @@ Array<T>::reverse ()
 
 template<class T> INLINE
 void
-Array<T>::OK() const
+Array<T>::OK () const
 {
   assert (max_ >= size_ && size_ >=0);
   if (max_) assert (array_p_);
index c863fdda1f10448f6d676b5bf67da8c35d6ddf30..7293725c03da9ded08492be75553beade65818b1 100644 (file)
@@ -25,9 +25,9 @@ String axis_name_str (Axis);
 /**
   the operator ++ for Axis. 
  */
-Axis post_incr(Axis &);
-Axis incr(Axis &);
-//Axis operator++(Axis);
+Axis post_incr (Axis &);
+Axis incr (Axis &);
+//Axis operator++ (Axis);
 
 
 
index ef69ce5162cb29ca8213633636df0cc392c84909..328783c2e6c8d7cce602d9931506e85fedfb4b81 100644 (file)
@@ -22,8 +22,8 @@ operator op (type t1, type t2)\
 
 #if defined (__GNUG__) && ! defined (__STRICT_ANSI__)
 #define GPP_MINMAX(type, prefix)\
-       prefix GPP_MINMAX_OPERATOR(type, <?, <)\
-       prefix GPP_MINMAX_OPERATOR(type, >?, >)
+       prefix GPP_MINMAX_OPERATOR (type, <?, <)\
+       prefix GPP_MINMAX_OPERATOR (type, >?, >)
 #else
 #define GPP_MINMAX(type, prefix)
 #endif
@@ -33,21 +33,21 @@ operator op (type t1, type t2)\
     Please fill a & in the type argument if necessary.    
     */
 #define TEMPLATE_INSTANTIATE_COMPARE(type, function, prefix) \
-prefix ONE_OPERATOR(type, function, >)\
-prefix ONE_OPERATOR(type, function, >=)\
-prefix ONE_OPERATOR(type, function, ==)\
-prefix ONE_OPERATOR(type, function, !=)\
-prefix ONE_OPERATOR(type, function, <)\
-prefix ONE_OPERATOR(type, function, <=)\
-GPP_MINMAX(type, prefix)\
+prefix ONE_OPERATOR (type, function, >)\
+prefix ONE_OPERATOR (type, function, >=)\
+prefix ONE_OPERATOR (type, function, ==)\
+prefix ONE_OPERATOR (type, function, !=)\
+prefix ONE_OPERATOR (type, function, <)\
+prefix ONE_OPERATOR (type, function, <=)\
+GPP_MINMAX (type, prefix)\
 prefix inline type max (type t1, type t2) {  return (t1 > t2)? t1 : t2; }\
 prefix inline type min (type t1, type t2) {  return (t1 < t2)? t1 : t2; }\
   \
-prefix  bool operator<(type t1, type t2) /* stupid fix to allow ; */
+prefix  bool operator< (type t1, type t2) /* stupid fix to allow ; */
 
 
     
-#define INSTANTIATE_COMPARE(type, func) TEMPLATE_INSTANTIATE_COMPARE(type,func,)
+#define INSTANTIATE_COMPARE(type, func) TEMPLATE_INSTANTIATE_COMPARE (type,func,)
      
 
      
index a2ebc352d7b423db6ae89fb476b614639036d0f0..81161dd5ce77020f590c6d59b03f9239411c6d15 100644 (file)
@@ -40,7 +40,7 @@ class Killing_cons : public Cons<T>
 {
 public:
   Killing_cons (T *t, Cons<T> *p)
-    : Cons<T>( t,p)
+    : Cons<T> ( t,p)
     {
     }
   virtual ~Killing_cons ();
@@ -60,7 +60,7 @@ Cons<T> *remove_cons (Cons<T> **pp)
 template<class T> int cons_list_size_i (Cons<T> *l)
 {
   int i=0;
-  while  (l)
+  while (l)
     {
       l = l->next_;
        i++;
@@ -86,7 +86,7 @@ Cons<T> * last_cons (Cons<T> * head)
 
    Invariants:
 
  (*tail_) is either the head_ pointer, or a next_ pointer from the list.
+ (*tail_) is either the head_ pointer, or a next_ pointer from the list.
    
    **tail_ == NULL
  */
@@ -115,7 +115,7 @@ public:
       assert (!c->next_);
       *nil_pointer_address_ = c;
       while (*nil_pointer_address_)
-       nil_pointer_address_ = &(*nil_pointer_address_)->next_;
+       nil_pointer_address_ = & (*nil_pointer_address_)->next_;
     }
   /**
      PRE: *pp should either be the head_ pointer, or the next_ pointer
@@ -123,7 +123,7 @@ public:
   */
   Cons<T> *remove_cons (Cons<T> **pp)
     {
-      if (&(*pp)->next_ == nil_pointer_address_)
+      if (& (*pp)->next_ == nil_pointer_address_)
        nil_pointer_address_ = pp;
 
       return ::remove_cons (pp);
@@ -133,7 +133,7 @@ public:
   void truncate (int i)
     {
       Cons<T> **p  = &head_;
-      for (; *p && i;  p = &((*p)->next_))
+      for (; *p && i;  p = & ((*p)->next_))
        {
          i--;
        }
index 9ca3a0cbfb5d040e681ecb953aea04609277f313..797765c90bbb28ae66495c8cb4fa8612ae32302e 100644 (file)
@@ -27,24 +27,24 @@ public:
    Get a char.
    Only class member who uses text_file::get
    */
-  char data_get();    
+  char data_get ();    
   void data_unget (char c) {
     unget (c);
   }
 
   /// read line, eat #\n#
-  String get_line();
+  String get_line ();
     
   /// read a word till next space, leave space. Also does quotes
-  String get_word();
+  String get_word ();
 
   /// gobble horizontal white stuff.
-  void gobble_white();
+  void gobble_white ();
 
   /// gobble empty stuff before first field.
-  void gobble_leading_white();
+  void gobble_leading_white ();
   Data_file (String);
-  ~Data_file();
+  ~Data_file ();
   /**
      eat complete file
      @post
index f7eb8affce1b864bb9476a797fc381f78fa2fa3e..464bfa132336fff8066127f360f47440baea90df 100644 (file)
@@ -19,7 +19,6 @@
 
 unsigned int string_hash (String);
 
-
 template<class V>
 struct Dict_initialiser
 {
@@ -42,7 +41,7 @@ public:
     {
       hash_func_ = string_hash;
       for (Dict_initialiser<V> *q = p; q->key_; q++)
      (*this) [q->key_] = q->value_;
+ (*this) [q->key_] = q->value_;
          
     }
   bool elem_b (String s)
index 2e18ff2a49ff504ce06a3ffcd975b58a86bf8d2a..902f2fa2b8182a5a7d4aa81152ba3f4e00ea7768 100644 (file)
@@ -30,7 +30,7 @@ enum Direction
 inline Direction
 other_dir (Direction const d)
 {
-  return (Direction)(-d);
+  return (Direction) (-d);
 }
 
 inline Direction
index 75f98611956ca2494728440f1286cf7c94db32b3..4e193667f0d6d8b39c35d7d74011c4d7a18a0ab7 100644 (file)
@@ -24,7 +24,7 @@ struct Drul_array
   T &elem (Direction d)
     {
       assert (d==1 || d== -1);
-      return array_[(d+1)/2];
+      return array_[ (d+1)/2];
 
     }
   T &operator[] (Direction d)
@@ -34,10 +34,10 @@ struct Drul_array
   T elem (Direction d) const
     {
     assert (d==1 || d== -1);
-    return array_[(d+1)/2];
+    return array_[ (d+1)/2];
     }
   
-  T operator[]  (Direction d) const
+  T operator[] (Direction d) const
   {
     return elem (d);
   }
index 0f1c10079661d1b9df778c10d8c6ae593a135030..92111fbfb1cccfe3c1b65ad7d140b967c7a24752 100644 (file)
@@ -16,7 +16,7 @@ const char eol= '\n';
 
 /**  Debug stream. 
    a class for providing debug output of nested structures,
-   with indents according to \{\}()[].
+   with indents according to \{\} ()[].
 
    One can turn on and off specific messages using the Assoc silent.
    This can be done automatically:
@@ -43,14 +43,14 @@ class Dstream
   Dictionary<bool> *silent_dict_p_;
   
 public:
-  void clear_silence();
+  void clear_silence ();
   bool silent_b (String) const;
     
   /**
      if rcfile == 0, then do not read any rc file.
   */
   Dstream (ostream *r, char const * rcfile);
-  virtual ~Dstream();
+  virtual ~Dstream ();
   Dstream &identify_as (String s);
 
 
index cad9bff1f2cf1672bb55dbb56e84f310013f387b..d946063901a58e080f9e0caf0991de376abceb2f 100644 (file)
@@ -9,7 +9,7 @@
 #define FPROTO_HH
 
 
-char const * flower_version_sz();
+char const * flower_version_sz ();
 
 template<class T> struct Link_array;
 template<class T> struct Array;
index 92de4934dc52610523c688e13cc7f3daa81cafdf..887a1a37096e039604f73cbc1cb5a28bbec6d89a 100644 (file)
@@ -71,18 +71,18 @@ public:
 
 public:
   /// get ready for processing next error.
-  void next();
-  const Long_option_init *parselong();
-  const Long_option_init *parseshort();
-  void OK() const;
-  bool ok() const;
+  void next ();
+  const Long_option_init *parselong ();
+  const Long_option_init *parseshort ();
+  void OK () const;
+  bool ok () const;
 
   /// report an error and abort
   void report (Errorcod c);
 
 
   /// return an integer (with err. detect)
-  long argument_to_i();
+  long argument_to_i ();
  
     
   /**
@@ -100,10 +100,10 @@ public:
     @return pointer to next option found.
     0 if error occurred, or next argument is no option.
     */
-  const Long_option_init *operator()();
+  const Long_option_init *operator () ();
 
-  char const *current_arg();
-  char const * get_next_arg();
+  char const *current_arg ();
+  char const * get_next_arg ();
 };
 
 #endif // GETOPT_LONG_HH
index 61b4a3497376f3191438e18dee065b78986ab554..ee840982511692c6f62cf7c242547eca03df2384 100644 (file)
@@ -17,10 +17,10 @@ class Hash_table_iter
   Hash_table<K,V> *dict_l_;
   int i;
 public:
-  Hash_table_iter(Hash_table<K,V> const &dict)
+  Hash_table_iter (Hash_table<K,V> const &dict)
     {
       i = 0;
-      dict_l_ =(Hash_table<K,V> *) & dict;
+      dict_l_ = (Hash_table<K,V> *) & dict;
       next_used ();
     }
 
@@ -36,7 +36,7 @@ public:
          i ++;
        }
     }
-  void operator ++(int)
+  void operator ++ (int)
     {
       i++;
       next_used ();
index f3f5bfe23402768e46f5206593b24abc5fd186d3..8cc51f2e1b403f490d1b69300423f12bc28463d2 100644 (file)
@@ -28,7 +28,7 @@ struct Hash_table_entry
   V value_;
   bool free_b_;
 
-  Hash_table_entry() {
+  Hash_table_entry () {
     free_b_ = true;
   }
   Hash_table_entry (K s, V v)
@@ -55,12 +55,12 @@ public:
   Fixed_size_hash_table (int size_idx)
     {
       size_idx_ = size_idx;
-      int sz = prime_list(size_idx_);
+      int sz = prime_list (size_idx_);
       dict_arr_.set_size (sz);
     }
 
   /// find #s#, or find first empty entry corresponding to #s#
-  int lookup  (K s, unsigned int initial_hash)
+  int lookup (K s, unsigned int initial_hash)
     {
       int sz =dict_arr_.size ();
       initial_hash = initial_hash % sz; 
@@ -102,13 +102,13 @@ class Hash_table
     {
       Fixed_size_hash_table<K,V> *f = new Fixed_size_hash_table<K,V> (fixed_p_->size_idx_ +1);
       
-      for (int i=0; i < fixed_p_->dict_arr_.size(); i++)
+      for (int i=0; i < fixed_p_->dict_arr_.size (); i++)
        {
          if (fixed_p_->dict_arr_[i].free_b_)
            continue;
 
          K nm (fixed_p_->dict_arr_[i].key_);
-         unsigned int h = (*hash_func_)(nm);
+         unsigned int h = (*hash_func_) (nm);
          int nl = f->lookup (nm, h);
          
          f->dict_arr_[nl] = Hash_table_entry<K,V> (nm, fixed_p_->dict_arr_[i].value_);
@@ -149,7 +149,7 @@ public:
     }
   bool elem_b (K s) const
     {
-      int l =  fixed_p_->lookup (s, (*hash_func_)(s));
+      int l =  fixed_p_->lookup (s, (*hash_func_) (s));
 
       return (l >= 0 && !fixed_p_->dict_arr_[l].free_b_) ;
     }
@@ -160,7 +160,7 @@ public:
   V& elem (K s)
     {
       int l;
-      unsigned int h = (*hash_func_)(s);
+      unsigned int h = (*hash_func_) (s);
       while ((l= fixed_p_->lookup (s,h)) <0)
        {
          enlarge ();
@@ -172,7 +172,7 @@ public:
     }
   bool try_retrieve (K k, V *v)
   {
-    int l =  fixed_p_->lookup (k, (*hash_func_)(k));
+    int l =  fixed_p_->lookup (k, (*hash_func_) (k));
     if (l < 0 || fixed_p_->dict_arr_[l].free_b_)
       return false;
     else
@@ -204,11 +204,11 @@ public:
 
   V remove (K s)
     {
-      return fixed_p_->remove (s, (*hash_func_)(s));
+      return fixed_p_->remove (s, (*hash_func_) (s));
     }
   friend class Hash_table_iter<K,V>;
 public:
-  unsigned int (*hash_func_)(K);
+  unsigned int (*hash_func_) (K);
 };
 
 
index b526673298f89925bc76fe81f62264f0cd2bfbd4..849a76e8e89e9c5a8b16ea4a116dac1471998e54 100644 (file)
@@ -14,7 +14,7 @@
 
 /** a T interval.  this represents the closed interval [left,right].
   No invariants. T must be a totally ordered ring (with division, anyway ..)
-  At instantiation, the function infinity() has to be defined explicitely.
+  At instantiation, the function infinity () has to be defined explicitely.
   
   */
 template<class T>
@@ -22,9 +22,9 @@ struct Interval_t : public Drul_array<T> {
 
   /* ************** */
     
-  static T infinity() ;
+  static T infinity () ;
   static String T_to_str (T arg);
-  T center() { return (elem (LEFT) + elem (RIGHT)) / T(2);}
+  T center () { return (elem (LEFT) + elem (RIGHT)) / T (2);}
   void translate (T t)
     {
       elem (LEFT) += t;
@@ -38,12 +38,12 @@ struct Interval_t : public Drul_array<T> {
   void unite (Interval_t<T> h);
   void intersect (Interval_t<T> h);
 
-  T length() const;
-  void set_empty() ;
-  bool empty_b() const { return elem (LEFT) > elem (RIGHT); }
+  T length () const;
+  void set_empty () ;
+  bool empty_b () const { return elem (LEFT) > elem (RIGHT); }
   bool contains_b (Interval_t<T> const&) const;
-  Interval_t() {
-    set_empty();
+  Interval_t () {
+    set_empty ();
   }
   Interval_t (T m, T M) : Drul_array<T> (m,M)
     {}
@@ -57,12 +57,12 @@ struct Interval_t : public Drul_array<T> {
     elem (RIGHT) +=r;
     return *this;
   }
-  Interval_t<T> &operator *=(T r) {
+  Interval_t<T> &operator *= (T r) {
     if (!empty_b ())
       {
        elem (LEFT) *= r;
        elem (RIGHT) *= r;
-       if (r < T(0)) {
+       if (r < T (0)) {
          T t = elem (LEFT);
          elem (LEFT) = elem (RIGHT);
          elem (RIGHT) = t;
@@ -72,9 +72,9 @@ struct Interval_t : public Drul_array<T> {
   }
 
   Real linear_combination (Real x) const {
-    return ((1.0 - x) * Real (elem (LEFT))  + (x + 1.0) * Real (elem(RIGHT))) * 0.5;
+    return ((1.0 - x) * Real (elem (LEFT))  + (x + 1.0) * Real (elem (RIGHT))) * 0.5;
   }
-  String str() const;    
+  String str () const;    
   void print () const;
   bool elem_b (T r);
   void negate () {
@@ -106,7 +106,7 @@ _Interval__compare (const Interval_t<T>&a,Interval_t<T> const&b);
 
 #include "compare.hh"
 
-TEMPLATE_INSTANTIATE_COMPARE(Interval_t<T>&, Interval__compare, template<class T>);
+TEMPLATE_INSTANTIATE_COMPARE (Interval_t<T>&, Interval__compare, template<class T>);
 
 
 template<class T>
@@ -120,7 +120,7 @@ intersection (Interval_t<T> a, Interval_t<T> const&b)
 
 template<class T>
 inline
-Interval_t<T> operator +(T a,Interval_t<T> i)
+Interval_t<T> operator + (T a,Interval_t<T> i)
 {
   i += a;
   return i;
@@ -145,13 +145,13 @@ Interval_t<T> operator - (T a,Interval_t<T> i)
 
 template<class T>
 inline
-Interval_t<T> operator +(Interval_t<T> i,T a){
+Interval_t<T> operator + (Interval_t<T> i,T a){
   return a+i;
 }
 
 template<class T>
 inline
-Interval_t<T> operator *(T a,Interval_t<T> i)
+Interval_t<T> operator * (T a,Interval_t<T> i)
 {
   i *= a;
   return i;
@@ -159,7 +159,7 @@ Interval_t<T> operator *(T a,Interval_t<T> i)
 
 template<class T>
 inline
-Interval_t<T> operator *(Interval_t<T> i,T a){
+Interval_t<T> operator * (Interval_t<T> i,T a){
   return a*i;
 }
 
index 7c51bd18f3879ba6d554d890d507fe2cff9c49b8..ab7ab1410e22f26670ba95e0a455242fa6ccb138 100644 (file)
@@ -62,15 +62,15 @@ Interval__compare (const Interval_t<T>&a,Interval_t<T> const&b)
 
 template<class T>
 void
-Interval_t<T>::set_empty()
+Interval_t<T>::set_empty ()
 {
-  elem (LEFT) = (T) infinity();
-  elem (RIGHT) = (T) -infinity();
+  elem (LEFT) = (T) infinity ();
+  elem (RIGHT) = (T) -infinity ();
 }
 
 template<class T>
 T
-Interval_t<T>::length() const 
+Interval_t<T>::length () const 
 {
   if (elem (RIGHT) < elem (LEFT)) 
     return 0;
@@ -120,9 +120,9 @@ intersect (Interval_t<T> x, Interval_t<T> const &y)
 
 template<class T>
 String
-Interval_t<T>::str() const
+Interval_t<T>::str () const
 {
-  if (empty_b())
+  if (empty_b ())
     return "[empty]";
   String s ("[");
  
@@ -138,6 +138,6 @@ Interval_t<T>::elem_b (T r)
 
 
 #define INTERVAL__INSTANTIATE(T) struct Interval_t<T>;\
-template  int Interval__compare(const Interval_t<T>&,Interval_t<T> const&)
+template  int Interval__compare (const Interval_t<T>&,Interval_t<T> const&)
 
 #endif // INTERVAL_TCC
index f6fcff7bd1946959e820a066b97ab2b5cb01cdd9..c29989c58e3a582a24e50f574e616e5f66e4111d 100644 (file)
@@ -24,7 +24,7 @@ copy_killing_cons_list (Cons_list<T> &dest, Cons<T> *src)
 {
   for (; src; src  = src->next_)
     {
-      T *t = new T(*src->car_);
+      T *t = new T (*src->car_);
       dest.append ( new Killing_cons<T> (t, 0));
     }
 }
index b9d7fae509fa6672c47d287c0b12016b62b8e2eb..ad0134651e21258593f3bafbb8b69fb47b27018a 100644 (file)
@@ -25,16 +25,16 @@ struct Offset {
 public:
   Real coordinate_a_[NO_AXES];
     
-  Real &operator[](Axis i) {
+  Real &operator[] (Axis i) {
     return coordinate_a_[i];
   }
-  Real operator[](Axis i) const{
+  Real operator[] (Axis i) const{
     return coordinate_a_[i];
   }
     
-  Offset& operator+=(Offset o) {
   (*this)[X_AXIS] += o[X_AXIS];
   (*this)[Y_AXIS] += o[Y_AXIS];
+  Offset& operator+= (Offset o) {
+ (*this)[X_AXIS] += o[X_AXIS];
+ (*this)[Y_AXIS] += o[Y_AXIS];
     return *this;
   }
   Offset operator - () const {
@@ -44,22 +44,22 @@ public:
     o[Y_AXIS]  = - o[Y_AXIS];
     return o;
   }
-  Offset& operator-=(Offset o) {
   (*this)[X_AXIS] -= o[X_AXIS];
   (*this)[Y_AXIS] -= o[Y_AXIS];
+  Offset& operator-= (Offset o) {
+ (*this)[X_AXIS] -= o[X_AXIS];
+ (*this)[Y_AXIS] -= o[Y_AXIS];
 
     return *this;
   }
   
   Offset &scale (Offset o) {
   (*this)[X_AXIS] *= o[X_AXIS];
   (*this)[Y_AXIS] *= o[Y_AXIS];
+ (*this)[X_AXIS] *= o[X_AXIS];
+ (*this)[Y_AXIS] *= o[Y_AXIS];
 
     return *this;
   }
-  Offset &operator *=(Real a) {
   (*this)[X_AXIS] *= a;
   (*this)[Y_AXIS] *= a;
+  Offset &operator *= (Real a) {
+ (*this)[X_AXIS] *= a;
+ (*this)[Y_AXIS] *= a;
 
     return *this;
   }
@@ -68,7 +68,7 @@ public:
     coordinate_a_[X_AXIS] =ix;
     coordinate_a_[Y_AXIS] =iy;    
   }
-  Offset() {
+  Offset () {
     coordinate_a_[X_AXIS]=
       coordinate_a_[Y_AXIS]=
       0.0;
@@ -79,16 +79,16 @@ public:
   void mirror (Axis);
   Real  arg () const;
   Real length () const;
-  Offset operator *=(Offset z2) {
+  Offset operator *= (Offset z2) {
     *this = complex_multiply (*this,z2);
     return *this;
   }
 
 };
 
-IMPLEMENT_ARITHMETIC_OPERATOR(Offset, +);
-IMPLEMENT_ARITHMETIC_OPERATOR(Offset, -);
-IMPLEMENT_ARITHMETIC_OPERATOR(Offset, *);
+IMPLEMENT_ARITHMETIC_OPERATOR (Offset, +);
+IMPLEMENT_ARITHMETIC_OPERATOR (Offset, -);
+IMPLEMENT_ARITHMETIC_OPERATOR (Offset, *);
 
 inline Offset
 operator* (Real o1, Offset o2)
index 41099671d6f69f68ee1f7cc7dcd03296e841d78e..52399b17186240e4e68a6ece277b0ae141be6c1d 100644 (file)
@@ -34,10 +34,10 @@ class Link_array : private Array<void *>
     {
     }
 public:
-  Link_array()
+  Link_array ()
     {}
 
-  Link_array(T * const *tp, int n)
+  Link_array (T * const *tp, int n)
     : Array<void*> ((void **)tp, n)
     {
     }
@@ -51,7 +51,7 @@ public:
     {
       return elem_ref (i);
     }
-  T *&elem_ref  (int i) const
+  T *&elem_ref (int i) const
     {
       return (T*&) Array<void*>::elem_ref (i);
     }
@@ -107,16 +107,16 @@ public:
        }
     
     }
-  void default_sort() {
+  void default_sort () {
     sort (default_compare);
   }
   // quicksort.
-  void sort (int (*compare)(T *const&,T *const&),
+  void sort (int (*compare) (T *const&,T *const&),
             int lower = -1, int upper = -1);
   
-  void uniq() {
+  void uniq () {
     Link_array<T> l_arr;
-    for (int i=0; i < size(); i++) 
+    for (int i=0; i < size (); i++) 
       if (!i || elem (i-1) != elem (i))
        l_arr.push (elem (i)); 
     *this = l_arr;
@@ -150,14 +150,14 @@ public:
   
   T ** access_array () const
     {
-      return (T**) Array<void*>::access_array();
+      return (T**) Array<void*>::access_array ();
     }
   T * get (int i)
     {
       return (T*) Array<void*>::get (i);
     }
   Link_array<T>
-  slice(int l,int u)
+  slice (int l,int u)
     {
       return Array<void*>::slice (l,u);
     }
@@ -166,7 +166,7 @@ public:
       Array<void*>::concat (a2);
     }
   int find_i (T const * t) const {
-    for (int i=0; i < size(); i++)
+    for (int i=0; i < size (); i++)
       if (elem (i) == t)
        return i;
     return -1;
@@ -195,7 +195,7 @@ typecast_array (Link_array<V> const &a, T * /* dummy */ )
 
 
 template<class T> inline void
-Link_array<T>::sort (int (*compare)(T *const&,T *const&),
+Link_array<T>::sort (int (*compare) (T *const&,T *const&),
                int lower = -1, int upper = -1) 
 {
   if (lower < 0) 
@@ -208,7 +208,7 @@ Link_array<T>::sort (int (*compare)(T *const&,T *const&),
   swap (lower, (lower+upper)/2);
   int last = lower;
   for (int i= lower +1; i <= upper; i++)
-    if (compare (elem (i), elem(lower)) < 0)
+    if (compare (elem (i), elem (lower)) < 0)
       swap (++last,i);
   swap (lower, last);
   sort (compare, lower, last-1);
@@ -233,7 +233,7 @@ junk_pointer_array (Link_array<T> &a)
 */
 template<class T>
 int
-binsearch_array (Array<T> const &arr, T t, int (*compare)(T const&,T const&))
+binsearch_array (Array<T> const &arr, T t, int (*compare) (T const&,T const&))
 {
   int lo;
   int hi;
@@ -265,14 +265,14 @@ binsearch_array (Array<T> const &arr, T t, int (*compare)(T const&,T const&))
 template<class T>
 int
 binsearch_link_array (Link_array<T> const &arr, T *t,
-                     int (*compare)(T *const&,T *const&))
+                     int (*compare) (T *const&,T *const&))
 {
   int lo;
   int hi;
   int cmp;
   int result;
   lo = 0;
-  hi = arr.size();
+  hi = arr.size ();
 
   if (hi == 0)
     return -1;
index d2384f612e9c11d907d9125d57ccfabfc62ee1e9..51b43b3e1f66124da5b9d2249b19c048a60c044b 100644 (file)
 
 /* Commonly used flags
  */
-#define P_GW   (P_G | P_W) 
-#define P_GM   (P_G | P_M)
-#define P_GMP  (P_G | P_M | P_P)
-#define P_GMK  (P_G | P_M | P_P | P_T) 
-#define P_GALL (P_G | P_M | P_P | P_T | P_C)
-
+#define P_GW\
+       (P_G | P_W) 
+#define P_GM\
+       (P_G | P_M)
+#define P_GMP\
+       (P_G | P_M | P_P)
+#define P_GMK\
+       (P_G | P_M | P_P | P_T) 
+#define P_GALL\
+       (P_G | P_M | P_P | P_T | P_C)
 
 
 /* Possible return codes from the parseFile procedure.
@@ -311,7 +315,7 @@ typedef struct
  *  "fp" should be a valid file pointer to an AFM file.
  *
  *  "fi" is a pointer to a pointer to a FontInfo record sturcture 
- *  (defined above). Storage for the FontInfo structure will be
+ * (defined above). Storage for the FontInfo structure will be
  *  allocated in parseFile and the structure will be filled in
  *  with the requested data from the AFM File.
  *
index 850ec183486e8f16bda41c6a433d7e44a46752dd..5ff358271253331d3ed3768431b0d2309358473f 100644 (file)
@@ -31,25 +31,25 @@ class P {
     /**
       junk contents and set to 0
      */
-  void junk();
+  void junk ();
 public:
     
-  P(P const &src);
+  P (P const &src);
   /**
       Remove  the pointer, and return it.
      */
     
-  T *get_p() { T*p = t_p; t_p=0; return p; }
+  T *get_p () { T*p = t_p; t_p=0; return p; }
   /**
       return the pointer
      */
-  T *get_l()  { return t_p; }
+  T *get_l ()  { return t_p; }
 
-  T const *get_C() const { return t_p; }
+  T const *get_C () const { return t_p; }
   /**
       copy the contents of pointer, and return it
      */
-  T *copy_p() const;
+  T *copy_p () const;
   /**
       swallow new_p, and set contents t new_p
      */
@@ -59,17 +59,17 @@ public:
      */
   void set_l (T const *t_C); 
     
-  P &operator =(P const &);
-  ~P();
-  P() { t_p = 0; }
-  //P(T *p) { t_p = p; }
+  P &operator = (P const &);
+  ~P ();
+  P () { t_p = 0; }
+  //P (T *p) { t_p = p; }
     
-  T *operator ->() { return t_p; }
-  operator T *() {  return t_p; }
-  const T *operator ->() const { return t_p ; }
-  T &operator *() { return *t_p; }
-  T const  &operator *() const { return *t_p; }
-  operator const T *() const { return t_p; }
+  T *operator -> () { return t_p; }
+  operator T * () {  return t_p; }
+  const T *operator -> () const { return t_p ; }
+  T &operator * () { return *t_p; }
+  T const  &operator * () const { return *t_p; }
+  operator const T * () const { return t_p; }
 };
 #endif // POINTER_HH
 
index 318b5b1437e92e21367da5568069851b530cbbd2..cd4aac565efb9a81e544def397de4d7e00f7305a 100644 (file)
@@ -13,9 +13,9 @@
 template<class T>
 inline
 T *
-P<T>::copy_p() const
+P<T>::copy_p () const
 {
-  return t_p? new T(*t_p) : 0;
+  return t_p? new T (*t_p) : 0;
 }
 
 template<class T>
@@ -23,13 +23,13 @@ inline
 void
 P<T>::copy (T const *l_C)
 {
-  t_p = l_C ? new T(*l_C) : 0;
+  t_p = l_C ? new T (*l_C) : 0;
 }
 
 template<class T>
 inline
 void
-P<T>::junk()
+P<T>::junk ()
 {
   delete t_p;
   t_p =0;
@@ -37,25 +37,25 @@ P<T>::junk()
 
 template<class T>
 inline
-P<T>::P(P<T> const &s) 
+P<T>::P (P<T> const &s) 
 {
-  t_p = s.copy_p();
+  t_p = s.copy_p ();
 }
 
 template<class T>
 inline
 P<T> &
-P<T>::operator =(P const&s)
+P<T>::operator = (P const&s)
 {
-  junk();
+  junk ();
   copy (s.t_p);
   return *this;
 }
 
 template<class T>
 inline
-P<T>::~P() {
-  junk();
+P<T>::~P () {
+  junk ();
 }
 
 template<class T>
@@ -79,7 +79,7 @@ P<T>::set_l (T const * l_C)
   if (t_p == l_C)
     return;
   
-  junk();
+  junk ();
   copy (l_C);
 }
 
index df79274bdc96d45e9408953b4655327cde2d77f3..b978910caf309d7a4b45c6e505f1ca557e0faafe 100644 (file)
@@ -22,52 +22,52 @@ struct Polynomial
   Array<Real>     coefs_;
 
   // leading coef
-  Real &lc();
+  Real &lc ();
 
   // leading coef
-  Real lc() const;
-  void print() const ; 
-  Real eval(Real) const ;
-  void print_sols(Array<Real>) const ;
-  void check_sols(Array<Real>) const ;
-  void check_sol(Real x) const;
-  static Polynomial multiply(const Polynomial & p1, const Polynomial & p2);
-  static Polynomial power(int exponent, const Polynomial & src);
+  Real lc () const;
+  void print () const ;        
+  Real eval (Real) const ;
+  void print_sols (Array<Real>) const ;
+  void check_sols (Array<Real>) const ;
+  void check_sol (Real x) const;
+  static Polynomial multiply (const Polynomial & p1, const Polynomial & p2);
+  static Polynomial power (int exponent, const Polynomial & src);
 
   /// chop low coefficients
-  void clean();
+  void clean ();
 
   /// eliminate #x#  close to  zero
-  void real_clean();
-  static Polynomial add(const Polynomial & p1, const Polynomial & p2);
-  void scalarmultiply(Real fact);
-  void operator *= (Real f) { scalarmultiply(f); }
-  void operator /= (Real f) { scalarmultiply(1/f); }
+  void real_clean ();
+  static Polynomial add (const Polynomial & p1, const Polynomial & p2);
+  void scalarmultiply (Real fact);
+  void operator *= (Real f) { scalarmultiply (f); }
+  void operator /= (Real f) { scalarmultiply (1/f); }
   void operator += (Polynomial const &p2);
   void operator *= (Polynomial const &p2);
   void operator -= (Polynomial const &p2);
   Polynomial (Real a, Real b =0.0);
   Polynomial (){}
-  static Polynomial subtract(const Polynomial & p1, const Polynomial & p2);
-  void set_negate(const Polynomial & src);
+  static Polynomial subtract (const Polynomial & p1, const Polynomial & p2);
+  void set_negate (const Polynomial & src);
     
   /// take the derivative
-  void differentiate();
-  int set_mod(const Polynomial &u, const Polynomial &v);
+  void differentiate ();
+  int set_mod (const Polynomial &u, const Polynomial &v);
 
-  void debug_clean();
+  void debug_clean ();
 
-  Array<Real> solve_quadric()const;
-  Array<Real> solve_cubic()const;
-  Array<Real> solve_linear()const;
+  Array<Real> solve_quadric ()const;
+  Array<Real> solve_cubic ()const;
+  Array<Real> solve_linear ()const;
 
   Array<Real> solve () const;
 };
 
 
-IMPLEMENT_ARITHMETIC_OPERATOR(Polynomial, - );
-IMPLEMENT_ARITHMETIC_OPERATOR(Polynomial, + );
-IMPLEMENT_ARITHMETIC_OPERATOR(Polynomial, * );
+IMPLEMENT_ARITHMETIC_OPERATOR (Polynomial, - );
+IMPLEMENT_ARITHMETIC_OPERATOR (Polynomial, + );
+IMPLEMENT_ARITHMETIC_OPERATOR (Polynomial, * );
 
 inline Polynomial
 operator * (Polynomial p, Real a)
index 1661bff73c7fa028e04ea98969407b467cb0d7df..4ccd72d176c28ce4b0b6a5500f55bd9c6438e90b 100644 (file)
@@ -30,7 +30,7 @@ int compare (PQueue_ent<K,T> const &e1 , PQueue_ent<K,T> const &e2) {
   Hungarian postfix pq
   
   TODO: add increase/decrease operations,
-  add max() operation
+  add max () operation
  */
 template<class T>
 class PQueue {
@@ -45,21 +45,21 @@ 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]; }
-    void OK() const
+      @param 1 <= i < size () */
+    T& operator[] (int i) { return heap_arr_[i]; }
+    T operator[] (int i) const { return heap_arr_[i]; }
+    void OK () const
     {
 #ifndef NDEBUG
-       for (int i =2; i <= size(); i++)
+       for (int i =2; i <= size (); i++)
            assert (compare (elt (i/2), elt (i)) <= 0);
 #endif
     }
-    T front() const { return elt (1); }
-    int size() const { return heap_arr_.size (); }
+    T front () const { return elt (1); }
+    int size () const { return heap_arr_.size (); }
     void insert (T v) {
        heap_arr_.push (v);
-       int i = heap_arr_.size();
+       int i = heap_arr_.size ();
        int j = i / 2 ;
        while (j) {
            if (compare (elt (j), v) > 0) {
@@ -71,21 +71,21 @@ public:
            }
        }
        elt (i) = v;
-       OK();
+       OK ();
     }
-    T max() const {
-       //int first_leaf_i = size();
+    T max () const {
+       //int first_leaf_i = size ();
        T max_t;
        return max_t;
     }
-    void delmin() {
-       assert (size());
-       T last = heap_arr_.top();
+    void delmin () {
+       assert (size ());
+       T last = heap_arr_.top ();
        
        int mini=2;
        int lasti=1;
 
-       while (mini < size()) {
+       while (mini < size ()) {
            if (compare (elt (mini + 1), elt (mini)) <0)
                mini++;
            if (compare (last,elt (mini)) < 0)
@@ -95,12 +95,12 @@ public:
            mini *= 2;
        }
        elt (lasti) = last;
-       heap_arr_.pop();
-       OK();
+       heap_arr_.pop ();
+       OK ();
     }
-    T get() { 
-       T t = front();
-       delmin();
+    T get () { 
+       T t = front ();
+       delmin ();
        return t;
     }
 };
index 69a9ab1bd20b429bfe6e2f38739b096c8218409d..e095f5871092a82e234b7cf5cc06bf5da90aaf8d 100644 (file)
@@ -37,10 +37,10 @@ public:
   void set_infinite (int sign);
   bool infty_b () const;
   void invert ();
-  int num  () const { return sign_ * num_; }
-  int den  () const { return den_; }
-  int num_i  () const { return sign_ * num_; }
-  int den_i  () const { return den_; }
+  int num () const { return sign_ * num_; }
+  int den () const { return den_; }
+  int num_i () const { return sign_ * num_; }
+  int den_i () const { return den_; }
   Rational trunc_rat () const;
   Rational div_rat (Rational) const;
   Rational mod_rat (Rational) const;
index 73131dd7d3a0a510e62b8cb7492ba7d811313b28..58d3f95365cc4f097153d832462ecb28289946df 100644 (file)
@@ -24,7 +24,7 @@ template<class T> inline T abs (T x)
 template<class T> inline int sign (T x)
 {
   if (x)
-    return x > T(0) ? 1 : -1;
+    return x > T (0) ? 1 : -1;
   return 0;
 }
 
index 20ebdb02f38abb290f03ffb44fa2badf4510a61c..58192e812cdb56de70aea74afdc5db68c0946250 100644 (file)
@@ -18,7 +18,7 @@ class Sources
   Sources (Sources const&) {}
 public:
   Sources ();
-  ~Sources();
+  ~Sources ();
 
   Source_file * get_file_l (String &filename );
   Source_file* sourcefile_l (char const* ch_C );
index a96b81b234a3232ac7d0476b9cee2168a5d0606d..1ae7460df7ddbabfc32fc621d5287a802a0f22cd 100644 (file)
@@ -13,7 +13,7 @@
 
 
 /** The functor String_convert handles all conversions to/from String
      (some time, anyway).  The class is quite empty from data view.  */
+ (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);
index 38670869cdf34b04d1dc896bb1422cf0294f9532..764dd8f0cdf65fa02efc88cb97287d01295ae3af 100644 (file)
@@ -25,12 +25,12 @@ friend class String_handle;
     int references;
 
     /// init to ""
-    String_data();
+    String_data ();
 
     /// init from src. Conservative allocation.
     String_data (String_data const &src); 
     
-    ~String_data();
+    ~String_data ();
 
     /** POST: maxlen >= j.
       @param j, maximum stringlength_i_.    
@@ -45,13 +45,13 @@ friend class String_handle;
     void remax (int j);
 
     /// check if writeable.
-    void OKW();
+    void OKW ();
 
     /// check state.
-    void OK();
+    void OK ();
 
     /// reduce memory usage.
-    void tighten();
+    void tighten ();
 
     // assignment.
     void set (Byte const* byte_C, int length_i);
@@ -63,22 +63,22 @@ friend class String_handle;
 
     void operator += (char const* ch_C);
 
-    char const* ch_C() const; 
+    char const* ch_C () const; 
 
-    char* ch_l();
+    char* ch_l ();
 
-    Byte const* byte_C() const;
+    Byte const* byte_C () const;
 
     // idem, non const
-    Byte* byte_l();
+    Byte* byte_l ();
 
     void trunc (int j);
 
     /** access element. not really safe. Can alter length_i_ without
       #String_data# knowing it.  */
-    Byte &operator [](int j);
-    Byte operator [](int j) const;
-    bool is_binary_bo() const;
+    Byte &operator [] (int j);
+    Byte operator [] (int j) const;
+    bool is_binary_bo () const;
 };
 
 
index f15434331a19158cdb57ab1db7a5e2e0c06e54b0..73a8b9c671c1958ed1016005941f53a10d08ce72 100644 (file)
@@ -18,13 +18,13 @@ const int INITIALMAX=8;
 #include <sys/types.h>
 
 INLINE void 
-String_data::OKW() 
+String_data::OKW () 
 {
   assert (references == 1);
 }
 
 INLINE void 
-String_data::OK() 
+String_data::OK () 
 {
   assert (maxlen >= length_i_);
   assert (bool (data_byte_p_));
@@ -33,7 +33,7 @@ String_data::OK()
 
 
 INLINE
-String_data::String_data() 
+String_data::String_data () 
 {
   references=0;
   maxlen = INITIALMAX;
@@ -52,7 +52,7 @@ String_data::String_data (String_data const &src)
 }
 
 INLINE
-String_data::~String_data() 
+String_data::~String_data () 
 {
   assert (references == 0);
   delete[] data_byte_p_;
@@ -61,7 +61,7 @@ String_data::~String_data()
 INLINE void 
 String_data::setmax (int j) 
 {      
-  OKW();
+  OKW ();
   if (j > maxlen) 
     {
       delete data_byte_p_;
@@ -85,7 +85,7 @@ String_data::setmax (int j)
 INLINE void 
 String_data::remax (int j) 
 {
-  OKW();
+  OKW ();
   if (j > maxlen) 
     {
       Byte *p = new Byte[j + 1];       
@@ -97,7 +97,7 @@ String_data::remax (int j)
 }
 
 INLINE void 
-String_data::tighten() 
+String_data::tighten () 
 { // should be dec'd const
   maxlen = length_i_;
   Byte *p = new Byte[maxlen + 1];          
@@ -109,7 +109,7 @@ String_data::tighten()
 INLINE void 
 String_data::set (Byte const* byte_C, int length_i) 
 {
-  OKW();
+  OKW ();
 
   assert (byte_C && byte_C != data_byte_p_);
 
@@ -131,8 +131,8 @@ String_data::set (char const* ch_C)
 INLINE void 
 String_data::append (Byte const* byte_C, int length_i) 
 {
-  OK();
-  OKW();
+  OK ();
+  OKW ();
   int old_i = length_i_;
   
   length_i_ += length_i;
@@ -152,26 +152,26 @@ String_data::operator += (char const* ch_C)
 
 INLINE
 char const*
-String_data::ch_C() const
+String_data::ch_C () const
 {
   return (char const*)data_byte_p_; 
 }
 INLINE char* 
-String_data::ch_l() 
+String_data::ch_l () 
 { 
   return (char*)data_byte_p_; 
 }
 
 INLINE Byte const*
-String_data::byte_C() const 
+String_data::byte_C () const 
 { 
   return data_byte_p_; 
 }
 
 INLINE Byte* 
-String_data::byte_l() 
+String_data::byte_l () 
 {
-  OKW();
+  OKW ();
   return data_byte_p_;
 }
 
@@ -179,28 +179,28 @@ INLINE
 void 
 String_data::trunc (int j) 
 {
-  OKW(); 
+  OKW (); 
   assert (j >= 0 && j <= length_i_);
   data_byte_p_[j] = 0;
   length_i_ = j;
 }
 
 INLINE bool
-String_data::is_binary_bo() const
+String_data::is_binary_bo () const
 {
   //    return !memchr (data_byte_p_, length_i_, 0);
   return ((int)strlen ((char const*)data_byte_p_) != length_i_ );
 }
 
 INLINE Byte&
-String_data::operator [](int j) 
+String_data::operator [] (int j) 
 {
   assert (j >= 0 && j <= length_i_);
   return data_byte_p_[j] ; 
 }
 
 INLINE Byte 
-String_data::operator [](int j) const 
+String_data::operator [] (int j) const 
 {
   assert (j >= 0 && j <= length_i_);
   return data_byte_p_[j]; 
index f74977cfbbb2ce281099ee94448c50ce6e31a32e..610531cf1e0f9d7e40d0a976e8267c9267932524 100644 (file)
@@ -24,7 +24,7 @@ class String_handle {
   String_data* data;
     
   /// decrease ref count. Named kind of like a Tanenbaum semafore 
-  void down();
+  void down ();
 
   /// increase ref count
   void up (String_data *d);
@@ -32,31 +32,31 @@ class String_handle {
   /** make sure data has only one reference.      
       POST: data->references == 1
   */
-  void copy();
+  void copy ();
     
 public:
-  String_handle();
-  ~String_handle();
+  String_handle ();
+  ~String_handle ();
   String_handle (String_handle const & src);
 
-  Byte const* byte_C() const;
-  char const* ch_C() const;
-  Byte* byte_l();
-  char* ch_l();    
-  bool is_binary_bo() const;
-  void operator =(String_handle const &src);
+  Byte const* byte_C () const;
+  char const* ch_C () const;
+  Byte* byte_l ();
+  char* ch_l ();    
+  bool is_binary_bo () const;
+  void operator = (String_handle const &src);
   void operator += (char const *s);
-  Byte operator[](int j) const;
+  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 byte_C ()
   */
-  Byte &operator[](int j);
+  Byte &operator[] (int j);
   void append (Byte const* byte_C, int length_i);
   void set (Byte const* byte_C, int length_i);
   void operator = (char const *p);
   void trunc (int j);
-  int length_i() const;
+  int length_i () const;
 };
 
 #ifdef STRING_UTILS_INLINED
index b2404b9ed598d7e0c7221c6ed5d2f8cd9e086d7c..decb241bff747970c2dab88b15af3ffce56ecab3 100644 (file)
@@ -17,9 +17,9 @@
 #include "string-handle.hh"
 
 INLINE void 
-String_handle::down() 
+String_handle::down () 
 { 
-  if (!(--data->references)) delete data; data = 0; 
+  if (! (--data->references)) delete data; data = 0; 
 }
 
 /// increase ref count
@@ -30,26 +30,26 @@ String_handle::up (String_data *d)
 }
 
 INLINE void 
-String_handle::copy() 
+String_handle::copy () 
 {
   if (data->references !=1)
     {
       String_data *newdata = new String_data (*data);
-      down();
+      down ();
       up (newdata);
     }
 }
 
 INLINE
-String_handle::String_handle() 
+String_handle::String_handle () 
 {
   up (new String_data);
 }
 
 INLINE
-String_handle::~String_handle() 
+String_handle::~String_handle () 
 {      
-  down();
+  down ();
 }    
 
 INLINE
@@ -59,99 +59,99 @@ String_handle::String_handle (String_handle const & src)
 }
 
 INLINE Byte* 
-String_handle::byte_l() 
+String_handle::byte_l () 
 {
-  copy();
-  return data->byte_l();
+  copy ();
+  return data->byte_l ();
 }
 
 INLINE char* 
-String_handle::ch_l() 
+String_handle::ch_l () 
 {
-  copy();
-  return (char*)data->byte_l();
+  copy ();
+  return (char*)data->byte_l ();
 }
 
 INLINE Byte 
-const* String_handle::byte_C() const 
+const* String_handle::byte_C () const 
 {
-  return data->byte_C();
+  return data->byte_C ();
 }
 
 INLINE char const* 
-String_handle::ch_C() const 
+String_handle::ch_C () const 
 {
-  return (char const*)data->byte_C();
+  return (char const*)data->byte_C ();
 }
 
 INLINE void 
-String_handle::operator =(String_handle const &src) 
+String_handle::operator = (String_handle const &src) 
 {
   if (this == &src)
     return;
-  down();
+  down ();
   up (src.data);
 }
 
 INLINE void 
 String_handle::operator += (char const *s) 
 {      
-  copy();
+  copy ();
   *data += s;
 }    
 
 
 INLINE Byte 
-String_handle::operator[](int j) const 
+String_handle::operator[] (int j) const 
 { 
   return (*data)[j]; 
 }
 
 // !NOT SAFE!
-// don't use this for loops. Use byte_C()
+// don't use this for loops. Use byte_C ()
 INLINE Byte &
-String_handle::operator[](int j) 
+String_handle::operator[] (int j) 
 {
-  copy();      // hmm. Not efficient
-  return data->byte_l()[j];
+  copy ();     // hmm. Not efficient
+  return data->byte_l ()[j];
 }
 
 INLINE void 
 String_handle::append (Byte const* byte_C, int length_i) 
 {
-  copy();
+  copy ();
   data->append (byte_C, length_i);
 }
                           
 INLINE void 
 String_handle::set (Byte const* byte_C, int length_i) 
 {
-  copy();
+  copy ();
   data->set (byte_C, length_i);
 }
                           
 INLINE void 
 String_handle::operator = (char const *p) 
 {
-  copy();
+  copy ();
   data->set (p);
 }
                           
 INLINE void 
 String_handle::trunc (int j) 
 {
-  copy(); data->trunc (j); 
+  copy (); data->trunc (j); 
 }
 
 INLINE int 
-String_handle::length_i() const 
+String_handle::length_i () const 
 { 
   return data->length_i_; 
 }
 
 INLINE bool
-String_handle::is_binary_bo() const {
-  return data->is_binary_bo();
+String_handle::is_binary_bo () const {
+  return data->is_binary_bo ();
 }
 
 #endif
index a64cce3014e11204e85f3143e0820f9acb2c4590..5868d9313adfae07981fa2d72518a770ee48f9e3 100644 (file)
@@ -61,7 +61,7 @@ public:
 
   /** init to empty string. This is needed because other
     constructors are provided.*/
-  String  ();
+  String ();
 
   /// String s = "abc";
   String (char const* source); 
@@ -69,20 +69,20 @@ public:
     
   ///  return "new"-ed copy of contents
   Byte* copy_byte_p () const;
-  char* copy_ch_p() const;
+  char* copy_ch_p () const;
 
   char const* ch_C () const;
   Byte const* byte_C () const;
   char* ch_l ();
   Byte* byte_l ();
 
-  String &operator =(String const & source);
+  String &operator = (String const & source);
 
   /// concatenate s
   void operator += (char const* s) { strh_ += s; }
   void operator += (String s);
 
-  bool empty_b  () const;
+  bool empty_b () const;
 
   void append (String);
   void prepend (String);
@@ -90,8 +90,8 @@ public:
   /**
     Return a char.  UNSAFE because it may change strlen () result
    */
-  char &operator [](int n);
-  char operator [](int n) const;
+  char &operator [] (int n);
+  char operator [] (int n) const;
 
   /// return n leftmost chars
   String left_str (int n) const;
@@ -120,7 +120,7 @@ public:
   /// index of rightmost c 
   int index_last_i (char c) const;
 
-  /// index of rightmost element of string  (???)
+  /// index of rightmost element of string (???)
   int index_last_i (char const* string) const;
 
   int index_i (char c) const;
@@ -177,7 +177,7 @@ String to_str (char const* format, ... );
 
 
 #include "compare.hh"
-INSTANTIATE_COMPARE(String const &, String::compare_i);
+INSTANTIATE_COMPARE (String const &, String::compare_i);
 
 #ifdef STRING_UTILS_INLINED
 #ifndef INLINE
@@ -189,18 +189,18 @@ INSTANTIATE_COMPARE(String const &, String::compare_i);
 
 
 // because char const* also has an operator ==, this is for safety:
-inline bool operator==(String s1, char const* s2)
+inline bool operator== (String s1, char const* s2)
 {
   return s1 == String (s2);
 }
-inline bool operator==(char const* s1, String s2)
+inline bool operator== (char const* s1, String s2)
 {
   return String (s1)==s2;
 }
-inline bool operator!=(String s1, char const* s2 ) {
+inline bool operator!= (String s1, char const* s2 ) {
   return s1!=String (s2);
 }
-inline bool operator!=(char const* s1,String s2) {
+inline bool operator!= (char const* s1,String s2) {
   return String (s2) !=s1;
 }
 
index 829f31f6bbbb41be53cb6bea04cbd04b73bee021..f53586f5b54a8f73db1e9406a62fbd4f4e2aa7b7 100644 (file)
 
 INLINE 
 char &
-String::operator [](int n)
+String::operator [] (int n)
 {
   return (char &) strh_[n]; 
 }
 
 INLINE 
 char 
-String::operator [](int n) const
+String::operator [] (int n) const
 {
   return strh_[n]; 
 }
index eb0ca98fc439816d5f5387c094f66868688d9fb2..813bdf041e59047333965d0bcb75d3cfc748efe3 100644 (file)
@@ -11,15 +11,15 @@ class Text_record : Array<String>
     String filename;
     
 public:
-    Text_record() { } // needed because of other ctor
+    Text_record () { } // needed because of other ctor
 
     /// report an error in this line.
     void message (String s);
-      String operator[](int j) {
-       return Array<String>::operator[](j);
+      String operator[] (int j) {
+       return Array<String>::operator[] (j);
     }
 
-    Text_record (Array<String> s, String fn, int j) : Array<String>(s) { 
+    Text_record (Array<String> s, String fn, int j) : Array<String> (s) { 
        filename = fn; line_no = j; 
     }
     Array<String>::size;           
@@ -31,21 +31,21 @@ public:
 
 class Text_db : private Data_file
 {
-    void gobble_leading_white();
+    void gobble_leading_white ();
 public:
     /// get a line with records
-    Text_record    get_record();
+    Text_record    get_record ();
 
     Text_db (String fn):Data_file (fn) { }
     Data_file::error;
     bool eof_b ();
 
     /// get next line.
-    Text_record operator++(int) {
-       return get_record();
+    Text_record operator++ (int) {
+       return get_record ();
     }
     /// are we done yet?
-    operator bool() {
+    operator bool () {
        return !eof_b ();
     }
 };
index 53c103c7ee05731cf935cda8c2c2e4fd6583cd6d..6d7e5530a807d528b06302f93df61d482f6dcad4 100644 (file)
@@ -10,7 +10,7 @@
 /**
   line counting input stream. 
   a stream for textfiles. linecounting. Thin interface getchar and
-  ungetchar.  (ungetc is unlimited) 
+  ungetchar. (ungetc is unlimited) 
   
   should protect get and unget against improper use
 */
@@ -27,15 +27,15 @@ class Text_stream
     
 public:
   Text_stream (String fn);
-  String get_name() { return name; }
-  bool eof_b();
-  char get() {
+  String get_name () { return name; }
+  bool eof_b ();
+  char get () {
     char c;
        
-    if (pushback.empty())
+    if (pushback.empty ())
       c = getc (f);    
     else 
-      c = pushback.pop();
+      c = pushback.pop ();
 
     if (c =='\n')
       line_no++;
@@ -46,21 +46,21 @@ public:
       line_no--;
     pushback.push (c);
   }
-  char peek() {
+  char peek () {
     if (eof_b ())
       return (char)-1;
-    char c = get();
+    char c = get ();
     unget (c);
     return c;
   }
-  bool eol() {
-    return (peek() == '\n');
+  bool eol () {
+    return (peek () == '\n');
   }
-  int line(){
+  int line (){
     return line_no;
   }
 
-  ~Text_stream();
+  ~Text_stream ();
   
 
   /// GNU format message.
index dd18a37f404ddd2af7d8d66ee9b6809ed61d5b96..e5516d8e7008d38255126acca8066f19694709e2 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <typeinfo>
 
-#define classname(class_ptr)   demangle_classname(typeid(*(class_ptr)))
+#define classname(class_ptr)   demangle_classname (typeid (* (class_ptr)))
 
 const char *
 demangle_classname (type_info const &);
@@ -20,10 +20,10 @@ demangle_classname (type_info const &);
 /**
 
    Virtual copy constructor. Make up for C++'s lack of a standard
-   clone() function.  Uses a typeof hack.  Usage:
+   clone () function.  Uses a typeof hack.  Usage:
 
    class Foo : Baseclass {
-       VIRTUAL_COPY_CONS(Baseclass);
+       VIRTUAL_COPY_CONS (Baseclass);
    };
    
  */
@@ -36,7 +36,7 @@ demangle_classname (type_info const &);
 #define VIRTUAL_COPY_CONS(base) \
   virtual base *clone () const \
   { \
-    return new typeof(*this) (*this); \
+    return new typeof (*this) (*this); \
   }
 #else
 #define VIRTUAL_COPY_CONS(base) \
index 1ec7fb942805602a2fbc13526bc3138295de66e5..8ec33cf882d9bfa8f4c573cd902ce578fd3a4f3c 100644 (file)
@@ -3,7 +3,7 @@
 
  source file of the LilyPond music typesetter
 
- (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 #include <iostream.h>
 #include "flower-proto.hh"
@@ -38,7 +38,7 @@ Input::set_spot (Input const &i)
 
 /*
   Produce GNU-compliant error message.  Correcting mudela is such a
-  breeze if you('re edidor) know(s) the error column too
+  breeze if you ('re edidor) know (s) the error column too
   
   Format:
 
@@ -101,7 +101,7 @@ Input::location_str () const
   if (source_file_l_)
     return source_file_l_->file_line_column_str (defined_ch_C_);
   else
-    return "(" + _ ("position unknown") + ")";
+    return " (" + _ ("position unknown") + ")";
 }
 
 String
index ed2598da61d8043c13917baaea47a3c428166883..d797f5f96b0e2f97d036de8ce33364928b5353a3 100644 (file)
@@ -18,7 +18,7 @@ String
 Offset::str () const
 {
   String s;
-  s = String("(") + to_str (coordinate_a_[X_AXIS]) + ", " 
+  s = String (" (") + to_str (coordinate_a_[X_AXIS]) + ", " 
     + to_str (coordinate_a_[Y_AXIS]) + ")";
   return s;
 }
@@ -39,7 +39,7 @@ Offset
 complex_multiply (Offset z1, Offset z2)
 {
   Offset z;
-  if(!isinf_b(z2[Y_AXIS]))
+  if (!isinf_b (z2[Y_AXIS]))
   {
       z[X_AXIS] = z1[X_AXIS] * z2[X_AXIS] - z1[Y_AXIS]*z2[Y_AXIS];
       z[Y_AXIS] = z1[X_AXIS] * z2[Y_AXIS] + z1[Y_AXIS] * z2[X_AXIS];
@@ -74,7 +74,7 @@ complex_exp (Offset o)
   
   Real r = exp (o[X_AXIS]);
 
-  return Offset(r*c, r*s);
+  return Offset (r*c, r*s);
 }
 
 Real
index 4e047fde6ae34141a55bd14cd0041feec8ff501f..39b9c0d7d989f062c315b2035549f638a95bcfeb 100644 (file)
@@ -63,7 +63,7 @@ Morten Welinder <terra@diku.dk> September 1999.
  *       - fixed bug of not allocating extra byte for string duplication
  *    - fixed typos
  *  modified: DSM  Tue Apr  3 11:18:34 PDT 1990
- *    - added free(ident) at end of parseFile routine
+ *    - added free (ident) at end of parseFile routine
  *  modified: DSM  Tue Jun 19 10:16:29 PDT 1990
  *    - changed (width == 250) to (width = 250) in initializeArray
  */
@@ -85,7 +85,7 @@ Morten Welinder <terra@diku.dk> September 1999.
 #define False "false"   /* used in string comparison to check the value of */
                        /* boolean keys (e.g. IsFixedPitch)  */
 
-#define MATCH(A,B)             (strncmp((A),(B), MAX_NAME) == 0)
+#define MATCH(A,B) (strncmp ((A), (B), MAX_NAME) == 0)
 
 
 
@@ -156,12 +156,12 @@ static char *keyStrings[] = {
  *  reads all tokens until the next end-of-line.
  */
  
-static char *token(FILE *stream)
+static char *token (FILE *stream)
 {
     int ch, idx;
 
     /* skip over white space */
-    while ((ch = fgetc(stream)) == ' ' || ch == lineterm ||
+    while ((ch = fgetc (stream)) == ' ' || ch == lineterm ||
            ch == lineterm_alt ||
             ch == ',' || ch == '\t' || ch == ';');
     
@@ -171,15 +171,15 @@ static char *token(FILE *stream)
            && ch != '\t' && ch != ':' && ch != ';') 
     {
         ident[idx++] = ch;
-        ch = fgetc(stream);
+        ch = fgetc (stream);
     } /* while */
 
     if (ch == EOF && idx < 1) return ((char *)NULL);
-    if (idx >= 1 && ch != ':' ) ungetc(ch, stream);
+    if (idx >= 1 && ch != ':' ) ungetc (ch, stream);
     if (idx < 1 ) ident[idx++] = ch;   /* single-character token */
     ident[idx] = 0;
     
-    return(ident);     /* returns pointer to the token */
+    return (ident);    /* returns pointer to the token */
 
 } /* token */
 
@@ -191,24 +191,24 @@ static char *token(FILE *stream)
  *  more than one word (like Comment lines and FullName).
  */
 
-static char *linetoken(FILE *stream)
+static char *linetoken (FILE *stream)
 {
     int ch, idx;
 
-    while ((ch = fgetc(stream)) == ' ' || ch == '\t' ); 
+    while ((ch = fgetc (stream)) == ' ' || ch == '\t' ); 
     
     idx = 0;
     while (idx < MAX_NAME - 1 &&
           ch != EOF && ch != lineterm && ch != lineterm_alt) 
     {
         ident[idx++] = ch;
-        ch = fgetc(stream);
+        ch = fgetc (stream);
     } /* while */
     
-    ungetc(ch, stream);
+    ungetc (ch, stream);
     ident[idx] = 0;
 
-    return(ident);     /* returns pointer to the token */
+    return (ident);    /* returns pointer to the token */
 
 } /* linetoken */
 
@@ -223,7 +223,7 @@ static char *linetoken(FILE *stream)
  *  The algorithm is a standard Knuth binary search.
  */
 
-static enum parseKey recognize(  register char *ident)
+static enum parseKey recognize (  register char *ident)
 {
     int lower = 0, upper = (int) NOPE, midpoint, cmpvalue;
     BOOL found = FALSE;
@@ -232,7 +232,7 @@ static enum parseKey recognize(  register char *ident)
     {
         midpoint = (lower + upper)/2;
         if (keyStrings[midpoint] == NULL) break;
-        cmpvalue = strncmp(ident, keyStrings[midpoint], MAX_NAME);
+        cmpvalue = strncmp (ident, keyStrings[midpoint], MAX_NAME);
         if (cmpvalue == 0) found = TRUE;
         else if (cmpvalue < 0) upper = midpoint - 1;
         else lower = midpoint + 1;
@@ -265,7 +265,7 @@ static enum parseKey recognize(  register char *ident)
  *  parseFile to determine if there is more file to parse.
  */
  
-static BOOL parseGlobals(FILE *fp, register AFM_GlobalFontInfo *gfi)
+static BOOL parseGlobals (FILE *fp, register AFM_GlobalFontInfo *gfi)
 {  
     BOOL cont = TRUE, save = (gfi != NULL);
     int error = AFM_ok;
@@ -273,7 +273,7 @@ static BOOL parseGlobals(FILE *fp, register AFM_GlobalFontInfo *gfi)
     
     while (cont)
     {
-        keyword = token(fp);
+        keyword = token (fp);
         
         if (keyword == NULL)
           /* Have reached an early and unexpected EOF. */
@@ -285,7 +285,7 @@ static BOOL parseGlobals(FILE *fp, register AFM_GlobalFontInfo *gfi)
         if (!save)     
           /* get tokens until the end of the Global Font info section */
           /* without saving any of the data */
-            switch (recognize(keyword))  
+            switch (recognize (keyword))  
             {                          
                 case STARTCHARMETRICS:
                     cont = FALSE;
@@ -300,97 +300,97 @@ static BOOL parseGlobals(FILE *fp, register AFM_GlobalFontInfo *gfi)
         else
           /* otherwise parse entire global font info section, */
           /* saving the data */
-            switch(recognize(keyword))
+            switch (recognize (keyword))
             {
                 case STARTFONTMETRICS:
-                    keyword = token(fp);
-                    gfi->afmVersion = (char *) malloc(strlen(keyword) + 1);
-                    strcpy(gfi->afmVersion, keyword);
+                    keyword = token (fp);
+                    gfi->afmVersion = (char *) malloc (strlen (keyword) + 1);
+                    strcpy (gfi->afmVersion, keyword);
                     break;
                 case COMMENT:
-                    keyword = linetoken(fp);
+                    keyword = linetoken (fp);
                     break;
                 case FONTNAME:
-                    keyword = token(fp);
-                    gfi->fontName = (char *) malloc(strlen(keyword) + 1);
-                    strcpy(gfi->fontName, keyword);
+                    keyword = token (fp);
+                    gfi->fontName = (char *) malloc (strlen (keyword) + 1);
+                    strcpy (gfi->fontName, keyword);
                     break;
                 case ENCODINGSCHEME:
-                    keyword = token(fp);
+                    keyword = token (fp);
                     gfi->encodingScheme = (char *) 
-                       malloc(strlen(keyword) + 1);
-                    strcpy(gfi->encodingScheme, keyword);
+                       malloc (strlen (keyword) + 1);
+                    strcpy (gfi->encodingScheme, keyword);
                     break; 
                 case FULLNAME:
-                    keyword = linetoken(fp);
-                    gfi->fullName = (char *) malloc(strlen(keyword) + 1);
-                    strcpy(gfi->fullName, keyword);
+                    keyword = linetoken (fp);
+                    gfi->fullName = (char *) malloc (strlen (keyword) + 1);
+                    strcpy (gfi->fullName, keyword);
                     break; 
                 case FAMILYNAME:           
-                   keyword = linetoken(fp);
-                    gfi->familyName = (char *) malloc(strlen(keyword) + 1);
-                    strcpy(gfi->familyName, keyword);
+                   keyword = linetoken (fp);
+                    gfi->familyName = (char *) malloc (strlen (keyword) + 1);
+                    strcpy (gfi->familyName, keyword);
                     break; 
                 case WEIGHT:
-                    keyword = token(fp);
-                    gfi->weight = (char *) malloc(strlen(keyword) + 1);
-                    strcpy(gfi->weight, keyword);
+                    keyword = token (fp);
+                    gfi->weight = (char *) malloc (strlen (keyword) + 1);
+                    strcpy (gfi->weight, keyword);
                     break;
                 case ITALICANGLE:
-                    keyword = token(fp);
-                    gfi->italicAngle = atof(keyword);
+                    keyword = token (fp);
+                    gfi->italicAngle = atof (keyword);
                     if (errno == ERANGE) error = AFM_parseError;
                     break;
                 case ISFIXEDPITCH:
-                    keyword = token(fp);
-                    if (MATCH(keyword, False))
+                    keyword = token (fp);
+                    if (MATCH (keyword, False))
                         gfi->isFixedPitch = 0;
                     else 
                         gfi->isFixedPitch = 1;
                     break; 
                    case UNDERLINEPOSITION:
-                    keyword = token(fp);
-                       gfi->underlinePosition = atoi(keyword);
+                    keyword = token (fp);
+                       gfi->underlinePosition = atoi (keyword);
                     break; 
                 case UNDERLINETHICKNESS:
-                    keyword = token(fp);
-                    gfi->underlineThickness = atoi(keyword);
+                    keyword = token (fp);
+                    gfi->underlineThickness = atoi (keyword);
                     break;
                 case VERSION:
-                    keyword = linetoken(fp);
-                    gfi->version = (char *) malloc(strlen(keyword) + 1);
-                    strcpy(gfi->version, keyword);
+                    keyword = linetoken (fp);
+                    gfi->version = (char *) malloc (strlen (keyword) + 1);
+                    strcpy (gfi->version, keyword);
                     break; 
                 case NOTICE:
-                    keyword = linetoken(fp);
-                    gfi->notice = (char *) malloc(strlen(keyword) + 1);
-                    strcpy(gfi->notice, keyword);
+                    keyword = linetoken (fp);
+                    gfi->notice = (char *) malloc (strlen (keyword) + 1);
+                    strcpy (gfi->notice, keyword);
                     break; 
                 case FONTBBOX:
-                    keyword = token(fp);
-                    gfi->fontBBox.llx = atoi(keyword);
-                    keyword = token(fp);
-                    gfi->fontBBox.lly = atoi(keyword);
-                    keyword = token(fp);
-                    gfi->fontBBox.urx = atoi(keyword);
-                    keyword = token(fp);
-                    gfi->fontBBox.ury = atoi(keyword);
+                    keyword = token (fp);
+                    gfi->fontBBox.llx = atoi (keyword);
+                    keyword = token (fp);
+                    gfi->fontBBox.lly = atoi (keyword);
+                    keyword = token (fp);
+                    gfi->fontBBox.urx = atoi (keyword);
+                    keyword = token (fp);
+                    gfi->fontBBox.ury = atoi (keyword);
                     break;
                 case CAPHEIGHT:
-                    keyword = token(fp);
-                    gfi->capHeight = atoi(keyword);
+                    keyword = token (fp);
+                    gfi->capHeight = atoi (keyword);
                     break;
                 case XHEIGHT:
-                    keyword = token(fp);
-                    gfi->xHeight = atoi(keyword);
+                    keyword = token (fp);
+                    gfi->xHeight = atoi (keyword);
                     break;
                 case DESCENDER:
-                    keyword = token(fp);
-                    gfi->descender = atoi(keyword);
+                    keyword = token (fp);
+                    gfi->descender = atoi (keyword);
                     break;
                 case ASCENDER:
-                    keyword = token(fp);
-                    gfi->ascender = atoi(keyword);
+                    keyword = token (fp);
+                    gfi->ascender = atoi (keyword);
                     break;
                 case STARTCHARMETRICS:
                     cont = FALSE;
@@ -406,7 +406,7 @@ static BOOL parseGlobals(FILE *fp, register AFM_GlobalFontInfo *gfi)
             } /* switch */
     } /* while */
     
-    return(error);
+    return (error);
     
 } /* parseGlobals */    
 
@@ -430,35 +430,35 @@ static BOOL parseGlobals(FILE *fp, register AFM_GlobalFontInfo *gfi)
  *  file is reset to be where it was upon entering this function.
  */
  
-static int initializeArray(FILE *fp, register int *cwi)
+static int initializeArray (FILE *fp, register int *cwi)
 {  
     BOOL cont = TRUE, found = FALSE;
-    long opos = ftell(fp);
+    long opos = ftell (fp);
     int code = 0, width = 0, i = 0, error = 0;
     register char *keyword;
   
     while (cont)
     {
-        keyword = token(fp);
+        keyword = token (fp);
         if (keyword == NULL)
         {
             error = AFM_earlyEOF;
             break; /* get out of loop */
         }
-        switch(recognize(keyword))
+        switch (recognize (keyword))
         {
             case COMMENT:
-                keyword = linetoken(fp);
+                keyword = linetoken (fp);
                 break;
             case CODE:
-                code = atoi(token(fp));
+                code = atoi (token (fp));
                 break;
             case XWIDTH:
-                width = atoi(token(fp));
+                width = atoi (token (fp));
                 break;
             case CHARNAME: 
-                keyword = token(fp);
-                if (MATCH(keyword, Space))
+                keyword = token (fp);
+                if (MATCH (keyword, Space))
                 {    
                     cont = FALSE;
                     found = TRUE;
@@ -484,9 +484,9 @@ static int initializeArray(FILE *fp, register int *cwi)
     for (i = 0; i < 256; ++i)
         cwi[i] = width;
     
-    fseek(fp, opos, 0);
+    fseek (fp, opos, 0);
     
-    return(error);
+    return (error);
         
 } /* initializeArray */    
 
@@ -511,7 +511,7 @@ static int initializeArray(FILE *fp, register int *cwi)
  *  parseFile to determine if there is more file to parse.
  */
  
-static int parseCharWidths(FILE *fp, register int *cwi)
+static int parseCharWidths (FILE *fp, register int *cwi)
 {  
     BOOL cont = TRUE, save = (cwi != NULL);
     int pos = 0, error = AFM_ok;
@@ -519,7 +519,7 @@ static int parseCharWidths(FILE *fp, register int *cwi)
     
     while (cont)
     {
-        keyword = token(fp);
+        keyword = token (fp);
           /* Have reached an early and unexpected EOF. */
           /* Set flag and stop parsing */
         if (keyword == NULL)
@@ -530,7 +530,7 @@ static int parseCharWidths(FILE *fp, register int *cwi)
         if (!save)     
           /* get tokens until the end of the Char Metrics section without */
           /* saving any of the data*/
-            switch (recognize(keyword))  
+            switch (recognize (keyword))  
             {                          
                 case ENDCHARMETRICS:
                     cont = FALSE;
@@ -545,24 +545,24 @@ static int parseCharWidths(FILE *fp, register int *cwi)
         else
           /* otherwise parse entire char metrics section, saving */
           /* only the char x-width info */
-            switch(recognize(keyword))
+            switch (recognize (keyword))
             {
                 case COMMENT:
-                    keyword = linetoken(fp);
+                    keyword = linetoken (fp);
                     break;
                 case CODE:
-                    keyword = token(fp);
-                    pos = atoi(keyword);
+                    keyword = token (fp);
+                    pos = atoi (keyword);
                     break;
                 case XYWIDTH:
                 /* PROBLEM: Should be no Y-WIDTH when doing "quick & dirty" */
-                    keyword = token(fp); keyword = token(fp); /* eat values */
+                    keyword = token (fp); keyword = token (fp); /* eat values */
                     error = AFM_parseError;
                     break;
                 case XWIDTH:
-                    keyword = token(fp);
+                    keyword = token (fp);
                     if (pos >= 0) /* ignore unmapped chars */
-                        cwi[pos] = atoi(keyword);
+                        cwi[pos] = atoi (keyword);
                     break;
                 case ENDCHARMETRICS:
                     cont = FALSE;
@@ -572,14 +572,14 @@ static int parseCharWidths(FILE *fp, register int *cwi)
                     error = normalEOF;
                     break;
                 case CHARNAME: /* eat values (so doesn't cause AFM_parseError) */
-                    keyword = token(fp); 
+                    keyword = token (fp); 
                     break;
                case CHARBBOX: 
-                    keyword = token(fp); keyword = token(fp);
-                    keyword = token(fp); keyword = token(fp);
+                    keyword = token (fp); keyword = token (fp);
+                    keyword = token (fp); keyword = token (fp);
                    break;
                case LIGATURE:
-                    keyword = token(fp); keyword = token(fp);
+                    keyword = token (fp); keyword = token (fp);
                    break;
                 case NOPE:
                 default: 
@@ -588,7 +588,7 @@ static int parseCharWidths(FILE *fp, register int *cwi)
             } /* switch */
     } /* while */
     
-    return(error);
+    return (error);
     
 } /* parseCharWidths */    
 
@@ -597,7 +597,7 @@ static int parseCharWidths(FILE *fp, register int *cwi)
 
 /*  This function is called by parseFile if the caller of parseFile
  *  requested that all character metric information be saved
- *  (as opposed to only the character width information).
+ * (as opposed to only the character width information).
  *
  *  parseCharMetrics is passed in a pointer to an array of records
  *  to hold information on a per character basis. This function
@@ -610,7 +610,7 @@ static int parseCharWidths(FILE *fp, register int *cwi)
  *  parseFile to determine if there is more file to parse.
  */
  
-static int parseCharMetrics(FILE *fp, register AFM_Font_info *fi)
+static int parseCharMetrics (FILE *fp, register AFM_Font_info *fi)
 {  
     BOOL cont = TRUE, firstTime = TRUE;
     int error = AFM_ok, count = 0;
@@ -619,23 +619,23 @@ static int parseCharMetrics(FILE *fp, register AFM_Font_info *fi)
   
     while (cont)
     {
-        keyword = token(fp);
+        keyword = token (fp);
         if (keyword == NULL)
         {
             error = AFM_earlyEOF;
             break; /* get out of loop */
         }
-        switch(recognize(keyword))
+        switch (recognize (keyword))
         {
             case COMMENT:
-                keyword = linetoken(fp);
+                keyword = linetoken (fp);
                 break; 
             case CODE:
                 if (count < fi->numOfChars)
                 { 
                     if (firstTime) firstTime = FALSE;
                     else temp++;
-                    temp->code = atoi(token(fp));
+                    temp->code = atoi (token (fp));
                     count++;
                 }
                 else
@@ -645,41 +645,41 @@ static int parseCharMetrics(FILE *fp, register AFM_Font_info *fi)
                 }
                 break;
             case XYWIDTH:
-                temp->wx = atoi(token(fp));
-                temp->wy = atoi(token(fp));
+                temp->wx = atoi (token (fp));
+                temp->wy = atoi (token (fp));
                 break;                 
             case XWIDTH: 
-                temp->wx = atoi(token(fp));
+                temp->wx = atoi (token (fp));
                 break;
             case CHARNAME: 
-                keyword = token(fp);
-                temp->name = (char *) malloc(strlen(keyword) + 1);
-                strcpy(temp->name, keyword);
+                keyword = token (fp);
+                temp->name = (char *) malloc (strlen (keyword) + 1);
+                strcpy (temp->name, keyword);
                 break;            
             case CHARBBOX: 
-                temp->charBBox.llx = atoi(token(fp));
-                temp->charBBox.lly = atoi(token(fp));
-                temp->charBBox.urx = atoi(token(fp));
-                temp->charBBox.ury = atoi(token(fp));
+                temp->charBBox.llx = atoi (token (fp));
+                temp->charBBox.lly = atoi (token (fp));
+                temp->charBBox.urx = atoi (token (fp));
+                temp->charBBox.ury = atoi (token (fp));
                 break;
             case LIGATURE: {
-                AFM_Ligature **tail = &(temp->ligs);
+                AFM_Ligature **tail = & (temp->ligs);
                 AFM_Ligature *node = *tail;
                 
                 if (*tail != NULL)
                 {
                     while (node->next != NULL)
                         node = node->next;
-                    tail = &(node->next); 
+                    tail = & (node->next); 
                 }
                 
-                *tail = (AFM_Ligature *) calloc(1, sizeof(AFM_Ligature));
-                keyword = token(fp);
               (*tail)->succ = (char *) malloc(strlen(keyword) + 1);
-                strcpy((*tail)->succ, keyword);
-                keyword = token(fp);
               (*tail)->lig = (char *) malloc(strlen(keyword) + 1);
-                strcpy((*tail)->lig, keyword);
+                *tail = (AFM_Ligature *) calloc (1, sizeof (AFM_Ligature));
+                keyword = token (fp);
(*tail)->succ = (char *) malloc (strlen (keyword) + 1);
+                strcpy ((*tail)->succ, keyword);
+                keyword = token (fp);
(*tail)->lig = (char *) malloc (strlen (keyword) + 1);
+                strcpy ((*tail)->lig, keyword);
                 break; }
             case ENDCHARMETRICS:
                 cont = FALSE;;
@@ -698,7 +698,7 @@ static int parseCharMetrics(FILE *fp, register AFM_Font_info *fi)
     if ((error == AFM_ok) && (count != fi->numOfChars))
         error = AFM_parseError;
     
-    return(error);
+    return (error);
     
 } /* parseCharMetrics */    
 
@@ -719,7 +719,7 @@ static int parseCharMetrics(FILE *fp, register AFM_Font_info *fi)
  *  parseFile to determine if there is more file to parse.
  */
  
-static int parseAFM_TrackKernData(FILE *fp, register AFM_Font_info *fi)
+static int parseAFM_TrackKernData (FILE *fp, register AFM_Font_info *fi)
 {  
     BOOL cont = TRUE, save = (fi->tkd != NULL);
     int pos = 0, error = AFM_ok, tcount = 0;
@@ -727,7 +727,7 @@ static int parseAFM_TrackKernData(FILE *fp, register AFM_Font_info *fi)
   
     while (cont)
     {
-        keyword = token(fp);
+        keyword = token (fp);
         
         if (keyword == NULL)
         {
@@ -737,7 +737,7 @@ static int parseAFM_TrackKernData(FILE *fp, register AFM_Font_info *fi)
         if (!save)
           /* get tokens until the end of the Track Kerning Data */
           /* section without saving any of the data */
-            switch(recognize(keyword))
+            switch (recognize (keyword))
             {
                 case ENDTRACKKERN:
                 case ENDKERNDATA:
@@ -753,27 +753,27 @@ static int parseAFM_TrackKernData(FILE *fp, register AFM_Font_info *fi)
        else
           /* otherwise parse entire Track Kerning Data section, */
           /* saving the data */
-            switch(recognize(keyword))
+            switch (recognize (keyword))
             {
                 case COMMENT:
-                    keyword = linetoken(fp);
+                    keyword = linetoken (fp);
                     break;
                 case TRACKKERN:
                     if (tcount < fi->numOfTracks)
                     {
-                        keyword = token(fp);
-                        fi->tkd[pos].degree = atoi(keyword);
-                        keyword = token(fp);
-                        fi->tkd[pos].minPtSize = atof(keyword);
+                        keyword = token (fp);
+                        fi->tkd[pos].degree = atoi (keyword);
+                        keyword = token (fp);
+                        fi->tkd[pos].minPtSize = atof (keyword);
                         if (errno == ERANGE) error = AFM_parseError;
-                        keyword = token(fp);
-                        fi->tkd[pos].minKernAmt = atof(keyword);
+                        keyword = token (fp);
+                        fi->tkd[pos].minKernAmt = atof (keyword);
                         if (errno == ERANGE) error = AFM_parseError;
-                        keyword = token(fp);
-                        fi->tkd[pos].maxPtSize = atof(keyword);
+                        keyword = token (fp);
+                        fi->tkd[pos].maxPtSize = atof (keyword);
                         if (errno == ERANGE) error = AFM_parseError;
-                        keyword = token(fp);
-                        fi->tkd[pos++].maxKernAmt = atof(keyword);
+                        keyword = token (fp);
+                        fi->tkd[pos++].maxKernAmt = atof (keyword);
                         if (errno == ERANGE) error = AFM_parseError;
                         tcount++;
                     }
@@ -801,7 +801,7 @@ static int parseAFM_TrackKernData(FILE *fp, register AFM_Font_info *fi)
     if (error == AFM_ok && tcount != fi->numOfTracks)
         error = AFM_parseError;
         
-    return(error);
+    return (error);
     
 } /* parseAFM_TrackKernData */    
 
@@ -821,7 +821,7 @@ static int parseAFM_TrackKernData(FILE *fp, register AFM_Font_info *fi)
  *  parseFile to determine if there is more file to parse.
  */
  
-static int parseAFM_PairKernData(FILE *fp, register AFM_Font_info *fi)
+static int parseAFM_PairKernData (FILE *fp, register AFM_Font_info *fi)
 {  
     BOOL cont = TRUE, save = (fi->pkd != NULL);
     int pos = 0, error = AFM_ok, pcount = 0;
@@ -829,7 +829,7 @@ static int parseAFM_PairKernData(FILE *fp, register AFM_Font_info *fi)
   
     while (cont)
     {
-        keyword = token(fp);
+        keyword = token (fp);
         
         if (keyword == NULL)
         {
@@ -839,7 +839,7 @@ static int parseAFM_PairKernData(FILE *fp, register AFM_Font_info *fi)
         if (!save)
           /* get tokens until the end of the Pair Kerning Data */
           /* section without saving any of the data */
-            switch(recognize(keyword))
+            switch (recognize (keyword))
             {
                 case ENDKERNPAIRS:
                 case ENDKERNDATA:
@@ -855,26 +855,26 @@ static int parseAFM_PairKernData(FILE *fp, register AFM_Font_info *fi)
        else
           /* otherwise parse entire Pair Kerning Data section, */
           /* saving the data */
-            switch(recognize(keyword))
+            switch (recognize (keyword))
             {
                 case COMMENT:
-                    keyword = linetoken(fp);
+                    keyword = linetoken (fp);
                     break;
                 case KERNPAIR:
                     if (pcount < fi->numOfPairs)
                     {
-                        keyword = token(fp);
+                        keyword = token (fp);
                         fi->pkd[pos].name1 = (char *) 
-                            malloc(strlen(keyword) + 1);
-                        strcpy(fi->pkd[pos].name1, keyword);
-                        keyword = token(fp);
+                            malloc (strlen (keyword) + 1);
+                        strcpy (fi->pkd[pos].name1, keyword);
+                        keyword = token (fp);
                         fi->pkd[pos].name2 = (char *) 
-                            malloc(strlen(keyword) + 1);
-                        strcpy(fi->pkd[pos].name2, keyword);
-                        keyword = token(fp);
-                        fi->pkd[pos].xamt = atoi(keyword);
-                        keyword = token(fp);
-                        fi->pkd[pos++].yamt = atoi(keyword);
+                            malloc (strlen (keyword) + 1);
+                        strcpy (fi->pkd[pos].name2, keyword);
+                        keyword = token (fp);
+                        fi->pkd[pos].xamt = atoi (keyword);
+                        keyword = token (fp);
+                        fi->pkd[pos++].yamt = atoi (keyword);
                         pcount++;
                     }
                     else
@@ -886,16 +886,16 @@ static int parseAFM_PairKernData(FILE *fp, register AFM_Font_info *fi)
                 case KERNPAIRXAMT:
                     if (pcount < fi->numOfPairs)
                     {
-                        keyword = token(fp);
+                        keyword = token (fp);
                         fi->pkd[pos].name1 = (char *) 
-                            malloc(strlen(keyword) + 1);
-                        strcpy(fi->pkd[pos].name1, keyword);
-                        keyword = token(fp);
+                            malloc (strlen (keyword) + 1);
+                        strcpy (fi->pkd[pos].name1, keyword);
+                        keyword = token (fp);
                         fi->pkd[pos].name2 = (char *) 
-                            malloc(strlen(keyword) + 1);
-                        strcpy(fi->pkd[pos].name2, keyword);
-                        keyword = token(fp);
-                        fi->pkd[pos++].xamt = atoi(keyword);
+                            malloc (strlen (keyword) + 1);
+                        strcpy (fi->pkd[pos].name2, keyword);
+                        keyword = token (fp);
+                        fi->pkd[pos++].xamt = atoi (keyword);
                         pcount++;
                     }
                     else
@@ -922,7 +922,7 @@ static int parseAFM_PairKernData(FILE *fp, register AFM_Font_info *fi)
     if (error == AFM_ok && pcount != fi->numOfPairs)
         error = AFM_parseError;
         
-    return(error);
+    return (error);
     
 } /* parseAFM_PairKernData */    
 
@@ -945,7 +945,7 @@ static int parseAFM_PairKernData(FILE *fp, register AFM_Font_info *fi)
  *  parseFile to determine if there is more file to parse.
  */
  
-static int parseAFM_CompCharData(FILE *fp, register AFM_Font_info *fi)
+static int parseAFM_CompCharData (FILE *fp, register AFM_Font_info *fi)
 {  
     BOOL cont = TRUE, firstTime = TRUE, save = (fi->ccd != NULL);
     int pos = 0, j = 0, error = AFM_ok, ccount = 0, pcount = 0;
@@ -953,7 +953,7 @@ static int parseAFM_CompCharData(FILE *fp, register AFM_Font_info *fi)
   
     while (cont)
     {
-        keyword = token(fp);
+        keyword = token (fp);
         if (keyword == NULL)
           /* Have reached an early and unexpected EOF. */
           /* Set flag and stop parsing */
@@ -969,7 +969,7 @@ static int parseAFM_CompCharData(FILE *fp, register AFM_Font_info *fi)
         if (!save)
           /* get tokens until the end of the Composite Character info */
           /* section without saving any of the data */
-            switch(recognize(keyword))
+            switch (recognize (keyword))
             {
                 case ENDCOMPOSITES:
                     cont = FALSE;
@@ -984,27 +984,27 @@ static int parseAFM_CompCharData(FILE *fp, register AFM_Font_info *fi)
        else
           /* otherwise parse entire Composite Character info section, */
           /* saving the data */
-            switch(recognize(keyword))
+            switch (recognize (keyword))
             {
                 case COMMENT:
-                    keyword = linetoken(fp);
+                    keyword = linetoken (fp);
                     break;
                 case COMPCHAR:
                     if (ccount < fi->numOfComps)
                     {
-                        keyword = token(fp);
+                        keyword = token (fp);
                         if (pcount != fi->ccd[pos].numOfPieces)
                             error = AFM_parseError;
                         pcount = 0;
                         if (firstTime) firstTime = FALSE;
                         else pos++;
                         fi->ccd[pos].ccName = (char *) 
-                            malloc(strlen(keyword) + 1);
-                        strcpy(fi->ccd[pos].ccName, keyword);
-                        keyword = token(fp);
-                        fi->ccd[pos].numOfPieces = atoi(keyword);
+                            malloc (strlen (keyword) + 1);
+                        strcpy (fi->ccd[pos].ccName, keyword);
+                        keyword = token (fp);
+                        fi->ccd[pos].numOfPieces = atoi (keyword);
                         fi->ccd[pos].pieces = (AFM_Pcc *)
-                            calloc(fi->ccd[pos].numOfPieces, sizeof(AFM_Pcc));
+                            calloc (fi->ccd[pos].numOfPieces, sizeof (AFM_Pcc));
                         j = 0;
                         ccount++;
                     }
@@ -1017,14 +1017,14 @@ static int parseAFM_CompCharData(FILE *fp, register AFM_Font_info *fi)
                 case COMPCHARPIECE:
                     if (pcount < fi->ccd[pos].numOfPieces)
                     {
-                        keyword = token(fp);
+                        keyword = token (fp);
                         fi->ccd[pos].pieces[j].AFM_PccName = (char *) 
-                                malloc(strlen(keyword) + 1);
-                        strcpy(fi->ccd[pos].pieces[j].AFM_PccName, keyword);
-                        keyword = token(fp);
-                        fi->ccd[pos].pieces[j].deltax = atoi(keyword);
-                        keyword = token(fp);
-                        fi->ccd[pos].pieces[j++].deltay = atoi(keyword);
+                                malloc (strlen (keyword) + 1);
+                        strcpy (fi->ccd[pos].pieces[j].AFM_PccName, keyword);
+                        keyword = token (fp);
+                        fi->ccd[pos].pieces[j].deltax = atoi (keyword);
+                        keyword = token (fp);
+                        fi->ccd[pos].pieces[j++].deltay = atoi (keyword);
                         pcount++;
                     }
                     else
@@ -1047,7 +1047,7 @@ static int parseAFM_CompCharData(FILE *fp, register AFM_Font_info *fi)
     if (error == AFM_ok && ccount != fi->numOfComps)
         error = AFM_parseError;
     
-    return(error);
+    return (error);
     
 } /* parseAFM_CompCharData */    
 
@@ -1089,21 +1089,21 @@ extern int AFM_parseFile (FILE *fp, AFM_Font_info **fi, int flags)
                              
     /* storage data for the global variable ident */                         
     if (!ident)
-        ident = (char *) calloc(MAX_NAME, sizeof(char)); 
-    if (ident == NULL) {error = AFM_storageProblem; return(error);}      
+        ident = (char *) calloc (MAX_NAME, sizeof (char)); 
+    if (ident == NULL) {error = AFM_storageProblem; return (error);}      
   
   (*fi) = (AFM_Font_info *) calloc(1, sizeof(AFM_Font_info));
-    if ((*fi) == NULL) {error = AFM_storageProblem; return(error);}      
(*fi) = (AFM_Font_info *) calloc (1, sizeof (AFM_Font_info));
+    if ((*fi) == NULL) {error = AFM_storageProblem; return (error);}      
   
     if (flags & P_G) 
     {
       (*fi)->gfi = (AFM_GlobalFontInfo *) calloc(1, sizeof(AFM_GlobalFontInfo));
-        if ((*fi)->gfi == NULL) {error = AFM_storageProblem; return(error);}      
(*fi)->gfi = (AFM_GlobalFontInfo *) calloc (1, sizeof (AFM_GlobalFontInfo));
+        if ((*fi)->gfi == NULL) {error = AFM_storageProblem; return (error);}      
     }
     
     /* The AFM File begins with Global Font Information. This section */
     /* will be parsed whether or not information should be saved. */     
-    code = parseGlobals(fp, (*fi)->gfi); 
+    code = parseGlobals (fp, (*fi)->gfi); 
     
     if (code < 0) error = code;
     
@@ -1117,27 +1117,27 @@ extern int AFM_parseFile (FILE *fp, AFM_Font_info **fi, int flags)
   
     if ((code != normalEOF) && (code != AFM_earlyEOF))
     {
       (*fi)->numOfChars = atoi(token(fp));
(*fi)->numOfChars = atoi (token (fp));
            if (flags & (P_M ^ P_W))
         {
           (*fi)->cmi = (AFM_CharMetricInfo *) 
-                      calloc((*fi)->numOfChars, sizeof(AFM_CharMetricInfo));
-           if ((*fi)->cmi == NULL) {error = AFM_storageProblem; return(error);}
-            code = parseCharMetrics(fp, *fi);             
+ (*fi)->cmi = (AFM_CharMetricInfo *) 
+                      calloc ((*fi)->numOfChars, sizeof (AFM_CharMetricInfo));
+           if ((*fi)->cmi == NULL) {error = AFM_storageProblem; return (error);}
+            code = parseCharMetrics (fp, *fi);             
         }
         else
         {
             if (flags & P_W)
             { 
               (*fi)->cwi = (int *) calloc(256, sizeof(int)); 
(*fi)->cwi = (int *) calloc (256, sizeof (int)); 
                 if ((*fi)->cwi == NULL) 
                 {
                        error = AFM_storageProblem; 
-                       return(error);
+                       return (error);
                 }
             }
             /* parse section regardless */
-            code = parseCharWidths(fp, (*fi)->cwi);
+            code = parseCharWidths (fp, (*fi)->cwi);
         } /* else */
     } /* if */
     
@@ -1151,7 +1151,7 @@ extern int AFM_parseFile (FILE *fp, AFM_Font_info **fi, int flags)
     
     while ((code != normalEOF) && (code != AFM_earlyEOF))
     {
-        keyword = token(fp);
+        keyword = token (fp);
         if (keyword == NULL)
           /* Have reached an early and unexpected EOF. */
           /* Set flag and stop parsing */
@@ -1159,56 +1159,56 @@ extern int AFM_parseFile (FILE *fp, AFM_Font_info **fi, int flags)
             code = AFM_earlyEOF;
             break; /* get out of loop */
         }
-        switch(recognize(keyword))
+        switch (recognize (keyword))
         {
             case STARTKERNDATA:
                 break;
             case ENDKERNDATA:
                 break;
             case STARTTRACKKERN:
-                keyword = token(fp);
+                keyword = token (fp);
                 if (flags & P_T)
                 {
                   (*fi)->numOfTracks = atoi(keyword);
                   (*fi)->tkd = (AFM_TrackKernData *) 
-                        calloc((*fi)->numOfTracks, sizeof(AFM_TrackKernData));
(*fi)->numOfTracks = atoi (keyword);
+ (*fi)->tkd = (AFM_TrackKernData *) 
+                        calloc ((*fi)->numOfTracks, sizeof (AFM_TrackKernData));
                     if ((*fi)->tkd == NULL) 
                     {
                        error = AFM_storageProblem; 
-                       return(error);
+                       return (error);
                     }
                 } /* if */
-                code = parseAFM_TrackKernData(fp, *fi);
+                code = parseAFM_TrackKernData (fp, *fi);
                 break;
             case STARTKERNPAIRS:
-                keyword = token(fp);
+                keyword = token (fp);
                 if (flags & P_P)
                 {
                   (*fi)->numOfPairs = atoi(keyword);
                   (*fi)->pkd = (AFM_PairKernData *) 
-                        calloc((*fi)->numOfPairs, sizeof(AFM_PairKernData));
(*fi)->numOfPairs = atoi (keyword);
+ (*fi)->pkd = (AFM_PairKernData *) 
+                        calloc ((*fi)->numOfPairs, sizeof (AFM_PairKernData));
                     if ((*fi)->pkd == NULL) 
                     {
                        error = AFM_storageProblem; 
-                       return(error);
+                       return (error);
                     }
                 } /* if */
-                code = parseAFM_PairKernData(fp, *fi);
+                code = parseAFM_PairKernData (fp, *fi);
                 break;
             case STARTCOMPOSITES:
-                keyword = token(fp);
+                keyword = token (fp);
                 if (flags & P_C)
                 { 
                   (*fi)->numOfComps = atoi(keyword);
                   (*fi)->ccd = (AFM_CompCharData *) 
-                        calloc((*fi)->numOfComps, sizeof(AFM_CompCharData));
(*fi)->numOfComps = atoi (keyword);
+ (*fi)->ccd = (AFM_CompCharData *) 
+                        calloc ((*fi)->numOfComps, sizeof (AFM_CompCharData));
                     if ((*fi)->ccd == NULL) 
                     {
                        error = AFM_storageProblem; 
-                       return(error);
+                       return (error);
                     }
                 } /* if */
-                code = parseAFM_CompCharData(fp, *fi); 
+                code = parseAFM_CompCharData (fp, *fi); 
                 break;    
             case ENDFONTMETRICS:
                 code = normalEOF;
@@ -1225,9 +1225,9 @@ extern int AFM_parseFile (FILE *fp, AFM_Font_info **fi, int flags)
   
     if ((error != AFM_earlyEOF) && (code < 0)) error = code;
     
-    if (ident != NULL) { free(ident); ident = NULL; }
+    if (ident != NULL) { free (ident); ident = NULL; }
         
-    return(error);
+    return (error);
   
 } /* parseFile */
 
index 1dd202ac95142cd6d5f06764f66c734b494e1cef..df8847fe04ebb52f599d2f689d705de19a1e04cd 100644 (file)
@@ -1,7 +1,7 @@
 /*
    poly.cc -- routines for manipulation of polynomials in one var
 
-   (c) 1993--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1993--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
  */
 
 #include <math.h>
@@ -29,7 +29,7 @@ Polynomial::eval (Real x)const
 
 
 Polynomial
-Polynomial::multiply(const Polynomial & p1, const Polynomial & p2)
+Polynomial::multiply (const Polynomial & p1, const Polynomial & p2)
 {
   Polynomial dest;
 
@@ -46,7 +46,7 @@ Polynomial::multiply(const Polynomial & p1, const Polynomial & p2)
 }
 
 void
-Polynomial::differentiate()
+Polynomial::differentiate ()
 {
   for (int i = 1; i<= degree (); i++)
     {
@@ -56,10 +56,10 @@ Polynomial::differentiate()
 }
 
 Polynomial
-Polynomial::power(int exponent, const Polynomial & src)
+Polynomial::power (int exponent, const Polynomial & src)
 {
   int e = exponent;
-  Polynomial dest(1), base(src);
+  Polynomial dest (1), base (src);
     
   /*
     classic int power. invariant: src^exponent = dest * src ^ e
@@ -68,11 +68,11 @@ Polynomial::power(int exponent, const Polynomial & src)
     {
       if (e % 2)
         {
-         dest = multiply(dest, base);
+         dest = multiply (dest, base);
          e--;
         } else
          {
-            base = multiply(base, base);
+            base = multiply (base, base);
             e /= 2;
          }
     }
@@ -82,20 +82,20 @@ Polynomial::power(int exponent, const Polynomial & src)
 static Real const FUDGE = 1e-8;
 
 void
-Polynomial::clean()
+Polynomial::clean ()
 {
 /*
   We only do relative comparisons. Absolute comparisons break down in
   degenerate cases.  */
   while (degree () > 0 &&
       (fabs (coefs_.top ()) < FUDGE * fabs (coefs_.top (1))
+ (fabs (coefs_.top ()) < FUDGE * fabs (coefs_.top (1))
          || !coefs_.top ()))
     coefs_.pop ();
 }
 
 
 Polynomial 
-Polynomial::add(const Polynomial & p1, const Polynomial & p2)
+Polynomial::add (const Polynomial & p1, const Polynomial & p2)
 {
   Polynomial dest;
   int tempord =  p2.degree () >? p1.degree ();
@@ -112,14 +112,14 @@ Polynomial::add(const Polynomial & p1, const Polynomial & p2)
 }
 
 void
-Polynomial::scalarmultiply(Real fact)
+Polynomial::scalarmultiply (Real fact)
 {
   for (int i = 0; i <= degree (); i++)
     coefs_[i] *= fact;
 }
 
 Polynomial
-Polynomial::subtract(const Polynomial & p1, const Polynomial & p2)
+Polynomial::subtract (const Polynomial & p1, const Polynomial & p2)
 {
   Polynomial dest;
   int tempord =  p2.degree () >? p1.degree ();
@@ -138,19 +138,19 @@ Polynomial::subtract(const Polynomial & p1, const Polynomial & p2)
 }
 
 void
-Polynomial::set_negate(const Polynomial & src)
+Polynomial::set_negate (const Polynomial & src)
 {
-  for (int i = 0; i <= src.degree(); i++)
+  for (int i = 0; i <= src.degree (); i++)
     coefs_[i] = -src.coefs_[i];
 }
 
 /// mod of #u/v#
 int 
-Polynomial::set_mod(const Polynomial &u, const Polynomial &v)
+Polynomial::set_mod (const Polynomial &u, const Polynomial &v)
 {
 (*this) = u;
+ (*this) = u;
     
-  if (v.lc() < 0.0) {
+  if (v.lc () < 0.0) {
     for (int k = u.degree () - v.degree () - 1; k >= 0; k -= 2)
       coefs_[k] = -coefs_[k];
 
@@ -167,30 +167,30 @@ Polynomial::set_mod(const Polynomial &u, const Polynomial &v)
   while (k >= 0 && coefs_[k] == 0.0)
     k--;
 
-  coefs_.set_size(1+ ( (k < 0) ? 0 : k));
-  return degree();
+  coefs_.set_size (1+ ((k < 0) ? 0 : k));
+  return degree ();
 }
 
 void
-Polynomial::check_sol(Real x) const 
+Polynomial::check_sol (Real x) const 
 {
-  Real f=eval(x);
-  Polynomial p(*this);
-  p.differentiate();
-  Real d = p.eval(x);
+  Real f=eval (x);
+  Polynomial p (*this);
+  p.differentiate ();
+  Real d = p.eval (x);
   
-  if( abs(f) > abs(d) * FUDGE)
+  if ( abs (f) > abs (d) * FUDGE)
     ;
   /*
-    warning("x=%f is not a root of polynomial\n"
-    "f(x)=%f, f'(x)=%f \n", x, f, d);  */
+    warning ("x=%f is not a root of polynomial\n"
+    "f (x)=%f, f' (x)=%f \n", x, f, d);        */
 }
        
 void
-Polynomial::check_sols(Array<Real> roots) const
+Polynomial::check_sols (Array<Real> roots) const
 {
   for (int i=0; i< roots.size (); i++)
-    check_sol(roots[i]);
+    check_sol (roots[i]);
 }
 
 Polynomial::Polynomial (Real a, Real b)
@@ -201,12 +201,12 @@ Polynomial::Polynomial (Real a, Real b)
 }
 
 /* cubic root. */
-inline Real cubic_root(Real x)
+inline Real cubic_root (Real x)
 {
   if (x > 0.0)
-    return pow(x, 1.0/3.0) ;
+    return pow (x, 1.0/3.0) ;
   else if (x < 0.0)
-    return -pow(-x, 1.0/3.0);
+    return -pow (-x, 1.0/3.0);
   else
     return 0.0;
 }
@@ -218,7 +218,7 @@ iszero (Real r)
 }
 
 Array<Real>
-Polynomial::solve_cubic()const
+Polynomial::solve_cubic ()const
 {
   Array<Real> sol;
   
@@ -240,28 +240,28 @@ Polynomial::solve_cubic()const
   Real cb_p = p * p * p;
   Real D = q * q + cb_p;
 
-  if (iszero(D)) {
-    if (iszero(q)) {   /* one triple solution */
+  if (iszero (D)) {
+    if (iszero (q)) {  /* one triple solution */
       sol.push (0);
       sol.push (0);
       sol.push (0);      
     } else {           /* one single and one double solution */
-      Real u = cubic_root(-q);
+      Real u = cubic_root (-q);
 
       sol.push (2 * u);
       sol.push (-u);
     }
   } else if (D < 0) {          /* Casus irreducibilis: three real solutions */
-    Real phi = 1.0 / 3 * acos(-q / sqrt(-cb_p));
-    Real t = 2 * sqrt(-p);
+    Real phi = 1.0 / 3 * acos (-q / sqrt (-cb_p));
+    Real t = 2 * sqrt (-p);
 
-    sol.push (t * cos(phi));
-    sol.push (-t * cos(phi + M_PI / 3));
-    sol.push ( -t * cos(phi - M_PI / 3));
+    sol.push (t * cos (phi));
+    sol.push (-t * cos (phi + M_PI / 3));
+    sol.push ( -t * cos (phi - M_PI / 3));
   } else {                     /* one real solution */
-    Real sqrt_D = sqrt(D);
-    Real u = cubic_root(sqrt_D - q);
-    Real v = -cubic_root(sqrt_D + q);
+    Real sqrt_D = sqrt (D);
+    Real u = cubic_root (sqrt_D - q);
+    Real v = -cubic_root (sqrt_D + q);
 
     sol.push ( u + v);
   }
@@ -284,7 +284,7 @@ Polynomial::solve_cubic()const
 Real
 Polynomial::lc () const
 {
-  return coefs_.top();
+  return coefs_.top ();
 }
 
 Real&
@@ -302,7 +302,7 @@ Polynomial::degree ()const
    all roots of quadratic eqn.
  */
 Array<Real>
-Polynomial::solve_quadric()const
+Polynomial::solve_quadric ()const
 {
   Array<Real> sol;
   /* normal form: x^2 + px + q = 0 */
@@ -312,7 +312,7 @@ Polynomial::solve_quadric()const
   Real D = p * p - q;
 
   if (D>0) {
-    D = sqrt(D);
+    D = sqrt (D);
 
     sol.push ( D - p);
     sol.push ( -D - p);
@@ -322,7 +322,7 @@ Polynomial::solve_quadric()const
 
 /* solve linear equation */
 Array<Real>
-Polynomial::solve_linear()const
+Polynomial::solve_linear ()const
 {
   Array<Real> s;
   if (coefs_[1])
@@ -359,11 +359,11 @@ Polynomial:: operator *= (Polynomial const &p2)
 void
 Polynomial::operator += (Polynomial const &p)
 {
-  *this = add( *this, p);
+  *this = add ( *this, p);
 }
 
 void
 Polynomial::operator -= (Polynomial const &p)
 {
-  *this = subtract(*this, p);
+  *this = subtract (*this, p);
 }
index a50228330b16c59bc80004b420feba9c8bc22274..5c3c8c5cbd6727b642d18a10bb397a37333abf1b 100644 (file)
@@ -37,7 +37,7 @@ operator << (ostream &o, Rational r)
 Rational
 Rational::trunc_rat () const
 {
-  return Rational(num_ - (num_ % den_), den_);
+  return Rational (num_ - (num_ % den_), den_);
 }
 
 Rational::Rational ()
@@ -81,7 +81,7 @@ Rational::set_infinite (int s)
 Rational
 Rational::operator - () const
 {
-  Rational r(*this);
+  Rational r (*this);
   r.negate ();
   return r;
 }
@@ -144,7 +144,7 @@ Rational::compare (Rational const &r, Rational const &s)
   else if (r.infty_b ())
     return 0;
 
-  return  (r - s).sign ();
+  return (r - s).sign ();
 }
 
 int
@@ -173,7 +173,7 @@ Rational::operator += (Rational r)
     {
       int n = sign_ * num_ *r.den_ + r.sign_ * den_ * r.num_;
       int d = den_ * r.den_;
-      sign_ =  ::sign (n) * ::sign(d);
+      sign_ =  ::sign (n) * ::sign (d);
       num_ = abs (n);
       den_ = abs (d);
       normalise ();
@@ -185,7 +185,7 @@ Rational::operator += (Rational r)
 /*
   copied from libg++ 2.8.0
  */ 
-Rational::Rational(double x)
+Rational::Rational (double x)
 {
   if (x != 0.0)
     {
@@ -193,7 +193,7 @@ Rational::Rational(double x)
       x *= sign_;
 
       int expt;
-      double mantissa = frexp(x, &expt);
+      double mantissa = frexp (x, &expt);
 
       const int FACT = 1 << 20;
 
index ae1aa8658c4cc2af5d92e87b5e6efcc19a374075..e942dfbc1b29979a928d2c6793f20233974d4d1e 100644 (file)
@@ -6,7 +6,7 @@
 const char *
 demangle_classname (type_info const &t)
 {
-  char const *s = t.name();
+  char const *s = t.name ();
   while (isdigit (*s))
     s++;
   return s;
index 34cda9d1f4f9bbc23521141685e2a916fdc211e0..8feb1a5843312fa6b91268ef867321f4953c9ad4 100644 (file)
@@ -52,7 +52,7 @@ Simple_file_storage::load_file (String s)
   data_p_[len_i_] = 0;
   ret = fread (data_p_, sizeof (char), len_i_, f);
 
-  if  (ret!=len_i_)
+  if (ret!=len_i_)
     warning (_f ("Huh?  Got %d, expected %d characters", ret, len_i_));
 
   fclose (f);
index 65e4674b463325f5b306550f6c2b3b922260152a..4c5a4390fd0d4edef1028791877bc467dcede61e 100644 (file)
@@ -58,8 +58,8 @@ Source_file::istream_l ()
 String
 Source_file::file_line_column_str (char const *context_ch_C) const
 {
-  if  (!ch_C ())
-    return "(" + _ ("position unknown") + ")";
+  if (!ch_C ())
+    return " (" + _ ("position unknown") + ")";
   else
     return name_str () + ":" + to_str (line_i (context_ch_C))
       + ":" + to_str (char_i (context_ch_C));
@@ -152,7 +152,7 @@ String
 Source_file::error_str (char const* pos_ch_C) const
 {
   if (!in_b (pos_ch_C))
-    return "(" + _ ("position unknown") + ")";
+    return " (" + _ ("position unknown") + ")";
 
   int ch_i = char_i (pos_ch_C);
   String line = line_str (pos_ch_C);
index 0d5c27e11764e7a85539b22ad97c08e502959036..e751cc71d839197e398daec5bfeb6c7dffe8f214 100644 (file)
@@ -37,8 +37,8 @@ String
 String_convert::bin2hex_str (String bin_str)
 {
   String str;
-  Byte const* byte_C = bin_str.byte_C();
-  for (int i = 0; i < bin_str.length_i(); i++) 
+  Byte const* byte_C = bin_str.byte_C ();
+  for (int i = 0; i < bin_str.length_i (); i++) 
     {
       str += to_str ((char)nibble2hex_byte (*byte_C >> 4));
       str += to_str ((char)nibble2hex_byte (*byte_C++));
@@ -55,10 +55,10 @@ String_convert::bin2_i (String bin_str)
 unsigned
 String_convert::bin2_u (String bin_str)
 {
-  assert (bin_str.length_i() <= (int)sizeof(unsigned));
+  assert (bin_str.length_i () <= (int)sizeof (unsigned));
 
   unsigned result_u = 0;
-  for (int i = 0; i < bin_str.length_i(); i++) 
+  for (int i = 0; i < bin_str.length_i (); i++) 
     {
       result_u <<= 8;
       result_u += (Byte)bin_str[ i ];
@@ -70,11 +70,11 @@ String_convert::bin2_u (String bin_str)
 int
 String_convert::dec2_i (String dec_str)
 {
-  if (!dec_str.length_i())
+  if (!dec_str.length_i ())
     return 0;
 
   long l = 0;
-  int conv = sscanf (dec_str.ch_C(), "%ld", &l);
+  int conv = sscanf (dec_str.ch_C (), "%ld", &l);
   assert (conv);
 
   return (int)l;
@@ -85,7 +85,7 @@ String_convert::i64_str (I64 i64, char const* fmt)
 {
   char buffer[STRING_BUFFER_LEN];
   snprintf (buffer, STRING_BUFFER_LEN,
          (fmt ? fmt : "%Ld"), i64);     // assume radix 10
+ (fmt ? fmt : "%Ld"), i64);     // assume radix 10
   return String (buffer);
 
 }
@@ -93,10 +93,10 @@ String_convert::i64_str (I64 i64, char const* fmt)
 double
 String_convert::dec2_f (String dec_str)
 {
-  if (!dec_str.length_i())
+  if (!dec_str.length_i ())
     return 0;
   double d = 0;
-  int conv = sscanf (dec_str.ch_C(), "%lf", &d);
+  int conv = sscanf (dec_str.ch_C (), "%lf", &d);
   assert (conv);
   return d;
 }
@@ -104,19 +104,19 @@ String_convert::dec2_f (String dec_str)
 int
 String_convert::hex2bin_i (String hex_str, String& bin_str_r)
 {
-  if (hex_str.length_i() % 2)
+  if (hex_str.length_i () % 2)
     hex_str = "0" + hex_str;
 
   bin_str_r = "";
-  Byte const* byte_C= hex_str.byte_C();
+  Byte const* byte_C= hex_str.byte_C ();
   int i = 0;
-  while (i < hex_str.length_i()) 
+  while (i < hex_str.length_i ()) 
     {
       int high_i = hex2nibble_i (*byte_C++);
       int low_i = hex2nibble_i (*byte_C++);
       if (high_i < 0 || low_i < 0)
        return 1; // illegal char
-      bin_str_r += to_str ((char)(high_i << 4 | low_i), 1 );
+      bin_str_r += to_str ((char) (high_i << 4 | low_i), 1 );
       i += 2;
     }
   return 0;
@@ -145,7 +145,7 @@ String_convert::hex2nibble_i (Byte byte)
   return -1;
 }
 
-// stupido.  Should use int_str()
+// stupido.  Should use int_str ()
 String 
 String_convert::i2dec_str (int i, int length_i, char ch)
 {
@@ -157,11 +157,11 @@ String_convert::i2dec_str (int i, int length_i, char ch)
   String dec_str = to_str (i);
   
   // ugh
-  return to_str (fill_ch, length_i - dec_str.length_i()) + dec_str;
+  return to_str (fill_ch, length_i - dec_str.length_i ()) + dec_str;
 }
 
 
-// stupido.  Should use int_str()
+// stupido.  Should use int_str ()
 String 
 String_convert::u2hex_str (unsigned u, int length_i, char fill_ch)
 {
@@ -172,15 +172,15 @@ 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_str ((char) ((u % 16)["0123456789abcdef"] ) ) + str;
       u /= 16;
     }
 #else
   str += int_str (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 = 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);
 
   return str;
@@ -211,7 +211,7 @@ String_convert::int_str (int i, char const* fmt)
 {
   char buffer[STRING_BUFFER_LEN];
   snprintf (buffer, STRING_BUFFER_LEN,
          (fmt ? fmt : "%d"), i);     // assume radix 10
+ (fmt ? fmt : "%d"), i);     // assume radix 10
   return String (buffer);
 }
 
index b7afe955f28074958b3fe10419e2281d304a5388..8ee89d0c5f26e7c06790ac478cc8b3ff685dda5a 100644 (file)
@@ -2,7 +2,7 @@
 
  string.cc - implement String
  
- (c)  1997--2000 Han-Wen Nienhuys & Jan Nieuwenhuizen
 (c)  1997--2000 Han-Wen Nienhuys & Jan Nieuwenhuizen
 
  */
 
@@ -198,7 +198,7 @@ String::index_last_i (char const c) const
     return -1;
 
   char const* me = strh_.ch_C ();
-  char const* p = (char const*)memrchr ( (Byte*)me, length_i (), c);
+  char const* p = (char const*)memrchr ((Byte*)me, length_i (), c);
   if (p)
     return p - me;
   return -1;
@@ -254,7 +254,7 @@ String::index_i (String searchfor) const
 {
   char const* me = strh_.ch_C ();
 
-  char const* p =     (char const *) 
+  char const* p = (char const *) 
     memmem (me, length_i (), searchfor.ch_C (), searchfor.length_i ());
   
   if (p)
@@ -347,7 +347,7 @@ String::cut_str (int index_i, int n) const
   if (!length_i () || (index_i < 0) || (index_i >= length_i () ) || (n < 1 ) )
     return String ();
 
-  if ( (n > length_i ()) ||  (index_i + n > length_i () ) )
+  if ((n > length_i ()) || (index_i + n > length_i () ) )
     n = length_i () - index_i;
 
   return String (byte_C () + index_i, n);
index 61fb0529d60d3fce2930b96774d3fe9417ab7a88..6acfa9eeef89da5530fd71f604bf4f66e5af8451 100644 (file)
@@ -4,20 +4,20 @@
 bool
 Text_db::eof_b ()
 {
-  Data_file::gobble_leading_white();
-  return  Data_file::eof_b();
+  Data_file::gobble_leading_white ();
+  return  Data_file::eof_b ();
 }
 
 void
-Text_db::gobble_leading_white()
+Text_db::gobble_leading_white ()
 {
   while (1) 
     {
-      Data_file::gobble_leading_white();
+      Data_file::gobble_leading_white ();
       if (eof_b ())
        return ;
       char c;
-      if  ((c = data_get()) !='\n')
+      if ((c = data_get ()) !='\n')
        {
          data_unget (c);
          return ;
@@ -27,7 +27,7 @@ Text_db::gobble_leading_white()
 
 
 Text_record
-Text_db::get_record() 
+Text_db::get_record () 
 {
   while (1) 
     {
@@ -35,18 +35,18 @@ Text_db::get_record()
       Array<String> fields;
       assert (!eof_b ());
        
-      while ((s = get_word()) != "")
+      while ((s = get_word ()) != "")
        {
          fields.push (s);      
-         gobble_white();
+         gobble_white ();
        }
             
 
-      if (get_line() != "")
+      if (get_line () != "")
        assert (false);
     
-      assert (fields.size());
-      return Text_record (fields, get_name(), line ());
+      assert (fields.size ());
+      return Text_record (fields, get_name (), line ());
     }
 }
 
index 446c44a01917bccf55f1ec6889791f6ec92d64b3..e6a1202a14769970432b83edced5768433eba07b 100644 (file)
@@ -4,7 +4,7 @@
 
 Text_stream::Text_stream (String fn)
 {
-  ios::sync_with_stdio();
+  ios::sync_with_stdio ();
   if (fn == "")
     {
       name = _ ("<stdin>");
@@ -30,7 +30,7 @@ Text_stream::Text_stream (String fn)
 void
 Text_stream::message (String s)
 {
-  cerr << '\n'<<get_name() << ": " << line ()<<": "<<s<<endl;
+  cerr << '\n'<<get_name () << ": " << line ()<<": "<<s<<endl;
 }
 
 bool
@@ -42,9 +42,9 @@ Text_stream::eof_b ()
       feof (f);
 }
 
-Text_stream::~Text_stream()
+Text_stream::~Text_stream ()
 {
-    if (!eof_b()) 
+    if (!eof_b ()) 
       cerr <<__FUNCTION__<< ": closing unended file";
     
     fclose (f);
index 4fa9dcd2052173a2a6c4d2a3c8ded8fa169dd261..9cfd19e3f281e9d79f1634b867f60a737a1d95af 100644 (file)
@@ -33,6 +33,6 @@ message (String m)
 void
 programming_error (String s)
 {
-  cerr << _("programming error: ") << s << _(" (Continuing; cross thumbs)") << '\n';
+  cerr << _ ("programming error: ") << s << _ (" (Continuing; cross thumbs)") << '\n';
 }
 
index ec12a9e3c016870c6d0fe8ff7123cb16a9ff3390..a59f9b20d7a466746bd8cb03b3bf804ca4c55991 100644 (file)
@@ -8,7 +8,7 @@ If they don't barlines should still be shown.
 
 %  no alts.
 \score {
-  \notes \relative c'' {
+  \notes \context Voice \relative c'' {
     % repeat non aligning with barlines.
     \repeat volta 3 { c^"3$\\times$ 0alt" d e }
     % less alts than body
diff --git a/input/test/music-creation.ly b/input/test/music-creation.ly
new file mode 100644 (file)
index 0000000..cc58b96
--- /dev/null
@@ -0,0 +1,34 @@
+\header {
+
+ texidoc = "You can create music expressions from Scheme.  The
+ mechanism for this is rather clumsy to use, so avoid if possible.";
+
+ }
+
+#(define (make-note-req p d)
+   (let* ( (ml (ly-make-music "Note_req")) )
+   (ly-set-mus-property ml 'duration d)
+   (ly-set-mus-property ml 'pitch p)   
+   ml 
+))
+
+#(define (make-note elts)
+   (let* ( (ml (ly-make-music "Request_chord")) )
+   (ly-set-mus-property ml 'elements elts)
+   ml 
+))
+
+#(define (seq-music-list elts)
+   (let* ( (ml (ly-make-music "Sequential_music")) )
+   (ly-set-mus-property ml 'elements elts)
+   ml 
+))
+
+
+fooMusic  = #(seq-music-list
+  (list (make-note (list (make-note-req (make-pitch 1 0 0) (make-duration 2 0))))
+     (make-note (list (make-note-req (make-pitch 1 1 0) (make-duration 2 0)))))
+     )
+     
+\score { \fooMusic }
index 7f88845376d5d8457cd0e3c419ad38b7190d05b1..c3d76bbc2516c40439d2377cbb28274f9bb535fb 100644 (file)
@@ -23,5 +23,6 @@ $(outdir)/my-lily-parser.o: $(outdir)/parser.hh
 $(outdir)/my-lily-lexer.o: $(outdir)/parser.hh
 $(outdir)/lexer.o: $(outdir)/parser.hh
 
+$(outdir)/kpath.o: $(outdir)/version.hh
 $(outdir)/lily-guile.o: $(outdir)/version.hh
 $(outdir)/lily-version.o: $(outdir)/version.hh
index 746c6eb123b5f4da5e857230bb3efa61af168d64..764b633cc19aa77ee186564396672766ff3945c5 100644 (file)
@@ -33,7 +33,7 @@ Adobe_font_metric::make_afm (AFM_Font_info *fi, unsigned int checksum)
 {
   Adobe_font_metric * fm = new Adobe_font_metric (fi);
   fm->checksum_ = checksum;
-  return fm->self_scm();    
+  return fm->self_scm ();    
 }
 
 
@@ -48,7 +48,7 @@ Adobe_font_metric::find_ascii_metric (int a , bool warn) const
          return font_inf_->cmi + code;
        }
     }
-  else if (warn )
+  else if (warn)
     {
       warning (_f ("can't find character number: %d", a));
     }
@@ -65,7 +65,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.ch_C ()));
        }
       return 0;
     }
@@ -79,7 +79,7 @@ Adobe_font_metric::get_char (int code) const
 {
   AFM_CharMetricInfo const
     * c =  find_ascii_metric (code,false);
-  Box b (Interval (0,0),Interval(0,0));
+  Box b (Interval (0,0),Interval (0,0));
   if (c)
     b = afm_bbox_to_box (c->charBBox);                 
 
@@ -89,7 +89,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.ch_C () , "r");
   char s[2048];
   char *check_key = "TfmCheckSum"; 
   fgets (s, sizeof (s), f);
@@ -148,7 +148,7 @@ Adobe_font_metric::find_by_name (String s) const
       return m;
     }
   
-  SCM at =  (gh_list (ly_symbol2scm ("char"),
+  SCM at = (gh_list (ly_symbol2scm ("char"),
                      gh_int2scm (cm->code),
                      SCM_UNDEFINED));
   
index 7aa6de3fc82278b10331c1dbe7d467331ed08cea..af9d3763e67837d00cd59ca86bdb3e67440f09ae 100644 (file)
   This callback is set in the children of the align element. It does
   not compute anything, but a side effect of a->do_side_processing ()
   is that the elements are placed correctly.  */
-MAKE_SCHEME_CALLBACK(Align_interface,alignment_callback,2);
+MAKE_SCHEME_CALLBACK (Align_interface,alignment_callback,2);
 SCM
 Align_interface::alignment_callback (SCM element_smob, SCM axis)
 {
   Grob * me = unsmob_grob (element_smob);
-  Axis ax = (Axis )gh_scm2int (axis);
+  Axis ax = (Axis)gh_scm2int (axis);
   Grob * par = me->parent_l (ax);
   if (par && !to_boolean (par->get_grob_property ("alignment-done")))
     {
@@ -31,12 +31,12 @@ Align_interface::alignment_callback (SCM element_smob, SCM axis)
   return gh_double2scm (0.0);
 }
 
-MAKE_SCHEME_CALLBACK(Align_interface,fixed_distance_alignment_callback,2);
+MAKE_SCHEME_CALLBACK (Align_interface,fixed_distance_alignment_callback,2);
 SCM
 Align_interface::fixed_distance_alignment_callback (SCM element_smob, SCM axis)
 {
   Grob * me = unsmob_grob (element_smob);
-  Axis ax = (Axis )gh_scm2int (axis);
+  Axis ax = (Axis)gh_scm2int (axis);
   Grob * par = me->parent_l (ax);
   if (par && !to_boolean (par->get_grob_property ("alignment-done")))
     {
@@ -53,7 +53,7 @@ Align_interface::align_to_fixed_distance (Grob *me , Axis a)
   SCM d =   me->get_grob_property ("stacking-dir");
 
   
-  Direction stacking_dir = gh_number_p(d) ? to_dir (d) : CENTER;
+  Direction stacking_dir = gh_number_p (d) ? to_dir (d) : CENTER;
   if (!stacking_dir)
     stacking_dir = DOWN;
 
@@ -67,9 +67,9 @@ Align_interface::align_to_fixed_distance (Grob *me , Axis a)
     }
   
   Link_array<Grob> elems
-    = Pointer_group_interface__extract_elements (  me, (Grob*) 0, "elements");
+    = Pointer_group_interface__extract_elements (me, (Grob*) 0, "elements");
   Real where_f=0;
-  for (int j=0 ;  j < elems.size(); j++) 
+  for (int j=0 ;  j < elems.size (); j++) 
     {
       where_f += stacking_dir * dy;
       elems[j]->translate_axis (where_f, a);
@@ -88,7 +88,7 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
   SCM d =   me->get_grob_property ("stacking-dir");
 
   
-  Direction stacking_dir = gh_number_p(d) ? to_dir (d) : CENTER;
+  Direction stacking_dir = gh_number_p (d) ? to_dir (d) : CENTER;
   if (!stacking_dir)
     stacking_dir = DOWN;
 
@@ -108,12 +108,12 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
   Link_array<Grob> elems;
   Link_array<Grob> all_grobs
     = Pointer_group_interface__extract_elements (me, (Grob*) 0, "elements");
-  for (int i=0; i < all_grobs.size(); i++) 
+  for (int i=0; i < all_grobs.size (); i++) 
     {
-      Interval y = all_grobs[i]->extent(me, a);
-      if (!y.empty_b())
+      Interval y = all_grobs[i]->extent (me, a);
+      if (!y.empty_b ())
        {
-         Grob *e =dynamic_cast<Grob*>(all_grobs[i]);
+         Grob *e =dynamic_cast<Grob*> (all_grobs[i]);
 
          // todo: fucks up if item both in Halign & Valign. 
          SCM min_dims = e->remove_grob_property ("minimum-space");
@@ -129,7 +129,7 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
              gh_number_p (gh_car (extra_dims))
              && gh_number_p (gh_cdr (extra_dims)))
            {
-             y[LEFT] += gh_scm2double (gh_car  (extra_dims));
+             y[LEFT] += gh_scm2double (gh_car (extra_dims));
              y[RIGHT] += gh_scm2double (gh_cdr (extra_dims));
            }
 
@@ -148,15 +148,15 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
 
   String s ("self-alignment-");
 
-  s +=  (a == X_AXIS) ? "X" : "Y";
+  s += (a == X_AXIS) ? "X" : "Y";
 
-  SCM align (me->get_grob_property (s.ch_C()));
+  SCM align (me->get_grob_property (s.ch_C ()));
      
   Array<Real> translates ;
   Interval total;
   Real where_f=0;
   
-  for (int j=0 ;  j < elems.size(); j++) 
+  for (int j=0 ;  j < elems.size (); j++) 
     {
       Real dy = 0.0;
       dy = - stacking_dir * dims[j][-stacking_dir];
@@ -165,12 +165,12 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
 
       if (j)
        {
-         dy = (dy >? threshold[SMALLER] )
+         dy = (dy >? threshold[SMALLER])
            <? threshold[BIGGER];
        }
 
       where_f += stacking_dir * dy;
-      total.unite ( dims[j] +   where_f);
+      total.unite (dims[j] +   where_f);
       translates.push (where_f);
     }
 
@@ -183,7 +183,7 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
     also move the grobs that were empty, to maintain spatial order. 
    */
   Array<Real> all_translates;
-  if (translates.size  ())
+  if (translates.size ())
     {
       int i =0;
       int j =0;
@@ -200,7 +200,7 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
          j++;
        }
 
-      if (isdir_b  (align))
+      if (isdir_b (align))
        {
          center_offset = total.linear_combination (gh_scm2double (align));
        }
@@ -253,7 +253,7 @@ Align_interface::set_interface (Grob*me)
 void
 Align_interface::set_axis (Grob*me,Axis a)
 {
-  Axis_group_interface::set_axes (me, a,a );
+  Axis_group_interface::set_axes (me, a,a);
 }
 
 bool
index 87dd0f079483ff71bdd72e20c017a99ab56900fc..b1259ab1ddcef7ce57d6725a9b1de3a7f20480bd 100644 (file)
@@ -32,11 +32,11 @@ class Align_note_column_engraver: public Engraver
   virtual void finalize ();
   virtual void acknowledge_grob (Grob_info);
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Align_note_column_engraver ();
 };
 
-Align_note_column_engraver::Align_note_column_engraver()
+Align_note_column_engraver::Align_note_column_engraver ()
 {
   align_item_p_ =0;
   now_column_l_ =0;
@@ -72,7 +72,7 @@ Align_note_column_engraver::finalize ()
 void
 Align_note_column_engraver::acknowledge_grob (Grob_info inf)
 {
-  if (Note_column::has_interface(inf.elem_l_))
+  if (Note_column::has_interface (inf.elem_l_))
     {
       now_column_l_ =inf.elem_l_;
     }
@@ -98,12 +98,12 @@ Align_note_column_engraver::create_grobs ()
         use that to space grace notes.  
       */
       SCM grsp = get_property ("graceAccidentalSpace") ;
-      if (gh_number_p(grsp))
+      if (gh_number_p (grsp))
        {
          /*
            ugh.
          */
-         Real extra_space = gh_scm2double(grsp);
+         Real extra_space = gh_scm2double (grsp);
          SCM e = gh_cons (gh_double2scm (-extra_space),
                           gh_double2scm (0.0));
          now_column_l_->set_grob_property ("extra-space", e);
@@ -128,5 +128,5 @@ Align_note_column_engraver::start_translation_timestep ()
   accidental_l_ =0;
 }
 
-ADD_THIS_TRANSLATOR(Align_note_column_engraver);
+ADD_THIS_TRANSLATOR (Align_note_column_engraver);
 
index 6f749f85cc14d719fe8d43fb5a82c6d712addea5..a19fb2aa8bdea19958ab41501814198ac4a05042 100644 (file)
@@ -43,21 +43,21 @@ All_font_metrics::find_afm (String name)
 
   SCM val;
   
-  if (!afm_p_dict_->try_retrieve  (sname, &val))
+  if (!afm_p_dict_->try_retrieve (sname, &val))
     {
       String path;
 
-      if (path.empty_b())
+      if (path.empty_b ())
        path = search_path_.find (name  + ".afm");
 
       if (path.empty_b ())
        {
-         char  * p = ly_find_afm (name.ch_C());
+         char  * p = ly_find_afm (name.ch_C ());
          if (p)
            path = p;
        }
 
-      if (path.empty_b())
+      if (path.empty_b ())
        return 0;
       
       if (verbose_global_b)
@@ -76,19 +76,19 @@ All_font_metrics::find_afm (String name)
 
 
       Adobe_font_metric *afm
-       = dynamic_cast<Adobe_font_metric*> (unsmob_metrics (val) );
+       = dynamic_cast<Adobe_font_metric*> (unsmob_metrics (val));
       Tex_font_metric * tfm = find_tfm (name);
 
       if (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
+         s += " " + _f ("does not match: `%s'", tfm->path_.ch_C ()); // FIXME
          s += "\n";
          s += " TFM: " + to_str ((int) tfm->info_.checksum);
          s += " AFM: " + to_str ((int) afm->checksum_);
          s += "\n";
-         s += _(" Rebuild all .afm files, and remove all .pk and .tfm files.  Rerun with -V to show font paths.");
+         s += _ (" Rebuild all .afm files, and remove all .pk and .tfm files.  Rerun with -V to show font paths.");
 
          error (s);
        }
@@ -109,16 +109,16 @@ All_font_metrics::find_tfm (String name)
     {
       String path;
       
-      if (path.empty_b())
+      if (path.empty_b ())
        {
-         char * p = ly_find_tfm (name.ch_C());
+         char * p = ly_find_tfm (name.ch_C ());
          if (p)
            path = p;
        }
 
-      if (path.empty_b())
+      if (path.empty_b ())
        path = search_path_.find (name  + ".tfm");
-      if (path.empty_b())
+      if (path.empty_b ())
        return 0;
 
       
index 5cbf5c17ecb3b87f4bb9434cadd7eec70f89133b..900949224c34ce87afb0529127e99b3b06f7562d 100644 (file)
@@ -86,7 +86,7 @@ Arpeggio::brew_molecule (SCM smob)
   vertical alignment if it is cross-staff.
   This callback also adds padding.
 */
-MAKE_SCHEME_CALLBACK(Arpeggio, width_callback,2);
+MAKE_SCHEME_CALLBACK (Arpeggio, width_callback,2);
 SCM
 Arpeggio::width_callback (SCM smob, SCM axis)
 {
index fd1255eda2279985fcfaf486f176e225b00be536..59d5730d33b0a1e37f4bf832a8137fe51857c807 100644 (file)
@@ -26,7 +26,7 @@ Audio_column::add_audio_item (Audio_item* l)
 }
 
 Moment
-Audio_column::at_mom() const
+Audio_column::at_mom () const
 {
   return at_mom_;
 }
index c42ad1a443f73a8520cdedeeec240ac97fc21478..b3505fb882c351e7b53e8a85dbfd4e9ce5d96ce0 100644 (file)
@@ -17,7 +17,7 @@ Audio_element_info::Audio_element_info (Audio_element*s_l, Music *r_l)
 }
 
 
-Audio_element_info::Audio_element_info()
+Audio_element_info::Audio_element_info ()
 {
   elem_l_ = 0;
   req_l_ = 0;
index ca124d9704984670ada4c4ffbb82ef8d6420cdf2..6de8b5f2471b7b29ecf9907f99a1e4f343d27bcf 100644 (file)
@@ -14,7 +14,7 @@ Audio_element::Audio_element ()
   grace_b_ = false;
 }
 
-Audio_element::~Audio_element()
+Audio_element::~Audio_element ()
 {
 }
 
index fe9ecaf9f4478f09d6fa23f57c1d1d4e1a40d60e..4a89b66555eadfb241af778393d38be03246df7e 100644 (file)
@@ -24,8 +24,8 @@ Audio_staff::output (Midi_stream& midi_stream_r, int track_i)
 {
   Midi_track midi_track;
   midi_track.number_i_ =  track_i;
-  for (Midi_walker i (this, &midi_track); i.ok(); i++)
-    i.process();
+  for (Midi_walker i (this, &midi_track); i.ok (); i++)
+    i.process ();
   midi_stream_r << midi_track;
 }
 
index 27283b34dde2f7b69444f9ea3f730d7b480e7e9e..6f0f0e1dabc09d9cfae40d78d90a1488c69e203d 100644 (file)
@@ -117,8 +117,8 @@ Auto_beam_engraver::test_moment (Direction dir, Moment test_mom)
   else
     function = gh_list (ly_symbol2scm ("end"), SCM_UNDEFINED);
 
-  Moment one_beat = *unsmob_momentget_property ("beatLength"));
-  int num = *unsmob_moment (get_property("measureLength")) / one_beat;
+  Moment one_beat = *unsmob_moment (get_property ("beatLength"));
+  int num = *unsmob_moment (get_property ("measureLength")) / one_beat;
   int den = one_beat.den_i ();
   SCM time = gh_list (gh_int2scm (num), gh_int2scm (den), SCM_UNDEFINED);
 
@@ -130,7 +130,7 @@ Auto_beam_engraver::test_moment (Direction dir, Moment test_mom)
   /* first guess */
   
   /* begin beam at any position
  (and fallback for end) */
+ (and fallback for end) */
   Moment moment (0);
   
   /* end beam at end of beat */
@@ -229,7 +229,7 @@ Auto_beam_engraver::create_beam_p ()
          scm_unprotect_object (beam_p->self_scm ());
          return 0;
        }
-      Beam::add_stem (beam_p,(*stem_l_arr_p_)[i]);
+      Beam::add_stem (beam_p, (*stem_l_arr_p_)[i]);
     }
   
   announce_grob (beam_p, 0);
@@ -450,7 +450,7 @@ Auto_beam_engraver::create_grobs ()
        {
          Moment now = now_mom ();
          if ((extend_mom_ < now)
-             || ((extend_mom_ == now) && (last_add_mom_ != now )))
+             || ((extend_mom_ == now) && (last_add_mom_ != now)))
            {
              end_beam ();
            }
index 9e3bb205db0e05f0a29842a0f285e99d7a289b51..d39c10d5d5b3e98de8ee56bc7a56f3d58b2f50e8 100644 (file)
@@ -31,7 +31,7 @@ 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_str_ != to_type)
     {
       last = current;
       current = current->daddy_trans_l_;
@@ -75,7 +75,7 @@ Auto_change_iterator::change_to (Music_iterator *it, String to_type,
   will confuse the autochanger, since it will not notice that the
   music for OTHERSTAFF is not his.
 
-  PRECONDITION: this->ok() holds.
+  PRECONDITION: this->ok () holds.
 */
 Array<Pitch>
 Auto_change_iterator::pending_pitch (Moment m) const
@@ -95,7 +95,7 @@ Auto_change_iterator::pending_pitch (Moment m) const
        break;
 
       iter->skip (m);
-      if (!iter->ok())
+      if (!iter->ok ())
        break;
       
       m = iter->pending_moment ();
@@ -110,7 +110,7 @@ Auto_change_iterator::process (Moment m)
 {
   /*
     first we get the pitches, then we do the real work.
-    Music_wrapper_iterator::process() might process (and throw away)
+    Music_wrapper_iterator::process () might process (and throw away)
     pitches we need.  */
   Array<Pitch> ps = pending_pitch (m);
 
@@ -118,20 +118,20 @@ Auto_change_iterator::process (Moment m)
   if (ps.size ())
     {
       Pitch p = ps[0];
-      Direction s = Direction (sign(p.steps ()));
+      Direction s = Direction (sign (p.steps ()));
       if (s != where_dir_)
        {
          where_dir_ = s;
-         String to_id =  (s >= 0) ?  "up" : "down";
+         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);   
        }
     }
 }
 
-Auto_change_iterator::Auto_change_iterator)
+Auto_change_iterator::Auto_change_iterator ()
 {
   where_dir_ = CENTER;
 }
 
-IMPLEMENT_CTOR_CALLBACK(Auto_change_iterator);
+IMPLEMENT_CTOR_CALLBACK (Auto_change_iterator);
index 6e22f40b6b5a4d20bcf68a3fb050e37d1c616fe2..de404ca62fd1ff51944c04786308c82ee4611d48 100644 (file)
@@ -21,18 +21,18 @@ class Axis_group_engraver : public Engraver
 protected:
   Spanner *staffline_p_;
   Link_array<Grob> elts_;
-  virtual void initialize();
-  virtual void finalize();
+  virtual void initialize ();
+  virtual void finalize ();
   virtual void acknowledge_grob (Grob_info);
   virtual void create_grobs ();
   virtual Spanner* get_spanner_p () const;
   virtual void add_element (Grob*) ;
 public:  
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Axis_group_engraver ();
 };
 
-ADD_THIS_TRANSLATOR(Axis_group_engraver);
+ADD_THIS_TRANSLATOR (Axis_group_engraver);
 
 Axis_group_engraver::Axis_group_engraver ()
 {
@@ -48,7 +48,7 @@ Axis_group_engraver::initialize ()
 
   Grob *  it = unsmob_grob (get_property ("currentCommandColumn"));
 
-  staffline_p_->set_bound(LEFT,it);
+  staffline_p_->set_bound (LEFT,it);
 
   announce_grob (staffline_p_, 0);
 }
@@ -63,7 +63,7 @@ void
 Axis_group_engraver::finalize ()
 {
   String type = daddy_grav_l ()->type_str_ ;
-  SCM dims = get_property ((type  + "VerticalExtent").ch_C());
+  SCM dims = get_property ((type  + "VerticalExtent").ch_C ());
   
   if (gh_pair_p (dims) && gh_number_p (gh_car (dims))
       && gh_number_p (gh_cdr (dims)))
@@ -72,12 +72,12 @@ Axis_group_engraver::finalize ()
       staffline_p_->set_grob_property ("extent-Y", dims);
     }
 
-  dims = get_property ((type + "MinimumVerticalExtent").ch_C());
+  dims = get_property ((type + "MinimumVerticalExtent").ch_C ());
   if (gh_pair_p (dims) && gh_number_p (gh_car (dims))
       && gh_number_p (gh_cdr (dims)))
     staffline_p_->set_grob_property ("minimum-extent-Y", dims);
 
-  dims = get_property ((type + "ExtraVerticalExtent").ch_C());
+  dims = get_property ((type + "ExtraVerticalExtent").ch_C ());
   if (gh_pair_p (dims) && gh_number_p (gh_car (dims))
       && gh_number_p (gh_cdr (dims)))
     staffline_p_->set_grob_property ("extra-extent-Y", dims);
@@ -85,7 +85,7 @@ Axis_group_engraver::finalize ()
   Grob *  it = unsmob_grob (get_property ("currentCommandColumn"));
 
 
-  staffline_p_->set_bound(RIGHT,it);
+  staffline_p_->set_bound (RIGHT,it);
 
   typeset_grob (staffline_p_);
   staffline_p_ = 0;
@@ -135,7 +135,7 @@ protected:
   virtual void acknowledge_grob (Grob_info);
   virtual void add_element (Grob *e);
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
 };
 
 void
@@ -163,4 +163,4 @@ Hara_kiri_engraver::acknowledge_grob (Grob_info i)
       Hara_kiri_group_spanner::add_interesting_item (staffline_p_, i.elem_l_);
     }
 }
-ADD_THIS_TRANSLATOR(Hara_kiri_engraver);
+ADD_THIS_TRANSLATOR (Hara_kiri_engraver);
index b7a8ec5a2060660453d69d695dd888c4e6a88f30..e133402284f201a9c0e7dcd224802ec2d04cc979 100644 (file)
@@ -26,7 +26,7 @@ Axis_group_interface::add_element (Grob*me,Grob *e)
 }
 
 bool
-Axis_group_interface::axis_b (Grob*me,Axis a )
+Axis_group_interface::axis_b (Grob*me,Axis a)
 {
   /*
     urg. FIXME, check for Hara_kiri_group_spanner shouldn't be necessary?
@@ -34,7 +34,7 @@ Axis_group_interface::axis_b (Grob*me,Axis a )
     
    */
   return me->has_extent_callback_b (group_extent_callback_proc, a) ||
   (me->has_extent_callback_b (Hara_kiri_group_spanner::y_extent_proc, a));
+ (me->has_extent_callback_b (Hara_kiri_group_spanner::y_extent_proc, a));
 }
 
 Interval
@@ -51,14 +51,14 @@ Axis_group_interface::relative_group_extent (Axis a, Grob *common, SCM elts)
   return r;
 }
 
-MAKE_SCHEME_CALLBACK(Axis_group_interface,group_extent_callback,2);
+MAKE_SCHEME_CALLBACK (Axis_group_interface,group_extent_callback,2);
 SCM
 Axis_group_interface::group_extent_callback (SCM element_smob, SCM scm_axis)
 {
   Grob *me = unsmob_grob (element_smob);
   Axis a = (Axis) gh_scm2int (scm_axis);
 
-  Grob * common =(Grob*) me;
+  Grob * common = (Grob*) me;
 
   for (SCM s = me->get_grob_property ("elements"); gh_pair_p (s); s = gh_cdr (s))
     {
index 540c32139609d26dd2d87d09b292f16eb86ae5f6..23e22f0e168de1fbcc5592a3ebf8f42728eda4c5 100644 (file)
 class Bar_engraver : public Engraver
 {
 public:
-  Bar_engraver();
-  VIRTUAL_COPY_CONS(Translator);
+  Bar_engraver ();
+  VIRTUAL_COPY_CONS (Translator);
   void request_bar (String type_str);
     
 protected:
   virtual void finalize ();
-  virtual void stop_translation_timestep();
+  virtual void stop_translation_timestep ();
   virtual void create_grobs ();
 
 private:
@@ -38,7 +38,7 @@ private:
   Item * bar_p_;
 };
 
-Bar_engraver::Bar_engraver()
+Bar_engraver::Bar_engraver ()
 {
   bar_p_ =0;
 }
@@ -91,7 +91,7 @@ Bar_engraver::typeset_bar ()
   lines may only be broken if there is a barline in all staffs 
 */
 void 
-Bar_engraver::stop_translation_timestep()
+Bar_engraver::stop_translation_timestep ()
 {
   if (!bar_p_)
     {
@@ -111,4 +111,4 @@ Bar_engraver::stop_translation_timestep()
     typeset_bar ();
 }
 
-ADD_THIS_TRANSLATOR(Bar_engraver);
+ADD_THIS_TRANSLATOR (Bar_engraver);
index eb91eeef961f68cb4938779d7a0cacaad4f0429b..92d45eabf976d19f2cd193668456606dcbe54472 100644 (file)
@@ -28,11 +28,11 @@ protected:
   virtual void acknowledge_grob (Grob_info);
   virtual void initialize ();
   virtual void create_grobs ();
-  void create_items();
+  void create_items ();
 
 public:
-  VIRTUAL_COPY_CONS(Translator);
-  Bar_number_engraver();
+  VIRTUAL_COPY_CONS (Translator);
+  Bar_number_engraver ();
 };
 
 
@@ -43,10 +43,10 @@ public:
 void
 Bar_number_engraver::create_grobs ()
 {
-  // todo include (&&!time->cadenza_b_ )
-  SCM bn = get_property("currentBarNumber");
+  // todo include (&&!time->cadenza_b_)
+  SCM bn = get_property ("currentBarNumber");
   SCM smp = get_property ("measurePosition");
-  Moment mp =  (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
+  Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
   
   if (gh_number_p (bn) &&
       !mp && now_mom () > Moment (0))
@@ -55,11 +55,11 @@ Bar_number_engraver::create_grobs ()
 
       // guh.
       text_p_->set_grob_property ("text",
-                                ly_str02scm (to_str (gh_scm2int (bn)).ch_C()));
+                                ly_str02scm (to_str (gh_scm2int (bn)).ch_C ()));
     }
 }
 
-ADD_THIS_TRANSLATOR(Bar_number_engraver);
+ADD_THIS_TRANSLATOR (Bar_number_engraver);
 
 Bar_number_engraver::Bar_number_engraver ()
 {
@@ -119,7 +119,7 @@ Bar_number_engraver::create_items ()
 
   SCM b = get_property ("BarNumber");
   text_p_ = new Item (b);
-  Side_position_interface::set_axis(text_p_,Y_AXIS);
+  Side_position_interface::set_axis (text_p_,Y_AXIS);
 
   announce_grob (text_p_, 0);
 }
index 6d0c9a968b26e09754bff4e74264218f73c1eedb..33b7e5af4daa6ae61a0fc152ec34743dfb6c8161 100644 (file)
@@ -21,7 +21,7 @@
 #include "item.hh"
 #include "staff-symbol-referencer.hh"
 
-MAKE_SCHEME_CALLBACK(Bar,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Bar,brew_molecule,1);
 
 SCM 
 Bar::brew_molecule (SCM smob) 
@@ -61,13 +61,16 @@ Bar::compound_barline (Grob*me, String str, Real h)
   
   Molecule thin = simple_barline (me, hair, h);
   Molecule thick = simple_barline (me, fatline, h);
-  Molecule colon = Font_interface::get_default_font (me)->find_by_name ("dots-repeatcolon");  
+  Molecule colon = Font_interface::get_default_font (me)->find_by_name (
+    Staff_symbol_referencer::line_count (me) & 1 == 1 ?
+    "dots-repeatcolon" : "dots-evenrepeatcolon"
+  );
 
   Molecule m;
   
   if (str == "")
     {
-      return Lookup::blank (Box (Interval(0, 0), Interval (-h/2, h/2)));
+      return Lookup::blank (Box (Interval (0, 0), Interval (-h/2, h/2)));
     }
   else if (str == "|")
     {
@@ -120,13 +123,13 @@ Bar::compound_barline (Grob*me, String str, Real h)
 Molecule
 Bar::simple_barline (Grob*,Real w, Real h) 
 {
-  return Lookup::filledbox (Box (Interval(0,w), Interval(-h/2, h/2)));
+  return Lookup::filledbox (Box (Interval (0,w), Interval (-h/2, h/2)));
 }
 
-MAKE_SCHEME_CALLBACK(Bar,before_line_breaking ,1);
+MAKE_SCHEME_CALLBACK (Bar,before_line_breaking ,1);
 
 SCM
-Bar::before_line_breaking  (SCM smob)
+Bar::before_line_breaking (SCM smob)
 {
   Grob*me=unsmob_grob (smob);
   Item * item = dynamic_cast<Item*> (me);
@@ -148,7 +151,7 @@ Bar::before_line_breaking  (SCM smob)
       // leave y_extent for spanbar? 
     }
 
-  if (! gh_equal_p  (g, orig))
+  if (! gh_equal_p (g, orig))
     me->set_grob_property ("glyph", g);
 
   
@@ -188,7 +191,7 @@ Bar::has_interface (Grob*m)
 }
 
 
-MAKE_SCHEME_CALLBACK(Bar,get_staff_bar_size,1);
+MAKE_SCHEME_CALLBACK (Bar,get_staff_bar_size,1);
 SCM
 Bar::get_staff_bar_size (SCM smob) 
 {
@@ -196,7 +199,7 @@ Bar::get_staff_bar_size (SCM smob)
   Real ss = Staff_symbol_referencer::staff_space (me);
   SCM size = me->get_grob_property ("bar-size");
   if (gh_number_p (size))
-    return gh_double2scm (gh_scm2double(size)*ss);
+    return gh_double2scm (gh_scm2double (size)*ss);
   else if (Staff_symbol_referencer::staff_symbol_l (me))
     {
       /*
index 824cf0344e36a8384926c9e1de4f3c0b4abbe59c..b5ebc0156f728605754722b184c3418bb11ecb94 100644 (file)
@@ -69,7 +69,7 @@ Beam_engraver::Beam_engraver ()
 bool
 Beam_engraver::try_music (Music *m)
 {
-  if (Span_req * c = dynamic_cast<Span_req*>(m))
+  if (Span_req * c = dynamic_cast<Span_req*> (m))
     {
       if (scm_equal_p (c->get_mus_property ("span-type"),
                       ly_str02scm ("abort")) == SCM_BOOL_T)
@@ -88,15 +88,15 @@ Beam_engraver::try_music (Music *m)
 
          if (d == STOP && !beam_p_)
            {
-             m->origin ()->warning  (_ ("can't find start of beam"));
+             m->origin ()->warning (_ ("can't find start of beam"));
              return false;
            }
 
-         if(d == STOP)
+         if (d == STOP)
            {
              SCM m = get_property ("automaticMelismata");
-             SCM b = get_property("noAutoBeaming");
-             if (to_boolean (m) && to_boolean(b))
+             SCM b = get_property ("noAutoBeaming");
+             if (to_boolean (m) && to_boolean (b))
                {
                  set_melisma (false);
                }
@@ -121,7 +121,7 @@ Beam_engraver::process_music ()
   if (reqs_drul_[STOP])
     {
       if (!beam_p_)
-       reqs_drul_[STOP]->origin ()->warning (_("can't find start of beam"));
+       reqs_drul_[STOP]->origin ()->warning (_ ("can't find start of beam"));
       prev_start_req_ =0;
       finished_beam_p_ = beam_p_;
       finished_beam_info_p_ = beam_info_p_;
@@ -162,10 +162,10 @@ Beam_engraver::create_grobs ()
       prev_start_req_ = reqs_drul_[START];
       beam_p_ = new Spanner (get_property ("Beam"));
       SCM smp = get_property ("measurePosition");
-      Moment mp =  (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
+      Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
 
       beam_start_location_ = mp;
-      beam_start_mom_ = now_mom();
+      beam_start_mom_ = now_mom ();
       beam_info_p_ = new Beaming_info_list;
       
       
@@ -198,10 +198,10 @@ void
 Beam_engraver::start_translation_timestep ()
 {
   reqs_drul_ [START] =0;
-  if(beam_p_) {
+  if (beam_p_) {
     SCM m = get_property ("automaticMelismata");
-    SCM b = get_property("noAutoBeaming");
-    if (to_boolean (m) && to_boolean(b)) {
+    SCM b = get_property ("noAutoBeaming");
+    if (to_boolean (m) && to_boolean (b)) {
       set_melisma (true);
     }
   }
@@ -282,7 +282,7 @@ Beam_engraver::acknowledge_grob (Grob_info info)
                                    gh_int2scm (durlog));
          Moment stem_location = now_mom () - beam_start_mom_ + beam_start_location_;
          beam_info_p_->add_stem (stem_location,
                                (durlog- 2) >? 1);
+ (durlog- 2) >? 1);
          Beam::add_stem (beam_p_, stem_l);
        }
     }
@@ -290,5 +290,5 @@ Beam_engraver::acknowledge_grob (Grob_info info)
 
 
 
-ADD_THIS_TRANSLATOR(Beam_engraver);
+ADD_THIS_TRANSLATOR (Beam_engraver);
 
index a28b7b56de1d5bf7dbc68bb178fc813c9c1268b9..2e0615baf4610425567523f377406af946f0f50c 100644 (file)
@@ -36,7 +36,7 @@
 void
 Beam::add_stem (Grob*me, Grob*s)
 {
-  Pointer_group_interface:: add_element(me, "stems", s);
+  Pointer_group_interface:: add_element (me, "stems", s);
   
   s->add_dependency (me);
 
@@ -68,7 +68,7 @@ Beam::get_multiplicity (Grob*me)
   [Alternatively, stems could set its own directions, according to
    their beam, during 'final-pre-processing'.]
  */
-MAKE_SCHEME_CALLBACK(Beam,before_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Beam,before_line_breaking,1);
 SCM
 Beam::before_line_breaking (SCM smob)
 {
@@ -120,7 +120,7 @@ Beam::get_default_dir (Grob*me)
          count[d] ++;
        }
 
-    } while (flip(&d) != DOWN);
+    } while (flip (&d) != DOWN);
   
   SCM func = me->get_grob_property ("dir-function");
   SCM s = gh_call2 (func,
@@ -148,7 +148,7 @@ void
 Beam::set_stem_directions (Grob*me)
 {
   Link_array<Item> stems
-    =Pointer_group_interface__extract_elements (me,  (Item*) 0, "stems");
+    =Pointer_group_interface__extract_elements (me, (Item*) 0, "stems");
   Direction d = Directional_element_interface::get (me);
   
   for (int i=0; i <stems.size (); i++)
@@ -279,7 +279,7 @@ Beam::set_stem_shorten (Grob*m)
   grob-properties y, dy.
 
   User may set grob-properties: y-position-hs and height-hs
 (to be fixed) that override the calculated y and dy.
+ (to be fixed) that override the calculated y and dy.
 
   Because y and dy cannot be calculated and quanted separately, we
   always calculate both, then check for user override.
@@ -294,7 +294,7 @@ Beam::after_line_breaking (SCM smob)
   me->set_grob_property ("dy", gh_double2scm (0));
 
   /* Hmm, callbacks should be called by, a eh, callback mechanism
-    somewhere(?), I guess, not by looping here. */
+    somewhere (?), I guess, not by looping here. */
   
   SCM list = me->get_grob_property ("y-dy-callbacks");
   for (SCM i = list; gh_pair_p (i); i = gh_cdr (i))
@@ -387,7 +387,7 @@ Beam::cancel_suspect_slope (SCM smob)
   Real dx = last_visible_stem (me)->relative_coordinate (0, X_AXIS) - first_visible_stem (me)->relative_coordinate (0, X_AXIS);
   Real dydx = dy && dx ? dy/dx : 0;
 
-  if (((y - first_ideal > lengthened) && (dydx > steep))
+  if (( (y - first_ideal > lengthened) && (dydx > steep))
       || ((y + dy - last_ideal > lengthened) && (dydx < -steep)))
     {
       Real adjusted_y = y + dy / 2;
@@ -614,7 +614,7 @@ Beam::check_stem_length_f (Grob*me,Real y, Real dy)
   Link_array<Item> stems=
     Pointer_group_interface__extract_elements (me, (Item*)0, "stems");
 
-  for (int i=0; i < stems.size(); i++)
+  for (int i=0; i < stems.size (); i++)
     {
       Item* s = stems[i];
       if (Stem::invisible_b (s))
@@ -713,7 +713,7 @@ Beam::quantise_y_f (Grob*me,Real y, Real dy, int quant_dir)
   Real q = up_y - iv[SMALLER] <= iv[BIGGER] - up_y 
     ? iv[SMALLER] : iv[BIGGER];
   if (quant_dir)
-    q = iv[(Direction)quant_dir];
+    q = iv[ (Direction)quant_dir];
 
   return q * Directional_element_interface::get (me);
 }
@@ -725,7 +725,7 @@ Beam::set_beaming (Grob*me,Beaming_info_list *beaming)
     Pointer_group_interface__extract_elements (me, (Grob*)0, "stems");
   
   Direction d = LEFT;
-  for (int i=0; i  < stems.size(); i++)
+  for (int i=0; i  < stems.size (); i++)
     {
       do
        {
@@ -754,8 +754,8 @@ Molecule
 Beam::stem_beams (Grob*me,Item *here, Item *next, Item *prev) 
 {
   // ugh -> use commonx
-  if ((next && !(next->relative_coordinate (0, X_AXIS) > here->relative_coordinate (0, X_AXIS))) ||
     (prev && !(prev->relative_coordinate (0, X_AXIS) < here->relative_coordinate (0, X_AXIS))))
+  if ((next && ! (next->relative_coordinate (0, X_AXIS) > here->relative_coordinate (0, X_AXIS))) ||
(prev && ! (prev->relative_coordinate (0, X_AXIS) < here->relative_coordinate (0, X_AXIS))))
       programming_error ("Beams are not left-to-right");
 
   Real staffline_f = me->paper_l ()->get_var ("stafflinethickness");
@@ -824,14 +824,14 @@ Beam::stem_beams (Grob*me,Item *here, Item *next, Item *prev)
 
       Real w = next->relative_coordinate (0, X_AXIS) - here->relative_coordinate (0, X_AXIS);
       Molecule a = Lookup::beam (dydx, w + stemdx, thick);
-      a.translate_axis- stemdx/2, X_AXIS);
+      a.translate_axis (- stemdx/2, X_AXIS);
       int j = 0;
       Real gap_f = 0;
 
       SCM gap = me->get_grob_property ("gap");
       if (gh_number_p (gap))
        {
-         int gap_i = gh_scm2int ( (gap));
+         int gap_i = gh_scm2int ((gap));
          int nogap = rwholebeams - gap_i;
          
          for (; j  < nogap; j++)
@@ -874,7 +874,7 @@ Beam::stem_beams (Grob*me,Item *here, Item *next, Item *prev)
   return leftbeams;
 }
 
-MAKE_SCHEME_CALLBACK(Beam,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Beam,brew_molecule,1);
 SCM
 Beam::brew_molecule (SCM smob)
 {
@@ -895,7 +895,7 @@ Beam::brew_molecule (SCM smob)
   else
     {
       x0 = stems[0]->relative_coordinate (0, X_AXIS);
-      dx = stems.top()->relative_coordinate (0, X_AXIS) - x0;
+      dx = stems.top ()->relative_coordinate (0, X_AXIS) - x0;
     }
   
   
@@ -904,11 +904,11 @@ Beam::brew_molecule (SCM smob)
   Real y = gh_scm2double (me->get_grob_property ("y"));
 
 
-  for (int j=0; j <stems.size  (); j++)
+  for (int j=0; j <stems.size (); j++)
     {
       Item *i = stems[j];
       Item * prev = (j > 0)? stems[j-1] : 0;
-      Item * next = (j < stems.size()-1) ? stems[j+1] :0;
+      Item * next = (j < stems.size ()-1) ? stems[j+1] :0;
 
       Molecule sb = stem_beams (me, i, next, prev);
       Real x = i->relative_coordinate (0, X_AXIS)-x0;
@@ -925,7 +925,7 @@ int
 Beam::forced_stem_count (Grob*me) 
 {
   Link_array<Item>stems = 
-    Pointer_group_interface__extract_elements ( me, (Item*) 0, "stems");
+    Pointer_group_interface__extract_elements (me, (Item*) 0, "stems");
   int f = 0;
   for (int i=0; i < stems.size (); i++)
     {
@@ -934,8 +934,8 @@ Beam::forced_stem_count (Grob*me)
       if (Stem::invisible_b (s))
        continue;
 
-      if (((int)Stem::chord_start_f (s)) 
-        && (Stem::get_direction (s ) != Stem::get_default_dir (s )))
+      if (( (int)Stem::chord_start_f (s)) 
+        && (Stem::get_direction (s) != Stem::get_default_dir (s)))
         f++;
     }
   return f;
@@ -962,10 +962,10 @@ Beam::visible_stem_count (Grob*me)
 }
 
 Item*
-Beam::first_visible_stem(Grob*me) 
+Beam::first_visible_stem (Grob*me) 
 {
   Link_array<Item>stems = 
-    Pointer_group_interface__extract_elements ( me, (Item*) 0, "stems");
+    Pointer_group_interface__extract_elements (me, (Item*) 0, "stems");
   
   for (int i = 0; i < stems.size (); i++)
     {
@@ -976,10 +976,10 @@ Beam::first_visible_stem(Grob*me)
 }
 
 Item*
-Beam::last_visible_stem(Grob*me) 
+Beam::last_visible_stem (Grob*me) 
 {
   Link_array<Item>stems = 
-    Pointer_group_interface__extract_elements ( me, (Item*) 0, "stems");
+    Pointer_group_interface__extract_elements (me, (Item*) 0, "stems");
   for (int i = stems.size (); i--;)
     {
       if (!Stem::invisible_b (stems[i]))
@@ -998,7 +998,7 @@ Beam::last_visible_stem(Grob*me)
     
     rest -> stem -> beam -> interpolate_y_position ()
 */
-MAKE_SCHEME_CALLBACK(Beam,rest_collision_callback,2);
+MAKE_SCHEME_CALLBACK (Beam,rest_collision_callback,2);
 SCM
 Beam::rest_collision_callback (SCM element_smob, SCM axis)
 {
@@ -1030,8 +1030,8 @@ Beam::rest_collision_callback (SCM element_smob, SCM axis)
     beam_y = gh_scm2double (s);
   
   // ugh -> use commonx
-  Real x0 = first_visible_stem(beam)->relative_coordinate (0, X_AXIS);
-  Real dx = last_visible_stem(beam)->relative_coordinate (0, X_AXIS) - x0;
+  Real x0 = first_visible_stem (beam)->relative_coordinate (0, X_AXIS);
+  Real dx = last_visible_stem (beam)->relative_coordinate (0, X_AXIS) - x0;
   Real dydx = beam_dy && dx ? beam_dy/dx : 0;
 
   Direction d = Stem::get_direction (stem);
@@ -1056,7 +1056,7 @@ Beam::rest_collision_callback (SCM element_smob, SCM axis)
   if (discrete_dist < stafflines+1)
     discrete_dist = int (ceil (discrete_dist / 2.0)* 2.0);
 
-  return gh_double2scm  (-d *  discrete_dist);
+  return gh_double2scm (-d *  discrete_dist);
 }
 
 
index 653e1b3382eafa57403bc3c30833a9e58ee33f60..fb828388de6381b3c6ea9173a4382147cacdbf61 100644 (file)
@@ -9,14 +9,14 @@
 
 #include "beaming.hh"
 
-Beaming_info::Beaming_info)
+Beaming_info::Beaming_info ()
 {
   start_mom_ = 0;
   beams_i_drul_[LEFT] = 0;
   beams_i_drul_[RIGHT] = 0;  
 }
 
-Beaming_info::Beaming_info(Moment m, int i)
+Beaming_info::Beaming_info (Moment m, int i)
 {
   start_mom_ = m;
   beams_i_drul_[LEFT] = i;
@@ -31,12 +31,12 @@ Beaming_info_list::min_denominator_index () const
   int minden = infinity_i;
   int minidx = -1;
 
-  for (int i=1; i < infos_.size ( ); i++)
+  for (int i=1; i < infos_.size (); i++)
     {
       if (infos_[i].start_mom_.den_i () < minden)
        {
          minidx = i;
-         minden = infos_[i].start_mom_.den_i  ();
+         minden = infos_[i].start_mom_.den_i ();
        }
     }
 
@@ -93,5 +93,5 @@ Beaming_info_list::beamify ()
 void
 Beaming_info_list::add_stem (Moment m, int b)
 {
-  infos_.push  (Beaming_info (m, b));
+  infos_.push (Beaming_info (m, b));
 }
index 13fbba0c344b785af7ec375448b8cfd7139c0d77..b98b613c1edaaba7a79463001960884c50e90118 100644 (file)
@@ -16,7 +16,7 @@
 static Real
 F0_1 (Real x)
 {
-  return 2 / M_PI * atan ( M_PI * x / 2);
+  return 2 / M_PI * atan (M_PI * x / 2);
 }
 
 Real
@@ -29,19 +29,19 @@ slur_height (Real width, Real h_inf, Real r_0)
   For small w, the height should be proportional to w, for w ->
   infinity, the height should rise to a limit asymptotically.
 
-  Hence we take F(x) such that
-  F(0) = 0 , F'(0) = 1, and F(infty) = 1
+  Hence we take F (x) such that
+  F (0) = 0 , F' (0) = 1, and F (infty) = 1
 
   and use
 
-  h = h_infinity * F(x * r_0 / h_infinity)
+  h = h_infinity * F (x * r_0 / h_infinity)
 
   
   Examples:
 
-  * F(x) = 2/pi * atan (pi x/2)
+  * F (x) = 2/pi * atan (pi x/2)
 
-  * F(x) 1/alpha * x^alpha / (1 + x^alpha)
+  * F (x) 1/alpha * x^alpha / (1 + x^alpha)
 
   * (etc.)
 
@@ -49,7 +49,7 @@ slur_height (Real width, Real h_inf, Real r_0)
   `small' slurs to `big' slurs occurs.]
 
   Although this might seem cand_idates to SCM-ify, it is not all clear
-  which parameters (ie. h_inf, r_0, F(.)) should be candidates for
+  which parameters (ie. h_inf, r_0, F (.)) should be candidates for
   this.  At present h_inf and r_0 come from paper settings, but we did
   no experiments for determining the best combinations of F, h_inf and
   r_0.
index 945a1ccda317145d1f11996d378f43b3311534be..fbbbc6c867020c2a3a1817013f311a2ad40fe86a 100644 (file)
@@ -34,8 +34,8 @@ scale (Array<Offset>* arr_p, Real x , Real y)
 {
   for (int i = 0; i < arr_p->size (); i++)
     {
     (*arr_p)[i][X_AXIS] = x* (*arr_p)[i][X_AXIS];
     (*arr_p)[i][Y_AXIS] = y* (*arr_p)[i][Y_AXIS];
+ (*arr_p)[i][X_AXIS] = x* (*arr_p)[i][X_AXIS];
+ (*arr_p)[i][Y_AXIS] = y* (*arr_p)[i][Y_AXIS];
     }
 }
 
@@ -44,21 +44,21 @@ rotate (Array<Offset>* arr_p, 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]);
+ (*arr_p)[i] = complex_multiply (rot, (*arr_p)[i]);
 }
 
 void
 translate (Array<Offset>* arr_p, Offset o)
 {
   for (int i = 0; i < arr_p->size (); i++)
   (*arr_p)[i] += o;
+ (*arr_p)[i] += o;
 }
 
 /*
 
   Formula of the bezier 3-spline
 
-  sum_{j=0}^3  (3 over j) z_j (1-t)^(3-j)  t^j
+  sum_{j=0}^3 (3 over j) z_j (1-t)^ (3-j)  t^j
  */
 
 Real
@@ -84,7 +84,7 @@ Offset
 Bezier::curve_point (Real t)const
 {
   Real tj = 1;
-  Real one_min_tj =  (1-t)*(1-t)*(1-t);
+  Real one_min_tj = (1-t)* (1-t)* (1-t);
 
   Offset o;
   for (int j=0 ; j < 4; j++)
@@ -115,7 +115,7 @@ Bezier::polynomial (Axis a)const
       p += control_[j][a]
        * Polynomial::power (j , Polynomial (0,1))*
        Polynomial::power (3 - j, Polynomial (1,-1))*
-       binomial_coefficient(3, j);
+       binomial_coefficient (3, j);
     }
 
   return p;
@@ -156,7 +156,7 @@ Bezier::solve_derivative (Offset deriv)const
 Array<Real> 
 Bezier::solve_point (Axis ax, Real coordinate) const
 {
-  Polynomial p(polynomial (ax));
+  Polynomial p (polynomial (ax));
   p.coefs_[0] -= coordinate;
   
   Array<Real> sol (p.solve ());
index f82325d20bc8b7650db5ca14f69426dbc2dc8ef1..eb31e8311071473ad772d23f7063e8bbace2b25d 100644 (file)
 void
 Box::translate (Offset o)
 {
-  for (Axis i=X_AXIS; i < NO_AXES; incr(i))
+  for (Axis i=X_AXIS; i < NO_AXES; incr (i))
     interval_a_[i] += o[i];
 }
 
 void
 Box::unite (Box b)
 {
-  for (Axis i=X_AXIS; i < NO_AXES; incr(i))
+  for (Axis i=X_AXIS; i < NO_AXES; incr (i))
     interval_a_[i].unite (b[i]);
 }
 
 /**
   Initialize to empty.
  */
-Box::Box()
+Box::Box ()
 {        
 }
 
@@ -39,8 +39,8 @@ Box::set_empty ()
 
 Box::Box (Interval ix, Interval iy)
 {
-  x() = ix;
-  y() = iy;
+  x () = ix;
+  y () = iy;
 }
 
 Interval &
index 320857f7b8e1bf4992cbc80c10c93a2dc4be8922..e845133d6364aca3c23f25f488658186df86ea98 100644 (file)
@@ -72,7 +72,7 @@ Break_algorithm::generate_spacing_problem (Link_array<Grob> curline, Interval li
   /*
     sort out how interfacing this should work;
    */
-  if (line.empty_b())
+  if (line.empty_b ())
     {
      sp->line_len_f_ = -1;
     }
@@ -95,7 +95,7 @@ void
 Break_algorithm::set_pscore (Paper_score*s)
 {
   pscore_l_ = s;
-  linewidth_f_ = s->paper_l_->get_var("linewidth");
+  linewidth_f_ = s->paper_l_->get_var ("linewidth");
 }
 
 Array<Column_x_positions>
index f17922a0179335610024ca71ad2dd4fc8d29b1a2..a403c4a60ecd03fa8c5a1e7140795c8e87b77f23 100644 (file)
@@ -20,18 +20,18 @@ class Break_align_engraver : public Engraver
   Protected_scm column_alist_;
 protected:
   virtual void finalize ();
-  virtual void acknowledge_grob(Grob_info i);
+  virtual void acknowledge_grob (Grob_info i);
   virtual void stop_translation_timestep ();
   void add_column (SCM);
   
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Break_align_engraver ();
 };
 
 
 
-ADD_THIS_TRANSLATOR(Break_align_engraver);
+ADD_THIS_TRANSLATOR (Break_align_engraver);
 
 void
 Break_align_engraver::add_column (SCM smob)
@@ -53,7 +53,7 @@ Break_align_engraver::stop_translation_timestep ()
   SCM order = get_property ("breakAlignOrder");
   for (; gh_pair_p (order); order = gh_cdr (order))
     {
-      SCM p = scm_assoc ( gh_car (order), column_alist_);
+      SCM p = scm_assoc (gh_car (order), column_alist_);
       if (gh_pair_p (p))
        {
          add_column (gh_cdr (p));
@@ -136,7 +136,7 @@ Break_align_engraver::acknowledge_grob (Grob_info inf)
 
       if (s != SCM_BOOL_F)
        {
-         Grob *e =  unsmob_grob (gh_cdr(s));
+         Grob *e =  unsmob_grob (gh_cdr (s));
          group = dynamic_cast<Item*> (e);
        }
       else
index 779be73cf3340f725b15b2e053a2f554fe58c307..06ff6bac74bd2a7a532fcaa4b4c7a9e79de4dfc8 100644 (file)
@@ -21,7 +21,7 @@
 #include "group-interface.hh"
 #include "align-interface.hh"
 
-MAKE_SCHEME_CALLBACK(Break_align_interface,before_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Break_align_interface,before_line_breaking,1);
 
 SCM
 Break_align_interface::before_line_breaking (SCM smob)
@@ -30,7 +30,7 @@ Break_align_interface::before_line_breaking (SCM smob)
   do_alignment (me);
   return SCM_UNSPECIFIED;
 }
-MAKE_SCHEME_CALLBACK(Break_align_interface,alignment_callback,2);
+MAKE_SCHEME_CALLBACK (Break_align_interface,alignment_callback,2);
 
 SCM
 Break_align_interface::alignment_callback (SCM element_smob, SCM axis)
@@ -49,7 +49,7 @@ Break_align_interface::alignment_callback (SCM element_smob, SCM axis)
   return gh_double2scm (0);
 }
 
-MAKE_SCHEME_CALLBACK(Break_align_interface,self_align_callback,2);
+MAKE_SCHEME_CALLBACK (Break_align_interface,self_align_callback,2);
 SCM
 Break_align_interface::self_align_callback (SCM element_smob, SCM axis)
 {
@@ -58,7 +58,7 @@ Break_align_interface::self_align_callback (SCM element_smob, SCM axis)
   assert (a == X_AXIS);
   
   Item* item = dynamic_cast<Item*> (me);
-  Direction bsd = item->break_status_dir();
+  Direction bsd = item->break_status_dir ();
   if (bsd == LEFT)
     {
       me->set_grob_property ("self-alignment-X", gh_int2scm (RIGHT));
@@ -89,10 +89,10 @@ Break_align_interface::do_alignment (Grob *me)
     = Pointer_group_interface__extract_elements (me, (Grob*)0,
                                                 "elements");
   
-  for (int i=0; i < all_elems.size(); i++) 
+  for (int i=0; i < all_elems.size (); i++) 
     {
-      Interval y = all_elems[i]->extent(all_elems[i], X_AXIS);
-      if (!y.empty_b())
+      Interval y = all_elems[i]->extent (all_elems[i], X_AXIS);
+      if (!y.empty_b ())
        elems.push (dynamic_cast<Grob*> (all_elems[i]));
     }
   
@@ -139,10 +139,10 @@ Break_align_interface::do_alignment (Grob *me)
          extra_space = scm_listify (ly_symbol2scm ("minimum-space"), gh_double2scm (0.0), SCM_UNDEFINED);
        }
 
-      SCM symbol = gh_car  (extra_space);
-      Real spc = gh_scm2double (gh_cadr(extra_space));
+      SCM symbol = gh_car (extra_space);
+      Real spc = gh_scm2double (gh_cadr (extra_space));
 
-      dists.push(spc);
+      dists.push (spc);
       symbol_list = gh_cons (symbol, symbol_list);
       current_origin = next_origin;
     }
@@ -150,9 +150,9 @@ Break_align_interface::do_alignment (Grob *me)
 
   // skip the first sym.
   symbol_list  = gh_cdr (scm_reverse (symbol_list));
-  for (int i=0; i <elems.size()-1; i++)
+  for (int i=0; i <elems.size ()-1; i++)
     {
-      elems[i]->set_grob_property (gh_car  (symbol_list),
+      elems[i]->set_grob_property (gh_car (symbol_list),
                                  scm_cons (gh_double2scm (0),
                                            gh_double2scm (dists[i+1])));
 
@@ -170,7 +170,7 @@ Break_align_interface::do_alignment (Grob *me)
   scm_set_car_x (first_pair, gh_double2scm (-dists[0]));
   elems[0]->set_grob_property ("minimum-space", first_pair);
 
-  Direction bsd = item->break_status_dir();
+  Direction bsd = item->break_status_dir ();
   if (bsd == LEFT)
     {
       me->set_grob_property ("self-alignment-X", gh_int2scm (RIGHT));
@@ -198,12 +198,12 @@ Break_align_interface::do_alignment (Grob *me)
   
   Real stretch_distance =0.;
   
-  if (gh_car  (symbol_list) == ly_symbol2scm ("extra-space"))
+  if (gh_car (symbol_list) == ly_symbol2scm ("extra-space"))
     {
       spring_len += dists.top ();
       stretch_distance = dists.top ();
     }
-  else if (gh_car  (symbol_list) == ly_symbol2scm ("minimum-space"))
+  else if (gh_car (symbol_list) == ly_symbol2scm ("minimum-space"))
     {
       spring_len = spring_len >? dists.top ();
       stretch_distance = spring_len;
@@ -221,7 +221,7 @@ Break_align_interface::do_alignment (Grob *me)
     This is a side effect, and there is no guarantee that this info is
     computed at a "sane" moment.
 
   (just spent some time tracking a bug that was caused by this info
+ (just spent some time tracking a bug that was caused by this info
     being written halfway:
 
     self_alignment_callback (*)
index 5e1c08fa2f6b29dac566f005b5e309dd309c2825..4207c86683825d74090f40ec37d6fe7db1962cf3 100644 (file)
@@ -8,7 +8,7 @@
 TODO:
 
   . Cancel any beams running through the breathing sign
   ([e8 \breathe f e f] should become [e8] \breathe [f e f])
+ ([e8 \breathe f e f] should become [e8] \breathe [f e f])
   . Spacing is not yet completely pretty
 
 */
@@ -24,21 +24,21 @@ TODO:
 
 class Breathing_sign_engraver : public Engraver {
 public:
-  Breathing_sign_engraver();
-  VIRTUAL_COPY_CONS(Translator);
+  Breathing_sign_engraver ();
+  VIRTUAL_COPY_CONS (Translator);
   
 protected:
   virtual bool try_music (Music *req_l);
   virtual void create_grobs ();
-  virtual void stop_translation_timestep();
-  virtual void start_translation_timestep();
+  virtual void stop_translation_timestep ();
+  virtual void start_translation_timestep ();
 
 private:
   Breathing_sign_req * breathing_sign_req_l_;
   Grob * breathing_sign_p_;
 };
 
-Breathing_sign_engraver::Breathing_sign_engraver()
+Breathing_sign_engraver::Breathing_sign_engraver ()
 {
   breathing_sign_p_ = 0;
   breathing_sign_req_l_ = 0;
@@ -59,7 +59,7 @@ Breathing_sign_engraver::try_music (Music*r_l)
 void
 Breathing_sign_engraver::create_grobs ()
 {
-  if(breathing_sign_req_l_ && ! breathing_sign_p_)
+  if (breathing_sign_req_l_ && ! breathing_sign_p_)
     {
       SCM b = get_property ("BreathingSign");
       breathing_sign_p_ = new Item (b);
@@ -72,19 +72,19 @@ Breathing_sign_engraver::create_grobs ()
 }
 
 void 
-Breathing_sign_engraver::stop_translation_timestep()
+Breathing_sign_engraver::stop_translation_timestep ()
 {
-  if(breathing_sign_p_)
+  if (breathing_sign_p_)
     {
-      typeset_grob(breathing_sign_p_);
+      typeset_grob (breathing_sign_p_);
       breathing_sign_p_ = 0;
     }
 }
 
 void
-Breathing_sign_engraver::start_translation_timestep()
+Breathing_sign_engraver::start_translation_timestep ()
 {
   breathing_sign_req_l_ = 0;
 }
 
-ADD_THIS_TRANSLATOR(Breathing_sign_engraver);
+ADD_THIS_TRANSLATOR (Breathing_sign_engraver);
index 06be981cf17b23889f3d52f4c4d381a2c2623ce9..32ef10e334c577a67fb73efb69c424b3a542e3f0 100644 (file)
@@ -20,7 +20,7 @@
 #include "dimensions.hh"
 #include "direction.hh"
 
-MAKE_SCHEME_CALLBACK(Breathing_sign,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Breathing_sign,brew_molecule,1);
 SCM 
 Breathing_sign::brew_molecule (SCM smob)
 {
@@ -28,15 +28,15 @@ Breathing_sign::brew_molecule (SCM smob)
   Real space = Staff_symbol_referencer::staff_space (me);
 
   // todo: cfg'able.
-  Interval i1(0, space / 6), i2(-space / 2, space / 2);
-  Box b(i1, i2);
+  Interval i1 (0, space / 6), i2 (-space / 2, space / 2);
+  Box b (i1, i2);
 
-  return Lookup::filledbox(b).smobbed_copy ();
+  return Lookup::filledbox (b).smobbed_copy ();
 }
 
-MAKE_SCHEME_CALLBACK(Breathing_sign,offset_callback,2);
+MAKE_SCHEME_CALLBACK (Breathing_sign,offset_callback,2);
 SCM
-Breathing_sign::offset_callback (SCM element_smob, SCM )
+Breathing_sign::offset_callback (SCM element_smob, SCM)
 {
   Grob *me = unsmob_grob (element_smob);
   
@@ -49,12 +49,12 @@ Breathing_sign::offset_callback (SCM element_smob, SCM )
 
   Real inter_f = Staff_symbol_referencer::staff_space (me)/2;
   int sz = Staff_symbol_referencer::line_count (me)-1;
-  return gh_double2scm ( inter_f * sz * d);
+  return gh_double2scm (inter_f * sz * d);
 }
 
 void
 Breathing_sign::set_interface (Grob *b)
 {
-  Staff_symbol_referencer::set_interface  (b);
+  Staff_symbol_referencer::set_interface (b);
 
 }
index f76a2d7203b678489bad7b65b0c070375e075f36..96e7affd0741d01717ed08479ca35315fe43f278 100644 (file)
@@ -47,7 +47,7 @@ Change_iterator::process (Moment m)
      
      If \translator Staff = bass, then look for Staff = *
    */
-  while  (current && current->type_str_ != to_type)
+  while (current && current->type_str_ != to_type)
     {
       last = current;
       current = current->daddy_trans_l_;
@@ -84,4 +84,4 @@ Change_iterator::process (Moment m)
 
 
 
-IMPLEMENT_CTOR_CALLBACK(Change_iterator);
+IMPLEMENT_CTOR_CALLBACK (Change_iterator);
index a73cb16875913bfc429ee49996e97e6f995837cb..78a2ad588587b96b586fdb3de6c981ba885f30b3 100644 (file)
@@ -41,8 +41,8 @@ class Chord_tremolo_engraver : public Engraver
 {
   void typeset_beam ();
 public:
-  VIRTUAL_COPY_CONS(Translator);
-  Chord_tremolo_engraver();
+  VIRTUAL_COPY_CONS (Translator);
+  Chord_tremolo_engraver ();
 protected:
   Repeated_music * repeat_;
 
@@ -60,15 +60,15 @@ protected:
   Spanner * finished_beam_p_;
   Item * stem_tremolo_;
 protected:
-  virtual void finalize();
+  virtual void finalize ();
   virtual bool try_music (Music*);
   virtual void acknowledge_grob (Grob_info);
-  virtual void stop_translation_timestep();
-  virtual void start_translation_timestep();
+  virtual void stop_translation_timestep ();
+  virtual void start_translation_timestep ();
   virtual void process_music ();
 };
 
-Chord_tremolo_engraver::Chord_tremolo_engraver()
+Chord_tremolo_engraver::Chord_tremolo_engraver ()
 {
   beam_p_  = finished_beam_p_ = 0;
   repeat_ =0;
@@ -112,13 +112,13 @@ Chord_tremolo_engraver::process_music ()
 
          SCM smp = get_property ("measurePosition");
          Moment mp
-           =  (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
+           = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
          beam_start_location_ = mp;
          announce_grob (beam_p_, repeat_);
        }
       else if (!sequential_body_b_ && !stem_tremolo_)
        {
-         int flags = intlog2(note_head_i_ * repeat_->repeat_count ()) -2;
+         int flags = intlog2 (note_head_i_ * repeat_->repeat_count ()) -2;
          if (flags)
            {
              stem_tremolo_ = new Item (get_property ("StemTremolo"));
@@ -179,10 +179,10 @@ Chord_tremolo_engraver::acknowledge_grob (Grob_info info)
                      --hwn.
           */
          SCM d = s->get_grob_property ("direction");
-         if (Stem::type_i (s ) != 1)
+         if (Stem::type_i (s) != 1)
            {
-             int gap_i =Stem::flag_i (s ) - ((Stem::type_i (s ) >? 2) - 2);
-             beam_p_->set_grob_property ("beam-gap", gh_int2scm(gap_i));
+             int gap_i =Stem::flag_i (s) - ((Stem::type_i (s) >? 2) - 2);
+             beam_p_->set_grob_property ("beam-gap", gh_int2scm (gap_i));
            }
          s->set_grob_property ("direction", d);
 
@@ -241,5 +241,5 @@ Chord_tremolo_engraver::stop_translation_timestep ()
   
 }
 
-ADD_THIS_TRANSLATOR(Chord_tremolo_engraver);
+ADD_THIS_TRANSLATOR (Chord_tremolo_engraver);
 
index 5487f9625129e2d0b74200d2a855aa3ad02a4ec6..9c2aaf4a77278b708ea27d14cd20650ab932fae8 100644 (file)
@@ -24,7 +24,7 @@ Chord_tremolo_iterator::construct_children ()
   child_iter_p_ = get_iterator_p (rep->body ());
 }
 
-Chord_tremolo_iterator::Chord_tremolo_iterator()
+Chord_tremolo_iterator::Chord_tremolo_iterator ()
 {
   factor_ = 1;
   child_iter_p_ = 0;
@@ -45,7 +45,7 @@ Chord_tremolo_iterator::process (Moment m)
       if (yeah)
        set_translator (yeah->report_to_l ());
       else
-       music_l_->origin ()->warning ( _("no one to print a tremolos"));
+       music_l_->origin ()->warning (("no one to print a tremolos"));
     }
 
   child_iter_p_->process (factor_ * m);
@@ -61,7 +61,7 @@ Chord_tremolo_iterator::pending_moment () const
 bool
 Chord_tremolo_iterator::ok () const
 {
-  return child_iter_p_ && child_iter_p_->ok();
+  return child_iter_p_ && child_iter_p_->ok ();
 }
 
 Chord_tremolo_iterator::~Chord_tremolo_iterator ()
@@ -77,5 +77,5 @@ Chord_tremolo_iterator::try_music_in_children (Music  *m) const
 
 
 
-IMPLEMENT_CTOR_CALLBACK(Chord_tremolo_iterator);
+IMPLEMENT_CTOR_CALLBACK (Chord_tremolo_iterator);
 
index 32215b656c157555d6fb6a4f05b96283c2fbe7ad..dd20c964eeb35c87b1bfc0d112d545bf0ccdf09a 100644 (file)
@@ -189,7 +189,7 @@ Chord::step_scm (SCM tonic, SCM p)
   int i = unsmob_pitch (p)->notename_i_
     - unsmob_pitch (tonic)->notename_i_
     + (unsmob_pitch (p)->octave_i_
-       - unsmob_pitch (tonic)->octave_i_ ) * 7;
+       - unsmob_pitch (tonic)->octave_i_) * 7;
   while (i < 0)
     i += 7;
   i++;
index f0fe112bac76b22f341282e43361d33960c1045b..6f527fc75e7aa0089f138687ad36e1dc23c40a36 100644 (file)
@@ -57,7 +57,7 @@ Clef_engraver::Clef_engraver ()
   octavate_p_ = 0;
 
   /*
-    will trigger a clef at the start since #f != '()
+    will trigger a clef at the start since #f != ' ()
    */
   prev_cpos_ = prev_glyph_ = SCM_BOOL_F;
 }
@@ -135,7 +135,7 @@ Clef_engraver::acknowledge_grob (Grob_info info)
          /*
            Key_item adapts its formatting to make sure that the
            accidentals stay in the upper half of the staff. It needs
-           to know c0-pos for this.  (?)
+           to know c0-pos for this. (?)
          */
 
          item->set_grob_property ("c0-position", get_property ("centralCPosition"));
@@ -158,7 +158,7 @@ Clef_engraver::create_clef ()
   Staff_symbol_referencer::set_position (clef_p_,
                                         gh_scm2int (get_property ("clefPosition")));
 
-  SCM oct =  get_property("clefOctavation");
+  SCM oct =  get_property ("clefOctavation");
   if (gh_number_p (oct) && gh_scm2int (oct))
     {
       Item * g = new Item (get_property ("OctavateEight"));
@@ -187,9 +187,9 @@ Clef_engraver::create_grobs ()
       || scm_equal_p (clefpos, prev_cpos_) == SCM_BOOL_F
       || scm_equal_p (octavation, prev_octavation_) == SCM_BOOL_F
       || to_boolean (force_clef)
-      )
+)
     {
-      set_glyph();
+      set_glyph ();
       set_central_c (glyph, clefpos, octavation);
        
       create_clef ();
index 22dcaf1fd8c3a016918b3cee7f2a5ed1682790e8..d7c323ee609b38d463ecbc5e6de38aa6394c2eee 100644 (file)
@@ -16,7 +16,7 @@
 /*
  FIXME: should use symbol for #'style.
 */
-MAKE_SCHEME_CALLBACK(Clef,before_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Clef,before_line_breaking,1);
 SCM
 Clef::before_line_breaking (SCM smob)
 {
@@ -29,11 +29,11 @@ Clef::before_line_breaking (SCM smob)
       String str = ly_scm2string (glyph);
 
       if (to_boolean (s->get_grob_property ("non-default"))
-         && s->break_status_dir() != RIGHT
+         && s->break_status_dir () != RIGHT
          && !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.ch_C ()));         
        }
     }
   else
@@ -58,7 +58,7 @@ Clef::set_interface (Grob* me)
   me->set_interface (ly_symbol2scm ("clef-interface"));
 }
 
-MAKE_SCHEME_CALLBACK(Clef,brew_molecule,1)
+MAKE_SCHEME_CALLBACK (Clef,brew_molecule,1)
 SCM
 Clef::brew_molecule (SCM smob) 
 {
index b0cc610f1265eb739b75de5061faa762e48ccce6..ca18e2ddde1b8fe1ce3b0cf1faf1bf46f52b80ea 100644 (file)
@@ -22,10 +22,10 @@ class Collision_engraver : public Engraver {
 protected:
   virtual void acknowledge_grob (Grob_info);
   virtual void create_grobs ();
-  virtual void stop_translation_timestep();
+  virtual void stop_translation_timestep ();
 public:
-  VIRTUAL_COPY_CONS(Translator);
-  Collision_engraver();
+  VIRTUAL_COPY_CONS (Translator);
+  Collision_engraver ();
 };
 
 
@@ -53,7 +53,7 @@ Collision_engraver::acknowledge_grob (Grob_info i)
   if (Note_column::has_interface (i.elem_l_))
     {
       /*should check Y axis? */
-      if (Note_column::rest_b (i.elem_l_) || i.elem_l_->parent_l(X_AXIS))
+      if (Note_column::rest_b (i.elem_l_) || i.elem_l_->parent_l (X_AXIS))
        return ;
 
       note_column_l_arr_.push (i.elem_l_);
@@ -61,7 +61,7 @@ Collision_engraver::acknowledge_grob (Grob_info i)
 }
 
 void
-Collision_engraver::stop_translation_timestep()
+Collision_engraver::stop_translation_timestep ()
 {
   if (col_p_) 
     {
@@ -71,11 +71,11 @@ Collision_engraver::stop_translation_timestep()
   note_column_l_arr_.clear ();
 }
 
-Collision_engraver::Collision_engraver()
+Collision_engraver::Collision_engraver ()
 {
   col_p_ =0;
 }
 
 
 
-ADD_THIS_TRANSLATOR(Collision_engraver);
+ADD_THIS_TRANSLATOR (Collision_engraver);
index af13b3f6b20e91d9c4a4fc5e5ca95375f4069feb..5c0ae795180a2282a5e0150e3b1567b43854e175 100644 (file)
@@ -5,6 +5,7 @@
 
   (c)  1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
+
 #include "debug.hh"
 #include "collision.hh"
 #include "note-column.hh"
@@ -14,7 +15,8 @@
 #include "item.hh"
 
 
-MAKE_SCHEME_CALLBACK(Collision,force_shift_callback,2);
+MAKE_SCHEME_CALLBACK (Collision,force_shift_callback,2);
+
 SCM
 Collision::force_shift_callback (SCM element_smob, SCM axis)
 {
@@ -39,7 +41,7 @@ Collision::force_shift_callback (SCM element_smob, SCM axis)
   TODO: make callback of this.
  */
 void
-Collision::do_shifts(Grob* me)
+Collision::do_shifts (Grob* me)
 {
   SCM autos (automatic_shift (me));
   SCM hand (forced_shift (me));
@@ -127,7 +129,7 @@ Collision::automatic_shift (Grob *me)
     {
       for (int i=0; i < clash_groups[d].size (); i++)
        {
-         Slice s(Note_column::head_positions_interval (clash_groups[d][i]));
+         Slice s (Note_column::head_positions_interval (clash_groups[d][i]));
          s[LEFT] --;
          s[RIGHT]++;
          extents[d].push (s);
@@ -143,7 +145,7 @@ Collision::automatic_shift (Grob *me)
          Slice prev =extents[d][i-1];
          prev.intersect (extents[d][i]);
          if (prev.length ()> 0 ||
            (extents[-d].size () && d * (extents[d][i][-d] - extents[-d][0][d]) < 0))
+ (extents[-d].size () && d * (extents[d][i][-d] - extents[-d][0][d]) < 0))
            for (int j = i; j <  clash_groups[d].size (); j++)
              offsets[d][j] += d * 0.5;
        }
@@ -162,8 +164,8 @@ Collision::automatic_shift (Grob *me)
       /*
        TODO.
        */
-      Grob * nu_l= Note_column::first_head(cu_l);
-      Grob * nd_l = Note_column::first_head(cd_l);
+      Grob * nu_l= Note_column::first_head (cu_l);
+      Grob * nd_l = Note_column::first_head (cd_l);
       
       int downpos = Note_column::head_positions_interval (cd_l)[BIGGER];
       int uppos = Note_column::head_positions_interval (cu_l)[SMALLER];      
@@ -179,7 +181,7 @@ Collision::automatic_shift (Grob *me)
       /*
        notes are close, but can not be merged.  Shift
        */
-      if (abs(uppos - downpos) < 2 && !merge)
+      if (abs (uppos - downpos) < 2 && !merge)
          do
          {
            for (int i=0; i < clash_groups[d].size (); i++)
@@ -221,9 +223,6 @@ Collision::forced_shift (Grob *me)
   return tups;
 }
 
-
-
-
 void
 Collision::add_column (Grob*me,Grob* ncol_l)
 {
index bf4eccf4e05718b30a657849dd63d4bda4fdcee5..8f9067d4fa14b20034e12cb0fe73aec18abc2d82 100644 (file)
@@ -10,7 +10,7 @@
 #include "real.hh"
 #include "debug.hh"
 
-Column_x_positions::Column_x_positions()
+Column_x_positions::Column_x_positions ()
 {
   satisfies_constraints_b_ = false;
   force_f_ = 0;
index 1255c87bcc4cf6786f6aa3c9200ad685db63f064..ea7e0a4a20cdad1578ae20cf289c636707285ec8 100644 (file)
@@ -10,7 +10,6 @@
 #include "debug.hh"
 #include "musical-request.hh"
 
-
 bool
 Barcheck_req::do_equal_b (Request const *r) const
 {
@@ -18,36 +17,11 @@ Barcheck_req::do_equal_b (Request const *r) const
   return b;
 }
 
-
-
-
 Tempo_req::Tempo_req ()
 {
-  set_mus_property ("duration", Duration(2,0).smobbed_copy ());
-}
-
-
-
-bool
-Tempo_req::do_equal_b (Request const *r) const
-{
-  Tempo_req const *t = dynamic_cast <Tempo_req const*> (r);
-
-  return t; //  && t->dur_.length_mom ()== dur_.length_mom ();
-  // && metronome_i_ == t->metronome_i_;
+  set_mus_property ("duration", Duration (2,0).smobbed_copy ());
 }
 
-
-
-
-bool
-Key_change_req::do_equal_b (Request const * req) const
-{
-  Key_change_req const * k = dynamic_cast<Key_change_req const*> (req);
-  return k  && scm_equal_p (get_mus_property ("pitch-alist"), k->get_mus_property ("pitch-alist")) == SCM_BOOL_T;
-}
-
-
 void
 Key_change_req::transpose (Pitch p)
 {
@@ -65,7 +39,7 @@ Key_change_req::transpose (Pitch p)
 
          orig.transpose (p);
 
-         SCM key = gh_cons (gh_int2scm (orig.octave_i () ),
+         SCM key = gh_cons (gh_int2scm (orig.octave_i ()),
                             gh_int2scm (orig.notename_i_));
 
          newlist = gh_cons (gh_cons (key, gh_int2scm (orig.alteration_i_)),
@@ -97,3 +71,29 @@ Mark_req::do_equal_b (Request const * r) const
   return other && scm_equal_p (other->get_mus_property ("mark-label"),
                               get_mus_property ("mark-label")) == SCM_BOOL_T;
 }
+
+
+ADD_MUSIC (Articulation_req);
+ADD_MUSIC (Barcheck_req);
+ADD_MUSIC (Break_req);
+ADD_MUSIC (Breathing_sign_req);
+ADD_MUSIC (Busy_playing_req);
+ADD_MUSIC (Extender_req);
+ADD_MUSIC (Glissando_req);
+ADD_MUSIC (Hyphen_req);
+ADD_MUSIC (Key_change_req);
+ADD_MUSIC (Lyric_req);
+ADD_MUSIC (Mark_req);
+ADD_MUSIC (Melisma_playing_req);
+ADD_MUSIC (Melisma_req);
+ADD_MUSIC (Melodic_req);
+ADD_MUSIC (Note_req);
+ADD_MUSIC (Rest_req);
+ADD_MUSIC (Rhythmic_req);
+ADD_MUSIC (Script_req);
+ADD_MUSIC (Skip_req);
+ADD_MUSIC (Span_req);
+ADD_MUSIC (Tempo_req);
+ADD_MUSIC (Text_script_req);
+ADD_MUSIC (Tie_req);
+ADD_MUSIC (Tremolo_req);
index bb479a4ba680069f12cde3c30712beb1f8869730..f0373b2dca98fc05145513a63fd6b1c1aee63e45 100644 (file)
@@ -7,10 +7,18 @@
   
  */
 #include "context-specced-music.hh"
-Context_specced_music::Context_specced_music(SCM m)
-  : Music_wrapper  (m)
+Context_specced_music::Context_specced_music (SCM m)
+  : Music_wrapper (m)
 {
   set_mus_property ("type",
                    ly_symbol2scm ("context-specced-music"));
 }
 
+
+Context_specced_music::Context_specced_music ()
+{
+  set_mus_property ("type",
+                   ly_symbol2scm ("context-specced-music"));
+}
+
+ADD_MUSIC (Context_specced_music);
index aed720a86fb33b1c89fe05426e508011bdb8ebd7..075e80d79298c85c35d90c4714101753527872b8 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
 (C) 2000 Juergen Reuter <reuterj@ira.uka.de>,
+ (C) 2000 Juergen Reuter <reuterj@ira.uka.de>,
 
   Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
 class Custos_engraver : public Engraver
 {
 public:
-  Custos_engraver();
-  virtual void start_translation_timestep();
-  virtual void acknowledge_grob(Grob_info);
+  Custos_engraver ();
+  virtual void start_translation_timestep ();
+  virtual void acknowledge_grob (Grob_info);
   virtual void create_grobs ();
   virtual void stop_translation_timestep ();
   virtual void finalize ();
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
 
 private:
-  Item * create_custos();
+  Item * create_custos ();
   bool custos_permitted;
   Link_array<Grob> custos_arr_;
   Array<Pitch> pitches_;
@@ -45,7 +45,7 @@ Custos_engraver::Custos_engraver ()
 
 
 void
-Custos_engraver::stop_translation_timestep()
+Custos_engraver::stop_translation_timestep ()
 {
   /*
     delay typeset until we're at the next moment, so we can silence custodes at the end of the piece.
@@ -69,7 +69,7 @@ Custos_engraver::start_translation_timestep ()
 void
 Custos_engraver::acknowledge_grob (Grob_info info)
 {
-  Item *item = dynamic_cast <Item *>(info.elem_l_);
+  Item *item = dynamic_cast <Item *> (info.elem_l_);
   if (item)
     {
       if (Bar::has_interface (info.elem_l_))
@@ -95,7 +95,7 @@ Custos_engraver::acknowledge_grob (Grob_info info)
 void
 Custos_engraver::create_grobs ()
 {
-  if (gh_string_p (get_property"whichBar")))
+  if (gh_string_p (get_property ("whichBar")))
     custos_permitted = true;
   
   if (custos_permitted)
@@ -114,7 +114,7 @@ Custos_engraver::create_grobs ()
 }
 
 Item* 
-Custos_engraver::create_custos()
+Custos_engraver::create_custos ()
 {
   SCM basicProperties = get_property ("Custos");
   Item* custos = new Item (basicProperties);
index ef3399d7ec6199bfc3bdb048d28bc3326684a77c..87b724fd1ddf71c344bd05010ed4b88eb5e44c6f 100644 (file)
@@ -3,15 +3,15 @@
 
   source file of the GNU LilyPond music typesetter
 
 (C) 2000 Juergen Reuter <reuterj@ira.uka.de>
+ (C) 2000 Juergen Reuter <reuterj@ira.uka.de>
 */
 
 /* TODO:
 
- - merge create_ledger_line () and Note_head::create_ledger_line()
+ - merge create_ledger_line () and Note_head::create_ledger_line ()
  
 
- - rewrite create_ledger_line() to support short and thin ledger lines
+ - rewrite create_ledger_line () to support short and thin ledger lines
 
  - do not show if a clef change immediately follows in the next line
 
 
 /*
    This function is a patched and hopefully much more understandable
-   rewrite of Note_head::ledger_line().  It still has some
+   rewrite of Note_head::ledger_line ().  It still has some
    bugs/limitations:
  *
  (1) The term thick/2 probably should be thick*2 (probably a bug,
+ (1) The term thick/2 probably should be thick*2 (probably a bug,
    see the code below).
  *
  (2) The minimal width of the resulting ledger line equals the width
+ (2) The minimal width of the resulting ledger line equals the width
    of the noteheads-ledgerending symbol (a limitation):
  *
    (---- left ledger ending
+ (---- left ledger ending
      ----) right ledger ending
    (---) resulting ledger line (just ok)
+ (---) resulting ledger line (just ok)
  *
    If x_extent ("xwid" in Note_head) is less than the width of the
    ledger ending, the width of the total ledger line is even *greater*
    than the width of a ledger ending (I would call this a bug).  In
-   the below code, the condition "if (x_extent.length() >
-   slice_x_extent.length())" avoids outputting the left ending in such
+   the below code, the condition "if (x_extent.length () >
+   slice_x_extent.length ())" avoids outputting the left ending in such
    cases (rather a silly workaround, but better than nothing).
  *
      (---- left ledger ending
+ (---- left ledger ending
      ----)   right ledger ending
      (-)   desired ledger line
+ (-)   desired ledger line
      ------- resulting ledger line (too long)
      ----)   resulting ledger line with additional "if" (still too long)
  *
    The algorithm works properly only for a desired ledger line width
    greater than the width of the ledger ending:
  *
    (----    left ledger ending
+ (----    left ledger ending
         ----) right ledger ending
    (------) desired ledger line
    (------) resulting ledger line (ok)
+ (------) desired ledger line
+ (------) resulting ledger line (ok)
  *
  * (3) The thickness of the ledger line is fixed (limitation).
  */
@@ -75,13 +75,13 @@ Custos::create_ledger_line (Interval x_extent, Grob *me)
 {
   Molecule line;
   Molecule slice = Font_interface::get_default_font (me)->find_by_name ("noteheads-ledgerending");
-  Interval slice_x_extent = slice.extent(X_AXIS);
-  Interval slice_y_extent = slice.extent(Y_AXIS);
+  Interval slice_x_extent = slice.extent (X_AXIS);
+  Interval slice_y_extent = slice.extent (Y_AXIS);
 
   // Create left ending of ledger line.
   Molecule left_ending = slice;
   left_ending.translate_axis (x_extent[LEFT] - slice_x_extent[LEFT], X_AXIS);
-  if (x_extent.length() > slice_x_extent.length())
+  if (x_extent.length () > slice_x_extent.length ())
     line.add_molecule (left_ending);
 
   // Create right ending of ledger line.
@@ -93,7 +93,7 @@ Custos::create_ledger_line (Interval x_extent, Grob *me)
   // Fill out space between left and right ending of ledger line by
   // lining up a series of slices in a row between them.
   Molecule fill_out_slice = left_ending;
-  Real thick = slice_y_extent.length();
+  Real thick = slice_y_extent.length ();
   Real delta_x = slice_x_extent.length () - thick;
   Real xpos = x_extent [LEFT] + 2*delta_x + thick/2; // TODO: check: thick*2?
   while (xpos <= x_extent[RIGHT])
@@ -107,7 +107,7 @@ Custos::create_ledger_line (Interval x_extent, Grob *me)
 }
 
 void
-Custos::add_streepjes(Grob* me,
+Custos::add_streepjes (Grob* me,
                   int pos,
                   int interspaces,
                   Molecule* custos_p_)
@@ -117,7 +117,7 @@ Custos::add_streepjes(Grob* me,
   Real inter_f = Staff_symbol_referencer::staff_space (me)/2;
   int streepjes_i = abs (pos) < interspaces
     ? 0
-    : (abs(pos) - interspaces) /2;
+    : (abs (pos) - interspaces) /2;
   if (streepjes_i) 
     {
       Direction dir = (Direction)sign (pos);
@@ -137,7 +137,7 @@ Custos::add_streepjes(Grob* me,
     }
 }
 
-MAKE_SCHEME_CALLBACK(Custos,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Custos,brew_molecule,1);
 SCM
 Custos::brew_molecule (SCM smob)
 {
@@ -158,16 +158,16 @@ Custos::brew_molecule (SCM smob)
       idx += style;
       Molecule molecule
        = Font_interface::get_default_font (me)->find_by_name (idx);
-      if (molecule.empty_b())
+      if (molecule.empty_b ())
         {
          String message = "unknown custos style: `" + style + "'";
-         warning(_ (message.ch_C()));
+         warning (_ (message.ch_C ()));
          return SCM_EOL;
        }
       else
         {
-         add_streepjes(me, (int)pos, interspaces, &molecule);
-         return  molecule.smobbed_copy();
+         add_streepjes (me, (int)pos, interspaces, &molecule);
+         return  molecule.smobbed_copy ();
        }
     }
   else
index 35b20732197d5a5a4b4844cbb57c391ae9d79255..f0d5beec1f952d6b087d1b9d5ffeb82bcf95b839 100644 (file)
@@ -35,10 +35,10 @@ scm_sizet free_smob (SCM)
 SCM
 cxx_function_type_p (SCM x)
 {
-  return (SCM_CELL_TYPE(x) == callback_tag) ? SCM_BOOL_T : SCM_BOOL_F; 
+  return (SCM_CELL_TYPE (x) == callback_tag) ? SCM_BOOL_T : SCM_BOOL_F; 
 }
 
-void init_cxx_function_smobs()
+void init_cxx_function_smobs ()
 {
   callback_tag = scm_make_smob_type_mfpe ("callback", 0,
                                          mark_smob, free_smob,
@@ -52,7 +52,7 @@ smobify_cxx_function (Cxx_function cb)
 {
   SCM z;
   
-  SCM_NEWCELL(z);
+  SCM_NEWCELL (z);
   SCM_SETCDR (z, (SCM)cb);
   SCM_SETCAR (z, (SCM)callback_tag);
 
@@ -64,8 +64,8 @@ Cxx_function
 unsmob_cxx_function (SCM x)
 {
   
-  if (SCM_NIMP (x) && SCM_CELL_TYPE(x) == callback_tag)
-    return (Cxx_function) SCM_CELL_WORD_1(x);
+  if (SCM_NIMP (x) && SCM_CELL_TYPE (x) == callback_tag)
+    return (Cxx_function) SCM_CELL_WORD_1 (x);
   else
     return 0;
 }
index 8dc98a7018adc08c1fe5bbd5b9ad6d17178ffeeb..57380d6e7fb0c10863e13cad07088518bd2d87cd 100644 (file)
@@ -28,7 +28,7 @@ float_handler (int)
 }
 
 void
-debug_init()
+debug_init ()
 {
   my_monitor = new Dstream (&cout, ".dstreamrc");
   signal (SIGFPE, float_handler);
index e78ec6c2820564b585cc0630e86f3997990c4572..f92c7e4f68a1db0e8e2d3cfd86b657c3ff90866c 100644 (file)
@@ -14,7 +14,7 @@
 
 Dimension_cache::Dimension_cache (Dimension_cache const &d)
 {
-  init();
+  init ();
   dimension_ = d.dimension_;
 
   offset_ = d.offset_;
@@ -25,11 +25,11 @@ Dimension_cache::Dimension_cache (Dimension_cache const &d)
 
 Dimension_cache::Dimension_cache ()
 {
-  init();
+  init ();
 }
 
 void
-Dimension_cache::init()
+Dimension_cache::init ()
 {
   dimension_ = SCM_EOL;
 
index 1197048d31d5104bba01a9820d85193d6a9fc495..7f986d51ee1070ff2c7c15f5fd91a3640d72bb82 100644 (file)
@@ -17,7 +17,7 @@ init_functions ()
 {
   Directional_element_interface::direction_sym = scm_permanent_object (ly_symbol2scm ("direction"));
 }
-ADD_SCM_INIT_FUNC(Directional, init_functions);
+ADD_SCM_INIT_FUNC (Directional, init_functions);
 
 
 bool
@@ -31,7 +31,7 @@ Directional_element_interface::get (Grob*me)
 {
   // return dir_;
   SCM d= me->get_grob_property (direction_sym);
-  if (!isdir_b(d))
+  if (!isdir_b (d))
     return CENTER;
       
   return to_dir (d);
index 9e234405cfc0991fcd81004562f7cd431a6f3650..e56d7f3f0821ed55e6927912d58883b9608d2f56 100644 (file)
@@ -18,8 +18,8 @@ class Dot_column_engraver : public Engraver
   Grob *dotcol_p_ ;
   Link_array<Item> head_l_arr_;
 public:
-  VIRTUAL_COPY_CONS(Translator);
-  Dot_column_engraver();
+  VIRTUAL_COPY_CONS (Translator);
+  Dot_column_engraver ();
   
 protected:
   virtual void acknowledge_grob (Grob_info);
@@ -51,7 +51,7 @@ Dot_column_engraver::acknowledge_grob (Grob_info info)
     {
       if (!dotcol_p_)
        {
-         dotcol_p_ = new Item(get_property ("DotColumn"));
+         dotcol_p_ = new Item (get_property ("DotColumn"));
 
          Dot_column::set_interface (dotcol_p_);
          Side_position_interface::set_axis (dotcol_p_, X_AXIS);
@@ -64,5 +64,5 @@ Dot_column_engraver::acknowledge_grob (Grob_info info)
 }
 
 
-ADD_THIS_TRANSLATOR(Dot_column_engraver);
+ADD_THIS_TRANSLATOR (Dot_column_engraver);
 
index db7e3b0d3c10e7f9b9906b0bfacc369df8bffec4..a3c30cc4440b9cdd435b0d89ed4ae926e3a7ffb9 100644 (file)
@@ -46,7 +46,7 @@ Dot_column::set_interface (Grob* me)
  */
 
 
-MAKE_SCHEME_CALLBACK(Dot_column,force_shift_callback,2);
+MAKE_SCHEME_CALLBACK (Dot_column,force_shift_callback,2);
 SCM
 Dot_column::force_shift_callback (SCM element_smob, SCM axis)
 {
@@ -88,7 +88,7 @@ Dot_column::do_shifts (SCM l)
        }
       taken_posns.push ((int)p);
       s.unite (Slice ((int)p,
                    (int)p));      
+ (int)p));      
     }
 
   if (!conflicts)
@@ -99,7 +99,7 @@ Dot_column::do_shifts (SCM l)
     +1 -> off by one 
    */
   int pos = middle - dots.size () + 1;
-  if (!(pos % 2))
+  if (! (pos % 2))
     pos ++;                    // center () rounds down.
 
   for (int i=0; i < dots.size (); pos += 2, i++)
index a601beeeb19d0e4da09a4d91b3cad31c710dc394..2f8202a4653ec36d83d0943f145cc24cd7222734 100644 (file)
@@ -16,7 +16,7 @@
 #include "directional-element-interface.hh"
 
 
-MAKE_SCHEME_CALLBACK(Dots,quantised_position_callback,2);
+MAKE_SCHEME_CALLBACK (Dots,quantised_position_callback,2);
 SCM
 Dots::quantised_position_callback (SCM element_smob, SCM axis)
 {
@@ -34,11 +34,11 @@ Dots::quantised_position_callback (SCM element_smob, SCM axis)
        return gh_double2scm (Staff_symbol_referencer::staff_space (me) / 2.0 * Directional_element_interface::get (me));
     }
 
-  return gh_double2scm  (0.0);
+  return gh_double2scm (0.0);
 }
 
 
-MAKE_SCHEME_CALLBACK(Dots,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Dots,brew_molecule,1);
 SCM  
 Dots::brew_molecule (SCM d)
 {
@@ -59,7 +59,7 @@ Dots::brew_molecule (SCM d)
       mol = Lookup::blank (Box (Interval (0,0),
                                Interval (0,0)));
   
-      for (int i = gh_scm2int (c); i--; )
+      for (int i = gh_scm2int (c); i--;)
        {
          d.translate_axis (2*dw,X_AXIS);
          mol.add_at_edge (X_AXIS, RIGHT, d, dw);
index 930321d067db0543984cc3fa53d3ecc06030bfe2..37e75ac8d1e7f1bf9ba8c1c349b83cf92500ff12 100644 (file)
@@ -79,16 +79,16 @@ Duration::str () const
 }
 
 
-IMPLEMENT_TYPE_P(Duration, "duration?");
-IMPLEMENT_UNSMOB(Duration, duration);
+IMPLEMENT_TYPE_P (Duration, "duration?");
+IMPLEMENT_UNSMOB (Duration, duration);
 
 SCM
-Duration::mark_smob (SCM )
+Duration::mark_smob (SCM)
 {
   return SCM_EOL;
 }
 
-IMPLEMENT_SIMPLE_SMOBS(Duration);
+IMPLEMENT_SIMPLE_SMOBS (Duration);
 
 
 int
@@ -97,7 +97,7 @@ Duration::print_smob (SCM s, SCM port, scm_print_state *)
   Duration  *r = (Duration *) gh_cdr (s);
      
   scm_puts ("#<Duration ", port);
-  scm_display (ly_str02scm (r->str().ch_C()), port);
+  scm_display (ly_str02scm (r->str ().ch_C ()), port);
   scm_puts (" >", port);
   
   return 1;
@@ -116,14 +116,14 @@ Duration::equal_p (SCM a , SCM b)
   return eq ? SCM_BOOL_T : SCM_BOOL_F;
 }
   
-MAKE_SCHEME_CALLBACK(Duration, less_p, 2);
+MAKE_SCHEME_CALLBACK (Duration, less_p, 2);
 SCM
 Duration::less_p (SCM p1, SCM p2)
 {
   Duration *a = unsmob_duration (p1);
   Duration *b = unsmob_duration (p2);
 
-  if (compare(*a, *b) < 0 )
+  if (compare (*a, *b) < 0)
     return SCM_BOOL_T;
   else
     return SCM_BOOL_F;
@@ -132,17 +132,17 @@ Duration::less_p (SCM p1, SCM p2)
 static SCM
 make_duration (SCM l, SCM d)
 {
-  Duration pgh_scm2int (l), gh_scm2int (d));
+  Duration p (gh_scm2int (l), gh_scm2int (d));
   return p.smobbed_copy ();
 }
 
 static void
-add_funcs()
+add_funcs ()
 {
   scm_make_gsubr ("make-duration", 2, 0, 0, (Scheme_function_unknown)make_duration);
 }
 
-ADD_SCM_INIT_FUNC(duration, add_funcs);
+ADD_SCM_INIT_FUNC (duration, add_funcs);
 
 SCM
 Duration::smobbed_copy ()const
index e97858ea673f8c7341dd463d3364bde4d3e1db56..0d0ab6be59162519601a0684c62aa9984ca16b8d 100644 (file)
@@ -57,7 +57,7 @@ class Dynamic_engraver : public Engraver
   void typeset_all ();
 
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Dynamic_engraver ();
   
 protected:
@@ -115,7 +115,7 @@ Dynamic_engraver::try_music (Music * m)
            earlier, not-to-be-terminated stuff.
 
            It will disappear by itself when stop_translation_timestep
          () finds that there is nothing to support anymore.  */
+ () finds that there is nothing to support anymore.  */
          
          if (cresc_p_)
            cresc_p_->suicide ();
@@ -124,7 +124,7 @@ Dynamic_engraver::try_music (Music * m)
       else if (t == "crescendo"
           || t == "decrescendo")
        {
-         accepted_spanreqs_drul_[s->get_span_dir()] = s;
+         accepted_spanreqs_drul_[s->get_span_dir ()] = s;
          return true;
        }
     }
@@ -192,10 +192,10 @@ Dynamic_engraver::process_music ()
        there are no new dynamics.
        */
  
-      if ( !cresc_p_)
+      if (!cresc_p_)
        {
          accepted_spanreqs_drul_[STOP]->origin ()->warning
          (_ ("can't find start of (de)crescendo"));
+ (_ ("can't find start of (de)crescendo"));
          accepted_spanreqs_drul_[STOP] = 0;
        }
       else
@@ -219,7 +219,7 @@ Dynamic_engraver::process_music ()
       if (current_cresc_req_)
        {
          accepted_spanreqs_drul_[START]->origin ()->warning
          (current_cresc_req_->get_span_dir() == 1
(current_cresc_req_->get_span_dir () == 1
             ? _ ("already have a crescendo")
             : _ ("already have a decrescendo"));
        }
@@ -236,7 +236,7 @@ Dynamic_engraver::process_music ()
          /*
            ugh. Use push/pop?
          */
-         SCM s = get_property ((start_type + "Spanner").ch_C());
+         SCM s = get_property ((start_type + "Spanner").ch_C ());
          if (!gh_symbol_p (s) || s == ly_symbol2scm ("hairpin"))
            {
              cresc_p_  = new Spanner (get_property ("Hairpin"));
@@ -258,7 +258,7 @@ Dynamic_engraver::process_music ()
              
              daddy_trans_l_->set_property (start_type
                                            + "Spanner", SCM_UNDEFINED);
-             s = get_property ((start_type + "Text").ch_C());
+             s = get_property ((start_type + "Text").ch_C ());
              if (gh_string_p (s))
                {
                  cresc_p_->set_grob_property ("edge-text",
@@ -390,7 +390,7 @@ Dynamic_engraver::acknowledge_grob (Grob_info i)
          && line_spanner_->immutable_property_alist_ != SCM_EOL)
        {
          Side_position_interface::add_support (line_spanner_,i.elem_l_);
-         add_bound_item (line_spanner_,dynamic_cast<Item*>(i.elem_l_));
+         add_bound_item (line_spanner_,dynamic_cast<Item*> (i.elem_l_));
        }
     }
 }
index fee5a054a9c008c071964c0dfe8b94a16c709eb9..f805428f0c8e6ed9bc87566d84be7029e376ac0d 100644 (file)
@@ -83,10 +83,10 @@ Dynamic_performer::create_audio_elements ()
          */
          SCM s = get_property ("midiInstrument");
          
-         if (!gh_string_p(s))
+         if (!gh_string_p (s))
            s = get_property ("instrument");
          
-         if (!gh_string_p(s))
+         if (!gh_string_p (s))
            s = ly_str02scm ("piano");
          
          
@@ -127,7 +127,7 @@ Dynamic_performer::try_music (Music* r)
 {
   if (!script_req_l_)
     {
-      ifdynamic_cast <Text_script_req*> (r)
+      if (dynamic_cast <Text_script_req*> (r)
          && r->get_mus_property ("text-type") == ly_symbol2scm ("dynamic"))
        {
          script_req_l_ = r;
index ab1b5602f07769b16163e3c727d50ffec3726677..0a47bb8420dec903fce1706a8ce937063f42f409 100644 (file)
@@ -14,7 +14,7 @@
 #include "grob.hh"
 
 
-ADD_THIS_TRANSLATOR(Engraver_group_engraver);
+ADD_THIS_TRANSLATOR (Engraver_group_engraver);
 
 void
 Engraver_group_engraver::announce_grob (Grob_info info)
@@ -28,7 +28,7 @@ void
 Engraver_group_engraver::create_grobs ()
 {
 
-  for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr ( p))
+  for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr (p))
     {
       Translator * t = unsmob_translator (gh_car (p));
       Engraver * eng = dynamic_cast<Engraver*> (t);
@@ -40,7 +40,7 @@ Engraver_group_engraver::create_grobs ()
 void
 Engraver_group_engraver::acknowledge_grobs ()
 {
-  for (int j =0; j < announce_info_arr_.size(); j++)
+  for (int j =0; j < announce_info_arr_.size (); j++)
     {
       Grob_info info = announce_info_arr_[j];
       for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr (p))
@@ -54,9 +54,9 @@ Engraver_group_engraver::acknowledge_grobs ()
 }
 
 void
-Engraver_group_engraver::do_announces()
+Engraver_group_engraver::do_announces ()
 {
-  for (SCM p = trans_group_list_; gh_pair_p (p); p =gh_cdr ( p))
+  for (SCM p = trans_group_list_; gh_pair_p (p); p =gh_cdr (p))
     {
       Translator * t = unsmob_translator (gh_car (p));
       dynamic_cast<Engraver_group_engraver*> (t)->do_announces ();
@@ -80,7 +80,7 @@ Engraver_group_engraver::do_announces()
 void
 Engraver_group_engraver::process_music ()
 {
-   for (SCM p = simple_trans_list_; gh_pair_p (p); p =gh_cdr ( p))
+   for (SCM p = simple_trans_list_; gh_pair_p (p); p =gh_cdr (p))
     {
       Translator * t = unsmob_translator (gh_car (p));
       Engraver * eng = dynamic_cast<Engraver*> (t);
@@ -88,7 +88,7 @@ Engraver_group_engraver::process_music ()
       if (eng)
        eng->process_music ();
     }
-   for (SCM p = trans_group_list_; gh_pair_p (p); p =gh_cdr ( p))
+   for (SCM p = trans_group_list_; gh_pair_p (p); p =gh_cdr (p))
     {
       Translator * t = unsmob_translator (gh_car (p));
       Engraver*eng = dynamic_cast<Engraver*> (t);
index 5e9df9c922a659cacc4a5d2d78b385ac67d8a1bf..02e683b05501f8dfea9bdc53e159e514c1914af8 100644 (file)
@@ -15,7 +15,7 @@
 void
 Engraver::announce_grob (Grob_info inf)
 {
-  daddy_grav_l()->announce_grob (inf);
+  daddy_grav_l ()->announce_grob (inf);
 }
 
 void
@@ -29,7 +29,7 @@ Engraver::announce_grob (Grob* e, Music *m)
   Grob_info i (e, m);
   if (!i.origin_trans_l_)
     i.origin_trans_l_ = this;
-  daddy_grav_l()->announce_grob (i);
+  daddy_grav_l ()->announce_grob (i);
 }
 
 
@@ -37,14 +37,14 @@ Engraver::announce_grob (Grob* e, Music *m)
 void
 Engraver::typeset_grob (Grob*p)
 {
-  daddy_grav_l()->typeset_grob (p);
+  daddy_grav_l ()->typeset_grob (p);
 }
 
 
 Engraver_group_engraver*
 Engraver::daddy_grav_l () const
 {
-  return (daddy_trans_l_ )
+  return (daddy_trans_l_)
        ? dynamic_cast<Engraver_group_engraver *> (daddy_trans_l_)
        : 0;
 }
index e261af552f7aedb24f49df17faaf4e08629fe9c9..d3ae21945fa40cecceb08272dbf30e8dcec32fa6 100644 (file)
@@ -38,9 +38,9 @@ public:
 
 protected:
   virtual void acknowledge_grob (Grob_info);
-  virtual void finalize();
+  virtual void finalize ();
   virtual bool try_music (Music*);
-  virtual void stop_translation_timestep();
+  virtual void stop_translation_timestep ();
   virtual void start_translation_timestep ();
   virtual void process_music ();
 private:
@@ -62,7 +62,7 @@ void
 Extender_engraver::acknowledge_grob (Grob_info i)
 {
   // -> text_item
-  if (i.elem_l_->has_interface (ly_symbol2scm("lyric-syllable-interface")))
+  if (i.elem_l_->has_interface (ly_symbol2scm ("lyric-syllable-interface")))
     {
       current_lyric_l_ = i.elem_l_;
       if (extender_p_
@@ -95,7 +95,7 @@ Extender_engraver::finalize ()
   if (extender_p_)
     {
       req_l_->origin ()->warning (_ ("unterminated extender"));
-      extender_p_->set_bound(RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
+      extender_p_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
     }
 }
 
@@ -113,7 +113,7 @@ Extender_engraver::process_music ()
       extender_p_ = new Spanner (get_property ("LyricExtender"));
 
 
-      Lyric_extender::set_textitem  (extender_p_, LEFT, last_lyric_l_);
+      Lyric_extender::set_textitem (extender_p_, LEFT, last_lyric_l_);
       announce_grob (extender_p_, req_l_);
     }
 }
index 75c2e0f3d706f2809c38f0622f21908cc9d83e6c..16454dba80f3d296a1dc2b761d16f80c2eb5617e 100644 (file)
@@ -61,7 +61,7 @@ Folded_repeat_iterator::construct_children ()
 {
   Repeated_music  *  mus = dynamic_cast<Repeated_music*> (music_l_);
   main_iter_p_ = get_iterator_p (mus->body ());
-  if (!main_iter_p_->ok())
+  if (!main_iter_p_->ok ())
     {
      leave_body ();
       enter_alternative ();
@@ -75,7 +75,7 @@ Folded_repeat_iterator::process (Moment m)
     {
       bool success = try_music (music_l_);
       if (!success)
-       music_l_->origin ()->warning ( _("no one to print a repeat brace"));
+       music_l_->origin ()->warning (("no one to print a repeat brace"));
     }
   
   if (main_iter_p_)
@@ -138,4 +138,4 @@ Folded_repeat_iterator::try_music_in_children (Music * m) const
   return 0;
 }
 
-IMPLEMENT_CTOR_CALLBACK(Folded_repeat_iterator);
+IMPLEMENT_CTOR_CALLBACK (Folded_repeat_iterator);
index 0f946a74804384ae896dee25597b83bcc3102325..3793f54d42d92a19014c70f7ac900b398c3d8e94 100644 (file)
@@ -19,7 +19,7 @@ SCM
 Font_interface::font_alist_chain (Grob *me)
 {
   SCM defaults = gh_cdr (scm_assoc (ly_symbol2scm ("font-defaults"),
-                                   me->paper_l ()->style_sheet_ ));
+                                   me->paper_l ()->style_sheet_));
 
   SCM ch = gh_list (me->mutable_property_alist_,
                    me->immutable_property_alist_,
@@ -132,15 +132,15 @@ init_syms ()
 
 
 bool
-Font_interface::wild_compare(SCM field_val, SCM val)
+Font_interface::wild_compare (SCM field_val, SCM val)
 {
   return (val == SCM_BOOL_F || field_val == wild_sym || field_val == val);
 }
 
-ADD_SCM_INIT_FUNC(Font_interface_syms,init_syms);
+ADD_SCM_INIT_FUNC (Font_interface_syms,init_syms);
 
 
-MAKE_SCHEME_CALLBACK(Font_interface,properties_to_font_name,2);
+MAKE_SCHEME_CALLBACK (Font_interface,properties_to_font_name,2);
 SCM
 Font_interface::properties_to_font_name (SCM fonts, SCM alist_chain)
 {
@@ -186,16 +186,16 @@ Font_interface::properties_to_font_name (SCM fonts, SCM alist_chain)
 
       if (name != SCM_BOOL_F)
        {
-         if (!wild_compare(scm_list_ref (qlist, gh_int2scm (4)), name))
+         if (!wild_compare (scm_list_ref (qlist, gh_int2scm (4)), name))
            continue;
        }
       else
        {
-         if (!wild_compare(scm_list_ref (qlist, gh_int2scm (1)), series))
+         if (!wild_compare (scm_list_ref (qlist, gh_int2scm (1)), series))
            continue;
-         if (!wild_compare(scm_list_ref (qlist, gh_int2scm (2)), shape))
+         if (!wild_compare (scm_list_ref (qlist, gh_int2scm (2)), shape))
            continue;
-         if (!wild_compare(scm_list_ref (qlist, gh_int2scm (3)), family))
+         if (!wild_compare (scm_list_ref (qlist, gh_int2scm (3)), family))
            continue;
        }
   
@@ -203,12 +203,12 @@ Font_interface::properties_to_font_name (SCM fonts, SCM alist_chain)
        {
          // This if statement will always be true since name must 
          // be SCM_BOOL_F here, right?  /MB
-         if (!wild_compare(scm_list_ref (qlist, gh_int2scm (4)), name))
+         if (!wild_compare (scm_list_ref (qlist, gh_int2scm (4)), name))
            continue;
        }
       else
        {
-         if (!wild_compare(gh_car (qlist), rel_sz))
+         if (!wild_compare (gh_car (qlist), rel_sz))
            continue;
        }
 
@@ -217,9 +217,9 @@ Font_interface::properties_to_font_name (SCM fonts, SCM alist_chain)
       return qname;
     }
 
-  warning (_("couldn't find any font satisfying ") );
+  warning (_ ("couldn't find any font satisfying "));
   scm_write (gh_list (name, point_sz, shape, series , family, rel_sz, SCM_UNDEFINED), scm_current_error_port ());
-  scm_flush(scm_current_error_port ());
+  scm_flush (scm_current_error_port ());
  
   return ly_str02scm ("cmr10");
   
index e8682df66bf4ffa7bb522ef183c9568b60cc014d..7ce615a85926fd9f6fdbf290cb2c74b8fe0f0855 100644 (file)
@@ -5,7 +5,7 @@
   
   (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
-    Mats Bengtsson <matsb@s3.kth.se>  (the ugly TeX parsing in text_dimension)
+    Mats Bengtsson <matsb@s3.kth.se> (the ugly TeX parsing in text_dimension)
  */
 
 #include <math.h>
@@ -29,7 +29,7 @@ Font_metric::text_dimension (String text) const
       switch (text[i]) 
        {
        case '\\':
-         for (i++; (i < text.length_i ()) && !isspace(text[i]) 
+         for (i++; (i < text.length_i ()) && !isspace (text[i]) 
                 && text[i]!='{' && text[i]!='}'; i++)
            ;
          // ugh.
@@ -54,7 +54,7 @@ Font_metric::text_dimension (String text) const
   if (ydims.empty_b ())
     ydims = Interval (0,0);
 
-  return Box(Interval (0, w), ydims);
+  return Box (Interval (0, w), ydims);
 }
 
 
@@ -76,21 +76,21 @@ Font_metric::Font_metric (Font_metric const &s)
 
 
 Box 
-Font_metric::get_char (int )const
+Font_metric::get_char (int)const
 {
-  return Box (Interval(0,0),Interval (0,0));
+  return Box (Interval (0,0),Interval (0,0));
 }
 
 
 SCM
 Font_metric::mark_smob (SCM s)
 {
-  Font_metric * m = (Font_metric*) SCM_CELL_WORD_1(s);
+  Font_metric * m = (Font_metric*) SCM_CELL_WORD_1 (s);
   return m->description_;
 }
 
 int
-Font_metric::print_smob (SCM s, SCM port, scm_print_state * )
+Font_metric::print_smob (SCM s, SCM port, scm_print_state *)
 {
   Font_metric *m = unsmob_metrics (s);
   scm_puts ("#<Font_metric ", port);
@@ -102,7 +102,7 @@ Font_metric::print_smob (SCM s, SCM port, scm_print_state * )
 
 IMPLEMENT_UNSMOB (Font_metric, metrics);
 IMPLEMENT_SMOBS (Font_metric);
-IMPLEMENT_DEFAULT_EQUAL_P(Font_metric);
+IMPLEMENT_DEFAULT_EQUAL_P (Font_metric);
 IMPLEMENT_TYPE_P (Font_metric, "font-metric?");
 
 Molecule
@@ -133,4 +133,4 @@ font_metric_init ()
    scm_make_gsubr ("ly-find-glyph-by-name", 2 , 0, 0, (Scheme_function_unknown) ly_find_glyph_by_name);
 }
 
-ADD_SCM_INIT_FUNC(font_metric_init, font_metric_init);
+ADD_SCM_INIT_FUNC (font_metric_init, font_metric_init);
index 3c1700b863bef3962a0691d13d88e9c8b96ba5e2..e8f71657e4418ad57a121da57f960ab34d9100f2 100644 (file)
@@ -5,10 +5,10 @@
 Item*
 to_item (Grob* g)
 {
-  return dynamic_cast<Item*>(g);
+  return dynamic_cast<Item*> (g);
 }
 Spanner*
 to_spanner (Grob*g)
 {
-  return dynamic_cast<Spanner*>(g);
+  return dynamic_cast<Spanner*> (g);
 }
index 27ab068d09cbb93e81c70edf449fd1bf18d91d74..5fa1db034d86079eee3288654d16127c2d25f4d8 100644 (file)
@@ -23,5 +23,5 @@ void
 call_constructors ()
 {
   for (int i=0; i < ctor_global_static_arr_p_->size (); i++)
   (ctor_global_static_arr_p_->elem (i)) ();
+ (ctor_global_static_arr_p_->elem (i)) ();
 }
index 1174200de20e917780520ce18828005552c0f454..e7fe6790d7eb86656a006479c4370194c7311772 100644 (file)
@@ -23,10 +23,10 @@ Global_translator::add_moment_to_process (Moment m)
   if (m  > final_mom_)
     return;
 
-  if (m < now_mom_ )
+  if (m < now_mom_)
     programming_error ("Trying to freeze in time.");
   
-  for (int i=0; i <  extra_mom_pq_.size(); i++)
+  for (int i=0; i <  extra_mom_pq_.size (); i++)
     if (extra_mom_pq_[i] == m)
       return;
   extra_mom_pq_.insert (m);
@@ -35,15 +35,15 @@ Global_translator::add_moment_to_process (Moment m)
 Moment
 Global_translator::sneaky_insert_extra_moment (Moment w)
 {
-  while (extra_mom_pq_.size() && extra_mom_pq_.front() <= w)
-    w = extra_mom_pq_.get();
+  while (extra_mom_pq_.size () && extra_mom_pq_.front () <= w)
+    w = extra_mom_pq_.get ();
   return w;
 }
 
 int
-Global_translator::moments_left_i() const
+Global_translator::moments_left_i () const
 {
-  return extra_mom_pq_.size();
+  return extra_mom_pq_.size ();
 }
 
 void
@@ -62,7 +62,7 @@ Global_translator::now_mom () const
 
 
 Music_output*
-Global_translator::get_output_p()
+Global_translator::get_output_p ()
 {
   return 0;
 }
@@ -89,7 +89,7 @@ Global_translator::run_iterator_on_me (Music_iterator * iter)
       w.set_infinite (1);
       if (iter->ok ())
        {
-         w = iter->pending_moment();
+         w = iter->pending_moment ();
       
        }
 
index 35db227ff831ca48a1ad778bf2990f8faa5893ea..04112971d318513083b415e3f3373c949da1f243 100644 (file)
@@ -135,7 +135,7 @@ Gourlay_breaking::do_solve () const
     }
 
   /* do the last one */
-  if  (break_idx % HAPPY_DOTS_I)
+  if (break_idx % HAPPY_DOTS_I)
     progress_indication (String ("[") + to_str (break_idx) + "]");    
 
 
index c907e9ed2b6e3605e80f24283bbfb50f34d50a60..3f395c94f81c81b0011deacd4148125dd19fea08 100644 (file)
@@ -13,7 +13,7 @@
 #include "paper-column.hh"
 #include "paper-def.hh"
 
-MAKE_SCHEME_CALLBACK(Grace_align_item,before_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Grace_align_item,before_line_breaking,1);
 SCM
 Grace_align_item::before_line_breaking (SCM smob)
 {
@@ -23,7 +23,7 @@ Grace_align_item::before_line_breaking (SCM smob)
   me->set_grob_property ("threshold",
                        gh_cons (space,
                                 gh_double2scm (infinity_f)));
-  dynamic_cast<Item*>(me)->column_l ()->set_grob_property ("contains-grace", SCM_BOOL_T);
+  dynamic_cast<Item*> (me)->column_l ()->set_grob_property ("contains-grace", SCM_BOOL_T);
 
   return SCM_UNSPECIFIED;
 }
@@ -33,7 +33,7 @@ Grace_align_item::set_interface (Grob*me)
 {
   me->set_interface (ly_symbol2scm ("grace-align-interface"));
   me->set_grob_property ("stacking-dir", gh_int2scm (RIGHT));
-  Align_interface::set_interface(me);
+  Align_interface::set_interface (me);
   Align_interface::set_axis (me,X_AXIS);
 }
 
index c5e6bcf9ae4fb30d52958c7e59a8c0ea7e181826..fd60e0de66c3b44de5cbbd05834b550a87aad674 100644 (file)
@@ -60,7 +60,7 @@ Grace_engraver_group::typeset_grob (Grob*e)
 }
 
 
-Grace_engraver_group::Grace_engraver_group()
+Grace_engraver_group::Grace_engraver_group ()
 {
   calling_self_b_ = false;
 }
@@ -70,9 +70,9 @@ Grace_engraver_group::one_time_step ()
 {
   calling_self_b_  = true;
   process_music ();
-  announces();
-  pre_move_processing();
-  check_removal();
+  announces ();
+  pre_move_processing ();
+  check_removal ();
   calling_self_b_ = false;
 }
 
@@ -85,7 +85,7 @@ Grace_engraver_group::each (Method_pointer method)
 }
 
 
-ADD_THIS_TRANSLATOR(Grace_engraver_group);
+ADD_THIS_TRANSLATOR (Grace_engraver_group);
 
 
 /*
index 3be0038ddebefae4c1bd600fe422ad5a4d648200..18a7a62bf6c776e235faa1eeabd5bee881cae30d 100644 (file)
@@ -29,7 +29,7 @@ Grace_iterator::construct_children ()
 void
 Grace_iterator::process (Moment)
 {
-  Global_translator * t = dynamic_cast<Global_translator*>(report_to_l ());
+  Global_translator * t = dynamic_cast<Global_translator*> (report_to_l ());
   if (t)
     {
       t->start ();
@@ -40,7 +40,7 @@ Grace_iterator::process (Moment)
     }
   else
     {
-      warning (_("no Grace context available")); 
+      warning (_ ("no Grace context available")); 
     }
 }
 
@@ -51,4 +51,4 @@ Grace_iterator::pending_moment () const
 }
 
 
-IMPLEMENT_CTOR_CALLBACK(Grace_iterator);
+IMPLEMENT_CTOR_CALLBACK (Grace_iterator);
index 20d3e8a1679fbcc2f9ee5053b22280d8d51467d4..9121df5ff93728c4c588bfe1980751dc7e0f0dd2 100644 (file)
@@ -22,9 +22,17 @@ Grace_music::length_mom () const
   return 0;
 }
 
+Grace_music::Grace_music ()
+{
+  set_mus_property ("iterator-ctor",
+                   Grace_iterator::constructor_cxx_function);
+}
+
 Grace_music::Grace_music (SCM p)
   : Music_wrapper (p)
 {
   set_mus_property ("iterator-ctor",
                    Grace_iterator::constructor_cxx_function);
 }
+
+ADD_MUSIC (Grace_music);
index c58a8a25c7b99b81e31f41a61211d844072bdaa8..54fbce92d94e1f169287f5ab313b3fd58ea525f2 100644 (file)
@@ -62,7 +62,7 @@ Grace_performer_group::play_element (Audio_element*e)
 }
 
 
-Grace_performer_group::Grace_performer_group()
+Grace_performer_group::Grace_performer_group ()
 {
   calling_self_b_ = false;
 }
@@ -72,9 +72,9 @@ Grace_performer_group::one_time_step ()
 {
   calling_self_b_  = true;
   // process_music ();
-  announces();
-  pre_move_processing();
-  check_removal();
+  announces ();
+  pre_move_processing ();
+  check_removal ();
   calling_self_b_ = false;
 }
 
index 0f732a37d8990bf74cb630084b3e5860c8a1e1c1..1ea8ce3a4c21d9d4d948f793d255ecf21454c1ee 100644 (file)
@@ -21,7 +21,7 @@ class Grace_position_engraver:public Engraver
 {
   Paper_column *last_musical_col_l_;
 protected:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   virtual void acknowledge_grob (Grob_info);
   virtual void create_grobs ();
   virtual void start_translation_timestep ();
@@ -29,7 +29,7 @@ protected:
   Item*align_l_;
   Link_array<Item> support_;
 public:
-  Grace_position_engraver();
+  Grace_position_engraver ();
 };
 
 
@@ -93,7 +93,7 @@ Grace_position_engraver::stop_translation_timestep ()
 
       if (last_musical_col_l_)
        {
-         warning (_("Unattached grace notes.  Attaching to last musical column."));
+         warning (_ ("Unattached grace notes.  Attaching to last musical column."));
       
          align_l_->set_parent (0, X_AXIS);
          Axis_group_interface::add_element (last_musical_col_l_, align_l_);
@@ -103,7 +103,7 @@ Grace_position_engraver::stop_translation_timestep ()
          // tja.
        }
     }
-  last_musical_col_l_ = dynamic_cast<Paper_column*>unsmob_grob (get_property ("currentMusicalColumn")));
+  last_musical_col_l_ = dynamic_cast<Paper_column*> (unsmob_grob (get_property ("currentMusicalColumn")));
 }
 
 void
@@ -113,5 +113,5 @@ Grace_position_engraver::start_translation_timestep ()
   align_l_ =0;
 }
 
-ADD_THIS_TRANSLATOR(Grace_position_engraver);
+ADD_THIS_TRANSLATOR (Grace_position_engraver);
 
index edd020796e7f416f4123d032d96433647d7ea4ad..c2ed5bd0131ad53c52fe71feba9d336182b2f295 100644 (file)
@@ -19,7 +19,7 @@ Grob_info::Grob_info (Grob*s_l, Music *r_l)
 }
 
 
-Grob_info::Grob_info()
+Grob_info::Grob_info ()
 {
   elem_l_ = 0;
   req_l_ = 0;
index 467853e6dfb6552fce77ac1668544f5468b56dab..f151def2e2668cb4de4c39c874228012e8e06dd0 100644 (file)
@@ -42,7 +42,7 @@ remove dynamic_cast<Spanner,Item> and put this code into respective
 
 #define INFINITY_MSG "Infinity or NaN encountered"
 
-Grob::Grob(SCM basicprops)
+Grob::Grob (SCM basicprops)
 {
   /*
     fixme: default should be no callback.
@@ -93,7 +93,7 @@ Grob::Grob(SCM basicprops)
 Grob::Grob (Grob const&s)
    : dim_cache_ (s.dim_cache_)
 {
-  original_l_ =(Grob*) &s;
+  original_l_ = (Grob*) &s;
   immutable_property_alist_ = s.immutable_property_alist_;
   mutable_property_alist_ = SCM_EOL;
   
@@ -103,7 +103,7 @@ Grob::Grob (Grob const&s)
   smobify_self ();
 }
 
-Grob::~Grob()
+Grob::~Grob ()
 {
   /*
     do nothing scm-ish and no unprotecting here.
@@ -121,7 +121,7 @@ Grob::get_grob_property (const char *nm) const
 SCM
 Grob::get_grob_property (SCM sym) const
 {
-  SCM s = scm_sloppy_assq(sym, mutable_property_alist_);
+  SCM s = scm_sloppy_assq (sym, mutable_property_alist_);
   if (s != SCM_BOOL_F)
     return gh_cdr (s);
 
@@ -153,7 +153,7 @@ Grob::set_grob_property (const char* k, SCM v)
 /*
   Puts the k, v in the immutable_property_alist_, which is convenient for
   storing variables that are needed during the breaking process. (eg.
-  Line_of_score::rank : int )
+  Line_of_score::rank : int)
  */
 void
 Grob::set_immutable_grob_property (const char*k, SCM v)
@@ -175,7 +175,7 @@ Grob::set_grob_property (SCM s, SCM v)
 }
 
 
-MAKE_SCHEME_CALLBACK(Grob,molecule_extent,2);
+MAKE_SCHEME_CALLBACK (Grob,molecule_extent,2);
 SCM
 Grob::molecule_extent (SCM element_smob, SCM scm_axis)
 {
@@ -185,11 +185,11 @@ Grob::molecule_extent (SCM element_smob, SCM scm_axis)
   Molecule *m = s->get_molecule ();
   Interval e ;
   if (m)
-    e = m->extent(a);
-  return ly_interval2scm ( e);
+    e = m->extent (a);
+  return ly_interval2scm (e);
 }
 
-MAKE_SCHEME_CALLBACK(Grob,preset_extent,2);
+MAKE_SCHEME_CALLBACK (Grob,preset_extent,2);
 
 SCM
 Grob::preset_extent (SCM element_smob, SCM scm_axis)
@@ -208,7 +208,7 @@ Grob::preset_extent (SCM element_smob, SCM scm_axis)
       return ly_interval2scm (Interval (l, r));
     }
   
-  return ly_interval2scm ( Interval ());
+  return ly_interval2scm (Interval ());
 }
 
 
@@ -243,7 +243,7 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname)
 
   // ughugh.
   String s = ly_symbol2string (funcname);
-  SCM proc = get_grob_property (s.ch_C());
+  SCM proc = get_grob_property (s.ch_C ());
   if (gh_procedure_p (proc))
     gh_call1 (proc, this->self_scm ());
   
@@ -313,7 +313,7 @@ Grob::get_uncached_molecule ()const
 
  */
 void
-Grob::do_break_processing()
+Grob::do_break_processing ()
 {
 }
 
@@ -323,7 +323,7 @@ Grob::do_break_processing()
 
 
 Line_of_score *
-Grob::line_l() const
+Grob::line_l () const
 {
   return 0;
 }
@@ -362,7 +362,7 @@ Grob::handle_broken_smobs (SCM src, SCM criterion)
          if (i && i->break_status_dir () != d)
            {
              Item *br = i->find_prebroken_piece (d);
-             return  (br) ? br->self_scm () : SCM_UNDEFINED;
+             return (br) ? br->self_scm () : SCM_UNDEFINED;
            }
        }
       else
@@ -422,7 +422,7 @@ Grob::handle_broken_smobs (SCM src, SCM criterion)
 }
 
 void
-Grob::handle_broken_dependencies()
+Grob::handle_broken_dependencies ()
 {
   Spanner * s= dynamic_cast<Spanner*> (this);
   if (original_l_ && s)
@@ -441,7 +441,7 @@ Grob::handle_broken_dependencies()
     }
 
 
-  Line_of_score *line = line_l();
+  Line_of_score *line = line_l ();
 
   if (line && common_refpoint (line, X_AXIS) && common_refpoint (line, Y_AXIS))
     {
@@ -462,9 +462,9 @@ Grob::handle_broken_dependencies()
 
        do not do this for Line_of_score, since that would remove
        references to the originals of score-elts, which get then GC'd
      (a bad thing.)
+ (a bad thing.)
       */
-      suicide();
+      suicide ();
     }
 }
 
@@ -490,7 +490,7 @@ Grob::suicide ()
 }
 
 void
-Grob::handle_prebroken_dependencies()
+Grob::handle_prebroken_dependencies ()
 {
 }
 
@@ -504,7 +504,7 @@ void
 Grob::translate_axis (Real y, Axis a)
 {
   if (isinf (y) || isnan (y))
-    programming_error (_(INFINITY_MSG));
+    programming_error (_ (INFINITY_MSG));
   else
     {
       dim_cache_[a].offset_ += y;
@@ -550,18 +550,18 @@ Grob::get_offset (Axis a) const
 }
 
 
-MAKE_SCHEME_CALLBACK(Grob,point_dimension_callback,2);
+MAKE_SCHEME_CALLBACK (Grob,point_dimension_callback,2);
 SCM
-Grob::point_dimension_callback (SCM , SCM )
+Grob::point_dimension_callback (SCM , SCM)
 {
-  return ly_interval2scm ( Interval (0,0));
+  return ly_interval2scm (Interval (0,0));
 }
 
 bool
 Grob::empty_b (Axis a)const
 {
-  return ! (gh_pair_p (dim_cache_[a].dimension_ ) ||
-           gh_procedure_p (dim_cache_[a].dimension_ ));
+  return ! (gh_pair_p (dim_cache_[a].dimension_) ||
+           gh_procedure_p (dim_cache_[a].dimension_));
 }
 
 /*
@@ -586,7 +586,7 @@ Grob::extent (Grob * refp, Axis a) const
       /*
        FIXME: add doco on types, and should typecheck maybe? 
        */
-      d->dimension_= gh_call2 (d->dimension_, self_scm(), gh_int2scm (a));
+      d->dimension_= gh_call2 (d->dimension_, self_scm (), gh_int2scm (a));
     }
   else
     return ext;
@@ -665,7 +665,7 @@ Grob::name () const
 {
   SCM meta = get_grob_property ("meta");
   SCM nm = scm_assoc (ly_symbol2scm ("name"), meta);
-  nm =  (gh_pair_p (nm)) ? gh_cdr (nm) : SCM_EOL;
+  nm = (gh_pair_p (nm)) ? gh_cdr (nm) : SCM_EOL;
   return  gh_string_p (nm) ?ly_scm2string (nm) :  classname (this);  
 }
 
@@ -674,7 +674,7 @@ Grob::add_offset_callback (SCM cb, Axis a)
 {
   if (!has_offset_callback_b (cb, a))
   {
-    dim_cache_[a].offset_callbacks_ = gh_cons (cb, dim_cache_[a].offset_callbacks_ );
+    dim_cache_[a].offset_callbacks_ = gh_cons (cb, dim_cache_[a].offset_callbacks_);
     dim_cache_[a].offsets_left_ ++;
   }
 }
@@ -710,7 +710,7 @@ Grob::set_parent (Grob *g, Axis a)
   dim_cache_[a].parent_l_ = g;
 }
 
-MAKE_SCHEME_CALLBACK(Grob,fixup_refpoint,1);
+MAKE_SCHEME_CALLBACK (Grob,fixup_refpoint,1);
 SCM
 Grob::fixup_refpoint (SCM smob)
 {
@@ -736,7 +736,7 @@ Grob::fixup_refpoint (SCM smob)
          if (parenti && i)
            {
              Direction  my_dir = i->break_status_dir () ;
-             if (my_dir!= parenti->break_status_dir())
+             if (my_dir!= parenti->break_status_dir ())
                {
                  Item *newparent =  parenti->find_prebroken_piece (my_dir);
                  me->set_parent (newparent, ax);
@@ -754,14 +754,14 @@ Grob::fixup_refpoint (SCM smob)
  ****************************************************/
 
 
-IMPLEMENT_UNSMOB(Grob, grob);
-IMPLEMENT_SMOBS(Grob);
-IMPLEMENT_DEFAULT_EQUAL_P(Grob);
+IMPLEMENT_UNSMOB (Grob, grob);
+IMPLEMENT_SMOBS (Grob);
+IMPLEMENT_DEFAULT_EQUAL_P (Grob);
 
 SCM
 Grob::mark_smob (SCM ses)
 {
-  Grob * s = (Grob*) SCM_CELL_WORD_1(ses);
+  Grob * s = (Grob*) SCM_CELL_WORD_1 (ses);
   scm_gc_mark (s->immutable_property_alist_);
   scm_gc_mark (s->mutable_property_alist_);
 
@@ -787,7 +787,7 @@ Grob::print_smob (SCM s, SCM port, scm_print_state *)
   Grob *sc = (Grob *) gh_cdr (s);
      
   scm_puts ("#<Grob ", port);
-  scm_puts ((char *)sc->name ().ch_C(), port);
+  scm_puts ((char *)sc->name ().ch_C (), port);
 
   /*
     don't try to print properties, that is too much hassle.
@@ -848,7 +848,7 @@ ly_get_grob_property (SCM elt, SCM sym)
 
 
 void
-Grob::discretionary_processing()
+Grob::discretionary_processing ()
 {
 }
 
@@ -889,10 +889,10 @@ Grob::set_interface (SCM k)
   else
     {
       set_grob_property (interfaces_sym,
-                       gh_cons  (k, get_grob_property (interfaces_sym)));
+                       gh_cons (k, get_grob_property (interfaces_sym)));
     }
 }
 
 
-ADD_SCM_INIT_FUNC(scoreelt, init_functions);
-IMPLEMENT_TYPE_P(Grob, "ly-grob?");
+ADD_SCM_INIT_FUNC (scoreelt, init_functions);
+IMPLEMENT_TYPE_P (Grob, "ly-grob?");
index d0ac48aa3fa38d514468e120e34670446aa9221c..3734882ceed0a855441d2183069c98ab9e091cd1 100644 (file)
@@ -14,19 +14,19 @@ void
 Group_interface::add_thing (Grob*me, String name, SCM s)
 {
   me->set_grob_property (name.ch_C (),
-                           gh_cons (s, me->get_grob_property (name.ch_C())));
+                           gh_cons (s, me->get_grob_property (name.ch_C ())));
 }
 
 
 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.ch_C ()));
 }
 
 
 void
 Pointer_group_interface::add_element (Grob*me, String name, Grob*p) 
 {
-  Group_interface::add_thing (me, name, p->self_scm());
+  Group_interface::add_thing (me, name, p->self_scm ());
 }
index 6634746e85653b28b0c7b22db799c4978977512b..a42dea8a1186a3fefe1c698eac5276ce00b84b88 100644 (file)
@@ -21,11 +21,11 @@ SCM
 Hairpin::brew_molecule (SCM smob) 
 {
   Grob *me= unsmob_grob (smob);
-  Spanner *spanner = dynamic_cast<Spanner*>(me);
+  Spanner *spanner = dynamic_cast<Spanner*> (me);
 
   Real line = me->paper_l ()->get_var ("stafflinethickness");  
   
-  SCM s = me->get_grob_property("grow-direction");
+  SCM s = me->get_grob_property ("grow-direction");
   if (!isdir_b (s))
     {
       me->suicide ();
index 53166be9e5927824442ca23aba487bb0daaa6e2b..909a49d18334d08265736f1fe37e4d1d66fd6af4 100644 (file)
@@ -14,7 +14,7 @@
 #include "item.hh"
 
 
-MAKE_SCHEME_CALLBACK(Hara_kiri_group_spanner,y_extent,2);
+MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner,y_extent,2);
 SCM
 Hara_kiri_group_spanner::y_extent (SCM element_smob, SCM scm_axis)
 {
@@ -28,7 +28,7 @@ Hara_kiri_group_spanner::y_extent (SCM element_smob, SCM scm_axis)
 
 
 void
-Hara_kiri_group_spanner::consider_suicide(Grob*me)
+Hara_kiri_group_spanner::consider_suicide (Grob*me)
 {
   SCM worth = me->get_grob_property ("items-worth-living");
   if (gh_pair_p (worth))
@@ -51,7 +51,7 @@ Hara_kiri_group_spanner::consider_suicide(Grob*me)
   We can't rely on offsets and dimensions of elements in a hara-kiri
   group. Use a callback to make sure that hara-kiri has been done
   before asking for offsets.  */
-MAKE_SCHEME_CALLBACK(Hara_kiri_group_spanner,force_hara_kiri_callback,2);
+MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner,force_hara_kiri_callback,2);
 SCM
 Hara_kiri_group_spanner::force_hara_kiri_callback (SCM element_smob, SCM axis)
 {
@@ -63,7 +63,7 @@ Hara_kiri_group_spanner::force_hara_kiri_callback (SCM element_smob, SCM axis)
 }
 
 
-MAKE_SCHEME_CALLBACK(Hara_kiri_group_spanner,force_hara_kiri_in_parent_callback,2);
+MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner,force_hara_kiri_in_parent_callback,2);
 SCM
 Hara_kiri_group_spanner::force_hara_kiri_in_parent_callback (SCM element_smob, SCM axis)
 {
@@ -71,7 +71,7 @@ Hara_kiri_group_spanner::force_hara_kiri_in_parent_callback (SCM element_smob, S
   Axis a = (Axis) gh_scm2int (axis);
   assert (a == Y_AXIS);
   force_hara_kiri_callback (daughter->parent_l (a)->self_scm (), axis);
-  return gh_double2scm ( 0.0);
+  return gh_double2scm (0.0);
 }
 
 void
index 44eb9298053fe18fbb10a5f31fd674740caef1f1..d7ebcea02e7deced0a7253030a20b4ae37a9e4b2 100644 (file)
@@ -32,9 +32,9 @@ public:
 
 protected:
   virtual void acknowledge_grob (Grob_info);
-  virtual void finalize();
+  virtual void finalize ();
   virtual bool try_music (Music*);
-  virtual void stop_translation_timestep();
+  virtual void stop_translation_timestep ();
   virtual void start_translation_timestep ();
   virtual void create_grobs ();
 private:
@@ -88,7 +88,7 @@ Hyphen_engraver::finalize ()
   if (hyphen_p_)
     {
       req_l_->origin ()->warning (_ ("unterminated hyphen"));
-      hyphen_p_->set_bound(RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
+      hyphen_p_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
     }
 }
 
@@ -105,7 +105,7 @@ Hyphen_engraver::create_grobs ()
       
       hyphen_p_ = new Spanner (get_property ("LyricHyphen"));
 
-      Hyphen_spanner (hyphen_p_).set_textitem  (LEFT, last_lyric_l_);
+      Hyphen_spanner (hyphen_p_).set_textitem (LEFT, last_lyric_l_);
       announce_grob (hyphen_p_, req_l_);
     }
 }
index 6c0dd240ae409ed10560ce13a893c49b4581edcd..433a107ba6ae989e1a538147260c474053b20d8b 100644 (file)
@@ -5,7 +5,7 @@
 
   (c) 1999 Glen Prideaux <glenprideaux@iname.com>
 
 (adapted from lyric-extender)
+ (adapted from lyric-extender)
 */
 
 #include <math.h>
@@ -19,7 +19,7 @@
 #include "spanner.hh"
 #include "item.hh"
 
-MAKE_SCHEME_CALLBACK(Hyphen_spanner,brew_molecule,1)
+MAKE_SCHEME_CALLBACK (Hyphen_spanner,brew_molecule,1)
 
 SCM 
 Hyphen_spanner::brew_molecule (SCM smob)
@@ -30,7 +30,7 @@ Hyphen_spanner::brew_molecule (SCM smob)
   Direction d = LEFT;
   do
     {
-      common = common->common_refpointsp->get_bound (d), X_AXIS);
+      common = common->common_refpoint (sp->get_bound (d), X_AXIS);
     }
   while (flip (&d) != LEFT);
   Interval bounds;
@@ -54,8 +54,8 @@ Hyphen_spanner::brew_molecule (SCM smob)
   Real w  = bounds.length ();
   /* for length, use a geometric mean of the available space and some minimum
   */
-  if(l < w)
-    l = sqrt(l*w);
+  if (l < w)
+    l = sqrt (l*w);
   else
     {
       /* OK, we have a problem. Usually this means that we're on the
@@ -63,7 +63,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<Paper_column*> (sp->get_bound(LEFT)->column_l());
+      Paper_column *sc = dynamic_cast<Paper_column*> (sp->get_bound (LEFT)->column_l ());
       if (sc != NULL &&
          sc->break_status_dir () == RIGHT)
        {
@@ -78,7 +78,7 @@ Hyphen_spanner::brew_molecule (SCM smob)
          l = w;
        }
     }
-  Box b  (Interval (-l/2,l/2), Interval (h,h+th));
+  Box b (Interval (-l/2,l/2), Interval (h,h+th));
   Molecule mol (Lookup::filledbox (b));
   mol.translate_axis (bounds.center ()
                      -sp->relative_coordinate (common, X_AXIS),
index d1a781699b5ea3c80c05fda1e5e60a535a16af4c..70ffaaf0972dd66c3cffe2b9bdf4035431ccb15c 100644 (file)
@@ -21,7 +21,7 @@
 #endif
 
 #ifndef YY_START
-#define YY_START ((yy_start - 1) / 2)
+#define YY_START() ((yy_start - 1) / 2)
 #define YYSTATE YY_START
 #endif
 
@@ -47,7 +47,7 @@ Includable_lexer::new_input (String s, Sources  * global_sources)
     {
       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_->str ().ch_C ());
       msg += "\n";
       LexerError (msg.ch_C ());
 
index 643bd531751c77ea2b80ea5811c4ed77cd92d6a4..d7294b990a975f8f57f313cea7c465948cdbb280 100644 (file)
@@ -15,8 +15,8 @@
 #include "lily-guile.hh"
 
 struct Align_interface {
-  DECLARE_SCHEME_CALLBACK(alignment_callback, (SCM element, SCM axis));
-  DECLARE_SCHEME_CALLBACK(fixed_distance_alignment_callback, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK (alignment_callback, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK (fixed_distance_alignment_callback, (SCM element, SCM axis));
   static void align_to_fixed_distance (Grob*,Axis a);
   static void align_elements_to_extents (Grob*,Axis a);
   static void set_axis (Grob*,Axis);
index 74411bfc9e04adc741d7e85ef2a924211a6f775a..0ae3ccbb13e8365a7d744b895552bffaa560e8e3 100644 (file)
@@ -16,7 +16,7 @@ class Arpeggio
 {
 public:
   DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
-  DECLARE_SCHEME_CALLBACK(width_callback, (SCM,SCM));
+  DECLARE_SCHEME_CALLBACK (width_callback, (SCM,SCM));
   static bool has_interface (Grob*);
 };
 
index 5705a9c7b0b1d8bf33b7d1fcef96745fb74651c9..4c5b73cb3dbf0d1f8fc7aec7f2cba2f7a0d62b44 100644 (file)
@@ -22,8 +22,8 @@ public:
   Audio_column (Moment at_mom);
 
   void add_audio_item (Audio_item* i_l);
-  Moment at_mom() const;
-  void print() const;
+  Moment at_mom () const;
+  void print () const;
 
   Link_array<Audio_item> audio_item_l_arr_;
   Performance * performance_l_;
index 85db1680bae6eda8d398684363aff72274ac671d..e42d4ceeede6eb1c633ea47010fc2f9a5fbb8f55 100644 (file)
@@ -23,7 +23,7 @@ struct Audio_element_info {
   Link_array<Translator> origin_trans_l_arr (Translator*) const;  
 
   Audio_element_info (Audio_element*, Music*);
-  Audio_element_info();
+  Audio_element_info ();
 };
 
 
index 66246a074a2e65aa4e1466ed81b914913ab941fa..7b07610895f68df0328bc45d61a4c17e398057da 100644 (file)
@@ -32,7 +32,7 @@ public:
   
 private:
   Audio_item (Audio_item const&);
-  Audio_item& operator=( Audio_item const&);
+  Audio_item& operator= ( Audio_item const&);
 };
 
 class Audio_dynamic : public Audio_item
index 869361f64bb8f570bfbcca4b61a78be1ff60c802..33306c15c1b8939a36752ec4f3f04fdd193d8d8e 100644 (file)
@@ -17,7 +17,7 @@
 */
 struct Axis_group_interface 
 {
-  DECLARE_SCHEME_CALLBACK(group_extent_callback, (SCM smob, SCM axis));
+  DECLARE_SCHEME_CALLBACK (group_extent_callback, (SCM smob, SCM axis));
   static Interval relative_group_extent (Axis, Grob * common, SCM list);
 
   static void add_element (Grob* me, Grob*);
index fa3330a15bc1e04799ee54833381cc8c2849bbd1..b83bc935e3b7e4317d6868d516c7b4b08a1d01fb 100644 (file)
@@ -20,9 +20,9 @@ public:
   static void set_interface (Grob*);
   static Molecule compound_barline (Grob*, String, Real height) ;
   static Molecule simple_barline (Grob*, Real wid, Real height) ;      
-  DECLARE_SCHEME_CALLBACK(get_staff_bar_size, (SCM ));
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
-  DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM ));
+  DECLARE_SCHEME_CALLBACK (get_staff_bar_size, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
 };
 #endif // BAR_HH
 
index e74b8e1b0efb75f0ddb2d3246fb2cac18820fa50..082ceb630e48244f4c5c5b656217c47a4be9c72f 100644 (file)
@@ -19,15 +19,15 @@ public:
   static Item* first_visible_stem (Grob*);
   static Item* last_visible_stem (Grob*);
   static bool has_interface (Grob*);
-  DECLARE_SCHEME_CALLBACK(rest_collision_callback, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK (rest_collision_callback, (SCM element, SCM axis));
   Beam (SCM);
   static void add_stem (Grob*,Grob*);
   static void set_beaming (Grob*,Beaming_info_list *);
   static void set_stemlens (Grob*);
   static int get_multiplicity (Grob*me);
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
-  DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM ));
-  DECLARE_SCHEME_CALLBACK(after_line_breaking, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
+  DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
 
   /*
     y-dy callbacks
index fd1643f1538c9a0c4b57557867ec365c9eb5025c..6fca4f6a9791d12ddebb09ba2af8f43b46d171e6 100644 (file)
@@ -20,7 +20,7 @@ struct Beaming_info
   Drul_array<int> beams_i_drul_;
 
   Beaming_info (Moment, int);
-  int count  (Direction d);
+  int count (Direction d);
   Beaming_info ();
 };
 
index a105d56f4a2b7c5330b2d2f165be2a83955c71f0..39aa77eeb3b88824b10d4f35a1316794258df8e6 100644 (file)
 struct Box {
   Interval interval_a_[NO_AXES];
     
-  Interval &x() {return interval_a_[X_AXIS]; }
-  Interval &y(){ return interval_a_[Y_AXIS]; }
-  Interval x() const{ return interval_a_[X_AXIS]; }
-  Interval y() const{return interval_a_[Y_AXIS]; }
-  Interval operator[](Axis a) const;
+  Interval &x () {return interval_a_[X_AXIS]; }
+  Interval &y (){ return interval_a_[Y_AXIS]; }
+  Interval x () const{ return interval_a_[X_AXIS]; }
+  Interval y () const{return interval_a_[Y_AXIS]; }
+  Interval operator[] (Axis a) const;
   Interval &operator[] (Axis a);
     
   void translate (Offset o);
@@ -27,7 +27,7 @@ struct Box {
   void set_empty ();
   void scale (Real r);
   void unite (Box b);
-  Box();
+  Box ();
   Box (Interval ix, Interval iy);
 };
 
index 9e7866cac0787443131b5985b02bf92dd3f9dcbe..c91a00bdafa03b83d838b2305506db7d5c464391 100644 (file)
@@ -28,9 +28,9 @@ protected:
   Real linewidth_f_;
 
   /// search all pcols which are breakable.
-  Link_array<Grob> find_breaks() const;
+  Link_array<Grob> find_breaks () const;
 
-  Array<int> find_break_indices() const;
+  Array<int> find_break_indices () const;
     
 
   /// helper: solve for the columns in #curline#.
@@ -42,14 +42,14 @@ protected:
 
   Simple_spacer* generate_spacing_problem (Link_array<Grob>, Interval) const;
 
-  virtual Array<Column_x_positions> do_solve() const=0;
+  virtual Array<Column_x_positions> do_solve () const=0;
 
 public:
-  Simple_spacer* (*get_line_spacer)();
-  Break_algorithm();
+  Simple_spacer* (*get_line_spacer) ();
+  Break_algorithm ();
   void set_pscore (Paper_score*);
 
-  Array<Column_x_positions> solve() const;
+  Array<Column_x_positions> solve () const;
 };
 
 #endif // BREAK_HH
index 06f62615ed25c1e0f2235bf537273c2c1c4a5f84..5321469df9626b61fed0e14a209edd8f5df2aa2c 100644 (file)
 class Break_align_interface
 {
 public:
-  DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM ));
+  DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
   static void do_alignment (Grob*);
   static void set_interface (Grob*);
   static bool has_interface (Grob*);
   static void add_element (Grob*me, Grob*add);
-  DECLARE_SCHEME_CALLBACK(alignment_callback, (SCM element, SCM axis));
-  DECLARE_SCHEME_CALLBACK(self_align_callback, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK (alignment_callback, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK (self_align_callback, (SCM element, SCM axis));
 };
 #endif // BREAK_ALIGN_ITEM_HH
index 07f82506cd5d8360c44e1e13fe55c114f85dbcce..f9a7a77887f889c4fb6aa2b0dd31e81b4353378c 100644 (file)
@@ -19,8 +19,8 @@
 class Breathing_sign
 {
 public:
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
-  DECLARE_SCHEME_CALLBACK(offset_callback, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (offset_callback, (SCM element, SCM axis));
   static void set_interface (Grob*);
   static bool has_interface (Grob*);
 };
index d9cc316497eee8a30d83ecb932c47fc274f8c127..1374ea192a849ad4c024d04ff98108ae5c14e401 100644 (file)
@@ -16,8 +16,8 @@
 class Chord_name
 {
 public:
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
-  DECLARE_SCHEME_CALLBACK(after_line_breaking, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
 };
 
 #endif // CHORD_NAME_HH
index 8c35be601dcc7860576ad069527fca5e7b81da65..90e3bc23e2ef3855a630a42cb73e3b1d4d4113ac 100644 (file)
@@ -22,7 +22,7 @@ public:
 protected:
   virtual ~Chord_tremolo_iterator ();
   virtual Moment pending_moment () const;
-  virtual void construct_children  () ;
+  virtual void construct_children () ;
   virtual bool ok () const;
   virtual void process (Moment) ;
   virtual Music_iterator *try_music_in_children (Music *) const;
index 1b6b856927fedc8007c5061d23bf0dacce79e02c..e60fe80483420efb404d6f5808a535ea15e2ea94 100644 (file)
@@ -16,7 +16,7 @@
   functions
   
   ``chord'' is encoded:
 (PITCHES . (INVERSION . BASS))
+ (PITCHES . (INVERSION . BASS))
 
   Chord:: namespace...  */
 class Chord
index a436219de1c4a17e0aca80171df5abd71165d3d7..85be436897e230341f3c4325ec61bf84694f8fc2 100644 (file)
@@ -14,8 +14,8 @@
 
 struct Clef 
 {
-  DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM ));
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
   static bool has_interface (Grob*);
   static void set_interface (Grob*);
 };
index 798634244e8fe6365c7086fb22ce867f8bd64a19..712fe371f9028cfbf57c9dbdc60dd80f411aad78 100644 (file)
@@ -30,7 +30,7 @@ class Collision                       // interface
 public:
   static SCM automatic_shift (Grob*);
   static SCM forced_shift (Grob*);
-  DECLARE_SCHEME_CALLBACK(force_shift_callback, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK (force_shift_callback, (SCM element, SCM axis));
   static void do_shifts (Grob*);
   static void add_column (Grob*me,Grob*ncol_l);
 };
index 3e186c57aea45a8aadc0de50bca864035843c29a..e8688d3bcdfed2b776ca091cff411669aef48e3f 100644 (file)
@@ -18,7 +18,7 @@ struct Column_x_positions
   Real force_f_;
   bool satisfies_constraints_b_;
 
-  Column_x_positions();
+  Column_x_positions ();
 };
 
 
index 193636d04c0fcfc9f39bceef2fa26c36ff69afa0..2670690a3eb5f73ae07d8098ef6944699903d11e 100644 (file)
@@ -21,14 +21,14 @@ public:
 
   Break_req ();
 protected:
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 class Mark_req : public Request {
 public:
   virtual bool do_equal_b (Request const*) const;
   SCM mark_label ();
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 /*
@@ -37,22 +37,20 @@ public:
 class Tempo_req : public Request
 {
 public:
-  Tempo_req();
+  Tempo_req ();
 protected:
-
-  VIRTUAL_COPY_CONS(Music);
-  bool do_equal_b (Request const *) const;
+  VIRTUAL_COPY_CONS (Music);
 };
 
 /// check if we're at start of a  measure.
 class Barcheck_req  : public Request  {
 public:
   bool do_equal_b (Request const *) const;
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 class Breathing_sign_req : public Request {
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 /**
@@ -64,9 +62,9 @@ public:
   SCM pitch_alist ();
   
 protected:
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
   void transpose (Pitch  d);
-  bool do_equal_b (Request const * )const; 
 };
 
 #endif // COMMANDREQUEST_HH
+
index 29eeb68fbfa2f808fffcae499605799514785cbd..c68cb9e2c0090bcd1f15f7cdc100bf40ccc17c38 100644 (file)
 
 class Context_specced_music : public Music_wrapper
 {
-public:  
+public:
+  Context_specced_music ();
   Context_specced_music (SCM);
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 #endif /* CONTEXT_SPECCED_MUSIC_HH */
 
index 028982f18f0dca6ff0c132bd97da20d20475059c..18a421d84d35dbbc2e6dbede1eb7a6c2ec1fca74 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
 (C) 2000 Juergen Reuter <reuterj@ira.uka.de>
+ (C) 2000 Juergen Reuter <reuterj@ira.uka.de>
 */
 
 #ifndef CUSTOS_HH
 
 struct Custos
 {
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
   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_p_);
   static Molecule create_ledger_line (Interval x_extent, Grob *me) ;
 
 };
index 4c8d6d59ebd0ef3a09da49f990de5ec9b4924e26..a3186ec4e133401fe71b1a017a1c6329c8eb9825 100644 (file)
@@ -11,8 +11,8 @@
 #define DIMENSION_CACHE_CALLBACK_HH
 
 
-typedef Interval (*Dim_cache_callback)(Grob *,Axis);
-typedef Real (*Offset_callback)(Grob *,Axis);
+typedef Interval (*Dim_cache_callback) (Grob *,Axis);
+typedef Real (*Offset_callback) (Grob *,Axis);
 
 #endif /* DIMENSION_CACHE_CALLBACK_HH */
 
index 576879b5a2e7922a0eb9042310bf6df880874e77..a671878f438a51c1eb783921b34760582e6053ce 100644 (file)
@@ -46,7 +46,7 @@ struct Dimension_cache
    */
   Grob * parent_l_;
 
-  Dimension_cache(Dimension_cache const&);
+  Dimension_cache (Dimension_cache const&);
   Dimension_cache ();
   void init ();
 };
index 448ef9d809f9229cd96d587f6c77bee1591ef329..81685e377a0762815688fdc3b3590e75cebcbd2e 100644 (file)
@@ -16,7 +16,7 @@ struct Directional_element_interface
 {
 public:
   static SCM direction_sym ;
-  static void set  (Grob*,Direction d);
+  static void set (Grob*,Direction d);
   static Direction get (Grob*) ;
   static bool has_interface (Grob*) ;
 };
index 4757501f63750b70d9bcf69b2e658abfe9a8f4e8..8cf53ae02a485eb3185c5a559660231abd510971 100644 (file)
@@ -22,7 +22,7 @@ public:
   static void add_head (Grob * dotcol, Grob* rh );
   static void set_interface (Grob*);
   static bool has_interface (Grob*);
-  DECLARE_SCHEME_CALLBACK(force_shift_callback, (SCM ,SCM));
+  DECLARE_SCHEME_CALLBACK (force_shift_callback, (SCM ,SCM));
   static SCM do_shifts (SCM dotlist);
 };
 #endif // DOT_COLUMN_HH
index 72c85f09f2aca76ce58f8537d0873c114ff58e5e..1f293a9fa3ab7ae5f7d426ed06f7a7dc076e1557 100644 (file)
@@ -18,8 +18,8 @@
 class Dots
 {
 public:
-  DECLARE_SCHEME_CALLBACK(quantised_position_callback, (SCM element, SCM axis));
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (quantised_position_callback, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
 };
 
 #endif // DOTS_HH
index 06680e1b9e8d8d9f41768e57e270064336a2a2e2..685bddb5fc94cde14a563262225537dcdc7b1b5b 100644 (file)
@@ -27,8 +27,8 @@ struct Duration {
   static int compare (Duration const&, Duration const&);
 
   SCM smobbed_copy () const;
-  DECLARE_SCHEME_CALLBACK(less_p, (SCM a, SCM b));
-  DECLARE_SIMPLE_SMOBS(Duration,);
+  DECLARE_SCHEME_CALLBACK (less_p, (SCM a, SCM b));
+  DECLARE_SIMPLE_SMOBS (Duration,);
 
 public:
   int duration_log ()const;
@@ -44,8 +44,8 @@ private:
 };
 
 #include "compare.hh"
-INSTANTIATE_COMPARE(Duration, Duration::compare);
-Duration*unsmob_duration(SCM);
+INSTANTIATE_COMPARE (Duration, Duration::compare);
+Duration*unsmob_duration (SCM);
 // int compare (Array<Duration>*, Array<Duration>*);
 
 #endif // DURATION_HH
index 65aadbca8e134c1b8f3cc896cc1ad5880280b013..9b7c69d50c38007dd08fbf3fa71d261e7679064d 100644 (file)
@@ -31,9 +31,9 @@ protected:
   
   
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
 
-  virtual void do_announces();
+  virtual void do_announces ();
   virtual void announce_grob (Grob_info);
   virtual void process_music ();
 private:
index d06055ec379ba5690f2c3e62fdca0a25fba95fde..66475cd36eea32fad811029be76cf1cd5b0ea7d0 100644 (file)
@@ -49,8 +49,8 @@ protected:
   virtual void announce_grob (Grob_info);
   virtual void process_music ();
 public:
-  VIRTUAL_COPY_CONS(Translator);
-  Engraver_group_engraver * daddy_grav_l() const;
+  VIRTUAL_COPY_CONS (Translator);
+  Engraver_group_engraver * daddy_grav_l () const;
   /**
     override other ctor
    */
index a75a25b5b56cb4e0076d966e54550936dc970ce1..03aa03898cd72db18eac5b750f4a569f8d62b0e9 100644 (file)
@@ -19,8 +19,8 @@ struct Font_interface
   static Font_metric * get_font (Grob*, SCM alist_chain);
   static Font_metric * get_default_font (Grob*);
   static SCM add_style (Grob*, SCM style, SCM alist_chain);
-  static bool wild_compare(SCM field_val, SCM val);
-  DECLARE_SCHEME_CALLBACK(properties_to_font_name, (SCM,SCM));
+  static bool wild_compare (SCM field_val, SCM val);
+  DECLARE_SCHEME_CALLBACK (properties_to_font_name, (SCM,SCM));
 };
 
 #endif /* FONT_INTERFACE_HH */
index 24c9cc10322404e21e83fbdcd04c807dd5051fcc..0bea74247ef4e161d8895a29e9edcaa939251099 100644 (file)
@@ -25,7 +25,7 @@ public:
   virtual Box text_dimension (String)  const;
   virtual Molecule find_by_name (String) const;
 
-  DECLARE_SMOBS(Font_metric,);
+  DECLARE_SMOBS (Font_metric,);
 private:
   Font_metric (Font_metric const&); // no copy.
 protected:
index 03ecd384577dd43a715442fa40ef93c6d3d706e2..05f3a2d8c8b0b4b43c38f906d4c5c81190d1115d 100644 (file)
@@ -21,7 +21,7 @@ public:       \
 }  _ ## y ## _ctor_init;       \
 
 
-#define ADD_GLOBAL_CTOR(x) ADD_GLOBAL_CTOR_WITHNAME(x,x);
+#define ADD_GLOBAL_CTOR(x) ADD_GLOBAL_CTOR_WITHNAME (x,x);
 
 
 typedef void (* Global_ctor ) ();
index 606fea37bb491908909bf4be74650029cdf7d35c..51c125c9c2364092cbee5fcd3c5065943ab46206 100644 (file)
 class Global_translator : public virtual Translator_group{
   PQueue<Moment> extra_mom_pq_;
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Moment final_mom_;
   Moment prev_mom_;
   Moment now_mom_;
-  Global_translator();
+  Global_translator ();
 
-  int moments_left_i() const;
+  int moments_left_i () const;
   Moment sneaky_insert_extra_moment (Moment);
   void add_moment_to_process (Moment);
   void run_iterator_on_me (Music_iterator*);
@@ -32,8 +32,8 @@ public:
   virtual Music_output *get_output_p ();     
   virtual void prepare (Moment);
   virtual void one_time_step ();
-  virtual void finish();
-  virtual void start();
+  virtual void finish ();
+  virtual void start ();
 
   virtual Moment now_mom () const;
 
index 54da51c85c0b6413d50e391fe23990bcbb0d9fdf..67800259038f259d8400cd7f68b0000a65465cbc 100644 (file)
@@ -17,8 +17,8 @@
  */
 struct Gourlay_breaking : public Break_algorithm
 {
-  Array<Column_x_positions> do_solve() const;
-  Gourlay_breaking();
+  Array<Column_x_positions> do_solve () const;
+  Gourlay_breaking ();
   Real combine_demerits (Column_x_positions const&,Column_x_positions const&) const;
 };
 #endif // GOURLAY_BREAKING_HH
index b89bd6ef90c9a6af57ed21c89870f20cc8b41a99..f90650b844fba68f4b1c815fd02d250ba9771937 100644 (file)
@@ -19,7 +19,7 @@ class Grace_align_item
 public:
   static void set_interface (Grob*);
   static bool has_interface (Grob*);
-  DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM ));
+  DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
 };
 #endif /* GRACE_ALIGN_ITEM_HH */
 
index 1419ce3e831aba8c66363b92929dca171f83df37..a918311208065bf73b2ea2ae40b3558e3ea912fc 100644 (file)
@@ -20,7 +20,7 @@ class Grace_engraver_group : public Engraver_group_engraver, public Global_trans
   bool calling_self_b_;
   bool pass_to_top_b (Music *) const;
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Grace_engraver_group ();
 protected:
   virtual void initialize ();
index 5392b734ccb68883c8dc6a923fc9b9b17d3ed3fe..47def5db9d95ad69c2756cf69b44728411011153 100644 (file)
@@ -15,8 +15,9 @@
 class Grace_music : public Music_wrapper
 {
 public:
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
   Grace_music (SCM);
+  Grace_music ();
 protected:
   virtual void compress (Moment);
   virtual Moment length_mom () const;
index f7d2b932219ecd1365145b6f83543a559e28c3c2..da1275393cf66b43c93d8557651814781035feca 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-   (c) 1999--2001 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 1999--2001 Jan Nieuwenhuizen <janneke@gnu.org>
   
  */
 
@@ -19,7 +19,7 @@ class Grace_performer_group : public Performer_group_performer, public Global_tr
   Array<Audio_element_info> announce_to_top_;
   bool calling_self_b_;
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Grace_performer_group ();
 protected:
   virtual void announce_element (Audio_element_info);
index 86997faaee242889f8b68402c7d365ef8efc31dc..c8f57c20aad655e5cebb051a5d9d0163040d3493 100644 (file)
@@ -28,7 +28,7 @@ public:
 
 
   Grob_info (Grob*, Music*);
-  Grob_info();
+  Grob_info ();
 };
 
 
index 3940b7f58a5ac59fbce5799f9c1f9a80fe4de1dd..dc95ba514311b805fad570ffea75c3bf1ead75b7 100644 (file)
@@ -85,7 +85,7 @@ public:
   bool linked_b () const;
 
 
-  VIRTUAL_COPY_CONS(Grob);
+  VIRTUAL_COPY_CONS (Grob);
  
   /**
      Recursively track all dependencies of this Grob.  The
@@ -108,9 +108,9 @@ public:
   
   void suicide ();
   
-  DECLARE_SCHEME_CALLBACK(preset_extent, (SCM smob, SCM axis));
-  DECLARE_SCHEME_CALLBACK(point_dimension_callback, (SCM smob, SCM axis));
-  DECLARE_SCHEME_CALLBACK(molecule_extent, (SCM smob, SCM axis));
+  DECLARE_SCHEME_CALLBACK (preset_extent, (SCM smob, SCM axis));
+  DECLARE_SCHEME_CALLBACK (point_dimension_callback, (SCM smob, SCM axis));
+  DECLARE_SCHEME_CALLBACK (molecule_extent, (SCM smob, SCM axis));
 
 
   static SCM ly_set_grob_property (SCM, SCM,SCM);
@@ -123,7 +123,7 @@ public:
   virtual void handle_prebroken_dependencies ();
 
 
-  DECLARE_SMOBS(Grob,foo);
+  DECLARE_SMOBS (Grob,foo);
 
   void init ();
 
@@ -171,7 +171,7 @@ public:
   void set_parent (Grob* e, Axis);
   
   Grob *parent_l (Axis a) const;
-  DECLARE_SCHEME_CALLBACK(fixup_refpoint, (SCM));
+  DECLARE_SCHEME_CALLBACK (fixup_refpoint, (SCM));
 };
 
 Grob * unsmob_grob (SCM);
index 52312d6f976cbc64c0eac19d2f4871465f9ae9bc..9f1fc528db9cae8a0a3ee446973b3c6b3ed8a3e1 100644 (file)
@@ -17,9 +17,9 @@
 class Hara_kiri_group_spanner 
 {
 public:
-  DECLARE_SCHEME_CALLBACK(force_hara_kiri_callback, (SCM ,SCM));
-  DECLARE_SCHEME_CALLBACK(y_extent, (SCM smob, SCM axis));
-  DECLARE_SCHEME_CALLBACK(force_hara_kiri_in_parent_callback, (SCM ,SCM));
+  DECLARE_SCHEME_CALLBACK (force_hara_kiri_callback, (SCM ,SCM));
+  DECLARE_SCHEME_CALLBACK (y_extent, (SCM smob, SCM axis));
+  DECLARE_SCHEME_CALLBACK (force_hara_kiri_in_parent_callback, (SCM ,SCM));
   static void add_element (Grob *me, Grob *e);
   static void set_interface (Grob*me);
   static bool has_interface (Grob*);
index 2cdcdab2fcc8aa97ddb4e8792f1556945eb7e889..ad4870a9d540ad8cdba1a2adf2e117ac3d0a77dd 100644 (file)
@@ -13,9 +13,9 @@ struct Hyphen_spanner
 {
 public:
   Spanner* elt_l_;
-  Hyphen_spanner  (Spanner*);
+  Hyphen_spanner (Spanner*);
   void set_textitem (Direction, Grob*);
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
 };
 
 #endif // HYPHEN_SPANNER_HH
index 4d630936c03cb83574fd365cff593bf81da24688..8b05d48b84456517adc9e9d70b5c481c1972b1f7 100644 (file)
@@ -19,7 +19,7 @@ public:
   Interpretation_context_handle* clone () const;
   void set_translator (Translator_group*);
   bool try_music (Music *);
-  void operator =(Interpretation_context_handle const&);
+  void operator = (Interpretation_context_handle const&);
   Interpretation_context_handle (Interpretation_context_handle const&);
   Translator_group * report_to_l () const;
 
index 0591a8078138a57148314903295219c26b2c59c9..5748fea2bbb0cd6c18244df36509b1d3f9e9f7af 100644 (file)
@@ -26,7 +26,7 @@ class Item : public Grob
   Drul_array<Item*> broken_to_drul_;
 
 public:
-  VIRTUAL_COPY_CONS(Grob);
+  VIRTUAL_COPY_CONS (Grob);
   Item (SCM);
   Item (Item const &);
 
@@ -38,12 +38,12 @@ public:
   Item * find_prebroken_piece (Direction) const;
   Grob * find_broken_piece (Line_of_score*) const;    
 
-  virtual Line_of_score * line_l() const;
+  virtual Line_of_score * line_l () const;
   virtual Paper_column * column_l () const;
   virtual void handle_prebroken_dependencies ();
 protected:
   virtual void discretionary_processing ();
-  void copy_breakable_items();
+  void copy_breakable_items ();
   virtual SCM do_derived_mark ();
 };
 
index cb8e28aab8695c25ba30d4ce6539ade714a05631..8b32647c4e05ad61e76c3ddf76e10fdfc0c42b97 100644 (file)
 
 struct Key_item
 {
-  static int calculate_position(Grob*,SCM pair) ;
+  static int calculate_position (Grob*,SCM pair) ;
   static void set_interface (Grob*);
   static bool has_interface (Grob*);
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
 };
 
 #endif // KEYITEM_HH
index 95e7df7209f3f1e2bfdba2a8d9998cef8be98ee1..e6b0f54398a66aad747ca0351061a900af5bb71c 100644 (file)
@@ -3,7 +3,7 @@ kpath.hh -- declare kpath funcs.
 
 source file of the GNU LilyPond music typesetter
 
-(c) 2000--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2000--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
  */
 
index d2cf5074eec1a7ed38cca1b560e9dfc9cc56e4e8..cde9d412a3059c509c8dbd63366e5fb6cd23e754 100644 (file)
@@ -83,19 +83,19 @@ SCM index_set_cell (SCM cellp, Direction d, SCM val);
 /*
   snarfing.
  */
-void add_scm_init_func (void (*)());
+void add_scm_init_func (void (*) ());
 
 
-typedef SCM(*Scheme_function_unknown)();
+typedef SCM (*Scheme_function_unknown) ();
 
 #if __GNUC_MINOR__ >= 96
-typedef SCM(*Scheme_function_0)();
-typedef SCM(*Scheme_function_1)(SCM);
-typedef SCM(*Scheme_function_2)(SCM,SCM);       
+typedef SCM (*Scheme_function_0) ();
+typedef SCM (*Scheme_function_1) (SCM);
+typedef SCM (*Scheme_function_2) (SCM,SCM);     
 #else
-typedef SCM(*Scheme_function_0)(...);
-typedef SCM(*Scheme_function_1)(...);
-typedef SCM(*Scheme_function_2)(...);
+typedef SCM (*Scheme_function_0) (...);
+typedef SCM (*Scheme_function_1) (...);
+typedef SCM (*Scheme_function_2) (...);
 #endif
 
 #define DECLARE_SCHEME_CALLBACK(NAME,ARGS) \
@@ -108,10 +108,10 @@ void                                                              \
 TYPE ## _ ## FUNC ## _init_functions ()                                        \
 {                                                              \
   TYPE :: FUNC ## _proc = gh_new_procedure ## ARGCOUNT  ## _0 (#TYPE "::" #FUNC, \
 ((Scheme_function_ ## ARGCOUNT)TYPE :: FUNC));                               \
((Scheme_function_ ## ARGCOUNT)TYPE :: FUNC));                                \
 }                                                              \
                                                                \
-ADD_SCM_INIT_FUNC(TYPE ## _ ## FUNC ## _callback, TYPE ## _ ## FUNC ## _init_functions);       \
+ADD_SCM_INIT_FUNC (TYPE ## _ ## FUNC ## _callback, TYPE ## _ ## FUNC ## _init_functions);      \
 
 
 #define ADD_SCM_INIT_FUNC(name, func)\
index 94e0adb01637627a634403d4a83a0b6cb5dec579..7259cd3b28f7557ad0c97f5767f95520ac24a710 100644 (file)
@@ -3,7 +3,7 @@
 
  source file of the GNU LilyPond music typesetter
 
- (c) 1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 (c) 1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #ifndef LILY_PROTO_HH
@@ -173,10 +173,8 @@ class Tie_performer;
 class Tie_req;
 class Time_scaled_music;
 class Time_scaled_music_iterator;
-class Time_signature_change_req;
 class Time_signature_performer;
 class Timing_engraver;
-class Timing_req;
 class Timing_translator;
 class Translation_property;
 class Translator;
index 4774141b3882645da32fe02639a9c80131ea149d..49751d8b0810ffa72466c013cb5f90bd02a87ae2 100644 (file)
@@ -23,13 +23,13 @@ protected:
   Spanner *staffline_p_;   
 
   virtual void create_line_spanner ();
-  virtual void initialize();
-  virtual void finalize();
+  virtual void initialize ();
+  virtual void finalize ();
   virtual void typeset_grob (Grob*);
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   
-  Line_group_engraver_group();
+  Line_group_engraver_group ();
 };
 
 
index 88068617f936826247e909b143499b89f3843cdf..e2c2fc4b73df22a269333a117cee931f8860983d 100644 (file)
@@ -15,9 +15,9 @@ class Line_of_score : public Spanner
 {
 public:
   int rank_i_;
-  void post_processing(bool);
+  void post_processing (bool);
 
-  Line_of_score(SCM);
+  Line_of_score (SCM);
   /// is #c# contained in #*this#?
   bool contains_b (Paper_column const *c) const;
   int element_count () const;
@@ -34,7 +34,7 @@ public:
   void output_scheme (SCM);
   void pre_processing ();
 protected:
-  VIRTUAL_COPY_CONS(Grob);
+  VIRTUAL_COPY_CONS (Grob);
 };
 
 #endif
index c38d5458293d5f26b3d7eca2d622f23e0b3701c7..0405b9c5066a77bc3a518759223e7f46cd2ce583 100644 (file)
@@ -25,14 +25,14 @@ void init_type_p_ ## CL ()\
 {\
   scm_make_gsubr (FUNCNAME, 1, 0, 0, (Scheme_function_unknown) CL::smob_p);\
 }\
-ADD_SCM_INIT_FUNC(init_type_p_ ## CL, init_type_p_ ## CL)
+ADD_SCM_INIT_FUNC (init_type_p_ ## CL, init_type_p_ ## CL)
 
 #ifndef SCM_CELL_TYPE
-#define SCM_CELL_TYPE(X) SCM_CAR(X)
+#define SCM_CELL_TYPE(X) SCM_CAR (X)
 #endif
 
 #ifndef SCM_CELL_WORD_1
-#define SCM_CELL_WORD_1(X) SCM_CDR(X)
+#define SCM_CELL_WORD_1(X) SCM_CDR (X)
 #endif
 
 
@@ -41,7 +41,7 @@ long CL::smob_tag_;                                           \
 SCM                                                            \
 CL::smob_p (SCM s)                                             \
 {                                                              \
-  if (SCM_NIMP(s) && SCM_CELL_TYPE(s) == smob_tag_)            \
+  if (SCM_NIMP (s) && SCM_CELL_TYPE (s) == smob_tag_)          \
     return SCM_BOOL_T;                                         \
   else                                                         \
     return SCM_BOOL_F;                                         \
@@ -57,30 +57,30 @@ CL::init_smobs ()                                           \
 SCM CL::smobbed_self () const                                  \
 {                                                              \
   SCM s;                                                       \
-  s = gh_cons (SCM_PACK(CL::smob_tag_), SCM_PACK(this));       \
-  scm_done_malloc(sizeof(CL));                                 \
+  s = gh_cons (SCM_PACK (CL::smob_tag_), SCM_PACK (this));     \
+  scm_done_malloc (sizeof (CL));                                       \
                                                                \
   return s;                                                    \
 }                                                              \
 CL *                                                           \
 CL::unsmob (SCM s)                                             \
 {                                                              \
-  if (SCM_NIMP(s) && SCM_CELL_TYPE(s) == smob_tag_)            \
-    return (CL*) SCM_CELL_WORD_1(s);                           \
+  if (SCM_NIMP (s) && SCM_CELL_TYPE (s) == smob_tag_)          \
+    return (CL*) SCM_CELL_WORD_1 (s);                          \
   else                                                         \
     return 0;                                                  \
 }                                                              \
 scm_sizet                                                      \
 CL::free_smob (SCM ses)                                                \
 {                                                              \
-  CL * s = (CL*) SCM_CDR(ses);                                 \
+  CL * s = (CL*) SCM_CDR (ses);                                        \
    delete s;                                                   \
   return sizeof (CL);                                          \
 }                                                              \
-ADD_SCM_INIT_FUNC(CL, CL::init_smobs)
+ADD_SCM_INIT_FUNC (CL, CL::init_smobs)
 
 #define IMPLEMENT_SMOBS(CL)                                                    \
-IMPLEMENT_SIMPLE_SMOBS(CL)                                                     \
+IMPLEMENT_SIMPLE_SMOBS (CL)                                                    \
 SCM                                                                            \
 CL::smobify_self ()                                                            \
 {                                                                              \
@@ -96,15 +96,15 @@ CL::unprotected_smobify_self ()                                                             \
     that S isn't GC-ed from under us.                                          \
                                                                                \
     We don't use smobbed_self () to ensure that mark_smob () doesn't have to   \
-    deal half-initialized objects: scm_done_malloc( ) might trigger GC.                \
+    deal half-initialized objects: scm_done_malloc ( ) might trigger GC.               \
     the warning in smobs.hh is just to be doubleplus goodly sure               \
    */                                                                          \
   SCM s;                                                                               \
-  SCM_NEWCELL(s);                                                              \
-  SCM_SETCAR(s,CL::smob_tag_);                                                 \
-  SCM_SETCDR (s, SCM_PACK(this));                                              \
+  SCM_NEWCELL (s);                                                             \
+  SCM_SETCAR (s,CL::smob_tag_);                                                        \
+  SCM_SETCDR (s, SCM_PACK (this));                                             \
   self_scm_ = s;                                                               \
- scm_done_malloc(sizeof(CL));                                                  \
+ scm_done_malloc (sizeof (CL));                                                        \
   return s;                                                                    \
 }
 
index a2fcd65daec0f612d7865e01e90dad93b4c87bb4..e9711a1d3cffebc64236f3e4b0e8338f62f7ebbe 100644 (file)
@@ -18,10 +18,11 @@ public:
   Music * music_l () const;
   Music * lyrics_l () const;
   
+  Lyric_combine_music ();
   Lyric_combine_music (SCM);
   virtual void transpose (Pitch);
 
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
   virtual Moment length_mom () const;
   virtual Pitch to_relative_octave (Pitch);
   virtual void compress (Moment);
index 48595e43e0fff3fa25998b7d0c99bc6a435a5f88..1b76b715acedff58f3833a9bc7acd629e6f2761f 100644 (file)
@@ -29,7 +29,7 @@ class Lyric_extender
 {
 public:
   static void set_textitem (Spanner*, Direction, Grob*);
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
 };
 
 #endif // EXTENDER_SPANNER_HH
index f0e02bcfe79d4b90ee3fe3629ac6e5192132d901..68996710f9a24b6a61a925bafd4593821c0e84e3 100644 (file)
@@ -26,27 +26,27 @@ class Syllable_group;
 /* 
 * Build an engraver that catches noteheads and lyrics.
 
-(It needs to be in a context above Staff and Lyrics, eg. in Score
+ (It needs to be in a context above Staff and Lyrics, eg. in Score
 context.)
 
 * Determine which heads belong to which lyrics
 
-(eg. by looking at the names of their originating contexts, or maybe
+ (eg. by looking at the names of their originating contexts, or maybe
 some \properties)
 
 * Attach the lyrics to the appropriate heads
 
-(by doing lyric->set_parent (head, X_AXIS), that will fix the current
+ (by doing lyric->set_parent (head, X_AXIS), that will fix the current
 noteheadwidth guessing kludge)
 
 * Check if the lyric syllables end or start a phrase.
 
-(eg. check if the syllable ends with punctuation, and remember that
+ (eg. check if the syllable ends with punctuation, and remember that
 fact for the next one.)
 
 * Adjust their alignment accordingly. 
 
-(eg. by doing lyric->add_offset_callback(centered_on_parent,X_AXIS)
+ (eg. by doing lyric->add_offset_callback (centered_on_parent,X_AXIS)
 and setting self-alignment-X)
 
 * Add a property to switch on/off the engraver (for multi stanza
@@ -62,16 +62,16 @@ for melismas as well.
 class Lyric_phrasing_engraver : public Engraver 
 {
 protected:
-  virtual void acknowledge_grob(Grob_info);
+  virtual void acknowledge_grob (Grob_info);
   virtual void create_grobs ();
-  virtual void stop_translation_timestep();
+  virtual void stop_translation_timestep ();
   virtual void finalize ();  
 private:
-  void record_notehead(const String &context_id, Grob * notehead);
-  void record_lyric(const String &context_id, Grob * lyric);
-  void record_melisma(const String &context_id);
-  void record_extender(const String &context_id, Grob * extender);
-  Syllable_group * lookup_context_id(const String &context_id);
+  void record_notehead (const String &context_id, Grob * notehead);
+  void record_lyric (const String &context_id, Grob * lyric);
+  void record_melisma (const String &context_id);
+  void record_extender (const String &context_id, Grob * extender);
+  Syllable_group * lookup_context_id (const String &context_id);
 
 public:
   Lyric_phrasing_engraver ();
@@ -97,25 +97,25 @@ class Syllable_group
   bool melisma_b_;
   Real group_translation_f_;
 public:
-  static SCM make_entry();
-  void set_first_in_phrase(bool f);
-  void set_notehead(Grob * notehead);
-  void add_lyric(Grob * lyric);
-  void add_extender(Grob * extender);
-  void set_melisma() { melisma_b_ = true; }
-  bool get_melisma() { return melisma_b_; }
-  int lyric_count() { return lyric_list_.size(); }
-  void clear();
-  bool is_empty();
-  bool set_lyric_align(const char *punc, Grob *default_notehead_l);
-  void adjust_melisma_align();
-  int appropriate_alignment(const char *punc);
-  Real amount_to_translate();
-  void next_lyric();
-  void copy(Syllable_group *);
+  static SCM make_entry ();
+  void set_first_in_phrase (bool f);
+  void set_notehead (Grob * notehead);
+  void add_lyric (Grob * lyric);
+  void add_extender (Grob * extender);
+  void set_melisma () { melisma_b_ = true; }
+  bool get_melisma () { return melisma_b_; }
+  int lyric_count () { return lyric_list_.size (); }
+  void clear ();
+  bool is_empty ();
+  bool set_lyric_align (const char *punc, Grob *default_notehead_l);
+  void adjust_melisma_align ();
+  int appropriate_alignment (const char *punc);
+  Real amount_to_translate ();
+  void next_lyric ();
+  void copy (Syllable_group *);
 private:
-  Syllable_group();
-  DECLARE_SIMPLE_SMOBS(Syllable_group,);
+  Syllable_group ();
+  DECLARE_SIMPLE_SMOBS (Syllable_group,);
 } ;
 
 Syllable_group * unsmob_voice_entry (SCM);
index 5405857a4b191ad474fb019d033ed5e643fb605d..1521bbd4c990718cdaa7424c79ff5dd9192d367b 100644 (file)
 
 #include "lily-proto.hh"
 
-void debug_init();
+void debug_init ();
 void set_debug (bool);
-void do_scores();
-void clear_scores();
+void do_scores ();
+void clear_scores ();
 void add_score (Score* s);
 void set_default_output (String s);
 String find_file (String);
index 1c4c1fe205739a2db83366bde05e464d5c4773fa..9ec31677208695d1b9a17b7fdf0727f772ccdb56 100644 (file)
@@ -23,14 +23,14 @@ class Midi_def : public Music_output_def {
   static int score_count_i_;
 
 public:
-  VIRTUAL_COPY_CONS(Music_output_def);
+  VIRTUAL_COPY_CONS (Music_output_def);
 
-  Midi_def();
+  Midi_def ();
 
   int get_tempo_i (Moment moment);
   void set_tempo (Moment moment, int count_per_minute_i);
   virtual int get_next_score_count () const;
-  static void reset_score_count();
+  static void reset_score_count ();
 };
 
 #endif // MIDI_DEF_HH
index 3881993ab10af4fb80b54e51a0d16ace2d4faf28..599b3a2b16adff7b3c189c94210e463d18b9e3d4 100644 (file)
 /// Midi outputfile
 struct Midi_stream {
   Midi_stream (String filename_str);
-  ~Midi_stream();
+  ~Midi_stream ();
 
-  Midi_stream& operator <<( String str);
-  Midi_stream& operator <<( Midi_item const& midi_c_r);
-  Midi_stream& operator <<( int i);
+  Midi_stream& operator << ( String str);
+  Midi_stream& operator << ( Midi_item const& midi_c_r);
+  Midi_stream& operator << ( int i);
 
-  void open();
+  void open ();
 
   ostream* os_p_;
   String filename_str_;
index 766bc08e5c85e480baa0374bf1c8be2596669997..342983f5f16b5e5e5e7da799c88d9b8dcf61f775 100644 (file)
@@ -15,7 +15,7 @@
 struct Midi_note_event : PQueue_ent<Moment, Midi_note*>
 {
   bool ignore_b_;
-  Midi_note_event();
+  Midi_note_event ();
 };
 
 int compare (Midi_note_event const& left, Midi_note_event const& right);
@@ -27,10 +27,10 @@ class Midi_walker
 {
 public:
   Midi_walker (Audio_staff* audio_staff_l, Midi_track* midi_track_l);
-  ~Midi_walker();
+  ~Midi_walker ();
 
-  void process();
-  void operator ++(int);
+  void process ();
+  void operator ++ (int);
   bool ok () const;
 private:
   void do_start_note (Midi_note* note_p);
index 5f3fa895e78f5a327ae9dee7349d9a459a50873c..5e19689bb3812cf932c18076df359c4e0ada7e2d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*   
-  minmax.cc --  implement minmax()
+  minmax.cc --  implement minmax ()
   
   source file of the GNU LilyPond music typesetter
   
index 917c66a6b67163a6639c361946e18ccb0dfe97b6..892dca89f2145d33799bd3e55719a5c1ca473095 100644 (file)
@@ -7,8 +7,8 @@
 #include "array.hh"
 #include "interval.hh"
 
-double log_2(double x) ;
-int intlog2(int d);
+double log_2 (double x) ;
+int intlog2 (int d);
 
 inline int
 sign (int i)
index 41eb304160eea9bb66c784634e4db1b5da2ea353..a8a342527917d9c539ccb484f0e45e4b0d568790 100644 (file)
 
     Empty molecules have empty dimensions.  If add_at_edge is used to
     init the molecule, we assume that
-    DIMENSIONS = (Interval(0,0),Interval(0,0)
+    DIMENSIONS = (Interval (0,0),Interval (0,0)
 */
 class Molecule {
   Box dim_;
   SCM expr_;
 
   
-  DECLARE_SIMPLE_SMOBS(Molecule,);  
+  DECLARE_SIMPLE_SMOBS (Molecule,);  
 public:
   Molecule (Box, SCM s);
-  Molecule();
+  Molecule ();
 
 
   SCM smobbed_copy () const;
   SCM get_expr () const;
 
   /**
-     Set dimensions to empty, or to (Interval(0,0),Interval(0,0) */
+     Set dimensions to empty, or to (Interval (0,0),Interval (0,0) */
   void set_empty (bool);
   void add_at_edge (Axis a, Direction d, const Molecule &m, Real padding);
   void add_molecule (Molecule const &m);
@@ -63,9 +63,9 @@ public:
   /**
      align D direction in axis A.
 
-     If D == CENTER, then move the dimension(A).center() to (0,0)
+     If D == CENTER, then move the dimension (A).center () to (0,0)
 
-     Else, move so dimension(A)[D] == 0.0
+     Else, move so dimension (A)[D] == 0.0
      
    */
   void align_to (Axis a, Direction d);
@@ -77,7 +77,7 @@ public:
      codify THIS into a Scheme expression.
    */
   SCM create_scheme () const;
-  bool empty_b() const;
+  bool empty_b () const;
 
 
   static SCM ly_get_molecule_extent (SCM mol, SCM axis);
index 2113ab9f60dacd458fd474993761a51acaeafdcf..7810f2063f1a7323ce1fe8e6c60c5f497c8961a3 100644 (file)
@@ -19,7 +19,7 @@
    FIXME: remove self_scm_ and then remove this class */
 class Moment : public Rational
 {
-  DECLARE_SIMPLE_SMOBS(Moment,);
+  DECLARE_SIMPLE_SMOBS (Moment,);
 public:
   Moment () { }
   Moment (int m) : Rational (m) { }
index 2a6ef9fae02cd13ec6e000a9f5699939e232ee66..887e0b504e9901485e73e5e6d354080cb63cdbe0 100644 (file)
@@ -19,9 +19,10 @@ class Multi_measure_rest
 public:
   static void set_interface (Grob*);
   static bool has_interface (Grob*);
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (percent, (SCM));
   static  void add_column (Grob*,Item*);
-  DECLARE_SCHEME_CALLBACK(set_spacing_rods, (SCM ));
+  DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM ));
 };
 
 #endif /* MULTI_MEASURE_REST_HH */
diff --git a/lily/include/music-constructor.hh b/lily/include/music-constructor.hh
new file mode 100644 (file)
index 0000000..587db25
--- /dev/null
@@ -0,0 +1,35 @@
+/*   
+  music-constructor.hh -- declare Music_constructor
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef MUSIC_CONSTRUCTOR_HH
+#define MUSIC_CONSTRUCTOR_HH
+
+#include "lily-proto.hh"
+#include "string.hh"
+#include "global-ctor.hh"
+
+#define ADD_MUSIC(type) \
+Music * _ ## type ## _ctor ()\
+{\
+  return new type;\
+}\
+static void  _ ## type ## _adder () {\
+      add_music_ctor (#type, & _ ## type ## _ctor);\
+}\
+ADD_GLOBAL_CTOR (_ ## type ## _adder);
+
+void add_music_ctor (String, Music* (*) ());
+Music*get_music (String);
+
+
+
+
+
+#endif /* MUSIC_CONSTRUCTOR_HH */
+
index 019976f8484f70e1c73444f4f701babfaaa02d0a..4041b5d028f46cd442b269108b762f1c7b86afdc 100644 (file)
   ok () -- events left ?
 
   pending_mom () -- time tag of the next event to be processed.
-    PRECONDITION: this->ok() holds.
+    PRECONDITION: this->ok () holds.
   
   process (M) -- process all at M (Precondition: no events exist
-    before M, this->ok() holds).  Side-effects:
+    before M, this->ok () holds).  Side-effects:
     
     * This removes all events at M from the pending queue.
 
@@ -120,14 +120,14 @@ Class ## _ctor (SCM)                              \
 }                                              \
 SCM Class :: constructor_cxx_function;\
 void                                           \
-Class ## _constructor_init()                           \
+Class ## _constructor_init ()                          \
 {                                              \
   SCM s = smobify_cxx_function (& Class ## _ctor);     \
   scm_permanent_object (s);\
   gh_define (#Class "::constructor", s);\
   Class :: constructor_cxx_function = s;\
 }\
-ADD_SCM_INIT_FUNC(Class ## _ctor_init, Class ## _constructor_init); 
+ADD_SCM_INIT_FUNC (Class ## _ctor_init, Class ## _constructor_init); 
 
  
 
index 1212195f9cf6310dd334c257d2afda6011382ba9..b953c6a35ce8864a8533fbad26c9489788faa18f 100644 (file)
 class Simultaneous_music : public Music_sequence
 {
 public:
-  VIRTUAL_COPY_CONS(Music);
-  Simultaneous_music(SCM);
+  VIRTUAL_COPY_CONS (Music);
+  Simultaneous_music (SCM);
   virtual Pitch to_relative_octave (Pitch);
   virtual Moment length_mom () const;
+
+  Simultaneous_music ();
 };
 
 /**
@@ -32,9 +34,11 @@ public:
 class Request_chord : public Simultaneous_music
 {
 public:
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
   virtual Pitch to_relative_octave (Pitch);
-  Request_chord(SCM list);
+  Request_chord (SCM list);
+
+  Request_chord ();
 };
 
 /**
@@ -43,9 +47,11 @@ public:
 class Sequential_music : public Music_sequence
 {
 public:
-  VIRTUAL_COPY_CONS(Music);
-  Sequential_music(SCM);
+  VIRTUAL_COPY_CONS (Music);
+  Sequential_music (SCM);
   virtual Moment length_mom () const;
+
+  Sequential_music ();
 };
 
 #endif // Music_sequence_HH
index 3381788dbbdb806b9622f2570312500e0ccf8c4c..9128c2b2ed5719ebf163ec63083da7685ff91372 100644 (file)
@@ -32,7 +32,7 @@ public:
   SCM scaled_fonts_;
   SCM style_sheet_;
   
-  VIRTUAL_COPY_CONS(Music_output_def);
+  VIRTUAL_COPY_CONS (Music_output_def);
   Music_output_def (Music_output_def const&);
   Music_output_def ();
   virtual int get_next_score_count () const;
@@ -43,7 +43,7 @@ public:
   SCM find_translator_l (SCM name) const;
   String outname_str () ;
   
-  DECLARE_SMOBS(Music_output_def,);
+  DECLARE_SMOBS (Music_output_def,);
 };
 
 Music_output_def* unsmob_music_output_def (SCM);
index f52c82dc6f2a968205b7d27f72cc75482516cb85..604ff11ce7e7d99ec9cac2ea16ccaee062416b98 100644 (file)
@@ -24,9 +24,9 @@ public:
   String origin_str_;
   int errorlevel_i_;
 
-  virtual void process() {} 
+  virtual void process () {} 
   virtual ~Music_output (){}
-  Music_output() 
+  Music_output () 
   {
     errorlevel_i_ = 0;
   }
index f3d6ed9e9bfa0b29fed43811d84b3287411f21df..797563830de7064f16b91018bf4912e88b03d97c 100644 (file)
@@ -19,11 +19,11 @@ class Music_sequence : public Music
 {
 public:
   Music_sequence (SCM h);
-
+  Music_sequence ();
   SCM music_list () const;
   void append_music (Music *);
-  VIRTUAL_COPY_CONS(Music);
-
+  VIRTUAL_COPY_CONS (Music);
+  
   Pitch do_relative_octave (Pitch p, bool b);
   virtual void transpose (Pitch );
   void truncate (int k);
index a488b8e2f73bd6367d4b64575ae9793c6f4c80e8..2f401705efd94fd655c10bbb07c2797aeb23b430 100644 (file)
@@ -27,7 +27,7 @@ public:
   Music_wrapper_iterator (Music_wrapper_iterator const&);
   ~Music_wrapper_iterator ();
 
-  virtual void construct_children  () ;
+  virtual void construct_children () ;
   virtual Moment pending_moment () const;
   virtual bool ok () const;
   virtual SCM get_music (Moment)const;
index 8713d912da2d4489be092dba05aa4f144331f159..ec9504664931a531d8473d843b8eaff95d92aa28 100644 (file)
@@ -23,11 +23,12 @@ class Music_wrapper : public Music
 {
 public:
   Music_wrapper (SCM);
+  Music_wrapper ();
   Music * element () const;
   virtual void transpose (Pitch);
 
   
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
   virtual Moment length_mom () const;
   virtual Pitch to_relative_octave (Pitch);
   virtual void compress (Moment);
index 5ad9151ee06d9abbeaececd97b5f2011d89f637d..2b11f459c166b8bad89e1b04d1a41f9c1cc32806 100644 (file)
 #include "lily-proto.hh"
 #include "string.hh"
 #include "smobs.hh"
+#include "music-constructor.hh"
+
 
 /** Music is anything that has duration and supports both time compression and
   transposition.
   
   In Lily, everything that can be thought to have a length and a pitch
 (which has a duration which can be transposed) is considered "music",
+ (which has a duration which can be transposed) is considered "music",
 
   Music is hierarchical: 
 
@@ -49,17 +51,17 @@ public:
   /// The duration of this piece of music
   virtual Moment length_mom () const;
 
-  void print() const;
+  void print () const;
   /// Transpose, with the interval central C to #p#
   virtual void transpose (Pitch p);
 
   /// Scale the music in time by #factor#.
   virtual void compress (Moment factor);
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
   Music (Music const &m);
   Music (SCM);
 protected:
-  DECLARE_SMOBS(Music,);
+  DECLARE_SMOBS (Music,);
   SCM immutable_property_alist_;
   SCM mutable_property_alist_;
 };
index 04f7c0c3aaf6797f0b4fc1f68694570df2ec9240..cd3e27b315eacc767470acac68a9c15ba6134f40 100644 (file)
@@ -25,12 +25,12 @@ public:
   void compress (Moment);
   virtual Moment length_mom () const;
   static int compare (Rhythmic_req const&,Rhythmic_req const&);
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 class Skip_req  : public Rhythmic_req  {
 public:
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 
@@ -56,11 +56,11 @@ protected:
 class Articulation_req : public Script_req
 {
 public:
-  String get_articulation_str();
+  String get_articulation_str ();
 protected:
   virtual bool do_equal_b (Request const*) const;
 
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 class Text_script_req : public Script_req
@@ -81,7 +81,7 @@ protected:
   virtual void transpose (Pitch delta);
   virtual bool do_equal_b (Request const*) const;
 
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 /*
@@ -95,11 +95,11 @@ protected:
 class Note_req  : public Rhythmic_req, virtual public Melodic_req  {
 public:
     
-  Note_req();
+  Note_req ();
 protected:
 
   bool do_equal_b (Request const*) const;
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 /**
@@ -107,20 +107,20 @@ Put a rest on the staff. Why a request? It might be a good idea to not typeset t
 */
 class Rest_req : public Rhythmic_req {
 public:
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 
 /// an extender line
 class Extender_req : public Request  {
 public:
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 /// a centred hyphen
 class Hyphen_req : public Request  {
 public:
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 /** is anyone  playing a note?
@@ -139,7 +139,7 @@ public:
 class Melisma_req : public Span_req
 {
 public:
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 
index 11ad0adbe0e3a46b7174b4ae37b0fbdd333f2203..a0f6901b1bcb1c387a021a5286306316b9a254e5 100644 (file)
@@ -21,9 +21,9 @@
 #include "pitch.hh"
 #include "protected-scm.hh"
 
-bool busy_parsing();
-void kill_lexer();
-void set_lexer();
+bool busy_parsing ();
+void kill_lexer ();
+void set_lexer ();
 
 /// lexer for Lilypond
 class My_lily_lexer : public Includable_lexer 
@@ -55,22 +55,22 @@ public:
   void start_main_input ();
 
   SCM lookup_identifier (String s);
-  void push_note_state();
-  void push_chord_state();
-  void push_lyric_state();
-  void pop_state();
+  void push_note_state ();
+  void push_chord_state ();
+  void push_lyric_state ();
+  void pop_state ();
   void LexerError (char const *);
   void set_identifier (String str, SCM);
-  bool note_state_b() const;
-  bool chord_state_b() const;
-  bool lyric_state_b() const;
+  bool note_state_b () const;
+  bool chord_state_b () const;
+  bool lyric_state_b () const;
 
 private:
   int lookup_keyword (String);
   int scan_bare_word (String);
   int scan_escaped_word (String);
 
-  char escaped_char(char) const;
+  char escaped_char (char) const;
 };
 
 #endif
index 83463056cfa56483f4dbfbc350f51f21bbca3809..0e8b8f2b86dbd18805a5dd0a7d65d0650b70e1a4 100644 (file)
@@ -31,9 +31,9 @@ class My_lily_parser
 {
 public:
   My_lily_parser (Sources * sources_l);
-  ~My_lily_parser();
+  ~My_lily_parser ();
 
-  void do_init_file();
+  void do_init_file ();
   void parse_file ( String init_str, String file_str);
   void set_version_check (bool ignore);
 
@@ -49,22 +49,22 @@ public:
   My_lily_lexer * lexer_p_;
   bool ignore_version_b_;
   
-  Input here_input() const;
-  void remember_spot();
-  Input pop_spot();
+  Input here_input () const;
+  void remember_spot ();
+  Input pop_spot ();
     
-  void do_yyparse();
+  void do_yyparse ();
   void parser_error (String);
 
   void set_yydebug (bool);
 
 
-  DECLARE_SCHEME_CALLBACK(paper_description, ());
+  DECLARE_SCHEME_CALLBACK (paper_description, ());
 private:
 
   Array<Input> define_spot_array_;
 
-  char const* here_ch_C() const;
+  char const* here_ch_C () const;
 
   Simultaneous_music * get_chord (Pitch tonic, Array<Pitch>* add_arr_p,
                                  Array<Pitch>* sub_arr_p, Pitch* inversion_p,
index bb10e2696a7a5cc0dfb8a2a0764ad0184a919e53..5f24f7284eab18a4aa54386cab6d9e32a2fa6d63 100644 (file)
@@ -13,7 +13,7 @@
 #include "item.hh"
 
 /** a struct for treating a group of noteheads (noteheads, stem
 (chord) and scripts) as a single entity.
+ (chord) and scripts) as a single entity.
 
   UGR. Junkme.  refpoint should be the notehead, dir should come from stem.
 
@@ -30,9 +30,9 @@ public:
     */
 
   static Direction dir (Grob*me);
-  static Slice head_positions_interval(Grob* me);
+  static Slice head_positions_interval (Grob* me);
   static Direction static_dir (Grob*);
-  static void translate_rests(Grob*me,int dy);
+  static void translate_rests (Grob*me,int dy);
   static Grob * first_head (Grob*me);
   static void set_stem (Grob*me,Grob*);
   static void set_dotcol (Grob*me,Grob*);
@@ -40,7 +40,7 @@ public:
   static bool rest_b (Grob*me);
   static bool has_interface (Grob*);
   static void set_interface (Grob*);
-  static Item *stem_l(Grob*);
+  static Item *stem_l (Grob*);
 };
 
 #endif // NOTE_COLUMN_HH
index 04283267e71cd347ab93d3a2017d6f96f57d0640..99404f4d8ec762d9b186afdfe92552af296db65d 100644 (file)
@@ -20,9 +20,9 @@
 class Note_head 
 {
 public:
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
   static Molecule ledger_line (Interval, Grob*) ;
-  DECLARE_SCHEME_CALLBACK(brew_ez_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_ez_molecule, (SCM ));
   static bool has_interface (Grob*);
   
 };
index 00d7e488640b1c61bbf280d6c235b427003ecd7b..6660379575badd8aec749e9d7d085247cdba1cec 100644 (file)
@@ -17,7 +17,7 @@
 class Paper_column : public Item
 { 
 public:
-  VIRTUAL_COPY_CONS(Grob);
+  VIRTUAL_COPY_CONS (Grob);
 
   /*
     Not (yet) in scm, because of messy effects when a column commits suicide.
@@ -31,7 +31,7 @@ public:
   Line_of_score *line_l_;
 
   /// which  one (left =0)
-  static int rank_i(Grob*);
+  static int rank_i (Grob*);
 
   Paper_column (SCM);
   bool musical_b () const;
index 29d0abacc53b1aae3195af44b136ae7c1da98275..e30aa30e82f2386395fe695c77717118d6cd4057 100644 (file)
@@ -48,7 +48,7 @@
 class Paper_def : public Music_output_def 
 {
 protected:
-  VIRTUAL_COPY_CONS(Music_output_def);
+  VIRTUAL_COPY_CONS (Music_output_def);
 
 
 public:    
index 9d76b67f731e0d7409b217d4acf71f10d48b4264..48d78a529a402e4fd69e45e956b3e302b4584d3b 100644 (file)
@@ -22,7 +22,7 @@
    itself.
 
    The Paper_outputter contains a reference to an output stream
  (Paper_stream).  */
+ (Paper_stream).  */
 
 class Paper_outputter
 {
index 9429aaf5e80e4169842c8ba31d6ed8886d903212..114754a37b70c596d20bd5ac6fa496dc5fcf1302 100644 (file)
@@ -42,17 +42,17 @@ public:
     
 protected:
     /* MAIN ROUTINES */
-  virtual void process();
+  virtual void process ();
 
 private:
   /// before calc_breaking
-  void preprocess();
-  void calc_idealspacing();
+  void preprocess ();
+  void calc_idealspacing ();
   /// calculate where the lines are to be broken, and use results
-  Array<Column_x_positions> calc_breaking();
+  Array<Column_x_positions> calc_breaking ();
 
   /// after calc_breaking
-  void postprocess();
+  void postprocess ();
   Paper_score (Paper_score const &);
 };
 
index 86c0a22b6101fb7daa605982319c292076a1fe15..939f6522a51eaccf63518ebe9dae708a90d87ffd 100644 (file)
@@ -23,14 +23,14 @@ public:
   Paper_stream (String filename);
 
   /// delegate conversion to scalar class
-  Paper_stream &operator <<(String);
+  Paper_stream &operator << (String);
 
   /// close the file
-  ~Paper_stream();
+  ~Paper_stream ();
 
 private:
   Paper_stream (Paper_stream const&);
-  void break_line();
+  void break_line ();
 };
 
 class ostream;
index 95062639a5d342f1d36ac170faeea54e0de4992e..ef18fb2b7882c6acd3c9e2c74b6c957de64afd69 100644 (file)
@@ -27,6 +27,8 @@ public:
   virtual Moment length_mom () const;
   virtual Pitch to_relative_octave (Pitch);
   virtual void compress (Moment);
+
+  Part_combine_music ();
 };
 
 #endif /* PART_COMBINE_MUSIC_HH */
diff --git a/lily/include/percent-repeat-iterator.hh b/lily/include/percent-repeat-iterator.hh
new file mode 100644 (file)
index 0000000..71d2202
--- /dev/null
@@ -0,0 +1,36 @@
+/*   
+  percent-repeat-iterator.hh -- declare Percent_repeat_iterator
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef PERCENT_REPEAT_ITERATOR_HH
+#define PERCENT_REPEAT_ITERATOR_HH
+
+#include "music-iterator.hh"
+
+class Percent_repeat_iterator : public Music_iterator
+{
+public:
+  VIRTUAL_COPY_CONS (Music_iterator);
+  static SCM constructor_cxx_function;
+  Percent_repeat_iterator ();
+  Percent_repeat_iterator (Percent_repeat_iterator const & );
+protected:
+  virtual ~Percent_repeat_iterator ();
+  virtual Moment pending_moment () const;
+  virtual void construct_children () ;
+  virtual bool ok () const;
+  virtual void process (Moment) ;
+  virtual Music_iterator *try_music_in_children (Music *) const;
+
+private:
+  Music_iterator * child_iter_p_;
+  Moment finish_mom_;
+};
+
+
+#endif /* PERCENT_REPEAT_ITERATOR_HH */
index 1120ac5c895cca77c2e449c795e6b42c99201fec..af26a91ede27b7931c471a346821b70dae8ef03d 100644 (file)
@@ -26,8 +26,8 @@ public:
   void output (Midi_stream& midi_stream_r);
   void output_header_track (Midi_stream& midi_stream_r);
 
-  void print() const;
-  void process();
+  void print () const;
+  void process ();
 
 
   Link_array<Audio_staff> audio_staff_l_arr_;
index a516331ec7cc36fdaf80cb85d2ff3e679b4abe36..2f05ae6604bc943c8eeae3e0ab77fd235c3c7c8c 100644 (file)
@@ -19,9 +19,9 @@
 
 class Performer_group_performer : public Performer, public virtual Translator_group {
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
 
-  virtual void do_announces();
+  virtual void do_announces ();
   virtual void announce_element (Audio_element_info);
 protected:
   Array<Audio_element_info> announce_info_arr_;
index 1e639af771b6984bbabe022d5ec623d36cc9e476..c8b0de3e3767d907931aa56167de31ba1fa17d1c 100644 (file)
 class Performer : public virtual Translator
 {
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   friend class Performer_group_performer;  
-  Performer_group_performer* daddy_perf_l() const;
+  Performer_group_performer* daddy_perf_l () 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 int get_tempo_i () const;
   virtual void play_element (Audio_element * elem_p );
 };
 
index 25b576f4c0436fd1109fc3601e29a36544f60248..c88ed87ff061880e8505de7f0aa38b1853032559 100644 (file)
@@ -58,16 +58,16 @@ public:
 
   static int compare (Pitch const&,Pitch const&);
   /// return large part of interval from central c
-  int steps() const;
+  int steps () const;
   /// return pitch from central c (in halfnotes)
-  int semitone_pitch() const; 
+  int semitone_pitch () const; 
   String str () const;
 
   static SCM transpose (SCM p, SCM delta);
 
   SCM smobbed_copy () const;
-  DECLARE_SCHEME_CALLBACK(less_p, (SCM a, SCM b));
-  DECLARE_SIMPLE_SMOBS(Pitch,);
+  DECLARE_SCHEME_CALLBACK (less_p, (SCM a, SCM b));
+  DECLARE_SIMPLE_SMOBS (Pitch,);
 
 
 };
@@ -75,7 +75,7 @@ public:
 Pitch* unsmob_pitch (SCM);
 
 #include "compare.hh"
-INSTANTIATE_COMPARE(Pitch, Pitch::compare);
+INSTANTIATE_COMPARE (Pitch, Pitch::compare);
 
 int compare (Array<Pitch>*, Array<Pitch>*);
 
index 7b96c6e7d64dba5c69838428e26ef16864e55167..bfe3cafcdcdb0d0a1e53078afc6c854230b53b96 100644 (file)
@@ -24,7 +24,7 @@ public:
   Protected_scm (Protected_scm const &);
   ~Protected_scm ();
   Protected_scm &operator = (SCM);
-  Protected_scm &operator =( Protected_scm const&);
+  Protected_scm &operator = ( Protected_scm const&);
   operator SCM () const;
   SCM to_SCM () const;
 };
index fac082d9130c19560ef2f66267c69b627ede7e78..eb782fa9fe3a17108abedf315376424ef9b8c62c 100644 (file)
@@ -16,8 +16,9 @@ class Relative_octave_music : public Music_wrapper
 {
 public:
   Relative_octave_music (SCM l);
+  Relative_octave_music ();
   
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
   virtual Pitch to_relative_octave (Pitch);
 };
 
index 222a4abcc98eb2908506ae475f9d84ec13860174..61c966182300a54c1d8af9fa4ec1eddaff6674c2 100644 (file)
@@ -53,24 +53,24 @@ public:
   Music_sequence * alternatives () const;
 
   /// how often do we repeat?
-  int repeat_count( ) const;
+  int repeat_count ( ) const;
   virtual Pitch to_relative_octave (Pitch);
 
   Moment body_length_mom () const;
   Moment alternatives_length_mom (bool fold) const;
   Moment alternatives_volta_length_mom () const;  
 
-  DECLARE_SCHEME_CALLBACK(unfolded_music_length, (SCM));
-  DECLARE_SCHEME_CALLBACK(volta_music_length, (SCM));
-  DECLARE_SCHEME_CALLBACK(folded_music_length, (SCM));    
+  DECLARE_SCHEME_CALLBACK (unfolded_music_length, (SCM));
+  DECLARE_SCHEME_CALLBACK (volta_music_length, (SCM));
+  DECLARE_SCHEME_CALLBACK (folded_music_length, (SCM));    
   
   /// Transpose, with the interval central C to #p#
   virtual void transpose (Pitch p);
 
   /// Scale the music in time by #factor#.
   virtual void compress (Moment factor);
-  VIRTUAL_COPY_CONS(Music);
-
+  VIRTUAL_COPY_CONS (Music);
+  Repeated_music ();
   Repeated_music (SCM);
 };
 
index d54cfe9d8ee3690f94d0d8f5fb68750b6ec7f313..664aecadfda91a77b412254a364c0d12443e053a 100644 (file)
@@ -38,7 +38,7 @@ public:
   virtual SCM get_music (Moment) const;
 protected:
   virtual void process (Moment);
-  virtual void construct_children();
+  virtual void construct_children ();
 };
 
 
index 0f693ce13da94a8356f4f9b7eda743b2816c4e6e..c0090667d6beb97656cc05bac05f648c3b4e7a0c 100644 (file)
@@ -27,7 +27,7 @@
 class Request : public Music {
 public:
   Request ();
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
   bool equal_b (Request const*) const;
 protected:
   virtual bool do_equal_b (Request const*) const;
@@ -42,7 +42,7 @@ public:
   void set_direction (Direction d);
   Direction get_direction () const;
 
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
   Script_req ();
 };
 
@@ -58,12 +58,12 @@ public:
   void set_span_dir (Direction d);
   Direction get_span_dir () const;  
   
-  Span_req();
+  Span_req ();
 protected:
   
   virtual bool do_equal_b (Request const*) const;
 
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 /**
@@ -71,7 +71,7 @@ protected:
  */
 class Tie_req : public Request {
 public:
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 #endif
index 578b1151dd3e15ee53f232c00fb6a986a5ffb3e0..e2a20d1050a0f07aad330247c4ded6f416ee16c9 100644 (file)
@@ -22,7 +22,7 @@ public:
   static void add_column (Grob*me,Grob*);
   static void set_interface (Grob*me);
   static bool has_interface (Grob*);
-  DECLARE_SCHEME_CALLBACK(force_shift_callback, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK (force_shift_callback, (SCM element, SCM axis));
   static SCM do_shift (Grob*,SCM);
 };
 #endif // REST_COLLISION_HH
index b462bca6fcc544db55d618ffc323547078a88e27..fdd41ce7e7bd7a4946cf2056c926038a6289fce1 100644 (file)
 class  Rest
 {
 public:
-  DECLARE_SCHEME_CALLBACK(after_line_breaking, (SCM ));
+  DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
   static bool has_interface (Grob*);
   static SCM brew_internal_molecule (SCM);
-  DECLARE_SCHEME_CALLBACK(extent_callback, (SCM,SCM));
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (extent_callback, (SCM,SCM));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
 };
 #endif // REST_HH
index 7b4e7c2302dd09786c2742fc6c4188000b00552d..73b78902499b4b6afbc9e499e58eca8362b869bd 100644 (file)
@@ -21,7 +21,7 @@ public:
   static Item * stem_l (Grob*) ;
   static Item * dots_l (Grob*) ;
   static int dot_count (Grob*) ;
-  DECLARE_SCHEME_CALLBACK(after_line_breaking, (SCM ));
+  DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
   static bool has_interface (Grob*);
   static void set_interface (Grob*);
 };
index c36a368e3e54f783081c0beffbdc647fc1356192..22c630f9cf10da8ca25c202da0db2974a6728e5b 100644 (file)
@@ -19,9 +19,9 @@
 
 struct SCM_less
 {
-  bool operator  () (SCM s1, SCM s2) const
+  bool operator () (SCM s1, SCM s2) const
   {
-    return long(s1) < long (s2);
+    return long (s1) < long (s2);
   }
 };
 
@@ -75,7 +75,7 @@ public:
   Scheme_hash_table (Scheme_hash_table const &);
 
   SCM to_alist () const;
-  DECLARE_SMOBS(Scheme_hash_table,foo);
+  DECLARE_SMOBS (Scheme_hash_table,foo);
 };
 
 #endif /* SCM_HASH_HH */
index cdabb2eb13125766084765ac83192f23f84d40f2..bbb53792b612c98a5e4bb8d09fb96e78811c3064 100644 (file)
@@ -28,32 +28,32 @@ class Score_engraver :
   Paper_column* musical_column_l_;
   void make_columns (Moment);
   void set_columns (Paper_column*,Paper_column*);
-  void typeset_all();
+  void typeset_all ();
     
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Paper_score * pscore_p_;
   
   void forbid_breaks ();
-  Score_engraver();
+  Score_engraver ();
   virtual Music_output *get_output_p ();  
 protected:   
   virtual void prepare (Moment);
-  virtual void finish();
-  virtual void one_time_step();
-  virtual int depth_i() const { return Global_translator::depth_i ();}
+  virtual void finish ();
+  virtual void one_time_step ();
+  virtual int depth_i () const { return Global_translator::depth_i ();}
 
 protected:
   /* Engraver_group_engraver interface */
 
   virtual bool try_music (Music*);
-  virtual void initialize();
-  virtual void finalize();
+  virtual void initialize ();
+  virtual void finalize ();
   virtual void announce_grob (Grob_info);
-  virtual void do_announces();
+  virtual void do_announces ();
   virtual void typeset_grob (Grob*elem_p);
 
-  virtual void stop_translation_timestep();
+  virtual void stop_translation_timestep ();
 
 };
 
index 41f00e2ed3ffab47af9676d1c31ef390206c9a67..09097470a6bf72495630645ac0870798dedaa749 100644 (file)
@@ -18,20 +18,20 @@ class Score_performer:
   public Performer_group_performer, public Global_translator 
 {
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   
-  Score_performer();
-  ~Score_performer();
+  Score_performer ();
+  ~Score_performer ();
   Performance *performance_p_;
 
 protected:
-  virtual void finish();
+  virtual void finish ();
   virtual void prepare (Moment mom);
-  virtual void one_time_step();
-  virtual void start();
+  virtual void one_time_step ();
+  virtual void start ();
   virtual void initialize ();
   virtual void announce_element (Audio_element_info);
-  virtual int get_tempo_i() const;
+  virtual int get_tempo_i () const;
   virtual void play_element (Audio_element* p);
   virtual Music_output *get_output_p ();
 
index 26fe6fb57f6178b2ca87eb67d5b126847f4f4cf9..7c25235490258d8fa77ca63e2800351c51668be7 100644 (file)
@@ -27,13 +27,13 @@ public:
   int errorlevel_i_;
     
   /// construction
-  Score();
+  Score ();
   Score (Score const&);
 
 
-  void process();
+  void process ();
   void add_output (Music_output_def *def_p);
-  DECLARE_SMOBS(Score,foo);
+  DECLARE_SMOBS (Score,foo);
 private:
   void run_translator (Music_output_def*);
 };
index c5b0bd43ea1804f20ce76e53d9328ecb6d1637cb..934c04480d81c139caba426490e209211032c5fc 100644 (file)
@@ -17,7 +17,7 @@ class Script_column
 {
 public:
   static void add_staff_sided (Grob*, Item*);
-  DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM ));
+  DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
 };
 
 
index 8ab6db25dd3f4cd6ddb9b6a5de3432ae961ae313..e1e46d5c213dbd9a750af1cb70ddcc05fb06f00d 100644 (file)
@@ -24,8 +24,8 @@ public:
   static Molecule get_molecule (Grob*,Direction d);
   static void set_interface (Grob*);
   static bool  has_interface (Grob*);
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
-  DECLARE_SCHEME_CALLBACK(after_line_breaking, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
 };
 
 #endif /* Stem_SCRIPT_HH */
index 4bff88adc456bf6097171b33d9531879db330a09..aacce5f99881ba44d164486f4c0f0d0236ced31e 100644 (file)
@@ -17,7 +17,7 @@ class Separating_group_spanner
 public:
   static void add_spacing_unit (Grob*me, Item*);
   static void set_interface (Grob*);
-  DECLARE_SCHEME_CALLBACK(set_spacing_rods, (SCM ));
+  DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM ));
 };
 
 #endif /* SEPARATING_GROUP_SPANNER_HH */
index 9ce408a662e92c44f161c70d406abc223253847e..05973ff1e42ddea39ccdfbb0e8a9cb24d8f9d014 100644 (file)
 struct Side_position_interface
 {
 public:
-  DECLARE_SCHEME_CALLBACK(aligned_on_support_extents, (SCM element, SCM axis));
-  DECLARE_SCHEME_CALLBACK(aligned_on_support_refpoints, (SCM element, SCM axis));
-  DECLARE_SCHEME_CALLBACK(aligned_on_self, (SCM element, SCM axis));
-  DECLARE_SCHEME_CALLBACK(aligned_side, (SCM element, SCM axis));  
-  DECLARE_SCHEME_CALLBACK(quantised_position, (SCM element, SCM axis));
-  DECLARE_SCHEME_CALLBACK(centered_on_parent, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK (aligned_on_support_extents, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK (aligned_on_support_refpoints, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK (aligned_on_self, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK (aligned_side, (SCM element, SCM axis));  
+  DECLARE_SCHEME_CALLBACK (quantised_position, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK (centered_on_parent, (SCM element, SCM axis));
 
   static SCM general_side_position (Grob*, Axis, bool);
   static void set_axis (Grob*,Axis);
index 2a519c4326596b9e4a3a457bcfff7668a252dcf8..45be2c08ae65cdb4fbbd377ea74ee2f03de654a7 100644 (file)
@@ -42,7 +42,7 @@
      DECLARE_SIMPLE_SMOBS;
      static SCM make_scm (void initdata) {
        Ssmob * sp = new Ssmob (initdata);
-       return sp->smobbed_self();
+       return sp->smobbed_self ();
      }
    private:
      Ssmob (initdata);
@@ -59,7 +59,7 @@
 
    class Csmob {
      DECLARE_SMOBS;
-     Csmob () { smobify_self(); }
+     Csmob () { smobify_self (); }
      Csmob (Csmob const & s) {
        // don't copy self_scm_
        smobify_self ();
@@ -95,8 +95,8 @@
 
    WARNING:
 
-   smobify_self() might trigger a GC, so make sure that objects are  
-   sane when you do smobify_self().
+   smobify_self () might trigger a GC, so make sure that objects are  
+   sane when you do smobify_self ().
 */
 
 #define DECLARE_SIMPLE_SMOBS(CL,dummy) \
@@ -112,14 +112,14 @@ public: \
        static SCM equal_p (SCM a, SCM b);\
        static CL * unsmob (SCM);\
        static SCM smob_p (SCM);\
-       static void init_smobs();                               \
+       static void init_smobs ();                              \
 private:
 
 
 #define DECLARE_SMOBS(CL,dummy)                                        \
-       DECLARE_SIMPLE_SMOBS(CL,dammy) \
+       DECLARE_SIMPLE_SMOBS (CL,dammy) \
 protected:\
-       virtual ~CL();\
+       virtual ~CL ();\
        SCM unprotected_smobify_self ();\
 private: \
        SCM smobify_self ();                                    \
index 73d8da023d37f1a2528cd2808dec2d102bb5928c..019765c883388790b185e7d1057680bb58ff6866 100644 (file)
@@ -18,7 +18,7 @@ public:
   static void set_interface (Grob*);
   static void do_measure (Grob*,Link_array<Grob>) ;
 
-  DECLARE_SCHEME_CALLBACK(set_springs, (SCM ));
+  DECLARE_SCHEME_CALLBACK (set_springs, (SCM ));
   static Real stem_dir_correction (Grob*,Grob*,Grob*)  ;
   static Real default_bar_spacing (Grob*,Grob*,Grob*,Moment)  ;
   static Real note_spacing (Grob*,Grob*,Grob*,Moment)  ;
index 370c3626f4d619f30fc9d7c9669bf8c8f7c6e9e7..1e7ea7eadd05d61ba30d097f8456d05e550467d5 100644 (file)
@@ -27,10 +27,10 @@ public:
   static void add_bar (Grob*,Grob*);
   static void evaluate_glyph (Grob*);
   static void evaluate_empty (Grob*);
-  DECLARE_SCHEME_CALLBACK(width_callback, (SCM smob, SCM axis));
-  DECLARE_SCHEME_CALLBACK(get_bar_size, (SCM ));
-  DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM ));
-  DECLARE_SCHEME_CALLBACK(center_on_spanned_callback, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK (width_callback, (SCM smob, SCM axis));
+  DECLARE_SCHEME_CALLBACK (get_bar_size, (SCM ));
+  DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
+  DECLARE_SCHEME_CALLBACK (center_on_spanned_callback, (SCM element, SCM axis));
 };
 
 #endif // SPAN_BAR_HH
index 3429e22b0d87bad469599e5cd257989b448b1f53..03cb986634ee60484ed59c2d8e7eacc5674c7a3a 100644 (file)
@@ -54,7 +54,7 @@ public:
   virtual SCM do_derived_mark ();
 protected:
   void set_my_columns ();
-  VIRTUAL_COPY_CONS(Grob);
+  VIRTUAL_COPY_CONS (Grob);
   virtual void do_break_processing ();
   virtual Line_of_score*line_l () const;
 };
index 8e60ae659164bc75b250b73b84e9350c6bb077fa..9abe4f9d51a228fedd60fe5dd4629511469391f6 100644 (file)
@@ -3,7 +3,7 @@
  
  source file of the GNU LilyPond music typesetter
  
- (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
  
  */
 
@@ -24,7 +24,7 @@ public:
   static void set_interface (Grob*);
   static bool has_interface (Grob*);
   static void set_position (Grob*,Real);
-  DECLARE_SCHEME_CALLBACK(callback, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK (callback, (SCM element, SCM axis));
 
   /**
      Leading are the lead strips between the sticks (lines) of
index dde710433aabbe1e0e6942ff4470db5dc9601d3a..d8bb51dc718ff84ac1992de06c8ad84d8ada940d 100644 (file)
@@ -19,9 +19,9 @@ class Staff_symbol
 {
 public:
   static Real staff_space (Grob*) ;
-  static int steps_i(Grob*) ;
+  static int steps_i (Grob*) ;
   static int line_count (Grob*);
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
   static bool has_interface (Grob*);
   static void set_interface (Grob*);
 };
index 8d9c5337636c8625ffab615e2e67e8bfb17c373d..40d26e6c1305e54aa0f2122ce9f4a94c48020802 100644 (file)
@@ -15,7 +15,7 @@
 class Stem 
 {
 public:
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
 
   static  int flag_i (Grob*) ;
   static int beam_count (Grob*,Direction) ;
@@ -30,18 +30,18 @@ public:
   static Direction get_direction (Grob*) ;
   static int type_i (Grob *) ;
   static void set_stemend (Grob *,Real);
-  static Direction get_default_dir(Grob *) ;
-  static int get_center_distance(Grob *,Direction) ;
+  static Direction get_default_dir (Grob *) ;
+  static int get_center_distance (Grob *,Direction) ;
   static int heads_i (Grob *) ;
-  static bool invisible_b(Grob *) ;
-  static Interval head_positions(Grob *) ;
+  static bool invisible_b (Grob *) ;
+  static Interval head_positions (Grob *) ;
   static Real get_default_stem_end_position (Grob*me) ;
-  static void position_noteheads(Grob*);
+  static void position_noteheads (Grob*);
   static Real stem_end_position (Grob*) ;
-  DECLARE_SCHEME_CALLBACK(off_callback, (SCM element, SCM axis));
+  DECLARE_SCHEME_CALLBACK (off_callback, (SCM element, SCM axis));
   static Molecule flag (Grob*);
-  DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM ));
-  DECLARE_SCHEME_CALLBACK(dim_callback, (SCM smob, SCM axis));
+  DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
+  DECLARE_SCHEME_CALLBACK (dim_callback, (SCM smob, SCM axis));
   DECLARE_SCHEME_CALLBACK (height, (SCM,SCM));
   static bool has_interface (Grob*);
   static void set_interface (Grob*);
index b297371896e16c348984b97c79d80f87ccadd1bb..3b40a7dfe002367a068d690d77b68d3417fdc76d 100644 (file)
@@ -15,7 +15,7 @@
 class Swallow_performer : public Performer
 {
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   
 protected:
   virtual bool try_music (Music*) { return true; }
index 5471f09264e8bf6d19808d71f138b8160d043b74..82023eeec407d62cb9fa5eb0a0d66ee901e86377 100644 (file)
@@ -68,7 +68,7 @@ symbol (const char *ch)
   private_symbol_cache_end = private_symbol_cache + sz;
   for (p = private_symbol_cache_end -1;
        p != private_symbol_cache + idx; p --)
-    *p = *(p - 1);
+    *p = * (p - 1);
 
   p->key = ch;
   p->val = sym;
index 5b15f9b264b1ea2f60bfc4d7f92aac41b74680ec..1b05be028d0421251029f6b2a48d1e9b3efd378b 100644 (file)
 class System_start_delimiter
 {
 public:
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
   
   static void set_interface (Grob*me);
   static bool has_interface (Grob*);
-  DECLARE_SCHEME_CALLBACK(after_line_breaking, (SCM ));
+  DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
   static void try_collapse (Grob*);
   static Molecule staff_bracket (Grob*,Real) ;
   static Molecule staff_brace (Grob*,Real) ;
index 650096c14038d51f7c21324542ee4c2767e6066e..a579a4879437a5dda7f9b704ed8c401bb211ff50 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
   
- (c) 1998--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 (c) 1998--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   Jan Nieuwenhuizen <janneke@gnu.org>
  */
 
index 36072dd03cb55b4cffbee78a00cc910d230076b1..059d60ac5b0d7fa8f8db5c0d225829eb0dd6fa01 100644 (file)
@@ -20,7 +20,7 @@ public:
   static void set_interface (Grob*me);
   static bool has_interface (Grob*);
   static void add_tie (Grob*me,Grob*);
-  DECLARE_SCHEME_CALLBACK(after_line_breaking, (SCM ));
+  DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
   static void set_directions (Grob*me);
 };
 
index 97499d8a11c5f64d8719d0825c29e8e941365a4d..2c4f3a52a4240c80ce88e083d726a07954ff5b4f 100644 (file)
@@ -22,10 +22,10 @@ public:
   static bool has_interface (Grob*);
   static Grob * head (Grob*,Direction) ;
   static Real position_f (Grob*) ;
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
-  static Direction get_default_dir(Grob*) ;
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+  static Direction get_default_dir (Grob*) ;
   static SCM get_control_points (SCM);
-  DECLARE_SCHEME_CALLBACK(set_spacing_rods, (SCM ));
+  DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM ));
 };
 
 #endif // TIE_HH
index 2ede5ffa6aa68cc16244a833c7ad0f3ecb6e10a6..5cdf43bbab2112aa440f32ae0c7d0b5c17f18a35 100644 (file)
@@ -18,8 +18,9 @@ class Time_scaled_music : public Music_wrapper
 {
 public:
   Time_scaled_music (SCM);
+  Time_scaled_music ();
   
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 #endif /* Time_scaled_music_HH */
index 686c9b132bcc62db8e2d5646a550bd50505c31a1..f402a67a17bf8d48c626aad2fe3d36f13fdec699 100644 (file)
@@ -21,7 +21,7 @@ struct Time_signature
 {
   static Molecule special_time_signature (Grob*,String,int,int) ;
   static Molecule time_signature (Grob*,int, int);
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
 };
 #endif // METER_HH
 
index 85f2c4ba586fa1c8d349349ee7b5281a140ef677..1fcc8a86a35d046f36cbed1a923b8f7aa4da7cda 100644 (file)
@@ -20,7 +20,7 @@ class Timing_translator : public virtual Translator
 
   SCM last_time_sig_;
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Timing_translator ();
   Music *check_;
 
index 3750e927e465b2dfb90849a7dc8c1b50f84fd097..a3d8151974b7164135fb2fa5a5fe0afc4c156475 100644 (file)
@@ -25,7 +25,7 @@ class Translation_property : public Music
 {
 public:
   Translation_property ();
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 /**
@@ -41,7 +41,7 @@ public:
 class Push_translation_property : public Music
 {
 public:
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 /**
@@ -54,7 +54,7 @@ public:
 class Pop_translation_property : public Music
 {
 public:
-  VIRTUAL_COPY_CONS(Music);
+  VIRTUAL_COPY_CONS (Music);
 };
 
 
index dbaea4d43d25687e704132b4c0b0cee7cc1ef246..d9c6d9643ea31e7ef7d62e3a78116b2bfd2476ca 100644 (file)
@@ -56,7 +56,7 @@ public:
   void apply_property_operations (Translator_group*);
 
 private:
-  DECLARE_SMOBS(Translator_def,foo);
+  DECLARE_SMOBS (Translator_def,foo);
   Translator_def ();
   Translator_def (Translator_def const&);
 
index 52d7995aea8fcafd89f3076a702190f97d7a68ad..3f444e468bddf152d8ef5ba0ad434f5630da9dc4 100644 (file)
@@ -18,7 +18,7 @@
 #include "smobs.hh"
 
 // egcs
-typedef void (Translator::*Method_pointer)(void);
+typedef void (Translator::*Method_pointer) (void);
 
 class Scheme_hash_table;
 
@@ -45,17 +45,17 @@ public:
 
   String id_str_;
 
-  VIRTUAL_COPY_CONS(Translator);
-  Translator_group(Translator_group const &);
-  Translator_group();
+  VIRTUAL_COPY_CONS (Translator);
+  Translator_group (Translator_group const &);
+  Translator_group ();
   void add_group_translator (Translator *trans_p);
 
   
   /// Score_register = 0, Staff_registers = 1, etc)
   Translator_group* ancestor_l (int l=1);
-  int depth_i() const;
+  int depth_i () const;
   bool is_bottom_translator_b () const;
-  bool removable_b() const;
+  bool removable_b () const;
   void terminate_translator (Translator*r_l);
   Translator *remove_translator_p (Translator*trans_l);
   void check_removal ();
@@ -64,17 +64,17 @@ public:
   Translator_group *find_create_translator_l (String n, String id);
   Link_array<Translator_group> path_to_acceptable_translator (String alias, Music_output_def*) const;
 
-  Translator_group*get_default_interpreter();
+  Translator_group*get_default_interpreter ();
   
 public:
   bool try_music_on_nongroup_children (Music *m);
   
   virtual void do_announces ();
   virtual bool try_music (Music* req_l);       
-  virtual void stop_translation_timestep();
-  virtual void start_translation_timestep();   
-  virtual void initialize();
-  virtual void finalize();
+  virtual void stop_translation_timestep ();
+  virtual void start_translation_timestep ();   
+  virtual void initialize ();
+  virtual void finalize ();
   virtual void each (Method_pointer);
 
 };
index 58500438be1d9966970d5881c5e8693e8cfc7740..d0c14c1424ae14f3a36081cf5a9f2e79cdfcd42e 100644 (file)
@@ -28,20 +28,20 @@ public:
   Music_output_def * output_def_l_;
   String type_str_;
   
-  virtual const char *name() const;
+  virtual const char *name () const;
   bool is_alias_b (String) const;
     
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Translator (Translator const &);
   Translator ();
   
   Translator_group * daddy_trans_l_ ;
  
 
-  void pre_move_processing();
-  void announces();
-  void post_move_processing();
-  void removal_processing();
+  void pre_move_processing ();
+  void announces ();
+  void post_move_processing ();
+  void removal_processing ();
   /**
     ask daddy for a feature
     */
@@ -60,7 +60,7 @@ public:
   SCM definition_;
   
   SCM properties_scm_;
-  DECLARE_SMOBS(Translator, dummy);
+  DECLARE_SMOBS (Translator, dummy);
 public:
 
     /**
@@ -73,11 +73,11 @@ public:
 
     */
   virtual bool try_music (Music *req_l);
-  virtual void stop_translation_timestep();
-  virtual void start_translation_timestep();
+  virtual void stop_translation_timestep ();
+  virtual void start_translation_timestep ();
   virtual void do_announces () ;
-  virtual void initialize() ;
-  virtual void finalize();
+  virtual void initialize () ;
+  virtual void finalize ();
 };
 
 
@@ -90,7 +90,7 @@ static void  _ ## T ## _adder () {\
       t->type_str_ = classname (t);\
       add_translator (t);\
 }\
-ADD_GLOBAL_CTOR(_ ## T ## _adder);
+ADD_GLOBAL_CTOR (_ ## T ## _adder);
 
 
 
index 75de24ff09be9ecc957fec8f973a7493f304d496..e6aa328ad0dfe9914157c5dedb35dd276fa813cb 100644 (file)
@@ -17,8 +17,10 @@ class Transposed_music : public Music_wrapper
 {
 public:
   Transposed_music (SCM);
+  Transposed_music ();
   
-  VIRTUAL_COPY_CONS(Music);
+  
+  VIRTUAL_COPY_CONS (Music);
   virtual Pitch to_relative_octave (Pitch);
 };
 
index cf1e2cedf05bfce1b27d4749d8c47f875345f8ce..ebafc2eb19752006bfdef5989df1a8a8f7d3dee9 100644 (file)
 /*
 
     TODO: quantise, we don't want to collide with staff lines.
   (or should we be above staff?)
+ (or should we be above staff?)
 
   todo: handle breaking elegantly.
 */
 class Tuplet_bracket
 {
 public:
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
   static void set_interface (Grob*);  
   static bool has_interface (Grob*);
 
@@ -29,7 +29,7 @@ public:
   static void calc_dy (Grob*,Real *) ;
   static void calc_position_and_height (Grob*,Real*,Real *dy);
   
-  DECLARE_SCHEME_CALLBACK(after_line_breaking, (SCM ));
+  DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
 
   static Direction get_default_dir (Grob*);
 };
index 908e7b86d5a1a3c2cabdbf4f9815ac546ac7774f..b352473e4e35185874a3fc339fc1ae9476a7565a 100644 (file)
@@ -13,7 +13,7 @@
 #include "translator.hh"
 
 /** eat a certain type of request.
   (Duh, it's good for your skin)
+ (Duh, it's good for your skin)
  */
 class Type_swallow_translator : public virtual Translator
 {
@@ -21,18 +21,18 @@ protected:
   String swallow_str_;
   bool try_music (Music*);
 public:  
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
 };
 
 #define DECLARE_REQUEST_SWALLOWER(TYPE)  \
 struct TYPE ## _swallow_translator : public Type_swallow_translator {\
-  TYPE ## _swallow_translator() { \
+  TYPE ## _swallow_translator () { \
       swallow_str_ =  #TYPE;\
   }\
   \
-  VIRTUAL_COPY_CONS(Translator);\
+  VIRTUAL_COPY_CONS (Translator);\
 };\
-ADD_THIS_TRANSLATOR(TYPE ## _swallow_translator);\
+ADD_THIS_TRANSLATOR (TYPE ## _swallow_translator);\
 
 #endif // TYPESWALLOW_GRAV_HH
 
index 272365ecd4c90b5bcdd6e0554b84a04baabe1e1d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,3 +0,0 @@
-
-#error
-
index 32a39cd3fc051378d356419365bbad8ef4dc1ebb..97f1e15035ab06fe7a168b944923c5284c2f7767 100644 (file)
@@ -18,7 +18,7 @@ class Volta_spanner
 public:
   static void set_interface (Grob*);
   static bool has_interface (Grob*);
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
   static void add_column (Grob*, Grob*col);
   static void add_bar (Grob*me, Item*bar);
 };
index 4e6710cd694d97d3cb1518dba7e6b90d68bd76dc..5b6ad8b779604e1ccf5b0f4bd51441ef20f2c648 100644 (file)
@@ -24,7 +24,7 @@ static int
 print_smob (SCM s, SCM port, scm_print_state *)
 {
   String str = "#<location " +  unsmob_input (s)->location_str () + ">";
-  scm_puts (str.ch_C(), port);
+  scm_puts (str.ch_C (), port);
   return 1;
 }
 
@@ -42,7 +42,7 @@ ly_input_p (SCM x)
 }
 
 static
-void start_input_smobs()
+void start_input_smobs ()
 {
   input_tag
     = scm_make_smob_type_mfpe ("input", 0,
@@ -58,7 +58,7 @@ make_input (Input ip)
   Input * nip =  new Input (ip);
   SCM z;
   
-  SCM_NEWCELL(z);
+  SCM_NEWCELL (z);
   SCM_SETCAR (z, (SCM)input_tag);
   SCM_SETCDR (z, (SCM)nip);
                                // fixme: done_malloc
@@ -70,14 +70,14 @@ unsmob_input (SCM s)
 {
   if (SCM_IMP (s))
     return 0;
-  if ((long)SCM_CAR(s) == input_tag) // ugh.
-    return (Input*) SCM_CDR(s);
+  if ((long)SCM_CAR (s) == input_tag) // ugh.
+    return (Input*) SCM_CDR (s);
   else                                         
     return 0;                                  
 }
 
 
-ADD_SCM_INIT_FUNC(input, start_input_smobs);
+ADD_SCM_INIT_FUNC (input, start_input_smobs);
 
 
 Input dummy_input_global;
index 9171bb691939e39e1536db8997eedc46fa0ce51a..261cb2e0545d23b9a1db6b2c23786093f1bd0aae 100644 (file)
@@ -23,14 +23,14 @@ class Instrument_name_engraver : public Engraver
   
   void create_text (SCM s);
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Instrument_name_engraver ();
   virtual void initialize ();
   virtual void acknowledge_grob (Grob_info);
   virtual void stop_translation_timestep ();
 };
 
-ADD_THIS_TRANSLATOR(Instrument_name_engraver);
+ADD_THIS_TRANSLATOR (Instrument_name_engraver);
 
 Instrument_name_engraver::Instrument_name_engraver ()
 {
@@ -60,7 +60,7 @@ Instrument_name_engraver::stop_translation_timestep ()
 void
 Instrument_name_engraver::create_text (SCM txt)
 {
-  if(!text_)
+  if (!text_)
     {
       text_ = new Item (get_property ("InstrumentName"));
       
@@ -97,10 +97,10 @@ Instrument_name_engraver::acknowledge_grob (Grob_info i)
     return;
   
   if (dynamic_cast<Spanner*> (i.elem_l_)
-      &&((Axis_group_interface::has_interface (i.elem_l_)
+      && ((Axis_group_interface::has_interface (i.elem_l_)
         && Axis_group_interface::axis_b (i.elem_l_, Y_AXIS))
         || (Align_interface::has_interface (i.elem_l_)
-            && Align_interface::axis  (i.elem_l_) == Y_AXIS)))
+            && Align_interface::axis (i.elem_l_) == Y_AXIS)))
     {
       SCM nl = gh_cons (i.elem_l_->self_scm (),
                        get_property ("instrumentSupport"));
index d03d4bc8e04e9b6c2f50ecc442fe8326efe40a11..fddebdf9a7aa245106431063dbc609ff6cb8f99c 100644 (file)
@@ -11,7 +11,7 @@
 #include "interpretation-context-handle.hh"
 #include "translator-group.hh"
 
-Interpretation_context_handle::Interpretation_context_handle()
+Interpretation_context_handle::Interpretation_context_handle ()
 {
   report_to_l_ =0;
 }
@@ -20,7 +20,7 @@ Interpretation_context_handle::Interpretation_context_handle (Interpretation_con
 {
   report_to_l_ =0;
   if (s.report_to_l_)
-    up (s.report_to_l_ );
+    up (s.report_to_l_);
 }
 
 Interpretation_context_handle*
@@ -45,7 +45,7 @@ Interpretation_context_handle::up (Translator_group*t)
 }
 
 void
-Interpretation_context_handle::down()
+Interpretation_context_handle::down ()
 {
   report_to_l_->iterator_count_ --;
   report_to_l_ = 0;
index 099257e001cd183459b1a20734190486916ccabb..6eeaf775031891d37060fd7aea09ff0cbc6ecbbb 100644 (file)
@@ -37,7 +37,7 @@ Item::breakable_b (Grob*me)
   if (me->original_l_)
     return false;
 
-  if (!dynamic_cast<Item*>(me))
+  if (!dynamic_cast<Item*> (me))
     programming_error ("only items can be breakable.");
   
   Item * i  =dynamic_cast<Item*> (me->parent_l (X_AXIS));
@@ -52,7 +52,7 @@ Item::column_l () const
 }
 
 Line_of_score *
-Item::line_l() const
+Item::line_l () const
 {
   Grob *g = parent_l (X_AXIS);
   return g ?  g->line_l () : 0;
@@ -60,18 +60,18 @@ Item::line_l() const
 
 
 void
-Item::copy_breakable_items()
+Item::copy_breakable_items ()
 {
   Drul_array<Item *> new_copies;
   Direction  i=LEFT;
   do 
     {
-      Grob * dolly = clone();
-      Item * item_p = dynamic_cast<Item*>(dolly);
+      Grob * dolly = clone ();
+      Item * item_p = dynamic_cast<Item*> (dolly);
       pscore_l_->line_l_->typeset_grob (item_p);
       new_copies[i] =item_p;
     }
-  while (flip(&i) != LEFT);
+  while (flip (&i) != LEFT);
   broken_to_drul_= new_copies;
 }
 
@@ -87,20 +87,20 @@ Item::broken_b () const
   Generate items for begin and end-of line.
  */
 void
-Item::discretionary_processing()
+Item::discretionary_processing ()
 {
   if (broken_b ())
     return;
 
   if (Item::breakable_b (this))
-    copy_breakable_items();
+    copy_breakable_items ();
 }
 
 Grob*
 Item::find_broken_piece (Line_of_score*l) const
 {
-  if (line_l() == l) 
-    return (Item*)(this);
+  if (line_l () == l) 
+    return (Item*) (this);
 
   Direction d = LEFT;
   do {
index 9ffb77a3818d86ecdaeb8f12617f512c2bcfad4b..7cfcee40b641435173f0c5fa28fa8c16b4e04f48 100644 (file)
  */
 class Key_engraver : public Engraver
 {
-  void create_key(bool);
+  void create_key (bool);
   void read_req (Key_change_req const * r);
 
 public:
-  Key_engraver();
+  Key_engraver ();
   
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
 
   Key_change_req * keyreq_l_;
   Item * item_p_;
   Protected_scm old_accs_;     // ugh. -> property
     
 protected:
-  virtual void initialize();
+  virtual void initialize ();
   virtual void finalize ();
   virtual bool try_music (Music *req_l);
-  virtual void stop_translation_timestep();
-  virtual void start_translation_timestep();
+  virtual void stop_translation_timestep ();
+  virtual void start_translation_timestep ();
   virtual void create_grobs ();
   virtual void acknowledge_grob (Grob_info);
 };
index 4a3c30db99b9a9b3b95533860249b12562b6433e..f1c8ec2232b5b983109072ced458a9d51e5fb7de 100644 (file)
@@ -28,7 +28,7 @@ const int SHARP_TOP_PITCH=4; /*  ais and bis typeset in lower octave */
   the thinking to other parties.
  */
 int
-Key_item::calculate_position(Grob *ki, SCM pair) 
+Key_item::calculate_position (Grob *ki, SCM pair) 
 {
   int p = gh_scm2int (gh_car (pair));
   int a = gh_scm2int (gh_cdr (pair));  
@@ -47,7 +47,7 @@ Key_item::calculate_position(Grob *ki, SCM pair)
     
     if ((a<0 && ((p>FLAT_TOP_PITCH) || (p+c0>4)) && (p+c0>1)) 
        ||
      (a>0 && ((p>SHARP_TOP_PITCH) || (p+c0>5)) && (p+c0>2))) 
+ (a>0 && ((p>SHARP_TOP_PITCH) || (p+c0>5)) && (p+c0>2))) 
       {
        p -= 7; /* Typeset below c_position */
       }
@@ -72,7 +72,7 @@ Key_item::calculate_position(Grob *ki, SCM pair)
   TODO
   - space the `natural' signs wider
  */
-MAKE_SCHEME_CALLBACK(Key_item,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Key_item,brew_molecule,1);
 SCM
 Key_item::brew_molecule (SCM smob)
 {
@@ -91,7 +91,7 @@ Key_item::brew_molecule (SCM smob)
     {
       int a = gh_scm2int (gh_cdar (s));
       Molecule m = Font_interface::get_default_font (me)->find_by_name ("accidentals-" + to_str (a));
-      m.translate_axis (calculate_position(me, gh_car (s)) * inter, Y_AXIS);
+      m.translate_axis (calculate_position (me, gh_car (s)) * inter, Y_AXIS);
       mol.add_at_edge (X_AXIS, LEFT, m, 0);
     }
 
@@ -104,10 +104,10 @@ Key_item::brew_molecule (SCM smob)
 
        As suggested by [Ross], p.148.
        */
-      Interval x(0, inter);
-      Interval y(0,0);
+      Interval x (0, inter);
+      Interval y (0,0);
 
-      mol.add_at_edge (X_AXIS, LEFT, Lookup::blank (Box(x,y)),0);
+      mol.add_at_edge (X_AXIS, LEFT, Lookup::blank (Box (x,y)),0);
       
       for (; gh_pair_p (old); old = gh_cdr (old))
         {
@@ -117,7 +117,7 @@ Key_item::brew_molecule (SCM smob)
            find correspondences in pitches 
           */
           for (SCM s = newas; gh_pair_p (s); s = gh_cdr (s))
-           if (gh_caar(s) == gh_caar (old))
+           if (gh_caar (s) == gh_caar (old))
              found  = gh_car (s);
                
          if (found == SCM_EOL || gh_cdr (found) != gh_cdar (old))
@@ -130,7 +130,7 @@ Key_item::brew_molecule (SCM smob)
         }
     }
 
-  return mol.smobbed_copy();
+  return mol.smobbed_copy ();
 }
 
 
index 65bcfba7b26692f3873150d10f6d4009e97bac7c..74f702c6afaabb9e55dedd7f83bdf6f5688d8ee3 100644 (file)
 class Key_performer : public Performer
 {
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   
-  Key_performer();
-  ~Key_performer();
+  Key_performer ();
+  ~Key_performer ();
 
 protected:
   virtual bool try_music (Music* req_l);
@@ -51,7 +51,7 @@ Key_performer::create_audio_elements ()
       SCM acc = gh_call1 (proc, pitchlist);
       proc = scm_eval2 (ly_symbol2scm ("major-key"), SCM_EOL);
       SCM major = gh_call1 (proc, pitchlist);
-      audio_p_ = new Audio_key (gh_scm2int(acc), major == SCM_BOOL_T); 
+      audio_p_ = new Audio_key (gh_scm2int (acc), major == SCM_BOOL_T); 
       Audio_element_info info (audio_p_, key_req_l_);
       announce_element (info);
       key_req_l_ = 0;
index ea7f14901dd736503930df6488db12194ce9a876..e235d6a9734337e162da0cd262b3e341bf616992 100644 (file)
@@ -10,8 +10,8 @@
 int
       tabcmp (void const * p1, void const * p2)
 {
-  return strcmp (((Keyword_ent const *) p1)->name,
               ((Keyword_ent const *) p2)->name);
+  return strcmp (( (Keyword_ent const *) p1)->name,
+ ((Keyword_ent const *) p2)->name);
 }
 
 Keyword_table::Keyword_table (Keyword_ent *tab)
index 8f6f8193434e9fcd1cb86881c74ea828a7039dd7..e061214ef156aebaed35110489020d0b38ac14bb 100644 (file)
@@ -1,11 +1,10 @@
 /*   
-kpath.cc --  glue kpathsea to lily. Need some ugly kludges for gcc 2.96
+  kpath.cc -- glue kpathsea to lily. Need some ugly kludges for gcc 2.96
 
-source file of the GNU LilyPond music typesetter
+  source file of the GNU LilyPond music typesetter
 
-(c) 2000--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
+  (c) 2000--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
 
 #include <stdio.h>
 
@@ -23,10 +22,11 @@ extern "C" {
 #endif
 
 #include "kpath.hh"
-#include "version.hh"
+#include "lily-version.hh"
 
 
-char * ly_find_afm (char const * name)
+char *
+ly_find_afm (char const * name)
 {
 #if (KPATHSEA && HAVE_KPSE_FIND_FILE)
   return kpse_find_file (name, kpse_afm_format, true);
@@ -34,7 +34,8 @@ char * ly_find_afm (char const * name)
   return 0;
 }
 
-char * ly_find_tfm (char const * name)
+char *
+ly_find_tfm (char const * name)
 {
 #if (KPATHSEA && HAVE_KPSE_FIND_FILE)
   return kpse_find_file (name, kpse_tfm_format, true);
@@ -50,21 +51,17 @@ ly_init_kpath (char *av0)
   /*
    initialize kpathsea
    */
-  kpse_set_program_name(av0, NULL);
-  kpse_maketex_option("tfm", TRUE);
+  kpse_set_program_name (av0, NULL);
+  kpse_maketex_option ("tfm", TRUE);
 
-  /*
-    ugh: apparently the program_args is non-functional.
-   */
-#define VERSION MAJOR_VERSION "." MINOR_VERSION "."  PATCH_LEVEL
-  
-#define MY_TFMPATH "$VARTEXFONTS/tfm/lilypond/" VERSION "/"
+  String my_tfm = "$VARTEXFONTS/tfm/lilypond/";
+  my_tfm += version_str () + "/";
 
-  char * mypath = kpse_expand (MY_TFMPATH);
+  char * mypath = kpse_expand (my_tfm.ch_C ());
   String prog = "mktextfm --destdir ";
   prog += mypath;
   
-  kpse_format_info[kpse_tfm_format].program = strdup (prog.ch_C());
+  kpse_format_info[kpse_tfm_format].program = strdup (prog.ch_C ());
   kpse_format_info[kpse_tfm_format].client_path = mypath;
 #endif
 }
index 8e9a5baf4f8092fc4d38b6457849e0b24e890bc6..8f635b0cd2a22cec4821d671c24a722ecd609171 100644 (file)
@@ -20,7 +20,7 @@ minimise_least_squares (Real * coef, Real * offset,
   Real sqx =0.0;
   Real sxy = 0.0;
 
-  for (int i=0; i < input.size();i++) 
+  for (int i=0; i < input.size ();i++) 
     {
       Real x=input[i][X_AXIS];
       Real y = input[i][Y_AXIS];
@@ -29,7 +29,7 @@ minimise_least_squares (Real * coef, Real * offset,
       sqx += sqr (x);
       sxy += x*y;
     }
-  int N = input.size();
+  int N = input.size ();
 
   *coef =0.0;
   *offset =0.;
@@ -37,7 +37,7 @@ minimise_least_squares (Real * coef, Real * offset,
   Real den = (N*sqx - sqr (sx));
   if (!N || !den)
     {
-      programming_error ("minimise_least_squares():  Nothing to minimise");
+      programming_error ("minimise_least_squares ():  Nothing to minimise");
       *coef = 0.0;
       *offset = N ? sy/N : 0.0;
     }
index e271bb1ada28c3628b4334c6155d00869cd2eaa4..d08ee082cf30fd74f1ecd4f2cdc63d9a847789df 100644 (file)
@@ -18,7 +18,7 @@
       lex.backup
   contains no backup states, but only the reminder
       Compressed tables always back up.
 (don-t forget to rm lex.yy.cc :-)
+ (don-t forget to rm lex.yy.cc :-)
  */
 
 
@@ -60,7 +60,8 @@ valid_version_b (String s);
        yy_push_state (quote);\
        yylval.string = new String
 
-#define yylval (*(YYSTYPE*)lexval_l)
+#define yylval \
+       (*(YYSTYPE*)lexval_l)
 
 #define YY_USER_ACTION add_lexed_char (YYLeng ());
 /*
@@ -95,7 +96,7 @@ N             [0-9]
 AN             {AA}|{N}
 PUNCT          [?!:']
 ACCENT         \\[`'"^]
-NATIONAL  [\001-\006\021-\027\031\036\200-\377]
+NATIONAL       [\001-\006\021-\027\031\036\200-\377]
 TEX            {AA}|-|{PUNCT}|{ACCENT}|{NATIONAL}
 WORD           {A}{AN}*
 ALPHAWORD      {A}+
@@ -282,7 +283,7 @@ HYPHEN              --
 }
 <quote>{
        \\{ESCAPED}     {
-               *yylval.string += to_str (escaped_char(YYText()[1]));
+               *yylval.string += to_str (escaped_char (YYText ()[1]));
        }
        [^\\"]+ {
                *yylval.string += YYText ();
@@ -293,7 +294,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->ch_C ());
                delete sp;
                return STRING;
        }
@@ -322,17 +323,17 @@ HYPHEN            --
                        return yylval.i = HYPHEN;
                int i = 0;
                        while ((i=s.index_i ("_")) != -1) // change word binding "_" to " "
-                       *(s.ch_l () + i) = ' ';
+                       * (s.ch_l () + i) = ' ';
                if ((i=s.index_i ("\\,")) != -1)   // change "\," to TeX's "\c "
                        {
-                       *(s.ch_l () + i + 1) = 'c';
+                       * (s.ch_l () + i + 1) = 'c';
                        s = s.left_str (i+2) + " " + s.right_str (s.length_i ()-i-2);
                        }
 
                char c = s[s.length_i () - 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?"));
+                               _ ("Brace found at end of lyric. Did you forget a space?"));
                yylval.scm = ly_str02scm (s.ch_C ());
 
                DEBUG_OUT << "lyric : `" << s << "'\n";
@@ -472,7 +473,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.ch_C ());
 
        int l = lookup_keyword (str);
        if (l != -1) {
@@ -520,7 +521,7 @@ My_lily_lexer::scan_escaped_word (String str)
        String msg (_f ("unknown escaped string: `\\%s'", str));        
        LexerError (msg.ch_C ());
 
-       yylval.scm = ly_str02scm(str.ch_C());
+       yylval.scm = ly_str02scm (str.ch_C ());
 
        return STRING;
 }
@@ -541,7 +542,7 @@ My_lily_lexer::scan_bare_word (String str)
                }
        }
 
-       yylval.scm = ly_str02scm (str.ch_C());
+       yylval.scm = ly_str02scm (str.ch_C ());
        return STRING;
 }
 
@@ -564,7 +565,7 @@ My_lily_lexer::lyric_state_b () const
 }
 
 /*
- urg, belong to String(_convert)
+ urg, belong to String (_convert)
  and should be generalised 
  */
 void
@@ -597,10 +598,10 @@ valid_version_b (String s)
 {
   Lilypond_version current ( MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL );
   Lilypond_version ver (s);
-  if (!((ver >= oldest_version) && (ver <= current)))
+  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 (_("Consider converting the input with the convert-ly script")); 
+               non_fatal_error (_ ("Consider converting the input with the convert-ly script")); 
                return false;
     }
   return true;
index 695601e8ca13d47de14e767ae0e9155022210800..04bb47cdd3c47dcd3bc60d402a22595521afa094 100644 (file)
@@ -79,11 +79,11 @@ ly_parse_scm (char const* s, int* n)
   /*
    After parsing
 
      (begin (foo 1 2))
+ (begin (foo 1 2))
 
    all seems fine, but after parsing
 
      (foo 1 2)
+ (foo 1 2)
 
    read_buf has been advanced to read_pos - 1,
    so that scm_ftell returns 1, instead of #parsed chars
@@ -116,7 +116,7 @@ ly_quote_scm (SCM s)
 
 
 SCM
-ly_symbol2scm(const char *s)
+ly_symbol2scm (const char *s)
 {
   return gh_symbol2scm ((char *)s);
 }
@@ -126,7 +126,7 @@ String
 ly_symbol2string (SCM s)
 {
   assert (gh_symbol_p (s));
-  return String((Byte*)SCM_CHARS (s), (int) SCM_LENGTH(s));
+  return String ((Byte*)SCM_CHARS (s), (int) SCM_LENGTH (s));
 }
 
 
@@ -142,11 +142,11 @@ gulp_file_to_string (String fn)
       error (e);
     }
   else if (verbose_global_b)
-    progress_indication ("[" + s );
+    progress_indication ("[" + s);
 
 
-  Simple_file_storage f(s);
-  String result (f.ch_C());
+  Simple_file_storage f (s);
+  String result (f.ch_C ());
   if (verbose_global_b)
     progress_indication ("]");
   return result;
@@ -155,7 +155,7 @@ gulp_file_to_string (String fn)
 SCM
 ly_gulp_file (SCM fn)
 {
-  return ly_str02scm (gulp_file_to_string (ly_scm2string (fn)).ch_C());
+  return ly_str02scm (gulp_file_to_string (ly_scm2string (fn)).ch_C ());
 }
 
 
@@ -166,7 +166,7 @@ ly_gulp_file (SCM fn)
 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).ch_C ());
 }
 
 extern "C" {
@@ -196,7 +196,7 @@ SCM
 index_cell (SCM s, Direction d)
 {
   assert (d);
-  return (d == LEFT) ? gh_car  (s) : gh_cdr (s);
+  return (d == LEFT) ? gh_car (s) : gh_cdr (s);
 }
 
 SCM
@@ -230,24 +230,24 @@ ly_isdir_p (SCM s)
 
 
 
-typedef void (*Void_fptr)();
+typedef void (*Void_fptr) ();
 Array<Void_fptr> *scm_init_funcs_;
 
-void add_scm_init_func (void (*f)())
+void add_scm_init_func (void (*f) ())
 {
   if (!scm_init_funcs_)
     scm_init_funcs_ = new Array<Void_fptr>;
 
   scm_init_funcs_->push (f);
 }
-extern  void init_cxx_function_smobs();
+extern  void init_cxx_function_smobs ();
 
 void
 init_lily_guile ()
 {
-  init_cxx_function_smobs();
-  for (int i=scm_init_funcs_->size() ; i--;)
   (scm_init_funcs_->elem (i)) ();
+  init_cxx_function_smobs ();
+  for (int i=scm_init_funcs_->size () ; i--;)
+ (scm_init_funcs_->elem (i)) ();
 }
 
 unsigned int ly_scm_hash (SCM s)
@@ -323,7 +323,7 @@ appendable_list_append (SCM l, SCM elt)
 SCM
 ly_offset2scm (Offset o)
 {
-  return gh_cons (gh_double2scm (o[X_AXIS]), gh_double2scm(o[Y_AXIS]));
+  return gh_cons (gh_double2scm (o[X_AXIS]), gh_double2scm (o[Y_AXIS]));
 }
 
 Offset
@@ -405,13 +405,13 @@ ly_number2string (SCM s)
 static void *
 greet_sweep (void *dummy1, void *dummy2, void *dummy3)
 {
-   fprintf(stderr, "entering sweep\n");
+   fprintf (stderr, "entering sweep\n");
 }
 
 static void *
 wave_sweep_goodbye (void *dummy1, void *dummy2, void *dummy3)
 {
-   fprintf(stderr, "leaving sweep\n");
+   fprintf (stderr, "leaving sweep\n");
 }
 #endif
 
@@ -420,7 +420,7 @@ wave_sweep_goodbye (void *dummy1, void *dummy2, void *dummy3)
 SCM
 ly_version ()
 {
-  char const* vs =  "\'(" MAJOR_VERSION " " MINOR_VERSION " "  PATCH_LEVEL " " MY_PATCH_LEVEL ")" ;
+  char const* vs =  "\' (" MAJOR_VERSION " " MINOR_VERSION " "  PATCH_LEVEL " " MY_PATCH_LEVEL ")" ;
 
   
   return gh_eval_str ((char*)vs);
@@ -443,7 +443,7 @@ init_functions ()
 #endif
 }
 
-ADD_SCM_INIT_FUNC(funcs, init_functions);
+ADD_SCM_INIT_FUNC (funcs, init_functions);
 
 SCM
 ly_deep_copy (SCM l)
index 7a4f64c4a412822d34e30008aa08dacfd6d2fbf9..d637cdeedda2b01ec2cdd520e93b9d99d03877c8 100644 (file)
@@ -15,7 +15,7 @@
 #include "spanner.hh"
 
 
-Line_group_engraver_group::Line_group_engraver_group()
+Line_group_engraver_group::Line_group_engraver_group ()
 {
   staffline_p_ =0;
 }
@@ -31,24 +31,24 @@ Line_group_engraver_group::typeset_grob (Grob *elem)
 
 
 void
-Line_group_engraver_group::finalize()
+Line_group_engraver_group::finalize ()
 {
   Engraver_group_engraver::finalize ();
   Grob *  it
     = unsmob_grob (get_property (ly_symbol2scm ("currentCommandColumn")));
 
-  staffline_p_->set_bound(RIGHT,it);
+  staffline_p_->set_bound (RIGHT,it);
   Engraver_group_engraver::typeset_grob (staffline_p_);
   staffline_p_ = 0;
 }
 
 void
-Line_group_engraver_group::initialize()
+Line_group_engraver_group::initialize ()
 {
   create_line_spanner ();
   Grob *  it
     = unsmob_grob (get_property (ly_symbol2scm ("currentCommandColumn"))); 
-  staffline_p_->set_bound(LEFT,it);
+  staffline_p_->set_bound (LEFT,it);
   
   Engraver::announce_grob (staffline_p_,0);
 }
@@ -64,5 +64,5 @@ Line_group_engraver_group::create_line_spanner ()
 
 
 
-ADD_THIS_TRANSLATOR(Line_group_engraver_group);
+ADD_THIS_TRANSLATOR (Line_group_engraver_group);
 
index c662d33599fedce4bc4c97e180e740d42e63ae8f..b788a54857e95a58be8a8df3d54dad992ff60098 100644 (file)
@@ -32,7 +32,7 @@ fixup_refpoints (SCM s)
 }
 
 
-Line_of_score::Line_of_score(SCM s)
+Line_of_score::Line_of_score (SCM s)
   : Spanner (s)
 {
   rank_i_ = 0;
@@ -44,7 +44,7 @@ Line_of_score::Line_of_score(SCM s)
 int
 Line_of_score::element_count () const
 {
-  return scm_ilength ( get_grob_property ("all-elements"));
+  return scm_ilength (get_grob_property ("all-elements"));
 }
 
 void
@@ -93,7 +93,7 @@ Line_of_score::output_lines ()
   handle_broken_dependencies ();
 
   if (verbose_global_b)
-    progress_indication ( _f("Element count %d.",  count + element_count()));
+    progress_indication (_f ("Element count %d.",  count + element_count ()));
 
   
   for (int i=0; i < broken_into_l_arr_.size (); i++)
@@ -129,15 +129,15 @@ Line_of_score::break_into_pieces (Array<Column_x_positions> const &breaking)
 {
   for (int i=0; i < breaking.size (); i++)
     {
-      Line_of_score *line_l = dynamic_cast <Line_of_score*> (clone());
+      Line_of_score *line_l = dynamic_cast <Line_of_score*> (clone ());
       line_l->rank_i_ = i;
-      //      line_l->set_immutable_grob_property ("rank", gh_int2scmi));
+      //      line_l->set_immutable_grob_property ("rank", gh_int2scm (i));
       Link_array<Grob> c (breaking[i].cols_);
       pscore_l_->typeset_line (line_l);
       
-      line_l->set_bound(LEFT,c[0]);
-      line_l->set_bound(RIGHT,c.top ());
-      for (int j=0; j < c.size(); j++)
+      line_l->set_bound (LEFT,c[0]);
+      line_l->set_bound (RIGHT,c.top ());
+      for (int j=0; j < c.size (); j++)
        {
          c[j]->translate_axis (breaking[i].config_[j],X_AXIS);
          dynamic_cast<Paper_column*> (c[j])->line_l_ = line_l;
@@ -156,14 +156,14 @@ cname ## _init_func ()                            \
   cname = ly_symbol2scm (name);                        \
   scm_permanent_object (cname);                        \
 }                                              \
-ADD_SCM_INIT_FUNC(cname,cname ## _init_func);\
+ADD_SCM_INIT_FUNC (cname,cname ## _init_func);\
 
 
-GLOBAL_SYMBOLoffset_sym , "translate-molecule");
-GLOBAL_SYMBOLplacebox_sym , "placebox");
-GLOBAL_SYMBOLcombine_sym , "combine-molecule");
-GLOBAL_SYMBOLno_origin_sym , "no-origin");
-GLOBAL_SYMBOLdefine_origin_sym , "define-origin");
+GLOBAL_SYMBOL (offset_sym , "translate-molecule");
+GLOBAL_SYMBOL (placebox_sym , "placebox");
+GLOBAL_SYMBOL (combine_sym , "combine-molecule");
+GLOBAL_SYMBOL (no_origin_sym , "no-origin");
+GLOBAL_SYMBOL (define_origin_sym , "define-origin");
 
 
 
@@ -183,7 +183,7 @@ Line_of_score::output_molecule (SCM expr, Offset o)
       
 
          pscore_l_->outputter_l_->output_scheme (gh_list (define_origin_sym,
-                                                          ly_str02scm (ip->file_str ().ch_C()),
+                                                          ly_str02scm (ip->file_str ().ch_C ()),
                                                           gh_int2scm (ip->line_number ()),
                                                           gh_int2scm (ip->column_number ()),
                                                           SCM_UNDEFINED));
@@ -249,8 +249,8 @@ Line_of_score::pre_processing ()
   for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = gh_cdr (s))
     unsmob_grob (gh_car (s))->discretionary_processing ();
 
-  if(verbose_global_b)
-    progress_indication ( _f("Element count %d ",  element_count ()));
+  if (verbose_global_b)
+    progress_indication (_f ("Element count %d ",  element_count ()));
 
   
   for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = gh_cdr (s))
@@ -264,7 +264,7 @@ Line_of_score::pre_processing ()
       sc->calculate_dependencies (PRECALCED, PRECALCING, ly_symbol2scm ("before-line-breaking-callback"));
     }
   
-  progress_indication ("\n" + _ ("Calculating column positions...") + " " );
+  progress_indication ("\n" + _ ("Calculating column positions...") + " ");
   for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = gh_cdr (s))
     {
       Grob * e = unsmob_grob (gh_car (s));
@@ -285,8 +285,8 @@ Line_of_score::post_processing (bool last_line)
                                  ly_symbol2scm ("after-line-breaking-callback"));
     }
 
-  Interval i(extent(this, Y_AXIS));
-  if (i.empty_b())
+  Interval i (extent (this, Y_AXIS));
+  if (i.empty_b ())
     programming_error ("Huh?  Empty Line_of_score?");
   else
     translate_axis (- i[MAX], Y_AXIS);
@@ -301,7 +301,7 @@ Line_of_score::post_processing (bool last_line)
   /*
     generate all molecules  to trigger all font loads.
 
   (ugh. This is not very memory efficient.)  */
+ (ugh. This is not very memory efficient.)  */
   for (SCM s = get_grob_property ("all-elements"); gh_pair_p (s); s = gh_cdr (s))
     {
       unsmob_grob (gh_car (s))->get_molecule ();
@@ -309,7 +309,7 @@ Line_of_score::post_processing (bool last_line)
   /*
     font defs;
    */
-  SCM font_names = ly_quote_scm (paper_l()->font_descriptions ());  
+  SCM font_names = ly_quote_scm (paper_l ()->font_descriptions ());  
   output_scheme (gh_list (ly_symbol2scm ("define-fonts"),
                                        font_names,
                                        SCM_UNDEFINED));
@@ -371,18 +371,18 @@ Line_of_score::broken_col_range (Item const*l, Item const*r) const
   SCM s = get_grob_property ("columns");
 
   while (gh_pair_p (s) && gh_car (s) != r->self_scm ())
-    s = gh_cdr  (s);
+    s = gh_cdr (s);
     
   if (gh_pair_p (s))
     s = gh_cdr (s);
   
   while (gh_pair_p (s) && gh_car (s) != l->self_scm ())
     {
-      Paper_column*c = dynamic_cast<Paper_column*> ( unsmob_grob (gh_car (s)));
+      Paper_column*c = dynamic_cast<Paper_column*> (unsmob_grob (gh_car (s)));
       if (Item::breakable_b (c) && !c->line_l_)
        ret.push (c);
 
-      s = gh_cdr  (s);
+      s = gh_cdr (s);
     }
 
   ret.reverse ();
@@ -399,7 +399,7 @@ Line_of_score::column_l_arr ()const
   Link_array<Grob> acs
     = Pointer_group_interface__extract_elements (this, (Grob*) 0, "columns");
   bool bfound = false;
-  for (int i= acs.size (); i -- ; )
+  for (int i= acs.size (); i -- ;)
     {
       bool brb = Item::breakable_b (acs[i]);
       bfound = bfound || brb;
index 5ea4c1a6877f0ce46e5a963d9fe5c58e2286592f..7ce8aa82f3a0d8deee7f9103c5546dcbdd1ae43b 100644 (file)
@@ -79,7 +79,7 @@ Line_spanner::get_broken_offset (Grob *me, Direction dir)
                                Y_AXIS)
       };
   
-      return Offset ( abs (bound->extent (common[X_AXIS], X_AXIS)[-dir]),
+      return Offset (abs (bound->extent (common[X_AXIS], X_AXIS)[-dir]),
                      bound->extent (common[Y_AXIS], Y_AXIS).center ());
     }
   return Offset ();
@@ -105,9 +105,9 @@ Line_spanner::broken_trend_offset (Grob *me, Direction dir)
              Offset me_o = get_broken_offset (me, -dir);
              // Hmm, why not return me_o[X], but recalc in brew_mol?
              o = Offset (0,
                        (neighbour_o[Y_AXIS]*me_o[X_AXIS]
+ (neighbour_o[Y_AXIS]*me_o[X_AXIS]
                           - me_o[Y_AXIS]*neighbour_o[X_AXIS]) * dir /
                        (me_o[X_AXIS] + neighbour_o[X_AXIS]));
+ (me_o[X_AXIS] + neighbour_o[X_AXIS]));
              break;
            }
        }
@@ -119,7 +119,7 @@ Line_spanner::broken_trend_offset (Grob *me, Direction dir)
 /*
   Warning: this thing is a cross-staff object, so it should have empty Y-dimensions.
 
 (If not, you risk that this is called from the staff-alignment
+ (If not, you risk that this is called from the staff-alignment
   routine, via molecule_extent. At this point, the staffs aren't
   separated yet, so it doesn't work cross-staff.
 
@@ -189,8 +189,8 @@ Line_spanner::brew_molecule (SCM smob)
       dxy[Y_AXIS] = bound[RIGHT]->extent (common[Y_AXIS], Y_AXIS).center ()
        - bound[LEFT]->extent (common[Y_AXIS], Y_AXIS).center ();
 
-      dist = sqrt(dxy[X_AXIS]*dxy[X_AXIS]+dxy[Y_AXIS]*dxy[Y_AXIS]);
-      ofxy = dxy*(off/dist);
+      dist = sqrt (dxy[X_AXIS]*dxy[X_AXIS]+dxy[Y_AXIS]*dxy[Y_AXIS]);
+      ofxy = dxy* (off/dist);
       dxy -= 2*ofxy;
 
       my_off = Offset (me->relative_coordinate (common[X_AXIS], X_AXIS),
index e4ac50238835b9f8d7cd934e83a19a46c1ec2b06..d4be97cc628641697f52e2cceb23f364efd00248 100644 (file)
 struct Local_key_engraver : Engraver {
   Item *key_item_p_;
 protected:
-  VIRTUAL_COPY_CONS(Translator);
-  virtual void process_music();
+  VIRTUAL_COPY_CONS (Translator);
+  virtual void process_music ();
   virtual void acknowledge_grob (Grob_info);
-  virtual void stop_translation_timestep();
+  virtual void stop_translation_timestep ();
   virtual void initialize ();
   virtual void create_grobs ();
   virtual void finalize ();
@@ -52,12 +52,12 @@ public:
   Link_array<Grob> support_l_arr_;
   Link_array<Item> forced_l_arr_;
   Link_array<Grob> tie_l_arr_;
-  Local_key_engraver();
+  Local_key_engraver ();
 
   Item * grace_align_l_;
 };
 
-Local_key_engraver::Local_key_engraver()
+Local_key_engraver::Local_key_engraver ()
 {
   key_item_p_ =0;
   grace_align_l_ =0;
@@ -74,11 +74,11 @@ Local_key_engraver::initialize ()
 void
 Local_key_engraver::create_grobs ()
 {
-  if (!key_item_p_ && mel_l_arr_.size()) 
+  if (!key_item_p_ && mel_l_arr_.size ()) 
     {
       SCM localsig = get_property ("localKeySignature");
   
-      for (int i=0; i  < mel_l_arr_.size(); i++) 
+      for (int i=0; i  < mel_l_arr_.size (); i++) 
        {
          Grob * support_l = support_l_arr_[i];
          Note_req * note_l = mel_l_arr_[i];
@@ -94,9 +94,9 @@ Local_key_engraver::create_grobs ()
          SCM prev = scm_assoc (gh_cons (gh_int2scm (o), gh_int2scm (n)), localsig);
          if (prev == SCM_BOOL_F)
            prev = scm_assoc (gh_int2scm (n), localsig);
-         SCM prev_acc = (prev == SCM_BOOL_F) ? gh_int2scm(0) : gh_cdr (prev);
-         bool different = !gh_equal_p(prev_acc , gh_int2scm(a));
-         int p = gh_number_p(prev_acc) ? gh_scm2int(prev_acc) : 0;
+         SCM prev_acc = (prev == SCM_BOOL_F) ? gh_int2scm (0) : gh_cdr (prev);
+         bool different = !gh_equal_p (prev_acc , gh_int2scm (a));
+         int p = gh_number_p (prev_acc) ? gh_scm2int (prev_acc) : 0;
 
          Grob *tie_break_reminder = 0;
          bool tie_changes = false;
@@ -122,14 +122,14 @@ Local_key_engraver::create_grobs ()
             2. when different and not tie-changes
             3. maybe when at end of a tie: we must later see if
             we're after a line break */
-         if (((to_boolean (note_l->get_mus_property ("force-accidental"))
+         if (( (to_boolean (note_l->get_mus_property ("force-accidental"))
                || different)
               && !tie_changes)
              || tie_break_reminder)
            {
              if (!key_item_p_) 
                {
-                 key_item_p_ = new Item(get_property ("Accidentals"));
+                 key_item_p_ = new Item (get_property ("Accidentals"));
                  Local_key_item::set_interface (key_item_p_);
 
 
@@ -141,7 +141,7 @@ Local_key_engraver::create_grobs ()
              
              bool extra_natural =
                sign (p) * (p - a) == 1
-               && abs(p) == 2;
+               && abs (p) == 2;
 
              Local_key_item::add_pitch (key_item_p_, *unsmob_pitch (note_l->get_mus_property ("pitch")),
                                         to_boolean (note_l->get_mus_property ("cautionary")),
@@ -203,7 +203,7 @@ Local_key_engraver::create_grobs ()
 
        On which left, code or paper?
 
      (Arpeggios are engraved left of accidentals, of course.)
+ (Arpeggios are engraved left of accidentals, of course.)
        */
       for (int i=0;  i < arpeggios_.size ();  i++)
        Side_position_interface::add_support (arpeggios_[i], key_item_p_);
@@ -219,11 +219,11 @@ Local_key_engraver::finalize ()
 }
 
 void
-Local_key_engraver::stop_translation_timestep()
+Local_key_engraver::stop_translation_timestep ()
 {
   if (key_item_p_)
     {
-      for (int i=0; i < support_l_arr_.size(); i++)
+      for (int i=0; i < support_l_arr_.size (); i++)
        Side_position_interface::add_support (key_item_p_,support_l_arr_[i]);
 
       typeset_grob (key_item_p_);
@@ -231,11 +231,11 @@ Local_key_engraver::stop_translation_timestep()
     }
 
   grace_align_l_ = 0;
-  mel_l_arr_.clear();
+  mel_l_arr_.clear ();
   arpeggios_.clear ();
   tie_l_arr_.clear ();
-  support_l_arr_.clear();
-  forced_l_arr_.clear();       
+  support_l_arr_.clear ();
+  forced_l_arr_.clear ();      
 }
 
 void
@@ -276,10 +276,10 @@ Local_key_engraver::acknowledge_grob (Grob_info info)
   ugh. repeated deep_copy generates lots of garbage.
  */
 void
-Local_key_engraver::process_music()
+Local_key_engraver::process_music ()
 {
   SCM smp = get_property ("measurePosition");
-  Moment mp =  (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
+  Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
 
   SCM sig = get_property ("keySignature");
 
@@ -300,5 +300,5 @@ Local_key_engraver::process_music()
 
 
 
-ADD_THIS_TRANSLATOR(Local_key_engraver);
+ADD_THIS_TRANSLATOR (Local_key_engraver);
 
index 422d82b9907e57afe9a4d89e146b64ba080e3cd4..634a4b7b3f6236066a1e98fc36fa52c7afc18663 100644 (file)
@@ -18,7 +18,7 @@
 #include "lookup.hh"
 
 static SCM
-pitch_less  (SCM p1, SCM p2)
+pitch_less (SCM p1, SCM p2)
 {
   return Pitch::less_p (gh_car (p1),  gh_car (p2));
 }
@@ -31,7 +31,7 @@ init_pitch_funcs ()
   pitch_less_proc = gh_new_procedure2_0 ("pits-less", &pitch_less);
 }
 
-ADD_SCM_INIT_FUNC(lkpitch,init_pitch_funcs);
+ADD_SCM_INIT_FUNC (lkpitch,init_pitch_funcs);
 
 
 void
@@ -61,10 +61,10 @@ Local_key_item::add_pitch (Grob*me, Pitch p, bool cautionary, bool natural,
 Molecule
 Local_key_item::parenthesize (Grob*me, Molecule m)
 {
-  Molecule open = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-("));
+  Molecule open = Font_interface::get_default_font (me)->find_by_name (String ("accidentals- ("));
   Molecule close = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-)"));
-  m.add_at_edge(X_AXIS, LEFT, Molecule(open), 0);
-  m.add_at_edge(X_AXIS, RIGHT, Molecule(close), 0);
+  m.add_at_edge (X_AXIS, LEFT, Molecule (open), 0);
+  m.add_at_edge (X_AXIS, RIGHT, Molecule (close), 0);
 
   return m;
 }
@@ -84,7 +84,7 @@ Local_key_item::after_line_breaking (SCM smob)
   Grob *me = unsmob_grob (smob);
 
   SCM accs = me->get_grob_property ("accidentals");
-  for  (SCM s = accs;
+  for (SCM s = accs;
        gh_pair_p (s); s = gh_cdr (s))
     {
       SCM opts = gh_cdar (s);
@@ -113,7 +113,7 @@ Local_key_item::after_line_breaking (SCM smob)
   accidental placement is more complicated than this.
  */
 
-MAKE_SCHEME_CALLBACK(Local_key_item,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Local_key_item,brew_molecule,1);
 SCM
 Local_key_item::brew_molecule (SCM smob)
 {
@@ -127,7 +127,7 @@ Local_key_item::brew_molecule (SCM smob)
   int lastoct = -100;
 
   SCM accs = me->get_grob_property ("accidentals");
-  for  (SCM s = accs;
+  for (SCM s = accs;
        gh_pair_p (s); s = gh_cdr (s))
     {
       Pitch p (*unsmob_pitch (gh_caar (s)));
@@ -161,7 +161,7 @@ Local_key_item::brew_molecule (SCM smob)
       if (scm_memq (ly_symbol2scm ("natural"), opts) != SCM_BOOL_F)
        {
          Molecule prefix = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-0"));
-         acc.add_at_edge(X_AXIS, LEFT, Molecule(prefix), 0);
+         acc.add_at_edge (X_AXIS, LEFT, Molecule (prefix), 0);
        }
 
       if (scm_memq (ly_symbol2scm ("cautionary"), opts) != SCM_BOOL_F)
@@ -196,14 +196,14 @@ Local_key_item::brew_molecule (SCM smob)
        if (!gh_number_p (pads[d]))
          continue;
 
-       Box b(Interval (0, gh_scm2double (pads[d]) * note_distance),
+       Box b (Interval (0, gh_scm2double (pads[d]) * note_distance),
              Interval (0,0));
        Molecule m (Lookup::blank (b));
        mol.add_at_edge (X_AXIS, d, m, 0);
-      } while ( flip (&d)!= LEFT);
+      } while (flip (&d)!= LEFT);
     }
 
-  return mol.smobbed_copy();
+  return mol.smobbed_copy ();
 }
 
 bool
index 62f449b08c39dd5ae61a16115104bbf8c08ce9a1..f2e89466b6d91c7a813b25465a36ab9052d10453 100644 (file)
@@ -33,7 +33,7 @@ Lookup::beam (Real slope, Real width, Real thick)
 
   
 
-  Box bInterval (0, width),
+  Box b (Interval (0, width),
         Interval (min_y, max_y));
 
   
@@ -63,7 +63,7 @@ Lookup::dashed_slur (Bezier b, Real thick, Real dash)
                               ly_quote_scm (l),
                               SCM_UNDEFINED));
 
-  Box box (Interval(0,0),Interval( 0,0));
+  Box box (Interval (0,0),Interval (0,0));
   return   Molecule (box, at);
 }
 
@@ -78,7 +78,7 @@ Lookup::blank (Box b)
 
 
 Molecule
-Lookup::filledbox (Box b 
+Lookup::filledbox (Box b) 
 {
   SCM  at  = (gh_list (ly_symbol2scm ("filledbox"),
                     gh_double2scm (-b[X_AXIS][LEFT]),
@@ -87,7 +87,7 @@ Lookup::filledbox (Box b )
                     gh_double2scm (b[Y_AXIS][UP]),                    
                     SCM_UNDEFINED));
 
-  return Molecule ( b,at);
+  return Molecule (b,at);
 }
 
 Molecule
@@ -133,7 +133,7 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick)
   SCM scontrols[8];
 
   for (int i=4; i--;)
-    scontrols[ i ] = ly_offset2scm(back.control_[i]);
+    scontrols[ i ] = ly_offset2scm (back.control_[i]);
   for (int i=4 ; i--;)
     scontrols[i+4] = ly_offset2scm (curve.control_[i]);
 
@@ -142,7 +142,7 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick)
    */
   int indices[]= {5, 6, 7, 4, 1, 2, 3, 0};
   SCM list = SCM_EOL;
-  for (int i= 8; i--;  )
+  for (int i= 8; i--;)
     {
       list = gh_cons (scontrols[indices[i]], list);
     }
@@ -153,7 +153,7 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick)
                     gh_double2scm (linethick),
                     SCM_UNDEFINED));
 
-  Box b ( curve.extent (X_AXIS), curve.extent (Y_AXIS));
+  Box b (curve.extent (X_AXIS), curve.extent (Y_AXIS));
   return Molecule (b, at);
 }
 
@@ -161,173 +161,173 @@ Molecule
 Lookup::accordion (SCM s, Real staff_space, Font_metric *fm) 
 {
   Molecule m;
-  String sym = ly_scm2string(gh_car (s));
-  String reg = ly_scm2string(gh_car (gh_cdr(s)));
+  String sym = ly_scm2string (gh_car (s));
+  String reg = ly_scm2string (gh_car (gh_cdr (s)));
 
   if (sym == "Discant")
     {
       Molecule r = fm->find_by_name ("accordion-accDiscant");
-      m.add_molecule(r);
-      if (reg.left_str(1) == "F")
+      m.add_molecule (r);
+      if (reg.left_str (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);
+         d.translate_axis (staff_space * 2.5 PT, Y_AXIS);
+         m.add_molecule (d);
+         reg = reg.right_str (reg.length_i ()-1);
        }
       int eflag = 0x00;
-      if (reg.left_str(3) == "EEE")
+      if (reg.left_str (3) == "EEE")
        {
          eflag = 0x07;
-         reg = reg.right_str(reg.length_i()-3);
+         reg = reg.right_str (reg.length_i ()-3);
        }
-      else if (reg.left_str(2) == "EE")
+      else if (reg.left_str (2) == "EE")
        {
          eflag = 0x05;
-         reg = reg.right_str(reg.length_i()-2);
+         reg = reg.right_str (reg.length_i ()-2);
        }
-      else if (reg.left_str(2) == "Eh")
+      else if (reg.left_str (2) == "Eh")
        {
          eflag = 0x04;
-         reg = reg.right_str(reg.length_i()-2);
+         reg = reg.right_str (reg.length_i ()-2);
        }
-      else if (reg.left_str(1) == "E")
+      else if (reg.left_str (1) == "E")
        {
          eflag = 0x02;
-         reg = reg.right_str(reg.length_i()-1);
+         reg = reg.right_str (reg.length_i ()-1);
        }
       if (eflag & 0x02)
        {
          Molecule d = fm->find_by_name ("accordion-accDot");
-         d.translate_axis(staff_space * 1.5 PT, Y_AXIS);
-         m.add_molecule(d);
+         d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
+         m.add_molecule (d);
        }
       if (eflag & 0x04)
        {
          Molecule d = fm->find_by_name ("accordion-accDot");
-         d.translate_axis(staff_space * 1.5 PT, Y_AXIS);
-         d.translate_axis(0.8 * staff_space PT, X_AXIS);
-         m.add_molecule(d);
+         d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
+         d.translate_axis (0.8 * staff_space PT, X_AXIS);
+         m.add_molecule (d);
        }
       if (eflag & 0x01)
        {
          Molecule d = fm->find_by_name ("accordion-accDot");
-         d.translate_axis(staff_space * 1.5 PT, Y_AXIS);
-         d.translate_axis(-0.8 * staff_space PT, X_AXIS);
-         m.add_molecule(d);
+         d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
+         d.translate_axis (-0.8 * staff_space PT, X_AXIS);
+         m.add_molecule (d);
        }
-      if (reg.left_str(2) == "SS")
+      if (reg.left_str (2) == "SS")
        {
          Molecule d = fm->find_by_name ("accordion-accDot");
-         d.translate_axis(0.5 * staff_space PT, Y_AXIS);
-         d.translate_axis(0.4 * staff_space PT, X_AXIS);
-         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);
+         d.translate_axis (0.5 * staff_space PT, Y_AXIS);
+         d.translate_axis (0.4 * staff_space PT, X_AXIS);
+         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);
        }
-      if (reg.left_str(1) == "S")
+      if (reg.left_str (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);
+         d.translate_axis (0.5 * staff_space PT, Y_AXIS);
+         m.add_molecule (d);
+         reg = reg.right_str (reg.length_i ()-1);
        }
     }
   else if (sym == "Freebase")
     {
       Molecule r = fm->find_by_name ("accordion-accFreebase");
-      m.add_molecule(r);
-      if (reg.left_str(1) == "F")
+      m.add_molecule (r);
+      if (reg.left_str (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);
+         d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
+         m.add_molecule (d);
+         reg = reg.right_str (reg.length_i ()-1);
        }
       if (reg == "E")
        {
          Molecule d = fm->find_by_name ("accordion-accDot");
-         d.translate_axis(staff_space * 0.5 PT, Y_AXIS);
-         m.add_molecule(d);
+         d.translate_axis (staff_space * 0.5 PT, Y_AXIS);
+         m.add_molecule (d);
        }
     }
   else if (sym == "Bayanbase")
     {
       Molecule r = fm->find_by_name ("accordion-accBayanbase");
-      m.add_molecule(r);
-      if (reg.left_str(1) == "T")
+      m.add_molecule (r);
+      if (reg.left_str (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);
+         d.translate_axis (staff_space * 2.5 PT, Y_AXIS);
+         m.add_molecule (d);
+         reg = reg.right_str (reg.length_i ()-1);
        }
       /* include 4' reed just for completeness. You don't want to use this. */
-      if (reg.left_str(1) == "F")
+      if (reg.left_str (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);
+         d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
+         m.add_molecule (d);
+         reg = reg.right_str (reg.length_i ()-1);
        }
-      if (reg.left_str(2) == "EE")
+      if (reg.left_str (2) == "EE")
        {
          Molecule d = fm->find_by_name ("accordion-accDot");
-         d.translate_axis(staff_space * 0.5 PT, Y_AXIS);
-         d.translate_axis(0.4 * staff_space PT, X_AXIS);
-         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);
+         d.translate_axis (staff_space * 0.5 PT, Y_AXIS);
+         d.translate_axis (0.4 * staff_space PT, X_AXIS);
+         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);
        }
-      if (reg.left_str(1) == "E")
+      if (reg.left_str (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);
+         d.translate_axis (staff_space * 0.5 PT, Y_AXIS);
+         m.add_molecule (d);
+         reg = reg.right_str (reg.length_i ()-1);
        }
     }
   else if (sym == "Stdbase")
     {
       Molecule r = fm->find_by_name ("accordion-accStdbase");
-      m.add_molecule(r);
-      if (reg.left_str(1) == "T")
+      m.add_molecule (r);
+      if (reg.left_str (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);
+         d.translate_axis (staff_space * 3.5 PT, Y_AXIS);
+         m.add_molecule (d);
+         reg = reg.right_str (reg.length_i ()-1);
        }
-      if (reg.left_str(1) == "F")
+      if (reg.left_str (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);
+         d.translate_axis (staff_space * 2.5 PT, Y_AXIS);
+         m.add_molecule (d);
+         reg = reg.right_str (reg.length_i ()-1);
        }
-      if (reg.left_str(1) == "M")
+      if (reg.left_str (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);
+         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);
        }
-      if (reg.left_str(1) == "E")
+      if (reg.left_str (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);
+         d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
+         m.add_molecule (d);
+         reg = reg.right_str (reg.length_i ()-1);
        }
-      if (reg.left_str(1) == "S")
+      if (reg.left_str (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);
+         d.translate_axis (staff_space * 0.5 PT, Y_AXIS);
+         m.add_molecule (d);
+         reg = reg.right_str (reg.length_i ()-1);
        }
     }
   /* ugh maybe try to use regular font for S.B. and B.B and only use one font
@@ -335,22 +335,22 @@ Lookup::accordion (SCM s, Real staff_space, Font_metric *fm)
   else if (sym == "SB")
     {
       Molecule r = fm->find_by_name ("accordion-accSB");
-      m.add_molecule(r);
+      m.add_molecule (r);
     }
   else if (sym == "BB")
     {
       Molecule r = fm->find_by_name ("accordion-accBB");
-      m.add_molecule(r);
+      m.add_molecule (r);
     }
   else if (sym == "OldEE")
     {
       Molecule r = fm->find_by_name ("accordion-accOldEE");
-      m.add_molecule(r);
+      m.add_molecule (r);
     }
   else if (sym == "OldEES")
     {
       Molecule r = fm->find_by_name ("accordion-accOldEES");
-      m.add_molecule(r);
+      m.add_molecule (r);
     }
   return m;  
 }
index 139dcc4290bc4e5910c3740351236c0c4e1df9d6..3d9eecc7e0e2a660af7572575bc60e748d6a1bf0 100644 (file)
@@ -116,4 +116,4 @@ Lyric_combine_music_iterator::try_music_in_children (Music *m) const
 }
 
 
-IMPLEMENT_CTOR_CALLBACK(Lyric_combine_music_iterator);
+IMPLEMENT_CTOR_CALLBACK (Lyric_combine_music_iterator);
index 8f7770ecf9b03a25643e886ecea2f195b63f4703..de706373bdeae3ab35c30d8961e814e90842ec3c 100644 (file)
@@ -34,7 +34,7 @@ Lyric_combine_music::length_mom () const
 }
 
 Pitch
-Lyric_combine_music::to_relative_octave (  Pitch p )
+Lyric_combine_music::to_relative_octave (Pitch p)
 {
   p = music_l ()->to_relative_octave (p);
   return lyrics_l () ->to_relative_octave (p);
@@ -57,3 +57,10 @@ Lyric_combine_music::lyrics_l () const
 {
   return unsmob_music (get_mus_property ("lyrics"));
 }
+
+Lyric_combine_music::Lyric_combine_music ()
+  : Music (SCM_EOL)
+{
+}
+
+ADD_MUSIC (Lyric_combine_music);
index 439d9602de725cc4d3421b38c5370221f9b9acb8..929ebf819172910baca6953dfaa9a7ccee5af495 100644 (file)
@@ -21,7 +21,7 @@
 class Lyric_engraver : public Engraver 
 {
 protected:
-  virtual void stop_translation_timestep();
+  virtual void stop_translation_timestep ();
   virtual bool try_music (Music *);
   virtual void create_grobs ();
   virtual void start_translation_timestep ();
@@ -38,7 +38,7 @@ private:
 ADD_THIS_TRANSLATOR (Lyric_engraver);
 
 
-Lyric_engraver::Lyric_engraver()
+Lyric_engraver::Lyric_engraver ()
 {
   text_p_ =0;
   req_l_ =0;
@@ -70,7 +70,7 @@ Lyric_engraver::create_grobs ()
        We can't reach the notehead where we're centered from here. So
        we kludge.
 
      (UGH UGH, pulled amount of space out of thin air)
+ (UGH UGH, pulled amount of space out of thin air)
       */
       
       text_p_->translate_axis (0.66, X_AXIS);
@@ -81,7 +81,7 @@ Lyric_engraver::create_grobs ()
 }
 
 void
-Lyric_engraver::stop_translation_timestep()
+Lyric_engraver::stop_translation_timestep ()
 {
   if (text_p_)
     {
index 0cbce0012386030c35ecf07333013e1dc71a7a75..57d790618f6ba8f8875a4d576d1e68e8dad3b5cd 100644 (file)
@@ -16,7 +16,7 @@
 #include "lyric-extender.hh"
 
 
-MAKE_SCHEME_CALLBACK(Lyric_extender,brew_molecule,1)
+MAKE_SCHEME_CALLBACK (Lyric_extender,brew_molecule,1)
 SCM 
 Lyric_extender::brew_molecule (SCM smob) 
 {
@@ -28,7 +28,7 @@ Lyric_extender::brew_molecule (SCM smob)
 
   Real sl = sp->paper_l ()->get_var ("stafflinethickness");  
   Real righttrim = 0.5; // default to half a space gap on the right
-  SCM righttrim_scm = sp->get_grob_property("right-trim-amount");
+  SCM righttrim_scm = sp->get_grob_property ("right-trim-amount");
   if (gh_number_p (righttrim_scm)) {
     righttrim = gh_scm2double (righttrim_scm);
   }
@@ -40,10 +40,10 @@ Lyric_extender::brew_molecule (SCM smob)
     }
   Real w = sp->spanner_length () - leftext - righttrim;
   
-  Real h = sl * gh_scm2double (sp->get_grob_property  ("height"));
-  Molecule  mol (Lookup::filledbox ( Box (Interval (0,w), Interval (0,h))));
+  Real h = sl * gh_scm2double (sp->get_grob_property ("height"));
+  Molecule  mol (Lookup::filledbox (Box (Interval (0,w), Interval (0,h))));
   mol.translate (Offset (leftext, 0));
-  return mol.smobbed_copy();
+  return mol.smobbed_copy ();
 }
 
 void
index 28551a700bc238fa1b7221e14ea9c1882046704c..db78f744fe32017ee62d1282c1963066fbaff473 100644 (file)
@@ -14,7 +14,7 @@
 
 class Lyric_performer : public Performer {
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
  Lyric_performer ();
 
 protected:
@@ -49,7 +49,7 @@ Lyric_performer::create_audio_elements ()
       Audio_element_info info (audio_p_, lreq_arr_[0]);
       announce_element (info);
     }
-  lreq_arr_.clear();
+  lreq_arr_.clear ();
 }
 
 void
@@ -60,7 +60,7 @@ Lyric_performer::stop_translation_timestep ()
       play_element (audio_p_);
       audio_p_ = 0;
     }
-  lreq_arr_.clear();
+  lreq_arr_.clear ();
 }
 
 bool
index a40c6149db7a2d5ec32867a0d0892e856e75047f..e24f7642c3da3157b07fd9831c9aabc61d572e25 100644 (file)
@@ -13,8 +13,8 @@
 #include "spanner.hh"
 
 
-String get_context_id(Translator_group * ancestor, const char * type);
-String trim_suffix(String &id);
+String get_context_id (Translator_group * ancestor, const char * type);
+String trim_suffix (String &id);
 
 ADD_THIS_TRANSLATOR (Lyric_phrasing_engraver);
 
@@ -60,13 +60,13 @@ ADD_THIS_TRANSLATOR (Lyric_phrasing_engraver);
   unnecessarily convoluted.
  */
 
-Lyric_phrasing_engraver::Lyric_phrasing_engraver()
+Lyric_phrasing_engraver::Lyric_phrasing_engraver ()
 {
   voice_alist_ = SCM_EOL;
   any_notehead_l_ = 0;
 }
 
-Lyric_phrasing_engraver::~Lyric_phrasing_engraver()
+Lyric_phrasing_engraver::~Lyric_phrasing_engraver ()
 {
   /*
     No need to delete alist_; that's what Garbage collection is for.
@@ -85,87 +85,87 @@ Lyric_phrasing_engraver::finalize ()
 
 
 Syllable_group * 
-Lyric_phrasing_engraver::lookup_context_id(const String &context_id)
+Lyric_phrasing_engraver::lookup_context_id (const String &context_id)
 {
-  SCM key = ly_str02scm(context_id.ch_C());
-  if( ! gh_null_p(voice_alist_) ) {
-    SCM s = scm_assoc(key, voice_alist_);
-    if(! (gh_boolean_p(s) && !to_boolean(s))) {
+  SCM key = ly_str02scm (context_id.ch_C ());
+  if (! gh_null_p (voice_alist_)) {
+    SCM s = scm_assoc (key, voice_alist_);
+    if (! (gh_boolean_p (s) && !to_boolean (s))) {
       /* match found */
-      // ( key . ( (alist_entry . old_entry) . previous_entry) )
-      if(to_boolean(gh_cdadr(s))) { // it's an old entry ... make it a new one
-       SCM val = gh_cons(gh_cons(gh_caadr(s), SCM_BOOL_F), gh_cddr(s)); 
-       voice_alist_ = scm_assoc_set_x(voice_alist_, gh_car(s), val);
-       return unsmob_voice_entry (gh_caar(val));
+      // (key . ((alist_entry . old_entry) . previous_entry))
+      if (to_boolean (gh_cdadr (s))) { // it's an old entry ... make it a new one
+       SCM val = gh_cons (gh_cons (gh_caadr (s), SCM_BOOL_F), gh_cddr (s)); 
+       voice_alist_ = scm_assoc_set_x (voice_alist_, gh_car (s), val);
+       return unsmob_voice_entry (gh_caar (val));
       }
       else { // the entry is current ... return it.
-       SCM entry_scm = gh_caadr(s);
-       return unsmob_voice_entry(entry_scm);
+       SCM entry_scm = gh_caadr (s);
+       return unsmob_voice_entry (entry_scm);
       }
     }
   }
-  // ( ( alist_entry . old_entry ) . previous_entry )
-  SCM val = gh_cons(gh_cons(Syllable_group::make_entry (), SCM_BOOL_F), 
+  // ((alist_entry . old_entry) . previous_entry)
+  SCM val = gh_cons (gh_cons (Syllable_group::make_entry (), SCM_BOOL_F), 
                    Syllable_group::make_entry ()); 
 
-  voice_alist_ = scm_acons(key, val, voice_alist_);
-  return unsmob_voice_entry (gh_caar(val));
+  voice_alist_ = scm_acons (key, val, voice_alist_);
+  return unsmob_voice_entry (gh_caar (val));
 }
 
 
 void 
-Lyric_phrasing_engraver::record_notehead(const String &context_id, 
+Lyric_phrasing_engraver::record_notehead (const String &context_id, 
                                         Grob * notehead)
 {
-  Syllable_group * v = lookup_context_id(context_id);
-  v->set_notehead(notehead);
-  if(!any_notehead_l_)
+  Syllable_group * v = lookup_context_id (context_id);
+  v->set_notehead (notehead);
+  if (!any_notehead_l_)
     any_notehead_l_ = notehead;
 }
   
 void 
-Lyric_phrasing_engraver::record_lyric(const String &context_id, Grob * lyric)
+Lyric_phrasing_engraver::record_lyric (const String &context_id, Grob * lyric)
 {
-  Syllable_group * v = lookup_context_id(context_id);
-  v->add_lyric(lyric);
+  Syllable_group * v = lookup_context_id (context_id);
+  v->add_lyric (lyric);
 }
 
 void 
-Lyric_phrasing_engraver::record_extender(const String &context_id, Grob * extender)
+Lyric_phrasing_engraver::record_extender (const String &context_id, Grob * extender)
 {
-  SCM key = ly_str02scm(context_id.ch_C());
-  if( ! gh_null_p(voice_alist_) ) {
-    SCM s = scm_assoc(key, voice_alist_);
-    if(! (gh_boolean_p(s) && !to_boolean(s))) {
+  SCM key = ly_str02scm (context_id.ch_C ());
+  if (! gh_null_p (voice_alist_)) {
+    SCM s = scm_assoc (key, voice_alist_);
+    if (! (gh_boolean_p (s) && !to_boolean (s))) {
       /* match found */
-      // ( key . ( (alist_entry . old_entry) . previous_entry) )
-      SCM previous_scm = gh_cddr(s);
-      if(previous_scm != SCM_EOL) {
-       Syllable_group * v = unsmob_voice_entry(previous_scm);
-       v->add_extender(extender);
+      // (key . ((alist_entry . old_entry) . previous_entry))
+      SCM previous_scm = gh_cddr (s);
+      if (previous_scm != SCM_EOL) {
+       Syllable_group * v = unsmob_voice_entry (previous_scm);
+       v->add_extender (extender);
       }
     }
   }
 }
 
 void 
-Lyric_phrasing_engraver::record_melisma(const String &context_id)
+Lyric_phrasing_engraver::record_melisma (const String &context_id)
 {
-  Syllable_group * v = lookup_context_id(context_id);
-  v->set_melisma();
+  Syllable_group * v = lookup_context_id (context_id);
+  v->set_melisma ();
 }
   
 void
-Lyric_phrasing_engraver::acknowledge_grob(Grob_info i)
+Lyric_phrasing_engraver::acknowledge_grob (Grob_info i)
 {
-  SCM p = get_property("automaticPhrasing");
-  if(!to_boolean(p))
+  SCM p = get_property ("automaticPhrasing");
+  if (!to_boolean (p))
     return;
 
 
   Grob *h = i.elem_l_;
 
-  if (Note_head::has_interface(h)) {
+  if (Note_head::has_interface (h)) {
     /* caught a note head ... do something with it */
     /* ... but not if it's a grace note ... */
     bool grace= to_boolean (i.elem_l_->get_grob_property ("grace"));
@@ -175,12 +175,12 @@ Lyric_phrasing_engraver::acknowledge_grob(Grob_info i)
       return;
 
     /* what's its Voice context name? */
-    String voice_context_id = get_context_id(i.origin_trans_l_->daddy_trans_l_, "Voice");
-    record_notehead(voice_context_id, h);
+    String voice_context_id = get_context_id (i.origin_trans_l_->daddy_trans_l_, "Voice");
+    record_notehead (voice_context_id, h);
 
     /* is it in a melisma ? */
-    if(to_boolean(i.origin_trans_l_->get_property("melismaEngraverBusy"))) {
-      record_melisma(voice_context_id);
+    if (to_boolean (i.origin_trans_l_->get_property ("melismaEngraverBusy"))) {
+      record_melisma (voice_context_id);
     }
     return;
   }
@@ -190,15 +190,15 @@ 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_l_->get_property ("associatedVoice");
     if (gh_string_p (voice_context_scm)) {
-      voice_context_id = ly_scm2string(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 = trim_suffix(voice_context_id);
+      voice_context_id = get_context_id (i.origin_trans_l_->daddy_trans_l_, "LyricsVoice");
+      voice_context_id = trim_suffix (voice_context_id);
     }
-    record_lyric(voice_context_id, h);
+    record_lyric (voice_context_id, h);
     return;
   }
 
@@ -215,21 +215,21 @@ Lyric_phrasing_engraver::acknowledge_grob(Grob_info i)
      then ignore it and let the Extender_engraver take care of it (i.e. finish at next
      lyric).
   */
-  if(h->has_interface (ly_symbol2scm ("lyric-extender-interface"))) {
-    String voice_context_id = get_context_id(i.origin_trans_l_->daddy_trans_l_, "LyricsVoice");
-    record_extender(trim_suffix(voice_context_id), h);
+  if (h->has_interface (ly_symbol2scm ("lyric-extender-interface"))) {
+    String voice_context_id = get_context_id (i.origin_trans_l_->daddy_trans_l_, "LyricsVoice");
+    record_extender (trim_suffix (voice_context_id), h);
     return;
   }
 }
 
 String 
-get_context_id(Translator_group * ancestor, const char *type)
+get_context_id (Translator_group * ancestor, const char *type)
 {
-  while(ancestor != 0 && ancestor->type_str_ != type) {
+  while (ancestor != 0 && ancestor->type_str_ != type) {
     ancestor = ancestor->daddy_trans_l_;
   }
 
-  if(ancestor != 0) {
+  if (ancestor != 0) {
     return ancestor->id_str_;
   }
 
@@ -237,11 +237,11 @@ get_context_id(Translator_group * ancestor, const char *type)
 }
 
 String 
-trim_suffix(String &id)
+trim_suffix (String &id)
 {
-  int index = id.index_i('-');
-  if(index >= 0) {
-    return id.left_str(index);
+  int index = id.index_i ('-');
+  if (index >= 0) {
+    return id.left_str (index);
   }
   return id;
 }
@@ -250,33 +250,33 @@ trim_suffix(String &id)
 void Lyric_phrasing_engraver::create_grobs () 
 {
   /* iterate through entries in voice_alist_
-     for each, call set_lyric_align(alignment). Issue a warning if this returns false.
+     for each, call set_lyric_align (alignment). Issue a warning if this returns false.
   */
   String punc;
-  SCM sp = get_property("phrasingPunctuation");
-  punc = gh_string_p(sp) ? ly_scm2string(sp) : ".,;:?!\""; 
+  SCM sp = get_property ("phrasingPunctuation");
+  punc = gh_string_p (sp) ? ly_scm2string (sp) : ".,;:?!\""; 
   
-  for(SCM v=voice_alist_; gh_pair_p(v); v = gh_cdr(v)) {
-    SCM v_entry = gh_cdar(v);
+  for (SCM v=voice_alist_; gh_pair_p (v); v = gh_cdr (v)) {
+    SCM v_entry = gh_cdar (v);
     // ((current . oldflag) . previous)
-    if(!to_boolean(gh_cdar(v_entry))) { // not an old entry left over from a prior note ...
-      Syllable_group *entry = unsmob_voice_entry(gh_caar(v_entry));
+    if (!to_boolean (gh_cdar (v_entry))) { // not an old entry left over from a prior note ...
+      Syllable_group *entry = unsmob_voice_entry (gh_caar (v_entry));
 
       /*
        TODO: give context for warning.
        */
-      if(! entry->set_lyric_align(punc.ch_C(), any_notehead_l_))
+      if (! entry->set_lyric_align (punc.ch_C (), any_notehead_l_))
        warning (_ ("lyrics found without any matching notehead"));
 
       // is this note melismatic? If so adjust alignment of previous one.
-      if(entry->get_melisma()) {
-       if(entry->lyric_count())
+      if (entry->get_melisma ()) {
+       if (entry->lyric_count ())
          warning (_ ("Huh? Melismatic note found to have associated lyrics."));
-       SCM previous_scm = gh_cdr(v_entry);
-       if(previous_scm != SCM_EOL) {
-         Syllable_group *previous = unsmob_voice_entry(previous_scm);
-         if (previous->lyric_count())
-           previous->adjust_melisma_align();
+       SCM previous_scm = gh_cdr (v_entry);
+       if (previous_scm != SCM_EOL) {
+         Syllable_group *previous = unsmob_voice_entry (previous_scm);
+         if (previous->lyric_count ())
+           previous->adjust_melisma_align ();
        }
       }
     }
@@ -287,20 +287,20 @@ void Lyric_phrasing_engraver::create_grobs ()
 void
 Lyric_phrasing_engraver::stop_translation_timestep ()
 {
-  for(SCM v=voice_alist_; gh_pair_p(v); v = gh_cdr(v)) {
-    SCM entry_scm = gh_cdar(v);
+  for (SCM v=voice_alist_; gh_pair_p (v); v = gh_cdr (v)) {
+    SCM entry_scm = gh_cdar (v);
     // ((alist_entry . entry_is_old) . previous_entry)
-    Syllable_group * entry = unsmob_voice_entry(gh_caar(entry_scm));
+    Syllable_group * entry = unsmob_voice_entry (gh_caar (entry_scm));
 
     // set previous_entry, set entry_is_old, and resave it to alist_
     // but only change if this current was not old.
-    if(! to_boolean(gh_cdar(entry_scm))) { 
-      Syllable_group * previous_entry = unsmob_voice_entry(gh_cdr(entry_scm));
-      previous_entry->copy(entry);
-      entry_scm = gh_cons(gh_cons(gh_caar(entry_scm), SCM_BOOL_T), gh_cdr(entry_scm));
-      voice_alist_ = scm_assoc_set_x(voice_alist_, gh_caar(v), entry_scm);
+    if (! to_boolean (gh_cdar (entry_scm))) { 
+      Syllable_group * previous_entry = unsmob_voice_entry (gh_cdr (entry_scm));
+      previous_entry->copy (entry);
+      entry_scm = gh_cons (gh_cons (gh_caar (entry_scm), SCM_BOOL_T), gh_cdr (entry_scm));
+      voice_alist_ = scm_assoc_set_x (voice_alist_, gh_caar (v), entry_scm);
     }
-    entry->next_lyric();
+    entry->next_lyric ();
   }
   any_notehead_l_ = 0;
 }
index 868dbbd07718e04cc20513ba4bfefab1986bed6b..7f122864d8489fe4517b55f24baafa42d974a06f 100644 (file)
@@ -117,7 +117,7 @@ static Long_option_init options_static[] = {
   {0, "safe", 's',  _i ("inhibit file output naming and exporting")},
   {0, "no-timestamps", 'T',  _i ("don't timestamp the output")},
   {0, "version", 'v',  _i ("print version number")},
-  {0, "verbose", 'V', _i("verbose")},
+  {0, "verbose", 'V', _i ("verbose")},
   {0, "warranty", 'w',  _i ("show warranty and copyright")},
   {0, "midi-debug", 'X',  _i ("write midi ouput in formatted ascii")},
   {0,0,0,0}
@@ -141,7 +141,7 @@ usage ()
   cout << _ ("Typeset music and or play MIDI from FILE");
   cout << "\n\n";
   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"
@@ -239,10 +239,10 @@ setup_paths ()
     urg; what *do* we want with $LILYPONDPREFIX, DIR_DATADIR and $prefix/share
     handy for multiple source-dir runs, though...
    */
-  if (!prefix_directory.empty_b())
+  if (!prefix_directory.empty_b ())
     {
       lily_locale_dir = prefix_directory + "/share/locale";
-      bindtextdomain (name.ch_C (), lily_locale_dir.ch_C());
+      bindtextdomain (name.ch_C (), lily_locale_dir.ch_C ());
     }
   else
     bindtextdomain (name.ch_C (), DIR_LOCALEDIR);
@@ -269,7 +269,7 @@ setup_paths ()
       global_path.add (p);
 
 #if !KPATHSEA
-      /* Urg: GNU make's $(word) index starts at 1 */
+      /* Urg: GNU make's $ (word) index starts at 1 */
       int i  = 1;
       while (global_path.try_add (p + to_str (".") + to_str (i)))
        i++;
@@ -404,8 +404,8 @@ main (int argc, char **argv)
 
   ly_init_kpath (argv[0]);
   
-  oparser_p_static = new Getopt_long(argc, argv, options_static);
-  while (Long_option_init const * opt = (*oparser_p_static)())
+  oparser_p_static = new Getopt_long (argc, argv, options_static);
+  while (Long_option_init const * opt = (*oparser_p_static) ())
     {
       switch (opt->shortname_ch_)
        {
@@ -473,7 +473,7 @@ main (int argc, char **argv)
 #ifdef WINNT
   gh_enter (argc, argv, main_prog);
 #else
-  gh_enter (argc, argv, (void(*)(int, char**))main_prog);
+  gh_enter (argc, argv, (void (*) (int, char**))main_prog);
 #endif
 
   return 0;                    // unreachable
index b860caba17b99b9c9e1ac399495423c54b991e50..f0abdbc711e37fd8912ea6ebff4a1eafa5f0110a 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
- (c) 1998--2001 Jan Nieuwenhuizen <janneke@gnu.org>
 (c) 1998--2001 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include <ctype.h>
@@ -28,7 +28,7 @@
 class Mark_engraver : public Engraver
 {
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Mark_engraver ();
 protected:
   Item* text_p_;
@@ -36,7 +36,7 @@ protected:
 protected:
   virtual void stop_translation_timestep ();
   virtual void acknowledge_grob (Grob_info);
-  void create_items(Request*);
+  void create_items (Request*);
   virtual bool try_music (Music *req_l);
   virtual void start_translation_timestep ();
   virtual void initialize ();
@@ -90,7 +90,7 @@ Mark_engraver::stop_translation_timestep ()
 {
   if (text_p_)
     {
-      text_p_->set_grob_property("side-support-elements" , get_property ("staffsFound"));
+      text_p_->set_grob_property ("side-support-elements" , get_property ("staffsFound"));
       typeset_grob (text_p_);
       text_p_ =0;
     }
@@ -180,7 +180,7 @@ Mark_engraver::process_music ()
                  c++;
                  next = to_str (c);
                }
-             m = ly_str02scm (next.ch_C());
+             m = ly_str02scm (next.ch_C ());
            }
          else
            {
@@ -190,18 +190,18 @@ Mark_engraver::process_music ()
          daddy_trans_l_->set_property ("rehearsalMark", m);
          
          text_p_->set_grob_property ("text",
-                                     ly_str02scm ( t.ch_C()));
+                                     ly_str02scm (t.ch_C ()));
 
          String style = "mark";
-         for (int i=0; i < t.length_i(); i++)
+         for (int i=0; i < t.length_i (); i++)
            {
-             if (!isdigit(t[i])) 
+             if (!isdigit (t[i])) 
                {
                  style = "large";
                  break;
                }
            }
-         SCM st = ly_symbol2scm (style.ch_C());
+         SCM st = ly_symbol2scm (style.ch_C ());
          text_p_->set_grob_property ("font-style",  st);
        }
 
index 98deeaca3f41fd51c90e65e5bad0909faf2d131c..83f07738761d7c1ffabb8f372a1a85894f712947 100644 (file)
 class Melisma_engraver:public Engraver
 {
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   bool try_music (Music *);
 };
 
-ADD_THIS_TRANSLATOR(Melisma_engraver);
+ADD_THIS_TRANSLATOR (Melisma_engraver);
 
 bool
-Melisma_engraver::try_music (Music *m 
+Melisma_engraver::try_music (Music *m) 
 {
-  if (dynamic_cast<Melisma_playing_req*>(m))
+  if (dynamic_cast<Melisma_playing_req*> (m))
     {
       SCM plain (get_property ("melismaBusy"));
       SCM slur (get_property ("slurMelismaBusy"));
       SCM tie (get_property ("tieMelismaBusy"));
       SCM beam (get_property ("beamMelismaBusy"));
       
-      if(to_boolean (plain))
+      if ((to_boolean (plain))
          || (to_boolean (slur))
          || (to_boolean (tie))
          || (to_boolean (beam))) {
 
-       daddy_trans_l_->set_property("melismaEngraverBusy",SCM_BOOL_T);
+       daddy_trans_l_->set_property ("melismaEngraverBusy",SCM_BOOL_T);
        return true;
       }
     }
-  daddy_trans_l_->set_property("melismaEngraverBusy",SCM_BOOL_F);
+  daddy_trans_l_->set_property ("melismaEngraverBusy",SCM_BOOL_F);
   return false;
 }
index db149af33b7752c6e961829b37c2afa16947e602..20174ca73fd7101495d8d38188dd286eec39b951 100644 (file)
@@ -13,7 +13,7 @@
 #include "debug.hh"
 #include "scope.hh"
 
-Midi_def::Midi_def()
+Midi_def::Midi_def ()
 {
   // ugh
   set_tempo (Moment (1, 4), 60);
@@ -23,7 +23,7 @@ int
 Midi_def::get_tempo_i (Moment one_beat_mom)
 {
   Moment w = *unsmob_moment (scope_p_->scm_elem ("whole-in-seconds"));
-  Moment wholes_per_min = Moment(60) /w;
+  Moment wholes_per_min = Moment (60) /w;
   int beats_per_min = wholes_per_min / one_beat_mom;
   return int (beats_per_min);
 }
@@ -33,8 +33,8 @@ Midi_def::set_tempo (Moment one_beat_mom, int beats_per_minute_i)
 {
   Moment beats_per_second = Moment (beats_per_minute_i) / Moment (60);
 
-  Moment m = Moment(1)/Moment(beats_per_second * one_beat_mom);
-  scope_p_->set ("whole-in-seconds", m.smobbed_copy());
+  Moment m = Moment (1)/Moment (beats_per_second * one_beat_mom);
+  scope_p_->set ("whole-in-seconds", m.smobbed_copy ());
 }
 
 
index e4cc8262f49c1e6e28b4550854c0457ea3fed35d..7b5401047487560687c684974d104dc3325a1a52 100644 (file)
@@ -330,7 +330,7 @@ String
 Midi_item::i2varint_str (int i)
 {
   int buffer_i = i & 0x7f;
-  while ( (i >>= 7) > 0) 
+  while ((i >>= 7) > 0) 
     {
       buffer_i <<= 8;
       buffer_i |= 0x80;
@@ -472,7 +472,7 @@ Midi_dynamic::str () const
    */
   static Real const full_scale = 127;
   
-  int volume = (int)(audio_l_->volume_*full_scale);
+  int volume = (int) (audio_l_->volume_*full_scale);
   if (volume <= 0)
     volume = 1;
   if (volume > full_scale)
@@ -501,7 +501,7 @@ Midi_piano_pedal::str () const
   else if (audio_l_->type_str_ == "UnaChorda")
     str += to_str ((char)0x43);
 
-  int pedal = ((1 - audio_l_->dir_) / 2 ) * 0x7f;
+  int pedal = ((1 - audio_l_->dir_) / 2) * 0x7f;
   str += to_str ((char)pedal);
   return str;
 }
index 986a58ebdb6ddd68837c404b2686860db22bd822..8be7056b36738bb54bdf81c4520b4c7773c5f85d 100644 (file)
@@ -15,7 +15,7 @@
 #include "midi-stream.hh"
 #include "debug.hh"
 
-Midi_note_event::Midi_note_event() 
+Midi_note_event::Midi_note_event () 
 { 
   ignore_b_ = false;
 }
@@ -34,7 +34,7 @@ Midi_walker::Midi_walker (Audio_staff* audio_staff_l, Midi_track* track_l)
   last_mom_ = 0;
 }
 
-Midi_walker::~Midi_walker()
+Midi_walker::~Midi_walker ()
 { 
   // ugh
   do_stop_notes (last_mom_ + Moment (10, 1));
@@ -50,10 +50,10 @@ Midi_walker::do_start_note (Midi_note* note_p)
   Moment stop_mom = note_p->length_mom () + ptr->audio_column_l_->at_mom ();
 
   bool play_start = true;
-  for (int i=0; i < stop_note_queue.size(); i++) 
+  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->pitch_i () == note_p->pitch_i ()) 
        {
          if (stop_note_queue[i].key < stop_mom)
            {
@@ -93,9 +93,9 @@ Midi_walker::do_start_note (Midi_note* note_p)
 void
 Midi_walker::do_stop_notes (Moment max_mom)
 {
-  while (stop_note_queue.size() && stop_note_queue.front ().key <= max_mom) 
+  while (stop_note_queue.size () && stop_note_queue.front ().key <= max_mom) 
     {
-      Midi_note_event e = stop_note_queue.get();
+      Midi_note_event e = stop_note_queue.get ();
       if (e.ignore_b_)
        {
          delete e.val;
@@ -121,7 +121,7 @@ Midi_walker::output_event (Moment now_mom, Midi_item* l)
 }
 
 void
-Midi_walker::process()
+Midi_walker::process ()
 {
   Audio_item* audio_p = (*item_l_arr_l_)[index_];
   do_stop_notes (audio_p->audio_column_l_->at_mom ());
@@ -133,7 +133,7 @@ Midi_walker::process()
   if (Midi_item* midi_p = Midi_item::midi_p (audio_p))
     {
       midi_p->channel_i_ = track_l_->number_i_;
-      if (Midi_note* note_p = dynamic_cast<Midi_note*>(midi_p))
+      if (Midi_note* note_p = dynamic_cast<Midi_note*> (midi_p))
        {
          if (note_p->length_mom ())
            do_start_note (note_p);
@@ -150,8 +150,8 @@ Midi_walker::ok () const
 }
 
 void
-Midi_walker::operator ++(int)
+Midi_walker::operator ++ (int)
 {
-  assert (ok());
+  assert (ok ());
   index_++;
 }
index 1672a087873112295f45ef44f4d4311a4ab33f2c..45a055f8a6bb4841b2028da33e4309683573dd7f 100644 (file)
@@ -14,7 +14,7 @@
   Return the 2-log, rounded down 
  */
 int
-intlog2(int d)
+intlog2 (int d)
 {
   assert (d);
   int i=0;
@@ -24,12 +24,12 @@ intlog2(int d)
       i++;
     }
   
-  assert (!(d/2));
+  assert (! (d/2));
   return i;
 }
 
 double
-log_2(double x)
+log_2 (double x)
 {
   return log (x)  /log (2.0);
 }
@@ -48,7 +48,7 @@ quantise_iv (Array<Real> positions, Real x)
   Real period = positions.top () - positions[0];
   
   int n =  int ((x - positions[0]) / period);
-  Real frac = (x - positions[0] ) -  n * period;
+  Real frac = (x - positions[0]) -  n * period;
 
   while (frac < 0)
     {
@@ -57,7 +57,7 @@ quantise_iv (Array<Real> positions, Real x)
     }
   
   Real px = frac + positions[0];
-  assert ( positions[0] <= px && px <= positions.top ());
+  assert (positions[0] <= px && px <= positions.top ());
   int i=0;
   for (; i < positions.size () - 1; i++)
     {
index da4ef0cfcb39c2bff55c7b0abd2ce74bcbac4fc3..9ea0eb0a6ac520d68b4142402cd34a87c1561e13 100644 (file)
 SCM
 Molecule::smobbed_copy () const
 {
-  Molecule * m = new Molecule(*this);
+  Molecule * m = new Molecule (*this);
 
   return m->smobbed_self ();
 }
 
 Interval
-Molecule::extent(Axis a) const
+Molecule::extent (Axis a) const
 {
   return dim_[a];
 }
@@ -40,7 +40,7 @@ Molecule::Molecule (Box b, SCM func)
   dim_ = b;
 }
 
-Molecule::Molecule()
+Molecule::Molecule ()
 {
   expr_ = SCM_EOL;
   set_empty (true);
@@ -52,7 +52,7 @@ Molecule::translate (Offset o)
   Axis a = X_AXIS;
   while (a < NO_AXES)
     {
-      if (abs(o[a]) > 30 CM
+      if (abs (o[a]) > 30 CM
          || isinf (o[a]) || isnan (o[a]))
        {
          programming_error ("Improbable offset for translation: setting to zero");
@@ -72,7 +72,7 @@ Molecule::translate (Offset o)
 void
 Molecule::translate_axis (Real x,Axis a)
 {
-  Offset o(0,0);
+  Offset o (0,0);
   o[a] = x;
   translate (o);
 }  
@@ -98,7 +98,7 @@ Molecule::set_empty (bool e)
     }
   else
     {
-      dim_[X_AXIS] = Interval(0,0);
+      dim_[X_AXIS] = Interval (0,0);
       dim_[Y_AXIS] = Interval (0,0);
     }
 }
@@ -108,7 +108,7 @@ void
 Molecule::align_to (Axis a, Direction d)
 {
   Interval i (extent (a));
-  Real r =  (d == CENTER) ? i.center () : i[d];
+  Real r = (d == CENTER) ? i.center () : i[d];
   translate_axis (-r, a);
 }
 
@@ -154,7 +154,7 @@ Molecule::ly_set_molecule_extent_x (SCM mol, SCM axis, SCM np)
   if (m && axis_p (axis) && number_pair_p (np))
     {
       Interval iv = ly_scm2interval (np);
-      m->dim_[Axis(gh_scm2int (axis))] = ly_scm2interval (np);
+      m->dim_[Axis (gh_scm2int (axis))] = ly_scm2interval (np);
     }
   else
     warning ("ly-set-molecule-extent!: invalid arguments");
@@ -208,7 +208,7 @@ molecule_init ()
   scm_make_gsubr ("ly-set-molecule-extent!", 3 , 0, 0, (Scheme_function_unknown) Molecule::ly_set_molecule_extent_x);
   scm_make_gsubr ("ly-get-molecule-extent", 2 , 0, 0, (Scheme_function_unknown) Molecule::ly_get_molecule_extent);
 }
-ADD_SCM_INIT_FUNC(molecule,molecule_init);
+ADD_SCM_INIT_FUNC (molecule,molecule_init);
 
 
 bool
@@ -218,7 +218,7 @@ Molecule::empty_b () const
 }
 
 SCM
-fontify_atom(Font_metric * met, SCM f)
+fontify_atom (Font_metric * met, SCM f)
 {
   if (f == SCM_EOL)
     return f;
@@ -240,7 +240,7 @@ Molecule::extent_box () const
 {
   return dim_;
 }
-IMPLEMENT_SIMPLE_SMOBS(Molecule);
+IMPLEMENT_SIMPLE_SMOBS (Molecule);
 
 
 int
@@ -249,8 +249,8 @@ Molecule::print_smob (SCM s, SCM port, scm_print_state *)
   Molecule  *r = (Molecule *) gh_cdr (s);
      
   scm_puts ("#<Molecule ", port);
-  /*  String str(r->str());
-  scm_puts ((char *)str.ch_C(), port);*/
+  /*  String str (r->str ());
+  scm_puts ((char *)str.ch_C (), port);*/
   scm_puts (" >", port);
   
   return 1;
@@ -265,6 +265,6 @@ Molecule::mark_smob (SCM s)
   return r->expr_;
 }
 
-IMPLEMENT_TYPE_P(Molecule, "molecule?");
-IMPLEMENT_DEFAULT_EQUAL_P(Molecule);
-IMPLEMENT_UNSMOB(Molecule, molecule);
+IMPLEMENT_TYPE_P (Molecule, "molecule?");
+IMPLEMENT_DEFAULT_EQUAL_P (Molecule);
+IMPLEMENT_UNSMOB (Molecule, molecule);
index c2e84fa314f5a89c5426cd5fd5478c84be7883c9..a1c9e071ec77595e79cb2bd2df7879c95c303701 100644 (file)
@@ -13,8 +13,8 @@
 #include "warn.hh"
 #include "ly-smobs.icc"
 
-IMPLEMENT_UNSMOB(Moment,moment);
-IMPLEMENT_SIMPLE_SMOBS(Moment);
+IMPLEMENT_UNSMOB (Moment,moment);
+IMPLEMENT_SIMPLE_SMOBS (Moment);
 IMPLEMENT_TYPE_P (Moment, "moment?");
 
 SCM
@@ -28,7 +28,7 @@ SCM
 Moment::smobbed_copy () const
 {
   Moment * m = new Moment (*this);
-  return m->smobbed_self();
+  return m->smobbed_self ();
 }
 
 
@@ -38,8 +38,8 @@ Moment::print_smob (SCM s, SCM port, scm_print_state *)
   Moment  *r = (Moment *) gh_cdr (s);
      
   scm_puts ("#<Mom ", port);
-  String str(r->str());
-  scm_puts ((char *)str.ch_C(), port);
+  String str (r->str ());
+  scm_puts ((char *)str.ch_C (), port);
   scm_puts (" >", port);
   
   return 1;
@@ -53,7 +53,7 @@ make_rational (SCM n, SCM d)
 {
   Moment m (1,1);
 
-  if (SCM_INUMP (n) && SCM_INUMP(d))
+  if (SCM_INUMP (n) && SCM_INUMP (d))
     {
       m =  Moment (gh_scm2int (n), gh_scm2int (d));
     }
@@ -72,7 +72,7 @@ init_moments ()
   scm_make_gsubr ("make-moment", 2 , 0, 0, (Scheme_function_unknown) make_rational);
 }
 
-ADD_SCM_INIT_FUNC(moms,init_moments);
+ADD_SCM_INIT_FUNC (moms,init_moments);
 
 SCM
 Moment::equal_p (SCM a, SCM b)
index 369f42dcd1842dc8c9c9f9a58a018854122b1524..f207171f965c959027bd196fe84b7dc517375c6a 100644 (file)
@@ -25,7 +25,7 @@ work at Voice level. Not a problem in practice, but aesthetically pleasing?
 class Multi_measure_rest_engraver : public Engraver
 {
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Multi_measure_rest_engraver ();
 
 protected:
@@ -79,11 +79,11 @@ Multi_measure_rest_engraver::try_music (Music* req_l)
       if (scm_equal_p (sp->get_mus_property ("span-type"),
                       ly_str02scm ("rest")) == SCM_BOOL_T)
        {
-         if (sp->get_span_dir() == STOP)
+         if (sp->get_span_dir () == STOP)
            {
              stop_req_l_ = sp;
            }
-         else if (sp->get_span_dir() == START && !new_req_l_)
+         else if (sp->get_span_dir () == START && !new_req_l_)
            {
              new_req_l_ = sp;
            }
@@ -137,7 +137,7 @@ void
 Multi_measure_rest_engraver::stop_translation_timestep ()
 {
   SCM smp = get_property ("measurePosition");
-  Moment mp =  (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
+  Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
 
   if (mmrest_p_ && (now_mom () >= start_moment_) 
     && !mp
@@ -166,7 +166,7 @@ void
 Multi_measure_rest_engraver::start_translation_timestep ()
 {
   SCM smp = get_property ("measurePosition");
-  Moment mp =  (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
+  Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
   
   if (mmrest_p_ && !mp)
     {
index 2138a3de0eb6b2e13d95279fa36835b4c5abf2c5..8b0f8dd5ddde68c3e9d2c8cbdd24ac46694581e2 100644 (file)
@@ -32,11 +32,56 @@ Multi_measure_rest::has_interface (Grob*me)
   return me->has_interface (ly_symbol2scm ("multi-measure-rest-interface"));
 }
 
+MAKE_SCHEME_CALLBACK (Multi_measure_rest,percent,1);
+SCM
+Multi_measure_rest::percent (SCM smob)
+{
+  Grob *me = unsmob_grob (smob);
+  Spanner *sp = dynamic_cast<Spanner*> (me);
+  
+  Font_metric *musfont = Font_interface::get_default_font (me);
+                       
+  Molecule r (musfont->find_by_name ("scripts-repeatsign"));
+
+  // ugh copy & paste.
+  
+  Interval sp_iv;
+  Direction d = LEFT;
+  do
+    {
+      Item * col = sp->get_bound (d)->column_l ();
+
+      Interval coldim = col->extent (0, X_AXIS);
+
+      sp_iv[d] = coldim[-d]  ;
+    }
+  while ((flip (&d)) != LEFT);
+  Real x_off = 0.0;
+
+  Real rx  = sp->get_bound (LEFT)->relative_coordinate (0, X_AXIS);
   /*
+    we gotta stay clear of sp_iv, so move a bit to the right if
+    needed.
+   */
+  x_off += (sp_iv[LEFT] -  rx) >? 0;
+
+  /*
+    center between stuff.
+   */
+  x_off += sp_iv.length ()/ 2;
+
+  r.translate_axis (x_off,X_AXIS);
+
+  
+  return r.smobbed_copy ();
+}
+
+
+/*
    [TODO]                                      17
* variable-sized multi-measure rest symbol: |====| ??
  variable-sized multi-measure rest symbol: |====| ??
 */
-MAKE_SCHEME_CALLBACK(Multi_measure_rest,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Multi_measure_rest,brew_molecule,1);
 SCM
 Multi_measure_rest::brew_molecule (SCM smob) 
 {
@@ -140,7 +185,7 @@ Multi_measure_rest::brew_molecule (SCM smob)
     }
   else 
     {
-      String idx =  ("rests-") + to_str (-4);
+      String idx = ("rests-") + to_str (-4);
       s = musfont->find_by_name (idx);
     }
   
@@ -156,7 +201,7 @@ Multi_measure_rest::brew_molecule (SCM smob)
       mol.add_molecule (s);
     }
   mol.translate_axis (x_off, X_AXIS);
-  return mol.smobbed_copy();
+  return mol.smobbed_copy ();
 }
 
 /*
@@ -179,7 +224,7 @@ Multi_measure_rest::set_spacing_rods (SCM smob)
   Grob*me = unsmob_grob (smob);
 
   Spanner*sp = dynamic_cast<Spanner*> (me);
-  if (!(sp->get_bound (LEFT) && sp->get_bound (RIGHT)))
+  if (! (sp->get_bound (LEFT) && sp->get_bound (RIGHT)))
     {
       programming_error ("Multi_measure_rest::get_rods (): I am not spanned!");
       return SCM_UNSPECIFIED;
diff --git a/lily/music-constructor.cc b/lily/music-constructor.cc
new file mode 100644 (file)
index 0000000..bd14326
--- /dev/null
@@ -0,0 +1,40 @@
+/*   
+  music-constructor.cc --  implement Music_constructor
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include <map>                 // UGH.
+#include "music-constructor.hh"
+typedef Music* (*Music_ctor) ();
+
+static map<String,Music_ctor> *ctors_map_;
+
+void
+add_music_ctor (String s,  Music_ctor c)
+{
+  if (!ctors_map_)
+    ctors_map_ = new map<String, Music_ctor>;
+  
+ (*ctors_map_)[s] = c;
+}
+
+
+Music_ctor
+get_music_ctor (String s)
+{
+  if (ctors_map_->find (s) == ctors_map_->end ())
+    return 0;
+
+  return (* ctors_map_)[s];
+}
+
+Music* 
+get_music (String s)
+{
+  return (*get_music_ctor (s)) ();
+}
+
diff --git a/lily/music-ctor.cc b/lily/music-ctor.cc
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
index 1841c9d182566633c32011f6f2a0075db62221e4..7d5a5155be7a2a0af340e5950efc6833b4447e13 100644 (file)
@@ -72,7 +72,7 @@ Music_iterator::ok () const
 }
 
 void
-Music_iterator::skip (Moment )
+Music_iterator::skip (Moment)
 {
 }
 
@@ -109,7 +109,7 @@ Music_iterator::static_get_iterator_p (Music *m)
 
 
 Moment
-Music_iterator::music_length_mom() const
+Music_iterator::music_length_mom () const
 {
   return music_length_;
 }
@@ -155,7 +155,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_l ()->try_music ((Music*)m); // ugh
   Music_iterator * it = b ? (Music_iterator*) this : 0;        // ugh
   if (!it)
     it = try_music_in_children (m);
@@ -168,4 +168,4 @@ Music_iterator::try_music_in_children (Music *) const
   return 0;
 }
 
-IMPLEMENT_CTOR_CALLBACK(Music_iterator);
+IMPLEMENT_CTOR_CALLBACK (Music_iterator);
index f11985ca72c366d6e4c01252124601c2fa6e72a7..e3e188e9e2b7bb55304a350470e6e15d98fd0284 100644 (file)
@@ -24,19 +24,33 @@ Simultaneous_music::length_mom () const
   return maximum_length ();
 }
 
-Simultaneous_music::Simultaneous_music(SCM head)
+Simultaneous_music::Simultaneous_music (SCM head)
   : Music_sequence (head)
 {
   set_mus_property ("iterator-ctor",
                    Simultaneous_music_iterator::constructor_cxx_function);
 }
 
-Sequential_music::Sequential_music(SCM head)
+Simultaneous_music::Simultaneous_music ()
+  : Music_sequence ()
+{
+  set_mus_property ("iterator-ctor",
+                   Simultaneous_music_iterator::constructor_cxx_function);
+  
+}
+
+Sequential_music::Sequential_music (SCM head)
   : Music_sequence (head)
 {
   set_mus_property ("iterator-ctor",
                    Sequential_music_iterator::constructor_cxx_function);
 }
+Sequential_music::Sequential_music ()
+  : Music_sequence ()
+{
+  set_mus_property ("iterator-ctor",
+                   Sequential_music_iterator::constructor_cxx_function);
+}
 
 
 Moment
@@ -51,13 +65,19 @@ Simultaneous_music::to_relative_octave (Pitch p)
   return do_relative_octave (p, true);
 }
 
-Request_chord::Request_chord(SCM s)
+Request_chord::Request_chord (SCM s)
   : Simultaneous_music (s)
 {
   set_mus_property ("iterator-ctor",
                    Request_chord_iterator::constructor_cxx_function);
 }
 
+Request_chord::Request_chord ()
+{
+  set_mus_property ("iterator-ctor",
+                   Request_chord_iterator::constructor_cxx_function);
+}
+
 Pitch
 Request_chord::to_relative_octave (Pitch last)
 {
@@ -69,7 +89,7 @@ Request_chord::to_relative_octave (Pitch last)
          Pitch pit = *unsmob_pitch (m->get_mus_property ("pitch"));
          
          pit.to_relative_octave (last);
-         m->set_mus_property ("pitch", pit.smobbed_copy());
+         m->set_mus_property ("pitch", pit.smobbed_copy ());
                  
          return pit;
        }
@@ -79,3 +99,6 @@ Request_chord::to_relative_octave (Pitch last)
 
 
 
+ADD_MUSIC (Simultaneous_music);
+ADD_MUSIC (Sequential_music);
+ADD_MUSIC (Request_chord);
index 395b7589d396cb4ca611b3aba283e65db3f38c46..eb58cec14ce650bbfe0e80a5762b8dd679135fca 100644 (file)
@@ -65,17 +65,17 @@ Music_output_def::Music_output_def (Music_output_def const &s)
 }
 
 
-IMPLEMENT_SMOBS(Music_output_def);
-IMPLEMENT_UNSMOB(Music_output_def,music_output_def);
-IMPLEMENT_DEFAULT_EQUAL_P(Music_output_def);
+IMPLEMENT_SMOBS (Music_output_def);
+IMPLEMENT_UNSMOB (Music_output_def,music_output_def);
+IMPLEMENT_DEFAULT_EQUAL_P (Music_output_def);
 
 SCM
 Music_output_def::mark_smob (SCM m)
 {
   Music_output_def * mo = (Music_output_def*) SCM_CELL_WORD_1 (m);
   scm_gc_mark (mo->style_sheet_);
-  scm_gc_mark (mo->translator_tab_->self_scm());
-  scm_gc_mark (mo->variable_tab_->self_scm());
+  scm_gc_mark (mo->translator_tab_->self_scm ());
+  scm_gc_mark (mo->variable_tab_->self_scm ());
 
   return mo->scaled_fonts_;
 }
index 2ef13f02f714f114c9e1727f992ff9f3fef15d4b..5be315fcd10ffa46fa204186398b8f263a5bf563 100644 (file)
@@ -47,11 +47,11 @@ void
 Music_sequence::append_music (Music *m)
 {
   set_mus_property ("elements",
-                   gh_append2( music_list(), gh_cons (m->self_scm (), SCM_EOL)));
+                   gh_append2 (music_list (), gh_cons (m->self_scm (), SCM_EOL)));
   scm_unprotect_object (m->self_scm ());
 }
 
-Music_sequence::Music_sequence(SCM l)
+Music_sequence::Music_sequence (SCM l)
   : Music (l)
 {
 }
@@ -107,7 +107,7 @@ Music_sequence::do_relative_octave (Pitch p, bool ret_first)
   for (SCM s = music_list (); gh_pair_p (s);  s = gh_cdr (s))
     {
       last = unsmob_music (gh_car (s))->to_relative_octave (last);
-      if (!count ++ )
+      if (!count ++)
        retval = last;
     }
 
@@ -123,3 +123,11 @@ Music_sequence::compress (Moment m)
   for (SCM s = music_list (); gh_pair_p (s);  s = gh_cdr (s))
     unsmob_music (gh_car (s))->compress (m);
 }
+
+ADD_MUSIC (Music_sequence);
+
+Music_sequence::Music_sequence ()
+  : Music (SCM_EOL)
+{
+  
+}
index 32c1962891a6e8a765bc3c46d72e436814403aaf..a80577f387ebae0cfcb65c780ed94923c3ecb2fd 100644 (file)
@@ -81,4 +81,4 @@ Music_wrapper_iterator::try_music_in_children (Music *m) const
   return child_iter_p_->try_music (m);
 }
 
-IMPLEMENT_CTOR_CALLBACK(Music_wrapper_iterator);
+IMPLEMENT_CTOR_CALLBACK (Music_wrapper_iterator);
index 72c161d487163e93b2b79e67311e5cce8f60b3bd..3fc8d714c3502191a2f470f45892fd36950e6045 100644 (file)
@@ -21,7 +21,7 @@ Music_wrapper::transpose (Pitch p)
 }
 
 
-Music_wrapper::Music_wrapper(SCM l)
+Music_wrapper::Music_wrapper (SCM l)
   : Music (l)
 {
 }
@@ -50,3 +50,11 @@ Music_wrapper::compress (Moment m)
 {
   element ()->compress (m);
 }
+
+ADD_MUSIC (Music_wrapper);
+
+Music_wrapper::Music_wrapper ()
+  : Music (SCM_EOL)
+{
+  
+}
index e3272b1989b56acbfdaefefcf99e88a4cf6a1b7b..64044b1f5ac9ddcb34876beffd88d974188472a5 100644 (file)
@@ -43,7 +43,7 @@ Music::Music (Music const &m)
 }
 
 
-Music::Music(SCM l)
+Music::Music (SCM l)
 {
   immutable_property_alist_ = l;
   mutable_property_alist_ = SCM_EOL;
@@ -53,7 +53,7 @@ Music::Music(SCM l)
 SCM
 Music::mark_smob (SCM m)
 {
-  Music * mus = (Music *)SCM_CELL_WORD_1(m);
+  Music * mus = (Music *)SCM_CELL_WORD_1 (m);
   scm_gc_mark (mus->immutable_property_alist_);
   scm_gc_mark (mus->mutable_property_alist_);
   return SCM_EOL;
@@ -71,11 +71,11 @@ Music::length_mom () const
 {
   SCM l = get_mus_property ("length");
   if (unsmob_moment (l))
-    return *unsmob_moment(l);
+    return *unsmob_moment (l);
   else if (gh_procedure_p (l))
     {
-      SCM res = gh_call1(l, self_scm( ));
-      return *unsmob_moment(res);
+      SCM res = gh_call1 (l, self_scm ());
+      return *unsmob_moment (res);
     }
     
   return 0;
@@ -94,11 +94,11 @@ print_alist (SCM a, SCM port)
 }
 
 int
-Music::print_smob(SCM s, SCM p, scm_print_state*)
+Music::print_smob (SCM s, SCM p, scm_print_state*)
 {
   scm_puts ("#<Music ", p);
   Music* m = unsmob_music (s);
-  scm_puts (classname(m),p);
+  scm_puts (classname (m),p);
 
   print_alist (m->mutable_property_alist_, p);
   print_alist (m->immutable_property_alist_, p);
@@ -115,14 +115,14 @@ Music::to_relative_octave (Pitch m)
 
 
 void
-Music::transpose (Pitch )
+Music::transpose (Pitch)
 {
 }
 
-IMPLEMENT_TYPE_P(Music, "music?");
-IMPLEMENT_UNSMOB(Music,music);
-IMPLEMENT_SMOBS(Music);
-IMPLEMENT_DEFAULT_EQUAL_P(Music);
+IMPLEMENT_TYPE_P (Music, "music?");
+IMPLEMENT_UNSMOB (Music,music);
+IMPLEMENT_SMOBS (Music);
+IMPLEMENT_DEFAULT_EQUAL_P (Music);
 
 /****************************/
 
@@ -136,7 +136,7 @@ Music::get_mus_property (const char *nm) const
 SCM
 Music::get_mus_property (SCM sym) const
 {
-  SCM s = scm_sloppy_assq(sym, mutable_property_alist_);
+  SCM s = scm_sloppy_assq (sym, mutable_property_alist_);
   if (s != SCM_BOOL_F)
     return gh_cdr (s);
 
@@ -219,7 +219,7 @@ ly_get_mus_property (SCM mus, SCM sym)
     }
   else
     {
-      warning (_("ly_get_mus_property (): Not a Music"));
+      warning (_ ("ly_get_mus_property (): Not a Music"));
       scm_write (mus, scm_current_error_port ());
     }
   return SCM_EOL;
@@ -233,7 +233,7 @@ ly_set_mus_property (SCM mus, SCM sym, SCM val)
 
   if (!gh_symbol_p (sym))
     {
-      warning (_("ly_set_mus_property (): Not a symbol"));
+      warning (_ ("ly_set_mus_property (): Not a symbol"));
       scm_write (mus, scm_current_error_port ());      
 
       return SCM_UNSPECIFIED;
@@ -245,17 +245,38 @@ ly_set_mus_property (SCM mus, SCM sym, SCM val)
     }
   else
     {
-      warning (_("ly_set_mus_property ():  not of type Music"));
+      warning (_ ("ly_set_mus_property ():  not of type Music"));
       scm_write (mus, scm_current_error_port ());
     }
 
   return SCM_UNSPECIFIED;
 }
 
+
+// to do  property args 
+SCM
+ly_make_music (SCM type)
+{
+  if (!gh_string_p (type))
+    {
+      warning (_ ("ly_make_music (): Not a string"));
+      scm_write (type, scm_current_error_port ());      
+
+      return SCM_UNSPECIFIED;
+    }
+  else
+    {
+      SCM s =       get_music (ly_scm2string (type))->self_scm ();
+      scm_unprotect_object (s);
+      return s;
+    }
+}
+
 static void
 init_functions ()
 {
   scm_make_gsubr ("ly-get-mus-property", 2, 0, 0, (Scheme_function_unknown)ly_get_mus_property);
   scm_make_gsubr ("ly-set-mus-property", 3, 0, 0, (Scheme_function_unknown)ly_set_mus_property);
+  scm_make_gsubr ("ly-make-music", 1, 0, 0, (Scheme_function_unknown)ly_make_music);  
 }
-ADD_SCM_INIT_FUNC(musicscm,init_functions);
+ADD_SCM_INIT_FUNC (musicscm,init_functions);
index a1ea36b4ed2ba47575cd44278732cbe41e2811ba..463d0775e81c558d266b09e98e77b3d58c6465a1 100644 (file)
@@ -53,16 +53,16 @@ Rhythmic_req::do_equal_b (Request const* r) const
 Moment
 Rhythmic_req::length_mom () const
 {
-  return  unsmob_duration (  get_mus_property( "duration"))->length_mom ();
+  return  unsmob_duration (get_mus_property ("duration"))->length_mom ();
 
 }
 
 void
 Rhythmic_req::compress (Moment m)
 {
-  Duration *d =  unsmob_duration (get_mus_property"duration"));
+  Duration *d =  unsmob_duration (get_mus_property ("duration"));
 
-  set_mus_property ("duration", d ->compressed (m).smobbed_copy());
+  set_mus_property ("duration", d ->compressed (m).smobbed_copy ());
 }
 
 bool
@@ -101,7 +101,6 @@ Text_script_req::do_equal_b (Request const* r) const
                          t->get_mus_property ("text"));
 }
 
-
 bool
 Articulation_req::do_equal_b (Request const* r) const
 {
@@ -111,3 +110,15 @@ Articulation_req::do_equal_b (Request const* r) const
 }
 
 
+
+
+
+
+
+
+
+
+
+
+
+
index ff9cebe793f0a0a8e2c2203f71cee2e0331489ed..9000acf6e6c28f32a5554d7be2f6eb8397ea4270 100644 (file)
@@ -90,7 +90,7 @@ static Keyword_ent the_key_tab[]={
   {0,0}
 };
 
-My_lily_lexer::My_lily_lexer()
+My_lily_lexer::My_lily_lexer ()
 {
   keytable_p_ = new Keyword_table (the_key_tab);
   toplevel_variable_tab_ = new Scheme_hash_table ;
@@ -111,9 +111,9 @@ My_lily_lexer::lookup_keyword (String s)
 SCM
 My_lily_lexer::lookup_identifier (String s)
 {
-  SCM sym = ly_symbol2scm (s.ch_C());
+  SCM sym = ly_symbol2scm (s.ch_C ());
   
-  for (int i = scope_l_arr_.size (); i--; )
+  for (int i = scope_l_arr_.size (); i--;)
     {
       SCM val = SCM_UNSPECIFIED;
       if (scope_l_arr_[i]->try_retrieve (sym, &val))
@@ -126,7 +126,7 @@ void
 My_lily_lexer::start_main_input ()
 {  
   new_input (main_input_str_, source_global_l);
-  allow_includes_b_ = allow_includes_b_ &&  !(safe_global_b);
+  allow_includes_b_ = allow_includes_b_ &&  ! (safe_global_b);
 }
 
 void
@@ -134,13 +134,13 @@ My_lily_lexer::set_identifier (String name_str, SCM s)
 {
   if (lookup_keyword (name_str) >= 0)
     {
-      warning (  _f ("Identifier name is a keyword: `%s'", name_str));
+      warning (_f ("Identifier name is a keyword: `%s'", name_str));
     }
   
   scope_l_arr_.top ()->set (name_str, s);
 }
 
-My_lily_lexer::~My_lily_lexer()
+My_lily_lexer::~My_lily_lexer ()
 {
   delete keytable_p_;
   scm_unprotect_object (toplevel_variable_tab_->self_scm ());
@@ -152,22 +152,22 @@ My_lily_lexer::~My_lily_lexer()
 void
 My_lily_lexer::LexerError (char const *s)
 {
-  if (include_stack_.empty())
+  if (include_stack_.empty ())
     {
       progress_indication (_f ("error at EOF: %s", s)+ String ("\n"));
     }
   else
     {
       errorlevel_i_ |= 1;
-      Input spot (source_file_l(),here_ch_C());
+      Input spot (source_file_l (),here_ch_C ());
       spot.error (s);
     }
 }
 
 char
-My_lily_lexer::escaped_char(char c) const
+My_lily_lexer::escaped_char (char c) const
 {
-  switch(c)
+  switch (c)
     {
     case 'n':
       return '\n';
index 821f49f4b2356e2a94f64b736ac1ed28c9504485..7fa6ff7d04b3157a3574c0406bdddf407c154f83 100644 (file)
@@ -26,14 +26,14 @@ My_lily_parser::My_lily_parser (Sources * source_l)
   default_header_p_ =0;
 }
 
-My_lily_parser::~My_lily_parser()
+My_lily_parser::~My_lily_parser ()
 {
   delete lexer_p_;
   delete default_header_p_;
 }
 
 void
-My_lily_parser::set_version_check (bool )
+My_lily_parser::set_version_check (bool)
 {
 }
 
@@ -44,7 +44,7 @@ My_lily_parser::parse_file (String init, String s)
 
   lexer_p_->main_input_str_ = s;
 
-  progress_indication (_("Parsing..."));
+  progress_indication (_ ("Parsing..."));
 
   set_yydebug (flower_dstream &&!flower_dstream->silent_b ("Parser"));
   lexer_p_->new_input (init, source_l_);
@@ -52,7 +52,7 @@ My_lily_parser::parse_file (String init, String s)
 
   progress_indication ("\n");
   
-  if (!define_spot_array_.empty())
+  if (!define_spot_array_.empty ())
     {
       define_spot_array_.top ().warning (_ ("Braces don't match"));
       error_level_i_ = 1;
@@ -64,21 +64,21 @@ My_lily_parser::parse_file (String init, String s)
 }
 
 void
-My_lily_parser::remember_spot()
+My_lily_parser::remember_spot ()
 {
-  define_spot_array_.push (here_input());
+  define_spot_array_.push (here_input ());
 }
 
 char const *
-My_lily_parser::here_ch_C() const
+My_lily_parser::here_ch_C () const
 {
-  return lexer_p_->here_ch_C();
+  return lexer_p_->here_ch_C ();
 }
 
 void
 My_lily_parser::parser_error (String s)
 {
-  here_input().error (s);
+  here_input ().error (s);
   error_level_i_ = 1;
   exit_status_global = 1;
 }
@@ -91,13 +91,13 @@ My_lily_parser::set_last_duration (Duration const *d)
 
 
 Input
-My_lily_parser::pop_spot()
+My_lily_parser::pop_spot ()
 {
-  return define_spot_array_.pop();
+  return define_spot_array_.pop ();
 }
 
 Input
-My_lily_parser::here_input() const
+My_lily_parser::here_input () const
 {
   return  lexer_p_->here_input ();
 }
@@ -108,7 +108,7 @@ My_lily_parser::here_input() const
 
 My_lily_parser * current_parser;
 
-MAKE_SCHEME_CALLBACK(My_lily_parser,paper_description, 0);
+MAKE_SCHEME_CALLBACK (My_lily_parser,paper_description, 0);
 
 SCM
 My_lily_parser::paper_description ()
index 80e7b8c553b9b587d7b45d1abcbe7e9e1e5be519..6cf77b6d5ec6a210f1e0ac0f1d625802cf8497d3 100644 (file)
@@ -48,11 +48,11 @@ Item *
 Note_column::stem_l (Grob*me) 
 {
   SCM s = me->get_grob_property ("stem");
-  return  dynamic_cast<Item*>(unsmob_grob (s));
+  return  dynamic_cast<Item*> (unsmob_grob (s));
 }
   
 Slice
-Note_column::head_positions_interval(Grob *me)
+Note_column::head_positions_interval (Grob *me)
 {
   Slice  iv;
 
index 0ccd6dd9811750dbca42c0d467e4f506a5384bff..fe74fcbb82840354b05f8065036e64f534fd2366 100644 (file)
@@ -28,7 +28,7 @@ Note_head::ledger_line (Interval xwid, Grob *me)
   Molecule *e = &endings[LEFT];
   endings[RIGHT] = *e;
   
-  Real thick = e->extent (Y_AXIS).length();
+  Real thick = e->extent (Y_AXIS).length ();
   Real len = e->extent (X_AXIS).length () - thick;
 
   Molecule total;
@@ -36,7 +36,7 @@ Note_head::ledger_line (Interval xwid, Grob *me)
   do {
     endings[d].translate_axis (xwid[d] - endings[d].extent (X_AXIS)[d], X_AXIS);
     total.add_molecule (endings[d]);    
-  } while ((flip(&d)) != LEFT);
+  } while ((flip (&d)) != LEFT);
 
   Real xpos = xwid [LEFT] + len;
 
@@ -51,7 +51,7 @@ Note_head::ledger_line (Interval xwid, Grob *me)
 }
 
 
-MAKE_SCHEME_CALLBACK(Note_head,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Note_head,brew_molecule,1);
 
 SCM
 Note_head::brew_molecule (SCM smob)  
@@ -64,7 +64,7 @@ Note_head::brew_molecule (SCM smob)
   int p = (int)  rint (Staff_symbol_referencer::position_f (me));
   int streepjes_i = abs (p) < sz 
     ? 0
-    : (abs(p) - sz) /2;
+    : (abs (p) - sz) /2;
 
   SCM style  = me->get_grob_property ("style");
   if (!gh_symbol_p (style))
@@ -74,9 +74,9 @@ Note_head::brew_molecule (SCM smob)
 
   // ugh: use gh_call ()
   Molecule out = Font_interface::get_default_font (me)->find_by_name (String ("noteheads-") + 
-               ly_scm2string (scm_eval2 (gh_list (ly_symbol2scm("find-notehead-symbol"),
+               ly_scm2string (scm_eval2 (gh_list (ly_symbol2scm ("find-notehead-symbol"),
                                                  me->get_grob_property ("duration-log"),
-                                                 ly_quote_scm(style),
+                                                 ly_quote_scm (style),
                                                  SCM_UNDEFINED),
                                          SCM_EOL)));
 
@@ -85,7 +85,7 @@ Note_head::brew_molecule (SCM smob)
       Direction dir = (Direction)sign (p);
       Interval hd = out.extent (X_AXIS);
       Real hw = hd.length ()/4;
-      Molecule ledger (ledger_line  (Interval (hd[LEFT] - hw,
+      Molecule ledger (ledger_line (Interval (hd[LEFT] - hw,
                                               hd[RIGHT] + hw), me));
       
 
@@ -102,7 +102,7 @@ Note_head::brew_molecule (SCM smob)
          out.add_molecule (s);
        }
     }
-  return out.smobbed_copy();
+  return out.smobbed_copy ();
 }
 
 bool
@@ -112,7 +112,7 @@ Note_head::has_interface (Grob*m)
 }
 
 
-MAKE_SCHEME_CALLBACK(Note_head,brew_ez_molecule,1);
+MAKE_SCHEME_CALLBACK (Note_head,brew_ez_molecule,1);
 
 SCM
 Note_head::brew_ez_molecule (SCM smob)
index 954798be267a476d5b51d32568bbdb9949617b0d..2b3b9e082732853dc343439a189a34b680c65e25 100644 (file)
@@ -25,14 +25,14 @@ class Note_heads_engraver : public Engraver
   Link_array<Note_req> note_req_l_arr_;
   Moment note_end_mom_;
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   
 protected:
   virtual void start_translation_timestep ();
   virtual bool try_music (Music *req_l) ;
   virtual void create_grobs ();
   virtual void acknowledge_grob (Grob_info) ;
-  virtual void stop_translation_timestep();
+  virtual void stop_translation_timestep ();
 };
 
 
@@ -95,7 +95,7 @@ Note_heads_engraver::create_grobs ()
        }
 
       Pitch *pit =unsmob_pitch (req->get_mus_property ("pitch"));
-      note_p->set_grob_property("staff-position",  gh_int2scm (pit->steps ()));
+      note_p->set_grob_property ("staff-position",  gh_int2scm (pit->steps ()));
 
       if (to_boolean (get_property ("easyPlay")))
        {
@@ -112,7 +112,7 @@ Note_heads_engraver::create_grobs ()
 }
  
 void
-Note_heads_engraver::stop_translation_timestep()
+Note_heads_engraver::stop_translation_timestep ()
 {
   for (int i=0; i < note_p_arr_.size (); i++)
     {
@@ -133,7 +133,7 @@ Note_heads_engraver::start_translation_timestep ()
 {
   /* TODO:make this settable?
    */
-  if (note_end_mom_ > now_mom() )
+  if (note_end_mom_ > now_mom ())
     {
       Score_engraver * e = 0;
       Translator * t  =  daddy_grav_l ();
@@ -151,5 +151,5 @@ Note_heads_engraver::start_translation_timestep ()
 
 
 
-ADD_THIS_TRANSLATOR(Note_heads_engraver);
+ADD_THIS_TRANSLATOR (Note_heads_engraver);
 
index 462045446cdbf5233f3c7f2f576dfd68e952683d..c6e0261b2c389079b4476b563886d0d7b4e22031 100644 (file)
@@ -14,7 +14,7 @@
 class Note_name_engraver : public Engraver
 {
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Link_array<Note_req> req_l_arr_;
   Link_array<Item> texts_;
   virtual bool  try_music (Music*m);
@@ -45,10 +45,10 @@ Note_name_engraver::create_grobs ()
        s += " ";
       s += unsmob_pitch (req_l_arr_[i]->get_mus_property ("pitch"))->str ();
     }
-  if (s.length_i())
+  if (s.length_i ())
     {
       Item * t = new Item (get_property ("NoteName"));
-      t->set_grob_property ("text", ly_str02scm ( s.ch_C()));
+      t->set_grob_property ("text", ly_str02scm (s.ch_C ()));
       announce_grob (t, req_l_arr_[0]);
       texts_.push (t);
     }
@@ -61,8 +61,8 @@ Note_name_engraver::stop_translation_timestep ()
     {
       typeset_grob (texts_[i]);
     }
-  texts_.clear() ;
+  texts_.clear () ;
   req_l_arr_.clear ();
 }
 
-ADD_THIS_TRANSLATOR(Note_name_engraver);
+ADD_THIS_TRANSLATOR (Note_name_engraver);
index 5729d0aa1c2707f3ffa71d96fe55a0844f705d82..c2665f5495b8fc680e5e25a74114eebf0edef2ea 100644 (file)
@@ -18,7 +18,7 @@ Convert reqs to audio notes.
 */
 class Note_performer : public Performer {
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   
 protected:
   virtual bool try_music (Music *req_l) ;
@@ -43,7 +43,7 @@ Note_performer::create_audio_elements ()
       int transposing_i = 0;
       //urg
       SCM prop = get_property ("transposing");
-      if (gh_number_p(prop)) 
+      if (gh_number_p (prop)) 
        transposing_i = gh_scm2int (prop);
 
       while (note_req_l_arr_.size ())
index 7676c82e1aa91b12a9c517e3ec5b6667c2ac24cf..7db91b877db2e37e23aa8d2de7d20e45df19f69e 100644 (file)
@@ -14,7 +14,7 @@
 class Output_property_engraver : public Engraver
 {
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
 protected:
 
   /*
@@ -52,7 +52,7 @@ Output_property_engraver::try_music (Music* m)
 void
 Output_property_engraver::acknowledge_grob (Grob_info inf)
 {
-  for (int i=props_.size (); i--; )
+  for (int i=props_.size (); i--;)
     {
       Music * o = props_[i];
       SCM pred = o->get_mus_property ("predicate");
@@ -77,4 +77,4 @@ Output_property_engraver::stop_translation_timestep ()
   props_.clear ();
 }
 
-ADD_THIS_TRANSLATOR(Output_property_engraver);
+ADD_THIS_TRANSLATOR (Output_property_engraver);
index 882d9d63e3a2bef5dfdc750b4a4190d6d533547e..5759b85b42874f2d39620bb0059cf259fdc34a32 100644 (file)
@@ -24,4 +24,4 @@ Output_property_music_iterator::process (Moment m)
   skip (m);
 }
 
-IMPLEMENT_CTOR_CALLBACK(Output_property_music_iterator);
+IMPLEMENT_CTOR_CALLBACK (Output_property_music_iterator);
index 985b080a079dedcac2899b2c412ec59eebea8741..4e76ff5ed8fe37b1312b959f766668c34e8eee46 100644 (file)
 void
 Paper_column::do_break_processing ()
 {
-  Spaceable_grob::remove_interface(this);
+  Spaceable_grob::remove_interface (this);
   Item::do_break_processing ();
 }
 
 int
-Paper_column::rank_i(Grob*me) 
+Paper_column::rank_i (Grob*me) 
 {
   return dynamic_cast<Paper_column*> (me)->rank_i_;
 }
 
 Line_of_score*
-Paper_column::line_l() const
+Paper_column::line_l () const
 {
   return line_l_;
 }
@@ -34,7 +34,7 @@ Paper_column::line_l() const
 Paper_column*
 Paper_column::column_l () const
 {
-  return (Paper_column*)(this);
+  return (Paper_column*) (this);
 }
 
 Paper_column::Paper_column (SCM l)
@@ -69,11 +69,11 @@ Paper_column::musical_b () const
     {
       s = *unsmob_moment (m);
     }
-  return s != Moment(0);
+  return s != Moment (0);
 }
 
 bool
-Paper_column::used_b (Grob*me )
+Paper_column::used_b (Grob*me)
 {
   return gh_pair_p (me->get_grob_property ("elements")) ||  Item::breakable_b (me)
     || gh_pair_p (me->get_grob_property ("bounded-by-me"))
index 8b365ab7ebde4438e5c5b66b30ad899f3c150697..5ad7799c11156af1103716be8e144cdd62e8c075 100644 (file)
@@ -36,13 +36,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.ch_C ()));
 }
 
 SCM
 Paper_def::get_scmvar (String s) const
 {
-  return  scope_p_->scm_elem (ly_symbol2scm (s.ch_C()));
+  return  scope_p_->scm_elem (ly_symbol2scm (s.ch_C ()));
 }
 
 Real
@@ -96,7 +96,7 @@ Paper_def::get_next_score_count () const
 }
 
 void
-Paper_def::reset_score_count()
+Paper_def::reset_score_count ()
 {
   score_count_i_ = 0;
 }
@@ -138,7 +138,7 @@ Paper_def::find_font (SCM fn, Real m)
   
   Font_metric*  f = all_fonts_global_p->find_font (ly_scm2string (fn));
   SCM val = Scaled_font_metric::make_scaled_font_metric (f, m);
-  scaled_fonts_ = scm_acons (key, val, scaled_fonts_ );
+  scaled_fonts_ = scm_acons (key, val, scaled_fonts_);
 
   scm_unprotect_object (val);
 
@@ -155,7 +155,7 @@ Paper_def::font_descriptions ()const
 
   
   SCM l = SCM_EOL;
-  for (SCM s = scaled_fonts_; gh_pair_p (s); s = gh_cdr(s))
+  for (SCM s = scaled_fonts_; gh_pair_p (s); s = gh_cdr (s))
     {
       SCM desc = gh_caar (s);
       SCM mdesc = unsmob_metrics (gh_cdar (s))->description_;
index 46016c7573f425a7adfdadd430aa55d71a86b776..faa0551ab02dba5a9a4d88b7c744137a0edc4c3d 100644 (file)
@@ -47,10 +47,10 @@ Paper_outputter::Paper_outputter (String name)
     {
        *stream_p_ << ""
          ";;; Usage: guile -s x.scm > x.tex\n"
-         "(primitive-load-path 'standalone.scm)\n"
-         ";(scm-tex-output)\n"
-         "(scm-ps-output)\n"
-         "(map (lambda (x) (display (ly-eval x))) '(\n"
+         " (primitive-load-path 'standalone.scm)\n"
+         "; (scm-tex-output)\n"
+         " (scm-ps-output)\n"
+         " (map (lambda (x) (display (ly-eval x))) ' (\n"
        ;
     }
 
@@ -74,7 +74,7 @@ Paper_outputter::output_header ()
       gh_define ("security-paranoia", SCM_BOOL_T);      
     }
 
-  SCM exp = gh_list (ly_symbol2scm ((output_format_global + "-scm").ch_C()),
+  SCM exp = gh_list (ly_symbol2scm ((output_format_global + "-scm").ch_C ()),
                     ly_quote_scm (ly_symbol2scm ("all-definitions")),
                     SCM_UNDEFINED);
   exp = scm_eval2 (exp, SCM_EOL);
@@ -117,7 +117,7 @@ void
 Paper_outputter::output_comment (String str)
 {
   output_scheme (gh_list (ly_symbol2scm ("comment"),
-                         ly_str02scm ((char*)str.ch_C()),
+                         ly_str02scm ((char*)str.ch_C ()),
                          SCM_UNDEFINED)
                 );
 }
@@ -137,13 +137,13 @@ Paper_outputter::output_scheme (SCM scm)
 /*
   UGH.
 
-  Should probably change interface to do less eval ( symbol ), and more
+  Should probably change interface to do less eval (symbol), and more
   apply (procedure, args)
  */
 void
 Paper_outputter::dump_scheme (SCM s)
 {
-  if  (verbatim_scheme_b_)
+  if (verbatim_scheme_b_)
     {
       *stream_p_ << ly_scm2string (ly_write2scm (s));
     }
@@ -192,8 +192,8 @@ Paper_outputter::output_version ()
   else
     id_str += String (", ") + version_str ();
 
-  output_String_def ( "lilypondtagline", id_str);
-  output_String_def ( "LilyPondVersion", version_str ());
+  output_String_def ("lilypondtagline", id_str);
+  output_String_def ("LilyPondVersion", version_str ());
 }
 
 
@@ -205,7 +205,7 @@ Paper_outputter::output_Real_def (String k, Real v)
   
   SCM scm = gh_list (ly_symbol2scm ("lily-def"),
                     ly_str02scm (k.ch_l ()),
-                    ly_str02scm (to_str(v).ch_l ()),
+                    ly_str02scm (to_str (v).ch_l ()),
                     SCM_UNDEFINED);
   output_scheme (scm);
 }
index 82f275a0988e9bbacb115dff9b95f09b54f056a3..6d659d7064cd0576c3f222eb9bb227c2d3e1d914 100644 (file)
@@ -74,7 +74,7 @@ void
 Paper_score::process ()
 {
   if (verbose_global_b)
-    progress_indication ( _f("Element count %d ",  line_l_->element_count ()));
+    progress_indication (_f ("Element count %d ",  line_l_->element_count ()));
 
   
   progress_indication (_ ("Preprocessing elements...") + " ");
index 1583e0e6e4bcf7daf2bd15e37a54bd3ecd81c0b3..21f657bdc885162e0abfaab269e757dab2823334 100644 (file)
@@ -48,7 +48,7 @@
 bool
 is_duration_b (int t)
 {
-  return t && t == 1 << intlog2(t);
+  return t && t == 1 << intlog2 (t);
 }
 
 
@@ -73,7 +73,7 @@ print_lilypond_versions (ostream &os)
 }
 
 
-// needed for bison.simple's malloc() and free()
+// needed for bison.simple's malloc () and free ()
 #include <malloc.h>
 
 #ifndef NDEBUG
@@ -84,7 +84,8 @@ print_lilypond_versions (ostream &os)
 
 #define YYPARSE_PARAM my_lily_parser_l
 #define YYLEX_PARAM my_lily_parser_l
-#define THIS ((My_lily_parser *) my_lily_parser_l)
+#define THIS\
+       ((My_lily_parser *) my_lily_parser_l)
 
 #define yyerror THIS->parser_error
 #define ARRAY_SIZE(a,s)   if (a.size () != s) THIS->parser_error (_f ("Expecting %d arguments", s))
@@ -347,7 +348,7 @@ notenames_body:
                if (!unsmob_pitch (pt))
                        THIS->parser_error ("Need pitch object.");
                else
-                       scm_hashq_set_x (tab, gh_caar(s), pt);
+                       scm_hashq_set_x (tab, gh_caar (s), pt);
          }
 
          $$ = tab;
@@ -460,7 +461,7 @@ translator_spec_body:
                        ->add_push_property (scm_string_to_symbol ($2), $4, $6);
        }
        | translator_spec_body STRING REVERT embedded_scm  {
-         unsmob_translator_def($$)->add_pop_property (
+         unsmob_translator_def ($$)->add_pop_property (
                scm_string_to_symbol ($2), $4);
        }
        | translator_spec_body STRING '=' identifier_init semicolon     { 
@@ -468,10 +469,10 @@ translator_spec_body:
                if (gh_string_p ($4) || gh_number_p ($4) || gh_boolean_p ($4))
                        v = $4;
                else 
-                       THIS->parser_error (_("Wrong type for property value"));
+                       THIS->parser_error (_ ("Wrong type for property value"));
 
                /* ugh*/
-               unsmob_translator_def($$)->add_property_assign ($2, v);
+               unsmob_translator_def ($$)->add_property_assign ($2, v);
        }
        | translator_spec_body NAME STRING semicolon {
                unsmob_translator_def ($$)->type_name_ = $3;
@@ -550,7 +551,7 @@ score_body:
 output_def:
        music_output_def_body '}' {
                $$ = $1;
-               THIS-> lexer_p_-> scope_l_arr_.pop();
+               THIS-> lexer_p_-> scope_l_arr_.pop ();
        }
        ;
 
@@ -580,13 +581,13 @@ music_output_def_body:
        }
        | PAPER '{' MUSIC_OUTPUT_DEF_IDENTIFIER         {
                Music_output_def *p = unsmob_music_output_def ($3);
-               p = p->clone();
+               p = p->clone ();
                THIS->lexer_p_->scope_l_arr_.push (p->scope_p_);
                $$ = p;
        }
        | MIDI '{' MUSIC_OUTPUT_DEF_IDENTIFIER  {
                Music_output_def *p = unsmob_music_output_def ($3);
-               p = p->clone();
+               p = p->clone ();
 
                THIS->lexer_p_->scope_l_arr_.push (p->scope_p_);
                $$ = p;
@@ -727,12 +728,12 @@ Simple_music:
                SCM pred = $2;
                if (!gh_symbol_p ($3))
                {
-                       THIS->parser_error (_("Second argument must be a symbol")); 
+                       THIS->parser_error (_ ("Second argument must be a symbol")); 
                }
                /*hould check # args */
                if (!gh_procedure_p (pred))
                {
-                       THIS->parser_error (_("First argument must be a procedure taking 1 argument"));
+                       THIS->parser_error (_ ("First argument must be a procedure taking 1 argument"));
                }
 
                Music *m = new Music (SCM_EOL);
@@ -751,7 +752,7 @@ Simple_music:
        | translator_change
        | Simple_music '*' bare_unsigned '/' bare_unsigned      {
                $$ = $1;
-               $$->compress (Moment($3, $5 ));
+               $$->compress (Moment ($3, $5 ));
        }
        | Simple_music '*' bare_unsigned                 {
                $$ = $1;
@@ -907,8 +908,8 @@ part_combined_music:
                p->set_mus_property ("one", $3->self_scm ());
                p->set_mus_property ("two", $4->self_scm ());  
 
-               scm_unprotect_object ($3->self_scm());
-               scm_unprotect_object ($4->self_scm());  
+               scm_unprotect_object ($3->self_scm ());
+               scm_unprotect_object ($4->self_scm ());  
 
 
                $$ = p;
@@ -1006,12 +1007,12 @@ scalar:
 
 request_chord:
        pre_requests simple_element post_requests       {
-               Music_sequence *l = dynamic_cast<Music_sequence*>($2);
+               Music_sequence *l = dynamic_cast<Music_sequence*> ($2);
                if (l) {
-                       for (int i=0; i < $1->size(); i++)
-                               l->append_music ($1->elem(i));
-                       for (int i=0; i < $3->size(); i++)
-                               l->append_music ($3->elem(i));
+                       for (int i=0; i < $1->size (); i++)
+                               l->append_music ($1->elem (i));
+                       for (int i=0; i < $3->size (); i++)
+                               l->append_music ($3->elem (i));
                        }
                else
                        programming_error ("Need Sequence to add music to");
@@ -1051,7 +1052,7 @@ command_element:
                p->set_mus_property ("iterator-ctor",
                        Property_iterator::constructor_cxx_function);
 
-               Moment m = - unsmob_duration($2)->length_mom ();
+               Moment m = - unsmob_duration ($2)->length_mom ();
                p->set_mus_property ("value", m.smobbed_copy ());
 
                Context_specced_music * sp = new Context_specced_music (SCM_EOL);
@@ -1068,7 +1069,7 @@ command_element:
                SCM l = SCM_EOL;
                for (SCM s = result ; gh_pair_p (s); s = gh_cdr (s)) {
                        Music * p = new Music (SCM_EOL);
-                       set_music_properties(p, gh_car (s));
+                       set_music_properties (p, gh_car (s));
                        l = gh_cons (p->self_scm (), l);
                        scm_unprotect_object (p->self_scm ());
                }
@@ -1080,7 +1081,7 @@ command_element:
                scm_unprotect_object (seq->self_scm ());
 
                $$ =sp ;
-               sp-> set_mus_property("context-type", ly_str02scm("Staff"));
+               sp-> set_mus_property ("context-type", ly_str02scm ("Staff"));
        }
        | TIME_T bare_unsigned '/' bare_unsigned ';' {
                Music * p = new Music (SCM_EOL);
@@ -1121,13 +1122,13 @@ shorthand_command_req:
        }
        | '['           {
                Span_req*b= new Span_req;
-               b->set_span_dir(START);
+               b->set_span_dir (START);
                b->set_mus_property ("span-type", ly_str02scm ("beam"));
                $$ =b;
        }
        | ']'           {
                Span_req*b= new Span_req;
-               b->set_span_dir( STOP);
+               b->set_span_dir ( STOP);
                b->set_mus_property ("span-type", ly_str02scm ("beam"));
                $$ = b;
        }
@@ -1140,7 +1141,7 @@ 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_span_dir ( Direction ($2));
                sp_p->set_mus_property ("span-type",$3);
                sp_p->set_spot (THIS->here_input ());
                $$ = sp_p;
@@ -1178,7 +1179,7 @@ verbose_command_req:
                Key_change_req *key_p= new Key_change_req;
                
                key_p->set_mus_property ("pitch-alist", $3);
              ((Music* )key_p)->transpose (* unsmob_pitch ($2));
+ ((Music* )key_p)->transpose (* unsmob_pitch ($2));
                $$ = key_p; 
        }
        ;
@@ -1246,7 +1247,7 @@ verbose_request:
        }
        | SPANREQUEST bare_int STRING {
                Span_req * sp_p = new Span_req;
-               sp_p->set_span_dir( Direction($2));
+               sp_p->set_span_dir ( Direction ($2));
                sp_p->set_mus_property ("span-type", $3);
                sp_p->set_spot (THIS->here_input ());
                $$ = sp_p;
@@ -1361,7 +1362,7 @@ explicit_duration:
                $$ = $2;
                if (!unsmob_duration ($2))
                {
-                       THIS->parser_error (_("Must have duration object"));
+                       THIS->parser_error (_ ("Must have duration object"));
                        $$ = Duration ().smobbed_copy ();
                }
        }
@@ -1393,12 +1394,12 @@ close_request_parens:
        '('     {
                Span_req* s= new Span_req;
                $$ = s;
-               s->set_mus_property ("span-type", ly_str02scm( "slur"));
+               s->set_mus_property ("span-type", ly_str02scm ( "slur"));
        }
        | E_OPEN        {
                Span_req* s= new Span_req;
                $$ = s;
-               s->set_mus_property ("span-type", ly_str02scm( "phrasing-slur"));
+               s->set_mus_property ("span-type", ly_str02scm ( "phrasing-slur"));
        }
        | E_SMALLER {
                Span_req*s =new Span_req;
@@ -1430,12 +1431,12 @@ open_request_parens:
        | ')'   {
                Span_req* s= new Span_req;
                $$ = s;
-               s->set_mus_property ("span-type", ly_str02scm( "slur"));
+               s->set_mus_property ("span-type", ly_str02scm ( "slur"));
        }
        | E_CLOSE       {
                Span_req* s= new Span_req;
                $$ = s;
-               s->set_mus_property ("span-type", ly_str02scm( "phrasing-slur"));
+               s->set_mus_property ("span-type", ly_str02scm ( "phrasing-slur"));
        }
        ;
 
@@ -1456,7 +1457,7 @@ gen_text_def:
                String ds = to_str ($1);
                Text_script_req* t = new Text_script_req;
 
-               t->set_mus_property ("text",  ly_str02scm (ds.ch_C()));
+               t->set_mus_property ("text",  ly_str02scm (ds.ch_C ()));
                t->set_mus_property ("text-type" , ly_symbol2scm ("finger"));
                t->set_spot (THIS->here_input ());
                $$ = t;
@@ -1465,10 +1466,10 @@ gen_text_def:
 
 script_abbreviation:
        '^'             {
-               $$ = gh_str02scm  ("hat");
+               $$ = gh_str02scm ("hat");
        }
        | '+'           {
-               $$ = gh_str02scm("plus");
+               $$ = gh_str02scm ("plus");
        }
        | '-'           {
                $$ = gh_str02scm ("dash");
@@ -1612,19 +1613,19 @@ FIXME: location is one off, since ptich & duration don't contain origin refs.
                      Skip_req * skip_p = new Skip_req;
                      skip_p->set_mus_property ("duration" ,$2);
 
-                     skip_p->set_spot (THIS->here_input());
+                     skip_p->set_spot (THIS->here_input ());
                        e = skip_p->self_scm ();
                    }
                  else
                    {
                      Rest_req * rest_req_p = new Rest_req;
                      rest_req_p->set_mus_property ("duration", $2);
-                     rest_req_p->set_spot (THIS->here_input());
+                     rest_req_p->set_spot (THIS->here_input ());
                        e = rest_req_p->self_scm ();
                    }
                  Simultaneous_music* velt_p = new Request_chord (SCM_EOL);
                velt_p-> set_mus_property ("elements", gh_list (e,SCM_UNDEFINED));
-                 velt_p->set_spot (THIS->here_input());
+                 velt_p->set_spot (THIS->here_input ());
 
 
                  $$ = velt_p;
@@ -1644,7 +1645,7 @@ FIXME: location is one off, since ptich & duration don't contain origin refs.
                rqc1->set_mus_property ("elements", gh_list (sp1->self_scm (), SCM_UNDEFINED));
                Request_chord * rqc2 = new Request_chord (SCM_EOL);
                rqc2->set_mus_property ("elements", gh_list (sk->self_scm (), SCM_UNDEFINED));;
-               Request_chord * rqc3 = new Request_chord(SCM_EOL);
+               Request_chord * rqc3 = new Request_chord (SCM_EOL);
                rqc3->set_mus_property ("elements", gh_list (sp2->self_scm (), SCM_UNDEFINED));;
 
                SCM ms = gh_list (rqc1->self_scm (), rqc2->self_scm (), rqc3->self_scm (), SCM_UNDEFINED);
@@ -1667,7 +1668,7 @@ FIXME: location is one off, since ptich & duration don't contain origin refs.
                Lyric_req* lreq_p = new Lyric_req;
                 lreq_p->set_mus_property ("text", $1);
                lreq_p->set_mus_property ("duration",$3);
-               lreq_p->set_spot (THIS->here_input());
+               lreq_p->set_spot (THIS->here_input ());
                Simultaneous_music* velt_p = new Request_chord (SCM_EOL);
                velt_p->set_mus_property ("elements", gh_list (lreq_p->self_scm (), SCM_UNDEFINED));
 
@@ -1839,11 +1840,11 @@ bare_unsigned:
                        $$ = gh_scm2int ($1);
 
                } else {
-                       THIS->parser_error (_("need integer number arg"));
+                       THIS->parser_error (_ ("need integer number arg"));
                        $$ = 0;
                }
                if ($$ < 0) {
-                       THIS->parser_error (_("Must be positive integer"));
+                       THIS->parser_error (_ ("Must be positive integer"));
                        $$ = -$$;
                        }
 
@@ -1857,7 +1858,7 @@ bare_int:
                        $$ = k;
                } else
                {
-                       THIS->parser_error (_("need integer number arg"));
+                       THIS->parser_error (_ ("need integer number arg"));
                        $$ = 0;
                }
        }
index 595e3cf822aab5e57d797e659b91a7a11ffd1786..043f83c55725c3e46e20afe39b152921e10e85ab 100644 (file)
@@ -85,7 +85,7 @@ 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_str_ != to_type)
     {
       last = current;
       current = current->daddy_trans_l_;
@@ -130,9 +130,9 @@ get_music_info (Moment m, Music_iterator* iter, SCM *pitches, SCM *durations)
        {
          Music *m = unsmob_music (gh_car (i));
          if (Melodic_req *r = dynamic_cast<Melodic_req *> (m))
-           *pitches = gh_cons (r->get_mus_property("pitch"), *pitches);
+           *pitches = gh_cons (r->get_mus_property ("pitch"), *pitches);
          if (Rhythmic_req *r = dynamic_cast<Rhythmic_req *> (m))
-           *durations = gh_cons (r->get_mus_property("duration"), *durations);
+           *durations = gh_cons (r->get_mus_property ("duration"), *durations);
        }
     }
 }
@@ -228,22 +228,22 @@ Part_combine_music_iterator::get_state (Moment)
            }
          
          if (first_pitches != SCM_EOL && second_pitches == SCM_EOL
-                 && !(second_until_ > now))
+                 && ! (second_until_ > now))
            {
              state |= UNRELATED;
              state &= ~UNISILENCE;
-             if (!(state & ~(UNRELATED | SOLO1 | UNISILENCE)))
+             if (! (state & ~ (UNRELATED | SOLO1 | UNISILENCE)))
                state |= SOLO1;
            }
          else
            state &= ~SOLO1;
 
          if (first_pitches == SCM_EOL && second_pitches != SCM_EOL
-             && !(first_until_ > now))
+             && ! (first_until_ > now))
            {
              state |= UNRELATED;
              state &= ~UNISILENCE;
-             if (!(state & ~(UNRELATED | SOLO2 | UNISILENCE)))
+             if (! (state & ~ (UNRELATED | SOLO2 | UNISILENCE)))
                state |= SOLO2;
            }
          else
@@ -252,31 +252,31 @@ Part_combine_music_iterator::get_state (Moment)
          if (gh_equal_p (first_durations, second_durations))
            {
              state &= ~UNISILENCE;
-             if (!(state & ~(UNIRHYTHM | UNISON)))
+             if (! (state & ~ (UNIRHYTHM | UNISON)))
                state |= UNIRHYTHM;
            }
          else
-           state &= ~(UNIRHYTHM | UNISILENCE);
+           state &= ~ (UNIRHYTHM | UNISILENCE);
          
          if (first_pitches != SCM_EOL
              && gh_equal_p (first_pitches, second_pitches))
            {
              state &= ~UNISILENCE;
-             if (!(state & ~(UNIRHYTHM | UNISON)))
+             if (! (state & ~ (UNIRHYTHM | UNISON)))
                state |= UNISON;
            }
          else
-           state &= ~(UNISON);
+           state &= ~ (UNISON);
            
          if (first_pitches == SCM_EOL && second_pitches == SCM_EOL)
            {
-             if (!(state & ~(UNIRHYTHM | UNISILENCE)))
+             if (! (state & ~ (UNIRHYTHM | UNISILENCE)))
                state |= UNISILENCE;
            }
          else if (!state)
            state |= UNRELATED;
          else
-           state &= ~(UNISILENCE);
+           state &= ~ (UNISILENCE);
 
          if (gh_number_p (interval))
            {
@@ -288,11 +288,11 @@ Part_combine_music_iterator::get_state (Moment)
                  && i >= gh_scm2int (gh_car (s))
                  && i <= gh_scm2int (gh_cdr (s)))
                {
-                 if (!(state & ~(SPLIT_INTERVAL | UNIRHYTHM | UNISON)))
+                 if (! (state & ~ (SPLIT_INTERVAL | UNIRHYTHM | UNISON)))
                    state |= SPLIT_INTERVAL;
                }
              else
-               state &= ~(SPLIT_INTERVAL);
+               state &= ~ (SPLIT_INTERVAL);
            }
 
          if (first && first_pitches != SCM_EOL)
@@ -349,7 +349,7 @@ Part_combine_music_iterator::process (Moment m)
 
   bool combine_b = previously_combined_b;
 
-  if (!(state & UNIRHYTHM)
+  if (! (state & UNIRHYTHM)
       || (state & SPLIT_INTERVAL)
       || (state & (SOLO1 | SOLO2)))
     combine_b = false;
@@ -438,4 +438,4 @@ Part_combine_music_iterator::get_music (Moment m)const
   return s;
 }
 
-IMPLEMENT_CTOR_CALLBACK(Part_combine_music_iterator);
+IMPLEMENT_CTOR_CALLBACK (Part_combine_music_iterator);
index 75edf8cbb849cc1ca9529ca1036e0309f0c27403..316d4a117b9fa78679d3d58b31c9444add6a4959 100644 (file)
@@ -58,3 +58,11 @@ Part_combine_music::second_l () const
 {
   return unsmob_music (get_mus_property ("two"));
 }
+
+
+Part_combine_music::Part_combine_music ()
+  : Music (SCM_EOL)
+{
+}
+
+ADD_MUSIC (Part_combine_music);
diff --git a/lily/percent-repeat-engraver.cc b/lily/percent-repeat-engraver.cc
new file mode 100644 (file)
index 0000000..b063ad4
--- /dev/null
@@ -0,0 +1,208 @@
+/*   
+  new-chord-tremolo-engraver.cc --  implement Chord_tremolo_engraver
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2000--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "engraver.hh"
+#include "repeated-music.hh"
+#include "engraver-group-engraver.hh"
+#include "global-translator.hh"
+#include "warn.hh"
+#include "misc.hh"
+#include "spanner.hh"
+#include "item.hh"
+#include "percent-repeat-iterator.hh"
+
+/**
+  This acknowledges repeated music with "percent" style.  It typesets
+  a % sign.  
+
+  TODO:
+
+  - BEAT case: Create items for single beat repeats, i.e. c4 / / /
+
+  - DOUBLE_MEASURE case: attach a % to an appropriate barline.
+  
+*/
+class Percent_repeat_engraver : public Engraver
+{
+  void typeset_perc ();
+public:
+  VIRTUAL_COPY_CONS (Translator);
+  Percent_repeat_engraver ();
+protected:
+  Repeated_music * repeat_;
+
+  /// moment (global time) where beam started.
+  Moment start_mom_;
+  Moment stop_mom_;
+
+  /// location  within measure where beam started.
+  Moment beam_start_location_;
+  Moment next_moment_;
+  Moment body_length_;
+
+  enum {
+    UNKNOWN,
+    BEAT,
+    MEASURE,
+    DOUBLE_MEASURE,
+  } repeat_sign_type_ ;
+  
+  Spanner * perc_p_;
+  Spanner * finished_perc_p_;
+  Item * stem_tremolo_;
+protected:
+  virtual void finalize ();
+  virtual bool try_music (Music*);
+  virtual void acknowledge_grob (Grob_info);
+  virtual void stop_translation_timestep ();
+  virtual void start_translation_timestep ();
+  virtual void process_music ();
+};
+
+Percent_repeat_engraver::Percent_repeat_engraver ()
+{
+  perc_p_  = finished_perc_p_ = 0;
+  repeat_ =0;
+  stem_tremolo_ = 0;
+}
+
+bool
+Percent_repeat_engraver::try_music (Music * m)
+{
+  Repeated_music * rp = dynamic_cast<Repeated_music*> (m);
+  if (rp
+      && rp->get_mus_property ("iterator-ctor")
+         == Percent_repeat_iterator::constructor_cxx_function
+      && !repeat_)
+    {
+      body_length_ = rp->body_length_mom ();
+      int count =   rp->repeat_count ();
+      
+      Moment now = now_mom ();
+      start_mom_ = now;
+      stop_mom_ = start_mom_ + Moment (count) * body_length_;
+      next_moment_ = start_mom_ + body_length_;
+
+      SCM m = get_property ("timeSignatureFraction");
+      Moment mlen (1,
+                 gh_scm2int (gh_cdr (m)));
+
+      if (mlen == body_length_)
+       repeat_sign_type_ = BEAT;
+      else
+       {
+         mlen *= gh_scm2int (gh_car (m));
+         if (mlen == body_length_)
+           repeat_sign_type_ = MEASURE;
+         else if (Moment (2)* mlen == body_length_)
+           repeat_sign_type_ = DOUBLE_MEASURE;
+
+         if (repeat_sign_type_ != MEASURE)
+           {
+             warning (_ ("Don't know yet how to handle this percent repeat."));
+             return false;
+           }
+       }
+
+      repeat_ = rp;
+
+      
+      Global_translator *global_l =0;
+      Translator *t = this;
+      do
+       {
+         t = t->daddy_trans_l_ ;
+         global_l = dynamic_cast<Global_translator*> (t);
+       }
+      while (!global_l);
+
+      for (int i = 0; i < count; i++)  
+       global_l->add_moment_to_process (now + Moment (1+i) * body_length_);
+  
+      return true;
+    }
+
+  return false;
+}
+
+void
+Percent_repeat_engraver::process_music ()
+{
+  if (repeat_ && now_mom () == next_moment_)
+    {
+      if (repeat_sign_type_ == BEAT)
+       {
+         ;
+       }
+      else if (repeat_sign_type_ == MEASURE)
+       {
+         finished_perc_p_ = perc_p_;
+         typeset_perc ();
+         perc_p_ = new Spanner (get_property ("PercentRepeat"));
+         SCM col =get_property ("currentCommandColumn");
+         perc_p_->set_bound (LEFT, unsmob_grob (col));
+         announce_grob (perc_p_, repeat_);
+       }
+
+      next_moment_ = next_moment_ + body_length_;
+    }
+}
+void
+Percent_repeat_engraver::finalize ()
+{
+  typeset_perc ();
+  if (perc_p_)
+    {
+      repeat_->origin ()->warning (_ ("unterminated chord tremolo"));
+      perc_p_->suicide ();
+    }
+}
+
+void
+Percent_repeat_engraver::typeset_perc ()
+{
+  if (finished_perc_p_)
+    {
+      SCM col =get_property ("currentCommandColumn");
+      finished_perc_p_->set_bound (RIGHT, unsmob_grob (col));
+      typeset_grob (finished_perc_p_);
+      finished_perc_p_ = 0;
+    }
+}
+
+
+void
+Percent_repeat_engraver::acknowledge_grob (Grob_info info)
+{
+}
+
+
+void
+Percent_repeat_engraver::start_translation_timestep ()
+{
+  if (perc_p_ && stop_mom_ == now_mom ())
+    {
+      finished_perc_p_ = perc_p_;
+      typeset_perc ();
+      repeat_ = 0;
+      perc_p_ = 0;
+      repeat_sign_type_ = UNKNOWN;
+    }
+}
+
+
+void
+Percent_repeat_engraver::stop_translation_timestep ()
+{
+  typeset_perc ();
+}
+
+ADD_THIS_TRANSLATOR (Percent_repeat_engraver);
+
+
diff --git a/lily/percent-repeat-iterator.cc b/lily/percent-repeat-iterator.cc
new file mode 100644 (file)
index 0000000..b9248bb
--- /dev/null
@@ -0,0 +1,85 @@
+/*   
+  percent-repeat-iterator.cc --  implement Percent_repeat_iterator
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "percent-repeat-iterator.hh"
+#include "repeated-music.hh"
+#include "input.hh"
+
+IMPLEMENT_CTOR_CALLBACK (Percent_repeat_iterator);
+
+
+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;
+  finish_mom_ = p.finish_mom_ ;
+}
+
+bool
+Percent_repeat_iterator::ok () const
+{
+  return child_iter_p_;
+}
+
+void
+Percent_repeat_iterator::construct_children ()
+{
+  Repeated_music * mus =dynamic_cast<Repeated_music *> (music_l_);
+  finish_mom_ = mus->length_mom ();
+  child_iter_p_ = get_iterator_p (mus->body ());
+}
+
+
+void
+Percent_repeat_iterator::process (Moment m)
+{
+  if (!m)
+    {
+      Music_iterator *yeah = try_music (music_l_);
+      if (yeah)
+       set_translator (yeah->report_to_l ());
+      else
+       music_l_->origin ()->warning ( _ ("no one to print a percent"));
+    }
+  
+  if (child_iter_p_->ok ())
+    child_iter_p_->process (m);
+
+  if (finish_mom_ <= m )
+    {
+      delete child_iter_p_;
+      child_iter_p_ = 0;
+    }
+}
+
+Moment
+Percent_repeat_iterator::pending_moment ()const
+{
+  if (child_iter_p_->ok ())
+    return child_iter_p_->pending_moment ();
+  else
+    return finish_mom_ ;
+}
+
+Music_iterator*
+Percent_repeat_iterator::try_music_in_children (Music *m) const
+{
+  return child_iter_p_->try_music (m);
+}
+
+
+Percent_repeat_iterator::~Percent_repeat_iterator ()
+{
+  delete child_iter_p_;
+}
index 9e8715b1116d757bdec861186b7a44963f310fd5..d2d214ab998108ceaeab2b25f5377b65485f91cc 100644 (file)
@@ -32,7 +32,7 @@ Performance::Performance ()
 }
 
 
-Performance::~Performance()
+Performance::~Performance ()
 {
   delete audio_elem_p_list_;
 }
@@ -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_staff_l_arr_.size () + 1;
 
   // ugh
   int clocks_per_4_i = 384;
@@ -53,7 +53,7 @@ Performance::output (Midi_stream& midi_stream)
   for (int i =0; i < audio_staff_l_arr_.size (); i++)
     {
       Audio_staff *s = audio_staff_l_arr_[i];
-      if(verbose_global_b)
+      if (verbose_global_b)
        progress_indication ("[" + to_str (i)) ;
 
       /*
@@ -64,7 +64,7 @@ Performance::output (Midi_stream& midi_stream)
       if (channel == 9)
        channel++;
       s->output (midi_stream, channel++);
-      if(verbose_global_b)
+      if (verbose_global_b)
        progress_indication ("]");
     }
 }
@@ -76,11 +76,11 @@ Performance::output_header_track (Midi_stream& midi_stream)
 
   // perhaps multiple text events?
   String id_str;
-  String str = String (_("Creator: "));
+  String str = String (_ ("Creator: "));
   if (no_timestamps_global_b)
     id_str = gnu_lilypond_str ();
   else
-    id_str = gnu_lilypond_version_str();
+    id_str = gnu_lilypond_version_str ();
   str += id_str;
   str += "\n";
 
@@ -99,10 +99,10 @@ Performance::output_header_track (Midi_stream& midi_stream)
     str += ".\n";
   else
     {
-      str += _(", at ");
+      str += _ (", at ");
       time_t t (time (0));
       str += ctime (&t);
-      str = str.left_str (str.length_i() - 1);
+      str = str.left_str (str.length_i () - 1);
     }
 
   /*
@@ -140,7 +140,7 @@ Performance::add_element (Audio_element *p)
     {
       audio_staff_l_arr_.push (s);
     }
-  else if (Audio_column *c = dynamic_cast<Audio_column*>(p))
+  else if (Audio_column *c = dynamic_cast<Audio_column*> (p))
     {
       c->performance_l_ = this;
     }
@@ -149,7 +149,7 @@ Performance::add_element (Audio_element *p)
 
 
 void
-Performance::process()
+Performance::process ()
 {
   String out = output_name_global;
   if (out == "-")
@@ -168,9 +168,9 @@ Performance::process()
   out = p.str ();
   
   Midi_stream midi_stream (out);
-  progress_indication ( _f ("MIDI output to %s...", out));
+  progress_indication (_f ("MIDI output to %s...", out));
   target_str_global_array.push (out);
 
   output (midi_stream);
-  progress_indication("\n");
+  progress_indication ("\n");
 }
index 5b70ea297f12cbf5b548f4c63a183c054a1397f3..3b5ea7f6a30d11107ed2112763254b458c736b12 100644 (file)
@@ -13,7 +13,7 @@
 #include "debug.hh"
 
 
-ADD_THIS_TRANSLATOR(Performer_group_performer);
+ADD_THIS_TRANSLATOR (Performer_group_performer);
 
 
 void
@@ -28,7 +28,7 @@ Performer_group_performer::announce_element (Audio_element_info info)
 void
 Performer_group_performer::create_audio_elements ()
 {
-  for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr ( p))
+  for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr (p))
     {
       Translator * t = unsmob_translator (gh_car (p));
       Performer * eng = dynamic_cast<Performer*> (t);
@@ -40,7 +40,7 @@ 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_info_arr_.size (); j++)
     {
       Audio_element_info info = announce_info_arr_[j];
 
@@ -55,9 +55,9 @@ Performer_group_performer::acknowledge_audio_elements ()
 }
 
 void
-Performer_group_performer::do_announces()
+Performer_group_performer::do_announces ()
 {
-  for (SCM p = trans_group_list_; gh_pair_p (p); p =gh_cdr ( p))
+  for (SCM p = trans_group_list_; gh_pair_p (p); p =gh_cdr (p))
     {
       Translator * t = unsmob_translator (gh_car (p));
       dynamic_cast<Performer_group_performer*> (t)->do_announces ();
index 205fb3e3532e1cbaf9083f402d48c8213ddb90a0..321ba9f0c4bf4486270739cbdf86ff9fa5092d1b 100644 (file)
@@ -18,9 +18,9 @@ Performer::play_element (Audio_element* p)
 }
 
 int
-Performer::get_tempo_i() const
+Performer::get_tempo_i () const
 {
-  return daddy_perf_l ()->get_tempo_i();
+  return daddy_perf_l ()->get_tempo_i ();
 }
 
 Performer_group_performer*
@@ -47,5 +47,5 @@ Performer::announce_element (Audio_element_info i)
 {
   if (!i.origin_trans_l_)
     i.origin_trans_l_= this;
-  daddy_perf_l()->announce_element (i);
+  daddy_perf_l ()->announce_element (i);
 }
index 2e9a171a66abf339a9a7619f709d8f09d17b9e90..319c2668834fd627c89e707570be4463872be8eb 100644 (file)
@@ -64,7 +64,7 @@ Phrasing_slur_engraver::try_music (Music *req_l)
          /*
            Let's not start more than one phrasing slur per moment.
           */
-         if (sl->get_span_dir() == START)
+         if (sl->get_span_dir () == START)
            {
              if (now_mom () > last_start_)
                {
@@ -128,7 +128,7 @@ Phrasing_slur_engraver::create_grobs ()
     {
       Span_req* phrasing_slur_req_l = new_phrasing_slur_req_l_arr_[i];
       // end phrasing slur: move the phrasing slur to other array
-      if (phrasing_slur_req_l->get_span_dir() == STOP)
+      if (phrasing_slur_req_l->get_span_dir () == STOP)
        {
          if (phrasing_slur_l_stack_.empty ())
            phrasing_slur_req_l->origin ()->warning (_f ("can't find start of phrasing slur"));
@@ -144,7 +144,7 @@ Phrasing_slur_engraver::create_grobs ()
              requests_arr_.pop ();
            }
        }
-      else  if (phrasing_slur_req_l->get_span_dir() == START)
+      else  if (phrasing_slur_req_l->get_span_dir () == START)
        {
          // push a new phrasing_slur onto stack.
          // (use temp. array to wait for all phrasing_slur STOPs)
index 527bd396c775745b99cd4197e1af8f5a917e60af..09f5d1e09355f99075d1bb4f8eec4f0b2d4e5ea9 100644 (file)
@@ -51,7 +51,7 @@ Piano_pedal_engraver::Piano_pedal_engraver ()
   info_list_ = 0;
 }
 void
-Piano_pedal_engraver::initialize()
+Piano_pedal_engraver::initialize ()
 {
   info_list_ = new Pedal_info[4];
   Pedal_info *p = info_list_;
@@ -69,10 +69,10 @@ Piano_pedal_engraver::initialize()
 
       p++;
     }
-  while (*(np ++));
+  while (* (np ++));
 }
 
-Piano_pedal_engraver::~Piano_pedal_engraver()
+Piano_pedal_engraver::~Piano_pedal_engraver ()
 {
   delete[] info_list_;
 }
@@ -92,7 +92,7 @@ Piano_pedal_engraver::acknowledge_grob (Grob_info info)
            {
              Side_position_interface::add_support (p->item_p_, info.elem_l_);
 
-             if (Side_position_interface::get_axis(p->item_p_) == X_AXIS
+             if (Side_position_interface::get_axis (p->item_p_) == X_AXIS
                  && !p->item_p_->parent_l (Y_AXIS))
                p->item_p_->set_parent (info.elem_l_, Y_AXIS);
            }
@@ -107,14 +107,14 @@ Piano_pedal_engraver::acknowledge_grob (Grob_info info)
 bool
 Piano_pedal_engraver::try_music (Music *m)
 {
-  if (Span_req * s = dynamic_cast<Span_req*>(m))
+  if (Span_req * s = dynamic_cast<Span_req*> (m))
     {
       for (Pedal_info*p = info_list_; p->name_; p ++)
        {
          if (scm_equal_p (s->get_mus_property ("span-type"),
                           ly_str02scm (p->name_))==SCM_BOOL_T)
            {
-             p->req_l_drul_[s->get_span_dir()] = s;
+             p->req_l_drul_[s->get_span_dir ()] = s;
              return true;
            }
        }
@@ -131,15 +131,15 @@ Piano_pedal_engraver::create_grobs ()
        continue;
       
       SCM s = SCM_EOL;
-      SCM strings = get_property( ("pedal" + String (p->name_) + "Strings").ch_C());
-      ifscm_ilength (strings) < 3)
+      SCM strings = get_property (("pedal" + String (p->name_) + "Strings").ch_C ());
+      if (scm_ilength (strings) < 3)
        continue;
       
       if (p->req_l_drul_[STOP] && p->req_l_drul_[START])
        {
          if (!p->start_req_l_)
            {
-             p->req_l_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: %s",  p->name_ ));
+             p->req_l_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: %s",  p->name_));
            }
          else
            {
@@ -151,7 +151,7 @@ Piano_pedal_engraver::create_grobs ()
        {
          if (!p->start_req_l_)
            {
-             p->req_l_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: %s", p->name_ ));
+             p->req_l_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: %s", p->name_));
            }
          else
            {
@@ -168,7 +168,7 @@ Piano_pedal_engraver::create_grobs ()
       if (gh_string_p (s))
        {
          String propname = String (p->name_) + "Pedal";
-         p->item_p_ = new Item (get_property (propname.ch_C()));
+         p->item_p_ = new Item (get_property (propname.ch_C ()));
          p->item_p_->set_grob_property ("text", s);
 
          announce_grob (p->item_p_,
index bed707a87c3a89db2d17edeae83efef201f59288..36f91d131d412a888c938a87a28a7d43121f8ece 100644 (file)
@@ -49,7 +49,7 @@ Piano_pedal_performer::Piano_pedal_performer ()
   info_alist_ = 0;
 }
 
-Piano_pedal_performer::~Piano_pedal_performer()
+Piano_pedal_performer::~Piano_pedal_performer ()
 {
   delete[] info_alist_;
 }
@@ -71,7 +71,7 @@ Piano_pedal_performer::initialize ()
 
       p++;
     }
-  while (*(np ++));
+  while (* (np ++));
 }
 
 void
@@ -130,14 +130,14 @@ Piano_pedal_performer::start_translation_timestep ()
 bool
 Piano_pedal_performer::try_music (Music* r)
 {
-  if (Span_req * s = dynamic_cast<Span_req*>(r))
+  if (Span_req * s = dynamic_cast<Span_req*> (r))
     {
       for (Pedal_info*p = info_alist_; p->name_; p ++)
        {
          if (scm_equal_p (s->get_mus_property ("span-type"),
                           ly_str02scm (p->name_)) == SCM_BOOL_T)
            {
-             p->req_l_drul_[s->get_span_dir()] = s;
+             p->req_l_drul_[s->get_span_dir ()] = s;
              return true;
            }
        }
index a1d4121f8f9ec25bc89fec57b47fa7223d88712d..5219e5180b3ed1f37b76171bd6e5463228a42e62 100644 (file)
@@ -22,7 +22,7 @@ Pitch::Pitch (int o, int n, int a)
   if (n < 0 || n >= 7 ||
       a < -2 || a > 2)
     {
-      String s = _("Pitch arguments out of range");
+      String s = _ ("Pitch arguments out of range");
       s += ": alteration = " + to_str (a);
       s += ", notename = " + to_str (n);
       warning (s);
@@ -150,7 +150,7 @@ String
 Pitch::str () const
 {
   int n = (notename_i_ + 2) % 7;
-  String s = to_str (char(n + 'a'));
+  String s = to_str (char (n + 'a'));
   if (alteration_i_)
     s += String (accname[alteration_i_ + 2]);
 
@@ -239,15 +239,15 @@ pitch_transpose (SCM p, SCM delta)
 /****************************************************************/
 
 
-IMPLEMENT_TYPE_P(Pitch, "pitch?");
-IMPLEMENT_UNSMOB(Pitch, pitch);
+IMPLEMENT_TYPE_P (Pitch, "pitch?");
+IMPLEMENT_UNSMOB (Pitch, pitch);
 SCM
-Pitch::mark_smob (SCM )
+Pitch::mark_smob (SCM)
 {
   return SCM_EOL;
 }
 
-IMPLEMENT_SIMPLE_SMOBS(Pitch);
+IMPLEMENT_SIMPLE_SMOBS (Pitch);
 
 
 int
@@ -256,7 +256,7 @@ Pitch::print_smob (SCM s, SCM port, scm_print_state *)
   Pitch  *r = (Pitch *) gh_cdr (s);
      
   scm_puts ("#<Pitch ", port);
-  scm_display (ly_str02scm (r->str().ch_C()), port);
+  scm_display (ly_str02scm (r->str ().ch_C ()), port);
   scm_puts (" >", port);
   
   return 1;
@@ -275,14 +275,14 @@ Pitch::equal_p (SCM a , SCM b)
   return eq ? SCM_BOOL_T : SCM_BOOL_F;
 }
 
-MAKE_SCHEME_CALLBACK(Pitch, less_p, 2);
+MAKE_SCHEME_CALLBACK (Pitch, less_p, 2);
 SCM
 Pitch::less_p (SCM p1, SCM p2)
 {
   Pitch *a = unsmob_pitch (p1);
   Pitch *b = unsmob_pitch (p2);
 
-  if (compare(*a, *b) < 0 )
+  if (compare (*a, *b) < 0)
     return SCM_BOOL_T;
   else
     return SCM_BOOL_F;
@@ -307,7 +307,7 @@ pitch_octave (SCM pp)
   if (!p)
     warning ("Not a pitch");
   else
-    q = p->octave_i();
+    q = p->octave_i ();
 
   return gh_int2scm (q);
 }
@@ -320,7 +320,7 @@ pitch_alteration (SCM pp)
   if (!p)
     warning ("Not a pitch");
   else
-    q = p->alteration_i();
+    q = p->alteration_i ();
 
   return gh_int2scm (q);
 }
@@ -333,7 +333,7 @@ pitch_notename (SCM pp)
   if (!p)
     warning ("Not a pitch");
   else
-    q = p->notename_i();
+    q = p->notename_i ();
 
   return gh_int2scm (q);
 }
@@ -346,15 +346,15 @@ pitch_semitones (SCM pp)
   if (!p)
     warning ("Not a pitch");
   else
-    q = p->steps();
+    q = p->steps ();
 
   return gh_int2scm (q);
 }
 
 static void
-add_funcs()
+add_funcs ()
 {
-  // should take list?: (make-pitch '(octave name accidental))
+  // should take list?: (make-pitch ' (octave name accidental))
   scm_make_gsubr ("make-pitch", 3, 0, 0, (Scheme_function_unknown)make_pitch);
 
   scm_make_gsubr ("pitch-octave", 1, 0, 0, (Scheme_function_unknown)pitch_octave);
@@ -364,7 +364,7 @@ add_funcs()
   scm_make_gsubr ("Pitch::transpose", 2, 0, 0, (Scheme_function_unknown) pitch_transpose);
 }
 
-ADD_SCM_INIT_FUNC(pitch, add_funcs);
+ADD_SCM_INIT_FUNC (pitch, add_funcs);
 
 SCM
 Pitch::smobbed_copy ()const
index d56ee274c8f83c37c5bfeb889e8d5ce20d22be39..6c1a81c3bb5449fc92d43a483f1f1452cd6b0465 100644 (file)
@@ -31,19 +31,19 @@ protected:
   virtual void initialize ();
   virtual void finalize ();
 public:
-  ~Property_engraver();
-  Property_engraver();
-  VIRTUAL_COPY_CONS(Translator);
+  ~Property_engraver ();
+  Property_engraver ();
+  VIRTUAL_COPY_CONS (Translator);
 };
 
 
 
-Property_engraver::Property_engraver()
+Property_engraver::Property_engraver ()
 {
   prop_dict_ = 0;
 }
 void
-Property_engraver::finalize()
+Property_engraver::finalize ()
 {
   
 }
@@ -103,7 +103,7 @@ Property_engraver::apply_properties (SCM p, Grob *e, Translator_group*origin)
       SCM type_p   = gh_cadr (entry);
       SCM elt_prop_sym = gh_caddr (entry);
 
-      SCM preset = scm_assq(elt_prop_sym, e->mutable_property_alist_);
+      SCM preset = scm_assq (elt_prop_sym, e->mutable_property_alist_);
       if (preset != SCM_BOOL_F)
        continue;
   
@@ -152,4 +152,4 @@ Property_engraver::apply_properties (SCM p, Grob *e, Translator_group*origin)
     }
 }
 
-ADD_THIS_TRANSLATOR(Property_engraver);
+ADD_THIS_TRANSLATOR (Property_engraver);
index 30a6dc33724e8322d2adae989045f600c4242e19..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,9 +0,0 @@
-/*   
-  property-inspect.cc --  implement Property inspect funcs.
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
index 9d61539a12172c7124da4a3fe1c15b41a59b07c5..171a872b3f6ec27fa2706bae2013f44e3aa3c35b 100644 (file)
@@ -19,7 +19,7 @@ void
 Property_iterator::process (Moment m)
 {
   SCM sym = music_l_->get_mus_property ("symbol");
-  if (gh_symbol_p(sym))
+  if (gh_symbol_p (sym))
     {
       SCM val = music_l_->get_mus_property ("value");
       bool ok= true;
@@ -38,7 +38,7 @@ Push_property_iterator::process (Moment m)
   SCM eprop = music_l_->get_mus_property ("grob-property");
   SCM val = music_l_->get_mus_property ("grob-value");
 
-  if (to_boolean (music_l_->get_mus_property ( "pop-first")))
+  if (to_boolean (music_l_->get_mus_property ("pop-first")))
     Translator_def::apply_pushpop_property (report_to_l (),
                                            syms, eprop, SCM_UNDEFINED);
 
@@ -57,6 +57,6 @@ Pop_property_iterator::process (Moment m)
   Simple_music_iterator::process (m);
 }
 
-IMPLEMENT_CTOR_CALLBACK(Pop_property_iterator);
-IMPLEMENT_CTOR_CALLBACK(Push_property_iterator);
-IMPLEMENT_CTOR_CALLBACK(Property_iterator);
+IMPLEMENT_CTOR_CALLBACK (Pop_property_iterator);
+IMPLEMENT_CTOR_CALLBACK (Push_property_iterator);
+IMPLEMENT_CTOR_CALLBACK (Property_iterator);
index 3628ef7078c3263b3f173991d099866bdd00c4ad..3c4bcfabf69c4920892d67efa481f1a0c04c0fb9 100644 (file)
@@ -17,22 +17,22 @@ Protected_scm::Protected_scm ()
 
 Protected_scm::Protected_scm (SCM s)
 {
-  object_ = SCM_NIMP(s)  ? scm_protect_object (s): s;
+  object_ = SCM_NIMP (s)  ? scm_protect_object (s): s;
 }
 
 Protected_scm::Protected_scm (Protected_scm const &s)
 {
-  object_ = SCM_NIMP(s.object_) ? scm_protect_object (s.object_) : s.object_;
+  object_ = SCM_NIMP (s.object_) ? scm_protect_object (s.object_) : s.object_;
 }
 
 Protected_scm & 
-Protected_scm::operator =(SCM s)
+Protected_scm::operator = (SCM s)
 {
   if (object_ == s)
     return *this;
   
   if (SCM_NIMP (object_))
-    scm_unprotect_object(object_);
+    scm_unprotect_object (object_);
 
   object_ =  SCM_NIMP (s) ? scm_protect_object (s): s;
   return *this;
@@ -47,7 +47,7 @@ Protected_scm::operator = (Protected_scm const &s)
 
 Protected_scm::~Protected_scm ()
 {
-  if  (SCM_NIMP (object_))
+  if (SCM_NIMP (object_))
     {
       scm_unprotect_object (object_);
     }
index 770fa11d61123bc32b10e19a2d605356c4425ca5..3f69f920a081939d54bc63e6a2923c9aaf61440d 100644 (file)
@@ -17,11 +17,15 @@ Relative_octave_music::to_relative_octave (Pitch)
 }
 
 
-Relative_octave_music::Relative_octave_music(SCM l)
+Relative_octave_music::Relative_octave_music (SCM l)
   : Music_wrapper (l)
 {
   set_mus_property ("type", ly_symbol2scm ("relative-octave-music"));  
 }
 
+Relative_octave_music::Relative_octave_music ()
+{
+    set_mus_property ("type", ly_symbol2scm ("relative-octave-music"));
+}
 
-
+ADD_MUSIC (Relative_octave_music);
index bba68ba1ae4f058bd80a05d2c33d6d636b737f4e..d4891d97ac69d438a71769968f306066fc3057d3 100644 (file)
@@ -26,7 +26,7 @@ class Repeat_acknowledge_engraver : public Engraver
 {
 public:
   VIRTUAL_COPY_CONS (Translator);
-  Repeat_acknowledge_engraver();
+  Repeat_acknowledge_engraver ();
 
   virtual void start_translation_timestep ();
   virtual void process_music ();
@@ -43,7 +43,7 @@ Repeat_acknowledge_engraver::initialize ()
 }
 
 
-Repeat_acknowledge_engraver::Repeat_acknowledge_engraver()
+Repeat_acknowledge_engraver::Repeat_acknowledge_engraver ()
 {
 }
 
@@ -85,7 +85,7 @@ Repeat_acknowledge_engraver::process_music ()
       cs = gh_cdr (cs);      
     }
 
-  if (start && end )
+  if (start && end)
     s = ":|:";
   else if (start)
     s = "|:";
@@ -97,8 +97,8 @@ Repeat_acknowledge_engraver::process_music ()
    */
   if (s != "" || (volta_found && !gh_string_p (get_property ("whichBar"))))
     {
-      daddy_trans_l_->set_property ("whichBar", ly_str02scm(s.ch_C()));
+      daddy_trans_l_->set_property ("whichBar", ly_str02scm (s.ch_C ()));
     }
 }
 
-ADD_THIS_TRANSLATOR(Repeat_acknowledge_engraver);
+ADD_THIS_TRANSLATOR (Repeat_acknowledge_engraver);
index 665b00e1c6cc1b6b76ecd45341aada4082201555..3935cc3a1d4dc89cbfdb884467d018d8ffc108ab 100644 (file)
@@ -21,10 +21,11 @@ Repeated_music::body ()const
 Music_sequence*
 Repeated_music::alternatives ()const
 {
-  return dynamic_cast<Music_sequence*>  (unsmob_music (get_mus_property ("alternatives")));
+  return dynamic_cast<Music_sequence*> (unsmob_music (get_mus_property ("alternatives")));
 }
 
-Repeated_music::Repeated_music(SCM l)
+
+Repeated_music::Repeated_music (SCM l)
   : Music (l)
 {
   set_mus_property ("type", ly_symbol2scm ("repeated-music"));
@@ -69,10 +70,10 @@ Repeated_music::compress (Moment p)
 Moment
 Repeated_music::alternatives_length_mom (bool fold) const
 {
-  if (!alternatives () )
+  if (!alternatives ())
     return 0;
   
-  if  (fold)
+  if (fold)
     return alternatives ()->maximum_length ();
 
   Moment m =0;
@@ -109,6 +110,10 @@ Repeated_music::alternatives_volta_length_mom () const
   return m;
 }
 
+
+/*
+  Length of the body in THIS. Disregards REPEAT-COUNT. 
+ */
 Moment
 Repeated_music::body_length_mom () const
 {
@@ -127,9 +132,9 @@ Repeated_music::repeat_count () const
 }
 
 
-MAKE_SCHEME_CALLBACK(Repeated_music,unfolded_music_length, 1);
-MAKE_SCHEME_CALLBACK(Repeated_music,folded_music_length, 1);
-MAKE_SCHEME_CALLBACK(Repeated_music,volta_music_length, 1);
+MAKE_SCHEME_CALLBACK (Repeated_music,unfolded_music_length, 1);
+MAKE_SCHEME_CALLBACK (Repeated_music,folded_music_length, 1);
+MAKE_SCHEME_CALLBACK (Repeated_music,volta_music_length, 1);
 
 SCM
 Repeated_music::unfolded_music_length (SCM m)
@@ -156,3 +161,11 @@ Repeated_music::volta_music_length (SCM m)
   Moment l =  r->body_length_mom () + r->alternatives_volta_length_mom ();
   return l.smobbed_copy ();
 }
+
+ADD_MUSIC (Repeated_music);
+
+Repeated_music::Repeated_music ()
+  : Music (SCM_EOL)
+{
+ set_mus_property ("type", ly_symbol2scm ("repeated-music"));
+}
index 118279299b768acc65af42ae4fc06399350f6888..55372a463f680725fb5c1c01ea5b2cfc53224092 100644 (file)
@@ -33,10 +33,10 @@ Request_chord_iterator::get_req_translator_l ()
 }
 
 void
-Request_chord_iterator::construct_children()
+Request_chord_iterator::construct_children ()
 {
   Simple_music_iterator::construct_children ();
-  get_req_translator_l();
+  get_req_translator_l ();
 }
 
 Request_chord*
@@ -73,10 +73,10 @@ Request_chord_iterator::process (Moment m)
 
          bool gotcha = try_music (mus);
          if (!gotcha)
-           mus->origin ()->warning (_f ("Junking request: `%s'", classname(mus)));
+           mus->origin ()->warning (_f ("Junking request: `%s'", classname (mus)));
        }
     }
   skip (m);
 }
 
-IMPLEMENT_CTOR_CALLBACK(Request_chord_iterator);
+IMPLEMENT_CTOR_CALLBACK (Request_chord_iterator);
index 0ebc5dde5e4e72f51041fc5df754c6eece0024c8..1443d70790c8f7a8c63af9f4bf0b66dfcee551c7 100644 (file)
@@ -20,16 +20,16 @@ class Rest_collision_engraver : public Engraver
 protected:
   virtual void acknowledge_grob (Grob_info);
   virtual void create_grobs ();
-  virtual void stop_translation_timestep();
+  virtual void stop_translation_timestep ();
 public:
-  VIRTUAL_COPY_CONS(Translator);
-  Rest_collision_engraver();
+  VIRTUAL_COPY_CONS (Translator);
+  Rest_collision_engraver ();
   
 };
 
-ADD_THIS_TRANSLATOR(Rest_collision_engraver);
+ADD_THIS_TRANSLATOR (Rest_collision_engraver);
 
-Rest_collision_engraver::Rest_collision_engraver()
+Rest_collision_engraver::Rest_collision_engraver ()
 {
   rest_collision_p_ =0;
 }
@@ -44,7 +44,7 @@ Rest_collision_engraver::create_grobs ()
   Rest_collision::set_interface (rest_collision_p_);
   announce_grob (rest_collision_p_, 0);
   for (int i=0; i< note_column_l_arr_.size (); i++)
-    Rest_collision::add_column ( rest_collision_p_,note_column_l_arr_[i]);
+    Rest_collision::add_column (rest_collision_p_,note_column_l_arr_[i]);
 }
 
 void
@@ -55,7 +55,7 @@ Rest_collision_engraver::acknowledge_grob (Grob_info i)
 }
 
 void
-Rest_collision_engraver::stop_translation_timestep()
+Rest_collision_engraver::stop_translation_timestep ()
 {
   if (rest_collision_p_) 
     {
index aaaa743fd1904ac9b3b538b75f28904fc0302ba8..bd4c308d0f17883372e318df6b72ea51379b242d 100644 (file)
@@ -19,7 +19,7 @@
 #include "staff-symbol-referencer.hh"
 #include "duration.hh"
 
-MAKE_SCHEME_CALLBACK(Rest_collision,force_shift_callback,2);
+MAKE_SCHEME_CALLBACK (Rest_collision,force_shift_callback,2);
 SCM
 Rest_collision::force_shift_callback (SCM element_smob, SCM axis)
 {
@@ -52,7 +52,7 @@ Rest_collision::add_column (Grob*me,Grob *p)
   /*
     only add callback for the rests, since we don't move anything else.
 
   (not?)
+ (not?)
   */
   p->add_offset_callback (Rest_collision::force_shift_callback_proc, Y_AXIS);
   p->set_grob_property ("rest-collision", me->self_scm ());
@@ -96,7 +96,7 @@ Rest_collision::do_shift (Grob *me, SCM elts)
       if (!commony)
        commony = e;
       else
-       commony= commony->common_refpoint  (e, Y_AXIS);
+       commony= commony->common_refpoint (e, Y_AXIS);
       
       if (unsmob_grob (e->get_grob_property ("rest")))
        rests.push (e);
@@ -115,21 +115,21 @@ Rest_collision::do_shift (Grob *me, SCM elts)
    */
 
   // no rests to collide
-  if (!rests.size())
+  if (!rests.size ())
     return SCM_UNSPECIFIED;
 
   // no partners to collide with
-  if (rests.size() + notes.size () < 2)
+  if (rests.size () + notes.size () < 2)
     return SCM_UNSPECIFIED;
 
   // meisjes met meisjes
-  if (!notes.size()) 
+  if (!notes.size ()) 
     {
-      SCM characteristic = head_characteristic  (rests[0]);
+      SCM characteristic = head_characteristic (rests[0]);
       int i = 1;
       for (; i < rests.size (); i++)
        {
-         if (!gh_equal_p (head_characteristic  (rests[i]), characteristic))
+         if (!gh_equal_p (head_characteristic (rests[i]), characteristic))
            break;
        }
 
@@ -137,7 +137,7 @@ Rest_collision::do_shift (Grob *me, SCM elts)
        If all durations are the same, we'll check if there are more
        rests than maximum-rest-count.
        Otherwise (different durations), we'll try to display them all
      (urg: all 3 of them, currently).
+ (urg: all 3 of them, currently).
        */
       int display_count;
       SCM s = me->get_grob_property ("maximum-rest-count");
@@ -187,11 +187,11 @@ Rest_collision::do_shift (Grob *me, SCM elts)
     {
       if (rests.size () > 1)
        {
-         warning (_("too many colliding rests"));
+         warning (_ ("too many colliding rests"));
        }
       if (notes.size () > 1)
        {
-         warning (_("too many notes for rest collision"));
+         warning (_ ("too many notes for rest collision"));
        }
       Grob * rcol = rests[0];
 
@@ -213,7 +213,7 @@ Rest_collision::do_shift (Grob *me, SCM elts)
        assumption: ref points are the same. 
        */
       Interval notedim;
-      for (int i = 0; i < notes.size(); i++) 
+      for (int i = 0; i < notes.size (); i++) 
        {
          Grob * stem = Note_column::stem_l (notes[i]);
          Grob * head = Stem::first_head (stem);
index 69839a7e295aae810632551ccd700718f9655142..702b98b5aa96f868b6e646c553c5155673bcb1fc 100644 (file)
@@ -26,7 +26,7 @@ protected:
 
 public:
   
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Rest_engraver ();
 };
 
@@ -104,4 +104,4 @@ Rest_engraver::try_music (Music *m)
 }
 
 
-ADD_THIS_TRANSLATOR(Rest_engraver);
+ADD_THIS_TRANSLATOR (Rest_engraver);
index f05f5c0f55c9569facfcb468db3f0940d003a86a..4bbdaa51466541cd373a0aabf7a763acfdd3bc36 100644 (file)
@@ -15,7 +15,7 @@
 #include "staff-symbol-referencer.hh"
 
 // -> offset callback
-MAKE_SCHEME_CALLBACK(Rest,after_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Rest,after_line_breaking,1);
 SCM
 Rest::after_line_breaking (SCM smob)
 {
@@ -37,7 +37,7 @@ Rest::after_line_breaking (SCM smob)
 }
 
 
-MAKE_SCHEME_CALLBACK(Rest,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Rest,brew_molecule,1);
 
 SCM
 Rest::brew_internal_molecule (SCM smob)
@@ -51,7 +51,7 @@ Rest::brew_internal_molecule (SCM smob)
   if (balltype == gh_int2scm (0) || balltype == gh_int2scm (1))
     {
       int sz = Staff_symbol_referencer::line_count (me);
-      Real dif = abs(Staff_symbol_referencer::position_f (me)  - (2* gh_scm2int (balltype) - 1)); 
+      Real dif = abs (Staff_symbol_referencer::position_f (me)  - (2* gh_scm2int (balltype) - 1)); 
       ledger_b = dif > sz;
     }
   
@@ -62,10 +62,10 @@ Rest::brew_internal_molecule (SCM smob)
       style = ly_scm2string (scm_symbol_to_string (style_sym));
     }
 
-  String idx =  ("rests-") + to_str (gh_scm2int (balltype))
+  String idx = ("rests-") + to_str (gh_scm2int (balltype))
     + (ledger_b ? "o" : "") + style;
 
-  return Font_interface::get_default_font (me)->find_by_name (idx).smobbed_copy();
+  return Font_interface::get_default_font (me)->find_by_name (idx).smobbed_copy ();
 }
 
 SCM 
@@ -73,7 +73,7 @@ Rest::brew_molecule (SCM smob)
 {
   return brew_internal_molecule (smob);
 }
-MAKE_SCHEME_CALLBACK(Rest,extent_callback,2);
+MAKE_SCHEME_CALLBACK (Rest,extent_callback,2);
 /*
   We need the callback. The real molecule has ledgers depending on
   Y-position. The Y-position is known only after line breaking.  */
index a7b89c7c7f305a6617c4eb3c2783f0b6c622ae24..f5287f998c96dbe382ababbe3988559e3e99b544 100644 (file)
@@ -25,19 +25,19 @@ class Rhythmic_column_engraver :public Engraver
   Grob *dotcol_l_;
 
 protected:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   virtual void acknowledge_grob (Grob_info);
   virtual void create_grobs ();
-  virtual void stop_translation_timestep();
-  virtual void start_translation_timestep();
+  virtual void stop_translation_timestep ();
+  virtual void start_translation_timestep ();
 public:
-  Rhythmic_column_engraver();
+  Rhythmic_column_engraver ();
   
 };
 
 
 
-Rhythmic_column_engraver::Rhythmic_column_engraver()
+Rhythmic_column_engraver::Rhythmic_column_engraver ()
 {
   stem_l_ =0;
   ncol_p_=0;
@@ -52,14 +52,14 @@ Rhythmic_column_engraver::create_grobs ()
     {
       if (!ncol_p_)
        {
-         ncol_p_ = new Item (get_property("NoteColumn"));
+         ncol_p_ = new Item (get_property ("NoteColumn"));
          Note_column::set_interface (ncol_p_);
          announce_grob (ncol_p_, 0);
        }
 
       for (int i=0; i < rhead_l_arr_.size (); i++)
        {
-         if (!rhead_l_arr_[i]->parent_l(X_AXIS))
+         if (!rhead_l_arr_[i]->parent_l (X_AXIS))
            Note_column::add_head (ncol_p_, rhead_l_arr_[i]);
        }
       rhead_l_arr_.set_size (0);
@@ -75,7 +75,7 @@ Rhythmic_column_engraver::create_grobs ()
        }
 
       if (stem_l_
-         && !stem_l_->parent_l(X_AXIS))
+         && !stem_l_->parent_l (X_AXIS))
        {
          Note_column::set_stem (ncol_p_, stem_l_);
          stem_l_ = 0;
@@ -85,7 +85,7 @@ Rhythmic_column_engraver::create_grobs ()
       bool wegrace = to_boolean (wg);
 
       if (!wegrace)
-       for (int i=0; i < grace_slur_endings_.size(); i++)
+       for (int i=0; i < grace_slur_endings_.size (); i++)
          Slur::add_column (grace_slur_endings_[i], ncol_p_);
       grace_slur_endings_.clear ();
     }
@@ -125,7 +125,7 @@ Rhythmic_column_engraver::acknowledge_grob (Grob_info i)
 }
 
 void
-Rhythmic_column_engraver::stop_translation_timestep()
+Rhythmic_column_engraver::stop_translation_timestep ()
 {
   if (ncol_p_) 
     {
@@ -135,12 +135,12 @@ Rhythmic_column_engraver::stop_translation_timestep()
 }
 
 void
-Rhythmic_column_engraver::start_translation_timestep()
+Rhythmic_column_engraver::start_translation_timestep ()
 {
   grace_slur_endings_.clear ();
   dotcol_l_ =0;
   stem_l_ =0;
 }
 
-ADD_THIS_TRANSLATOR(Rhythmic_column_engraver);
+ADD_THIS_TRANSLATOR (Rhythmic_column_engraver);
 
index 52d71b3812abf171a02869c6f820fdc6f5986989..932133f33918cc0e5b1f1782a4fd5eaacc910ddc 100644 (file)
@@ -35,10 +35,10 @@ Rod::columnize ()
 void
 Rod::add_to_cols ()
 {
-  columnize();
+  columnize ();
   if (item_l_drul_[LEFT] != item_l_drul_[RIGHT])
     Spaceable_grob::add_rod (item_l_drul_[LEFT],
                                item_l_drul_[RIGHT],
-                               distance_f_ );
+                               distance_f_);
 }
 
index 6b9be2b972793a49bc5d732f291a5e0ec3f72644..c815c086cc9c0f1539046d4ef1d28527bc7f3dfc 100644 (file)
@@ -35,7 +35,7 @@ Scaled_font_metric::find_by_name (String s) const
   Molecule m = orig_l_->find_by_name (s);
   Box b = m.extent_box ();
   b.scale (magnification_f_);
-  Molecule q(b,fontify_atom ((Font_metric*) this, m.get_expr ()));
+  Molecule q (b,fontify_atom ((Font_metric*) this, m.get_expr ()));
 
   return q ;
 }
index cd8841a5ea9f9bb4ae480a2822d88596ad3473f1..2dfca6d4e650e6224db8fbb74519d8afd4944761 100644 (file)
@@ -25,7 +25,7 @@ Scheme_hash_table::Scheme_hash_table (Scheme_hash_table const &src)
 }
 
 void
-Scheme_hash_table::operator =(Scheme_hash_table const & src)
+Scheme_hash_table::operator = (Scheme_hash_table const & src)
 {
   Scm_stl_map::operator = (src);
        
@@ -39,9 +39,9 @@ Scheme_hash_table::mark_smob (SCM s)
     can't typecheck naively, since GC bit lives in CAR of S
    */
   
-  Scheme_hash_table *me = (Scheme_hash_table*) SCM_CELL_WORD_1(s);
+  Scheme_hash_table *me = (Scheme_hash_table*) SCM_CELL_WORD_1 (s);
 
-  for (Scm_stl_map::const_iterator i= me->begin (); i != me->end(); i++)
+  for (Scm_stl_map::const_iterator i= me->begin (); i != me->end (); i++)
     {
       scm_gc_mark ((*i).first);
       scm_gc_mark ((*i).second);
@@ -56,8 +56,8 @@ Scheme_hash_table::print_smob (SCM s, SCM p, scm_print_state*)
   char str[1000];
   sprintf (str, "#<Scheme_hash_table 0x%0x ", s);
   scm_puts (str, p);      
-  Scheme_hash_table *me = unsmob(s);
-  for (Scm_stl_map::const_iterator i = me->begin (); i != me->end(); i++)
+  Scheme_hash_table *me = unsmob (s);
+  for (Scm_stl_map::const_iterator i = me->begin (); i != me->end (); i++)
     {
       scm_display ((*i).first, p);
       scm_puts (" = ",p);      
@@ -88,18 +88,18 @@ Scheme_hash_table::elem_b (SCM k) const
 void
 Scheme_hash_table::set (SCM k, SCM v)
 {
 (*this)[k] = v;
+ (*this)[k] = v;
 }
 
 // UGH. 
 SCM
 Scheme_hash_table::get (SCM k)const
 {
-  return (*(Scheme_hash_table*)this)[k]; 
+  return (* (Scheme_hash_table*)this)[k]; 
 }
 
 
-Scheme_hash_table::~Scheme_hash_table)
+Scheme_hash_table::~Scheme_hash_table ()
 {
 }
 
@@ -107,15 +107,15 @@ SCM
 Scheme_hash_table::to_alist () const
 {
   SCM l = SCM_EOL;
-  for (Scm_stl_map ::const_iterator i = begin (); i != end(); i++)
+  for (Scm_stl_map ::const_iterator i = begin (); i != end (); i++)
     l = gh_cons (gh_cons ((*i).first, (*i).second), l);
   return l;  
 }
 
 
 
-IMPLEMENT_UNSMOB(Scheme_hash_table,scheme_hash);
-IMPLEMENT_SMOBS(Scheme_hash_table);
-IMPLEMENT_DEFAULT_EQUAL_P(Scheme_hash_table);
+IMPLEMENT_UNSMOB (Scheme_hash_table,scheme_hash);
+IMPLEMENT_SMOBS (Scheme_hash_table);
+IMPLEMENT_DEFAULT_EQUAL_P (Scheme_hash_table);
 
 
index 8fec4384b11b2fd2182c00e3b57f85a9c04569b3..f578433a800d1e39ec5d8e71a96e6adfde95a3b3 100644 (file)
@@ -20,7 +20,7 @@ Scope::Scope (Scheme_hash_table * st)
 bool
 Scope::elem_b (String s) const
 {
-  return id_dict_->elem_b (ly_symbol2scm (s.ch_C()));
+  return id_dict_->elem_b (ly_symbol2scm (s.ch_C ()));
 }
 
 bool
@@ -39,14 +39,14 @@ Scope::scm_elem (SCM s)const
 SCM
 Scope::scm_elem (String s) const
 {
- return scm_elem (ly_symbol2scm (s.ch_C()));
+ return scm_elem (ly_symbol2scm (s.ch_C ()));
 }
 
 
 void
 Scope::set (String s, SCM id)
 {
-  return id_dict_->set (ly_symbol2scm (s.ch_C()), id);
+  return id_dict_->set (ly_symbol2scm (s.ch_C ()), id);
 }
 
 SCM
index 5f39102e276c38366a44efbf9bcc1fa7cd5f9b0f..a85c72c8952a2855197880a05376232baa89c5dc 100644 (file)
@@ -19,7 +19,7 @@
 #include "translator-def.hh"
 
 
-Score_engraver::Score_engraver()
+Score_engraver::Score_engraver ()
 {
   scoreline_l_ =0;
   command_column_l_ =0;
@@ -40,11 +40,11 @@ Score_engraver::make_columns (Moment w)
       set_columns (new Paper_column (get_property (ly_symbol2scm ("NonMusicalPaperColumn"))),
                   new Paper_column (get_property (ly_symbol2scm ("PaperColumn"))));
   
-      command_column_l_->set_grob_property ("when", w.smobbed_copy());
-      musical_column_l_->set_grob_property ("when", w.smobbed_copy());
+      command_column_l_->set_grob_property ("when", w.smobbed_copy ());
+      musical_column_l_->set_grob_property ("when", w.smobbed_copy ());
       command_column_l_->set_grob_property ("breakable", SCM_BOOL_T);
 
-      Grob_info i1(command_column_l_, 0), i2 (musical_column_l_,0);
+      Grob_info i1 (command_column_l_, 0), i2 (musical_column_l_,0);
 
       i1.origin_trans_l_ = this;
       i2.origin_trans_l_ = this;
@@ -59,17 +59,17 @@ Score_engraver::prepare (Moment w)
   Global_translator::prepare (w);
   make_columns (w);
 
-  post_move_processing();
+  post_move_processing ();
 }
 
 void
-Score_engraver::finish()
+Score_engraver::finish ()
 {
   if ((breaks_i_%8))
-    progress_indication ("[" + to_str ( breaks_i_) + "]");
+    progress_indication ("[" + to_str (breaks_i_) + "]");
    
-  check_removal();
-  removal_processing();
+  check_removal ();
+  removal_processing ();
 }
 
 /*
@@ -83,7 +83,7 @@ Score_engraver::initialize ()
   assert (dynamic_cast<Paper_def *> (output_def_l_));
   assert (!daddy_trans_l_);
   pscore_p_ = new Paper_score;
-  pscore_p_->paper_l_ = dynamic_cast<Paper_def*>(output_def_l_);
+  pscore_p_->paper_l_ = dynamic_cast<Paper_def*> (output_def_l_);
 
   SCM props = get_property (ly_symbol2scm ("LineOfScore"));
 
@@ -92,19 +92,19 @@ Score_engraver::initialize ()
   make_columns (Moment (0));
   scoreline_l_ = pscore_p_->line_l_;
 
-  scoreline_l_->set_bound(LEFT, command_column_l_);
+  scoreline_l_->set_bound (LEFT, command_column_l_);
   
   command_column_l_->set_grob_property ("breakable", SCM_BOOL_T);
 
-  Engraver_group_engraver::initialize();
+  Engraver_group_engraver::initialize ();
 }
 
 
 void
-Score_engraver::finalize()
+Score_engraver::finalize ()
 {
-  Engraver_group_engraver::finalize();
-  scoreline_l_->set_bound(RIGHT,command_column_l_);
+  Engraver_group_engraver::finalize ();
+  scoreline_l_->set_bound (RIGHT,command_column_l_);
   command_column_l_->set_grob_property ("breakable", SCM_BOOL_T);
   
   typeset_all ();
@@ -113,12 +113,12 @@ Score_engraver::finalize()
 }
 
 void
-Score_engraver::one_time_step()
+Score_engraver::one_time_step ()
 {
-  process_music();
-  announces();
-  pre_move_processing();
-  check_removal();
+  process_music ();
+  announces ();
+  pre_move_processing ();
+  check_removal ();
 }
 
 void
@@ -131,17 +131,17 @@ Score_engraver::announce_grob (Grob_info info)
 /* All elements are propagated to the top upon announcement. If
    something was created during one run of
    Engraver_group_engraver::do_announces, then
-   announce_info_arr_.size() will be nonzero again
+   announce_info_arr_.size () will be nonzero again
 */
 /* junkme? Done by Engraver_group_engraver::do_announces ()?
  */
    
 void
-Score_engraver::do_announces()
+Score_engraver::do_announces ()
 {
   //////  do
-    Engraver_group_engraver::do_announces();
-    //////while (announce_info_arr_.size());
+    Engraver_group_engraver::do_announces ();
+    //////while (announce_info_arr_.size ());
 }
 
 
@@ -157,9 +157,9 @@ Score_engraver::typeset_grob (Grob *elem_p)
 
 
 void
-Score_engraver::typeset_all()
+Score_engraver::typeset_all ()
 {
-  for  (int i =0; i < elem_p_arr_.size(); i++) 
+  for (int i =0; i < elem_p_arr_.size (); i++) 
     {
       Grob * elem_p = elem_p_arr_[i];
       
@@ -173,7 +173,7 @@ Score_engraver::typeset_all()
          do {
            if (!s->get_bound (d))
              {
-               s->set_bound(d, command_column_l_);
+               s->set_bound (d, command_column_l_);
                /* don't warn for empty/suicided spanners,
                   it makes real warningsinvisible.
                   maybe should be junked earlier? */
@@ -193,24 +193,24 @@ Score_engraver::typeset_all()
 
            }
        }
-      if (!elem_p->parent_l(Y_AXIS))
+      if (!elem_p->parent_l (Y_AXIS))
        Axis_group_interface::add_element (scoreline_l_, elem_p);
     }
-  elem_p_arr_.clear();
+  elem_p_arr_.clear ();
 }
 
 void
-Score_engraver::stop_translation_timestep()
+Score_engraver::stop_translation_timestep ()
 {
   // this generates all items.
-  Engraver_group_engraver::stop_translation_timestep();
+  Engraver_group_engraver::stop_translation_timestep ();
   
-  typeset_all();
+  typeset_all ();
   if (to_boolean (command_column_l_->get_grob_property ("breakable")))
     {
       breaks_i_ ++;
       if (! (breaks_i_%8))
-       progress_indication ("[" + to_str ( breaks_i_) + "]");
+       progress_indication ("[" + to_str (breaks_i_) + "]");
     }
 }
 
@@ -257,9 +257,9 @@ Score_engraver::try_music (Music*r)
          gotcha = true;
 
 
-         SCM pen = command_column_l_->get_grob_property  ("penalty");
+         SCM pen = command_column_l_->get_grob_property ("penalty");
          Real total_penalty = gh_number_p (pen)
-           ? gh_scm2double(pen)
+           ? gh_scm2double (pen)
            : 0.0;
 
          SCM rpen = b->get_mus_property ("penalty");
@@ -289,6 +289,6 @@ Score_engraver::forbid_breaks ()
   command_column_l_->remove_grob_property ("breakable");
 }
 
-ADD_THIS_TRANSLATOR(Score_engraver);
+ADD_THIS_TRANSLATOR (Score_engraver);
 
 
index ff25e4cef436ee13d4ea51b3509e532c4229aed2..e3d966e6e806661011390e827dd294bf934b45ef 100644 (file)
@@ -32,7 +32,7 @@ Score_performer::~Score_performer ()
 void
 Score_performer::play_element (Audio_element * p)
 {
-  if  (Audio_item * i=dynamic_cast<Audio_item *> (p)) 
+  if (Audio_item * i=dynamic_cast<Audio_item *> (p)) 
     {
       audio_column_l_->add_audio_item (i);
     }
@@ -68,29 +68,29 @@ void
 Score_performer::one_time_step ()
 {
   // fixme: put this back.
-  // process_music();
+  // process_music ();
   announces ();
-  pre_move_processing();
-  check_removal();
+  pre_move_processing ();
+  check_removal ();
 }
 
 void
-Score_performer::start()
+Score_performer::start ()
 {
 }
 
 
 int
-Score_performer::get_tempo_i() const
+Score_performer::get_tempo_i () const
 {
   return performance_p_->midi_l_->get_tempo_i (Moment (1, 4));
 }
 
 void
-Score_performer::finish()
+Score_performer::finish ()
 {
   check_removal ();
-  removal_processing();
+  removal_processing ();
 }
 
 Music_output *
@@ -107,7 +107,7 @@ Score_performer::initialize ()
   unsmob_translator_def (definition_)->apply_property_operations (this);
   assert (dynamic_cast<Midi_def *> (output_def_l_));
   performance_p_ = new Performance;
-  performance_p_->midi_l_ = dynamic_cast<Midi_def*>(output_def_l_);
+  performance_p_->midi_l_ = dynamic_cast<Midi_def*> (output_def_l_);
 
   Translator_group::initialize ();
 }
index f864b58433f09b7543269905a402660ecc2beb20..962f820257c3402e4dfc6557450cebc35579283e 100644 (file)
@@ -26,8 +26,8 @@
   TODO: junkme.
  */
 
-Score::Score()
-  : Input()
+Score::Score ()
+  : Input ()
 {
   header_p_ = 0;
   music_ = SCM_EOL;
@@ -43,22 +43,22 @@ Score::Score (Score const &s)
   smobify_self ();
   
   Music * m =unsmob_music (s.music_);
-  music_ =  m?m->clone()->self_scm () : SCM_EOL;
+  music_ =  m?m->clone ()->self_scm () : SCM_EOL;
   scm_unprotect_object (music_);
   
   for (int i=0; i < s.def_p_arr_.size (); i++)
-    def_p_arr_.push(s.def_p_arr_[i]->clone());
+    def_p_arr_.push (s.def_p_arr_[i]->clone ());
   errorlevel_i_ = s.errorlevel_i_;
   if (s.header_p_)
        {
-         header_p_ =  (s.header_p_) ? new Scheme_hash_table (*s.header_p_): 0;
+         header_p_ = (s.header_p_) ? new Scheme_hash_table (*s.header_p_): 0;
 
-         scm_unprotect_object(header_p_->self_scm ());
+         scm_unprotect_object (header_p_->self_scm ());
        }
  
 }
 
-Score::~Score()
+Score::~Score ()
 {
   
 }
@@ -69,27 +69,27 @@ Score::run_translator (Music_output_def *odef_l)
   Cpu_timer timer;
 
   
-  Global_translator * trans_p = odef_l->get_global_translator_p();
+  Global_translator * trans_p = odef_l->get_global_translator_p ();
   if (!trans_p)
     {
       programming_error ("no toplevel translator");
       return ;
     }
-  progress_indication (_("Interpreting music..."));
+  progress_indication (_ ("Interpreting music..."));
   Music * music = unsmob_music (music_);
   
   trans_p->final_mom_ = music->length_mom ();
 
 
   Music_iterator * iter = Music_iterator::static_get_iterator_p (music);
-  iter->init_translator(music, trans_p);
+  iter->init_translator (music, trans_p);
 
-  iter->construct_children();
+  iter->construct_children ();
 
-  if (! iter->ok())
+  if (! iter->ok ())
     {
       delete iter;
-      warning (_("Need music in a score"));
+      warning (_ ("Need music in a score"));
       errorlevel_i_ =1;
       return ;
     }
@@ -105,20 +105,20 @@ Score::run_translator (Music_output_def *odef_l)
       warning (_ ("Errors found/*, not processing score*/"));
     }
 
-  Music_output * output = trans_p->get_output_p();
+  Music_output * output = trans_p->get_output_p ();
   scm_unprotect_object (trans_p->self_scm ());
   
-  if(verbose_global_b)
+  if (verbose_global_b)
     progress_indication (_f ("elapsed time: %.2f seconds",  timer.read ()));
 
   if (!header_p_)
     header_p_ = new Scheme_hash_table; // ugh
   Scope bla (header_p_);
   output->header_l_ = &bla;
-  output->origin_str_ =  location_str();
+  output->origin_str_ =  location_str ();
 
   progress_indication ("\n");
-  output->process();
+  output->process ();
   delete output ;
 
   /*
@@ -126,11 +126,11 @@ Score::run_translator (Music_output_def *odef_l)
     the system.
   */
     
-  scm_gc();
+  scm_gc ();
 }
 
 void
-Score::process()
+Score::process ()
 {
   if (!unsmob_music (music_))
     return;
@@ -139,7 +139,7 @@ Score::process()
   for (int i=0; i < def_p_arr_.size (); i++)
     {
       if (no_paper_global_b 
-         && dynamic_cast<Paper_def*>(def_p_arr_[i]))
+         && dynamic_cast<Paper_def*> (def_p_arr_[i]))
        continue;
       run_translator (def_p_arr_[i]);
     }
@@ -151,17 +151,17 @@ Score::process()
 void
 Score::add_output (Music_output_def *pap_p)
 {
-  def_p_arr_.push(pap_p);
+  def_p_arr_.push (pap_p);
 }
 
-IMPLEMENT_SMOBS(Score);
-IMPLEMENT_DEFAULT_EQUAL_P(Score);
-IMPLEMENT_UNSMOB(Score, score);
+IMPLEMENT_SMOBS (Score);
+IMPLEMENT_DEFAULT_EQUAL_P (Score);
+IMPLEMENT_UNSMOB (Score, score);
 
 SCM
 Score::mark_smob (SCM s)
 {
-  Score * sc = (Score*) SCM_CELL_WORD_1(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--;)
index c6d9d15994ce39508e35c6f13a75dafed9200f52..2e4e6b8bb5260dfa301434b1b2bf318fbea89789 100644 (file)
@@ -57,7 +57,7 @@ void write_dependency_file (String fn, Array<String> targets,
 #endif
   for (int i=0; i < deps.size (); i ++)
     {
-      if (out.length_i() > WRAPWIDTH)
+      if (out.length_i () > WRAPWIDTH)
        {
          f << out << "\\\n";
          out = "  ";
@@ -79,7 +79,7 @@ void write_dependency_file (String fn, Array<String> targets,
 }
 
 void
-do_deps()
+do_deps ()
 {
   if (dependency_global_b)
     {
@@ -93,22 +93,22 @@ do_deps()
 
 
 void
-do_scores()
+do_scores ()
 {
   if (!global_header_p)
     global_header_p = new Scheme_hash_table;
-  for (int i=0; i < score_global_array.size(); i++)
+  for (int i=0; i < score_global_array.size (); i++)
     {
       Score* is_p = score_global_array[i];
 
       if (is_p->errorlevel_i_)
        {
-         is_p->warning (_("Score contains errors; will not process it"));
+         is_p->warning (_ ("Score contains errors; will not process it"));
          exit_status_global |= 1;
        }
       else
        {
-         is_p->process();
+         is_p->process ();
        }
     }
   do_deps ();
@@ -119,7 +119,7 @@ clear_scores ()
 {
   for (int i=0; i < score_global_array.size (); i++)
     scm_unprotect_object (score_global_array[i]->self_scm ());
-  score_global_array.clear();
+  score_global_array.clear ();
   
   inclusion_global_array.clear ();
   if (global_header_p)
@@ -134,7 +134,7 @@ do_one_file (String init_str, String file_str)
   if (init_str.length_i () && global_path.find (init_str).empty_b ())
     {
       warning (_f ("can't find file: `%s'", init_str));
-      warning (_f ("(search path: `%s')", global_path.str ().ch_C()));
+      warning (_f ("(search path: `%s')", global_path.str ().ch_C ()));
       return;
     }
   if ((file_str != "-") && global_path.find (file_str).empty_b ())
index 5f0b41db4e569104ac7f8bcc635d939cf7f89613..93083a1cb0ab7232add7fcb278db3ad997c34014 100644 (file)
@@ -22,7 +22,7 @@ class Script_column_engraver : public Engraver
 
 public:
   Script_column_engraver ();
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
 protected:
   virtual void acknowledge_grob (Grob_info);
   virtual void create_grobs ();
@@ -31,7 +31,7 @@ protected:
 };
 
 
-Script_column_engraver::Script_column_engraver()
+Script_column_engraver::Script_column_engraver ()
 {
   scol_p_ =0;
 }
@@ -54,7 +54,7 @@ Script_column_engraver::start_translation_timestep ()
 }
 
 void
-Script_column_engraver::acknowledge_grob(Grob_info inf) 
+Script_column_engraver::acknowledge_grob (Grob_info inf) 
 {
   Item *thing = dynamic_cast<Item*> (inf.elem_l_);
   if (thing && Side_position_interface::has_interface (inf.elem_l_)) // ugh FIXME
@@ -85,4 +85,4 @@ Script_column_engraver::create_grobs ()
       script_l_arr_.clear ();
     }
 }
-ADD_THIS_TRANSLATOR(Script_column_engraver);
+ADD_THIS_TRANSLATOR (Script_column_engraver);
index 1bddead7707182d515783dab3eba12d3ab7fbb36..68e21514a70c8d6982142ded5596204ccd0f6559 100644 (file)
@@ -33,7 +33,7 @@ staff_side_compare (Grob * const &i1,
   return gh_scm2int (p1) - gh_scm2int (p2);
 }
 
-MAKE_SCHEME_CALLBACK(Script_column,before_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Script_column,before_line_breaking,1);
 
 SCM
 Script_column::before_line_breaking (SCM smob)
@@ -52,7 +52,7 @@ Script_column::before_line_breaking (SCM smob)
 
   Direction d = DOWN;
   do {
-    Link_array<Grob> &arr(arrs[d]);
+    Link_array<Grob> &arr (arrs[d]);
     
     arr.sort (staff_side_compare);
 
@@ -61,7 +61,7 @@ Script_column::before_line_breaking (SCM smob)
       {
 
        if (last)
-         Side_position_interface::add_supportarr[i],last);
+         Side_position_interface::add_support (arr[i],last);
            
        arr[i]->remove_grob_property ("script-priority");
        last = arr[i];
index ee65cbcb266c725be5973482b66f4fffc986118a..4b2c44773d52436886114b1680264dc686db7b8f 100644 (file)
@@ -32,7 +32,7 @@ protected:
 void
 Script_engraver::initialize ()
 {
-  script_req_l_arr_.clear();
+  script_req_l_arr_.clear ();
 }
 
 bool
@@ -40,7 +40,7 @@ Script_engraver::try_music (Music *r_l)
 {
   if (Articulation_req *mr = dynamic_cast <Articulation_req *> (r_l))
     {
-      for (int i=0; i < script_req_l_arr_.size(); i++) 
+      for (int i=0; i < script_req_l_arr_.size (); i++) 
        {
          if (script_req_l_arr_[i]->equal_b (mr))
            return true;
@@ -54,7 +54,7 @@ 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_req_l_arr_.size (); i++)
     {
       Articulation_req* l=script_req_l_arr_[i];
 
@@ -64,7 +64,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.ch_C ()));
                        
          continue;
        }
@@ -74,17 +74,17 @@ Script_engraver::process_music ()
       p->set_grob_property ("molecule",
                           gh_car (art));
 
-      art = gh_cdr(art);
+      art = gh_cdr (art);
       bool follow_staff = gh_scm2bool (gh_car (art));
-      art = gh_cdr(art);
+      art = gh_cdr (art);
       SCM relative_stem_dir = gh_car (art);
-      art = gh_cdr(art);
+      art = gh_cdr (art);
 
       SCM force_dir = l->get_mus_property ("direction");
       if (isdir_b (force_dir) && !to_dir (force_dir))
        force_dir = gh_car (art);
       
-      art = gh_cdr(art);
+      art = gh_cdr (art);
       SCM priority = gh_car (art);
 
 
@@ -128,7 +128,7 @@ Script_engraver::acknowledge_grob (Grob_info inf)
   
   if (Stem::has_interface (inf.elem_l_))
     {
-      for (int i=0; i < script_p_arr_.size(); i++)
+      for (int i=0; i < script_p_arr_.size (); i++)
        {
          Grob*e = script_p_arr_[i];
 
@@ -139,7 +139,7 @@ Script_engraver::acknowledge_grob (Grob_info inf)
     }
   else if (Rhythmic_head::has_interface (inf.elem_l_))
     {
-      for (int i=0; i < script_p_arr_.size(); i++)
+      for (int i=0; i < script_p_arr_.size (); i++)
        {
          Grob *e = script_p_arr_[i];
          
@@ -157,9 +157,9 @@ Script_engraver::acknowledge_grob (Grob_info inf)
 }
 
 void
-Script_engraver::stop_translation_timestep()
+Script_engraver::stop_translation_timestep ()
 {
-  for (int i=0; i < script_p_arr_.size(); i++) 
+  for (int i=0; i < script_p_arr_.size (); i++) 
     {
       Grob * sc = script_p_arr_[i];
       if (to_boolean (sc->get_grob_property ("staff-support")))
@@ -168,13 +168,13 @@ Script_engraver::stop_translation_timestep()
        }
       typeset_grob (sc);
     }
-  script_p_arr_.clear();
+  script_p_arr_.clear ();
 }
 
 void
-Script_engraver::start_translation_timestep()
+Script_engraver::start_translation_timestep ()
 {
-  script_req_l_arr_.clear();
+  script_req_l_arr_.clear ();
 }
 
 ADD_THIS_TRANSLATOR (Script_engraver);
index 78fbff9db13ce8678631b6ea453822a993b1b0bf..2a43afc1340f8a26b171985080eb492529c63327 100644 (file)
 #include "lookup.hh"
 
 Molecule
-Script::get_molecule(Grob * me, Direction d)
+Script::get_molecule (Grob * me, Direction d)
 {
   SCM s = me->get_grob_property ("molecule");
   assert (gh_pair_p (s));
 
-  SCM key = gh_car  (s);
+  SCM key = gh_car (s);
   if (key == ly_symbol2scm ("feta"))
     {
       return Font_interface::get_default_font (me)->find_by_name ("scripts-" +
@@ -38,38 +38,44 @@ Script::get_molecule(Grob * me, Direction d)
   return Molecule ();
 }
 
-MAKE_SCHEME_CALLBACK(Script,after_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Script,before_line_breaking,1);
 SCM
-Script::after_line_breaking (SCM smob)
+Script::before_line_breaking (SCM smob)
 {
   Grob * me = unsmob_grob (smob);
 
   Direction d = Side_position_interface::get_direction (me);
+
+  if (!d)
+    {
+  /*
+    we should not have `arbitrary' directions. 
+   */
+      programming_error ("Script direction not yet known!");
+      d = DOWN;
+    }
+  
   Side_position_interface::set_direction (me,d);
 
   return SCM_UNSPECIFIED;
 }
 
-MAKE_SCHEME_CALLBACK(Script,brew_molecule,1);
+
+MAKE_SCHEME_CALLBACK (Script,brew_molecule,1);
 
 SCM
 Script::brew_molecule (SCM smob)
 {
   Grob *me= unsmob_grob (smob);
-#if 0
-  
-   SCM d = me->get_grob_property ("direction");
-   if (isdir_b (d))
-     dir = to_dir (d);
-#endif
-  Direction dir = Side_position_interface::get_direction(me);
+
+  Direction dir = Side_position_interface::get_direction (me);
   if (!dir)
     {
       programming_error ("Script direction not known, but molecule wanted.");
       dir= DOWN;
     }
   
-  return get_molecule (me, dir).smobbed_copy();
+  return get_molecule (me, dir).smobbed_copy ();
 }
 
 bool
@@ -83,3 +89,4 @@ Script::set_interface (Grob*me)
 {
   return me->set_interface (ly_symbol2scm ("script-interface"));
 }
+
index 643d67b912ab94debdcb683457c7ed72a75cf28f..dbef68ff5a95390d58829f5ee7165ede289577c7 100644 (file)
@@ -34,7 +34,7 @@ do_rod (Item *l, Item *r)
   rod.add_to_cols ();
 }
   
-MAKE_SCHEME_CALLBACK(Separating_group_spanner,set_spacing_rods,1);
+MAKE_SCHEME_CALLBACK (Separating_group_spanner,set_spacing_rods,1);
 SCM
 Separating_group_spanner::set_spacing_rods (SCM smob)
 {
@@ -49,18 +49,18 @@ Separating_group_spanner::set_spacing_rods (SCM smob)
       SCM next_elt = gh_car (s);
 
       Item *l = dynamic_cast<Item*> (unsmob_grob (elt));
-      Item *r = dynamic_cast<Item*> (unsmob_grob ( next_elt));
+      Item *r = dynamic_cast<Item*> (unsmob_grob (next_elt));
 
       if (!r || !l)
        continue;
       
       Item *lb
-       = dynamic_cast<Item*>(l->find_prebroken_piece (RIGHT));
+       = dynamic_cast<Item*> (l->find_prebroken_piece (RIGHT));
 
       Item *rb
-       = dynamic_cast<Item*>(r->find_prebroken_piece (LEFT));
+       = dynamic_cast<Item*> (r->find_prebroken_piece (LEFT));
       
-      do_rod(l,  r);
+      do_rod (l,  r);
       if (lb)
        {
          do_rod (lb, r);
@@ -83,7 +83,7 @@ Separating_group_spanner::set_spacing_rods (SCM smob)
    */
   for (SCM s = me->get_grob_property ("elements"); gh_pair_p (s); s = gh_cdr (s))
     {
-      Item * it =dynamic_cast<Item*>(unsmob_grob (gh_car (s)));
+      Item * it =dynamic_cast<Item*> (unsmob_grob (gh_car (s)));
       if (it && it->broken_b ())
        {
          it->find_prebroken_piece (LEFT) ->suicide ();
index cb3f54040e7071053ae319e42fcf64aaa1b06599..39cfa193c2131a3c1e655cf1711c5f0d187a22de 100644 (file)
@@ -62,7 +62,7 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i)
     return;
   if (it->parent_l (X_AXIS)
       && it->parent_l (X_AXIS)->has_extent_callback_b
     (Axis_group_interface::group_extent_callback_proc, X_AXIS))
+ (Axis_group_interface::group_extent_callback_proc, X_AXIS))
     return;
 
   
@@ -73,7 +73,7 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i)
   if (!p_ref_)
     {
       p_ref_ = new Item
      (get_property ("SeparationItem"));
+ (get_property ("SeparationItem"));
          
       if (ib)
        p_ref_->set_grob_property ("breakable", SCM_BOOL_T);
@@ -102,5 +102,5 @@ Separating_line_group_engraver::stop_translation_timestep ()
 
 
 
-ADD_THIS_TRANSLATOR(Separating_line_group_engraver);
+ADD_THIS_TRANSLATOR (Separating_line_group_engraver);
 
index 8a777a0df9aadf51563972e725b7ff022fc77953..b5642dbc268796839a4d742e3acbd7c243349138 100644 (file)
@@ -44,7 +44,7 @@ Separation_item::my_width (Grob *me)
       if (pc != il->column_l ())
        {
          /* this shouldn't happen, but let's continue anyway. */
-         programming_error (_("Separation_item:  I've been drinking too much"));
+         programming_error (_ ("Separation_item:  I've been drinking too much"));
          continue;             /*UGH UGH*/ 
        }
 
@@ -56,7 +56,7 @@ Separation_item::my_width (Grob *me)
       Interval iv (il->extent (pc, X_AXIS));
       if (!iv.empty_b ())
        {
-         w.unite  (iv);
+         w.unite (iv);
        }
     }
 
index 1538cb72aded480761f2f6de66b27fb574222303..ad1ae7b934d41bf2dd83018001779bcb6a95aef1 100644 (file)
@@ -24,7 +24,7 @@
   The length of musiclist from start to up to cursor_ (cursor_ not
   including), is summed
 
-  here_mom_  = sum (length (musiclist [start ... cursor> ))  %)  
+  here_mom_  = sum (length (musiclist [start ... cursor>))  %)  
   
  */
 
@@ -48,13 +48,13 @@ Sequential_music_iterator::Sequential_music_iterator (Sequential_music_iterator
     iter_p_ = 0;
 }
 
-Sequential_music_iterator::~Sequential_music_iterator()
+Sequential_music_iterator::~Sequential_music_iterator ()
 {
   delete iter_p_;
 }
 
 void
-Sequential_music_iterator::construct_children()
+Sequential_music_iterator::construct_children ()
 {
   cursor_ = dynamic_cast<Music_sequence const*> (music_l_)->music_list ();
 
@@ -67,7 +67,7 @@ Sequential_music_iterator::construct_children()
   /*
     iter_p_->ok () is tautology, but what the heck.
    */
-  if (iter_p_ && iter_p_->ok()) 
+  if (iter_p_ && iter_p_->ok ()) 
     descend_to_child ();
 
 }
@@ -146,7 +146,7 @@ Sequential_music_iterator::get_music (Moment until)const
       s = gh_append2 (nm, s);
       
       Moment m = 0;
-      for (SCM i = nm; gh_pair_p(i); i = gh_cdr (i))
+      for (SCM i = nm; gh_pair_p (i); i = gh_cdr (i))
        m = m >? unsmob_music (gh_car (i))->length_mom ();
 
       if (m > Moment (0))
@@ -202,14 +202,14 @@ Sequential_music_iterator::process (Moment until)
 }
 
 Moment
-Sequential_music_iterator::pending_moment() const
+Sequential_music_iterator::pending_moment () const
 {
-  return iter_p_->pending_moment() + here_mom_;
+  return iter_p_->pending_moment () + here_mom_;
 }
 
 
 bool
-Sequential_music_iterator::ok() const
+Sequential_music_iterator::ok () const
 {
   return iter_p_;
 }
@@ -219,4 +219,4 @@ Sequential_music_iterator::try_music_in_children (Music *m) const
 { 
   return iter_p_ ? iter_p_->try_music (m) : 0;
 }
-IMPLEMENT_CTOR_CALLBACK(Sequential_music_iterator);
+IMPLEMENT_CTOR_CALLBACK (Sequential_music_iterator);
index 273ad4a88ac500ef1d4280e405be3f077f05194a..5c947d8b20e90ab2f3ce3e4ecef7d8d03a1b2210 100644 (file)
@@ -39,17 +39,17 @@ Side_position_interface::get_direction (Grob*me)
     }
   
   SCM other_elt = me->get_grob_property ("direction-source");
-  Grob * e = unsmob_grob(other_elt);
+  Grob * e = unsmob_grob (other_elt);
   if (e)
     {
-      return (Direction)(relative_dir * Directional_element_interface::get (e));
+      return (Direction) (relative_dir * Directional_element_interface::get (e));
     }
   
   return CENTER;
 }
   
 
-MAKE_SCHEME_CALLBACK(Side_position_interface,aligned_on_support_extents, 2);
+MAKE_SCHEME_CALLBACK (Side_position_interface,aligned_on_support_extents, 2);
 SCM
 Side_position_interface::aligned_on_support_extents (SCM element_smob, SCM axis)
 {
@@ -79,7 +79,7 @@ Side_position_interface::general_side_position (Grob * me, Axis a, bool use_exte
   Interval dim;
   for (SCM s = support; s != SCM_EOL; s = gh_cdr (s))
     {
-      Grob * e  = unsmob_grob ( gh_car (s));
+      Grob * e  = unsmob_grob (gh_car (s));
       if (e)
        if (use_extents)
          dim.unite (e->extent (common, a));
@@ -92,7 +92,7 @@ Side_position_interface::general_side_position (Grob * me, Axis a, bool use_exte
 
   if (dim.empty_b ())
     {
-      dim = Interval(0,0);
+      dim = Interval (0,0);
     }
 
   Direction dir = Side_position_interface::get_direction (me);
@@ -123,7 +123,7 @@ Side_position_interface::general_side_position (Grob * me, Axis a, bool use_exte
 /*
   Cut & paste (ugh.)
  */
-MAKE_SCHEME_CALLBACK(Side_position_interface,aligned_on_support_refpoints,2);
+MAKE_SCHEME_CALLBACK (Side_position_interface,aligned_on_support_refpoints,2);
 SCM
 Side_position_interface::aligned_on_support_refpoints (SCM smob, SCM axis)
 {
@@ -137,7 +137,7 @@ Side_position_interface::aligned_on_support_refpoints (SCM smob, SCM axis)
 /**
   callback that centers the element on itself
  */
-MAKE_SCHEME_CALLBACK(Side_position_interface,aligned_on_self,2);
+MAKE_SCHEME_CALLBACK (Side_position_interface,aligned_on_self,2);
 SCM
 Side_position_interface::aligned_on_self (SCM element_smob, SCM axis)
 {
@@ -145,12 +145,12 @@ Side_position_interface::aligned_on_self (SCM element_smob, SCM axis)
   Axis a = (Axis) gh_scm2int (axis);
   String s ("self-alignment-");
 
-  s +=  (a == X_AXIS) ? "X" : "Y";
+  s += (a == X_AXIS) ? "X" : "Y";
 
-  SCM align (me->get_grob_property (s.ch_C()));
+  SCM align (me->get_grob_property (s.ch_C ()));
   if (gh_number_p (align))
     {
-      Interval ext(me->extent (me,a));
+      Interval ext (me->extent (me,a));
 
       if (ext.empty_b ())
        {
@@ -185,10 +185,10 @@ directed_round (Real f, Direction d)
   of the elements "direction" elt property.
 
   Only rounds when we're inside the staff, as determined by
-  Staff_symbol_referencer::staff_radius() */
-MAKE_SCHEME_CALLBACK(Side_position_interface,quantised_position,2);
+  Staff_symbol_referencer::staff_radius () */
+MAKE_SCHEME_CALLBACK (Side_position_interface,quantised_position,2);
 SCM
-Side_position_interface::quantised_position (SCM element_smob, SCM )
+Side_position_interface::quantised_position (SCM element_smob, SCM)
 {
   Grob *me = unsmob_grob (element_smob);
   
@@ -200,7 +200,7 @@ Side_position_interface::quantised_position (SCM element_smob, SCM )
       Real p = Staff_symbol_referencer::position_f (me);
       Real rp = directed_round (p, d);
       Real rad = Staff_symbol_referencer::staff_radius (me) *2 ;
-      int ip = int  (rp);
+      int ip = int (rp);
 
       if (abs (ip) <= rad && Staff_symbol_referencer::on_staffline (me,ip))
        {
@@ -216,7 +216,7 @@ Side_position_interface::quantised_position (SCM element_smob, SCM )
 /*
   Position next to support, taking into account my own dimensions and padding.
  */
-MAKE_SCHEME_CALLBACK(Side_position_interface,aligned_side,2);
+MAKE_SCHEME_CALLBACK (Side_position_interface,aligned_side,2);
 SCM
 Side_position_interface::aligned_side (SCM element_smob, SCM axis)
 {
@@ -248,7 +248,7 @@ Side_position_interface::aligned_side (SCM element_smob, SCM axis)
 /*
   Position centered on parent.
  */
-MAKE_SCHEME_CALLBACK(Side_position_interface,centered_on_parent,2);
+MAKE_SCHEME_CALLBACK (Side_position_interface,centered_on_parent,2);
 SCM
 Side_position_interface::centered_on_parent (SCM element_smob, SCM axis)
 {
@@ -317,8 +317,8 @@ Side_position_interface::has_interface (Grob*me)
 bool
 Side_position_interface::supported_b (Grob*me) 
 {
-  SCM s = me->get_grob_property  ("side-support-elements"); 
-  return gh_pair_p(s);
+  SCM s = me->get_grob_property ("side-support-elements"); 
+  return gh_pair_p (s);
 }
 
 
index 712e4745ea266757f08ea2a10dd85d103b90bd5b..ef83a5abda1a3de36eb1a633c2fb50b4b8b406a7 100644 (file)
@@ -55,4 +55,4 @@ Simple_music_iterator::process (Moment m)
   skip (m);
 }
 
-IMPLEMENT_CTOR_CALLBACK(Simple_music_iterator);
+IMPLEMENT_CTOR_CALLBACK (Simple_music_iterator);
index 40ed6a0c86abe9eb9501217505d4a158712ccabb..edf841a7737b9cc4e49d67ba582eecfeb10fde43 100644 (file)
@@ -141,7 +141,7 @@ Simple_spacer::my_solve_linelen ()
 
       if (conf < line_len_f_)
        {
-         force_f_ +=  (line_len_f_  - conf) * active_springs_stiffness ();
+         force_f_ += (line_len_f_  - conf) * active_springs_stiffness ();
          break;
        }
       else
@@ -202,7 +202,7 @@ Simple_spacer::add_columns (Link_array<Grob> cols)
        }
       
       desc.block_force_f_ = - desc.hooke_f_ * desc.ideal_f_; // block at distance 0
-      springs_.push  (desc);
+      springs_.push (desc);
     }
   
   for (int i=0; i < cols.size () - 1; i++)
@@ -239,12 +239,12 @@ Simple_spacer::solve (Column_x_positions *positions) const
       positions->config_.push (positions->config_.top () + springs_[i].length (force_f_));
     }
 
-  positions->satisfies_constraints_b_ =  (line_len_f_ < 0) || active_b ();
+  positions->satisfies_constraints_b_ = (line_len_f_ < 0) || active_b ();
 }
 
 
 
-Spring_description::Spring_description)
+Spring_description::Spring_description ()
 {
   ideal_f_ =0.0;
   hooke_f_ =0.0;
index 12e0b16c68f419dfb76101cd9043f215d44d0b70..3265bee03d2c01f7f229cdcb1c0ce61ca99dec2d 100644 (file)
@@ -45,13 +45,13 @@ Simultaneous_music_iterator::get_music (Moment m)const
 }
 
 void
-Simultaneous_music_iterator::construct_children()
+Simultaneous_music_iterator::construct_children ()
 {
   int j = 0;
   Music_sequence const *sim = dynamic_cast<Music_sequence const*> (music_l_);
 
   SCM i = sim->music_list ();
-  for (; gh_pair_p(i); i = gh_cdr(i), j++)
+  for (; gh_pair_p (i); i = gh_cdr (i), j++)
     {
       Music *mus = unsmob_music (gh_car (i));
       Music_iterator * mi = static_get_iterator_p (mus);
@@ -60,7 +60,7 @@ Simultaneous_music_iterator::construct_children()
         number number as name */
       
       Translator_group * t = (j && separate_contexts_b_)
-       ? report_to_l ()->find_create_translator_l (report_to_l()->type_str_,
+       ? report_to_l ()->find_create_translator_l (report_to_l ()->type_str_,
                                                    to_str (j))
        : report_to_l ();
 
@@ -70,7 +70,7 @@ Simultaneous_music_iterator::construct_children()
       mi->init_translator (mus, t);
       mi->construct_children ();
       
-      if (mi->ok()) 
+      if (mi->ok ()) 
        {
          children_p_list_.append (new Killing_cons<Music_iterator> (mi,0));
        }
@@ -86,14 +86,14 @@ Simultaneous_music_iterator::process (Moment until)
   for (Cons<Music_iterator> **pp = &children_p_list_.head_; *pp;)
     {
       Music_iterator * i = (*pp)->car_;
-      if  (i->pending_moment() == until) 
+      if (i->pending_moment () == until) 
        {
          i->process (until);
        }
-      if (!i->ok())
+      if (!i->ok ())
        delete children_p_list_.remove_cons (pp);
       else
-       pp = &(*pp)->next_;
+       pp = & (*pp)->next_;
     }
 }
 
@@ -103,32 +103,32 @@ Simultaneous_music_iterator::skip (Moment until)
   for (Cons<Music_iterator> **pp = &children_p_list_.head_; *pp;)
     {
       Music_iterator * i = (*pp)->car_;
-      if (i->pending_moment() <= until) 
+      if (i->pending_moment () <= until) 
        {
          i->skip (until);
        }
-      if (!i->ok())
+      if (!i->ok ())
        delete children_p_list_.remove_cons (pp);
       else
-       pp = &(*pp)->next_;
+       pp = & (*pp)->next_;
     }
 }
 
 Moment
-Simultaneous_music_iterator::pending_moment() const
+Simultaneous_music_iterator::pending_moment () const
 {
   Moment next;
   next.set_infinite (1);
   
   for (Cons<Music_iterator> *p = children_p_list_.head_; p; p = p->next_)
-    next = next <? p->car_->pending_moment() ;
+    next = next <? p->car_->pending_moment () ;
   return next;
 }
 
 
 
 bool
-Simultaneous_music_iterator::ok() const
+Simultaneous_music_iterator::ok () const
 {
   return children_p_list_.head_;
 }
@@ -144,4 +144,4 @@ Simultaneous_music_iterator::try_music_in_children (Music *m) const
 
 
 
-IMPLEMENT_CTOR_CALLBACK(Simultaneous_music_iterator);
+IMPLEMENT_CTOR_CALLBACK (Simultaneous_music_iterator);
index de36d7e5eb3a776440e8da02d276acfb393ff324..d7395d2518248fe3745c49f6d5d147da2c04d912 100644 (file)
@@ -103,17 +103,17 @@ Slur_bezier_bow::enclosed_area_f () const
          x = Interval ((encompass_[i-1][X_AXIS] + encompass_[i][X_AXIS])/2, 
                        encompass_[i][X_AXIS]);
          y = Interval (0,
                      (curve_.get_other_coordinate (X_AXIS,
                                                    (x[MIN] + x[MAX]) / 2)));
+ (curve_.get_other_coordinate (X_AXIS,
+ (x[MIN] + x[MAX]) / 2)));
        }
       else
        {
          x = Interval ((encompass_[i-1][X_AXIS] + encompass_[i][X_AXIS]) / 2, 
                      (encompass_[i][X_AXIS] + encompass_[i+1][X_AXIS]) / 2);
+ (encompass_[i][X_AXIS] + encompass_[i+1][X_AXIS]) / 2);
          y = Interval (encompass_[i][Y_AXIS],
                      (curve_.get_other_coordinate (X_AXIS, x[MIN])
+ (curve_.get_other_coordinate (X_AXIS, x[MIN])
                         + curve_.get_other_coordinate (X_AXIS,
                                                      (x[MIN] + x[MAX]) / 2)
+ (x[MIN] + x[MAX]) / 2)
                         + curve_.get_other_coordinate (X_AXIS, x[MAX])) / 3);
        }
       
@@ -193,7 +193,7 @@ Slur_bezier_bow::minimise_enclosed_area (Real beauty,
 
 
 /*
-  max ( encompass.y / curve.y )
+  max (encompass.y / curve.y)
   
  */
 Real
index 9c26cddd89208afb75924662728e63ddea8ed0d9..6f57a925c39113bc58a85c027831ff554a46d540 100644 (file)
@@ -66,7 +66,7 @@ Slur_engraver::try_music (Music *req_l)
          /*
            Let's not start more than one slur per moment.
           */
-         if (sl->get_span_dir() == START)
+         if (sl->get_span_dir () == START)
            {
              if (now_mom () > last_start_)
                {
@@ -136,7 +136,7 @@ Slur_engraver::create_grobs ()
     {
       Span_req* slur_req_l = new_slur_req_l_arr_[i];
       // end slur: move the slur to other array
-      if (slur_req_l->get_span_dir() == STOP)
+      if (slur_req_l->get_span_dir () == STOP)
        {
          if (slur_l_stack_.empty ())
            /* How to shut up this warning, when Voice_devnull_engraver has
@@ -154,7 +154,7 @@ Slur_engraver::create_grobs ()
              requests_arr_.pop ();
            }
        }
-      else  if (slur_req_l->get_span_dir() == START)
+      else  if (slur_req_l->get_span_dir () == START)
        {
          // push a new slur onto stack.
          // (use temp. array to wait for all slur STOPs)
index 9c3fa7866a535b8a8889bfee2150285f600bc882..316774e37d9002d22f8981171a49bedbaaa8e7d4 100644 (file)
@@ -14,7 +14,7 @@
     * begin and end should be treated as a/acknowledge Scripts.
     * smart changing of endings
     * smart changing of (Y-?)offsets to avoid ugly beziers
      (along-side-stem)
+ (along-side-stem)
  */
 
 #include "directional-element-interface.hh"
@@ -53,7 +53,7 @@ Slur::add_column (Grob*me, Grob*n)
       me->add_dependency (n);
     }
 
-  add_bound_item (dynamic_cast<Spanner*> (me), dynamic_cast<Item*>(n));
+  add_bound_item (dynamic_cast<Spanner*> (me), dynamic_cast<Item*> (n));
 }
 
 void
@@ -63,7 +63,7 @@ Slur::de_uglyfy (Grob*me, Slur_bezier_bow* bb, Real default_height)
   Real ff = bb->fit_factor ();
   for (int i = 1; i < 3; i++)
     {
-      Real ind = abs (bb->curve_.control_[(i-1)*3][X_AXIS]
+      Real ind = abs (bb->curve_.control_[ (i-1)*3][X_AXIS]
                      - bb->curve_.control_[i][X_AXIS]) / length;
       Real h = bb->curve_.control_[i][Y_AXIS] * ff / length;
 
@@ -151,7 +151,7 @@ Slur::check_slope (Grob *me)
        {
          Real staff_space = Staff_symbol_referencer::staff_space ((Grob*)me);
          Direction dir = (Direction)gh_scm2int (me->get_grob_property ("direction"));
-         Direction d = (Direction)(- dir * (sign (dy)));
+         Direction d = (Direction) (- dir * (sign (dy)));
          SCM a = me->get_grob_property ("attachment-offset");
          Drul_array<Offset> o;
          o[LEFT] = ly_scm2offset (index_cell (a, LEFT));
@@ -201,9 +201,9 @@ Slur::get_first_notecolumn_y (Grob *me, Direction dir)
 {
   Grob *col = dir == LEFT
     ? unsmob_grob (gh_car (scm_reverse (me->get_grob_property
                                         ("note-columns"))))
+ ("note-columns"))))
     : unsmob_grob
   (gh_car (me->get_grob_property ("note-columns")));
+ (gh_car (me->get_grob_property ("note-columns")));
   
   Grob *common[] =
   {
@@ -248,7 +248,7 @@ Slur::broken_trend_offset (Grob *me, Direction dir)
              int neighbour_cols = scm_ilength (neighbour->get_grob_property ("note-columns"));
              int cols = scm_ilength (me->get_grob_property ("note-columns"));
              o = Offset (0, (y*neighbour_cols + neighbour_y*cols) /
                        (cols + neighbour_cols));
+ (cols + neighbour_cols));
              break;
            }
        }
@@ -267,7 +267,7 @@ Slur::get_attachment (Grob *me, Direction dir,
       s = me->get_grob_property ("attachment");
     }
   SCM a = dir == LEFT ? gh_car (s) : gh_cdr (s);
-  Spanner*sp = dynamic_cast<Spanner*>(me);
+  Spanner*sp = dynamic_cast<Spanner*> (me);
   String str = ly_symbol2string (a);
   Real staff_space = Staff_symbol_referencer::staff_space ((Grob*)me);
   Real hs = staff_space / 2.0;
@@ -309,7 +309,7 @@ Slur::get_attachment (Grob *me, Direction dir,
                Default position is on stem X, at stem end Y
               */
              o += Offset (0.5 *
                         (n->extent (n,X_AXIS).length ()
+ (n->extent (n,X_AXIS).length ()
                            - stem->extent (stem,X_AXIS).length ())
                            * (1 + Stem::get_direction (stem)),
                            0);
@@ -339,7 +339,7 @@ Slur::get_attachment (Grob *me, Direction dir,
 int stemdir = stem ? Stem::get_direction (stem) : 1;
   int slurdir = gh_scm2int (me->get_grob_property ("direction"));
   SCM l = scm_assoc
     (scm_listify (a,
+ (scm_listify (a,
                 gh_int2scm (stemdir * dir),
                 gh_int2scm (slurdir * dir),
                   SCM_UNDEFINED), alist);
@@ -411,7 +411,7 @@ Slur::encompass_offset (Grob*me,
 Array<Offset>
 Slur::get_encompass_offset_arr (Grob *me)
 {
-  Spanner*sp = dynamic_cast<Spanner*>(me);
+  Spanner*sp = dynamic_cast<Spanner*> (me);
   SCM eltlist = me->get_grob_property ("note-columns");
   Grob *common[] = {me->common_refpoint (eltlist, X_AXIS),
                             me->common_refpoint (eltlist, Y_AXIS)};
@@ -479,14 +479,14 @@ Slur::get_encompass_offset_arr (Grob *me)
 }
 
 
-MAKE_SCHEME_CALLBACK(Slur,set_spacing_rods,1);
+MAKE_SCHEME_CALLBACK (Slur,set_spacing_rods,1);
 SCM
 Slur::set_spacing_rods (SCM smob)
 {
   Grob*me = unsmob_grob (smob);
 
   Rod r;
-  Spanner*sp = dynamic_cast<Spanner*>(me);
+  Spanner*sp = dynamic_cast<Spanner*> (me);
   r.item_l_drul_[LEFT] = sp->get_bound (LEFT);
   r.item_l_drul_[RIGHT] = sp->get_bound (RIGHT);
   r.distance_f_ =
@@ -507,7 +507,7 @@ Slur::height (SCM smob, SCM ax)
 {
   Axis a = (Axis)gh_scm2int (ax);
   Grob * me = unsmob_grob (smob);
-  assert ( a == Y_AXIS);
+  assert (a == Y_AXIS);
 
   SCM mol = me->get_uncached_molecule ();
   return ly_interval2scm (unsmob_molecule (mol)->extent (a));
@@ -542,7 +542,7 @@ Slur::brew_molecule (SCM smob)
   else
     a = Lookup::slur (one, Directional_element_interface::get (me) * thick, thick);
 
-  return a.smobbed_copy();
+  return a.smobbed_copy ();
 }
 
 void
@@ -571,7 +571,7 @@ Slur::set_control_points (Grob*me)
       if (gh_number_p (ssb))
        sb = gh_scm2double (ssb);
 
-      bb.minimise_enclosed_area ( sb, details);
+      bb.minimise_enclosed_area (sb, details);
       SCM sbf = scm_assq (ly_symbol2scm ("force-blowfit"), details);
       Real bff = 1.0;
       if (gh_pair_p (sbf) && gh_number_p (gh_cdr (sbf)))
@@ -598,7 +598,7 @@ Slur::set_control_points (Grob*me)
   SCM controls = SCM_EOL;
   for (int i= 4; i--;)
     {
-      controls = gh_cons ( ly_offset2scm (b.control_[i]), controls);
+      controls = gh_cons (ly_offset2scm (b.control_[i]), controls);
       /*
        BRRR WHURG.
        All these null control-points, where do they all come from?
@@ -650,7 +650,7 @@ Slur::get_curve (Grob*me)
       if (x > x1 && x <x2)
        {
          Real y = b.get_other_coordinate (X_AXIS, x);
-         off = off >? dir *  (enc[i][Y_AXIS] - y);
+         off = off >? dir * (enc[i][Y_AXIS] - y);
        }
     }
   b.translate (Offset (0, dir * off));
index 9a57db0f142c5e55d06d9d513bca20c177470136..b0d6779c7d84c3933dbf3b385319403d448e3490 100644 (file)
@@ -12,7 +12,7 @@
 #include "warn.hh"
 
 SCM
-Spaceable_grob::get_minimum_distances ( Grob*me)
+Spaceable_grob::get_minimum_distances (Grob*me)
 {
   return me->get_grob_property ("minimum-distances");
 }
@@ -49,7 +49,7 @@ Spaceable_grob::add_spring (Grob*me, Grob * p, Real d, Real strength)
       SCM dist = gh_car (s);
       if (gh_car (dist) == p->self_scm ())
        {
-         programming_error("already have that spring");
+         programming_error ("already have that spring");
          return ;
        }
     }
index e5e3f5c1f0c5f956e447b7ec437f96f47a18b9fe..0b3b58673159f08145eec098644ca9d7950323db 100644 (file)
@@ -22,7 +22,7 @@ struct Rhythmic_tuple
   Rhythmic_tuple ()
     {
     }
-  Rhythmic_tuple (Grob_info i, Moment m )
+  Rhythmic_tuple (Grob_info i, Moment m)
     {
       info_ = i;
       end_ = m;
@@ -44,7 +44,7 @@ class Spacing_engraver : public Engraver
 
   Spanner * spacing_p_;
 protected:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   virtual void acknowledge_grob (Grob_info);
   virtual void start_translation_timestep ();
   virtual void stop_translation_timestep ();
@@ -64,10 +64,10 @@ int
 Rhythmic_tuple::time_compare (Rhythmic_tuple const &h1,
                              Rhythmic_tuple const &h2)
 {
-  return (h1.end_ - h2.end_ ).sign ();
+  return (h1.end_ - h2.end_).sign ();
 }
 
-Spacing_engraver::Spacing_engraver()
+Spacing_engraver::Spacing_engraver ()
 {
   spacing_p_ = 0;
 }
@@ -99,9 +99,9 @@ Spacing_engraver::acknowledge_grob (Grob_info i)
   if (to_boolean (i.elem_l_->get_grob_property ("non-rhythmic")))
     return;
   
-  if (Rhythmic_req * r = dynamic_cast<Rhythmic_req*>(i.req_l_))
+  if (Rhythmic_req * r = dynamic_cast<Rhythmic_req*> (i.req_l_))
     {
-      Rhythmic_tuple t(i, now_mom () + r->length_mom ());
+      Rhythmic_tuple t (i, now_mom () + r->length_mom ());
       now_durations_.push (t);
     }
 }
@@ -138,8 +138,8 @@ Spacing_engraver::stop_translation_timestep ()
   Paper_column * sc
     = dynamic_cast<Paper_column*> (unsmob_grob (get_property ("currentMusicalColumn")));
 
-  SCM sh = shortest_playing.smobbed_copy);
-  SCM st = starter.smobbed_copy();
+  SCM sh = shortest_playing.smobbed_copy ();
+  SCM st = starter.smobbed_copy ();
 
   sc->set_grob_property ("shortest-playing-duration", sh);  
   sc->set_grob_property ("shortest-starter-duration", st);
@@ -156,6 +156,6 @@ Spacing_engraver::start_translation_timestep ()
     stopped_durations_.push (playing_durations_.get ());
 }
 
-ADD_THIS_TRANSLATOR(Spacing_engraver);
+ADD_THIS_TRANSLATOR (Spacing_engraver);
 
 
index c4c6b100f0c25e6314a868f9bc427e807a2285c2..bf85b6068350f03b201789508bc17cb0fc185087 100644 (file)
@@ -54,7 +54,7 @@ Spacing_spanner::do_measure (Grob*me, Link_array<Grob> cols)
       if (dynamic_cast<Paper_column*> (cols[i])->musical_b ())
        {
          SCM  st = cols[i]->get_grob_property ("shortest-starter-duration");
-         Moment this_shortest = *unsmob_moment(st);
+         Moment this_shortest = *unsmob_moment (st);
          shortest = shortest <? this_shortest;
          if (!mean_shortest.infty_b ())
            {
@@ -70,8 +70,8 @@ Spacing_spanner::do_measure (Grob*me, Link_array<Grob> cols)
     {
       Item * l = dynamic_cast<Item*> (cols[i]);
       Item * r =  dynamic_cast<Item*> (cols[i+1]);
-      Item * lb = dynamic_cast<Item*> ( l->find_prebroken_piece (RIGHT));
-      Item * rb = dynamic_cast<Item*> ( r->find_prebroken_piece (LEFT));
+      Item * lb = dynamic_cast<Item*> (l->find_prebroken_piece (RIGHT));
+      Item * rb = dynamic_cast<Item*> (r->find_prebroken_piece (LEFT));
 
       Item* combinations[4][2]={{l,r}, {lb,r}, {l,rb},{lb,rb}};
 
@@ -108,12 +108,12 @@ Spacing_spanner::do_measure (Grob*me, Link_array<Grob> cols)
            {
              left_distance = gh_scm2double (gh_cdr (hint)); 
            }
-          // 2nd condition should be (i+1 < col_count()), ie. not the last column in score.  FIXME
-         else if (!lc->musical_b() && i+1 < cols.size ()) 
+          // 2nd condition should be (i+1 < col_count ()), ie. not the last column in score.  FIXME
+         else if (!lc->musical_b () && i+1 < cols.size ()) 
            {
              left_distance= default_bar_spacing (me,lc,rc,shortest <? base_shortest_duration);
            }
-         else if (lc->musical_b())
+         else if (lc->musical_b ())
            {
              left_distance  = note_spacing (me,lc, rc, shortest <? base_shortest_duration);
            }
@@ -148,7 +148,7 @@ Spacing_spanner::do_measure (Grob*me, Link_array<Grob> cols)
          else
            {
              Interval ext (rc->extent (rc, X_AXIS));
-             right_dist =  ext.empty_b() ? 0.0 : - ext [LEFT];
+             right_dist =  ext.empty_b () ? 0.0 : - ext [LEFT];
            }
 
          /*
@@ -172,13 +172,13 @@ Spacing_spanner::do_measure (Grob*me, Link_array<Grob> cols)
          
          if (gh_pair_p (next_stretch_hint))
            // see regtest spacing-tight
-           stretch_dist += - gh_scm2double (gh_car  (next_stretch_hint));
+           stretch_dist += - gh_scm2double (gh_car (next_stretch_hint));
          else
            stretch_dist += right_dist;
 
          if (s.distance_f_ <0)
            {
-             programming_error("Negative dist, setting to 1.0 PT");
+             programming_error ("Negative dist, setting to 1.0 PT");
              s.distance_f_ = 1.0;
            }
          if (stretch_dist == 0.0)
@@ -233,7 +233,7 @@ Real
 Spacing_spanner::get_duration_space (Grob*me, Moment d, Moment shortest) 
 {
   Real log =  log_2 (shortest);
-  Real k = gh_scm2double (me->get_grob_property  ("arithmetic-basicspace"))
+  Real k = gh_scm2double (me->get_grob_property ("arithmetic-basicspace"))
     - log;
   
   return (log_2 (d) + k) * gh_scm2double (me->get_grob_property ("arithmetic-multiplier"));
@@ -249,7 +249,7 @@ Spacing_spanner::note_spacing (Grob*me, Grob *lc, Grob *rc,
 
   //  SCM s = lc->get_grob_property ("mean-playing-duration");  
   if (unsmob_moment (s))
-    shortest_playing_len = *unsmob_moment(s);
+    shortest_playing_len = *unsmob_moment (s);
   
   if (! shortest_playing_len)
     {
@@ -264,7 +264,7 @@ Spacing_spanner::note_spacing (Grob*me, Grob *lc, Grob *rc,
     }
   Moment delta_t = Paper_column::when_mom (rc) - Paper_column::when_mom (lc);
   Real dist = get_duration_space (me, shortest_playing_len, shortest);
-  dist *= (double)(delta_t / shortest_playing_len);
+  dist *= (double) (delta_t / shortest_playing_len);
 
   /*
     UGH: KLUDGE!
@@ -305,7 +305,7 @@ Spacing_spanner::stem_dir_correction (Grob*me, Grob*l, Grob*r)
   dl = gh_car (dl);
   dr = gh_car (dr);
 
-  assert (gh_number_p (dl) && gh_number_p(dr));
+  assert (gh_number_p (dl) && gh_number_p (dr));
   int d1 = gh_scm2int (dl);
   int d2 = gh_scm2int (dr);
 
@@ -314,7 +314,7 @@ Spacing_spanner::stem_dir_correction (Grob*me, Grob*l, Grob*r)
 
 
   Real correction = 0.0;
-  Real ssc = gh_scm2double (me->get_grob_property("stem-spacing-correction"));
+  Real ssc = gh_scm2double (me->get_grob_property ("stem-spacing-correction"));
 
   if (d1 && d2 && d1 * d2 == -1)
     {
@@ -326,7 +326,7 @@ Spacing_spanner::stem_dir_correction (Grob*me, Grob*l, Grob*r)
 }
   
 
-MAKE_SCHEME_CALLBACK(Spacing_spanner, set_springs,1);
+MAKE_SCHEME_CALLBACK (Spacing_spanner, set_springs,1);
 SCM
 Spacing_spanner::set_springs (SCM smob)
 {
index cb026be67f892b2fa1f7920c36c6669a7361f967..a4e19592d0a468007f8db55ac7cf50c422a29aa5 100644 (file)
@@ -29,16 +29,16 @@ class Span_bar_engraver : public Engraver
   Link_array<Item> bar_l_arr_;
 
 public:
-  VIRTUAL_COPY_CONS(Translator);
-  Span_bar_engraver();
+  VIRTUAL_COPY_CONS (Translator);
+  Span_bar_engraver ();
 protected:
   virtual void acknowledge_grob (Grob_info);
-  virtual void stop_translation_timestep();
+  virtual void stop_translation_timestep ();
 
 };
 
 
-Span_bar_engraver::Span_bar_engraver()
+Span_bar_engraver::Span_bar_engraver ()
 {
   spanbar_p_ =0;
 }
@@ -48,14 +48,14 @@ 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_trans_l_arr (this).size ();
   if (depth > 1
       && Bar::has_interface (i.elem_l_))
     {
-      Item * it = dynamic_cast<Item*>(i.elem_l_);
+      Item * it = dynamic_cast<Item*> (i.elem_l_);
       bar_l_arr_.push (it);
 
-      if (bar_l_arr_.size() >= 2 && !spanbar_p_) 
+      if (bar_l_arr_.size () >= 2 && !spanbar_p_) 
        {
          spanbar_p_ = new Item (get_property ("SpanBar"));
          Span_bar::set_interface (spanbar_p_);
@@ -68,12 +68,12 @@ Span_bar_engraver::acknowledge_grob (Grob_info i)
     }
 }
 void
-Span_bar_engraver::stop_translation_timestep()
+Span_bar_engraver::stop_translation_timestep ()
 {
   if (spanbar_p_) 
     {
-      for (int i=0; i < bar_l_arr_.size() ; i++)
-       Span_bar::add_barspanbar_p_,bar_l_arr_[i]);
+      for (int i=0; i < bar_l_arr_.size () ; i++)
+       Span_bar::add_bar (spanbar_p_,bar_l_arr_[i]);
 
       SCM vissym =ly_symbol2scm ("visibility-lambda");
       SCM vis = bar_l_arr_[0]->get_grob_property (vissym);       
@@ -88,7 +88,7 @@ Span_bar_engraver::stop_translation_timestep()
 
 
 
-ADD_THIS_TRANSLATOR(Span_bar_engraver);
+ADD_THIS_TRANSLATOR (Span_bar_engraver);
 
 
 
index 50345c13412ad85b76f10b43d9d21db4e28ba846..fddeb470fe339f9d0f1cf980bfc3cf9273acd1e2 100644 (file)
@@ -25,7 +25,7 @@ Span_bar::add_bar (Grob*me, Grob*b)
   me->add_dependency (b);
 }
 
-MAKE_SCHEME_CALLBACK(Span_bar,width_callback,2);
+MAKE_SCHEME_CALLBACK (Span_bar,width_callback,2);
 SCM
 Span_bar::width_callback (SCM element_smob, SCM scm_axis)
 {
@@ -39,10 +39,10 @@ Span_bar::width_callback (SCM element_smob, SCM scm_axis)
    */
   Molecule m = Bar::compound_barline (se, gl, 40 PT);
   
-  return ly_interval2scm ( m.extent (X_AXIS));
+  return ly_interval2scm (m.extent (X_AXIS));
 }
 
-MAKE_SCHEME_CALLBACK(Span_bar,before_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Span_bar,before_line_breaking,1);
 SCM
 Span_bar::before_line_breaking (SCM smob)
 {
@@ -51,12 +51,12 @@ Span_bar::before_line_breaking (SCM smob)
 
   /*
     no need to call   Bar::before_line_breaking (), because the info
-    in ELEMENTS already has been procced by Bar::before_line_breaking().
+    in ELEMENTS already has been procced by Bar::before_line_breaking ().
    */
   return SCM_UNSPECIFIED;
 }
 
-MAKE_SCHEME_CALLBACK(Span_bar,center_on_spanned_callback,2);
+MAKE_SCHEME_CALLBACK (Span_bar,center_on_spanned_callback,2);
 
 SCM
 Span_bar::center_on_spanned_callback (SCM element_smob, SCM axis)
@@ -72,7 +72,7 @@ Span_bar::center_on_spanned_callback (SCM element_smob, SCM axis)
     interval that we span.  */
   if (i.empty_b ())
     {
-      me->suicide();
+      me->suicide ();
       return gh_double2scm (0.0);
     }
   
@@ -85,7 +85,7 @@ Span_bar::evaluate_empty (Grob*me)
   /*
     TODO: filter all hara-kiried out of ELEMENS list, and then
     optionally do suicide. Call this cleanage function from
-    center_on_spanned_callback() as well.
+    center_on_spanned_callback () as well.
     
    */
   if (!gh_pair_p (me->get_grob_property ("elements")))
@@ -122,7 +122,7 @@ Span_bar::evaluate_glyph (Grob*me)
       type = ".|.";
     }
 
-  gl = ly_str02scm (type.ch_C());
+  gl = ly_str02scm (type.ch_C ());
   if (scm_equal_p (me->get_grob_property (glsym), gl) != SCM_BOOL_T)
     me->set_grob_property (glsym, gl);
 }
@@ -130,11 +130,11 @@ Span_bar::evaluate_glyph (Grob*me)
 Interval
 Span_bar::get_spanned_interval (Grob*me) 
 {
-  return ly_scm2interval (Axis_group_interface::group_extent_callback (me->self_scm(), gh_int2scm (Y_AXIS))); 
+  return ly_scm2interval (Axis_group_interface::group_extent_callback (me->self_scm (), gh_int2scm (Y_AXIS))); 
 }
 
 
-MAKE_SCHEME_CALLBACK(Span_bar,get_bar_size,1);
+MAKE_SCHEME_CALLBACK (Span_bar,get_bar_size,1);
 SCM
 Span_bar::get_bar_size (SCM smob)
 {
index edc3add567540dd15ec6e106178fcb09d56d74b1..7276bd6c702b43f08d2800be2a2df4a941af5d91 100644 (file)
@@ -146,14 +146,14 @@ Span_dynamic_performer::stop_translation_timestep ()
          dv = (Real)finished_dir_ * 0.2;
          if (!start_volume)
            start_volume = finished_dynamic_tuple_arr_.top
            ().audio_l_->volume_ - dv;
+ ().audio_l_->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++)
        {
          Audio_dynamic_tuple* a = &finished_dynamic_tuple_arr_[i];
-         Real volume = start_volume + dv * (Real)(a->mom_ - start_mom)
+         Real volume = start_volume + dv * (Real) (a->mom_ - start_mom)
            / (Real)dt;
          a->audio_l_->volume_ = volume;
        }
@@ -177,12 +177,12 @@ Span_dynamic_performer::start_translation_timestep ()
 bool
 Span_dynamic_performer::try_music (Music* r)
 {
-  if (Span_req * s = dynamic_cast<Span_req*>(r))
+  if (Span_req * s = dynamic_cast<Span_req*> (r))
     {
       String t =  ly_scm2string (s->get_mus_property ("span-type"));      
       if (t == "crescendo" || t == "decrescendo")
        {
-         span_req_l_drul_[s->get_span_dir()] = s;
+         span_req_l_drul_[s->get_span_dir ()] = s;
          return true;
        }
     }
index 6f45027f379b81ea8f29c287259b2df9e84c4b25..b51c332d5f65478524f99d64613c9cb38878c25b 100644 (file)
@@ -41,7 +41,7 @@ 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(),
+                                        name ().ch_C (),
                                         parent->name ().ch_C ()));
            }
        }
@@ -50,7 +50,7 @@ Spanner::do_break_processing ()
   if (line_l () || broken_b ())
     return;
 
-  if  (left == right)
+  if (left == right)
     {
       /*
        If we have a spanner spanning one column, we must break it
@@ -63,7 +63,7 @@ Spanner::do_break_processing ()
            programming_error ("no broken bound");
          else if (bound->line_l ())
            {
-             Spanner * span_p = dynamic_cast<Spanner*>clone ());
+             Spanner * span_p = dynamic_cast<Spanner*> (clone ());
              span_p->set_bound (LEFT, bound);
              span_p->set_bound (RIGHT, bound);
 
@@ -72,7 +72,7 @@ Spanner::do_break_processing ()
              broken_into_l_arr_.push (span_p);
            }
        }
-      while ((flip(&d))!= LEFT);
+      while ((flip (&d))!= LEFT);
     }
   else
     {
@@ -81,7 +81,7 @@ Spanner::do_break_processing ()
       break_points.insert (left,0);
       break_points.push (right);
 
-      for (int i=1; i < break_points.size(); i++) 
+      for (int i=1; i < break_points.size (); i++) 
        {
          Drul_array<Item*> bounds;
          bounds[LEFT] = break_points[i-1];
@@ -89,10 +89,10 @@ Spanner::do_break_processing ()
          Direction d = LEFT;
          do
            {
-             if (!bounds[d]->line_l())
-               bounds[d] = bounds[d]->find_prebroken_piece(- d);
+             if (!bounds[d]->line_l ())
+               bounds[d] = bounds[d]->find_prebroken_piece (- d);
            }
-         while ((flip(&d))!= LEFT);
+         while ((flip (&d))!= LEFT);
 
          if (!bounds[LEFT] ||  ! bounds[RIGHT])
            {
@@ -100,9 +100,9 @@ Spanner::do_break_processing ()
              continue; 
            }
 
-         Spanner *span_p = dynamic_cast<Spanner*>(clone ());
-         span_p->set_bound(LEFT,bounds[LEFT]);
-         span_p->set_bound(RIGHT,bounds[RIGHT]);
+         Spanner *span_p = dynamic_cast<Spanner*> (clone ());
+         span_p->set_bound (LEFT,bounds[LEFT]);
+         span_p->set_bound (RIGHT,bounds[RIGHT]);
 
          if (!bounds[LEFT]->line_l () 
            
@@ -123,15 +123,15 @@ Spanner::do_break_processing ()
 }
 
 void
-Spanner::set_my_columns()
+Spanner::set_my_columns ()
 {
   Direction i = (Direction) LEFT;
   do 
     {
-      if (!spanned_drul_[i]->line_l())
-       set_bound(i,spanned_drul_[i]->find_prebroken_piece((Direction) -i));
+      if (!spanned_drul_[i]->line_l ())
+       set_bound (i,spanned_drul_[i]->find_prebroken_piece ((Direction) -i));
     } 
-  while (flip(&i) != LEFT);
+  while (flip (&i) != LEFT);
 }       
 
 Interval_t<int>
@@ -161,7 +161,7 @@ Spanner::get_bound (Direction d) const
   X-axis parent of THIS to S.
 */
 void
-Spanner::set_bound(Direction d, Grob*s)
+Spanner::set_bound (Direction d, Grob*s)
 {
   Item * i = dynamic_cast<Item*> (s);
   if (!i)
@@ -208,7 +208,7 @@ Spanner::Spanner (Spanner const &s)
 }
 
 Real
-Spanner::spanner_length() const
+Spanner::spanner_length () const
 {  
   Real l = spanned_drul_[LEFT]->relative_coordinate (0, X_AXIS);
   Real r = spanned_drul_[RIGHT]->relative_coordinate (0, X_AXIS);
@@ -220,20 +220,20 @@ Spanner::spanner_length() const
 }
 
 Line_of_score *
-Spanner::line_l() const
+Spanner::line_l () const
 {
   if (!spanned_drul_[LEFT] || !spanned_drul_[RIGHT])
     return 0;
   if (spanned_drul_[LEFT]->line_l () != spanned_drul_[RIGHT]->line_l ())
     return 0;
-  return spanned_drul_[LEFT]->line_l();
+  return spanned_drul_[LEFT]->line_l ();
 }
 
 
 Grob*
 Spanner::find_broken_piece (Line_of_score*l) const
 {
-  int idx = binsearch_link_array (broken_into_l_arr_,  (Spanner*)l, Spanner::compare);
+  int idx = binsearch_link_array (broken_into_l_arr_, (Spanner*)l, Spanner::compare);
   
   if (idx < 0)
     return 0;
@@ -249,9 +249,9 @@ Spanner::compare (Spanner * const &p1, Spanner * const &p2)
 }
 
 bool
-Spanner::broken_b() const
+Spanner::broken_b () const
 {
-  return broken_into_l_arr_.size();
+  return broken_into_l_arr_.size ();
 }
 
 
@@ -264,10 +264,10 @@ Spanner::broken_b() const
 Real
 Spanner::get_broken_left_end_align () const
 {
-  Paper_column *sc = dynamic_cast<Paper_column*> (spanned_drul_[LEFT]->column_l());
+  Paper_column *sc = dynamic_cast<Paper_column*> (spanned_drul_[LEFT]->column_l ());
 
   // Relevant only if left span point is first column in line
-  if(sc != NULL &&
+  if (sc != NULL &&
      sc->break_status_dir () == RIGHT)
     {
       /*
@@ -346,12 +346,12 @@ extend_spanner_over_elements (SCM value, SCM extremal_pair)
     }
   else if (unsmob_grob (value))
     {
-      if (Spanner * sp = dynamic_cast<Spanner*> (unsmob_grob(value)))
+      if (Spanner * sp = dynamic_cast<Spanner*> (unsmob_grob (value)))
        {
          extend_spanner_over_item (sp->get_bound (LEFT), extremal_pair);
          extend_spanner_over_item (sp->get_bound (RIGHT), extremal_pair);
        }
-      else if (Item * it= dynamic_cast<Item*> (unsmob_grob(value)))
+      else if (Item * it= dynamic_cast<Item*> (unsmob_grob (value)))
        extend_spanner_over_item (it, extremal_pair);
     }
 }
index c8baab0eddb113e309df9b443872e5f734ebbc8c..41e7d1cf9252c8bc9b63741cf40b48a7afffc45f 100644 (file)
 #include "performer-group-performer.hh"
 
 /** Perform a staff. Individual notes should have their instrument
 (staff-wide) set, so we override play_element()
(staff-wide) set, so we override play_element ()
 
   */
 class Staff_performer : public Performer_group_performer 
 {
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   
 
   Staff_performer ();
@@ -128,7 +128,7 @@ Staff_performer::new_instrument_str ()
   // mustn't ask Score for instrument: it will return piano!
   SCM minstr = get_property (ly_symbol2scm ("midiInstrument"));
 
-  if (!gh_string_p(minstr))
+  if (!gh_string_p (minstr))
     minstr = get_property (ly_symbol2scm ("instrument"));
 
   if (!gh_string_p (minstr)
index a9337fe80e9ebfc267aee59e4c9163662a5049aa..c1a27bcd1794dffe379e5a1bfb5d2781c1b4b353 100644 (file)
 class Staff_symbol_engraver : public Engraver { 
   Spanner *span_p_;
 public:
-  VIRTUAL_COPY_CONS(Translator);
-  Staff_symbol_engraver();
+  VIRTUAL_COPY_CONS (Translator);
+  Staff_symbol_engraver ();
   
 protected:
-  virtual ~Staff_symbol_engraver();
+  virtual ~Staff_symbol_engraver ();
   virtual void acknowledge_grob (Grob_info);
-  virtual void finalize();
-  virtual void initialize();
+  virtual void finalize ();
+  virtual void initialize ();
 };
 
 
-Staff_symbol_engraver::~Staff_symbol_engraver()
+Staff_symbol_engraver::~Staff_symbol_engraver ()
 {
   assert (!span_p_);
 }
 
-Staff_symbol_engraver::Staff_symbol_engraver()
+Staff_symbol_engraver::Staff_symbol_engraver ()
 {
   span_p_ = 0;
 }
 
 void
-Staff_symbol_engraver::initialize()
+Staff_symbol_engraver::initialize ()
 {
   span_p_ = new Spanner (get_property ("StaffSymbol"));
   
-  span_p_->set_bound(LEFT, unsmob_grob (get_property ("currentCommandColumn")));
+  span_p_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn")));
 
   announce_grob (span_p_, 0);
 }
 
 void
-Staff_symbol_engraver::finalize()
+Staff_symbol_engraver::finalize ()
 {
-  span_p_->set_bound(RIGHT,unsmob_grob (get_property ("currentCommandColumn")));
+  span_p_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn")));
   typeset_grob (span_p_);
   span_p_ =0;
 }
@@ -69,5 +69,5 @@ Staff_symbol_engraver::acknowledge_grob (Grob_info s)
 }
 
 
-ADD_THIS_TRANSLATOR(Staff_symbol_engraver);
+ADD_THIS_TRANSLATOR (Staff_symbol_engraver);
 
index d569d52abce9f7215cd3eac45c313dc6e0f1a18d..13cf324351f2e5018b50c8c8af524e6340677dc5 100644 (file)
@@ -43,7 +43,7 @@ Grob*
 Staff_symbol_referencer::staff_symbol_l (Grob*me) 
 {
   SCM st = me->get_grob_property ("staff-symbol");
-  return unsmob_grob(st);
+  return unsmob_grob (st);
 }
 
 Real
@@ -86,9 +86,9 @@ Staff_symbol_referencer::position_f (Grob*me)
 /*
   should use offset callback!
  */
-MAKE_SCHEME_CALLBACK(Staff_symbol_referencer,callback,2);
+MAKE_SCHEME_CALLBACK (Staff_symbol_referencer,callback,2);
 SCM
-Staff_symbol_referencer::callback (SCM element_smob, SCM )
+Staff_symbol_referencer::callback (SCM element_smob, SCM)
 {
   Grob *me = unsmob_grob (element_smob);
 
@@ -125,7 +125,7 @@ void
 Staff_symbol_referencer::set_position (Grob*me,Real p)
 {
   Grob * st = staff_symbol_l (me);
-  if (st && me->common_refpoint(st, Y_AXIS))
+  if (st && me->common_refpoint (st, Y_AXIS))
     {
       Real oldpos = position_f (me);
       me->set_grob_property ("staff-position", gh_double2scm (p - oldpos));
@@ -149,15 +149,15 @@ Staff_symbol_referencer::set_position (Grob*me,Real p)
 Real
 Staff_symbol_referencer::staff_radius (Grob*me)
 {
-  return  (line_count (me) -1) / 2;
+  return (line_count (me) -1) / 2;
 }
 
 
 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::position_f ((Grob*)a) - 
+    Staff_symbol_referencer::position_f ((Grob*)b));
 }
 
 
index 4980a346365c4829433751b5a9323f8cd2667481..cbb5784ab188cd1333c2b244f76a7517e6e3043c 100644 (file)
@@ -17,7 +17,7 @@
 
 
 
-MAKE_SCHEME_CALLBACK(Staff_symbol,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Staff_symbol,brew_molecule,1);
 
 SCM
 Staff_symbol::brew_molecule (SCM smob)
@@ -52,7 +52,7 @@ Staff_symbol::brew_molecule (SCM smob)
 }
 
 int
-Staff_symbol::steps_i(Grob*me) 
+Staff_symbol::steps_i (Grob*me) 
 {
   return line_count (me) * 2;
 }
@@ -68,7 +68,7 @@ Staff_symbol::line_count (Grob*me)
 }
 
 Real
-Staff_symbol::staff_space (Grob*me )
+Staff_symbol::staff_space (Grob*me)
 {
   Real ss = 1.0;
   
index 2676c7f44e0fa93574951dce950d3ffc7a2fb874..a91e6bac79adf6acaa31adf8c5e1d4952d0c0997 100644 (file)
@@ -23,14 +23,14 @@ class Stanza_number_engraver : public Engraver
 
   void create_text (SCM s);
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Stanza_number_engraver ();
 
   virtual void acknowledge_grob (Grob_info);
   virtual void stop_translation_timestep ();
 };
 
-ADD_THIS_TRANSLATOR(Stanza_number_engraver);
+ADD_THIS_TRANSLATOR (Stanza_number_engraver);
 
 Stanza_number_engraver::Stanza_number_engraver ()
 {
@@ -39,7 +39,7 @@ Stanza_number_engraver::Stanza_number_engraver ()
 }
 
 void
-Stanza_number_engraver::acknowledge_grob(Grob_info i)
+Stanza_number_engraver::acknowledge_grob (Grob_info i)
 {
   SCM s = get_property ("stanza");
       
@@ -50,11 +50,11 @@ Stanza_number_engraver::acknowledge_grob(Grob_info i)
     {
 //       if (i.elem_l_->has_interface (symbol ("lyric-syllable-interface")))
         // Tried catching lyric items to generate stanza numbers, but it spoils lyric spacing.
-       if (Bar::has_interface (i.elem_l_) || now_mom() == Moment(0))
+       if (Bar::has_interface (i.elem_l_) || now_mom () == Moment (0))
        // Works, but requires bar_engraver in LyricsVoice context apart from at beginning.
        // Is there any score element we can catch that will do the trick?
 //       if (! i.elem_l_->has_interface (symbol ("lyric-syllable-interface")) ||
-//       now_mom() == Moment(0))
+//       now_mom () == Moment (0))
        // What happens if we try anything at all EXCEPT a lyric? Is there anything else?
         // Not sure what it's catching, but it still mucks up lyrics.
        create_text (s);
@@ -75,7 +75,7 @@ Stanza_number_engraver::stop_translation_timestep ()
 void
 Stanza_number_engraver::create_text (SCM txt)
 {
-  if(!text_)
+  if (!text_)
     {
       text_ = new Item (get_property ("StanzaNumber"));
       text_->set_grob_property ("text", txt);
index 374a3b1f1aac3a553898d9514b39a2366f8259e6..9375bd9a7f18ff554ed46a0d111c035fe33db985 100644 (file)
@@ -24,7 +24,7 @@ class Stem_engraver : public Engraver
 
 public:
   VIRTUAL_COPY_CONS (Translator);
-  Stem_engraver();
+  Stem_engraver ();
   
 protected:
   virtual void acknowledge_grob (Grob_info);
@@ -50,7 +50,7 @@ Stem_engraver::Stem_engraver ()
 
 
 void
-Stem_engraver::acknowledge_grob(Grob_info i)
+Stem_engraver::acknowledge_grob (Grob_info i)
 {
   Grob* h = i.elem_l_;
   if (Rhythmic_head::has_interface (h))
@@ -64,7 +64,7 @@ Stem_engraver::acknowledge_grob(Grob_info i)
        {
          stem_p_ = new Item (get_property ("Stem"));
          Stem::set_interface (stem_p_);
-         Staff_symbol_referencer::set_interface(stem_p_);
+         Staff_symbol_referencer::set_interface (stem_p_);
 
          
          stem_p_->set_grob_property ("duration-log", gh_int2scm (duration_log));
@@ -120,7 +120,7 @@ Stem_engraver::acknowledge_grob(Grob_info i)
 }
 
 void
-Stem_engraver::stop_translation_timestep()
+Stem_engraver::stop_translation_timestep ()
 {
   if (tremolo_p_)
     {
@@ -132,13 +132,13 @@ Stem_engraver::stop_translation_timestep()
   if (stem_p_)
     {
       SCM prop = get_property ("stemLeftBeamCount");
-      if (gh_number_p(prop))
+      if (gh_number_p (prop))
        {
          Stem::set_beaming (stem_p_,gh_scm2int (prop),LEFT);
          daddy_trans_l_->set_property ("stemLeftBeamCount", SCM_UNDEFINED);
        }
       prop = get_property ("stemRightBeamCount");
-      if (gh_number_p(prop))
+      if (gh_number_p (prop))
        {
          Stem::set_beaming (stem_p_,gh_scm2int (prop), RIGHT);
          daddy_trans_l_->set_property ("stemRightBeamCount", SCM_UNDEFINED);
@@ -151,12 +151,12 @@ Stem_engraver::stop_translation_timestep()
         to forced), if we have a Chord_tremolo.
        */
       SCM dir = stem_p_->get_grob_property ("direction");
-      if (gh_number_p (dir) && to_dir(dir))
+      if (gh_number_p (dir) && to_dir (dir))
        {
          stem_p_->set_grob_property ("dir-forced", SCM_BOOL_T);          
        }
 
-      typeset_grob(stem_p_);
+      typeset_grob (stem_p_);
       stem_p_ = 0;
     }
 
index e053bda1953a466bda32bd27b7fe4a843dbc2627..eaf6bd962fffb76e951685ec446c0753695449b2 100644 (file)
@@ -34,18 +34,18 @@ Stem_tremolo::has_interface (Grob *me)
   return me->has_interface (ly_symbol2scm ("stem-tremolo"));
 }
 
-MAKE_SCHEME_CALLBACK(Stem_tremolo,dim_callback,2);
+MAKE_SCHEME_CALLBACK (Stem_tremolo,dim_callback,2);
 
 /*
   todo: init with cons. 
  */
 SCM
-Stem_tremolo::dim_callback (SCM e, SCM )
+Stem_tremolo::dim_callback (SCM e, SCM)
 {
   Grob * se = unsmob_grob (e);
   
   Real space = Staff_symbol_referencer::staff_space (se);
-  return ly_interval2scm ( Interval (-space, space));
+  return ly_interval2scm (Interval (-space, space));
 }
 
 /*
@@ -57,14 +57,14 @@ Stem_tremolo::height (SCM smob, SCM ax)
 {
   Axis a = (Axis)gh_scm2int (ax);
   Grob * me = unsmob_grob (smob);
-  assert ( a == Y_AXIS);
+  assert (a == Y_AXIS);
 
   SCM mol = me->get_uncached_molecule ();
   return ly_interval2scm (unsmob_molecule (mol)->extent (a));
 }
 
 
-MAKE_SCHEME_CALLBACK(Stem_tremolo,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Stem_tremolo,brew_molecule,1);
 SCM
 Stem_tremolo::brew_molecule (SCM smob)
 {
@@ -122,9 +122,9 @@ Stem_tremolo::brew_molecule (SCM smob)
   if (beam)
     {
       // ugh, rather calc from Stem_tremolo_req
-      int beams_i = Stem::beam_count(stem, RIGHT) >? Stem::beam_count (stem, LEFT);
-      mol.translate (Offset(stem->relative_coordinate (0, X_AXIS) - me->relative_coordinate (0, X_AXIS),
-                           Stem::stem_end_position (stem ) * ss / 2 - 
+      int beams_i = Stem::beam_count (stem, RIGHT) >? Stem::beam_count (stem, LEFT);
+      mol.translate (Offset (stem->relative_coordinate (0, X_AXIS) - me->relative_coordinate (0, X_AXIS),
+                           Stem::stem_end_position (stem) * ss / 2 - 
                            Directional_element_interface::get (beam) * beams_i * interbeam_f));
     }
   else
@@ -132,17 +132,17 @@ Stem_tremolo::brew_molecule (SCM smob)
       /*
        Beams should intersect one beamthickness below stem end
       */
-      Real dy = Stem::stem_end_position (stem ) * ss / 2;
-      dy -= mol.extent (Y_AXIS).length () / 2 *  Stem::get_direction (stem );
+      Real dy = Stem::stem_end_position (stem) * ss / 2;
+      dy -= mol.extent (Y_AXIS).length () / 2 *  Stem::get_direction (stem);
 
       /*
        uhg.  Should use relative coords and placement
       */
       Real whole_note_correction;
-      if (Stem::invisible_b (stem ))
+      if (Stem::invisible_b (stem))
        {
-         Grob *hed = Stem::support_head (stem );
-         whole_note_correction = -Stem::get_direction (stem )
+         Grob *hed = Stem::support_head (stem);
+         whole_note_correction = -Stem::get_direction (stem)
            *hed->extent (hed, X_AXIS).length () / 2;
        }
       else
index f144ba137e4d47fc2522cfba3511afe8136361dc..f17dcae0b29a749b0d906d3f5f191f14bbb17019 100644 (file)
@@ -29,7 +29,7 @@
 
 
 void
-Stem::set_beaming (Grob*me ,int i,  Direction d )
+Stem::set_beaming (Grob*me ,int i,  Direction d)
 {
   SCM pair = me->get_grob_property ("beaming");
   
@@ -63,14 +63,14 @@ Stem::head_positions (Grob*me)
   Drul_array<Grob*> e (extremal_heads (me));
 
   return Interval (Staff_symbol_referencer::position_f (e[DOWN]),
-                  Staff_symbol_referencer::position_f ( e[UP]));
+                  Staff_symbol_referencer::position_f (e[UP]));
 }
 
 
 Real
 Stem::chord_start_f (Grob*me) 
 {
-  return head_positions(me)[get_direction (me)]
+  return head_positions (me)[get_direction (me)]
     * Staff_symbol_referencer::staff_space (me)/2.0;
 }
 
@@ -112,7 +112,7 @@ Stem::set_stemend (Grob*me, Real se)
   // todo: margins
   Direction d= get_direction (me);
   
-  if (d && d * head_positions(me)[get_direction (me)] >= se*d)
+  if (d && d * head_positions (me)[get_direction (me)] >= se*d)
     warning (_ ("Weird stem size; check for narrow beams"));
 
   me->set_grob_property ("stem-end-position", gh_double2scm (se));
@@ -181,7 +181,7 @@ Stem::extremal_heads (Grob*me)
       Grob * n = unsmob_grob (gh_car (s));
 
       
-      int p = int(Staff_symbol_referencer::position_f (n));
+      int p = int (Staff_symbol_referencer::position_f (n));
 
       Direction d = LEFT;
       do {
@@ -215,14 +215,14 @@ Stem::add_head (Grob*me, Grob *n)
 bool
 Stem::invisible_b (Grob*me)
 {
-  return !(heads_i (me) && Rhythmic_head::balltype_i (support_head (me)) >= 1);
+  return ! (heads_i (me) && Rhythmic_head::balltype_i (support_head (me)) >= 1);
 }
 
 int
 Stem::get_center_distance (Grob*me, Direction d)
 {
   int staff_center = 0;
-  int distance = (int) (d*(head_positions(me)[d] - staff_center));
+  int distance = (int) (d* (head_positions (me)[d] - staff_center));
   return distance >? 0;
 }
 
@@ -246,19 +246,19 @@ Stem::get_default_stem_end_position (Grob*me)
   Array<Real> a;
 
   Real length_f = 0.;
-  SCM scm_len = me->get_grob_property("length");
+  SCM scm_len = me->get_grob_property ("length");
   if (gh_number_p (scm_len))
     {
       length_f = gh_scm2double (scm_len);
     }
   else
     {
-      s = me->get_grob_property("lengths");
+      s = me->get_grob_property ("lengths");
       for (SCM q = s; q != SCM_EOL; q = gh_cdr (q))
        a.push (gh_scm2double (gh_car (q)));
                
       // stem uses half-spaces
-      length_f = a[((flag_i (me) - 2) >? 0) <? (a.size () - 1)] * 2;
+      length_f = a[ ((flag_i (me) - 2) >? 0) <? (a.size () - 1)] * 2;
     }
 
 
@@ -271,7 +271,7 @@ Stem::get_default_stem_end_position (Grob*me)
   // stem uses half-spaces
 
   // fixme: use gh_list_ref () iso. array[]
-  Real shorten_f = a[((flag_i (me) - 2) >? 0) <? (a.size () - 1)] * 2;
+  Real shorten_f = a[ ((flag_i (me) - 2) >? 0) <? (a.size () - 1)] * 2;
 
   /* URGURGURG
      'set-default-stemlen' sets direction too
@@ -287,12 +287,12 @@ Stem::get_default_stem_end_position (Grob*me)
     stems in unnatural (forced) direction should be shortened, 
     according to [Roush & Gourlay]
    */
-  if (((int)chord_start_f (me))
+  if (( (int)chord_start_f (me))
       && (get_direction (me) != get_default_dir (me)))
     length_f -= shorten_f;
 
 
-   Real st = head_positions(me)[dir] + dir * length_f;
+   Real st = head_positions (me)[dir] + dir * length_f;
   
    bool no_extend_b = to_boolean (me->get_grob_property ("no-stem-extend"));
    if (!grace_b && !no_extend_b && dir * st < 0) // junkme?
@@ -308,7 +308,7 @@ int
 Stem::flag_i (Grob*me) 
 {
   SCM s = me->get_grob_property ("duration-log");
-  return  (gh_number_p (s)) ? gh_scm2int (s) : 2;
+  return (gh_number_p (s)) ? gh_scm2int (s) : 2;
 }
 
 void
@@ -357,7 +357,7 @@ Stem::position_noteheads (Grob*me)
     }
 }
 
-MAKE_SCHEME_CALLBACK(Stem,before_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Stem,before_line_breaking,1);
 SCM
 Stem::before_line_breaking (SCM smob)
 {
@@ -368,7 +368,7 @@ Stem::before_line_breaking (SCM smob)
   if (invisible_b (me))
     {
       me->remove_grob_property ("molecule-callback");
-      // suicide();
+      // suicide ();
     }
   
   set_spacing_hints (me);
@@ -387,7 +387,7 @@ Stem::height (SCM smob, SCM ax)
 {
   Axis a = (Axis)gh_scm2int (ax);
   Grob * me = unsmob_grob (smob);
-  assert ( a == Y_AXIS);
+  assert (a == Y_AXIS);
 
   SCM mol = me->get_uncached_molecule ();
   Interval iv;
@@ -427,7 +427,7 @@ Stem::flag (Grob*me)
 {
   String style;
   SCM st = me->get_grob_property ("flag-style");
-  if ( gh_string_p (st))
+  if (gh_string_p (st))
     {
       style = ly_scm2string (st);
     }
@@ -436,11 +436,11 @@ Stem::flag (Grob*me)
   Molecule m = Font_interface::get_default_font (me)->find_by_name (String ("flags-") + to_str (c) + 
                                      to_str (flag_i (me)));
   if (!style.empty_b ())
-    m.add_molecule(Font_interface::get_default_font (me)->find_by_name (String ("flags-") + to_str (c) + style));
+    m.add_molecule (Font_interface::get_default_font (me)->find_by_name (String ("flags-") + to_str (c) + style));
   return m;
 }
 
-MAKE_SCHEME_CALLBACK(Stem,dim_callback,2);
+MAKE_SCHEME_CALLBACK (Stem,dim_callback,2);
 SCM
 Stem::dim_callback (SCM e, SCM ax)
 {
@@ -454,12 +454,12 @@ Stem::dim_callback (SCM e, SCM ax)
     {
       r = flag (se).extent (X_AXIS);
     }
-  return ly_interval2scm ( r);
+  return ly_interval2scm (r);
 }
 
 
 
-MAKE_SCHEME_CALLBACK(Stem,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Stem,brew_molecule,1);
 
 SCM
 Stem::brew_molecule (SCM smob) 
@@ -472,7 +472,7 @@ Stem::brew_molecule (SCM smob)
   Real y1 = Staff_symbol_referencer::position_f (first_head (me));
   Real y2 = stem_end_position (me);
   
-  Interval stem_y(y1,y2);
+  Interval stem_y (y1,y2);
   stem_y.unite (Interval (y2,y1));
 
   Real dy = Staff_symbol_referencer::staff_space (me)/2.0;
@@ -485,7 +485,7 @@ Stem::brew_molecule (SCM smob)
 
       angle = gh_scm2double (hed->get_grob_property ("attachment-angle"));
     }
-  stem_y[Direction(-d)] += d * head_wid * tan(angle)/(2*dy);
+  stem_y[Direction (-d)] += d * head_wid * tan (angle)/ (2*dy);
   
   if (!invisible_b (me))
     {
@@ -498,7 +498,7 @@ Stem::brew_molecule (SCM smob)
   if (!beam_l (me) && abs (flag_i (me)) > 2)
     {
       Molecule fl = flag (me);
-      fl.translate_axis(stem_y[d]*dy, Y_AXIS);
+      fl.translate_axis (stem_y[d]*dy, Y_AXIS);
       mol.add_molecule (fl);
     }
 
@@ -508,19 +508,19 @@ Stem::brew_molecule (SCM smob)
 /*
   move the stem to right of the notehead if it is up.
  */
-MAKE_SCHEME_CALLBACK(Stem,off_callback,2);
+MAKE_SCHEME_CALLBACK (Stem,off_callback,2);
 SCM
-Stem::off_callback (SCM element_smob, SCM )
+Stem::off_callback (SCM element_smob, SCM)
 {
   Grob *me = unsmob_grob (element_smob);
   
   Real r=0;
   if (Grob * f = first_head (me))
     {
-      Interval head_wid(0, f->extent (f,X_AXIS).length ());
+      Interval head_wid (0, f->extent (f,X_AXIS).length ());
 
       if (to_boolean (me->get_grob_property ("stem-centered")))
-       return gh_double2scm ( head_wid.center ());
+       return gh_double2scm (head_wid.center ());
       
       Real rule_thick = gh_scm2double (me->get_grob_property ("thickness")) * me->paper_l ()->get_var ("stafflinethickness");
       Direction d = get_direction (me);
@@ -575,7 +575,7 @@ Stem::calc_stem_info (Grob*me)
   Array<Real> a;
   SCM s;
   
-  s = me->get_grob_property("beamed-minimum-lengths");
+  s = me->get_grob_property ("beamed-minimum-lengths");
   a.clear ();
   for (SCM q = s; q != SCM_EOL; q = gh_cdr (q))
     a.push (gh_scm2double (gh_car (q)));
@@ -584,7 +584,7 @@ Stem::calc_stem_info (Grob*me)
   Real minimum_length = a[multiplicity <? (a.size () - 1)] * staff_space;
   s = me->get_grob_property ("beamed-lengths");
 
-  a.clear();
+  a.clear ();
   for (SCM q = s; q != SCM_EOL; q = gh_cdr (q))
     a.push (gh_scm2double (gh_car (q)));
 
@@ -646,7 +646,7 @@ Stem::calc_stem_info (Grob*me)
 
  Grob *common = me->common_refpoint (beam, Y_AXIS);
   Real interstaff_f = beam_dir *
   (me->relative_coordinate (common, Y_AXIS)
+ (me->relative_coordinate (common, Y_AXIS)
      - beam->relative_coordinate (common, Y_AXIS));
 
   info.idealy_f_ += interstaff_f;
index 851fddb88a54ec4bf8e0dad73c3447bf698060fe..0d8c21fe41b75d0808e8116ec1979200ddd4396c 100644 (file)
 struct Sustain_pedal
 {
 public:
-  DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM));
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
 };
 
 
-MAKE_SCHEME_CALLBACK(Sustain_pedal,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Sustain_pedal,brew_molecule,1);
 SCM
 Sustain_pedal::brew_molecule (SCM smob) 
 {
index 30cdba8bd57c35de5d45ab5e73aa91bd840e35b5..7ff03f174f0999ced8f4bb31c4ca085902d42ac3 100644 (file)
@@ -10,4 +10,4 @@
 
 
 
-ADD_THIS_TRANSLATOR(Swallow_performer);
+ADD_THIS_TRANSLATOR (Swallow_performer);
index 6965162778e003342d3581ccc0f35d77f7aa34ff..afe3ad10788c0b56567053b0b4766c680510a65a 100644 (file)
     member of the Lyric_phrasing_engraver class.
 */
 
-Syllable_group::Syllable_group()
+Syllable_group::Syllable_group ()
 {
   first_in_phrase_b_=true;
   melisma_b_ = false;
-  clear();
+  clear ();
 }
 
 void 
-Syllable_group::clear()
+Syllable_group::clear ()
 {
   notehead_l_=0;
-  lyric_list_.clear();
+  lyric_list_.clear ();
   longest_lyric_l_=0;
   shortest_lyric_l_=0;
   melisma_b_ = false;
@@ -34,7 +34,7 @@ Syllable_group::clear()
 }
   
 void
-Syllable_group::copySyllable_group *from)
+Syllable_group::copy (Syllable_group *from)
 {
   notehead_l_ = from->notehead_l_;
   lyric_list_ = from->lyric_list_;
@@ -47,29 +47,29 @@ Syllable_group::copy( Syllable_group *from)
 }
 
 void 
-Syllable_group::set_first_in_phrase(bool f) 
+Syllable_group::set_first_in_phrase (bool f) 
 { 
   first_in_phrase_b_ = f; 
 }
 
 void 
-Syllable_group::set_notehead(Grob * notehead)
+Syllable_group::set_notehead (Grob * notehead)
 {
-  if(!notehead_l_) {
+  if (!notehead_l_) {
     /* there should only be a single notehead, so silently ignore any extras */
     notehead_l_=notehead;
   }
 }
 
 void 
-Syllable_group::add_lyric(Grob * lyric)
+Syllable_group::add_lyric (Grob * lyric)
 {
-  lyric_list_.push(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())
+  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())
+    if (lyric->extent (lyric, X_AXIS).length () < (shortest_lyric_l_->extent (shortest_lyric_l_, X_AXIS)).length ())
       shortest_lyric_l_ = lyric;
   }
   else
@@ -77,52 +77,52 @@ Syllable_group::add_lyric(Grob * lyric)
 }
 
 void 
-Syllable_group::add_extender(Grob * extender)
+Syllable_group::add_extender (Grob * extender)
 {
-  if(notehead_l_ && melisma_b_) {
-    dynamic_cast<Spanner*>(extender)->set_bound (RIGHT, notehead_l_);
+  if (notehead_l_ && melisma_b_) {
+    dynamic_cast<Spanner*> (extender)->set_bound (RIGHT, notehead_l_);
     // 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.
 
     // Left:
-//     extender->set_grob_property("right-trim-amount", gh_double2scm(0.0));
+//     extender->set_grob_property ("right-trim-amount", gh_double2scm (0.0));
 
     // Right:
     Real ss = 1.0;
-    extender->set_grob_property("right-trim-amount", 
-                              gh_double2scm(-notehead_l_->extent(notehead_l_, X_AXIS).length()/ss));
+    extender->set_grob_property ("right-trim-amount", 
+                              gh_double2scm (-notehead_l_->extent (notehead_l_, 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_l)
 {
-  if(lyric_list_.size()==0) {
+  if (lyric_list_.size ()==0) {
     // No lyrics: nothing to do.
     return true;
   }
 
   Grob * lyric;
-  alignment_i_ = appropriate_alignment(punc);
+  alignment_i_ = 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_) {
+  if (!notehead_l_) {
     notehead_l_ = default_notehead_l;
   }
 
-  group_translation_f_ = amount_to_translate();
+  group_translation_f_ = amount_to_translate ();
 
   // set the x alignment of each lyric
-  for(int l = 0; l < lyric_list_.size(); l++) {
+  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_i_));
     // centre on notehead ... if we have one. 
-    if(notehead_l_) {
-      lyric->set_parent(notehead_l_, X_AXIS);
+    if (notehead_l_) {
+      lyric->set_parent (notehead_l_, X_AXIS);
       lyric->add_offset_callback (Side_position_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_f_- (notehead_l_->extent (notehead_l_, X_AXIS)).center (), X_AXIS);
     }
   }
   return (notehead_l_);
@@ -137,13 +137,13 @@ Syllable_group::set_lyric_align(const char *punc, Grob *default_notehead_l)
                 - move so shortest lyric just reaches notehead centre
 */
 Real 
-Syllable_group::amount_to_translate()
+Syllable_group::amount_to_translate ()
 {
   Real translate = 0.0;
-  if(alignment_i_ != CENTER) {
+  if (alignment_i_ != CENTER) {
     // FIXME: do we really know the lyric extent here? Some font sizing comes later?
-    Real l1 = longest_lyric_l_->extent(longest_lyric_l_, X_AXIS).length() / 2;
-    Real l2 = shortest_lyric_l_->extent(shortest_lyric_l_, X_AXIS).length();
+    Real l1 = longest_lyric_l_->extent (longest_lyric_l_, X_AXIS).length () / 2;
+    Real l2 = shortest_lyric_l_->extent (shortest_lyric_l_, X_AXIS).length ();
 
     translate = l1 <? l2;
     translate *= alignment_i_ ;
@@ -158,23 +158,23 @@ Syllable_group::amount_to_translate()
           otherwise alignment is centre.
 */
 int 
-Syllable_group::appropriate_alignment(const char *punc)
+Syllable_group::appropriate_alignment (const char *punc)
 {
-  if(first_in_phrase_b_)
+  if (first_in_phrase_b_)
     return LEFT;
 
   Grob * lyric;
   bool end_phrase = true;
 
-  for(int l = 0; l < lyric_list_.size() && end_phrase; l++) {
+  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):"";
+    SCM lyric_scm = lyric->get_grob_property ("text");
+    String lyric_str = 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_str.length_i ()>0) {
+      lastchar = lyric_str[lyric_str.length_i ()-1];
       /* If it doesn't end in punctuation then it ain't an end of phrase */
-      if(! strchr(punc, lastchar)) {
+      if (! strchr (punc, lastchar)) {
        /* Special case: trailing space. Here examine the previous character and reverse the
           sense of the test (i.e. trailing space makes a break without punctuation, or 
           suppresses a break with punctuation).
@@ -184,10 +184,10 @@ 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(strchr(punc, lastchar))
+       if (lastchar == ' ') {
+         if (lyric_str.length_i ()>1) {
+           lastchar = lyric_str[lyric_str.length_i ()-2];
+           if (strchr (punc, lastchar))
              end_phrase=false;
          }
        }
@@ -196,7 +196,7 @@ Syllable_group::appropriate_alignment(const char *punc)
       }
     }
   }
-  if(end_phrase)
+  if (end_phrase)
     return RIGHT;
 
   return CENTER;
@@ -206,23 +206,23 @@ Syllable_group::appropriate_alignment(const char *punc)
     back and fix the alignment when we DO know.
 */
 void
-Syllable_group::adjust_melisma_align()
+Syllable_group::adjust_melisma_align ()
 {
-  if(notehead_l_ && lyric_list_.size()) {
+  if (notehead_l_ && lyric_list_.size ()) {
     // override any previous offset adjustments
     Real translation = -group_translation_f_;
     // melisma aligning:
     switch (alignment_i_) {
       //  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_l_->extent (shortest_lyric_l_, 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_l_->extent (shortest_lyric_l_, X_AXIS)).length ();
       break;
     }
     group_translation_f_ += translation;
-    for(int l = 0; l < lyric_list_.size(); l++) {
+    for (int l = 0; l < lyric_list_.size (); l++) {
       lyric_list_[l]->translate_axis (translation, X_AXIS);
     }
   }
@@ -230,16 +230,16 @@ Syllable_group::adjust_melisma_align()
 
 
 bool
-Syllable_group::is_empty()
+Syllable_group::is_empty ()
 {
-  return lyric_list_.size()==0;
+  return lyric_list_.size ()==0;
 }
 
 void
-Syllable_group::next_lyric()
+Syllable_group::next_lyric ()
 {
   first_in_phrase_b_ = (alignment_i_ == RIGHT);
-  clear();
+  clear ();
 }
 
 /* SMOB */
@@ -250,15 +250,15 @@ Syllable_group::mark_smob (SCM)
 }
 
 int
-Syllable_group::print_smob (SCM, SCM port, scm_print_state * )
+Syllable_group::print_smob (SCM, SCM port, scm_print_state *)
 {
   scm_puts ("#<Syllable_group>", port);
   return 1;
 }
 
-IMPLEMENT_UNSMOB(Syllable_group, voice_entry);
-IMPLEMENT_SIMPLE_SMOBS(Syllable_group);
-IMPLEMENT_DEFAULT_EQUAL_P(Syllable_group);
+IMPLEMENT_UNSMOB (Syllable_group, voice_entry);
+IMPLEMENT_SIMPLE_SMOBS (Syllable_group);
+IMPLEMENT_DEFAULT_EQUAL_P (Syllable_group);
 
 SCM
 Syllable_group::make_entry ()
index 2cd999d3561ce38439f17d5ad2cac0c39f8ae76f..d247ccd3d577e45d7b401cdc39681b7b98eaebc8 100644 (file)
@@ -1,6 +1,6 @@
 /*   
   symbol-cache.cc --  implement a cache for literal symbols, eg
-    symbol("foo-bar")
+    symbol ("foo-bar")
     
   
   source file of the GNU LilyPond music typesetter
@@ -22,7 +22,7 @@ SCM
 symbol (const char*s)
 {
   Literal_symbol_map::const_iterator i = literal_map.find (s);
-  if (i != literal_map.end())
+  if (i != literal_map.end ())
     return (*i).second;
 
   SCM sym = gh_symbol2scm ((char*)s);
@@ -36,7 +36,7 @@ symbol (const char*s)
   This is a gory trick to cache the value gh_symbol2scm (), without
   cluttering up the C code with snarf macros.
   
-  You should *ONLY* use symbol() for arguments that are literal
+  You should *ONLY* use symbol () for arguments that are literal
   strings!
   
   without (wtk1-fugue2)
index 8f172865a3723136e79760bd0f7bbea4baba3847..1f4504a7338c9fa0e9bfc48c2051f94cfb2dba8c 100644 (file)
@@ -19,8 +19,8 @@
 class System_start_delimiter_engraver : public Engraver
 {
 public:
-  VIRTUAL_COPY_CONS(Translator);
-  System_start_delimiter_engraver();
+  VIRTUAL_COPY_CONS (Translator);
+  System_start_delimiter_engraver ();
 
 protected:
   Spanner * delim_;
@@ -29,7 +29,7 @@ protected:
   virtual void finalize ();
 };
 
-ADD_THIS_TRANSLATOR(System_start_delimiter_engraver);
+ADD_THIS_TRANSLATOR (System_start_delimiter_engraver);
 
 void
 System_start_delimiter_engraver::acknowledge_grob (Grob_info inf)
@@ -37,7 +37,7 @@ System_start_delimiter_engraver::acknowledge_grob (Grob_info inf)
   if (Staff_symbol::has_interface (inf.elem_l_))
     {
       /*
-       don't add as Axis_group_interface::add_element (delim_, ),
+       don't add as Axis_group_interface::add_element (delim_,),
        because that would set the parent as well */
          
       Pointer_group_interface::add_element (delim_, "elements", inf.elem_l_);
@@ -52,18 +52,18 @@ System_start_delimiter_engraver::acknowledge_grob (Grob_info inf)
        */
       if (gh_symbol_p (gl) && gl  == ly_symbol2scm ("brace")
          && gh_symbol_p (my_gl) && my_gl == ly_symbol2scm ("bracket"))
-       inf.elem_l_->translate_axis ( -1.0, X_AXIS); // ugh
+       inf.elem_l_->translate_axis (-1.0, X_AXIS); // ugh
     }
 
 }
 
-System_start_delimiter_engraver::System_start_delimiter_engraver()
+System_start_delimiter_engraver::System_start_delimiter_engraver ()
 {
   delim_ = 0;
 }
 
 void
-System_start_delimiter_engraver::initialize()
+System_start_delimiter_engraver::initialize ()
 {
   delim_ = new Spanner (get_property ("SystemStartDelimiter"));
 
index 85d4947d59c4b74e9737b664ff7789a19386740c..39bd68040ece1a7a93e956dfcb71acdb1cdd8000 100644 (file)
@@ -21,7 +21,7 @@
 Molecule
 System_start_delimiter::staff_bracket (Grob*me,Real height)  
 {
-  Real arc_height = gh_scm2double (me->get_grob_property("arch-height")) ;
+  Real arc_height = gh_scm2double (me->get_grob_property ("arch-height")) ;
   
   SCM at = gh_list (ly_symbol2scm ("bracket"),
                    me->get_grob_property ("arch-angle"),
@@ -56,10 +56,10 @@ System_start_delimiter::simple_bar (Grob*me,Real h)
 {
   Real w = me->paper_l ()->get_var ("stafflinethickness") *
     gh_scm2double (me->get_grob_property ("thickness"));
-  return Lookup::filledbox (Box (Interval(0,w), Interval(-h/2, h/2)));
+  return Lookup::filledbox (Box (Interval (0,w), Interval (-h/2, h/2)));
 }
 
-MAKE_SCHEME_CALLBACK(System_start_delimiter,after_line_breaking,1);
+MAKE_SCHEME_CALLBACK (System_start_delimiter,after_line_breaking,1);
 
 SCM
 System_start_delimiter::after_line_breaking (SCM smob)
@@ -81,7 +81,7 @@ System_start_delimiter::try_collapse (Grob*me)
 }
 
 
-MAKE_SCHEME_CALLBACK(System_start_delimiter,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (System_start_delimiter,brew_molecule,1);
 
 SCM
 System_start_delimiter::brew_molecule (SCM smob)
@@ -97,13 +97,13 @@ System_start_delimiter::brew_molecule (SCM smob)
   
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   Interval ext = ly_scm2interval (Axis_group_interface::group_extent_callback
                                (me->self_scm(), gh_int2scm (Y_AXIS)));
(me->self_scm (), gh_int2scm (Y_AXIS)));
   Real l = ext.length () / staff_space;
   
   if (ext.empty_b ()
       || (gh_number_p (c) && l <= gh_scm2double (c)))
     {
-      me->suicide();
+      me->suicide ();
       return SCM_EOL;
     }
 
@@ -133,7 +133,7 @@ System_start_delimiter::staff_brace (Grob*me,Real y)
     int cmp = (lo + hi) / 2;
 
     b = fm->get_char (cmp);
-    if (b[Y_AXIS].empty_b () || b[Y_AXIS].length () > y )
+    if (b[Y_AXIS].empty_b () || b[Y_AXIS].length () > y)
       hi = cmp;
     else
       lo = cmp;
@@ -146,6 +146,6 @@ System_start_delimiter::staff_brace (Grob*me,Real y)
   b = fm->get_char (lo);
   b[X_AXIS] = Interval (0,0);
 
-  return Molecule(b, at);
+  return Molecule (b, at);
 }
   
index 105aa446686f8af7b3c71d2d311501998fd549dc..15ed4d4c66c14fa38ad40712a6226562017cab30 100644 (file)
@@ -14,7 +14,7 @@
 #include "compare.hh"
 
 Rational
-Interval_t<Rational>::infinity()
+Interval_t<Rational>::infinity ()
 {
   Rational infty;
   infty.set_infinite (1);
@@ -29,4 +29,4 @@ Interval_t<Rational>::T_to_str (Rational a)
 
 
 
-template INTERVAL__INSTANTIATE(Rational);
+template INTERVAL__INSTANTIATE (Rational);
index 5691cdf5e2a8401d77388810381242235aa328c0..53ca7c056ce7ee8dfbc65f1dad821664882f1b84 100644 (file)
 class Tempo_performer : public Performer
 {
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   
-  Tempo_performer();
-  ~Tempo_performer();
+  Tempo_performer ();
+  ~Tempo_performer ();
 
 protected:
 
@@ -53,7 +53,7 @@ Tempo_performer::create_audio_elements ()
       
       audio_p_ = new Audio_tempo (d->length_mom () /
                                  Moment (1, 4) 
-                                 * Moment(gh_scm2int (met)));
+                                 * Moment (gh_scm2int (met)));
 
       Audio_element_info info (audio_p_, tempo_req_l_);
       announce_element (info);
index e4d2bbc8827a91cc8e6aa4c358c5f9ac3589e3c5..ed9473e000d3213ad08b762506a7b75b2572f7b9 100644 (file)
@@ -24,7 +24,7 @@ class Text_engraver : public Engraver
   Link_array<Text_script_req> reqs_;
   Link_array<Item> texts_;
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
 protected:
   virtual bool try_music (Music* m);
   virtual void stop_translation_timestep ();
@@ -58,10 +58,10 @@ Text_engraver::acknowledge_grob (Grob_info inf)
          /*
            ugh.
           */
-         if (Side_position_interface::get_axist) == X_AXIS
+         if (Side_position_interface::get_axis (t) == X_AXIS
              && !t->parent_l (Y_AXIS))
            t->set_parent (inf.elem_l_, Y_AXIS);
-         else if (Side_position_interface::get_axis(t) == Y_AXIS
+         else if (Side_position_interface::get_axis (t) == Y_AXIS
              && !t->parent_l (X_AXIS))
            t->set_parent (inf.elem_l_, X_AXIS);
        }
@@ -71,7 +71,7 @@ Text_engraver::acknowledge_grob (Grob_info inf)
     {
       for (int i=0; i < texts_.size (); i++)
        {
-         Side_position_interface::add_support(texts_[i],inf.elem_l_);
+         Side_position_interface::add_support (texts_[i],inf.elem_l_);
        }
     }
 }
@@ -157,5 +157,5 @@ Text_engraver::start_translation_timestep ()
   reqs_.clear ();
 }
 
-ADD_THIS_TRANSLATOR(Text_engraver);
+ADD_THIS_TRANSLATOR (Text_engraver);
 
index 25a0a0d3fb58c885e4b67aadb6273c39c75e5bb1..9c40d40e9e9b83b03334ddd9d30cbdbc60bc2b36 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
   
- (c) 1998--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 (c) 1998--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   Jan Nieuwenhuizen <janneke@gnu.org>
  */
 #include <math.h>
@@ -53,8 +53,8 @@ Text_item::string2molecule (Grob *me, SCM text, SCM alist_chain)
 {
   SCM style = ly_assoc_chain (ly_symbol2scm ("font-style"),
                              alist_chain);
-  if  (gh_pair_p (style) && gh_symbol_p (gh_cdr (style)))
-    alist_chain = Font_interface::add_style (me, gh_cdr(style), alist_chain);
+  if (gh_pair_p (style) && gh_symbol_p (gh_cdr (style)))
+    alist_chain = Font_interface::add_style (me, gh_cdr (style), alist_chain);
 
   Font_metric *fm = Font_interface::get_font (me, alist_chain);
   
@@ -122,7 +122,7 @@ Text_item::markup_text2molecule (Grob *me, SCM markup_text,
   SCM text = gh_cdr (markup_text);
 
 #if 1
-  SCM p = gh_cons  (gh_call2 (f, sheet, markup), alist_chain);
+  SCM p = gh_cons (gh_call2 (f, sheet, markup), alist_chain);
 #else
   SCM pp = gh_call2 (f, sheet, markup);
   gh_newline ();
@@ -163,7 +163,7 @@ Text_item::markup_text2molecule (Grob *me, SCM markup_text,
       Molecule m = text2molecule (me, gh_car (text), p);
       SCM m_p = SCM_EOL;
       if (gh_pair_p (gh_car (text)))
-       m_p = gh_cons  (gh_call2 (f, sheet, gh_caar (text)), alist_chain);
+       m_p = gh_cons (gh_call2 (f, sheet, gh_caar (text)), alist_chain);
       SCM m_k = ly_assoc_chain (ly_symbol2scm ("kern"), m_p);
       Real m_kern = kern[align];
       if (gh_pair_p (m_k) && gh_number_p (gh_cdr (m_k)))
index bba9f9be4e1895c9a304ca15c04b82a7dfce01e3..f0321e353273aef022c78c96eefd36814b2a086f 100644 (file)
@@ -76,7 +76,7 @@ Text_spanner_engraver::try_music (Music *m)
        }
       else if (t == "text")
        {
-         req_drul_[s->get_span_dir()] = s;
+         req_drul_[s->get_span_dir ()] = s;
          return true;
        }
     }
@@ -91,7 +91,7 @@ Text_spanner_engraver::create_grobs ()
       if (!span_)
        {
          req_drul_[STOP]->origin ()->warning
          (_ ("can't find start of text spanner"));
+ (_ ("can't find start of text spanner"));
        }
       else
        {
@@ -111,7 +111,7 @@ Text_spanner_engraver::create_grobs ()
       if (current_req_)
        {
          req_drul_[START]->origin ()->warning
          (_ ("already have a text spanner"));
+ (_ ("already have a text spanner"));
        }
       else
        {
index 37d3ecf7c3fc04e29c6b98b15a6dc5aeeef9d0ab..42a51b84463fc8b2ced54daac4e74a4cf0c2db7e 100644 (file)
@@ -15,7 +15,8 @@
 #include "warn.hh"
 
 #define format_str String_convert::form_str
-#define FIX_UNITY (1 << 20)
+#define FIX_UNITY \
+ (1 << 20)
 static const Real fix_to_real (Fix f);
 
 
@@ -70,7 +71,7 @@ void
 Tex_font_metric_reader::read_header ()
 {
   U16 file_length = input_.get_U16 ();
 (void) file_length;
+ (void) file_length;
   U16 header_length = input_.get_U16 ();
 
   info_.first_charcode = input_.get_U16 ();
@@ -81,9 +82,9 @@ Tex_font_metric_reader::read_header ()
   U16 italic_correction_word_count = input_.get_U16 ();
   U16 lig_kern_word_count = input_.get_U16 ();
   U16 kern_word_count = input_.get_U16 ();
 (void)kern_word_count;
+ (void)kern_word_count;
   U16 extensible_word_count = input_.get_U16 ();
 (void)extensible_word_count;
+ (void)extensible_word_count;
   
   header_.param_word_count = input_.get_U16 ();
   info_.parameter_count = header_.param_word_count;
@@ -102,7 +103,7 @@ Tex_font_metric_reader::read_header ()
   /* We don't care about the extensible table.  */
 
   if (header_length < 2)
-    error (_f ("TFM header of `%s' has only %u word(s)",
+    error (_f ("TFM header of `%s' has only %u word (s)",
               input_.name_str ().ch_C (), header_length));
 
   info_.checksum = input_.get_U32 ();
@@ -145,7 +146,7 @@ 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_f ();
 
   for (Char_code i = 2; i <= header_.param_word_count; i++)
     info_.parameters[i - 1] = get_U32_fix_scaled_f ();
@@ -227,10 +228,10 @@ Tex_font_metric_reader::read_char ()
                       * info_.design_size; \
      }
 
-  GET_CHAR_DIMEN(width);
-  GET_CHAR_DIMEN(height);
-  GET_CHAR_DIMEN(depth);
-  GET_CHAR_DIMEN(italic_correction);
+  GET_CHAR_DIMEN (width);
+  GET_CHAR_DIMEN (height);
+  GET_CHAR_DIMEN (depth);
+  GET_CHAR_DIMEN (italic_correction);
 
   /* The other condition for a character existing is that it be between
      the first and last character codes given in the header.  We've
index 0999e4914626574df365194f30037f6e3b65ef06..3bf4f9463247c6e710c83ed28e527d6debd9cfd2 100644 (file)
@@ -26,7 +26,7 @@ Tex_font_char_metric::dimensions () const
     }
   
   Real d = -depth_;
-  return Box (Interval (0, width_),Interval ( d <? height_, d >? height_));
+  return Box (Interval (0, width_),Interval (d <? height_, d >? height_));
 }
 
 Tex_font_char_metric::Tex_font_char_metric ()
@@ -70,7 +70,7 @@ static Tex_font_char_metric dummy_static_char_metric;
 Tex_font_char_metric const *
 Tex_font_metric::find_ascii (int ascii, bool warn) const
 {
-  if (ascii < ascii_to_metric_idx_.size() && ascii_to_metric_idx_[ascii] >= 0)
+  if (ascii < ascii_to_metric_idx_.size () && ascii_to_metric_idx_[ascii] >= 0)
     return & char_metrics_[ascii_to_metric_idx_ [ascii]];
   else if (warn)
     {
index bbd6b8d102069b8fc8122548ebf930646cae71e7..4f9536427b72ecb93c2c8f49dfa6b5121a9f2dc9 100644 (file)
@@ -53,7 +53,7 @@ int
 tie_compare (Grob* const & s1,
             Grob* const & s2)
 {
-  return sign (Tie::position_f (s1) - Tie::position_f(s2));
+  return sign (Tie::position_f (s1) - Tie::position_f (s2));
 }
 
 /*
@@ -71,12 +71,12 @@ Tie_column::set_directions (Grob*me)
   Link_array<Grob> ties =
     Pointer_group_interface__extract_elements (me, (Grob*)0, "ties");
 
-  for (int i = ties.size (); i--; )
+  for (int i = ties.size (); i--;)
     if (Directional_element_interface::get (ties[i]))
       ties.del (i);
   
 
-  if(!ties.size())
+  if (!ties.size ())
     return ;
   
 
@@ -99,11 +99,11 @@ Tie_column::set_directions (Grob*me)
     }
   
   ties.sort (tie_compare);
-  Directional_element_interface::setties[0], DOWN);
+  Directional_element_interface::set (ties[0], DOWN);
   ties.del (0);
   
-  Directional_element_interface ::set(ties.pop (), UP);
-  for (int i=ties.size(); i--; )
+  Directional_element_interface ::set (ties.pop (), UP);
+  for (int i=ties.size (); i--;)
     {
       Grob *  t = ties[i];
       Real p = Tie::position_f (t);
@@ -115,7 +115,7 @@ Tie_column::set_directions (Grob*me)
   
 }
 
-MAKE_SCHEME_CALLBACK(Tie_column,after_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Tie_column,after_line_breaking,1);
 SCM
 Tie_column::after_line_breaking (SCM smob)
 {
index b81db0a02affa07855f16c4be69146ae29eab5b2..283e5aac4d95b746e27eb3bbcfda84c78804c407 100644 (file)
@@ -65,13 +65,13 @@ protected:
   virtual void create_grobs ();
   void typeset_tie (Grob*);
 public:
-  VIRTUAL_COPY_CONS(Translator);
-  Tie_engraver();
+  VIRTUAL_COPY_CONS (Translator);
+  Tie_engraver ();
 };
 
 
 
-Tie_engraver::Tie_engraver()
+Tie_engraver::Tie_engraver ()
 {
   req_l_ = 0;
   tie_column_p_ = 0;
@@ -112,7 +112,7 @@ Tie_engraver::acknowledge_grob (Grob_info i)
       Note_req * m = dynamic_cast<Note_req* > (i.req_l_);
       if (!m)
        return;
-      now_heads_.push (CHead_melodic_tuple (i.elem_l_, m, now_mom()+ m->length_mom ()));
+      now_heads_.push (CHead_melodic_tuple (i.elem_l_, m, now_mom ()+ m->length_mom ()));
     }
 }
 
@@ -123,22 +123,22 @@ Tie_engraver::create_grobs ()
   if (req_l_)
     {
       now_heads_.sort (CHead_melodic_tuple::pitch_compare);
-      stopped_heads_.sort(CHead_melodic_tuple::pitch_compare);
+      stopped_heads_.sort (CHead_melodic_tuple::pitch_compare);
 
       SCM head_list = SCM_EOL;
       
       int j = stopped_heads_.size ()-1;
       int i = now_heads_.size ()-1;
 
-      while  (i >= 0 && j >=0)
+      while (i >= 0 && j >=0)
        {
          int comp
-           = Pitch::compare (*unsmob_pitch (now_heads_[i].req_l_->get_mus_property ("pitch") ),
+           = Pitch::compare (*unsmob_pitch (now_heads_[i].req_l_->get_mus_property ("pitch")),
                                      *unsmob_pitch (stopped_heads_[j].req_l_->get_mus_property ("pitch")));
 
          if (comp)
            {
            (comp < 0) ? j -- : i--;
+ (comp < 0) ? j -- : i--;
              continue;
            }
          else
@@ -189,7 +189,7 @@ Tie_engraver::create_grobs ()
        {
          tie_column_p_ = new Spanner (get_property ("TieColumn"));
          Tie_column::set_interface (tie_column_p_);
-         for (int i = tie_p_arr_.size (); i--; )
+         for (int i = tie_p_arr_.size (); i--;)
            Tie_column::add_tie (tie_column_p_,tie_p_arr_ [i]);
          announce_grob (tie_column_p_, 0);
        }
@@ -228,20 +228,20 @@ Tie_engraver::stop_translation_timestep ()
 void
 Tie_engraver::typeset_tie (Grob *her)
 {
-  if (!(Tie::head (her,LEFT) && Tie::head (her,RIGHT)))
+  if (! (Tie::head (her,LEFT) && Tie::head (her,RIGHT)))
     warning (_ ("lonely tie"));
 
   Direction d = LEFT;
   Drul_array<Grob *> new_head_drul;
-  new_head_drul[LEFT] = Tie::head(her,LEFT);
+  new_head_drul[LEFT] = Tie::head (her,LEFT);
   new_head_drul[RIGHT] = Tie::head (her,RIGHT);  
   do {
     if (!Tie::head (her,d))
-      new_head_drul[d] = Tie::head(her,(Direction)-d);
-  } while (flip(&d) != LEFT);
+      new_head_drul[d] = Tie::head (her, (Direction)-d);
+  } while (flip (&d) != LEFT);
 
-  index_set_cell (her->get_grob_property ("heads"), LEFT, new_head_drul[LEFT]->self_scm () );
-  index_set_cell (her->get_grob_property ("heads"), RIGHT, new_head_drul[RIGHT]->self_scm () );
+  index_set_cell (her->get_grob_property ("heads"), LEFT, new_head_drul[LEFT]->self_scm ());
+  index_set_cell (her->get_grob_property ("heads"), RIGHT, new_head_drul[RIGHT]->self_scm ());
 
   typeset_grob (her);
 }
@@ -267,7 +267,7 @@ Tie_engraver::start_translation_timestep ()
 
 }
 
-ADD_THIS_TRANSLATOR(Tie_engraver);
+ADD_THIS_TRANSLATOR (Tie_engraver);
 
 
 CHead_melodic_tuple::CHead_melodic_tuple ()
@@ -302,5 +302,5 @@ int
 CHead_melodic_tuple::time_compare (CHead_melodic_tuple const&h1,
                                   CHead_melodic_tuple const &h2)
 {
-  return (h1.end_ - h2.end_ ).sign ();
+  return (h1.end_ - h2.end_).sign ();
 }
index 211cfbb9255c83fb9b3c9da6ab1d84474caa400e..ab1ef29966fef3eaa77880f00e3d18c4ed824b44 100644 (file)
@@ -39,7 +39,7 @@ inline int compare (CNote_melodic_tuple const &a, CNote_melodic_tuple const &b)
 class Tie_performer : public Performer
 {
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Tie_performer ();
 private:
   bool done_;
@@ -108,7 +108,7 @@ Tie_performer::acknowledge_audio_element (Audio_element_info i)
       Note_req * m = dynamic_cast<Note_req* > (i.req_l_);
       if (!m)
        return;
-      now_notes_.push (CNote_melodic_tuple (nh, m, now_mom()+ m->length_mom ()));
+      now_notes_.push (CNote_melodic_tuple (nh, m, now_mom ()+ m->length_mom ()));
     }
 }
 
@@ -131,19 +131,19 @@ Tie_performer::create_audio_elements ()
   if (req_l_)
     {
       now_notes_.sort (CNote_melodic_tuple::pitch_compare);
-      stopped_notes_.sort(CNote_melodic_tuple::pitch_compare);
+      stopped_notes_.sort (CNote_melodic_tuple::pitch_compare);
       int i=0;
       int j=0;
       int tie_count=0;
-      while  ( i < now_notes_.size () && j < stopped_notes_.size ())
+      while (i < now_notes_.size () && j < stopped_notes_.size ())
        {
          int comp
-           = Pitch::compare (*unsmob_pitch (now_notes_[i].req_l_->get_mus_property ("pitch") ),
+           = Pitch::compare (*unsmob_pitch (now_notes_[i].req_l_->get_mus_property ("pitch")),
                                      *unsmob_pitch (stopped_notes_[j].req_l_->get_mus_property ("pitch")));
 
          if (comp)
            {
            (comp < 0) ? i ++ : j++;
+ (comp < 0) ? i ++ : j++;
              continue;
            }
          else
@@ -170,7 +170,7 @@ Tie_performer::create_audio_elements ()
       
       if (!tie_p_arr_.size ())
        {
-         req_l_->origin ()->warning (_("No ties were created!"));
+         req_l_->origin ()->warning (_ ("No ties were created!"));
        }
     }
 }
@@ -231,5 +231,5 @@ int
 CNote_melodic_tuple::time_compare (CNote_melodic_tuple const&h1,
                                   CNote_melodic_tuple const &h2)
 {
-  return (h1.end_ - h2.end_ ).sign ();
+  return (h1.end_ - h2.end_).sign ();
 }
index 6a762fc3e0be5f66142a99375fa2fb57e121701c..d465ae8b66c4ff4456e9e6d4c73ed331e9d5e10d 100644 (file)
@@ -87,8 +87,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::stem_l (head (me,LEFT)) :0;
+  Item * sr =  head (me,RIGHT) ? Rhythmic_head::stem_l (head (me,RIGHT)) :0;  
 
   if (sl && sr)
     {
@@ -114,7 +114,7 @@ Tie::get_control_points (SCM smob)
   Direction headdir = CENTER; 
   if (head (me,LEFT))
     headdir = LEFT;
-  else if (head(me,RIGHT))
+  else if (head (me,RIGHT))
     headdir = RIGHT;
   else
     {
@@ -142,7 +142,7 @@ Tie::get_control_points (SCM smob)
     this is a kludge: the tie has to be long enough to be
     visible, but should not go through key sigs.
 
   (please fixme)
+ (please fixme)
    */
   Real lambda = 0.5;           
   
@@ -174,7 +174,7 @@ Tie::get_control_points (SCM smob)
          - 2 * x_gap_f;
     }
   
-  Direction dir = Directional_element_interface::get(me);
+  Direction dir = Directional_element_interface::get (me);
 
   SCM details = me->get_grob_property ("details");
 
@@ -215,7 +215,7 @@ Tie::get_control_points (SCM smob)
     todo: tie / stem collision
    */
 
-  b = slur_shape(width,h_inf, r_0);
+  b = slur_shape (width,h_inf, r_0);
   b.scale (1, dir);
   b.translate (Offset (left_x, ypos));
   
@@ -249,7 +249,7 @@ Tie::get_control_points (SCM smob)
          Real y1 = ry + clear;
          Real y2 = ry - clear;
          
-         newy =  (fabs (y1 - y) < fabs (y2 - y)) ? y1 : y2;
+         newy = (fabs (y1 - y) < fabs (y2 - y)) ? y1 : y2;
          
          //      newy = ry - 0.5 * staff_space * sign (diff) ;
 
@@ -265,7 +265,7 @@ Tie::get_control_points (SCM smob)
       Real y0 = b.control_ [0][Y_AXIS];
       b.control_[2][Y_AXIS] = 
       b.control_[1][Y_AXIS] =
      (b.control_[1][Y_AXIS] - y0)  * ((newy - y0) / (y - y0)) + y0; 
+ (b.control_[1][Y_AXIS] - y0)  * ((newy - y0) / (y - y0)) + y0; 
     }
   else
     programming_error ("Tie is nowhere horizontal");
@@ -274,11 +274,11 @@ Tie::get_control_points (SCM smob)
 
   SCM controls = SCM_EOL;
   for (int i= 4; i--;)
-    controls = gh_cons ( ly_offset2scm (b.control_[i]), controls);
+    controls = gh_cons (ly_offset2scm (b.control_[i]), controls);
   return controls;
 }
 
-MAKE_SCHEME_CALLBACK(Tie,set_spacing_rods,1);
+MAKE_SCHEME_CALLBACK (Tie,set_spacing_rods,1);
 
 /*
   TODO: set minimum distances for begin/end of line
@@ -300,7 +300,7 @@ Tie::set_spacing_rods (SCM smob)
   return SCM_UNSPECIFIED;
 }
 
-MAKE_SCHEME_CALLBACK(Tie,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Tie,brew_molecule,1);
 SCM
 Tie::brew_molecule (SCM smob) 
 {
index b9fbb7601049024ff661948a9796e2c2dccbe1e2..ee8074c6bc0497b676df5e8d6dde3f181070bd9d 100644 (file)
@@ -22,10 +22,10 @@ Time_scaled_music_iterator::process (Moment m)
       if (yeah)
        set_translator (yeah->report_to_l ());
       else
-       music_l_->origin ()->warning ( _("no one to print a tuplet start bracket"));
+       music_l_->origin ()->warning (("no one to print a tuplet start bracket"));
     }
 
   Music_wrapper_iterator::process (m);
 }
 
-IMPLEMENT_CTOR_CALLBACK(Time_scaled_music_iterator);
+IMPLEMENT_CTOR_CALLBACK (Time_scaled_music_iterator);
index 6ff67f2963acfc6795ad25270cc9287210299ab1..62eed79c98dab3ae759ba27b34a72f01c8092123 100644 (file)
@@ -18,6 +18,11 @@ Time_scaled_music::Time_scaled_music (SCM l)
   
 }
 
+Time_scaled_music::Time_scaled_music ()
+{
+  
+}
 
 
 
+ADD_MUSIC (Time_scaled_music);
index caabdb6e254fafc13b720d3e713fffb825e2f32f..4d9f07101095602765b3efda4016180fd867939c 100644 (file)
   */
 class Time_signature_engraver : public Engraver {
 protected:
-  virtual void stop_translation_timestep();
+  virtual void stop_translation_timestep ();
   virtual void create_grobs ();
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   Item * time_signature_p_;
   SCM last_time_fraction_;
-  Time_signature_engraver();
+  Time_signature_engraver ();
 };
 
 
-Time_signature_engraver::Time_signature_engraver()
+Time_signature_engraver::Time_signature_engraver ()
 { 
   time_signature_p_ =0;
   last_time_fraction_ = SCM_BOOL_F;
 }
 
 void
-Time_signature_engraver::create_grobs()
+Time_signature_engraver::create_grobs ()
 {
   /*
     not rigorously safe, since the value might get GC'd and
@@ -57,7 +57,7 @@ Time_signature_engraver::create_grobs()
 
 
 void
-Time_signature_engraver::stop_translation_timestep()
+Time_signature_engraver::stop_translation_timestep ()
 {
   if (time_signature_p_) 
     {
@@ -67,6 +67,6 @@ Time_signature_engraver::stop_translation_timestep()
 }
 
 
-ADD_THIS_TRANSLATOR(Time_signature_engraver);
+ADD_THIS_TRANSLATOR (Time_signature_engraver);
  
 
index 0bcf5a4c40b0aaaffdec3581a0363506921e0d80..e17b77d353e88ef30688fb5a051123090ff85d89 100644 (file)
 class Time_signature_performer : public Performer
 {
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
   
-  Time_signature_performer();
-  ~Time_signature_performer();
+  Time_signature_performer ();
+  ~Time_signature_performer ();
 
 protected:
 
@@ -26,7 +26,7 @@ protected:
 
   SCM prev_fraction_;
 private:
-  Time_signature_change_req* time_signature_req_l_;
+
   Audio_time_signature* audio_p_;
 };
 
@@ -56,7 +56,7 @@ Time_signature_performer::create_audio_elements ()
       audio_p_ = new Audio_time_signature (b,o);
       Audio_element_info info (audio_p_, 0);
       announce_element (info);
-      time_signature_req_l_ = 0;
+
     }
 }
 
index cf1efd7e945c93698757c67fbdd6bb3873021264..8e516e8ccdb49bff1de649e01cbb073f93ed7aa3 100644 (file)
@@ -14,7 +14,7 @@
 #include "paper-def.hh"
 #include "font-interface.hh"
 
-MAKE_SCHEME_CALLBACK(Time_signature,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Time_signature,brew_molecule,1);
 /*
   TODO: make different functions for special and normal timesigs.
  */
@@ -70,7 +70,7 @@ Time_signature::special_time_signature (Grob*me, String s, int n, int d)
   String symbolname = "timesig-" + s + to_str (n) + "/" + to_str (d);
   
   Molecule m = feta->find_by_name (symbolname);
-  if (!m.empty_b()) 
+  if (!m.empty_b ()) 
     return m;
 
   /*
index da097bc7d5499d2fa31bc0024cf5ce9a5df5868d..ba462c16739e30e746a78f6dda43df3052db7d43 100644 (file)
@@ -22,13 +22,13 @@ protected:
   virtual void stop_translation_timestep ();
   virtual void process_music ();
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
 };
 
-ADD_THIS_TRANSLATOR(Timing_engraver);
+ADD_THIS_TRANSLATOR (Timing_engraver);
 
 void
-Timing_engraver::start_translation_timestep)
+Timing_engraver::start_translation_timestep ()
 {
   Timing_translator::start_translation_timestep ();
 
@@ -46,7 +46,7 @@ Timing_engraver::start_translation_timestep( )
          || (to_boolean (always)))
        {
          /* should this work, or be junked?  See input/bugs/no-bars.ly */
-         which=get_property ("defaultBarType" );
+         which=get_property ("defaultBarType");
        }
     }
 
index 11b5d69c6f1f4af6e2316dc59aa2cb53f9a02a61..ec677a56faa0f472fb95d93d5e60816e7189437d 100644 (file)
@@ -31,7 +31,7 @@ Timing_translator::try_music (Music*r)
 }
 
 void
-Timing_translator::process_music()
+Timing_translator::process_music ()
 {
   if (check_ && measure_position ())
     {
@@ -40,7 +40,7 @@ Timing_translator::process_music()
       Moment zero; 
       
       if (!to_boolean (get_property ("barCheckNoSynchronize")))
-       daddy_trans_l_->set_property("measurePosition", zero.smobbed_copy ());
+       daddy_trans_l_->set_property ("measurePosition", zero.smobbed_copy ());
     }
 
   SCM fr = get_property ("timeSignatureFraction");
@@ -54,7 +54,7 @@ Timing_translator::process_music()
 
 
 void
-Timing_translator::stop_translation_timestep()
+Timing_translator::stop_translation_timestep ()
 {
   check_ = 0;
   
@@ -84,10 +84,10 @@ Timing_translator::stop_translation_timestep()
 }
 
 
-ADD_THIS_TRANSLATOR(Timing_translator);
+ADD_THIS_TRANSLATOR (Timing_translator);
 
 void
-Timing_translator::initialize()
+Timing_translator::initialize ()
 {
   Moment m;
   daddy_trans_l_->set_property ("timing" , SCM_BOOL_T);  
@@ -102,8 +102,8 @@ Timing_translator::initialize()
 Moment
 Timing_translator::measure_length () const
 {
-  SCM l = get_property("measureLength");
-  if (unsmob_moment(l))
+  SCM l = get_property ("measureLength");
+  if (unsmob_moment (l))
     return *unsmob_moment (l);
   else
     return Moment (1);
@@ -124,7 +124,7 @@ Timing_translator::set_time_signature ()
   daddy_trans_l_->set_property ("beatLength", one_beat.smobbed_copy ());
 }
 
-Timing_translator::Timing_translator()
+Timing_translator::Timing_translator ()
 {
 
   last_time_sig_ = SCM_BOOL_F;
@@ -140,7 +140,7 @@ Timing_translator::measure_position () const
   Moment m   =0;
   if (unsmob_moment (sm))
     {
-      m = *unsmob_moment(sm);
+      m = *unsmob_moment (sm);
       while (m < Moment (0))
        m += measure_length ();
     }
@@ -149,7 +149,7 @@ Timing_translator::measure_position () const
 }
 
 void
-Timing_translator::start_translation_timestep()
+Timing_translator::start_translation_timestep ()
 {
        check_ =00;
   Translator *t = this;
@@ -176,24 +176,24 @@ Timing_translator::start_translation_timestep()
   SCM s = get_property ("measurePosition");
   if (unsmob_moment (s))
     {
-      measposp = *unsmob_moment(s);
+      measposp = *unsmob_moment (s);
     }
   else
     {
-      daddy_trans_l_->set_property ("measurePosition", measposp.smobbed_copy());
+      daddy_trans_l_->set_property ("measurePosition", measposp.smobbed_copy ());
     }
   
   measposp += dt;
   
   SCM barn = get_property ("currentBarNumber");
   int b = 0;
-  if (gh_number_p(barn))
+  if (gh_number_p (barn))
     {
       b = gh_scm2int (barn);
     }
 
   SCM cad = get_property ("timing");
-  bool c= to_boolean (cad );
+  bool c= to_boolean (cad);
 
   Moment len = measure_length ();
   while (c && measposp >= len)
@@ -203,6 +203,6 @@ Timing_translator::start_translation_timestep()
     }
 
   daddy_trans_l_->set_property ("currentBarNumber", gh_int2scm (b));
-  daddy_trans_l_->set_property ("measurePosition", measposp.smobbed_copy());
+  daddy_trans_l_->set_property ("measurePosition", measposp.smobbed_copy ());
 }
 
index 4e57c28fa570a41aba37e2e6768e3ec51e30777f..3a66cefb759f856bd28b2648febe3ed531178747 100644 (file)
@@ -25,7 +25,7 @@ add_translator (Translator *t)
   if (!global_translator_dict_p)
     global_translator_dict_p = new Dictionary<Translator*>;
 
 (*global_translator_dict_p)[classname (t)] = t;
+ (*global_translator_dict_p)[classname (t)] = t;
 }
 
 Translator*
index a54b1715d17eb437a640846fc560b7ed34004b7e..917a31d7f0be3bea0819981b5961ba6a301310b8 100644 (file)
@@ -20,7 +20,7 @@ Translator_def::print_smob (SCM smob, SCM port, scm_print_state*)
 {
   Translator_def* me = (Translator_def*) SCM_CELL_WORD_1 (smob);
 
-  scm_puts("#<Translator_def ", port);
+  scm_puts ("#<Translator_def ", port);
   scm_display (me->type_name_, port);
   scm_puts (">", port);
   return 1;
@@ -49,7 +49,7 @@ foo_init ()
   assign_sym = scm_permanent_object (ly_symbol2scm ("assign"));
 }
 
-ADD_SCM_INIT_FUNC(transdef, foo_init);
+ADD_SCM_INIT_FUNC (transdef, foo_init);
 
 Translator_def::Translator_def ()
 {
@@ -99,8 +99,8 @@ Translator_def::modify_definition (SCM list, SCM str, bool add)
     {
       if (scm_memq (str, list) != SCM_BOOL_F)
        {
-         warning (_f("Already contains: `%s'", s));
-         warning (_f("Not adding translator: `%s'", s));
+         warning (_f ("Already contains: `%s'", s));
+         warning (_f ("Not adding translator: `%s'", s));
        }
       else
        list= gh_cons (str, list);
@@ -154,9 +154,9 @@ void
 Translator_def::apply_pushpop_property (Translator_group* me,SCM syms, SCM eprop, SCM val)
 {
   if (gh_symbol_p (syms))
-    dynamic_cast<Translator_group*>(me)->execute_single_pushpop_property (syms, eprop, val);
+    dynamic_cast<Translator_group*> (me)->execute_single_pushpop_property (syms, eprop, val);
   else for (SCM s = syms; gh_pair_p (s); s = gh_cdr (s))
-    dynamic_cast<Translator_group*>(me)->execute_single_pushpop_property (gh_car (s), eprop, val);
+    dynamic_cast<Translator_group*> (me)->execute_single_pushpop_property (gh_car (s), eprop, val);
 }
 
 
@@ -199,9 +199,9 @@ Translator_def::path_to_acceptable_translator (SCM type_str, Music_output_def* o
 
   return best_result;
 }
-IMPLEMENT_UNSMOB(Translator_def,translator_def);
-IMPLEMENT_SMOBS(Translator_def);
-IMPLEMENT_DEFAULT_EQUAL_P(Translator_def);
+IMPLEMENT_UNSMOB (Translator_def,translator_def);
+IMPLEMENT_SMOBS (Translator_def);
+IMPLEMENT_DEFAULT_EQUAL_P (Translator_def);
 
 
 static SCM
@@ -268,7 +268,7 @@ Translator_def::apply_property_operations (Translator_group*tg)
        }
       else if (type == assign_sym)
        {
-         tg->set_property (gh_car(entry), gh_cadr (entry));
+         tg->set_property (gh_car (entry), gh_cadr (entry));
        }
     }
 }
index 4a60731dd4ae082dd80112f5ff6a2b2f5880c75e..d1276c95ec3baada04d6f579e22cded0e1c951e1 100644 (file)
 #include "translator-def.hh"
 
 Translator_group::Translator_group (Translator_group const&s)
-  : Translator(s)
+  : Translator (s)
 {
   iterator_count_ =0;
   
   Scheme_hash_table * tab =  new Scheme_hash_table (*s.properties_dict ());
   properties_scm_ = tab->self_scm ();
-  scm_unprotect_object (tab->self_scm));
+  scm_unprotect_object (tab->self_scm ());
 }
 
 Scheme_hash_table*
@@ -34,11 +34,11 @@ Translator_group::properties_dict () const
 Translator_group::~Translator_group ()
 {
   
-  //assert (removable_b());
+  //assert (removable_b ());
 }
 
 
-Translator_group::Translator_group()
+Translator_group::Translator_group ()
 {
   iterator_count_  = 0;
   Scheme_hash_table *tab = new Scheme_hash_table ;
@@ -48,7 +48,7 @@ Translator_group::Translator_group()
 }
 
 void
-Translator_group::check_removal()
+Translator_group::check_removal ()
 {
   SCM next = SCM_EOL; 
   for (SCM p = trans_group_list_; gh_pair_p (p); p = next)
@@ -58,7 +58,7 @@ Translator_group::check_removal()
       Translator_group *trg =  dynamic_cast<Translator_group*> (unsmob_translator (gh_car (p)));
 
       trg->check_removal ();
-      if (trg->removable_b())
+      if (trg->removable_b ())
        terminate_translator (trg);
     }
 }
@@ -87,7 +87,7 @@ Translator_group::add_group_translator (Translator *t)
 
 
 bool
-Translator_group::removable_b() const
+Translator_group::removable_b () const
 {
   return trans_group_list_ == SCM_EOL && ! iterator_count_;
 }
@@ -120,7 +120,7 @@ Translator_group::find_create_translator_l (String n, String id)
     return existing;
 
   Link_array<Translator_def> 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.ch_C ()), output_def_l ());
 
   if (path.size ())
     {
@@ -172,9 +172,9 @@ Translator_group::try_music (Music* m)
 }
 
 int
-Translator_group::depth_i() const
+Translator_group::depth_i () const
 {
-  return (daddy_trans_l_) ? daddy_trans_l_->depth_i()  + 1 : 0;
+  return (daddy_trans_l_) ? daddy_trans_l_->depth_i ()  + 1 : 0;
 }
 
 Translator_group*
@@ -189,7 +189,7 @@ Translator_group::ancestor_l (int level)
 void
 Translator_group::terminate_translator (Translator*r_l)
 {
-  r_l->removal_processing();
+  r_l->removal_processing ();
   /*
     Return value ignored. GC does the rest.
    */
@@ -218,7 +218,7 @@ Translator_group::is_bottom_translator_b () const
 }
 
 Translator_group*
-Translator_group::get_default_interpreter()
+Translator_group::get_default_interpreter ()
 {
   if (!is_bottom_translator_b ())
     {
@@ -228,7 +228,7 @@ Translator_group::get_default_interpreter()
       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).ch_C ()));
          t = unsmob_translator_def (this->definition_);
        }
       Translator_group *tg = t->instantiate (output_def_l_);
@@ -245,8 +245,8 @@ Translator_group::get_default_interpreter()
 static void
 static_each (SCM list, Method_pointer method)
 {
-  for (SCM p = list; gh_pair_p (p); p = gh_cdr(p))
   (unsmob_translator (gh_car (p))->*method) ();
+  for (SCM p = list; gh_pair_p (p); p = gh_cdr (p))
+ (unsmob_translator (gh_car (p))->*method) ();
   
 }
 
@@ -291,7 +291,7 @@ Translator_group::get_property (SCM sym) const
 void
 Translator_group::set_property (String id, SCM val)
 {
-  set_property (ly_symbol2scm (id.ch_C()), val);
+  set_property (ly_symbol2scm (id.ch_C ()), val);
 }
 
 void
@@ -307,7 +307,7 @@ Translator_group::set_property (SCM sym, SCM val)
 void
 Translator_group::execute_single_pushpop_property (SCM prop, SCM eltprop, SCM val)
 {
-  if (gh_symbol_p(prop))
+  if (gh_symbol_p (prop))
     {
       if (val != SCM_UNDEFINED)
        {
@@ -395,7 +395,7 @@ type_check_assignment (SCM val, SCM sym,  SCM type_symbol)
   bool ok = true;
   SCM type_p = SCM_EOL;
 
-  if (gh_symbol_p(sym))
+  if (gh_symbol_p (sym))
     type_p = scm_object_property (sym, type_symbol);
 
   if (type_p != SCM_EOL && !gh_procedure_p (type_p))
@@ -416,7 +416,7 @@ type_check_assignment (SCM val, SCM sym,  SCM type_symbol)
 
          scm_puts (_f ("Type check for `%s' failed; value `%s' must be of type `%s'",
                        ly_symbol2string (sym).ch_C (),
-                       ly_scm2string (ly_write2scmval)).ch_C (),
+                       ly_scm2string (ly_write2scm (val)).ch_C (),
                        ly_scm2string (type_name).ch_C ()).ch_C (),
                    errport);
          scm_puts ("\n", errport);                   
@@ -462,4 +462,4 @@ add_trans_scm_funcs ()
   scm_make_gsubr ("ly-set-trans-property", 3, 0, 0, (Scheme_function_unknown)ly_set_trans_property);
 }
 
-ADD_SCM_INIT_FUNC(trans_scm, add_trans_scm_funcs);
+ADD_SCM_INIT_FUNC (trans_scm, add_trans_scm_funcs);
index 41111b075e6c48a7fc5012c56c406986779b347f..ce9ac35a0fd312fcd5c22a8c3b85a9106b77fcf3 100644 (file)
@@ -15,9 +15,9 @@
 #include "ly-smobs.icc"
 
 char const*
-Translator::name() const
+Translator::name () const
 {
-  return classname(this);
+  return classname (this);
 }
 
 Translator::~Translator ()
@@ -155,7 +155,7 @@ Translator::finalize ()
 SCM
 Translator::mark_smob (SCM sm)
 {
-  Translator * me = (Translator*) SCM_CELL_WORD_1(sm);
+  Translator * me = (Translator*) SCM_CELL_WORD_1 (sm);
   scm_gc_mark (me->simple_trans_list_);
   scm_gc_mark (me->trans_group_list_);
   scm_gc_mark (me->definition_);  
@@ -177,14 +177,10 @@ Translator::print_smob (SCM s, SCM port, scm_print_state *)
     don't try to print properties, that is too much hassle.
    */
   scm_puts (" >", port);
-
-  
   
   return 1;
 }
 
-
-
-IMPLEMENT_UNSMOB(Translator, translator);
-IMPLEMENT_SMOBS(Translator);
-IMPLEMENT_DEFAULT_EQUAL_P(Translator);
+IMPLEMENT_UNSMOB (Translator, translator);
+IMPLEMENT_SMOBS (Translator);
+IMPLEMENT_DEFAULT_EQUAL_P (Translator);
index c8aa3780e909d340f09a04a4e26f31554dea5a3a..9efae9e62acc51bdec2dca13e6ea5660bb5b891e 100644 (file)
@@ -23,5 +23,8 @@ Transposed_music::to_relative_octave (Pitch p)
   return p;
 }
 
+ADD_MUSIC (Transposed_music);
+Transposed_music::Transposed_music ()
+{
 
-
+}
index a835f21c5b636fc98d227b7364a60efd4575d54a..d7c2fe94fae93d14b5df475d23864d595fd3a266 100644 (file)
@@ -32,7 +32,7 @@ Tuplet_bracket::set_interface (Grob*me)
 /*
   TODO: use stem->beam fields to find Beams. Autobeams aren't found
   through the engraver mechanism.  */
-MAKE_SCHEME_CALLBACK(Tuplet_bracket,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Tuplet_bracket,brew_molecule,1);
 SCM
 Tuplet_bracket::brew_molecule (SCM smob) 
 {
@@ -65,8 +65,8 @@ Tuplet_bracket::brew_molecule (SCM smob)
       Link_array<Grob> column_arr=
        Pointer_group_interface__extract_elements (me, (Grob*)0, "columns");
        
-      Real ncw = column_arr.top ()->extent(column_arr.top (), X_AXIS).length ();
-      Real w = dynamic_cast<Spanner*>(me)->spanner_length () + ncw;
+      Real ncw = column_arr.top ()->extent (column_arr.top (), X_AXIS).length ();
+      Real w = dynamic_cast<Spanner*> (me)->spanner_length () + ncw;
 
       Real staff_space = 1.0;
       Direction dir = Directional_element_interface::get (me);
@@ -93,7 +93,7 @@ Tuplet_bracket::brew_molecule (SCM smob)
          SCM thick = me->get_grob_property ("thick");
          SCM gap = me->get_grob_property ("number-gap");
          
-         SCM at =gh_list(ly_symbol2scm ("tuplet"),
+         SCM at =gh_list (ly_symbol2scm ("tuplet"),
                          gh_double2scm (1.0),
                          gap,
                          gh_double2scm (w),
@@ -131,11 +131,11 @@ 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 <column_arr.size() && Note_column::rest_b(column_arr[l]))
+  while (l <column_arr.size () && Note_column::rest_b (column_arr[l]))
     l ++;
 
   int r = column_arr.size ()- 1;
-  while (r >= l && Note_column::rest_b(column_arr[r]))
+  while (r >= l && Note_column::rest_b (column_arr[r]))
     r--;
   
   if (l < r)
@@ -155,7 +155,7 @@ Tuplet_bracket::calc_position_and_height (Grob*me,Real *offset, Real * dy)
   Real x0 = column_arr[0]->relative_coordinate (commonx, X_AXIS);
   Real x1 = column_arr.top ()->relative_coordinate (commonx, X_AXIS);
   
-  Real factor = column_arr.size () > 1 ? 1/(x1 - x0) : 1.0;
+  Real factor = column_arr.size () > 1 ? 1/ (x1 - x0) : 1.0;
   
   for (int i = 0; i < column_arr.size ();  i++)
     {
@@ -186,7 +186,7 @@ Tuplet_bracket::calc_dy (Grob*me,Real * dy)
   *dy = column_arr.top ()->extent (column_arr.top (), Y_AXIS) [d]
     - column_arr[0]->extent (column_arr[0], Y_AXIS) [d];
 }
-MAKE_SCHEME_CALLBACK(Tuplet_bracket,after_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Tuplet_bracket,after_line_breaking,1);
 
 SCM
 Tuplet_bracket::after_line_breaking (SCM smob)
index 8781845df65d00c8c309f178572946e11987177e..7568a08679c7bffe6c4588c6a1f8b7b7be0b9376 100644 (file)
@@ -20,7 +20,7 @@
 class Tuplet_engraver : public Engraver
 {
 public:
-  VIRTUAL_COPY_CONS(Translator);
+  VIRTUAL_COPY_CONS (Translator);
 
 protected:
   Link_array<Time_scaled_music> time_scaled_music_arr_;
@@ -52,7 +52,7 @@ Tuplet_engraver::try_music (Music *r)
          stop_moments_.push (m);
 
          SCM s = get_property ("tupletSpannerDuration");
-         if (unsmob_moment(s))
+         if (unsmob_moment (s))
            m = m <? (now_mom () + *unsmob_moment (s));
          
          span_stop_moments_.push (m);
@@ -83,7 +83,7 @@ Tuplet_engraver::create_grobs ()
       
 
       SCM proc = get_property ("tupletNumberFormatFunction");
-      if (gh_procedure_pproc))
+      if (gh_procedure_p (proc))
        {
          SCM t = gh_apply (proc, gh_list (time_scaled_music_arr_[i]->self_scm (), SCM_UNDEFINED));
          glep->set_grob_property ("text", t);
@@ -102,11 +102,11 @@ Tuplet_engraver::acknowledge_grob (Grob_info i)
   if (grace != wgb)
     return;
   
-  if (Note_column::has_interface(i.elem_l_))
+  if (Note_column::has_interface (i.elem_l_))
     {
       for (int j =0; j  <started_span_p_arr_.size (); j++)
        if (started_span_p_arr_[j]) 
-         Tuplet_bracket::add_column (started_span_p_arr_[j], dynamic_cast<Item*>(i.elem_l_));
+         Tuplet_bracket::add_column (started_span_p_arr_[j], dynamic_cast<Item*> (i.elem_l_));
     }
   else if (Beam::has_interface (i.elem_l_))
     {
@@ -126,7 +126,7 @@ Tuplet_engraver::start_translation_timestep ()
   if (unsmob_moment (s))
     tsd = *unsmob_moment (s);
 
-  for (int i= started_span_p_arr_.size (); i--; )
+  for (int i= started_span_p_arr_.size (); i--;)
     {
       if (now >= span_stop_moments_[i])
        {
@@ -143,9 +143,9 @@ Tuplet_engraver::start_translation_timestep ()
       if (now >= stop_moments_[i])
        {
          started_span_p_arr_.del (i);
-         stop_moments_.del(i);
+         stop_moments_.del (i);
          span_stop_moments_.del (i);
-         time_scaled_music_arr_.del(i);
+         time_scaled_music_arr_.del (i);
        }
     }
 }
@@ -160,6 +160,6 @@ Tuplet_engraver::finalize ()
     }  
 }
 
-ADD_THIS_TRANSLATOR(Tuplet_engraver);
+ADD_THIS_TRANSLATOR (Tuplet_engraver);
 
 
index f73ef586be68d704d2bb7eb779f92d6e7b256996..e16b9e316a4a53402cab16c385e64ce7788b652f 100644 (file)
@@ -20,4 +20,4 @@ Type_swallow_translator::try_music (Music*r)
 
 
 
-DECLARE_REQUEST_SWALLOWER(Skip_req);
+DECLARE_REQUEST_SWALLOWER (Skip_req);
index 1c2136c6253369d6ba32564d586de6fa0111201a..93bc97d5f3042fcbec3ec69fe1d01e3e6d401a6b 100644 (file)
@@ -56,7 +56,7 @@ public:
   
   /// pointer to the alternative that will be processed next.
   SCM alternative_cons_;
-  ~Unfolded_repeat_iterator();
+  ~Unfolded_repeat_iterator ();
   Unfolded_repeat_iterator ();
   Unfolded_repeat_iterator (Unfolded_repeat_iterator const &);
 protected:  
@@ -76,7 +76,7 @@ class Volta_repeat_iterator : public Unfolded_repeat_iterator
 public:
   Volta_repeat_iterator ();
   static  SCM constructor_cxx_function;
-  VIRTUAL_COPY_CONS(Music_iterator);
+  VIRTUAL_COPY_CONS (Music_iterator);
 };
 
 
@@ -166,7 +166,7 @@ Unfolded_repeat_iterator::next_element (bool side_effect)
              
              if (do_repcommands)
                add_repeat_command (gh_list (ly_symbol2scm ("volta"),
-                                            ly_str02scm (repstr.ch_C()), SCM_UNDEFINED));
+                                            ly_str02scm (repstr.ch_C ()), SCM_UNDEFINED));
            }     
        }
       else if (volta_b_)
@@ -224,7 +224,7 @@ Unfolded_repeat_iterator::next_element (bool side_effect)
            {
              String repstr = to_str (done_count_ + 1) + ".";
              add_repeat_command (gh_list (ly_symbol2scm ("volta"),
-                                          ly_str02scm (repstr.ch_C()), SCM_UNDEFINED));
+                                          ly_str02scm (repstr.ch_C ()), SCM_UNDEFINED));
              add_repeat_command (ly_symbol2scm ("end-repeat"));
            }
 
@@ -276,9 +276,9 @@ Unfolded_repeat_iterator::construct_children ()
       do_main_b_ = false;
     }
 
-  while (current_iter_p_ && !current_iter_p_-> ok())
+  while (current_iter_p_ && !current_iter_p_-> ok ())
     {
-      next_element(true);
+      next_element (true);
     }
 }
 
@@ -289,7 +289,7 @@ void
 Unfolded_repeat_iterator::add_repeat_command (SCM what)
 {
   SCM reps = ly_symbol2scm ("repeatCommands");
-  SCM current_reps = report_to_l ()->get_property(reps);
+  SCM current_reps = report_to_l ()->get_property (reps);
 
   Translator_group * where = report_to_l ()->where_defined (reps);
   if (where
@@ -312,7 +312,7 @@ Unfolded_repeat_iterator::process (Moment m)
     {
       while (!current_iter_p_->ok ())
        {
-         next_element(true);
+         next_element (true);
 
          if (!current_iter_p_)
            return;
@@ -360,7 +360,7 @@ Unfolded_repeat_iterator::get_music (Moment until)const
       s = gh_append2 (nm, s);
       
       Moment m = 0;
-      for (SCM i = nm; gh_pair_p(i); i = gh_cdr (i))
+      for (SCM i = nm; gh_pair_p (i); i = gh_cdr (i))
        m = m >? unsmob_music (gh_car (i))->length_mom ();
 
       if (m > Moment (0))
@@ -381,8 +381,8 @@ Unfolded_repeat_iterator::try_music_in_children (Music  * m) const
   return  current_iter_p_->try_music (m);
 }
 
-IMPLEMENT_CTOR_CALLBACK(Unfolded_repeat_iterator);
-IMPLEMENT_CTOR_CALLBACK(Volta_repeat_iterator);
+IMPLEMENT_CTOR_CALLBACK (Unfolded_repeat_iterator);
+IMPLEMENT_CTOR_CALLBACK (Volta_repeat_iterator);
 
 Volta_repeat_iterator::Volta_repeat_iterator ()
 {
index cee4a103870efad21cece84331543eff7d5fb9f4..c91890775fdb3e4195ec640eb13f8f9356b07d7e 100644 (file)
@@ -18,31 +18,31 @@ class Vertical_align_engraver : public Engraver
   Spanner * valign_p_;
   bool qualifies_b (Grob_info) const;  
 public:
-  VIRTUAL_COPY_CONS(Translator);
-  Vertical_align_engraver();
+  VIRTUAL_COPY_CONS (Translator);
+  Vertical_align_engraver ();
 protected:
   virtual void acknowledge_grob (Grob_info);
-  virtual void initialize();
-  virtual void finalize();
+  virtual void initialize ();
+  virtual void finalize ();
 };
 
-Vertical_align_engraver::Vertical_align_engraver()
+Vertical_align_engraver::Vertical_align_engraver ()
 {
   valign_p_ =0;
 }
 
 void
-Vertical_align_engraver::initialize()
+Vertical_align_engraver::initialize ()
 {
   valign_p_ =new Spanner (get_property ("VerticalAlignment"));
-  valign_p_->set_bound(LEFT,unsmob_grob (get_property ("currentCommandColumn")));
+  valign_p_->set_bound (LEFT,unsmob_grob (get_property ("currentCommandColumn")));
   announce_grob (valign_p_ , 0);
 }
 
 void
-Vertical_align_engraver::finalize()
+Vertical_align_engraver::finalize ()
 {
-  valign_p_->set_bound(RIGHT,unsmob_grob (get_property ("currentCommandColumn")));
+  valign_p_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn")));
   typeset_grob (valign_p_);
   valign_p_ =0;
 }
@@ -51,7 +51,7 @@ Vertical_align_engraver::finalize()
 bool
 Vertical_align_engraver::qualifies_b (Grob_info i) const
 {
-  int sz = i.origin_trans_l_arr ((Translator*)this).size()  ;
+  int sz = i.origin_trans_l_arr ((Translator*)this).size ()  ;
 
   return sz > 1 && Axis_group_interface::has_interface (i.elem_l_)
     && !i.elem_l_->parent_l (Y_AXIS) && Axis_group_interface::axis_b (i.elem_l_, Y_AXIS);
@@ -66,4 +66,4 @@ Vertical_align_engraver::acknowledge_grob (Grob_info i)
     }
 }
 
-ADD_THIS_TRANSLATOR(Vertical_align_engraver);
+ADD_THIS_TRANSLATOR (Vertical_align_engraver);
index 9869784a70b15e9234954a8425ffec1143660722..94859cf81946dec02d8765cc7b4831a846a5f6ea 100644 (file)
@@ -50,7 +50,7 @@ Voice_devnull_engraver::try_music (Music *m)
       if (Span_req *s = dynamic_cast <Span_req *> (m))
        {
          SCM t = s->get_mus_property ("span-type");
-         
+        
          for (char const **p = eat_spanners; *p; p++)
            {
              if (t == ly_str02scm (*p))
@@ -63,7 +63,7 @@ Voice_devnull_engraver::try_music (Music *m)
     }
   return false;
 }
-  
+    
 static char const *junk_interfaces[] = {
   "beam-interface",
   "dynamic-interface",
@@ -104,9 +104,10 @@ Voice_devnull_engraver::acknowledge_grob (Grob_info i)
          else
            ;
 #endif   
-           /* Ugh, we can suicide them, but they remain living */
+         /* Ugh, we can suicide them, but they remain living */
          i.elem_l_->suicide ();
          return;
        }
 }
  
+  
index a6a9bbd7ba21b83d8b784ac3eedd5b9fa29c20fa..a3e14ce4833708d9a8cbc45e2ead04821ec6761a 100644 (file)
@@ -22,8 +22,8 @@
 class Volta_engraver : public Engraver
 {
 public:
-  Volta_engraver();
-  VIRTUAL_COPY_CONS(Translator);
+  Volta_engraver ();
+  VIRTUAL_COPY_CONS (Translator);
 protected:
 
   virtual void acknowledge_grob (Grob_info);
@@ -39,7 +39,7 @@ protected:
   SCM start_str_;
 };
 
-ADD_THIS_TRANSLATOR(Volta_engraver);
+ADD_THIS_TRANSLATOR (Volta_engraver);
 
 Volta_engraver::Volta_engraver ()
 {
@@ -84,7 +84,7 @@ Volta_engraver::process_music ()
   
   if (end && !volta_span_p_)
     {
-      warning (_("No volta spanner to end")); // fixme: be more verbose.
+      warning (_ ("No volta spanner to end")); // fixme: be more verbose.
     }
   else if (end)
     {
@@ -148,7 +148,7 @@ Volta_engraver::acknowledge_grob (Grob_info i)
          if (volta_span_p_)
            Volta_spanner::add_bar (volta_span_p_, item);
          if (end_volta_span_p_)
-           Volta_spanner::add_bar(end_volta_span_p_ , item);
+           Volta_spanner::add_bar (end_volta_span_p_ , item);
        }
     }
 }
@@ -158,7 +158,7 @@ Volta_engraver::finalize ()
 {
   if (volta_span_p_)
     {
-      typeset_grob(volta_span_p_);
+      typeset_grob (volta_span_p_);
     }
   if (end_volta_span_p_)
     {
@@ -175,7 +175,7 @@ Volta_engraver::stop_translation_timestep ()
     {
       Side_position_interface::add_staff_support (end_volta_span_p_);
       
-      typeset_grob (end_volta_span_p_ );
+      typeset_grob (end_volta_span_p_);
       end_volta_span_p_ =0;
     }
 }
index 0385af35c246e13874fceb53f236a6a7aa431f5c..356d696d52c075a1c9d71377cfe86e21c0bc34d0 100644 (file)
@@ -35,7 +35,7 @@ Volta_spanner::set_interface (Grob*)
   
 */
 
-MAKE_SCHEME_CALLBACK(Volta_spanner,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Volta_spanner,brew_molecule,1);
 SCM
 Volta_spanner::brew_molecule (SCM smob) 
 {
@@ -60,7 +60,7 @@ Volta_spanner::brew_molecule (SCM smob)
   Real staff_thick = me->paper_l ()->get_var ("stafflinethickness");  
   Real half_space = 0.5;
 
-  Item * bound = dynamic_cast<Spanner*>(me)->get_bound (LEFT);
+  Item * bound = dynamic_cast<Spanner*> (me)->get_bound (LEFT);
 
   /*
     not a start, but really broken in two
@@ -79,7 +79,7 @@ Volta_spanner::brew_molecule (SCM smob)
     */
   }
 
-  Real w = dynamic_cast<Spanner*>(me)->spanner_length () - left - half_space;
+  Real w = dynamic_cast<Spanner*> (me)->spanner_length () - left - half_space;
   Real h =  gh_scm2double (me->get_grob_property ("height"));
   Real t =  staff_thick * gh_scm2double (me->get_grob_property ("thickness"));
 
@@ -96,7 +96,7 @@ Volta_spanner::brew_molecule (SCM smob)
 
   Box b (Interval (0, w), Interval (0, h));
   Molecule mol (b, at);
-  SCM text = me->get_grob_property("text");
+  SCM text = me->get_grob_property ("text");
   SCM properties = gh_list (me->mutable_property_alist_, me->immutable_property_alist_,SCM_UNDEFINED);
   Molecule num = Text_item::text2molecule (me, text, properties);
 
@@ -108,11 +108,11 @@ Volta_spanner::brew_molecule (SCM smob)
 
 
 void
-Volta_spanner::add_bar  (Grob *me, Item* b)
+Volta_spanner::add_bar (Grob *me, Item* b)
 {
-  Pointer_group_interface::add_element(me, "bars",b);
+  Pointer_group_interface::add_element (me, "bars",b);
   Side_position_interface::add_support (me,b);
-  add_bound_item (dynamic_cast<Spanner*>(me), b); 
+  add_bound_item (dynamic_cast<Spanner*> (me), b); 
 }
 
 void
index b5aad036d971003a1ad811e201e3d371b643de54..91cba44360ef5b89f502f2e19ff0799b11c80cfb 100644 (file)
@@ -121,6 +121,7 @@ VoiceContext = \translator {
        \consists "Auto_beam_engraver";
 
        \consists "Chord_tremolo_engraver";
+       \consists "Percent_repeat_engraver";
        \consists "Melisma_engraver";
 
 %{
index eccb52238c09bbde63f699070a419b4f8136ff50..9b0b1150c8ec5b339d1eb2cd8886e12bf9da9e45 100644 (file)
@@ -440,18 +440,120 @@ fet_beginchar("Quart diamondhead", "2diamond", "diamondhead")
        fill black;
 fet_endchar;
 
-fet_beginchar("Crossed notehead", "2cross", "crossedhead")
-       set_char_box(0, black_notehead_width#, noteheight#/2, noteheight#/2);
-       pickup pencircle scaled 1.5 stafflinethickness;
-       lft x1 = 0;
-       bot y1 = -d;
-       top y2 = h;
-       rt x2 = w;
+save triangle; path triangle;
+triangle = (-sqrt3/4,-1/2) -- (0,1) -- (sqrt3/4,-1/2) -- cycle;
+
+fet_beginchar("Whole trianglehead", "0triangle", "wholetrianglehead")
+       set_char_box(0, 2(noteheight#+stafflinethickness#)/sqrt3*7/8,
+         (noteheight#+stafflinethickness#)/2,(noteheight#+stafflinethickness#)/2);
+       fill triangle scaled (7h/6) shifted (w/2,-h/6);
+       unfill triangle scaled 0.72h shifted (w/2,-h/6);
+fet_endchar;
+fet_beginchar("Half trianglehead", "1triangle", "halftrianglehead")
+       thick := 1.2stafflinethickness;
+       set_char_box(0, 2noteheight#/sqrt3*7/8,noteheight#/2,noteheight#/2);
+       fill triangle scaled (7h/6) shifted (w/2,-h/6);
+       unfill triangle scaled 0.7h shifted (w/2,-h/6);
+fet_endchar;
+fet_beginchar("Quart trianglehead", "2triangle", "trianglehead")
+       thick := 1.2stafflinethickness;
+       set_char_box(0, 2noteheight#/sqrt3*7/8,noteheight#/2,noteheight#/2);
+       fill triangle scaled (7h/6) shifted (w/2,-h/6);
+fet_endchar;
+
 
-       draw z1 .. z2;
-       draw (z1 .. z2) yscaled -1;
-fet_endchar
+slw := staff_space;
+slw# := staff_space#;
+slt := 1.25stafflinethickness;
+slt# := 1.25stafflinethickness#;
+slxt = 1.5slt;
+slxt# := 1.5slt#;
+slh := 1.5staff_space;
+slh# := 1.5staff_space#;
+
+fet_beginchar("Whole slashhead","0slash","wholeslashhead")
+       wid := slw#+2slxt#+staff_space#;
+       set_char_box(0,wid-stafflinethickness#,slh#/2,slh#/2);
+       define_pixels (wid);
+       pickup penrazor scaled slxt;
+       draw (-b+slxt/2-stafflinethickness/2,-d) -- (-b+slxt/2+slw-stafflinethickness/2,h);
+       draw (w-slxt/2-slw+stafflinethickness/2,-d) -- (w-slxt/2+stafflinethickness/2,h);
+       pickup penrazor scaled slt rotated 90;
+       draw (-b+slxt-stafflinethickness/2,-d+slt/2) -- (w-slw+stafflinethickness/2,-d+slt/2);
+       draw (-b+slw-stafflinethickness/2,h-slt/2) -- (w-slxt+stafflinethickness/2,h-slt/2);
+fet_endchar;
+
+fet_beginchar("Half slashhead","1slash","halfslashhead")
+       wid := slw#+2slxt#+0.6staff_space#;
+       set_char_box(0,wid-stafflinethickness#,slh#/2,slh#/2);
+       define_pixels (wid);
+       pickup penrazor scaled slxt;
+       draw (b+slxt/2-stafflinethickness/2,-d) -- (b+slxt/2+slw-stafflinethickness/2,h);
+       draw (w-slxt/2-slw+stafflinethickness/2,-d) -- (w-slxt/2+stafflinethickness/2,h);
+       pickup penrazor scaled slt rotated 90;
+       draw (b+slxt-stafflinethickness/2,-d+slt/2) -- (w-slw+stafflinethickness/2,-d+slt/2);
+       draw (b+slw-stafflinethickness/2,h-slt/2) -- (w-slxt+stafflinethickness/2,h-slt/2);
+fet_endchar;
 
+fet_beginchar("Quart slashhead","2slash","quartslashhead")
+       wid := slw#+slxt#;
+       set_char_box(0,slw#+slxt#-stafflinethickness#,slh#/2,slh#/2);
+       define_pixels (wid);
+       pickup penrazor scaled slxt;
+       draw (b+slxt/2-stafflinethickness/2,-d) -- (b+slxt/2+slw-stafflinethickness/2,h);
+fet_endchar;
+
+% thick is the distance between the two parallel lines in the cross (distance between centres of lines)
+def draw_cross(expr thick) =
+       pent := 1.2stafflinethickness;
+       pickup pencircle scaled pent;
+       % alfa is the slant of the lines (i.e. 1 means 45 degrees)
+       alfa := (2h-pent)/(w-pent);
+       % llen is the length of the little outer lines
+       % llen = thick / sin(2atan(alfa))
+       llen := thick/(ypart(dir(2angle(1,alfa))));
+       xa := llen/sqrt(1+alfa**2);
+       ya := xa*alfa;
+       xl := w/2-xa-pent/2;
+       yl := h-ya-pent/2;
+       save crz; path crz;
+       crz = (xa,0) -- (xa+xl,yl) -- (xl,yl+ya) -- (0,ya);
+       draw crz shifted(w/2,0);
+       draw crz xscaled -1 shifted(w/2,0);
+       draw crz yscaled -1 shifted(w/2,0);
+       draw crz scaled -1 shifted(w/2,0);
+enddef;
+
+fet_beginchar("Whole Crossed notehead", "0cross", "wholecrossedhead")
+       wid# := black_notehead_width#+4stafflinethickness#;
+       hei# := noteheight#+stafflinethickness#;
+       set_char_box(0, wid#,hei#/2,hei#/2);
+       draw_cross(3.75stafflinethickness);
+fet_endchar;
+
+fet_beginchar("Half Crossed notehead", "1cross", "halfcrossedhead")
+       wid# := black_notehead_width#+2stafflinethickness#;
+       hei# := noteheight#+stafflinethickness#/2;
+       set_char_box(0, wid#,hei#/2,hei#/2);
+       draw_cross(3stafflinethickness);
+fet_endchar;
+
+fet_beginchar("Crossed notehead", "2cross", "crossedhead")
+       wid# := black_notehead_width#;
+       hei# := noteheight#;
+       set_char_box(0, wid#,hei#/2,hei#/2);
+       draw_cross(stafflinethickness/4);
+fet_endchar;
+
+fet_beginchar("X-Circled notehead", "2xcircle", "xcircledhead")
+       set_char_box(0, noteheight#+stafflinethickness#,
+         noteheight#/2+stafflinethickness#/2,noteheight#/2+stafflinethickness#/2);
+       pickup pencircle scaled 1.2stafflinethickness;
+       draw fullcircle scaled 2h shifted (h,0);
+       pos := h/sqrt2;
+       draw (-pos+h,-pos) -- (pos+h,pos);
+       draw (-pos+h,pos) -- (pos+h,-pos);
+fet_endchar;
 
 fet_endgroup("noteheads");
 define_pixels(black_notehead_width);
index 847045bb44f5dfb56dccbfc6d477e57a672a2eaa..8e46d414278a2c354f3f8c024a2663ccd188b60c 100644 (file)
@@ -1054,10 +1054,11 @@ def draw_percussion_clef(expr reduction) =
        save reduced_il;
        reduced_il# = staff_space# * reduction;
        define_pixels(reduced_il);
-       set_char_box(.5reduced_il#,1.25reduced_il#,reduced_il#,reduced_il#);
-        pickup pencircle scaled 3.33 stafflinethickness;
-       draw (b,h) -- (b,-d);
-       draw (w,h) -- (w,-d);
+       set_char_box(-.67reduced_il#,2.0reduced_il#,reduced_il#,reduced_il#);
+       razt := 0.45reduced_il;
+        pickup penrazor scaled razt;
+       draw (-b+razt/2,h) -- (-b+razt/2,-d);
+       draw (w-razt/2,h) -- (w-razt/2,-d);
 enddef;
 
 fet_beginchar("percussion clef", "percussion", "percussionclef")
@@ -1068,4 +1069,39 @@ fet_beginchar("percussion clef", "percussion_change", "cpercussionclef")
        draw_percussion_clef(.8);
 fet_endchar;
 
+def draw_tab_clef(expr reduction) =
+       save reduced_il;
+       reduced_il# = staff_space# * reduction;
+       define_pixels(reduced_il);
+       set_char_box(-.5reduced_il#,1.8reduced_il#,2.25reduced_il#,2.25reduced_il#);
+       bs := -d+0.65reduced_il;
+       cx := 0.5(-b+w);
+       xp := 0.32 reduced_il;
+       yp := 0.25reduced_il;
+        pickup pensquare xscaled xp yscaled yp;
+
+       draw (-b,h) -- (w,h);
+       draw (cx,h) -- (cx,h-1.2reduced_il);
+
+       pickup penrazor scaled yp rotated 90;
+       draw (-0.85b+0.15w,-0.25reduced_il) -- (-0.15b+0.85w,-0.25reduced_il);
+       pickup penrazor scaled xp;
+       draw (-b,-0.6reduced_il-yp/2) -- (cx,0.6reduced_il+yp/2) -- (w,-0.6reduced_il-yp/2);
+
+
+        pickup pensquare xscaled xp yscaled yp;
+       draw (-b,-d+1.2reduced_il) -- (-b,-d);
+        pickup pencircle xscaled xp yscaled yp;
+       draw (-b,-d) --- (cx,-d) .. (w,0.5(bs-d)) .. (cx,bs) --- (-b,bs) --- (cx,bs)
+            .. (0.3cx+0.7w,0.5(bs-d+1.2reduced_il)) .. (cx,-d+1.2reduced_il) --- (-b,-d+1.2reduced_il)
+enddef;
+
+fet_beginchar("tab clef", "tab", "tabclef")
+       draw_tab_clef(1.0);
+fet_endchar;
+
+fet_beginchar("tab clef", "tab_change", "ctabclef")
+       draw_tab_clef(.8);
+fet_endchar;
+
 fet_endgroup("clefs");
index 62a10760135f5b1f96bde20a491c465aecd4e91b..67199364fb9538186efe257448cdf020e7525742 100644 (file)
@@ -17,5 +17,11 @@ fet_beginchar("repeat dots", "repeatcolon", "repeatcolon")
        set_char_box(0, dot_diam#, staff_space#/2, staff_space#/2);
 fet_endchar;
 
+fet_beginchar("even repeat dots", "evenrepeatcolon", "evenrepeatcolon")
+       pickup pencircle scaled dot_diam;
+       draw (dot_diam/2, staff_space);
+       addto currentpicture also currentpicture yscaled -1;
+       set_char_box(0, dot_diam#, staff_space#, staff_space#);
+fet_endchar;
 
 fet_endgroup("dots");
index 8cd3d7b2bffae44424d0dd752b34503e05499608..b995d72b30d9331ce9fdcefe5cead2cc5507a5cb 100644 (file)
                       (length . ,Repeated_music::unfolded_music_length)))
            ("fold" . ((iterator-ctor  . ,Folded_repeat_iterator::constructor)
                       (length . ,Repeated_music::folded_music_length)))
+           ("percent" . ((iterator-ctor . ,Percent_repeat_iterator::constructor)
+                         (length . ,Repeated_music::unfolded_music_length)))
            ("tremolo" . ((iterator-ctor . ,Chord_tremolo_iterator::constructor)
                          (length . ,Repeated_music::unfolded_music_length)))))
          
        (cdr handle)
        (begin
          (ly-warn
-          (string-append "Unknown repeat type `" name "'\nSee scm/lily.scm for supported repeats"))
+          (string-append "Unknown repeat type `" name "'\nSee scm/c++.scm for supported repeats"))
          '(type . 'repeated-music)))))
index d9eecfb6b9055a98f34aa4bea068f3c9dd6eefa3..1a80cc09fd99746d313b7490298db5f5f29b161a 100644 (file)
@@ -20,6 +20,7 @@
          ("F" . ( "clefs-F" 2 0))
          ("subbass" . ("clefs-F" 4 0))
           ("percussion" . ("clefs-percussion" 0 0))
+          ("tab" . ("clefs-tab" 0 0))
 
          ;; should move mensural stuff to separate file? 
          ("vaticana_do1" . ("clefs-vaticana_do" -1 0))
index 2918e7685f8e2820d4e3792d81de8e887b88ef64..3b302aa63dc31abda9cc58a58d0393ef4c77fad7 100644 (file)
                 (slope-limit . 0.8)
                 (meta . ,(grob-description "PhrasingSlur" slur-interface))
                 ))
+       
        (NonMusicalPaperColumn . (
                 (axes 0)
                 (before-musical-spacing-factor . 1.0)
                (column-space-strength . 2.0)
                (meta . ,(grob-description "NonMusicalPaperColumn" paper-column-interface axis-group-interface spaceable-element-interface))
         ))
+
+       (PercentRepeat . (
+               (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
+               (molecule-callback . ,Multi_measure_rest::percent)
+               (staff-position . 0)
+               (expand-limit . 10)
+               (padding . 2.0) ; staffspace
+               (minimum-width . 12.5) ; staffspace
+               (font-family . music)
+               (meta . ,(grob-description "PercentRepeat" multi-measure-rest-interface  font-interface))
+       ))
+
        
        (Rest . (
                (after-line-breaking-callback . ,Rest::after_line_breaking)
                ;; don't set direction here: it breaks staccato.
                (molecule-callback . ,Script::brew_molecule)
                (X-offset-callbacks . (,Side_position_interface::centered_on_parent))
-               (after-line-breaking-callback . ,Script::after_line_breaking)
+               (before-line-breaking-callback . ,Script::before_line_breaking)
                (meta . ,(grob-description "Script" script-interface side-position-interface font-interface))
        ))
        
index b2668b40041978371eddea9a59a140a5e40405fb..941eb94ee7cf86d94508ad49af9749642c8d4471 100644 (file)
@@ -63,7 +63,7 @@
 ;; silly, use alist? 
 (define (find-notehead-symbol duration style)
   (case style
-   ((cross) "2cross")
+   ((xcircle) "2xcircle")
    ((harmonic) "0mensural")
    ((baroque) 
     (string-append (number->string duration)