Fix previous patch, spotted by semarie@

From Anton Lindqvist <anton dot lindqvist at gmail dot com>
This commit is contained in:
shadchin 2016-08-15 14:55:48 +00:00
parent bf3ae9fea0
commit a5cce8b102
2 changed files with 5 additions and 16 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.18 2016/08/12 06:13:53 shadchin Exp $
# $OpenBSD: Makefile,v 1.19 2016/08/15 14:55:48 shadchin Exp $
COMMENT= multilanguage implementation of ctags
DISTNAME= ctags-5.8
REVISION= 1
REVISION= 2
PKGNAME= e${DISTNAME}
CATEGORIES= devel
HOMEPAGE= http://ctags.sourceforge.net/

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-read_c,v 1.1 2016/08/12 06:13:54 shadchin Exp $
$OpenBSD: patch-read_c,v 1.2 2016/08/15 14:55:48 shadchin Exp $
--- read.c.orig Sat Jul 4 11:29:02 2009
+++ read.c Fri Aug 12 11:07:47 2016
@@ -526,13 +526,20 @@ extern char *readLine (vString *const vLine, FILE *con
+++ read.c Mon Aug 15 19:47:23 2016
@@ -526,9 +526,9 @@ extern char *readLine (vString *const vLine, FILE *con
vStringSetLength (vLine);
/* canonicalize new line */
eol = vStringValue (vLine) + vStringLength (vLine) - 1;
@ -13,14 +13,3 @@ $OpenBSD: patch-read_c,v 1.1 2016/08/12 06:13:54 shadchin Exp $
{
*(eol - 1) = '\n';
*eol = '\0';
--vLine->length;
+ }
+ else if (vStringSize (vLine) > 1)
+ {
+ eol = vStringValue (vLine);
+ *eol = '\n';
+ *(eol + 1) = '\0';
+ vStringSetLength (vLine);
}
}
} while (reReadLine);