]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob-property.cc
* lily/simple-spacer.cc (add_columns): use binary search for
[lilypond.git] / lily / grob-property.cc
index 46d032c64f8800d0431551490084cd180eecf6ed..f8ebf1fc352288384177b2a04053040118305668 100644 (file)
@@ -2,16 +2,15 @@
   Implement storage and manipulation of grob properties.
  */
 
-#include <string.h>
-#include <math.h>
+#include <cstring>
+#include <cmath>
 
 #include "main.hh"
 #include "input-smob.hh"
 #include "group-interface.hh"
 #include "misc.hh"
 #include "paper-score.hh"
-#include "paper-def.hh"
-#include "grob.hh"
+#include "output-def.hh"
 #include "spanner.hh"
 #include "item.hh"
 #include "misc.hh"
@@ -45,7 +44,7 @@ Grob::add_to_list_property (SCM sym, SCM thing)
 
   if (handle != SCM_BOOL_F)
     {
-      gh_set_cdr_x (handle, gh_cons (thing, gh_cdr (handle)));
+      scm_set_cdr_x (handle, scm_cons (thing, scm_cdr (handle)));
     }
   else
     {
@@ -54,10 +53,10 @@ Grob::add_to_list_property (SCM sym, SCM thing)
        mutable prop list.
       */
       handle = scm_sloppy_assq (sym, immutable_property_alist_);
-      SCM tail = (handle != SCM_BOOL_F) ? gh_cdr (handle) : SCM_EOL;
-      SCM val = gh_cons (thing, tail);
+      SCM tail = (handle != SCM_BOOL_F) ? scm_cdr (handle) : SCM_EOL;
+      SCM val = scm_cons (thing, tail);
 
-      mutable_property_alist_ = gh_cons (gh_cons (sym, val),
+      mutable_property_alist_ = scm_cons (scm_cons (sym, val),
                                         mutable_property_alist_);
     }
 }
@@ -69,7 +68,7 @@ void
 Grob::internal_set_property (SCM s, SCM v)
 {
   /* Perhaps we simply do the assq_set, but what the heck. */
-  if (!live ())
+  if (!is_live ())
     return;
 
   if (internal_type_checking_global_b)
@@ -88,20 +87,20 @@ Grob::internal_get_property (SCM sym) const
 {
   SCM s = scm_sloppy_assq (sym, mutable_property_alist_);
   if (s != SCM_BOOL_F)
-    return ly_cdr (s);
+    return scm_cdr (s);
 
   s = scm_sloppy_assq (sym, immutable_property_alist_);
   
-  if (internal_type_checking_global_b && gh_pair_p (s))
+  if (internal_type_checking_global_b && scm_is_pair (s))
     {
-      if (!type_check_assignment (sym, gh_cdr (s),
+      if (!type_check_assignment (sym, scm_cdr (s),
                                  ly_symbol2scm ("backend-type?")))
        abort ();
 
       check_interfaces_for_property (this, sym);
     }
 
-  return (s == SCM_BOOL_F) ? SCM_EOL : ly_cdr (s); 
+  return (s == SCM_BOOL_F) ? SCM_EOL : scm_cdr (s); 
 }
 
 void
@@ -113,7 +112,7 @@ Grob::substitute_mutable_properties (SCM crit, SCM orig)
 
 
 bool
-Grob::live () const
+Grob::is_live () const
 {
   return immutable_property_alist_ != SCM_EOL;
 }