Fix compatibility with newer versions of lilypond. master
authorRicardo Wurmus <rekado+lp@elephly.net>
Wed, 25 Jul 2012 11:40:10 +0000 (13:40 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 25 Jul 2012 11:40:10 +0000 (13:40 +0200)
NEWS
ptb2ly.c

diff --git a/NEWS b/NEWS
index f9249f8df696138f7b19f810bea16376eb038889..4725905b41bcaf091082f998b2d1d013e3697d32 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,9 @@ All changes, unless specified otherwise, made by Jelmer Vernooij
   
   * Change license to GPLv3 or later.
 
+  * Fix compatibility with newer versions of lilypond.
+    (Ricardo Wurmus, #187134)
+
 0.5.0:
  * Portability improvements. 
  * Switched VCS to bazaar.
index 19db39afa39a3bd41e0c142ae67b29d4597f5619..05078685bb4b4ace8fd12897e8936c9bee6266b1 100644 (file)
--- a/ptb2ly.c
+++ b/ptb2ly.c
@@ -39,7 +39,7 @@
 
 #include "ptb.h"
 
-#define LILYPOND_VERSION "2.4"
+#define LILYPOND_VERSION "2.4.0"
 
 int warn_unsupported = 0;
 
@@ -498,12 +498,12 @@ int ly_write_book_section(FILE *out, struct ptb_section *s, int section_num)
        int staff_num = 0;
        struct ptb_staff *st = s->staffs;
 
-       fprintf(out, "\\score {  \n");
-       fprintf(out, "\t\\header { \n");
        if (s->description) {
+               fprintf(out, "\t\\header { \n");
                fprintf(out, "\t\tpiece = \"%c: %s\"\n", s->letter, s->description);
+               fprintf(out, "\t}\n");
        }
-       fprintf(out, "\t} << \n");
+       fprintf(out, "\\score { << \n");
        fprintf(out, "\t\\context ChordNames {\n");
        ly_write_chords(out, s, section_num);
        fprintf(out, "\t}\n");