]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/output-def.cc
Merge branch 'master' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond into lilypond...
[lilypond.git] / lily / output-def.cc
index d93ee5db315fbe1d8d7662735e6b351cbe3af76b..f9fbda9fb6d3335dd90ad623ce917f5d06510f74 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--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "output-def.hh"
@@ -26,7 +26,6 @@
 Output_def::Output_def ()
 {
   scope_ = SCM_EOL;
-  parser_ = 0;
   parent_ = 0;
 
   smobify_self ();
@@ -38,7 +37,6 @@ Output_def::Output_def (Output_def const &s)
 {
   scope_ = SCM_EOL;
   parent_ = 0;
-  parser_ = s.parser_;
   smobify_self ();
 
   input_origin_ = s.input_origin_;
@@ -54,12 +52,6 @@ Output_def::~Output_def ()
 IMPLEMENT_SMOBS (Output_def);
 IMPLEMENT_DEFAULT_EQUAL_P (Output_def);
 
-Lily_parser *
-Output_def::get_parser () const
-{
-  return parent_ ? parent_->get_parser () : parser_;
-}
-
 SCM
 Output_def::mark_smob (SCM m)
 {
@@ -89,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;
 }
@@ -100,8 +92,6 @@ Output_def::print_smob (SCM s, SCM p, scm_print_state *)
   Output_def * def = unsmob_output_def (s);
   scm_puts ("#< ", p);
   scm_puts (def->class_name (), p);
-  
-  (void)def;
   scm_puts (">", p);
   return 1;
 }
@@ -117,7 +107,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_)
@@ -127,7 +117,7 @@ Output_def::lookup_variable (SCM sym) const
 }
 
 SCM
-Output_def::c_variable (std::string s) const
+Output_def::c_variable (string s) const
 {
   return lookup_variable (ly_symbol2scm (s.c_str ()));
 }
@@ -145,7 +135,9 @@ Interval
 line_dimensions_int (Output_def *def, int n)
 {
   Real lw = def->get_dimension (ly_symbol2scm ("line-width"));
-  Real ind = n ? 0.0 : def->get_dimension (ly_symbol2scm ("indent"));
+  Real ind = n
+    ? def->get_dimension (ly_symbol2scm ("short-indent"))
+    : def->get_dimension (ly_symbol2scm ("indent"));
   return Interval (ind, lw);
 }