]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/output-def.cc
*** empty log message ***
[lilypond.git] / lily / output-def.cc
index 1895daa6606929c70620e2ea7cc8a0864e99a391..8a1c87707c7b4a0dd4561ff7c215b79544deb645 100644 (file)
@@ -53,19 +53,13 @@ Output_def::mark_smob (SCM m)
   Output_def *mo = (Output_def*) SCM_CELL_WORD_1 (m);
 
   /* FIXME: why is this necessary?
-     all bookpaper_ should be protected by themselves. */
+     all paper_ should be protected by themselves. */
   if (mo->parent_)
     scm_gc_mark (mo->parent_->self_scm ());
 
-  mo->derived_mark ();
   return mo->scope_;
 }
 
-void
-Output_def::derived_mark ()
-{
-}
-
 void
 assign_context_def (Output_def * m, SCM transdef)
 {
@@ -103,7 +97,7 @@ Real
 Output_def::get_dimension (SCM s) const
 {
   SCM val = lookup_variable (s);
-  return ly_scm2double (val);
+  return scm_to_double (val);
 }
 
 SCM
@@ -131,14 +125,14 @@ Output_def::set_variable (SCM sym, SCM val)
   scm_module_define (scope_, sym, val);
 }
 
-LY_DEFINE (ly_paper_lookup, "ly:output-def-lookup",
+LY_DEFINE (ly_layout_lookup, "ly:output-def-lookup",
           2, 0, 0, (SCM pap, SCM sym),
           "Lookup @var{sym} in @var{pap}. "
           "Return the value or @code{'()} if undefined.")
 {
   Output_def *op = unsmob_output_def (pap);
   SCM_ASSERT_TYPE (op, pap, SCM_ARG1, __FUNCTION__, "Output_def");
-  SCM_ASSERT_TYPE (ly_c_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (scm_is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
 
   return op->lookup_variable (sym);
 }
@@ -181,10 +175,10 @@ LY_DEFINE (ly_output_description, "ly:output-description",
   SCM al = ly_module2alist (id->scope_);
 
   SCM ell = SCM_EOL;
-  for (SCM s = al; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = al; scm_is_pair (s); s = scm_cdr (s))
     {
-      Context_def * td = unsmob_context_def (ly_cdar (s));
-      SCM key = ly_caar (s);
+      Context_def * td = unsmob_context_def (scm_cdar (s));
+      SCM key = scm_caar (s);
       if (td && key == td->get_context_name ())
        ell = scm_cons (scm_cons (key, td->to_alist ()),  ell);
     }
@@ -192,7 +186,7 @@ LY_DEFINE (ly_output_description, "ly:output-description",
 }
   
 /* FIXME.  This is broken until we have a generic way of
-   putting lists inside the \paper block.  */
+   putting lists inside the \layout block.  */
 Interval
 line_dimensions_int (Output_def *def, int n)
 {
@@ -201,19 +195,19 @@ line_dimensions_int (Output_def *def, int n)
   return Interval (ind, lw);
 }
 
-LY_DEFINE (ly_paper_def_p, "ly:paper-def?",
+LY_DEFINE (ly_layout_def_p, "ly:layout-def?",
           1, 0, 0, (SCM def),
-          "Is @var{def} a paper definition?")
+          "Is @var{def} a layout definition?")
 {
   return ly_bool2scm (unsmob_output_def (def));
 }
 
-LY_DEFINE (ly_bookpaper_outputscale, "ly:bookpaper-outputscale",
+LY_DEFINE (ly_paper_outputscale, "ly:paper-outputscale",
          1, 0, 0, (SCM bp),
          "Get outputscale for BP.")
 {
   Output_def *b = unsmob_output_def (bp);
-  SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "bookpaper");
+  SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "paper");
   return scm_make_real (output_scale (b));
 }