From c730a0aab8ce3fd1785b5815122e061534e53d1c Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 6 Oct 2004 23:16:02 +0000 Subject: [PATCH] (LY_DEFINE): ly_kpathsea_expand_variable. New function. --- ChangeLog | 7 ++++++- lily/kpath.cc | 15 +++++++++++++++ scm/documentation-generate.scm | 19 ++++++++----------- scm/lily.scm | 1 + 4 files changed, 30 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index d49f3e4aae..1259cccbdb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ +2004-10-07 Han-Wen Nienhuys + + * lily/kpath.cc (LY_DEFINE): ly_kpathsea_expand_variable. New + function. + 2004-10-05 Han-Wen Nienhuys - * 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 diff --git a/lily/kpath.cc b/lily/kpath.cc index 1a4886f72d..7ae43ce354 100644 --- a/lily/kpath.cc +++ b/lily/kpath.cc @@ -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) { diff --git a/scm/documentation-generate.scm b/scm/documentation-generate.scm index cedaf59095..537579f2f8 100644 --- a/scm/documentation-generate.scm +++ b/scm/documentation-generate.scm @@ -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! @@ -19,14 +17,13 @@ ; 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" + )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/scm/lily.scm b/scm/lily.scm index 4477234724..9f173777a0 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -613,3 +613,4 @@ possibly turned off." (newline (current-error-port)) (exit 1)) (exit 0)))) + -- 2.39.5