]> git.donarmstrong.com Git - lilypond.git/commitdiff
(parse_symbol_list): Bugfix.
authorJan Nieuwenhuizen <janneke@gnu.org>
Fri, 12 Aug 2005 00:04:47 +0000 (00:04 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Fri, 12 Aug 2005 00:04:47 +0000 (00:04 +0000)
298 files changed:
ChangeLog
buildscripts/fixcc.py
flower/file-cookie.cc
flower/file-name.cc
flower/file-path.cc
flower/getopt-long.cc
flower/include/file-cookie.hh
flower/include/file-path.hh
flower/include/guile-compatibility.hh
flower/include/interval.hh
flower/include/interval.tcc
flower/include/libc-extension.hh
flower/include/parray.hh
flower/include/parse-afm.hh
flower/include/pqueue.hh
flower/include/real.hh
flower/include/virtual-methods.hh
flower/parse-afm.cc
flower/rational.cc
flower/string.cc
lily/accidental-engraver.cc
lily/accidental-placement.cc
lily/align-interface.cc
lily/all-font-metrics.cc
lily/ambitus-engraver.cc
lily/arpeggio-engraver.cc
lily/arpeggio.cc
lily/auto-beam-engraver.cc
lily/axis-group-interface-scheme.cc
lily/axis-group-interface.cc
lily/bar-check-iterator.cc
lily/beam-engraver.cc
lily/beam-performer.cc
lily/beam-quanting.cc
lily/beam.cc
lily/beaming-info.cc
lily/bezier.cc
lily/book-scheme.cc
lily/book.cc
lily/box.cc
lily/break-algorithm.cc
lily/break-align-engraver.cc
lily/break-align-interface.cc
lily/break-substitution.cc
lily/change-iterator.cc
lily/chord-tremolo-engraver.cc
lily/clef-engraver.cc
lily/cluster.cc
lily/coherent-ligature-engraver.cc
lily/completion-note-heads-engraver.cc
lily/context-def.cc
lily/context-property.cc
lily/context.cc
lily/custos-engraver.cc
lily/default-actions.cc [deleted file]
lily/default-bar-line-engraver.cc
lily/dot-column-engraver.cc
lily/dot-column.cc
lily/drum-note-engraver.cc
lily/drum-note-performer.cc
lily/dynamic-engraver.cc
lily/dynamic-performer.cc
lily/dynamic-text-spanner.cc
lily/easy-notation.cc
lily/engraver-group-engraver.cc
lily/engraver.cc
lily/extender-engraver.cc
lily/file-name-map.cc
lily/fingering-engraver.cc
lily/font-config.cc
lily/font-select.cc
lily/font-size-engraver.cc
lily/forbid-break-engraver.cc
lily/general-scheme.cc
lily/glissando-engraver.cc
lily/global-context.cc
lily/gourlay-breaking.cc
lily/grace-engraver.cc
lily/grace-music.cc
lily/gregorian-ligature-engraver.cc
lily/grid-line-interface.cc
lily/grid-line-span-engraver.cc
lily/grid-line.cc [deleted file]
lily/grid-point-engraver.cc
lily/grob-array.cc
lily/grob-info.cc
lily/grob-pq-engraver.cc
lily/grob-property.cc
lily/grob-scheme.cc
lily/grob-smob.cc
lily/grob.cc
lily/hairpin.cc
lily/hara-kiri-engraver.cc
lily/hara-kiri-group-spanner.cc
lily/horizontal-bracket-engraver.cc
lily/horizontal-bracket.cc
lily/hyphen-engraver.cc
lily/include/axis-group-engraver.hh
lily/include/beam.hh
lily/include/box.hh
lily/include/chord.hh [deleted file]
lily/include/context-def.hh
lily/include/engraver-group-engraver.hh
lily/include/file-name-map.hh
lily/include/freetype.hh
lily/include/grid-line-interface.hh
lily/include/grob-array.hh
lily/include/grob-info.hh
lily/include/grob.hh
lily/include/input.hh
lily/include/ligature-engraver.hh
lily/include/lily-guile-macros.hh
lily/include/lily-guile.hh
lily/include/lily-parser.hh
lily/include/lily-proto.hh
lily/include/line-interface.hh
lily/include/ly-smobs.icc
lily/include/mensural-ligature.hh
lily/include/mingw-compatibility.hh
lily/include/minterval.hh [deleted file]
lily/include/music-iterator.hh
lily/include/music-output.hh
lily/include/open-type-font.hh
lily/include/paper-book.hh
lily/include/paper-column-engraver.hh
lily/include/paper-column.hh
lily/include/paper-score.hh
lily/include/performer-group-performer.hh
lily/include/pointer-group-interface.hh
lily/include/profile.hh
lily/include/program-option.hh
lily/include/recording-group-engraver.hh
lily/include/score-engraver.hh
lily/include/score-performer.hh
lily/include/slur-configuration.hh
lily/include/smobs.hh
lily/include/source-file.hh
lily/include/spacing-spanner.hh
lily/include/staff-symbol-engraver.hh
lily/include/stencil.hh
lily/include/system.hh
lily/include/timing-translator.hh
lily/include/translator-dispatch-list.hh
lily/include/translator-group.hh
lily/include/translator.hh
lily/include/translator.icc
lily/include/tuplet-bracket.hh
lily/input-scheme.cc
lily/input.cc
lily/instrument-name-engraver.cc
lily/item.cc
lily/key-engraver.cc
lily/key-performer.cc
lily/key-signature-interface.cc
lily/ledger-line-engraver.cc
lily/ledger-line-spanner.cc
lily/ligature-engraver.cc
lily/lily-guile.cc
lily/lily-lexer.cc
lily/lily-parser-scheme.cc
lily/lily-parser.cc
lily/line-interface.cc
lily/line-spanner.cc
lily/lookup.cc
lily/ly-module.cc
lily/lyric-engraver.cc
lily/lyric-performer.cc
lily/main.cc
lily/mark-engraver.cc
lily/melisma-translator.cc
lily/mensural-ligature-engraver.cc
lily/midi-stream.cc
lily/module-scheme.cc
lily/moment-scheme.cc
lily/multi-measure-rest-engraver.cc
lily/music-output.cc
lily/music-scheme.cc
lily/music-sequence.cc
lily/music-wrapper.cc
lily/music.cc
lily/new-fingering-engraver.cc
lily/note-collision.cc
lily/note-column.cc
lily/note-head.cc
lily/note-heads-engraver.cc
lily/note-performer.cc
lily/note-spacing.cc
lily/object-key-dumper.cc
lily/object-key-undumper.cc
lily/open-type-font-scheme.cc
lily/open-type-font.cc
lily/ottava-bracket.cc
lily/ottava-engraver.cc
lily/output-def-scheme.cc
lily/pango-font.cc
lily/paper-book.cc
lily/paper-column-engraver.cc
lily/paper-column.cc
lily/paper-outputter-scheme.cc
lily/paper-score-scheme.cc
lily/paper-score.cc
lily/part-combine-engraver.cc
lily/percent-repeat-engraver.cc
lily/performance-scheme.cc
lily/performance.cc
lily/performer-group-performer.cc
lily/pfb.cc
lily/phrasing-slur-engraver.cc
lily/piano-pedal-engraver.cc
lily/piano-pedal-performer.cc
lily/pitch-squash-engraver.cc
lily/pitched-trill-engraver.cc
lily/pointer-group-interface.cc
lily/profile.cc
lily/program-option.cc
lily/property-iterator.cc
lily/recording-group-engraver.cc
lily/repeat-acknowledge-engraver.cc
lily/rest-collision.cc
lily/rest-engraver.cc
lily/rest.cc
lily/rhythmic-column-engraver.cc
lily/scm-hash.cc
lily/score-engraver.cc
lily/score-performer.cc
lily/score-scheme.cc
lily/score.cc
lily/script-column-engraver.cc
lily/script-engraver.cc
lily/separating-group-spanner.cc
lily/separating-line-group-engraver.cc
lily/separation-item.cc
lily/side-position-interface.cc
lily/simple-spacer.cc
lily/simultaneous-music-iterator.cc
lily/skyline.cc
lily/slash-repeat-engraver.cc
lily/slur-configuration.cc
lily/slur-engraver.cc
lily/slur-performer.cc
lily/slur-scoring.cc
lily/slur.cc
lily/smobs.cc
lily/source-file.cc
lily/spaceable-grob.cc
lily/spacing-basic.cc
lily/spacing-determine-loose-columns.cc
lily/spacing-engraver.cc
lily/spacing-loose-columns.cc
lily/spacing-spanner.cc
lily/span-arpeggio-engraver.cc
lily/span-bar.cc
lily/span-dynamic-performer.cc
lily/spanner.cc
lily/spring-smob.cc
lily/staff-collecting-engraver.cc
lily/staff-performer.cc
lily/staff-spacing.cc
lily/staff-symbol-engraver.cc
lily/stanza-number-align-engraver.cc
lily/stanza-number-engraver.cc
lily/stem-engraver.cc
lily/stem.cc
lily/stencil-expression.cc
lily/stencil-interpret.cc
lily/stencil-scheme.cc
lily/stencil.cc
lily/swallow-perf.cc
lily/system-start-delimiter.cc
lily/system.cc
lily/tab-note-heads-engraver.cc
lily/tab-staff-symbol-engraver.cc
lily/tempo-performer.cc
lily/text-metrics.cc
lily/text-spanner-engraver.cc
lily/tie-column.cc
lily/tie-engraver.cc
lily/tie-performer.cc
lily/tie.cc
lily/time-signature-engraver.cc
lily/time-signature.cc
lily/timing-translator.cc
lily/translator-dispatch-list.cc
lily/translator-group-ctors.cc
lily/translator-group.cc
lily/translator.cc
lily/trill-spanner-engraver.cc
lily/ttf.cc
lily/tuplet-bracket.cc
lily/tuplet-engraver.cc
lily/type-swallow-translator.cc
lily/unfolded-repeat-iterator.cc
lily/vaticana-ligature-engraver.cc
lily/vertical-align-engraver.cc
lily/vertically-spaced-context-engraver.cc
lily/volta-bracket.cc
lily/volta-engraver.cc
lily/volta-repeat-iterator.cc

index f87cd78f6fb87e36024c120d8e1c62e830a90fa3..a7fa1361bc237cb59a6873f04cc56815bdc718dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2005-08-12  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * Remove obsolete files.  Nitpick run.
+
        * lily/lily-guile.cc (parse_symbol_list): Bugfix.
 
 2005-08-11  Jan Nieuwenhuizen  <janneke@gnu.org>
index 1075a52229a963ae29576c913d65928c6b874325..dc00e573c79e718a42ef94707dfd51905d54d1f1 100644 (file)
@@ -78,6 +78,9 @@ rules = {
        ('(return|=) (\*|&|-|!) ([\w\(])', '\\1 \\2\\3'),
        # space after `operator'
        ('(\Woperator) *([^\w\s])', '\\1 \\2'),
+       # delete gratuitous block
+       ('''\n(    |\t)\s*{\n\s*(.*?)(?![{}]|\b(do|for|else|if|switch|while)\b);\n\s*}''',
+        '\n\\2;'),
        # dangling brace close
        ('\n[ \t]*(\n[ \t]*})', '\\1'),
        # dangling newline
@@ -92,7 +95,7 @@ rules = {
        # dangling semicolon
        ('\n[ \t]*;', ';'),
        # delete gratuitous blocks
-       ('''(?ux)\n([    ]|\t\s*){\n\s*(.*?)(?![{}]|\b(do|for|else|if|switch|while)\b);\n\s*}''',
+       ('''xx\n([    ]|\t)\s*{\n\s*(.*?)(?![{}]|\b(do|for|else|if|switch|while)\b);\n\s*}''',
         '\n\\2;'),
        # brace open
        ('(\w)[ \t]*([^\s]*){([ \t]*\n)', '\\1\\2\n{\n'),
@@ -595,22 +598,9 @@ i
 {
   if (foo)
     {
-    a = 1;
+      a = 1;
     }
 }
-
-           if (prev_delta_pitch < - 1)
-             {
-               glyph_name = "svaticana.reverse.plica";
-             }
-           if (prev_delta_pitch < - 1)
-             {
-               glyph_name = svaticana.reverse.plica;
-             }
-           if (prev_delta_pitch < - 1)
-             {
-               glyph_name = "2";
-             }
 '''
 
 def test ():
index b216b8a1e4f95c0941b90271a3cf35f051d44e67..c173b087bcbb664ea28d19a14050e82b4f7d5beb 100644 (file)
@@ -54,5 +54,4 @@ extern "C" {
     buf[0] = (char) c;
     return Memory_out_stream::writer (file, buf, 1);
   }
-
 } /* extern C */
index ea36d4802bfbddcd61613ce65cf34f21dfe95dbe..af0cac2c2c2c0553689d2f9eb2dfcaf9fe4982bd 100644 (file)
@@ -79,7 +79,6 @@ File_name::to_string () const
   return s;
 }
 
-
 File_name::File_name (String file_name)
 {
 #ifdef __CYGWIN__
index ddadfaca5bd0a43190f58f84d48389fc8abf0bd1..780361848374835fec193716f8916ec2203a85b6 100644 (file)
@@ -55,8 +55,8 @@ is_file (String file_name)
   struct stat sbuf;
   if (stat (file_name.to_str0 (), &sbuf) != 0)
     return false;
-  
-  if (!(sbuf.st_mode & __S_IFREG))
+
+  if (! (sbuf.st_mode & __S_IFREG))
     return false;
 #endif
 
@@ -64,7 +64,7 @@ is_file (String file_name)
   struct stat sbuf;
   if (stat (file_name.to_str0 (), &sbuf) != 0)
     return false;
-  
+
   return !S_ISDIR (sbuf.st_mode);
 #endif
 
@@ -73,7 +73,7 @@ is_file (String file_name)
       fclose (f);
       return true;
     }
-  
+
   return false;
 }
 
@@ -84,7 +84,7 @@ is_dir (String file_name)
   struct stat sbuf;
   if (stat (file_name.to_str0 (), &sbuf) != 0)
     return false;
-  
+
   return S_ISDIR (sbuf.st_mode);
 #endif
 
@@ -120,7 +120,7 @@ File_path::find (String name) const
   File_name file_name (name);
   if (file_name.dir_[0] == DIRSEP && is_file (file_name.to_string ()))
     return file_name.to_string ();
-  
+
   for (int i = 0; i < dirs_.size (); i++)
     {
       File_name file_name (name);
@@ -129,7 +129,7 @@ File_path::find (String name) const
       dir.root_ = "";
       if (file_name.dir_.is_empty ())
        file_name.dir_ = dir.to_string ();
-      else if (!dir.to_string ().is_empty())
+      else if (!dir.to_string ().is_empty ())
        file_name.dir_ = dir.to_string ()
          + ::to_string (DIRSEP) + file_name.dir_;
       if (is_file (file_name.to_string ()))
@@ -141,7 +141,7 @@ File_path::find (String name) const
 /*
   Try to find
 
-    file.EXT,
+  file.EXT,
 
   where EXT is from EXTENSIONS.
 */
@@ -163,7 +163,7 @@ File_path::find (String name, char const *extensions[])
          if (!find (file_name.to_string ()).is_empty ())
            break;
        }
-      
+
       /* Reshuffle extension */
       file_name = File_name (file_name.to_string ());
     }
@@ -191,7 +191,7 @@ File_path::to_string () const
   for (int i = 0; i < dirs_.size (); i++)
     {
       s = s + dirs_[i];
-      if (i < dirs_.size() - 1)
+      if (i < dirs_.size () - 1)
        s += ::to_string (PATHSEP);
     }
   return s;
index f97b0bb2c439a55bb93061229debc64bbe727b15..5db40734be59e2df5b52ac21438a01f41a713854 100644 (file)
@@ -241,9 +241,7 @@ Getopt_long::operator () ()
          return parseshort ();
        }
       else
-       {
-         return 0;
-       }
+       return 0;
     }
 }
 
index 571e4a74dbba4bba010f787e3ea65e47e52d81bd..3945df90ed12bd2971f08cafaa47d4954e517b5e 100644 (file)
@@ -2,14 +2,13 @@
 extern "C" {
 #endif
 
-
 #include <stdio.h>
 #include <unistd.h>
 
 #if (! defined (__off64_t) && ! defined (__off64_t_defined)) || ! defined (__cplusplus)
 #define off64_t unsigned long long
 #endif
+
   typedef struct
   {
     ssize_t (*read) (void *, char *, size_t);
@@ -18,7 +17,6 @@ extern "C" {
     int (*close) (void *);
   } lily_cookie_io_functions_t;
 
-
   void *lily_fopencookie (void *cookie, char const *modes,
                          lily_cookie_io_functions_t io_funcs);
 
index 918b981cf343ccca7ad05ad1f7c7b6297989693f..780b74c0dd3f80c5070675af5a9cbdf033ed5970 100644 (file)
@@ -23,7 +23,7 @@
 
 class File_path
 {
-  Array<String> dirs_; 
+  Array<String> dirs_;
 public:
   Array<String> directories () const;
   String find (String name) const;
index a3a1a511f0de492f1eb46d513a871dee2e8c16db..6fa3b32b8885f7ea5409be5b21e994d63daa3ad7 100644 (file)
@@ -24,7 +24,7 @@ inline SCM scm_car (SCM x)
     abort ();
   return SCM_CAR (x);
 }
-#define SCM_I_CONSP(x) SCM_CONSP(x)
+#define SCM_I_CONSP(x) SCM_CONSP (x)
 inline SCM scm_caar (SCM x) { return SCM_CAAR (x); }
 inline SCM scm_cdar (SCM x) { return SCM_CDAR (x); }
 inline SCM scm_cadr (SCM x) { return SCM_CADR (x); }
index a6a92f204de580a6be177361b240495e7eb21c52..2d3bf4128114466bced1d52c9eb6c69350018410 100644 (file)
@@ -74,7 +74,7 @@ struct Interval_t : public Drul_array<T>
     : Drul_array<T> (src)
   {
   }
-  
+
   Interval_t (T m, T M) : Drul_array<T> (m, M)
   {
   }
index 9aa70e4f190fc42e31899f48e711111ff9e0cd2a..6426b90b025cc63755a8c1aa35c95ede91ea953a 100644 (file)
@@ -102,7 +102,6 @@ Interval_t<T>::intersect (Interval_t<T> h)
 }
 
 
-
 template<class T>
 String
 Interval_t<T>::to_string () const
index 470eff774acbf1a351194ab0b7d2473fad723450..ff85fef84101b280a3a242564723b12f20e676ed 100644 (file)
@@ -36,7 +36,6 @@ int isinf (double x);
 #endif
 #endif
 
-
 #if ! HAVE_MEMRCHR
 unsigned char *memrchr (unsigned char const *p, int n, char c);
 #endif
index ee3922585592da07bb0fd3dd15f47880fdbab1f5..3e2c9bdd75b88ebba2418b922bacd9afc35c84ee 100644 (file)
@@ -104,9 +104,7 @@ public:
       if (new_p)
        elem_ref (i) = new_p;
       else
-       {
-         unordered_del (i);
-       }
+       unordered_del (i);
   }
   void default_sort ()
   {
index 7f6a7c21254d8fbcafa71b6a675eeadfc941a797..3003339ee9594962c73ff28a6e070e9f46cf5bb7 100644 (file)
@@ -171,8 +171,8 @@ typedef struct _t_ligature
  */
 typedef struct
 {
-  int code,                                            /* key: C */
-    wx,                                        /* key: WX */
+  int code,                                            /* key: C */
+    wx,                                                /* key: WX */
     wy;                /* together wx and wy are associated with key: W */
   char *name;  /* key: N */
   AFM_BBox charBBox;   /* key: B */
index 548f66372466d9a8a6bf29828241a31d90d7dd71..ae750e5ac83c2a5afe2d1556376e7b1b1f76370e 100644 (file)
@@ -73,10 +73,7 @@ public:
            j = i / 2;
          }
        else
-
-         {
-           break;
-         }
+         break;
       }
     elt (i) = v;
     OK ();
index 8a62bbceb92f5f93372155cfddb413a841886e12..966406f60879fef206fbf1886df12c721f24ab84 100644 (file)
@@ -28,13 +28,11 @@ template<class T> inline int sign (T x)
   return 0;
 }
 
-
 template<class T> inline T sqr (T x)
 {
   return x * x;
 }
 
-
 inline Real
 distance (Real x, Real y)
 {
index 47113cc06de944f50b38419f22b5a647dccbb81b..c7746c84f8aad671bc28638c8145faa6587eeb49 100644 (file)
@@ -24,10 +24,10 @@ demangle_classname (std::type_info const &);
    VIRTUAL_COPY_CONSTRUCTOR (Baseclass, Foo);
    }; */
 
-#define VIRTUAL_COPY_CONSTRUCTOR(Base, name)                   \
-  virtual Base *clone () const                                 \
-  {                                                            \
-    return new name (*this);                                   \
+#define VIRTUAL_COPY_CONSTRUCTOR(Base, name)   \
+  virtual Base *clone () const                 \
+  {                                            \
+    return new name (*this);                   \
   }
 
 #endif /* VIRTUAL_METHODS_HH */
index ffb7440809b29ae17c6cfce661fedb980a0cd29c..60f553b588e338eeeef7159a29bbaef9fb29df1e 100644 (file)
@@ -1171,9 +1171,7 @@ AFM_free (AFM_Font_info *fi)
        {
          free (fi->ccd[i].ccName);
          for (j = 0; j < fi->ccd[i].numOfPieces; j++)
-           {
-             free (fi->ccd[i].pieces[j].AFM_PccName);
-           }
+           free (fi->ccd[i].pieces[j].AFM_PccName);
          free (fi->ccd[i].pieces);
        }
       free (fi->ccd);
index 9ab8dcc4cdce191bebf014fc18a2f5028bc1108b..5bcf7b39609396fe56908822e8190d209c12db31 100644 (file)
@@ -24,7 +24,6 @@ Rational::operator bool () const
   return sign_ && num_;
 }
 
-
 #ifdef STREAM_SUPPORT
 ostream &
 operator << (ostream &o, Rational r)
@@ -171,7 +170,7 @@ Rational::operator += (Rational r)
     *this = r;
   else
     {
-      int lcm =  (den_ / gcd (r.den_, den_)) * r.den_;
+      int lcm = (den_ / gcd (r.den_, den_)) * r.den_;
       int n = sign_ * num_ * (lcm / den_) + r.sign_ * r.num_ * (lcm / r.den_);
       int d = lcm;
       sign_ = ::sign (n) * ::sign (d);
index 8f34cf44adc5e7cb51a14e8c4a59b3df0c7d0361..24ba1e2feaa242127a9d359c541afccb49042551 100644 (file)
@@ -132,7 +132,6 @@ String::to_bytes () const
 }
 
 
-
 Byte *
 String::get_bytes ()
 {
@@ -262,9 +261,7 @@ String::index_any (String set) const
     {
       char *found = (char *) memchr (me, set[i], n);
       if (found)
-       {
-         return found - (char const *)me;
-       }
+       return found - (char const *)me;
     }
   return -1;
 }
index 6786e26b3b8ba2cb7532525960524f68055b7d95..eb4efce0e920032df870ed61b1f8c8975f799380 100644 (file)
@@ -52,7 +52,7 @@ class Accidental_engraver : public Engraver
   void create_accidental (Accidental_entry *entry, bool, bool);
   Grob *make_standard_accidental (Music *note, Grob *note_head, Engraver *trans);
   Grob *make_suggested_accidental (Music *note, Grob *note_head, Engraver *trans);
-  
+
 protected:
   TRANSLATOR_DECLARATIONS (Accidental_engraver);
   void process_music ();
@@ -61,7 +61,7 @@ protected:
   void acknowledge_arpeggio (Grob_info);
   void acknowledge_rhythmic_head (Grob_info);
   void acknowledge_finger (Grob_info);
-  
+
   void stop_translation_timestep ();
   virtual void initialize ();
   void process_acknowledged ();
@@ -84,7 +84,6 @@ public:
   Array<Accidental_entry> accidentals_;
   Link_array<Spanner> ties_;
 
-
 };
 
 /*
@@ -362,9 +361,7 @@ Accidental_engraver::process_acknowledged ()
          /* Cannot look for ties: it's not guaranteed that they reach
             us before the notes. */
          if (num)
-           {
-             create_accidental (&accidentals_[i], num > 1, cautionary);
-           }
+           create_accidental (&accidentals_[i], num > 1, cautionary);
        }
     }
 }
@@ -377,15 +374,14 @@ Accidental_engraver::create_accidental (Accidental_entry *entry,
   Music *note = entry->melodic_;
   Grob *support = entry->head_;
   Pitch *pitch = unsmob_pitch (note->get_property ("pitch"));
-  
-  
+
   bool as_suggestion = to_boolean (entry->origin_->get_property ("suggestAccidentals"));
   Grob *a = 0;
   if (as_suggestion)
     a = make_suggested_accidental (note, support, entry->origin_engraver_);
   else
     a = make_standard_accidental (note, support, entry->origin_engraver_);
+
   SCM accs = scm_cons (scm_from_int (pitch->get_alteration ()),
                       SCM_EOL);
   if (restore_natural)
@@ -393,12 +389,11 @@ Accidental_engraver::create_accidental (Accidental_entry *entry,
       if (to_boolean (get_property ("extraNatural")))
        accs = scm_cons (scm_from_int (0), accs);
     }
-  
+
   /* TODO: add cautionary option in accidental. */
   if (cautionary)
     a->set_property ("cautionary", SCM_BOOL_T);
 
-
   a->set_property ("accidentals", accs);
   entry->accidental_ = a;
 }
@@ -408,7 +403,7 @@ Accidental_engraver::make_standard_accidental (Music *note,
                                               Grob *support,
                                               Engraver *trans)
 {
-  
+
   /*
     We construct the accidentals at the originating Voice
     level, so that we get the property settings for
@@ -435,25 +430,23 @@ Accidental_engraver::make_standard_accidental (Music *note,
     accidental_placement_ = make_item ("AccidentalPlacement",
                                       a->self_scm ());
   Accidental_placement::add_accidental (accidental_placement_, a);
-  
+
   support->set_object ("accidental-grob", a->self_scm ());
 
   return a;
 }
 
-
 Grob *
 Accidental_engraver::make_suggested_accidental (Music *note,
-                                                  Grob *note_head, Engraver *trans)
+                                               Grob *note_head, Engraver *trans)
 {
-  
+
   Grob *a
     = make_grob_from_properties (trans,
                                 ly_symbol2scm ("AccidentalSuggestion"),
                                 note->self_scm (),
                                 "AccidentalSuggestion");
 
-  
   Side_position_interface::add_support (a, note_head);
   if (Grob *stem = unsmob_grob (a->get_object ("stem")))
     {
@@ -464,7 +457,6 @@ Accidental_engraver::make_suggested_accidental (Music *note,
   return a;
 }
 
-
 void
 Accidental_engraver::finalize ()
 {
@@ -556,10 +548,10 @@ Accidental_engraver::acknowledge_rhythmic_head (Grob_info info)
     {
       /*
        String harmonics usually don't have accidentals.
-       */
+      */
       if (to_boolean (get_property ("harmonicAccidentals"))
          || !ly_is_equal (info.grob ()->get_property ("style"),
-                           ly_symbol2scm ("harmonic")))
+                          ly_symbol2scm ("harmonic")))
        {
          Accidental_entry entry;
          entry.head_ = info.grob ();
@@ -600,7 +592,6 @@ Accidental_engraver::process_music ()
     update_local_key_signature ();
 }
 
-
 ADD_ACKNOWLEDGER (Accidental_engraver, arpeggio);
 ADD_ACKNOWLEDGER (Accidental_engraver, finger);
 ADD_ACKNOWLEDGER (Accidental_engraver, rhythmic_head);
index 92c7e98c994693185975ec968c84c30c8e7b1d10..5265461bee104393176a05423f21f22acbdb97b9 100644 (file)
@@ -337,9 +337,7 @@ Accidental_placement::position_accidentals (Grob *me)
       Interval y;
 
       for (int j = apes[i]->extents_.size (); j--;)
-       {
-         y.unite (apes[i]->extents_[j][Y_AXIS]);
-       }
+       y.unite (apes[i]->extents_[j][Y_AXIS]);
       apes[i]->vertical_extent_ = y;
       total.unite (y);
     }
@@ -390,9 +388,7 @@ Accidental_placement::position_accidentals (Grob *me)
     {
       Accidental_placement_entry *ape = apes[i];
       for (int j = ape->grobs_.size (); j--;)
-       {
-         ape->grobs_[j]->translate_axis (ape->offset_, X_AXIS);
-       }
+       ape->grobs_[j]->translate_axis (ape->offset_, X_AXIS);
     }
 
   Interval left_extent, right_extent;
index 2f9a52aae9bbd23127d5fae5ff03e9ed02f31794..b7fe37c47593abdeb124e8577c2540c607792cbd 100644 (file)
@@ -23,9 +23,7 @@ Align_interface::alignment_callback (SCM element_smob, SCM axis)
   Axis ax = (Axis)scm_to_int (axis);
   Grob *par = me->get_parent (ax);
   if (par && !to_boolean (par->get_property ("positioning-done")))
-    {
-      Align_interface::align_elements_to_extents (par, ax);
-    }
+    Align_interface::align_elements_to_extents (par, ax);
   return scm_from_double (0.0);
 }
 
@@ -37,9 +35,7 @@ Align_interface::fixed_distance_alignment_callback (SCM element_smob, SCM axis)
   Axis ax = (Axis)scm_to_int (axis);
   Grob *par = me->get_parent (ax);
   if (par && !to_boolean (par->get_property ("positioning-done")))
-    {
-      Align_interface::align_to_fixed_distance (par, ax);
-    }
+    Align_interface::align_to_fixed_distance (par, ax);
   return scm_from_double (0.0);
 }
 
@@ -61,8 +57,8 @@ Align_interface::align_to_fixed_distance (Grob *me, Axis a)
 
   extract_grob_set (me, "elements", elem_source);
 
-  Link_array<Grob> elems  (elem_source); // writable..
-  
+  Link_array<Grob> elems (elem_source); // writable..
+
   Real where_f = 0;
 
   Interval v;
@@ -99,9 +95,7 @@ Align_interface::align_to_fixed_distance (Grob *me, Axis a)
     TODO: support self-alignment-{Y, X}
   */
   for (int i = 0; i < translates.size (); i++)
-    {
-      elems[i]->translate_axis (translates[i] - v.center (), a);
-    }
+    elems[i]->translate_axis (translates[i] - v.center (), a);
 }
 
 /*
@@ -127,9 +121,9 @@ Align_interface::align_elements_to_extents (Grob *me, Axis a)
       && me_spanner
       && me_spanner->get_bound (LEFT)->break_status_dir () == CENTER)
     {
-      me_spanner->warning (_("vertical alignment called before line-breaking. Only do cross-staff spanners with PianoStaff."));
+      me_spanner->warning (_ ("vertical alignment called before line-breaking. Only do cross-staff spanners with PianoStaff."));
     }
-  
+
   me->set_property ("positioning-done", SCM_BOOL_T);
 
   SCM d = me->get_property ("stacking-dir");
@@ -212,9 +206,7 @@ Align_interface::align_elements_to_extents (Grob *me, Axis a)
       while (j < all_grobs.size ())
        {
          if (i < elems.size () && all_grobs[j] == elems[i])
-           {
-             w = translates[i++];
-           }
+           w = translates[i++];
          all_translates.push (w);
          j++;
        }
@@ -257,7 +249,6 @@ Align_interface::set_axis (Grob *me, Axis a)
     }
 
   ga->set_ordered (true);
-  
 }
 
 /*
index bc21a30ea8c864dabe11590d09cda8153ebcfe4f..abe7c742bb917bfcdf570feb7320bb3a89b18587 100644 (file)
@@ -76,7 +76,7 @@ All_font_metrics::find_pango_font (PangoFontDescription *description,
     {
       if (be_verbose_global)
        progress_indication ("[" + String (pango_fn));
-      
+
       Pango_font *pf = new Pango_font (pango_ft2_fontmap_,
                                       RIGHT,
                                       description,
index 9ab212e7108876b0b68e8dd8a48e10cf4b14b883..803598ff3f3484d054522ed6ed419c0332972722 100644 (file)
@@ -58,7 +58,7 @@ Ambitus_engraver::create_ambitus ()
       accidentals_[d] = make_item ("AmbitusAccidental", SCM_EOL);
       accidentals_[d]->set_parent (heads_[d], Y_AXIS);
       heads_[d]->set_object ("accidental-grob",
-                              accidentals_[d]->self_scm ());
+                            accidentals_[d]->self_scm ());
       Axis_group_interface::add_element (group_, heads_[d]);
       Axis_group_interface::add_element (group_, accidentals_[d]);
       Side_position_interface::add_support (accidentals_[d], heads_[d]);
@@ -148,7 +148,7 @@ Ambitus_engraver::finalize ()
 
          int sig_alter = (handle != SCM_BOOL_F)
            ? scm_to_int (scm_cdr (handle)) : 0;
-         
+
          if (sig_alter == p.get_alteration ())
            {
              accidentals_[d]->suicide ();
@@ -158,13 +158,12 @@ Ambitus_engraver::finalize ()
            {
              SCM l = scm_list_1 (scm_from_int (p.get_alteration ()));
              accidentals_[d]->set_property ("accidentals", l);
-                       
            }
        }
       while (flip (&d) != DOWN);
 
       ambitus_->set_object ("note-heads", scm_list_2 (heads_[DOWN]->self_scm (),
-                                                       heads_[UP]->self_scm ()));
+                                                     heads_[UP]->self_scm ()));
     }
   else
     {
@@ -180,7 +179,6 @@ Ambitus_engraver::finalize ()
     }
 }
 
-
 ADD_ACKNOWLEDGER (Ambitus_engraver, note_head);
 ADD_TRANSLATOR (Ambitus_engraver,
                /* doc */ "",
index 39748228e27f4bf820cc155d61bf3e0a94fd4c7f..5c82930b4f14fdd8d49a64077c21fddadec0ba29 100644 (file)
@@ -76,7 +76,7 @@ Arpeggio_engraver::acknowledge_rhythmic_head (Grob_info info)
       Side_position_interface::add_support (arpeggio_, info.grob ());
     }
 }
+
 void
 Arpeggio_engraver::acknowledge_note_column (Grob_info info)
 {
@@ -103,12 +103,12 @@ Arpeggio_engraver::stop_translation_timestep ()
 }
 
 ADD_ACKNOWLEDGER (Arpeggio_engraver, stem)
-ADD_ACKNOWLEDGER (Arpeggio_engraver, rhythmic_head)
-ADD_ACKNOWLEDGER (Arpeggio_engraver, note_column)
-
-ADD_TRANSLATOR (Arpeggio_engraver,
-               /* doc */ "Generate an Arpeggio symbol",
-               /* create */ "Arpeggio",
-               /* accept */ "arpeggio-event",
-               /* read */ "",
-               /* write */ "");
+  ADD_ACKNOWLEDGER (Arpeggio_engraver, rhythmic_head)
+  ADD_ACKNOWLEDGER (Arpeggio_engraver, note_column)
+
+  ADD_TRANSLATOR (Arpeggio_engraver,
+                 /* doc */ "Generate an Arpeggio symbol",
+                 /* create */ "Arpeggio",
+                 /* accept */ "arpeggio-event",
+                 /* read */ "",
+                 /* write */ "");
index 5ca16b50535e547e0c06d9285572823b8a0eb612..a2757706a2ec46e91e993d00b4b38109a9c7007d 100644 (file)
@@ -26,7 +26,7 @@ Arpeggio::print (SCM smob)
   Grob *common = me;
 
   extract_grob_set (me, "stems", stems);
-  for (int i = 0;  i < stems.size(); i++)
+  for (int i = 0; i < stems.size (); i++)
     {
       Grob *stem = stems[i];
       common = common->common_refpoint (Staff_symbol_referencer::get_staff_symbol (stem),
@@ -44,7 +44,7 @@ Arpeggio::print (SCM smob)
   Interval heads;
   Real my_y = me->relative_coordinate (common, Y_AXIS);
 
-  for (int i = 0;  i < stems.size(); i++)
+  for (int i = 0; i < stems.size (); i++)
     {
       Grob *stem = stems[i];
       Grob *ss = Staff_symbol_referencer::get_staff_symbol (stem);
@@ -100,9 +100,9 @@ Arpeggio::brew_chord_bracket (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
   Grob *common = me;
-  
+
   extract_grob_set (me, "stems", stems);
-  for (int i = 0;  i < stems.size(); i++)
+  for (int i = 0; i < stems.size (); i++)
     {
       Grob *stem = stems[i];
       common = common->common_refpoint (Staff_symbol_referencer::get_staff_symbol (stem),
@@ -112,7 +112,7 @@ Arpeggio::brew_chord_bracket (SCM smob)
   Interval heads;
   Real my_y = me->relative_coordinate (common, Y_AXIS);
 
-  for (int i = 0;  i < stems.size(); i++)
+  for (int i = 0; i < stems.size (); i++)
     {
       Grob *stem = stems[i];
       Grob *ss = Staff_symbol_referencer::get_staff_symbol (stem);
@@ -141,7 +141,7 @@ Arpeggio::width_callback (SCM smob, SCM axis)
 {
   Grob *me = unsmob_grob (smob);
   (void) axis;
-  
+
   assert (scm_to_int (axis) == X_AXIS);
   Stencil arpeggio = Font_interface::get_default_font (me)->find_by_name ("scripts.arpeggio");
 
index ea763dff2e87c58deb19877ac72bc80025480a74..2a90c3e3c50b8a8a982c6b3c4666530aa7c64530 100644 (file)
@@ -20,7 +20,6 @@
 
 #include "translator.icc"
 
-
 class Auto_beam_engraver : public Engraver
 {
   TRANSLATOR_DECLARATIONS (Auto_beam_engraver);
@@ -32,12 +31,12 @@ protected:
   virtual bool try_music (Music *);
   virtual void finalize ();
   virtual void derived_mark () const;
-  
+
   DECLARE_ACKNOWLEDGER (rest);
   DECLARE_ACKNOWLEDGER (beam);
   DECLARE_ACKNOWLEDGER (bar_line);
   DECLARE_ACKNOWLEDGER (stem);
-  
+
   void process_acknowledged ();
 
 private:
@@ -80,14 +79,12 @@ private:
   void check_bar_property ();
 };
 
-
 void
 Auto_beam_engraver::derived_mark () const
 {
   scm_gc_mark (beam_settings_);
 }
 
-
 void
 Auto_beam_engraver::check_bar_property ()
 {
@@ -152,7 +149,7 @@ Auto_beam_engraver::test_moment (Direction dir, Moment test)
                     test.smobbed_copy ())
     != SCM_BOOL_F;
 }
-    
+
 void
 Auto_beam_engraver::consider_begin (Moment test_mom)
 {
@@ -192,7 +189,7 @@ Auto_beam_engraver::create_beam ()
   /*
     Can't use make_spanner_from_properties() because we have to use
     beam_settings_.
-   */
+  */
   Spanner *beam = new Spanner (beam_settings_,
                               context ()->get_grob_key ("Beam"));
 
@@ -285,9 +282,7 @@ Auto_beam_engraver::start_translation_timestep ()
     {
       Moment now = now_mom ();
       if (extend_mom_ < now)
-       {
-         end_beam ();
-       }
+       end_beam ();
     }
   forbid_ = 0;
 }
@@ -310,7 +305,6 @@ Auto_beam_engraver::finalize ()
 
 
 
-
 void
 Auto_beam_engraver::acknowledge_beam (Grob_info info)
 {
@@ -321,7 +315,7 @@ Auto_beam_engraver::acknowledge_beam (Grob_info info)
       end_beam ();
     }
 }
+
 void
 Auto_beam_engraver::acknowledge_bar_line (Grob_info info)
 {
@@ -407,7 +401,7 @@ void
 Auto_beam_engraver::process_acknowledged ()
 {
   if (extend_mom_ > now_mom ())
-    return ; 
+    return;
 
   if (!process_acknowledged_count_)
     {
@@ -421,23 +415,19 @@ Auto_beam_engraver::process_acknowledged ()
          Moment now = now_mom ();
          if ((extend_mom_ < now)
              || ((extend_mom_ == now) && (last_add_mom_ != now)))
-           {
-             end_beam ();
-           }
+           end_beam ();
          else if (!stems_->size ())
-           {
-             junk_beam ();
-           }
+           junk_beam ();
        }
     }
 
   process_acknowledged_count_++;
 }
 
-ADD_ACKNOWLEDGER (Auto_beam_engraver,stem);
-ADD_ACKNOWLEDGER (Auto_beam_engraver,bar_line);
-ADD_ACKNOWLEDGER (Auto_beam_engraver,beam);
-ADD_ACKNOWLEDGER (Auto_beam_engraver,rest);
+ADD_ACKNOWLEDGER (Auto_beam_engraver, stem);
+ADD_ACKNOWLEDGER (Auto_beam_engraver, bar_line);
+ADD_ACKNOWLEDGER (Auto_beam_engraver, beam);
+ADD_ACKNOWLEDGER (Auto_beam_engraver, rest);
 ADD_TRANSLATOR (Auto_beam_engraver,
                /* doc */ "Generate beams based on measure characteristics and observed "
                "Stems.  Uses beatLength, measureLength and measurePosition to decide "
index a5e00341b97aa260f5051889f4abb7004e9e182c..1289160891c615f617f41cf1917ca127e41a4602 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "axis-group-interface.hh"
 #include "grob.hh"
 #include "grob-array.hh"
 
-LY_DEFINE(ly_relative_group_extent, "ly:relative-group-extent",
-         3, 0, 0, (SCM elements, SCM common, SCM axis),
-         "Determine the extent of @var{elements} relative to @var{common} in the "
-         "@var{axis} direction.")
+LY_DEFINE (ly_relative_group_extent, "ly:relative-group-extent",
+          3, 0, 0, (SCM elements, SCM common, SCM axis),
+          "Determine the extent of @var{elements} relative to @var{common} in the "
+          "@var{axis} direction.")
 {
   Grob_array *ga = unsmob_grob_array (elements);
-  
-  SCM_ASSERT_TYPE(ga || scm_is_pair (elements), elements, SCM_ARG1, __FUNCTION__, "list or Grob_array");
-  SCM_ASSERT_TYPE(unsmob_grob (common), common, SCM_ARG2, __FUNCTION__, "grob");
-  SCM_ASSERT_TYPE(is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
+
+  SCM_ASSERT_TYPE (ga || scm_is_pair (elements), elements, SCM_ARG1, __FUNCTION__, "list or Grob_array");
+  SCM_ASSERT_TYPE (unsmob_grob (common), common, SCM_ARG2, __FUNCTION__, "grob");
+  SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
 
   Link_array<Grob> elts;
-  if  (!ga)
+  if (!ga)
     {
       for (SCM s = elements; scm_is_pair (s); s = scm_cdr (s))
        elts.push (unsmob_grob (scm_car (s)));
     }
-  
+
   Interval ext = Axis_group_interface::relative_group_extent (ga ? ga->array () : elts,
                                                              unsmob_grob (common),
                                                              (Axis) scm_to_int (axis));
   return ly_interval2scm (ext);
 }
-         
-         
+
index 87bb2754fef741df064f1b7d1b46a31d2dbb7ceb..3d6889c6ac3d9c828f57d6ba745756917c574cdf 100644 (file)
@@ -19,7 +19,7 @@ Axis_group_interface::add_element (Grob *me, Grob *e)
   SCM axes = me->get_property ("axes");
   if (!scm_is_pair (axes))
     programming_error ("axes should be nonempty");
-  
+
   for (SCM ax = axes; ax != SCM_EOL; ax = scm_cdr (ax))
     {
       Axis a = (Axis) scm_to_int (scm_car (ax));
@@ -29,7 +29,7 @@ Axis_group_interface::add_element (Grob *me, Grob *e)
 
       e->internal_set_object ((a == X_AXIS)
                              ? ly_symbol2scm ("axis-group-parent-X")
-                               : ly_symbol2scm ("axis-group-parent-Y"),
+                             : ly_symbol2scm ("axis-group-parent-Y"),
                              me->self_scm ());
     }
 
@@ -51,7 +51,7 @@ Axis_group_interface::relative_group_extent (Link_array<Grob> const &elts,
                                             Grob *common, Axis a)
 {
   Interval r;
-  for (int i = 0; i < elts.size(); i++)
+  for (int i = 0; i < elts.size (); i++)
     {
       Grob *se = elts[i];
       Interval dims = se->extent (common, a);
@@ -62,7 +62,6 @@ Axis_group_interface::relative_group_extent (Link_array<Grob> const &elts,
 }
 
 
-
 MAKE_SCHEME_CALLBACK (Axis_group_interface, group_extent_callback, 2);
 SCM
 Axis_group_interface::group_extent_callback (SCM element_smob, SCM scm_axis)
index 92a9dc988c0dd958eb50944058218a26aa826600..4cc905e2de26701786d2f5e131274fad933677c2 100644 (file)
@@ -40,7 +40,7 @@ Bar_check_iterator::process (Moment m)
       SCM check = tr->get_property ("ignoreBarChecks");
       if (to_boolean (check))
        return;
-      
+
       SCM mp = tr->get_property ("measurePosition");
       SCM sync = tr->get_property ("barCheckSynchronize");
 
@@ -53,7 +53,7 @@ Bar_check_iterator::process (Moment m)
          bool warn = true;
          if (to_boolean (sync))
            {
-             SCM mp; 
+             SCM mp;
              tr = tr->where_defined (ly_symbol2scm ("measurePosition"), &mp);
              Moment zero;
              tr->set_property ("measurePosition", zero.smobbed_copy ());
index c36ed795d0eb143dfbc1e95f146f986ad088582c..698b4bb7a70e73df00712077076b82eb7dab3493 100644 (file)
@@ -106,13 +106,9 @@ Beam_engraver::try_music (Music *m)
        return false;
 
       if (d == START)
-       {
-         start_ev_ = m;
-       }
+       start_ev_ = m;
       else if (d == STOP)
-       {
-         now_stop_ev_ = m;
-       }
+       now_stop_ev_ = m;
       return true;
     }
   return false;
index 86180005338497433171f08ae5ec81ab765a38da..bec8ebbf54a49c5c4e3262ff0d7d470677e966f9 100644 (file)
@@ -77,18 +77,14 @@ Beam_performer::try_music (Music *m)
       Direction d = to_dir (m->get_property ("span-direction"));
 
       if (d == START)
-       {
-         start_ev_ = m;
-       }
+       start_ev_ = m;
       else if (d == STOP)
-       {
-         now_stop_ev_ = m;
-       }
+       now_stop_ev_ = m;
       return true;
     }
   return false;
 }
 
 ADD_TRANSLATOR (Beam_performer, "", "",
-               "beam-event", "",  "");
+               "beam-event", "", "");
 
index 689cf7c2ec3d6a81c9f578643e3d7676ca27acc7..b72da881f69d408b391709a7ab29aa597223a4c0 100644 (file)
@@ -23,7 +23,7 @@ Real
 get_detail (SCM alist, SCM sym, Real def)
 {
   SCM entry = scm_assq (sym, alist);
-  
+
   if (scm_is_pair (entry))
     {
       return robust_scm2double (scm_cdr (entry), def);
@@ -35,7 +35,7 @@ void
 Beam_quant_parameters::fill (Grob *him)
 {
   SCM details = him->get_property ("details");
-  
+
   INTER_QUANT_PENALTY = get_detail (details, ly_symbol2scm ("inter-quant-penalty"), 1000.0);
   SECONDARY_BEAM_DEMERIT = get_detail (details, ly_symbol2scm ("secondary-beam-demerit"), 10.0);
   STEM_LENGTH_DEMERIT_FACTOR = get_detail (details, ly_symbol2scm ("stem-length-demerit-factor"), 5);
@@ -101,10 +101,9 @@ Beam::quanting (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
 
-
   Beam_quant_parameters parameters;
   parameters.fill (me);
-  
+
   SCM s = me->get_property ("positions");
   Real yl = scm_to_double (scm_car (s));
   Real yr = scm_to_double (scm_cdr (s));
@@ -195,7 +194,7 @@ Beam::quanting (SCM smob)
   bool is_knee = dirs_found[LEFT] && dirs_found[RIGHT];
 
   int region_size = (int) parameters.REGION_SIZE;
-  
+
   /*
     Knees are harder, lets try some more possibilities for knees.
   */
@@ -279,10 +278,10 @@ Beam::quanting (SCM smob)
       }
 
   int best_idx = best_quant_score_idx (qscores);
-  
+
 #if DEBUG_QUANTING
   SCM inspect_quants = me->get_property ("inspect-quants");
-  if ( to_boolean (me->get_layout ()->lookup_variable (ly_symbol2scm ("debug-beam-quanting")))
+  if (to_boolean (me->get_layout ()->lookup_variable (ly_symbol2scm ("debug-beam-quanting")))
       && scm_is_pair (inspect_quants))
     {
       Drul_array<Real> ins = ly_scm2interval (inspect_quants);
@@ -306,7 +305,7 @@ Beam::quanting (SCM smob)
   if (best_idx < 0)
     {
       warning (_ ("no feasible beam position"));
-      me->set_property ("positions", ly_interval2scm (Interval (0,0)));
+      me->set_property ("positions", ly_interval2scm (Interval (0, 0)));
     }
   else
     me->set_property ("positions",
@@ -336,8 +335,7 @@ Beam::score_stem_lengths (Link_array<Grob> const &stems,
                          bool knee,
                          Real yl, Real yr,
 
-                         Beam_quant_parameters const*parameters
-                         )
+                         Beam_quant_parameters const *parameters)
 {
   Real limit_penalty = parameters->STEM_LENGTH_LIMIT_PENALTY;
   Drul_array<Real> score (0, 0);
@@ -358,7 +356,7 @@ Beam::score_stem_lengths (Link_array<Grob> const &stems,
       Stem_info info = stem_infos[i];
       Direction d = info.dir_;
 
-      score[d] += limit_penalty * max (0.0,  (d * (info.shortest_y_ - current_y)));
+      score[d] += limit_penalty * max (0.0, (d * (info.shortest_y_ - current_y)));
 
       Real ideal_diff = d * (current_y - info.ideal_y_);
       Real ideal_score = shrink_extra_weight (ideal_diff, 1.5);
@@ -389,8 +387,8 @@ Beam::score_slopes_dy (Real yl, Real yr,
                       Real dy_mus, Real dy_damp,
                       Real dx,
                       bool xstaff,
-                      
-                      Beam_quant_parameters const*parameters)
+
+                      Beam_quant_parameters const *parameters)
 {
   Real dy = yr - yl;
   Real dem = 0.0;
@@ -408,7 +406,7 @@ Beam::score_slopes_dy (Real yl, Real yr,
       dem += parameters->DAMPING_DIRECTION_PENALTY;
     }
 
-  dem += parameters->MUSICAL_DIRECTION_FACTOR * max (0.0, (fabs (dy) - fabs (dy_mus)));
+  dem += parameters->MUSICAL_DIRECTION_FACTOR *max (0.0, (fabs (dy) - fabs (dy_mus)));
 
   Real slope_penalty = parameters->IDEAL_SLOPE_FACTOR;
 
@@ -442,8 +440,8 @@ Beam::score_forbidden_quants (Real yl, Real yr,
                              Real thickness, Real beam_translation,
                              Drul_array<int> beam_counts,
                              Direction ldir, Direction rdir,
-                             
-                             Beam_quant_parameters const*parameters)
+
+                             Beam_quant_parameters const *parameters)
 {
   Real dy = yr - yl;
   Drul_array<Real> y (yl, yr);
index 6c6ed15546af8f95b717cd86da520e82847c41d0..23311ef5517fcd06f37289e882a87b4494c5f8f1 100644 (file)
@@ -90,7 +90,7 @@ Beam::get_beam_count (Grob *me)
   int m = 0;
 
   extract_grob_set (me, "stems", stems);
-  for (int i = 0; i < stems.size(); i++)
+  for (int i = 0; i < stems.size (); i++)
     {
       Grob *stem = stems[i];
       m = max (m, (Stem::beam_multiplicity (stem).length () + 1));
@@ -271,9 +271,7 @@ Beam::connect_beams (Grob *me)
        }
 
       if (i == stems.size () -1)
-       {
-         scm_set_cdr_x (this_beaming, SCM_EOL);
-       }
+       scm_set_cdr_x (this_beaming, SCM_EOL);
 
       if (scm_ilength (scm_cdr (this_beaming)) > 0)
        {
@@ -343,7 +341,7 @@ Beam::print (SCM grob)
   for (int i = 0; i <= stems.size (); i++)
     {
       Grob *stem = (i < stems.size ()) ? stems[i] : 0;
-      
+
       SCM this_beaming = stem ? stem->get_property ("beaming") : SCM_EOL;
       Real xposn = stem ? stem->relative_coordinate (xcommon, X_AXIS) : 0.0;
       Real stem_width = stem ? robust_scm2double (stem->get_property ("thickness"), 1.0) * lt : 0;
@@ -365,32 +363,25 @@ Beam::print (SCM grob)
        {
          int b = scm_to_int (scm_car (s));
          if (scm_c_memq (scm_car (s), right) != SCM_BOOL_F)
-           {
-             full_beams.push (b);
-           }
+           full_beams.push (b);
          else
-           {
-             lfliebertjes.push (b);
-           }
+           lfliebertjes.push (b);
        }
       for (SCM s = right;
           scm_is_pair (s); s = scm_cdr (s))
        {
          int b = scm_to_int (scm_car (s));
          if (scm_c_memq (scm_car (s), left) == SCM_BOOL_F)
-           {
-             rfliebertjes.push (b);
-           }
+           rfliebertjes.push (b);
        }
 
       Drul_array<Real> break_overshoot
        = robust_scm2drul (me->get_property ("break-overshoot"),
                           Drul_array<Real> (-0.5, 0.0));
 
-      
       Real w = (i > 0 && stem)
        ? (xposn - last_xposn)
-       : break_overshoot[(i==0) ? LEFT: RIGHT];
+       : break_overshoot[ (i == 0) ? LEFT : RIGHT];
 
       Real stem_offset = 0.0;
       if (i > 0)
@@ -853,9 +844,7 @@ Beam::least_squares (SCM smob)
          pos[-d] = -pos[d];
        }
       else
-       {
-         pos = ideal;
-       }
+       pos = ideal;
 
       /*
        For broken beams this doesn't work well. In this case, the
@@ -1302,12 +1291,12 @@ Beam::rest_collision_callback (SCM element_smob, SCM axis)
   else
     {
       /*
-       UGH. TODO: fix dependency tracking. 
-       */ 
+       UGH. TODO: fix dependency tracking.
+      */
       position_beam (beam);
       pos = ly_scm2interval (beam->get_property ("positions"));
     }
-                  
+
   Real staff_space = Staff_symbol_referencer::staff_space (rest);
 
   scale_drul (&pos, staff_space);
index 1165148b9415e729fc9ca56709c8a9d6d9d9d948..4cc9390996f5b933d7b59868d8ee12014cb04fa6 100644 (file)
@@ -27,7 +27,7 @@ const int at_beat = 1 << 15;
 int
 Beaming_info_list::best_splitpoint_index (Moment &beat_length, bool subdivide) const
 {
-  int minden = INT_MAX;        
+  int minden = INT_MAX;
   int minidx = -1;
   Moment beat_pos;
 
index 9c60903bc10b8c7de22a9484f47c089637d185a8..26ad982419ac2f344db62fd40b61a63e2e572a75 100644 (file)
@@ -12,7 +12,7 @@
 #include "warn.hh"
 #include "libc-extension.hh"
 
-Real binomial_coefficient_3[] = {1,3 ,3, 1};
+Real binomial_coefficient_3[] = {1, 3, 3, 1};
 
 Real
 binomial_coefficient (Real over, int under)
@@ -92,14 +92,14 @@ Bezier::curve_coordinate (Real t, Axis a) const
   one_min_tj[0] = 1;
   for (int i = 1; i < 4; i++)
     {
-      one_min_tj[i] = one_min_tj[i-1] * (1-t);
+      one_min_tj[i] = one_min_tj[i - 1] * (1 - t);
     }
 
   Real r = 0.0;
   for (int j = 0; j < 4; j++)
     {
       r += control_[j][a] * binomial_coefficient_3[j]
-       * tj * one_min_tj[3-j];
+       * tj * one_min_tj[3 - j];
 
       tj *= t;
     }
@@ -115,14 +115,14 @@ Bezier::curve_point (Real t) const
   one_min_tj[0] = 1;
   for (int i = 1; i < 4; i++)
     {
-      one_min_tj[i] = one_min_tj[i-1] * (1-t);
+      one_min_tj[i] = one_min_tj[i - 1] * (1 - t);
     }
 
   Offset o;
   for (int j = 0; j < 4; j++)
     {
       o += control_[j] * binomial_coefficient_3[j]
-       * tj * one_min_tj[3-j];
+       * tj * one_min_tj[3 - j];
 
       tj *= t;
     }
@@ -139,14 +139,14 @@ Bezier::curve_point (Real t) const
   Cache binom(3,j) t^j (1-t)^{3-j}
 */
 static struct Polynomial bezier_term_cache[4];
-static bool  done_cache_init;
+static bool done_cache_init;
 
 void
 init_polynomial_cache ()
 {
-  for (int j = 0; j <= 3;  j++)
-    bezier_term_cache[j] =
-      binomial_coefficient_3[j]
+  for (int j = 0; j <= 3; j++)
+    bezier_term_cache[j]
+      binomial_coefficient_3[j]
       * Polynomial::power (j, Polynomial (0, 1))
       * Polynomial::power (3 - j, Polynomial (1, -1));
   done_cache_init = true;
@@ -157,9 +157,9 @@ Bezier::polynomial (Axis a) const
 {
   if (!done_cache_init)
     init_polynomial_cache ();
-  
+
   Polynomial p (0.0);
-  Polynomial q ;
+  Polynomial q;
   for (int j = 0; j <= 3; j++)
     {
       q = bezier_term_cache[j];
index 541269be6137f8bc1e961b3a4bafcd5768aaf6b6..c6fb9a4ffa4c1de992a1f06f402e27843af75b50 100644 (file)
@@ -30,7 +30,6 @@ LY_DEFINE (ly_make_book, "ly:make-book",
 
   book->scores_ = scm_append (scm_list_2 (scores, book->scores_));
 
-  
   SCM x = book->self_scm ();
   book->unprotect ();
   return x;
index 82d919f0e265f751f0c8105eb29df1995c5164ec..631798e9cd0aa168f358d905a51feea0d91364c7 100644 (file)
@@ -75,8 +75,8 @@ Book::add_score (SCM s)
 }
 
 /* Concatenate all score outputs into a Paper_book
-   
- */
+
+*/
 Paper_book *
 Book::process (Output_def *default_paper,
               Output_def *default_layout)
@@ -87,14 +87,14 @@ Book::process (Output_def *default_paper,
        return 0;
 
   Output_def *paper = paper_ ? default_paper : paper_;
-  
+
   Paper_book *paper_book = new Paper_book ();
   Real scale = scm_to_double (paper->c_variable ("outputscale"));
   Output_def *scaled_bookdef = scale_output_def (paper, scale);
 
   Object_key *key = new Lilypond_general_key (0, user_key_, 0);
   SCM scm_key = key->unprotect ();
-  
+
   paper_book->paper_ = scaled_bookdef;
   scaled_bookdef->unprotect ();
 
@@ -113,17 +113,15 @@ Book::process (Output_def *default_paper,
              Music_output *output = unsmob_music_output (scm_car (outputs));
 
              if (Performance *perf = dynamic_cast<Performance *> (output))
-               {
-                 paper_book->add_performance (perf->self_scm ());
-               }
-             else if (Paper_score *pscore = dynamic_cast<Paper_score *> (output)) 
+               paper_book->add_performance (perf->self_scm ());
+             else if (Paper_score *pscore = dynamic_cast<Paper_score *> (output))
                {
                  SCM systems = pscore->get_paper_systems ();
                  if (ly_is_module (score->header_))
                    paper_book->add_score (score->header_);
                  paper_book->add_score (systems);
                }
-             
+
              outputs = scm_cdr (outputs);
            }
        }
index b13f4f3420f891ab622f973d63e388b0b947fc6c..0b61299191cbe42061dbfec35e46116c313ee4a9 100644 (file)
@@ -85,13 +85,12 @@ Box::widen (Real x, Real y)
   interval_a_[Y_AXIS].widen (y);
 }
 
-
-IMPLEMENT_SIMPLE_SMOBS(Box);
+IMPLEMENT_SIMPLE_SMOBS (Box);
 IMPLEMENT_TYPE_P (Box, "ly:box?");
-IMPLEMENT_DEFAULT_EQUAL_P(Box);
+IMPLEMENT_DEFAULT_EQUAL_P (Box);
 
 SCM
-Box::mark_smob (SCM x) 
+Box::mark_smob (SCM x)
 {
   (void)x;
   return SCM_EOL;
index 59236fe09ec58f65538968aedb885dd22d4fa8a5..360eb3f4df254188d624ab21f9d2dfea6dae8e10 100644 (file)
@@ -98,7 +98,6 @@ Break_algorithm::solve () const
   return h;
 }
 
-
 Break_algorithm::~Break_algorithm ()
 {
 }
index 4fe8c7e3637a75415e3e364e18eb50a06f8a527a..3359b9b72a710f0be88da2e35f6e4fb475306d66 100644 (file)
@@ -28,7 +28,6 @@ protected:
 public:
   TRANSLATOR_DECLARATIONS (Break_align_engraver);
   DECLARE_ACKNOWLEDGER (break_aligned);
-
 };
 
 void
@@ -79,12 +78,12 @@ Break_align_engraver::acknowledge_break_aligned (Grob_info inf)
 
          Context *origin = inf.origin_contexts (this)[0];
 
-         Translator_group *tg = origin ->implementation ();
-         Engraver *random_source =  dynamic_cast<Engraver*> (unsmob_translator (scm_car (tg->get_simple_trans_list ())));
+         Translator_group *tg = origin->implementation ();
+         Engraver *random_source = dynamic_cast<Engraver *> (unsmob_translator (scm_car (tg->get_simple_trans_list ())));
 
          /*
            Make left edge appear to come from same context as clef/bar-line etc.
-          */
+         */
          left_edge_ = make_item_from_properties (random_source,
                                                  ly_symbol2scm ("LeftEdge"),
                                                  SCM_EOL,
index b9232ef6fa9b8647d44e5a471ae60e0a051b971f..c7fd035c3bcd0d2b74c2db9d18c0f6283698b4fe 100644 (file)
@@ -44,7 +44,7 @@ SCM
 Break_align_interface::self_align_callback (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  (void)  axis;
+  (void) axis;
   assert (scm_to_int (axis) == X_AXIS);
 
   Item *item = dynamic_cast<Item *> (me);
@@ -72,7 +72,7 @@ Break_align_interface::ordered_elements (Grob *grob)
 {
   Item *me = dynamic_cast<Item *> (grob);
   extract_grob_set (me, "elements", elts);
-  
+
   SCM order_vec = me->get_property ("break-align-orders");
   if (!scm_is_vector (order_vec)
       || scm_c_vector_length (order_vec) < 3)
@@ -90,7 +90,7 @@ Break_align_interface::ordered_elements (Grob *grob)
     {
       SCM sym = scm_car (order);
 
-      for (int i = writable_elts.size(); i --; )
+      for (int i = writable_elts.size (); i--;)
        {
          Grob *g = writable_elts[i];
          if (g && sym == g->get_property ("break-align-symbol"))
@@ -100,7 +100,7 @@ Break_align_interface::ordered_elements (Grob *grob)
            }
        }
     }
-  
+
   return new_elts;
 }
 
@@ -157,8 +157,8 @@ Break_align_interface::do_alignment (Grob *grob)
        Find the first grob with a space-alist entry.
       */
       extract_grob_set (l, "elements", elts);
-      
-      for (int i = elts.size(); i--; )
+
+      for (int i = elts.size (); i--;)
        {
          Grob *elt = elts[i];
 
@@ -185,7 +185,7 @@ Break_align_interface::do_alignment (Grob *grob)
       if (r)
        {
          extract_grob_set (r, "elements", elts);
-         for (int i = elts.size();
+         for (int i = elts.size ();
               !scm_is_symbol (rsym) && i--;)
            {
              Grob *elt = elts[i];
@@ -237,9 +237,7 @@ Break_align_interface::do_alignment (Grob *grob)
            offsets[next_idx] = max (extents[idx][RIGHT], distance);
        }
       else
-       {
-         extra_right_space = distance;
-       }
+       extra_right_space = distance;
 
       idx = next_idx;
     }
@@ -257,8 +255,8 @@ Break_align_interface::do_alignment (Grob *grob)
     }
 
   if (total_extent.is_empty ())
-    return ;
-  
+    return;
+
   if (me->break_status_dir () == LEFT)
     {
       alignment_off = -total_extent[RIGHT] - extra_right_space;
index ea85a6e7e8c9a487ea751db9ef5b381a1803a6c3..670f7e567b4d3022da3b14746525420948c9be8c 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2001--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include <cstdio>
@@ -42,9 +41,7 @@ substitute_grob (Grob *sc)
       System *line
        = dynamic_cast<System *> (unsmob_grob (break_criterion));
       if (sc->get_system () != line)
-       {
-         sc = sc->find_broken_piece (line);
-       }
+       sc = sc->find_broken_piece (line);
 
       /* now: !sc || (sc && sc->get_system () == line) */
       if (!sc)
@@ -66,9 +63,7 @@ substitute_grob (Grob *sc)
 
       if (sc->common_refpoint (line, X_AXIS)
          && sc->common_refpoint (line, Y_AXIS))
-       {
-         return sc;
-       }
+       return sc;
       return 0;
     }
 
@@ -96,7 +91,7 @@ do_break_substitution (SCM src)
 
   if (unsmob_grob (src))
     {
-      Grob * new_ptr = substitute_grob (unsmob_grob (src));
+      Grob *new_ptr = substitute_grob (unsmob_grob (src));
       return new_ptr ? new_ptr->self_scm () : SCM_UNDEFINED;
     }
   else if (scm_is_vector (src))
@@ -145,27 +140,25 @@ do_break_substitution (SCM src)
 */
 Link_array<Grob> temporary_substition_array;
 void
-substitute_grob_array (Grob_array *grob_arr, Grob_array * new_arr)
+substitute_grob_array (Grob_array *grob_arr, Grob_array *new_arr)
 {
   Link_array<Grob> &old_grobs (grob_arr->array_reference ());
   Link_array<Grob> *new_grobs (new_arr == grob_arr
-                              ? &temporary_substition_array
+                              ? & temporary_substition_array
                               : &new_arr->array_reference ());
-  
+
   new_grobs->set_size (old_grobs.size ());
-  Grob **array =  (Grob**) new_grobs->accesses();
-  Grob **ptr = array; 
+  Grob **array = (Grob **) new_grobs->accesses ();
+  Grob **ptr = array;
   for (int i = 0; i < old_grobs.size (); i++)
     {
       Grob *orig = old_grobs[i];
       Grob *new_grob = substitute_grob (orig);
       if (new_grob)
-       {
-         *ptr ++ = new_grob;
-       }
+       *ptr++ = new_grob;
     }
 
-  new_grobs->set_size (ptr - array);  
+  new_grobs->set_size (ptr - array);
   if (new_arr == grob_arr)
     {
       new_arr->set_array (*new_grobs);
@@ -235,7 +228,7 @@ spanner_system_range (Spanner *sp)
     {
       if (sp->broken_intos_.size ())
        rv = Slice (sp->broken_intos_[0]->get_system ()->get_rank (),
-                   sp->broken_intos_.top ()->get_system ()->get_rank());
+                   sp->broken_intos_.top ()->get_system ()->get_rank ());
     }
   return rv;
 }
@@ -322,7 +315,7 @@ bool
 Spanner::fast_substitute_grob_array (SCM sym,
                                     Grob_array *grob_array)
 {
-  int len = grob_array->size();
+  int len = grob_array->size ();
 
   if (grob_array->ordered ())
     return false;
@@ -346,8 +339,8 @@ Spanner::fast_substitute_grob_array (SCM sym,
 
   int spanner_index = len;
   int item_index = 0;
-  
-  for (int i = 0 ; i < grob_array->size (); i++)
+
+  for (int i = 0; i < grob_array->size (); i++)
     {
       Grob *g = grob_array->grob (i);
 
@@ -356,13 +349,9 @@ Spanner::fast_substitute_grob_array (SCM sym,
 
       int idx = 0;
       if (dynamic_cast<Spanner *> (g))
-       {
-         idx = --spanner_index;
-       }
+       idx = --spanner_index;
       else if (dynamic_cast<Item *> (g))
-       {
-         idx = item_index++;
-       }
+       idx = item_index++;
 
       vec[idx].set (g, sr);
     }
@@ -377,7 +366,7 @@ Spanner::fast_substitute_grob_array (SCM sym,
       item_indices.push (Slice (len, 0));
       spanner_indices.push (Slice (len, 0));
     }
-  
+
   Array<Slice> *arrs[]
     = {
     &item_indices, &spanner_indices
@@ -386,9 +375,7 @@ Spanner::fast_substitute_grob_array (SCM sym,
   for (int i = 0; i < item_index;i++)
     {
       for (int j = vec[i].left_; j <= vec[i].right_; j++)
-       {
-         item_indices[j - system_range[LEFT]].add_point (i);
-       }
+       item_indices[j - system_range[LEFT]].add_point (i);
     }
 
   /*
@@ -415,16 +402,14 @@ Spanner::fast_substitute_grob_array (SCM sym,
          newval = Grob_array::make_array ();
          sc->internal_set_object (sym, newval);
        }
-      
-      Grob_array *new_array = unsmob_grob_array (newval);  
+
+      Grob_array *new_array = unsmob_grob_array (newval);
       for (int k = 0; k < 2;k++)
        for (int j = (*arrs[k])[i][LEFT]; j <= (*arrs[k])[i][RIGHT]; j++)
          {
            Grob *substituted = substitute_grob (vec[j].grob_);
            if (substituted)
-             {
-               new_array->add (substituted);
-             }
+             new_array->add (substituted);
          }
 
 #ifdef PARANOIA
@@ -465,14 +450,14 @@ substitute_object_alist (SCM alist, SCM dest)
       SCM sym = scm_caar (s);
       SCM val = scm_cdar (s);
 
-      if (Grob_array * orig = unsmob_grob_array (val))
+      if (Grob_array *orig = unsmob_grob_array (val))
        {
          SCM handle = scm_assq (sym, dest);
-         SCM newval =
-           (scm_is_pair (handle))
+         SCM newval
+           (scm_is_pair (handle))
            ? scm_cdr (handle)
            : Grob_array::make_array ();
-           
+
          Grob_array *new_arr = unsmob_grob_array (newval);
 
          substitute_grob_array (orig, new_arr);
@@ -501,7 +486,7 @@ Spanner::substitute_one_mutable_property (SCM sym,
   Spanner *s = this;
 
   bool fast_done = false;
-  Grob_array * grob_array = unsmob_grob_array (val);
+  Grob_array *grob_array = unsmob_grob_array (val);
   if (grob_array)
     fast_done = s->fast_substitute_grob_array (sym, grob_array);
 
@@ -518,7 +503,7 @@ Spanner::substitute_one_mutable_property (SCM sym,
            if (!unsmob_grob_array (newval))
              {
                newval = Grob_array::make_array ();
-               sc->internal_set_object  (sym, newval);
+               sc->internal_set_object (sym, newval);
              }
            substitute_grob_array (grob_array, unsmob_grob_array (newval));
          }
index 2a4f52751bbe97523210740d46104259658efc68..8074465995e139c73e742b0782d23d8598ec2f1e 100644 (file)
@@ -84,7 +84,7 @@ Change_iterator::process (Moment m)
       {
        /* We could change the current translator's id, but that would make
           errors hard to catch.
-          
+
           last->translator_id_string () = get_change
           ()->change_to_id_string (); */
        error (_f ("not changing to same context type: %s", to_type));
index a7cd27c0871662bd61d12200583117d8fd2ce56c..0149be93472a7786a8b244471158dc59f1b9dad3 100644 (file)
@@ -158,9 +158,7 @@ Chord_tremolo_engraver::acknowledge_stem (Grob_info info)
        }
 
       if (info.music_cause ()->is_mus_type ("rhythmic-event"))
-       {
-         Beam::add_stem (beam_, s);
-       }
+       Beam::add_stem (beam_, s);
       else
        {
          String s = _ ("stem must have Rhythmic structure");
@@ -178,7 +176,7 @@ Chord_tremolo_engraver::acknowledge_stem (Grob_info info)
       stem_tremolo_->set_property ("flag-count",
                                   scm_from_int (flags_));
       stem_tremolo_->set_object ("stem",
-                                  info.grob ()->self_scm ());
+                                info.grob ()->self_scm ());
       stem_tremolo_->set_parent (info.grob (), X_AXIS);
     }
 }
@@ -208,8 +206,7 @@ Chord_tremolo_engraver::stop_translation_timestep ()
   typeset_beam ();
 }
 
-
-ADD_ACKNOWLEDGER (Chord_tremolo_engraver,stem);
+ADD_ACKNOWLEDGER (Chord_tremolo_engraver, stem);
 ADD_TRANSLATOR (Chord_tremolo_engraver,
                /* doc */ "Generates beams for  tremolo repeats.",
                /* create */ "Beam",
index d387009e712b303c5f49a9fc8e0be41f2d29d011..8ac60b91a98a69236b55d05302b373ec1103274c 100644 (file)
@@ -141,11 +141,11 @@ Clef_engraver::inspect_clef_properties ()
   SCM octavation = get_property ("clefOctavation");
   SCM force_clef = get_property ("forceClef");
 
-  if (clefpos == SCM_EOL 
-       || scm_equal_p (glyph, prev_glyph_) == SCM_BOOL_F
-       || scm_equal_p (clefpos, prev_cpos_) == SCM_BOOL_F
-       || scm_equal_p (octavation, prev_octavation_) == SCM_BOOL_F
-       || to_boolean (force_clef))
+  if (clefpos == SCM_EOL
+      || scm_equal_p (glyph, prev_glyph_) == SCM_BOOL_F
+      || scm_equal_p (clefpos, prev_cpos_) == SCM_BOOL_F
+      || scm_equal_p (octavation, prev_octavation_) == SCM_BOOL_F
+      || to_boolean (force_clef))
     {
       set_glyph ();
       if (prev_cpos_ != SCM_BOOL_F || to_boolean (get_property ("firstClef")))
index 8391e7899b01179ac514fcbbeb384b7cc84bd3b3..f6ca03ab359efbff6f217b748f9973b67689ce53 100644 (file)
@@ -102,15 +102,11 @@ brew_cluster_piece (Grob *me, Array<Offset> bottom_points, Array<Offset> top_poi
     {
       points.push (bottom_points[0] - vpadding + hpadding);
       for (int i = 1; i < size - 1; i++)
-       {
-         points.push (bottom_points[i] - vpadding);
-       }
+       points.push (bottom_points[i] - vpadding);
       points.push (bottom_points[size - 1] - vpadding - hpadding);
       points.push (top_points[size - 1] + vpadding - hpadding);
       for (int i = size - 2; i > 0; i--)
-       {
-         points.push (top_points[i] + vpadding);
-       }
+       points.push (top_points[i] + vpadding);
       points.push (top_points[0] + vpadding + hpadding);
       out.add_stencil (Lookup::round_filled_polygon (points, blotdiameter));
     }
@@ -160,10 +156,10 @@ Cluster::print (SCM smob)
     line with the center of the note heads?
 
   */
-  for (int i = 0; i < cols.size ();  i++) 
+  for (int i = 0; i < cols.size (); i++)
     {
       Grob *col = cols[i];
-      
+
       Interval yext = col->extent (commony, Y_AXIS);
 
       Real x = col->relative_coordinate (commonx, X_AXIS) - left_coord;
@@ -182,7 +178,7 @@ Cluster::print (SCM smob)
        {
          Spanner *next = orig->broken_intos_[spanner->get_break_index () + 1];
          Link_array<Grob> const &next_cols = extract_grob_array (next, "columns");
-         if (next_cols.size() > 0)
+         if (next_cols.size () > 0)
            {
              Grob *next_commony = common_refpoint_of_array (next_cols, next, Y_AXIS);
              Grob *col = next_cols[0];
index 9c7ad42b9b709f87074925a656eaf161403c9790..c7dc0a3a7c7a2461ddbbb4356d6fa8c78c4db772 100644 (file)
@@ -126,7 +126,7 @@ Coherent_ligature_engraver::get_set_column (Item *item, Paper_column *column)
       Grob *sl = Staff_symbol_referencer::get_staff_symbol (item);
 
       extract_item_set (parent, "elements", elements);
-      
+
       for (int i = elements.size (); i--;)
        {
          Item *sibling = elements[i];
index 18eddec50f9b1fcb60bdd8ad7b20d48bddd5a656..dbd7936e494daf3901f64d4d87c2199580798422 100644 (file)
@@ -22,7 +22,6 @@
 #include "pitch.hh"
 
 
-
 /*
   TODO: make matching rest engraver.
 */
@@ -141,9 +140,7 @@ Completion_heads_engraver::find_nearest_duration (Rational length)
          continue;
        }
       else
-       {
-         d = Duration (d.duration_log () + 1, 2);
-       }
+       d = Duration (d.duration_log () + 1, 2);
     }
 
   if (d.duration_log () >= log_limit)
index 1650076669cf089976f4f0a5fd2565194e218fb6..b0eb1c344f0ae8576979a390f473733dbbcb59ae 100644 (file)
@@ -104,7 +104,7 @@ Context_def::add_context_mod (SCM mod)
     }
 
   /*
-    other modifiers take symbols as argument. 
+    other modifiers take symbols as argument.
   */
   SCM sym = scm_cadr (mod);
   if (scm_is_string (sym))
@@ -115,8 +115,8 @@ Context_def::add_context_mod (SCM mod)
       default_child_ = sym;
     }
   else if (ly_symbol2scm ("consists") == tag
-      || ly_symbol2scm ("consists-end") == tag
-      || ly_symbol2scm ("remove") == tag)
+          || ly_symbol2scm ("consists-end") == tag
+          || ly_symbol2scm ("remove") == tag)
     {
       if (!get_translator (sym))
        error (_f ("program has no such type: `%s'",
@@ -171,11 +171,10 @@ Context_def::get_accepted (SCM user_mod) const
        acc = scm_delete_x (def, acc);
       acc = scm_cons (def, acc);
     }
-  
+
   return acc;
 }
 
-
 SCM
 Context_def::get_default_child (SCM user_mod) const
 {
@@ -254,9 +253,7 @@ Context_def::get_translator_names (SCM user_mod) const
       if (ly_symbol2scm ("consists") == tag)
        l1 = scm_cons (arg, l1);
       else if (ly_symbol2scm ("remove") == tag)
-       {
-         l1 = scm_delete_x (arg, l1);
-       }
+       l1 = scm_delete_x (arg, l1);
     }
 
   return l1;
@@ -271,7 +268,7 @@ filter_performers (SCM ell)
       if (dynamic_cast<Performer *> (unsmob_translator (scm_car (*tail))))
        *tail = scm_cdr (*tail);
       else
-       tail = SCM_CDRLOC(*tail);
+       tail = SCM_CDRLOC (*tail);
     }
   return ell;
 }
@@ -285,7 +282,7 @@ filter_engravers (SCM ell)
       if (dynamic_cast<Engraver *> (unsmob_translator (scm_car (*tail))))
        *tail = scm_cdr (*tail);
       else
-       tail = SCM_CDRLOC(*tail);
+       tail = SCM_CDRLOC (*tail);
     }
   return ell;
 }
@@ -326,16 +323,13 @@ Context_def::instantiate (SCM ops, Object_key const *key)
                trans_list = cons;
            }
          else
-           {
-             trans_list = scm_cons (str, trans_list);
-           }
+           trans_list = scm_cons (str, trans_list);
 
          tr->daddy_context_ = context;
          tr->unprotect ();
        }
     }
 
-
   /*
     Ugh,  todo: should just make a private
     copy of Context_def with the user mods.
@@ -355,7 +349,7 @@ Context_def::instantiate (SCM ops, Object_key const *key)
   g->unprotect ();
 
   context->accepts_list_ = get_accepted (ops);
-    
+
   return context;
 }
 
index 880086209a61b0e911d1375d3b607a0358d485e6..192001015c0a8e7e3c29bb7ee26fc465ad13ad8d 100644 (file)
@@ -133,9 +133,7 @@ apply_property_operations (Context *tg, SCM pre_init_ops)
          execute_pushpop_property (tg, scm_car (entry), scm_cadr (entry), val);
        }
       else if (type == ly_symbol2scm ("assign"))
-       {
-         tg->internal_set_property (scm_car (entry), scm_cadr (entry));
-       }
+       tg->internal_set_property (scm_car (entry), scm_cadr (entry));
     }
 }
 
@@ -197,10 +195,10 @@ make_grob_from_properties (Engraver *tr, SCM symbol, SCM cause, char const *name
 
   Object_key const *key = context->get_grob_key (name);
   Grob *grob = 0;
-  
+
   SCM handle = scm_sloppy_assq (ly_symbol2scm ("meta"), props);
   SCM klass = scm_cdr (scm_sloppy_assq (ly_symbol2scm ("class"), scm_cdr (handle)));
-  
+
   if (klass == ly_symbol2scm ("Item"))
     grob = new Item (props, key);
   else if (klass == ly_symbol2scm ("Spanner"))
@@ -217,7 +215,7 @@ make_grob_from_properties (Engraver *tr, SCM symbol, SCM cause, char const *name
 Item *
 make_item_from_properties (Engraver *tr, SCM x, SCM cause, char const *name)
 {
-  Item *it = dynamic_cast<Item*> (make_grob_from_properties (tr, x, cause, name));
+  Item *it = dynamic_cast<Item *> (make_grob_from_properties (tr, x, cause, name));
   assert (it);
   return it;
 }
@@ -225,14 +223,13 @@ make_item_from_properties (Engraver *tr, SCM x, SCM cause, char const *name)
 Paper_column *
 make_paper_column_from_properties (Engraver *tr, SCM x, char const *name)
 {
-  return dynamic_cast<Paper_column*> (make_grob_from_properties (tr, x, SCM_EOL, name));
+  return dynamic_cast<Paper_column *> (make_grob_from_properties (tr, x, SCM_EOL, name));
 }
 
-
 Spanner *
 make_spanner_from_properties (Engraver *tr, SCM x, SCM cause, char const *name)
 {
-  Spanner *sp = dynamic_cast<Spanner*> (make_grob_from_properties (tr, x, cause, name));
+  Spanner *sp = dynamic_cast<Spanner *> (make_grob_from_properties (tr, x, cause, name));
   assert (sp);
   return sp;
 }
index 6759a21d713ac7c5f036f9c0bc45415b5379a170..2e2c2e8873052bc93da23e5fc58e89008f8fe9ea 100644 (file)
@@ -20,7 +20,6 @@
 #include "lilypond-key.hh"
 #include "profile.hh"
 
-
 bool
 Context::is_removable () const
 {
@@ -103,16 +102,16 @@ Context::Context (Object_key const *key)
   definition_ = SCM_EOL;
 
   smobify_self ();
-  
+
   Scheme_hash_table *tab = new Scheme_hash_table;
-  properties_scm_ =   tab->unprotect ();
+  properties_scm_ = tab->unprotect ();
 
   /*
-   UGH UGH
-   const correctness.
+    UGH UGH
+    const correctness.
   */
   if (key_)
-    ((Object_key*)key)->unprotect ();
+    ((Object_key *)key)->unprotect ();
 }
 
 /* TODO:  this shares code with find_create_context ().  */
@@ -201,9 +200,7 @@ Context::find_create_context (SCM n, String id, SCM operations)
 
          String this_id = "";
          if (i == path.size () -1)
-           {
-             this_id = id;
-           }
+           this_id = id;
 
          current = current->create_context (path[i],
                                             this_id,
@@ -251,7 +248,7 @@ Context::get_context_key (String type, String id)
 {
   if (!use_object_keys)
     return 0;
-      
+
   String now_key = type + "@" + id;
 
   int disambiguation_count = 0;
@@ -273,7 +270,7 @@ Context::get_grob_key (String name)
 {
   if (!use_object_keys)
     return 0;
-  
+
   int disambiguation_count = 0;
   if (grob_counts_.find (name) != grob_counts_.end ())
     {
@@ -297,7 +294,7 @@ SCM
 Context::default_child_context_name () const
 {
   return scm_is_pair (accepts_list_)
-    ? scm_car (accepts_list_) 
+    ? scm_car (accepts_list_)
     : SCM_EOL;
 }
 
@@ -365,7 +362,7 @@ Context::internal_get_property (SCM sym) const
       note_property_access (&context_property_lookup_table, sym);
     }
 #endif
-  
+
   SCM val = SCM_EOL;
   if (properties_dict ()->try_retrieve (sym, &val))
     return val;
@@ -500,7 +497,7 @@ Context::now_mom () const
     {
       p = p->daddy_context_;
     }
-  
+
   return p->now_mom ();
 }
 
@@ -537,7 +534,7 @@ Context::mark_smob (SCM sm)
   Context *me = (Context *) SCM_CELL_WORD_1 (sm);
   if (me->key_)
     scm_gc_mark (me->key_->self_scm ());
-  
+
   scm_gc_mark (me->context_list_);
   scm_gc_mark (me->aliases_);
   scm_gc_mark (me->definition_);
@@ -591,7 +588,7 @@ Context::clear_key_disambiguations ()
 {
   if (!use_object_keys)
     return;
-  
+
   grob_counts_.clear ();
   context_counts_.clear ();
   for (SCM s = context_list_; scm_is_pair (s); s = scm_cdr (s))
@@ -600,15 +597,14 @@ Context::clear_key_disambiguations ()
     }
 }
 
-
 /*
-  Ugh. Where to put this? 
+  Ugh. Where to put this?
 */
 Rational
 measure_length (Context const *context)
 {
   SCM l = context->get_property ("measureLength");
-  Rational length (1); 
+  Rational length (1);
   if (unsmob_moment (l))
     length = unsmob_moment (l)->main_part_;
   return length;
index f25a26afbfaf00a1cc3bbb2a344d09e50f770c5f..5ebb39c6cabf3ba749425033fd5e39e6eb6362df 100644 (file)
@@ -17,7 +17,6 @@
 
 #include "translator.icc"
 
-
 /*
  * This class implements an engraver for custos symbols.
  *
@@ -135,9 +134,8 @@ Custos_engraver::finalize ()
   custodes_.clear ();
 }
 
-
-ADD_ACKNOWLEDGER (Custos_engraver,bar);
-ADD_ACKNOWLEDGER (Custos_engraver,note_head);
+ADD_ACKNOWLEDGER (Custos_engraver, bar);
+ADD_ACKNOWLEDGER (Custos_engraver, note_head);
 
 ADD_TRANSLATOR (Custos_engraver,
                /* doc */ "",
diff --git a/lily/default-actions.cc b/lily/default-actions.cc
deleted file mode 100644 (file)
index ef7f931..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
-  default-actions.cc -- implement default toplevel actions for .ly
-  file.
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
-*/
-
index 733e8afe5b74bb8055bd196aa175a0663dcb9779..086bc8374c0d4b94102b7f9b39745a448062d7dc 100644 (file)
@@ -12,7 +12,6 @@
 #include "grob.hh"
 #include "warn.hh"
 
-
 class Default_bar_line_engraver : public Engraver
 {
 protected:
@@ -31,15 +30,14 @@ public:
 ADD_TRANSLATOR (Default_bar_line_engraver,
                "This engraver determines what kind of automatic bar lines should be produced, "
                "and sets @code{whichBar} accordingly. It should be at the same "
-               "level as @ref{Timing_translator}. ",  
+               "level as @ref{Timing_translator}. ",
                /* create */ "",
                /* accept */ "",
-               /* read */ 
+               /* read */
                "measurePosition automaticBars whichBar barAlways defaultBarType "
                "measureLength",
                /* write */ "automaticBars");
 
-
 Default_bar_line_engraver::Default_bar_line_engraver ()
 {
   last_moment_.main_part_ = Rational (-1);
index dd18d5832af2829e4f81abc285f8ecfec49a1ead..a2c0e2804b2360de7986b1a02ba49710d18783bf 100644 (file)
@@ -25,7 +25,7 @@ protected:
 
   DECLARE_ACKNOWLEDGER (stem);
   DECLARE_ACKNOWLEDGER (rhythmic_head);
-  
+
   void stop_translation_timestep ();
 };
 
@@ -66,7 +66,6 @@ Dot_column_engraver::acknowledge_rhythmic_head (Grob_info info)
     }
 }
 
-
 void
 Dot_column_engraver::acknowledge_stem (Grob_info info)
 {
index ec00373261a4b5b4a9240b9760f589b9836ffd74..1121ff04be81b0afa0d80700ec00584412c031fc 100644 (file)
@@ -159,9 +159,7 @@ shift_one (Dot_configuration const &cfg,
          else
            {
              if (new_cfg.find (p) == new_cfg.end ())
-               {
-                 offset = 0;
-               }
+               offset = 0;
              new_cfg[p + offset] = i->second;
            }
        }
@@ -188,9 +186,7 @@ shift_one (Dot_configuration const &cfg,
          else
            {
              if (new_cfg.find (p) == new_cfg.end ())
-               {
-                 offset = 0;
-               }
+               offset = 0;
 
              new_cfg[p + offset] = i->second;
            }
index b018e5290285f8920d4114b923a65d86f117c74a..02bb19f1d1644827ed7e03c593d2a97463d3bcac 100644 (file)
@@ -146,9 +146,7 @@ Drum_notes_engraver::acknowledge_note_column (Grob_info inf)
 
       if (!e->get_parent (X_AXIS)
          && Side_position_interface::get_axis (e) == Y_AXIS)
-       {
-         e->set_parent (inf.grob (), X_AXIS);
-       }
+       e->set_parent (inf.grob (), X_AXIS);
     }
 }
 
@@ -165,7 +163,7 @@ Drum_notes_engraver::stop_translation_timestep ()
 #include "translator.icc"
 
 ADD_ACKNOWLEDGER (Drum_notes_engraver, stem);
-ADD_ACKNOWLEDGER (Drum_notes_engraver,note_column);
+ADD_ACKNOWLEDGER (Drum_notes_engraver, note_column);
 ADD_TRANSLATOR (Drum_notes_engraver,
                /* doc */ "Generate noteheads.",
                /* create */ "NoteHead Dots Script",
index 27d0de7999d0d065869baa78ccf01f9b0aea3813..e52e0a7ad9956c48b0bbfac2cb837974b462d15c 100644 (file)
@@ -29,7 +29,6 @@ private:
   Link_array<Audio_note> notes_;
 };
 
-
 Drum_note_performer::Drum_note_performer ()
 {
 }
index 5a9668e52656e7d48c3762ce22ab70a344b88989..1a93d23a125cb5d2d68346841ef637ea2451d386 100644 (file)
@@ -64,7 +64,6 @@ class Dynamic_engraver : public Engraver
   DECLARE_ACKNOWLEDGER (note_column);
   DECLARE_ACKNOWLEDGER (slur);
 
-
 protected:
   virtual void finalize ();
   virtual bool try_music (Music *event);
@@ -170,7 +169,7 @@ Dynamic_engraver::process_music ()
              cresc_->set_bound (RIGHT, script_);
              add_bound_item (line_spanner_, script_);
            }
-         
+
          finished_cresc_ = cresc_;
          cresc_ = 0;
          current_cresc_ev_ = 0;
@@ -231,7 +230,7 @@ Dynamic_engraver::process_music ()
                }
              cresc_->set_property ("grow-direction",
                                    scm_from_int ((start_type == "crescendo")
-                                                ? BIGGER : SMALLER));
+                                                 ? BIGGER : SMALLER));
            }
 
          /*
@@ -278,7 +277,7 @@ Dynamic_engraver::stop_translation_timestep ()
       finished_line_spanner_ = line_spanner_;
       line_spanner_ = 0;
     }
-  
+
   typeset_all ();
 
   if (cresc_ && !cresc_->get_bound (LEFT))
@@ -397,13 +396,12 @@ Dynamic_engraver::acknowledge_note_column (Grob_info info)
   if (script_ && !script_->get_parent (X_AXIS))
     {
       extract_grob_set (info.grob (), "note-heads", heads);
-      if (heads.size())
+      if (heads.size ())
        {
          Grob *head = heads[0];
          script_->set_parent (head, X_AXIS);
          script_->add_offset_callback (Self_alignment_interface::centered_on_parent_proc,
                                        X_AXIS);
-
        }
     }
 
@@ -446,7 +444,7 @@ ADD_ACKNOWLEDGER (Dynamic_engraver, note_column);
 ADD_ACKNOWLEDGER (Dynamic_engraver, slur);
 
 ADD_TRANSLATOR (Dynamic_engraver,
-               /* doc */ 
+               /* doc */
                "This engraver creates hairpins, dynamic texts, and their vertical\n"
                "alignments.  The symbols are collected onto a DynamicLineSpanner grob\n"
                "which takes care of vertical positioning.  ",
index ce0b4e907e28e239279017622840eb7ed1663a9d..c1d28c52f141523a891f3ae92f882a9d03449337 100644 (file)
@@ -12,7 +12,6 @@
 #include "music.hh"
 #include "translator.icc"
 
-
 /*
   TODO:
 
@@ -85,9 +84,7 @@ Dynamic_performer::create_audio_elements ()
 
          SCM eq = get_property ("instrumentEqualizer");
          if (ly_is_procedure (eq))
-           {
-             s = scm_call_1 (eq, s);
-           }
+           s = scm_call_1 (eq, s);
 
          if (is_number_pair (s))
            {
index 37b701cf653d9de2c5e318d5db7394410cafc698..e40d3cd686f96dfd6104f29680461465d3dbb976 100644 (file)
@@ -102,7 +102,7 @@ Dynamic_text_spanner::print (SCM smob)
          SCM text = index_get_cell (edge_text, d);
 
          if (Text_interface::is_markup (text))
-           edge[d] = *unsmob_stencil (Text_interface::interpret_markup (layout->self_scm (), properties, text));
+           edge[d] = *unsmob_stencil (Text_interface::interpret_markup (layout->self_scm (), properties, text));
 
          if (!edge[d].is_empty ())
            edge[d].align_to (Y_AXIS, CENTER);
index 00e93f190527bcf208b54b0f3892bfdfaac1a5d9..a786372441601d9cbfcb70efb2106f7961971d26 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "note-head.hh"
@@ -70,7 +69,7 @@ Note_head::brew_ez_stencil (SCM smob)
   Stencil head;
   Box extent (Interval (-radius, radius),
              Interval (-radius, radius));
-             
+
   Stencil black_head (extent,
                      scm_list_4 (ly_symbol2scm ("circle"),
                                  scm_from_double (radius),
@@ -79,19 +78,18 @@ Note_head::brew_ez_stencil (SCM smob)
   Stencil white_head;
   if (black)
     {
-      l = l.in_color (1, 1, 1); 
+      l = l.in_color (1, 1, 1);
     }
   else
     {
       white_head = Stencil (extent,
                            scm_list_4 (ly_symbol2scm ("circle"),
-                              scm_from_double (radius - stem_thick),
-                              scm_from_double (0.0),
-                              SCM_BOOL_T));
+                                       scm_from_double (radius - stem_thick),
+                                       scm_from_double (0.0),
+                                       SCM_BOOL_T));
 
       white_head = white_head.in_color (1, 1, 1);
     }
-    
 
   Stencil total;
   total.add_stencil (l);
index 41a838fc6f4980c08aedb3f63f53c4f775560dd8..0054eb913a90b271bdc1cf9d9672ed055ebd6b85 100644 (file)
@@ -19,9 +19,9 @@ Engraver_group_engraver::announce_grob (Grob_info info)
 {
   announce_infos_.push (info);
 
-  Engraver_group_engraver * dad_eng =
-    context_->get_parent_context ()
-    ? dynamic_cast<Engraver_group_engraver*> (context_->get_parent_context ()->implementation ())
+  Engraver_group_engraver *dad_eng
+    context_->get_parent_context ()
+    ? dynamic_cast<Engraver_group_engraver *> (context_->get_parent_context ()->implementation ())
     : 0;
   if (dad_eng)
     dad_eng->announce_grob (info);
@@ -64,11 +64,8 @@ Engraver_group_engraver::acknowledge_grobs ()
          scm_hashq_set_x (acknowledge_hash_table_, nm, acklist);
        }
 
-
       if (dispatch)
-       {
-         dispatch->apply (info);
-       }
+       dispatch->apply (info);
     }
 }
 
@@ -121,7 +118,6 @@ Engraver_group_engraver::do_announces ()
   while (pending_grob_count () > 0);
 }
 
-
 Engraver_group_engraver::Engraver_group_engraver ()
 {
   acknowledge_hash_table_ = SCM_EOL;
@@ -138,7 +134,6 @@ ADD_TRANSLATOR_GROUP (Engraver_group_engraver,
                      /* write */ "");
 
 
-
 void
 Engraver_group_engraver::derived_mark () const
 {
index a8d833874a6ecd41a3e773f2c32b6793fc1a7f62..2d9d6ae35926fd830400c53c3d7ff7332b079bfe 100644 (file)
@@ -65,4 +65,3 @@ ADD_TRANSLATOR (Engraver,
                "",
                "");
 
-
index c740b51daba2e7215e63d94f6ac647e889c12a1a..52096273be88b5dae8b2cf880d000ce3a7d44f91 100644 (file)
@@ -115,9 +115,7 @@ completize_extender (Spanner *sp)
     {
       extract_item_set (sp, "heads", heads);
       if (heads.size ())
-       {
-         sp->set_bound (RIGHT, heads.top());
-       }
+       sp->set_bound (RIGHT, heads.top ());
     }
 }
 
@@ -145,7 +143,7 @@ Extender_engraver::finalize ()
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Extender_engraver,lyric_syllable);
+ADD_ACKNOWLEDGER (Extender_engraver, lyric_syllable);
 ADD_TRANSLATOR (Extender_engraver,
                /* doc */ "Create lyric extenders",
                /* create */ "LyricExtender",
index c569f4538da782df890656c65e221a0a76f8df97..dc1a240e46076d1656429847fa55a4b750755de8 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include <map>
@@ -17,7 +16,7 @@ std::map<String, String> file_name_map_global;
 String
 map_file_name (String s)
 {
-  if  (file_name_map_global.find (s) != file_name_map_global.end ())
+  if (file_name_map_global.find (s) != file_name_map_global.end ())
     {
       s = file_name_map_global[s];
     }
index 8177ec0c9c7dcab588fb15eba7262b857b4bf0ad..83c85691663ee26fec47fd16fb6288ee51ed7c88 100644 (file)
@@ -13,7 +13,6 @@
 #include "self-alignment-interface.hh"
 #include "pitch.hh"
 
-
 class Fingering_engraver : public Engraver
 {
   Link_array<Music> events_;
@@ -139,8 +138,8 @@ Fingering_engraver::Fingering_engraver ()
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Fingering_engraver,rhythmic_head);
-ADD_ACKNOWLEDGER (Fingering_engraver,stem);
+ADD_ACKNOWLEDGER (Fingering_engraver, rhythmic_head);
+ADD_ACKNOWLEDGER (Fingering_engraver, stem);
 ADD_TRANSLATOR (Fingering_engraver,
                /* doc */ "Create fingering-scripts",
                /* create */ "Fingering",
index 2c1dfb0a3414f31d6883df2a864eafc67e50725d..46a38b9048649d7633df349a28b195d459612fb2 100644 (file)
@@ -23,15 +23,14 @@ init_fontconfig ()
 {
   if (be_verbose_global)
     message (_ ("Initializing FontConfig..."));
-  
+
   if (!FcInit ())
     error (_ ("initializing FontConfig failed"));
 
 
-  
   font_config_global = FcConfigGetCurrent ();
   Array<String> dirs;
-  struct stat statbuf; 
+  struct stat statbuf;
   String builddir = prefix_directory + "/mf/out/";
 
   if (stat (builddir.to_str0 (), &statbuf) == 0)
@@ -42,7 +41,7 @@ init_fontconfig ()
       dirs.push (prefix_directory + "/fonts/type1/");
       dirs.push (prefix_directory + "/fonts/svg/");
     }
-  
+
   for (int i = 0; i < dirs.size (); i++)
     {
       String dir = dirs[i];
@@ -61,7 +60,6 @@ init_fontconfig ()
 void
 init_fontconfig ()
 {
-  
 }
 
 #endif
index c4d85f864ac34ca158bc1dfc62d2dbbcfd4e5222..7d0ea7c6e22c25ab7ac209dfc7594ac37b520f5b 100644 (file)
@@ -121,9 +121,9 @@ select_encoded_font (Output_def *layout, SCM chain)
 #endif
     if (scm_is_string (name))
       {
-       Real rmag =
-         robust_scm2double (ly_chain_assoc_get (ly_symbol2scm ("font-magnification"), chain, SCM_BOOL_F),
-                            1.0);
+       Real rmag
+         robust_scm2double (ly_chain_assoc_get (ly_symbol2scm ("font-magnification"), chain, SCM_BOOL_F),
+                              1.0);
        Font_metric *fm = all_fonts_global->find_font (ly_scm2string (name));
 
        return find_scaled_font (layout, fm, rmag);
@@ -135,7 +135,7 @@ select_encoded_font (Output_def *layout, SCM chain)
 
        Real req = robust_scm2double (ly_chain_assoc_get (ly_symbol2scm ("font-size"), chain, SCM_BOOL_F),
                                      0.0);
-       
+
        return get_font_by_mag_step (layout, req, vec,
                                     scm_to_double (base_size));
       }
index 60d40ec0095fea67b4b0fbed7c45bdd1177c4e3f..d57f9219a5504bdc918df1377e002a8b16bae7e2 100644 (file)
@@ -25,11 +25,10 @@ Font_size_engraver::Font_size_engraver ()
   size = 0.0;
 }
 
-
 void
 Font_size_engraver::process_music ()
 {
-  size = robust_scm2double  (get_property ("fontSize"), 0.0);
+  size = robust_scm2double (get_property ("fontSize"), 0.0);
 }
 
 void
@@ -39,10 +38,10 @@ Font_size_engraver::acknowledge_font (Grob_info gi)
     We only want to process a grob once.
   */
   if (!size)
-    return ;
+    return;
 
   if (gi.context () != context ())
-    return ;
+    return;
 
   Real font_size = size
     + robust_scm2double (gi.grob ()->get_property ("font-size"), 0);
@@ -51,7 +50,7 @@ Font_size_engraver::acknowledge_font (Grob_info gi)
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Font_size_engraver,font);
+ADD_ACKNOWLEDGER (Font_size_engraver, font);
 ADD_TRANSLATOR (Font_size_engraver,
                /* doc */ "Puts fontSize into font-relative-size grob property.",
                /* create */ "",
index 2db24f41da1486dcf640127c313ffafda89368a5..9599d8e28fd1c72b71e2d398b34d62a119ff0ca7 100644 (file)
@@ -42,14 +42,11 @@ Forbid_line_break_engraver::start_translation_timestep ()
     {
       Grob *g = unsmob_grob (scm_cdar (busy));
       if (g->internal_has_interface (ly_symbol2scm ("rhythmic-grob-interface")))
-       {
-         get_score_engraver ()->forbid_breaks ();
-       }
+       get_score_engraver ()->forbid_breaks ();
       busy = scm_cdr (busy);
     }
 }
 
-
 ADD_TRANSLATOR (Forbid_line_break_engraver,
                /* doc */ "Forbid line breaks when note heads "
                "are still playing at some point.",
index fe3327880266f684bc0ac190f51a90890808a9d0..6d57d47769a31df6db0540c5755f77a66c9de236 100644 (file)
@@ -306,7 +306,7 @@ LY_DEFINE (ly_stderr_redirect, "ly:stderr-redirect",
 {
   SCM_ASSERT_TYPE (scm_string_p (file_name), file_name, SCM_ARG1,
                   __FUNCTION__, "file_name");
-  char constm = "w";
+  char const *m = "w";
   if (mode != SCM_UNDEFINED && scm_string_p (mode))
     m = ly_scm2newstr (mode, 0);
   /* dup2 and (fileno (current-error-port)) do not work with mingw'c
index 0ae1f2af560a822e318f5abb6dc4ef00dc2c1378..424d8664f51a7ec386ea0f72cbd223bb46736261 100644 (file)
@@ -105,7 +105,7 @@ Glissando_engraver::finalize ()
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Glissando_engraver,rhythmic_head);
+ADD_ACKNOWLEDGER (Glissando_engraver, rhythmic_head);
 ADD_TRANSLATOR (Glissando_engraver,
                /* doc */ "Engrave a glissandi",
                /* create */ "Glissando",
index fe5429c8b9b249001965296d8286af61b5f7da91..8a534ef3ca670018ddafe70f0d88a5bc264e3380 100644 (file)
@@ -130,9 +130,7 @@ Global_context::run_iterator_on_me (Music_iterator *iter)
       Moment w;
       w.set_infinite (1);
       if (iter->ok ())
-       {
-         w = iter->pending_moment ();
-       }
+       w = iter->pending_moment ();
 
       w = sneaky_insert_extra_moment (w);
       if (w.main_part_.is_infinity ())
@@ -178,7 +176,7 @@ Global_context::apply_finalizations ()
   SCM lst = get_property ("finalizations");
   set_property ("finalizations", SCM_EOL);
   for (SCM s = lst; scm_is_pair (s); s = scm_cdr (s))
-    
+
     /* TODO: make safe.  */
     scm_primitive_eval (scm_car (s));
 }
index 24eeb934a8a5c12a6f93d7f64789a27da38dee99..6310acb874599b7ec82bc078c03bb362ade7c1c0 100644 (file)
@@ -197,7 +197,7 @@ Gourlay_breaking::do_solve () const
   if (be_verbose_global)
     {
       message (_f ("Optimal demerits: %f",
-                              optimal_paths.top ().demerits_) + "\n");
+                  optimal_paths.top ().demerits_) + "\n");
     }
 
   if (optimal_paths.top ().demerits_ >= infinity_f)
@@ -235,9 +235,7 @@ Gourlay_breaking::combine_demerits (Column_x_positions const &prev,
     {
       SCM pen = pc->get_property ("penalty");
       if (scm_is_number (pen) && fabs (scm_to_double (pen)) < 10000)
-       {
-         break_penalties += scm_to_double (pen);
-       }
+       break_penalties += scm_to_double (pen);
     }
 
   /*
index d6daf18aa380aa8d0d29252b9d483c75a6bfdd46..197d618c00dad21d8dc6b85bbd808c01b76c557d 100644 (file)
@@ -16,7 +16,7 @@ class Grace_engraver : public Engraver
 protected:
   void start_translation_timestep ();
   virtual void derived_mark () const;
-  virtual void initialize (); 
+  virtual void initialize ();
 
   TRANSLATOR_DECLARATIONS (Grace_engraver);
   Moment last_moment_;
@@ -27,7 +27,7 @@ public:
 Grace_engraver::Grace_engraver ()
 {
   grace_settings_ = SCM_EOL;
-  last_moment_ = Moment (Rational (-1,1));
+  last_moment_ = Moment (Rational (-1, 1));
 }
 
 void
@@ -70,9 +70,7 @@ Grace_engraver::consider_change_grace_settings ()
 
          Context *c = context ();
          while (c && !c->is_alias (context_name))
-           {
-             c = c->get_parent_context ();
-           }
+           c = c->get_parent_context ();
 
          if (c)
            {
@@ -89,7 +87,7 @@ Grace_engraver::consider_change_grace_settings ()
        }
     }
 
-  last_moment_ = now_mom();
+  last_moment_ = now_mom ();
 }
 
 void
index 3ed2d14aafd1768d414df1dbc564cbc799a886a3..d4945ee5a240dea8deb036562de4037fc687d9fe 100644 (file)
@@ -10,7 +10,6 @@
 #include "music-wrapper.hh"
 #include "moment.hh"
 
-
 class Grace_music
 {
 public:
index 29690da2f9f2261e293681431bcb24d3a77eeed9..40710457400ee2126acad0c6d152f18ee6c4b1e0 100644 (file)
@@ -211,7 +211,7 @@ provide_context_info (Array<Grob_info> primitives)
       if (prefix_set & PES_OR_FLEXA)
        if (!i) // ligature may not start with 2nd head of pes or flexa
          {
-           primitive->warning (_ ( "can't apply `\\~' on first head of ligature"));
+           primitive->warning (_ ("can't apply `\\~' on first head of ligature"));
          }
        else if (pitch > prev_pitch) // pes
          {
@@ -228,9 +228,7 @@ provide_context_info (Array<Grob_info> primitives)
            primitive->warning (_ ("can't apply `\\~' on heads with identical pitch"));
          }
       if (prev_prefix_set & DEMINUTUM)
-       {
-         context_info |= AFTER_DEMINUTUM;
-       }
+       context_info |= AFTER_DEMINUTUM;
 
       if (prev_primitive)
        prev_primitive->set_property ("context-info",
index 7f1bdf47d5a9c35c1c6e4bf0faf245e89ce0be89..82178f35e8a74e1b3904f6e3f90295cc262273af 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "grid-line-interface.hh"
@@ -15,7 +14,6 @@
 #include "output-def.hh"
 #include "stencil.hh"
 
-
 MAKE_SCHEME_CALLBACK (Grid_line_interface, print, 1);
 SCM
 Grid_line_interface::print (SCM smobbed_me)
@@ -26,8 +24,8 @@ Grid_line_interface::print (SCM smobbed_me)
   /* compute common refpoint of elements */
   Grob *refp = common_refpoint_of_array (elts, me, Y_AXIS);
   Interval iv;
-  
-  for (int i = 0; i < elts.size(); i++)
+
+  for (int i = 0; i < elts.size (); i++)
     {
       Grob *point = elts[i];
 
@@ -44,7 +42,7 @@ Grid_line_interface::print (SCM smobbed_me)
   Real thick = robust_scm2double (me->get_property ("thickness"), 1.0)
     * staffline;
 
-  iv += - me->relative_coordinate (refp, Y_AXIS);
+  iv += -me->relative_coordinate (refp, Y_AXIS);
   Stencil st = Lookup::filled_box (Box (Interval (0, thick),
                                        iv));
 
@@ -62,7 +60,7 @@ Grid_line_interface::width_callback (SCM element_smob, SCM scm_axis)
   Real staffline = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
   Real thick = robust_scm2double (me->get_property ("thickness"), 1.0)
     * staffline;
-  
+
   return ly_interval2scm (Interval (0, thick));
 }
 
@@ -76,7 +74,6 @@ ADD_INTERFACE (Grid_line_interface, "grid-line-interface",
               "A  line that spanned between grid-points. ",
               "elements thickness");
 
-
 ADD_INTERFACE (Grid_point_interface, "grid-point-interface",
               "A spanning point for grid lines. ",
               "");
index a5122fa5921547abfbea5c3c1517d4d175f0dd09..623b95a1df2f74255c4de023a93d443f8d69239f 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "engraver.hh"
diff --git a/lily/grid-line.cc b/lily/grid-line.cc
deleted file mode 100644 (file)
index 8b13789..0000000
+++ /dev/null
@@ -1 +0,0 @@
-
index ab321add16d75452bf623cac7520d76f09579a5e..f139d2a5ce2a3c20f2792714ce981bd897288907 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "engraver.hh"
@@ -24,7 +23,7 @@ protected:
 void
 Grid_point_engraver::process_music ()
 {
-  SCM  grid_interval = get_property ("gridInterval");
+  SCM grid_interval = get_property ("gridInterval");
   if (Moment *mom = unsmob_moment (grid_interval))
     {
       Moment now = now_mom ();
@@ -40,7 +39,6 @@ Grid_point_engraver::Grid_point_engraver ()
 {
 }
 
-
 ADD_TRANSLATOR (Grid_point_engraver,
                /* doc */ "generate grid points.",
                /* create */ "GridPoint",
index 785b5c215a42af5918f57fcd732042855f932db2..5ee86a1d1a00fba4b1449f906f55858e24a4efa9 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "grob-array.hh"
 Item *
 Grob_array::item (int i)
 {
-  return dynamic_cast<Item*> (grobs_.elem (i));
+  return dynamic_cast<Item *> (grobs_.elem (i));
 }
 
-Spanner*
+Spanner *
 Grob_array::spanner (int i)
 {
-  return dynamic_cast<Spanner*> (grobs_.elem (i));
+  return dynamic_cast<Spanner *> (grobs_.elem (i));
 }
 
 Grob_array::Grob_array ()
@@ -36,24 +35,22 @@ Grob_array::array_reference ()
   return grobs_;
 }
 
-
 Link_array<Grob> const &
 Grob_array::array () const
 {
   return grobs_;
 }
 
-
 SCM
 Grob_array::mark_smob (SCM s)
 {
   (void) s;
-  
+
 #if 0  /* see System::derived_mark () const */
-  Grob_array *ga = unsmob_grob_array (s); 
-  for (int i = 0; i < ga->grobs_.size(); i++)
+  Grob_array *ga = unsmob_grob_array (s);
+  for (int i = 0; i < ga->grobs_.size (); i++)
     scm_gc_mark (ga->grobs_[i]->self_scm ());
-#endif  
+#endif
   return SCM_UNDEFINED;
 }
 
@@ -62,16 +59,15 @@ Grob_array::print_smob (SCM arr, SCM port, scm_print_state*)
 {
   scm_puts ("#<Grob_array", port);
 
-  Grob_array * grob_arr = unsmob (arr);
-  for (int i = 0; i < grob_arr->size(); i++)
+  Grob_array *grob_arr = unsmob (arr);
+  for (int i = 0; i < grob_arr->size (); i++)
     {
       scm_display (grob_arr->grob (i)->self_scm (), port);
-      scm_puts (" " , port);
+      scm_puts (" ", port);
     }
   scm_puts (">", port);
   return 1;
 }
-  
 
 SCM
 Grob_array::make_array ()
@@ -95,7 +91,7 @@ Grob_array::is_empty () const
 void
 Grob_array::set_array (Link_array<Grob> const &src)
 {
-  grobs_ = src;  
+  grobs_ = src;
 }
 
 IMPLEMENT_SIMPLE_SMOBS (Grob_array);
@@ -103,7 +99,6 @@ IMPLEMENT_TYPE_P (Grob_array, "ly:grob-array?");
 
 IMPLEMENT_DEFAULT_EQUAL_P (Grob_array);
 
-
 SCM
 grob_list_to_grob_array (SCM lst)
 {
index 161fe778e59af089b04c53b022645667fa2d1aae..e7445d9e90a61e6213a8b5faaa5ac0216949e45d 100644 (file)
@@ -14,7 +14,6 @@
 #include "spanner.hh"
 #include "item.hh"
 
-
 Grob_info::Grob_info (Translator *t, Grob *g)
 {
   origin_trans_ = t;
@@ -49,21 +48,20 @@ Grob_info::origin_contexts (Translator *end) const
   return r;
 }
 
-
-Context*
+Context *
 Grob_info::context () const
 {
   return origin_trans_->context ();
 }
 
-Spanner*
+Spanner *
 Grob_info::spanner () const
 {
-  return dynamic_cast<Spanner*> (grob_);
+  return dynamic_cast<Spanner *> (grob_);
 }
 
-Item*
+Item *
 Grob_info::item () const
 {
-  return dynamic_cast<Item*> (grob_);
+  return dynamic_cast<Item *> (grob_);
 }
index 6a74a4375c33922c7d5d8d60c3f275734ca19807..d40552b6ae60dbbca4aa92af35bd85c526297906 100644 (file)
@@ -81,7 +81,7 @@ Grob_pq_engraver::acknowledge_grob (Grob_info gi)
       Grob_pq_entry e;
       e.grob_ = gi.grob ();
       e.end_ = end;
-      
+
       started_now_.push (e);
     }
 }
@@ -105,9 +105,9 @@ Grob_pq_engraver::stop_translation_timestep ()
       *tail = scm_acons (started_now_[i].end_.smobbed_copy (),
                         started_now_[i].grob_->self_scm (),
                         SCM_EOL);
-      tail = SCM_CDRLOC(*tail);
+      tail = SCM_CDRLOC (*tail);
     }
-  
+
   busy = scm_merge_x (lst, busy, ly_grob_pq_less_p_proc);
   context ()->set_property ("busyGrobs", busy);
 
index 16fb8be22190dec226f100f017361d2e8101ab98..8cb3243f4bf454d32ee777712b57f8a781a72b26 100644 (file)
@@ -61,7 +61,6 @@ Grob::add_to_list_property (SCM sym, SCM thing)
 }
 
 
-
 extern void check_interfaces_for_property (Grob const *me, SCM sym);
 
 void
@@ -71,12 +70,12 @@ Grob::internal_set_property (SCM sym, SCM v)
   SCM grob_p = ly_lily_module_constant ("ly:grob?");
   SCM grob_list_p = ly_lily_module_constant ("grob-list?");
   SCM type = scm_object_property (sym, ly_symbol2scm ("backend-type?"));
-  
+
   if (type == grob_p
       || type == grob_list_p
       || (unsmob_grob (v) && ly_symbol2scm ("cause") != sym))
     {
-      scm_display (scm_list_2 (sym, type), scm_current_output_port());
+      scm_display (scm_list_2 (sym, type), scm_current_output_port ());
       assert (0);
     }
 #endif
@@ -99,7 +98,6 @@ Grob::internal_set_property (SCM sym, SCM v)
 
 
 
-
 SCM
 Grob::internal_get_property (SCM sym) const
 {
@@ -109,11 +107,11 @@ Grob::internal_get_property (SCM sym) const
       note_property_access (&grob_property_lookup_table, sym);
     }
 #endif
-  
+
   SCM s = scm_sloppy_assq (sym, mutable_property_alist_);
   if (s != SCM_BOOL_F)
     return scm_cdr (s);
-  
+
   s = scm_sloppy_assq (sym, immutable_property_alist_);
 
   if (do_internal_type_checking_global && scm_is_pair (s))
@@ -129,7 +127,6 @@ Grob::internal_get_property (SCM sym) const
 }
 
 
-
 void
 Grob::internal_set_object (SCM s, SCM v)
 {
index 3d5d83f4fb7ba6baf2e30fd1aadddd96295336b7..344612c8f83d1fa44b337e2a5927be742be45e8d 100644 (file)
@@ -15,7 +15,6 @@
 #include "system.hh"
 #include "font-interface.hh"
 
-
 LY_DEFINE (ly_grob_set_property_x, "ly:grob-set-property!",
           3, 0, 0, (SCM grob, SCM sym, SCM val),
           "Set @var{sym} in grob @var{grob} to value @var{val}")
@@ -59,7 +58,6 @@ LY_DEFINE (ly_grob_object, "ly:grob-object",
   return sc->internal_get_object (sym);
 }
 
-
 LY_DEFINE (ly_spanner_get_bound, "ly:spanner-get-bound",
           2, 0, 0, (SCM slur, SCM dir),
           "Get one of the bounds of @var{spanner}. @var{dir} is @code{-1} "
@@ -98,7 +96,7 @@ LY_DEFINE (ly_grob_alist_chain, "ly:grob-alist-chain",
       if (global == SCM_UNDEFINED)
        global = SCM_EOL;
     }
-  
+
   return sc->get_property_alist_chain (global);
 }
 
@@ -252,7 +250,6 @@ LY_DEFINE (ly_grob_key, "ly:grob-key",
 }
 
 
-
 LY_DEFINE (ly_grob_default_font, "ly:grob-default-font",
           1, 0, 0, (SCM grob),
           "Return the default font for grob @var{gr}.")
index e7800e96e25864486f94336bb8b053bc8f4e253d..e2e673e1943df8d7666852a7998c92436cd8e2b7 100644 (file)
@@ -4,9 +4,7 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
-   
 
 #include "grob.hh"
 
index bcf0f473b3e86593ba7e7f248f9e200dcf4ebddc..4ace057b8851f136d6afc7fe49fcac2243d479dd 100644 (file)
@@ -57,7 +57,6 @@ Grob::Grob (SCM basicprops,
   mutable_property_alist_ = SCM_EOL;
   object_alist_ = SCM_EOL;
 
-  
   /* We do smobify_self () as the first step.  Since the object lives
      on the heap, none of its SCM variables are protected from
      GC. After smobify_self (), they are.  */
@@ -68,9 +67,9 @@ Grob::Grob (SCM basicprops,
   */
   if (key_)
     {
-      ((Object_key*)key_)->unprotect ();
+      ((Object_key *)key_)->unprotect ();
     }
-  
+
   SCM meta = get_property ("meta");
   if (scm_is_pair (meta))
     {
@@ -100,7 +99,7 @@ Grob::Grob (SCM basicprops,
   for (int a = X_AXIS; a <= Y_AXIS; a++)
     {
       SCM l = off_callbacks[a];
-       
+
       if (scm_ilength (l) >= 0)
        {
          dim_cache_[a].offset_callbacks_ = l;
@@ -111,19 +110,13 @@ Grob::Grob (SCM basicprops,
 
       SCM cb = extent_callbacks[a];
       if (cb == SCM_BOOL_F)
-       {
-         dim_cache_[a].dimension_ = SCM_BOOL_F;
-       }
+       dim_cache_[a].dimension_ = SCM_BOOL_F;
 
       SCM xt = extents[a];
       if (is_number_pair (xt))
-       {
-         dim_cache_[a].dimension_ = xt;
-       }
+       dim_cache_[a].dimension_ = xt;
       else if (ly_is_procedure (cb))
-       {
-         dim_cache_[a].dimension_callback_ = cb;
-       }
+       dim_cache_[a].dimension_callback_ = cb;
       else if (cb == SCM_EOL
               && ly_is_procedure (get_property ("print-function")))
        dim_cache_[a].dimension_callback_ = stencil_extent_proc;
@@ -141,7 +134,7 @@ Grob::Grob (Grob const &s, int copy_index)
   mutable_property_alist_ = ly_deep_copy (s.mutable_property_alist_);
   interfaces_ = s.interfaces_;
   object_alist_ = SCM_EOL;
-  
+
   /* No properties are copied.  That is the job of
      handle_broken_dependencies.  */
   status_ = s.status_;
@@ -150,7 +143,7 @@ Grob::Grob (Grob const &s, int copy_index)
   smobify_self ();
   if (key_)
     {
-      ((Object_key*)key_)->unprotect ();
+      ((Object_key *)key_)->unprotect ();
     }
 }
 
@@ -258,7 +251,7 @@ Grob::get_uncached_stencil () const
          SCM expr = m->expr ();
          if (point_and_click_global)
            expr = scm_list_3 (ly_symbol2scm ("grob-cause"), self_scm (), expr);
-         
+
          stil = Stencil (m->extent_box (), expr).smobbed_copy ();
        }
 
@@ -315,7 +308,6 @@ Grob::handle_broken_dependencies ()
     {
       for (SCM s = object_alist_; scm_is_pair (s); s = scm_cdr (s))
        sp->substitute_one_mutable_property (scm_caar (s), scm_cdar (s));
-
     }
   System *system = get_system ();
 
@@ -350,7 +342,7 @@ Grob::suicide ()
   object_alist_ = SCM_EOL;
   immutable_property_alist_ = SCM_EOL;
   interfaces_ = SCM_EOL;
-  
+
   set_extent (SCM_EOL, Y_AXIS);
   set_extent (SCM_EOL, X_AXIS);
 
@@ -490,7 +482,7 @@ Grob::extent (Grob *refp, Axis a) const
   extra = (a == X_AXIS)
     ? get_property ("minimum-X-extent")
     : get_property ("minimum-Y-extent");
-  
+
   if (scm_is_pair (extra))
     ext.unite (Interval (scm_to_double (scm_car (extra)),
                         scm_to_double (scm_cdr (extra))));
@@ -651,7 +643,6 @@ Grob::programming_error (String s) const
 void
 Grob::discretionary_processing ()
 {
-  
 }
 
 bool
index c231c90eba2a3bbac68d950a13bde66a81b5a9d0..1b3fbd4a201a792517c7c62e4dbdd9beb73579ce 100644 (file)
 #include "text-interface.hh"
 #include "pointer-group-interface.hh"
 
-MAKE_SCHEME_CALLBACK(Hairpin,after_line_breaking,1);
+MAKE_SCHEME_CALLBACK (Hairpin, after_line_breaking, 1);
 SCM
 Hairpin::after_line_breaking (SCM smob)
 {
   Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (smob));
-  
+
   Drul_array<bool> broken;
   Drul_array<Item *> bounds;
   Direction d = LEFT;
@@ -38,14 +38,13 @@ Hairpin::after_line_breaking (SCM smob)
 
   if (broken[LEFT]
       && ly_is_equal (bounds[RIGHT]->get_column ()->get_property ("when"),
-                      bounds[LEFT]->get_property ("when")))
+                     bounds[LEFT]->get_property ("when")))
     {
       me->suicide ();
     }
   return SCM_UNSPECIFIED;
 }
 
-
 MAKE_SCHEME_CALLBACK (Hairpin, print, 1);
 
 SCM
@@ -75,7 +74,7 @@ Hairpin::print (SCM smob)
 
   Grob *common = bounds[LEFT]->common_refpoint (bounds[RIGHT], X_AXIS);
   Drul_array<Real> x_points;
-  
+
   do
     {
       Item *b = bounds[d];
@@ -97,7 +96,7 @@ Hairpin::print (SCM smob)
            {
              bool neighbor_found = false;
              extract_grob_set (me, "adjacent-hairpins", pins);
-             for (int i = 0; i < pins.size(); i++)
+             for (int i = 0; i < pins.size (); i++)
                {
                  /*
                    FIXME: this will fuck up in case of polyphonic
@@ -105,7 +104,7 @@ Hairpin::print (SCM smob)
                    in the current staff/voice.
                  */
 
-                 Spanner *pin = dynamic_cast<Spanner*> (pins[i]);
+                 Spanner *pin = dynamic_cast<Spanner *> (pins[i]);
                  if (pin
                      && (pin->get_bound (LEFT)->get_column () == b->get_column ()
                          || pin->get_bound (RIGHT)->get_column () == b->get_column ()))
index 3b93a0d93b5ef60e6333e833eb84491b00ff5642..30eda507cdeb5b3f2dc1db70596d3306f7ffff13 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "axis-group-engraver.hh"
@@ -32,7 +31,7 @@ Hara_kiri_engraver::derived_mark () const
 {
   scm_gc_mark (interesting_);
 }
-  
+
 void
 Hara_kiri_engraver::start_translation_timestep ()
 {
@@ -40,7 +39,6 @@ Hara_kiri_engraver::start_translation_timestep ()
   interesting_ = get_property ("keepAliveInterfaces");
 }
 
-
 void
 Hara_kiri_engraver::add_element (Grob *e)
 {
@@ -74,7 +72,6 @@ Hara_kiri_engraver::Hara_kiri_engraver ()
   interesting_ = SCM_EOL;
 }
 
-
 ADD_ACKNOWLEDGER (Hara_kiri_engraver, grob);
 ADD_TRANSLATOR (Hara_kiri_engraver,
                /* doc */ "Like Axis_group_engraver, but make a hara-kiri spanner, and add "
index 0fad67b533b96beed735f7a1c9dd231cff28213b..a96fe9a226da537aebbe1f82da05e83a1f6f4f73 100644 (file)
@@ -32,7 +32,7 @@ Hara_kiri_group_spanner::consider_suicide (Grob *me)
 {
   Spanner *sp = dynamic_cast<Spanner *> (me);
 
-  extract_grob_set (me,"items-worth-living", worth);
+  extract_grob_set (me, "items-worth-living", worth);
   if (worth.size ())
     return;
 
@@ -63,7 +63,7 @@ Hara_kiri_group_spanner::force_hara_kiri_callback (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
   (void) axis;
-  
+
   assert (scm_to_int (axis) == Y_AXIS);
   consider_suicide (me);
   return scm_from_double (0.0);
index 4670e4805fc04101fbfb83ae1cdf8293a83329af..20f090c6f9833915115efca0bdfd963db4d56675 100644 (file)
@@ -29,8 +29,7 @@ public:
   DECLARE_ACKNOWLEDGER (note_column);
 };
 
-
-ADD_ACKNOWLEDGER (Horizontal_bracket_engraver,note_column);
+ADD_ACKNOWLEDGER (Horizontal_bracket_engraver, note_column);
 ADD_TRANSLATOR (Horizontal_bracket_engraver,
                "Create horizontal brackets over notes for musical analysis purposes.",
                "HorizontalBracket",
index 3f318b5d68135af1048133a74c265c0d94f06ce3..57225c49d44d0f9f51a3ca679732455dedf9f4bb 100644 (file)
@@ -34,7 +34,7 @@ Horizontal_bracket::print (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
   Spanner *sp = dynamic_cast<Spanner *> (me);
-  
+
   extract_grob_set (me, "columns", gs);
   if (!gs.size ())
     {
index 1ae200c1520c460bd87e98dd66a5576e9c53669f..4046ab06d0a822dc2d7175a2e518c0ca7ab95e1e 100644 (file)
@@ -42,7 +42,7 @@ Hyphen_engraver::Hyphen_engraver ()
 void
 Hyphen_engraver::acknowledge_lyric_syllable (Grob_info i)
 {
-  Item *item = i.item();
+  Item *item = i.item ();
   if (hyphen_)
     hyphen_->set_bound (LEFT, item);
 
@@ -67,9 +67,7 @@ completize_hyphen (Spanner *sp)
     {
       extract_item_set (sp, "heads", heads);
       if (heads.size ())
-       {
-         sp->set_bound (RIGHT, heads.top ());
-       }
+       sp->set_bound (RIGHT, heads.top ());
     }
 }
 
@@ -134,7 +132,7 @@ Hyphen_engraver::stop_translation_timestep ()
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Hyphen_engraver,lyric_syllable);
+ADD_ACKNOWLEDGER (Hyphen_engraver, lyric_syllable);
 ADD_TRANSLATOR (Hyphen_engraver,
                /* doc */ "Create lyric hyphens",
                /* create */ "LyricHyphen",
index 22563ac05e9ef078a0e68256a1e6e32a6631f45c..85325987fed53259caa3d188c6cb5f0c4cfe7a49 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #ifndef AXIS_GROUP_ENGRAVER_HH
index b69fc15fce936c809c956768f74da4b33ae80d29..120840cff41f5e98e051c8b4417b9638cf328cd8 100644 (file)
 #include "lily-guile.hh"
 #include "stem-info.hh"
 
-
 /*
   TODO: move quanting in separate file.
- */
-struct Beam_quant_parameters {
+*/
+struct Beam_quant_parameters
+{
   Real INTER_QUANT_PENALTY;
   Real SECONDARY_BEAM_DEMERIT;
   Real STEM_LENGTH_DEMERIT_FACTOR;
   Real REGION_SIZE;
 
-
   /*
     threshold to combat rounding errors.
   */
@@ -37,7 +36,7 @@ struct Beam_quant_parameters {
   Real IDEAL_SLOPE_FACTOR;
   Real ROUND_TO_ZERO_SLOPE;
 
-  void fill (Grob *him); 
+  void fill (Grob *him);
 };
 
 class Beam
@@ -69,7 +68,7 @@ public:
   DECLARE_SCHEME_CALLBACK (slope_damping, (SCM));
   DECLARE_SCHEME_CALLBACK (shift_region_to_valid, (SCM));
   DECLARE_SCHEME_CALLBACK (quanting, (SCM));
-  static Real score_slopes_dy (Real, Real, Real, Real, Real, bool, Beam_quant_parameters const*);
+  static Real score_slopes_dy (Real, Real, Real, Real, Real, bool, Beam_quant_parameters const *);
 
   static Real score_stem_lengths (Link_array<Grob> const &stems,
                                  Array<Stem_info> const &stem_infos,
@@ -77,11 +76,11 @@ public:
                                  Array<Real> const &stem_xs,
                                  Real xl, Real xr,
                                  bool knee,
-                                 Real yl, Real yr, Beam_quant_parameters const*);
+                                 Real yl, Real yr, Beam_quant_parameters const *);
   static Real score_forbidden_quants (Real, Real,
                                      Real, Real, Real, Real,
                                      Drul_array<int>, Direction, Direction,
-                                     Beam_quant_parameters const*);
+                                     Beam_quant_parameters const *);
 
   static int get_direction_beam_count (Grob *me, Direction d);
 private:
index 813e6989532adabf155fb02a6848d543fb3e8c1e..a8119664b798d4f74bfe5c3fa272eb2f98c30caa 100644 (file)
@@ -12,7 +12,7 @@
 class Box
 {
   Interval interval_a_[NO_AXES];
-  DECLARE_SIMPLE_SMOBS(Box,);
+  DECLARE_SIMPLE_SMOBS (Box,);
 public:
   Interval &x () {return interval_a_[X_AXIS]; }
   Interval &y (){ return interval_a_[Y_AXIS]; }
diff --git a/lily/include/chord.hh b/lily/include/chord.hh
deleted file mode 100644 (file)
index e69de29..0000000
index 22a4c63995147b2ed602698197d261533b81ee8a..5cc57063b037b66559f2799f5cd63c7e1d691e73 100644 (file)
@@ -31,7 +31,7 @@ private:
   SCM context_aliases_;
   SCM translator_group_type_;
   SCM default_child_;
-  
+
 public:
   void add_context_mod (SCM);
   SCM get_default_child (SCM user_mods) const;
index 8e3f18be15dc4a81da1aecf276f6f79fe25b05f6..b57f4e0beabbe980a0e9807956111c3bb4d51bdc 100644 (file)
@@ -19,7 +19,7 @@ protected:
   Array<Grob_info> announce_infos_;
   SCM acknowledge_hash_table_;
 public:
-  VIRTUAL_COPY_CONSTRUCTOR ( Translator_group, Engraver_group_engraver);
+  VIRTUAL_COPY_CONSTRUCTOR (Translator_group, Engraver_group_engraver);
   Engraver_group_engraver ();
   virtual void derived_mark () const;
   void do_announces ();
index 6ae14254dfe61bc0b6fead271878b47e7f29d09c..b3a8c6ff0c6608438a0bca401040e40c8a6c24af 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #ifndef FILE_NAME_MAP_HH
index 2e549e741ee2966386b87e65277b47a3a12c04ef..16dcac17f46679753d436c80e0fd1a3dd5883d33 100644 (file)
@@ -17,7 +17,6 @@
 void init_freetype ();
 extern FT_Library freetype2_library;
 
-
 FT_Face open_ft_face (String str);
 
 #endif /* FREETYPE_HH */
index 1742a4e11c68883730cc14b1b6b5ebfd8783228a..ea39e14977766e5b21d4b7cc2b02b4658bb4d93c 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #ifndef GRID_LINE_INTERFACE_HH
index f0f6b9072c5e3e7209a043bb78a4c7fdd4b90312..67f95ac20170f3e9c15aeb403c96314996f01c12 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #ifndef GROB_ARRAY_HH
@@ -18,8 +17,8 @@ class Grob_array
 {
   Link_array<Grob> grobs_;
   bool ordered_;
-  
-  DECLARE_SIMPLE_SMOBS(Grob_array,);
+
+  DECLARE_SIMPLE_SMOBS (Grob_array,);
 
   Grob_array ();
 public:
@@ -27,10 +26,10 @@ public:
   void set_ordered (bool b) { ordered_ = b; }
   Item *item (int i);
   Spanner *spanner (int i);
-  Grob * grob (int i) { return grobs_.elem (i); }
-  int size () const { return grobs_.size(); }
+  Grob *grob (int i) { return grobs_.elem (i); }
+  int size () const { return grobs_.size (); }
   bool is_empty () const;
-  void clear ();  
+  void clear ();
   void add (Grob *x) { grobs_.push (x); }
   void set_array (Link_array<Grob> const &src);
   Link_array<Grob> &array_reference ();
@@ -43,6 +42,5 @@ DECLARE_UNSMOB (Grob_array, grob_array);
 Link_array<Grob> const &ly_scm2link_array (SCM x);
 SCM grob_list_to_grob_array (SCM lst);
 
-
 #endif /* GROB_ARRAY_HH */
 
index 680bee5105c9f793140e620a74ccc1f4b94a51e3..fcf2b44a752018784cd675533728d9bddf090f05 100644 (file)
@@ -24,9 +24,9 @@ class Grob_info
   friend class Engraver;
 public:
   Grob *grob () const { return grob_; }
-  Translator *origin_translator () const { return origin_trans_; } 
+  Translator *origin_translator () const { return origin_trans_; }
 
-  Context *context () const; 
+  Context *context () const;
   Music *music_cause ();
   Link_array<Context> origin_contexts (Translator *) const;
   Grob_info (Translator *, Grob *);
index 111e4b3b0b177989ab25af105064fe247755192e..a8993b93713dd4dbaf9b914c861d3062dd0558ac 100644 (file)
@@ -39,16 +39,15 @@ protected:
   /*
     If this is a property, it accounts for 25% of the property
     lookups.
-   */
+  */
   SCM interfaces_;
 
-  
-  
+
   /* BARF */
   friend class Spanner;
   friend SCM ly_grob_properties (SCM);
   friend SCM ly_grob_basic_properties (SCM);
-  friend void check_interfaces_for_property  (Grob const*, SCM);
+  friend void check_interfaces_for_property (Grob const *, SCM);
   void substitute_object_links (SCM, SCM);
   char status_;
 
@@ -80,7 +79,7 @@ public:
 
   /*
     JUNKME.
-   */
+  */
   void add_to_list_property (SCM, SCM);
   void add_to_object_list (SCM sym, SCM thing);
 
index e5ad3b42c5a44e17d561db13a1018a6f5e78c12e..44b895089b520c65b7f9d02f36048674a0e6f4df 100644 (file)
@@ -24,7 +24,7 @@ public:
   Source_file *get_source_file () const;
   char const *start () const;
   char const *end () const;
-  
+
   void set (Source_file *, char const *, char const *);
   void warning (String) const; // should use member func?
   void non_fatal_error (String) const;
@@ -37,14 +37,14 @@ public:
   String location_string () const;
   String line_number_string () const;
   String file_string ()const;
-  
+
   int line_number ()const;
   int column_number ()const;
   int end_line_number ()const;
   int end_column_number ()const;
 
-  void get_counts (int*line, int *char_count, int *col) const;
-  
+  void get_counts (int *line, int *char_count, int *col) const;
+
   Input (Input const &i);
   Input ();
 };
index ce3cba4aa88db8c06b2bcfb3ef02ac1c0214f93c..d1a12e6be9b7897134778c1c01734fb354d99894 100644 (file)
@@ -18,7 +18,6 @@ protected:
   void stop_translation_timestep ();
   virtual void finalize ();
 
-
   DECLARE_ACKNOWLEDGER (rest);
   DECLARE_ACKNOWLEDGER (note_head);
   virtual bool try_music (Music *);
index 03abe6bde5eac278d91f1aa93772aaaf730b0b73..24989a8acfc487ef898bad208d9b06a4e7ecae1a 100644 (file)
@@ -68,8 +68,8 @@ inline SCM ly_symbol2scm (char const *x) { return scm_str2symbol ((x)); }
     if (__builtin_constant_p ((x)))                                    \
       {                                                                        \
        if (!cached)                                                    \
-         value = cached = scm_eval (scm_str2symbol (x),        \
-                                                           global_lily_module); \
+         value = cached = scm_eval (scm_str2symbol (x),                \
+                                    global_lily_module);               \
       }                                                                        \
     else                                                               \
       value = scm_eval (scm_str2symbol (x), global_lily_module);       \
index 803be9db63e9134a801868f85c9c885a0d8da050..0f92293a4d25b99b48bcd1b40c55b09f73ebde51 100644 (file)
@@ -76,7 +76,6 @@ inline bool ly_is_list (SCM x) { return SCM_NFALSEP (scm_list_p (x)); }
 inline bool ly_is_procedure (SCM x) { return SCM_NFALSEP (scm_procedure_p (x)); }
 inline bool ly_is_port (SCM x) { return SCM_NFALSEP (scm_port_p (x)); }
 
-
 inline bool ly_is_equal (SCM x, SCM y)
 {
   return SCM_NFALSEP (scm_equal_p (x, y));
@@ -160,8 +159,7 @@ typedef SCM (*Scheme_function_2) (...);
 typedef SCM (*Scheme_function_3) (...);
 #endif
 
-
-#define scm_cdr ly_cdr 
+#define scm_cdr ly_cdr
 #define scm_car ly_car
 
 #ifndef scm_is_pair
@@ -174,5 +172,4 @@ inline bool ly_is_pair (SCM x) { return SCM_I_CONSP (x); }
 
 
 
-
 #endif /* LILY_GUILE_HH */
index c971d94c327fab80ac2555bf1cbedbd4e8b636d2..9f20f8dadc7739cc356665ee61e6cd0801237ce6 100644 (file)
@@ -72,6 +72,6 @@ SCM ly_parser_scorify (SCM, SCM);
 Output_def *get_layout (Lily_parser *parser);
 Output_def *get_midi (Lily_parser *parser);
 Output_def *get_paper (Lily_parser *parser);
-SCM get_header(Lily_parser *parser);
+SCM get_header (Lily_parser *parser);
 
 #endif /* LILY_PARSER_HH */
index 15c990ddff8e0d8abeaabf68bddcf42a8384c5f6..5e7d39e78ad7145729818f2f96f11566feba4372 100644 (file)
@@ -171,10 +171,8 @@ class Transposed_music;
 class Type_swallow_translator;
 class yyFlexLexer;
 
-
-typedef void (*Engraver_void_function_engraver_grob_info)(Engraver*, Grob_info);
-typedef void (*Translator_void_method_ptr)(Translator*);
-
+typedef void (*Engraver_void_function_engraver_grob_info) (Engraver *, Grob_info);
+typedef void (*Translator_void_method_ptr) (Translator *);
 
 
 
index 73b269ebb18daf4257325529fb3e313af173247b..b8d770c992cad1573ec5515bba312c108fdc8bb2 100644 (file)
@@ -22,7 +22,6 @@ struct Line_interface
   static Stencil arrows (Grob *me, Offset from, Offset to,
                         bool from_arrow,
                         bool to_arrow);
-
 };
 
 #endif /* LINE_INTERFACE_HH */
index 7497b66d367417ba1144a936211163245f053469..ec098483500e6e71a4e851fe55012db774de45ad 100644 (file)
 
 #define IMPLEMENT_SMOBS(CL)                                            \
   IMPLEMENT_BASE_SMOBS (CL)                                            \
-  void                                                         \
+    void                                                               \
   CL::smobify_self ()                                                  \
   {                                                                    \
     self_scm_ = unprotected_smobify_self ();                           \
-    protection_cons_ = SCM_EOL;\
-    protect();\
-  }\
-  void\
-  CL::protect(){                                       \
-    protect_smob (self_scm_, &protection_cons_);\
-  }\
-  SCM\
-  CL::unprotect ()\
-  {\
-    unprotect_smob (&protection_cons_);\
-    return self_scm_;\
+    protection_cons_ = SCM_EOL;                                                \
+    protect ();                                                                \
+  }                                                                    \
+  void                                                                 \
+  CL::protect ()                                                       \
+  {                                                                    \
+    protect_smob (self_scm_, &protection_cons_);                       \
+  }                                                                    \
+  SCM                                                                  \
+  CL::unprotect ()                                                     \
+  {                                                                    \
+    unprotect_smob (&protection_cons_);                                        \
+    return self_scm_;                                                  \
   }                                                                    \
   SCM                                                                  \
   CL::unprotected_smobify_self ()                                      \
index 3146dfc3bf0ce9e8c7d9833f84bb33e20b540d49..2a3c9318a68fefe8ec4e1a75d66adb1ec046e67e 100644 (file)
 /*
  * These are all possible mensural ligature primitives.
  */
-#define MLP_NONE       0x00 // no output
-#define MLP_UP         0x01 // upward left stem
-#define MLP_DOWN       0x02 // downward left stem
-#define MLP_BREVIS     0x04 // mensural brevis head
-#define MLP_LONGA      0x08 // mensural brevis head with right cauda
-#define MLP_MAXIMA     0x10 // mensural maxima head without stem
-#define MLP_FLEXA      0x20 // mensural flexa-like shape
+#define MLP_NONE 0x00 // no output
+#define MLP_UP 0x01 // upward left stem
+#define MLP_DOWN 0x02 // downward left stem
+#define MLP_BREVIS 0x04 // mensural brevis head
+#define MLP_LONGA 0x08 // mensural brevis head with right cauda
+#define MLP_MAXIMA 0x10 // mensural maxima head without stem
+#define MLP_FLEXA 0x20 // mensural flexa-like shape
 
 #define MLP_STEM (MLP_UP | MLP_DOWN)
 #define MLP_SINGLE_HEAD (MLP_BREVIS | MLP_LONGA | MLP_MAXIMA)
index 407d0b4e258131af9a3840d0d1f4269738aedc29..d67e6f927e1fdecf766d85e7784d79b3be35a6b5 100644 (file)
    investigated whether this is a mingw bug or a windows bug (ie,
    mingw compatibility feature), also not reported yet.  */
 
-#  ifdef CHAR
-#    define LILY_CHAR CHAR
-#    undef CHAR
-#  endif
-#  define CHAR MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_CHAR
-
-#  ifdef CONTEXT
-#    define LILY_CONTEXT CONTEXT
-#    undef CONTEXT
-#  endif
-#  define CONTEXT MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_CONTEXT
-
-#  ifdef DATADIR
-#    define LILY_DATADIR DATADIR
-#    undef DATADIR
-#  endif
-#  define DATADIR MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_DATADIR
-
-#  ifdef RELATIVE
-#    define LILY_RELATIVE RELATIVE
-#    undef RELATIVE
-#  endif
-#  define RELATIVE MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_RELATIVE
-
-#  ifdef THIS
-#    define LILY_THIS THIS
-#    undef THIS
-#  endif
-#  define THIS MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_THIS
-
-//#  include <winsock2.h>
+# ifdef CHAR
+# define LILY_CHAR CHAR
+# undef CHAR
+# endif
+# define CHAR MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_CHAR
+
+# ifdef CONTEXT
+# define LILY_CONTEXT CONTEXT
+# undef CONTEXT
+# endif
+# define CONTEXT MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_CONTEXT
+
+# ifdef DATADIR
+# define LILY_DATADIR DATADIR
+# undef DATADIR
+# endif
+# define DATADIR MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_DATADIR
+
+# ifdef RELATIVE
+# define LILY_RELATIVE RELATIVE
+# undef RELATIVE
+# endif
+# define RELATIVE MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_RELATIVE
+
+# ifdef THIS
+# define LILY_THIS THIS
+# undef THIS
+# endif
+# define THIS MINGW_INFRINGES_ON_OUR_NAMESPACE_USING_THIS
+
+//#include <winsock2.h>
 
 #if defined (__MINGW32__) && !defined (STATIC)
 # define SCM_IMPORT 1
 #endif
 
-#  include <libguile.h>
-
-#  undef CHAR
-#  ifdef LILY_CHAR
-#    define CHAR LILY_CHAR
-#  endif
-
-#  undef CONTEXT
-#  ifdef LILY_CONTEXT
-#    define CONTEXT LILY_CONTEXT
-#  endif
-#  undef CONTEXT
-
-#  undef DATADIR
-#  ifdef LILY_DATADIR
-#    define DATADIR LILY_DATADIR
-#  endif
-#  undef DATADIR
-
-#  undef RELATIVE
-#  ifdef LILY_RELATIVE
-#    define RELATIVE LILY_RELATIVE
-#  endif
-
-#  undef THIS
-#  ifdef LILY_THIS
-#    define THIS LILY_THIS
-#  endif
-
+#include <libguile.h>
+
+# undef CHAR
+# ifdef LILY_CHAR
+# define CHAR LILY_CHAR
+# endif
+
+# undef CONTEXT
+# ifdef LILY_CONTEXT
+# define CONTEXT LILY_CONTEXT
+# endif
+# undef CONTEXT
+
+# undef DATADIR
+# ifdef LILY_DATADIR
+# define DATADIR LILY_DATADIR
+# endif
+# undef DATADIR
+
+# undef RELATIVE
+# ifdef LILY_RELATIVE
+# define RELATIVE LILY_RELATIVE
+# endif
+
+# undef THIS
+# ifdef LILY_THIS
+# define THIS LILY_THIS
+# endif
 
 #endif /* __MINGW__ */
 
diff --git a/lily/include/minterval.hh b/lily/include/minterval.hh
deleted file mode 100644 (file)
index d08c0b4..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-   -- declare MInterval
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#ifndef 
-#define 
-
-#include "moment.hh"
-
-typedef Interval_t<Moment> MInterval;
-
-#endif // 
-
-#error
index 6d2587e577472c0527ff420d8936d542a0e01220..2b1f74ed5377f172a67f68283e7f21a14f228917 100644 (file)
@@ -97,8 +97,8 @@ bool is_child_context (Context *me, Context *child);
                             (),                                        \
                             "")                                        \
   {                                                                    \
-    Class *c = (new Class);\
-    return c->unprotect();\
+    Class *c = (new Class);                                            \
+    return c->unprotect ();                                            \
   }
 
 DECLARE_UNSMOB (Music_iterator, iterator);
index c185f622475684193082862c1b500b50fb5d553c..15f930000bde1264909ff544666274499cc005ce 100644 (file)
 
 class Music_output
 {
-  DECLARE_SMOBS(Music_output, foo);
+  DECLARE_SMOBS (Music_output, foo);
 
 protected:
   Music_output ();
 
 public:
-  virtual void derived_mark () const; 
-  virtual void process (); 
+  virtual void derived_mark () const;
+  virtual void process ();
 };
 
 DECLARE_UNSMOB (Music_output, music_output);
index ae90e276dbb5c6d5c6d94b3f80a2930d2f692979..05d6f54d3387f00284079c3cc75eb3dfe0a55d93 100644 (file)
@@ -25,7 +25,7 @@ class Open_type_font : public Font_metric
   SCM lily_character_table_;
   SCM lily_global_table_;
   SCM lily_index_to_bbox_table_;
-  
+
   Index_to_charcode_map index_to_charcode_map_;
   Open_type_font (FT_Face);
 
index f0d29289180ffa1b61e47cc1b3f5f5788eedffb7..2780a231edfd8c6a3fc61670996267df4dcbd8c0 100644 (file)
@@ -35,7 +35,7 @@ public:
   Output_def *paper_;
 
   Paper_book ();
-  
+
   void add_score (SCM);
   void add_performance (SCM);
 
@@ -47,7 +47,6 @@ public:
   void classic_output (SCM output_channel);
   void output (SCM output_channel);
   void post_processing (SCM, SCM);
-  
 };
 
 DECLARE_UNSMOB (Paper_book, paper_book)
index 651e7c786b8126e2121d4bae6152c54520b273d7..ee442e0805843d65e79bc60d79ce327215391bb2 100644 (file)
@@ -4,21 +4,18 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #ifndef PAPER_COLUMN_ENGRAVER_HH
 #define PAPER_COLUMN_ENGRAVER_HH
 
-
 #include "engraver.hh"
 
-
 class Paper_column_engraver : public Engraver
 {
   void make_columns ();
-  void set_columns (Paper_column*, Paper_column*); 
-  TRANSLATOR_DECLARATIONS(Paper_column_engraver);
+  void set_columns (Paper_column *, Paper_column *);
+  TRANSLATOR_DECLARATIONS (Paper_column_engraver);
 
 protected:
   void stop_translation_timestep ();
@@ -26,7 +23,7 @@ protected:
   void process_music ();
   virtual void initialize ();
   virtual void finalize ();
-  virtual bool try_music (Music*);
+  virtual bool try_music (Music *);
 
   DECLARE_ACKNOWLEDGER (item);
   DECLARE_ACKNOWLEDGER (note_spacing);
@@ -43,7 +40,6 @@ protected:
 public:
   // ug.h 
   void forbid_breaks ();
-
 };
 
 #endif /* PAPER_COLUMN_ENGRAVER_HH */
index ff6d642fba7cfd7a2ca885ab8b1cc57481a48f13..282b7c4c2638e0fb394ef7fa537576e538aff4f9 100644 (file)
@@ -18,7 +18,6 @@ class Paper_column : public Item
   /// if lines are broken then this column is in #line#
   System *system_;
 
-
   // ugh: friend declarations.
   friend void set_loose_columns (System *which, Column_x_positions const *posns);
   friend class System;
@@ -33,7 +32,7 @@ public:
 
   int get_rank () const { return rank_; }
   void set_rank (int);
-  
+
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
 
index bf9443cd507b642973c7fbe3678014ea44899400..a8191a361f51307a28d213f36ecf5040f9d00cad 100644 (file)
@@ -25,7 +25,7 @@ public:
 
   Output_def *layout () const;
   System *root_system () const;
-  
+
   void typeset_system (System *);
   Array<Column_x_positions> calc_breaking ();
 
index e4cd0500ceb59de897ad288a52b35b928d8a7bb2..2a8d9a8d4e1b1033e82508642538749bd0c7c013 100644 (file)
@@ -16,13 +16,13 @@ typedef void (Performer:: *Performer_method) (void);
 class Performer_group_performer : public virtual Translator_group
 {
 public:
-  VIRTUAL_COPY_CONSTRUCTOR (Translator_group,Performer_group_performer);
+  VIRTUAL_COPY_CONSTRUCTOR (Translator_group, Performer_group_performer);
 
   void do_announces ();
   virtual void announce_element (Audio_element_info);
   virtual void play_element (Audio_element *p);
   virtual int get_tempo () const;
-  
+
 protected:
   Array<Audio_element_info> announce_infos_;
 
index 0565b83c1f568cdbad9d9cccf55b44a4b71c7aa7..ba13af355e2540c5290934738f6e6f76f75ab9db 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #ifndef POINTER_GROUP_INTERFACE_HH
@@ -14,7 +13,6 @@
 #include "lily-proto.hh"
 #include "lily-guile.hh"
 
-
 struct Pointer_group_interface
 {
 public:
@@ -26,20 +24,18 @@ public:
 Link_array<Grob> const &internal_extract_grob_array (Grob const *elt, SCM symbol);
 Link_array<Item> internal_extract_item_array (Grob const *elt, SCM symbol);
 
-#define extract_grob_array(x,prop) internal_extract_grob_array (x, ly_symbol2scm (prop))
-#define extract_item_array(x,prop) internal_extract_item_array (x, ly_symbol2scm (prop))
-
+#define extract_grob_array(x, prop) internal_extract_grob_array (x, ly_symbol2scm (prop))
+#define extract_item_array(x, prop) internal_extract_item_array (x, ly_symbol2scm (prop))
 
 /*
   This is dubious coding style, but lets not risk that we change the
   representation of grob sets again.
- */
-#define extract_grob_set(grob,prop,set) \
-  Link_array<Grob> const &set (internal_extract_grob_array (grob, ly_symbol2scm (prop))) 
-#define extract_item_set(grob,prop,set) \
+*/
+#define extract_grob_set(grob, prop, set)                              \
+  Link_array<Grob> const &set (internal_extract_grob_array (grob, ly_symbol2scm (prop)))
+#define extract_item_set(grob, prop, set)                              \
   Link_array<Item> set (internal_extract_item_array (grob, ly_symbol2scm (prop)))
 
 
-
 #endif /* POINTER_GROUP_INTERFACE_HH */
 
index 83206f686fd48f1f42359aa586e1ffe535fc6eef..65986bc658f898ae5e99c5420d81e9763e94a221 100644 (file)
@@ -1,10 +1,9 @@
 /*
-  profile.hh -- declare property profiling utils. 
+  profile.hh -- declare property profiling utils.
 
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #ifndef PROFILE_HH
index 53f900a00d1e76411d1798b1eca12bf08b092a50..c307d8812244dfe3a859d7a6a86f30a8b82da5c1 100644 (file)
@@ -21,5 +21,4 @@ SCM ly_get_option (SCM);
 SCM ly_set_option (SCM, SCM);
 
 
-
 #endif /* SCM_OPTION_HH */
index efb77d974b28a776d1305c2de2513a48accb2d7d..5444ed6054146e4a221f1fba46d8fc3b7491935a 100644 (file)
@@ -4,13 +4,11 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #ifndef RECORDING_GROUP_ENGRAVER_HH
 #define RECORDING_GROUP_ENGRAVER_HH
 
-
 #include "engraver-group-engraver.hh"
 
 class Recording_group_engraver : public Engraver_group_engraver
index f3847c528efb1151e34ec6ceb23df7a91ac9abfc..94273c0887683dd3caf3ac9505bf7a7c51fbbc5b 100644 (file)
@@ -28,7 +28,6 @@ protected:
   virtual void prepare (Moment);
   virtual void one_time_step ();
 
-  
   /* Engraver_group_engraver interface */
   virtual bool try_music (Music *);
   virtual void initialize ();
@@ -38,7 +37,7 @@ protected:
 
   /*
     Translator interface
-   */
+  */
   virtual void derived_mark () const;
 
 public:
index 953127e1328d925e6e8c45f0d53da16cd4a26896..bd8528b876c377ff2462e56ffcd3d42c20268b73 100644 (file)
@@ -17,7 +17,7 @@
 class Score_performer : public Score_translator, public virtual Performer_group_performer
 {
 public:
-  VIRTUAL_COPY_CONSTRUCTOR (Translator_group,Score_performer);
+  VIRTUAL_COPY_CONSTRUCTOR (Translator_group, Score_performer);
   ~Score_performer ();
   Performance *performance_;
 
index 23e67bceda75bb3fdef8e8e116a4f388ed30e9b3..5e241d0e5f6bbb3cc51c2e6a10285bd8c2a7cf97 100644 (file)
@@ -30,7 +30,7 @@ public:
   Slur_configuration ();
 
   void generate_curve (Slur_score_state const &state, Real r0, Real h_inf,
-                      Array<Offset> const&);
+                      Array<Offset> const &);
   void score (Slur_score_state const &);
 protected:
   void score_extra_encompass (Slur_score_state const &);
index 429aca960bd1d378c625d5477d5cf68563e45840..ba86f0fe84227c05c0413c971c4e184e2c053cc8 100644 (file)
   private:                                     \
   void smobify_self ();                                \
   SCM self_scm_;                               \
-  SCM protection_cons_; \
+  SCM protection_cons_;                                \
   public:                                      \
-  SCM unprotect();\
-  void protect();\
+  SCM unprotect ();                            \
+  void protect ();                             \
   SCM self_scm () const { return self_scm_; }  \
   private:
 
index 71a9df5d3292dad73d60800a127a0f1908365139..1a610703489611b7b16c02443cdc6ea0183eb4bb 100644 (file)
@@ -52,7 +52,7 @@ public:
 public:
   Slice line_slice (char const *pos_str0) const;
   String line_string (char const *pos_str0) const;
-  void get_counts (char const *pos_str0, int*, int*, int*) const;
+  void get_counts (char const *pos_str0, int *, int *, int *) const;
 
   /*
     JUNKME.
index 7dbfdfc8b4ea90b221d3a8fa22163658f475d166..60ad275958953414b83d9a1f07c179b9fde1a693 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #ifndef SPACING_SPANNER_HH
@@ -21,37 +20,37 @@ struct Spacing_options
   bool float_nonmusical_columns_;
   Rational global_shortest_;
   Real increment_;
-  Real shortest_duration_space_; 
-  
+  Real shortest_duration_space_;
+
   void init ();
   void init_from_grob (Grob *me);
-  Real get_duration_space (Moment d, bool*) const;
+  Real get_duration_space (Moment d, bool *) const;
 };
 
 /*
   TODO: prune to public interface.
- */
+*/
 class Spacing_spanner
 {
 public:
   static void generate_pair_spacing (Grob *me,
                                     Paper_column *l, Paper_column *r,
                                     Paper_column *nextr,
-                                    Spacing_options const *options);  
+                                    Spacing_options const *options);
   static void standard_breakable_column_spacing (Grob *me, Item *l, Item *r,
                                                 Real *fixed, Real *space,
-                                                Spacing_options const*);
+                                                Spacing_options const *);
   static Real default_bar_spacing (Grob *, Grob *, Grob *, Moment);
-  static Real note_spacing (Grob *, Grob *, Grob *, Spacing_options const*, bool *);
-  static Real get_duration_space (Moment dur, Spacing_options const*,  bool *);
+  static Real note_spacing (Grob *, Grob *, Grob *, Spacing_options const *, bool *);
+  static Real get_duration_space (Moment dur, Spacing_options const *, bool *);
   static Rational find_shortest (Grob *, Link_array<Grob> const &);
   static Rational effective_shortest_duration (Grob *me, Link_array<Grob> const &all);
-  static void breakable_column_spacing (Grob *, Item *l, Item *r, Spacing_options const*);
-  static void prune_loose_columns (Grob *, Link_array<Grob> *cols, Spacing_options const*);
+  static void breakable_column_spacing (Grob *, Item *l, Item *r, Spacing_options const *);
+  static void prune_loose_columns (Grob *, Link_array<Grob> *cols, Spacing_options const *);
   static void set_explicit_neighbor_columns (Link_array<Grob> const &cols);
   static void set_implicit_neighbor_columns (Link_array<Grob> const &cols);
-  static void generate_springs (Grob *me, Link_array<Grob> const &cols, Spacing_options const*);
-  static void musical_column_spacing (Grob *, Item *, Item *, Spacing_options const*);
+  static void generate_springs (Grob *me, Link_array<Grob> const &cols, Spacing_options const *);
+  static void musical_column_spacing (Grob *, Item *, Item *, Spacing_options const *);
   DECLARE_SCHEME_CALLBACK (set_springs, (SCM));
   static bool has_interface (Grob *);
 };
index 6c0d0730a200f2879b68207d663e295769be2c5a..9b537093bcd1ebf7e8af2a5ebaec19da285530bd 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #ifndef STAFF_SYMBOL_ENGRAVER_HH
@@ -25,7 +24,7 @@ protected:
   Spanner *span_;
   Spanner *finished_span_;
   bool first_start_;
-  
+
 protected:
   virtual void start_spanner ();
   virtual void stop_spanner ();
index 2be9a3d7bbf61c9b7bcd214c99906c0d69da95af..8e0d1bcf91d1a0c9278dd77bcbebdac6f25e71af 100644 (file)
@@ -80,7 +80,7 @@ public:
   Interval extent (Axis) const;
   Box extent_box () const;
   bool is_empty () const;
-  Stencil in_color (Real r, Real g, Real b) const; 
+  Stencil in_color (Real r, Real g, Real b) const;
 
   static SCM ly_get_stencil_extent (SCM mol, SCM axis);
   static SCM ly_set_stencil_extent_x (SCM, SCM, SCM);
index e79f96cbe53398f34381a52b7596540f74ba62b3..23b6ec3c04fd43f5543c5c73e3e317b5f2aa7bf9 100644 (file)
@@ -21,7 +21,7 @@ class System : public Spanner
 {
   int rank_;
   Grob_array *all_elements_;
-  void init_elements ();  
+  void init_elements ();
 public:
   int get_rank () const;
   void post_processing ();
index bea4611a5c927c8593b1dcd39c1033ea89999ce1..d511ba1676385c78900e30f0bcdd9da2513eaf71 100644 (file)
@@ -28,5 +28,4 @@ public:
   Rational measure_length () const;
 };
 
-
 #endif // TIMING_TRANSLATOR_HH
index 9691dae857894fefd4d080f653e4f41cacdada11..914df8c167e13818057a56ba19a4dceeed8a4605 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #ifndef TRANSLATOR_DISPATCH_LIST_HH
@@ -29,7 +28,7 @@ public:
   SCM static create (SCM trans_list,
                     SCM iface_list);
 
-  DECLARE_SIMPLE_SMOBS(Engraver_dispatch_list,);
+  DECLARE_SIMPLE_SMOBS (Engraver_dispatch_list,);
 };
 
 #endif /* TRANSLATOR_DISPATCH_LIST_HH */
index 225629c4c124674056ae5fb7656284e22f2f779d..bf6e37168f33022734cf617408833940b089167f 100644 (file)
 
 typedef void (Translator:: *Translator_method) (void);
 typedef void (Translator_group:: *Translator_group_method) (void);
-typedef void (*Translator_group_void_method)(Translator_group*);
+typedef void (*Translator_group_void_method) (Translator_group *);
 
 struct Translator_method_binding
 {
   Translator *translator_;
   Translator_void_method_ptr method_;
-  
-  Translator_method_binding()
+
+  Translator_method_binding ()
   {
   }
-  Translator_method_binding (Translator*tr, Translator_void_method_ptr ptr)
+  Translator_method_binding (Translator *tr, Translator_void_method_ptr ptr)
   {
     translator_ = tr;
     method_ = ptr;
@@ -32,25 +32,24 @@ struct Translator_method_binding
   void invoke ()
   {
     if (method_)
-      (*method_)(translator_);
+      (*method_) (translator_);
   }
 };
 
-
 class Translator_group
 {
 private:
   void precompute_method_bindings ();
   Array<Translator_method_binding>
-    precomputed_method_bindings_[TRANSLATOR_METHOD_PRECOMPUTE_COUNT];
+  precomputed_method_bindings_[TRANSLATOR_METHOD_PRECOMPUTE_COUNT];
 
   Translator_group_void_method
-    precomputed_self_method_bindings_[TRANSLATOR_METHOD_PRECOMPUTE_COUNT];
+  precomputed_self_method_bindings_[TRANSLATOR_METHOD_PRECOMPUTE_COUNT];
 
 public:
   VIRTUAL_COPY_CONSTRUCTOR (Translator_group, Translator_group);
   DECLARE_SMOBS (Translator_group, dummy);
-  
+
 public:
   virtual Translator_group *get_daddy_translator ()const;
   virtual SCM get_simple_trans_list ();
@@ -60,21 +59,20 @@ public:
 
   void stop_translation_timestep ();
   void start_translation_timestep ();
-  
+
   virtual void fetch_precomputable_methods (Translator_group_void_method[]);
-  
+
   Translator_group ();
 
   void precomputed_translator_foreach (Translator_precompute_index);
   void call_precomputed_self_method (Translator_precompute_index);
-  
 
-  Context * context () const { return context_; }
+  Context *context () const { return context_; }
 protected:
   SCM simple_trans_list_;
   SCM accept_hash_table_;
   Context *context_;
-  
+
   friend class Context_def;
   virtual void derived_mark () const;
 };
@@ -85,7 +83,7 @@ void recurse_over_translators (Context *c, Translator_method ptr,
 void precomputed_recurse_over_translators (Context *c, Translator_precompute_index idx, Direction dir);
 Translator_group *get_translator_group (SCM sym);
 
-#define ADD_TRANSLATOR_GROUP(classname, desc, grobs, accepted, read, write) \
+#define ADD_TRANSLATOR_GROUP(classname, desc, grobs, accepted, read, write)
 
 DECLARE_UNSMOB (Translator_group, translator_group);
 
index 754bfba73a9acdf6afc39652bea8459c06457e01..606ef9508d101b427320651d55a74a60ad3d303a 100644 (file)
@@ -22,29 +22,31 @@ struct Acknowledge_information
   Engraver_void_function_engraver_grob_info function_;
 };
 
-#define TRANSLATOR_DECLARATIONS(NAME)                  \
-  public:                                              \
-  NAME ();                                             \
-  VIRTUAL_COPY_CONSTRUCTOR (Translator, NAME);         \
-  static SCM static_description_;                      \
-  static Array<Acknowledge_information> acknowledge_static_array_; \
-  virtual void fetch_precomputable_methods (Translator_void_method_ptr methods[]);\
-  virtual SCM static_translator_description () const;  \
-  virtual SCM translator_description () const; \
-  virtual Engraver_void_function_engraver_grob_info get_acknowledger (SCM sym) { \
-    return static_get_acknowledger (sym);\
-  }\
+#define TRANSLATOR_DECLARATIONS(NAME)                                  \
+  public:                                                              \
+  NAME ();                                                             \
+  VIRTUAL_COPY_CONSTRUCTOR (Translator, NAME);                         \
+  static SCM static_description_;                                      \
+  static Array<Acknowledge_information> acknowledge_static_array_;     \
+  virtual void fetch_precomputable_methods (Translator_void_method_ptr methods[]); \
+  virtual SCM static_translator_description () const;                  \
+  virtual SCM translator_description () const;                         \
+  virtual Engraver_void_function_engraver_grob_info get_acknowledger (SCM sym) \
+  {                                                                    \
+    return static_get_acknowledger (sym);                              \
+  }                                                                    \
   static Engraver_void_function_engraver_grob_info static_get_acknowledger (SCM sym);
 
-#define DECLARE_ACKNOWLEDGER(x) public: void acknowledge_ ## x (Grob_info); protected:
+#define DECLARE_ACKNOWLEDGER(x) public : void acknowledge_ ## x (Grob_info); protected:
 
-enum Translator_precompute_index {
-  START_TRANSLATION_TIMESTEP,
-  STOP_TRANSLATION_TIMESTEP,
-  PROCESS_MUSIC,
-  PROCESS_ACKNOWLEDGED,
-  TRANSLATOR_METHOD_PRECOMPUTE_COUNT,
-};
+enum Translator_precompute_index
+  {
+    START_TRANSLATION_TIMESTEP,
+    STOP_TRANSLATION_TIMESTEP,
+    PROCESS_MUSIC,
+    PROCESS_ACKNOWLEDGED,
+    TRANSLATOR_METHOD_PRECOMPUTE_COUNT,
+  };
 
 /*
   Translate music into grobs.
@@ -52,7 +54,7 @@ enum Translator_precompute_index {
 class Translator
 {
   void init ();
-  
+
 protected:
   bool must_be_last_;
 
@@ -68,7 +70,7 @@ public:
   virtual Output_def *get_output_def () const;
   virtual Translator_group *get_daddy_translator ()const;
   virtual Moment now_mom () const;
-  
+
   virtual bool try_music (Music *req);
   virtual void initialize ();
   virtual void finalize ();
@@ -77,7 +79,7 @@ public:
   void start_translation_timestep ();
   void process_music ();
   void process_acknowledged ();
-  
+
   Score_context *get_score_context () const;
   Global_context *get_global_context () const;
 
index 6450793380e9ba24fee1b7d1a395a06217314473..462a287f55465deab43e977b4d890e5252f8f5fe 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #ifndef TRANSLATOR_ICC
   }                                                                    \
   ADD_GLOBAL_CTOR (_ ## T ## _adder);
 
-#define ADD_TRANSLATOR(classname, desc, grobs, accepted, read, write) \
-  Array<Acknowledge_information> classname::acknowledge_static_array_;\
-  IMPLEMENT_FETCH_PRECOMPUTABLE_METHODS(classname); \
+#define ADD_TRANSLATOR(classname, desc, grobs, accepted, read, write)  \
+  Array<Acknowledge_information> classname::acknowledge_static_array_; \
+  IMPLEMENT_FETCH_PRECOMPUTABLE_METHODS (classname);                   \
   ADD_THIS_TRANSLATOR (classname);                                     \
-  Engraver_void_function_engraver_grob_info\
+  Engraver_void_function_engraver_grob_info                            \
   classname::static_get_acknowledger (SCM sym)                         \
-  {\
-    return generic_get_acknowledger (sym, &acknowledge_static_array_);\
-  }\
+  {                                                                    \
+    return generic_get_acknowledger (sym, &acknowledge_static_array_); \
+  }                                                                    \
   SCM                                                                  \
   classname::static_translator_description () const                    \
   {                                                                    \
     return static_properties;                                          \
   }
 
-#define IMPLEMENT_FETCH_PRECOMPUTABLE_METHODS(T) \
-void \
-T::fetch_precomputable_methods (Translator_void_method_ptr ptrs[])\
-{                                                                      \
-  ptrs[START_TRANSLATION_TIMESTEP] =                                   \
-    ((Translator_void_method_ptr) &T::start_translation_timestep == \
-     (Translator_void_method_ptr) &Translator::start_translation_timestep)     \
-    ? 0                                                                        \
-    : (Translator_void_method_ptr) &T::start_translation_timestep;     \
+#define IMPLEMENT_FETCH_PRECOMPUTABLE_METHODS(T)                       \
+  void                                                                 \
+  T::fetch_precomputable_methods (Translator_void_method_ptr ptrs[])   \
+  {                                                                    \
+    ptrs[START_TRANSLATION_TIMESTEP] =                                 \
+      ((Translator_void_method_ptr) & T::start_translation_timestep == \
+       (Translator_void_method_ptr) & Translator::start_translation_timestep) \
+      ? 0                                                              \
+      : (Translator_void_method_ptr) & T::start_translation_timestep;  \
                                                                        \
-  ptrs[STOP_TRANSLATION_TIMESTEP] =                                    \
-    ((Translator_void_method_ptr) &T::stop_translation_timestep == (Translator_void_method_ptr) &Translator::stop_translation_timestep) \
-    ? 0                                                                        \
-    : (Translator_void_method_ptr) &T::stop_translation_timestep;      \
+    ptrs[STOP_TRANSLATION_TIMESTEP] =                                  \
+      ((Translator_void_method_ptr) & T::stop_translation_timestep == (Translator_void_method_ptr) & Translator::stop_translation_timestep) \
+      ? 0                                                              \
+      : (Translator_void_method_ptr) & T::stop_translation_timestep;   \
                                                                        \
-  ptrs[PROCESS_MUSIC] =                                                        \
-    ((Translator_void_method_ptr) &T::process_music == (Translator_void_method_ptr) &Translator::process_music)                        \
-    ? 0                                                                        \
-    : (Translator_void_method_ptr) &T::process_music;          \
+    ptrs[PROCESS_MUSIC] =                                              \
+      ((Translator_void_method_ptr) & T::process_music == (Translator_void_method_ptr) & Translator::process_music) \
+      ? 0                                                              \
+      : (Translator_void_method_ptr) & T::process_music;               \
                                                                        \
-  ptrs[PROCESS_ACKNOWLEDGED] =                                         \
-    ((Translator_void_method_ptr) &T::process_acknowledged == (Translator_void_method_ptr) &Translator::process_acknowledged)  \
-    ? 0                                                                        \
-    : (Translator_void_method_ptr) &T::process_acknowledged;           \
-}
+    ptrs[PROCESS_ACKNOWLEDGED] =                                       \
+      ((Translator_void_method_ptr) & T::process_acknowledged == (Translator_void_method_ptr) & Translator::process_acknowledged) \
+      ? 0                                                              \
+      : (Translator_void_method_ptr) & T::process_acknowledged;                \
+  }
 
 void add_acknowledger (Engraver_void_function_engraver_grob_info ptr,
                       char const *func_name,
@@ -98,13 +97,12 @@ Engraver_void_function_engraver_grob_info
 generic_get_acknowledger (SCM sym,
                          Array<Acknowledge_information> const *ack_array);
 
-#define ADD_ACKNOWLEDGER(CLASS,NAME)           \
-void CLASS ## NAME ## _ack_adder () \
-{\
-  add_acknowledger ((Engraver_void_function_engraver_grob_info) &CLASS::acknowledge_ ## NAME, #NAME, &CLASS::acknowledge_static_array_);\
-}\
-  ADD_SCM_INIT_FUNC(CLASS ## NAME ## _ack_adder_initclass, CLASS ## NAME ## _ack_adder); \
-
+#define ADD_ACKNOWLEDGER(CLASS, NAME)                                  \
+  void CLASS ## NAME ## _ack_adder ()                                  \
+  {                                                                    \
+    add_acknowledger ((Engraver_void_function_engraver_grob_info) & CLASS::acknowledge_ ## NAME, #NAME, &CLASS::acknowledge_static_array_); \
+  }                                                                    \
+  ADD_SCM_INIT_FUNC (CLASS ## NAME ## _ack_adder_initclass, CLASS ## NAME ## _ack_adder);
 
 
 
index e00f8ebb2e53fe82251b4609ca2bf52351668196..073311500cb0bfc5716b7ca61aca538638692f0b 100644 (file)
@@ -19,7 +19,7 @@ public:
 
   static bool has_interface (Grob *);
   static void add_tuplet_bracket (Grob *me, Grob *smaller_bracket);
-  static void get_bounds (Grob *,Grob **,Grob **);
+  static void get_bounds (Grob *, Grob **, Grob **);
   static void add_column (Grob *me, Item *);
   static void add_beam (Grob *me, Grob *);
   static Grob *parallel_beam (Grob *me, Link_array<Grob> const &cols, bool *equally_long);
index 5bfed5c60d7f8adc5637806b4d73720aa3860234..f3b8c4e52f42e6df936151504dd5e20253398b45 100644 (file)
@@ -40,7 +40,7 @@ LY_DEFINE (ly_input_file_line_column, "ly:input-file-line-char-column", 1, 0, 0,
   Input *ip = unsmob_input (sip);
   SCM_ASSERT_TYPE (ip, sip, SCM_ARG1, __FUNCTION__, "input location");
 
-  int l, ch, col; 
+  int l, ch, col;
   ip->get_counts (&l, &ch, &col);
   return scm_list_4 (scm_makfrom0str (ip->file_string ().to_str0 ()),
                     scm_from_int (l),
index a9ad1c970e56b239c4c3d41339badd5c16602271..d6d33e2247556afc63b81c5e785d418ba535b32b 100644 (file)
@@ -152,7 +152,7 @@ Input::end_column_number () const
 }
 
 void
-Input::get_counts (int *line, int *chr, int*col) const
+Input::get_counts (int *line, int *chr, int *col) const
 {
   source_file_->get_counts (start_, line, chr, col);
 }
@@ -162,23 +162,22 @@ Input::set (Source_file *sf, char const *start, char const *end)
 {
   source_file_ = sf;
   start_ = start;
-  end_ = end;  
+  end_ = end;
 }
 
-Source_file
+Source_file *
 Input::get_source_file () const
 {
   return source_file_;
 }
 
-
-char const * 
+char const *
 Input::start () const
 {
   return start_;
 }
 
-char const * 
+char const *
 Input::end () const
 {
   return end_;
index 68bd472b170946758c91e89ffb4cbb0a68ab57b2..0e517678c61664e5450c797a3b79549500d668d6 100644 (file)
@@ -20,7 +20,7 @@
 
 class Instrument_name_engraver : public Engraver
 {
-  bool first_; 
+  bool first_;
 public:
   TRANSLATOR_DECLARATIONS (Instrument_name_engraver);
 
@@ -32,10 +32,9 @@ protected:
 
   DECLARE_ACKNOWLEDGER (bar_line);
   DECLARE_ACKNOWLEDGER (axis_group);
-  
+
   void stop_translation_timestep ();
   void process_music ();
-  
 };
 
 Instrument_name_engraver::Instrument_name_engraver ()
@@ -59,7 +58,7 @@ Instrument_name_engraver::stop_translation_timestep ()
                         grob_list_to_grob_array (get_property ("instrumentSupport")));
       text_ = 0;
     }
-  
+
   first_ = false;
 }
 
@@ -92,7 +91,6 @@ Instrument_name_engraver::acknowledge_bar_line (Grob_info i)
   create_text ();
 }
 
-
 void
 Instrument_name_engraver::acknowledge_axis_group (Grob_info i)
 {
@@ -139,7 +137,6 @@ Instrument_name_engraver::process_music ()
 
 #include "translator.icc"
 
-
 ADD_ACKNOWLEDGER (Instrument_name_engraver, bar_line);
 ADD_ACKNOWLEDGER (Instrument_name_engraver, axis_group);
 ADD_TRANSLATOR (Instrument_name_engraver,
index 7e36b762d9f13a384e84dfd03333425f82d0d33d..a4e7ce9f402cf7de5544065d8741bf422da2c153 100644 (file)
@@ -152,7 +152,7 @@ Item::handle_prebroken_dependencies ()
   SCM vis = get_property ("break-visibility");
   if (scm_is_vector (vis))
     {
-      bool visible = to_boolean (scm_vector_ref (vis,  scm_from_int (break_status_dir () + 1)));
+      bool visible = to_boolean (scm_vector_ref (vis, scm_from_int (break_status_dir () + 1)));
 
       if (!visible)
        suicide ();
index 80727b141e553d1414ab46a58cd574a8a42904fb..a5a6a7c2898cb4c96c7d17755e9c2383b1095af3 100644 (file)
@@ -88,10 +88,10 @@ Key_engraver::create_key (bool is_default)
                {
                  *tail = scm_acons (scm_caar (s),
                                     scm_from_int (0), *tail);
-                 tail = SCM_CDRLOC(*tail);
+                 tail = SCM_CDRLOC (*tail);
                }
            }
-         
+
          cancellation_->set_property ("alteration-alist", restore);
          cancellation_->set_property ("c0-position",
                                       get_property ("middleCPosition"));
@@ -198,9 +198,8 @@ Key_engraver::initialize ()
   context ()->set_property ("tonic", p.smobbed_copy ());
 }
 
-
-ADD_ACKNOWLEDGER (Key_engraver,clef);
-ADD_ACKNOWLEDGER (Key_engraver,bar_line);
+ADD_ACKNOWLEDGER (Key_engraver, clef);
+ADD_ACKNOWLEDGER (Key_engraver, bar_line);
 
 ADD_TRANSLATOR (Key_engraver,
                /* doc */ "",
index d28c62fcc9409645ac54be58bac1968c8b077df1..f9afd63b274aaa38c22438902bde2b51cafded07 100644 (file)
@@ -65,10 +65,10 @@ Key_performer::create_audio_elements ()
       bool minor = (scm_is_pair (third)
                    && scm_is_integer (scm_cdr (third))
                    && scm_to_int (scm_cdr (third)) == FLAT);
-      
+
       audio_ = new Audio_key (scm_to_int (acc),
                              !minor);
-                   
+
       Audio_element_info info (audio_, key_ev_);
       announce_element (info);
       key_ev_ = 0;
@@ -92,7 +92,7 @@ Key_performer::try_music (Music *ev)
     {
       key_ev_ = ev;
     }
-      
+
   return true;
 }
 
index bcaa2594e71b343cb688269dc4a1d05d7cb17f8c..62f3a82a7cab310eef17294935bf75b4d217142c 100644 (file)
@@ -86,7 +86,7 @@ MAKE_SCHEME_CALLBACK (Key_signature_interface, print, 1);
 SCM
 Key_signature_interface::print (SCM smob)
 {
-  Item *me = dynamic_cast<Item*> (unsmob_grob (smob));
+  Item *me = dynamic_cast<Item *> (unsmob_grob (smob));
 
   Real inter = Staff_symbol_referencer::staff_space (me) / 2.0;
 
@@ -133,18 +133,17 @@ Key_signature_interface::print (SCM smob)
          int pos = alteration_pos (what, alteration, c0p);
          acc.translate_axis (pos * inter, Y_AXIS);
 
-
-             /*
-               The natural sign (unlike flat & sharp)
-               has vertical edges on both sides. A little padding is
-               needed to prevent collisions.
-             */
+         /*
+           The natural sign (unlike flat & sharp)
+           has vertical edges on both sides. A little padding is
+           needed to prevent collisions.
+         */
          Real padding = 0.0;
          if (alteration == 0
              && last_pos < pos + 2
              && last_pos > pos - 6)
            padding = 0.3;
-         
+
          mol.add_at_edge (X_AXIS, LEFT, acc, padding, 0);
          last_pos = pos;
        }
index 2f559a33dacf07a5fa154c380582a1350773c26e..7b08506f44302fcbb100ca32e5f07ad4e3b6487c 100644 (file)
@@ -21,7 +21,7 @@ public:
 protected:
   virtual void finalize ();
   void process_music ();
+
   DECLARE_ACKNOWLEDGER (ledgered);
   DECLARE_ACKNOWLEDGER (staff_symbol);
 
@@ -53,7 +53,7 @@ Ledger_line_engraver::process_music ()
 void
 Ledger_line_engraver::finalize ()
 {
-  stop_spanner();
+  stop_spanner ();
 }
 
 void
@@ -69,7 +69,7 @@ Ledger_line_engraver::stop_spanner ()
 void
 Ledger_line_engraver::acknowledge_staff_symbol (Grob_info s)
 {
-  Spanner *sym = dynamic_cast<Spanner*> (s.grob ());
+  Spanner *sym = dynamic_cast<Spanner *> (s.grob ());
 
   if (!span_
       || span_->get_bound (LEFT) != sym->get_bound (LEFT))
@@ -92,8 +92,8 @@ Ledger_line_engraver::acknowledge_ledgered (Grob_info s)
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Ledger_line_engraver,ledgered);
-ADD_ACKNOWLEDGER (Ledger_line_engraver,staff_symbol);
+ADD_ACKNOWLEDGER (Ledger_line_engraver, ledgered);
+ADD_ACKNOWLEDGER (Ledger_line_engraver, staff_symbol);
 ADD_TRANSLATOR (Ledger_line_engraver,
                "Creates the spanner to draw ledger lines, and notices objects that need ledger lines",
                /* create */ "LedgerLineSpanner",
index 85ff9e5d29c7c8bb84c6abec9ae954d5eef2e5a1..fe094e681f6fb8bed7006b2e9defc958f1adc154 100644 (file)
@@ -135,7 +135,7 @@ Ledger_line_spanner::set_spacing_rods (SCM smob)
     contain a lot of noteheads, superlinear performance is too slow.
   */
   extract_item_set (me, "note-heads", heads);
-  for (int i = heads.size(); i --; )
+  for (int i = heads.size (); i--;)
     {
       Item *h = heads[i];
 
@@ -258,9 +258,7 @@ Ledger_line_spanner::print (SCM smob)
        i != reqs.end (); last = i++)
     {
       if (last == reqs.end ())
-       {
-         continue;
-       }
+       continue;
 
       Direction d = DOWN;
       do
@@ -343,11 +341,11 @@ Ledger_line_spanner::print (SCM smob)
 
 ADD_INTERFACE (Ledger_line_spanner,
               "ledger-line-interface",
-              
+
               "This spanner draws the ledger lines of a staff.\n"
               "This is a separate grob because it has to process\n"
               "all potential collisions between all note heads.",
-              
+
               "note-heads thickness minimum-length-fraction length-fraction gap");
 
 struct Ledgered_interface
@@ -357,8 +355,8 @@ struct Ledgered_interface
 
 ADD_INTERFACE (Ledgered_interface,
               "ledgered-interface",
-              
+
               "Objects that need ledger lines, typically "
               "note heads. See also @ref{ledger-line-interface}.",
-              
+
               "no-ledgers");
index e13798034b16a7cdb858130a665b197f9cd21e86..0d53cbb3b7fad2302b462a22b5ba70f699b7dbde 100644 (file)
@@ -151,9 +151,7 @@ Ligature_engraver::process_music ()
          events_drul_[STOP]->origin ()->warning (_ ("no right bound"));
        }
       else
-       {
-         ligature_->set_bound (RIGHT, last_bound_);
-       }
+       ligature_->set_bound (RIGHT, last_bound_);
 
       prev_start_event_ = 0;
       finished_primitives_ = primitives_;
@@ -193,9 +191,7 @@ Ligature_engraver::process_music ()
          events_drul_[START]->origin ()->warning (_ ("no left bound"));
        }
       else
-       {
-         ligature_->set_bound (LEFT, bound);
-       }
+       ligature_->set_bound (LEFT, bound);
 
       ligature_start_mom_ = now_mom ();
 
index c147945d0767bc47b6dba8b72bbefaf4c3879d06..d223d59612c67ba24969d745beef901c0fc4421f 100644 (file)
@@ -330,7 +330,6 @@ ly_deep_copy (SCM src)
 }
 
 
-
 /* looks the key up in the cdrs of the alist-keys
    - ignoring the car and ignoring non-pair keys.
    Returns first match found, i.e.
@@ -369,7 +368,7 @@ ly_string_array_to_scm (Array<String> a)
     s = scm_cons (ly_symbol2scm (a[i].to_str0 ()), s);
   return s;
 }
-  
+
 /* SYMBOLS is a whitespace separated list.  */
 SCM
 parse_symbol_list (char const *symbols)
index b1661c86eb1950504ecdf493370437139d30debb..8a331e263aefe913812490e1a7c1b87af0f4f284 100644 (file)
@@ -109,7 +109,7 @@ Lily_lexer::Lily_lexer (Lily_lexer const &src)
   pitchname_tab_stack_ = src.pitchname_tab_stack_;
   sources_ = src.sources_;
   start_module_ = SCM_EOL;
-  
+
   error_level_ = src.error_level_;
   is_main_input_ = src.is_main_input_;
 
@@ -142,7 +142,7 @@ Lily_lexer::add_scope (SCM module)
   ly_reexport_module (scm_current_module ());
   if (!scm_is_pair (scopes_))
     start_module_ = scm_current_module ();
-  
+
   for (SCM s = scopes_; scm_is_pair (s); s = scm_cdr (s))
     {
       ly_use_module (module, scm_car (s));
@@ -152,7 +152,6 @@ Lily_lexer::add_scope (SCM module)
   set_current_scope ();
 }
 
-
 SCM
 Lily_lexer::remove_scope ()
 {
@@ -166,7 +165,7 @@ SCM
 Lily_lexer::set_current_scope ()
 {
   SCM old = scm_current_module ();
-  
+
   if (scm_is_pair (scopes_))
     scm_set_current_module (scm_car (scopes_));
   else
@@ -286,7 +285,7 @@ Lily_lexer::prepare_for_next_token ()
 void
 Lily_lexer::add_lexed_char (int count)
 {
-  char const * start = here_str0 ();
+  char const *start = here_str0 ();
   lexloc->set (get_source_file (),
               start, start + count);
   char_count_stack_.top () += count;
index b25888d689e5a0c06a2ed49aa3321560de796b2e..ab5de834100b4d936a0b949846f6e539f9b7db53 100644 (file)
@@ -74,11 +74,10 @@ LY_DEFINE (ly_parse_file, "ly:parse-file",
              message (_f ("Changing working directory to `%s'",
                           output_name_global.to_str0 ()));
              chdir (output_name_global.to_str0 ());
-             
            }
          output_name_global = "";
        }
-      else      
+      else
        out_file_name = File_name (output_name_global);
     }
 
@@ -217,7 +216,6 @@ LY_DEFINE (ly_parser_set_note_names, "ly:parser-set-note-names",
   return SCM_UNSPECIFIED;
 }
 
-
 LY_DEFINE (ly_parser_output_name, "ly:parser-output-name",
           1, 0, 0, (SCM parser),
           "Return the base name of the output file.")
index 0119f99398029bcbc45b858bb6ed650b2fe86f8b..cc9fce2f569c9ba6c08d86b46f36d9c27dd98b37 100644 (file)
@@ -116,14 +116,13 @@ Lily_parser::parse_file (String init, String name, String out_name)
 
   /*
     Don't mix cyclic pointers with weak tables.
-   */
+  */
   lexer_->set_identifier (ly_symbol2scm ("parser"),
                          SCM_EOL);
   ly_reexport_module (scm_current_module ());
-  
 
-    scm_set_current_module (mod);
+  scm_set_current_module (mod);
+
   if (!define_spots_.is_empty ())
     {
       define_spots_.top ().warning (_ ("braces don't match"));
@@ -137,10 +136,10 @@ Lily_parser::parse_file (String init, String name, String out_name)
 void
 Lily_parser::parse_string (String ly_code)
 {
-   // TODO: use $parser 
+  // TODO: use $parser 
   lexer_->set_identifier (ly_symbol2scm ("parser"),
                          self_scm ());
-  
+
   lexer_->main_input_name_ = "<string>";
   lexer_->is_main_input_ = true;
 
@@ -150,7 +149,7 @@ Lily_parser::parse_string (String ly_code)
   SCM mod = lexer_->set_current_scope ();
   do_yyparse ();
   scm_set_current_module (mod);
-  
+
   if (!define_spots_.is_empty ())
     {
       if (define_spots_.is_empty ()
@@ -216,9 +215,9 @@ get_paper (Lily_parser *parser)
 }
 
 SCM
-get_header(Lily_parser *parser)
+get_header (Lily_parser *parser)
 {
-  SCM id = parser->lexer_->lookup_identifier("$defaultheader");
+  SCM id = parser->lexer_->lookup_identifier ("$defaultheader");
   if (!ly_is_module (id))
     id = ly_make_anonymous_module (be_safe_global);
 
index 81019e210ee0718db5ef5ffa1ba9b8290ff93b41..fab325528f90dffed69636ab33be3d034c5c9816 100644 (file)
@@ -19,14 +19,14 @@ Line_interface::make_arrow (Offset begin, Offset end,
 {
   Real angle = (end - begin).arg ();
   Array<Offset> points;
-  
+
   points.push (Offset (0, 0));
   points.push (Offset (-length, width));
   points.push (Offset (-length, -width));
 
-  for (int i = 0; i < points.size(); i++)
+  for (int i = 0; i < points.size (); i++)
     points[i] = points[i] * complex_exp (Offset (0, angle)) + end;
-    
+
   return Lookup::round_filled_polygon (points, thick);
 }
 
@@ -89,21 +89,20 @@ Line_interface::arrows (Grob *me, Offset from, Offset to,
     {
       Real thick = Staff_symbol_referencer::line_thickness (me)
        * robust_scm2double (me->get_property ("thickness"), 1);
-      Real ss =  Staff_symbol_referencer::staff_space (me);
-      
+      Real ss = Staff_symbol_referencer::staff_space (me);
+
       Real len = robust_scm2double (me->get_property ("arrow-length"), 1.3 * ss);
       Real wid = robust_scm2double (me->get_property ("arrow-width"), 0.5 * ss);
 
       if (to_arrow)
-        a.add_stencil (make_arrow (from, to, thick, len, wid));
-       
+       a.add_stencil (make_arrow (from, to, thick, len, wid));
+
       if (from_arrow)
-        a.add_stencil (make_arrow (to, from, thick, len, wid));
+       a.add_stencil (make_arrow (to, from, thick, len, wid));
     }
 
   return a;
 }
-                       
 
 Stencil
 Line_interface::line (Grob *me, Offset from, Offset to)
@@ -114,7 +113,7 @@ Line_interface::line (Grob *me, Offset from, Offset to)
   SCM type = me->get_property ("style");
 
   Stencil stil;
-  
+
   SCM dash_fraction = me->get_property ("dash-fraction");
   if (scm_is_number (dash_fraction) || type == ly_symbol2scm ("dotted-line"))
     {
@@ -131,10 +130,10 @@ Line_interface::line (Grob *me, Offset from, Offset to)
       if (period < 0)
        return Stencil ();
 
-      stil =  make_dashed_line (thick, from, to, period, fraction);
+      stil = make_dashed_line (thick, from, to, period, fraction);
     }
   else
-    stil =  make_line (thick, from, to);
+    stil = make_line (thick, from, to);
 
   return stil;
 }
index d5896ede00f0ca864feb240b4f299d74cb116ecc..96841816a5d25e618b5fd20dc710f94c7981b1b3 100644 (file)
@@ -33,7 +33,7 @@ zigzag_stencil (Grob *me,
   Real staff_space = Staff_symbol_referencer::staff_space (me);
 
   Real w = robust_scm2double (me->get_property ("zigzag-width"), 1) * staff_space;
-  int count = (int) ceil (dz.length() / w);
+  int count = (int) ceil (dz.length () / w);
   w = dz.length () / count;
 
   Real l = robust_scm2double (me->get_property ("zigzag-length"), 1) * w;
@@ -42,14 +42,14 @@ zigzag_stencil (Grob *me,
   Offset rotation_factor = complex_exp (Offset (0, dz.arg ()));
 
   Offset points[3];
-  points[0] = Offset (0, -h/2);
-  points[1] = Offset (w/2, h/2);
-  points[2] = Offset (w, -h/2);
+  points[0] = Offset (0, -h / 2);
+  points[1] = Offset (w / 2, h / 2);
+  points[2] = Offset (w, -h / 2);
   for (int i = 0; i < 3; i++)
     points[i] = complex_multiply (points[i], rotation_factor);
-  
-  Stencil squiggle (Line_interface::make_line (thick,points[0], points[1]));
-  squiggle.add_stencil (Line_interface::make_line (thick,points[1], points[2]));
+
+  Stencil squiggle (Line_interface::make_line (thick, points[0], points[1]));
+  squiggle.add_stencil (Line_interface::make_line (thick, points[1], points[2]));
 
   Stencil total;
   for (int i = 0; i < count; i++)
@@ -110,7 +110,7 @@ Line_spanner::line_stencil (Grob *me,
   SCM type = me->get_property ("style");
 
   Stencil line;
-  
+
   if (scm_is_symbol (type)
       && (type == ly_symbol2scm ("line")
          || type == ly_symbol2scm ("dashed-line")
@@ -156,7 +156,7 @@ Line_spanner::line_stencil (Grob *me,
 
   if (to_boolean (me->get_property ("arrow")))
     line.add_stencil (Line_interface::arrows (me, from, to, false, true));
-  
+
   return line;
 }
 
index 10dee7ad441e45b90281ff7c7082b26eea86dd8c..14efd34fe54c8e105685be2b79e6e53ac50a4f9a 100644 (file)
@@ -44,49 +44,46 @@ Lookup::beam (Real slope, Real width, Real thick, Real blot)
 
   Offset p;
 
-  p = Offset (0, thick/2);
+  p = Offset (0, thick / 2);
   b.add_point (p);
-  p += Offset (1,-1) * (blot/2);
+  p += Offset (1, -1) * (blot / 2);
 
   SCM points = SCM_EOL;
-  
+
   points = scm_cons (scm_from_double (p[X_AXIS]),
                     scm_cons (scm_from_double (p[Y_AXIS]),
                               points));
-  
-  
-  p = Offset (0, -thick/2);
+
+  p = Offset (0, -thick / 2);
   b.add_point (p);
-  p += Offset (1,1) * (blot/2);
+  p += Offset (1, 1) * (blot / 2);
 
   points = scm_cons (scm_from_double (p[X_AXIS]),
                     scm_cons (scm_from_double (p[Y_AXIS]),
                               points));
-  
-  
-  p = Offset (width, width * slope - thick/2);
+
+  p = Offset (width, width * slope - thick / 2);
   b.add_point (p);
-  p += Offset (-1, 1) * (blot/2);
+  p += Offset (-1, 1) * (blot / 2);
 
   points = scm_cons (scm_from_double (p[X_AXIS]),
                     scm_cons (scm_from_double (p[Y_AXIS]),
                               points));
-  
-  
-  p = Offset (width, width * slope + thick/2);
+
+  p = Offset (width, width * slope + thick / 2);
   b.add_point (p);
-  p += Offset (-1, -1) * (blot/2);
+  p += Offset (-1, -1) * (blot / 2);
 
   points = scm_cons (scm_from_double (p[X_AXIS]),
                     scm_cons (scm_from_double (p[Y_AXIS]),
                               points));
-  
+
   SCM expr = scm_list_n (ly_symbol2scm ("polygon"),
                         ly_quote_scm (points),
                         scm_from_double (blot),
                         SCM_BOOL_T,
                         SCM_UNDEFINED);
-  
+
   return Stencil (b, expr);
 }
 
@@ -254,7 +251,7 @@ Lookup::round_filled_polygon (Array<Offset> const &points,
        programming_error ("Polygon should not have duplicate points");
     }
 #endif
-  
+
   /* special cases: degenerated polygons */
   if (points.size () == 0)
     return Stencil ();
@@ -659,17 +656,16 @@ Stencil
 Lookup::repeat_slash (Real w, Real s, Real t)
 {
 #if 0 /*  TODO */
-  Array<Offset> points ;
+  Array<Offset> points;
   Real blotdiameter = 0.0;
 
-  Offset p1(0, 0);
-  Offset p2(w, w*s);
-  
-  
-  
+  Offset p1 (0, 0);
+  Offset p2 (w, w * s);
+
+
   return Lookup::round_filled_polygon (points, blotdiameter);
 #endif
-  
+
   SCM wid = scm_from_double (w);
   SCM sl = scm_from_double (s);
   SCM thick = scm_from_double (t);
index b2d04f4185157bdfc3d8137501d15b48dd8f6b90..87ac7987887b0dbce285485fab3570fde2187daa 100644 (file)
@@ -16,7 +16,6 @@
 Protected_scm anonymous_modules = SCM_EOL;
 #endif
 
-
 void
 clear_anonymous_modules ()
 {
@@ -25,8 +24,8 @@ clear_anonymous_modules ()
        s = scm_cdr (s))
     {
       SCM module = scm_car (s);
-      SCM closure = SCM_MODULE_EVAL_CLOSURE(module);
-      SCM prop = scm_procedure_property (closure, ly_symbol2scm ("module")); 
+      SCM closure = SCM_MODULE_EVAL_CLOSURE (module);
+      SCM prop = scm_procedure_property (closure, ly_symbol2scm ("module"));
 
       if (ly_is_module (prop))
        {
@@ -47,11 +46,11 @@ ly_make_anonymous_module (bool safe)
       SCM maker = ly_lily_module_constant ("make-module");
 
       SCM scm_module = ly_lily_module_constant ("the-scm-module");
-      
+
       mod = scm_call_0 (maker);
       scm_module_define (mod, ly_symbol2scm ("%module-public-interface"),
                         mod);
-      
+
       ly_use_module (mod, scm_module);
       ly_use_module (mod, global_lily_module);
     }
@@ -64,7 +63,7 @@ ly_make_anonymous_module (bool safe)
 #ifdef MODULE_GC_KLUDGE
   anonymous_modules = scm_cons (mod, anonymous_modules);
 #endif
-  
+
   return mod;
 }
 
@@ -83,7 +82,6 @@ ly_use_module (SCM mod, SCM used)
 #define FUNC_NAME __FUNCTION__
 
 
-
 static SCM
 accumulate_symbol (void *closure, SCM key, SCM val, SCM result)
 {
@@ -139,7 +137,6 @@ ly_reexport_module (SCM mod)
 }
 
 
-
 #ifdef MODULE_GC_KLUDGE
 static SCM
 redefine_keyval (void *closure, SCM key, SCM val, SCM result)
@@ -153,14 +150,14 @@ redefine_keyval (void *closure, SCM key, SCM val, SCM result)
 /*
   UGH UGH.
   Kludge for older GUILE 1.6 versions.
- */
+*/
 void
 make_stand_in_procs_weak ()
 {
   SCM old_tab = scm_stand_in_procs;
   SCM new_tab = scm_make_weak_key_hash_table (scm_from_int (257));
-  
-  new_tab = scm_internal_hash_fold ((Hash_closure_function) &redefine_keyval,
+
+  new_tab = scm_internal_hash_fold ((Hash_closure_function) & redefine_keyval,
                                    NULL,
                                    new_tab,
                                    old_tab);
@@ -168,5 +165,5 @@ make_stand_in_procs_weak ()
   scm_stand_in_procs = new_tab;
 }
 
-ADD_SCM_INIT_FUNC(make_stand_in_procs_weak, make_stand_in_procs_weak);
+ADD_SCM_INIT_FUNC (make_stand_in_procs_weak, make_stand_in_procs_weak);
 #endif
index b244fe95832b3a2e4fa199e149073f514580b991..4c76e189cddfe9eb280235a53bde8cde740c4eb3 100644 (file)
@@ -33,7 +33,7 @@ private:
   Music *event_;
   Item *text_;
   Item *last_text_;
-  
+
   Context *get_voice_context ();
 };
 
@@ -61,7 +61,7 @@ Lyric_engraver::process_music ()
   if (event_)
     {
       SCM text = event_->get_property ("text");
-      
+
       if (ly_is_equal (text, scm_makfrom0str (" ")))
        {
          if (last_text_)
@@ -150,7 +150,7 @@ Lyric_engraver::stop_translation_timestep ()
                text_->set_property ("self-alignment-X", scm_from_int (LEFT));
            }
        }
-         
+
       last_text_ = text_;
       text_ = 0;
     }
index e41eb6082e9b1739eb6d22f3f66840de0dec912d..dd083391f0749e1946533f9fc47bc27b2517859f 100644 (file)
@@ -71,4 +71,4 @@ Lyric_performer::try_music (Music *event)
 #include "translator.icc"
 
 ADD_TRANSLATOR (Lyric_performer, "", "", "lyric-event",
-                "", "");
+               "", "");
index 119a2c416165c5e9d1e4edc7b87d5c75aea448fb..d2f3a66436c379cc78539044c6bd5010c37b8aa6 100644 (file)
@@ -5,7 +5,7 @@
 
   (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
+
 #include "main.hh"
 
 #include <cassert>
 
 #if HAVE_GRP_H
 #include <grp.h>
-#endif 
+#endif
 #if HAVE_PWD_H
 #include <pwd.h>
-#endif 
+#endif
 #if HAVE_GETTEXT
 #include <libintl.h>
 #endif
@@ -161,7 +161,7 @@ static Long_option_init options_static[]
 #if HAVE_CHROOT
   {_i ("USER,GROUP,JAIL,DIR"), "jail", 'j', _i ("chroot to JAIL, become USER:GROUP\n"
                                                "and cd into DIR")},
-#endif 
+#endif
   {0, "no-print", 0, _i ("do not generate printed output")},
   {0, "preview", 'p',  _i ("generate a preview of the first system")},
   {0, "safe-mode", 's',  _i ("run in safe mode")},
@@ -174,7 +174,7 @@ static Long_option_init options_static[]
 #define LILYPOND_DATADIR PACKAGE_DATADIR "/" TOPLEVEL_VERSION
 
 static void
-env_var_info (FILE *out, char constkey)
+env_var_info (FILE *out, char const *key)
 {
   if (char const *value = getenv (key))
     fprintf (out, "%s=\"%s\"\n", key, value);
@@ -198,7 +198,7 @@ dir_info (FILE *out)
   env_var_info (out, "GUILE_LOAD_PATH");
   env_var_info (out, "PANGO_RC_FILE");
   env_var_info (out, "PATH");
-#endif  
+#endif
 }
 
 static void
@@ -260,7 +260,7 @@ warranty ()
 }
 
 static int
-sane_putenv (char constkey, String value, bool overwrite = true)
+sane_putenv (char const *key, String value, bool overwrite = true)
 {
   if (overwrite || !getenv (key))
     {
@@ -273,7 +273,7 @@ sane_putenv (char const* key, String value, bool overwrite = true)
 
 #if ARGV0_RELOCATION
 static int
-set_env_file (char constkey, String value)
+set_env_file (char const *key, String value)
 {
   if (is_file (value))
     return sane_putenv (key, value, false);
@@ -287,7 +287,7 @@ prepend_env_path (char const *key, String value)
 {
   if (is_dir (value))
     {
-      if (char constcur = getenv (key))
+      if (char const *cur = getenv (key))
        value += to_string (PATHSEP) + cur;
       return sane_putenv (key, value.to_str0 ());
     }
@@ -393,7 +393,7 @@ setup_paths (char const* argv0)
   /*
     ugh. C&P font-config.cc
   */
-  struct stat statbuf; 
+  struct stat statbuf;
   String builddir = prefix_directory + "/mf/out/";
   if (stat (builddir.to_str0 (), &statbuf) == 0)
     {
@@ -409,9 +409,9 @@ setup_paths (char const* argv0)
     }
 
   for (int i = 0; i < dirs.size (); i++)
-    global_path.prepend (dirs[i]);  
+    global_path.prepend (dirs[i]);
 }
-  
+
 static void
 prepend_load_path (String dir)
 {
@@ -508,7 +508,6 @@ do_chroot_jail ()
 #endif
 
 
-
 static void
 main_with_guile (void *, int, char **)
 {
@@ -529,7 +528,6 @@ main_with_guile (void *, int, char **)
   call_constructors ();
   ly_set_option (ly_symbol2scm ("verbose"), scm_from_bool (be_verbose_global));
 
-  
   init_global_tweak_registry ();
   init_fontconfig ();
 
@@ -537,13 +535,12 @@ main_with_guile (void *, int, char **)
 
   all_fonts_global = new All_font_metrics (global_path.to_string ());
 
-  
   if (!init_scheme_variables.is_empty ()
       || !init_scheme_code_string.is_empty ())
     {
       init_scheme_variables = "(map (lambda (x) (ly:set-option (car x) (cdr x))) (list "
        + init_scheme_variables + "))";
-      
+
       init_scheme_code_string
        += "(begin #t "
        + init_scheme_variables
@@ -551,13 +548,12 @@ main_with_guile (void *, int, char **)
        + ")";
 
       char const *str0 = init_scheme_code_string.to_str0 ();
-      
+
       if (be_verbose_global)
-       progress_indication (_f("Evaluating %s", str0));
+       progress_indication (_f ("Evaluating %s", str0));
       scm_c_eval_string ((char *) str0);
     }
 
-  
   /* We accept multiple independent music files on the command line to
      reduce compile time when processing lots of small files.
      Starting the GUILE engine is very time consuming.  */
@@ -598,7 +594,7 @@ setup_localisation ()
   String localedir = LOCALEDIR;
   if (char const *env = getenv ("LILYPOND_LOCALEDIR"))
     localedir = env;
-  
+
   bindtextdomain ("lilypond", localedir.to_str0 ());
   textdomain ("lilypond");
 #endif
@@ -641,7 +637,7 @@ parse_argv (int argc, char **argv)
 
            String key = arg;
            String val = "#t";
-           
+
            if (eq >= 0)
              {
                key = arg.left_string (eq);
@@ -649,10 +645,10 @@ parse_argv (int argc, char **argv)
              }
 
            init_scheme_variables
-             += "(cons \'" + key  + "  " + val + ")\n";
+             += "(cons \'" + key + "  " + val + ")\n";
          }
          break;
-         
+
        case 'v':
          notice ();
          exit (0);
@@ -715,7 +711,7 @@ parse_argv (int argc, char **argv)
 
   if (output_format_global == "")
     output_format_global = "pdf";
-      
+
   if (show_help)
     {
       identify (stdout);
@@ -729,20 +725,19 @@ parse_argv (int argc, char **argv)
 void
 setup_guile_env ()
 {
-  char * yield = getenv ("LILYPOND_GC_YIELD");
+  char *yield = getenv ("LILYPOND_GC_YIELD");
   bool overwrite = true;
   if (!yield)
     {
       yield = "70";
       overwrite = false;
     }
-  
+
   sane_putenv ("GUILE_MIN_YIELD_1", yield, overwrite);
   sane_putenv ("GUILE_MIN_YIELD_2", yield, overwrite);
   sane_putenv ("GUILE_MIN_YIELD_MALLOC", yield, overwrite);
 }
 
-
 int
 main (int argc, char **argv)
 {
index 5e2485582669de782f77655e6db205e8fc1bd0ed..a770cf2001c28093ac517e43daa63ef1ed55c541 100644 (file)
@@ -132,7 +132,7 @@ Mark_engraver::process_music ()
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Mark_engraver,bar_line);
+ADD_ACKNOWLEDGER (Mark_engraver, bar_line);
 ADD_TRANSLATOR (Mark_engraver,
                /* doc */ "This engraver will create RehearsalMark objects. "
                "It puts them on top of all staves (which is taken from "
index b79207b15765ccc3ac1ea44430c0a4c94697bf81..fbe0aa3befd50d6c04d3900be0dada668fcab603 100644 (file)
@@ -66,7 +66,6 @@ Melisma_translator::Melisma_translator ()
   event_ = 0;
 }
 
-
 ADD_TRANSLATOR (Melisma_translator,
                /* doc */ "This translator collects melisma information about ties, beams, and user settings (@code{melismaBusy}, and signals it to the @code{\addlyrics} code.  ",
                /* create */ "",
index 310899384f85d6e1783040c741ad920c4b346fcc..837a3748a4f52e8cf753910e7cbb038762584c2e 100644 (file)
@@ -357,16 +357,12 @@ Mensural_ligature_engraver::fold_up_primitives (Array<Grob_info> primitives)
     {
       Item *current = dynamic_cast<Item *> (primitives[i].grob ());
       if (i == 0)
-       {
-         first = current;
-       }
+       first = current;
 
       get_set_column (current, first->get_column ());
 
       if (i > 0)
-       {
-         current->translate_axis (distance, X_AXIS);
-       }
+       current->translate_axis (distance, X_AXIS);
 
       distance
        += scm_to_double (current->get_property ("head-width"))
index 99010d32ded3dcbcbd9cd5dd1aa1cdf83e595853..af634bf2c09ddb0d48caa3e30c4fb3168c8bdfaa 100644 (file)
@@ -6,7 +6,6 @@
   (c) 1997--2005 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
-
 #include "midi-stream.hh"
 
 #include <errno.h>
index 46e846e14ba9474c91c0789686862036d4ef2a86..ea50e4e7d1326034a992da4a98babff7e757030f 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "lily-guile.hh"
@@ -41,20 +40,18 @@ LY_DEFINE (ly_module_copy, "ly:module-copy",
   return SCM_UNSPECIFIED;
 }
 
-LY_DEFINE(ly_clear_anonymous_modules, "ly:clear-anonymous-modules",
-         0, 0, 0, (),
-         "Plug a GUILE 1.6 and 1.7 memory leak by breaking a weak reference "
-         "pointer cycle explicitly."
-         )
+LY_DEFINE (ly_clear_anonymous_modules, "ly:clear-anonymous-modules",
+          0, 0, 0, (),
+          "Plug a GUILE 1.6 and 1.7 memory leak by breaking a weak reference "
+          "pointer cycle explicitly.")
 {
 #ifdef MODULE_GC_KLUDGE
-  clear_anonymous_modules();
+  clear_anonymous_modules ();
 #endif
 
   return SCM_UNSPECIFIED;
 }
 
-
 /* Lookup SYM, but don't give error when it is not defined.  */
 SCM
 ly_module_lookup (SCM module, SCM sym)
index cdedb19829f0ea82b02b42848f9494423f75aff2..0f467933858fb671efffc35eadfc1ec9e108529b 100644 (file)
@@ -42,7 +42,6 @@ LY_DEFINE (ly_make_moment, "ly:make-moment",
                 Rational (grace_num, grace_den)).smobbed_copy ();
 }
 
-
 LY_DEFINE (ly_sub_moment, "ly:moment-sub",
           2, 0, 0, (SCM a, SCM b),
           "Subtract two moments.")
@@ -98,7 +97,6 @@ LY_DEFINE (ly_moment_mod, "ly:moment-mod",
   return (*ma % * mb).smobbed_copy ();
 }
 
-
 LY_DEFINE (ly_moment_grace_numerator, "ly:moment-grace-numerator",
           1, 0, 0, (SCM mom),
           "Extract numerator from grace timing.")
index 5977fb33dabc7fc7294c02453ef2807f58515550..ec69a437d312330adebb9d05d52db50164a0851d 100644 (file)
@@ -49,7 +49,7 @@ Multi_measure_rest_engraver::Multi_measure_rest_engraver ()
 
   /*
     For the start of a score.
-   */
+  */
   bar_seen_ = true;
   start_measure_ = 0;
   mmrest_ = 0;
@@ -249,7 +249,7 @@ Multi_measure_rest_engraver::finalize ()
 #include "translator.icc"
 
 ADD_TRANSLATOR (Multi_measure_rest_engraver,
-               /* doc */ 
+               /* doc */
                "Engraves multi-measure rests that are produced with @code{R}.  Reads "
                "measurePosition and currentBarNumber to determine what number to print "
                "over the MultiMeasureRest.  Reads measureLength to determine if it "
index c41d59e3a940d870f8d30c136692c3f2c225c850..21e86e4c6cbc9e5b5b7dcf5ac8cc9355f47b1687 100644 (file)
@@ -1,13 +1,12 @@
-/* 
+/*
   music-output.cc --  implement Music_output
-  
+
   source file of the GNU LilyPond music typesetter
-  
+
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-  
 */
 
-#include "music-output.hh" 
+#include "music-output.hh"
 
 #include "ly-smobs.icc"
 #include "virtual-methods.hh"
@@ -24,9 +23,8 @@ Music_output::process ()
 
 Music_output::~Music_output ()
 {
-  
 }
-  
+
 void
 Music_output::derived_mark () const
 {
index 417b3819bede5e6b393c6ac57acacc8b0446023e..114f42e645fbddea0045ae256d48b3cee16d5e19 100644 (file)
@@ -110,7 +110,7 @@ LY_DEFINE (ly_music_deep_copy, "ly:music-deep-copy",
   SCM copy = m;
   if (unsmob_music (m))
     {
-      Music * mcopy = unsmob_music (m)->clone ();
+      Music *mcopy = unsmob_music (m)->clone ();
       copy = mcopy->unprotect ();
     }
   else if (scm_is_pair (m))
index 86bddb5ece74ddc49aae8b06abb494a71aa41664..33cd06ca5fe9fa2e2c58b328baca92614a2cabc4 100644 (file)
@@ -29,9 +29,7 @@ Music_sequence::cumulative_length (SCM l)
     {
       Moment l = unsmob_music (scm_car (s))->get_length ();
       if (last_len.grace_part_ && l.main_part_)
-       {
-         last_len.grace_part_ = Rational (0);
-       }
+       last_len.grace_part_ = Rational (0);
       cumulative += last_len;
       last_len = l;
     }
index 81238971718ed1dfd5441f30b9874d0900499e18..d66d9085f92a60307a5652d535320d65e15b1eee 100644 (file)
@@ -10,7 +10,6 @@
 
 #include "music.hh"
 
-
 MAKE_SCHEME_CALLBACK (Music_wrapper, start_callback, 1);
 SCM
 Music_wrapper::start_callback (SCM m)
index 5ce63556ba4760679e9211276cce750fc2063cf2..e8e054311d5f12be0ae5e20af6232b1ec873c2b7 100644 (file)
@@ -57,7 +57,7 @@ Music::Music (SCM init)
     {
       length_callback_ = duration_length_callback_proc;
     }
-  
+
   start_callback_ = get_property ("start-callback");
 }
 
@@ -81,7 +81,6 @@ Music::~Music ()
 {
 }
 
-
 SCM
 Music::get_property_alist (bool m) const
 {
@@ -277,7 +276,6 @@ Music::internal_get_property (SCM sym) const
   return (s == SCM_BOOL_F) ? SCM_EOL : scm_cdr (s);
 }
 
-
 SCM
 Music::internal_get_object (SCM s) const
 {
@@ -287,7 +285,7 @@ Music::internal_get_object (SCM s) const
 void
 Music::internal_set_object (SCM s, SCM v)
 {
-  return internal_set_property (s,v);
+  return internal_set_property (s, v);
 }
 
 void
@@ -325,7 +323,6 @@ make_music_by_name (SCM sym)
   return m;
 }
 
-
 MAKE_SCHEME_CALLBACK (Music, duration_length_callback, 1);
 SCM
 Music::duration_length_callback (SCM m)
index c53695f2cb15c40e42164b2c2aa43036faa4b99f..5cde4e519a2e69cfe3b0704ce65017a5db6bf18a 100644 (file)
@@ -44,7 +44,7 @@ class New_fingering_engraver : public Engraver
   Array<Finger_tuple> fingerings_;
   Array<Finger_tuple> articulations_;
   Array<Finger_tuple> string_numbers_;
-  
+
   Link_array<Grob> heads_;
   Grob *stem_;
 
@@ -77,21 +77,15 @@ New_fingering_engraver::acknowledge_rhythmic_head (Grob_info inf)
        continue;
 
       if (m->is_mus_type ("fingering-event"))
-       {
-         add_fingering (inf.grob (), m, note_ev);
-       }
+       add_fingering (inf.grob (), m, note_ev);
       else if (m->is_mus_type ("text-script-event"))
        {
          m->origin ()->warning (_ ("can't add text scripts to individual note heads"));
        }
       else if (m->is_mus_type ("script-event"))
-       {
-         add_script (inf.grob (), m, note_ev);
-       }
+       add_script (inf.grob (), m, note_ev);
       else if (m->is_mus_type ("string-number-event"))
-       {
-         add_string (inf.grob (), m, note_ev);
-       }
+       add_string (inf.grob (), m, note_ev);
       else if (m->is_mus_type ("harmonic-event"))
        {
          inf.grob ()->set_property ("style", ly_symbol2scm ("harmonic"));
@@ -169,7 +163,6 @@ New_fingering_engraver::add_fingering (Grob *head,
   fingerings_.push (ft);
 }
 
-
 void
 New_fingering_engraver::add_string (Grob *head,
                                    Music *event,
index 8dab14f3daca935443150e56bb1413e17137c789..2e2c167e5d9db74fb67f8c46985de7ff765e4698 100644 (file)
@@ -73,7 +73,7 @@ check_meshing_chords (Grob *me,
 
   /* Do not merge notes typeset in different style. */
   if (!ly_is_equal (nu->get_property ("style"),
-                    nd->get_property ("style")))
+                   nd->get_property ("style")))
     merge_possible = false;
 
   int upball_type = Note_head::get_balltype (nu);
@@ -211,9 +211,7 @@ check_meshing_chords (Grob *me,
              wipe_ball = nu;
            }
          else
-           {
-             dot_wipe_head = nu;
-           }
+           dot_wipe_head = nu;
        }
       else if (dnball_type > upball_type)
        {
@@ -342,8 +340,8 @@ Note_collision_interface::do_shifts (Grob *me)
     }
 }
 
-Drul_array < Link_array<Grob> >
-Note_collision_interface::get_clash_groups (Grob *me)
+Drul_array < Link_array<Grob>
+Note_collision_interface::get_clash_groups (Grob *me)
 {
   Drul_array<Link_array<Grob> > clash_groups;
 
@@ -470,7 +468,7 @@ Note_collision_interface::forced_shift (Grob *me)
   SCM tups = SCM_EOL;
 
   extract_grob_set (me, "elements", elements);
-  for (int i = 0;  i < elements.size (); i++)
+  for (int i = 0; i < elements.size (); i++)
     {
       Grob *se = elements[i];
 
index 94e01ff5e9930cae96b35894b6fe7cd401463caa..1729e6b432fb23bf70bf85bef2228044b52c2943 100644 (file)
@@ -57,7 +57,7 @@ Note_column::head_positions_interval (Grob *me)
   iv.set_empty ();
 
   extract_grob_set (me, "note-heads", heads);
-  for (int i = 0; i < heads.size(); i++) 
+  for (int i = 0; i < heads.size (); i++)
     {
       Grob *se = heads[i];
 
@@ -79,7 +79,7 @@ Note_column::dir (Grob *me)
       if (heads.size ())
        return (Direction)sign (head_positions_interval (me).center ());
     }
-  
+
   programming_error ("note column without heads and stem");
   return CENTER;
 }
@@ -160,7 +160,7 @@ Note_column::accidentals (Grob *me)
 {
   extract_grob_set (me, "note-heads", heads);
   Grob *acc = 0;
-  for (int i = 0; i < heads.size(); i++) 
+  for (int i = 0; i < heads.size (); i++)
     {
       Grob *h = heads[i];
       acc = h ? unsmob_grob (h->get_object ("accidental-grob")) : 0;
@@ -178,7 +178,6 @@ Note_column::accidentals (Grob *me)
   return acc;
 }
 
-
 Grob *
 Note_column::arpeggio (Grob *me)
 {
index bd31553a3e0981c42b9febcba4b40ce0300b8d03..98b58a6f91f2dd2ed1260784db3b156c8a60e245 100644 (file)
@@ -12,7 +12,7 @@
 #include <cctype>
 #include <algorithm>           //  min, max
 
-using namespace std; 
+using namespace std;
 
 #include "directional-element-interface.hh"
 #include "staff-symbol.hh"
@@ -39,13 +39,13 @@ internal_print (Grob *me, String *font_char)
     }
 
   SCM log = scm_from_int (Note_head::get_balltype (me));
-  String suffix =  to_string (min (robust_scm2int (me->get_property ("duration-log"), 2), 2));
+  String suffix = to_string (min (robust_scm2int (me->get_property ("duration-log"), 2), 2));
   if (style != ly_symbol2scm ("default"))
     {
       SCM proc = me->get_property ("glyph-name-procedure");
       if (ly_is_procedure (proc))
        suffix = ly_scm2string (scm_call_2 (proc, log, style));
-    }  
+    }
   Font_metric *fm = Font_interface::get_default_font (me);
 
   String idx = "noteheads.s" + suffix;
@@ -56,7 +56,7 @@ internal_print (Grob *me, String *font_char)
       String prefix = "noteheads.";
       Grob *stem = unsmob_grob (me->get_object ("stem"));
       Direction stem_dir = stem ? get_grob_direction (stem) : CENTER;
-      
+
       if (stem_dir == CENTER)
        programming_error ("must have stem dir for note head");
       String idx = prefix + ((stem_dir == UP) ? "u" : "d") + suffix;
@@ -66,7 +66,7 @@ internal_print (Grob *me, String *font_char)
   if (out.is_empty ())
     {
       me->warning (_f ("note head `%s' not found", idx.to_str0 ()));
-      out = Stencil (Box(Interval (0, 0),Interval (0, 0)), SCM_EOL);
+      out = Stencil (Box (Interval (0, 0), Interval (0, 0)), SCM_EOL);
     }
   else
     {
index c9cfffafc83a60113adce8e011cd2e8079547924..1e16c1414c369969f092903d64c55ffcbcb4dc9a 100644 (file)
@@ -84,7 +84,7 @@ Note_heads_engraver::process_music ()
          ev->origin ()->warning (_ ("NoteEvent without pitch"));
        }
 #endif
-      
+
       int pos = pit ? pit->steps () : 0;
       SCM c0 = get_property ("middleCPosition");
       if (scm_is_number (c0))
@@ -108,9 +108,7 @@ Note_heads_engraver::process_music ()
          SCM style = SCM_EOL;
          if (scm_c_vector_length (shape_vector) > delta
              && scm_is_symbol (scm_vector_ref (shape_vector, scm_from_int (delta))))
-           {
-             style = scm_vector_ref (shape_vector, scm_from_int (delta));
-           }
+           style = scm_vector_ref (shape_vector, scm_from_int (delta));
          if (scm_is_symbol (style))
            {
              note->set_property ("style", style);
index f19f8c704dc5d65d4410658bb020e84dcfe6a5b2..6409c77d5bacb0e26ed2fe9ef20766ec0af2a9c6 100644 (file)
@@ -92,7 +92,7 @@ Note_performer::try_music (Music *ev)
 
 ADD_TRANSLATOR (Note_performer, "", "",
                "note-event busy-playing-event",
-                "", "");
+               "", "");
 
 Note_performer::Note_performer ()
 {
index 3421ea5cba4bbb765531fed57be5d5893483313a..6f264a7135f4eda38d5ff05b58f26396af07fa9a 100644 (file)
@@ -20,7 +20,6 @@
 #include "output-def.hh"
 #include "pointer-group-interface.hh"
 
-
 /*
   TODO: detect hshifts due to collisions, and account for them in
   spacing?
@@ -45,10 +44,8 @@ Note_spacing::get_spacing (Grob *me, Item *right_col,
          Item *it = dynamic_cast<Item *> (items[i]);
 
          if (d == RIGHT && it->break_status_dir () != col_dir)
-           {
-             it = it->find_prebroken_piece (col_dir);
-           }
-         
+           it = it->find_prebroken_piece (col_dir);
+
          /*
            some kind of mismatch, eg. a note column, that is behind a
            linebreak.
@@ -96,11 +93,8 @@ Note_spacing::get_spacing (Grob *me, Item *right_col,
                  extents[d].unite (v);
                }
 
-
              if (Grob *arpeggio = Note_column::arpeggio (it))
-               {
-                 extents[d].unite (arpeggio->extent (it_col, X_AXIS));
-               }
+               extents[d].unite (arpeggio->extent (it_col, X_AXIS));
            }
        }
 
@@ -139,10 +133,9 @@ Note_spacing::get_spacing (Grob *me, Item *right_col,
 
          /*
            Add that which sticks out a lot.
-          */
+         */
          + max (0.0, -extents[RIGHT][LEFT] - (base_space - increment))));
 
-       
 
   /*
     We don't do complicated stuff: (base_space - increment) is the
@@ -195,11 +188,11 @@ Note_spacing::right_column (Grob *me)
   if (!me->is_live ())
     return 0;
 
-  Grob_array * a = unsmob_grob_array (me->get_object ("right-items"));
+  Grob_array *a = unsmob_grob_array (me->get_object ("right-items"));
   Item *mincol = 0;
   int min_rank = INT_MAX;
   bool prune = false;
-  for (int i = 0; a && i <  a->size (); i++) 
+  for (int i = 0; a && i < a->size (); i++)
     {
       Item *ri = a->item (i);
       Item *col = ri->get_column ();
@@ -218,10 +211,10 @@ Note_spacing::right_column (Grob *me)
 
   if (prune && a)
     {
-      Link_array<Grob> & right = a->array_reference ();
-      for (int i = right.size(); i--;)  
+      Link_array<Grob> &right = a->array_reference ();
+      for (int i = right.size (); i--;)
        {
-         if (dynamic_cast<Item*> (right[i])->get_column () != mincol)
+         if (dynamic_cast<Item *> (right[i])->get_column () != mincol)
            right.del (i);
        }
     }
@@ -267,7 +260,7 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
   do
     {
       Link_array<Grob> const &items (ly_scm2link_array (props [d]));
-      for (int i = 0; i < items.size(); i++)
+      for (int i = 0; i < items.size (); i++)
        {
          Item *it = dynamic_cast<Item *> (items[i]);
 
@@ -281,9 +274,7 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
              if (d == RIGHT && Separation_item::has_interface (it))
                {
                  if (it->get_column () != rcolumn)
-                   {
-                     it = it->find_prebroken_piece (rcolumn->break_status_dir ());
-                   }
+                   it = it->find_prebroken_piece (rcolumn->break_status_dir ());
 
                  Grob *last = Separation_item::extremal_break_aligned_grob (it, LEFT, &bar_xextent);
 
@@ -319,9 +310,7 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
          */
          if (d == LEFT
              && Stem::duration_log (stem) > 2 && !Stem::get_beam (stem))
-           {
-             correct_stem_dirs = false;
-           }
+           correct_stem_dirs = false;
 
          Interval hp = Stem::head_positions (stem);
          if (!hp.is_empty ())
@@ -329,7 +318,7 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
              Real chord_start = hp[sd];
              Real stem_end = Stem::stem_end_position (stem);
 
-             stem_posns[d] = Interval (min (chord_start, stem_end), max (chord_start,  stem_end));
+             stem_posns[d] = Interval (min (chord_start, stem_end), max (chord_start, stem_end));
              head_posns[d].unite (hp);
            }
        }
@@ -402,9 +391,7 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
            }
 
          if (!bar_yextent.is_empty ())
-           {
-             correction *= 0.5;
-           }
+           correction *= 0.5;
        }
     }
   else if (correct_stem_dirs && stem_dirs[LEFT] * stem_dirs[RIGHT] == UP)
@@ -438,7 +425,7 @@ Note_spacing::stem_dir_correction (Grob *me, Item *rcolumn,
 
       Real delta = head_posns[-lowest][DOWN] - head_posns[lowest][UP];
       Real corr = robust_scm2double (me->get_property ("same-direction-correction"), 0);
-      
+
       if (delta > 1)
        correction = -lowest * corr;
     }
index 4a29c9c7aec8ccf3b72e387cb47a40295e13c449..8ba5a8c36c8af7654f92940b23cffae5769792eb 100644 (file)
@@ -57,9 +57,7 @@ Object_key_dumper::serialize_key (Object_key const *key)
   for (SCM s = skey; scm_is_pair (s); s = scm_cdr (s))
     {
       if (Object_key const *sub_key = unsmob_key (scm_car (s)))
-       {
-         scm_set_car_x (s, dump_key (sub_key));
-       }
+       scm_set_car_x (s, dump_key (sub_key));
       else if (Moment *mom = unsmob_moment (scm_car (s)))
        {
          scm_set_car_x (s,
index 2004c3b2b8211947d0a350bddb62249c086230d4..b9baee4564e1345317b9ed52fa46fe29fe028481 100644 (file)
@@ -64,9 +64,7 @@ Object_key_undumper::parse_contents (SCM contents)
              *tail = scm_cons (key->self_scm (), SCM_EOL);
            }
          else
-           {
-             *tail = scm_cons (item, SCM_EOL);
-           }
+           *tail = scm_cons (item, SCM_EOL);
          tail = SCM_CDRLOC (*tail);
        }
 
index d39a7cc9d8573885168280e29978c081fc86c8f8..688534ee741f9786528f4e0dcab5bdb1e8e7b4a3 100644 (file)
@@ -35,37 +35,37 @@ LY_DEFINE (ly_otf_font_glyph_info, "ly:otf-font-glyph-info", 2, 0, 0,
   return scm_hashq_ref (otf->get_char_table (), sym, SCM_EOL);
 }
 
-LY_DEFINE(ly_otf_font_table_data, "ly:otf-font-table-data", 2, 0, 0,
-         (SCM font, SCM tag),
-         "Extract a table @var{tag} from @var{font}. Return empty string for "
-         "non-existent @var{tag}.")
+LY_DEFINE (ly_otf_font_table_data, "ly:otf-font-table-data", 2, 0, 0,
+          (SCM font, SCM tag),
+          "Extract a table @var{tag} from @var{font}. Return empty string for "
+          "non-existent @var{tag}.")
 {
   Modified_font_metric *fm
     = dynamic_cast<Modified_font_metric *> (unsmob_metrics (font));
-  
+
   Open_type_font *otf = fm ? dynamic_cast<Open_type_font *> (fm->original_font ())
     : dynamic_cast<Open_type_font *> (unsmob_metrics (font));
 
-  SCM_ASSERT_TYPE (otf, font, SCM_ARG1,  __FUNCTION__, "Open type font");
-  SCM_ASSERT_TYPE (scm_is_string (tag), tag, SCM_ARG1,  __FUNCTION__, "Open type font");
+  SCM_ASSERT_TYPE (otf, font, SCM_ARG1, __FUNCTION__, "Open type font");
+  SCM_ASSERT_TYPE (scm_is_string (tag), tag, SCM_ARG1, __FUNCTION__, "Open type font");
 
   char ctag [5] = "    ";
 
   String tag_string = ly_scm2string (tag);
-  strncpy (ctag, tag_string.to_str0 (), tag_string.length());
+  strncpy (ctag, tag_string.to_str0 (), tag_string.length ());
 
   String tab = otf->get_otf_table (String (ctag));
 
-  return scm_from_locale_stringn ((char const*) tab.to_bytes (), tab.length ());
+  return scm_from_locale_stringn ((char const *) tab.to_bytes (), tab.length ());
 }
 
-LY_DEFINE(ly_otf_font_p, "ly:otf-font?", 1, 0, 0,
-         (SCM font),
-         "Is @var{font} an OpenType font?")
+LY_DEFINE (ly_otf_font_p, "ly:otf-font?", 1, 0, 0,
+          (SCM font),
+          "Is @var{font} an OpenType font?")
 {
   Modified_font_metric *fm
     = dynamic_cast<Modified_font_metric *> (unsmob_metrics (font));
-  
+
   Open_type_font *otf = fm ? dynamic_cast<Open_type_font *> (fm->original_font ())
     : dynamic_cast<Open_type_font *> (unsmob_metrics (font));
 
index 5ac1c9c73551920caab09a1a037349a2d6442106..0535cb625e00d28fab1427577506c7659ee9ba12 100644 (file)
@@ -38,11 +38,10 @@ load_table (char const *tag_str, FT_Face face, FT_ULong *length)
     {
       programming_error ("Cannot find OpenType table.");
     }
-  
+
   return 0;
 }
 
-
 String
 Open_type_font::get_otf_table (String tag) const
 {
@@ -85,7 +84,6 @@ Open_type_font::~Open_type_font ()
   FT_Done_Face (face_);
 }
 
-
 /*
   UGH fix naming
 */
@@ -93,7 +91,7 @@ String
 get_otf_table (FT_Face face, String tag)
 {
   FT_ULong len;
-  FT_Byte *tab = load_table (tag.to_str0 (), face,  &len);
+  FT_Byte *tab = load_table (tag.to_str0 (), face, &len);
 
   return String (tab, len);
 }
@@ -128,7 +126,7 @@ Open_type_font::Open_type_font (FT_Face face)
   lily_global_table_ = SCM_EOL;
   lily_subfonts_ = SCM_EOL;
   lily_index_to_bbox_table_ = SCM_EOL;
-  
+
   lily_character_table_ = alist_to_hashq (load_scheme_table ("LILC", face_));
   lily_global_table_ = alist_to_hashq (load_scheme_table ("LILY", face_));
   lily_subfonts_ = load_scheme_table ("LILF", face_);
@@ -168,7 +166,7 @@ Open_type_font::get_indexed_char (int signed_idx) const
   if (SCM_HASHTABLE_P (lily_index_to_bbox_table_))
     {
       SCM box = scm_hashq_ref (lily_index_to_bbox_table_, scm_from_int (signed_idx), SCM_BOOL_F);
-      Box * box_ptr = Box::unsmob (box);
+      Box *box_ptr = Box::unsmob (box);
       if (box_ptr)
        return *box_ptr;
     }
index 80b98d25004ec8fe8f8ebd382253c695cafa2c41..a9df448d62f0d6023582bb3e46dc7f11ad5c6fd7 100644 (file)
@@ -94,16 +94,12 @@ Ottava_bracket::print (SCM smob)
              Grob *dots = Rhythmic_head::get_dots (h);
 
              if (dots && d == RIGHT)
-               {
-                 ext.unite (dots->extent (common, X_AXIS));
-               }
+               ext.unite (dots->extent (common, X_AXIS));
            }
        }
 
       if (ext.is_empty ())
-       {
-         ext = robust_relative_extent (b, common, X_AXIS);
-       }
+       ext = robust_relative_extent (b, common, X_AXIS);
 
       if (broken[d])
        {
@@ -122,10 +118,10 @@ Ottava_bracket::print (SCM smob)
   Real text_size = text.extent (X_AXIS).is_empty ()
     ? 0.0 : text.extent (X_AXIS)[RIGHT] + 0.3;
 
-  span_points[LEFT] =
-    min (span_points[LEFT],
-        (span_points[RIGHT] - text_size
-         - robust_scm2double (me->get_property ("minimum-length"), -1.0)));
+  span_points[LEFT]
+    min (span_points[LEFT],
+          (span_points[RIGHT] - text_size
+           - robust_scm2double (me->get_property ("minimum-length"), -1.0)));
 
   Interval bracket_span_points = span_points;
   bracket_span_points[LEFT] += text_size;
index 6bec8a6c394e77f1c106f6afe0055818a0cfc523..7dd0aeb875de7bcf017a2821caa25293e7587e9b 100644 (file)
@@ -17,9 +17,9 @@ public:
   TRANSLATOR_DECLARATIONS (Ottava_spanner_engraver);
 protected:
   virtual void finalize ();
+
   DECLARE_ACKNOWLEDGER (note_column);
-  
+
   void process_music ();
   void stop_translation_timestep ();
   virtual void derived_mark () const;
@@ -70,7 +70,7 @@ Ottava_spanner_engraver::process_music ()
 void
 Ottava_spanner_engraver::acknowledge_note_column (Grob_info info)
 {
-  Item *it = info.item();
+  Item *it = info.item ();
   if (span_ && it)
     {
       Side_position_interface::add_support (span_, it);
index f389fcf3e641a7f8dc51a1df4fdb786f6eef2bad..8bf702c6ffb0a10f9bc7c1d5ee692c24a119f911 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "font-metric.hh"
@@ -22,7 +21,7 @@ LY_DEFINE (ly_layout_lookup, "ly:output-def-lookup",
   Output_def *op = unsmob_output_def (pap);
   SCM_ASSERT_TYPE (op, pap, SCM_ARG1, __FUNCTION__, "Output_def");
   SCM_ASSERT_TYPE (scm_is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
-  
+
   SCM answer = op->lookup_variable (sym);
   if (answer == SCM_UNDEFINED)
     {
@@ -60,7 +59,7 @@ LY_DEFINE (ly_output_def_clone, "ly:output-def-clone",
   Output_def *op = unsmob_output_def (def);
   SCM_ASSERT_TYPE (op, def, SCM_ARG1, __FUNCTION__, "Output definition");
 
-  Output_def *clone =  op->clone ();
+  Output_def *clone = op->clone ();
   return clone->unprotect ();
 }
 
@@ -69,18 +68,18 @@ LY_DEFINE (ly_output_description, "ly:output-description",
           "Return the description of translators in @var{output-def}.")
 {
   Output_def *id = unsmob_output_def (output_def);
-  
+
   SCM al = ly_module2alist (id->scope_);
 
   SCM ell = SCM_EOL;
   for (SCM s = al; scm_is_pair (s); s = scm_cdr (s))
     {
-      Context_def * td = unsmob_context_def (scm_cdar (s));
+      Context_def *td = unsmob_context_def (scm_cdar (s));
       SCM key = scm_caar (s);
       if (td && key == td->get_context_name ())
-       ell = scm_cons (scm_cons (key, td->to_alist ()),  ell);
+       ell = scm_cons (scm_cons (key, td->to_alist ()), ell);
     }
-  return ell;  
+  return ell;
 }
 
 LY_DEFINE (ly_layout_def_p, "ly:layout-def?",
@@ -91,8 +90,8 @@ LY_DEFINE (ly_layout_def_p, "ly:layout-def?",
 }
 
 LY_DEFINE (ly_paper_outputscale, "ly:paper-outputscale",
-         1, 0, 0, (SCM bp),
-         "Get outputscale for BP.")
+          1, 0, 0, (SCM bp),
+          "Get outputscale for BP.")
 {
   Output_def *b = unsmob_output_def (bp);
   SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "paper");
@@ -103,7 +102,7 @@ LY_DEFINE (ly_make_output_def, "ly:make-output-def",
           0, 0, 0, (),
           "Make a output def.")
 {
-  Output_def *bp = new Output_def ;
+  Output_def *bp = new Output_def;
   return bp->unprotect ();
 }
 
@@ -118,7 +117,7 @@ LY_DEFINE (ly_paper_get_font, "ly:paper-get-font", 2, 0, 0,
   Output_def *paper = unsmob_output_def (paper_smob);
   SCM_ASSERT_TYPE (paper, paper_smob, SCM_ARG1,
                   __FUNCTION__, "paper definition");
-  
+
   Font_metric *fm = select_font (paper, chain);
   return fm->self_scm ();
 }
@@ -140,7 +139,6 @@ LY_DEFINE (ly_paper_fonts, "ly:paper-fonts",
 {
   Output_def *b = unsmob_output_def (bp);
 
-  
   SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "paper");
 
   SCM tab1 = b->lookup_variable (ly_symbol2scm ("scaled-fonts"));
@@ -150,7 +148,7 @@ LY_DEFINE (ly_paper_fonts, "ly:paper-fonts",
   if (scm_hash_table_p (tab1) == SCM_BOOL_T)
     {
       alist1 = scm_append (ly_alist_vals (ly_hash2alist (tab1)));
-      
+
       alist1 = ly_alist_vals (alist1);
     }
 
@@ -161,7 +159,7 @@ LY_DEFINE (ly_paper_fonts, "ly:paper-fonts",
       alist2 = scm_append (ly_alist_vals (ly_hash2alist (tab2)));
 
       // strip size factors
-      alist2 = ly_alist_vals (alist2); 
+      alist2 = ly_alist_vals (alist2);
     }
 
   SCM alist = scm_append (scm_list_2 (alist1, alist2));
@@ -169,13 +167,13 @@ LY_DEFINE (ly_paper_fonts, "ly:paper-fonts",
   for (SCM s = alist; scm_is_pair (s); s = scm_cdr (s))
     {
       SCM entry = scm_car (s);
-      
+
       Font_metric *fm = unsmob_metrics (entry);
 
-      if (dynamic_cast<Modified_font_metric*> (fm)
-         || dynamic_cast<Pango_font*> (fm))
+      if (dynamic_cast<Modified_font_metric *> (fm)
+         || dynamic_cast<Pango_font *> (fm))
        font_list = scm_cons (fm->self_scm (), font_list);
     }
-  
+
   return font_list;
 }
index 0a4fc747fa98fb0953a15f988210a4e45005583b..ca142d16e453ba4f3e55d901e52a5a126f779d6f 100644 (file)
@@ -101,7 +101,7 @@ Pango_font::pango_item_string_stencil (PangoItem *item, String str, Real dx) con
                   PANGO_ASCENT (ink_rect)));
 
   b.scale (scale_);
-  
+
   SCM glyph_exprs = SCM_EOL;
   SCM *tail = &glyph_exprs;
 
@@ -115,13 +115,12 @@ Pango_font::pango_item_string_stencil (PangoItem *item, String str, Real dx) con
 
       FT_Get_Glyph_Name (ftface, pg, glyph_name, GLYPH_NAME_LEN);
 
-
-      SCM char_id; 
+      SCM char_id;
       if (glyph_name[0] == '\0')
        {
          /*
            CID entry
-          */
+         */
          cid_keyed = true;
          char_id = scm_from_int (pg);
        }
index dc373ea1171419663cb27e96815fafa8830ce95c..fa40e5ef582a1fcd7d82665dc02ab7d3bb114db5 100644 (file)
@@ -81,14 +81,12 @@ Paper_book::add_score (SCM s)
   scores_ = scm_cons (s, scores_);
 }
 
-
 void
 Paper_book::add_performance (SCM s)
 {
   performances_ = scm_cons (s, performances_);
 }
 
-
 void
 Paper_book::output (SCM output_channel)
 {
@@ -276,14 +274,14 @@ Paper_book::systems ()
            header_0_ = header;
        }
       else if (Music_output *mop = unsmob_music_output (scm_car (s)))
-       
+
        {
          if (Paper_score *pscore = dynamic_cast<Paper_score *> (mop))
            {
              add_score_title (header);
-         
+
              header = SCM_EOL;
-         
+
              SCM system_list = scm_vector_to_list (pscore->get_paper_systems ());
              system_list = scm_reverse (system_list);
              systems_ = scm_append (scm_list_2 (system_list, systems_));
@@ -298,11 +296,11 @@ Paper_book::systems ()
       else if (scm_is_vector (scm_car (s)))
        {
          /*
-           UGH. code dup.  
+           UGH. code dup.
          */
          add_score_title (header);
          header = SCM_EOL;
-         
+
          SCM system_list = scm_vector_to_list (scm_car (s));
          system_list = scm_reverse (system_list);
          systems_ = scm_append (scm_list_2 (system_list, systems_));
index c92055fa86c8a016b0bf6bc388fb23b885f34326..680deae2bf7ed41ec8c450fca576b431b444a189 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "paper-column-engraver.hh"
@@ -20,7 +19,6 @@
 
 #include "translator.icc"
 
-
 Paper_column_engraver::Paper_column_engraver ()
 {
   command_column_ = 0;
@@ -41,7 +39,7 @@ Paper_column_engraver::finalize ()
     {
       command_column_->set_property ("breakable", SCM_BOOL_T);
       system_->set_bound (RIGHT, command_column_);
-    }  
+    }
 }
 
 void
@@ -53,21 +51,19 @@ Paper_column_engraver::make_columns ()
   Paper_column *p1 = make_paper_column ("NonMusicalPaperColumn");
   Paper_column *p2 = make_paper_column ("PaperColumn");
 
-  SCM m = now_mom().smobbed_copy();
+  SCM m = now_mom ().smobbed_copy ();
   p1->set_property ("when", m);
   p2->set_property ("when", m);
-      
+
   set_columns (p1, p2);
 }
 
-
 void
 Paper_column_engraver::initialize ()
 {
-  system_ = dynamic_cast<System*> (unsmob_grob (get_property ("rootSystem")));
+  system_ = dynamic_cast<System *> (unsmob_grob (get_property ("rootSystem")));
   make_columns ();
 
-  
   system_->set_bound (LEFT, command_column_);
   command_column_->set_property ("breakable", SCM_BOOL_T);
 }
@@ -113,7 +109,6 @@ Paper_column_engraver::set_columns (Paper_column *new_command,
   system_->add_column (musical_column_);
 }
 
-
 void
 Paper_column_engraver::forbid_breaks ()
 {
@@ -121,7 +116,6 @@ Paper_column_engraver::forbid_breaks ()
     command_column_->set_property ("breakable", SCM_EOL);
 }
 
-
 bool
 Paper_column_engraver::try_music (Music *m)
 {
@@ -157,7 +151,6 @@ Paper_column_engraver::process_music ()
       command_column_->set_property ("page-penalty", scm_from_double (total_pp));
     }
 
-
   bool start_of_measure = (last_moment_.main_part_ != now_mom ().main_part_
                           && !measure_position (context ()).main_part_);
 
@@ -168,11 +161,11 @@ Paper_column_engraver::process_music ()
   if (start_of_measure)
     {
       Moment mlen = Moment (measure_length (context ()));
-      Grob * column = unsmob_grob (get_property ("currentCommandColumn"));
+      Grob *column = unsmob_grob (get_property ("currentCommandColumn"));
       if (column)
        column->set_property ("measure-length", mlen.smobbed_copy ());
       else
-       programming_error("No command column?");
+       programming_error ("No command column?");
     }
 }
 
@@ -190,7 +183,7 @@ Paper_column_engraver::stop_translation_timestep ()
        }
     }
   items_.clear ();
-  
+
   if (to_boolean (command_column_->get_property ("breakable")))
     {
       breaks_++;
@@ -212,10 +205,9 @@ Paper_column_engraver::start_translation_timestep ()
     make_columns ();
 }
 
-ADD_ACKNOWLEDGER (Paper_column_engraver,item);
-ADD_ACKNOWLEDGER (Paper_column_engraver,note_spacing);
-ADD_ACKNOWLEDGER (Paper_column_engraver,staff_spacing);
-
+ADD_ACKNOWLEDGER (Paper_column_engraver, item);
+ADD_ACKNOWLEDGER (Paper_column_engraver, note_spacing);
+ADD_ACKNOWLEDGER (Paper_column_engraver, staff_spacing);
 
 ADD_TRANSLATOR (Paper_column_engraver,
                /* doc */ "Takes care of generating columns."
index 991e58983fe84cd00ccb101ca86ddb8fecfb5236..d86caaa735b14395648abe0b6e1f45a89557b89b 100644 (file)
@@ -105,12 +105,12 @@ Paper_column::is_musical (Grob *me)
 bool
 Paper_column::is_used (Grob *me)
 {
-  extract_grob_set (me ,"elements", elts);
-  if (elts.size())
+  extract_grob_set (me"elements", elts);
+  if (elts.size ())
     return true;
-  
-  extract_grob_set (me ,"bounded-by-me", bbm);
-  if (bbm.size())
+
+  extract_grob_set (me"bounded-by-me", bbm);
+  if (bbm.size ())
     return true;
   return Item::is_breakable (me);
 }
@@ -129,7 +129,7 @@ Paper_column::print (SCM p)
 
   Moment *mom = unsmob_moment (me->get_property ("when"));
   String when = mom ? mom->to_string () : "?/?";
-    
+
   SCM properties = Font_interface::text_font_alist_chain (me);
 
   SCM scm_mol = Text_interface::interpret_markup (me->get_layout ()->self_scm (),
@@ -165,13 +165,13 @@ Paper_column::before_line_breaking (SCM grob)
   Grob *me = unsmob_grob (grob);
 
   SCM bbm = me->get_object ("bounded-by-me");
-  Grob_array * ga = unsmob_grob_array (bbm);
+  Grob_array *ga = unsmob_grob_array (bbm);
   if (!ga)
     return SCM_UNSPECIFIED;
-   
+
   Link_array<Grob> &array (ga->array_reference ());
-  
-  for (int i = array.size(); i--; )
+
+  for (int i = array.size (); i--;)
     {
       Grob *g = array[i];
 
index 9c753f9b493eed6b00175557b275068078f012e2..3c2f531e0344e5d05a5d43caa9fd19df2d7c8fe5 100644 (file)
@@ -11,7 +11,6 @@
 #include "stencil.hh"
 
 
-
 LY_DEFINE (ly_make_paper_outputter, "ly:make-paper-outputter",
           2, 0, 0, (SCM port, SCM format),
           "Create an outputter that evaluates within "
@@ -25,11 +24,11 @@ LY_DEFINE (ly_make_paper_outputter, "ly:make-paper-outputter",
   String f = ly_scm2string (format);
 
   String output_name = "<unknown>";
-  
+
   SCM port_name = scm_port_filename (port);
   if (scm_is_string (port_name))
     output_name = ly_scm2string (port_name);
-  
+
   message (_f ("Layout output to `%s'...",
               output_name.to_str0 ()));
 
index 031c76b84c5d1edd658a72b25a6969ac22c207c8..219f27e6e969f0a67176b4b24780dfa95c95a252 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "paper-score.hh"
index 87b94f1531c5ee023acbcbe3a2d91eec185bb34f..f84ac9218a0c51de6aa4b16a8de6926037e92851 100644 (file)
@@ -35,7 +35,6 @@ Paper_score::Paper_score (Paper_score const &s)
   assert (false);
 }
 
-
 void
 Paper_score::derived_mark () const
 {
@@ -108,7 +107,6 @@ Paper_score::layout () const
 {
   return layout_;
 }
-  
 
 SCM
 Paper_score::get_paper_systems () const
index df81f10777b33b85c6fd41e5f929922e43ed48a9..e6a2ceca65ad242c43cbe214591ae3662fd812f5 100644 (file)
@@ -22,7 +22,7 @@ class Part_combine_engraver : public Engraver
 protected:
   DECLARE_ACKNOWLEDGER (note_head);
   DECLARE_ACKNOWLEDGER (stem);
-  
+
   void process_music ();
   void stop_translation_timestep ();
   virtual bool try_music (Music *);
@@ -84,7 +84,7 @@ void
 Part_combine_engraver::acknowledge_stem (Grob_info i)
 {
   if (text_)
-      Side_position_interface::add_support (text_, i.grob ());
+    Side_position_interface::add_support (text_, i.grob ());
 }
 
 void
index d68a44e274eee71e4cb13da8f1ac6b7547b920db..521972ec315be8464af520c65dbfe8e3790062a2 100644 (file)
@@ -91,9 +91,7 @@ Percent_repeat_engraver::try_music (Music *m)
       if (meas_len == body_length_)
        repeat_sign_type_ = MEASURE;
       else if (Moment (2) * meas_len == body_length_)
-       {
-         repeat_sign_type_ = DOUBLE_MEASURE;
-       }
+       repeat_sign_type_ = DOUBLE_MEASURE;
       else
        {
          warning (_f ("can't handle a percent repeat of length: %s",
@@ -116,7 +114,7 @@ Percent_repeat_engraver::try_music (Music *m)
 
       if (repeat_sign_type_ == DOUBLE_MEASURE)
        next_moment_ += meas_len;
-      
+
       return true;
     }
 
@@ -139,7 +137,7 @@ Percent_repeat_engraver::process_music ()
       else if (repeat_sign_type_ == DOUBLE_MEASURE)
        {
          double_percent_ = make_item ("DoublePercentRepeat", repeat_->self_scm ());
-         
+
          /*
            forbid breaks on a % line. Should forbid all breaks, really.
 
index d8dd325346e191bf647e85fed611a1e5039eaa93..645262f9df1072b04cccffe80700fee2f882e9cd 100644 (file)
@@ -4,26 +4,22 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
-
 #include "performance.hh"
 
-
 LY_DEFINE (ly_performance_write, "ly:performance-write",
-          2,0,0, (SCM performance, SCM filename),
+          2, 0, 0, (SCM performance, SCM filename),
           "Write @var{performance} to @var{filename}")
 
 {
-  Performance * perf  = dynamic_cast<Performance*> (unsmob_music_output (performance));
+  Performance *perf = dynamic_cast<Performance *> (unsmob_music_output (performance));
 
-  SCM_ASSERT_TYPE(perf, performance, SCM_ARG1, __FUNCTION__, "Performance");
-  SCM_ASSERT_TYPE(scm_is_string (filename), filename, SCM_ARG2, __FUNCTION__, "file name");
+  SCM_ASSERT_TYPE (perf, performance, SCM_ARG1, __FUNCTION__, "Performance");
+  SCM_ASSERT_TYPE (scm_is_string (filename), filename, SCM_ARG2, __FUNCTION__, "file name");
 
   perf->write_output (ly_scm2string (filename));
   return SCM_UNSPECIFIED;
 }
 
 
-
index 6bdec3790c7867abc63afdee27e40a36f142fac8..ca2d061d85c60cd4587fe1e6f6fea57e257ec8cd 100644 (file)
@@ -149,7 +149,6 @@ Performance::add_element (Audio_element *p)
   audio_element_list_ = new Killing_cons<Audio_element> (p, audio_element_list_);
 }
 
-
 void
 Performance::write_output (String out)
 {
index 0b8c8f6cf514b1fc82c25723f7267b8597356605..37715b538e431ee1558df1fd6a99eb062468d651 100644 (file)
 #include "warn.hh"
 
 ADD_TRANSLATOR_GROUP (Performer_group_performer,
-               /* doc */ "",
-               /* create */ "",
-               /* accept */ "",
-               /* read */ "",
-               /* write */ "");
+                     /* doc */ "",
+                     /* create */ "",
+                     /* accept */ "",
+                     /* read */ "",
+                     /* write */ "");
 
 void
 Performer_group_performer::announce_element (Audio_element_info info)
@@ -75,14 +75,13 @@ Performer_group_performer::do_announces ()
     }
 }
 
-
 void
 Performer_group_performer::play_element (Audio_element *e)
 {
   Context *c = context_->get_parent_context ();
   if (c)
     {
-      Performer_group_performer *pgp = dynamic_cast<Performer_group_performer*> (c->implementation ());
+      Performer_group_performer *pgp = dynamic_cast<Performer_group_performer *> (c->implementation ());
       pgp->play_element (e);
     }
 }
@@ -93,9 +92,9 @@ Performer_group_performer::get_tempo () const
   Context *c = context_->get_parent_context ();
   if (c)
     {
-      Performer_group_performer *pgp = dynamic_cast<Performer_group_performer*> (c->implementation ());
+      Performer_group_performer *pgp = dynamic_cast<Performer_group_performer *> (c->implementation ());
       return pgp->get_tempo ();
     }
   return 60;
 }
-  
+
index 56fc6beebaabfa486cccdcfab81ef88dc8d83c52..4af36099383b03ba6653c29bb4be935cc48fc8e5 100644 (file)
@@ -93,12 +93,11 @@ LY_DEFINE (ly_pfb_to_pfa, "ly:pfb->pfa",
   delete str;
   if (be_verbose_global)
     progress_indication ("]");
-  
+
   return pfa_scm;
 }
 
 
-
 LY_DEFINE (ly_otf_to_cff, "ly:otf->cff",
           1, 0, 0, (SCM otf_file_name),
           "Convert the contents of a OTF file to CFF file, returning it as "
@@ -114,12 +113,12 @@ LY_DEFINE (ly_otf_to_cff, "ly:otf->cff",
   FT_Face face = open_ft_face (file_name);
   String table = get_otf_table (face, "CFF ");
 
-  SCM asscm = scm_from_locale_stringn ((char*) table.get_bytes (),
+  SCM asscm = scm_from_locale_stringn ((char *) table.get_bytes (),
                                       table.length ());
 
   if (be_verbose_global)
     progress_indication ("]");
-  
+
   return asscm;
-}         
+}
+
index ab0b30d230025bd555c4d67aca21ad991064d4c1..b5087e2f491fbb7fa4b643b3267a994e1f19d4f1 100644 (file)
@@ -39,7 +39,7 @@ protected:
   DECLARE_ACKNOWLEDGER (slur);
   DECLARE_ACKNOWLEDGER (text_script);
   DECLARE_ACKNOWLEDGER (tie);
-  
+
   void stop_translation_timestep ();
   virtual void finalize ();
   void process_music ();
@@ -93,7 +93,7 @@ Phrasing_slur_engraver::acknowledge_note_column (Grob_info info)
 void
 Phrasing_slur_engraver::acknowledge_extra_object (Grob_info info)
 {
-  Grob*e = info.grob ();
+  Grob *e = info.grob ();
   SCM inside = e->get_property ("inside-slur");
   if (Tie::has_interface (e)
       || to_boolean (inside))
@@ -154,7 +154,6 @@ Phrasing_slur_engraver::acknowledge_tie (Grob_info info)
   acknowledge_extra_object (info);
 }
 
-
 void
 Phrasing_slur_engraver::acknowledge_slur (Grob_info info)
 {
@@ -199,11 +198,10 @@ Phrasing_slur_engraver::stop_translation_timestep ()
 
 #include "translator.icc"
 
-
 ADD_ACKNOWLEDGER (Phrasing_slur_engraver, accidental);
 ADD_ACKNOWLEDGER (Phrasing_slur_engraver, dynamic_line_spanner);
 ADD_ACKNOWLEDGER (Phrasing_slur_engraver, fingering)
-ADD_ACKNOWLEDGER (Phrasing_slur_engraver, note_column);
+  ADD_ACKNOWLEDGER (Phrasing_slur_engraver, note_column);
 ADD_ACKNOWLEDGER (Phrasing_slur_engraver, script);
 ADD_ACKNOWLEDGER (Phrasing_slur_engraver, slur);
 ADD_ACKNOWLEDGER (Phrasing_slur_engraver, text_script);
index 870d6d44d838cce560ea301d52c9916291431dc5..a557a8dca9ce140b64ccd6f7f3f5f62dcf76ce22 100644 (file)
@@ -152,7 +152,7 @@ Piano_pedal_engraver::try_music (Music *m)
        {
          String nm = p->name_ + String ("Event");
          if (ly_is_equal (m->get_property ("name"),
-                           scm_str2symbol (nm.to_str0 ())))
+                          scm_str2symbol (nm.to_str0 ())))
            {
              Direction d = to_dir (m->get_property ("span-direction"));
              p->event_drul_[d] = m;
@@ -237,9 +237,7 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed)
              p->event_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: `%s'", p->name_));
            }
          else
-           {
-             s = scm_cadr (strings);
-           }
+           s = scm_cadr (strings);
          p->start_ev_ = p->event_drul_[START];
        }
     }
@@ -252,9 +250,7 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed)
              p->event_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: `%s'", p->name_));
            }
          else
-           {
-             s = scm_caddr (strings);
-           }
+           s = scm_caddr (strings);
          p->start_ev_ = 0;
        }
     }
@@ -423,9 +419,7 @@ Piano_pedal_engraver::finalize ()
          SCM cc = get_property ("currentCommandColumn");
          Item *c = unsmob_item (cc);
          if (p->line_spanner_)
-           {
-             p->line_spanner_->set_bound (RIGHT, c);
-           }
+           p->line_spanner_->set_bound (RIGHT, c);
          p->bracket_->set_bound (RIGHT, c);
 
          p->finished_bracket_ = p->bracket_;
@@ -523,7 +517,7 @@ Piano_pedal_engraver::typeset_all (Pedal_info *p)
 }
 
 #include "translator.icc"
-ADD_ACKNOWLEDGER (Piano_pedal_engraver,note_column);
+ADD_ACKNOWLEDGER (Piano_pedal_engraver, note_column);
 ADD_TRANSLATOR (Piano_pedal_engraver,
                /* doc */ "Engrave piano pedal symbols and brackets.",
                /* create */ "SostenutoPedal SustainPedal UnaCordaPedal SostenutoPedalLineSpanner SustainPedalLineSpanner UnaCordaPedalLineSpanner",
index 859c4fa3f8527de2a2877a9f66b5c87af4eb247d..fe0bcff1f0a3c56fff4d2da9be07e9f54727c955 100644 (file)
@@ -130,7 +130,7 @@ Piano_pedal_performer::try_music (Music *r)
        {
          String nm = p->name_ + String ("Event");
          if (ly_is_equal (r->get_property ("name"),
-                           scm_str2symbol (nm.to_str0 ())))
+                          scm_str2symbol (nm.to_str0 ())))
            {
              Direction d = to_dir (r->get_property ("span-direction"));
              p->event_drul_[d] = r;
@@ -145,4 +145,4 @@ Piano_pedal_performer::try_music (Music *r)
 
 ADD_TRANSLATOR (Piano_pedal_performer, "", "",
                "pedal-event",
-                "", "");
+               "", "");
index 99aa432df7d65fe1334206d8a2eef6152743b5aa..f6ce236706b2e76db904a8f62440a9b120108a73 100644 (file)
@@ -32,9 +32,9 @@ Pitch_squash_engraver::Pitch_squash_engraver ()
 }
 
 #include "translator.icc"
-ADD_ACKNOWLEDGER (Pitch_squash_engraver,note_head);
+ADD_ACKNOWLEDGER (Pitch_squash_engraver, note_head);
 ADD_TRANSLATOR (Pitch_squash_engraver,
-               /* doc */ 
+               /* doc */
                "Set the vertical position of noteheads to "
                "@code{squashedPosition}, if that "
                "property is set. "
index cfa2a3ad49dbbdc90b77bdb52bf9e0e72bcd39d0..ce2c5a3b91ae70fa868768c871edfd20fcc5ad1b 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "engraver.hh"
 #include "note-head.hh"
 #include "item.hh"
 #include "side-position-interface.hh"
-#include "pitch.hh"            
+#include "pitch.hh"
 #include "warn.hh"
 
 class Pitched_trill_engraver : public Engraver
 {
 public:
-  TRANSLATOR_DECLARATIONS(Pitched_trill_engraver);
-  
+  TRANSLATOR_DECLARATIONS (Pitched_trill_engraver);
+
 protected:
-  DECLARE_ACKNOWLEDGER ( note_head);
-  DECLARE_ACKNOWLEDGER ( dots);
-  DECLARE_ACKNOWLEDGER ( text_spanner);
+  DECLARE_ACKNOWLEDGER (note_head);
+  DECLARE_ACKNOWLEDGER (dots);
+  DECLARE_ACKNOWLEDGER (text_spanner);
   void process_music ();
-  virtual bool try_music (Music*);
+  virtual bool try_music (Music *);
   void stop_translation_timestep ();
 
 private:
@@ -42,7 +41,6 @@ private:
   void make_trill (Music *);
 };
 
-
 Pitched_trill_engraver::Pitched_trill_engraver ()
 {
   trill_head_ = 0;
@@ -60,7 +58,7 @@ Pitched_trill_engraver::acknowledge_note_head (Grob_info info)
 {
   heads_.push (info.grob ());
 }
+
 void
 Pitched_trill_engraver::acknowledge_text_spanner (Grob_info info)
 {
@@ -91,7 +89,7 @@ Pitched_trill_engraver::make_trill (Music *mus)
   if (trill_head_)
     {
       programming_error ("already have a trill head.");
-      trill_head_ = 0; 
+      trill_head_ = 0;
     }
 
   trill_head_ = make_item ("TrillPitchHead", mus->self_scm ());
@@ -102,10 +100,10 @@ Pitched_trill_engraver::make_trill (Music *mus)
   trill_head_->set_property ("staff-position",
                             scm_from_int (unsmob_pitch (scm_pitch)->steps ()
                                           + c0));
-  
-  trill_group_ = make_item ("TrillPitchGroup", mus->self_scm());
 
-  Axis_group_interface::add_element (trill_group_,  trill_head_);
+  trill_group_ = make_item ("TrillPitchGroup", mus->self_scm ());
+
+  Axis_group_interface::add_element (trill_group_, trill_head_);
 
   if (print_acc)
     {
@@ -127,7 +125,7 @@ Pitched_trill_engraver::stop_translation_timestep ()
   if (trill_group_)
     for (int i = 0; i < heads_.size (); i++)
       Side_position_interface::add_support (trill_group_, heads_[i]);
-  
+
   heads_.clear ();
   trill_head_ = 0;
   trill_group_ = 0;
index 07e49c351848147270136b8ce6d91876211c2f1e..74b4c2e0e2b90cdcfc2b83979fdcfd9546311665 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "pointer-group-interface.hh"
@@ -18,7 +17,7 @@ int
 Pointer_group_interface::count (Grob *me, SCM sym)
 {
   Grob_array *arr = unsmob_grob_array (me->internal_get_object (sym));
-  return arr ? arr->size() : 0;
+  return arr ? arr->size () : 0;
 }
 
 void
@@ -27,7 +26,6 @@ Pointer_group_interface::add_grob (Grob *me, SCM sym, SCM p)
   add_grob (me, sym, unsmob_grob (p));
 }
 
-
 void
 Pointer_group_interface::add_grob (Grob *me, SCM sym, Grob *p)
 {
@@ -41,7 +39,7 @@ Pointer_group_interface::add_grob (Grob *me, SCM sym, Grob *p)
     }
   arr->add (p);
 }
-  
+
 static Link_array<Grob> empty_array;
 
 Link_array<Grob> const &
@@ -50,7 +48,6 @@ ly_scm2link_array (SCM x)
   Grob_array *arr = unsmob_grob_array (x);
   return arr ? arr->array () : empty_array;
 }
-  
 
 Link_array<Grob> const &
 internal_extract_grob_array (Grob const *elt, SCM symbol)
index 0e986d4d708de362c702f58a53b1c3aad71fa3b4..e0509e56a2f8b8476355899f1c01b049e6d15770 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "profile.hh"
@@ -14,33 +13,32 @@ void note_property_access (SCM *table, SCM sym);
 SCM context_property_lookup_table;
 SCM grob_property_lookup_table;
 
-LY_DEFINE(ly_context_property_lookup_stats, "ly:context-property-lookup-stats",
-         0,0,0, (),
-         "")
+LY_DEFINE (ly_context_property_lookup_stats, "ly:context-property-lookup-stats",
+          0, 0, 0, (),
+          "")
 {
-  return context_property_lookup_table ?  context_property_lookup_table
+  return context_property_lookup_table ? context_property_lookup_table
     : scm_c_make_hash_table (1);
 }
 
 
-
-LY_DEFINE(ly_property_lookup_stats, "ly:grob-property-lookup-stats",
-         0,0,0, (),
-         "")
+LY_DEFINE (ly_property_lookup_stats, "ly:grob-property-lookup-stats",
+          0, 0, 0, (),
+          "")
 {
-  return grob_property_lookup_table ?  grob_property_lookup_table :
-    scm_c_make_hash_table (1);
+  return grob_property_lookup_table ? grob_property_lookup_table
+    scm_c_make_hash_table (1);
 }
 
 void
 note_property_access (SCM *table, SCM sym)
 {
   /*
-    Statistics: which properties are looked up? 
+    Statistics: which properties are looked up?
   */
   if (!*table)
     *table = scm_permanent_object (scm_c_make_hash_table (259));
-  
+
   SCM hashhandle = scm_hashq_get_handle (*table, sym);
   if (hashhandle == SCM_BOOL_F)
     {
@@ -48,6 +46,6 @@ note_property_access (SCM *table, SCM sym)
       hashhandle = scm_hashq_get_handle (*table, sym);
     }
 
-  int count = scm_to_int (scm_cdr (hashhandle)) + 1;  
+  int count = scm_to_int (scm_cdr (hashhandle)) + 1;
   scm_set_cdr_x (hashhandle, scm_from_int (count));
 }
index c585bb4a6073d4d5770f602e2d69c1e0d42ba739..c1d4d572b3b2d9516abb15a318569a918157c4fc 100644 (file)
@@ -17,7 +17,6 @@
 #include "warn.hh"
 #include "main.hh"
 
-
 /* Write midi as formatted ascii stream? */
 bool do_midi_debugging_global;
 bool use_object_keys;
@@ -80,28 +79,27 @@ void internal_set_option (SCM var, SCM val)
     }
 }
 
-const int HELP_INDENT = 30; 
-const int INDENT = 2; 
-const int SEPARATION = 5; 
+const int HELP_INDENT = 30;
+const int INDENT = 2;
+const int SEPARATION = 5;
 
 /*
   Hmmm. should do in SCM / C++  ?
- */
+*/
 static String
 get_help_string ()
 {
   SCM alist = ly_hash2alist (option_hash_);
   SCM convertor = ly_lily_module_constant ("scm->string");
-  
-  
+
   Array<String> opts;
-  
+
   for (SCM s = alist; scm_is_pair (s); s = scm_cdr (s))
     {
       SCM sym = scm_caar (s);
       SCM val = scm_cdar (s);
-      String opt_spec =
-       String_convert::char_string (' ', INDENT)
+      String opt_spec
+       String_convert::char_string (' ', INDENT)
        + ly_symbol2string (sym)
        + " ("
        + ly_scm2string (scm_call_1 (convertor, val))
@@ -116,7 +114,7 @@ get_help_string ()
        opt_spec += String_convert::char_string (' ', HELP_INDENT - opt_spec.length ());
 
       SCM opt_help_scm
-       = scm_object_property (sym, ly_symbol2scm ("program-option-documentation")); 
+       = scm_object_property (sym, ly_symbol2scm ("program-option-documentation"));
       String opt_help = ly_scm2string (opt_help_scm);
       opt_help.substitute (String ("\n"),
                           String ("\n")
@@ -127,9 +125,9 @@ get_help_string ()
 
   String help ("Options supported by ly:set-option\n\n");
   opts.sort (String::compare);
-  for (int  i = 0; i < opts.size (); i++)
+  for (int i = 0; i < opts.size (); i++)
     help += opts[i];
-    
+
   help += String ("\n");
   return help;
 }
@@ -138,14 +136,14 @@ LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 0, 0, (),
           "Print ly:set-option usage")
 {
   String help = get_help_string ();
-  fputs (help.to_str0 (), stdout); 
+  fputs (help.to_str0 (), stdout);
 
   exit (0);
   return SCM_UNSPECIFIED;
 }
 
 LY_DEFINE (ly_add_option, "ly:add-option", 3, 0, 0,
-          (SCM sym, SCM val,  SCM description),
+          (SCM sym, SCM val, SCM description),
           "Add a program option @var{sym} with default @var{val}.")
 {
   if (scm_hash_table_p (option_hash_) == SCM_BOOL_F)
@@ -154,7 +152,7 @@ LY_DEFINE (ly_add_option, "ly:add-option", 3, 0, 0,
   SCM_ASSERT_TYPE (scm_is_symbol (sym), sym, SCM_ARG1, __FUNCTION__, "symbol");
   SCM_ASSERT_TYPE (scm_is_string (description), description,
                   SCM_ARG3, __FUNCTION__, "string");
-                 
+
   internal_set_option (sym, val);
 
   scm_set_object_property_x (sym, ly_symbol2scm ("program-option-documentation"),
@@ -167,7 +165,7 @@ LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val),
           "Set a program option. Try setting 'help for a help string.")
 {
   SCM_ASSERT_TYPE (scm_is_symbol (var), var, SCM_ARG1,
-                  __FUNCTION__,  "symbol");
+                  __FUNCTION__, "symbol");
 
   if (ly_symbol2scm ("help") == var)
     {
@@ -177,13 +175,13 @@ LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val),
   if (val == SCM_UNDEFINED)
     val = SCM_BOOL_T;
 
-  String  varstr = ly_scm2string (scm_symbol_to_string (var));
+  String varstr = ly_scm2string (scm_symbol_to_string (var));
   if (varstr.left_string (3) == String ("no-"))
     {
       var = ly_symbol2scm (varstr.nomid_string (0, 3).to_str0 ());
       val = scm_from_bool (!to_boolean (val));
     }
-  
+
   SCM handle = scm_hashq_get_handle (option_hash_, var);
   if (handle == SCM_BOOL_F)
     {
@@ -198,6 +196,6 @@ LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var),
           "Get a global option setting.")
 {
   SCM_ASSERT_TYPE (scm_is_symbol (var), var,
-                  SCM_ARG1, __FUNCTION__,  "symbol");
+                  SCM_ARG1, __FUNCTION__, "symbol");
   return scm_hashq_ref (option_hash_, var, SCM_BOOL_F);
-}  
+}
index f6eb1f9cc20585c8eabd911b31c8699332863ba1..9cd2af1fff21a903316b123aa713993047c2100f 100644 (file)
@@ -83,7 +83,6 @@ check_grob (Music *mus, SCM sym)
   return g;
 }
 
-
 void
 Push_property_iterator::process (Moment m)
 {
index 0394d50a46eaef2ced8ba5ef13c5542c36ee57c8..54b059d8f75ee38489470f89846f7d7afd1a33a2 100644 (file)
@@ -9,7 +9,6 @@
 #include "recording-group-engraver.hh"
 #include "context.hh"
 
-
 void
 Recording_group_engraver::derived_mark () const
 {
@@ -43,7 +42,7 @@ Recording_group_engraver::stop_translation_timestep ()
 void
 Recording_group_engraver::finalize ()
 {
-  SCM proc = context()->get_property ("recordEventSequence");
+  SCM proc = context ()->get_property ("recordEventSequence");
 
   if (ly_is_procedure (proc))
     scm_call_2 (proc, context ()->self_scm (), scm_cdr (accumulator_));
@@ -61,7 +60,7 @@ Recording_group_engraver::try_music (Music *m)
 void
 recording_engraver (Translator_group *tg)
 {
-  Recording_group_engraver *rg = dynamic_cast<Recording_group_engraver*> (tg);
+  Recording_group_engraver *rg = dynamic_cast<Recording_group_engraver *> (tg);
   rg->stop_translation_timestep ();
 }
 
@@ -73,10 +72,10 @@ Recording_group_engraver::fetch_precomputable_methods (Translator_group_void_met
 }
 
 ADD_TRANSLATOR_GROUP (Recording_group_engraver,
-               "Engraver_group_engraver that records all music events "
-               "for this context. Calls the procedure "
-               "in @code{recordEventSequence} when finished.",
-               "",
-               "",
-               "recordEventSequence",
-               "");
+                     "Engraver_group_engraver that records all music events "
+                     "for this context. Calls the procedure "
+                     "in @code{recordEventSequence} when finished.",
+                     "",
+                     "",
+                     "recordEventSequence",
+                     "");
index 6d2a32058b130c2827fc4ffe0e7ee2b2f391ce1c..183f7e88c01d5d54742e5facc2d9fcd404c1c328 100644 (file)
@@ -108,7 +108,6 @@ Repeat_acknowledge_engraver::process_music ()
     }
 }
 
-
 ADD_TRANSLATOR (Repeat_acknowledge_engraver,
                /* doc */ "Acknowledge repeated music, and convert the contents of "
                "repeatCommands ainto an appropriate setting for whichBar.",
index 3e1da1936a97543b3a28d9e4bafe0e43c72ca67a..4d7ad3348630919c5223ba4a9ac1d1fd2ca7de1e 100644 (file)
@@ -147,10 +147,9 @@ Rest_collision::do_shift (Grob *me)
 
       Direction d = LEFT;
       do
-       {
-         ordered_rests[d].sort (Note_column::shift_compare);
-       }
-      while (flip (&d) != LEFT);
+       ordered_rests[d].sort (Note_column::shift_compare);
+      while (flip (&d) != LEFT)
+       ;
 
       do
        {
@@ -229,9 +228,7 @@ Rest_collision::do_shift (Grob *me)
 
       Interval notedim;
       for (int i = 0; i < notes.size (); i++)
-       {
-         notedim.unite (notes[i]->extent (common, Y_AXIS));
-       }
+       notedim.unite (notes[i]->extent (common, Y_AXIS));
 
       Real dist
        = minimum_dist + dir * max (notedim[dir] - restdim[-dir], 0.0);
index 6a72d2c4439ae427ee06de0e5a08ee96656a5bad..0a76fcdb245ff121b4e60f8c935d9981d54efd83 100644 (file)
@@ -15,7 +15,6 @@
 #include "rhythmic-head.hh"
 #include "music.hh"
 
-
 class Rest_engraver : public Engraver
 {
   Music *rest_event_;
@@ -48,7 +47,6 @@ Rest_engraver::start_translation_timestep ()
   dot_ = 0;
 }
 
-
 void
 Rest_engraver::process_music ()
 {
index fa9fdb166070cf8cca38f04c07608bd0f1854056..efeb00b41b27a7ffb388abab03789b15ea32f74c 100644 (file)
@@ -28,9 +28,7 @@ Rest::after_line_breaking (SCM smob)
   if (lc % 2)
     {
       if (bt == 0 && lc > 1)
-       {
-         me->translate_axis (ss, Y_AXIS);
-       }
+       me->translate_axis (ss, Y_AXIS);
     }
   else
     {
index 492b94d6ea68d4e9d7b5d84bee78b6355c1dcd88..17dcfa2075f9f5bde4f9a4bedd3876d8c48a6056 100644 (file)
@@ -49,8 +49,8 @@ class Rhythmic_column_engraver : public Engraver
   Grob *last_spacing_;
   Grob *spacing_;
 
-  void add_spacing_item (Grob*);
-  
+  void add_spacing_item (Grob *);
+
   TRANSLATOR_DECLARATIONS (Rhythmic_column_engraver);
 protected:
 
@@ -113,9 +113,7 @@ Rhythmic_column_engraver::process_acknowledged ()
     {
       if (dotcol_
          && !dotcol_->get_parent (X_AXIS))
-       {
-         Note_column::set_dotcol (note_column_, dotcol_);
-       }
+       Note_column::set_dotcol (note_column_, dotcol_);
 
       if (stem_
          && !stem_->get_parent (X_AXIS))
@@ -129,7 +127,7 @@ Rhythmic_column_engraver::process_acknowledged ()
 void
 Rhythmic_column_engraver::acknowledge_stem (Grob_info i)
 {
-  stem_ = i.grob();
+  stem_ = i.grob ();
 }
 
 void
@@ -159,7 +157,6 @@ Rhythmic_column_engraver::stop_translation_timestep ()
   stem_ = 0;
 }
 
-
 ADD_ACKNOWLEDGER (Rhythmic_column_engraver, dot_column);
 ADD_ACKNOWLEDGER (Rhythmic_column_engraver, stem);
 ADD_ACKNOWLEDGER (Rhythmic_column_engraver, rhythmic_head);
index 91a4795bf875668adc8dedda23be14e446e0c143..b68af1d4ee91ad60b611cce3a694213d09628836 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "ly-smobs.icc"
 
-using namespace std; 
+using namespace std;
 
 /*
   Return: number of objects.
index 5fb7d198e1f1a0d7b62faed93099a1693631a358..d8bbe720e88093f5e8824c6f47ef6ca8bfcb883e 100644 (file)
@@ -39,12 +39,11 @@ Score_engraver::derived_mark () const
   Engraver_group_engraver::derived_mark ();
 }
 
-
 void
 Score_engraver::prepare (Moment m)
 {
   (void) m;
-  
+
   precomputed_recurse_over_translators (context (), START_TRANSLATION_TIMESTEP, DOWN);
 }
 
@@ -77,15 +76,15 @@ Score_engraver::initialize ()
     }
 
   pscore_ = new Paper_score (dynamic_cast<Output_def *> (context ()->get_output_def ()));
-  pscore_->unprotect (); 
+  pscore_->unprotect ();
 
   SCM props = updated_grob_properties (context (), ly_symbol2scm ("System"));
 
   Object_key const *sys_key = context ()->get_grob_key ("System");
   pscore_->typeset_system (new System (props, sys_key));
   system_ = pscore_->root_system ();
-  context ()->set_property ("rootSystem",  system_->self_scm ());
-  
+  context ()->set_property ("rootSystem", system_->self_scm ());
+
   Engraver_group_engraver::initialize ();
 }
 
@@ -138,20 +137,17 @@ Score_engraver::get_output ()
   return o->self_scm ();
 }
 
-
 /*
   UGH UGH
- */
+*/
 void
 Score_engraver::forbid_breaks ()
 {
   for (SCM s = simple_trans_list_; scm_is_pair (s); s = scm_cdr (s))
     {
       Translator *tr = unsmob_translator (scm_car (s));
-      if (Paper_column_engraver* pce = dynamic_cast<Paper_column_engraver*> (tr))
-       {
-         pce->forbid_breaks ();
-       }
+      if (Paper_column_engraver *pce = dynamic_cast<Paper_column_engraver *> (tr))
+       pce->forbid_breaks ();
     }
 }
 
@@ -165,15 +161,15 @@ Score_engraver::try_music (Music *m)
 }
 
 ADD_TRANSLATOR_GROUP (Score_engraver,
-               /* doc */ "Top level engraver. Takes care of generating columns and the complete  system (ie. System) "
-               "\n\n "
-               "This engraver decides whether a column is breakable. The default is "
-               "that a column is always breakable. However, when every Bar_engraver "
-               "that does not have a barline at a certain point will call "
-               "Score_engraver::forbid_breaks to stop linebreaks.  In practice, this "
-               "means that you can make a breakpoint by creating a barline (assuming "
-               "that there are no beams or notes that prevent a breakpoint.) ",
-               /* create */ "System PaperColumn NonMusicalPaperColumn",
-               /* accept */ "break-event",
-               /* read */ "currentMusicalColumn currentCommandColumn verticallySpacedContexts",
-               /* write */ "");
+                     /* doc */ "Top level engraver. Takes care of generating columns and the complete  system (ie. System) "
+                     "\n\n "
+                     "This engraver decides whether a column is breakable. The default is "
+                     "that a column is always breakable. However, when every Bar_engraver "
+                     "that does not have a barline at a certain point will call "
+                     "Score_engraver::forbid_breaks to stop linebreaks.  In practice, this "
+                     "means that you can make a breakpoint by creating a barline (assuming "
+                     "that there are no beams or notes that prevent a breakpoint.) ",
+                     /* create */ "System PaperColumn NonMusicalPaperColumn",
+                     /* accept */ "break-event",
+                     /* read */ "currentMusicalColumn currentCommandColumn verticallySpacedContexts",
+                     /* write */ "");
index 9878686c6acd6b5bcd58d25477ede7816c319059..6392a52147e8f5c014af21bb2f66d3508c452422 100644 (file)
 #include "context.hh"
 
 ADD_TRANSLATOR_GROUP (Score_performer,
-               /* doc */ "",
-               /* create */ "",
-               /* accept */ "",
-               /* read */ "",
-               /* write */ "");
+                     /* doc */ "",
+                     /* create */ "",
+                     /* accept */ "",
+                     /* read */ "",
+                     /* write */ "");
 
 Score_performer::Score_performer ()
 {
index df8b920956659a2d6df3b6044ea2d01c89828c0b..ae8d014470ab83c8810bb0e76be5342a21cf7b46 100644 (file)
@@ -13,7 +13,6 @@
 #include "global-context.hh"
 #include "lilypond-key.hh"
 
-
 LY_DEFINE (ly_make_score, "ly:make-score",
           1, 0, 0,
           (SCM music),
@@ -21,7 +20,7 @@ LY_DEFINE (ly_make_score, "ly:make-score",
 {
   Music *mus = unsmob_music (music);
   SCM_ASSERT_TYPE (mus, music, SCM_ARG1, __FUNCTION__, "music");
-  
+
   Score *score = new Score;
   score->set_music (music);
 
@@ -88,7 +87,7 @@ LY_DEFINE (ly_score_process, "ly:score-process",
                   default_header, SCM_ARG3, __FUNCTION__, "\\paper block");
   SCM_ASSERT_TYPE (unsmob_output_def (default_layout),
                   default_header, SCM_ARG4, __FUNCTION__, "\\layout block");
-  
+
   Object_key *key = new Lilypond_general_key (0, score->user_key_, 0);
 
   if (score->error_found_)
@@ -97,7 +96,7 @@ LY_DEFINE (ly_score_process, "ly:score-process",
   SCM header = ly_is_module (score->header_)
     ? score->header_
     : default_header;
-  
+
   for (int i = 0; i < score->defs_.size (); i++)
     default_rendering (score->get_music (), score->defs_[i]->self_scm (),
                       default_paper, header, basename, key->self_scm ());
@@ -114,4 +113,3 @@ LY_DEFINE (ly_score_process, "ly:score-process",
   return SCM_UNSPECIFIED;
 }
 
-
index c3fcf3ae6ff37abaee159eaab4b481ad2e6d0509..75935f57eff3b7009ea8150f991a5a4207f72e73 100644 (file)
@@ -22,7 +22,6 @@
 #include "paper-score.hh"
 #include "warn.hh"
 
-
 #include "music.hh"
 #include "ly-smobs.icc"
 
@@ -76,16 +75,15 @@ Score::Score (Score const &s)
   Music *m = unsmob_music (s.music_);
   if (m)
     {
-      Music *mclone =  m->clone ();
+      Music *mclone = m->clone ();
       music_ = mclone->unprotect ();
     }
   else
     music_ = SCM_EOL;
 
-  
   for (int i = 0, n = s.defs_.size (); i < n; i++)
     {
-      Output_def * copy = s.defs_[i]->clone ();
+      Output_def *copy = s.defs_[i]->clone ();
       defs_.push (copy);
       copy->unprotect ();
     }
@@ -118,18 +116,18 @@ default_rendering (SCM music, SCM outdef,
       def->parent_ = bdef;
 
       scaled_def = def->self_scm ();
-      scaled_bookdef = bdef->self_scm();
+      scaled_bookdef = bdef->self_scm ();
 
-      def->unprotect();
-      bdef->unprotect ();  
+      def->unprotect ();
+      bdef->unprotect ();
     }
 
   SCM context = ly_run_translator (music, scaled_def, key);
 
   SCM output_as_scm = ly_format_output (context);
   Music_output *output = unsmob_music_output (output_as_scm);
-      
-  if (Paper_score *pscore = dynamic_cast<Paper_score*> (output))
+
+  if (Paper_score *pscore = dynamic_cast<Paper_score *> (output))
     {
       /* ugh, this is strange, Paper_book without a Book object. */
       Paper_book *paper_book = new Paper_book ();
@@ -152,7 +150,7 @@ default_rendering (SCM music, SCM outdef,
 }
 
 /*
-  Format score, return list of Music_output objects. 
+  Format score, return list of Music_output objects.
 
   LAYOUTBOOK should be scaled already.
 */
@@ -172,7 +170,7 @@ Score::book_rendering (Output_def *layoutbook,
 
   SCM outputs = SCM_EOL;
   SCM *tail = &outputs;
-  
+
   int outdef_count = defs_.size ();
 
   Object_key *key = new Lilypond_general_key (book_key, user_key_, 0);
@@ -196,9 +194,9 @@ Score::book_rendering (Output_def *layoutbook,
       if (dynamic_cast<Global_context *> (unsmob_context (context)))
        {
          SCM s = ly_format_output (context);
-         
+
          *tail = scm_cons (s, SCM_EOL);
-         tail = SCM_CDRLOC(*tail);
+         tail = SCM_CDRLOC (*tail);
        }
 
       scm_remember_upto_here_1 (scaled);
index 101a3206adf5b4198f25600f7afd907bf91acf83..0b6253c4c7d7f8f72fcc3663fab1f2dc17d265c9 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "translator.icc"
 
-
 /**
    Find potentially colliding scripts, and put them in a
    Script_column, that will fix the collisions.  */
@@ -49,9 +48,7 @@ Script_column_engraver::acknowledge_side_position (Grob_info inf)
     {
       if (!Item::is_breakable (thing)
          && Side_position_interface::get_axis (inf.grob ()) == Y_AXIS)
-       {
-         scripts_.push (thing);
-       }
+       scripts_.push (thing);
     }
 }
 
index 87e6d72023e4bc075a4007bacca7ec9a53fb1809..ff0ebcc9147e39d417bcd2cce41ba8426f2bb369 100644 (file)
@@ -42,10 +42,10 @@ protected:
   void stop_translation_timestep ();
   void process_music ();
 
-  DECLARE_ACKNOWLEDGER ( slur);
-  DECLARE_ACKNOWLEDGER ( rhythmic_head);
-  DECLARE_ACKNOWLEDGER ( stem);
-  DECLARE_ACKNOWLEDGER ( note_column);
+  DECLARE_ACKNOWLEDGER (slur);
+  DECLARE_ACKNOWLEDGER (rhythmic_head);
+  DECLARE_ACKNOWLEDGER (stem);
+  DECLARE_ACKNOWLEDGER (note_column);
 
 public:
   TRANSLATOR_DECLARATIONS (Script_engraver);
@@ -151,8 +151,8 @@ void make_script_from_event (Grob *p, bool *follow, Context *tg,
 void
 Script_engraver::process_music ()
 {
-  for (int i = 0; i < scripts_.size(); i++)
-     {
+  for (int i = 0; i < scripts_.size (); i++)
+    {
       Music *m = scripts_[i].event_;
 
       Grob *p = make_item ("Script", m->self_scm ());
@@ -169,7 +169,6 @@ Script_engraver::process_music ()
     }
 }
 
-
 void
 Script_engraver::acknowledge_stem (Grob_info info)
 {
@@ -190,9 +189,9 @@ Script_engraver::acknowledge_stem (Grob_info info)
 void
 Script_engraver::acknowledge_rhythmic_head (Grob_info info)
 {
-  if(info.music_cause ())
+  if (info.music_cause ())
     {
-     for (int i = 0; i < scripts_.size(); i++)
+      for (int i = 0; i < scripts_.size (); i++)
        {
          Grob *e = scripts_[i].script_;
 
@@ -216,8 +215,8 @@ Script_engraver::acknowledge_note_column (Grob_info info)
 
      As the note head to put it on is not known now, postpone this
      decision to Script_interface::before_line_breaking ().  */
-  
-  for (int i = 0; i < scripts_.size(); i++)
+
+  for (int i = 0; i < scripts_.size (); i++)
     {
       Grob *e = scripts_[i].script_;
 
@@ -226,7 +225,7 @@ Script_engraver::acknowledge_note_column (Grob_info info)
        e->set_parent (info.grob (), X_AXIS);
     }
 }
+
 void
 Script_engraver::acknowledge_slur (Grob_info info)
 {
index d112fa3621c56e1d070484b6b1443039a7d1087b..baf2ea14ae0bd053cc74408e39f14f3e5614c138 100644 (file)
@@ -84,9 +84,9 @@ Separating_group_spanner::set_spacing_rods (SCM smob)
 
   extract_grob_set (me, "elements", elts);
   for (int i = elts.size ();
-       i-- > 1; )
+       i-- > 1;)
     {
-      Item *r = dynamic_cast<Item*> (elts[i]);
+      Item *r = dynamic_cast<Item *> (elts[i]);
       if (!r)
        continue;
 
index b632bdf1b96729e0a96bdf20593339fbdbdb5156..759e8849d84c2f89cb8fee5d6889dbdefc60b74c 100644 (file)
@@ -146,7 +146,7 @@ Separating_line_group_engraver::acknowledge_item (Grob_info i)
        {
          Item *it = make_item ("StaffSpacing", SCM_EOL);
          current_spacings_.staff_spacing_ = it;
-         Pointer_group_interface::add_grob (it,  ly_symbol2scm ("left-items"),
+         Pointer_group_interface::add_grob (it, ly_symbol2scm ("left-items"),
                                             break_item_);
 
          if (int i = last_spacings_.note_spacings_.size ())
@@ -159,7 +159,7 @@ Separating_line_group_engraver::acknowledge_item (Grob_info i)
          else if (last_spacings_.staff_spacing_)
            {
              SCM ri = last_spacings_.staff_spacing_->get_object ("right-items");
-             Grob_array *ga  = unsmob_grob_array (ri);
+             Grob_array *ga = unsmob_grob_array (ri);
              if (!ga)
                {
                  SCM ga_scm = Grob_array::make_array ();
index b990ad61fbcf147aa81c9126b15ef98ee43ac2e8..fce28831cceb44318ea02ee9625074e20799ed56 100644 (file)
@@ -41,7 +41,7 @@ Separation_item::conditional_width (Grob *me, Grob *left)
   extract_grob_set (me, "conditional-elements", elts);
   for (int i = 0; i < elts.size (); i++)
     {
-      Item *il = dynamic_cast<Item*> (elts[i]);
+      Item *il = dynamic_cast<Item *> (elts[i]);
       if (pc != il->get_column ())
        {
          /* this shouldn't happen, but let's continue anyway. */
@@ -50,14 +50,10 @@ Separation_item::conditional_width (Grob *me, Grob *left)
        }
 
       if (to_boolean (il->get_property ("no-spacing-rods")))
-       {
-         continue;
-       }
+       continue;
 
       if (Accidental_placement::has_interface (il))
-       {
-         w.unite (Accidental_placement::get_relevant_accidental_extent (il, pc, left));
-       }
+       w.unite (Accidental_placement::get_relevant_accidental_extent (il, pc, left));
     }
 
   SCM pad = me->get_property ("padding");
@@ -82,7 +78,7 @@ Separation_item::width (Grob *me)
   extract_grob_set (me, "elements", elts);
   for (int i = 0; i < elts.size (); i++)
     {
-      Item *il = dynamic_cast<Item*> (elts[i]);
+      Item *il = dynamic_cast<Item *> (elts[i]);
       if (pc != il->get_column ())
        {
          /* this shouldn't happen, but let's continue anyway. */
@@ -91,15 +87,11 @@ Separation_item::width (Grob *me)
        }
 
       if (to_boolean (il->get_property ("no-spacing-rods")))
-       {
-         continue;
-       }
+       continue;
 
       Interval iv (il->extent (pc, X_AXIS));
       if (!iv.is_empty ())
-       {
-         w.unite (iv);
-       }
+       w.unite (iv);
     }
 
   SCM pad = me->get_property ("padding");
@@ -131,9 +123,9 @@ Separation_item::extremal_break_aligned_grob (Grob *me,
   Grob *col = dynamic_cast<Item *> (me)->get_column ();
   last_ext->set_empty ();
   Grob *last_grob = 0;
-  
+
   extract_grob_set (me, "elements", elts);
-  for (int i = elts.size (); i--; )
+  for (int i = elts.size (); i--;)
     {
       Grob *break_item = elts[i];
       if (!scm_is_symbol (break_item->get_property ("break-align-symbol")))
index 0801a4f76b0f321663e6e44009a980af7c5df305..a4dc76cf8e3b0880bae22d5f36f9cbdc399c55f3 100644 (file)
@@ -11,7 +11,6 @@
 #include <math.h>              // ceil.
 #include <algorithm>
 
-
 #include "note-head.hh"
 #include "warn.hh"
 #include "warn.hh"
@@ -268,5 +267,4 @@ ADD_INTERFACE (Side_position_interface, "side-position-interface",
               "side-relative-direction "
               "side-support-elements "
               "slur-padding "
-              "staff-padding "
-              );
+              "staff-padding ");
index 9138e4544a7d0e5a3bdc2783f6572887a09afeb4..10758ff5bb0a09084a0d0b3922a080ca7a148b28 100644 (file)
@@ -364,7 +364,7 @@ Simple_spacer::add_spring (Real ideal, Real inverse_hooke)
       /*
        desc.is_active_ ?
       */
-      desc.block_force_ = - desc.ideal_ / desc.inverse_hooke_;
+      desc.block_force_ = -desc.ideal_ / desc.inverse_hooke_;
       // block at distance 0
 
       active_count_++;
@@ -383,9 +383,9 @@ void
 Simple_spacer_wrapper::add_columns (Link_array<Grob> const &icols)
 {
   Link_array<Grob> cols (icols);
-  cols.clear();
-  
-  for (int i = 0;  i < icols.size (); i++)
+  cols.clear ();
+
+  for (int i = 0; i < icols.size (); i++)
     if (scm_is_pair (icols[i]->get_object ("between-cols")))
       {
        loose_cols_.push (icols[i]);
@@ -394,7 +394,7 @@ Simple_spacer_wrapper::add_columns (Link_array<Grob> const &icols)
       {
        cols.push (icols[i]);
       }
-  
+
   spaced_cols_ = cols;
   for (int i = 0; i < cols.size () - 1; i++)
     {
@@ -428,9 +428,7 @@ Simple_spacer_wrapper::add_columns (Link_array<Grob> const &icols)
          Grob *other = unsmob_grob (scm_caar (s));
          int j = binsearch_links (cols, other, &compare_paper_column_rank);
          if (j >= 0 && cols[j] == other)
-           {
-             spacer_->add_rod (i, j, scm_to_double (scm_cdar (s)));
-           }
+           spacer_->add_rod (i, j, scm_to_double (scm_cdar (s)));
        }
 
       if (i
index 2d7c66c03119a54724d2938a17dfb90a32df3cc0..7c60c4f690a4458e9533b70c8b2d38ac7bccbb62 100644 (file)
@@ -67,9 +67,7 @@ Simultaneous_music_iterator::construct_children ()
          tail = SCM_CDRLOC (*tail);
        }
       else
-       {
-         mi->quit ();
-       }
+       mi->quit ();
     }
 }
 
@@ -82,18 +80,14 @@ Simultaneous_music_iterator::process (Moment until)
       Music_iterator *i = unsmob_iterator (scm_car (*proc));
       if (i->run_always ()
          || i->pending_moment () == until)
-       {
-         i->process (until);
-       }
+       i->process (until);
       if (!i->ok ())
        {
          i->quit ();
          *proc = scm_cdr (*proc);
        }
       else
-       {
-         proc = SCM_CDRLOC (*proc);
-       }
+       proc = SCM_CDRLOC (*proc);
     }
 }
 
index 455ebb2b9b5c9897c93f8effeb5a5968d3dd3328..41aaa19039fa9a97eac3f76562e5e83bfca313a4 100644 (file)
@@ -158,13 +158,9 @@ skyline_meshing_distance (Array<Skyline_entry> const &buildings,
        distance = max (distance, (buildings[i].height_ - clouds[j].height_));
 
       if (i > 0 && buildings[i].width_[LEFT] >= clouds[j].width_[LEFT])
-       {
-         i--;
-       }
+       i--;
       else if (j > 0 && buildings[i].width_[LEFT] <= clouds[j].width_[LEFT])
-       {
-         j--;
-       }
+       j--;
     }
 
   return distance;
index 014843619a35612833e1e6039abf35e982d2d69f..01099b1f7b7c739955dbf9c1d34870031ee00f60 100644 (file)
@@ -75,9 +75,7 @@ Slash_repeat_engraver::try_music (Music *m)
       Moment meas_length
        = robust_scm2moment (get_property ("measureLength"), Moment (0));
       if (body_length_ < meas_length)
-       {
-         repeat_ = m;
-       }
+       repeat_ = m;
       else
        return false;
 
@@ -113,7 +111,6 @@ Slash_repeat_engraver::start_translation_timestep ()
   beat_slash_ = 0;
 }
 
-
 #include "translator.icc"
 
 ADD_TRANSLATOR (Slash_repeat_engraver,
index 0cc546582bb8e7a0fdee92637d13e89bd5449d6a..937a4fb02a7ea982c3af96bcda45c262080969e1 100644 (file)
@@ -87,9 +87,7 @@ fit_factor (Offset dz_unit, Offset dz_perp,
 
       Real y = curve.get_other_coordinate (X_AXIS, p[X_AXIS]);
       if (y)
-       {
-         fit_factor = max (fit_factor, (p[Y_AXIS] / y));
-       }
+       fit_factor = max (fit_factor, (p[Y_AXIS] / y));
     }
   return fit_factor;
 }
@@ -97,8 +95,7 @@ fit_factor (Offset dz_unit, Offset dz_perp,
 void
 Slur_configuration::generate_curve (Slur_score_state const &state,
                                    Real r_0, Real h_inf,
-                                   Array<Offset> const &avoid
-                                   )
+                                   Array<Offset> const &avoid)
 {
   Offset dz = attachment_[RIGHT]- attachment_[LEFT];;
   Offset dz_unit = dz;
@@ -286,7 +283,7 @@ Slur_configuration::score_encompass (Slur_score_state const &state)
       variance_penalty = state.parameters_.head_slur_distance_max_ratio_;
       if (min_dist > 0.0)
        variance_penalty
-         = min ((avg_distance / (min_dist + state.parameters_.absolute_closeness_measure_) - 1.0),  variance_penalty);
+         = min ((avg_distance / (min_dist + state.parameters_.absolute_closeness_measure_) - 1.0), variance_penalty);
 
       variance_penalty = max (variance_penalty, 0.0);
       variance_penalty *= state.parameters_.head_slur_distance_factor_;
index cb707e300d0d61cf58fc9092cb08bbfceebc9dad..2b9f9d7ddc5350728e2cadc54cd41d15170e7e27 100644 (file)
@@ -205,13 +205,13 @@ Slur_engraver::stop_translation_timestep ()
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Slur_engraver,accidental);
-ADD_ACKNOWLEDGER (Slur_engraver,dynamic_line_spanner);
-ADD_ACKNOWLEDGER (Slur_engraver,fingering)
-ADD_ACKNOWLEDGER (Slur_engraver,note_column);
-ADD_ACKNOWLEDGER (Slur_engraver,script);
-ADD_ACKNOWLEDGER (Slur_engraver,text_script);
-ADD_ACKNOWLEDGER (Slur_engraver,tie);
+ADD_ACKNOWLEDGER (Slur_engraver, accidental);
+ADD_ACKNOWLEDGER (Slur_engraver, dynamic_line_spanner);
+ADD_ACKNOWLEDGER (Slur_engraver, fingering)
+  ADD_ACKNOWLEDGER (Slur_engraver, note_column);
+ADD_ACKNOWLEDGER (Slur_engraver, script);
+ADD_ACKNOWLEDGER (Slur_engraver, text_script);
+ADD_ACKNOWLEDGER (Slur_engraver, tie);
 ADD_TRANSLATOR (Slur_engraver,
                /* doc */ "Build slur grobs from slur events",
                /* create */ "Slur",
index babb66ec6291515c102b337343de48a9caf86292..b51dc555569d56173e62413202c6b1518ddf4c6d 100644 (file)
@@ -77,13 +77,9 @@ Slur_performer::try_music (Music *m)
       Direction d = to_dir (m->get_property ("span-direction"));
 
       if (d == START)
-       {
-         start_ev_ = m;
-       }
+       start_ev_ = m;
       else if (d == STOP)
-       {
-         now_stop_ev_ = m;
-       }
+       now_stop_ev_ = m;
       return true;
     }
   return false;
index d25b72a35ef792ee904de738eb0bf1edeecc65ec..2595521ed0e4b25629cc63be81082e65a600c96f 100644 (file)
@@ -249,19 +249,17 @@ Slur_score_state::get_bound_info () const
                    do not issue warning. This happens for rests and
                    whole notes.
                  */
-                 s = Interval (0,0)
+                 s = Interval (0, 0)
                    + extremes[d].stem_->relative_coordinate (common_[ax], ax);
                }
-             extremes[d].stem_extent_[ax] = s; 
+             extremes[d].stem_extent_[ax] = s;
            }
-         
+
          extremes[d].slur_head_
            = Stem::extremal_heads (extremes[d].stem_)[dir];
          if (!extremes[d].slur_head_
              && Note_column::has_rests (extremes[d].bound_))
-           {
-             extremes[d].slur_head_ = Note_column::get_rest (extremes[d].bound_);
-           }
+           extremes[d].slur_head_ = Note_column::get_rest (extremes[d].bound_);
 
          if (extremes[d].slur_head_)
            extremes[d].slur_head_extent_
@@ -416,9 +414,7 @@ Slur_score_state::get_best_curve ()
 #endif
     {
       for (int i = 0; i < configurations_.size (); i++)
-       {
-         configurations_[i]->score (*this);
-       }
+       configurations_[i]->score (*this);
       for (int i = 0; i < configurations_.size (); i++)
        {
          if (configurations_[i]->score_ < opt)
@@ -554,13 +550,9 @@ Slur_score_state::get_base_attachments () const
        {
          Real x, y;
          if (d == RIGHT)
-           {
-             x = extremes_[d].bound_->extent (common_[X_AXIS], X_AXIS)[d];
-           }
+           x = extremes_[d].bound_->extent (common_[X_AXIS], X_AXIS)[d];
          else
-           {
-             x = slur_->get_broken_left_end_align ();
-           }
+           x = slur_->get_broken_left_end_align ();
          Grob *col = (d == LEFT) ? columns_[0] : columns_.top ();
 
          if (extremes_[-d].bound_ != col)
@@ -583,7 +575,6 @@ Slur_score_state::get_base_attachments () const
     }
   while (flip (&d) != LEFT);
 
-
   do
     {
       for (int a = X_AXIS; a < NO_AXES; a++)
@@ -595,12 +586,10 @@ Slur_score_state::get_base_attachments () const
              programming_error ("slur attachment is inf/nan");
              b = 0.0;
            }
-           
        }
     }
   while (flip (&d) != LEFT);
-  
-  
+
   return base_attachment;
 }
 
@@ -608,13 +597,13 @@ Real
 Slur_score_state::move_away_from_staffline (Real y,
                                            Grob *on_staff) const
 {
-  Grob * staff_symbol = Staff_symbol_referencer::get_staff_symbol (on_staff);
+  Grob *staff_symbol = Staff_symbol_referencer::get_staff_symbol (on_staff);
   if (!staff_symbol)
     return y;
-  
+
   Real pos
     = (y - staff_symbol->relative_coordinate (common_[Y_AXIS],
-                                                                                     Y_AXIS))
+                                             Y_AXIS))
     * 2.0 / staff_space_;
 
   if (fabs (pos - my_round (pos)) < 0.2
@@ -626,7 +615,6 @@ Slur_score_state::move_away_from_staffline (Real y,
 }
 
 
-
 Array<Offset>
 Slur_score_state::generate_avoid_offsets () const
 {
@@ -644,7 +632,7 @@ Slur_score_state::generate_avoid_offsets () const
 
       avoid.push (Offset (inf.x_, y + dir_ * parameters_.free_head_distance_));
     }
-  
+
   extract_grob_set (slur_, "encompass-objects", extra_encompasses);
   for (int i = 0; i < extra_encompasses.size (); i++)
     if (Slur::has_interface (extra_encompasses[i]))
@@ -669,7 +657,7 @@ Slur_score_state::generate_curves () const
   Real r_0 = robust_scm2double (slur_->get_property ("ratio"), 0.33);
   Real h_inf = staff_space_ * scm_to_double (slur_->get_property ("height-limit"));
 
-  Array<Offset> avoid = generate_avoid_offsets (); 
+  Array<Offset> avoid = generate_avoid_offsets ();
   for (int i = 0; i < configurations_.size (); i++)
     configurations_[i]->generate_curve (*this, r_0, h_inf, avoid);
 }
index 11b340ff5f09e39e52391de97a6a1495f16bf43f..9956bea2316de0af0923038725b78e58176c33fa 100644 (file)
@@ -217,7 +217,6 @@ Slur::outside_slur_callback (SCM grob, SCM axis)
   return scm_from_double (offset);
 }
 
-
 MAKE_SCHEME_CALLBACK (Slur, after_line_breaking, 1);
 SCM
 Slur::after_line_breaking (SCM smob)
index 63d36f23a57db8afd4fd42af4383da306ead9693..e2ec5d5638124b947cd9cf0c936ebe1e86dff775 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "smobs.hh"
 static SCM smob_protection_list;
 
 void
-init_smob_protection()
+init_smob_protection ()
 {
   smob_protection_list = scm_cons (SCM_UNDEFINED, SCM_EOL);
   scm_permanent_object (smob_protection_list);
 }
-ADD_SCM_INIT_FUNC(init_smob_protection, init_smob_protection);
+ADD_SCM_INIT_FUNC (init_smob_protection, init_smob_protection);
 
 void
 protect_smob (SCM smob, SCM *prot_cons)
@@ -49,9 +48,7 @@ unprotect_smob (SCM *prot_cons)
       while (scm_is_pair (next)
             && scm_car (next) == SCM_UNDEFINED)
 
-       {
-         next = scm_cdr (next);
-       }
+       next = scm_cdr (next);
 
       scm_set_cdr_x (*prot_cons, next);
     }
index dee8a9e3c53c19af1e053ab8a541101492929be0..fe152dc226d21d031b0e311ee47afca95277e184 100644 (file)
@@ -146,16 +146,15 @@ Source_file::file_line_column_string (char const *context_str0) const
     {
       int l, ch, col;
       get_counts (context_str0, &l, &ch, &col);
-      
+
       return name_string () + ":" + to_string (l)
        + ":" + to_string (col);
     }
 }
 
 
-
 String
-Source_file::quote_input (char constpos_str0) const
+Source_file::quote_input (char const *pos_str0) const
 {
   if (!contains (pos_str0))
     return " (" + _ ("position unknown") + ")";
@@ -224,7 +223,6 @@ Source_file::line_string (char const* pos_str0) const
   return String ((Byte const *)data_str0 + line[LEFT], line.length ());
 }
 
-
 void
 Source_file::get_counts (char const *pos_str0,
                         int *line_number,
@@ -235,18 +233,18 @@ Source_file::get_counts (char const *pos_str0,
     return;
 
   *line_number = get_line (pos_str0);
-  
+
   Slice line = line_slice (pos_str0);
   char const *data = to_str0 ();
   Byte const *line_start = (Byte const *)data + line[LEFT];
 
-  int left = (Byte const*) pos_str0 -  line_start;
+  int left = (Byte const *) pos_str0 - line_start;
   String line_begin (line_start, left);
-  char const *line_chars = line_begin.to_str0();
-  
+  char const *line_chars = line_begin.to_str0 ();
+
   *column = 0;
   *line_char = 0;
-  
+
   mbstate_t state;
 
   /* Initialize the state.  */
@@ -260,13 +258,13 @@ Source_file::get_counts (char const *pos_str0,
        FIXME, this is apparently locale dependent.
       */
       size_t thislen = mbrtowc (multibyte, line_chars, left, &state);
-      
+
       /* Stop converting at invalid character;
         this can mean we have read just the first part
         of a valid character.  */
       if (thislen == (size_t) -1)
        break;
-      
+
       /* We want to handle embedded NUL bytes
         but the return value is 0.  Correct this.  */
       if (thislen == 0)
@@ -285,31 +283,31 @@ Source_file::get_counts (char const *pos_str0,
 }
 
 bool
-Source_file::contains (char constpos_str0) const
+Source_file::contains (char const *pos_str0) const
 {
   return (pos_str0 && (pos_str0 >= to_str0 ()) && (pos_str0 <= to_str0 () + length ()));
 }
 
 int
-Source_file::get_line (char constpos_str0) const
+Source_file::get_line (char const *pos_str0) const
 {
   if (!contains (pos_str0))
     return 0;
 
   if (!newline_locations_.size ())
     return 1;
-  
+
   int lo = 0;
   int hi = newline_locations_.size ();
 
   if (newline_locations_[lo] > pos_str0)
     return 1;
-  
-  if (newline_locations_[hi-1] < pos_str0)
+
+  if (newline_locations_[hi - 1] < pos_str0)
     return hi;
-  
+
   binary_search_bounds (newline_locations_,
-                       pos_str0, 
+                       pos_str0,
                        Link_array<char>::default_compare,
                        &lo, &hi);
 
@@ -376,5 +374,5 @@ Source_file::get_string (int n)
 SCM
 Source_file::get_port () const
 {
-  return str_port_; 
+  return str_port_;
 }
index 79b4173efd91036eadc6b9c479d3caa3990b6dfb..f3a48914837853d155e8338cf3cfd7d10ae39cb5 100644 (file)
@@ -31,7 +31,7 @@ Spaceable_grob::add_rod (Grob *me, Grob *p, Real d)
   //  printf ("rod %lf\n", d);
   if (d < 0)
     return;
-  
+
   if (isinf (d))
     programming_error ("infinite rod");
 
@@ -52,7 +52,7 @@ Spaceable_grob::add_rod (Grob *me, Grob *p, Real d)
     {
       programming_error ("Adding reverse rod");
     }
-  
+
   mins = scm_cons (scm_cons (p->self_scm (), newdist), mins);
   me->set_object ("minimum-distances", mins);
 }
@@ -114,7 +114,6 @@ Spaceable_grob::get_spring (Grob *me, Grob *other, Real *dist, Real *inv_strengt
     }
 }
 
-
 void
 Spaceable_grob::remove_interface (Grob *me)
 {
index 49453e8494b6486f7b4a8100b3ec63f0221a9fd5..f5753f948a383c77071eefb9423a81722a5e9510 100644 (file)
@@ -1,10 +1,9 @@
 /*
   spacing-basic.cc -- implement Spacing_spanner, simplistic spacing routines
-  
+
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "spacing-spanner.hh"
 #include "warn.hh"
 
 /*
-   LilyPond spaces by taking a simple-minded spacing algorithm, and
-   adding subtle adjustments to that. This file does the simple-minded
-   spacing routines.
+  LilyPond spaces by taking a simple-minded spacing algorithm, and
+  adding subtle adjustments to that. This file does the simple-minded
+  spacing routines.
 */
 
-
 /*
-   Get the measure wide ant for arithmetic spacing.
+  Get the measure wide ant for arithmetic spacing.
 */
 Real
 Spacing_options::get_duration_space (Moment d,
@@ -67,7 +65,6 @@ Spacing_options::get_duration_space (Moment d,
     }
 }
 
-
 /*
   The one-size-fits all spacing. It doesn't take into account
   different spacing wishes from one to the next column.
@@ -129,7 +126,7 @@ Spacing_spanner::standard_breakable_column_spacing (Grob *me, Item *l, Item *r,
 
 Real
 Spacing_spanner::note_spacing (Grob *me, Grob *lc, Grob *rc,
-                              Spacing_options const *options ,
+                              Spacing_options const *options,
                               bool *expand_only)
 {
   Moment shortest_playing_len = 0;
@@ -173,7 +170,7 @@ Spacing_spanner::note_spacing (Grob *me, Grob *lc, Grob *rc,
   if (delta_t.main_part_ && !lwhen.grace_part_)
     {
       dist = options->get_duration_space (shortest_playing_len,
-                                 expand_only);
+                                         expand_only);
       dist *= double (delta_t.main_part_ / shortest_playing_len.main_part_);
     }
   else if (delta_t.grace_part_)
@@ -194,7 +191,6 @@ Spacing_spanner::note_spacing (Grob *me, Grob *lc, Grob *rc,
   return dist;
 }
 
-
 /****************************************************************/
 
 void
@@ -209,7 +205,6 @@ Spacing_options::init_from_grob (Grob *me)
   shortest_duration_space_ = robust_scm2double (me->get_property ("shortest-duration-space"), 1);
 }
 
-
 void
 Spacing_options::init ()
 {
@@ -219,5 +214,5 @@ Spacing_options::init ()
   float_nonmusical_columns_ = false;
   shortest_duration_space_ = 2.0;
 
-  global_shortest_ = Rational (1,8);
+  global_shortest_ = Rational (1, 8);
 }
index f406425c3db82557387612f6ffeebafcf704ec4a..2565d61adbfa398865bc82ccc96d6d5178bccea0 100644 (file)
@@ -5,7 +5,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "staff-spacing.hh"
@@ -40,10 +39,10 @@ is_loose_column (Grob *l, Grob *c, Grob *r, Spacing_options const *options)
   if (Paper_column::is_musical (c)
       || Item::is_breakable (c))
     return false;
-      
+
   extract_grob_set (c, "right-neighbors", rns);
   extract_grob_set (c, "left-neighbors", lns);
-  
+
   /*
     If this column doesn't have a proper neighbor, we should really
     make it loose, but spacing it correctly is more than we can
@@ -101,13 +100,13 @@ is_loose_column (Grob *l, Grob *c, Grob *r, Spacing_options const *options)
     in any case, we don't want to move bar lines.
   */
   extract_grob_set (c, "elements", elts);
-  for (int i = elts.size (); i--; )
+  for (int i = elts.size (); i--;)
     {
       Grob *g = elts[i];
       if (g && Break_align_interface::has_interface (g))
        {
          extract_grob_set (g, "elements", gelts);
-         for (int j = gelts.size (); j--; )
+         for (int j = gelts.size (); j--;)
            {
              Grob *h = gelts[j];
 
@@ -133,23 +132,22 @@ Spacing_spanner::prune_loose_columns (Grob *me, Link_array<Grob> *cols,
                                      Spacing_options const *options)
 {
   Link_array<Grob> newcols;
-  
+
   for (int i = 0; i < cols->size (); i++)
     {
       Grob *c = cols->elem (i);
 
-      bool loose = (i > 0 && i < cols->size()-1)
+      bool loose = (i > 0 && i < cols->size () - 1)
        && is_loose_column (cols->elem (i - 1), c, cols->elem (i + 1), options);
-       
-      
+
       if (loose)
        {
          extract_grob_set (c, "right-neighbors", rns_arr);
          extract_grob_set (c, "left-neighbors", lns_arr);
-         
-         SCM lns = lns_arr.size () ? lns_arr.top()->self_scm () : SCM_BOOL_F;
-         SCM rns = rns_arr.size () ? rns_arr.top()->self_scm () : SCM_BOOL_F;
-         
+
+         SCM lns = lns_arr.size () ? lns_arr.top ()->self_scm () : SCM_BOOL_F;
+         SCM rns = rns_arr.size () ? rns_arr.top ()->self_scm () : SCM_BOOL_F;
+
          /*
            Either object can be non existent, if the score ends
            prematurely.
@@ -175,7 +173,7 @@ Spacing_spanner::prune_loose_columns (Grob *me, Link_array<Grob> *cols,
              Item *rc = dynamic_cast<Item *> (d == LEFT ? c : next_door[RIGHT]);
 
              extract_grob_set (lc, "spacing-wishes", wishes);
-             for (int k = wishes.size(); k--;)
+             for (int k = wishes.size (); k--;)
                {
                  Grob *sp = wishes[k];
                  if (Note_spacing::left_column (sp) != lc
@@ -224,9 +222,7 @@ Spacing_spanner::prune_loose_columns (Grob *me, Link_array<Grob> *cols,
          r.add_to_cols ();
        }
       else
-       {
-         newcols.push (c);
-       }
+       newcols.push (c);
     }
 
   *cols = newcols;
@@ -245,9 +241,9 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array<Grob> const &cols)
       int min_rank = 100000;   // inf.
 
       extract_grob_set (cols[i], "spacing-wishes", wishes);
-      for (int k = wishes.size(); k--;)
+      for (int k = wishes.size (); k--;)
        {
-         Item *wish = dynamic_cast<Item *> ( wishes[k]);
+         Item *wish = dynamic_cast<Item *> (wishes[k]);
 
          Item *lc = wish->get_column ();
          Grob *right = Note_spacing::right_column (wish);
@@ -280,13 +276,13 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array<Grob> const &cols)
          extract_grob_set (rc, "left-neighbors", lns_arr);
          if (lns_arr.size ())
            {
-             Item *it = dynamic_cast<Item *> (lns_arr.top());
+             Item *it = dynamic_cast<Item *> (lns_arr.top ());
              maxrank = Paper_column::get_rank (it->get_column ());
            }
 
          if (left_rank >= maxrank)
            {
-             
+
              if (left_rank > maxrank)
                {
                  Grob_array *ga = unsmob_grob_array (rc->get_object ("left-neighbors"));
@@ -324,19 +320,19 @@ Spacing_spanner::set_implicit_neighbor_columns (Link_array<Grob> const &cols)
        sloppy with typing left/right-neighbors should take list, but paper-column found instead.
       */
       extract_grob_set (cols[i], "left-neighbors", lns);
-      if (lns.is_empty () && i )
+      if (lns.is_empty () && i)
        {
-         SCM ga_scm = Grob_array::make_array();
+         SCM ga_scm = Grob_array::make_array ();
          Grob_array *ga = unsmob_grob_array (ga_scm);
-         ga->add (cols[i-1]);
+         ga->add (cols[i - 1]);
          cols[i]->set_object ("left-neighbors", ga_scm);
        }
       extract_grob_set (cols[i], "right-neighbors", rns);
       if (rns.is_empty () && i < cols.size () - 1)
        {
-         SCM ga_scm = Grob_array::make_array();
+         SCM ga_scm = Grob_array::make_array ();
          Grob_array *ga = unsmob_grob_array (ga_scm);
-         ga->add (cols[i+1]);
+         ga->add (cols[i + 1]);
          cols[i]->set_object ("right-neighbors", ga_scm);
        }
     }
index c29a904c027c1abfc05342960992a93970c87635..3dee97aad9060b3f21afd625b56be9d9f595e6c2 100644 (file)
@@ -32,13 +32,12 @@ struct Rhythmic_tuple
   static int time_compare (Rhythmic_tuple const &, Rhythmic_tuple const &);
 };
 
-
 /*
   TODO: allow starting & stopping of spacing regions.
- */
+*/
 /*
-   Acknowledge rhythmic elements, for initializing spacing fields in
-   the columns.
+  Acknowledge rhythmic elements, for initializing spacing fields in
+  the columns.
 */
 class Spacing_engraver : public Engraver
 {
@@ -49,12 +48,12 @@ class Spacing_engraver : public Engraver
   Spanner *spacing_;
 
   TRANSLATOR_DECLARATIONS (Spacing_engraver);
-  
+
 protected:
   DECLARE_ACKNOWLEDGER (staff_spacing);
   DECLARE_ACKNOWLEDGER (note_spacing);
   DECLARE_ACKNOWLEDGER (rhythmic_head);
-  
+
   void start_translation_timestep ();
   void stop_translation_timestep ();
   void process_music ();
@@ -112,7 +111,7 @@ Spacing_engraver::acknowledge_staff_spacing (Grob_info i)
 {
   Pointer_group_interface::add_grob (spacing_, ly_symbol2scm ("wishes"), i.grob ());
 }
-  
+
 void
 Spacing_engraver::acknowledge_rhythmic_head (Grob_info i)
 {
@@ -140,15 +139,15 @@ Spacing_engraver::stop_translation_timestep ()
 {
   Paper_column *musical_column
     = dynamic_cast<Paper_column *> (unsmob_grob (get_property ("currentMusicalColumn")));
-  
+
   SCM proportional = get_property ("proportionalNotationDuration");
   if (unsmob_moment (proportional))
     {
       musical_column->set_property ("shortest-playing-duration", proportional);
       musical_column->set_property ("shortest-starter-duration", proportional);
-      return; 
+      return;
     }
-  
+
   Moment shortest_playing;
   shortest_playing.set_infinite (1);
   for (int i = 0; i < playing_durations_.size (); i++)
@@ -176,7 +175,6 @@ Spacing_engraver::stop_translation_timestep ()
 
   shortest_playing = min (shortest_playing, starter);
 
   assert (starter.to_bool ());
   SCM sh = shortest_playing.smobbed_copy ();
   SCM st = starter.smobbed_copy ();
@@ -199,7 +197,7 @@ Spacing_engraver::start_translation_timestep ()
 ADD_ACKNOWLEDGER (Spacing_engraver, staff_spacing);
 ADD_ACKNOWLEDGER (Spacing_engraver, note_spacing);
 ADD_ACKNOWLEDGER (Spacing_engraver, rhythmic_head);
-  
+
 ADD_TRANSLATOR (Spacing_engraver,
                "make a SpacingSpanner and do "
                "bookkeeping of shortest starting and playing notes  ",
index 90e573667765134d5dfc1e7ceb786c7cbf493db9..d27214c86ec760374b520af207185d07be5037aa 100644 (file)
@@ -6,7 +6,6 @@
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
-
 #include "system.hh"
 #include "paper-column.hh"
 #include "column-x-positions.hh"
@@ -24,7 +23,7 @@ set_loose_columns (System *which, Column_x_positions const *posns)
 {
   int loose_col_count = posns->loose_cols_.size ();
   if (!loose_col_count)
-    return; 
+    return;
 
   Real default_padding = 1.0;
   for (int i = 0; i < loose_col_count; i++)
@@ -60,7 +59,7 @@ set_loose_columns (System *which, Column_x_positions const *posns)
 
              clique.push (left);
            }
-         
+
          clique.push (loose);
 
          divide_over++;
@@ -73,9 +72,9 @@ set_loose_columns (System *which, Column_x_positions const *posns)
       clique.push (right);
 
       Grob *common = right->common_refpoint (left, X_AXIS);
-      Item *finished_right_column = clique.top();
-      
-      for (int j = clique.size() - 2; j > 0; j--)
+      Item *finished_right_column = clique.top ();
+
+      for (int j = clique.size () - 2; j > 0; j--)
        {
          int count = 0;
          Real total_space = 0.0;
@@ -89,9 +88,7 @@ set_loose_columns (System *which, Column_x_positions const *posns)
              Real fixed = 0.0;
 
              if (Staff_spacing::has_interface (spacing))
-               {
-                 Staff_spacing::get_spacing_params (spacing, &space, &fixed);
-               }
+               Staff_spacing::get_spacing_params (spacing, &space, &fixed);
              else if (Note_spacing::has_interface (spacing))
                {
                  Spacing_options options;
@@ -106,10 +103,8 @@ set_loose_columns (System *which, Column_x_positions const *posns)
                                             &space, &fixed);
                }
              else
-               {
-                 continue;
-               }
-         
+               continue;
+
              count++;
 
              total_space += space;
@@ -117,7 +112,7 @@ set_loose_columns (System *which, Column_x_positions const *posns)
            }
 
          Real distance_to_next = 0.0;
-         Real right_point = 0.0;  
+         Real right_point = 0.0;
          if (count)
            {
              total_space /= count;
@@ -135,7 +130,7 @@ set_loose_columns (System *which, Column_x_positions const *posns)
            }
 
          Real my_offset = right_point - distance_to_next;
-         
+
          col->system_ = which;
          col->translate_axis (my_offset - col->relative_coordinate (common, X_AXIS), X_AXIS);
 
@@ -144,4 +139,3 @@ set_loose_columns (System *which, Column_x_positions const *posns)
     }
 }
 
-
index 861522122eb5d7f75b7dd9da975b7da7b73ff290..2992c88593e7e397864e212c5356e990f168abcd 100644 (file)
@@ -24,7 +24,6 @@
 #include "spacing-interface.hh"
 
 
-
 Rational
 Spacing_spanner::effective_shortest_duration (Grob *me, Link_array<Grob> const &all)
 {
@@ -44,7 +43,6 @@ Spacing_spanner::effective_shortest_duration (Grob *me, Link_array<Grob> const &
   return global_shortest;
 }
 
-
 MAKE_SCHEME_CALLBACK (Spacing_spanner, set_springs, 1);
 SCM
 Spacing_spanner::set_springs (SCM smob)
@@ -61,7 +59,7 @@ Spacing_spanner::set_springs (SCM smob)
   Spacing_options options;
   options.init_from_grob (me);
   options.global_shortest_ = effective_shortest_duration (me, all);
-  
+
   prune_loose_columns (me, &all, &options);
   set_implicit_neighbor_columns (all);
   generate_springs (me, all, &options);
@@ -170,14 +168,12 @@ Spacing_spanner::generate_pair_spacing (Grob *me,
   if (Paper_column::is_musical (left_col))
     {
       bool skip_unbroken_right = false;
-      
+
       if (!Paper_column::is_musical (right_col)
          && options->float_nonmusical_columns_
          && after_right_col
          && Paper_column::is_musical (after_right_col))
-       {
-         skip_unbroken_right = true;
-       }
+       skip_unbroken_right = true;
 
       if (skip_unbroken_right)
        {
@@ -190,7 +186,6 @@ Spacing_spanner::generate_pair_spacing (Grob *me,
        }
       else
        musical_column_spacing (me, left_col, right_col, options);
-      
 
       if (Item *rb = right_col->find_prebroken_piece (LEFT))
        musical_column_spacing (me, left_col, rb, options);
@@ -207,7 +202,7 @@ Spacing_spanner::generate_pair_spacing (Grob *me,
 
       if (left_col && right_col)
        breakable_column_spacing (me, left_col, right_col, options);
-         
+
       if (lb && right_col)
        breakable_column_spacing (me, lb, right_col, options);
 
@@ -249,7 +244,7 @@ Spacing_spanner::musical_column_spacing (Grob *me,
 {
   bool expand_only = false;
   Real base_note_space = note_spacing (me, left_col, right_col, options, &expand_only);
-  
+
   Real compound_note_space = 0.0;
   Real compound_fixed_note_space = 0.0;
 
@@ -323,7 +318,7 @@ Spacing_spanner::musical_column_spacing (Grob *me,
       compound_fixed_note_space = min (compound_fixed_note_space,
                                       compound_note_space);
     }
-  
+
   Real inverse_strength = 1.0;
   Real distance = 1.0;
 
@@ -422,7 +417,7 @@ Spacing_spanner::breakable_column_spacing (Grob *me, Item *l, Item *r,
     {
       compound_fixed = 0.0;
     }
-  
+
   assert (!isinf (compound_space));
   compound_space = max (compound_space, compound_fixed);
 
@@ -449,11 +444,10 @@ ADD_INTERFACE (Spacing_spanner, "spacing-spanner-interface",
               "gets 2 note heads width (i.e. the space following a note is 1 note\n"
               "head width) A 16th note is followed by 0.5 note head width. The\n"
               "quarter note is followed by  3 NHW, the half by 4 NHW, etc.\n",
-              
+
               "grace-space-factor spacing-increment base-shortest-duration strict-note-spacing "
               "shortest-duration-space common-shortest-duration uniform-stretching "
               "packed-spacing "
-
               );
 
 ADD_INTERFACE (Spacing_interface, "spacing-interface",
index 391ef6e4f68b8becd26f05619dd311a0d38f74d0..cbf77b26739cf7bebf4ebd4b5f8207c9468e5928 100644 (file)
@@ -76,12 +76,12 @@ Span_arpeggio_engraver::stop_translation_timestep ()
       for (int j = 0; j < arpeggios_.size (); j++)
        {
          extract_grob_set (arpeggios_[j], "stems", stems);
-         for (int i = stems.size() ; i--;)
+         for (int i = stems.size (); i--;)
            Pointer_group_interface::add_grob (span_arpeggio_, ly_symbol2scm ("stems"),
                                               stems[i]);
 
          extract_grob_set (arpeggios_[j], "side-support-elements", sses);
-         for (int i = sses.size() ; i--;)
+         for (int i = sses.size (); i--;)
            Pointer_group_interface::add_grob (span_arpeggio_, ly_symbol2scm ("side-support-elements"),
                                               sses[i]);
 
@@ -99,7 +99,7 @@ Span_arpeggio_engraver::stop_translation_timestep ()
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Span_arpeggio_engraver,arpeggio);
+ADD_ACKNOWLEDGER (Span_arpeggio_engraver, arpeggio);
 ADD_TRANSLATOR (Span_arpeggio_engraver,
                /* doc */ "",
                /* create */ "Arpeggio",
index 95bd6ae56ea15b68ccaded2910940ca914fa0809..c668844ce3f2d35ae899ce2d5be5d9c10b59cbc7 100644 (file)
@@ -18,7 +18,6 @@
 #include "grob.hh"
 #include "pointer-group-interface.hh"
 
-
 void
 Span_bar::add_bar (Grob *me, Grob *b)
 {
@@ -75,14 +74,14 @@ Span_bar::print (SCM smobbed_me)
 
   if (!model_bar)
     model_bar = me;
-  
+
   extents.sort (&Interval::left_comparison);
 
   Stencil span_bar;
-  for (int i = 1; i < extents.size (); i ++)
+  for (int i = 1; i < extents.size (); i++)
     {
-      Interval prev_extent = extents[i-1];
-      Interval ext = extents[i]; 
+      Interval prev_extent = extents[i - 1];
+      Interval ext = extents[i];
       if (!prev_extent.is_empty ())
        {
          Interval l (prev_extent [UP],
@@ -106,7 +105,7 @@ Span_bar::print (SCM smobbed_me)
     }
 
   span_bar.translate_axis (- me->relative_coordinate (refp, Y_AXIS),
-                              Y_AXIS);
+                          Y_AXIS);
 
   return span_bar.smobbed_copy ();
 }
@@ -118,7 +117,7 @@ Span_bar::width_callback (SCM element_smob, SCM scm_axis)
   Grob *se = unsmob_grob (element_smob);
   (void) scm_axis;
 
-  assert ( (Axis) scm_to_int (scm_axis) == X_AXIS);
+  assert ((Axis) scm_to_int (scm_axis) == X_AXIS);
   String gl = ly_scm2string (se->get_property ("glyph"));
 
   /*
@@ -188,8 +187,8 @@ Span_bar::evaluate_glyph (Grob *me)
     return;
 
   extract_grob_set (me, "elements", elements);
-  for (int i = elements.size();
-       i-- && !scm_is_string (gl); )
+  for (int i = elements.size ();
+       i-- && !scm_is_string (gl);)
     {
       gl = elements[i]->get_property ("glyph");
     }
index c0675304390a0a598b148efb0e8bc538328f3134..f9b20d7182f47cb130e66e92ad35c564f5280e5a 100644 (file)
@@ -184,4 +184,4 @@ Span_dynamic_performer::try_music (Music *r)
 ADD_TRANSLATOR (Span_dynamic_performer,
                "", "",
                "crescendo-event decrescendo-event",
-                "", "");
+               "", "");
index 590c4d9473678009630ea353dc503f99632daa22..d5eaa3aaa45aefd53be682475f81c7f3d7350c59 100644 (file)
@@ -253,7 +253,7 @@ Spanner::find_broken_piece (System *l) const
 int
 Spanner::compare (Spanner *const &p1, Spanner *const &p2)
 {
-  return p1->get_system ()->get_rank() - p2->get_system ()->get_rank();
+  return p1->get_system ()->get_rank () - p2->get_system ()->get_rank ();
 }
 
 bool
index 388567e793fb56d1286a130cf2eb2bb59db79a76..b3697549cdf0d1a711523bd2e7a63b9262baf0d5 100644 (file)
@@ -24,7 +24,7 @@ SCM
 Spring_smob::mark_smob (SCM x)
 {
   (void)x;
-  
+
   return SCM_UNSPECIFIED;
 }
 
index 1834d9149f1a79c0c90f31f36d14cc2f44f12b01..1a99e79e6179c2864c47372963f217fe167a2666 100644 (file)
@@ -32,7 +32,7 @@ Staff_collecting_engraver::acknowledge_staff_symbol (Grob_info gi)
 }
 
 #include "translator.icc"
-ADD_ACKNOWLEDGER (Staff_collecting_engraver,staff_symbol);
+ADD_ACKNOWLEDGER (Staff_collecting_engraver, staff_symbol);
 
 ADD_TRANSLATOR (Staff_collecting_engraver,
                /* doc */ "Maintain the stavesFound variable",
index c9dd4ac4454cc3feb2b0bd1523d969c8101b3b0d..45e06833a70c563b9d2c73a0c30478decc3008c1 100644 (file)
@@ -44,7 +44,7 @@ private:
 
 ADD_TRANSLATOR (Staff_performer, "", "",
                "",
-                "", "");
+               "", "");
 
 Staff_performer::Staff_performer ()
 {
index c4ec3b14d605a289962805e1127315c59ad30eb8..7a746404e653dcbe4d7670f21feb434941891960 100644 (file)
@@ -42,9 +42,7 @@ Staff_spacing::next_note_correction (Grob *me,
     {
       Interval v;
       if (Accidental_placement::has_interface (a))
-       {
-         v = Accidental_placement::get_relevant_accidental_extent (a, col, me);
-       }
+       v = Accidental_placement::get_relevant_accidental_extent (a, col, me);
       else
        v = a->extent (col, X_AXIS);
 
@@ -124,7 +122,6 @@ Staff_spacing::next_notes_correction (Grob *me, Grob *last_grob)
   Interval bar_size = bar_y_positions (last_grob);
   Real max_corr = 0.0;
 
-
   extract_grob_set (me, "right-items", right_items);
   for (int i = right_items.size (); i--;)
     {
@@ -132,7 +129,7 @@ Staff_spacing::next_notes_correction (Grob *me, Grob *last_grob)
 
       max_corr = max (max_corr, next_note_correction (me, g, bar_size));
       extract_grob_set (g, "elements", elts);
-      for (int j  = elts.size(); j--;)
+      for (int j = elts.size (); j--;)
        max_corr = max (max_corr, next_note_correction (me, elts[j], bar_size));
     }
 
@@ -149,7 +146,7 @@ Staff_spacing::get_spacing_params (Grob *me, Real *space, Real *fixed)
   Item *me_item = dynamic_cast<Item *> (me);
 
   extract_grob_set (me, "left-items", items);
-  for (int i = items.size(); i--;)
+  for (int i = items.size (); i--;)
     {
       Grob *cand = items[i];
       if (cand && Separation_item::has_interface (cand))
index 32179bb746818dc5b44281b5a01c1c4d21cf4750..a7bbb6194bfcf4d24175e145113dfef15d74fbc6 100644 (file)
@@ -17,7 +17,7 @@ Staff_symbol_engraver::~Staff_symbol_engraver ()
 Staff_symbol_engraver::Staff_symbol_engraver ()
 {
   finished_span_ = 0;
-  first_start_ = true; 
+  first_start_ = true;
   span_ = 0;
   span_events_[LEFT] = 0;
   span_events_[RIGHT] = 0;
@@ -32,7 +32,7 @@ Staff_symbol_engraver::try_music (Music *music)
       span_events_[d] = music;
       return true;
     }
-  
+
   return false;
 }
 
@@ -95,15 +95,15 @@ Staff_symbol_engraver::finalize ()
 
 /*
   Todo: staff-symbol-referencer iface.
- */
+*/
 void
 Staff_symbol_engraver::acknowledge_grob (Grob_info s)
 {
   /*
     Perhaps should try to take SeparationItem as bound of the staff
     symbol?
-   */
-  if (span_  || finished_span_ )
+  */
+  if (span_ || finished_span_)
     {
       Spanner *my = span_ ? span_ : finished_span_;
       s.grob ()->set_object ("staff-symbol", my->self_scm ());
@@ -111,7 +111,7 @@ Staff_symbol_engraver::acknowledge_grob (Grob_info s)
 }
 
 #include "translator.icc"
-ADD_ACKNOWLEDGER (Staff_symbol_engraver,grob);
+ADD_ACKNOWLEDGER (Staff_symbol_engraver, grob);
 ADD_TRANSLATOR (Staff_symbol_engraver,
                /* doc */ "Create the constellation of five (default) "
                "staff lines.",
index de35f67147cf41aa1ab61bcc6407dc8e18274f3d..cc3baa7a172fe7b88d248976c9bdcb7ac85e3eb7 100644 (file)
@@ -58,8 +58,8 @@ Stanza_number_align_engraver::stop_translation_timestep ()
   lyrics_.clear ();
 }
 
-ADD_ACKNOWLEDGER (Stanza_number_align_engraver,lyric_syllable);
-ADD_ACKNOWLEDGER (Stanza_number_align_engraver,stanza_number);
+ADD_ACKNOWLEDGER (Stanza_number_align_engraver, lyric_syllable);
+ADD_ACKNOWLEDGER (Stanza_number_align_engraver, stanza_number);
 ADD_TRANSLATOR (Stanza_number_align_engraver,
                "This engraver ensures that stanza numbers are neatly aligned. ",
                "",
index 146f48848ae1532a55629e1e8103fbbc6db2dfd0..34586f5e556592cdb85d84d3ff948988e0d4af70 100644 (file)
@@ -71,7 +71,7 @@ Stanza_number_engraver::stop_translation_timestep ()
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Stanza_number_engraver,lyric_syllable);
+ADD_ACKNOWLEDGER (Stanza_number_engraver, lyric_syllable);
 ADD_TRANSLATOR (Stanza_number_engraver,
                /* doc */ "",
                /* create */ "StanzaNumber",
index e81771eda101178dae3bdb2252f4d3d603443af1..1e45f43d6097bf130cc78c71a121d2bf52bab087 100644 (file)
@@ -59,7 +59,7 @@ Stem_engraver::make_stem (Grob_info gi)
   */
   Music *music = gi.music_cause ();
   Duration *dur = unsmob_duration (music->get_property ("duration"));
-  
+
   stem_->set_property ("duration-log", dur ? scm_from_int (dur->duration_log ()) : 0);
 
   if (tremolo_ev_)
@@ -117,11 +117,11 @@ Stem_engraver::acknowledge_rhythmic_head (Grob_info gi)
     return;
   Duration *d = unsmob_duration (cause->get_property ("duration"));
   if (!d)
-    return ;
-      
+    return;
+
   if (!stem_)
     make_stem (gi);
-      
+
   if (Stem::duration_log (stem_) != d->duration_log ())
     {
       // FIXME: 
@@ -169,7 +169,7 @@ Stem_engraver::try_music (Music *m)
 }
 
 #include "translator.icc"
-ADD_ACKNOWLEDGER (Stem_engraver,rhythmic_head);
+ADD_ACKNOWLEDGER (Stem_engraver, rhythmic_head);
 ADD_TRANSLATOR (Stem_engraver,
                /* doc */ "Create stems and single-stem tremolos.  It also works together with "
                "the beam engraver for overriding beaming.",
index f258b7aedad25edd22db88d73c4b426d1a7ce226..1905736a9d344da0948b103de61759bba9250459 100644 (file)
@@ -134,7 +134,7 @@ Stem::support_head (Grob *me)
   extract_grob_set (me, "note-heads", heads);
   if (heads.size () == 1)
     return heads[0];
-  
+
   return first_head (me);
 }
 
@@ -180,7 +180,7 @@ Stem::extremal_heads (Grob *me)
 
   Drul_array<Grob *> exthead (0, 0);
   extract_grob_set (me, "note-heads", heads);
-  
+
   for (int i = heads.size (); i--;)
     {
       Grob *n = heads[i];
@@ -212,7 +212,7 @@ Stem::note_head_positions (Grob *me)
 {
   Array<int> ps;
   extract_grob_set (me, "note-heads", heads);
-  
+
   for (int i = heads.size (); i--;)
     {
       Grob *n = heads[i];
@@ -617,7 +617,7 @@ Stem::width_callback (SCM e, SCM ax)
     }
   else
     {
-      r = Interval (-1,1) * thickness (me) * 0.5;
+      r = Interval (-1, 1) * thickness (me) * 0.5;
       r.unite (flag (me).extent (X_AXIS));
     }
   return ly_interval2scm (r);
@@ -886,7 +886,7 @@ Stem::calc_stem_info (Grob *me)
       y_ext.widen (0.5);       // FIXME. Should be tunable? 
       minimum_length = max (minimum_length, y_ext.length ());
     }
-  
+
   ideal_y *= my_dir;
   Real minimum_y = note_start + minimum_length;
   Real shortest_y = minimum_y * my_dir;
index 06fe314fd0e5e043fe9cc604149e3711257e172c..fb60ae26f8458e8c865fcd6f900e06239c56fdf5 100644 (file)
@@ -5,7 +5,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "stencil.hh"
@@ -18,7 +17,6 @@ void register_stencil_head (SCM symbol)
 {
   scm_set_object_property_x (symbol, ly_symbol2scm ("stencil-head?"), SCM_BOOL_T);
   heads = scm_cons (symbol, heads);
-  
 }
 bool
 is_stencil_head (SCM symbol)
@@ -32,4 +30,4 @@ all_stencil_heads ()
 {
   return heads;
 }
-  
+
index 3964054daf4d8e6e2a77e8ce985947683d3925fc..efe5c905375975b61ea6d35b38dcb14aa82fdd4e 100644 (file)
@@ -1,10 +1,9 @@
 /*
-  stencil-interpret.cc --  implement Stencil expression interpreting 
+  stencil-interpret.cc --  implement Stencil expression interpreting
 
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "stencil.hh"
index 4b40e88659510cd3d983e7cae3e46dbbe0a7224c..fe2552fe956bb7705d98535179e4ebb2872e8299 100644 (file)
@@ -193,17 +193,16 @@ LY_DEFINE (ly_stencil_add, "ly:stencil-add",
   SCM_VALIDATE_REST_ARGUMENT (args);
 
   SCM expr = SCM_EOL;
-  SCM *tail = &expr; 
+  SCM *tail = &expr;
   Box extent;
   extent.set_empty ();
-  
+
   while (!SCM_NULLP (args))
     {
       Stencil *s = unsmob_stencil (scm_car (args));
       if (!s)
        SCM_ASSERT_TYPE (s, scm_car (args), SCM_ARGn, __FUNCTION__, "Stencil");
 
-
       extent.unite (s->extent_box ());
       *tail = scm_cons (s->expr (), SCM_EOL);
       tail = SCM_CDRLOC (*tail);
@@ -230,8 +229,7 @@ LY_DEFINE (ly_make_stencil, "ly:make-stencil",
 
   SCM_ASSERT_TYPE (is_number_pair (xext), xext, SCM_ARG2, __FUNCTION__, "number pair");
   SCM_ASSERT_TYPE (is_number_pair (yext), yext, SCM_ARG3, __FUNCTION__, "number pair");
-  
-  
+
   Box b (ly_scm2interval (xext), ly_scm2interval (yext));
   Stencil s (b, expr);
   return s.smobbed_copy ();
@@ -263,7 +261,6 @@ LY_DEFINE (ly_stencil_fonts, "ly:stencil-fonts",
   return find_expression_fonts (stil->expr ());
 }
 
-
 LY_DEFINE (ly_stencil_in_color, "ly:stencil-in-color",
           4, 0, 0, (SCM stc, SCM r, SCM g, SCM b),
           "Put @var{stc} in a different color.")
@@ -276,7 +273,6 @@ LY_DEFINE (ly_stencil_in_color, "ly:stencil-in-color",
                              stil->expr ())).smobbed_copy ();
 }
 
-
 struct Stencil_interpret_arguments
 {
   SCM func;
@@ -340,7 +336,6 @@ LY_DEFINE (ly_filled_box, "ly:round-filled-box",
 }
 
 
-
 LY_DEFINE (ly_register_stencil_expression, "ly:register-stencil-expression",
           1, 0, 0,
           (SCM symbol),
index 291fe6ad06b63d161691871ab04aaa0a73a2934a..903e864b7ca04aa488565776ea12b63bf11dc5ce 100644 (file)
@@ -91,7 +91,7 @@ Stencil::translate (Offset o)
          || isnan (o[a])
 
          // ugh, hardcoded. 
-         || fabs (o[a]) > 1e6) 
+         || fabs (o[a]) > 1e6)
        {
          programming_error (String_convert::form_string ("Improbable offset for stencil: %f staff space", o[a])
                             + "\n"
@@ -191,7 +191,6 @@ Stencil::add_at_edge (Axis a, Direction d, Stencil const &s, Real padding,
 }
 
 
-
 Stencil
 Stencil::in_color (Real r, Real g, Real b) const
 {
index 599a3f987c0f5e068d0e1bd8838c11fd7f7900d8..31e76c4829210d5359edb29dc4d5bc0a0050c794 100644 (file)
@@ -9,7 +9,6 @@
 #include "performer.hh"
 #include "music.hh"
 
-
 class Swallow_performer : public Performer
 {
 public:
index aee2c590d3a77576c90fbe60bc73ee3c0ba70f37..cc35f4b2644291870512617ed7de562aa42978e5 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "pointer-group-interface.hh"
 
-
 Stencil
 System_start_delimiter::staff_bracket (Grob *me, Real height)
 {
@@ -31,24 +30,22 @@ System_start_delimiter::staff_bracket (Grob *me, Real height)
 
   Real thickness = robust_scm2double (me->get_property ("thickness"), 0.25);
 
-
   Real overlap = 0.1 * thickness;
-  
+
   Stencil bracket = Lookup::filled_box (Box (Interval (0, thickness),
                                             Interval (-1, 1)
-                                            * (height/2 + overlap)));
+                                            * (height / 2 + overlap)));
 
   Direction d = DOWN;
   do
     {
       bracket.add_at_edge (Y_AXIS, d, tips[d], -overlap, 0.0);
     }
-  while (flip (&d) != DOWN); 
+  while (flip (&d) != DOWN);
 
   return bracket;
 }
 
-
 Stencil
 System_start_delimiter::simple_bar (Grob *me, Real h)
 {
@@ -64,12 +61,12 @@ SCM
 System_start_delimiter::after_line_breaking (SCM smob)
 {
   Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (smob));
-  
+
   SCM gl = me->get_property ("glyph");
   if (ly_is_equal (gl, scm_makfrom0str ("bar-line")))
     {
       int count = 0;
-      Paper_column *left_column = me->get_bound (LEFT)->get_column ();  
+      Paper_column *left_column = me->get_bound (LEFT)->get_column ();
 
 #if 1 /* slur-script.ly test */
       /*
@@ -80,20 +77,20 @@ System_start_delimiter::after_line_breaking (SCM smob)
 
       for (int i = elts.size (); i--;)
        {
-         Spanner *staff = dynamic_cast<Spanner*> (elts[i]);
-         if (!staff || 
-             staff->get_bound (LEFT)->get_column () != left_column)
+         Spanner *staff = dynamic_cast<Spanner *> (elts[i]);
+         if (!staff
+             || staff->get_bound (LEFT)->get_column () != left_column)
            continue;
-         
+
          Interval v = staff->extent (common, Y_AXIS);
-         
+
          if (!v.is_empty ())
            count++;
        }
 
       if (count <= 1)
        me->suicide ();
-#endif      
+#endif
     }
   return SCM_UNSPECIFIED;
 }
@@ -118,9 +115,9 @@ System_start_delimiter::print (SCM smob)
 
   Interval ext;
 
-  for (int i = elts.size();  i--;)
+  for (int i = elts.size (); i--;)
     {
-      Spanner *sp = dynamic_cast<Spanner*> (elts[i]);
+      Spanner *sp = dynamic_cast<Spanner *> (elts[i]);
       if (sp
          && sp->get_bound (LEFT) == me->get_bound (LEFT))
        {
@@ -169,7 +166,7 @@ System_start_delimiter::staff_brace (Grob *me, Real y)
   fm = select_font (me->get_layout (), scm_list_n (alist, SCM_UNDEFINED));
 
   int lo = 0;
-  int hi = max (fm->count () - 1,2);
+  int hi = max (fm->count () - 1, 2);
   Box b;
 
   /* do a binary search for each Y, not very efficient, but passable?  */
index 8ad56060e685e31ef87065bfb533e57353001a76..e5bc99840eae11e11c9041715d3544abb875c7ec 100644 (file)
@@ -32,7 +32,7 @@ System::System (System const &src, int count)
 {
   all_elements_ = 0;
   rank_ = 0;
-  init_elements (); 
+  init_elements ();
 }
 
 System::System (SCM s, Object_key const *key)
@@ -40,7 +40,7 @@ System::System (SCM s, Object_key const *key)
 {
   all_elements_ = 0;
   rank_ = 0;
-  init_elements (); 
+  init_elements ();
 }
 
 void
@@ -51,7 +51,6 @@ System::init_elements ()
   set_object ("all-elements", scm_arr);
 }
 
-
 Grob *
 System::clone (int count) const
 {
@@ -68,7 +67,7 @@ int
 System::spanner_count () const
 {
   int k = 0;
-  for (int i = all_elements_->size(); i--;)
+  for (int i = all_elements_->size (); i--;)
     if (dynamic_cast<Spanner *> (all_elements_->grob (i)))
       k++;
   return k;
@@ -97,20 +96,20 @@ System::derived_mark () const
       while (ptr < end)
        {
          scm_gc_mark ((*ptr)->self_scm ());
-         ptr ++;
+         ptr++;
        }
     }
 
   if (pscore_)
     scm_gc_mark (pscore_->self_scm ());
-  
+
   Spanner::derived_mark ();
 }
 
 static void
 fixup_refpoints (Link_array<Grob> const &grobs)
 {
-  for (int i = grobs.size (); i--; )
+  for (int i = grobs.size (); i--;)
     {
       grobs[i]->fixup_refpoint ();
     }
@@ -119,7 +118,7 @@ fixup_refpoints (Link_array<Grob> const &grobs)
 SCM
 System::get_paper_systems ()
 {
-  for (int i = 0; i < all_elements_->size(); i++)
+  for (int i = 0; i < all_elements_->size (); i++)
     {
       Grob *g = all_elements_->grob (i);
       if (g->internal_has_interface (ly_symbol2scm ("only-prebreak-interface")))
@@ -146,14 +145,14 @@ System::get_paper_systems ()
   for (int i = 0; i < broken_intos_.size (); i++)
     {
       Grob *se = broken_intos_[i];
-      
+
       extract_grob_set (se, "all-elements", all_elts);
-      for (int j = 0; j < all_elts.size(); j++)
+      for (int j = 0; j < all_elts.size (); j++)
        {
          Grob *g = all_elts[j];
          g->fixup_refpoint ();
        }
-      
+
       count += all_elts.size ();
     }
 
@@ -161,12 +160,12 @@ System::get_paper_systems ()
     needed for doing items.
   */
   fixup_refpoints (all_elements_->array ());
-  
-  for (int i = 0 ; i < all_elements_->size(); i++)
+
+  for (int i = 0; i < all_elements_->size (); i++)
     all_elements_->grob (i)->handle_broken_dependencies ();
 
   handle_broken_dependencies ();
-  
+
 #if 0  /* FIXME: strange side effects.  */
 
   /* Because the this->get_property (all-elements) contains items in 3
@@ -238,10 +237,10 @@ System::add_column (Paper_column *p)
     }
 
   p->rank_
-    = ga->size()
+    = ga->size ()
     ? Paper_column::get_rank (ga->array ().top ()) + 1
     : 0;
-    
+
   ga->add (p);
   Axis_group_interface::add_element (this, p);
 }
@@ -264,9 +263,8 @@ apply_tweaks (Grob *g, bool broken)
 void
 System::pre_processing ()
 {
-  for (int i = 0 ;  i < all_elements_->size(); i ++)
+  for (int i = 0; i < all_elements_->size (); i++)
     all_elements_->grob (i)->discretionary_processing ();
-  
 
   if (be_verbose_global)
     message (_f ("Grob count %d", element_count ()));
@@ -276,22 +274,22 @@ System::pre_processing ()
     array, and should be processed before the original is potentially
     killed.
   */
-  for (int i = all_elements_->size(); i --; )
+  for (int i = all_elements_->size (); i--;)
     all_elements_->grob (i)->handle_prebroken_dependencies ();
 
   fixup_refpoints (all_elements_->array ());
 
-  for (int i = 0 ;  i < all_elements_->size(); i ++)
+  for (int i = 0; i < all_elements_->size (); i++)
     apply_tweaks (all_elements_->grob (i), false);
 
-  for (int i = 0 ;  i < all_elements_->size(); i ++)
+  for (int i = 0; i < all_elements_->size (); i++)
     all_elements_->grob (i)->calculate_dependencies (PRECALCED, PRECALCING,
                                                     ly_symbol2scm ("before-line-breaking-callback"));
 
   message (_ ("Calculating line breaks..."));
   progress_indication (" ");
-  
-  for (int i = 0 ;  i < all_elements_->size(); i ++)
+
+  for (int i = 0; i < all_elements_->size (); i++)
     {
       Grob *e = all_elements_->grob (i);
       SCM proc = e->get_property ("spacing-procedure");
@@ -303,7 +301,7 @@ System::pre_processing ()
 void
 System::post_processing ()
 {
-  for (int i = 0 ;  i < all_elements_->size(); i ++)
+  for (int i = 0; i < all_elements_->size (); i++)
     {
       Grob *g = all_elements_->grob (i);
 
@@ -324,7 +322,6 @@ System::post_processing ()
      This might seem inefficient, but Stencils are cached per grob
      anyway. */
 
-
   Link_array<Grob> all_elts_sorted (all_elements_->array ());
   all_elts_sorted.default_sort ();
   all_elts_sorted.uniq ();
@@ -346,7 +343,7 @@ System::get_paper_system ()
 
   /* Output stencils in three layers: 0, 1, 2.  Default layer: 1. */
   for (int i = 0; i < LAYER_COUNT; i++)
-    for (int j = all_elements_->size (); j --;)
+    for (int j = all_elements_->size (); j--;)
       {
        Grob *g = all_elements_->grob (j);
        Stencil *stil = g->get_stencil ();
@@ -385,7 +382,7 @@ System::get_paper_system ()
   Interval staff_refpoints;
   staff_refpoints.set_empty ();
   extract_grob_set (this, "spaceable-staves", staves);
-  for (int i = staves.size (); i--; )
+  for (int i = staves.size (); i--;)
     {
       Grob *g = staves[i];
       staff_refpoints.add_point (g->relative_coordinate (this, Y_AXIS));
@@ -410,20 +407,20 @@ System::broken_col_range (Item const *left, Item const *right) const
 
   extract_grob_set (this, "columns", cols);
   int i = 0;
-  while (i < cols.size()
+  while (i < cols.size ()
         && cols[i] != left)
     i++;
 
-  if (i < cols.size())
-    i ++;
-  
-  while (i < cols.size()
+  if (i < cols.size ())
+    i++;
+
+  while (i < cols.size ()
         && cols[i] != right)
     {
       Paper_column *c = dynamic_cast<Paper_column *> (cols[i]);
       if (Item::is_breakable (c) && !c->system_)
        ret.push (c);
-      i++;      
+      i++;
     }
 
   return ret;
@@ -438,7 +435,7 @@ System::columns () const
 
   int last_breakable = ro_columns.size ();
 
-  while  (last_breakable --)
+  while (last_breakable--)
     {
       if (Item::is_breakable (ro_columns [last_breakable]))
        break;
index acb553c827841c303d272410ab5b11e443a73b72..ca5c0795f6df900c008640fcf69e64709487b270 100644 (file)
@@ -20,7 +20,6 @@
 #include "warn.hh"
 #include "duration.hh"
 
-
 /**
    make (guitar-like) tablature note
 */
index 354883141e839fbb92bd49746612285eeaf9cd98..8d8401960b4c068129766ac6f64026768336d6c4 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "staff-symbol-engraver.hh"
@@ -37,7 +36,7 @@ Tab_staff_symbol_engraver::Tab_staff_symbol_engraver ()
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Tab_staff_symbol_engraver,grob);
+ADD_ACKNOWLEDGER (Tab_staff_symbol_engraver, grob);
 ADD_TRANSLATOR (Tab_staff_symbol_engraver,
                /* doc */ "Create a staff-symbol, but look at stringTunings for the number of lines."
                "staff lines.",
index 913fb90adf79c957b673ac915a6545786ebd8ede..43af310b30ebc68b9122cc529fc66ab6f8fe6a4b 100644 (file)
@@ -81,4 +81,4 @@ Tempo_performer::try_music (Music *event)
 
 ADD_TRANSLATOR (Tempo_performer, "", "",
                "metronome-change-event",
-                "", "");
+               "", "");
index 927a9d39e950fb9a331421bfc32a2ff36450ef64..d69b59d3b4858d5937ccc4847960f07a5b15aaf5 100644 (file)
@@ -63,9 +63,7 @@ LY_DEFINE (ly_load_text_dimensions, "ly:load-text-dimensions",
 
       if (scm_hash_ref (text_dimension_hash_tab, key, SCM_BOOL_F)
          == SCM_BOOL_F)
-       {
-         scm_hash_set_x (text_dimension_hash_tab, key, val);
-       }
+       scm_hash_set_x (text_dimension_hash_tab, key, val);
     }
 
   return SCM_UNSPECIFIED;
index d738a0c4c920cbcc1d0f0224fa60dc8b7c4da72e..39f31905704ce720abfbdbb913246372e3e7539c 100644 (file)
@@ -140,7 +140,7 @@ Text_spanner_engraver::finalize ()
 }
 
 #include "translator.icc"
-ADD_ACKNOWLEDGER (Text_spanner_engraver,note_column);
+ADD_ACKNOWLEDGER (Text_spanner_engraver, note_column);
 ADD_TRANSLATOR (Text_spanner_engraver,
                /* doc */ "Create text spanner from a Music.",
                /* create */ "TextSpanner",
index 1caf7851a9842f82ac5314b7e6d78928b81fba6c..082cc619df1afa89917eda3ced56ae6762827601 100644 (file)
@@ -116,17 +116,11 @@ Tie_column::werner_directions (Grob *me)
          if (last_tie
              && Tie::get_column_rank (t, LEFT)
              < Tie::get_column_rank (last_tie, LEFT))
-           {
-             d = DOWN;
-           }
+           d = DOWN;
          else if (last_down_pos - p > 5)
-           {
-             d = UP;
-           }
+           d = UP;
          else
-           {
-             d = DOWN;
-           }
+           d = DOWN;
 
          set_grob_direction (t, d);
        }
@@ -164,9 +158,7 @@ Tie_column::before_line_breaking (SCM smob)
        {
          if (dir * tie->get_bound (dir)->get_column ()->get_rank ()
              > dir * me->get_bound (dir)->get_column ()->get_rank ())
-           {
-             me->set_bound (dir, Tie::head (tie, dir));
-           }
+           me->set_bound (dir, Tie::head (tie, dir));
        }
       while (flip (&dir) != LEFT);
     }
index 8db63a0318ccc19fcdcbb5bf5caef31d4f1bce25..b8b7c0b4cd74a054b7641cbd64b904af38a1d348 100644 (file)
@@ -152,14 +152,10 @@ Tie_engraver::stop_translation_timestep ()
   if (ties_.size ())
     {
       if (!to_boolean (get_property ("tieWaitForNote")))
-       {
-         heads_to_tie_.clear ();
-       }
+       heads_to_tie_.clear ();
 
       for (int i = 0; i < ties_.size (); i++)
-       {
-         typeset_tie (ties_[i]);
-       }
+       typeset_tie (ties_[i]);
 
       ties_.clear ();
       tie_column_ = 0;
index 7482c0434b01b27861b8022974308d4c0f8824ac..314d5c6038df223b97dff32096b5c741b226409e 100644 (file)
@@ -13,7 +13,6 @@
 #include "audio-item.hh"
 #include "pqueue.hh"
 
-
 class Tie_performer : public Performer
 {
   Music *event_;
@@ -73,7 +72,7 @@ Tie_performer::acknowledge_audio_element (Audio_element_info inf)
 
          if (right_mus && left_mus
              && ly_is_equal (right_mus->get_property ("pitch"),
-                              left_mus->get_property ("pitch")))
+                             left_mus->get_property ("pitch")))
            {
              an->tie_to (th);
              ties_created_ = true;
index 1899046dc051710c5d8111e7ed98ebd36605d336..8668d994cad5b992c583d801b5fa4a01c5d94f23 100644 (file)
@@ -232,9 +232,7 @@ Tie::get_control_points (SCM smob)
       Grob *dots = Rhythmic_head::get_dots (l);
       if (fabs (staff_space * Staff_symbol_referencer::get_position (dots) / 2
                - ypos) < 0.5)
-       {
-         ypos += 0.5 * dir;
-       }
+       ypos += 0.5 * dir;
     }
 
   /*
@@ -297,9 +295,7 @@ Tie::get_control_points (SCM smob)
            we don't want horizontal ties
          */
          if (fabs (newy - b.control_[0][Y_AXIS]) < 1e-2)
-           {
-             newy = newy + dir * staff_space;
-           }
+           newy = newy + dir * staff_space;
        }
 
       Real y0 = b.control_ [0][Y_AXIS];
@@ -332,12 +328,10 @@ Tie::print (SCM smob)
   if (!scm_is_pair (cp))
     return Stencil ().smobbed_copy ();
 
-
   Real staff_thick = Staff_symbol_referencer::line_thickness (me);
   Real base_thick = robust_scm2double (me->get_property ("thickness"), 1);
   Real thick = base_thick * staff_thick;
 
-
   Bezier b;
   int i = 0;
   for (SCM s = cp; s != SCM_EOL; s = scm_cdr (s))
@@ -360,14 +354,13 @@ Tie::print (SCM smob)
                      get_grob_direction (me) * staff_thick,
                      thick);
 
-  
   return a.smobbed_copy ();
 }
 
 ADD_INTERFACE (Tie,
               "tie-interface",
               "A tie connecting two noteheads.\n",
-              
+
               "y-offset dash-period dash-fraction "
               "staffline-clearance control-points head-pair "
               "details thickness x-gap direction minimum-length");
index 4061d13d4ae721de52d16b0594f16f7aad7aa5a2..99881bf6d14565d8e1fd6aa69bfb5b12ec921cbb 100644 (file)
@@ -27,14 +27,12 @@ public:
   TRANSLATOR_DECLARATIONS (Time_signature_engraver);
 };
 
-
 void
 Time_signature_engraver::derived_mark () const
 {
   scm_gc_mark (last_time_fraction_);
 }
 
-
 Time_signature_engraver::Time_signature_engraver ()
 {
   time_signature_ = 0;
index 5d98010035e38adbec9c2d09e0f705abb3cef632..544debf16ac7b10edd751d37a4868407027dd561 100644 (file)
@@ -66,9 +66,7 @@ Time_signature::special_time_signature (Grob *me, SCM scm_style, int n, int d)
       if /* neither C2/2 nor C4/4 */
        (((n != 2) || (d != 2))
         && ((n != 4) || (d != 4)))
-       {
-         return numbered_time_signature (me, n, d);
-       }
+       return numbered_time_signature (me, n, d);
     }
 
   String char_name = style + to_string (n) + to_string (d);
index 05b560b4bdb4a14e304ad588852afa8974a46e2a..1cdfc199ea8e18990eeaf51aa4ef5501a5cbe97b 100644 (file)
@@ -76,7 +76,6 @@ Timing_translator::Timing_translator ()
 {
 }
 
-
 void
 Timing_translator::start_translation_timestep ()
 {
@@ -145,7 +144,6 @@ ADD_TRANSLATOR (Timing_translator,
                "this engraver should be removed from @code{Score} and placed in "
                "@code{Staff}. "
                "\n\nThis engraver adds the alias @code{Timing} to its containing context."
-
                ,
 
-               "",  "", "", "");
+               "", "", "", "");
index 7dac8ea0917767298288846a949f29a9a9ebc6b3..f9461049fd02c2b74e9394c81c742e645d8e225c 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "translator-dispatch-list.hh"
@@ -14,7 +13,7 @@
 
 #include "ly-smobs.icc"
 
-void 
+void
 Engraver_dispatch_list::apply (Grob_info gi)
 {
   Translator *origin = gi.origin_translator ();
@@ -22,7 +21,7 @@ Engraver_dispatch_list::apply (Grob_info gi)
     {
       Engraver_dispatch_entry const &e (dispatch_entries_[i]);
       if (e.engraver_ == origin)
-       continue; 
+       continue;
 
       (*e.function_) (e.engraver_, gi);
     }
@@ -32,21 +31,21 @@ SCM
 Engraver_dispatch_list::create (SCM trans_list,
                                SCM iface_list)
 {
-  SCM retval = Engraver_dispatch_list().smobbed_copy ();
-  Engraver_dispatch_list * list = Engraver_dispatch_list::unsmob (retval);
+  SCM retval = Engraver_dispatch_list ().smobbed_copy ();
+  Engraver_dispatch_list *list = Engraver_dispatch_list::unsmob (retval);
 
   Engraver_dispatch_entry entry;
-  bool found = false; 
+  bool found = false;
   for (SCM s = trans_list; scm_is_pair (s); s = scm_cdr (s))
     {
-      Engraver * eng
-       = dynamic_cast<Engraver*> (unsmob_translator (scm_car (s)));
+      Engraver *eng
+       = dynamic_cast<Engraver *> (unsmob_translator (scm_car (s)));
 
       if (!eng)
        continue;
 
       entry.engraver_ = eng;
-      for (SCM i =  iface_list; scm_is_pair (i); i = scm_cdr (i))
+      for (SCM i = iface_list; scm_is_pair (i); i = scm_cdr (i))
        {
          Engraver_void_function_engraver_grob_info ptr
            = eng->get_acknowledger (scm_car (i));
@@ -56,11 +55,9 @@ Engraver_dispatch_list::create (SCM trans_list,
              list->dispatch_entries_.push (entry);
              found = true;
            }
-         
        }
     }
 
-  
   return found ? retval : SCM_EOL;
 }
 
@@ -71,7 +68,6 @@ Engraver_dispatch_list::mark_smob (SCM x)
   return SCM_BOOL_F;
 }
 
-
 int
 Engraver_dispatch_list::print_smob (SCM x, SCM p, scm_print_state *)
 {
@@ -80,5 +76,5 @@ Engraver_dispatch_list::print_smob (SCM x, SCM p, scm_print_state *)
   return 1;
 }
 
-IMPLEMENT_SIMPLE_SMOBS(Engraver_dispatch_list);
-IMPLEMENT_DEFAULT_EQUAL_P(Engraver_dispatch_list);
+IMPLEMENT_SIMPLE_SMOBS (Engraver_dispatch_list);
+IMPLEMENT_DEFAULT_EQUAL_P (Engraver_dispatch_list);
index ead329095bb9c914515377efb686cb954818f1cd..4932048f9af89a7496ddc95d438c3d5ac462b74c 100644 (file)
@@ -4,10 +4,8 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
-
 #include "score-engraver.hh"
 #include "score-performer.hh"
 #include "engraver-group-engraver.hh"
 
 /*
   Quick & dirty.
- */
+*/
 Translator_group *
 get_translator_group (SCM sym)
 {
   if (sym == ly_symbol2scm ("Engraver_group_engraver"))
     return new Engraver_group_engraver ();
   else if (sym == ly_symbol2scm ("Performer_group_performer"))
-    return new Performer_group_performer();
+    return new Performer_group_performer ();
   else if (sym == ly_symbol2scm ("Score_engraver"))
-    return new Score_engraver();
+    return new Score_engraver ();
   else if (sym == ly_symbol2scm ("Score_performer"))
-    return new Score_performer();
+    return new Score_performer ();
   else if (sym == ly_symbol2scm ("Recording_group_engraver"))
-    return new Recording_group_engraver();
+    return new Recording_group_engraver ();
 
   assert (0);
   return 0;
index 304cf9dea88dd481934eea90ff9964fc0958b46b..0567fa1cc9f25d6ba0be38df5c68daa4b7500c28 100644 (file)
@@ -16,7 +16,6 @@
 #include "main.hh"
 #include "music.hh"
 
-
 Translator_group *
 Translator_group::get_daddy_translator () const
 {
@@ -101,13 +100,12 @@ Translator_group::get_simple_trans_list ()
   return simple_trans_list_;
 }
 
-                           
 void
 precomputed_recurse_over_translators (Context *c, Translator_precompute_index idx, Direction dir)
 {
   Translator_group *tg
     = dynamic_cast<Translator_group *> (c->implementation ());
-  
+
   if (dir == DOWN)
     {
       tg->precomputed_translator_foreach (idx);
@@ -125,7 +123,6 @@ precomputed_recurse_over_translators (Context *c, Translator_precompute_index id
       tg->precomputed_translator_foreach (idx);
       tg->call_precomputed_self_method (idx);
     }
-
 }
 
 void
@@ -133,7 +130,7 @@ recurse_over_translators (Context *c, Translator_method ptr, Translator_group_me
 {
   Translator_group *tg
     = dynamic_cast<Translator_group *> (c->implementation ());
-  
+
   if (dir == DOWN)
     {
       (tg->*tg_ptr) ();
@@ -170,7 +167,6 @@ Translator_group::derived_mark () const
 {
 }
 
-
 void
 Translator_group::precompute_method_bindings ()
 {
@@ -184,9 +180,7 @@ Translator_group::precompute_method_bindings ()
       for (int i = 0; i < TRANSLATOR_METHOD_PRECOMPUTE_COUNT; i++)
        {
          if (ptrs[i])
-           {
-             precomputed_method_bindings_[i].push (Translator_method_binding (tr, ptrs[i]));
-           }
+           precomputed_method_bindings_[i].push (Translator_method_binding (tr, ptrs[i]));
        }
     }
 
@@ -196,7 +190,7 @@ Translator_group::precompute_method_bindings ()
 void
 Translator_group::precomputed_translator_foreach (Translator_precompute_index idx)
 {
-  Array<Translator_method_binding> &bindings(precomputed_method_bindings_[idx]);
+  Array<Translator_method_binding> &bindings (precomputed_method_bindings_[idx]);
   for (int i = 0; i < bindings.size (); i++)
     {
       bindings[i].invoke ();
@@ -214,10 +208,9 @@ void
 Translator_group::call_precomputed_self_method (Translator_precompute_index idx)
 {
   if (precomputed_self_method_bindings_[idx])
-    (*precomputed_self_method_bindings_[idx])(this);
+    (*precomputed_self_method_bindings_[idx]) (this);
 }
 
-
 Translator_group::~Translator_group ()
 {
 }
@@ -228,7 +221,6 @@ IMPLEMENT_SMOBS (Translator_group);
 IMPLEMENT_DEFAULT_EQUAL_P (Translator_group);
 IMPLEMENT_TYPE_P (Translator_group, "ly:translator-group?");
 
-
 int
 Translator_group::print_smob (SCM s, SCM port, scm_print_state *)
 {
@@ -240,11 +232,10 @@ Translator_group::print_smob (SCM s, SCM port, scm_print_state *)
   return 1;
 }
 
-
 SCM
 Translator_group::mark_smob (SCM smob)
 {
-  Translator_group *me = (Translator_group*)SCM_CELL_WORD_1 (smob);
+  Translator_group *me = (Translator_group *)SCM_CELL_WORD_1 (smob);
 
   me->derived_mark ();
   scm_gc_mark (me->accept_hash_table_);
index 24d169857facef97400b1cc680daf447dce3b145..c301956d3f9216048cf5bb65d96af1b34c79bf16 100644 (file)
@@ -29,7 +29,6 @@ Translator::init ()
   smobify_self ();
 }
 
-
 void
 Translator::process_music ()
 {
@@ -165,7 +164,7 @@ add_acknowledger (Engraver_void_function_engraver_grob_info ptr,
   Acknowledge_information inf;
   inf.function_ = ptr;
 
-  String interface_name(func_name);
+  String interface_name (func_name);
 
   interface_name = interface_name.substitute ('_', '-');
   interface_name += "-interface";
@@ -177,19 +176,17 @@ add_acknowledger (Engraver_void_function_engraver_grob_info ptr,
 Engraver_void_function_engraver_grob_info
 generic_get_acknowledger (SCM sym, Array<Acknowledge_information> const *ack_array)
 {
-  for (int i = 0; i < ack_array->size(); i++)
+  for (int i = 0; i < ack_array->size (); i++)
     {
       if (ack_array->elem (i).symbol_ == sym)
-       {
-         return ack_array->elem(i).function_;
-       }
+       return ack_array->elem (i).function_;
     }
   return 0;
 }
 
-ADD_TRANSLATOR(Translator,
-              "Base class. Unused",
-              "",
-              "",
-              "",
-              "");
+ADD_TRANSLATOR (Translator,
+               "Base class. Unused",
+               "",
+               "",
+               "",
+               "");
index 099636a1c810980768a2e035bed41f99de979bc2..95f437e1ee182f146130182cfec952c4246b9f96 100644 (file)
@@ -146,7 +146,7 @@ Trill_spanner_engraver::finalize ()
       span_ = 0;
     }
 }
-ADD_ACKNOWLEDGER (Trill_spanner_engraver,note_column);
+ADD_ACKNOWLEDGER (Trill_spanner_engraver, note_column);
 ADD_TRANSLATOR (Trill_spanner_engraver,
                /* doc */ "Create trill spanner from a Music.",
                /* create */ "TrillSpanner",
index 3bdf45ff0cf38d4620270336a3cb708fa81b1380..f329a74d4db08952393a36c2be02bfe7d20e0e32 100644 (file)
@@ -1,10 +1,9 @@
 /*
-  ttf.cc --  implement ttf -> pfa routine. 
+  ttf.cc --  implement ttf -> pfa routine.
 
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "freetype.hh"
 #include "lily-guile.hh"
 #include "main.hh"
 
-
 /*
   Based on ttfps by Juliusz Chroboczek
- */
+*/
 static void
 print_header (void *out, FT_Face face)
 {
   lily_cookie_fprintf (out, "%%!PS-TrueTypeFont\n");
 
-  TT_Postscript *pt =
-    (TT_Postscript*) FT_Get_Sfnt_Table(face, ft_sfnt_post);
+  TT_Postscript *pt
+    = (TT_Postscript *) FT_Get_Sfnt_Table (face, ft_sfnt_post);
 
   if (pt->maxMemType42)
     lily_cookie_fprintf (out, "%%%%VMUsage: %ld %ld\n", 0, 0);
-  
+
   lily_cookie_fprintf (out, "%d dict begin\n", 11);
   lily_cookie_fprintf (out, "/FontName /%s def\n",
-          FT_Get_Postscript_Name (face));
+                      FT_Get_Postscript_Name (face));
 
   lily_cookie_fprintf (out, "/Encoding StandardEncoding def\n");
   lily_cookie_fprintf (out, "/PaintType 0 def\n");
   lily_cookie_fprintf (out, "/FontMatrix [1 0 0 1 0 0] def\n");
 
-  TT_Header *ht =
-    (TT_Header*)FT_Get_Sfnt_Table(face, ft_sfnt_head);
-  
+  TT_Header *ht
+    = (TT_Header *)FT_Get_Sfnt_Table (face, ft_sfnt_head);
+
   lily_cookie_fprintf (out, "/FontBBox [%ld %ld %ld %ld] def\n",
-          ht->xMin * 1000L / ht->Units_Per_EM,
-          ht->yMin * 1000L / ht->Units_Per_EM,
-          ht->xMax * 1000L / ht->Units_Per_EM,
-          ht->yMax * 1000L / ht->Units_Per_EM);
-  
+                      ht->xMin *1000L / ht->Units_Per_EM,
+                      ht->yMin *1000L / ht->Units_Per_EM,
+                      ht->xMax *1000L / ht->Units_Per_EM,
+                      ht->yMax *1000L / ht->Units_Per_EM);
+
   lily_cookie_fprintf (out, "/FontType 42 def\n");
   lily_cookie_fprintf (out, "/FontInfo 8 dict dup begin\n");
   lily_cookie_fprintf (out, "/version (%d.%d) def\n",
                       (ht->Font_Revision >> 16),
-                      (ht->Font_Revision & ((1 << 16) -1)));
+                      (ht->Font_Revision &((1 << 16) -1)));
 
 #if 0
   if (strings[0])
@@ -75,25 +73,24 @@ print_header (void *out, FT_Face face)
       lily_cookie_fprintf (out, ") def\n");
     }
 #endif
-  
+
   lily_cookie_fprintf (out, "/isFixedPitch %s def\n",
-          pt->isFixedPitch ? "true" : "false");
+                      pt->isFixedPitch ? "true" : "false");
   lily_cookie_fprintf (out, "/UnderlinePosition %ld def\n",
-          pt->underlinePosition * 1000L / ht->Units_Per_EM);
+                      pt->underlinePosition *1000L / ht->Units_Per_EM);
   lily_cookie_fprintf (out, "/UnderlineThickness %ld def\n",
-          pt->underlineThickness * 1000L / ht->Units_Per_EM);
+                      pt->underlineThickness *1000L / ht->Units_Per_EM);
   lily_cookie_fprintf (out, "end readonly def\n");
 }
 
 
-
 #define CHUNKSIZE 65534
 
 static void
 print_body (void *out, String name)
 {
   FILE *fd = fopen (name.to_str0 (), "rb");
-  
+
   static char xdigits[] = "0123456789ABCDEF";
 
   unsigned char *buffer;
@@ -112,7 +109,7 @@ print_body (void *out, String name)
          if (j != 0 && j % 36 == 0)
            lily_cookie_putc ('\n', out);
          /* lily_cookie_fprintf (out,"%02X",(int)buffer[j]) is too slow */
-         lily_cookie_putc (xdigits[(buffer[j] & 0xF0) >> 4], out);
+         lily_cookie_putc (xdigits[ (buffer[j] & 0xF0) >> 4], out);
          lily_cookie_putc (xdigits[buffer[j] & 0x0F], out);
        }
       lily_cookie_fprintf (out, "00>");        /* Adobe bug? */
@@ -131,9 +128,9 @@ print_trailer (void *out,
   const int GLYPH_NAME_LEN = 256;
   char glyph_name[GLYPH_NAME_LEN];
 
-  TT_MaxProfile * mp = 
-    (TT_MaxProfile *)FT_Get_Sfnt_Table(face, ft_sfnt_maxp);
-  
+  TT_MaxProfile *mp
+    = (TT_MaxProfile *)FT_Get_Sfnt_Table (face, ft_sfnt_maxp);
+
   lily_cookie_fprintf (out, "/CharStrings %d dict dup begin\n", mp->numGlyphs);
   for (int i = 0; i < mp->numGlyphs; i++)
     {
@@ -144,7 +141,7 @@ print_trailer (void *out,
       else
        lily_cookie_fprintf (out, "/%s %d def ", glyph_name, i);
 
-      if (!(i % 5))
+      if (! (i % 5))
        lily_cookie_fprintf (out, "\n");
     }
   lily_cookie_fprintf (out, "end readonly def\n");
@@ -155,13 +152,12 @@ static void
 create_type42_font (void *out, String name)
 {
   FT_Face face = open_ft_face (name);
-  
+
   print_header (out, face);
   print_body (out, name);
   print_trailer (out, face);
 }
 
-
 LY_DEFINE (ly_ttf_to_pfa, "ly:ttf->pfa",
           1, 0, 0, (SCM ttf_file_name),
           "Convert the contents of a TTF file to Type42 PFA, returning it as "
@@ -173,7 +169,7 @@ LY_DEFINE (ly_ttf_to_pfa, "ly:ttf->pfa",
   String file_name = ly_scm2string (ttf_file_name);
   if (be_verbose_global)
     progress_indication ("[" + file_name);
-  
+
   Memory_out_stream stream;
 
   create_type42_font (&stream, file_name);
@@ -182,6 +178,6 @@ LY_DEFINE (ly_ttf_to_pfa, "ly:ttf->pfa",
 
   if (be_verbose_global)
     progress_indication ("]");
-  
+
   return asscm;
 }
index d63ae09ecefe849dba095c3a09f1483fbacd77bb..828bc58e37f4ebca3759b060c2790e6e8d360dce 100644 (file)
@@ -49,7 +49,7 @@
 static Item *
 get_x_bound_item (Grob *me_grob, Direction hdir, Direction my_dir)
 {
-  Spanner *me = dynamic_cast<Spanner*> (me_grob);
+  Spanner *me = dynamic_cast<Spanner *> (me_grob);
   Item *g = me->get_bound (hdir);
   if (Note_column::has_interface (g)
       && Note_column::get_stem (g)
@@ -73,14 +73,12 @@ Tuplet_bracket::parallel_beam (Grob *me_grob, Link_array<Grob> const &cols, bool
   Grob *s1 = Note_column::get_stem (cols[0]);
   Grob *s2 = Note_column::get_stem (cols.top ());
 
-
   if (s2 != me->get_bound (RIGHT))
     return 0;
 
   Grob *b1 = s1 ? Stem::get_beam (s1) : 0;
   Grob *b2 = s2 ? Stem::get_beam (s2) : 0;
 
-
   *equally_long = false;
   if (! (b1 && (b1 == b2) && !me->is_broken ()))
     return 0;
@@ -119,10 +117,10 @@ Tuplet_bracket::print (SCM smob)
       {
        /*
          UGH. dependency tracking!
-        */
+       */
        extract_grob_set (me, "tuplets", tuplets);
        for (int i = 0; i < tuplets.size (); i++)
-         Tuplet_bracket::print (tuplets[i]->self_scm());
+         Tuplet_bracket::print (tuplets[i]->self_scm ());
 
        after_line_breaking (smob);
       }
@@ -175,10 +173,10 @@ Tuplet_bracket::print (SCM smob)
     {
       x_span[d] = robust_relative_extent (bounds[d], commonx, X_AXIS)[d];
       Direction break_dir = bounds[d]->break_status_dir ();
-      Spanner *orig_spanner = dynamic_cast<Spanner*> (me->original_);
+      Spanner *orig_spanner = dynamic_cast<Spanner *> (me->original_);
       connect_to_other[d]
        = (break_dir
-          && (me->get_break_index() - break_dir < orig_spanner->broken_intos_.size()));
+          && (me->get_break_index () - break_dir < orig_spanner->broken_intos_.size ()));
 
       if (connect_to_other[d])
        {
@@ -188,23 +186,23 @@ Tuplet_bracket::print (SCM smob)
          if (d == RIGHT)
            x_span[d] += d * overshoot[d];
          else
-           x_span[d] = robust_relative_extent(bounds[d], commonx, X_AXIS)[RIGHT]
+           x_span[d] = robust_relative_extent (bounds[d], commonx, X_AXIS)[RIGHT]
              - overshoot[LEFT];
        }
       else if (d == RIGHT
               && (columns.is_empty ()
-               || (bounds[d]->get_column ()
-                   != dynamic_cast<Item*> (columns.top())->get_column ())))
+                  || (bounds[d]->get_column ()
+                      != dynamic_cast<Item *> (columns.top ())->get_column ())))
        {
          /*
            TODO: make padding tunable?
-          */
+         */
          x_span[d] = robust_relative_extent (bounds[d], commonx, X_AXIS) [LEFT] - 1.0;
        }
     }
   while (flip (&d) != LEFT);
 
-  Real w = x_span.length();
+  Real w = x_span.length ();
   SCM number = me->get_property ("text");
 
   Output_def *pap = me->get_layout ();
@@ -282,7 +280,6 @@ Tuplet_bracket::print (SCM smob)
        }
       while (flip (&d) != LEFT);
 
-
       Stencil brack = make_bracket (me, Y_AXIS,
                                    Offset (w, ry - ly),
                                    height,
@@ -300,7 +297,6 @@ Tuplet_bracket::print (SCM smob)
        }
       while (flip (&d) != LEFT);
 
-
       mol.add_stencil (brack);
     }
 
@@ -393,14 +389,13 @@ Tuplet_bracket::get_bounds (Grob *me, Grob **left, Grob **right)
     }
 }
 
-
 /*
   use first -> last note for slope, and then correct for disturbing
   notes in between.  */
 void
 Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
 {
-  Spanner *me = dynamic_cast<Spanner*> (me_grob);
+  Spanner *me = dynamic_cast<Spanner *> (me_grob);
 
   extract_grob_set (me, "note-columns", columns);
   extract_grob_set (me, "tuplets", tuplets);
@@ -505,15 +500,13 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
            Let's not take padding into account for nested tuplets.
            the edges can come very close to the stems, likewise for
            nested tuplets?
-          */
+         */
          Drul_array<Real> my_height
            = robust_scm2drul (me->get_property ("edge-height"),
                               Interval (0, 0));
-         if (dynamic_cast<Spanner*> (tuplets[i])->get_bound (d)
-             ==  me->get_bound (d))
-           {
-             y += dir * my_height[d];
-           }
+         if (dynamic_cast<Spanner *> (tuplets[i])->get_bound (d)
+             == me->get_bound (d))
+           y += dir * my_height[d];
 #endif
 
          points.push (Offset (tuplet_x[d] - x0, y));
@@ -646,7 +639,7 @@ Tuplet_bracket::get_default_dir (Grob *me)
 {
   Drul_array<int> dirs (0, 0);
   extract_grob_set (me, "note-columns", columns);
-  for (int i = 0 ; i < columns.size (); i++)
+  for (int i = 0; i < columns.size (); i++)
     {
       Grob *nc = columns[i];
       Direction d = Note_column::dir (nc);
@@ -674,7 +667,6 @@ Tuplet_bracket::add_tuplet_bracket (Grob *me, Grob *bracket)
 }
 
 
-
 ADD_INTERFACE (Tuplet_bracket,
               "tuplet-bracket-interface",
               "A bracket with a number in the middle, used for tuplets. "
index 5c925b7621dad3e4893a2bcf4da7c7b2f30d3262..08954e8574197b568db1dfed767589d79e97661b 100644 (file)
@@ -33,7 +33,6 @@ struct Tuplet_description
 };
 
 
-
 class Tuplet_engraver : public Engraver
 {
 public:
@@ -79,7 +78,6 @@ Tuplet_engraver::process_music ()
 {
   if (!tuplets_.size ())
     return;
-  
 
   tuplets_.sort (&Tuplet_description::compare);
   for (int i = 0; i < tuplets_.size (); i++)
@@ -91,10 +89,10 @@ Tuplet_engraver::process_music ()
                                       tuplets_[i].music_->self_scm ());
       tuplets_[i].spanner_ = spanner;
 
-      if (i > 0 && tuplets_[i-1].spanner_)
-       Tuplet_bracket::add_tuplet_bracket (tuplets_[i].spanner_, tuplets_[i-1].spanner_);
-      if (i < tuplets_.size()-1 && tuplets_[i+1].spanner_)
-       Tuplet_bracket::add_tuplet_bracket (tuplets_[i+1].spanner_, tuplets_[i].spanner_);
+      if (i > 0 && tuplets_[i - 1].spanner_)
+       Tuplet_bracket::add_tuplet_bracket (tuplets_[i].spanner_, tuplets_[i - 1].spanner_);
+      if (i < tuplets_.size () - 1 && tuplets_[i + 1].spanner_)
+       Tuplet_bracket::add_tuplet_bracket (tuplets_[i + 1].spanner_, tuplets_[i].spanner_);
 
       SCM proc = get_property ("tupletNumberFormatFunction");
       if (ly_is_procedure (proc))
@@ -120,7 +118,7 @@ Tuplet_engraver::start_translation_timestep ()
   Moment now = now_mom ();
 
   last_tuplets_.clear ();
-  if (tuplets_.is_empty())
+  if (tuplets_.is_empty ())
     return;
 
   Moment tsdmom = robust_scm2moment (get_property ("tupletSpannerDuration"), Moment (0));
@@ -134,10 +132,10 @@ Tuplet_engraver::start_translation_timestep ()
        {
          if (tuplets_[i].spanner_)
            {
-             if (full_length )
+             if (full_length)
                {
-                 Item * col = unsmob_item (get_property ("currentMusicalColumn"));
-             
+                 Item *col = unsmob_item (get_property ("currentMusicalColumn"));
+
                  tuplets_[i].spanner_->set_bound (RIGHT, col);
                }
              else if (!tuplets_[i].spanner_->get_bound (RIGHT))
@@ -153,9 +151,7 @@ Tuplet_engraver::start_translation_timestep ()
        }
 
       if (now.main_part_ >= tuplets_[i].stop_)
-       {
-         tuplets_.del (i);
-       }
+       tuplets_.del (i);
     }
 }
 
@@ -166,7 +162,7 @@ Tuplet_engraver::finalize ()
     {
       for (int i = 0; i < last_tuplets_.size (); i++)
        {
-         Item * col = unsmob_item (get_property ("currentCommandColumn"));
+         Item *col = unsmob_item (get_property ("currentCommandColumn"));
          last_tuplets_[i]->set_bound (RIGHT, col);
        }
     }
@@ -176,10 +172,10 @@ Tuplet_engraver::Tuplet_engraver ()
 {
 }
 
-ADD_ACKNOWLEDGER (Tuplet_engraver,note_column);
+ADD_ACKNOWLEDGER (Tuplet_engraver, note_column);
 ADD_TRANSLATOR (Tuplet_engraver,
                /* doc */ "Catch Time_scaled_music and generate appropriate bracket  ",
                /* create */ "TupletBracket",
                /* accept */ "time-scaled-music",
-               /* read */ "tupletNumberFormatFunction tupletSpannerDuration tupletFullLength" ,
+               /* read */ "tupletNumberFormatFunction tupletSpannerDuration tupletFullLength",
                /* write */ "");
index cb420405ebed4cc163fd9b0aa269c004983accd0..7e6c04e3814736f2c0b7f76df28689e682ea187a 100644 (file)
@@ -67,6 +67,6 @@ ADD_TRANSLATOR (Note_swallow_translator,
                "",
                "note-event",
                "",
-       
+
                "");
 
index a0fef55567bcf1034d00edfbbfa87e78e840b142..ef4b72ccb2d8c7606a2e2eace081d41ede782e30 100644 (file)
@@ -1,6 +1,6 @@
 /*
   unfolded-repeat-iterator.cc -- implement Unfolded_repeat_iterator
-  
+
   source file of the GNU LilyPond music typesetter
 
   (c) 2002--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
index 3a68c6fac8ab4f2a87d2636a30cca80279580dbb..5ee55163f8d928005344391fb4d102782131060f 100644 (file)
@@ -203,9 +203,7 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
        {
          SCM delta_pitch_scm = prev_primitive->get_property ("delta-pitch");
          if (delta_pitch_scm != SCM_EOL)
-           {
-             delta_pitch = scm_to_int (delta_pitch_scm);
-           }
+           delta_pitch = scm_to_int (delta_pitch_scm);
          else
            {
              primitive->programming_error ("Vaticana_ligature:"
@@ -369,9 +367,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
       int delta_pitch;
       SCM delta_pitch_scm = primitive->get_property ("delta-pitch");
       if (delta_pitch_scm != SCM_EOL)
-       {
-         delta_pitch = scm_to_int (delta_pitch_scm);
-       }
+       delta_pitch = scm_to_int (delta_pitch_scm);
       else
        {
          primitive->programming_error ("Vaticana_ligature:"
@@ -471,14 +467,14 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
                prev_primitive->set_property ("add-cauda",
                                              ly_bool2scm (false));
              }
-             if (prev_delta_pitch < - 1)
-               {
-                 glyph_name = "svaticana.reverse.plica";
-               }
-             else
-               {
-                 glyph_name = "svaticana.reverse.vplica";
-               }
+           if (prev_delta_pitch < - 1)
+             {
+               glyph_name = "svaticana.reverse.plica";
+             }
+           else
+             {
+               glyph_name = "svaticana.reverse.vplica";
+             }
          }
        else // (prev_delta_pitch == 0)
          {
index a855cd34f70d4b8fcc1f7e5946832164493639f6..e9ab261d74fb7df6449eccc0ee940ee0a06c1ed7 100644 (file)
@@ -22,8 +22,8 @@ class Vertical_align_engraver : public Engraver
 {
   Spanner *valign_;
   bool qualifies (Grob_info) const;
-  SCM id_to_group_hashtab_;  
-  
+  SCM id_to_group_hashtab_;
+
 public:
   TRANSLATOR_DECLARATIONS (Vertical_align_engraver);
   DECLARE_ACKNOWLEDGER (axis_group);
@@ -44,7 +44,6 @@ ADD_TRANSLATOR (Vertical_align_engraver,
                /* read */ "",
                /* write */ "");
 
-
 Vertical_align_engraver::Vertical_align_engraver ()
 {
   valign_ = 0;
@@ -54,7 +53,7 @@ Vertical_align_engraver::Vertical_align_engraver ()
 void
 Vertical_align_engraver::derived_mark () const
 {
-  scm_gc_mark (id_to_group_hashtab_); 
+  scm_gc_mark (id_to_group_hashtab_);
 }
 
 void
@@ -63,7 +62,6 @@ Vertical_align_engraver::initialize ()
   id_to_group_hashtab_ = scm_c_make_hash_table (11);
 }
 
-
 void
 Vertical_align_engraver::process_music ()
 {
@@ -103,36 +101,35 @@ Vertical_align_engraver::acknowledge_axis_group (Grob_info i)
       scm_hash_set_x (id_to_group_hashtab_, scm_makfrom0str (id.to_str0 ()),
                      i.grob ()->self_scm ());
 
-
       SCM before_id = i.context ()->get_property ("alignAboveContext");
       SCM after_id = i.context ()->get_property ("alignBelowContext");
-      
-      SCM before = scm_hash_ref (id_to_group_hashtab_,  before_id, SCM_BOOL_F);
-      SCM after = scm_hash_ref (id_to_group_hashtab_,  after_id, SCM_BOOL_F);
 
-      Grob * before_grob = unsmob_grob (before);
-      Grob * after_grob = unsmob_grob (after);
-      
+      SCM before = scm_hash_ref (id_to_group_hashtab_, before_id, SCM_BOOL_F);
+      SCM after = scm_hash_ref (id_to_group_hashtab_, after_id, SCM_BOOL_F);
+
+      Grob *before_grob = unsmob_grob (before);
+      Grob *after_grob = unsmob_grob (after);
+
       Align_interface::add_element (valign_, i.grob (),
                                    get_property ("verticalAlignmentChildCallback"));
 
       if (before_grob || after_grob)
        {
-         Grob_array * ga = unsmob_grob_array (valign_->get_object ("elements"));
+         Grob_array *ga = unsmob_grob_array (valign_->get_object ("elements"));
          Link_array<Grob> &arr = ga->array_reference ();
-         
-         Grob *added = arr.pop();
-         for (int i = 0 ; i < arr.size (); i++)
+
+         Grob *added = arr.pop ();
+         for (int i = 0; i < arr.size (); i++)
            {
              if (arr[i] == before_grob)
                {
                  arr.insert (added, i);
-                 break ; 
+                 break;
                }
              else if (arr[i] == after_grob)
                {
                  arr.insert (added, i + 1);
-                 break ;
+                 break;
                }
            }
        }
index 99a00ef2f0e5515ecb2d598808335f34a6ddddd3..59aeee40d04c79b67c7dd19068624aa2db2f9fe4 100644 (file)
@@ -4,7 +4,6 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "engraver.hh"
@@ -15,7 +14,7 @@
 
 class Vertically_spaced_contexts_engraver : public Engraver
 {
-  TRANSLATOR_DECLARATIONS(Vertically_spaced_contexts_engraver);
+  TRANSLATOR_DECLARATIONS (Vertically_spaced_contexts_engraver);
 protected:
   virtual void initialize ();
   DECLARE_ACKNOWLEDGER (vertically_spaceable);
@@ -25,7 +24,6 @@ private:
 };
 
 
-
 Vertically_spaced_contexts_engraver::Vertically_spaced_contexts_engraver ()
 {
   system_ = 0;
index 122167b6e19fe1f3d6d4e05ea5a7684d8fcf515c..6899cba2c1cf1286993a7fced9ed02d8e8554f45 100644 (file)
@@ -44,7 +44,7 @@ Volta_bracket_interface::print (SCM smob)
   bool no_vertical_end = orig_span && !broken_last_bracket;
 
   extract_grob_set (me, "bars", bars);
-  Grob *endbar = bars.size() ? bars.top () : 0;
+  Grob *endbar = bars.size () ? bars.top () : 0;
   SCM glyph = endbar ? endbar->get_property ("glyph") : SCM_EOL;
 
   String str;
index 6ab9ed6ddf23cd9c4fbb4426df0b7143c28191d6..7185b8fb4b7afc39101786299d4c014fdcba7a0a 100644 (file)
@@ -30,12 +30,12 @@ protected:
   DECLARE_ACKNOWLEDGER (staff_symbol);
   DECLARE_ACKNOWLEDGER (note_column);
   DECLARE_ACKNOWLEDGER (bar_line);
-  
+
   virtual void finalize ();
   virtual void derived_mark () const;
   void stop_translation_timestep ();
   void process_music ();
-  
+
   Moment started_mom_;
   Spanner *volta_span_;
   Spanner *end_volta_span_;
@@ -176,7 +176,7 @@ void
 Volta_engraver::acknowledge_note_column (Grob_info i)
 {
   if (volta_span_)
-    Volta_bracket_interface::add_column (volta_span_, i.grob());
+    Volta_bracket_interface::add_column (volta_span_, i.grob ());
 }
 
 void
@@ -187,7 +187,7 @@ Volta_engraver::acknowledge_bar_line (Grob_info i)
   if (end_volta_span_)
     Volta_bracket_interface::add_bar (end_volta_span_, i.item ());
 }
+
 void
 Volta_engraver::acknowledge_staff_symbol (Grob_info i)
 {
index af1127f261cbe71e6b124441e3787799d60f490b..c8132638f7d72788f2428c2ae8c7c8a7fc408e68 100644 (file)
@@ -7,7 +7,6 @@
   (c) 2002--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-
 #include "music.hh"
 #include "sequential-iterator.hh"
 #include "context.hh"