]> git.donarmstrong.com Git - lilypond.git/commitdiff
(LY_DEFINE): ly:output-formats. New function.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 10 Jun 2004 22:44:53 +0000 (22:44 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 10 Jun 2004 22:44:53 +0000 (22:44 +0000)
ChangeLog
lily/paper-book.cc
scm/lily.scm
scm/output-gnome.scm

index c7fd8b9e595cb6bf8aaa17fe191094b1fdea41b2..5dc5d533c119466fa48458fad8aba73ee9247909 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-06-11  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+       * lily/paper-book.cc (LY_DEFINE): ly:output-formats. New function.
+
 2004-06-10  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * scm/output-gnome.scm: Add font scaling.  Attempt to resurrect
index 9683445fffd2fb028581b4cfdef21d59eea16b69..5c1b9cfb6a46023fa1969c5c9ea39a591a7aaef9 100644 (file)
@@ -111,6 +111,24 @@ dump_fields ()
   return fields;
 }
 
+LY_DEFINE(ly_output_formats, "ly:output-formats",
+         0, 0, 0, (),
+         "Formats passed to --format as a list of strings, "
+         "used for the output.")
+{
+  Array<String> output_formats = split_string (output_format_global, ',');
+
+  SCM l = SCM_EOL;
+  for (int i = 0; i < output_formats.size (); i ++)
+    {
+      l = scm_cons (scm_makfrom0str  (output_formats[i].to_str0 ()), l); 
+    }
+
+  return l; 
+}
+         
+
+
 /*
   TODO: there is too much code dup, and the interface is not
   clear. FIXME.
@@ -124,14 +142,14 @@ Paper_book::output (String outname)
   /* Generate all stencils to trigger font loads.  */
   pages ();
 
-  Array<String> output_formats = split_string (output_format_global, ',');
-
-  for (int i = 0; i < output_formats.size (); i++)
+  
+  SCM formats = ly_output_formats();
+  for (SCM s = formats; ly_c_pair_p (s); s = ly_cdr (s)) 
     {
-      String format = output_formats[i];
-      Paper_outputter *out = get_paper_outputter (outname + "." + output_formats[i], format);
       
+      String format = ly_scm2string (ly_car (s));
       
+      Paper_outputter *out = get_paper_outputter (outname + "." + format, format);
 
   
       SCM scopes = SCM_EOL;
index 5441024e2374ef26de0b14f656c7b470eb76353e..302bb819e0438581ed5c6f40838a5e371606a3d8 100644 (file)
@@ -369,10 +369,7 @@ L1 is copied, L2 not.
   (not (= l r)))
 
 (define-public (ly:load x)
-  (let* (
-        (fn (%search-load-path x))
-
-        )
+  (let* ((fn (%search-load-path x)))
     (if (ly:get-option 'verbose)
        (format (current-error-port) "[~A]" fn))
     (primitive-load fn)))
@@ -380,11 +377,17 @@ L1 is copied, L2 not.
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;  output
-(use-modules
- (scm framework-gnome)
- (scm framework-tex)
- (scm framework-ps))
 
+
+;; only load modules necessary.
+(eval
+ (cons use-modules
+       (map (lambda (x)
+             (list 'scm (string->symbol (string-append "framework-" x))))
+           (ly:output-formats)))
+ (current-module))
+       
+   
 (define output-tex-module
   (make-module 1021 (list (resolve-interface '(scm output-tex)))))
 (define output-ps-module
index 83581c9306e9d87164a309a77ebc3df51d2919ce..8f586a442f274058839cc1ff8fc52fa03c69246f 100644 (file)
@@ -70,7 +70,7 @@ cd ../..
 ## 4.  get guile-gnome
 tla register-archive guile-gnome-devel@gnu.org--2004 http://people.debian.org/~rotty/arch/guile-gnome-devel@gnu.org/2004/ || true
 rm -rf guile-gnome
-tla guile-gnome-devel@gnu.org--2004/dists--dev guile-gnome
+tla get guile-gnome-devel@gnu.org--2004/dists--dev guile-gnome
 cd guile-gnome
 tla build-config -r configs/gnu.org/dev
 cd src
@@ -83,6 +83,9 @@ export GUILE_LOAD_PATH=$HOME/usr/pkg/g-wrap/share/guile/site:$GUILE_LOAD_PATH
 export LD_LIBRARY_PATH=$HOME/usr/pkg/g-wrap/lib:$LD_LIBRARY_PATH
 export PKG_CONFIG_PATH=$HOME/usr/pkg/g-wrap/lib/pkgconfig:$PKG_CONFIG_PATH
 
+# cp srfi-34.scm from CVS head ?  --hwn
+
+
 ../src/configure --prefix=$HOME/usr/pkg/guile-gnome
 
 G_WRAP_MODULE_DIR=$HOME/usr/pkg/g-wrap/share/guile/site make install
@@ -91,7 +94,7 @@ G_WRAP_MODULE_DIR=$HOME/usr/pkg/g-wrap/share/guile/site make install
 
 export GUILE_LOAD_PATH=$HOME/usr/pkg/guile-gnome/share/guile:$GUILE_LOAD_PATH
 export LD_LIBRARY_PATH=$HOME/usr/pkg/guile-gnome/lib:$LD_LIBRARY_PATH
-guile -s ../src/libgnoecanvas/examples/canvas.scm
+guile -s ../src/libgnomecanvas/examples/canvas.scm
 
 
 "