]> git.donarmstrong.com Git - lilypond.git/commitdiff
Run astyle 2.02.
authorGraham Percival <graham@percival-music.ca>
Mon, 12 Dec 2011 07:31:51 +0000 (23:31 -0800)
committerGraham Percival <graham@percival-music.ca>
Mon, 12 Dec 2011 12:55:06 +0000 (04:55 -0800)
48 files changed:
flower/include/warn.hh
flower/test-file-path.cc
flower/warn.cc
lily/axis-group-interface.cc
lily/bar-line.cc
lily/bar-number-engraver.cc
lily/beam-quanting.cc
lily/beam.cc
lily/bezier.cc
lily/constrained-breaking.cc
lily/context-property.cc
lily/dispatcher.cc
lily/flag.cc
lily/general-scheme.cc
lily/glissando-engraver.cc
lily/grob.cc
lily/include/beam-scoring-problem.hh
lily/include/item.hh
lily/include/parse-scm.hh
lily/ledger-line-spanner.cc
lily/lily-parser-scheme.cc
lily/lily-parser.cc
lily/mensural-ligature.cc
lily/multi-measure-rest.cc
lily/music-function-scheme.cc
lily/music-scheme.cc
lily/page-layout-problem-scheme.cc
lily/page-layout-problem.cc
lily/parse-scm.cc
lily/part-combine-iterator.cc
lily/pdf-scheme.cc
lily/pitch.cc
lily/pure-from-neighbor-engraver.cc
lily/pure-from-neighbor-interface.cc
lily/rest.cc
lily/scheme-engraver.cc
lily/side-position-interface.cc
lily/skyline.cc
lily/slur-score-parameters.cc
lily/slur-scoring.cc
lily/source-file.cc
lily/spacing-loose-columns.cc
lily/spanner.cc
lily/stem.cc
lily/system.cc
lily/tie-formatting-problem.cc
lily/tuplet-bracket.cc
lily/warn-scheme.cc

index 959a55629188fa00ef00dc27bce4552e39baa2b6..37ddbbfdaddb778e37c0952dfa51450eba3540e2 100644 (file)
@@ -43,7 +43,6 @@
 extern int loglevel;
 extern bool warning_as_error;
 
-
 /* output messages, in decreasing order of importance */
 void error (string s, string location = ""); // Fatal error, exits lilypond!
 void programming_error (string s, string location = "");
@@ -66,5 +65,4 @@ void set_loglevel (string level);
 void expect_warning (string msg);
 void check_expected_warnings ();
 
-
 #endif /* WARN_HH */
index 37ff3277eccab5b49ad2bded6d4ef42e4fb8b140..99366a1f100d0182bb248ffd1eae22ff595c7303 100644 (file)
@@ -10,10 +10,11 @@ TEST (File_path, Find)
   char const *extensions[] = {"ly", "", 0};
   string file = "init";
   char cwd[PATH_MAX];
-  if (!getcwd (cwd, PATH_MAX)) {
-    cerr << "Could not get current work directory\n";
-    exit (1);
-  }
+  if (!getcwd (cwd, PATH_MAX))
+    {
+      cerr << "Could not get current work directory\n";
+      exit (1);
+    }
   string ly_dir = string (getenv ("top-src-dir")) + "/ly";
   parse_path (string (1, PATHSEP) + ly_dir);
   string file_name = find (file, extensions);
index 8cdfcb6b998870c4d208a2a5d69dd4b6be6e251c..38ee5d2c5337107382a4a0cfe1c52e7340d7a6e8 100644 (file)
@@ -86,7 +86,7 @@ set_loglevel (string level)
         set_loglevel (l);
       else
         {
-          non_fatal_error (_f ("unknown log level `%s', using default (INFO)", 
+          non_fatal_error (_f ("unknown log level `%s', using default (INFO)",
                                level));
           set_loglevel (LOGLEVEL_INFO);
         }
@@ -106,14 +106,14 @@ void expect_warning (string msg)
 
 void check_expected_warnings ()
 {
-  if (expected_warnings.size () > 0) 
+  if (expected_warnings.size () > 0)
     {
       /* Some expected warning was not triggered, so print out a warning. */
-      string msg = _f ("%d expected warning(s) not encountered: ", 
+      string msg = _f ("%d expected warning(s) not encountered: ",
                        expected_warnings.size ());
-      for (vsize i = 0; i< expected_warnings.size (); i++)
-          msg += "\n        " + expected_warnings[i];
-      
+      for (vsize i = 0; i < expected_warnings.size (); i++)
+        msg += "\n        " + expected_warnings[i];
+
       warning (msg);
     }
   expected_warnings.clear ();
@@ -122,23 +122,23 @@ void check_expected_warnings ()
 bool is_expected (string s)
 {
   bool expected = false;
-  for (vsize i = 0; i< expected_warnings.size (); i++)
+  for (vsize i = 0; i < expected_warnings.size (); i++)
     {
       // Compare the msg with the suppressed string; If the beginning matches,
       // i.e. the msg can have additional content AFTER the full (exact)
       // suppressed message, suppress the warning.
       // This is needed for the Input class, where the message contains
       // the input file contents after the real message.
-      if (s.compare (0, expected_warnings[i].size (), expected_warnings[i]) == 0 ) {
-        expected = true;
-        expected_warnings.erase (expected_warnings.begin () + i);
-        break;
-      }
+      if (s.compare (0, expected_warnings[i].size (), expected_warnings[i]) == 0)
+        {
+          expected = true;
+          expected_warnings.erase (expected_warnings.begin () + i);
+          break;
+        }
     }
   return expected;
 }
 
-
 /**
  * Helper functions: print_message_part (no newline prepended)
  *                   print_message (always starts on a new line)
@@ -171,7 +171,6 @@ print_message (int level, string location, string s, bool newline)
     message_newline = s[s.length () - 1] == '\n';
 }
 
-
 /** The actual output functions to be called in lilypond code.
  *  Sorted in descending order of importance (errors, warnings, progress, info,
  *  debug). Each prints a message on a separate line.
@@ -193,7 +192,7 @@ programming_error (string s, string location)
     print_message (LOG_DEBUG, location, _f ("suppressed programming error: %s", s) + "\n");
   else if (warning_as_error)
     error (s, location);
-  else 
+  else
     {
       print_message (LOG_ERROR, location, _f ("programming error: %s", s) + "\n");
       print_message (LOG_ERROR, location, _ ("continuing, cross fingers") + "\n");
@@ -220,7 +219,7 @@ warning (string s, string location)
     print_message (LOG_DEBUG, location, _f ("suppressed warning: %s", s) + "\n");
   else if (warning_as_error)
     error (s, location);
-  else 
+  else
     print_message (LOG_WARN, location, _f ("warning: %s", s) + "\n");
 }
 
index de9e48a1b4f6a949e5233d065e630d4103737252..3f53773e9e6e1207d5bbc63331cccdd32a99b1f7 100644 (file)
@@ -81,7 +81,7 @@ Axis_group_interface::relative_group_extent (vector<Grob *> const &elts,
 
 Interval
 Axis_group_interface::relative_maybe_bound_group_extent (vector<Grob *> const &elts,
-                                                        Grob *common, Axis a, bool bound)
+                                                         Grob *common, Axis a, bool bound)
 {
   Interval r;
   for (vsize i = 0; i < elts.size (); i++)
index b9e23a95e4f97ffc9cb8527734289148152527de..bfd79363934f058a082eedcb8288f5a547156208 100644 (file)
@@ -48,7 +48,7 @@ Bar_line::calc_bar_extent (SCM smob)
       SCM staff_color = staff->get_property ("color");
       Real radius = Staff_symbol_referencer::staff_radius (me);
       if (bar_line_color == staff_color && radius)
-       result *= (1 - 0.5 * (Staff_symbol_referencer::line_thickness (me) / radius));
+        result *= (1 - 0.5 * (Staff_symbol_referencer::line_thickness (me) / radius));
     }
   return ly_interval2scm (result);
 }
index 83ff7fed5148f8a39034973a031266b7552d8b25..e6c401f2406d044a89899d7779fddb58b54aeb76 100644 (file)
@@ -152,9 +152,9 @@ Bar_number_engraver::process_music ()
                 }
               // guh.
               text_->set_property
-                ("text",
-                  scm_string_concatenate (scm_list_2 (scm_number_to_string (bn, scm_from_int (10)),
-                                                      ly_string2scm (text_tag))));
+              ("text",
+               scm_string_concatenate (scm_list_2 (scm_number_to_string (bn, scm_from_int (10)),
+                                                   ly_string2scm (text_tag))));
             }
         }
     }
index 774cf1b02b89e15c35bd9d8a1eb5ca3e3fa43c73..57cf25853dbbc49fd6ce3073b0f0f18172e76604 100644 (file)
@@ -260,7 +260,7 @@ void Beam_scoring_problem::init_instance_variables (Grob *me, Drul_array<Real> y
 
       Real my_y = beams[i]->relative_coordinate (common[Y_AXIS], Y_AXIS);
 
-      Interval beam_width (-1.0,-1.0);
+      Interval beam_width (-1.0, -1.0);
       for (vsize j = 0; j < stems.size (); j++)
         {
           Grob *s = stems[j];
@@ -301,8 +301,8 @@ void Beam_scoring_problem::init_instance_variables (Grob *me, Drul_array<Real> y
 
       staff_radius_ = Staff_symbol_referencer::staff_radius (beams[i]);
       edge_beam_counts_ = Drul_array<int>
-                         (Stem::beam_multiplicity (stems[0]).length () + 1,
-                          Stem::beam_multiplicity (stems.back ()).length () + 1);
+                          (Stem::beam_multiplicity (stems[0]).length () + 1,
+                           Stem::beam_multiplicity (stems.back ()).length () + 1);
 
       // TODO - why are we dividing by staff_space_?
       beam_translation_ = Beam::get_beam_translation (beams[i]) / staff_space_;
@@ -682,7 +682,7 @@ Beam_scoring_problem::calc_concaveness ()
 
         close_positions.push_back ((int) rint (head_positions_[i][beam_dir]));
         far_positions.push_back ((int) rint (head_positions_[i][-beam_dir]));
-    }
+      }
 
   Real concaveness = 0.0;
 
@@ -1347,8 +1347,8 @@ Beam_scoring_problem::score_collisions (Beam_configuration *config) const
                     beam_y.distance (collision_y[UP]));
 
       Real scale_free
-        = max (parameters_.COLLISION_PADDING - dist, 0.0) /
-          parameters_.COLLISION_PADDING;
+        = max (parameters_.COLLISION_PADDING - dist, 0.0)
+          parameters_.COLLISION_PADDING;
       demerits
       += collisions_[i].base_penalty_ *
          pow (scale_free, 3) * parameters_.COLLISION_PENALTY;
index 5b65768a3f095498ddcb92c1a863ac594649b22d..ea92315939ca653fe53c9ca347a6ede93d5a3c50 100644 (file)
@@ -1097,7 +1097,7 @@ Beam::set_stem_lengths (SCM smob)
   Grob *fvs = first_normal_stem (me);
   Grob *lvs = last_normal_stem (me);
 
-  Interval x_span = robust_scm2interval (me->get_property ("X-positions"), Interval (0,0));
+  Interval x_span = robust_scm2interval (me->get_property ("X-positions"), Interval (0, 0));
   Direction feather_dir = to_dir (me->get_property ("grow-direction"));
 
   for (vsize i = 0; i < stems.size (); i++)
@@ -1348,7 +1348,7 @@ Beam::pure_rest_collision_callback (SCM smob,
   Grob *left;
   Grob *right;
 
-  if (idx == (vsize)-1 || my_stems.size () == 1)
+  if (idx == (vsize) - 1 || my_stems.size () == 1)
     return scm_from_double (amount);
   else if (idx == 0)
     left = right = my_stems[1];
@@ -1370,7 +1370,6 @@ Beam::pure_rest_collision_callback (SCM smob,
   return scm_from_double (amount);
 }
 
-
 bool
 Beam::is_knee (Grob *me)
 {
index a68c03907d047eaa49db73aa8f051e8ea22b586e..f0197fc0e2ffbd390aee8c3b0a1587a76f4bca6e 100644 (file)
@@ -21,7 +21,8 @@
 #include "warn.hh"
 #include "libc-extension.hh"
 
-Real binomial_coefficient_3[] =
+Real binomial_coefficient_3[]
+=
 {
   1, 3, 3, 1
 };
index 7e5bfadd50e054421a7d42d500c072c2fefc3b94..0a185bf39d00e3b1be3ef34647ace171f0a138aa 100644 (file)
@@ -436,10 +436,10 @@ Constrained_breaking::initialize ()
   breaks_ = pscore_->get_break_indices ();
   all_ = pscore_->root_system ()->used_columns ();
   lines_.resize (breaks_.size (), breaks_.size (), Line_details ());
-  vector<Simple_spacer> spacers =
-    pscore_->root_system ()->get_simple_spacers(other_lines.length (),
-                                                other_lines.length () - first_line.length (),
-                                                ragged_right_);
+  vector<Simple_spacer> spacers
+    = pscore_->root_system ()->get_simple_spacers (other_lines.length (),
+                                                   other_lines.length () - first_line.length (),
+                                                   ragged_right_);
   for (vsize i = 0; i + 1 < breaks_.size (); i++)
     {
       for (vsize j = i + 1; j < breaks_.size (); j++)
index f4f5f07b5cba92e5a2cde81a637c3f9ea0e0513c..d79e74455a86cb17a67d36d2404cef885d36eecb 100644 (file)
@@ -116,13 +116,14 @@ execute_override_property (Context *context,
   bool ok = true;
   bool pc = is_unpure_pure_container (new_value);
   SCM vals[] = {pc ? unpure_pure_container_unpure_part (new_value) : new_value,
-                pc ? unpure_pure_container_pure_part (new_value) : SCM_BOOL_F};
+                pc ? unpure_pure_container_pure_part (new_value) : SCM_BOOL_F
+               };
 
   for (int i = 0; i < 2; i++)
     if (!ly_is_procedure (vals[i])
         && !is_simple_closure (vals[i]))
       ok = ok && type_check_assignment (symbol, vals[i],
-                                    ly_symbol2scm ("backend-type?"));
+                                        ly_symbol2scm ("backend-type?"));
 
   /*
     tack onto alist.  We can use set_car, since
index 6a11654e233465ea6a59de9947b8c28aba33f3f4..e1699e6b6d47def7578b14d57a03a6380fefc98e 100644 (file)
@@ -167,8 +167,8 @@ Dispatcher::dispatch (SCM sev)
 
 #if 0
   /* TODO: Uncomment. */
-    if (!sent)
-      warning (_f ("Junking event: %s", ly_symbol2string (class_symbol).c_str ()));
+  if (!sent)
+    warning (_f ("Junking event: %s", ly_symbol2string (class_symbol).c_str ()));
 #endif
 }
 
index ceab63e0e48a055efd03a537636969d7de5221bb..e4621c58a1b55ec64e5a57c4e71d694968585633 100644 (file)
@@ -39,8 +39,6 @@ public:
   DECLARE_GROB_INTERFACE ();
 };
 
-
-
 MAKE_SCHEME_CALLBACK (Flag, width, 1);
 SCM
 Flag::width (SCM smob)
index 605bf06cfd9c803b2aa960b4be541915946a210d..8a84062bb62ff780a56920f7c41fa3ec2957dd29 100644 (file)
@@ -99,7 +99,6 @@ LY_DEFINE (ly_gulp_file, "ly:gulp-file",
   return scm_from_locale_stringn (contents.c_str (), contents.length ());
 }
 
-
 LY_DEFINE (ly_dir_p, "ly:dir?",
            1, 0, 0, (SCM s),
            "Is @var{s} a direction?  Valid directions are @w{@code{-1}},"
index bb57bf1fcdccc5405842500eb10d478694b1bf61..c021521eef3daa830ba3e14eb3187d241590fd88 100644 (file)
@@ -124,7 +124,7 @@ Glissando_engraver::acknowledge_note_column (Grob_info info)
               continue;
             int n1 = robust_scm2int (scm_car (candidate), -1);
             int n2 = robust_scm2int (scm_cdr (candidate), -1);
-            if ((n1 < 0) || (n2 < 0) || (size_t(n1) >= note_heads.size ()))
+            if ((n1 < 0) || (n2 < 0) || (size_t (n1) >= note_heads.size ()))
               continue;
             note_column_1.push_back (vsize (n1));
             note_column_2.push_back (vsize (n2));
index 567bd0015f4309d8c77f75933347b7d082d11d05..d36a6721301430fcae21ae84f268c089c423aaaf 100644 (file)
@@ -598,7 +598,7 @@ Grob::fixup_refpoint ()
   VERTICAL ORDERING
 ****************************************************************/
 
-Grob*
+Grob *
 get_maybe_root_vertical_alignment (Grob *g, Grob *maybe)
 {
   if (!g)
@@ -609,13 +609,13 @@ get_maybe_root_vertical_alignment (Grob *g, Grob *maybe)
 
 }
 
-Grob*
+Grob *
 Grob::get_root_vertical_alignment (Grob *g)
 {
   return get_maybe_root_vertical_alignment (g, 0);
 }
 
-Grob*
+Grob *
 Grob::get_vertical_axis_group (Grob *g)
 {
   if (!g)
index d60c50f0a68d16e8a9c5070d1de16703596ceb9d..0dc3adc511d97604d6667f6478296d5fbc428234 100644 (file)
@@ -132,7 +132,6 @@ private:
   int normal_stem_count_;
   Real x_span_;
 
-
   /*
     Do stem computations.  These depend on YL and YR linearly, so we can
     precompute for every stem 2 factors.
index 73b3bc7b3f0aaba6770e08189a407043738b87b8..cb0381162225c546eff0b3868c17e34823e07f02 100644 (file)
@@ -40,7 +40,7 @@ public:
 
   static bool is_non_musical (Grob *);
   static bool break_visible (Grob *);
-  static Item * maybe_find_prebroken_piece (Item *g, Direction d);
+  static Item *maybe_find_prebroken_piece (Item *g, Direction d);
   bool is_broken () const;
   virtual bool pure_is_visible (int start, int end) const;
 
index 31427f2e44f5e98e0c3065324fe79237413af730..9d20a9675a2d6d6ae23425516c018327bdc065c1 100644 (file)
@@ -32,7 +32,7 @@ struct Parse_start
   int nchars;
   Input start_location_;
   bool safe_;
-  SCM (*func_)(Parse_start *ps);
+  SCM (*func_) (Parse_start *ps);
   SCM form_;
   Lily_parser *parser_;
 
index 0e46e0d5b8f51b1013af8a2d6cefe1b59d6eb7e6..27388dde218d842b55ccb4e9d998569111d3710e 100644 (file)
@@ -295,8 +295,8 @@ Ledger_line_spanner::print (SCM smob)
                     Interval accidental_size = g->extent (common[X_AXIS], X_AXIS);
                     Real d
                       = linear_combination (Drul_array<Real> (accidental_size[RIGHT],
-                                                            head_size[LEFT]),
-                                          0.0);
+                                                              head_size[LEFT]),
+                                            0.0);
 
                     Real left_shorten = max (-ledger_size[LEFT] + d, 0.0);
 
index 5f5b5a26fa161f2863b4fad108c57ea9a3e96052..180d8527b158fb1bc734955b1b9d4f8893ad0390 100644 (file)
@@ -148,9 +148,9 @@ LY_DEFINE (ly_parser_lexer, "ly:parser-lexer",
 LY_DEFINE (ly_parser_clone, "ly:parser-clone",
            1, 1, 0, (SCM parser_smob, SCM closures),
            "Return a clone of @var{parser-smob}.  An association list"
-" of port positions to closures can be specified in @var{closures}"
-" in order to have @code{$} and @code{#} interpreted in their original"
-" lexical environment.")
+           " of port positions to closures can be specified in @var{closures}"
+           " in order to have @code{$} and @code{#} interpreted in their original"
+           " lexical environment.")
 {
   LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
   Lily_parser *parser = unsmob_lily_parser (parser_smob);
@@ -215,10 +215,10 @@ LY_DEFINE (ly_parser_parse_string, "ly:parser-parse-string",
 
 LY_DEFINE (ly_parse_string_expression, "ly:parse-string-expression",
            2, 2, 0, (SCM parser_smob, SCM ly_code, SCM filename,
-                    SCM line),
+                     SCM line),
            "Parse the string @var{ly-code} with @var{parser-smob}."
-" Return the contained music expression."
-" @var{filename} and @var{line} are optional source indicators.")
+           " Return the contained music expression."
+           " @var{filename} and @var{line} are optional source indicators.")
 {
   LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
   Lily_parser *parser = unsmob_lily_parser (parser_smob);
@@ -237,19 +237,19 @@ LY_DEFINE (ly_parse_string_expression, "ly:parse-string-expression",
   if (!parser->lexer_->is_clean ())
     {
       parser->parser_error (_ ("ly:parse-string-expression is only valid with a new parser."
-                              "  Use ly:parser-include-string instead."));
+                               "  Use ly:parser-include-string instead."));
       return SCM_UNSPECIFIED;
     }
 
   return parser->parse_string_expression (ly_scm2string (ly_code),
-                                         fn, ln);
+                                          fn, ln);
 }
 
 LY_DEFINE (ly_parser_include_string, "ly:parser-include-string",
            2, 0, 0, (SCM parser_smob, SCM ly_code),
            "Include the string @var{ly-code} into the input stream"
            " for @var{parser-smob}.  Can only be used in immediate"
-          " Scheme expressions (@code{$} instead of @code{#}).")
+           " Scheme expressions (@code{$} instead of @code{#}).")
 {
   LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
   Lily_parser *parser = unsmob_lily_parser (parser_smob);
index 8159c3dae7ca677c01324bad4632a3317b5bb200..97715dfc3a5e4de5e40ab8a6a94db774cc32b374 100644 (file)
@@ -156,7 +156,7 @@ Lily_parser::parse_string (string ly_code)
 
 SCM
 Lily_parser::parse_string_expression (string ly_code, string filename,
-                                     int line)
+                                      int line)
 {
   // TODO: use $parser
   lexer_->set_identifier (ly_symbol2scm ("parser"),
@@ -165,15 +165,16 @@ Lily_parser::parse_string_expression (string ly_code, string filename,
   lexer_->main_input_name_ = filename;
   lexer_->is_main_input_ = true;
   lexer_->new_input (lexer_->main_input_name_, ly_code, sources_);
-  if (line) {
-    lexer_->get_source_file ()->set_line (0, line);
-  }
+  if (line)
+    {
+      lexer_->get_source_file ()->set_line (0, line);
+    }
   SCM mod = lexer_->set_current_scope ();
   lexer_->push_extra_token (EMBEDDED_LILY);
   do_yyparse ();
   SCM result = lexer_->lookup_identifier_symbol (ly_symbol2scm ("parseStringResult"));
   // parseStringResult is set in the grammar rule for embedded_lilypond
-  
+
   scm_set_current_module (mod);
 
   error_level_ = error_level_ | lexer_->error_level_;
index 4fcd9be5d3faab15d38b5a4a6198a48ad33e0745..3802214068bab0b00f537c250c2d1ee7953ecc2d 100644 (file)
@@ -169,13 +169,13 @@ internal_brew_primitive (Grob *me)
     case MLP_BREVIS:
       duration_log--;
       suffix = to_string (duration_log) + color
-                      + (duration_log < -1 ? "lig" : "") + "mensural";
+               + (duration_log < -1 ? "lig" : "") + "mensural";
       index = prefix + "s";
       out = fm->find_by_name (index + "r" + suffix);
       if (!out.is_empty ()
           && !Staff_symbol_referencer::on_line
-              (me,
-               robust_scm2int (me->get_property ("staff-position"), 0)))
+          (me,
+           robust_scm2int (me->get_property ("staff-position"), 0)))
         index += "r";
       out = fm->find_by_name (index + suffix);
       break;
index d6142b1890b257a97fb42e1f284fcec1a19581bd..40b727fbd2f0b68fa9498372aeaf2e12efe9cb11 100644 (file)
@@ -132,7 +132,7 @@ calc_closest_duration_log (Grob *me, double duration, bool force_round_up)
 
   SCM duration_logs_list = me->get_property ("usable-duration-logs");
   if (to_boolean (scm_null_p (duration_logs_list))
-                    || !to_boolean (scm_list_p (duration_logs_list)))
+      || !to_boolean (scm_list_p (duration_logs_list)))
     {
       warning (_ ("usable-duration-logs must be a non-empty list.  Falling back to whole rests."));
       closest_usable_duration_log = 0;
@@ -172,16 +172,13 @@ int
 calc_measure_duration_log (Grob *me)
 {
   SCM sml = dynamic_cast<Spanner *> (me)->get_bound (LEFT)
-                                          ->get_property ("measure-length");
+            ->get_property ("measure-length");
   Rational ml = (unsmob_moment (sml)) ? unsmob_moment (sml)->main_part_
-                                      : Rational (1);
+                : Rational (1);
   double measure_duration = ml.Rational::to_double ();
-  bool force_round_up = to_boolean (
-                          scm_list_p (
-                            scm_member (
-                              scm_cons (scm_from_int64 (ml.numerator ()),
-                                        scm_from_int64 (ml.denominator ())),
-                              me->get_property ("round-up-exceptions"))));
+  bool force_round_up = to_boolean (scm_list_p (scm_member (scm_cons (scm_from_int64 (ml.numerator ()),
+                                                            scm_from_int64 (ml.denominator ())),
+                                                            me->get_property ("round-up-exceptions"))));
   return calc_closest_duration_log (me, measure_duration, force_round_up);
 }
 
index e87872caaca3bb6802c36ba2fd33aead726ddf55..93c7e0fbc4773cbc121ca45779b1c71db26c8c96 100644 (file)
@@ -26,17 +26,17 @@ LY_DEFINE (ly_make_music_function, "ly:make-music-function", 2, 0, 0,
 {
   LY_ASSERT_TYPE (ly_is_list, signature, 1);
   LY_ASSERT_TYPE (ly_is_procedure, func, 2);
-  int n=0;
+  int n = 0;
   for (SCM p = signature; scm_is_pair (p); p = scm_cdr (p), ++n)
     {
       SCM proc = scm_car (p);
       if (scm_is_pair (proc))
-       proc = scm_car (proc);
+        proc = scm_car (proc);
       if (scm_is_false (scm_procedure_p (proc)))
-       {
-         scm_wrong_type_arg_msg ("music-function", n, p,
-                                 "music function predicate");
-       }
+        {
+          scm_wrong_type_arg_msg ("music-function", n, p,
+                                  "music function predicate");
+        }
     }
 
   return make_music_function (signature, func);
index 34545fa911d33da5293c4c656e2342da1d4ad329..26e26092b6289a194b96ecddf2957117a85b8759 100644 (file)
@@ -160,23 +160,22 @@ LY_DEFINE (ly_music_compress, "ly:music-compress",
 }
 
 LY_DEFINE (ly_make_music_relative_x, "ly:make-music-relative!",
-          2, 0, 0, (SCM music, SCM pitch),
-          "Make @var{music} relative to @var{pitch},"
-          " return final pitch.")
+           2, 0, 0, (SCM music, SCM pitch),
+           "Make @var{music} relative to @var{pitch},"
+           " return final pitch.")
 {
   LY_ASSERT_TYPE (unsmob_music, music, 1);
   LY_ASSERT_TYPE (unsmob_pitch, pitch, 2);
 
-       Pitch start = *unsmob_pitch (pitch);
-       Music *m = unsmob_music (music);
-       Pitch last = m->to_relative_octave (start);
-       if (lily_1_8_relative)
-               m->set_property ("last-pitch", last.smobbed_copy ());
+  Pitch start = *unsmob_pitch (pitch);
+  Music *m = unsmob_music (music);
+  Pitch last = m->to_relative_octave (start);
+  if (lily_1_8_relative)
+    m->set_property ("last-pitch", last.smobbed_copy ());
 
-       return last.smobbed_copy ();
+  return last.smobbed_copy ();
 }
 
-
 LY_DEFINE (ly_music_duration_length, "ly:music-duration-length", 1, 0, 0,
            (SCM mus),
            "Extract the duration field from @var{mus} and return the"
index e4c62d3d291aef9c35df3695b68ac6abdf0a6ad8..9e976fef5d6c2bfc10ce076bc775525c6d31d76b 100644 (file)
@@ -22,8 +22,8 @@
 #include "page-layout-problem.hh"
 
 LY_DEFINE (ly_get_spacing_spec, "ly:get-spacing-spec", 2, 0, 0,
-          (SCM from_scm, SCM to_scm),
-          "Return the spacing spec going between the two given grobs,"
+           (SCM from_scm, SCM to_scm),
+           "Return the spacing spec going between the two given grobs,"
            " @var{from_scm} and @var{to_scm}.")
 {
   LY_ASSERT_SMOB (Grob, from_scm, 1);
index f4e208521859f945a6e3591547b90e0178763128..fe0058ed448a69966dd3763217ca7ee37bbc8e99 100644 (file)
@@ -243,7 +243,7 @@ Page_layout_problem::add_footnotes_to_lines (SCM lines, int counter, Paper_book
                   if (orig->is_broken ())
                     for (vsize i = 0; i < orig->broken_intos_.size (); i++)
                       do_numbering = do_numbering
-                                    || to_boolean (orig->broken_intos_[i]->get_property ("automatically-numbered"));
+                                     || to_boolean (orig->broken_intos_[i]->get_property ("automatically-numbered"));
                 }
               if (do_numbering)
                 {
@@ -561,8 +561,8 @@ Page_layout_problem::append_system (System *sys, Spring const &spring, Real inde
       Skyline *sky = in_note_direction_ == UP ? &up_skyline : &down_skyline;
       sky->set_minimum_height (sky->max_height ()
                                + in_note_direction_
-                                 * (in_note_padding_
-                                    + in_note_stencil->extent (Y_AXIS).length ()));
+                               * (in_note_padding_
+                                  + in_note_stencil->extent (Y_AXIS).length ()));
     }
 
   /*
@@ -573,7 +573,7 @@ Page_layout_problem::append_system (System *sys, Spring const &spring, Real inde
   */
   Real minimum_distance = up_skyline.distance (bottom_skyline_,
                                                robust_scm2double (sys->get_property ("skyline-horizontal-padding"),
-                                                                  0))
+                                                   0))
                           + padding;
 
   Spring spring_copy = spring;
index 81c4ad3a29e00afa28ff840e359c120f801ecc6b..6dcf54ae92f10f7601033c5924998e3b20b06ff8 100644 (file)
@@ -52,18 +52,18 @@ internal_ly_parse_scm (Parse_start *ps)
   SCM to = scm_ftell (port);
   ps->nchars = scm_to_int (to) - scm_to_int (from);
 
-
-  if (!SCM_EOF_OBJECT_P (form)) {
-    if (ps->parser_->lexer_->top_input ())
-      {
-       // Find any precompiled form.
-       SCM c = scm_assv_ref (ps->parser_->closures_, from);
-       if (scm_is_true (c))
-         // Replace form with a call to previously compiled closure
-         form = scm_list_1 (c);
-      }
-    return scm_cons (form, make_input (ps->start_location_));
-}
+  if (!SCM_EOF_OBJECT_P (form))
+    {
+      if (ps->parser_->lexer_->top_input ())
+        {
+          // Find any precompiled form.
+          SCM c = scm_assv_ref (ps->parser_->closures_, from);
+          if (scm_is_true (c))
+            // Replace form with a call to previously compiled closure
+            form = scm_list_1 (c);
+        }
+      return scm_cons (form, make_input (ps->start_location_));
+    }
 
   /* Don't close the port here; if we re-enter this function via a
      continuation, then the next time we enter it, we'll get an error.
@@ -81,22 +81,21 @@ internal_ly_eval_scm (Parse_start *ps)
     {
       static SCM module = SCM_BOOL_F;
       if (module == SCM_BOOL_F)
-       {
-         SCM function = ly_lily_module_constant ("make-safe-lilypond-module");
-         module = scm_gc_protect_object (scm_call_0 (function));
-       }
-      
+        {
+          SCM function = ly_lily_module_constant ("make-safe-lilypond-module");
+          module = scm_gc_protect_object (scm_call_0 (function));
+        }
+
       // We define the parser so trusted Scheme functions can
       // access the real namespace underlying the parser.
       if (ps->parser_)
-       scm_module_define (module, ly_symbol2scm ("parser"),
-                          ps->parser_->self_scm ());
+        scm_module_define (module, ly_symbol2scm ("parser"),
+                           ps->parser_->self_scm ());
       return scm_eval (ps->form_, module);
     }
   return scm_primitive_eval (ps->form_);
 }
 
-
 SCM
 catch_protected_parse_body (void *p)
 {
index 9ab0495ae14ce909838c5498e5421d28590fd5bf..a8471b41582be855a98f86e1ceb3e6e11da542ee 100644 (file)
@@ -159,7 +159,8 @@ Part_combine_iterator::derived_mark () const
   if (second_iter_)
     scm_gc_mark (second_iter_->self_scm ());
 
-  Stream_event *ptrs[] =
+  Stream_event *ptrs[]
+  =
   {
     unisono_event_,
     mmrest_event_,
@@ -421,7 +422,7 @@ Part_combine_iterator::construct_children ()
 
       if (scm_is_number (direction_))
         execute_pushpop_property (shared, sym,
-                                 ly_symbol2scm ("direction"), direction_);
+                                  ly_symbol2scm ("direction"), direction_);
     }
   /* Handle horizontal shifts for crossing notes */
   execute_pushpop_property (one, ly_symbol2scm ("NoteColumn"),
index 13e8389ecec7b42a1831c4001090b25ff54e9474..c0cfa8d9872b1218ca730efad15306e2f9f557da 100644 (file)
@@ -58,7 +58,7 @@ LY_DEFINE (ly_encode_string_for_pdf, "ly:encode-string-for-pdf",
        * though), we have to prepend it manually. */
       if (g_without_BOM) // conversion to UTF-16be might have failed (shouldn't!)
         {
-          g = (char*)malloc ( sizeof(char) * (bytes_written + 3));
+          g = (char *)malloc ( sizeof (char) * (bytes_written + 3));
           char const *BOM = "\xFE\xFF";
           strcpy (g, BOM);
           memcpy (&g[2], g_without_BOM, bytes_written + 1); // Copy string + \0
index facbf5d05d193049353a8af54013dc7477940fa1..9e7bb3a5c6d424d6294c8ef808306f30b0097e39 100644 (file)
@@ -79,13 +79,13 @@ Pitch::tone_pitch () const
 int
 Pitch::rounded_semitone_pitch () const
 {
-  return int (floor (double (tone_pitch () * Rational (2) + Rational (1,2))));
+  return int (floor (double (tone_pitch () * Rational (2) + Rational (1, 2))));
 }
 
 int
 Pitch::rounded_quartertone_pitch () const
 {
-  return int (floor (double (tone_pitch () * Rational (4) + Rational (1,2))));
+  return int (floor (double (tone_pitch () * Rational (4) + Rational (1, 2))));
 }
 
 void
index 506127c50dd25b95e553d589ef27eeaf556e3068..32fcfd5603af9fa0a728ecadb613c191ddef09f8 100644 (file)
@@ -94,7 +94,7 @@ Pure_from_neighbor_engraver::finalize ()
     to the elements of need_pure_heights_from_neighbors_ on either side.
   */
 
-  int pos[2] = {-1, 0};
+  int pos[2] = { -1, 0};
   for (vsize i = 0; i < pure_relevants_.size (); i++)
     {
       if (pos[1] < (int) need_pure_heights_from_neighbors.size ()
index e6bc924aea6a9bc21619caab5804394d8c621a70..afc6d63772be74dd0ca8e02d9e965e18653aac46 100644 (file)
@@ -33,21 +33,21 @@ Pure_from_neighbor_interface::calc_pure_relevant_grobs (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
   extract_grob_set ((me->original () && me->original ()->is_live ()
-                      ? me->original ()
-                      : me),
-                     "neighbors",
-                     elts);
+                     ? me->original ()
+                     : me),
+                    "neighbors",
+                    elts);
 
   vector<Grob *> new_elts;
   new_elts.insert (new_elts.end (), elts.begin (), elts.end ());
 
   SCM neighbors_scm = me->get_object ("neighbors");
   if (Grob_array::unsmob (neighbors_scm))
-     {
-       vector<Grob *> &arr
-         = unsmob_grob_array (neighbors_scm)->array_reference ();
-       arr = new_elts;
-     }
+    {
+      vector<Grob *> &arr
+        = unsmob_grob_array (neighbors_scm)->array_reference ();
+      arr = new_elts;
+    }
 
   return Axis_group_interface::internal_calc_pure_relevant_grobs (me, "neighbors");
 }
index d86296fada49e3c5bcbc8558f709f275f4efe51c..ddc9bbdd8f2e04a2322ca142fe28ea94f9b7bdd9 100644 (file)
@@ -54,7 +54,6 @@ Rest::y_offset_callback (SCM smob)
   if (!position_override)
     amount += 2 * ss * get_grob_direction (me);
 
-
   return scm_from_double (amount);
 }
 
index e59903086ac750fa225e4af7c88ed412a0de5a1d..3ed25e18beb5118181bd41c970c6d54291ab0c58 100644 (file)
@@ -186,7 +186,8 @@ void mark_listen_closure (void *target)
   scm_gc_mark ((SCM)target);
 }
 
-Listener_function_table listen_closure =
+Listener_function_table listen_closure
+=
 {
   call_listen_closure, mark_listen_closure
 };
index e2d328d5018296a2472515ef7a2f3ec700e323ff..1878aadb45a56af5c2c38ca4eba24a2fcc2f7d7b 100644 (file)
@@ -58,7 +58,6 @@ finish_offset (Grob *me, Direction dir, Real total_off, Real *current_offset)
       && total_off * dir < minimum_space)
     total_off = minimum_space * dir;
 
-
   if (current_offset)
     total_off = dir * max (dir * total_off,
                            dir * (*current_offset));
index d65e48b573e7eeb4a2be65bc23c946e168ca6ec3..e04ddcb78d5133c57e8aad4bd5052dc595f17b32 100644 (file)
@@ -558,9 +558,9 @@ Skyline::internal_distance (Skyline const &other, Real horizon_padding, Real *to
       dist = max (dist, max (start_dist, end_dist));
 
       if (end_dist == dist)
-       touch = end;
+        touch = end;
       else if (start_dist == dist)
-       touch = start;
+        touch = start;
 
       if (i->end_ <= j->end_)
         i++;
index 8d392ff1dcff49ed235dc08114a43ec07a697c52..eec7daaeec310d8e20e90d9cd310bf17a2c2f76e 100644 (file)
@@ -78,4 +78,4 @@ Slur_score_parameters::fill (Grob *me)
     = get_detail (details, ly_symbol2scm ("close-to-edge-length"));
   encompass_object_range_overshoot_
     = get_detail (details, ly_symbol2scm ("encompass-object-range-overshoot"));
-  }
+}
index 3f753ae1ccd9626feacd36f54303f76554b41b37..377215eef4dd7a19b6d6a4a92302217756a6bde1 100644 (file)
@@ -268,7 +268,7 @@ Slur_score_state::fill (Grob *me)
 
   extra_encompass_infos_ = get_extra_encompass_infos ();
 
-  Interval additional_ys (0.0,0.0);
+  Interval additional_ys (0.0, 0.0);
 
   for (vsize i = 0; i < extra_encompass_infos_.size (); i++)
     {
@@ -294,10 +294,10 @@ Slur_score_state::fill (Grob *me)
                                        (dir_
                                         * (parameters_.encompass_object_range_overshoot_
                                            + (y_place - encompass_place)
-                                              * (normalize (extra_encompass_infos_[i].extents_[X_AXIS].center (),
-                                                            base_attachments_[RIGHT][X_AXIS],
-                                                            base_attachments_[LEFT][X_AXIS])
-                                               + (dir_ == LEFT ? 0 : -1)))));
+                                           * (normalize (extra_encompass_infos_[i].extents_[X_AXIS].center (),
+                                                         base_attachments_[RIGHT][X_AXIS],
+                                                         base_attachments_[LEFT][X_AXIS])
+                                              + (dir_ == LEFT ? 0 : -1)))));
           while (flip (&d) != LEFT);
         }
     }
index 17e01dd4533b1b27aaf00854bebb76a7028a870a..e6f7a4fb1951a0f66c401368faea76c3da517c39 100644 (file)
@@ -335,7 +335,7 @@ Source_file::set_line (char const *pos_str0, int line)
     {
       int current_line = get_line (pos_str0);
       line_offset_ += line - current_line;
-      
+
       assert (line == get_line (pos_str0));
     }
   else
index b73f193d2dd6b2264a1b83eb622e0d884f04b69f..0752a2da24b81317c4bed2857b6d0fa90c5af7e6 100644 (file)
@@ -192,7 +192,7 @@ set_loose_columns (System *which, Column_x_positions const *posns)
       Real sum_spacing = 0;
       // currently a magic number - what would be a good grob to hold this property?
       Real left_padding = 0.15;
-      for (vsize j = 0; j  < clique_spacing.size (); j++)
+      for (vsize j = 0; j < clique_spacing.size (); j++)
         {
           sum_tight_spacing += clique_tight_spacing[j];
           sum_spacing += clique_spacing[j];
index ba44e83e19627a69facda2f2f17a532ca2c0f78b..5909b49572e37127c4b0a657ec070549c471c940 100644 (file)
@@ -249,7 +249,7 @@ Real
 Spanner::spanner_length () const
 {
   Interval lr = robust_scm2interval (get_property ("X-positions"),
-                                     Interval (1,-1));
+                                     Interval (1, -1));
 
   if (lr.is_empty ())
     {
@@ -259,7 +259,7 @@ Spanner::spanner_length () const
       Direction d = LEFT;
       do
         lr[d] = robust_scm2double (ly_assoc_get (ly_symbol2scm ("X"),
-                                             bounds[d], SCM_BOOL_F), -d);
+                                                 bounds[d], SCM_BOOL_F), -d);
       while (flip (&d) != LEFT);
     }
 
index 7ef1b938426113110d16ce92fa07c94de5a4a1dd..568e1846c376e7f57cd28fe5b55e47fb0ed1562c 100644 (file)
@@ -129,7 +129,7 @@ Stem::set_stem_positions (Grob *me, Real se)
 
   Interval height = me->pure_height (me, 0, INT_MAX);
   Real staff_space = Staff_symbol_referencer::staff_space (me);
-  Real half_space =  staff_space * 0.5;
+  Real half_space = staff_space * 0.5;
 
   height[d] = se * half_space + beam_end_corrective (me);
 
@@ -149,8 +149,8 @@ Stem::set_stem_positions (Grob *me, Real se)
 
           height[-d] = (height[d] - d
                         * (0.5 * beam_thickness
-                        + beam_translation * max (0, (beam_count - 1))
-                        + stemlet_length));
+                           + beam_translation * max (0, (beam_count - 1))
+                           + stemlet_length));
         }
       else if (!stemlet && beam)
         height[-d] = height[d];
@@ -390,7 +390,6 @@ Stem::internal_calc_stem_end_position (Grob *me, bool calc_beam)
   if (scm_is_pair (s))
     length = 2 * scm_to_double (robust_list_ref (durlog - 2, s));
 
-
   /* Stems in unnatural (forced) direction should be shortened,
      according to [Roush & Gourlay] */
   Interval hp = head_positions (me);
@@ -631,7 +630,7 @@ Stem::height (SCM smob)
   return ly_interval2scm (internal_height (me, true));
 }
 
-Grob*
+Grob *
 Stem::get_reference_head (Grob *me)
 {
   return to_boolean (me->get_property ("avoid-note-head"))
@@ -677,14 +676,14 @@ Stem::internal_height (Grob *me, bool calc_beam)
                                0.0);
 
   Real y2 = dir * robust_scm2double ((calc_beam
-                                     ? me->get_property ("length")
-                                     : me->get_pure_property ("length", 0, INT_MAX)),
-                                      0.0)
-                + y1;
+                                      ? me->get_property ("length")
+                                      : me->get_pure_property ("length", 0, INT_MAX)),
+                                     0.0)
+            + y1;
 
   Real half_space = Staff_symbol_referencer::staff_space (me) * 0.5;
 
-  Interval stem_y  = Interval (min (y1, y2), max (y2, y1)) * half_space;
+  Interval stem_y = Interval (min (y1, y2), max (y2, y1)) * half_space;
 
   return stem_y;
 }
@@ -798,7 +797,7 @@ Stem::print (SCM smob)
 
   Real half_space = Staff_symbol_referencer::staff_space (me) * 0.5;
 
-  Interval stem_y  = Interval (min (y1, y2), max (y2, y1)) * half_space;
+  Interval stem_y = Interval (min (y1, y2), max (y2, y1)) * half_space;
 
   stem_y[dir] -= beam_end_corrective (me);
 
@@ -851,8 +850,8 @@ Stem::offset_callback (SCM smob)
       /* If not centered: correct for stem thickness.  */
       string style = robust_symbol2string (f->get_property ("style"), "default");
       if (attach && style != "mensural"
-                 && style != "neomensural"
-                 && style != "petrucci")
+          && style != "neomensural"
+          && style != "petrucci")
         {
           Real rule_thick = thickness (me);
           r += -d * rule_thick * 0.5;
@@ -1047,7 +1046,7 @@ Stem::calc_cross_staff (SCM smob)
   return scm_from_bool (is_cross_staff (unsmob_grob (smob)));
 }
 
-Grob*
+Grob *
 Stem::flag (Grob *me)
 {
   return unsmob_grob (me->get_object ("flag"));
index cc4cbda54960abf192f5a5ad99ea42cf5e66740d..4e5fc1bb4ce5a9815b919d39917eaab86d164451 100644 (file)
@@ -336,7 +336,7 @@ System::num_footnotes ()
 bool
 grob_2D_less (Grob *g1, Grob *g2)
 {
-  int sri[] = {0,0};
+  int sri[] = {0, 0};
   Grob *gs[] = {g1, g2};
 
   for (int i = 0; i < 2; i++)
@@ -357,7 +357,7 @@ grob_2D_less (Grob *g1, Grob *g2)
   if (sri[0] == sri[1])
     return Grob::vertical_less (gs[0], gs[1]);
 
- return sri[0] < sri[1];
 return sri[0] < sri[1];
 }
 
 MAKE_SCHEME_CALLBACK (System, footnotes_before_line_breaking, 1);
@@ -605,7 +605,7 @@ System::get_paper_system ()
   pl->set_property ("page-break-penalty", right_bound->get_property ("page-break-penalty"));
   pl->set_property ("page-turn-penalty", right_bound->get_property ("page-turn-penalty"));
 
-  if (right_bound->original () == dynamic_cast<System*> (original ())->get_bound (RIGHT))
+  if (right_bound->original () == dynamic_cast<System *> (original ())->get_bound (RIGHT))
     pl->set_property ("last-in-score", SCM_BOOL_T);
 
   Interval staff_refpoints;
@@ -984,7 +984,8 @@ System::get_maybe_pure_bound (Direction d, bool pure, int start, int end)
   return pure ? get_pure_bound (d, start, end) : get_bound (d);
 }
 
-enum {
+enum
+{
   SPACEABLE_STAVES,
   NONSPACEABLE_STAVES,
   ALL_STAVES
@@ -993,7 +994,7 @@ enum {
 static SCM
 get_maybe_spaceable_staves (SCM smob, int filter)
 {
-  System *me = dynamic_cast<System*> (unsmob_grob (smob));
+  System *me = dynamic_cast<System *> (unsmob_grob (smob));
   Grob *align = me->get_vertical_alignment ();
   SCM ret = SCM_EOL;
 
@@ -1005,10 +1006,10 @@ get_maybe_spaceable_staves (SCM smob, int filter)
       for (vsize i = 0; i < staves.size (); ++i)
         {
           bool spaceable = Page_layout_problem::is_spaceable (staves[i]);
-          if (staves[i]->is_live () &&
-              ((filter == ALL_STAVES)
-               || (filter == SPACEABLE_STAVES && spaceable)
-               || (filter == NONSPACEABLE_STAVES && !spaceable)))
+          if (staves[i]->is_live ()
+              && ((filter == ALL_STAVES)
+                  || (filter == SPACEABLE_STAVES && spaceable)
+                  || (filter == NONSPACEABLE_STAVES && !spaceable)))
             {
               *tail = scm_cons (staves[i]->self_scm (), SCM_EOL);
               tail = SCM_CDRLOC (*tail);
@@ -1040,7 +1041,6 @@ System::get_nonspaceable_staves (SCM smob)
   return get_maybe_spaceable_staves (smob, NONSPACEABLE_STAVES);
 }
 
-
 ADD_INTERFACE (System,
                "This is the top-level object: Each object in a score"
                " ultimately has a @code{System} object as its X and"
index 098bf00a11bfd40f81651f845dbcc1e62a27fb3c..79efa70146cc72a874e85c8639181bbfe94a05ab 100644 (file)
@@ -174,7 +174,7 @@ Tie_formatting_problem::set_column_chord_outline (vector<Item *> bounds,
               Grob *flag = Stem::flag (stem);
               if (flag)
                 {
-                  Grobcommony = stem->common_refpoint (flag, Y_AXIS);
+                  Grob *commony = stem->common_refpoint (flag, Y_AXIS);
                   boxes.push_back (Box (flag->extent (x_refpoint_, X_AXIS),
                                         flag->extent (commony, Y_AXIS)));
                 }
@@ -443,7 +443,8 @@ Tie_configuration *
 Tie_formatting_problem::get_configuration (int pos, Direction dir, Drul_array<int> columns,
                                            bool tune_dy) const
 {
-  int key_components[] =
+  int key_components[]
+  =
   {
     pos, dir, columns[LEFT], columns[RIGHT]
   };
index b2c67cbb18d27d5df1b1288f90ced5c86621f057..c682b67b48fe99954c19999442dd9aa38a76980b 100644 (file)
@@ -652,7 +652,7 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
       Grob *number = unsmob_grob (tuplets[i]->get_object ("tuplet-number"));
       if (number)
         points.push_back (Offset (number->extent (commonx, X_AXIS).center () - x0,
-                                                  number->extent (commony, Y_AXIS)[dir]));
+                                  number->extent (commony, Y_AXIS)[dir]));
     }
 
   *offset = -dir * infinity_f;
index 3b917b760e05da92beb3445cbd562927df302a78..9e140dcf2728e1cf2cfe6a5f4310e4d42114a404 100644 (file)
@@ -152,7 +152,7 @@ LY_DEFINE (ly_translate_cpp_warning_scheme, "ly:translate-cpp-warning-scheme",
 {
   LY_ASSERT_TYPE (scm_is_string, str, 1);
   string s = _ (ly_scm2string (str).c_str ());
-  
+
   /* Now replace all printf placeholders by scheme placeholders (~a).
    * Guile's format syntax is pretty similar to C's printf, only with
    * a tilde as the placeholder instead of a percent sign.
@@ -167,27 +167,32 @@ LY_DEFINE (ly_translate_cpp_warning_scheme, "ly:translate-cpp-warning-scheme",
       // In some cases (%%, %s) we need to do a lookahead. As the C string is
       // always \0-terminated the next char is never beyond the end of the
       // memory!
-      switch (*pos) {
+      switch (*pos)
+        {
         case '~':
           result += "~~";
           break;
         case '%':
-          if (*(pos+1) == '%') {
-            result += "%";
-            // Skip the second '%'
-            pos++;
-          } else if (*(pos+1) == 's' || *(pos+1) == 'd') {
-            // %s in C++ corresponds to ~a; ~s would add quotes!
-            // ~d is only supported by ice-9, use ~a instead
-            result += "~a";
-            // Skip the following 's'
-            pos++;
-          } else
+          if (*(pos + 1) == '%')
+            {
+              result += "%";
+              // Skip the second '%'
+              pos++;
+            }
+          else if (*(pos + 1) == 's' || *(pos + 1) == 'd')
+            {
+              // %s in C++ corresponds to ~a; ~s would add quotes!
+              // ~d is only supported by ice-9, use ~a instead
+              result += "~a";
+              // Skip the following 's'
+              pos++;
+            }
+          else
             result += "~";
           break;
         default:
           result += *pos;
-      }
+        }
       pos++;
     }
   return ly_string2scm (result);