]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.118.jcn1
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 17 Dec 2000 19:10:49 +0000 (20:10 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 17 Dec 2000 19:10:49 +0000 (20:10 +0100)
1.3.118.jcn1
============

* Bugfixes: warnings.

CHANGES
VERSION
input/bugs/guile-state.ly
input/test/warnings.ly [new file with mode: 0644]
lily/property-engraver.cc
lily/translator-group.cc

diff --git a/CHANGES b/CHANGES
index 9b193edaf859dc97df188aae43bb8030023dfacc..afa741d7b7114fc1b1cc8a3c97b7dd2cc7d2c386 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+1.3.118.jcn1
+============
+
+* Bugfixes: warnings.
+
 1.3.117.mb1
 ===========
 
diff --git a/VERSION b/VERSION
index 526c57deed398a15cbeeb11da33e16b6c33d5c09..3d755ffad5701766700d970a4aa80c8610850ee7 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=118
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 5295650d3e1e56ed04178d0d72fbe99cdf721a25..2ca522dd5a2a1d9649a6223ceac0e794b35a4955 100644 (file)
@@ -1,11 +1,11 @@
 \header{
-texidoc=3D"Real header: the slurBeginAttachment setting still lives in the
+texidoc="Real header: the slurBeginAttachment setting still lives in the
 second example, breaking the cross staff broken slur.
 ";
 }
-=09
+       
 \header{
-texidoc=3D"
+texidoc="
 Slurs can be forced to always attach to note heads.
 ";
 }
@@ -13,19 +13,19 @@ Slurs can be forced to always attach to note heads.
 
 \score{
        \notes \relative c''{
-               \property Voice.VerticalDirection =3D #1
-               \property Voice.slurBeginAttachment =3D #'head
-               \property Voice.slurEndAttachment =3D #'head
+               \property Voice.VerticalDirection = #1
+               \property Voice.slurBeginAttachment = #'head
+               \property Voice.slurEndAttachment = #'head
                g16()g()g()g()d'()d()d()d
        }
        \paper{
-               indent =3D 0.0;
-               linewidth =3D 60.0\mm;
+               indent = 0.0;
+               linewidth = 60.0\mm;
        }
 }
-=09
+       
 \header{
-texidoc=3D"
+texidoc="
 The same goes for slurs. They behave decently when broken across
 linebreak.
 ";
@@ -33,45 +33,45 @@ linebreak.
 
 \score{
        \context PianoStaff <
-       \context Staff=3Done \notes\relative c'{
+       \context Staff=one \notes\relative c'{
 %{
                \stemUp \slurUp
-                c4( c \translator Staff=3Dtwo c )c |
-               \translator Staff=3Done
+                c4( c \translator Staff=two c )c |
+               \translator Staff=one
                \stemUp \slurUp
-                c4( c \translator Staff=3Dtwo c )c |
+                c4( c \translator Staff=two c )c |
                \stemUp \slurUp
-                c4( c \translator Staff=3Done c )c |
-               \translator Staff=3Dtwo
+                c4( c \translator Staff=one c )c |
+               \translator Staff=two
                \stemUp \slurUp
-                c4( c \translator Staff=3Done c )c |
-               \translator Staff=3Dtwo
+                c4( c \translator Staff=one c )c |
+               \translator Staff=two
                \stemUp \slurUp
-                c4( \translator Staff=3Done c c )c |
+                c4( \translator Staff=one c c )c |
 %}
                r2
-               \translator Staff=3Dtwo
+               \translator Staff=two
                \stemUp \slurUp
-                c4( \translator Staff=3Done c
+                c4( \translator Staff=one c
                   \break
                c )c
                r2
 
 %{
                \stemDown \slurDown
-                d4( \translator Staff=3Dtwo c c \translator Staff=3Done )d
-               \translator Staff=3Dtwo
+                d4( \translator Staff=two c c \translator Staff=one )d
+               \translator Staff=two
                \stemUp \slurUp
-                c4( \translator Staff=3Done c c \translator Staff=3Dtwo )c
+                c4( \translator Staff=one c c \translator Staff=two )c
                r1
 %}
        }
-       \context Staff=3Dtwo \notes\relative c'{
+       \context Staff=two \notes\relative c'{
                \clef bass;
                s1 s1 %s1 s1 s1 s1 s1 s1 s1 s1
        }
        >
-       \paper { indent =3D 0.; linewidth =3D 40.*\staffspace; }
+       \paper { indent = 0.; linewidth = 40.*\staffspace; }
 }
 
-\version "1.3.110";=20
+\version "1.3.110"; 
diff --git a/input/test/warnings.ly b/input/test/warnings.ly
new file mode 100644 (file)
index 0000000..655d27c
--- /dev/null
@@ -0,0 +1,15 @@
+\header {
+texidoc="Various warnings
+";
+}
+
+linebreak = \penalty -1000;
+
+\score {
+  \notes {
+    \property Voice.Stem \set #'length = #"foo"
+    \property Voice.Stem \set #'longth = #2
+    \property Staff.clefStyle = #"foo"
+    \property Staff.clefStyle = #2
+ }
+}
index 79227b559077953d5fb6a117fa52297612f23eeb..80e909c5b2213b9a09966583ac336431d0c7fb87 100644 (file)
@@ -116,18 +116,14 @@ Property_engraver::apply_properties (SCM p, Grob *e, Translator_group*origin)
        {
          e->set_grob_property (elt_prop_sym, val);
 
-         SCM errport = scm_current_error_port ();
          SCM meta = e->get_grob_property ("meta");
          SCM name = scm_assoc (ly_symbol2scm ("name"), meta);
-         /* warning () ? */
-         scm_puts (_f ("%s is deprecated.  Use\n \\property %s.%s \\override #'%s = #%s",
-                       ly_symbol2string (prop_sym).ch_C (),
-                       origin->type_str_.ch_C (),
-                       ly_scm2string (gh_cdr (name)).ch_C (),
-                       ly_symbol2string (elt_prop_sym).ch_C (),
-                       ly_scm2string (ly_write2scm (val)).ch_C ()).ch_C (),
-                   errport);
-         scm_puts ("\n", errport);
+         warning (_f ("%s is deprecated.  Use\n \\property %s.%s \\override #'%s = #%s",
+                      ly_symbol2string (prop_sym).ch_C (),
+                      origin->type_str_.ch_C (),
+                      ly_scm2string (gh_cdr (name)).ch_C (),
+                      ly_symbol2string (elt_prop_sym).ch_C (),
+                      ly_scm2string (ly_write2scm (val)).ch_C ()));
        }
       else
 
@@ -143,15 +139,13 @@ Property_engraver::apply_properties (SCM p, Grob *e, Translator_group*origin)
        */
        if (val != SCM_EOL)
          {                     // not the right type: error message.
-           SCM errport = scm_current_error_port ();
            SCM typefunc = scm_eval2 (ly_symbol2scm ("type-name"), SCM_EOL);
            SCM type_name = gh_call1 (typefunc, type_p);
            warning (_f ("Wrong type for property: %s, type: %s, value found: %s, type: %s",
                         ly_symbol2string (prop_sym).ch_C (),
-                        ly_symbol2string (type_name).ch_C (),
+                        ly_scm2string (type_name).ch_C (),
                         ly_scm2string (ly_write2scm (val)).ch_C (),
                         ly_scm2string (ly_type (val)).ch_C ()));
-           scm_puts ("\n", errport);
          }
     }
 }
index 0dd0ea5d3a4d3966b1ef0026ace5453124a6f948..80fa807b566434ceb65a3bbff1b41bae1fa69fde 100644 (file)
@@ -394,18 +394,14 @@ type_check_assignment (SCM val, SCM sym,  SCM type_symbol)
 {
   bool ok = true;
   SCM type_p = SCM_EOL;
-  SCM errport = scm_current_error_port ();
 
   if (gh_symbol_p(sym))
     type_p = scm_object_property (sym, type_symbol);
 
   if (type_p != SCM_EOL && !gh_procedure_p (type_p))
       {
-       /* warning () ? */
-       scm_puts (_f ("Can't find property type-check for `%s'.  Perhaps you made a typing error?",
-                     ly_symbol2string (sym).ch_C ()).ch_C (),
-                 errport);
-       scm_puts ("\n", errport);
+       warning (_f ("Can't find property type-check for `%s'.  Perhaps you made a typing error?",
+                    ly_symbol2string (sym).ch_C ()));
       }
   else
     {
@@ -413,30 +409,13 @@ type_check_assignment (SCM val, SCM sym,  SCM type_symbol)
          && gh_procedure_p (type_p)
          && gh_call1 (type_p, val) == SCM_BOOL_F)
        {
-         ok = false;
-         scm_puts (_("Failed typecheck for `").ch_C (),errport);
-         scm_display (sym,errport);
-         scm_puts ( _("', value `").ch_C (), errport);
-         scm_write (val, errport);
-         scm_puts (_("' must be of type ").ch_C (), errport);
-         SCM typefunc = scm_eval2 (ly_symbol2scm ("type-name"), SCM_EOL);
-         scm_display (gh_call1 (typefunc, type_p), errport);
-         scm_puts ("\n", errport);     
-#if 0
          ok = false;
          SCM typefunc = scm_eval2 (ly_symbol2scm ("type-name"), SCM_EOL);
          SCM type_name = gh_call1 (typefunc, type_p);
-         /* warning () ? */
-
-         scm_puts (_f ("Failed typecheck for `%s', value `%s' must be of type `%s'",
-                       ly_symbol2string (sym).ch_C (),
-                       ly_symbol2string (val).ch_C (),
-                       ly_scm2string (ly_write2scm (val)).ch_C (),
-                       ly_symbol2string (type_name).ch_C ()).ch_C (),
-                   errport);
-         scm_puts ("\n", errport);                   
-#endif
-
+         warning (_f ("Failed typecheck for `%s', value `%s' must be of type `%s'",
+                      ly_symbol2string (sym).ch_C (),
+                      ly_scm2string (ly_write2scm( val)).ch_C (),
+                      ly_scm2string (type_name).ch_C ()));
        }
     }
   return ok;