From: hanwen <hanwen>
Date: Fri, 17 Feb 2006 02:17:00 +0000 (+0000)
Subject: * lily/relocate.cc (setup_paths): GCC 4.2 fixes: const correctness.
X-Git-Tag: release/2.7.38^2~120
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b9565a779954d3b2b6aaab84ffd71269ad691155;p=lilypond.git

* 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.
---

diff --git a/ChangeLog b/ChangeLog
index 50d2c851ae..3bb7081ea8 100644
--- 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
diff --git a/lily/dynamic-text-spanner.cc b/lily/dynamic-text-spanner.cc
index 79dca98426..a5d76e4bca 100644
--- a/lily/dynamic-text-spanner.cc
+++ b/lily/dynamic-text-spanner.cc
@@ -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),
diff --git a/lily/main.cc b/lily/main.cc
index 8fb2ab27e5..8f0678bc48 100644
--- a/lily/main.cc
+++ b/lily/main.cc
@@ -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)
     {
diff --git a/lily/relocate.cc b/lily/relocate.cc
index 214e488f46..a1be7b4591 100644
--- a/lily/relocate.cc
+++ b/lily/relocate.cc
@@ -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;
diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc
index bcaf49098b..cfe00ba756 100644
--- a/lily/text-spanner.cc
+++ b/lily/text-spanner.cc
@@ -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 "
+	       );
 
diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm
index abffe9bc65..8fc764618b 100644
--- a/scm/define-grobs.scm
+++ b/scm/define-grobs.scm
@@ -376,9 +376,7 @@
 			(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)
@@ -390,10 +388,8 @@
 
     (Clef
      . (
-
 	(stencil . ,ly:clef::print)
 	(glyph-name . ,ly:clef::calc-glyph-name)
-					
 	(breakable . #t)
 	(font-family . music)
 	(break-align-symbol . clef)
@@ -415,19 +411,14 @@
 
     (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)
@@ -436,10 +427,8 @@
 
     (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)
@@ -452,9 +441,7 @@
 
     (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)
@@ -476,9 +463,7 @@
      . (
 	(break-align-symbol . custos)
 	(breakable . #t)
-
 	(stencil . ,ly:custos::print)
-
 	(break-visibility . ,end-of-line-visible)
 	(style . vaticana)
 	(neutral-direction . ,DOWN)
@@ -497,10 +482,8 @@
      . (
 	(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
@@ -508,9 +491,7 @@
 
     (Dots
      . (
-
 	(stencil . ,ly:dots::print)
-
 	(dot-count . 1)
 	(meta . ((class . Item)
 		 (interfaces . (font-interface
@@ -534,7 +515,6 @@
 
     (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)))))
@@ -563,11 +543,8 @@
 	(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
@@ -601,7 +578,6 @@
 
     (DynamicTextSpanner
      . (
-
 	(stencil . ,ly:dynamic-text-spanner::print)
 
 	;; rather ugh with NCSB
@@ -673,10 +649,8 @@
 
     (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))
@@ -688,12 +662,9 @@
 
     (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)
@@ -736,9 +707,7 @@
 
     (KeyCancellation
      . (
-
 	(stencil . ,ly:key-signature-interface::print)
-
 	(space-alist . (
 			(time-signature . (extra-space . 1.25))
 			(staff-bar . (extra-space . 0.6))
@@ -749,16 +718,13 @@
 	(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))
@@ -768,18 +734,15 @@
 	(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)
@@ -800,7 +763,6 @@
 
     (LedgerLineSpanner
      . (
-
 	(springs-and-rods . ,ly:ledger-line-spanner::set-spacing-rods)
 
 	(stencil . ,ly:ledger-line-spanner::print)