]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/output-def.cc
Run `make grand-replace'.
[lilypond.git] / lily / output-def.cc
index b87dd470b26bd8647548aad75c0eb6fa9acb7a5f..1fcc5f596ed5464f029c6305f803542e6f083027 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1997--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "output-def.hh"
@@ -27,8 +27,9 @@ Output_def::Output_def ()
 {
   scope_ = SCM_EOL;
   parent_ = 0;
-  smobify_self ();
 
+  smobify_self ();
+  
   scope_ = ly_make_anonymous_module (false);
 }
 
@@ -80,7 +81,7 @@ assign_context_def (Output_def * m, SCM transdef)
 /* find the translator for NAME. NAME must be a symbol. */
 SCM
 find_context_def (Output_def const *m, SCM name)
-{  
+{
   Context_def *cd = unsmob_context_def (m->lookup_variable (name));
   return cd ? cd->self_scm () : SCM_EOL;
 }
@@ -108,7 +109,7 @@ SCM
 Output_def::lookup_variable (SCM sym) const
 {
   SCM var = ly_module_lookup (scope_, sym);
-  if (SCM_VARIABLEP (var) && SCM_VARIABLE_REF(var) != SCM_UNDEFINED)
+  if (SCM_VARIABLEP (var) && SCM_VARIABLE_REF (var) != SCM_UNDEFINED)
     return SCM_VARIABLE_REF (var);
   
   if (parent_)
@@ -118,9 +119,9 @@ Output_def::lookup_variable (SCM sym) const
 }
 
 SCM
-Output_def::c_variable (String s) const
+Output_def::c_variable (string s) const
 {
-  return lookup_variable (ly_symbol2scm (s.to_str0 ()));
+  return lookup_variable (ly_symbol2scm (s.c_str ()));
 }
 
 void
@@ -135,8 +136,10 @@ Output_def::set_variable (SCM sym, SCM val)
 Interval
 line_dimensions_int (Output_def *def, int n)
 {
-  Real lw = def->get_dimension (ly_symbol2scm ("linewidth"));
-  Real ind = n ? 0.0 : def->get_dimension (ly_symbol2scm ("indent"));
+  Real lw = def->get_dimension (ly_symbol2scm ("line-width"));
+  Real ind = n
+    ? def->get_dimension (ly_symbol2scm ("short-indent"))
+    : def->get_dimension (ly_symbol2scm ("indent"));
   return Interval (ind, lw);
 }