]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/spring-smob.cc
Merge branch 'master' of git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / lily / spring-smob.cc
index 3ab9618ef068ef478ea6a89fd2a05f77afdfc46a..a57f5029f2d2eef8c160f6173a67ea8761164361 100644 (file)
@@ -1,47 +1,43 @@
-/*   
-  spring.cc --  implement Spring
-  
+/*
+  spring.cc -- implement Spring
+
   source file of the GNU LilyPond music typesetter
-  
-  (c) 1999--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
+
+  (c) 1999--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
+*/
 
 #include "spring.hh"
 #include "warn.hh"
 #include "ly-smobs.icc"
 
-Spring_smob::Spring_smob()
+Spring_smob::Spring_smob ()
 {
-  distance_f_ =0.;
-  strength_f_ =1.0;
+  distance_ = 0.;
+  inverse_strength_ = 1.0;
   expand_only_b_ = false;
   other_ = 0;
 }
 
-
-IMPLEMENT_SIMPLE_SMOBS(Spring_smob);
+IMPLEMENT_SIMPLE_SMOBS (Spring_smob);
 
 SCM
-Spring_smob::mark_smob (SCM) { return SCM_UNSPECIFIED; }
+Spring_smob::mark_smob (SCM x)
+{
+  (void)x;
+
+  return SCM_UNSPECIFIED;
+}
 
 int
-Spring_smob::print_smob (SCM s, SCM p, scm_print_state *)
+Spring_smob::print_smob (SCM, SCM p, scm_print_state *)
 {
-  Spring_smob *ss = unsmob_spring (s);
-  scm_puts (_f("#<spring smob d= %f>", ss->distance_f_).ch_C(), p);
+  scm_puts ("#<Spring smob>", p);
   return 1;
 }
 
 SCM
-Spring_smob::equal_p (SCM a , SCM b)
+Spring_smob::equal_p (SCM a, SCM b)
 {
-  return a==b? SCM_BOOL_T : SCM_BOOL_F;
+  return a == b? SCM_BOOL_T : SCM_BOOL_F;
 }
 
-SCM
-Spring_smob::smobbed_copy ()const
-{
-  Spring_smob *  p = new Spring_smob (*this);
-  return p->smobbed_self ();
-}