]> git.donarmstrong.com Git - lilypond.git/commitdiff
(get_curve): always use scm_is_pair() looping
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 19 Sep 2006 12:33:53 +0000 (12:33 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 19 Sep 2006 12:33:53 +0000 (12:33 +0000)
scheme lists.  Backportme.

14 files changed:
ChangeLog
VERSION
lily/axis-group-interface.cc
lily/book.cc
lily/dispatcher-scheme.cc
lily/dispatcher.cc
lily/grob-property.cc
lily/grob.cc
lily/ligature-engraver.cc
lily/mensural-ligature.cc
lily/page-breaking.cc
lily/paper-book.cc
lily/slur.cc
lily/tie.cc

index 00f225c19291c45f1f2f75ab43530eb812a9bd86..66a2ce59fc36d1347008f4289a737cdcaba54a06 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-09-19  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * lily/*.cc: idem.
+
+       * lily/slur.cc (get_curve): always use scm_is_pair() looping
+       scheme lists.  Backportme.
+
 2006-09-18  Graham Percival  <gpermus@gmail.com>
 
        * Documentation/user/basic-notation.itely: add bug
diff --git a/VERSION b/VERSION
index 9d5789cd29d6ff881a5077fe78eac10a673cb6a2..b3d86410a51aa36a0fb273a469b29514a6daa407 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=9
-PATCH_LEVEL=18
+PATCH_LEVEL=19
 MY_PATCH_LEVEL=
 
index 1d509f04d1923b436c0f4866d2767e2b085fea32..d74bf880e6d1f1a2e3c495adb180a98a01e52069 100644 (file)
@@ -27,7 +27,7 @@ Axis_group_interface::add_element (Grob *me, Grob *e)
   if (!scm_is_pair (axes))
     programming_error ("axes should be nonempty");
 
-  for (SCM ax = axes; ax != SCM_EOL; ax = scm_cdr (ax))
+  for (SCM ax = axes; scm_is_pair (ax); ax = scm_cdr (ax))
     {
       Axis a = (Axis) scm_to_int (scm_car (ax));
 
index 114ef0cdf2df8cc5c56bedef16beb90f3c68a4a4..06b10135ac2a6f87b73446ba3cb20af7607e9b51 100644 (file)
@@ -118,7 +118,7 @@ Paper_book *
 Book::process (Output_def *default_paper,
               Output_def *default_layout)
 {
-  for (SCM s = scores_; s != SCM_EOL; s = scm_cdr (s))
+  for (SCM s = scores_; scm_is_pair (s); s = scm_cdr (s))
     if (Score *score = unsmob_score (scm_car (s)))
       if (score->error_found_)
        return 0;
@@ -140,7 +140,7 @@ Book::process (Output_def *default_paper,
   paper_book->header_ = header_;
 
   /* Render in order of parsing.  */
-  for (SCM s = scm_reverse (scores_); s != SCM_EOL; s = scm_cdr (s))
+  for (SCM s = scm_reverse (scores_); scm_is_pair (s); s = scm_cdr (s))
     {
       if (Score *score = unsmob_score (scm_car (s)))
        {
index a8a2b273a1f8faebf55de9af9f7c4c0223a09f3e..2a2720656c888e082a44adaaa1320781fbf2723a 100644 (file)
@@ -38,7 +38,7 @@ LY_DEFINE (ly_add_listener, "ly:add-listener",
   SCM_ASSERT_TYPE (l, list, SCM_ARG1, __FUNCTION__, "listener");
   SCM_ASSERT_TYPE (d, disp, SCM_ARG2, __FUNCTION__, "dispatcher");
   
-  for (int arg=SCM_ARG3; cl != SCM_EOL; cl = scm_cdr (cl), arg++)
+  for (int arg=SCM_ARG3; scm_is_pair (cl); cl = scm_cdr (cl), arg++)
     {
       SCM_ASSERT_TYPE (scm_symbol_p (cl), cl, arg, __FUNCTION__, "symbol");
       d->add_listener (*l, scm_car (cl));
index b86d045bc1cb5a01b2657b102e48f1606ca19be0..fb3df2a40fd30cc98e20537599696cac3373d6f1 100644 (file)
@@ -223,7 +223,7 @@ Dispatcher::remove_listener (Listener l, SCM ev_class)
   else if (!scm_is_pair (list))
     {
       /* Unregister with all dispatchers. */
-      for (SCM disp = dispatchers_; disp != SCM_EOL; disp = scm_cdr (disp))
+      for (SCM disp = dispatchers_; scm_is_pair (disp); disp = scm_cdr (disp))
        {
          Dispatcher *d = unsmob_dispatcher (scm_caar (disp));
          d->remove_listener (GET_LISTENER (dispatch), ev_class);
@@ -248,7 +248,7 @@ Dispatcher::register_as_listener (Dispatcher *disp)
   dispatchers_ = scm_acons (disp->self_scm (), scm_int2num (priority), dispatchers_);
 
   Listener list = GET_LISTENER (dispatch);
-  for (SCM cl = listen_classes_; cl != SCM_EOL; cl = scm_cdr (cl))
+  for (SCM cl = listen_classes_; scm_is_pair (cl); cl = scm_cdr (cl))
     {
       disp->internal_add_listener (list, scm_car (cl), priority);
     }
index 8d7ecc0c19528b49b481e293dd9bfcc640df86c5..cfa21832d8f03137ddab67cc1a3256996a70c9ee 100644 (file)
@@ -191,7 +191,7 @@ Grob::internal_get_object (SCM sym) const
 bool
 Grob::is_live () const
 {
-  return immutable_property_alist_ != SCM_EOL;
+  return scm_is_pair (immutable_property_alist_);
 }
 
 
index 72b46376c61d5405d8648c34b7b677db2b8327f1..3e98a5b90a48ed87198158f30cbcf81d0e60d677 100644 (file)
@@ -135,7 +135,7 @@ Grob::get_print_stencil () const
 
       /* color support... see interpret_stencil_expression () for more... */
       SCM color = get_property ("color");
-      if (color != SCM_EOL)
+      if (scm_is_pair (color))
        {
          SCM expr = scm_list_3 (ly_symbol2scm ("color"),
                                 color,
index 98e840b1ffaadaaeed005192c62a978da5b7afe0..81523a0109d5056fc5050c3d7099c503c6736b3b 100644 (file)
@@ -189,7 +189,7 @@ Ligature_engraver::acknowledge_note_head (Grob_info info)
   if (ligature_)
     {
       primitives_.push_back (info);
-      if (info.grob () && (brew_ligature_primitive_proc != SCM_EOL))
+      if (info.grob () && brew_ligature_primitive_proc != SCM_EOL)
        {
          info.grob ()->set_property ("stencil", brew_ligature_primitive_proc);
        }
index c327da0b551d3c7455302b5db73e1d20c7c58fca..936f64b877b90d965d8c4d4ab860d9ca10463389 100644 (file)
@@ -167,7 +167,7 @@ internal_brew_primitive (Grob *me)
 
   SCM join_right_scm = me->get_property ("join-right-amount");
 
-  if (join_right_scm != SCM_EOL)
+  if (scm_is_pair (join_right_scm))
     {
       int join_right = scm_to_int (join_right_scm);
       if (join_right)
index b1fd686e2b05aafff4c074dab0ef6516eb3cd5ed..528b61b8540b95ceab203924dad942ac3c8baf71 100644 (file)
@@ -224,7 +224,7 @@ void
 Page_breaking::create_system_list ()
 {
   SCM specs = book_->get_system_specs ();
-  for (SCM s = specs; s != SCM_EOL; s = scm_cdr (s))
+  for (SCM s = specs; scm_is_pair (s); s = scm_cdr (s))
     {
       if (Paper_score *ps = dynamic_cast<Paper_score*> (unsmob_music_output (scm_car (s))))
        {
index 81376da0a4b2e1bb2519cb83df14ff883442b9bb..c16870f30db900c3bfed889cb8ef1b9c9cfdc6d8 100644 (file)
@@ -279,7 +279,7 @@ Paper_book::get_system_specs ()
                  paper_->self_scm ());
 
   SCM header = SCM_EOL;
-  for (SCM s = scm_reverse (scores_); s != SCM_EOL; s = scm_cdr (s))
+  for (SCM s = scm_reverse (scores_); scm_is_pair (s); s = scm_cdr (s))
     {
       if (ly_is_module (scm_car (s)))
        {
@@ -358,7 +358,7 @@ Paper_book::systems ()
 
   int i = 0;
   Prob *last = 0;
-  for (SCM s = systems_; s != SCM_EOL; s = scm_cdr (s))
+  for (SCM s = systems_; scm_is_pair (s); s = scm_cdr (s))
     {
       Prob *ps = unsmob_prob (scm_car (s));
       ps->set_property ("number", scm_from_int (++i));
@@ -387,7 +387,7 @@ Paper_book::pages ()
   if (systems_ == SCM_BOOL_F)
     {
       systems_ = SCM_EOL;
-      for (SCM p = pages_; p != SCM_EOL; p = scm_cdr (p))
+      for (SCM p = pages_; scm_is_pair (p); p = scm_cdr (p))
        {
          Prob *page = unsmob_prob (scm_car (p));
          SCM systems = page->get_property ("lines");
index 0c68a6137e5be1891bf260da27f9e0a8b612aff6..df529f7713667b1bb49ca8ba627cce3d6d8ed514 100644 (file)
@@ -165,7 +165,7 @@ Slur::get_curve (Grob *me)
 {
   Bezier b;
   int i = 0;
-  for (SCM s = me->get_property ("control-points"); s != SCM_EOL;
+  for (SCM s = me->get_property ("control-points"); scm_is_pair (s);
        s = scm_cdr (s))
     b.control_[i++] = ly_scm2offset (scm_car (s));
 
index f6561fa576fb685dd3621110bddb07d1eeb27fe5..b4b5206386ae23a3236fa830514953cd8c4f2001 100644 (file)
@@ -235,7 +235,7 @@ Tie::print (SCM smob)
 
   Bezier b;
   int i = 0;
-  for (SCM s = cp; s != SCM_EOL; s = scm_cdr (s))
+  for (SCM s = cp; scm_is_pair (s); s = scm_cdr (s))
     {
       b.control_[i] = ly_scm2offset (scm_car (s));
       i++;