From 00e3e15364b9d3c94cda1bcab9f889bb95f6832d Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 27 Jan 2007 14:18:43 +0100 Subject: [PATCH] codingstyle nits: space before ( and after , --- lily/accidental-placement.cc | 2 +- lily/align-interface.cc | 4 +-- lily/all-font-metrics-scheme.cc | 2 +- lily/audio-item.cc | 2 +- lily/auto-beam-engraver.cc | 2 +- lily/axis-group-interface-scheme.cc | 4 +-- lily/axis-group-interface.cc | 4 +-- lily/balloon-engraver.cc | 10 +++---- lily/balloon.cc | 2 +- lily/bar-line.cc | 4 +-- lily/bar-number-engraver.cc | 4 +-- lily/beam-engraver.cc | 2 +- lily/beam.cc | 12 ++++---- lily/beaming-pattern.cc | 12 ++++---- lily/bezier-bow.cc | 12 ++++---- lily/bezier.cc | 2 +- lily/book-scheme.cc | 10 +++---- lily/book.cc | 2 +- lily/break-alignment-interface.cc | 6 ++-- lily/cluster.cc | 2 +- lily/constrained-breaking.cc | 20 ++++++------- lily/context-def.cc | 2 +- lily/context-property.cc | 2 +- lily/context-scheme.cc | 16 +++++----- lily/context-specced-music-iterator.cc | 2 +- lily/control-track-performer.cc | 2 +- lily/dispatcher-scheme.cc | 6 ++-- lily/dispatcher.cc | 14 ++++----- lily/dot-column.cc | 2 +- lily/dots-engraver.cc | 8 ++--- lily/drum-note-performer.cc | 2 +- lily/duration-scheme.cc | 8 ++--- lily/dynamic-performer.cc | 2 +- lily/enclosing-bracket.cc | 8 ++--- lily/engraver-group.cc | 2 +- lily/figured-bass-continuation.cc | 8 ++--- lily/figured-bass-engraver.cc | 24 +++++++-------- lily/figured-bass-position-engraver.cc | 16 +++++----- lily/file-name-map.cc | 2 +- lily/font-config-scheme.cc | 10 +++---- lily/font-metric-scheme.cc | 12 ++++---- lily/freetype-error.cc | 2 +- lily/function-documentation.cc | 4 +-- lily/general-scheme.cc | 22 +++++++------- lily/global-context-scheme.cc | 2 +- lily/grob-array-scheme.cc | 2 +- lily/grob-interface-scheme.cc | 4 +-- lily/grob-property.cc | 6 ++-- lily/grob-scheme.cc | 38 +++++++++++------------ lily/grob-smob.cc | 2 +- lily/grob.cc | 4 +-- lily/hairpin.cc | 2 +- lily/horizontal-bracket.cc | 2 +- lily/input-scheme.cc | 2 +- lily/instrument-switch-engraver.cc | 4 +-- lily/key-engraver.cc | 2 +- lily/key-signature-interface.cc | 2 +- lily/ledger-line-spanner.cc | 6 ++-- lily/lily-guile.cc | 4 +-- lily/lily-lexer-scheme.cc | 2 +- lily/lily-lexer.cc | 4 +-- lily/lily-parser-scheme.cc | 8 ++--- lily/line-interface.cc | 4 +-- lily/line-spanner.cc | 4 +-- lily/lyric-combine-music-iterator.cc | 4 +-- lily/main.cc | 4 +-- lily/melody-spanner.cc | 2 +- lily/midi-chunk.cc | 4 +-- lily/moment-scheme.cc | 16 +++++----- lily/music-scheme.cc | 4 +-- lily/new-fingering-engraver.cc | 2 +- lily/note-collision.cc | 4 +-- lily/note-head-scheme.cc | 4 +-- lily/note-head.cc | 2 +- lily/note-performer.cc | 2 +- lily/note-spacing.cc | 2 +- lily/open-type-font-scheme.cc | 2 +- lily/open-type-font.cc | 4 +-- lily/ottava-bracket.cc | 2 +- lily/output-def.cc | 2 +- lily/output-property-engraver.cc | 2 +- lily/page-spacing.cc | 2 +- lily/pango-font.cc | 4 +-- lily/paper-book.cc | 4 +-- lily/paper-column-engraver.cc | 2 +- lily/paper-outputter-scheme.cc | 4 +-- lily/paper-system.cc | 2 +- lily/parenthesis-engraver.cc | 2 +- lily/percent-repeat-engraver.cc | 4 +-- lily/percent-repeat-iterator.cc | 2 +- lily/performance-scheme.cc | 2 +- lily/piano-pedal-bracket.cc | 2 +- lily/piano-pedal-performer.cc | 4 +-- lily/pitch-scheme.cc | 4 +-- lily/pitch.cc | 2 +- lily/prob-scheme.cc | 6 ++-- lily/prob.cc | 4 +-- lily/relocate.cc | 16 +++++----- lily/rest-collision.cc | 2 +- lily/scale.cc | 4 +-- lily/score-engraver.cc | 2 +- lily/score-scheme.cc | 2 +- lily/script-interface.cc | 2 +- lily/semi-tie-column.cc | 6 ++-- lily/semi-tie.cc | 4 +-- lily/separation-item.cc | 2 +- lily/simple-closure.cc | 8 ++--- lily/simple-spacer-scheme.cc | 2 +- lily/skyline.cc | 6 ++-- lily/slur-scoring.cc | 4 +-- lily/slur.cc | 2 +- lily/smobs.cc | 2 +- lily/source-file.cc | 8 ++--- lily/spacing-spanner.cc | 4 +-- lily/spanner-scheme.cc | 2 +- lily/spanner.cc | 2 +- lily/staff-symbol.cc | 2 +- lily/stem-tremolo.cc | 2 +- lily/stem.cc | 12 ++++---- lily/stencil-scheme.cc | 40 ++++++++++++------------- lily/stream-event-scheme.cc | 2 +- lily/system-start-delimiter-engraver.cc | 4 +-- lily/system-start-delimiter.cc | 2 +- lily/system-start-text.cc | 4 +-- lily/system.cc | 2 +- lily/tab-harmonic-engraver.cc | 2 +- lily/tab-staff-symbol-engraver.cc | 2 +- lily/tie-column.cc | 4 +-- lily/tie-configuration.cc | 8 ++--- lily/tie-details.cc | 12 ++++---- lily/tie-engraver.cc | 2 +- lily/tie-formatting-problem.cc | 18 +++++------ lily/tie-performer.cc | 2 +- lily/tie.cc | 4 +-- lily/time-scaled-music-iterator.cc | 6 ++-- lily/translator.cc | 4 +-- lily/ttf.cc | 4 +-- lily/tuplet-bracket.cc | 6 ++-- lily/tuplet-engraver.cc | 2 +- lily/tuplet-number.cc | 6 ++-- lily/tweak-engraver.cc | 2 +- lily/vaticana-ligature-engraver.cc | 8 ++--- 142 files changed, 377 insertions(+), 377 deletions(-) diff --git a/lily/accidental-placement.cc b/lily/accidental-placement.cc index 15049f5bc0..8e75206dc8 100644 --- a/lily/accidental-placement.cc +++ b/lily/accidental-placement.cc @@ -243,7 +243,7 @@ stagger_apes (vector *apes) */ -MAKE_SCHEME_CALLBACK(Accidental_placement, calc_positioning_done, 1); +MAKE_SCHEME_CALLBACK (Accidental_placement, calc_positioning_done, 1); SCM Accidental_placement::calc_positioning_done (SCM smob) { diff --git a/lily/align-interface.cc b/lily/align-interface.cc index 09887a7c9f..4d0c6eb324 100644 --- a/lily/align-interface.cc +++ b/lily/align-interface.cc @@ -48,7 +48,7 @@ Align_interface::calc_positioning_done (SCM smob) /* merge with align-to-extents? */ -MAKE_SCHEME_CALLBACK(Align_interface, stretch_after_break, 1) +MAKE_SCHEME_CALLBACK (Align_interface, stretch_after_break, 1) SCM Align_interface::stretch_after_break (SCM grob) { @@ -75,7 +75,7 @@ Align_interface::stretch_after_break (SCM grob) Direction stacking_dir = robust_scm2dir (me->get_property ("stacking-dir"), DOWN); - Real delta = extra_space / elems.size() * stacking_dir; + Real delta = extra_space / elems.size () * stacking_dir; for (vsize i = 0; i < elems.size (); i++) elems[i]->translate_axis (i * delta, Y_AXIS); } diff --git a/lily/all-font-metrics-scheme.cc b/lily/all-font-metrics-scheme.cc index c74f9596b4..793b4c5875 100644 --- a/lily/all-font-metrics-scheme.cc +++ b/lily/all-font-metrics-scheme.cc @@ -26,7 +26,7 @@ LY_DEFINE (ly_font_load, "ly:font-load", 1, 0, 0, (SCM name), "Load the font @var{name}. ") { - LY_ASSERT_TYPE(scm_is_string, name, 1); + LY_ASSERT_TYPE (scm_is_string, name, 1); Font_metric *fm = all_fonts_global->find_font (ly_scm2string (name)); diff --git a/lily/audio-item.cc b/lily/audio-item.cc index 41381458f6..9916dd15af 100644 --- a/lily/audio-item.cc +++ b/lily/audio-item.cc @@ -127,7 +127,7 @@ Audio_span_dynamic::render () Real total_t = moment_to_real (dynamics_.back ()->get_column ()->when () - start); - for (vsize i = 1; i < dynamics_.size(); i ++) + for (vsize i = 1; i < dynamics_.size (); i ++) { Moment dt_moment = dynamics_[i]->get_column ()->when () - start; diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index d2cef6ae16..9f5e53da69 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -185,7 +185,7 @@ Auto_beam_engraver::create_beam () return 0; /* - Can't use make_spanner_from_properties() because we have to use + Can't use make_spanner_from_properties () because we have to use beam_settings_. */ Spanner *beam = new Spanner (beam_settings_); diff --git a/lily/axis-group-interface-scheme.cc b/lily/axis-group-interface-scheme.cc index 11306233be..3b529ed34e 100644 --- a/lily/axis-group-interface-scheme.cc +++ b/lily/axis-group-interface-scheme.cc @@ -19,8 +19,8 @@ LY_DEFINE (ly_relative_group_extent, "ly:relative-group-extent", Grob_array *ga = unsmob_grob_array (elements); SCM_ASSERT_TYPE (ga || scm_is_pair (elements), elements, SCM_ARG1, __FUNCTION__, "list or Grob_array"); - LY_ASSERT_SMOB(Grob, common, 2); - LY_ASSERT_TYPE(is_axis, axis, 3); + LY_ASSERT_SMOB (Grob, common, 2); + LY_ASSERT_TYPE (is_axis, axis, 3); vector elts; if (!ga) diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index 23c3087247..bd53cbd2c3 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -294,7 +294,7 @@ Axis_group_interface::calc_pure_elts_and_common (Grob *me) return common; } -MAKE_SCHEME_CALLBACK(Axis_group_interface,calc_x_common, 1); +MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_x_common, 1); SCM Axis_group_interface::calc_x_common (SCM grob) { @@ -305,7 +305,7 @@ Axis_group_interface::calc_x_common (SCM grob) return common->self_scm (); } -MAKE_SCHEME_CALLBACK(Axis_group_interface,calc_y_common, 1); +MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_y_common, 1); SCM Axis_group_interface::calc_y_common (SCM grob) { diff --git a/lily/balloon-engraver.cc b/lily/balloon-engraver.cc index 6239b9e31c..b1497ef403 100644 --- a/lily/balloon-engraver.cc +++ b/lily/balloon-engraver.cc @@ -16,10 +16,10 @@ class Balloon_engraver : public Engraver { - TRANSLATOR_DECLARATIONS(Balloon_engraver); + TRANSLATOR_DECLARATIONS (Balloon_engraver); - DECLARE_TRANSLATOR_LISTENER(annotate_output); - DECLARE_ACKNOWLEDGER(grob); + DECLARE_TRANSLATOR_LISTENER (annotate_output); + DECLARE_ACKNOWLEDGER (grob); vector events_; void stop_translation_timestep (); @@ -77,9 +77,9 @@ Balloon_engraver::acknowledge_grob (Grob_info info) -ADD_ACKNOWLEDGER(Balloon_engraver,grob); +ADD_ACKNOWLEDGER (Balloon_engraver, grob); -ADD_TRANSLATOR(Balloon_engraver, +ADD_TRANSLATOR (Balloon_engraver, "Create balloon texts", "BalloonTextItem ", /*read*/ "", diff --git a/lily/balloon.cc b/lily/balloon.cc index 739fffcaf7..afaaad8e37 100644 --- a/lily/balloon.cc +++ b/lily/balloon.cc @@ -30,7 +30,7 @@ Balloon_interface::print (SCM smob) Grob *p = me->get_parent (X_AXIS); - Offset off(me->relative_coordinate (p, X_AXIS), + Offset off (me->relative_coordinate (p, X_AXIS), me->relative_coordinate (p, Y_AXIS)); Box b (p->extent (p, X_AXIS), diff --git a/lily/bar-line.cc b/lily/bar-line.cc index 75dbc6c1be..78012a55a1 100644 --- a/lily/bar-line.cc +++ b/lily/bar-line.cc @@ -201,7 +201,7 @@ Bar_line::dashed_bar_line (Grob *me, Real h, Real thick) Real bot_y = max ((i - dash_size) * half_space, -(count-1) * half_space - line_thick/2); - bar.add_stencil (Lookup::round_filled_box (Box (Interval (0,thick), + bar.add_stencil (Lookup::round_filled_box (Box (Interval (0, thick), Interval (bot_y, top_y)), blot)); } @@ -234,7 +234,7 @@ Bar_line::dashed_bar_line (Grob *me, Real h, Real thick) s.translate (Offset (thick/2, -h/2)); return s; } - return Stencil(); + return Stencil (); } diff --git a/lily/bar-number-engraver.cc b/lily/bar-number-engraver.cc index ecc83ac756..3693f97b3e 100644 --- a/lily/bar-number-engraver.cc +++ b/lily/bar-number-engraver.cc @@ -116,8 +116,8 @@ Bar_number_engraver::create_items () } -ADD_ACKNOWLEDGER(Bar_number_engraver,break_aligned); -ADD_ACKNOWLEDGER(Bar_number_engraver,break_alignment); +ADD_ACKNOWLEDGER (Bar_number_engraver, break_aligned); +ADD_ACKNOWLEDGER (Bar_number_engraver, break_alignment); ADD_TRANSLATOR (Bar_number_engraver, /* doc */ "A bar number is created whenever measurePosition " diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index 51569b0e27..90357c5264 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -215,7 +215,7 @@ Beam_engraver::acknowledge_rest (Grob_info info) if (beam_ && !scm_is_number (info.grob ()->get_property_data ("staff-position"))) { - chain_offset_callback (info.grob(), + chain_offset_callback (info.grob (), Beam::rest_collision_callback_proc, Y_AXIS); } } diff --git a/lily/beam.cc b/lily/beam.cc index 28492eaee1..b38cb8baa6 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -233,7 +233,7 @@ position_with_maximal_common_beams (SCM left_beaming, SCM right_beaming, return best_start; } -MAKE_SCHEME_CALLBACK(Beam, calc_beaming, 1) +MAKE_SCHEME_CALLBACK (Beam, calc_beaming, 1) SCM Beam::calc_beaming (SCM smob) { @@ -405,7 +405,7 @@ Beam::get_beam_segments (Grob *me_grob, Grob **common) do { bool on_bound = (event_dir == LEFT) ? j == 0 : - j == segs.size() - 1; + j == segs.size () - 1; bool inside_stem = (event_dir == LEFT) ? segs[j].stem_index_ > 0 @@ -459,7 +459,7 @@ Beam::get_beam_segments (Grob *me_grob, Grob **common) if (event_dir == RIGHT) { segments.push_back (current); - current = Beam_segment(); + current = Beam_segment (); } } while (flip (&event_dir) != LEFT); @@ -470,7 +470,7 @@ Beam::get_beam_segments (Grob *me_grob, Grob **common) return segments; } -MAKE_SCHEME_CALLBACK(Beam, print, 1); +MAKE_SCHEME_CALLBACK (Beam, print, 1); SCM Beam::print (SCM grob) { @@ -790,7 +790,7 @@ set_minimum_dy (Grob *me, Real *dy) -MAKE_SCHEME_CALLBACK(Beam, calc_stem_shorten, 1) +MAKE_SCHEME_CALLBACK (Beam, calc_stem_shorten, 1) SCM Beam::calc_stem_shorten (SCM smob) { @@ -1152,7 +1152,7 @@ Beam::calc_stem_y (Grob *me, Grob *stem, Grob **common, Hmm. At this time, beam position and slope are determined. Maybe, stem directions and length should set to relative to the chord's position of the beam. */ -MAKE_SCHEME_CALLBACK(Beam, set_stem_lengths, 1); +MAKE_SCHEME_CALLBACK (Beam, set_stem_lengths, 1); SCM Beam::set_stem_lengths (SCM smob) { diff --git a/lily/beaming-pattern.cc b/lily/beaming-pattern.cc index ba5b8a4a72..0f6f1e1b8f 100644 --- a/lily/beaming-pattern.cc +++ b/lily/beaming-pattern.cc @@ -125,7 +125,7 @@ Beaming_pattern::beamify (Beaming_options const &options) de_grace (); if (infos_[0].start_moment_ < Moment (0)) - for (vsize i = 0; i < infos_.size(); i++) + for (vsize i = 0; i < infos_.size (); i++) infos_[i].start_moment_ += options.measure_length_; Moment measure_pos (0); @@ -134,7 +134,7 @@ Beaming_pattern::beamify (Beaming_options const &options) vector beat_starts; SCM grouping = options.grouping_; - while (measure_pos <= infos_.back().start_moment_) + while (measure_pos <= infos_.back ().start_moment_) { int count = 2; if (scm_is_pair (grouping)) @@ -153,9 +153,9 @@ Beaming_pattern::beamify (Beaming_options const &options) vsize j = 0; vsize k = 0; - for (vsize i = 0; i < infos_.size(); i++) + for (vsize i = 0; i < infos_.size (); i++) { - while (j + 1 < group_starts.size() + while (j + 1 < group_starts.size () && group_starts[j+1] <= infos_[i].start_moment_) j++; @@ -163,11 +163,11 @@ Beaming_pattern::beamify (Beaming_options const &options) infos_[i].group_start_ = group_starts[j]; infos_[i].beat_length_ = options.beat_length_; - while (k + 1 < beat_starts.size() + while (k + 1 < beat_starts.size () && beat_starts[k+1] <= infos_[i].start_moment_) k++; - if (k < beat_starts.size()) + if (k < beat_starts.size ()) infos_[i].beat_start_ = beat_starts[k]; } diff --git a/lily/bezier-bow.cc b/lily/bezier-bow.cc index ccb27d58ea..1e3bb2f517 100644 --- a/lily/bezier-bow.cc +++ b/lily/bezier-bow.cc @@ -63,27 +63,27 @@ slur_height (Real width, Real h_inf, Real r_0) slurs. For large slurs, this gives a certain hookiness at the end, so we increase the indent. - indent = G(w) + indent = G (w) - w -> 0, G(w) -> .33 w + w -> 0, G (w) -> .33 w (due to derivative constraints, we cannot have indent > len/3) - w -> inf, G(w) -> 2*h_inf + w -> inf, G (w) -> 2*h_inf i.e. - G(0) = 0 , G'(0) 1/3, G(infty) = 2h_inf + G (0) = 0 , G'(0) 1/3, G (infty) = 2h_inf solve from - G(w) = r + p/(w+q) + G (w) = r + p/(w+q) yields - G(w) = 2 h_inf - max_fraction * q^2/ (w + q) + G (w) = 2 h_inf - max_fraction * q^2/ (w + q) with q = 2 h_inf */ diff --git a/lily/bezier.cc b/lily/bezier.cc index 1808821029..1eaf041b88 100644 --- a/lily/bezier.cc +++ b/lily/bezier.cc @@ -117,7 +117,7 @@ Bezier::curve_point (Real t) const } /* - Cache binom(3,j) t^j (1-t)^{3-j} + Cache binom (3, j) t^j (1-t)^{3-j} */ struct Polynomial_cache { Polynomial terms_[4]; diff --git a/lily/book-scheme.cc b/lily/book-scheme.cc index 516ad6fbe4..7bb9ba0c6b 100644 --- a/lily/book-scheme.cc +++ b/lily/book-scheme.cc @@ -46,9 +46,9 @@ LY_DEFINE (ly_book_process, "ly:book-process", { Book *book = unsmob_book (book_smob); - LY_ASSERT_SMOB(Book, book_smob, 1); - LY_ASSERT_SMOB(Output_def, default_paper, 2); - LY_ASSERT_SMOB(Output_def, default_layout, 3); + LY_ASSERT_SMOB (Book, book_smob, 1); + LY_ASSERT_SMOB (Output_def, default_paper, 2); + LY_ASSERT_SMOB (Output_def, default_layout, 3); Paper_book *pb = book->process (unsmob_output_def (default_paper), unsmob_output_def (default_layout)); @@ -73,8 +73,8 @@ LY_DEFINE (ly_book_process_to_systems, "ly:book-process-to-systems", "output).") { LY_ASSERT_SMOB (Book, book_smob, 1); - LY_ASSERT_SMOB(Output_def, default_paper, 2); - LY_ASSERT_SMOB(Output_def, default_layout, 3); + LY_ASSERT_SMOB (Output_def, default_paper, 2); + LY_ASSERT_SMOB (Output_def, default_layout, 3); Book *book = unsmob_book (book_smob); diff --git a/lily/book.cc b/lily/book.cc index 01e52ce9cd..bf28d1b57d 100644 --- a/lily/book.cc +++ b/lily/book.cc @@ -60,7 +60,7 @@ Book::Book (Book const &s) Score *newscore = unsmob_score (scm_car (p))->clone (); *t = scm_cons (newscore->self_scm (), SCM_EOL); - t = SCM_CDRLOC(*t); + t = SCM_CDRLOC (*t); newscore->unprotect (); } } diff --git a/lily/break-alignment-interface.cc b/lily/break-alignment-interface.cc index c2c3354349..4a2ab62cb7 100644 --- a/lily/break-alignment-interface.cc +++ b/lily/break-alignment-interface.cc @@ -86,7 +86,7 @@ Break_alignment_interface::add_element (Grob *me, Grob *toadd) Align_interface::add_element (me, toadd); } -MAKE_SCHEME_CALLBACK(Break_alignment_interface, calc_positioning_done, 1) +MAKE_SCHEME_CALLBACK (Break_alignment_interface, calc_positioning_done, 1) SCM Break_alignment_interface::calc_positioning_done (SCM smob) { @@ -259,7 +259,7 @@ Break_alignment_interface::calc_positioning_done (SCM smob) -MAKE_SCHEME_CALLBACK(Break_alignable_interface, self_align_callback, 1) +MAKE_SCHEME_CALLBACK (Break_alignable_interface, self_align_callback, 1) SCM Break_alignable_interface::self_align_callback (SCM grob) { @@ -291,7 +291,7 @@ Break_alignable_interface::self_align_callback (SCM grob) } Direction which_edge = LEFT; - if (vsize (last_idx_found + 1) < elements.size()) + if (vsize (last_idx_found + 1) < elements.size ()) last_idx_found ++; else which_edge = RIGHT; diff --git a/lily/cluster.cc b/lily/cluster.cc index 54b45ab862..7a84195493 100644 --- a/lily/cluster.cc +++ b/lily/cluster.cc @@ -204,7 +204,7 @@ struct Cluster_beacon { public: DECLARE_SCHEME_CALLBACK (height, (SCM)); - DECLARE_GROB_INTERFACE(); + DECLARE_GROB_INTERFACE (); }; MAKE_SCHEME_CALLBACK (Cluster_beacon, height, 1); diff --git a/lily/constrained-breaking.cc b/lily/constrained-breaking.cc index a4f3ac4b57..1c2d5287c0 100644 --- a/lily/constrained-breaking.cc +++ b/lily/constrained-breaking.cc @@ -19,20 +19,20 @@ #include "warn.hh" /* - We use the following optimal substructure. Let W(A) be our weight function. + We use the following optimal substructure. Let W (A) be our weight function. - Let A_{k,n} = (a_{k,n,1}, ... a_{k,n,k}) be the optimal set of line breaks - for k systems and n potential breakpoints. a_{k,n,k} = n (it is the end of + Let A_{k, n} = (a_{k, n,1}, ... a_{k, n, k}) be the optimal set of line breaks + for k systems and n potential breakpoints. a_{k, n, k} = n (it is the end of the piece) Then A_{k+1, m} is contructed from - min_ {k < j < m} ( W(A_{k,j} :: m) ) + min_ {k < j < m} ( W (A_{k, j} :: m) ) where by A::m we denote appending m to the list A Indices in the code: The above algorithm makes it easy to end at a point before the end of the - score (just find A_{k,m} for some m < breaks_.size () - 1). However, we must + score (just find A_{k, m} for some m < breaks_.size () - 1). However, we must add information for starting at a point after the beginning. One constructor allows the specification of a list of starting columns, start_. We then have start_.size () different solution arrays. state_[i] is the array for the @@ -48,12 +48,12 @@ . . . . . . . . where the X's mark invalid solutions (can't have more systems than - breakpoints). Note that each value is of the form a_{x,n,x}. This is because - a breakpoint of the form a_{x,n,x-1} will also be called a_{x-1,m,x-1} for + breakpoints). Note that each value is of the form a_{x, n, x}. This is because + a breakpoint of the form a_{x, n, x-1} will also be called a_{x-1, m, x-1} for some m < n. Each cell in the array stores the value of its m (ie. the ending breakpoint of the previous line) as "prev_". - For finding A_{sys, brk}, let "me" be the (sys_count,brk) cell in our + For finding A_{sys, brk}, let "me" be the (sys_count, brk) cell in our solution array (state_[start][sys * rank + brk]). Then A_{sys, brk} = A_{sys - 1, me.prev_} :: me @@ -116,7 +116,7 @@ Constrained_breaking::solve () return get_best_solution (0, VPOS); resize (systems_); - return get_solution(0, VPOS, systems_); + return get_solution (0, VPOS, systems_); } Column_x_positions @@ -127,7 +127,7 @@ Constrained_breaking::space_line (vsize i, vsize j) Column_x_positions col; vector line (all_.begin () + breaks_[i], - all_.begin() + breaks_[j] + 1); + all_.begin () + breaks_[j] + 1); Interval line_dims = line_dimensions_int (pscore_->layout (), i); bool last = j == breaks_.size () - 1; bool ragged = ragged_right || (last && ragged_last); diff --git a/lily/context-def.cc b/lily/context-def.cc index a5c13305d4..f4023a09a1 100644 --- a/lily/context-def.cc +++ b/lily/context-def.cc @@ -87,7 +87,7 @@ Context_def::print_smob (SCM smob, SCM port, scm_print_state*) SCM Context_def::mark_smob (SCM smob) { - ASSERT_LIVE_IS_ALLOWED(); + ASSERT_LIVE_IS_ALLOWED (); Context_def *me = (Context_def *) SCM_CELL_WORD_1 (smob); diff --git a/lily/context-property.cc b/lily/context-property.cc index d2210b3e10..bc7016babb 100644 --- a/lily/context-property.cc +++ b/lily/context-property.cc @@ -144,7 +144,7 @@ execute_general_pushpop_property (Context *context, /* tack onto alist. We can use set_car, since - updated_grob_properties() in child contexts will check + updated_grob_properties () in child contexts will check for changes in the car. */ if (ok) diff --git a/lily/context-scheme.cc b/lily/context-scheme.cc index 30a876f36d..4ff48155e3 100644 --- a/lily/context-scheme.cc +++ b/lily/context-scheme.cc @@ -45,7 +45,7 @@ LY_DEFINE (ly_context_grob_definition, "ly:context-grob-definition", Context *tr = unsmob_context (context); LY_ASSERT_SMOB (Context, context, 1); - LY_ASSERT_TYPE(ly_is_symbol, name, 2); + LY_ASSERT_TYPE (ly_is_symbol, name, 2); return updated_grob_properties (tr, name); } @@ -60,8 +60,8 @@ LY_DEFINE (ly_context_pushpop_property, "ly:context-pushpop-property", Context *tg = unsmob_context (context); LY_ASSERT_SMOB (Context, context, 1); - LY_ASSERT_TYPE(ly_is_symbol, grob, 2); - LY_ASSERT_TYPE(ly_is_symbol, eltprop, 3); + LY_ASSERT_TYPE (ly_is_symbol, grob, 2); + LY_ASSERT_TYPE (ly_is_symbol, eltprop, 3); execute_pushpop_property (tg, grob, eltprop, val); @@ -73,7 +73,7 @@ LY_DEFINE (ly_context_property, "ly:context-property", "Return the value of @var{name} from context @var{c}") { LY_ASSERT_SMOB (Context, c, 1); - LY_ASSERT_TYPE(ly_is_symbol, name, 2); + LY_ASSERT_TYPE (ly_is_symbol, name, 2); Context *t = unsmob_context (c); return t->internal_get_property (name); @@ -85,7 +85,7 @@ LY_DEFINE (ly_context_set_property_x, "ly:context-set-property!", "to @var{val}.") { LY_ASSERT_SMOB (Context, context, 1); - LY_ASSERT_TYPE(ly_is_symbol, name, 2); + LY_ASSERT_TYPE (ly_is_symbol, name, 2); Context *tr = unsmob_context (context); @@ -100,7 +100,7 @@ LY_DEFINE (ly_context_property_where_defined, "ly:context-property-where-defined "where @var{name} is defined.") { LY_ASSERT_SMOB (Context, context, 1); - LY_ASSERT_TYPE(ly_is_symbol,name, 2); + LY_ASSERT_TYPE (ly_is_symbol, name, 2); Context *tr = unsmob_context (context); @@ -117,7 +117,7 @@ LY_DEFINE (ly_context_unset_property, "ly:context-unset-property", 2, 0, 0, "Unset value of property @var{name} in context @var{context}.") { LY_ASSERT_SMOB (Context, context, 1); - LY_ASSERT_TYPE(ly_is_symbol,name, 2); + LY_ASSERT_TYPE (ly_is_symbol, name, 2); Context *tr = unsmob_context (context); tr->unset_property (name); @@ -145,7 +145,7 @@ LY_DEFINE (ly_context_find, "ly:context-find", "Return @code{#f} if not found.") { LY_ASSERT_SMOB (Context, context, 1); - LY_ASSERT_TYPE(ly_is_symbol,name, 2); + LY_ASSERT_TYPE (ly_is_symbol, name, 2); Context *tr = unsmob_context (context); while (tr) diff --git a/lily/context-specced-music-iterator.cc b/lily/context-specced-music-iterator.cc index fc4f35d666..38f5549141 100644 --- a/lily/context-specced-music-iterator.cc +++ b/lily/context-specced-music-iterator.cc @@ -32,7 +32,7 @@ Context_specced_music_iterator::construct_children () Context *a = 0; - if (to_boolean (get_music()->get_property ("create-new"))) + if (to_boolean (get_music ()->get_property ("create-new"))) a = get_outlet ()->create_unique_context (ct, c_id, ops); else a = get_outlet ()->find_create_context (ct, c_id, ops); diff --git a/lily/control-track-performer.cc b/lily/control-track-performer.cc index 3583d48c5e..3275b467d5 100644 --- a/lily/control-track-performer.cc +++ b/lily/control-track-performer.cc @@ -15,7 +15,7 @@ class Control_track_performer : public Performer vector texts_; void add_text (Audio_text::Type, string); - TRANSLATOR_DECLARATIONS(Control_track_performer); + TRANSLATOR_DECLARATIONS (Control_track_performer); protected: virtual void initialize (); diff --git a/lily/dispatcher-scheme.cc b/lily/dispatcher-scheme.cc index 00c52aca59..e467064bf4 100644 --- a/lily/dispatcher-scheme.cc +++ b/lily/dispatcher-scheme.cc @@ -23,7 +23,7 @@ LY_DEFINE (ly_connect_dispatchers, "ly:connect-dispatchers", Dispatcher *f = unsmob_dispatcher (from); LY_ASSERT_SMOB (Dispatcher, to, 1); - LY_ASSERT_SMOB(Dispatcher, from, 2); + LY_ASSERT_SMOB (Dispatcher, from, 2); t->register_as_listener (f); @@ -39,7 +39,7 @@ LY_DEFINE (ly_add_listener, "ly:add-listener", Dispatcher *d = unsmob_dispatcher (disp); LY_ASSERT_SMOB (Listener, list, 1); - LY_ASSERT_SMOB(Dispatcher, disp, 2); + LY_ASSERT_SMOB (Dispatcher, disp, 2); for (int arg = SCM_ARG3; scm_is_pair (cl); cl = scm_cdr (cl), arg++) { @@ -61,7 +61,7 @@ LY_DEFINE (ly_broadcast, "ly:broadcast", LY_ASSERT_SMOB (Dispatcher, disp, 1); - LY_ASSERT_SMOB(Stream_event, ev, 2); + LY_ASSERT_SMOB (Stream_event, ev, 2); d->broadcast (e); return SCM_UNDEFINED; } diff --git a/lily/dispatcher.cc b/lily/dispatcher.cc index 6107594900..64062139b0 100644 --- a/lily/dispatcher.cc +++ b/lily/dispatcher.cc @@ -100,10 +100,10 @@ Dispatcher::dispatch (SCM sev) */ struct { int prio; SCM list; } lists[num_classes+1]; int i = 0; - for (SCM cl = class_list; scm_is_pair(cl); cl = scm_cdr (cl)) + for (SCM cl = class_list; scm_is_pair (cl); cl = scm_cdr (cl)) { SCM list = scm_hashq_ref (listeners_, scm_car (cl), SCM_EOL); - if (!scm_is_pair(list)) + if (!scm_is_pair (list)) num_classes--; else { @@ -141,9 +141,9 @@ Dispatcher::dispatch (SCM sev) } // go to the next listener; bubble-sort the class list. SCM next = scm_cdr (lists[0].list); - if (!scm_is_pair(next)) + if (!scm_is_pair (next)) num_classes--; - int prio = (scm_is_pair(next)) ? scm_to_int (scm_caar (next)) : INT_MAX; + int prio = (scm_is_pair (next)) ? scm_to_int (scm_caar (next)) : INT_MAX; for (i = 0; prio > lists[i+1].prio; i++) lists[i] = lists[i+1]; lists[i].prio = prio; @@ -176,7 +176,7 @@ Dispatcher::internal_add_listener (Listener l, SCM ev_class, int priority) { /* Tell all dispatchers that we listen to, that we want to hear ev_class events */ - for (SCM disp = dispatchers_; scm_is_pair(disp); disp = scm_cdr (disp)) + for (SCM disp = dispatchers_; scm_is_pair (disp); disp = scm_cdr (disp)) { int priority = scm_to_int (scm_cdar (disp)); Dispatcher *d = unsmob_dispatcher (scm_caar (disp)); @@ -205,10 +205,10 @@ Dispatcher::remove_listener (Listener l, SCM ev_class) SCM dummy = scm_cons (SCM_EOL, list); SCM e = dummy; - while (scm_is_pair(scm_cdr (e))) + while (scm_is_pair (scm_cdr (e))) if (*unsmob_listener (scm_cdadr (e)) == l && first) { - scm_set_cdr_x (e, scm_cddr(e)); + scm_set_cdr_x (e, scm_cddr (e)); first = false; break; } diff --git a/lily/dot-column.cc b/lily/dot-column.cc index b2ff0308fa..3c1eff6c60 100644 --- a/lily/dot-column.cc +++ b/lily/dot-column.cc @@ -208,7 +208,7 @@ remove_collision (Dot_configuration &cfg, int p) } } -MAKE_SCHEME_CALLBACK(Dot_column, calc_positioning_done, 1); +MAKE_SCHEME_CALLBACK (Dot_column, calc_positioning_done, 1); SCM Dot_column::calc_positioning_done (SCM smob) { diff --git a/lily/dots-engraver.cc b/lily/dots-engraver.cc index 16a5b0a290..b59a8d9a41 100644 --- a/lily/dots-engraver.cc +++ b/lily/dots-engraver.cc @@ -18,8 +18,8 @@ class Dots_engraver : public Engraver { - DECLARE_ACKNOWLEDGER(rhythmic_head); - TRANSLATOR_DECLARATIONS(Dots_engraver); + DECLARE_ACKNOWLEDGER (rhythmic_head); + TRANSLATOR_DECLARATIONS (Dots_engraver); }; Dots_engraver::Dots_engraver () @@ -50,9 +50,9 @@ Dots_engraver::acknowledge_rhythmic_head (Grob_info gi) } -ADD_ACKNOWLEDGER(Dots_engraver, rhythmic_head); +ADD_ACKNOWLEDGER (Dots_engraver, rhythmic_head); -ADD_TRANSLATOR(Dots_engraver, +ADD_TRANSLATOR (Dots_engraver, "Create @ref{Dots} objects for @ref{rhythmic-head-interface}s.", /* create */ diff --git a/lily/drum-note-performer.cc b/lily/drum-note-performer.cc index c81fca0482..a4187c187c 100644 --- a/lily/drum-note-performer.cc +++ b/lily/drum-note-performer.cc @@ -65,7 +65,7 @@ Drum_note_performer::process_music () } Moment len = get_event_length (n); - if (now_mom().grace_part_) + if (now_mom ().grace_part_) { len.grace_part_ = len.main_part_; len.main_part_ = Rational (0); diff --git a/lily/duration-scheme.cc b/lily/duration-scheme.cc index 11e6b58d0d..f62bba582a 100644 --- a/lily/duration-scheme.cc +++ b/lily/duration-scheme.cc @@ -27,8 +27,8 @@ LY_DEFINE (ly_duration_less_p, "ly:durationgrow_dir_ = grow_dir_[START]; diff --git a/lily/enclosing-bracket.cc b/lily/enclosing-bracket.cc index ef2dd18b6b..61462de17a 100644 --- a/lily/enclosing-bracket.cc +++ b/lily/enclosing-bracket.cc @@ -15,15 +15,15 @@ struct Enclosing_bracket { - DECLARE_GROB_INTERFACE(); + DECLARE_GROB_INTERFACE (); public: - DECLARE_SCHEME_CALLBACK(print, (SCM)); - DECLARE_SCHEME_CALLBACK(width, (SCM)); + DECLARE_SCHEME_CALLBACK (print, (SCM)); + DECLARE_SCHEME_CALLBACK (width, (SCM)); }; -ADD_INTERFACE(Enclosing_bracket, +ADD_INTERFACE (Enclosing_bracket, "Brackets alongside bass figures.", diff --git a/lily/engraver-group.cc b/lily/engraver-group.cc index 0158c532cd..aaa2ed7625 100644 --- a/lily/engraver-group.cc +++ b/lily/engraver-group.cc @@ -88,7 +88,7 @@ Engraver_group::acknowledge_grobs () else continue; - SCM acklist = scm_hashq_ref (acknowledge_hash_table_drul_[info.start_end()], + SCM acklist = scm_hashq_ref (acknowledge_hash_table_drul_[info.start_end ()], nm, SCM_BOOL_F); Engraver_dispatch_list *dispatch diff --git a/lily/figured-bass-continuation.cc b/lily/figured-bass-continuation.cc index 2f97de6dac..16d60a5f53 100644 --- a/lily/figured-bass-continuation.cc +++ b/lily/figured-bass-continuation.cc @@ -20,11 +20,11 @@ struct Figured_bass_continuation { - DECLARE_GROB_INTERFACE(); + DECLARE_GROB_INTERFACE (); public: - DECLARE_SCHEME_CALLBACK(print, (SCM)); - DECLARE_SCHEME_CALLBACK(center_on_figures, (SCM)); + DECLARE_SCHEME_CALLBACK (print, (SCM)); + DECLARE_SCHEME_CALLBACK (center_on_figures, (SCM)); }; MAKE_SCHEME_CALLBACK (Figured_bass_continuation, center_on_figures, 1); @@ -80,7 +80,7 @@ Figured_bass_continuation::print (SCM grob) return extender.smobbed_copy (); } -ADD_INTERFACE(Figured_bass_continuation, +ADD_INTERFACE (Figured_bass_continuation, "Simple extender line between bounds.", /* props */ diff --git a/lily/figured-bass-engraver.cc b/lily/figured-bass-engraver.cc index 5fe9624041..29185bc2c8 100644 --- a/lily/figured-bass-engraver.cc +++ b/lily/figured-bass-engraver.cc @@ -57,8 +57,8 @@ struct Figure_group struct Figured_bass_engraver : public Engraver { - TRANSLATOR_DECLARATIONS(Figured_bass_engraver); - void clear_spanners(); + TRANSLATOR_DECLARATIONS (Figured_bass_engraver); + void clear_spanners (); void add_brackets (); void create_grobs (); @@ -144,7 +144,7 @@ Figured_bass_engraver::listen_rest (Stream_event *ev) new_event_found_ = true; /* - No ASSIGN_EVENT_ONCE() ; otherwise we get warnings about + No ASSIGN_EVENT_ONCE () ; otherwise we get warnings about polyphonic rests. */ rest_event_ = ev; @@ -184,13 +184,13 @@ Figured_bass_engraver::center_continuations (vector const &consecutive if (consecutive_lines.size () == 2) { vector left_figs; - for (vsize j = consecutive_lines.size(); j--;) + for (vsize j = consecutive_lines.size (); j--;) left_figs.push_back (consecutive_lines[j]->get_bound (LEFT)); SCM ga = Grob_array::make_array (); unsmob_grob_array (ga)->set_array (left_figs); - for (vsize j = consecutive_lines.size(); j--;) + for (vsize j = consecutive_lines.size (); j--;) consecutive_lines[j]->set_object ("figures", unsmob_grob_array (ga)->smobbed_copy ()); } @@ -200,14 +200,14 @@ void Figured_bass_engraver::center_repeated_continuations () { vector consecutive_lines; - for (vsize i = 0; i <= groups_.size(); i++) + for (vsize i = 0; i <= groups_.size (); i++) { if (i < groups_.size () && groups_[i].continuation_line_ && (consecutive_lines.empty () - || (consecutive_lines[0]->get_bound(LEFT)->get_column () + || (consecutive_lines[0]->get_bound (LEFT)->get_column () == groups_[i].continuation_line_->get_bound (LEFT)->get_column () - && consecutive_lines[0]->get_bound(RIGHT)->get_column () + && consecutive_lines[0]->get_bound (RIGHT)->get_column () == groups_[i].continuation_line_->get_bound (RIGHT)->get_column ()))) consecutive_lines.push_back (groups_[i].continuation_line_); else @@ -231,7 +231,7 @@ Figured_bass_engraver::clear_spanners () } if (to_boolean (get_property ("figuredBassCenterContinuations"))) - center_repeated_continuations(); + center_repeated_continuations (); for (vsize i = 0; i < groups_.size (); i++) { @@ -354,7 +354,7 @@ Figured_bass_engraver::process_music () if (use_extenders) { vector junk_continuations; - for (vsize i = 0; i < groups_.size(); i++) + for (vsize i = 0; i < groups_.size (); i++) { Figure_group &group = groups_[i]; @@ -389,7 +389,7 @@ Figured_bass_engraver::process_music () { for (vsize i = 0; i <= junk_continuations.size (); i++) { - if (i < junk_continuations.size() + if (i < junk_continuations.size () && (i == 0 || junk_continuations[i-1] == junk_continuations[i] - 1)) consecutive.push_back (groups_[junk_continuations[i]].continuation_line_); else @@ -421,7 +421,7 @@ Figured_bass_engraver::create_grobs () alignment_->set_bound (RIGHT, muscol); SCM proc = get_property ("figuredBassFormatter"); - for (vsize i = 0; i < groups_.size(); i++) + for (vsize i = 0; i < groups_.size (); i++) { Figure_group &group = groups_[i]; diff --git a/lily/figured-bass-position-engraver.cc b/lily/figured-bass-position-engraver.cc index a3ed1528f9..ced3f7ef6e 100644 --- a/lily/figured-bass-position-engraver.cc +++ b/lily/figured-bass-position-engraver.cc @@ -18,7 +18,7 @@ class Figured_bass_position_engraver : public Engraver { - TRANSLATOR_DECLARATIONS(Figured_bass_position_engraver); + TRANSLATOR_DECLARATIONS (Figured_bass_position_engraver); Spanner *bass_figure_alignment_; Spanner *positioner_; @@ -49,7 +49,7 @@ Figured_bass_position_engraver::start_spanner () { assert (!positioner_); - positioner_ = make_spanner("BassFigureAlignmentPositioning", bass_figure_alignment_->self_scm ()); + positioner_ = make_spanner ("BassFigureAlignmentPositioning", bass_figure_alignment_->self_scm ()); positioner_->set_bound (LEFT, bass_figure_alignment_->get_bound (LEFT)); Axis_group_interface::add_element (positioner_, bass_figure_alignment_); } @@ -129,13 +129,13 @@ Figured_bass_position_engraver::acknowledge_bass_figure_alignment (Grob_info inf } -ADD_ACKNOWLEDGER(Figured_bass_position_engraver,note_column); -ADD_ACKNOWLEDGER(Figured_bass_position_engraver,slur); -ADD_END_ACKNOWLEDGER(Figured_bass_position_engraver,slur); +ADD_ACKNOWLEDGER (Figured_bass_position_engraver, note_column); +ADD_ACKNOWLEDGER (Figured_bass_position_engraver, slur); +ADD_END_ACKNOWLEDGER (Figured_bass_position_engraver, slur); -ADD_ACKNOWLEDGER(Figured_bass_position_engraver,tie); -ADD_ACKNOWLEDGER(Figured_bass_position_engraver,bass_figure_alignment); -ADD_END_ACKNOWLEDGER(Figured_bass_position_engraver,bass_figure_alignment); +ADD_ACKNOWLEDGER (Figured_bass_position_engraver, tie); +ADD_ACKNOWLEDGER (Figured_bass_position_engraver, bass_figure_alignment); +ADD_END_ACKNOWLEDGER (Figured_bass_position_engraver, bass_figure_alignment); ADD_TRANSLATOR (Figured_bass_position_engraver, /* doc */ diff --git a/lily/file-name-map.cc b/lily/file-name-map.cc index 2521d97175..3f6939c1ff 100644 --- a/lily/file-name-map.cc +++ b/lily/file-name-map.cc @@ -1,5 +1,5 @@ /* - file-name-map.cc -- implement map_file_name() + file-name-map.cc -- implement map_file_name () source file of the GNU LilyPond music typesetter diff --git a/lily/font-config-scheme.cc b/lily/font-config-scheme.cc index 5fa68f862c..6ccc616793 100644 --- a/lily/font-config-scheme.cc +++ b/lily/font-config-scheme.cc @@ -55,9 +55,9 @@ string display_config (FcConfig *fcc) { string retval; - retval += display_strlist ("Config files", FcConfigGetConfigFiles(fcc)); - retval += display_strlist ("Config dir", FcConfigGetConfigDirs(fcc)); - retval += display_strlist ("Font dir", FcConfigGetFontDirs(fcc)); + retval += display_strlist ("Config files", FcConfigGetConfigFiles (fcc)); + retval += display_strlist ("Config dir", FcConfigGetConfigDirs (fcc)); + retval += display_strlist ("Font dir", FcConfigGetFontDirs (fcc)); return retval; } @@ -96,7 +96,7 @@ LY_DEFINE (ly_font_config_get_font_file, "ly:font-config-get-font-file", 1, 0, 0 val.type = FcTypeString; val.u.s = (const FcChar8*)ly_scm2string (name).c_str (); // FC_SLANT_ITALIC; - FcPatternAdd(pat, FC_FAMILY, val, FcFalse); + FcPatternAdd (pat, FC_FAMILY, val, FcFalse); FcResult result; SCM scm_result = SCM_BOOL_F; @@ -104,7 +104,7 @@ LY_DEFINE (ly_font_config_get_font_file, "ly:font-config-get-font-file", 1, 0, 0 FcConfigSubstitute (NULL, pat, FcMatchFont); FcDefaultSubstitute (pat); - pat = FcFontMatch(NULL, pat, &result); + pat = FcFontMatch (NULL, pat, &result); FcChar8 *str = 0; if (FcPatternGetString (pat, FC_FILE, 0, &str) == FcResultMatch) scm_result = scm_from_locale_string ((char const*) str); diff --git a/lily/font-metric-scheme.cc b/lily/font-metric-scheme.cc index a1e18da2c2..aa49a29e23 100644 --- a/lily/font-metric-scheme.cc +++ b/lily/font-metric-scheme.cc @@ -21,7 +21,7 @@ LY_DEFINE (ly_font_get_glyph, "ly:font-get-glyph", { Font_metric *fm = unsmob_metrics (font); LY_ASSERT_SMOB (Font_metric, font, 1); - LY_ASSERT_TYPE(scm_is_string,name, 2); + LY_ASSERT_TYPE (scm_is_string, name, 2); Stencil m = fm->find_by_name (ly_scm2string (name)); @@ -37,7 +37,7 @@ LY_DEFINE (ly_get_glyph, "ly:get-glyph", { Font_metric *fm = unsmob_metrics (font); LY_ASSERT_SMOB (Font_metric, font, 1); - LY_ASSERT_TYPE(scm_is_number, index,2); + LY_ASSERT_TYPE (scm_is_number, index,2); return fm->get_ascii_char_stencil (scm_to_int (index)).smobbed_copy (); } @@ -49,7 +49,7 @@ LY_DEFINE (ly_font_glyph_name_to_index, "ly:font-glyph-name-to-index", { Font_metric *fm = unsmob_metrics (font); LY_ASSERT_SMOB (Font_metric, font, 1); - LY_ASSERT_TYPE(scm_is_string,name, 2); + LY_ASSERT_TYPE (scm_is_string, name, 2); return scm_from_int (fm->name_to_index (ly_scm2string (name))); } @@ -61,7 +61,7 @@ LY_DEFINE (ly_font_index_to_charcode, "ly:font-index-to-charcode", { Font_metric *fm = unsmob_metrics (font); LY_ASSERT_SMOB (Font_metric, font, 1); - LY_ASSERT_TYPE(scm_is_integer,index, 2); + LY_ASSERT_TYPE (scm_is_integer, index, 2); return scm_from_unsigned_integer (fm->index_to_charcode (scm_to_int (index))); } @@ -73,7 +73,7 @@ LY_DEFINE (ly_font_glyph_name_to_charcode, "ly:font-glyph-name-to-charcode", { Font_metric *fm = unsmob_metrics (font); LY_ASSERT_SMOB (Font_metric, font, 1); - LY_ASSERT_TYPE(scm_is_string,name, 2); + LY_ASSERT_TYPE (scm_is_string, name, 2); return scm_from_unsigned_integer (fm->index_to_charcode (fm->name_to_index (ly_scm2string (name)))); } @@ -90,7 +90,7 @@ LY_DEFINE (ly_text_dimension, "ly:text-dimension", (unsmob_metrics (font)); LY_ASSERT_SMOB (Font_metric, font, 1); - LY_ASSERT_TYPE(scm_is_string,text, 2); + LY_ASSERT_TYPE (scm_is_string, text, 2); Stencil stc (fm->text_stencil (ly_scm2string (text))); return scm_cons (ly_interval2scm (stc.extent (X_AXIS)), ly_interval2scm (stc.extent (Y_AXIS))); diff --git a/lily/freetype-error.cc b/lily/freetype-error.cc index 683671146c..5e4c377a75 100644 --- a/lily/freetype-error.cc +++ b/lily/freetype-error.cc @@ -10,7 +10,7 @@ #include "freetype.hh" #undef __FTERRORS_H__ -#define FT_ERRORDEF( e, v, s ) { e, s }, +#define FT_ERRORDEF(e, v, s) { e, s }, #define FT_ERROR_START_LIST { #define FT_ERROR_END_LIST { 0, 0 } }; diff --git a/lily/function-documentation.cc b/lily/function-documentation.cc index 38e85837c0..f210c6ef15 100644 --- a/lily/function-documentation.cc +++ b/lily/function-documentation.cc @@ -49,7 +49,7 @@ ly_add_function_documentation (SCM func, scm_set_procedure_property_x (func, ly_symbol2scm ("documentation"), ly_string2scm (s)); SCM entry = scm_cons (ly_string2scm (varlist), ly_string2scm (doc)); - scm_hashq_set_x (doc_hash_table, ly_symbol2scm (fname.c_str()), entry); + scm_hashq_set_x (doc_hash_table, ly_symbol2scm (fname.c_str ()), entry); } LY_DEFINE (ly_get_all_function_documentation, "ly:get-all-function-documentation", @@ -109,4 +109,4 @@ init_func_doc () ly_add_type_predicate ((void*) &unsmob_item, "item"); } -ADD_SCM_INIT_FUNC(func_doc, init_func_doc); +ADD_SCM_INIT_FUNC (func_doc, init_func_doc); diff --git a/lily/general-scheme.cc b/lily/general-scheme.cc index 7f741d059c..816dfeee0a 100644 --- a/lily/general-scheme.cc +++ b/lily/general-scheme.cc @@ -55,7 +55,7 @@ LY_DEFINE (ly_gulp_file, "ly:gulp-file", int sz = INT_MAX; if (size != SCM_UNDEFINED) { - LY_ASSERT_TYPE(scm_is_number,size, 2); + LY_ASSERT_TYPE (scm_is_number, size, 2); sz = scm_to_int (size); } @@ -153,8 +153,8 @@ LY_DEFINE (ly_string_substitute, "ly:string-substitute", "Replace @var{a} by @var{b} in @var{s}.") { LY_ASSERT_TYPE (scm_is_string, s, 1); - LY_ASSERT_TYPE(scm_is_string,b, 2); - LY_ASSERT_TYPE(scm_is_string,s, 3); + LY_ASSERT_TYPE (scm_is_string, b, 2); + LY_ASSERT_TYPE (scm_is_string, s, 3); string ss = ly_scm2string (s); replace_all (ss, string (scm_i_string_chars (a)), @@ -334,7 +334,7 @@ accumulate_symbol (void *closure, SCM key, SCM val, SCM result) return scm_cons (key, result); } -LY_DEFINE(ly_hash_table_keys, "ly:hash-table-keys", +LY_DEFINE (ly_hash_table_keys, "ly:hash-table-keys", 1,0,0, (SCM tab), "return a list of keys in @var{tab}") { @@ -404,7 +404,7 @@ format_single_argument (SCM arg, int precision) warning (_ ("Found infinity or nan in output. Substituting 0.0")); return ("0.0"); if (strict_infinity_checking) - abort(); + abort (); } else return (String_convert::form_string ("%.*lf", precision, val)); @@ -433,7 +433,7 @@ LY_DEFINE (ly_format, "ly:format", vector results; vsize i = 0; - while (i < format.size()) + while (i < format.size ()) { vsize tilde = format.find ('~', i); @@ -495,15 +495,15 @@ LY_DEFINE (ly_format, "ly:format", + ": too many arguments"); vsize len = 0; - for (vsize i = 0; i < results.size(); i++) - len += results[i].size(); + for (vsize i = 0; i < results.size (); i++) + len += results[i].size (); char *result = (char*) scm_malloc (len + 1); char *ptr = result; - for (vsize i = 0; i < results.size(); i++) + for (vsize i = 0; i < results.size (); i++) { - strncpy (ptr, results[i].c_str (), results[i].size()); - ptr += results[i].size(); + strncpy (ptr, results[i].c_str (), results[i].size ()); + ptr += results[i].size (); } *ptr = '\0'; diff --git a/lily/global-context-scheme.cc b/lily/global-context-scheme.cc index c888487776..18d1d80712 100644 --- a/lily/global-context-scheme.cc +++ b/lily/global-context-scheme.cc @@ -78,7 +78,7 @@ LY_DEFINE (ly_interpret_music_expression, "ly:interpret-music-expression", "final state.\n") { LY_ASSERT_SMOB (Music, mus, 1); - LY_ASSERT_TYPE (unsmob_global_context,ctx, 2); + LY_ASSERT_TYPE (unsmob_global_context, ctx, 2); Music *music = unsmob_music (mus); if (!music diff --git a/lily/grob-array-scheme.cc b/lily/grob-array-scheme.cc index b74b10fc51..e01468f9f3 100644 --- a/lily/grob-array-scheme.cc +++ b/lily/grob-array-scheme.cc @@ -29,7 +29,7 @@ LY_DEFINE (ly_grob_array_ref, "ly:grob-array-ref", { Grob_array *me = unsmob_grob_array (grob_arr); LY_ASSERT_SMOB (Grob_array, grob_arr, 1); - LY_ASSERT_TYPE(scm_is_integer,index, 2); + LY_ASSERT_TYPE (scm_is_integer, index, 2); vsize i = scm_to_unsigned (index); if (i == VPOS || i >= me->size ()) diff --git a/lily/grob-interface-scheme.cc b/lily/grob-interface-scheme.cc index a174d26453..0ecd3a0abc 100644 --- a/lily/grob-interface-scheme.cc +++ b/lily/grob-interface-scheme.cc @@ -16,8 +16,8 @@ LY_DEFINE (ly_add_interface, "ly:add-interface", "Add an interface description.") { LY_ASSERT_TYPE (ly_is_symbol, a, 1); - LY_ASSERT_TYPE(scm_is_string,b, 2); - LY_ASSERT_TYPE(ly_is_list,c, 3); + LY_ASSERT_TYPE (scm_is_string, b, 2); + LY_ASSERT_TYPE (ly_is_list, c, 3); if (!all_ifaces) { SCM tab = scm_c_make_hash_table (59); diff --git a/lily/grob-property.cc b/lily/grob-property.cc index 1a9c61dccc..702206186f 100644 --- a/lily/grob-property.cc +++ b/lily/grob-property.cc @@ -56,7 +56,7 @@ extern void check_interfaces_for_property (Grob const *me, SCM sym); /* We can't change signatures depending on NDEBUG, since NDEBUG comes over the command line and may be different per .cc file. This - should be done through the macro expansion of get_property(). + should be done through the macro expansion of get_property (). */ void Grob::internal_set_property (SCM sym, SCM v, char const *file, int line, char const *fun) @@ -152,7 +152,7 @@ Grob::internal_get_property (SCM sym) const if (val == ly_symbol2scm ("calculation-in-progress")) programming_error (_f ("cyclic dependency: calculation-in-progress encountered for #'%s (%s)", ly_symbol2string (sym).c_str (), - name().c_str ())); + name ().c_str ())); #endif if (ly_is_procedure (val) @@ -204,7 +204,7 @@ Grob::try_callback_on_alist (SCM *alist, SCM sym, SCM proc) /* If the function returns SCM_UNSPECIFIED, we assume the - property has been set with an explicit set_property() + property has been set with an explicit set_property () call. */ if (value == SCM_UNSPECIFIED) diff --git a/lily/grob-scheme.cc b/lily/grob-scheme.cc index a76797a8d2..a2d5b66739 100644 --- a/lily/grob-scheme.cc +++ b/lily/grob-scheme.cc @@ -7,7 +7,7 @@ Han-Wen Nienhuys */ -#include "warn.hh" // error() +#include "warn.hh" // error () #include "item.hh" #include "output-def.hh" #include "system.hh" @@ -22,7 +22,7 @@ LY_DEFINE (ly_grob_property_data, "ly:grob-property-data", Grob *sc = unsmob_grob (grob); LY_ASSERT_SMOB (Grob, grob, 1); - LY_ASSERT_TYPE (ly_is_symbol,sym, 2); + LY_ASSERT_TYPE (ly_is_symbol, sym, 2); return sc->get_property_data (sym); } @@ -34,7 +34,7 @@ LY_DEFINE (ly_grob_set_property_x, "ly:grob-set-property!", Grob *sc = unsmob_grob (grob); LY_ASSERT_SMOB (Grob, grob, 1); - LY_ASSERT_TYPE (ly_is_symbol,sym, 2); + LY_ASSERT_TYPE (ly_is_symbol, sym, 2); if (!ly_is_procedure (val) && !type_check_assignment (sym, val, ly_symbol2scm ("backend-type?"))) @@ -54,7 +54,7 @@ LY_DEFINE (ly_grob_property, "ly:grob-property", Grob *sc = unsmob_grob (grob); LY_ASSERT_SMOB (Grob, grob, 1); - LY_ASSERT_TYPE (ly_is_symbol,sym, 2); + LY_ASSERT_TYPE (ly_is_symbol, sym, 2); if (deflt == SCM_UNDEFINED) deflt = SCM_EOL; @@ -87,7 +87,7 @@ LY_DEFINE (ly_grob_object, "ly:grob-object", Grob *sc = unsmob_grob (grob); LY_ASSERT_SMOB (Grob, grob, 1); - LY_ASSERT_TYPE (ly_is_symbol,sym, 2); + LY_ASSERT_TYPE (ly_is_symbol, sym, 2); return sc->internal_get_object (sym); } @@ -137,8 +137,8 @@ LY_DEFINE (ly_grob_extent, "ly:grob-extent", LY_ASSERT_SMOB (Grob, grob, 1); - LY_ASSERT_SMOB(Grob, refp, 2); - LY_ASSERT_TYPE(is_axis,axis, 3); + LY_ASSERT_SMOB (Grob, refp, 2); + LY_ASSERT_TYPE (is_axis, axis, 3); Axis a = Axis (scm_to_int (axis)); @@ -161,8 +161,8 @@ LY_DEFINE (ly_grob_robust_relative_extent, "ly:grob-robust-relative-extent", LY_ASSERT_SMOB (Grob, grob, 1); - LY_ASSERT_SMOB(Grob, refp, 2); - LY_ASSERT_TYPE(is_axis,axis, 3); + LY_ASSERT_SMOB (Grob, refp, 2); + LY_ASSERT_TYPE (is_axis, axis, 3); Axis a = Axis (scm_to_int (axis)); @@ -185,8 +185,8 @@ LY_DEFINE (ly_grob_relative_coordinate, "ly:grob-relative-coordinate", LY_ASSERT_SMOB (Grob, grob, 1); - LY_ASSERT_SMOB(Grob,refp, 2); - LY_ASSERT_TYPE(is_axis,axis, 3); + LY_ASSERT_SMOB (Grob, refp, 2); + LY_ASSERT_TYPE (is_axis, axis, 3); Axis a = Axis (scm_to_int (axis)); @@ -197,7 +197,7 @@ LY_DEFINE (ly_grob_relative_coordinate, "ly:grob-relative-coordinate", SCM_ASSERT_TYPE (false, refp, SCM_ARG2, __FUNCTION__, "common refpoint"); } - return scm_from_double (sc->relative_coordinate (ref,a)); + return scm_from_double (sc->relative_coordinate (ref, a)); } @@ -209,7 +209,7 @@ LY_DEFINE (ly_grob_parent, "ly:grob-parent", Grob *sc = unsmob_grob (grob); LY_ASSERT_SMOB (Grob, grob, 1); - LY_ASSERT_TYPE(is_axis,axis, 2); + LY_ASSERT_TYPE (is_axis, axis, 2); Grob *par = sc->get_parent (Axis (scm_to_int (axis))); return par ? par->self_scm () : SCM_EOL; @@ -283,8 +283,8 @@ LY_DEFINE (ly_grob_translate_axis_x, "ly:grob-translate-axis!", Grob *me = unsmob_grob (grob); LY_ASSERT_SMOB (Grob, grob, 1); - LY_ASSERT_TYPE(scm_is_number,d, 2); - LY_ASSERT_TYPE(is_axis,a, 3); + LY_ASSERT_TYPE (scm_is_number, d, 2); + LY_ASSERT_TYPE (is_axis, a, 3); me->translate_axis (scm_to_double (d), Axis (scm_to_int (a))); return SCM_UNSPECIFIED; @@ -316,11 +316,11 @@ LY_DEFINE (ly_grob_common_refpoint, "ly:grob-common-refpoint", Grob *gr = unsmob_grob (grob); LY_ASSERT_SMOB (Grob, grob, 1); - LY_ASSERT_SMOB(Grob,other, 2); + LY_ASSERT_SMOB (Grob, other, 2); Grob *o = unsmob_grob (other); - LY_ASSERT_TYPE(is_axis,axis, 3); + LY_ASSERT_TYPE (is_axis, axis, 3); Grob *refp = gr->common_refpoint (o, Axis (scm_to_int (axis))); return refp ? refp->self_scm () : SCM_BOOL_F; @@ -335,10 +335,10 @@ LY_DEFINE (ly_grob_common_refpoint_of_array, "ly:grob-common-refpoint-of-array", Grob *gr = unsmob_grob (grob); LY_ASSERT_SMOB (Grob, grob, 1); - LY_ASSERT_SMOB(Grob_array,others, 2); + LY_ASSERT_SMOB (Grob_array, others, 2); Grob_array *ga = unsmob_grob_array (others); - LY_ASSERT_TYPE(is_axis,axis, 3); + LY_ASSERT_TYPE (is_axis, axis, 3); Grob *refp = common_refpoint_of_array (ga->array (), gr, Axis (scm_to_int (axis))); return refp ? refp->self_scm () : SCM_BOOL_F; diff --git a/lily/grob-smob.cc b/lily/grob-smob.cc index 1011d47fdc..730faa780e 100644 --- a/lily/grob-smob.cc +++ b/lily/grob-smob.cc @@ -20,7 +20,7 @@ IMPLEMENT_TYPE_P (Grob, "ly:grob?"); SCM Grob::mark_smob (SCM ses) { - ASSERT_LIVE_IS_ALLOWED(); + ASSERT_LIVE_IS_ALLOWED (); Grob *s = (Grob *) SCM_CELL_WORD_1 (ses); scm_gc_mark (s->immutable_property_alist_); diff --git a/lily/grob.cc b/lily/grob.cc index e12152821b..13d2e89615 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -654,7 +654,7 @@ Grob::stencil_height (SCM smob) return grob_stencil_extent (me, Y_AXIS); } -MAKE_SCHEME_CALLBACK(Grob, y_parent_positioning, 1); +MAKE_SCHEME_CALLBACK (Grob, y_parent_positioning, 1); SCM Grob::y_parent_positioning (SCM smob) { @@ -667,7 +667,7 @@ Grob::y_parent_positioning (SCM smob) } -MAKE_SCHEME_CALLBACK(Grob, x_parent_positioning, 1); +MAKE_SCHEME_CALLBACK (Grob, x_parent_positioning, 1); SCM Grob::x_parent_positioning (SCM smob) { diff --git a/lily/hairpin.cc b/lily/hairpin.cc index 20808956ae..87f32017a4 100644 --- a/lily/hairpin.cc +++ b/lily/hairpin.cc @@ -236,7 +236,7 @@ Hairpin::print (SCM smob) Box extent (Interval (-rad, rad), Interval (-rad, rad)); /* Hmmm, perhaps we should have a Lookup::circle () method? */ - Stencil circle(extent, + Stencil circle (extent, scm_list_4 (ly_symbol2scm ("circle"), scm_from_double (rad), scm_from_double (thick), diff --git a/lily/horizontal-bracket.cc b/lily/horizontal-bracket.cc index 9d92028ac4..07c3255264 100644 --- a/lily/horizontal-bracket.cc +++ b/lily/horizontal-bracket.cc @@ -79,7 +79,7 @@ Horizontal_bracket::make_enclosing_bracket (Grob *me, Grob *refpoint, } else { - Stencil b = make_bracket (me, ext.length(), a, dir); + Stencil b = make_bracket (me, ext.length (), a, dir); b.translate_axis (ext[LEFT] - refpoint->relative_coordinate (common, a), a); return b; diff --git a/lily/input-scheme.cc b/lily/input-scheme.cc index e3d0312642..f6f2a3f449 100644 --- a/lily/input-scheme.cc +++ b/lily/input-scheme.cc @@ -25,7 +25,7 @@ LY_DEFINE (ly_input_message, "ly:input-message", 2, 0, 1, (SCM sip, SCM msg, SCM Input *ip = unsmob_input (sip); LY_ASSERT_TYPE (unsmob_input, sip, 1); - LY_ASSERT_TYPE(scm_is_string, msg,2); + LY_ASSERT_TYPE (scm_is_string, msg,2); msg = scm_simple_format (SCM_BOOL_F, msg, rest); diff --git a/lily/instrument-switch-engraver.cc b/lily/instrument-switch-engraver.cc index a3694f0755..2637fba441 100644 --- a/lily/instrument-switch-engraver.cc +++ b/lily/instrument-switch-engraver.cc @@ -15,7 +15,7 @@ class Instrument_switch_engraver : public Engraver { - TRANSLATOR_DECLARATIONS(Instrument_switch_engraver); + TRANSLATOR_DECLARATIONS (Instrument_switch_engraver); protected: Grob *text_; SCM cue_name_; @@ -53,7 +53,7 @@ Instrument_switch_engraver::stop_translation_time_step () text_ = 0; } -ADD_TRANSLATOR(Instrument_switch_engraver, +ADD_TRANSLATOR (Instrument_switch_engraver, "Create a cue text for taking instrument.", "InstrumentSwitch ", diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index 36199d7041..0b0a282064 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -66,7 +66,7 @@ Key_engraver::create_key (bool is_default) SCM last = get_property ("lastKeySignature"); SCM key = get_property ("keySignature"); - bool extranatural = to_boolean(get_property("extraNatural")); + bool extranatural = to_boolean (get_property ("extraNatural")); if ((to_boolean (get_property ("printKeyCancellation")) || key == SCM_EOL) diff --git a/lily/key-signature-interface.cc b/lily/key-signature-interface.cc index 7c88268b62..d4ddb075e8 100644 --- a/lily/key-signature-interface.cc +++ b/lily/key-signature-interface.cc @@ -20,7 +20,7 @@ struct Key_signature_interface { DECLARE_SCHEME_CALLBACK (print, (SCM)); - DECLARE_GROB_INTERFACE(); + DECLARE_GROB_INTERFACE (); }; diff --git a/lily/ledger-line-spanner.cc b/lily/ledger-line-spanner.cc index 62d52b64c1..052e69ba19 100644 --- a/lily/ledger-line-spanner.cc +++ b/lily/ledger-line-spanner.cc @@ -28,7 +28,7 @@ struct Ledger_line_spanner Interval x_extent, Real left_shorten); - DECLARE_GROB_INTERFACE(); + DECLARE_GROB_INTERFACE (); }; Stencil @@ -42,7 +42,7 @@ Ledger_line_spanner::brew_ledger_lines (Grob *staff, { int line_count = (staff_extent.contains (pos) ? 0 - : sign (pos) * int (rint(pos - staff_extent[Direction (sign (pos))])) / 2); + : sign (pos) * int (rint (pos - staff_extent[Direction (sign (pos))])) / 2); Stencil stencil; if (line_count) { @@ -366,7 +366,7 @@ ADD_INTERFACE (Ledger_line_spanner, struct Ledgered_interface { - DECLARE_GROB_INTERFACE(); + DECLARE_GROB_INTERFACE (); }; ADD_INTERFACE (Ledgered_interface, diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 370dba2998..e5cdbc77f2 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -118,7 +118,7 @@ ly_scm2string (SCM str) SCM ly_string2scm (string const &str) { - return scm_from_locale_stringn (str.c_str(), + return scm_from_locale_stringn (str.c_str (), str.length ()); } @@ -308,7 +308,7 @@ ly_offsets2scm (vector os) for (vsize i = 0; i < os.size (); i++) { *tail = scm_cons (ly_offset2scm (os[i]), SCM_EOL); - tail = SCM_CDRLOC(*tail); + tail = SCM_CDRLOC (*tail); } return l; } diff --git a/lily/lily-lexer-scheme.cc b/lily/lily-lexer-scheme.cc index a0501e9eab..0d561f9d8b 100644 --- a/lily/lily-lexer-scheme.cc +++ b/lily/lily-lexer-scheme.cc @@ -9,7 +9,7 @@ #include "lily-lexer.hh" -LY_DEFINE(ly_lexer_keywords, "ly:lexer-keywords", +LY_DEFINE (ly_lexer_keywords, "ly:lexer-keywords", 1, 0, 0, (SCM lexer), "Return a list of (KEY . CODE) pairs, signifying the lilypond reserved words list.") { diff --git a/lily/lily-lexer.cc b/lily/lily-lexer.cc index 4a877f2d2e..4eaa441569 100644 --- a/lily/lily-lexer.cc +++ b/lily/lily-lexer.cc @@ -197,7 +197,7 @@ Lily_lexer::keyword_list () const scm_from_int (keytable_->table_[i].tokcode_), SCM_EOL); - tail = SCM_CDRLOC(*tail); + tail = SCM_CDRLOC (*tail); } return l; @@ -341,7 +341,7 @@ IMPLEMENT_DEFAULT_EQUAL_P (Lily_lexer); SCM Lily_lexer::mark_smob (SCM s) { - ASSERT_LIVE_IS_ALLOWED(); + ASSERT_LIVE_IS_ALLOWED (); Lily_lexer *lexer = (Lily_lexer *) SCM_CELL_WORD_1 (s); diff --git a/lily/lily-parser-scheme.cc b/lily/lily-parser-scheme.cc index 4e22461638..6e628d8ae8 100644 --- a/lily/lily-parser-scheme.cc +++ b/lily/lily-parser-scheme.cc @@ -175,7 +175,7 @@ LY_DEFINE (ly_parser_define_x, "ly:parser-define!", LY_ASSERT_SMOB (Lily_parser, parser_smob, 1); Lily_parser *parser = unsmob_lily_parser (parser_smob); - LY_ASSERT_TYPE (ly_is_symbol,symbol, 2); + LY_ASSERT_TYPE (ly_is_symbol, symbol, 2); parser->lexer_->set_identifier (scm_symbol_to_string (symbol), val); return SCM_UNSPECIFIED; @@ -190,7 +190,7 @@ LY_DEFINE (ly_parser_lookup, "ly:parser-lookup", Lily_parser *parser = unsmob_lily_parser (parser_smob); - LY_ASSERT_TYPE (ly_is_symbol,symbol, 2); + LY_ASSERT_TYPE (ly_is_symbol, symbol, 2); SCM val = parser->lexer_->lookup_identifier (ly_scm2string (scm_symbol_to_string (symbol))); if (val != SCM_UNDEFINED) @@ -206,7 +206,7 @@ LY_DEFINE (ly_parser_parse_string, "ly:parser-parse-string", { LY_ASSERT_SMOB (Lily_parser, parser_smob, 1); Lily_parser *parser = unsmob_lily_parser (parser_smob); - LY_ASSERT_TYPE(scm_is_string,ly_code, 2); + LY_ASSERT_TYPE (scm_is_string, ly_code, 2); parser->parse_string (ly_scm2string (ly_code)); @@ -248,7 +248,7 @@ LY_DEFINE (ly_parser_error, "ly:parser-error", LY_ASSERT_SMOB (Lily_parser, parser, 1); Lily_parser *p = unsmob_lily_parser (parser); - LY_ASSERT_TYPE(scm_is_string,msg, 2); + LY_ASSERT_TYPE (scm_is_string, msg, 2); string s = ly_scm2string (msg); Input *i = unsmob_input (input); diff --git a/lily/line-interface.cc b/lily/line-interface.cc index b9155a07ab..8720bba596 100644 --- a/lily/line-interface.cc +++ b/lily/line-interface.cc @@ -228,7 +228,7 @@ Line_interface::line (Grob *me, Offset from, Offset to) if (period <= 0) return Stencil (); - Real len = (to-from).length(); + Real len = (to-from).length (); int n = (int) rint ((len - period * fraction) / period); if (n > 0) @@ -237,7 +237,7 @@ Line_interface::line (Grob *me, Offset from, Offset to) TODO: figure out something intelligent for really short sections. */ - period = ((to-from).length() - period * fraction) / n; + period = ((to-from).length () - period * fraction) / n; } stil = make_dashed_line (thick, from, to, period, fraction); } diff --git a/lily/line-spanner.cc b/lily/line-spanner.cc index 5bbc1eeaf2..db36434b04 100644 --- a/lily/line-spanner.cc +++ b/lily/line-spanner.cc @@ -29,7 +29,7 @@ public: DECLARE_SCHEME_CALLBACK (calc_left_bound_info_and_text, (SCM)); DECLARE_SCHEME_CALLBACK (calc_right_bound_info, (SCM)); DECLARE_SCHEME_CALLBACK (calc_bound_info, (SCM, Direction)); - DECLARE_GROB_INTERFACE(); + DECLARE_GROB_INTERFACE (); }; @@ -138,7 +138,7 @@ Line_spanner::calc_bound_info (SCM smob, Direction dir) else { Grob *commony = me->common_refpoint (me->get_bound (dir), Y_AXIS); - y = me->get_bound (dir)->extent (commony, Y_AXIS).center(); + y = me->get_bound (dir)->extent (commony, Y_AXIS).center (); details = scm_acons (ly_symbol2scm ("common-Y"), commony->self_scm (), details); } diff --git a/lily/lyric-combine-music-iterator.cc b/lily/lyric-combine-music-iterator.cc index e6fcf4ea0a..ed2cff8986 100644 --- a/lily/lyric-combine-music-iterator.cc +++ b/lily/lyric-combine-music-iterator.cc @@ -96,13 +96,13 @@ Lyric_combine_music_iterator::set_music_context (Context *to) { if (music_context_) { - music_context_->event_source()->remove_listener (GET_LISTENER (set_busy), ly_symbol2scm ("music-event")); + music_context_->event_source ()->remove_listener (GET_LISTENER (set_busy), ly_symbol2scm ("music-event")); } music_context_ = to; if (to) { - to->event_source()->add_listener (GET_LISTENER (set_busy), ly_symbol2scm ("music-event")); + to->event_source ()->add_listener (GET_LISTENER (set_busy), ly_symbol2scm ("music-event")); } } diff --git a/lily/main.cc b/lily/main.cc index 508b4b8f5b..4a539e0eea 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -138,7 +138,7 @@ static char const *WARRANTY */ string prefix_directory; -/* The jail specification: USER,GROUP,JAIL,DIR. */ +/* The jail specification: USER, GROUP, JAIL, DIR. */ string jail_spec; /* The option parser */ @@ -171,7 +171,7 @@ static Long_option_init options_static[] {_i ("DIR"), "include", 'I', _i ("add DIR to search path")}, {_i ("FILE"), "init", 'i', _i ("use FILE as init file")}, #if HAVE_CHROOT - {_i ("USER,GROUP,JAIL,DIR"), "jail", 'j', _i ("chroot to JAIL, become USER:GROUP\n" + {_i ("USER, GROUP, JAIL, DIR"), "jail", 'j', _i ("chroot to JAIL, become USER:GROUP\n" "and cd into DIR")}, #endif {0, "no-print", 0, _i ("do not generate printed output")}, diff --git a/lily/melody-spanner.cc b/lily/melody-spanner.cc index e11163bf4d..a3e185bbdb 100644 --- a/lily/melody-spanner.cc +++ b/lily/melody-spanner.cc @@ -20,7 +20,7 @@ /* Interpolate stem directions for neutral stems. */ -MAKE_SCHEME_CALLBACK(Melody_spanner,calc_neutral_stem_direction, 1); +MAKE_SCHEME_CALLBACK (Melody_spanner, calc_neutral_stem_direction, 1); SCM Melody_spanner::calc_neutral_stem_direction (SCM smob) { diff --git a/lily/midi-chunk.cc b/lily/midi-chunk.cc index 5aaf5bd2e6..3e9f898993 100644 --- a/lily/midi-chunk.cc +++ b/lily/midi-chunk.cc @@ -65,8 +65,8 @@ Midi_track::data_string () const { string str = Midi_chunk::data_string (); - for (vector::const_iterator i (events_.begin()); - i != events_.end(); i ++) + for (vector::const_iterator i (events_.begin ()); + i != events_.end (); i ++) { str += (*i)->to_string (); } diff --git a/lily/moment-scheme.cc b/lily/moment-scheme.cc index 16839f81bb..4eb3086adf 100644 --- a/lily/moment-scheme.cc +++ b/lily/moment-scheme.cc @@ -22,19 +22,19 @@ LY_DEFINE (ly_make_moment, "ly:make-moment", "In absence of grace notes, @var{g} is zero.\n") { LY_ASSERT_TYPE (scm_is_integer, n, 1); - LY_ASSERT_TYPE(scm_is_integer,d, 2); + LY_ASSERT_TYPE (scm_is_integer, d, 2); int grace_num = 0; if (gn != SCM_UNDEFINED) { - LY_ASSERT_TYPE(scm_is_integer,gn, 3); + LY_ASSERT_TYPE (scm_is_integer, gn, 3); grace_num = scm_to_int (gn); } int grace_den = 1; if (gd != SCM_UNDEFINED) { - LY_ASSERT_TYPE(scm_is_integer,gd, 4); + LY_ASSERT_TYPE (scm_is_integer, gd, 4); grace_den = scm_to_int (gd); } @@ -47,7 +47,7 @@ LY_DEFINE (ly_moment_sub, "ly:moment-sub", "Subtract two moments.") { LY_ASSERT_SMOB (Moment, a, 1); - LY_ASSERT_SMOB (Moment,b, 2); + LY_ASSERT_SMOB (Moment, b, 2); Moment *ma = unsmob_moment (a); Moment *mb = unsmob_moment (b); @@ -60,7 +60,7 @@ LY_DEFINE (ly_moment_add, "ly:moment-add", "Add two moments.") { LY_ASSERT_SMOB (Moment, a, 1); - LY_ASSERT_SMOB(Moment,b, 2); + LY_ASSERT_SMOB (Moment, b, 2); Moment *ma = unsmob_moment (a); Moment *mb = unsmob_moment (b); @@ -73,7 +73,7 @@ LY_DEFINE (ly_moment_mul, "ly:moment-mul", "Multiply two moments.") { LY_ASSERT_SMOB (Moment, a, 1); - LY_ASSERT_SMOB(Moment, b, 2); + LY_ASSERT_SMOB (Moment, b, 2); Moment *ma = unsmob_moment (a); Moment *mb = unsmob_moment (b); @@ -85,7 +85,7 @@ LY_DEFINE (ly_moment_div, "ly:moment-div", "Divide two moments.") { LY_ASSERT_SMOB (Moment, a, 1); - LY_ASSERT_SMOB(Moment, b, 2); + LY_ASSERT_SMOB (Moment, b, 2); Moment *ma = unsmob_moment (a); Moment *mb = unsmob_moment (b); @@ -98,7 +98,7 @@ LY_DEFINE (ly_moment_mod, "ly:moment-mod", "Modulo of two moments.") { LY_ASSERT_SMOB (Moment, a, 1); - LY_ASSERT_SMOB(Moment, b, 2); + LY_ASSERT_SMOB (Moment, b, 2); Moment *ma = unsmob_moment (a); Moment *mb = unsmob_moment (b); diff --git a/lily/music-scheme.cc b/lily/music-scheme.cc index 1e08ba26ef..c52b1d6a87 100644 --- a/lily/music-scheme.cc +++ b/lily/music-scheme.cc @@ -26,7 +26,7 @@ LY_DEFINE (ly_music_property, "If @var{sym} is undefined, return @code{'()}.\n") { LY_ASSERT_TYPE (unsmob_music, mus, 1); - return ly_prob_property (mus,sym,dfault); + return ly_prob_property (mus, sym, dfault); } LY_DEFINE (ly_music_set_property_x, "ly:music-set-property!", @@ -129,7 +129,7 @@ LY_DEFINE (ly_music_compress, "ly:music-compress", "Compress music object @var{m} by moment @var{factor}.") { LY_ASSERT_TYPE (unsmob_music, m, 1); - LY_ASSERT_TYPE(unsmob_moment,factor, 2); + LY_ASSERT_TYPE (unsmob_moment, factor, 2); Music *sc = unsmob_music (m); sc->compress (*unsmob_moment (factor)); diff --git a/lily/new-fingering-engraver.cc b/lily/new-fingering-engraver.cc index 7cb38bd956..a4e05dadbf 100644 --- a/lily/new-fingering-engraver.cc +++ b/lily/new-fingering-engraver.cc @@ -289,7 +289,7 @@ New_fingering_engraver::position_scripts (SCM orientations, void New_fingering_engraver::stop_translation_timestep () { - position_all(); + position_all (); stem_ = 0; heads_.clear (); } diff --git a/lily/note-collision.cc b/lily/note-collision.cc index 488d77f1b7..23e3f98e01 100644 --- a/lily/note-collision.cc +++ b/lily/note-collision.cc @@ -319,7 +319,7 @@ check_meshing_chords (Grob *me, } -MAKE_SCHEME_CALLBACK(Note_collision_interface, calc_positioning_done, 1) +MAKE_SCHEME_CALLBACK (Note_collision_interface, calc_positioning_done, 1) SCM Note_collision_interface::calc_positioning_done (SCM smob) { @@ -331,7 +331,7 @@ Note_collision_interface::calc_positioning_done (SCM smob) Direction d = UP; do { - for (vsize i = cg[d].size(); i--; ) + for (vsize i = cg[d].size (); i--; ) { /* Trigger positioning diff --git a/lily/note-head-scheme.cc b/lily/note-head-scheme.cc index 5791980269..89f17453cf 100644 --- a/lily/note-head-scheme.cc +++ b/lily/note-head-scheme.cc @@ -11,14 +11,14 @@ #include "font-metric.hh" -LY_DEFINE(ly_note_head__stem_attachment, "ly:note-head::stem-attachment", +LY_DEFINE (ly_note_head__stem_attachment, "ly:note-head::stem-attachment", 2, 0, 0, (SCM font_metric, SCM glyph_name), "Get attachment in @var{font-metric} for attaching a stem to notehead " "@var{glyph-name}.") { LY_ASSERT_SMOB (Font_metric, font_metric, 1); Font_metric *fm = unsmob_metrics (font_metric); - LY_ASSERT_TYPE(scm_is_string,glyph_name, 2); + LY_ASSERT_TYPE (scm_is_string, glyph_name, 2); return ly_offset2scm (Note_head::get_stem_attachment (fm, ly_scm2string (glyph_name))); } diff --git a/lily/note-head.cc b/lily/note-head.cc index bd00033bc7..c711f8729e 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -129,7 +129,7 @@ Note_head::get_stem_attachment (Font_metric *fm, string key) return att; } -MAKE_SCHEME_CALLBACK(Note_head, calc_stem_attachment, 1); +MAKE_SCHEME_CALLBACK (Note_head, calc_stem_attachment, 1); SCM Note_head::calc_stem_attachment (SCM smob) { diff --git a/lily/note-performer.cc b/lily/note-performer.cc index ff296311ff..12996b73c9 100644 --- a/lily/note-performer.cc +++ b/lily/note-performer.cc @@ -66,7 +66,7 @@ Note_performer::process_music () } Moment len = get_event_length (n); - if (now_mom().grace_part_) + if (now_mom ().grace_part_) { len.grace_part_ = len.main_part_; len.main_part_ = Rational (0); diff --git a/lily/note-spacing.cc b/lily/note-spacing.cc index c4a79e403f..2839309ecb 100644 --- a/lily/note-spacing.cc +++ b/lily/note-spacing.cc @@ -79,7 +79,7 @@ Note_spacing::get_spacing (Grob *me, Item *right_col, if (g) { if (g->common_refpoint (it_col, X_AXIS) != it_col) - programming_error ("Note_spacing::get_spacing(): Common refpoint incorrect"); + programming_error ("Note_spacing::get_spacing (): Common refpoint incorrect"); else left_head_wid = g->extent (it_col, X_AXIS); } diff --git a/lily/open-type-font-scheme.cc b/lily/open-type-font-scheme.cc index 64b140f07e..6f95641325 100644 --- a/lily/open-type-font-scheme.cc +++ b/lily/open-type-font-scheme.cc @@ -29,7 +29,7 @@ LY_DEFINE (ly_otf_font_glyph_info, "ly:otf-font-glyph-info", 2, 0, 0, Open_type_font *otf = dynamic_cast (fm->original_font ()); SCM_ASSERT_TYPE (otf, font, SCM_ARG1, __FUNCTION__, "OTF font-metric"); - LY_ASSERT_TYPE(scm_is_string, glyph, 2); + LY_ASSERT_TYPE (scm_is_string, glyph, 2); SCM sym = scm_string_to_symbol (glyph); return scm_hashq_ref (otf->get_char_table (), sym, SCM_EOL); diff --git a/lily/open-type-font.cc b/lily/open-type-font.cc index 2e72d57af3..b8f65b45cc 100644 --- a/lily/open-type-font.cc +++ b/lily/open-type-font.cc @@ -174,7 +174,7 @@ Open_type_font::get_indexed_char (size_t signed_idx) const char name[len]; size_t code = FT_Get_Glyph_Name (face_, signed_idx, name, len); if (code) - warning (_f ("FT_Get_Glyph_Name() Freetype error: %s", + warning (_f ("FT_Get_Glyph_Name () Freetype error: %s", freetype_error_string (code))); SCM sym = ly_symbol2scm (name); @@ -299,7 +299,7 @@ Open_type_font::glyph_list () const char name[len]; size_t code = FT_Get_Glyph_Name (face_, i, name, len); if (code) - warning (_f ("FT_Get_Glyph_Name() error: %s", + warning (_f ("FT_Get_Glyph_Name () error: %s", freetype_error_string (code).c_str ())); *tail = scm_cons (scm_from_locale_string (name), SCM_EOL); diff --git a/lily/ottava-bracket.cc b/lily/ottava-bracket.cc index 5dd1036ef1..cfd1d5d036 100644 --- a/lily/ottava-bracket.cc +++ b/lily/ottava-bracket.cc @@ -23,7 +23,7 @@ struct Ottava_bracket { DECLARE_SCHEME_CALLBACK (print, (SCM)); - DECLARE_GROB_INTERFACE(); + DECLARE_GROB_INTERFACE (); }; /* diff --git a/lily/output-def.cc b/lily/output-def.cc index 81e7f7a671..853704c5c9 100644 --- a/lily/output-def.cc +++ b/lily/output-def.cc @@ -109,7 +109,7 @@ SCM Output_def::lookup_variable (SCM sym) const { SCM var = ly_module_lookup (scope_, sym); - if (SCM_VARIABLEP (var) && SCM_VARIABLE_REF(var) != SCM_UNDEFINED) + if (SCM_VARIABLEP (var) && SCM_VARIABLE_REF (var) != SCM_UNDEFINED) return SCM_VARIABLE_REF (var); if (parent_) diff --git a/lily/output-property-engraver.cc b/lily/output-property-engraver.cc index 8b42a6cbd3..e66faba789 100644 --- a/lily/output-property-engraver.cc +++ b/lily/output-property-engraver.cc @@ -64,7 +64,7 @@ Output_property_engraver::Output_property_engraver () { } -ADD_ACKNOWLEDGER (Output_property_engraver,grob); +ADD_ACKNOWLEDGER (Output_property_engraver, grob); ADD_TRANSLATOR (Output_property_engraver, /* doc */ diff --git a/lily/page-spacing.cc b/lily/page-spacing.cc index 2ebd53814e..0b8f8295d6 100644 --- a/lily/page-spacing.cc +++ b/lily/page-spacing.cc @@ -138,7 +138,7 @@ uncompress_solution (vector const &systems_per_page, return ret; } -/* the cases for page_count = 1 or 2 can be done in O(n) time. Since they +/* the cases for page_count = 1 or 2 can be done in O (n) time. Since they are by far the most common cases, we have special functions for them */ static Spacing_result space_systems_on_1_page (vector const &lines, Real page_height, bool ragged) diff --git a/lily/pango-font.cc b/lily/pango-font.cc index 10cca5bfaf..f1fb20e6c5 100644 --- a/lily/pango-font.cc +++ b/lily/pango-font.cc @@ -163,8 +163,8 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, string str, { int errorcode = FT_Get_Glyph_Name (ftface, pg, glyph_name, GLYPH_NAME_LEN); if (errorcode) - programming_error (_f ("FT_Get_Glyph_Name() error: %s", - freetype_error_string (errorcode).c_str() + programming_error (_f ("FT_Get_Glyph_Name () error: %s", + freetype_error_string (errorcode).c_str () )); } diff --git a/lily/paper-book.cc b/lily/paper-book.cc index 89e8b8ded3..bf6a98e536 100644 --- a/lily/paper-book.cc +++ b/lily/paper-book.cc @@ -227,7 +227,7 @@ Paper_book::score_title (SCM header) /* read the breakbefore property of a score block and set up the preceding system-spec to honour it. That is, SYM should be the system spec that immediately precedes the score (from which HEADER is taken) - in the get_system_specs() list */ + in the get_system_specs () list */ void set_system_penalty (SCM sys, SCM header) { @@ -273,7 +273,7 @@ Paper_book::get_score_title (SCM header) Prob *ps = make_paper_system (props); paper_system_set_stencil (ps, title); - return ps->self_scm(); + return ps->self_scm (); } return SCM_BOOL_F; diff --git a/lily/paper-column-engraver.cc b/lily/paper-column-engraver.cc index 2dd184854f..64db810b3f 100644 --- a/lily/paper-column-engraver.cc +++ b/lily/paper-column-engraver.cc @@ -154,7 +154,7 @@ Paper_column_engraver::process_music () && !measure_position (context ()).main_part_); /* - We can't do this in start_translation_timestep(), since time sig + We can't do this in start_translation_timestep (), since time sig changes won't have happened by then. */ if (start_of_measure) diff --git a/lily/paper-outputter-scheme.cc b/lily/paper-outputter-scheme.cc index 3c00d79308..672eab7ce7 100644 --- a/lily/paper-outputter-scheme.cc +++ b/lily/paper-outputter-scheme.cc @@ -45,7 +45,7 @@ LY_DEFINE (ly_outputter_dump_stencil, "ly:outputter-dump-stencil", { LY_ASSERT_SMOB (Paper_outputter, outputter, 1); - LY_ASSERT_SMOB(Stencil, stencil, 2); + LY_ASSERT_SMOB (Stencil, stencil, 2); Paper_outputter *po = unsmob_outputter (outputter); Stencil *st = unsmob_stencil (stencil); @@ -59,7 +59,7 @@ LY_DEFINE (ly_outputter_dump_string, "ly:outputter-dump-string", "Dump @var{str} onto @var{outputter}.") { LY_ASSERT_SMOB (Paper_outputter, outputter, 1); - LY_ASSERT_TYPE(scm_is_string, str, 2); + LY_ASSERT_TYPE (scm_is_string, str, 2); Paper_outputter *po = unsmob_outputter (outputter); diff --git a/lily/paper-system.cc b/lily/paper-system.cc index 544f64d8b0..9ff1a55c12 100644 --- a/lily/paper-system.cc +++ b/lily/paper-system.cc @@ -23,7 +23,7 @@ paper_system_set_stencil (Prob *prob, Stencil s) if (is_number_pair (yext)) { - Box b = s.extent_box(); + Box b = s.extent_box (); b[Y_AXIS] = ly_scm2interval (yext); s = Stencil (b, s.expr ()); diff --git a/lily/parenthesis-engraver.cc b/lily/parenthesis-engraver.cc index 8f190f969c..10e3be740e 100644 --- a/lily/parenthesis-engraver.cc +++ b/lily/parenthesis-engraver.cc @@ -25,7 +25,7 @@ protected: DECLARE_ACKNOWLEDGER (grob); }; -Parenthesis_engraver::Parenthesis_engraver() +Parenthesis_engraver::Parenthesis_engraver () { } diff --git a/lily/percent-repeat-engraver.cc b/lily/percent-repeat-engraver.cc index 55f99cd5cf..fc3d2a727a 100644 --- a/lily/percent-repeat-engraver.cc +++ b/lily/percent-repeat-engraver.cc @@ -171,7 +171,7 @@ Percent_repeat_engraver::process_music () && to_boolean (get_property ("countPercentRepeats"))) { Item *double_percent_counter = make_item ("DoublePercentRepeatCounter", - percent_event_->self_scm()); + percent_event_->self_scm ()); SCM text = scm_number_to_string (count, scm_from_int (10)); @@ -199,7 +199,7 @@ Percent_repeat_engraver::finalize () { percent_event_->origin ()->warning (_ ("unterminated percent repeat")); percent_->suicide (); - percent_counter_->suicide(); + percent_counter_->suicide (); } } diff --git a/lily/percent-repeat-iterator.cc b/lily/percent-repeat-iterator.cc index 0039b36415..726b3a6e1d 100644 --- a/lily/percent-repeat-iterator.cc +++ b/lily/percent-repeat-iterator.cc @@ -14,7 +14,7 @@ class Percent_repeat_iterator : public Sequential_iterator { public: - DECLARE_CLASSNAME(Percent_repeat_iterator); + DECLARE_CLASSNAME (Percent_repeat_iterator); DECLARE_SCHEME_CALLBACK (constructor, ()); Percent_repeat_iterator (); protected: diff --git a/lily/performance-scheme.cc b/lily/performance-scheme.cc index 5da5e3ee72..c16c0c3754 100644 --- a/lily/performance-scheme.cc +++ b/lily/performance-scheme.cc @@ -13,7 +13,7 @@ LY_DEFINE (ly_performance_write, "ly:performance-write", "Write @var{performance} to @var{filename}") { LY_ASSERT_TYPE (unsmob_performance, performance, 1); - LY_ASSERT_TYPE(scm_is_string, filename, 2); + LY_ASSERT_TYPE (scm_is_string, filename, 2); unsmob_performance (performance)->write_output (ly_scm2string (filename)); return SCM_UNSPECIFIED; diff --git a/lily/piano-pedal-bracket.cc b/lily/piano-pedal-bracket.cc index 86964ce53f..efda1be5cd 100644 --- a/lily/piano-pedal-bracket.cc +++ b/lily/piano-pedal-bracket.cc @@ -14,7 +14,7 @@ struct Piano_pedal_bracket { DECLARE_SCHEME_CALLBACK (print, (SCM)); - DECLARE_GROB_INTERFACE(); + DECLARE_GROB_INTERFACE (); }; MAKE_SCHEME_CALLBACK (Piano_pedal_bracket, print, 1); diff --git a/lily/piano-pedal-performer.cc b/lily/piano-pedal-performer.cc index ef01942221..0c52377670 100644 --- a/lily/piano-pedal-performer.cc +++ b/lily/piano-pedal-performer.cc @@ -97,7 +97,7 @@ Piano_pedal_performer::process_music () a->type_string_ = pedal_type; a->dir_ = STOP; audios_.push_back (a); - Audio_element_info info(a, p->event_drul_[STOP]); + Audio_element_info info (a, p->event_drul_[STOP]); announce_element (info); } p->start_event_ = 0; @@ -110,7 +110,7 @@ Piano_pedal_performer::process_music () a->type_string_ = pedal_type; a->dir_ = START; audios_.push_back (a); - Audio_element_info info(a, p->event_drul_[START]); + Audio_element_info info (a, p->event_drul_[START]); announce_element (info); } p->event_drul_[START] = 0; diff --git a/lily/pitch-scheme.cc b/lily/pitch-scheme.cc index aa1ac5cbfe..e2f3aecf69 100644 --- a/lily/pitch-scheme.cc +++ b/lily/pitch-scheme.cc @@ -31,8 +31,8 @@ LY_DEFINE (ly_make_pitch, "ly:make-pitch", "The @var{alter} is a rational number of whole tones for alteration.") { LY_ASSERT_TYPE (scm_is_integer, octave, 1); - LY_ASSERT_TYPE(scm_is_integer, note, 2); - LY_ASSERT_TYPE(scm_is_rational, alter, 3); + LY_ASSERT_TYPE (scm_is_integer, note, 2); + LY_ASSERT_TYPE (scm_is_rational, alter, 3); Pitch p (scm_to_int (octave), scm_to_int (note), ly_scm2rational (alter)); diff --git a/lily/pitch.cc b/lily/pitch.cc index 7c43708890..fa68b2d1ba 100644 --- a/lily/pitch.cc +++ b/lily/pitch.cc @@ -119,7 +119,7 @@ Pitch::normalize () alteration_ = Rational (0); alteration_ -= tone_pitch () - pitch; } - while (alteration_ < Rational(-1)) + while (alteration_ < Rational (-1)) { if (notename_ == 0) { diff --git a/lily/prob-scheme.cc b/lily/prob-scheme.cc index c22c88bc72..bdbe65d44e 100644 --- a/lily/prob-scheme.cc +++ b/lily/prob-scheme.cc @@ -36,7 +36,7 @@ LY_DEFINE (ly_prob_property, "ly:prob-property", { LY_ASSERT_SMOB (Prob, obj, 1); Prob *ps = unsmob_prob (obj); - LY_ASSERT_TYPE (ly_is_symbol,sym, 2); + LY_ASSERT_TYPE (ly_is_symbol, sym, 2); if (dfault == SCM_UNDEFINED) dfault = SCM_EOL; @@ -54,7 +54,7 @@ LY_DEFINE (ly_prob_type_p, "ly:prob-type?", "If obj the specified prob-type?") { Prob*prob = unsmob_prob (obj); - return scm_from_bool (prob && prob->type() == type); + return scm_from_bool (prob && prob->type () == type); } LY_DEFINE (ly_make_prob, "ly:make-prob", @@ -77,7 +77,7 @@ LY_DEFINE (ly_make_prob, "ly:make-prob", } -LY_DEFINE(ly_paper_system_p, "ly:paper-system?", +LY_DEFINE (ly_paper_system_p, "ly:paper-system?", 1, 0, 0, (SCM obj), "Type predicate.") { diff --git a/lily/prob.cc b/lily/prob.cc index e6facbddc5..ce51546d8e 100644 --- a/lily/prob.cc +++ b/lily/prob.cc @@ -47,7 +47,7 @@ Prob::equal_p (SCM sa, SCM sb) SCM bprop = props[1][i]; for (; - scm_is_pair (aprop) && scm_is_pair(bprop); + scm_is_pair (aprop) && scm_is_pair (bprop); aprop = scm_cdr (aprop), bprop = scm_cdr (bprop)) { SCM aval = scm_cdar (aprop); @@ -111,7 +111,7 @@ Prob::derived_mark () const SCM Prob::mark_smob (SCM smob) { - ASSERT_LIVE_IS_ALLOWED(); + ASSERT_LIVE_IS_ALLOWED (); Prob *system = (Prob *) SCM_CELL_WORD_1 (smob); scm_gc_mark (system->mutable_property_alist_); diff --git a/lily/relocate.cc b/lily/relocate.cc index 47502f7dbd..635b4165c9 100644 --- a/lily/relocate.cc +++ b/lily/relocate.cc @@ -233,7 +233,7 @@ setup_paths (char const *argv0_ptr) /* When running from build dir, a full LILYPOND_PREFIX is set-up at - $(OUTBASE)/{share,lib}/lilypond/current + $(OUTBASE)/{share, lib}/lilypond/current */ @@ -268,9 +268,9 @@ setup_paths (char const *argv0_ptr) string expand_environment_variables (string orig) { - const char *start_ptr = orig.c_str(); - const char *ptr = orig.c_str(); - size_t len = orig.length(); + const char *start_ptr = orig.c_str (); + const char *ptr = orig.c_str (); + size_t len = orig.length (); string out; while (ptr < start_ptr + len) @@ -318,7 +318,7 @@ expand_environment_variables (string orig) if (start_var < end_var) { string var_name (start_var, end_var - start_var); - const char *value = getenv (var_name.c_str()); + const char *value = getenv (var_name.c_str ()); if (value != NULL) out += string (value); @@ -380,11 +380,11 @@ read_relocation_file (string filename) value = expand_environment_variables (value); if (command == "set") - sane_putenv (variable.c_str(), value, true); + sane_putenv (variable.c_str (), value, true); else if (command == "setdir") - set_env_dir (variable.c_str(), value); + set_env_dir (variable.c_str (), value); else if (command == "setfile") - set_env_file (variable.c_str(), value); + set_env_file (variable.c_str (), value); else if (command == "prependdir") prepend_env_path (variable.c_str (), value); else diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index e470e9154c..063b773a92 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -87,7 +87,7 @@ Rest_collision::add_column (Grob *me, Grob *p) TODO: look at horizontal-shift to determine ordering between rests for more than two voices. */ -MAKE_SCHEME_CALLBACK(Rest_collision, calc_positioning_done, 1); +MAKE_SCHEME_CALLBACK (Rest_collision, calc_positioning_done, 1); SCM Rest_collision::calc_positioning_done (SCM smob) { diff --git a/lily/scale.cc b/lily/scale.cc index 0859c25dba..ecd2b9357e 100644 --- a/lily/scale.cc +++ b/lily/scale.cc @@ -111,5 +111,5 @@ Scale::~Scale () { } -IMPLEMENT_SMOBS(Scale); -IMPLEMENT_DEFAULT_EQUAL_P(Scale); +IMPLEMENT_SMOBS (Scale); +IMPLEMENT_DEFAULT_EQUAL_P (Scale); diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index eb89e555f8..8d66adf0dd 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -131,7 +131,7 @@ Score_engraver::finalize () typeset_all (); } -IMPLEMENT_LISTENER(Score_engraver, one_time_step); +IMPLEMENT_LISTENER (Score_engraver, one_time_step); void Score_engraver::one_time_step (SCM) { diff --git a/lily/score-scheme.cc b/lily/score-scheme.cc index 4e08f46ae1..6206011dda 100644 --- a/lily/score-scheme.cc +++ b/lily/score-scheme.cc @@ -38,7 +38,7 @@ LY_DEFINE (ly_score_output_defs, "ly:score-output-defs", SCM l = SCM_EOL; for (vsize i = 0; i < sc->defs_.size (); i++) - l = scm_cons (sc->defs_[i]->self_scm(), l); + l = scm_cons (sc->defs_[i]->self_scm (), l); return scm_reverse_x (l, SCM_EOL); } diff --git a/lily/script-interface.cc b/lily/script-interface.cc index 9087b88e6c..ff77193f17 100644 --- a/lily/script-interface.cc +++ b/lily/script-interface.cc @@ -79,7 +79,7 @@ Script_interface::print (SCM smob) struct Text_script { - DECLARE_GROB_INTERFACE(); + DECLARE_GROB_INTERFACE (); }; ADD_INTERFACE (Text_script, diff --git a/lily/semi-tie-column.cc b/lily/semi-tie-column.cc index ee18953aef..70d431f105 100644 --- a/lily/semi-tie-column.cc +++ b/lily/semi-tie-column.cc @@ -20,7 +20,7 @@ #include "tie-column-format.hh" -ADD_INTERFACE(Semi_tie_column, +ADD_INTERFACE (Semi_tie_column, "The interface for a column of l.v. ties.", /* properties */ @@ -34,7 +34,7 @@ ADD_INTERFACE(Semi_tie_column, /* Cut & paste from tie-column.cc */ -MAKE_SCHEME_CALLBACK(Semi_tie_column, calc_positioning_done, 1); +MAKE_SCHEME_CALLBACK (Semi_tie_column, calc_positioning_done, 1); SCM Semi_tie_column::calc_positioning_done (SCM smob) { @@ -58,7 +58,7 @@ Semi_tie_column::calc_positioning_done (SCM smob) problem.set_manual_tie_configuration (manual_configs); Ties_configuration base = problem.generate_optimal_configuration (); - for (vsize i = 0; i < lv_ties.size(); i++) + for (vsize i = 0; i < lv_ties.size (); i++) { SCM cp = Tie::get_control_points (lv_ties[i], problem.common_x_refpoint (), base[i], problem.details_); diff --git a/lily/semi-tie.cc b/lily/semi-tie.cc index a95b30737f..a12156e603 100644 --- a/lily/semi-tie.cc +++ b/lily/semi-tie.cc @@ -15,7 +15,7 @@ #include "warn.hh" #include "staff-symbol-referencer.hh" -ADD_INTERFACE(Semi_tie, +ADD_INTERFACE (Semi_tie, "A tie which is only on one side connected to note heads. ", @@ -28,7 +28,7 @@ ADD_INTERFACE(Semi_tie, "thickness " ); -MAKE_SCHEME_CALLBACK(Semi_tie, calc_control_points, 1) +MAKE_SCHEME_CALLBACK (Semi_tie, calc_control_points, 1) SCM Semi_tie::calc_control_points (SCM smob) { diff --git a/lily/separation-item.cc b/lily/separation-item.cc index c0536b6ce3..0e3a075100 100644 --- a/lily/separation-item.cc +++ b/lily/separation-item.cc @@ -68,7 +68,7 @@ Separation_item::conditional_skyline (Grob *me, Grob *left) } -MAKE_SCHEME_CALLBACK(Separation_item,calc_skylines,1); +MAKE_SCHEME_CALLBACK (Separation_item, calc_skylines,1); SCM Separation_item::calc_skylines (SCM smob) { diff --git a/lily/simple-closure.cc b/lily/simple-closure.cc index f473b30e47..22ee294f49 100644 --- a/lily/simple-closure.cc +++ b/lily/simple-closure.cc @@ -83,14 +83,14 @@ evaluate_with_simple_closure (SCM delayed_argument, return SCM_EOL; } -LY_DEFINE(ly_simple_closure_p, "ly:simple-closure?", +LY_DEFINE (ly_simple_closure_p, "ly:simple-closure?", 1,0,0, (SCM clos), "Type predicate.") { return scm_from_bool (is_simple_closure (clos)); } -LY_DEFINE(ly_make_simple_closure, "ly:make-simple-closure", +LY_DEFINE (ly_make_simple_closure, "ly:make-simple-closure", 1, 0, 0, (SCM expr), "Make a simple closure. @var{expr} should be form of " "@code{(@var{func} @var{a1} @var{A2} ...)}, and will be invoked " @@ -98,11 +98,11 @@ LY_DEFINE(ly_make_simple_closure, "ly:make-simple-closure", { SCM z; - SCM_NEWSMOB(z, simple_closure_tag, expr); + SCM_NEWSMOB (z, simple_closure_tag, expr); return z; } -LY_DEFINE(ly_eval_simple_closure, "ly:eval-simple-closure", +LY_DEFINE (ly_eval_simple_closure, "ly:eval-simple-closure", 2, 2, 0, (SCM delayed, SCM closure, SCM scm_start, SCM scm_end), "Evaluate a simple closure with the given delayed argument. " "If start and end are defined, evaluate it purely with those " diff --git a/lily/simple-spacer-scheme.cc b/lily/simple-spacer-scheme.cc index 2e0f4ba9f7..6f76106706 100644 --- a/lily/simple-spacer-scheme.cc +++ b/lily/simple-spacer-scheme.cc @@ -29,7 +29,7 @@ LY_DEFINE (ly_solve_spring_rod_problem, "ly:solve-spring-rod-problem", SCM_ASSERT_TYPE (len >= 0, springs, SCM_ARG1, __FUNCTION__, "list of springs"); SCM_ASSERT_TYPE (scm_ilength (rods) > 0, rods, SCM_ARG1, __FUNCTION__, "list of rods"); - LY_ASSERT_TYPE(scm_is_number, length, 3); + LY_ASSERT_TYPE (scm_is_number, length, 3); bool is_ragged = ragged == SCM_BOOL_T; Simple_spacer spacer; diff --git a/lily/skyline.cc b/lily/skyline.cc index b729e5312b..0e2f2fa12b 100644 --- a/lily/skyline.cc +++ b/lily/skyline.cc @@ -153,7 +153,7 @@ Building::Building (Box const &b, Real horizon_padding, Axis horizon_axis, Direc void Building::precompute () { - slope_ = (height_[RIGHT] - height_[LEFT]) / (iv_.length()); + slope_ = (height_[RIGHT] - height_[LEFT]) / (iv_.length ()); if (height_[LEFT] == height_[RIGHT]) /* in case they're both infinity */ slope_ = 0; @@ -381,7 +381,7 @@ Skyline::internal_build_skyline (list *buildings) while (!buildings->empty ()) partials.push_back (non_overlapping_skyline (buildings)); - /* we'd like to say while (partials->size () > 1) but that's O(n). + /* we'd like to say while (partials->size () > 1) but that's O (n). Instead, we exit in the middle of the loop */ while (!partials.empty ()) { @@ -651,7 +651,7 @@ IMPLEMENT_DEFAULT_EQUAL_P (Skyline_pair); SCM Skyline::mark_smob (SCM) { - ASSERT_LIVE_IS_ALLOWED(); + ASSERT_LIVE_IS_ALLOWED (); return SCM_EOL; } diff --git a/lily/slur-scoring.cc b/lily/slur-scoring.cc index 6dc6b5718a..b89f128672 100644 --- a/lily/slur-scoring.cc +++ b/lily/slur-scoring.cc @@ -273,7 +273,7 @@ Slur_score_state::fill (Grob *me) } -MAKE_SCHEME_CALLBACK(Slur, calc_control_points, 1) +MAKE_SCHEME_CALLBACK (Slur, calc_control_points, 1) SCM Slur::calc_control_points (SCM smob) { @@ -621,7 +621,7 @@ Slur_score_state::generate_avoid_offsets () const if (!xe.is_empty () && !ye.is_empty ()) - avoid.push_back (Offset (xe.center(), ye[dir_])); + avoid.push_back (Offset (xe.center (), ye[dir_])); } } return avoid; diff --git a/lily/slur.cc b/lily/slur.cc index 9ce45e61f5..c2e00f243d 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -32,7 +32,7 @@ -MAKE_SCHEME_CALLBACK(Slur, calc_direction, 1) +MAKE_SCHEME_CALLBACK (Slur, calc_direction, 1) SCM Slur::calc_direction (SCM smob) { diff --git a/lily/smobs.cc b/lily/smobs.cc index 34b5bb36ab..a4c88fe58b 100644 --- a/lily/smobs.cc +++ b/lily/smobs.cc @@ -21,7 +21,7 @@ init_smob_protection () } ADD_SCM_INIT_FUNC (init_smob_protection, init_smob_protection); -LY_DEFINE(ly_smob_protects, "ly:smob-protects", +LY_DEFINE (ly_smob_protects, "ly:smob-protects", 0, 0, 0, (), "Return lily's internal smob protection list") { diff --git a/lily/source-file.cc b/lily/source-file.cc index 879653dff0..90bc5fcabd 100644 --- a/lily/source-file.cc +++ b/lily/source-file.cc @@ -188,7 +188,7 @@ Source_file::quote_input (char const *pos_str0) const string context = line.substr (0, ch) + to_string ('\n') + to_string (' ', col) - + line.substr (ch, line.length()-ch); + + line.substr (ch, line.length ()-ch); return context; } @@ -365,9 +365,9 @@ Source_file::get_port () const #include "ly-smobs.icc" -IMPLEMENT_SMOBS(Source_file); -IMPLEMENT_DEFAULT_EQUAL_P(Source_file); -IMPLEMENT_TYPE_P(Source_file, "ly:source-file?"); +IMPLEMENT_SMOBS (Source_file); +IMPLEMENT_DEFAULT_EQUAL_P (Source_file); +IMPLEMENT_TYPE_P (Source_file, "ly:source-file?"); SCM Source_file::mark_smob (SCM smob) diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 50848ecc59..ee4ddba35d 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -50,7 +50,7 @@ Spacing_spanner::set_springs (SCM smob) Spanner *me = unsmob_spanner (smob); /* - can't use get_system() ? --hwn. + can't use get_system () ? --hwn. */ Spacing_options options; options.init_from_grob (me); @@ -404,7 +404,7 @@ bool Spacing_spanner::fills_measure (Grob *me, Item *left, Item *col) { System *sys = get_root_system (me); - Item *next = sys->column (col->get_column()->get_rank () + 1); + Item *next = sys->column (col->get_column ()->get_rank () + 1); if (!next) return false; diff --git a/lily/spanner-scheme.cc b/lily/spanner-scheme.cc index ec70ba6817..0dc62b3a51 100644 --- a/lily/spanner-scheme.cc +++ b/lily/spanner-scheme.cc @@ -16,7 +16,7 @@ LY_DEFINE (ly_spanner_bound, "ly:spanner-bound", "for left, and @code{1} for right.") { LY_ASSERT_TYPE (unsmob_spanner, slur, 1); - LY_ASSERT_TYPE(is_direction, dir,2); + LY_ASSERT_TYPE (is_direction, dir,2); return unsmob_spanner (slur)->get_bound (to_dir (dir))->self_scm (); } diff --git a/lily/spanner.cc b/lily/spanner.cc index 14ab378668..8cc223b191 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -393,7 +393,7 @@ unsmob_spanner (SCM s) return dynamic_cast (unsmob_grob (s)); } -MAKE_SCHEME_CALLBACK(Spanner, bounds_width, 1); +MAKE_SCHEME_CALLBACK (Spanner, bounds_width, 1); SCM Spanner::bounds_width (SCM grob) { diff --git a/lily/staff-symbol.cc b/lily/staff-symbol.cc index 9f6b1915e8..d7102ac15b 100644 --- a/lily/staff-symbol.cc +++ b/lily/staff-symbol.cc @@ -139,7 +139,7 @@ Staff_symbol::get_ledger_line_thickness (Grob *me) return z[X_AXIS] * get_line_thickness (me) + z[Y_AXIS] * staff_space (me); } -MAKE_SCHEME_CALLBACK(Staff_symbol,height,1); +MAKE_SCHEME_CALLBACK (Staff_symbol, height,1); SCM Staff_symbol::height (SCM smob) { diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc index c8fbd63d18..9bb588db4f 100644 --- a/lily/stem-tremolo.cc +++ b/lily/stem-tremolo.cc @@ -160,7 +160,7 @@ Stem_tremolo::untranslated_stencil (Grob *me, Real slope) if (!stem) { programming_error ("no stem for stem-tremolo"); - return Stencil(); + return Stencil (); } Direction stemdir = get_grob_direction (stem); diff --git a/lily/stem.cc b/lily/stem.cc index 857dfb7d49..4189915f37 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -402,7 +402,7 @@ Stem::duration_log (Grob *me) return (scm_is_number (s)) ? scm_to_int (s) : 2; } -MAKE_SCHEME_CALLBACK(Stem, calc_positioning_done, 1); +MAKE_SCHEME_CALLBACK (Stem, calc_positioning_done, 1); SCM Stem::calc_positioning_done (SCM smob) { @@ -508,7 +508,7 @@ Stem::calc_positioning_done (SCM smob) return SCM_BOOL_T; } -MAKE_SCHEME_CALLBACK(Stem, calc_direction, 1); +MAKE_SCHEME_CALLBACK (Stem, calc_direction, 1); SCM Stem::calc_direction (SCM smob) { @@ -531,7 +531,7 @@ Stem::calc_direction (SCM smob) return scm_from_int (dir); } -MAKE_SCHEME_CALLBACK(Stem, calc_default_direction, 1); +MAKE_SCHEME_CALLBACK (Stem, calc_default_direction, 1); SCM Stem::calc_default_direction (SCM smob) { @@ -570,11 +570,11 @@ Stem::height (SCM smob) } /* - Can't get_stencil(), since that would cache stencils too early. + Can't get_stencil (), since that would cache stencils too early. This causes problems with beams. */ Stencil *stencil = unsmob_stencil (print (smob)); - Interval iv = stencil ? stencil->extent (Y_AXIS) : Interval(); + Interval iv = stencil ? stencil->extent (Y_AXIS) : Interval (); if (beam) { if (dir == CENTER) @@ -857,7 +857,7 @@ Stem::get_stem_info (Grob *me) return si; } -MAKE_SCHEME_CALLBACK(Stem, calc_stem_info, 1); +MAKE_SCHEME_CALLBACK (Stem, calc_stem_info, 1); SCM Stem::calc_stem_info (SCM smob) { diff --git a/lily/stencil-scheme.cc b/lily/stencil-scheme.cc index 90a82ec466..36f1406b66 100644 --- a/lily/stencil-scheme.cc +++ b/lily/stencil-scheme.cc @@ -22,8 +22,8 @@ LY_DEFINE (ly_stencil_translate_axis, "ly:stencil-translate-axis", { Stencil *s = unsmob_stencil (stil); LY_ASSERT_SMOB (Stencil, stil, 1); - LY_ASSERT_TYPE(scm_is_number,amount, 2); - LY_ASSERT_TYPE(is_axis,axis, 3); + LY_ASSERT_TYPE (scm_is_number, amount, 2); + LY_ASSERT_TYPE (is_axis, axis, 3); Real real_amount = scm_to_double (amount); @@ -40,7 +40,7 @@ LY_DEFINE (ly_stencil_translate, "ly:stencil-translate", { Stencil *s = unsmob_stencil (stil); LY_ASSERT_SMOB (Stencil, stil, 1); - LY_ASSERT_TYPE(is_number_pair, offset, 2); + LY_ASSERT_TYPE (is_number_pair, offset, 2); Offset o = ly_scm2offset (offset); SCM new_s = s->smobbed_copy (); @@ -65,7 +65,7 @@ LY_DEFINE (ly_stencil_extent, "ly:stencil-extent", { Stencil *s = unsmob_stencil (stil); LY_ASSERT_SMOB (Stencil, stil, 1); - LY_ASSERT_TYPE(is_axis, axis, 2); + LY_ASSERT_TYPE (is_axis, axis, 2); return ly_interval2scm (s->extent (Axis (scm_to_int (axis)))); } @@ -100,19 +100,19 @@ LY_DEFINE (ly_stencil_combine_at_edge, "ly:stencil-combine-at-edge", first, SCM_ARG1, __FUNCTION__, "Stencil, #f or ()"); SCM_ASSERT_TYPE (s2 || second == SCM_BOOL_F || second == SCM_EOL, second, SCM_ARG4, __FUNCTION__, "Stencil, #f or ()"); - LY_ASSERT_TYPE(is_axis, axis, 2); - LY_ASSERT_TYPE(is_direction, direction, 3); + LY_ASSERT_TYPE (is_axis, axis, 2); + LY_ASSERT_TYPE (is_direction, direction, 3); Real p = 0.0; if (padding != SCM_UNDEFINED) { - LY_ASSERT_TYPE(scm_is_number, padding, 5); + LY_ASSERT_TYPE (scm_is_number, padding, 5); p = scm_to_double (padding); } Real m = 0.0; if (minimum != SCM_UNDEFINED) { - LY_ASSERT_TYPE(scm_is_number, minimum, 6); + LY_ASSERT_TYPE (scm_is_number, minimum, 6); m = scm_to_double (minimum); } @@ -174,14 +174,14 @@ LY_DEFINE (ly_make_stencil, "ly:make-stencil", Interval x; if (xext != SCM_UNDEFINED) { - LY_ASSERT_TYPE(is_number_pair, xext, 2); + LY_ASSERT_TYPE (is_number_pair, xext, 2); x = ly_scm2interval (xext); } Interval y; if (yext != SCM_UNDEFINED) { - LY_ASSERT_TYPE(is_number_pair,yext, 3); + LY_ASSERT_TYPE (is_number_pair, yext, 3); y = ly_scm2interval (yext); } @@ -197,8 +197,8 @@ LY_DEFINE (ly_stencil_aligned_to, "ly:stencil-aligned-to", "Other values are interpolated (so 0 means the center).") { LY_ASSERT_SMOB (Stencil, stil, 1); - LY_ASSERT_TYPE(is_axis,axis, 2); - LY_ASSERT_TYPE(scm_is_number, dir, 3); + LY_ASSERT_TYPE (is_axis, axis, 2); + LY_ASSERT_TYPE (scm_is_number, dir, 3); Stencil target = *unsmob_stencil (stil); @@ -264,9 +264,9 @@ LY_DEFINE (ly_bracket, "ly:bracket", "may be negative. The thickness is given by @var{t}.") { LY_ASSERT_TYPE (is_axis, a, 1); - LY_ASSERT_TYPE(is_number_pair,iv, 2); - LY_ASSERT_TYPE(scm_is_number, t,3); - LY_ASSERT_TYPE(scm_is_number, p,4); + LY_ASSERT_TYPE (is_number_pair, iv, 2); + LY_ASSERT_TYPE (scm_is_number, t,3); + LY_ASSERT_TYPE (scm_is_number, p,4); return Lookup::bracket ((Axis)scm_to_int (a), ly_scm2interval (iv), scm_to_double (t), @@ -280,9 +280,9 @@ LY_DEFINE (ly_stencil_rotate, "ly:stencil-rotate", { Stencil *s = unsmob_stencil (stil); LY_ASSERT_SMOB (Stencil, stil, 1); - LY_ASSERT_TYPE(scm_is_number,angle, 2); - LY_ASSERT_TYPE(scm_is_number, x,3); - LY_ASSERT_TYPE(scm_is_number, y, 4); + LY_ASSERT_TYPE (scm_is_number, angle, 2); + LY_ASSERT_TYPE (scm_is_number, x,3); + LY_ASSERT_TYPE (scm_is_number, y, 4); Real a = scm_to_double (angle); Real x_off = scm_to_double (x); Real y_off = scm_to_double (y); @@ -301,8 +301,8 @@ LY_DEFINE (ly_round_filled_box, "ly:round-filled-box", "@var{yext} and roundness @var{blot}.") { LY_ASSERT_TYPE (is_number_pair, xext, 1); - LY_ASSERT_TYPE(is_number_pair, yext, 2); - LY_ASSERT_TYPE(scm_is_number, blot, 3); + LY_ASSERT_TYPE (is_number_pair, yext, 2); + LY_ASSERT_TYPE (scm_is_number, blot, 3); return Lookup::round_filled_box (Box (ly_scm2interval (xext), ly_scm2interval (yext)), scm_to_double (blot)).smobbed_copy (); diff --git a/lily/stream-event-scheme.cc b/lily/stream-event-scheme.cc index 68aedd5497..04df26a722 100644 --- a/lily/stream-event-scheme.cc +++ b/lily/stream-event-scheme.cc @@ -15,7 +15,7 @@ LY_DEFINE (ly_make_stream_event, "ly:make-stream-event", LY_ASSERT_TYPE (ly_is_symbol, cl, 1); /* should be scm_list_p, but scm_list_p is expensive. */ - LY_ASSERT_TYPE(scm_is_pair, proplist, 2); + LY_ASSERT_TYPE (scm_is_pair, proplist, 2); if (proplist == SCM_UNDEFINED) proplist = SCM_EOL; diff --git a/lily/system-start-delimiter-engraver.cc b/lily/system-start-delimiter-engraver.cc index 479618addc..ee4bf6ef11 100644 --- a/lily/system-start-delimiter-engraver.cc +++ b/lily/system-start-delimiter-engraver.cc @@ -21,7 +21,7 @@ struct Bracket_nesting_node { public: - virtual ~Bracket_nesting_node(){} + virtual ~Bracket_nesting_node (){} virtual bool add_staff (Grob *) { return false; } virtual void add_support (Grob *) { } virtual void set_bound (Direction, Grob *){} @@ -219,7 +219,7 @@ System_start_delimiter_engraver::finalize () void System_start_delimiter_engraver::acknowledge_staff_symbol (Grob_info inf) { - Grob *staff = inf.grob(); + Grob *staff = inf.grob (); bool succ = nesting_->add_staff (staff); if (!succ) diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index 206ccd84db..0d12490ff9 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -167,7 +167,7 @@ System_start_delimiter::staff_brace (Grob *me, Real y) while (hi - lo > 1); Stencil stil (fm->find_by_name ("brace" + to_string (lo))); - stil.translate_axis (-b[X_AXIS].length()/2, X_AXIS); + stil.translate_axis (-b[X_AXIS].length ()/2, X_AXIS); stil.translate_axis (-0.2, X_AXIS); diff --git a/lily/system-start-text.cc b/lily/system-start-text.cc index 00795d22d7..494ab149b8 100644 --- a/lily/system-start-text.cc +++ b/lily/system-start-text.cc @@ -19,7 +19,7 @@ class System_start_text { public: static Stencil get_stencil (Grob *); - DECLARE_GROB_INTERFACE(); + DECLARE_GROB_INTERFACE (); DECLARE_SCHEME_CALLBACK (print, (SCM)); }; @@ -47,7 +47,7 @@ System_start_text::get_stencil (Grob *me_grob) p->align_to (Y_AXIS, robust_scm2double (align_y, 0.0)); return *p; } - return Stencil(); + return Stencil (); } diff --git a/lily/system.cc b/lily/system.cc index 06ac09e39a..bbbe941faf 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -350,7 +350,7 @@ System::get_paper_system () Grob *g = entries[j].grob_; Stencil st = g->get_print_stencil (); - if (st.expr() == SCM_EOL) + if (st.expr () == SCM_EOL) continue; Offset o; diff --git a/lily/tab-harmonic-engraver.cc b/lily/tab-harmonic-engraver.cc index 900f4816dc..1faa114144 100644 --- a/lily/tab-harmonic-engraver.cc +++ b/lily/tab-harmonic-engraver.cc @@ -25,7 +25,7 @@ protected: DECLARE_ACKNOWLEDGER (note_head); }; -Tab_harmonic_engraver::Tab_harmonic_engraver() +Tab_harmonic_engraver::Tab_harmonic_engraver () { } diff --git a/lily/tab-staff-symbol-engraver.cc b/lily/tab-staff-symbol-engraver.cc index 03ba28679c..f103e0f6b4 100644 --- a/lily/tab-staff-symbol-engraver.cc +++ b/lily/tab-staff-symbol-engraver.cc @@ -14,7 +14,7 @@ class Tab_staff_symbol_engraver : public Engraver public: TRANSLATOR_DECLARATIONS (Tab_staff_symbol_engraver); protected: - DECLARE_ACKNOWLEDGER(staff_symbol); + DECLARE_ACKNOWLEDGER (staff_symbol); }; void diff --git a/lily/tie-column.cc b/lily/tie-column.cc index b54428d986..eb2a00d84c 100644 --- a/lily/tie-column.cc +++ b/lily/tie-column.cc @@ -69,7 +69,7 @@ Tie_column::before_line_breaking (SCM smob) return SCM_UNSPECIFIED; } -MAKE_SCHEME_CALLBACK(Tie_column, calc_positioning_done, 1) +MAKE_SCHEME_CALLBACK (Tie_column, calc_positioning_done, 1) SCM Tie_column::calc_positioning_done (SCM smob) { @@ -93,7 +93,7 @@ Tie_column::calc_positioning_done (SCM smob) Ties_configuration base = problem.generate_optimal_configuration (); - for (vsize i = 0; i < base.size(); i++) + for (vsize i = 0; i < base.size (); i++) { SCM cp = Tie::get_control_points (ties[i], problem.common_x_refpoint (), base[i], diff --git a/lily/tie-configuration.cc b/lily/tie-configuration.cc index 2491f7e3ef..9cccd505b9 100644 --- a/lily/tie-configuration.cc +++ b/lily/tie-configuration.cc @@ -64,7 +64,7 @@ Tie_configuration::get_transformed_bezier (Tie_details const &details) const Bezier Tie_configuration::get_untransformed_bezier (Tie_details const &details) const { - Real l = attachment_x_.length(); + Real l = attachment_x_.length (); if (isinf (l) || isnan (l)) { programming_error ("Inf or NaN encountered"); @@ -106,14 +106,14 @@ Tie_configuration::add_score (Real s, string desc) Real Tie_configuration::height (Tie_details const &details) const { - Real l = attachment_x_.length(); + Real l = attachment_x_.length (); return slur_shape (l, details.height_limit_, details.ratio_).curve_point (0.5)[Y_AXIS]; } -Ties_configuration::Ties_configuration() +Ties_configuration::Ties_configuration () { score_ = 0.0; scored_ = false; @@ -184,7 +184,7 @@ string Ties_configuration::complete_score_card () const { string s; - for (vsize i = 0; i < size(); i++) + for (vsize i = 0; i < size (); i++) { s += complete_tie_card (i); } diff --git a/lily/tie-details.cc b/lily/tie-details.cc index ddb662fd30..7c39b1c717 100644 --- a/lily/tie-details.cc +++ b/lily/tie-details.cc @@ -32,20 +32,20 @@ Tie_details::from_grob (Grob *me) SCM details = me->get_property ("details"); - height_limit_ = get_real_detail("height-limit", 0.75); - ratio_ = get_real_detail("ratio", .333); + height_limit_ = get_real_detail ("height-limit", 0.75); + ratio_ = get_real_detail ("ratio", .333); between_length_limit_ = get_real_detail ("between-length-limit", 1.0); - wrong_direction_offset_penalty_ = get_real_detail("wrong-direction-offset-penalty", 10); + wrong_direction_offset_penalty_ = get_real_detail ("wrong-direction-offset-penalty", 10); - min_length_ = get_real_detail("min-length", 1.0); - min_length_penalty_factor_ = get_real_detail("min-length-penalty-factor", 1.0); + min_length_ = get_real_detail ("min-length", 1.0); + min_length_penalty_factor_ = get_real_detail ("min-length-penalty-factor", 1.0); // in half-space center_staff_line_clearance_ = get_real_detail ("center-staff-line-clearance", 0.4); tip_staff_line_clearance_ = get_real_detail ("tip-staff-line-clearance", 0.4); - staff_line_collision_penalty_ = get_real_detail("staff-line-collision-penalty", 5); + staff_line_collision_penalty_ = get_real_detail ("staff-line-collision-penalty", 5); dot_collision_clearance_ = get_real_detail ( "dot-collision-clearance", 0.25); dot_collision_penalty_ = get_real_detail ( "dot-collision-penalty", 0.25); x_gap_ = get_real_detail ("note-head-gap", 0.2); diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index b97a5ad9c2..bdcd3dbb36 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -252,7 +252,7 @@ Tie_engraver::stop_translation_timestep () if (!wait && new_heads_to_tie.size ()) heads_to_tie_.clear (); - // hmmm, how to do with copy() ? + // hmmm, how to do with copy () ? for (vsize i = 0; i < new_heads_to_tie.size (); i++) heads_to_tie_.push_back (new_heads_to_tie[i]); diff --git a/lily/tie-formatting-problem.cc b/lily/tie-formatting-problem.cc index 6c7e2a024f..a6031402a6 100644 --- a/lily/tie-formatting-problem.cc +++ b/lily/tie-formatting-problem.cc @@ -58,7 +58,7 @@ Tie_formatting_problem::get_attachment (Real y, Drul_array columns) const return attachments; } -Tie_formatting_problem::Tie_formatting_problem() +Tie_formatting_problem::Tie_formatting_problem () { x_refpoint_ = 0; } @@ -139,12 +139,12 @@ Tie_formatting_problem::set_column_chord_outline (vector bounds, */ boxes.push_back (Box (x, y)); - stem_extents_[key].unite (Box (x,y)); + stem_extents_[key].unite (Box (x, y)); if (dir == LEFT) { Box flag_box = Stem::get_translated_flag (stem).extent_box (); - flag_box.translate( Offset (x[RIGHT], X_AXIS)); + flag_box.translate ( Offset (x[RIGHT], X_AXIS)); boxes.push_back (flag_box); } } @@ -166,9 +166,9 @@ Tie_formatting_problem::set_column_chord_outline (vector bounds, } extract_grob_set (stem, "note-heads", heads); - for (vsize i = 0; i < heads.size(); i ++) + for (vsize i = 0; i < heads.size (); i ++) { - if (find (bounds.begin(), bounds.end (), dynamic_cast (heads[i])) == bounds.end ()) + if (find (bounds.begin (), bounds.end (), dynamic_cast (heads[i])) == bounds.end ()) { /* other untied notes in the same chord. @@ -196,7 +196,7 @@ Tie_formatting_problem::set_column_chord_outline (vector bounds, { Interval x; Interval y; - if (head_boxes.size()) + if (head_boxes.size ()) { Box b = boundary (head_boxes, updowndir, 0); x = b[X_AXIS]; @@ -612,7 +612,7 @@ Tie_formatting_problem::score_aptitude (Tie_configuration *conf, while (flip (&d) != LEFT); if (ties_conf - && ties_conf->size() == 1) + && ties_conf->size () == 1) { Direction d = LEFT; Drul_array stems (0, 0); @@ -1118,7 +1118,7 @@ Tie_formatting_problem::generate_collision_variations (Ties_configuration const ); vars.push_back (var); } - if (i == ties.size() && !specifications_[i].has_manual_position_ + if (i == ties.size () && !specifications_[i].has_manual_position_ && ties[i].dir_ == UP) { Tie_configuration_variation var; @@ -1190,7 +1190,7 @@ Tie_formatting_problem::set_debug_scoring (Ties_configuration const &base) if (to_boolean (x_refpoint_->layout () ->lookup_variable (ly_symbol2scm ("debug-tie-scoring")))) { - for (vsize i = 0; i < base.size(); i++) + for (vsize i = 0; i < base.size (); i++) { string card = base.complete_tie_card (i); specifications_[i].tie_grob_->set_property ("quant-score", diff --git a/lily/tie-performer.cc b/lily/tie-performer.cc index 0519fcb930..2fe3df0733 100644 --- a/lily/tie-performer.cc +++ b/lily/tie-performer.cc @@ -101,7 +101,7 @@ Tie_performer::stop_translation_timestep () heads_to_tie_ = now_heads_; } - for (vsize i = now_tied_heads_.size(); i--;) + for (vsize i = now_tied_heads_.size (); i--;) heads_to_tie_.push_back (now_tied_heads_[i]); event_ = 0; diff --git a/lily/tie.cc b/lily/tie.cc index 1d4e7fca9a..87548a7056 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -139,7 +139,7 @@ Tie::get_default_dir (Grob *me) } -MAKE_SCHEME_CALLBACK(Tie, calc_direction, 1); +MAKE_SCHEME_CALLBACK (Tie, calc_direction, 1); SCM Tie::calc_direction (SCM smob) { @@ -205,7 +205,7 @@ Tie::get_control_points (Grob *me, } -MAKE_SCHEME_CALLBACK(Tie, calc_control_points, 1); +MAKE_SCHEME_CALLBACK (Tie, calc_control_points, 1); SCM Tie::calc_control_points (SCM smob) { diff --git a/lily/time-scaled-music-iterator.cc b/lily/time-scaled-music-iterator.cc index f5ca62dbfb..b681a69342 100644 --- a/lily/time-scaled-music-iterator.cc +++ b/lily/time-scaled-music-iterator.cc @@ -24,7 +24,7 @@ class Time_scaled_music_iterator : public Music_wrapper_iterator public: DECLARE_SCHEME_CALLBACK (constructor, ()); /* construction */ - DECLARE_CLASSNAME(Time_scaled_music_iterator); + DECLARE_CLASSNAME (Time_scaled_music_iterator); Time_scaled_music_iterator (); protected: virtual void process (Moment m); @@ -96,7 +96,7 @@ Time_scaled_music_iterator::process (Moment m) m.main_part_ == next_split_mom_) { descend_to_bottom_context (); - if (tuplet_handler_.get_outlet()) + if (tuplet_handler_.get_outlet ()) create_event (STOP)->send_to_context (tuplet_handler_.get_outlet ()); if (m.main_part_ < music_get_length ().main_part_) @@ -111,7 +111,7 @@ Time_scaled_music_iterator::process (Moment m) tuplet_handler_.set_context (0); } } - Music_wrapper_iterator::process(m); + Music_wrapper_iterator::process (m); if (child_iter_ && child_iter_->ok ()) descend_to_child (child_iter_->get_outlet ()); diff --git a/lily/translator.cc b/lily/translator.cc index 52274adc42..a6b4342de9 100644 --- a/lily/translator.cc +++ b/lily/translator.cc @@ -278,7 +278,7 @@ add_acknowledger (Engraver_void_function_engraver_grob_info ptr, interface_name += "-interface"; /* - this is only called during program init, so safe to use scm_gc_protect_object() + this is only called during program init, so safe to use scm_gc_protect_object () */ inf.symbol_ = scm_gc_protect_object (ly_symbol2scm (interface_name.c_str ())); ack_array->push_back (inf); @@ -326,7 +326,7 @@ internal_event_assignment (Stream_event **old_ev, Stream_event *new_ev, const ch assert (0 == ev_class.find (prefix)); /* "listen_foo_bar" -> "foo-bar" */ - ev_class.erase (0, strlen(prefix)); + ev_class.erase (0, strlen (prefix)); replace_all (ev_class, '_', '-'); new_ev->origin ()->warning (_f ("Two simultaneous %s events, junking this one", ev_class.c_str ())); diff --git a/lily/ttf.cc b/lily/ttf.cc index 574d1464af..869cdbaed1 100644 --- a/lily/ttf.cc +++ b/lily/ttf.cc @@ -25,7 +25,7 @@ make_index_to_charcode_map (FT_Face face) FT_UInt gindex; FT_CharMap current_cmap = face->charmap; - FT_Select_Charmap(face, FT_ENCODING_UNICODE); + FT_Select_Charmap (face, FT_ENCODING_UNICODE); int j = 0; for (charcode = FT_Get_First_Char (face, &gindex); gindex != 0; @@ -168,7 +168,7 @@ print_trailer (void *out, GLYPH_NAME_LEN); if (error) { - programming_error ("FT_Get_Glyph_Name(): error."); + programming_error ("FT_Get_Glyph_Name (): error."); glyph_name[0] = 0; } } diff --git a/lily/tuplet-bracket.cc b/lily/tuplet-bracket.cc index 53253f71dd..489d3bc76e 100644 --- a/lily/tuplet-bracket.cc +++ b/lily/tuplet-bracket.cc @@ -92,7 +92,7 @@ Tuplet_bracket::parallel_beam (Grob *me_grob, vector const &cols, Note_column::get_stem (cols.back ())); if (dynamic_cast (stems[RIGHT])->get_column () - != me->get_bound (RIGHT)->get_column()) + != me->get_bound (RIGHT)->get_column ()) return 0; Drul_array beams; @@ -120,7 +120,7 @@ Tuplet_bracket::parallel_beam (Grob *me_grob, vector const &cols, } -MAKE_SCHEME_CALLBACK(Tuplet_bracket,calc_connect_to_neighbors,1); +MAKE_SCHEME_CALLBACK (Tuplet_bracket, calc_connect_to_neighbors,1); SCM Tuplet_bracket::calc_connect_to_neighbors (SCM smob) { @@ -176,7 +176,7 @@ Tuplet_bracket::get_common_x (Spanner *me) return commonx; } -MAKE_SCHEME_CALLBACK(Tuplet_bracket,calc_control_points,1) +MAKE_SCHEME_CALLBACK (Tuplet_bracket, calc_control_points,1) SCM Tuplet_bracket::calc_control_points (SCM smob) { diff --git a/lily/tuplet-engraver.cc b/lily/tuplet-engraver.cc index c25d2a9a4e..17eed00f35 100644 --- a/lily/tuplet-engraver.cc +++ b/lily/tuplet-engraver.cc @@ -105,7 +105,7 @@ Tuplet_engraver::process_music () /* This may happen if the end of a tuplet is part of a quoted voice. */ - Moment now = now_mom(); + Moment now = now_mom (); for (vsize i = tuplets_.size (); i --; ) { if (tuplets_[i].stop_moment_ == now) diff --git a/lily/tuplet-number.cc b/lily/tuplet-number.cc index b29ab39aaa..aa0c343c58 100644 --- a/lily/tuplet-number.cc +++ b/lily/tuplet-number.cc @@ -16,12 +16,12 @@ struct Tuplet_number { - DECLARE_SCHEME_CALLBACK(print, (SCM)); - DECLARE_GROB_INTERFACE(); + DECLARE_SCHEME_CALLBACK (print, (SCM)); + DECLARE_GROB_INTERFACE (); }; -MAKE_SCHEME_CALLBACK(Tuplet_number, print, 1); +MAKE_SCHEME_CALLBACK (Tuplet_number, print, 1); SCM Tuplet_number::print (SCM smob) { diff --git a/lily/tweak-engraver.cc b/lily/tweak-engraver.cc index c87902f9ba..e520f7d7c4 100644 --- a/lily/tweak-engraver.cc +++ b/lily/tweak-engraver.cc @@ -21,7 +21,7 @@ protected: DECLARE_ACKNOWLEDGER (grob); }; -Tweak_engraver::Tweak_engraver() +Tweak_engraver::Tweak_engraver () { } diff --git a/lily/vaticana-ligature-engraver.cc b/lily/vaticana-ligature-engraver.cc index 5618465120..5007d553ca 100644 --- a/lily/vaticana-ligature-engraver.cc +++ b/lily/vaticana-ligature-engraver.cc @@ -433,10 +433,10 @@ Vaticana_ligature_engraver::add_mora_column (Paper_column *column) void Vaticana_ligature_engraver::check_for_ambiguous_dot_pitch (Grob_info primitive) { - // TODO: Fix performance, which is currently O(n^2) (since this - // method is called O(n) times and takes O(n) steps in the for - // loop), but could be O(n) (by replacing the for loop by e.g. a - // bitmask based O(1) test); where n= (which is typically small (n<10), though). Stream_event *new_cause = primitive.event_cause (); int new_pitch = unsmob_pitch (new_cause->get_property ("pitch"))->steps (); -- 2.39.5