]> git.donarmstrong.com Git - lilypond.git/commitdiff
(LY_DEFINE): ly_kpathsea_expand_variable. New
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 6 Oct 2004 23:16:02 +0000 (23:16 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 6 Oct 2004 23:16:02 +0000 (23:16 +0000)
function.

ChangeLog
lily/kpath.cc
scm/documentation-generate.scm
scm/lily.scm

index d49f3e4aae52cbff1b4f54dca7b640ed67833d6f..1259cccbdb4322f5d05a39497d1103cf2e62d0a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
+2004-10-07  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * lily/kpath.cc (LY_DEFINE): ly_kpathsea_expand_variable. New
+       function.
+
 2004-10-05  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
-       * scm/framework-tex.scm (convert-to-dvi): set extra_mem_top
+       * scm/framework-tex.scm (convert-to-dvi): set extra_mem_top to 1M.
  
 2004-10-04  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
index 1a4886f72d4fc4aaf0dad742d9ae8d848f7c3ddb..7ae43ce3543a4550839c7edc92ec5ea75c65172e 100644 (file)
@@ -171,6 +171,21 @@ LY_DEFINE (ly_kpathsea_expand_path, "ly:kpathsea-expand-path",
 }
 
 
+LY_DEFINE (ly_kpathsea_expand_variable, "ly:kpathsea-expand-variable",
+          1, 0, 0, (SCM var),
+          "Return the expanded version  @var{var}.")
+{
+  SCM_ASSERT_TYPE (scm_is_string (var), var, SCM_ARG1, __FUNCTION__, "string");
+
+  String nm = ly_scm2string (var);
+  char *result =  kpse_var_expand (nm.to_str0 ());
+  SCM ret =  scm_makfrom0str (result);
+  delete[] result;
+
+  return ret;
+}
+
+
 void
 initialize_kpathsea (char *av0)
 {
index cedaf590958bef7cfe03a6705c90b5284fbccdae..537579f2f8f47932e137a8b400c26493211fd547 100644 (file)
@@ -9,9 +9,7 @@
 
 ;;; Running LilyPond on this file generates the documentation
 
-(debug-enable 'debug)
-(debug-enable 'backtrace)
-(read-enable 'positions)
+;(set-debug-cell-accesses! 5000)
 
 ;;;;;;;;;;;;;;;;
 ;;;;;;;;;;;;;;;; TODO : make modules of these!
 
 ; todo: naming: grob vs. layout property
 
-(define load-files '("documentation-lib.scm"
-                    "document-functions.scm"
-                    "document-translation.scm"
-                    "document-music.scm"
-                    "document-backend.scm"
-                    "document-markup.scm"
-                    ))
-(map ly:load load-files)
+(map ly:load '("documentation-lib.scm"
+              "document-functions.scm"
+              "document-translation.scm"
+              "document-music.scm"
+              "document-backend.scm"
+              "document-markup.scm"
+              ))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
index 44772347242cd4cf86479fe689279bfe0bced6b4..9f173777a0e83c72d8bd6eae1fa14348671adbb6 100644 (file)
@@ -613,3 +613,4 @@ possibly turned off."
          (newline (current-error-port))
          (exit 1))
        (exit 0))))
+