]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/general-scheme.cc
Typos.
[lilypond.git] / lily / general-scheme.cc
index 816dfeee0abad2220c5e30bf1e6597b2bb23f9bc..f00d1938ab56746bc948f2cdc6ddb2f1172f55e5 100644 (file)
@@ -27,6 +27,24 @@ using namespace std;
 #include "file-name.hh"
 #include "string-convert.hh"
 
+LY_DEFINE (ly_start_environment, "ly:start-environment",
+          0, 0, 0, (),
+          "Return the environment, a list of strings, that was in effect at program start")
+{
+  SCM l = SCM_EOL;
+  SCM *tail = &l;
+
+  for (vsize i = 0; i < start_environment_global.size (); i++)
+    {
+      *tail = scm_cons (ly_string2scm (start_environment_global[i]),
+                       SCM_EOL);
+      tail = SCM_CDRLOC(*tail);
+    }
+
+  return l;
+}
+
+
 LY_DEFINE (ly_find_file, "ly:find-file",
           1, 0, 0, (SCM name),
           "Return the absolute file name of @var{name}, "
@@ -138,6 +156,8 @@ LY_DEFINE (ly_assoc_get, "ly:assoc-get",
           "Return value if KEY in ALIST, else DEFAULT-VALUE "
           "(or #f if not specified).")
 {
+  LY_ASSERT_TYPE(ly_cheap_is_list, alist, 2);
+  
   SCM handle = scm_assoc (key, alist);
   if (scm_is_pair (handle))
     return scm_cdr (handle);
@@ -150,7 +170,7 @@ LY_DEFINE (ly_assoc_get, "ly:assoc-get",
 
 LY_DEFINE (ly_string_substitute, "ly:string-substitute",
           3, 0, 0, (SCM a, SCM b, SCM s),
-          "Replace @var{a} by @var{b} in @var{s}.")
+          "Replace string @var{a} by string @var{b} in string @var{s}.")
 {
   LY_ASSERT_TYPE (scm_is_string, s, 1);
   LY_ASSERT_TYPE (scm_is_string, b, 2);
@@ -228,13 +248,6 @@ LY_DEFINE (ly_gettext, "ly:gettext",
   return ly_string2scm (_ (scm_i_string_chars (string)));
 }
 
-LY_DEFINE (ly_output_backend, "ly:output-backend",
-          0, 0, 0, (),
-          "Return name of output backend.")
-{
-  return ly_string2scm (output_backend_global);
-}
-
 LY_DEFINE (ly_output_formats, "ly:output-formats",
           0, 0, 0, (),
           "Formats passed to --format as a list of strings, "
@@ -289,7 +302,7 @@ LY_DEFINE (ly_effective_prefix, "ly:effective-prefix",
           0, 0, 0, (),
           "Return effective prefix.")
 {
-  return ly_string2scm (prefix_directory);
+  return ly_string2scm (lilypond_datadir);
 }
 
 LY_DEFINE (ly_chain_assoc_get, "ly:chain-assoc-get",