]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/relocate.cc (setup_paths): GCC 4.2 fixes: const correctness.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 17 Feb 2006 02:17:00 +0000 (02:17 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 17 Feb 2006 02:17:00 +0000 (02:17 +0000)
* lily/text-spanner.cc (print): idem.

* lily/dynamic-text-spanner.cc (print): only print line if longer
than dash-period.

ChangeLog
lily/dynamic-text-spanner.cc
lily/main.cc
lily/relocate.cc
lily/text-spanner.cc
scm/define-grobs.scm

index 50d2c851ae210d039b2b99f3659eebe82b6c7a61..3bb7081ea8cf9410f51155d4593d7845515a56d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2006-02-17  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * lily/relocate.cc (setup_paths): GCC 4.2 fixes: const correctness.
+
+       * lily/text-spanner.cc (print): idem.
+
+       * lily/dynamic-text-spanner.cc (print): only print line if longer
+       than dash-period.
+
        * lily/auto-change-iterator.cc (change_to): formatting.
 
        * lily/beam.cc (get_default_dir): take extreme note head as input
index 79dca98426466be35b4374e78389481690098574..a5d76e4bca52b5f5197be5a6a67fbd85462fd381 100644 (file)
@@ -123,7 +123,8 @@ Dynamic_text_spanner::print (SCM smob)
     }
   while (flip (&d) != LEFT);
 
-  if (!span_points.is_empty ())
+  if (!span_points.is_empty ()
+      && span_points.length () > robust_scm2double (me->get_property ("dash-period"), 0.0))
     {
       Stencil l = Line_spanner::line_stencil (me,
                                              Offset (span_points[LEFT], 0),
index 8fb2ab27e51ec68af69c4f8e12166931ab422705..8f0678bc4868f12d262405dd3d98310bbf03446b 100644 (file)
@@ -184,7 +184,7 @@ static Long_option_init options_static[]
   {0, 0, 0, 0}
 };
 
-const char *LILYPOND_DATADIR = PACKAGE_DATADIR "/" TOPLEVEL_VERSION;
+char const *LILYPOND_DATADIR = PACKAGE_DATADIR "/" TOPLEVEL_VERSION;
 
 static void
 env_var_info (FILE *out, char const *key)
@@ -590,7 +590,7 @@ parse_argv (int argc, char **argv)
 void
 setup_guile_env ()
 {
-  char *yield = getenv ("LILYPOND_GC_YIELD");
+  const char *yield = getenv ("LILYPOND_GC_YIELD");
   bool overwrite = true;
   if (!yield)
     {
index 214e488f46339739400b6333a092e8ae42b4a9f2..a1be7b45914a4bcbf133c6c945a150a0e7297fea 100644 (file)
@@ -285,7 +285,7 @@ setup_paths (char const *argv0_ptr)
   
   /* Adding mf/out make lilypond unchanged source directory, when setting
      LILYPONDPREFIX to lilypond-x.y.z */
-  char *suffixes[] = {"ly", "ps", "scm", 0 };
+  char const *suffixes[] = {"ly", "ps", "scm", 0 };
 
   
   vector<string> dirs;
index bcaf49098bd2fbb2dd663dd6a1e0ff4a6f8212cc..cfe00ba756b027583daee98efffe2fbf9d5ad179 100644 (file)
@@ -147,7 +147,9 @@ Text_spanner::print (SCM smob)
     }
   while (flip (&d) != LEFT);
 
-  if (!span_points.is_empty ())
+  
+  if (!span_points.is_empty ()
+      && span_points.length () > robust_scm2double (me->get_property ("dash-period"), 0.0))
     {
       Stencil l = Line_spanner::line_stencil (me,
                                              Offset (span_points[LEFT], 0),
@@ -158,7 +160,20 @@ Text_spanner::print (SCM smob)
   return m.smobbed_copy ();
 }
 
-ADD_INTERFACE (Text_spanner, "text-spanner-interface",
+ADD_INTERFACE (Text_spanner,
+              "text-spanner-interface",
+
               "generic text spanner",
-              "bound-padding dash-period dash-fraction edge-height bracket-flare edge-text shorten-pair style thickness enclose-bounds");
+
+              "bound-padding "
+              "bracket-flare "
+              "dash-fraction "
+              "dash-period "
+              "edge-height "
+              "edge-text "
+              "enclose-bounds"
+              "shorten-pair "
+              "style "
+              "thickness "
+              );
 
index abffe9bc65fa78fbedcc97bfb9a207af086850dd..8fc764618b800156cff7995c206ad33e769fe870 100644 (file)
                        (clef . (minimum-space . 2.0))
                        (first-note . (fixed-space . 1.0)) ;huh?
                        (right-edge . (extra-space . 0.1))))
-
        (stencil . ,ly:text-interface::print)
-
        (text . ,(make-musicglyph-markup "scripts.rcomma"))
        (Y-offset . ,ly:breathing-sign::offset-callback)
        (break-visibility . ,begin-of-line-invisible)
 
     (Clef
      . (
-
        (stencil . ,ly:clef::print)
        (glyph-name . ,ly:clef::calc-glyph-name)
-                                       
        (breakable . #t)
        (font-family . music)
        (break-align-symbol . clef)
 
     (ClusterSpannerBeacon
      . (
-
        (Y-extent . ,ly:cluster-beacon::height)
-
        (meta . ((class . Item)
                 (interfaces . (cluster-beacon-interface))))))
 
     (ClusterSpanner
      . (
-
        (springs-and-rods . ,ly:spanner::set-spacing-rods)
        (stencil . ,ly:cluster::print)
-
-
        (minimum-length . 0.0)
        (padding . 0.25)
        (style . ramp)
 
     (ChordName
      . (
-
        (stencil . ,ly:text-interface::print)
        (after-line-breaking . ,ly:chord-name::after-line-breaking)
-       
        (word-space . 0.0)
        (font-family . sans)
        (font-size . 1.5)
 
     (CombineTextScript
      . (
-
        (stencil . ,ly:text-interface::print)
-
        (no-spacing-rods . #t)
        (Y-offset . ,ly:side-position-interface::y-aligned-side)
        (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
      . (
        (break-align-symbol . custos)
        (breakable . #t)
-
        (stencil . ,ly:custos::print)
-
        (break-visibility . ,end-of-line-visible)
        (style . vaticana)
        (neutral-direction . ,DOWN)
      . (
        (axes . (0))
        (direction . ,RIGHT)
-
        (positioning-done . ,ly:dot-column::calc-positioning-done) 
        (X-extent . ,ly:axis-group-interface::width)
-       
        (X-offset . ,ly:dot-column::side-position)
        (meta . ((class . Item)
                 (interfaces . (dot-column-interface
 
     (Dots
      . (
-
        (stencil . ,ly:dots::print)
-
        (dot-count . 1)
        (meta . ((class . Item)
                 (interfaces . (font-interface
 
     (DoublePercentRepeatCounter
      . (
-
        (stencil . ,ly:text-interface::print)
        (X-offset . ,(ly:make-simple-closure `(,+ ,(ly:make-simple-closure (list ly:self-alignment-interface::centered-on-y-parent))
                                                  ,(ly:make-simple-closure (list ly:self-alignment-interface::x-aligned-on-self)))))
        (minimum-space . 1.2)
        (direction . ,DOWN)
        (side-axis . ,Y)
-
        (Y-extent . ,ly:axis-group-interface::height)
        (X-extent . ,ly:axis-group-interface::width)
-
-
        (meta . ((class . Spanner)
                 (interfaces . (axis-group-interface
                                dynamic-interface
 
     (DynamicTextSpanner
      . (
-
        (stencil . ,ly:dynamic-text-spanner::print)
 
        ;; rather ugh with NCSB
 
     (GridLine
      . (
-
        (X-extent  . ,ly:grid-line-interface::width)
        (stencil . ,ly:grid-line-interface::print)
-
        (self-alignment-X . ,CENTER)
        (X-offset . ,(ly:make-simple-closure
                      `(,+  ,(ly:make-simple-closure (list ly:self-alignment-interface::centered-on-x-parent))
 
     (Hairpin
      . (
-
-
        (stencil . ,ly:hairpin::print)
        (springs-and-rods . ,ly:spanner::set-spacing-rods)
        (after-line-breaking . ,ly:hairpin::after-line-breaking)
-
        (thickness . 1.0)
        (height . 0.6666)
        (minimum-length . 2.0)
 
     (KeyCancellation
      . (
-
        (stencil . ,ly:key-signature-interface::print)
-
        (space-alist . (
                        (time-signature . (extra-space . 1.25))
                        (staff-bar . (extra-space . 0.6))
        (break-align-symbol . key-cancellation)
        (break-visibility . ,begin-of-line-invisible)
        (breakable . #t)
-
        (meta . ((class . Item)
                 (interfaces . (key-signature-interface
                                font-interface
                                break-aligned-interface))))))
     (KeySignature
      . (
-
        (stencil . ,ly:key-signature-interface::print)
-
        (space-alist . (
                        (time-signature . (extra-space . 1.15))
                        (staff-bar . (extra-space . 1.1))
        (break-align-symbol . key-signature)
        (break-visibility . ,begin-of-line-visible)
        (breakable . #t)
-
        (meta . ((class . Item)
                 (interfaces . (key-signature-interface
                                font-interface
                                break-aligned-interface))))))
     (LaissezVibrerTie
      . (
-
        (stencil  . ,ly:tie::print)
        (control-points . ,ly:laissez-vibrer-tie::calc-control-points)
        (direction . ,ly:laissez-vibrer-tie::calc-direction)
-       
        (details . ((ratio . 0.333)
                    (height-limit . 1.0)))
        (thickness . 1.0)
 
     (LedgerLineSpanner
      . (
-
        (springs-and-rods . ,ly:ledger-line-spanner::set-spacing-rods)
 
        (stencil . ,ly:ledger-line-spanner::print)