From bdf74886dc9bcaf01c55677bf2086f4b76a7ef8c Mon Sep 17 00:00:00 2001 From: Graham Percival Date: Fri, 30 Mar 2012 09:04:42 +0100 Subject: [PATCH] run astyle 2.02 --- lily/ambitus-engraver.cc | 2 +- lily/bar-line.cc | 2 +- lily/beaming-pattern.cc | 11 +++--- lily/context-def.cc | 14 ++++---- lily/context-property.cc | 17 ++++----- lily/context.cc | 2 +- lily/dispatcher.cc | 2 +- lily/include/interval-minefield.hh | 6 ++-- lily/include/lily-lexer.hh | 2 +- lily/include/listener.hh | 7 ++-- lily/include/system.hh | 2 +- lily/interval-minefield.cc | 22 ++++++------ lily/lookup.cc | 38 ++++++++++---------- lily/multi-measure-rest.cc | 12 +++---- lily/music-sequence.cc | 9 ++--- lily/new-fingering-engraver.cc | 8 ++--- lily/note-collision.cc | 2 +- lily/page-layout-problem.cc | 26 +++++++------- lily/paper-book.cc | 2 +- lily/program-option-scheme.cc | 2 +- lily/quote-iterator.cc | 2 +- lily/rest.cc | 18 +++++----- lily/rhythmic-music-iterator.cc | 56 +++++++++++++++--------------- lily/self-alignment-interface.cc | 4 +-- lily/simple-spacer.cc | 1 - lily/slur-engraver.cc | 44 +++++++++++------------ lily/source-file.cc | 2 +- lily/staff-symbol.cc | 4 +-- lily/stem-engraver.cc | 7 ++-- lily/stem.cc | 2 +- lily/stream-event.cc | 13 ++++--- lily/text-interface.cc | 10 +++--- lily/timing-translator.cc | 21 +++++------ lily/tuplet-bracket.cc | 4 +-- 34 files changed, 188 insertions(+), 188 deletions(-) diff --git a/lily/ambitus-engraver.cc b/lily/ambitus-engraver.cc index 8690b01f80..2d2f027c4e 100644 --- a/lily/ambitus-engraver.cc +++ b/lily/ambitus-engraver.cc @@ -238,7 +238,7 @@ ADD_TRANSLATOR (Ambitus_engraver, /* read */ "keySignature " "middleCClefPosition " - "middleCOffset ", + "middleCOffset ", /* write */ "" diff --git a/lily/bar-line.cc b/lily/bar-line.cc index 1f2d9b2963..cee5f22243 100644 --- a/lily/bar-line.cc +++ b/lily/bar-line.cc @@ -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; } diff --git a/lily/beaming-pattern.cc b/lily/beaming-pattern.cc index 8f27c23ef5..411b5fbedb 100644 --- a/lily/beaming-pattern.cc +++ b/lily/beaming-pattern.cc @@ -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 diff --git a/lily/context-def.cc b/lily/context-def.cc index d4f3dc3433..f2d7e2e137 100644 --- a/lily/context-def.cc +++ b/lily/context-def.cc @@ -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); diff --git a/lily/context-property.cc b/lily/context-property.cc index be27388eae..1ccfe5a970 100644 --- a/lily/context-property.cc +++ b/lily/context-property.cc @@ -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)); } } diff --git a/lily/context.cc b/lily/context.cc index 3920778618..34b75523ea 100644 --- a/lily/context.cc +++ b/lily/context.cc @@ -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)); } diff --git a/lily/dispatcher.cc b/lily/dispatcher.cc index ad1a624b12..94519021ab 100644 --- a/lily/dispatcher.cc +++ b/lily/dispatcher.cc @@ -59,7 +59,7 @@ Dispatcher::print_smob (SCM s, SCM p, scm_print_state *) Dispatcher *me = (Dispatcher *) SCM_CELL_WORD_1 (s); scm_puts ("#alist"), - me->listeners_), p); + me->listeners_), p); scm_puts (">", p); return 1; } diff --git a/lily/include/interval-minefield.hh b/lily/include/interval-minefield.hh index 6c2eb67b26..b618b94720 100644 --- a/lily/include/interval-minefield.hh +++ b/lily/include/interval-minefield.hh @@ -27,16 +27,16 @@ class Interval_minefield { -public : +public: Interval_minefield (Interval, Real); void add_forbidden_interval (Interval forbidden); Interval feasible_placements (); void solve (); -private : +private: vector forbidden_intervals_; Interval feasible_placements_; Real bulk_; }; -#endif // INTERVAL_MINEFIELD_HH \ No newline at end of file +#endif // INTERVAL_MINEFIELD_HH diff --git a/lily/include/lily-lexer.hh b/lily/include/lily-lexer.hh index a10d89cee3..6375800565 100644 --- a/lily/include/lily-lexer.hh +++ b/lily/include/lily-lexer.hh @@ -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_; diff --git a/lily/include/listener.hh b/lily/include/listener.hh index fb69922493..e0827f8786 100644 --- a/lily/include/listener.hh +++ b/lily/include/listener.hh @@ -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 */ diff --git a/lily/include/system.hh b/lily/include/system.hh index b1189769cd..453e48234d 100644 --- a/lily/include/system.hh +++ b/lily/include/system.hh @@ -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 bounds); + Grob *get_neighboring_staff (Direction dir, Grob *vertical_axis_group, Interval_t 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; diff --git a/lily/interval-minefield.cc b/lily/interval-minefield.cc index 79e17d97f9..7571e219ec 100644 --- a/lily/interval-minefield.cc +++ b/lily/interval-minefield.cc @@ -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; } } diff --git a/lily/lookup.cc b/lily/lookup.cc index f55e2f2a1e..4d4c0bdf6a 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -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), diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index daa9454c4a..9ffaf4e18c 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -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)); diff --git a/lily/music-sequence.cc b/lily/music-sequence.cc index dde9b653c9..7ab62470b5 100644 --- a/lily/music-sequence.cc +++ b/lily/music-sequence.cc @@ -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 (); } diff --git a/lily/new-fingering-engraver.cc b/lily/new-fingering-engraver.cc index 9ae9a9998a..b6275b0721 100644 --- a/lily/new-fingering-engraver.cc +++ b/lily/new-fingering-engraver.cc @@ -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")) diff --git a/lily/note-collision.cc b/lily/note-collision.cc index 6a2abb6714..7c43dddd48 100644 --- a/lily/note-collision.cc +++ b/lily/note-collision.cc @@ -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)); } } diff --git a/lily/page-layout-problem.cc b/lily/page-layout-problem.cc index 376716929c..7120c6c680 100644 --- a/lily/page-layout-problem.cc +++ b/lily/page-layout-problem.cc @@ -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); diff --git a/lily/paper-book.cc b/lily/paper-book.cc index f710078cf7..f6d008f1db 100644 --- a/lily/paper-book.cc +++ b/lily/paper-book.cc @@ -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 diff --git a/lily/program-option-scheme.cc b/lily/program-option-scheme.cc index 820faf5bfe..616e99397a 100644 --- a/lily/program-option-scheme.cc +++ b/lily/program-option-scheme.cc @@ -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); diff --git a/lily/quote-iterator.cc b/lily/quote-iterator.cc index efb9c132e8..69c580f5d5 100644 --- a/lily/quote-iterator.cc +++ b/lily/quote-iterator.cc @@ -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_); diff --git a/lily/rest.cc b/lily/rest.cc index 0bb61444b4..9057e45af1 100644 --- a/lily/rest.cc +++ b/lily/rest.cc @@ -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 linepos = Staff_symbol::line_positions (staff); - std::sort(linepos.begin(), linepos.end()); + std::sort (linepos.begin (), linepos.end ()); std::vector::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 ()); diff --git a/lily/rhythmic-music-iterator.cc b/lily/rhythmic-music-iterator.cc index 8d9e75ae72..1246e38542 100644 --- a/lily/rhythmic-music-iterator.cc +++ b/lily/rhythmic-music-iterator.cc @@ -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 (); } diff --git a/lily/self-alignment-interface.cc b/lily/self-alignment-interface.cc index ddf08f5ba5..a37b587100 100644 --- a/lily/self-alignment-interface.cc +++ b/lily/self-alignment-interface.cc @@ -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 diff --git a/lily/simple-spacer.cc b/lily/simple-spacer.cc index fd8c6798c4..88ebae09d8 100644 --- a/lily/simple-spacer.cc +++ b/lily/simple-spacer.cc @@ -529,7 +529,6 @@ get_line_configuration (vector const &columns, return ret; } - #include "ly-smobs.icc" IMPLEMENT_SIMPLE_SMOBS (Simple_spacer); diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index 79f04d6203..b0ef9f90ad 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -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 ()); } diff --git a/lily/source-file.cc b/lily/source-file.cc index 88ee243630..d847605425 100644 --- a/lily/source-file.cc +++ b/lily/source-file.cc @@ -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; diff --git a/lily/staff-symbol.cc b/lily/staff-symbol.cc index 57279033b2..98627e5783 100644 --- a/lily/staff-symbol.cc +++ b/lily/staff-symbol.cc @@ -88,7 +88,7 @@ Staff_symbol::print (SCM smob) Real space = staff_space (me); for (vector::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::const_iterator i = line_positions.begin (), - e = line_positions.end (); + e = line_positions.end (); i != e; ++i) { diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index b2720731d3..c1ab5f6f05 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -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 } } diff --git a/lily/stem.cc b/lily/stem.cc index f662f3cf1d..5195b6cfab 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -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"); diff --git a/lily/stream-event.cc b/lily/stream-event.cc index 117559b87c..ef801efc62 100644 --- a/lily/stream-event.cc +++ b/lily/stream-event.cc @@ -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) { diff --git a/lily/text-interface.cc b/lily/text-interface.cc index c51e925b9d..940f42a075 100644 --- a/lily/text-interface.cc +++ b/lily/text-interface.cc @@ -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, "")); } } diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index 81d82eec97..c6b245ba61 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -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 " diff --git a/lily/tuplet-bracket.cc b/lily/tuplet-bracket.cc index 3cf7190bb1..ba0ef6e236 100644 --- a/lily/tuplet-bracket.cc +++ b/lily/tuplet-bracket.cc @@ -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]; } -- 2.39.2