Control: tags 933320 + patch
Control: tags 933320 + pending

Dear maintainer,

I've prepared an NMU for abcm2ps (versioned as 8.14.5-0.1) and
uploaded it to DELAYED/10. Please feel free to tell me if I
should delay it longer.

Regards.
diff -Nru abcm2ps-8.14.2/abcm2ps.c abcm2ps-8.14.5/abcm2ps.c
--- abcm2ps-8.14.2/abcm2ps.c	2018-12-18 16:18:26.000000000 +0100
+++ abcm2ps-8.14.5/abcm2ps.c	2019-07-17 09:44:10.000000000 +0200
@@ -2,14 +2,14 @@
  * abcm2ps: a program to typeset tunes written in ABC format
  *	using PostScript or SVG
  *
- * Copyright (C) 1998-2017 Jean-François Moine (http://moinejf.free.fr)
+ * Copyright (C) 1998-2019 Jean-François Moine (http://moinejf.free.fr)
  *
- * Adapted from abc2ps-1.2.5:
- *  Copyright (C) 1996,1997  Michael Methfessel ([email protected])
+ * Adapted from abc2ps
+ * Copyright (C) 1996-1998  Michael Methfessel (https://github.com/methf/abc2ps/)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * abcm2ps is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
  * (at your option) any later version.
  */
 
diff -Nru abcm2ps-8.14.2/abcm2ps.h abcm2ps-8.14.5/abcm2ps.h
--- abcm2ps-8.14.2/abcm2ps.h	2018-12-18 16:18:26.000000000 +0100
+++ abcm2ps-8.14.5/abcm2ps.h	2019-07-17 09:44:10.000000000 +0200
@@ -312,6 +312,7 @@
 #define S_SHIFTUNISON_2	0x04000000	/* %%shiftunison 2 */
 #define S_NEW_SY	0x08000000	/* staff system change (%%staves) */
 #define S_RBSTART	0x10000000	// start of repeat bracket
+#define S_OTTAVA	0x20000000	// ottava decoration (start or stop)
 	struct posit_s posit;	/* positions / directions */
 	signed char stem;	/* 1 / -1 for stem up / down */
 	signed char combine;	/* voice combine */
diff -Nru abcm2ps-8.14.2/abcparse.c abcm2ps-8.14.5/abcparse.c
--- abcm2ps-8.14.2/abcparse.c	2018-12-18 16:18:26.000000000 +0100
+++ abcm2ps-8.14.5/abcparse.c	2019-07-17 09:44:10.000000000 +0200
@@ -1,12 +1,14 @@
 /*
  * Generic ABC parser.
  *
- * Copyright (C) 1998-2018 Jean-François Moine
- * Adapted from abc2ps, Copyright (C) 1996, 1997 Michael Methfessel
+ * This file is part of abcm2ps.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * Copyright (C) 1998-2019 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
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  */
 
diff -Nru abcm2ps-8.14.2/buffer.c abcm2ps-8.14.5/buffer.c
--- abcm2ps-8.14.2/buffer.c	2018-12-18 16:18:26.000000000 +0100
+++ abcm2ps-8.14.5/buffer.c	2019-07-17 09:44:10.000000000 +0200
@@ -3,12 +3,12 @@
  *
  * This file is part of abcm2ps.
  *
- * Copyright (C) 1998-2017 Jean-François Moine
- * Adapted from abc2ps, Copyright (C) 1996,1997 Michael Methfessel
+ * Copyright (C) 1998-2019 Jean-François Moine
+ * Adapted from abc2ps, Copyright (C) 1996-1998 Michael Methfessel
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  */
 
diff -Nru abcm2ps-8.14.2/configure abcm2ps-8.14.5/configure
--- abcm2ps-8.14.2/configure	2018-12-18 16:18:26.000000000 +0100
+++ abcm2ps-8.14.5/configure	2019-07-17 09:44:10.000000000 +0200
@@ -1,8 +1,8 @@
 #! /bin/sh
 
 # (automatic update)
-VERSION=8.14.2
-VDATE=2018-12-18
+VERSION=8.14.5
+VDATE=2019-07-17
 
 CC=gcc
 CFLAGS="-g -O2 -Wall -pipe"
diff -Nru abcm2ps-8.14.2/debian/changelog abcm2ps-8.14.5/debian/changelog
--- abcm2ps-8.14.2/debian/changelog	2019-01-27 18:50:50.000000000 +0100
+++ abcm2ps-8.14.5/debian/changelog	2019-09-03 12:07:16.000000000 +0200
@@ -1,3 +1,13 @@
+abcm2ps (8.14.5-0.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * New upstream release closes: #933320.  No more patches.
+  * Set build flags as ./configure arguments, the environment is ignored.
+  * Drop --as-needed linker flag, now the default in GCC-9.
+  * Standards-Version: 4.4.0. No changes.
+
+ -- Nicolas Boulenguez <[email protected]>  Tue, 03 Sep 2019 12:07:16 +0200
+
 abcm2ps (8.14.2-0.2) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru abcm2ps-8.14.2/debian/control abcm2ps-8.14.5/debian/control
--- abcm2ps-8.14.2/debian/control	2019-01-27 18:39:38.000000000 +0100
+++ abcm2ps-8.14.5/debian/control	2019-09-03 11:56:53.000000000 +0200
@@ -8,7 +8,7 @@
  libpango1.0-dev,
  pkg-config,
  python3-docutils,
-Standards-Version: 4.3.0
+Standards-Version: 4.4.0
 Rules-Requires-Root: no
 Homepage: http://moinejf.free.fr/
 
diff -Nru abcm2ps-8.14.2/debian/copyright abcm2ps-8.14.5/debian/copyright
--- abcm2ps-8.14.2/debian/copyright	2019-01-27 18:39:38.000000000 +0100
+++ abcm2ps-8.14.5/debian/copyright	2019-09-03 12:06:46.000000000 +0200
@@ -5,12 +5,13 @@
 License: GPL-2+
 
 Files: *
-Copyright: 2000-2018 Jean-François Moine (http://moinejf.free.fr)
-           1996-1997 Michael Methfessel <[email protected]>
+Copyright: 1998-2019 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]»
 License: GPL-2+
 
 License: GPL-2+
diff -Nru abcm2ps-8.14.2/debian/patches/bad-ps-when-centered-or-right-aligned.diff abcm2ps-8.14.5/debian/patches/bad-ps-when-centered-or-right-aligned.diff
--- abcm2ps-8.14.2/debian/patches/bad-ps-when-centered-or-right-aligned.diff	2019-01-27 18:45:27.000000000 +0100
+++ abcm2ps-8.14.5/debian/patches/bad-ps-when-centered-or-right-aligned.diff	1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-Description: fix: bad PS output when centered or right aligned text with pango
- Reported by Hudson Lacerda.
-Author: Jean-Francois Moine <[email protected]>
-Origin: upstream https://github.com/leesavide/abcm2ps/commit/2eb380926b02edde530d4e1bfbe54d9f9ddf94fc
-
---- a/subs.c
-+++ b/subs.c
-@@ -566,7 +566,7 @@
- 			wi /= 2;
- //		w = (float) wi / PG_SCALE;
- 		w = (float) wi / PANGO_SCALE;
--		a2b("-%.1f 0 RM ", w);
-+		a2b(" -%.1f 0 RM", w);
- 		break;
- 	}
- 	pg_line_output(line);
diff -Nru abcm2ps-8.14.2/debian/patches/fix-loss-of-sep.diff abcm2ps-8.14.5/debian/patches/fix-loss-of-sep.diff
--- abcm2ps-8.14.2/debian/patches/fix-loss-of-sep.diff	2019-01-27 18:49:25.000000000 +0100
+++ abcm2ps-8.14.5/debian/patches/fix-loss-of-sep.diff	1970-01-01 01:00:00.000000000 +0100
@@ -1,32 +0,0 @@
-Description: fix: loss of %%sep since commit 2f84d97448
- Reported by David Lacroix.
-Author: Jean-Francois Moine <[email protected]>
-Origin: upstream https://github.com/leesavide/abcm2ps/commit/76087efbcd39749c60a05c86ffacd34110aa0f24
-From 76087efbcd39749c60a05c86ffacd34110aa0f24 Mon Sep 17 00:00:00 2001
-
---- a/parse.c
-+++ b/parse.c
-@@ -5158,16 +5158,17 @@ static void get_map(char *p)
- static struct SYMBOL *process_pscomment(struct SYMBOL *s)
- {
- 	char w[32], *p, *q;
--	int lock, voice;
-+	int voice;
- 	float h1;
-+	int lock = 0;
- 
- 	p = s->text + 2;		/* skip '%%' */
- 	q = p + strlen(p) - 5;
--	if (q < p)
--		return s;
--	lock = strncmp(q, " lock", 5) == 0;
--	if (lock)
--		*q = '\0'; 
-+	if (q > p
-+	 && strncmp(q, " lock", 5) == 0) {
-+		lock = 1;
-+		*q = '\0';
-+	}
- 	p = get_str(w, p, sizeof w);
- 	if (s->state == ABC_S_HEAD
- 	 && !check_header(s)) {
diff -Nru abcm2ps-8.14.2/debian/patches/series abcm2ps-8.14.5/debian/patches/series
--- abcm2ps-8.14.2/debian/patches/series	2019-01-27 18:48:44.000000000 +0100
+++ abcm2ps-8.14.5/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-fix-loss-of-sep.diff
-bad-ps-when-centered-or-right-aligned.diff
diff -Nru abcm2ps-8.14.2/debian/rules abcm2ps-8.14.5/debian/rules
--- abcm2ps-8.14.2/debian/rules	2019-01-27 18:39:38.000000000 +0100
+++ abcm2ps-8.14.5/debian/rules	2019-09-03 12:01:08.000000000 +0200
@@ -1,7 +1,13 @@
 #!/usr/bin/make -f
 
-export DEB_BUILD_MAINT_OPTIONS := hardening=+all
-export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed
+DEB_BUILD_MAINT_OPTIONS := hardening=+all
+DEB_CFLAGS_MAINT_APPEND := -Wall
+include /usr/share/dpkg/buildflags.mk
 
 %:
 	dh $@ --buildsystem=autoconf
+
+.PHONY: override_dh_auto_configure
+override_dh_auto_configure:
+	dh_auto_configure -- \
+	  $(foreach v,CFLAGS CPPFLAGS LDFLAGS,'--$(v)=$($(v))')
diff -Nru abcm2ps-8.14.2/deco.c abcm2ps-8.14.5/deco.c
--- abcm2ps-8.14.2/deco.c	2018-12-18 16:18:26.000000000 +0100
+++ abcm2ps-8.14.5/deco.c	2019-07-17 09:44:10.000000000 +0200
@@ -3,11 +3,11 @@
  *
  * This file is part of abcm2ps.
  *
- * Copyright (C) 2000-2017, Jean-François Moine.
+ * Copyright (C) 2000-2019 Jean-François Moine (http://moinejf.free.fr)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  */
 
@@ -592,6 +592,21 @@
 		return;
 	s2 = de->s;
 
+	// only one ottava per staff
+	if (s2->sflags & S_OTTAVA) {
+		struct deco_elt *de2;
+
+		for (de2 = de->next; de2; de2 = de2->next) {
+			if (de2->t == de->t
+			 && de2->s->time == s2->time
+			 && de2->s->staff == s2->staff) {
+				de2->s->sflags &= ~S_OTTAVA;
+				de2->t = 0;
+			}
+		}
+		s2->sflags &= ~S_OTTAVA;
+	}
+
 //	if (de->start) {		/* deco start */
 		s = de->start->s;
 		x = s->x;
@@ -673,7 +688,7 @@
 	float x, yc, stafft, staffb, w;
 	int up, inv;
 
-	// don't treat here the long decorations
+	// don't treat here the start of long decorations
 	if (de->flags & DE_LDST)
 		return;
 	if (de->start) {
@@ -1146,6 +1161,7 @@
 					 || dd->name[2] == 'b')
 						curvoice->ottava = 0;
 				}
+				s->sflags |= S_OTTAVA;
 			}
 			continue;
 		case 32:		/* invisible */
diff -Nru abcm2ps-8.14.2/draw.c abcm2ps-8.14.5/draw.c
--- abcm2ps-8.14.2/draw.c	2018-12-18 16:18:26.000000000 +0100
+++ abcm2ps-8.14.5/draw.c	2019-07-17 09:44:10.000000000 +0200
@@ -3,12 +3,12 @@
  *
  * This file is part of abcm2ps.
  *
- * Copyright (C) 1998-2017 Jean-François Moine
- * Adapted from abc2ps, Copyright (C) 1996,1997 Michael Methfessel
+ * Copyright (C) 1998-2019 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 under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  */
 
@@ -122,6 +122,7 @@
 
 	s->gch = NULL;
 	s->ly = NULL;
+	s->extra = NULL;
 	return s;
 }
 
@@ -1222,7 +1223,9 @@
 	/* don't put a line between the staves if there is no bar above */
 	if (staff != 0
 	 && s->ts_prev
-	 && (s->ts_prev->type != BAR || s->ts_prev->staff != staff - 1))
+// (a staff may not be displayed)
+//	 && (s->ts_prev->type != BAR || s->ts_prev->staff != staff - 1))
+	 && s->ts_prev->type != BAR)
 		h = staff_tb[staff].topbar * staff_tb[staff].staffscale;
 
 	bar_type = bar_cnv(s->u.bar.type);
@@ -2538,6 +2541,7 @@
 		if (gr2) {
 			gr2->prev->next = gr2;
 			gr2->extra->prev = NULL;
+			gr2 = NULL;
 		}
 
 		if (s->u.note.slur_st
diff -Nru abcm2ps-8.14.2/format.c abcm2ps-8.14.5/format.c
--- abcm2ps-8.14.2/format.c	2018-12-18 16:18:26.000000000 +0100
+++ abcm2ps-8.14.5/format.c	2019-07-17 09:44:10.000000000 +0200
@@ -3,12 +3,12 @@
  *
  * This file is part of abcm2ps.
  *
- * Copyright (C) 1998-2017 Jean-François Moine
- * Adapted from abc2ps, Copyright (C) 1996,1997 Michael Methfessel
+ * Copyright (C) 1998-2019 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 under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  */
 
diff -Nru abcm2ps-8.14.2/front.c abcm2ps-8.14.5/front.c
--- abcm2ps-8.14.2/front.c	2018-12-18 16:18:26.000000000 +0100
+++ abcm2ps-8.14.5/front.c	2019-07-17 09:44:10.000000000 +0200
@@ -3,11 +3,11 @@
  *
  * This file is part of abcm2ps.
  *
- * Copyright (C) 2011-2017 Jean-François Moine (http://moinejf.free.fr)
+ * Copyright (C) 2011-2019 Jean-François Moine (http://moinejf.free.fr)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  */
 
diff -Nru abcm2ps-8.14.2/glyph.c abcm2ps-8.14.5/glyph.c
--- abcm2ps-8.14.2/glyph.c	2018-12-18 16:18:26.000000000 +0100
+++ abcm2ps-8.14.5/glyph.c	2019-07-17 09:44:10.000000000 +0200
@@ -3,11 +3,11 @@
  *
  * This file is part of abcm2ps.
  *
- * Copyright (C) 2011-2015 Jean-François Moine (http://moinejf.free.fr)
+ * Copyright (C) 2011-2019 Jean-François Moine (http://moinejf.free.fr)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  */
 
diff -Nru abcm2ps-8.14.2/Makefile.in abcm2ps-8.14.5/Makefile.in
--- abcm2ps-8.14.2/Makefile.in	2018-12-18 16:18:26.000000000 +0100
+++ abcm2ps-8.14.5/Makefile.in	2019-07-17 09:44:10.000000000 +0200
@@ -48,6 +48,7 @@
 	$(INSTALL_DATA) $(srcdir)/README.md $(docdir)/abcm2ps
 	$(INSTALL_DATA) $(srcdir)/*.abc     $(docdir)/abcm2ps/examples
 	$(INSTALL_DATA) $(srcdir)/*.eps     $(docdir)/abcm2ps/examples
+	$(INSTALL_DATA) $(srcdir)/*.html    $(docdir)/abcm2ps/examples
 	mkdir -p $(mandir)/man1
 	$(INSTALL_DATA) abcm2ps.1 $(mandir)/man1
 
diff -Nru abcm2ps-8.14.2/music.c abcm2ps-8.14.5/music.c
--- abcm2ps-8.14.2/music.c	2018-12-18 16:18:26.000000000 +0100
+++ abcm2ps-8.14.5/music.c	2019-07-17 09:44:10.000000000 +0200
@@ -3,12 +3,12 @@
  *
  * This file is part of abcm2ps.
  *
- * Copyright (C) 1998-2017 Jean-François Moine
- * Adapted from abc2ps, Copyright (C) 1996,1997 Michael Methfessel
+ * Copyright (C) 1998-2019 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 under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  */
 
@@ -3460,7 +3460,7 @@
 static void set_rb(struct VOICE_S *p_voice)
 {
 	struct SYMBOL *s, *s2;
-	int mx, n;
+	int n;
 
 	s = p_voice->sym;
 	while (s) {
@@ -3470,60 +3470,26 @@
 			continue;
 		}
 
-		mx = cfmt.rbmax;
-
-		/* if 1st repeat sequence, compute the bracket length */
-		if (s->text && s->text[0] == '1') {
-			n = 0;
-			s2 = NULL;
-			for (s = s->next; s; s = s->next) {
-				if (s->type != BAR)
-					continue;
-				n++;
-				if (s->sflags & S_RBSTOP) {
-					if (n <= cfmt.rbmax) {
-						mx = n;
-						s2 = NULL;
-					}
-					break;
-				}
-				if (n == cfmt.rbmin)
-					s2 = s;
-			}
-			if (s2) {
-				s2->sflags |= S_RBSTOP;
-				mx = cfmt.rbmin;
-			}
-		}
-		while (s) {
-
-			/* check repbra shifts (:| | |2 in 2nd staves) */
-			if (!(s->flags & ABC_F_RBSTART)) {
-				s = s->next;
-				if (!s)
-					break;
-				if (!(s->flags & ABC_F_RBSTART)) {
-					s = s->next;
-					if (!s)
-						break;
-					if (!(s->flags & ABC_F_RBSTART))
-						break;
-				}
+		n = 0;
+		s2 = NULL;
+		for (s = s->next; s; s = s->next) {
+			if (s->type != BAR)
+				continue;
+			n++;
+			if (s->sflags & S_RBSTOP)
+				break;
+			if (!s->next) {
+				s->flags |= ABC_F_RBSTOP;
+				s->sflags |= S_RBSTOP;
+				break;
 			}
-			n = 0;
-			s2 = NULL;
-			for (s = s->next; s; s = s->next) {
-				if (s->type != BAR)
-					continue;
-				n++;
-				if (s->sflags & S_RBSTOP)
-					break;
-				if (!s->next) {
-					s->flags |= ABC_F_RBSTOP;
-					s->sflags |= S_RBSTOP;
-				} else if (n == mx) {
-					s->sflags |= S_RBSTOP;
-				}
+			if (n == cfmt.rbmin)
+				s2 = s;
+			if (n == cfmt.rbmax) {
+				if (s2)
+					s = s2;
+				s->sflags |= S_RBSTOP;
+				break;
 			}
 		}
 	}
diff -Nru abcm2ps-8.14.2/parse.c abcm2ps-8.14.5/parse.c
--- abcm2ps-8.14.2/parse.c	2018-12-18 16:18:26.000000000 +0100
+++ abcm2ps-8.14.5/parse.c	2019-07-17 09:44:10.000000000 +0200
@@ -3,12 +3,12 @@
  *
  * This file is part of abcm2ps.
  *
- * Copyright (C) 1998-2018 Jean-François Moine
- * Adapted from abc2ps, Copyright (C) 1996,1997 Michael Methfessel
+ * Copyright (C) 1998-2019 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 under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  */
 
@@ -5158,16 +5158,17 @@
 static struct SYMBOL *process_pscomment(struct SYMBOL *s)
 {
 	char w[32], *p, *q;
-	int lock, voice;
+	int voice;
 	float h1;
+	int lock = 0;
 
 	p = s->text + 2;		/* skip '%%' */
 	q = p + strlen(p) - 5;
-	if (q < p)
-		return s;
-	lock = strncmp(q, " lock", 5) == 0;
-	if (lock)
-		*q = '\0'; 
+	if (q > p
+	 && strncmp(q, " lock", 5) == 0) {
+		lock = 1;
+		*q = '\0';
+	}
 	p = get_str(w, p, sizeof w);
 	if (s->state == ABC_S_HEAD
 	 && !check_header(s)) {
diff -Nru abcm2ps-8.14.2/README.md abcm2ps-8.14.5/README.md
--- abcm2ps-8.14.2/README.md	2018-12-18 16:18:26.000000000 +0100
+++ abcm2ps-8.14.5/README.md	2019-07-17 09:44:10.000000000 +0200
@@ -7,7 +7,8 @@
 abcm2ps is a C program which converts music tunes from the ABC music notation
 to PostScript or SVG.
 
-Based on the abc2ps version 1.2.5 from Michael Methfessel,
+Based on [abc2ps](https://github.com/methf/abc2ps),
+the Postscript generator for ABC music notation by Michael Methfessel,
 it was first developped to print barock organ scores that have independant
 voices played on one or many keyboards and a pedal-board
 (the 'm' of abcm2ps stands for many or multi staves/voices).
@@ -43,7 +44,7 @@
 
   When `abcm2ps` is installed, it may be read by `man abcm2ps`.
 
-- the feature and format parameters are described in
+- the features and format parameters are described in
     http://moinejf.free.fr/abcm2ps-doc/index.html
 
 ### Links
diff -Nru abcm2ps-8.14.2/subs.c abcm2ps-8.14.5/subs.c
--- abcm2ps-8.14.2/subs.c	2018-12-18 16:18:26.000000000 +0100
+++ abcm2ps-8.14.5/subs.c	2019-07-17 09:44:10.000000000 +0200
@@ -3,12 +3,12 @@
  *
  * This file is part of abcm2ps.
  *
- * Copyright (C) 1998-2018 Jean-François Moine
- * Adapted from abc2ps, Copyright (C) 1996,1997 Michael Methfessel
+ * Copyright (C) 1998-2019 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 under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  */
 
@@ -566,7 +566,7 @@
 			wi /= 2;
 //		w = (float) wi / PG_SCALE;
 		w = (float) wi / PANGO_SCALE;
-		a2b("-%.1f 0 RM ", w);
+		a2b(" -%.1f 0 RM", w);
 		break;
 	}
 	pg_line_output(line);
diff -Nru abcm2ps-8.14.2/svg.c abcm2ps-8.14.5/svg.c
--- abcm2ps-8.14.2/svg.c	2018-12-18 16:18:26.000000000 +0100
+++ abcm2ps-8.14.5/svg.c	2019-07-17 09:44:10.000000000 +0200
@@ -3,11 +3,11 @@
  *
  * This file is part of abcm2ps.
  *
- * Copyright (C) 1998-2017 Jean-François Moine
+ * Copyright (C) 2011-2019 Jean-François Moine
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  */
 
diff -Nru abcm2ps-8.14.2/syms.c abcm2ps-8.14.5/syms.c
--- abcm2ps-8.14.2/syms.c	2018-12-18 16:18:26.000000000 +0100
+++ abcm2ps-8.14.5/syms.c	2019-07-17 09:44:10.000000000 +0200
@@ -3,12 +3,12 @@
  *
  * This file is part of abcm2ps.
  *
- * Copyright (C) 1998-2017 Jean-François Moine
- * Adapted from abc2ps, Copyright (C) 1996,1997 Michael Methfessel
+ * Copyright (C) 1998-2019 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 under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  */
 

Reply via email to