]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/prob.cc
Imported Upstream version 2.16.0
[lilypond.git] / lily / prob.cc
index 233c5b6d5f0a604e5ff19d1805328114a4ee28f4..367d1616a7b4aae73b48eb674876b9de4b24f61d 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2004--2011 Jan Nieuwenhuizen <janneke@gnu.org>
+  Copyright (C) 2004--2012 Jan Nieuwenhuizen <janneke@gnu.org>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -58,22 +58,21 @@ Prob::equal_p (SCM sa, SCM sb)
       SCM bprop = props[1][i];
 
       for (;
-          scm_is_pair (aprop) && scm_is_pair (bprop);
-          aprop = scm_cdr (aprop), bprop = scm_cdr (bprop))
-       {
-         SCM aval = scm_cdar (aprop);
-         SCM bval = scm_cdar (bprop);
-         if (scm_caar (aprop) != scm_caar (bprop) ||
-             (
-              !(unsmob_input (aval) && unsmob_input (bval))
-              &&
-              !to_boolean (scm_equal_p (aval, bval))))
-           return SCM_BOOL_F;
-       }
+           scm_is_pair (aprop) && scm_is_pair (bprop);
+           aprop = scm_cdr (aprop), bprop = scm_cdr (bprop))
+        {
+          SCM aval = scm_cdar (aprop);
+          SCM bval = scm_cdar (bprop);
+          if (scm_caar (aprop) != scm_caar (bprop)
+              || (!(unsmob_input (aval) && unsmob_input (bval))
+                  &&
+                  !to_boolean (scm_equal_p (aval, bval))))
+            return SCM_BOOL_F;
+        }
 
       /* is one list shorter? */
       if (aprop != SCM_EOL || bprop != SCM_EOL)
-       return SCM_BOOL_F;
+        return SCM_BOOL_F;
     }
 
   return SCM_BOOL_T;
@@ -88,7 +87,6 @@ Prob::Prob (SCM type, SCM immutable_init)
   smobify_self ();
 }
 
-
 Prob::~Prob ()
 {
 }
@@ -107,7 +105,6 @@ Prob::Prob (Prob const &src)
   mutable_property_alist_ = src.copy_mutable_properties ();
 }
 
-
 SCM
 Prob::copy_mutable_properties () const
 {
@@ -122,7 +119,7 @@ Prob::derived_mark () const
 SCM
 Prob::mark_smob (SCM smob)
 {
-  ASSERT_LIVE_IS_ALLOWED ();
+  ASSERT_LIVE_IS_ALLOWED (smob);
 
   Prob *system = (Prob *) SCM_CELL_WORD_1 (smob);
   scm_gc_mark (system->mutable_property_alist_);
@@ -132,7 +129,7 @@ Prob::mark_smob (SCM smob)
 }
 
 int
-Prob::print_smob (SCM smob, SCM port, scm_print_state*)
+Prob::print_smob (SCM smob, SCM port, scm_print_state *)
 {
   Prob *p = (Prob *) SCM_CELL_WORD_1 (smob);
   scm_puts ("#<", port);
@@ -147,8 +144,6 @@ Prob::print_smob (SCM smob, SCM port, scm_print_state*)
   return 1;
 }
 
-
-
 SCM
 Prob::internal_get_property (SCM sym) const
 {
@@ -170,7 +165,7 @@ Prob::internal_get_property (SCM sym) const
 
 /* We don't (yet) instrument probs */
 void
-Prob::instrumented_set_property (SCM sym, SCM val, const char*, int, const char*)
+Prob::instrumented_set_property (SCM sym, SCM val, const char *, int, const char *)
 {
   internal_set_property (sym, val);
 }