]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/context-scheme.cc
fix footer position in generated html files
[lilypond.git] / lily / context-scheme.cc
index 3ea9718f53769f18467a18e5a18a4a4028aa592e..51b49b7d8fe606d5107af20fd5850331fa98e2af 100644 (file)
@@ -3,8 +3,8 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1998--2005 Jan Nieuwenhuizen <janneke@gnu.org>
-  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1998--2006 Jan Nieuwenhuizen <janneke@gnu.org>
+  Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "context.hh"
@@ -19,7 +19,7 @@ LY_DEFINE (ly_context_id, "ly:context-id",
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
 
-  return scm_makfrom0str (tr->id_string ().to_str0 ());
+  return scm_makfrom0str (tr->id_string ().c_str ());
 }
 
 LY_DEFINE (ly_context_name, "ly:context-name",
@@ -30,7 +30,7 @@ LY_DEFINE (ly_context_name, "ly:context-name",
 {
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
-  return ly_symbol2scm (tr->context_name ().to_str0 ());
+  return ly_symbol2scm (tr->context_name ().c_str ());
 }
 
 LY_DEFINE (ly_context_grob_definition, "ly:context-grob-definition",
@@ -97,7 +97,8 @@ LY_DEFINE (ly_context_property_where_defined, "ly:context-property-where-defined
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
   SCM_ASSERT_TYPE (scm_is_symbol (name), name, SCM_ARG2, __FUNCTION__, "symbol");
 
-  tr = tr->where_defined (name);
+  SCM val;
+  tr = tr->where_defined (name, &val);
   if (tr)
     return tr->self_scm ();
 
@@ -150,3 +151,11 @@ LY_DEFINE (ly_context_find, "ly:context-find",
   return SCM_BOOL_F;
 }
 
+LY_DEFINE (ly_context_now, "ly:context-now",
+          1, 0, 0, (SCM context),
+          "Return now-moment of context CONTEXT")
+{
+  Context *ctx = unsmob_context (context);
+  SCM_ASSERT_TYPE (ctx, context, SCM_ARG1, __FUNCTION__, "Context");
+  return ctx->now_mom ().smobbed_copy ();
+}