pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc/discount Cast tolower/isspace/isalpha args to...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/859548361107
branches:  trunk
changeset: 377524:859548361107
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Sat Mar 17 20:54:06 2018 +0000

description:
Cast tolower/isspace/isalpha args to unsigned char to fix self-tests on
NetBSD. Bump PKGREVISION.

diffstat:

 textproc/discount/Makefile                 |   4 +-
 textproc/discount/distinfo                 |   3 +-
 textproc/discount/patches/patch-generate.c |  33 ++++++++++++++++++++++++++++++
 3 files changed, 37 insertions(+), 3 deletions(-)

diffs (65 lines):

diff -r 387c591d8c2d -r 859548361107 textproc/discount/Makefile
--- a/textproc/discount/Makefile        Sat Mar 17 17:55:13 2018 +0000
+++ b/textproc/discount/Makefile        Sat Mar 17 20:54:06 2018 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.5 2018/03/16 03:45:18 schmonz Exp $
+# $NetBSD: Makefile,v 1.6 2018/03/17 20:54:06 schmonz Exp $
 #
 
 DISTNAME=      discount-2.2.3a
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    textproc
 MASTER_SITES=  ${HOMEPAGE}
 EXTRACT_SUFX=  .tar.bz2
diff -r 387c591d8c2d -r 859548361107 textproc/discount/distinfo
--- a/textproc/discount/distinfo        Sat Mar 17 17:55:13 2018 +0000
+++ b/textproc/discount/distinfo        Sat Mar 17 20:54:06 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2018/03/16 03:45:18 schmonz Exp $
+$NetBSD: distinfo,v 1.6 2018/03/17 20:54:06 schmonz Exp $
 
 SHA1 (discount-2.2.3a.tar.bz2) = 9ff2985b89e7bc7ca6a18f82aade2b25db2c97f8
 RMD160 (discount-2.2.3a.tar.bz2) = 66a13d6848251ab8a73a59ba4ec95befe9bbdc2d
@@ -6,3 +6,4 @@
 Size (discount-2.2.3a.tar.bz2) = 98325 bytes
 SHA1 (patch-Makefile.in) = ee288e3b03368dbc4a0f4c472bfbbdf2283b9967
 SHA1 (patch-configure.inc) = 19e31e0b845e6c3f3822b556223d7a3cc3e2c028
+SHA1 (patch-generate.c) = b584de3a654c3bc3f2a2b1204926164c6ed67035
diff -r 387c591d8c2d -r 859548361107 textproc/discount/patches/patch-generate.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/discount/patches/patch-generate.c        Sat Mar 17 20:54:06 2018 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-generate.c,v 1.1 2018/03/17 20:54:06 schmonz Exp $
+
+Fix self-tests on NetBSD.
+
+--- generate.c.orig    2018-03-02 22:52:05.000000000 +0000
++++ generate.c
+@@ -1151,7 +1151,7 @@ islike(MMIOT *f, char *s)
+     }
+ 
+     for (i=1; i < len; i++)
+-      if (tolower(peek(f,i)) != s[i])
++      if (tolower((unsigned char)peek(f,i)) != s[i])
+           return 0;
+     return 1;
+ }
+@@ -1269,7 +1269,7 @@ tickhandler(MMIOT *f, int tickchar, int 
+     int endticks, size;
+     int tick = nrticks(0, tickchar, f);
+ 
+-    if ( !allow_space && isspace(peek(f,tick)) )
++    if ( !allow_space && isspace((unsigned char)peek(f,tick)) )
+       return 0;
+ 
+     if ( (tick >= minticks) && (size = matchticks(f,tickchar,tick,&endticks)) ) {
+@@ -1297,7 +1297,7 @@ text(MMIOT *f)
+     int smartyflags = 0;
+ 
+     while (1) {
+-        if ( (f->flags & MKD_AUTOLINK) && isalpha(peek(f,1)) && !tag_text(f) )
++        if ( (f->flags & MKD_AUTOLINK) && isalpha((unsigned char)peek(f,1)) && !tag_text(f) )
+           maybe_autolink(f);
+ 
+         c = pull(f);



Home | Main Index | Thread Index | Old Index