]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/lily.scm (completize-formats): new function
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 4 Jan 2005 23:28:41 +0000 (23:28 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 4 Jan 2005 23:28:41 +0000 (23:28 +0000)
(postprocess-output): new function

* lily/paper-book.cc (classic_output): change calling
convention. Give basename as first argument.
remove Paper_book::post_processing().

* lily/lily-guile.cc (LY_DEFINE): ly:output-backend, new function.

13 files changed:
ChangeLog
Documentation/user/invoking.itely
input/simple.ly
lily/include/main.hh
lily/include/misc.hh
lily/lily-guile.cc
lily/main.cc
lily/misc.cc
lily/paper-book.cc
lily/paper-outputter.cc
scm/framework-ps.scm
scm/framework-tex.scm
scm/lily.scm

index 4d7e7aebef9b790080739cbdb05c6e2c70e9742c..2c46f452246df7577465fc70750a6b569ed446e2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
+2005-01-05  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * scm/lily.scm (completize-formats): new function
+       (postprocess-output): new function
+
+       * lily/paper-book.cc (classic_output): change calling
+       convention. Give basename as first argument. 
+       remove Paper_book::post_processing().
+
+       * lily/lily-guile.cc (LY_DEFINE): ly:output-backend, new function.
+
 2005-01-04  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * lily/paper-outputter.cc (LY_DEFINE): new function
+       ly:outputter-close.
+
        * lily/main.cc: change --format,-f to --backend,-b
 
        * lily/include/main.hh: rename format to backend.
index 1fdeee0ff3521097cc7ac0631fcd7112dff2fb5c..adfd8ca366e4423472c724b06451aae78a0ac8bf 100644 (file)
@@ -55,8 +55,11 @@ sequentially.  The function @code{ly:set-option} allows access to
 some internal variables.  Use @code{-e '(ly:option-usage)'} for more
 information.
 
-
 @item -f,--format=@var{format}
+which formats should be written. Choices are @code{svg}, @code{ps},
+@code{pdf}, @code{png}, @code{tex}, @code{dvi}.
+
+@item -b,--backend=@var{format}
 the output format to use for the back-end.  Choices are
 @table @code
 @item tex
index 0663d906cf7ceb201fc27f2f19ebf5274ad5eb0b..835aaed41a872c588a5cbe2e9f0cdd12cd60d22d 100644 (file)
@@ -1,6 +1,6 @@
 %% A simple piece in LilyPond, a scale.
 \relative {
-    c' d e f g a b c
+    c d e f g a b c
 }
 
 %% Optional helper for automatic updating by convert-ly.  May be omitted.
index 3ff399afc5b915ead7fd2ffc322c92f5c9618189..902cccc0c2ee06fb49540e477c8bbb193ae9a291 100644 (file)
@@ -43,6 +43,8 @@ extern bool make_dvi;
 extern bool make_ps;
 extern bool make_pdf;
 extern bool make_tex;
+extern String output_format_global;
+
 extern bool make_preview;
 extern bool make_pages;
 
index 754379d477a19edd99772b4893c51bd0fa7191b7..72da2c90e969341fd16cdd30fbea94aacd0c0179 100644 (file)
@@ -1,3 +1,12 @@
+/*
+  misc.hh -- declare miscellaneous functions.
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+*/
+
 #ifndef MISC_HH
 #define MISC_HH
 
@@ -19,7 +28,7 @@ sign (int i)
   else return 0;
 }
 
-
+Array<String> split_string (String s, char c);
 
 inline Real
 linear_interpolate (Real x, Real x1, Real x2,  Real y1, Real  y2)
@@ -28,7 +37,5 @@ linear_interpolate (Real x, Real x1, Real x2,  Real y1, Real  y2)
     (x - x1) / (x2 - x1) * y2 ;
 }
 
-
-
 #endif
 
index fa0ad5f8e09dddef10b33c7c62d09cf71c76d28e..524d8e917899ff54489ac5f6aaf9df3f15b8fbb8 100644 (file)
@@ -36,6 +36,7 @@ inline int my_isnan (Real r) { return isnan (r); }
 #include "pitch.hh"
 #include "dimensions.hh"
 #include "source-file.hh"
+#include "misc.hh"
 
 // #define TEST_GC
 
@@ -853,3 +854,28 @@ LY_DEFINE (ly_gettext, "ly:gettext",
   return scm_makfrom0str (gettext (scm_i_string_chars (string)));
 }
 
+
+
+
+LY_DEFINE (ly_output_backend, "ly:output-backend",
+           0, 0, 0, (),
+           "Return name of output backend.")
+{
+  return scm_makfrom0str (output_backend_global.to_str0 ());
+}
+
+
+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 lst = SCM_EOL;
+  int output_formats_count = output_formats.size ();
+  for (int i = 0; i < output_formats_count; i ++)
+    lst = scm_cons (scm_makfrom0str (output_formats[i].to_str0 ()), lst);
+
+  return lst;
+}
index ba9c0bc9509ff31b73a68a863c40b896ef688649..b2a55d1ae8df5cb7ba28fc9ae2754d7be293950c 100644 (file)
@@ -47,6 +47,7 @@ bool no_layout_global_b = false;
    One of tex, ps, scm, as.
 */
 String output_backend_global = "ps";
+String output_format_global = "pdf";
 
 /* Current output name. */
 String output_name_global;
@@ -62,13 +63,9 @@ bool verbose_global_b = false;
 */
 String init_scheme_code_string = "(begin #t ";
 
-bool make_pdf = false;
-bool make_dvi = false;
-bool make_ps = false;
-bool make_png = false;
 bool make_preview = false;
 bool make_pages = true;
-bool make_tex = false;
+
 
 /*
  * Miscellaneous global stuff.
@@ -128,6 +125,7 @@ static Long_option_init options_static[] =
     /* Bug in option parser: --output =foe is taken as an abbreviation
        for --output-format.  */
     {_i ("EXT"), "backend", 'b', _i ("select back-end to use")},
+    {_i ("EXTs"), "format", 'f', _i ("list of formats to dump")},
     {0, "help", 'h',  _i ("print this help")},
     {_i ("FIELD"), "header", 'H',  _i ("write header field to BASENAME.FIELD")},
     {_i ("DIR"), "include", 'I',  _i ("add DIR to search path")},
@@ -251,44 +249,6 @@ prepend_load_path (String dir)
   scm_c_eval_string (s.to_str0 ());
 }
 
-static void
-determine_output_options ()
-{
-  bool found_gnome = (output_backend_global == "gnome");
-  bool found_svg = (output_backend_global == "svg");
-  bool found_tex = (output_backend_global == "tex");
-
-
-  if (make_pdf || make_png)
-    {
-      make_ps = true;
-    }
-  if (make_ps && found_tex)
-    {
-      make_dvi = true;
-    }
-  if (make_dvi && found_tex)
-    {
-      make_tex = true;
-    }
-  if (!found_gnome
-      && !found_svg
-      && !(make_dvi
-          || make_tex
-          || make_ps
-          || make_png
-          || make_pdf))
-    {
-      make_pdf = true;
-      make_ps = true;
-      if (found_tex)
-       {
-         make_dvi = true;
-         make_tex = true;
-       }
-    }
-}
-
 void init_global_tweak_registry ();
 
 static void
@@ -310,7 +270,6 @@ main_with_guile (void *, int, char **)
   call_constructors ();
   init_global_tweak_registry ();
   init_freetype ();
-  determine_output_options ();  
   all_fonts_global = new All_font_metrics (global_path.to_string ());
 
   init_scheme_code_string += ")";
@@ -409,15 +368,14 @@ parse_argv (int argc, char **argv)
          warranty ();
          exit (0);
          break;
-       case 'f':
-         if (option_parser->optional_argument_str0_ == "help")
-           {
-             printf (_ ("This option is for developers only.").to_str0 ());
-             printf (_ ("Read the sources for more information.").to_str0 ());
-             exit (0);
-           }
+       case 'b':
          output_backend_global = option_parser->optional_argument_str0_;
          break;
+
+       case 'f':
+         output_format_global = option_parser->optional_argument_str0_;
+         break;
+         
        case 'H':
          dump_header_fieldnames_global
            .push (option_parser->optional_argument_str0_);
index 649f72c900d98904cbc94b1b4c80a49e21273472..8a1a3e94ca5b627df1f500e54f64eaccdd708e07 100644 (file)
@@ -7,9 +7,11 @@
     Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
+#include <math.h>
+
 #include "misc.hh"
+#include "string.hh"
 
-#include <math.h>
 
 /*
   Return the 2-log, rounded down 
@@ -35,4 +37,26 @@ log_2 (double x)
   return log (x)  /log (2.0);
 }
 
+Array<String>
+split_string (String s, char c)
+{
+  Array<String> rv; 
+  while (s.length ())
+    {
+      int i = s.index (c);
+      
+      if (i == 0)
+       {
+         s = s.nomid_string (0, 1);
+         continue;
+       }
+      
+      if (i < 0)
+       i = s.length () ;
+
+      rv.push (s.cut_string (0, i));
+      s = s.nomid_string (0, i);
+    }
+
+  return rv;
+}
index 353d28572c35a40115abbf75e0f929cc7fcbec64..e6d63aa0cb41e2681cea94be0f74a60a3cd6559e 100644 (file)
@@ -63,30 +63,6 @@ Paper_book::print_smob (SCM smob, SCM port, scm_print_state*)
   return 1;
 }
 
-Array<String>
-split_string (String s, char c)
-{
-  Array<String> rv; 
-  while (s.length ())
-    {
-      int i = s.index (c);
-      
-      if (i == 0)
-       {
-         s = s.nomid_string (0, 1);
-         continue;
-       }
-      
-      if (i < 0)
-       i = s.length () ;
-
-      rv.push (s.cut_string (0, i));
-      s = s.nomid_string (0, i);
-    }
-
-  return rv;
-}
-
 SCM
 dump_fields ()
 {
@@ -98,38 +74,6 @@ dump_fields ()
   return fields;
 }
 
-void
-Paper_book::post_processing (SCM module,
-                            SCM file_name)
-{
-  struct
-  {
-    bool do_it_;
-    char const *func_name_;
-  } settings[] = {
-    {make_tex, "convert-to-tex"},
-    {make_dvi, "convert-to-dvi"},
-    {make_ps, "convert-to-ps"},
-    {make_pdf, "convert-to-pdf"},
-    {make_png, "convert-to-png"},
-    {0, 0},
-  };
-
-  for (int i = 0; settings[i].func_name_; i++)
-    {
-      if (settings[i].do_it_)
-       {
-         SCM func = scm_c_module_lookup (module, settings[i].func_name_);
-         if (scm_variable_p (func) == SCM_BOOL_T)
-           {
-             func = scm_variable_ref (func);
-             if (ly_c_procedure_p (func))
-               scm_call_2 (func, self_scm (), file_name);
-           }
-       }
-    }
-}
-
 void
 Paper_book::output (String outname)
 {
@@ -139,19 +83,11 @@ Paper_book::output (String outname)
   /* Generate all stencils to trigger font loads.  */
   pages ();
   
-  String format = output_backend_global;
-  String file_name = outname;
-      
-  if (file_name != "-")
-    file_name += "." + format;
-      
-  Paper_outputter *out = get_paper_outputter (file_name, format);
-  
   SCM scopes = SCM_EOL;
   if (ly_c_module_p (header_))
     scopes = scm_cons (header_, scopes);
   
-  String mod_nm = "scm framework-" + format;
+  String mod_nm = "scm framework-" + output_backend_global;
 
   SCM mod = scm_c_resolve_module (mod_nm.to_str0 ());
   if (make_pages)
@@ -159,35 +95,22 @@ Paper_book::output (String outname)
       SCM func = scm_c_module_lookup (mod, "output-framework");
 
       func = scm_variable_ref (func);
-      scm_apply_0 (func, scm_list_n (out->self_scm (),
+      scm_apply_0 (func, scm_list_n (scm_makfrom0str (outname.to_str0 ()),
                                     self_scm (),
                                     scopes,
                                     dump_fields (),
-                                    scm_makfrom0str (outname.to_str0 ()),
                                     SCM_UNDEFINED));
-      out->close ();
-      scm_gc_unprotect_object (out->self_scm ());
-      post_processing (mod, scm_makfrom0str (file_name.to_str0 ()));
     }
       
   if (make_preview)
     {
-      String file_name = outname + ".preview." + format;
-      Paper_outputter *out = get_paper_outputter (file_name, format);
-  
       SCM func = scm_c_module_lookup (mod, "output-preview-framework");
       func = scm_variable_ref (func);
-      scm_apply_0 (func, scm_list_n (out->self_scm (),
+      scm_apply_0 (func, scm_list_n (scm_makfrom0str (outname.to_str0 ()),
                                     self_scm (),
                                     scopes,
                                     dump_fields (),
-                                    scm_makfrom0str (outname.to_str0 ()),
                                     SCM_UNDEFINED));
-
-      out->close ();
-      scm_gc_unprotect_object (out->self_scm ());
-
-      post_processing (mod, scm_makfrom0str (file_name.to_str0 ()));
     }
   progress_indication ("\n");
 }
@@ -215,15 +138,12 @@ Paper_book::classic_output (String outname)
 
   func = scm_variable_ref (func);
       
-  Paper_outputter *out = get_paper_outputter (outname + "." + format,
-                                             format);
-
-  scm_apply_0 (func, scm_list_n (out->self_scm (), self_scm (), scopes,
+  scm_apply_0 (func, scm_list_n (scm_makfrom0str (outname.to_str0 ()),
+                                self_scm (),
+                                scopes,
                                 dump_fields (),
-                                scm_makfrom0str (outname.to_str0 ()),
                                 SCM_UNDEFINED));
 
-  scm_gc_unprotect_object (out->self_scm ());
   progress_indication ("\n");
 }
 
index 72135b91389ca4cddd41892198861df5bff93b26..74b2a5b2d05faf053b259f30d789d5e8cad6ad71 100644 (file)
@@ -107,13 +107,28 @@ Paper_outputter::output_stencil (Stencil stil)
                                 (void*) this, Offset (0,0));
 }
 
-Paper_outputter *
-get_paper_outputter (String outname, String f) 
+LY_DEFINE (ly_make_paper_outputter, "ly:make-paper-outputter",
+          2, 0, 0, (SCM outname, SCM format),
+          "Create an outputter that evaluates within "
+          "@code{output-}@var{format}, writing to file @var{outname}.")
 {
+  SCM_ASSERT_TYPE(scm_is_string (outname), outname, SCM_ARG1, __FUNCTION__,
+                 "String");
+  SCM_ASSERT_TYPE(scm_is_string (format), format, SCM_ARG2, __FUNCTION__,
+                 "String");
+  
+  String outname_str = ly_scm2string (outname);
+  String f = ly_scm2string (format);
+
   progress_indication (_f ("Layout output to `%s'...",
-                          outname == "-" ? String ("<stdout>") : outname));
+                          outname_str == "-"
+                          ? String ("<stdout>")
+                          : outname_str));
   progress_indication ("\n");
-  return new Paper_outputter (outname, f);
+  Paper_outputter *po = new Paper_outputter (outname_str, f);
+
+  scm_gc_unprotect_object (po->self_scm ());
+  return po->self_scm ();
 }
 
 /* FIXME: why is output_* wrapper called dump?  */
@@ -140,6 +155,18 @@ LY_DEFINE (ly_outputter_dump_string, "ly:outputter-dump-string",
   return po->dump_string (str);
 }
 
+
+LY_DEFINE (ly_outputter_close, "ly:outputter-close",
+          1, 0, 0, (SCM outputter),
+          "Close port of @var{outputter}.")
+{
+  Paper_outputter *po = unsmob_outputter (outputter);
+  SCM_ASSERT_TYPE (po, outputter, SCM_ARG1, __FUNCTION__, "Paper_outputter");
+
+  po->close ();
+  return SCM_UNSPECIFIED;
+}
+
 void
 Paper_outputter::close ()
 {
index b34175b76e5e20799464d9079e565f436365a32c..5daf3e8343b4a022f12c2edb698a09da9b849145 100644 (file)
@@ -14,6 +14,8 @@
             (srfi srfi-13)
             (lily))
 
+(define framework-ps-module (current-module))
+
 (define (stderr string . rest)
   (apply format (cons (current-error-port) (cons string rest)))
   (force-output (current-error-port)))
    (load-fonts paper)
    (define-fonts paper)))
 
-(define-public (output-framework outputter book scopes fields basename)
-  (let* ((paper (ly:paper-book-paper book))
+
+  
+
+(define-public (output-framework basename book scopes fields )
+  (let* ((filename (format "~a.ps" basename))
+        (outputter  (ly:make-paper-outputter filename
+                                             (ly:output-backend)))
+        (paper (ly:paper-book-paper book))
         (pages (ly:paper-book-pages book))
         (landscape? (eq? (ly:output-def-lookup paper 'landscape) #t))
         (page-number (1- (ly:output-def-lookup paper 'firstpagenumber)))
         (page-count (length pages)))
-    
+
     (for-each
      (lambda (x)
        (ly:outputter-dump-string outputter x))
        (dump-page outputter page page-number page-count landscape?))
      pages)
     
-    (ly:outputter-dump-string outputter "%%Trailer\n%%EOF\n")))
-
-(define-public (output-preview-framework outputter book scopes fields basename)
-  (let* ((paper (ly:paper-book-paper book))
+    (ly:outputter-dump-string outputter "%%Trailer\n%%EOF\n")
+        (ly:outputter-close outputter)
+    (postprocess-output book framework-ps-module filename (ly:output-formats)) 
+))
+
+(define-public (output-preview-framework basename book scopes fields )
+  (let* ((filename (format "~a.ps" basename))
+        (outputter  (ly:make-paper-outputter filename
+                                             (ly:output-backend)))
+        (paper (ly:paper-book-paper book))
         (systems (ly:paper-book-systems book))
         (scale  (ly:output-def-lookup paper 'outputscale ))
         (titles (take-while ly:paper-system-title? systems))
                                             "\n"))
 
     (ly:outputter-dump-stencil outputter dump-me)
-    (ly:outputter-dump-string outputter "} stop-system\n%%Trailer\n%%EOF\n")))
+    (ly:outputter-dump-string outputter "} stop-system\n%%Trailer\n%%EOF\n")
+        (ly:outputter-close outputter)
+    (postprocess-output book framework-ps-module filename
+                       (ly:output-formats)) 
+))
+
+
+(define-public (output-classic-framework
+               basename book scopes fields)
+  (let* ((paper (ly:paper-book-paper book))
+        (lines (ly:paper-book-systems book))
+        (last-line (car (last-pair lines))))
+    (for-each
+     (lambda (x)
+       (ly:outputter-dump-string outputter x))
+     (list
+      ;;FIXME
+      (header paper (length lines) #f)
+      "\\def\\lilypondclassic{1}%\n"
+      (output-scopes scopes fields basename)
+      (define-fonts paper)
+      (header-end)))
+
+    (for-each
+     (lambda (line) (dump-line outputter line (eq? line last-line))) lines)
+    (ly:outputter-dump-string outputter "\\lilypondend\n")
+    (ly:outputter-close outputter)
+    (postprocess-output book framework-ps-module filename (ly:output-formats)) 
+    ))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define-public (convert-to-pdf book name)
   (let* ((defs (ly:paper-book-paper book))
index cc1b4eaa3b9455b0cc028eee5951f987597a57a4..4a2a0b61935f903c0bffd33e22392d20ad619f57 100644 (file)
             (srfi srfi-13)
             (lily))
 
+(define (output-formats)
+  (define formats (ly:output-formats))
+  (set! formats (completize-formats formats))
+  (if (member "ps" formats)
+      (set! formats (cons "dvi" formats))) 
+  (if (member "dvi" formats)
+      (set! formats (cons "tex" formats)))
+
+  formats)
+
+(define framework-tex-module (current-module))
 (define-public (sanitize-tex-string s)
   (if (ly:get-option 'safe)
       (regexp-substitute/global
        "}%\n\\vfill\n"
        "}%\n\\vfill\n\\lilypondpagebreak\n")))
 
-(define-public (output-framework outputter book scopes fields basename )
-  (let* ((paper (ly:paper-book-paper book))
+(define-public (output-framework basename book scopes fields)
+  (let* ((filename (format "~a.tex" basename))
+        (outputter  (ly:make-paper-outputter filename "tex"))
+        (paper (ly:paper-book-paper book))
         (pages (ly:paper-book-pages book))
         (last-page (car (last-pair pages)))
         (with-extents
      (lambda (page)
        (dump-page outputter page (eq? last-page page) with-extents))
      pages)
-    (ly:outputter-dump-string outputter "\\lilypondend\n")))
+    (ly:outputter-dump-string outputter "\\lilypondend\n")
+    (ly:outputter-close outputter)
+    (postprocess-output book framework-tex-module filename
+                       (output-formats))))
 
 (define (dump-line putter line last?)
   (ly:outputter-dump-string
        "}\\interscoreline\n")))
 
 (define-public (output-classic-framework
-               outputter book scopes fields basename)
-  (let* ((paper (ly:paper-book-paper book))
+               basename book scopes fields)
+  (let* ((filename (format "~a.tex" basename))
+        (outputter  (ly:make-paper-outputter filename "tex"))
+        (paper (ly:paper-book-paper book))
         (lines (ly:paper-book-systems book))
         (last-line (car (last-pair lines))))
     (for-each
 
     (for-each
      (lambda (line) (dump-line outputter line (eq? line last-line))) lines)
-    (ly:outputter-dump-string outputter "\\lilypondend\n")))
+    (ly:outputter-dump-string outputter "\\lilypondend\n")
+    (ly:outputter-close outputter)
+    (postprocess-output book framework-tex-module filename
+                       (output-formats))
+    ))
 
 (define-public (output-preview-framework
-               outputter book scopes fields basename )
-  (let* ((paper (ly:paper-book-paper book))
+               basename book scopes fields)
+  (let* ((filename (format "~a.tex" basename))
+        (outputter  (ly:make-paper-outputter filename
+                                             "tex"))
+        (paper (ly:paper-book-paper book))
         (lines (ly:paper-book-systems book))
         (first-notes-index (list-index
                             (lambda (s) (not (ly:paper-system-title? s)))
      (lambda (lst)
        (dump-line outputter lst (not (ly:paper-system-title? lst))))
      (take lines (1+ first-notes-index)))
-    (ly:outputter-dump-string outputter "\\lilypondend\n")))
+    (ly:outputter-dump-string outputter "\\lilypondend\n")
+    (ly:outputter-close outputter)
+    (postprocess-output book framework-tex-module filename
+                       (output-formats))
+
+))
 
 (define-public (convert-to-pdf book name)
   (let* ((defs (ly:paper-book-paper book))
index c5fda582e25e9e7f0e6b1f0a74687fabb6cd2625..4f621724d5a3ef113d0c173834e31664d4ff9767 100644 (file)
@@ -269,6 +269,7 @@ predicates. Print a message at LOCATION if any predicate failed."
 
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
+;; backend helpers.
 
 (define-public (ly:system command)
   (let* ((status 0)
@@ -321,6 +322,23 @@ predicates. Print a message at LOCATION if any predicate failed."
              name)))
     (ly:system cmd)))
 
+(define-public (postprocess-output paper-book module filename formats)
+  (for-each (lambda (f)
+             ((eval (string->symbol (string-append "convert-to-" f))
+                    module)
+              paper-book filename))
+             
+           formats))
+
+(define-public (completize-formats formats)
+  (if (member "png" formats)
+      (set! formats (cons "ps" formats)))
+  (if (member "pdf" formats)
+      (set! formats (cons "ps" formats)))
+
+  formats)
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
 (define-public (lilypond-main files)
   "Entry point for LilyPond."
   (let* ((failed '())