]> git.donarmstrong.com Git - lilypond.git/commitdiff
run astyle 2.02
authorGraham Percival <graham@percival-music.ca>
Fri, 30 Mar 2012 08:04:42 +0000 (09:04 +0100)
committerGraham Percival <graham@percival-music.ca>
Fri, 30 Mar 2012 08:11:57 +0000 (09:11 +0100)
34 files changed:
lily/ambitus-engraver.cc
lily/bar-line.cc
lily/beaming-pattern.cc
lily/context-def.cc
lily/context-property.cc
lily/context.cc
lily/dispatcher.cc
lily/include/interval-minefield.hh
lily/include/lily-lexer.hh
lily/include/listener.hh
lily/include/system.hh
lily/interval-minefield.cc
lily/lookup.cc
lily/multi-measure-rest.cc
lily/music-sequence.cc
lily/new-fingering-engraver.cc
lily/note-collision.cc
lily/page-layout-problem.cc
lily/paper-book.cc
lily/program-option-scheme.cc
lily/quote-iterator.cc
lily/rest.cc
lily/rhythmic-music-iterator.cc
lily/self-alignment-interface.cc
lily/simple-spacer.cc
lily/slur-engraver.cc
lily/source-file.cc
lily/staff-symbol.cc
lily/stem-engraver.cc
lily/stem.cc
lily/stream-event.cc
lily/text-interface.cc
lily/timing-translator.cc
lily/tuplet-bracket.cc

index 8690b01f80b4dedab341344fb3e8ff8485fcfe00..2d2f027c4ee4277318da5c144051d8f8a1117fec 100644 (file)
@@ -238,7 +238,7 @@ ADD_TRANSLATOR (Ambitus_engraver,
                 /* read */
                 "keySignature "
                 "middleCClefPosition "
-               "middleCOffset ",
+                "middleCOffset ",
 
                 /* write */
                 ""
index 1f2d9b2963401327cc49a04ffe3920c937eba6ac..cee5f222430220f906f1120dfb6ff7660673406d 100644 (file)
@@ -287,7 +287,7 @@ Bar_line::compound_barline (Grob *me, string str, Interval const &extent,
   else if (str == "'")
     m = tick_bar_line (me, extent.at (UP), rounded);
   else if (str == "kievan")
-    m.add_stencil (Font_interface::get_default_font (me)->find_by_name("scripts.barline.kievan"));
+    m.add_stencil (Font_interface::get_default_font (me)->find_by_name ("scripts.barline.kievan"));
   return m;
 }
 
index 8f27c23ef57955f027151c4fd8e8b3d93a8fc9bc..411b5fbedb8422aeba060159a9dfd7901f6dd3e3 100644 (file)
@@ -44,7 +44,7 @@ Beam_rhythmic_element::Beam_rhythmic_element ()
 }
 
 Beam_rhythmic_element::Beam_rhythmic_element (Moment m, int i, bool inv,
-  Rational factor, bool tuplet_start)
+                                              Rational factor, bool tuplet_start)
 {
   start_moment_ = m;
   rhythmic_importance_ = 0;
@@ -189,7 +189,6 @@ update_tuplet (Moment start_moment, Rational factor, Moment *tuplet_start_moment
     *tuplet_start_moment = Moment (-1, 1);
 }
 
-
 /*
    Get the group start position, the next group starting position, and the
    next beat starting position, given start_moment, base_moment,
@@ -224,7 +223,7 @@ find_location (SCM grouping, Moment base_moment, Moment start_moment,
           // We use 1/8 as the base moment for the tuplet because it's
           // the largest beamed value.  If the tuplet is shorter, it's
           // OK, the code still works
-          int test_count = ( Moment (Rational (1, 8) / factor ) / base_moment).num ();
+          int test_count = ( Moment (Rational (1, 8) / factor) / base_moment).num ();
           if (test_count > group_count) group_count = test_count;
         }
       *group_pos = *next_group_pos;
@@ -282,8 +281,8 @@ Beaming_pattern::find_rhythmic_importance (Beaming_options const &options)
           // the fraction of the tuplet, instead of the fraction of
           // a beat.
           Moment ratio = (tuplet_number == 1)
-                           ? dt / options.base_moment_
-                           : tuplet_dt / Moment (1, 8)  / tuplet_moment;
+                         ? dt / options.base_moment_
+                         : tuplet_dt / Moment (1, 8) / tuplet_moment;
           if (infos_[i].rhythmic_importance_ >= 0)
             infos_[i].rhythmic_importance_ = (int) ratio.den ();
 
@@ -357,7 +356,7 @@ Beaming_pattern::end_moment (int i) const
                 0);
 
   return infos_.at (i).start_moment_
-    + infos_.at(i).factor_ * dur.get_length ();
+         + infos_.at (i).factor_ * dur.get_length ();
 }
 
 bool
index d4f3dc3433d8952c84b7d359007db3f1e161a58d..f2d7e2e1373a67feddef988f1f3aebeaae5b8d30 100644 (file)
@@ -147,7 +147,7 @@ Context_def::add_context_mod (SCM mod)
            || ly_symbol2scm ("push") == tag
            || ly_symbol2scm ("assign") == tag
            || ly_symbol2scm ("unset") == tag
-          || ly_symbol2scm ("apply") == tag)
+           || ly_symbol2scm ("apply") == tag)
     property_ops_ = scm_cons (mod, property_ops_);
   else if (ly_symbol2scm ("alias") == tag)
     context_aliases_ = scm_cons (sym, context_aliases_);
@@ -296,8 +296,8 @@ Context_def::get_translator_names (SCM user_mod) const
         l1 = scm_cons (arg, l1);
       else if (ly_symbol2scm ("remove") == tag
                && (scm_is_pair (arg)
-                  || ly_is_procedure (arg)
-                  || get_translator (arg)))
+                   || ly_is_procedure (arg)
+                   || get_translator (arg)))
         l1 = scm_delete_x (arg, l1);
     }
 
@@ -387,7 +387,7 @@ Context_def::is_alias (SCM sym) const
 }
 
 LY_DEFINE (ly_context_def_lookup, "ly:context-def-lookup",
-          2, 1, 0, (SCM def, SCM sym, SCM val),
+           2, 1, 0, (SCM def, SCM sym, SCM val),
            "Return the value of @var{sym} in output definition @var{def}"
            " (e.g., @code{\\paper}).  If no value is found, return"
            " @var{val} or @code{'()} if @var{val} is undefined.")
@@ -410,9 +410,9 @@ LY_DEFINE (ly_context_def_lookup, "ly:context-def-lookup",
 }
 
 LY_DEFINE (ly_context_def_modify, "ly:context-def-modify",
-          2, 0, 0, (SCM def, SCM mod),
-          "Return the result of applying the context-mod @var{mod} to"
-          " the context definition @var{def}.  Does not change @var{def}.")
+           2, 0, 0, (SCM def, SCM mod),
+           "Return the result of applying the context-mod @var{mod} to"
+           " the context definition @var{def}.  Does not change @var{def}.")
 {
   LY_ASSERT_SMOB (Context_def, def, 1);
   LY_ASSERT_SMOB (Context_mod, mod, 2);
index be27388eaeb17688f2604e899725268ae567de21..1ccfe5a970973e7ce3be409406985dcafd0e42f7 100644 (file)
@@ -231,14 +231,15 @@ apply_property_operations (Context *tg, SCM pre_init_ops)
       SCM type = scm_car (entry);
       entry = scm_cdr (entry);
       if (!scm_is_pair (entry))
-       continue;
+        continue;
       SCM context_prop = scm_car (entry);
-      if (scm_is_pair (context_prop)) {
-       if (tg->is_alias (scm_car (context_prop)))
-         context_prop = scm_cdr (context_prop);
-       else
-         continue;
-      }
+      if (scm_is_pair (context_prop))
+        {
+          if (tg->is_alias (scm_car (context_prop)))
+            context_prop = scm_cdr (context_prop);
+          else
+            continue;
+        }
 
       if (type == ly_symbol2scm ("push"))
         {
@@ -255,7 +256,7 @@ apply_property_operations (Context *tg, SCM pre_init_ops)
       else if (type == ly_symbol2scm ("assign"))
         tg->set_property (context_prop, scm_cadr (entry));
       else if (type == ly_symbol2scm ("apply"))
-       scm_apply_1 (context_prop, tg->self_scm (), scm_cdr (entry));
+        scm_apply_1 (context_prop, tg->self_scm (), scm_cdr (entry));
     }
 }
 
index 392077861828ea7683644662eb3ff1974afeca38..34b75523ea38d3e1e2f76c68bf606c55c7e02ee7 100644 (file)
@@ -327,7 +327,7 @@ Context::path_to_acceptable_context (SCM name) const
 
   return unsmob_context_def (definition_)->path_to_acceptable_context (name,
          get_output_def (),
-        scm_reverse_x (accepts, SCM_EOL));
+         scm_reverse_x (accepts, SCM_EOL));
 
 }
 
index ad1a624b121917b67fe03bc0944cce96a0325de4..94519021abe43ccb4def37ce25fa595e3dd676a9 100644 (file)
@@ -59,7 +59,7 @@ Dispatcher::print_smob (SCM s, SCM p, scm_print_state *)
   Dispatcher *me = (Dispatcher *) SCM_CELL_WORD_1 (s);
   scm_puts ("#<Dispatcher ", p);
   scm_write (scm_call_1 (ly_lily_module_constant ("hash-table->alist"),
-                        me->listeners_), p);
+                         me->listeners_), p);
   scm_puts (">", p);
   return 1;
 }
index 6c2eb67b26aebca048ba0c9d8ff8125c73a87a16..b618b94720ca780ebee5aea040e8bf2c662591e8 100644 (file)
 
 class Interval_minefield
 {
-public :
+public:
   Interval_minefield (Interval, Real);
   void add_forbidden_interval (Interval forbidden);
   Interval feasible_placements ();
   void solve ();
 
-private :
+private:
   vector<Interval> forbidden_intervals_;
   Interval feasible_placements_;
   Real bulk_;
 };
 
-#endif // INTERVAL_MINEFIELD_HH
\ No newline at end of file
+#endif // INTERVAL_MINEFIELD_HH
index a10d89cee31465a6f7bffd3acfecd627f96e4abc..637580056589ed73c00c596733923ac0932b7e1b 100644 (file)
@@ -43,7 +43,7 @@ private:
   int scan_scm_id (SCM);
   int identifier_type (SCM);
   char escaped_char (char) const;
-  const char * YYText_utf8 ();
+  const char *YYText_utf8 ();
 
   Lily_parser *parser_;
   Keyword_table *keytable_;
index fb69922493ff6877c5c0388e8491346cac56d493..e0827f8786dc372ceaee9256f159e7d1dbe0c7d5 100644 (file)
@@ -82,8 +82,9 @@ public:
   void listen (SCM ev) const;
 
   bool operator == (Listener const &other) const
-  { return type_ == other.type_
-      && (*type_->equal_callback)((void *) target_, (void *) other.target_ );
+  {
+    return type_ == other.type_
+           && (*type_->equal_callback) ((void *) target_, (void *) other.target_);
   }
 
   DECLARE_SIMPLE_SMOBS (Listener);
@@ -124,7 +125,7 @@ cl :: method ## _listener () const                      \
   inline void name (SCM);                               \
   static void name ## _callback (void *self, SCM ev);   \
   static void name ## _mark (void *self);               \
-  static bool name ## _is_equal (void *a, void *b);    \
+  static bool name ## _is_equal (void *a, void *b);     \
   Listener name ## _listener () const
 
 #endif /* LISTENER_HH */
index b1189769cd0703c4fa13978e64d2ca05871d087a..453e48234deb3248544f5ed139ede07605f347e3 100644 (file)
@@ -41,7 +41,7 @@ public:
   Paper_score *paper_score () const;
   Grob *get_vertical_alignment ();
   Grob *get_extremal_staff (Direction dir, Interval const &);
-  Grob * get_neighboring_staff (Direction dir, Grob *vertical_axis_group, Interval_t<int> bounds);
+  Grob *get_neighboring_staff (Direction dir, Grob *vertical_axis_group, Interval_t<int> bounds);
   Grob *get_pure_bound (Direction dir, int start, int end);
   Grob *get_maybe_pure_bound (Direction dir, bool pure, int start, int end);
   int get_rank () const;
index 79e17d97f9f6837526f49c654258658f903babb9..7571e219ece4d062563c826d4be455c5e931cd4c 100644 (file)
@@ -38,18 +38,18 @@ Interval_minefield::feasible_placements ()
   return feasible_placements_;
 }
 
-  /*
-    forbidden_intervals_ contains a vector of intervals in which
-    the beam cannot start.  it iterates through these intervals,
-    pushing feasible_placements_ epsilon over or epsilon under a
-    collision.  when this type of change happens, the loop is marked
-    as "dirty" and re-iterated.
+/*
+  forbidden_intervals_ contains a vector of intervals in which
+  the beam cannot start.  it iterates through these intervals,
+  pushing feasible_placements_ epsilon over or epsilon under a
+  collision.  when this type of change happens, the loop is marked
+  as "dirty" and re-iterated.
 
-    TODO: figure out a faster ways that this loop can happen via
-    a better search algorithm.
-  */
+  TODO: figure out a faster ways that this loop can happen via
+  a better search algorithm.
+*/
 void
-Interval_minefield::solve()
+Interval_minefield::solve ()
 {
   Real epsilon = 1.0e-10;
   bool dirty = false;
@@ -71,7 +71,7 @@ Interval_minefield::solve()
                        || feasible_widened.contains (forbidden_intervals_[i][d])
                        || feasible_widened.contains (forbidden_intervals_[i][-d]))
                 {
-                  feasible_placements_[d] = forbidden_intervals_[i][d] + d * (epsilon +  (bulk_ / 2));
+                  feasible_placements_[d] = forbidden_intervals_[i][d] + d * (epsilon + (bulk_ / 2));
                   dirty = true;
                 }
             }
index f55e2f2a1e84767b1fc9dbcad15aaf92406fa72a..4d4c0bdf6a6966925a91ec7d254808fa60554a57 100644 (file)
@@ -449,25 +449,25 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick,
 Stencil
 Lookup::bezier_sandwich (Bezier top_curve, Bezier bottom_curve, Real thickness)
 {
-  SCM commands  = scm_list_n (ly_symbol2scm ("moveto"),
-                              scm_from_double (top_curve.control_[0][X_AXIS]),
-                              scm_from_double (top_curve.control_[0][Y_AXIS]),
-                              ly_symbol2scm ("curveto"),
-                              scm_from_double (top_curve.control_[1][X_AXIS]),
-                              scm_from_double (top_curve.control_[1][Y_AXIS]),
-                              scm_from_double (top_curve.control_[2][X_AXIS]),
-                              scm_from_double (top_curve.control_[2][Y_AXIS]),
-                              scm_from_double (top_curve.control_[3][X_AXIS]),
-                              scm_from_double (top_curve.control_[3][Y_AXIS]),
-                              ly_symbol2scm ("curveto"),
-                              scm_from_double (bottom_curve.control_[2][X_AXIS]),
-                              scm_from_double (bottom_curve.control_[2][Y_AXIS]),
-                              scm_from_double (bottom_curve.control_[1][X_AXIS]),
-                              scm_from_double (bottom_curve.control_[1][Y_AXIS]),
-                              scm_from_double (bottom_curve.control_[0][X_AXIS]),
-                              scm_from_double (bottom_curve.control_[0][Y_AXIS]),
-                              ly_symbol2scm ("closepath"),
-                              SCM_UNDEFINED);
+  SCM commands = scm_list_n (ly_symbol2scm ("moveto"),
+                             scm_from_double (top_curve.control_[0][X_AXIS]),
+                             scm_from_double (top_curve.control_[0][Y_AXIS]),
+                             ly_symbol2scm ("curveto"),
+                             scm_from_double (top_curve.control_[1][X_AXIS]),
+                             scm_from_double (top_curve.control_[1][Y_AXIS]),
+                             scm_from_double (top_curve.control_[2][X_AXIS]),
+                             scm_from_double (top_curve.control_[2][Y_AXIS]),
+                             scm_from_double (top_curve.control_[3][X_AXIS]),
+                             scm_from_double (top_curve.control_[3][Y_AXIS]),
+                             ly_symbol2scm ("curveto"),
+                             scm_from_double (bottom_curve.control_[2][X_AXIS]),
+                             scm_from_double (bottom_curve.control_[2][Y_AXIS]),
+                             scm_from_double (bottom_curve.control_[1][X_AXIS]),
+                             scm_from_double (bottom_curve.control_[1][Y_AXIS]),
+                             scm_from_double (bottom_curve.control_[0][X_AXIS]),
+                             scm_from_double (bottom_curve.control_[0][Y_AXIS]),
+                             ly_symbol2scm ("closepath"),
+                             SCM_UNDEFINED);
 
   SCM horizontal_bend = scm_list_n (ly_symbol2scm ("path"),
                                     scm_from_double (thickness),
index daa9454c4a196a5c74ca3b53033f0a203ce23249..9ffaf4e18c03986b1852919ea893f652f6f9606f 100644 (file)
@@ -211,12 +211,12 @@ Multi_measure_rest::symbol_stencil (Grob *me, Real space)
   if (measure_count == 1)
     {
       if (mdl == 0 && me->get_property ("staff-position") == SCM_EOL)
-       {
-         if (Staff_symbol_referencer::on_staff_line (me, 2))
-           me->set_property ("staff-position", scm_from_int (2));
-         else if (Staff_symbol_referencer::on_staff_line (me, 3))
-           me->set_property ("staff-position", scm_from_int (3));
-       }
+        {
+          if (Staff_symbol_referencer::on_staff_line (me, 2))
+            me->set_property ("staff-position", scm_from_int (2));
+          else if (Staff_symbol_referencer::on_staff_line (me, 3))
+            me->set_property ("staff-position", scm_from_int (3));
+        }
 
       Stencil s = musfont->find_by_name (Rest::glyph_name (me, mdl, "", true));
 
index dde9b653c9a3b6d84542b2de321f61e41b9c66ab..7ab62470b567bc5fad37a004329749d7fa7d00a2 100644 (file)
@@ -88,10 +88,11 @@ Music_sequence::event_chord_length_callback (SCM m)
   Music *me = unsmob_music (m);
   Duration *d = unsmob_duration (me->get_property ("duration"));
   // Preset duration is used in chord repetitions.
-  if (d) {
-    Moment mom = d->get_length ();
-    return mom.smobbed_copy ();
-  }
+  if (d)
+    {
+      Moment mom = d->get_length ();
+      return mom.smobbed_copy ();
+    }
   return maximum_length (me->get_property ("elements")).smobbed_copy ();
 }
 
index 9ae9a9998aa9717145d8ea0c3379df1f1f12ee29..b6275b07216cc598316508a4e43402c228ae35aa 100644 (file)
@@ -85,7 +85,7 @@ protected:
 void
 New_fingering_engraver::acknowledge_inline_accidental (Grob_info inf)
 {
-  accidentals_.push_back(inf.grob ());
+  accidentals_.push_back (inf.grob ());
 }
 
 void
@@ -114,15 +114,15 @@ New_fingering_engraver::acknowledge_rhythmic_head (Grob_info inf)
       else if (ev->in_event_class ("script-event"))
         add_script (inf.grob (), ev, note_ev);
       else if (ev->in_event_class ("string-number-event"))
-        {    
+        {
           // String numbers are used in calculating harmonics even
           // when we don't want them displayed.  So don't make space
           // for them if 'stencil is #f
           Grob *g = make_item ("StringNumber", ev->self_scm ());
           if (g->get_property ("stencil") != SCM_BOOL_F)
             add_fingering (inf.grob (),
-                            ly_symbol2scm ("StringNumber"), &string_numbers_,
-                            ev, note_ev);
+                           ly_symbol2scm ("StringNumber"), &string_numbers_,
+                           ev, note_ev);
           g->suicide (); // Kill grob created to check stencil
         }
       else if (ev->in_event_class ("stroke-finger-event"))
index 6a2abb671467febbd81a4aafa88ec5765e859ac6..7c43dddd4860bac3e2a608659ee92f0610d4e592 100644 (file)
@@ -356,7 +356,7 @@ check_meshing_chords (Grob *me,
           extract_grob_set (stem, "note-heads", heads);
           for (vsize i = 0; i < heads.size (); i++)
             unsmob_grob (heads[i]->get_object ("dot"))
-              ->set_property ("direction", scm_from_int (dir));
+            ->set_property ("direction", scm_from_int (dir));
         }
     }
 
index 376716929cd6b2804c5f739cb0dc3471e48fbb16..7120c6c68094ffe9aebe9ea75640c184885d7838 100644 (file)
@@ -176,14 +176,14 @@ Page_layout_problem::add_footnotes_to_lines (SCM lines, int counter, Paper_book
       if (!s)
         {
           programming_error ("Your numbering function needs to return a stencil.");
-         footnote_number_markups.push_back (SCM_EOL);
+          footnote_number_markups.push_back (SCM_EOL);
           footnote_number_stencils.push_back (Stencil (Box (Interval (0, 0), Interval (0, 0)), SCM_EOL));
         }
       else
-       {
-         footnote_number_markups.push_back (markup);
-         footnote_number_stencils.push_back (*s);
-       }
+        {
+          footnote_number_markups.push_back (markup);
+          footnote_number_stencils.push_back (*s);
+        }
       counter++;
     }
 
@@ -201,8 +201,8 @@ Page_layout_problem::add_footnotes_to_lines (SCM lines, int counter, Paper_book
     {
       in_text_numbers = scm_cons (footnote_number_markups[i], in_text_numbers);
       footnote_number_stencils[i].translate_axis ((max_length
-                                                    - footnote_number_stencils[i].extent (X_AXIS).length ()),
-                                                   X_AXIS);
+                                                   - footnote_number_stencils[i].extent (X_AXIS).length ()),
+                                                  X_AXIS);
       numbers = scm_cons (footnote_number_stencils[i].smobbed_copy (), numbers);
     }
 
@@ -262,9 +262,9 @@ Page_layout_problem::add_footnotes_to_lines (SCM lines, int counter, Paper_book
 
                   Stencil annotation = *unsmob_stencil (scm_car (numbers));
                   annotation.translate_axis ((footnote_stencil.extent (Y_AXIS)[UP]
-                                             + number_raise
-                                             - annotation.extent (Y_AXIS)[UP]),
-                                              Y_AXIS);
+                                              + number_raise
+                                              - annotation.extent (Y_AXIS)[UP]),
+                                             Y_AXIS);
                   footnote_stencil.add_at_edge (X_AXIS, LEFT, annotation, 0.0);
                   numbers = scm_cdr (numbers);
                   in_text_numbers = scm_cdr (in_text_numbers);
@@ -301,9 +301,9 @@ Page_layout_problem::add_footnotes_to_lines (SCM lines, int counter, Paper_book
                   if (!unsmob_stencil (in_text_stencil))
                     in_text_stencil = SCM_EOL;
                   annotation.translate_axis ((footnote_stencil.extent (Y_AXIS)[UP]
-                                             + number_raise
-                                             - annotation.extent (Y_AXIS)[UP]),
-                                            Y_AXIS);
+                                              + number_raise
+                                              - annotation.extent (Y_AXIS)[UP]),
+                                             Y_AXIS);
                   footnote_stencil.add_at_edge (X_AXIS, LEFT, annotation, 0.0);
                   numbers = scm_cdr (numbers);
                   in_text_numbers = scm_cdr (in_text_numbers);
index f710078cf74e1fd95fc2755b0e38b1721a6e7b25..f6d008f1db2dc01005f7cff47370e556203bd088 100644 (file)
@@ -583,7 +583,7 @@ Paper_book::systems ()
       SCM system_list = SCM_EOL;
       for (SCM p = bookparts_; scm_is_pair (p); p = scm_cdr (p))
         if (Paper_book *pbookpart = unsmob_paper_book (scm_car (p)))
-         system_list = scm_cons (pbookpart->systems (), system_list);
+          system_list = scm_cons (pbookpart->systems (), system_list);
       systems_ = scm_append (scm_reverse_x (system_list, SCM_EOL));
     }
   else
index 820faf5bfea907bc0f2870001261a036ad12b79e..616e99397a4d2c8c70b7cd5235bf08a9350fcf35 100644 (file)
@@ -189,7 +189,7 @@ get_help_string ()
 
 LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 1, 0, (SCM port),
            "Print @code{ly:set-option} usage.  Optional @var{port} argument"
-          "for the destination defaults to current output port.")
+           "for the destination defaults to current output port.")
 {
   SCM str = scm_from_locale_string (get_help_string ().c_str ());
   scm_write_line (str, port);
index efb9c132e876b2dad09d6c3d4078d35c447cbb95..69c580f5d5484fc4e0c8717144e90ffce55a95f8 100644 (file)
@@ -265,7 +265,7 @@ Quote_iterator::process (Moment m)
 
                   Pitch diff = pitch_interval (qp, mp);
                   ev = ev->clone ();
-                 ev->make_transposable ();
+                  ev->make_transposable ();
 
                   transpose_mutable (ev->get_property_alist (true), diff);
                   transposed_musics_ = scm_cons (ev->unprotect (), transposed_musics_);
index 0bb61444b4c025882f0bb924cb531350c246102d..9057e45af1bd90deaf29c0419ac2a2b2233ee8a9 100644 (file)
@@ -45,8 +45,8 @@ Rest::y_offset_callback (SCM smob)
 
   if (position_override)
     {
-      amount =
-        robust_scm2double (me->get_property ("staff-position"), 0) * 0.5 * ss;
+      amount
+        robust_scm2double (me->get_property ("staff-position"), 0) * 0.5 * ss;
 
       /*
         semibreve rests are positioned one staff line off
@@ -75,15 +75,15 @@ Rest::y_offset_callback (SCM smob)
       /*
         make sure rest is aligned to a staff line
       */
-      if (Grob *staff = Staff_symbol_referencer::get_staff_symbol(me))
+      if (Grob *staff = Staff_symbol_referencer::get_staff_symbol (me))
         {
           std::vector<Real> linepos = Staff_symbol::line_positions (staff);
-          std::sort(linepos.begin(), linepos.end());
+          std::sort (linepos.begin (), linepos.end ());
           std::vector<Real>::const_iterator it
-            = std::lower_bound(linepos.begin(), linepos.end(), pos);
-          if (it != linepos.end())
+            = std::lower_bound (linepos.begin (), linepos.end (), pos);
+          if (it != linepos.end ())
             {
-              pos = (int)ceil(*it);
+              pos = (int)ceil (*it);
             }
         }
 
@@ -127,8 +127,8 @@ Rest::glyph_name (Grob *me, int durlog, string style, bool try_ledgers)
       */
       if (-1 <= durlog && durlog <= 1)
         is_ledgered = !Staff_symbol_referencer::on_staff_line (me, pos)
-          && !(durlog == -1
-               && Staff_symbol_referencer::on_staff_line (me, pos + 2));
+                      && !(durlog == -1
+                           && Staff_symbol_referencer::on_staff_line (me, pos + 2));
     }
 
   string actual_style (style.c_str ());
index 8d9e75ae723f4f2a70009d3616b9bbde13a0da3b..1246e3854272ec622ef10e1766a9bb1024e2be96 100644 (file)
@@ -49,36 +49,36 @@ Rhythmic_music_iterator::process (Moment m)
       Context *c = get_outlet ();
       Stream_event *ev = get_music ()->to_event ();
       SCM arts = ev->get_property ("articulations");
-      
+
       if (scm_is_pair (arts))
-       {
-         // There is no point in broadcasting articulations like
-         // harmonic events that nobody listens to.  Those work
-         // exclusively as articulations.
-         SCM listened = SCM_EOL;
-         SCM unlistened = SCM_EOL;
-         for (; scm_is_pair (arts); arts = scm_cdr (arts))
-           {
-             if (scm_is_true
-                 (scm_call_2
-                  (ly_lily_module_constant ("any"),
-                   ly_lily_module_constant ("ly:is-listened-event-class"),
-                   scm_call_1
-                   (ly_lily_module_constant ("ly:make-event-class"),
-                    unsmob_stream_event (scm_car (arts))
-                    ->get_property ("class")))))
-               listened = scm_cons (scm_car (arts), listened);
-             else
-               unlistened = scm_cons (scm_car (arts), unlistened);
-           }
-         ev->set_property ("articulations", scm_reverse_x (unlistened, SCM_EOL));
-         c->event_source ()->broadcast (ev);
-         arts = scm_reverse_x (listened, SCM_EOL);
-         for (; scm_is_pair (arts); arts = scm_cdr (arts))
-           c->event_source ()->broadcast (unsmob_stream_event (scm_car (arts)));
-       }
+        {
+          // There is no point in broadcasting articulations like
+          // harmonic events that nobody listens to.  Those work
+          // exclusively as articulations.
+          SCM listened = SCM_EOL;
+          SCM unlistened = SCM_EOL;
+          for (; scm_is_pair (arts); arts = scm_cdr (arts))
+            {
+              if (scm_is_true
+                  (scm_call_2
+                   (ly_lily_module_constant ("any"),
+                    ly_lily_module_constant ("ly:is-listened-event-class"),
+                    scm_call_1
+                    (ly_lily_module_constant ("ly:make-event-class"),
+                     unsmob_stream_event (scm_car (arts))
+                     ->get_property ("class")))))
+                listened = scm_cons (scm_car (arts), listened);
+              else
+                unlistened = scm_cons (scm_car (arts), unlistened);
+            }
+          ev->set_property ("articulations", scm_reverse_x (unlistened, SCM_EOL));
+          c->event_source ()->broadcast (ev);
+          arts = scm_reverse_x (listened, SCM_EOL);
+          for (; scm_is_pair (arts); arts = scm_cdr (arts))
+            c->event_source ()->broadcast (unsmob_stream_event (scm_car (arts)));
+        }
       else
-       c->event_source ()->broadcast (ev);
+        c->event_source ()->broadcast (ev);
 
       ev->unprotect ();
     }
index ddf08f5ba50df8137b07381db3c239ca43082a2a..a37b5871007eec8ef9368976958997b6a4c84a98 100644 (file)
@@ -217,8 +217,8 @@ Self_alignment_interface::avoid_colliding_grobs (Grob *me, Axis a, Real offset)
                       : LEFT;
 
   return scm_from_double ((pos[col_dir] - (iv.length () / 2)
-                          + col_dir
-                          * robust_scm2double (me->get_property ("collision-padding"), 0.0)));
+                           + col_dir
+                           * robust_scm2double (me->get_property ("collision-padding"), 0.0)));
 }
 
 void
index fd8c6798c4026290804a49d570d18ff8b22a2c91..88ebae09d85c4714e318013bbf5d6a5c8541a452 100644 (file)
@@ -529,7 +529,6 @@ get_line_configuration (vector<Grob *> const &columns,
   return ret;
 }
 
-
 #include "ly-smobs.icc"
 
 IMPLEMENT_SIMPLE_SMOBS (Simple_spacer);
index 79f04d6203cf6b0f7bc41897a2c401a0b0b38064..b0ef9f90ad21d23142b7b25f5cc4c22594f16be9 100644 (file)
@@ -183,16 +183,16 @@ Slur_engraver::process_music ()
         {
           if (id == robust_scm2string (slurs_[j]->get_property ("spanner-id"), ""))
             {
-             // We end only one slur unless several ones have been
-             // caused by the same event, like with double slurs.
+              // We end only one slur unless several ones have been
+              // caused by the same event, like with double slurs.
               if (!ended || scm_is_eq (starter,
-                                      slurs_[j]->get_property ("cause")))
-               {
-                 ended = true;
-                 starter = slurs_[j]->get_property ("cause");
-                 end_slurs_.push_back (slurs_[j]);
-                 slurs_.erase (slurs_.begin () + j);
-               }
+                                       slurs_[j]->get_property ("cause")))
+                {
+                  ended = true;
+                  starter = slurs_[j]->get_property ("cause");
+                  end_slurs_.push_back (slurs_[j]);
+                  slurs_.erase (slurs_.begin () + j);
+                }
             }
         }
       if (!ended)
@@ -222,21 +222,21 @@ Slur_engraver::process_music ()
       Stream_event *ev = start_events_[i];
       string id = robust_scm2string (ev->get_property ("spanner-id"), "");
 
-          Grob *slur = make_spanner ("Slur", ev->self_scm ());
-          Direction updown = to_dir (ev->get_property ("direction"));
+      Grob *slur = make_spanner ("Slur", ev->self_scm ());
+      Direction updown = to_dir (ev->get_property ("direction"));
+      slur->set_property ("spanner-id", ly_string2scm (id));
+      if (updown)
+        set_grob_direction (slur, updown);
+      slurs_.push_back (slur);
+
+      if (to_boolean (get_property ("doubleSlurs")))
+        {
+          set_grob_direction (slur, DOWN);
+          slur = make_spanner ("Slur", ev->self_scm ());
           slur->set_property ("spanner-id", ly_string2scm (id));
-          if (updown)
-            set_grob_direction (slur, updown);
+          set_grob_direction (slur, UP);
           slurs_.push_back (slur);
-
-          if (to_boolean (get_property ("doubleSlurs")))
-            {
-              set_grob_direction (slur, DOWN);
-              slur = make_spanner ("Slur", ev->self_scm ());
-              slur->set_property ("spanner-id", ly_string2scm (id));
-              set_grob_direction (slur, UP);
-              slurs_.push_back (slur);
-            }
+        }
     }
   set_melisma (slurs_.size ());
 }
index 88ee243630b46457b6b50c36ac4f32e54bc225b9..d847605425b0d9be7a9ec79bf66f0d2b462a8004 100644 (file)
@@ -290,7 +290,7 @@ Source_file::get_counts (char const *pos_str0,
       // called in mid-character, the results are somewhat arbitrary,
       // but there is no really sane definition anyway.
       if ((*line_chars & 0xc0) == 0x80)
-       continue;
+        continue;
 
       if (*line_chars == '\t')
         (*column) = (*column / 8 + 1) * 8;
index 57279033b24c92020cdfba6344464feadd09c6c2..98627e5783f812ca3c396c6d1feacb636b60a3c7 100644 (file)
@@ -88,7 +88,7 @@ Staff_symbol::print (SCM smob)
 
   Real space = staff_space (me);
   for (vector<Real>::const_iterator i = line_positions.begin (),
-         e = line_positions.end ();
+       e = line_positions.end ();
        i != e;
        ++i)
     {
@@ -143,7 +143,7 @@ Staff_symbol::ledger_positions (Grob *me, int pos)
   Real nearest_line = line_positions[0];
   Real line_dist = abs (line_positions[0] - pos);
   for (vector<Real>::const_iterator i = line_positions.begin (),
-         e = line_positions.end ();
+       e = line_positions.end ();
        i != e;
        ++i)
     {
index b2720731d34c0fcc3b5de007c6a0fb9cf04065cb..c1ab5f6f0508fccd137f1bde2384b431b90fa1e1 100644 (file)
@@ -139,8 +139,7 @@ Stem_engraver::acknowledge_rhythmic_head (Grob_info gi)
     return;
 
   if (!stem_)
-      make_stem (gi, tuplet_start_);
-      
+    make_stem (gi, tuplet_start_);
 
   int ds = Stem::duration_log (stem_);
   int dc = d->duration_log ();
@@ -176,7 +175,7 @@ Stem_engraver::acknowledge_rhythmic_head (Grob_info gi)
       stem_->set_object ("flag", flag->self_scm ());
       maybe_flags_.push_back (flag);
     }
-  if (tuplet_start_) 
+  if (tuplet_start_)
     stem_->set_property ("tuplet-start", SCM_BOOL_T);
 }
 
@@ -232,7 +231,7 @@ Stem_engraver::listen_tuplet_span (Stream_event *ev)
       // set stem property if stem already exists
       if (stem_)
         stem_->set_property ("tuplet-start", SCM_BOOL_T);
-      tuplet_start_ = true;  // stash the value for use in later creation 
+      tuplet_start_ = true;  // stash the value for use in later creation
     }
 }
 
index f662f3cf1dec75637680e3c85f9bcd9fd31a158c..5195b6cfab814887acd0ed079f930cfe4130e89f 100644 (file)
@@ -283,7 +283,7 @@ bool
 Stem::is_normal_stem (Grob *me)
 {
   if (!head_count (me))
-     return false;
+    return false;
 
   extract_grob_set (me, "note-heads", heads);
   SCM style = heads[0]->get_property ("style");
index 117559b87c52871bca8d5739b22f1dcf122265c6..ef801efc621d7c3b9befefcceade4795e23a5bcd 100644 (file)
@@ -89,16 +89,15 @@ Stream_event::make_transposable ()
       SCM val = scm_cdr (entry);
 
       if ((unsmob_pitch (val)
-          || (prop == ly_symbol2scm ("element") && unsmob_music (val))
-          || (prop == ly_symbol2scm ("elements") && scm_is_pair (val))
-          || (prop == ly_symbol2scm ("pitch-alist") && scm_is_pair (val)))
-         && scm_is_false (scm_assq (prop, mutable_property_alist_)))
-       mutable_property_alist_ =
-         scm_acons (prop, ly_music_deep_copy (val), mutable_property_alist_);
+           || (prop == ly_symbol2scm ("element") && unsmob_music (val))
+           || (prop == ly_symbol2scm ("elements") && scm_is_pair (val))
+           || (prop == ly_symbol2scm ("pitch-alist") && scm_is_pair (val)))
+          && scm_is_false (scm_assq (prop, mutable_property_alist_)))
+        mutable_property_alist_
+          = scm_acons (prop, ly_music_deep_copy (val), mutable_property_alist_);
     }
 }
 
-
 SCM
 Stream_event::dump (SCM self)
 {
index c51e925b9d9690cb51c03e0a47b5e46215e279c9..940f42a07524eaacee7a35335fa45aeea91adb43 100644 (file)
@@ -50,15 +50,15 @@ replace_special_characters (string &str, SCM props)
     {
       /* Don't match in mid-UTF-8 */
       if ((str[i] & 0xc0) == 0x80)
-       continue;
+        continue;
       for (vsize j = max_length + 1; j--;)
         {
-         if (j > str.size () - i)
-           continue;
+          if (j > str.size () - i)
+            continue;
           string dummy = str.substr (i, j);
           SCM ligature = ly_assoc_get (ly_string2scm (dummy),
-                                      replacement_alist, SCM_BOOL_F);
-         if (scm_is_true (ligature))
+                                       replacement_alist, SCM_BOOL_F);
+          if (scm_is_true (ligature))
             str.replace (i, j, robust_scm2string (ligature, ""));
         }
     }
index 81d82eec97a71d02c9c2005954304ad4e2261e41..c6b245ba61b25da7b4a0223bf126d22a069ebdb7 100644 (file)
@@ -47,17 +47,18 @@ void
 Timing_translator::initialize ()
 {
   Context *timing = unsmob_context (scm_call_2 (ly_lily_module_constant ("ly:context-find"),
-                                               context ()->self_scm (),
-                                               ly_symbol2scm ("Timing")));
+                                                context ()->self_scm (),
+                                                ly_symbol2scm ("Timing")));
   if (timing != context ())
     {
       context ()->add_alias (ly_symbol2scm ("Timing"));
 
-      if (!timing) {
-       programming_error ("Can't find Timing context template");
-       timing = context ();
-      }
-  }
+      if (!timing)
+        {
+          programming_error ("Can't find Timing context template");
+          timing = context ();
+        }
+    }
 
   SCM barnumber = timing->get_property ("currentBarNumber");
   if (!scm_is_integer (barnumber))
@@ -66,7 +67,7 @@ Timing_translator::initialize ()
   context ()->set_property ("internalBarNumber", barnumber);
 
   context ()->set_property ("timeSignatureFraction",
-                           timing->get_property ("timeSignatureFraction"));
+                            timing->get_property ("timeSignatureFraction"));
   /*
     Do not init measurePosition; this should be done from global
     context.
@@ -159,12 +160,12 @@ ADD_TRANSLATOR (Timing_translator,
                 "",
 
                 /* read */
-               "baseMoment "
+                "baseMoment "
                 "currentBarNumber "
                 "internalBarNumber "
                 "measureLength "
                 "measurePosition "
-               "timeSignatureFraction ",
+                "timeSignatureFraction ",
 
                 /* write */
                 "baseMoment "
index 3cf7190bb1ce2722741c1711858f96ec5fc18007..ba0ef6e236b3df365c876ae25d8b1528699bc0ac 100644 (file)
@@ -216,8 +216,8 @@ Tuplet_bracket::calc_x_positions (SCM smob)
             x_span[d] += d * overshoot[d];
           else
             x_span[d] = (bounds[d]->break_status_dir ()
-                  ? Axis_group_interface::generic_bound_extent (bounds[d], commonx, X_AXIS)[-d]
-                  : robust_relative_extent (bounds[d], commonx, X_AXIS)[-d])
+                         ? Axis_group_interface::generic_bound_extent (bounds[d], commonx, X_AXIS)[-d]
+                         : robust_relative_extent (bounds[d], commonx, X_AXIS)[-d])
                         - overshoot[LEFT];
         }