Dear maintainer,

New upstream version 8.14.7 includes Helmut's fix for #946572.
Please update the package, or allow the attached trivial NMU.

Thanks.
diff -Nru abcm2ps-8.14.6/abcm2ps.h abcm2ps-8.14.7/abcm2ps.h
--- abcm2ps-8.14.6/abcm2ps.h	2019-11-05 14:02:00.000000000 +0100
+++ abcm2ps-8.14.7/abcm2ps.h	2020-02-19 14:00:51.000000000 +0100
@@ -524,7 +524,7 @@
 	float topspace, wordsspace, titlespace, subtitlespace, partsspace;
 	float composerspace, musicspace, vocalspace, textspace;
 	float breaklimit, maxshrink, lineskipfac, parskipfac, stemheight;
-	float gutter, indent, infospace, slurheight, notespacingfactor, scale;
+	float gutter, indent, infospace, slurheight, tieheight, notespacingfactor, scale;
 	float staffsep, sysstaffsep, maxstaffsep, maxsysstaffsep, stretchlast;
 	int abc2pscompat, alignbars, aligncomposer, autoclef;
 	int barsperstaff, breakoneoln, bstemdown, cancelkey, capo;
diff -Nru abcm2ps-8.14.6/abcparse.c abcm2ps-8.14.7/abcparse.c
--- abcm2ps-8.14.6/abcparse.c	2019-11-05 14:02:00.000000000 +0100
+++ abcm2ps-8.14.7/abcparse.c	2020-02-19 14:00:51.000000000 +0100
@@ -3,7 +3,7 @@
  *
  * This file is part of abcm2ps.
  *
- * Copyright (C) 1998-2019 Jean-François Moine (http://moinejf.free.fr)
+ * Copyright (C) 1998-2020 Jean-François Moine (http://moinejf.free.fr)
  * Adapted from abc2ps, Copyright (C) 1996-1998 Michael Methfessel
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -1794,6 +1794,7 @@
 			int *p_len)
 {
 	int len, fac;
+	int err = 0;
 	char *q;
 
 	len = dur_u;
@@ -1801,27 +1802,33 @@
 		len *= strtol(p, &q, 10);
 		if (len <= 0) {
 			syntax("Bad length", p);
-			len = BASE_LEN;
+			len = dur_u;
 		}
 		p = q;
 	}
-	fac = 1;
-	while (*p == '/') {
-		p++;
-		if (isdigit((unsigned char) *p)) {
-			fac *= strtol(p, &q, 10);
-			if (fac == 0) {
-				syntax("Bad length divisor", p - 1);
-				fac = 1;
-			}
-			p = q;
-		} else {
-			fac *= 2;
+	if (*p != '/') {
+		*p_len = len;
+		return p;
+	}
+	if (isdigit((unsigned char) p[1])) {
+		fac = strtol(p + 1, &q, 10);
+		p = q;
+		if (fac == 0 || (fac & (fac - 1)))
+			err = 1;
+		else
+			len /= fac;
+	} else {
+		while (*p == '/') {
+			if (len & 1)
+				err = 1;
+			len /= 2;
+			p++;
 		}
 	}
-	if (len % fac)
+	if (err || !len) {
 		syntax("Bad length divisor", p - 1);
-	len /= fac;
+		len = dur_u;
+	}
 	*p_len = len;
 	return p;
 }
@@ -2037,6 +2044,8 @@
 		case CHAR_SLASH:		/* '/' */
 			if (flags & ABC_F_GRACE)
 				goto bad_char;
+			if (char_tb[(unsigned char) p[-1]] != CHAR_BAR)
+				goto bad_char;
 			q = p;
 			while (*q == '/')
 				q++;
@@ -2332,7 +2341,7 @@
 		len = 1;
 		if (isdigit((unsigned char) *p)) {
 			len = strtol(p, &q, 10);
-			if (len == 0 && len > 100) {
+			if (len == 0 || len > 100) {
 				syntax("Bad number of measures", p);
 				len = 1;
 			}
diff -Nru abcm2ps-8.14.6/configure abcm2ps-8.14.7/configure
--- abcm2ps-8.14.6/configure	2019-11-05 14:02:00.000000000 +0100
+++ abcm2ps-8.14.7/configure	2020-02-19 14:00:51.000000000 +0100
@@ -1,10 +1,11 @@
 #! /bin/sh
 
 # (automatic update)
-VERSION=8.14.6
-VDATE=2019-11-05
+VERSION=8.14.7
+VDATE=2020-02-19
 
 CC=gcc
+PKG_CONFIG=pkg-config
 CFLAGS="-g -O2 -Wall -pipe"
 
 srcdir=.
@@ -57,11 +58,11 @@
 	DEFAULT_FDIR="$prefix/share/abcm2ps"
 fi
 
-if which pkg-config > /dev/null ; then
-	if pkg-config --exists freetype2 ; then
-		if pkg-config --exists pangocairo ; then
-			CPPFLAGS="$CPPFLAGS -DHAVE_PANGO=1 `pkg-config pango cairo freetype2 --cflags`"
-			LDLIBS="$LDLIBS `pkg-config pangocairo pangoft2 freetype2 --libs`"
+if which $PKG_CONFIG > /dev/null ; then
+	if $PKG_CONFIG --exists freetype2 ; then
+		if $PKG_CONFIG --exists pangocairo ; then
+			CPPFLAGS="$CPPFLAGS -DHAVE_PANGO=1 `$PKG_CONFIG pango cairo freetype2 --cflags`"
+			LDLIBS="$LDLIBS `$PKG_CONFIG pangocairo pangoft2 freetype2 --libs`"
 		else
 			echo "pangocairo not found - no pango support"
 		fi
diff -Nru abcm2ps-8.14.6/debian/changelog abcm2ps-8.14.7/debian/changelog
--- abcm2ps-8.14.6/debian/changelog	2019-12-10 11:43:53.000000000 +0100
+++ abcm2ps-8.14.7/debian/changelog	2020-03-04 01:30:55.000000000 +0100
@@ -1,3 +1,11 @@
+abcm2ps (8.14.7-0.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * New upstream release closes: #946572.
+  * Standards-Version: 4.5.0.
+
+ -- Nicolas Boulenguez <[email protected]>  Wed, 04 Mar 2020 01:30:55 +0100
+
 abcm2ps (8.14.6-0.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru abcm2ps-8.14.6/debian/control abcm2ps-8.14.7/debian/control
--- abcm2ps-8.14.6/debian/control	2019-12-10 11:43:53.000000000 +0100
+++ abcm2ps-8.14.7/debian/control	2020-03-04 01:30:55.000000000 +0100
@@ -8,7 +8,7 @@
  libpango1.0-dev,
  pkg-config,
  python3-docutils,
-Standards-Version: 4.4.1
+Standards-Version: 4.5.0
 Rules-Requires-Root: no
 Homepage: http://moinejf.free.fr/
 
diff -Nru abcm2ps-8.14.6/debian/copyright abcm2ps-8.14.7/debian/copyright
--- abcm2ps-8.14.6/debian/copyright	2019-11-09 09:25:03.000000000 +0100
+++ abcm2ps-8.14.7/debian/copyright	2020-03-04 01:30:55.000000000 +0100
@@ -5,13 +5,13 @@
 License: GPL-2+
 
 Files: *
-Copyright: 1998-2019 Jean-François Moine (http://moinejf.free.fr)
+Copyright: 1998-2020 Jean-François Moine (http://moinejf.free.fr)
            1996-1998 Michael Methfessel <[email protected]>
 License: GPL-2+
 
 Files: debian/*
 Copyright: 2004-2018 Anselm Lingnau <[email protected]>
-           2018-2019 Nicolas Boulenguez <[email protected]»
+           2018-2020 Nicolas Boulenguez <[email protected]»
 License: GPL-2+
 
 License: GPL-2+
diff -Nru abcm2ps-8.14.6/deco.c abcm2ps-8.14.7/deco.c
--- abcm2ps-8.14.6/deco.c	2019-11-05 14:02:00.000000000 +0100
+++ abcm2ps-8.14.7/deco.c	2020-02-19 14:00:51.000000000 +0100
@@ -93,6 +93,7 @@
 	"emphasis 3 accent 7 4 4",
 	"lowermordent 3 lmrd 10 2 2",
 	"coda 3 coda 24 10 10",
+	"dacoda 3 dacoda 16 10 10",
 	"uppermordent 3 umrd 10 2 2",
 	"segno 3 sgno 20 4 4",
 	"trill 3 trl 11 4 4",
@@ -121,7 +122,12 @@
 	"marcato 3 marcato 9 3 3",
 	"^ 3 marcato 9 3 3",
 	"D.C. 3 dacs 16 10 10 D.C.",
+	"D.C.alcoda 3 dacs 16 10 10 D.C. al Coda",
+	"D.C.alfine 3 dacs 16 10 10 D.C. al Fine",
+	"dacapo 3 dacs 16 10 10 Da Capo",
 	"D.S. 3 dacs 16 10 10 D.S.",
+	"D.S.alcoda 3 dacs 16 10 10 D.S. al Coda",
+	"D.S.alfine 3 dacs 16 10 10 D.S. al Fine",
 	"fine 3 dacs 16 10 10 FINE",
 	"f 6 pf 18 1 7",
 	"ff 6 pf 18 2 10",
diff -Nru abcm2ps-8.14.6/draw.c abcm2ps-8.14.7/draw.c
--- abcm2ps-8.14.6/draw.c	2019-11-05 14:02:00.000000000 +0100
+++ abcm2ps-8.14.7/draw.c	2020-02-19 14:00:51.000000000 +0100
@@ -3086,6 +3086,11 @@
 			x2 -= 1.5;
 		}
 
+		if (k1->dots && !(p1 & 1)
+		 && ((s > 0 && k1->doty >= 0)
+		  || (s < 0 && k1->doty < 0)))
+			x1 += 6;		// avoid clash with dots
+
 		y = 3 * (p - 18);
 //fixme: clash when 2 ties on second interval chord
 //		if (p & 1)
@@ -3109,6 +3114,7 @@
 #endif
 
 		h = (.04 * (x2 - x1) + 10) * s;
+		h *= cfmt.tieheight;
 		slur_out(x1, staff_tb[staff].y + y,
 			 x2, staff_tb[staff].y + y,
 			 s, h, k1->u.note.notes[m1].ti1 & SL_DOTTED, -1);
diff -Nru abcm2ps-8.14.6/format.c abcm2ps-8.14.7/format.c
--- abcm2ps-8.14.6/format.c	2019-11-05 14:02:00.000000000 +0100
+++ abcm2ps-8.14.7/format.c	2020-02-19 14:00:51.000000000 +0100
@@ -137,6 +137,7 @@
 	{"textfont", &cfmt.font_tb[TEXTFONT], FORMAT_F, 0},
 	{"textoption", &cfmt.textoption, FORMAT_I, 4},
 	{"textspace", &cfmt.textspace, FORMAT_U, 0},
+	{"tieheight", &cfmt.tieheight, FORMAT_R, 0},
 	{"titlecaps", &cfmt.titlecaps, FORMAT_B, 0},
 	{"titlefont", &cfmt.font_tb[TITLEFONT], FORMAT_F, 0},
 	{"titleformat", &cfmt.titleformat, FORMAT_S, 0},
@@ -379,6 +380,7 @@
 	f->textspace = 14 PT;
 	f->scale = 1.0;
 	f->slurheight = 1.0;
+	f->tieheight = 1.0;
 	f->maxshrink = 0.65;
 	f->breaklimit = 0.7;
 	f->stretchlast = 0.25;
diff -Nru abcm2ps-8.14.6/music.c abcm2ps-8.14.7/music.c
--- abcm2ps-8.14.6/music.c	2019-11-05 14:02:00.000000000 +0100
+++ abcm2ps-8.14.7/music.c	2020-02-19 14:00:51.000000000 +0100
@@ -2632,8 +2632,10 @@
 				 && new_line == staff_clef[staff].clef->u.clef.line)
 					continue;
 				g = s;
-				while (g->voice != voice)
+				while (g && g->voice != voice)
 					g = g->ts_next;
+				if (!g)
+					continue;
 				if (g->type != CLEF) {
 					g = insert_clef(g, new_type, new_line);
 					if (s2->sflags & S_CLEF_AUTO)
@@ -3167,7 +3169,8 @@
 
 	s->ts_next = last_s;
 	s->ts_prev = last_s->ts_prev;
-	s->ts_prev->ts_next = s;
+	if (s->ts_prev)
+		s->ts_prev->ts_next = s;
 	if (!s->ts_prev || s->ts_prev->type != type)
 		s->sflags |= S_SEQST;
 	last_s->ts_prev = s;
diff -Nru abcm2ps-8.14.6/parse.c abcm2ps-8.14.7/parse.c
--- abcm2ps-8.14.6/parse.c	2019-11-05 14:02:00.000000000 +0100
+++ abcm2ps-8.14.7/parse.c	2020-02-19 14:00:51.000000000 +0100
@@ -3,7 +3,7 @@
  *
  * This file is part of abcm2ps.
  *
- * Copyright (C) 1998-2019 Jean-François Moine (http://moinejf.free.fr)
+ * Copyright (C) 1998-2020 Jean-François Moine (http://moinejf.free.fr)
  * Adapted from abc2ps, Copyright (C) 1996-1998 Michael Methfessel
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -233,7 +233,8 @@
 	for (;;) {
 		if (set_sy) {
 		    fl = 1;			// start a new sequence
-		    if (!new_sy) {
+//		    if (!new_sy) {
+		    if (1) {
 			set_sy = 0;
 			multi = -1;
 			memset(vn, -1, sizeof vn);
@@ -2315,7 +2316,7 @@
 /* -- get staves definition (%%staves / %%score) -- */
 static void get_staves(struct SYMBOL *s)
 {
-	struct SYMBOL *s2;
+//	struct SYMBOL *s2;
 	struct VOICE_S *p_voice, *p_voice2;
 	struct staff_s *p_staff, staves[MAXVOICE];
 	int i, flags, voice, staff, range, dup_voice, maxtime;
@@ -2357,18 +2358,18 @@
 		curvoice->time = maxtime;
 
 		// put the staves before a measure bar (see draw_bar())
-		s2 = curvoice->last_sym;
-		if (s2 && s2->type == BAR && s2->time == maxtime) {
-			curvoice->last_sym = s2->prev;
-			if (!curvoice->last_sym)
-				curvoice->sym = NULL;
-			sym_link(s, STAVES);
-			s->next = s2;
-			s2->prev = s;
-			curvoice->last_sym = s2;
-		} else {
+//		s2 = curvoice->last_sym;
+//		if (s2 && s2->type == BAR && s2->time == maxtime) {
+//			curvoice->last_sym = s2->prev;
+//			if (!curvoice->last_sym)
+//				curvoice->sym = NULL;
+//			sym_link(s, STAVES);
+//			s->next = s2;
+//			s2->prev = s;
+//			curvoice->last_sym = s2;
+//		} else {
 			sym_link(s, STAVES); // link the staves in the current voice
-		}
+//		}
 		s->state = ABC_S_HEAD; /* (output PS sequences immediately) */
 		parsys->nstaff = nstaff;
 		system_new();
diff -Nru abcm2ps-8.14.6/README.md abcm2ps-8.14.7/README.md
--- abcm2ps-8.14.6/README.md	2019-11-05 14:02:00.000000000 +0100
+++ abcm2ps-8.14.7/README.md	2020-02-19 14:00:51.000000000 +0100
@@ -14,11 +14,15 @@
 (the 'm' of abcm2ps stands for many or multi staves/voices).
 Since this time, it has evolved so it can render many more music kinds.
 
+Note that this program is at end of life. Its successor is
+[abc2svg](https://chiselapp.com/user/moinejf/repository/abc2svg).
+
 ### Features
 
-The main features of abcm2ps are quite the same as the abc2ps ones,
-but they are closer to the ABC draft 2.2 (February 2013):
-    http://abcnotation.com/wiki/abc:standard:v2.2
+The features of abcm2ps are based on the
+[ABC draft 2.2 (February 2013)](http://abcnotation.com/wiki/abc:standard:v2.2).
+The differences are listed in the
+[abcm2ps/abc2svg documentation](http://moinejf.free.fr/abcm2ps-doc/features.html).
 
 ### Installation and usage
 
@@ -49,6 +53,8 @@
 
 ### Links
 
+Author's page: http://moinejf.free.fr/
+
 To know more about the ABC music notation, have a look at
     http://abcnotation.com/
 
diff -Nru abcm2ps-8.14.6/svg.c abcm2ps-8.14.7/svg.c
--- abcm2ps-8.14.6/svg.c	2019-11-05 14:02:00.000000000 +0100
+++ abcm2ps-8.14.7/svg.c	2020-02-19 14:00:51.000000000 +0100
@@ -2344,6 +2344,21 @@
 			free(s);
 			return;
 		}
+		if (strcmp(op, "dacoda") == 0) {
+			setg(1);
+			e = elt_dup(stack);
+			y = gcur.yoffs - pop_free_val() - 7;
+			e2 = elt_dup(stack);
+			e2->u.v += 10;
+			x = gcur.xoffs + pop_free_val() - 10;
+			fprintf(fout, "<text style=\"font:16px serif\"\n"
+				"	x=\"%.2f\" y=\"%.2f\" text-anchor=\"middle\">Da</text>\n",
+				x, y);
+			push(e2);
+			push(e);
+			xysym("coda", D_coda);
+			return;
+		}
 		if (strcmp(op, "def") == 0) {
 			ps_exec("!");
 			return;
diff -Nru abcm2ps-8.14.6/syms.c abcm2ps-8.14.7/syms.c
--- abcm2ps-8.14.6/syms.c	2019-11-05 14:02:00.000000000 +0100
+++ abcm2ps-8.14.7/syms.c	2020-02-19 14:00:51.000000000 +0100
@@ -535,10 +535,16 @@
 	"	M 0.8 SLW -6 1.2 RM 12.6 12.6 RL stroke\n"
 	"	7 add exch 6 sub exch 1.2 0 360 arc fill\n"
 	"	8 add exch 6 add exch 1.2 0 360 arc fill}!\n"
+	/* x y dacoda - Da Coda */
+	"/dacoda{2 1 roll 10 add 2 1 roll dup 3 -1 roll dup 3 1 roll -23 add 4 1 roll\n"
+	"	1 SLW 2 add 2 copy M 0 20 RL\n"
+	"	2 copy M -10 10 RM 20 0 RL stroke\n"
+	"	10 add 6 0 360 arc 1.7 SLW stroke\n"
+	"	/Times-Roman 16 selectfont 7 add M (Da) showc}!\n"
 	/* x y coda - coda */
 	"/coda{	1 SLW 2 add 2 copy M 0 20 RL\n"
-	"	2 copy M -10 10 RM 20 0 RL stroke\n"
-	"	10 add 6 0 360 arc 1.7 SLW stroke}!\n"
+	"	2 copy M -10 10 RM 20 0 RL 1.1 SLW stroke\n"
+	"	exch -7 add exch (O) 3 1 roll /Times-Bold 18 selectfont 4 add M show}!\n"
 	/* x y tclef - treble clef */
 	"/utclef{<95200072\n"
 	"	0000ff2e01c2030c\n"

Reply via email to