Some minor fixes.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 26 Jun 2005 18:18:07 +0000 (19:18 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 26 Jun 2005 18:18:07 +0000 (19:18 +0100)
ptb2abc.c
ptb2ly.c

index 6f20692876bbeb93d0e98f1e63505a612bd85cb7..c14c09e2ee7e87922f0b23b2692d5437d12d4622 100644 (file)
--- a/ptb2abc.c
+++ b/ptb2abc.c
@@ -86,6 +86,8 @@ void abc_write_staff(FILE *out, struct ptb_guitar *gtr, struct ptb_staff *staff)
        for (ps = staff->positions[0]; ps; ps = ps->next) {
                abc_write_position(out, gtr, ps);
        }
+
+       fprintf(out, "\n");
 }
 
 void abc_write_section(FILE *out, struct ptb_guitar *gtr, struct ptb_section *sec)
index 94c05e3c47486e8839d208223e4e766ff03829fd..724f60b20ac70e4c91650464b5d47005060fe6c7 100644 (file)
--- a/ptb2ly.c
+++ b/ptb2ly.c
@@ -226,20 +226,15 @@ void ly_write_position(FILE *out, struct ptb_guitar *gtr, struct ptb_position *p
        if((pos->linedatas && pos->linedatas->next) || print_length) fprintf(out, " <");
 
        for (d = pos->linedatas; d; d = d->next) {
-               int note;
                int i;
                int octave;
 
-#define DEFAULT_OCTAVE 4
-               
-               note = gtr->strings[d->detailed.string] + d->detailed.fret;
-
                octave = ptb_get_octave(gtr, d->detailed.string, d->detailed.fret);
                
                fprintf(out, "%s", note_names[ptb_get_step(gtr, d->detailed.string, d->detailed.fret)]);
 
-               for(i = octave; i < DEFAULT_OCTAVE; i++) fprintf(out, ",");
-               for(i = DEFAULT_OCTAVE; i < octave; i++) fprintf(out, "'");
+               for(i = octave; i < 4; i++) fprintf(out, ",");
+               for(i = 4; i < octave; i++) fprintf(out, "'");
 
                if(pos->palm_mute & POSITION_STACCATO) 
                        fprintf(out, "-.");