Better initial spacing - abc2ps - A powerful sheet setting tool using the simple abc notation
(HTM) git clone git://vernunftzentrum.de/abc2ps.git
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit ec7e1a76805ec02ff8a14560e5e933642e596656
(DIR) parent e001f5fca1f9a03e591362b7edb803aaa228b0b3
(HTM) Author: Christian Kellermann <ckeen@pestilenz.org>
Date: Tue, 17 Apr 2018 21:55:22 +0200
Better initial spacing
Diffstat:
music.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/music.h b/music.h
@@ -1227,7 +1227,7 @@ void set_spaces ()
}
i=xp[XP_START].next;
- j=0;
+ j=-1;
typl=0;
for (;;) {
nxt=xp[i].next;
@@ -1255,12 +1255,12 @@ void set_spaces ()
w1 = lbnp*nwid(xp[i].dur);
w0 = lbnp*nwid(vbnp);
if (w0>w1) w0=w1;
- xp[i].space = bbnp*w1 + (1-bbnp)*w0 + xp[j].wr;
+ xp[i].space = bbnp*w1 + (1-bbnp)*w0 + (j>=0 ? xp[j].wr : 0);
if (xp[i].space<14.0) xp[i].space=14.0;
w1 = lbnx*xwid(xp[i].dur);
w0 = lbnx*xwid(vbnp);
if (w0>w1) w0=w1;
- xp[i].stretch = bbnx*w1 + (1-bbnx)*w0 + xp[j].wr;
+ xp[i].stretch = bbnx*w1 + (1-bbnx)*w0 + (j>=0 ? xp[j].wr : 0);
if (xp[i].stretch<18.0) xp[i].stretch=18.0;
if (xp[i].shrink<12.0) xp[i].shrink=12.0;
}