Mon Jun 10 13:32:56 2019 UTC ()
Update to 2.2.6. From the changelog:

- make a test program to examine pandoc header elements
- if __mkd_trim_line trims the entire line, manually set the string to \0
- add in a handful of test to verify that empty pandoc headers are not
  auto-populated with %
- messed up the definition for missing attributes; should be /**/
  instead of '', because AC_DEFINE will convert an empty string into a 1
- move flags.o down to the last line in OBJS= to work around a plan9
  makefile bug
- have peek() return an int instead of an unsigned int (netbsd 8; ctype
  functions explode with unsigned int arguments?)
- fix all places where I pass flags to be DWORDs
- include config.h before any other headers
- make all instances of 'main()' be integer functions (sigh)
- clean up all references to flags; define them EVERYWHERE as mkd_flag_t
- shuffle around some of the definitions to make everything happily(?)
  compile with all instances of flags being mkd_flag_t
- when checking that the C compiler works, compile the test program as
  two modules with a function declared with differing pointer types
  (char ptr vs void ptr) so if the C compiler generates type signatures
  and doesn't think a void pointer is the universal solvent it will fail
  right there
- set the Plan9 CFLAGS to the two extensions (instead of having them be
  part of the CC macro) and wipe out any CFLAGS (like -T, which tells
  the Plan9 posix C compiler to be stupid) that already exists
- tweak the Makefile macros a bit so people can wedge in their own
  compilers (BUILD) and linkers (LINK) during a build
- add a list item for testing the build
- patch the cmakefile so that has an option to only generate a library
- push the fencedcode block handler up to the toplevel scanner so it
  will handle blank lines inside the fence
- add a fenced code block with embedded html
- don't give a code block class if it's just an empty string
- add a test case for a piece of fenced code with trailing spaces after
  the opening ~~~
- deal with cached text before handling fenced code blocks
- yank the repeated inline uncaches out and stuff them into a local function
- add two more tests (unfinished fenced code block, paragraph then
  fenced code block) to codeblock.t
- don't publish mkd_string_to_anchor
- add an anchor format callback, plus add the -x option to the markdown
  program to squash toc anchors to (close to) github compatability
- add some dle sanity checking into onlyifset()
- when dumping the parse tree, say which header is being dumped --
  h1..h6 vs just header
- tweak configure to (a) use the modern standard uintXX_t types for
  DWORD, WORD, BYTE if possible and (b) if a program is defined via an
  environment variable (like CC) try to use that variable instead of
  doing a path search in AC_PROG
- tweak how scalar headers are include in .in files
- support external code formatters
- add an external code block formatter to the markdown program
- mkd2html wasn't passing pgm to hoptusage()
- mkd2html wasn't properly handling two arguments for input & output
  files. While I was at it, add the -G option to use gfm_in() to read
  the input file in (and preserve newlines)


(schmonz)
diff -r1.8 -r1.9 pkgsrc/textproc/discount/Makefile
diff -r1.9 -r1.10 pkgsrc/textproc/discount/distinfo
diff -r1.2 -r1.3 pkgsrc/textproc/discount/patches/patch-Makefile.in
diff -r1.2 -r1.3 pkgsrc/textproc/discount/patches/patch-generate.c

cvs diff -r1.8 -r1.9 pkgsrc/textproc/discount/Makefile (expand / switch to unified diff)

--- pkgsrc/textproc/discount/Makefile 2018/08/27 20:46:18 1.8
+++ pkgsrc/textproc/discount/Makefile 2019/06/10 13:32:56 1.9
@@ -1,28 +1,35 @@ @@ -1,28 +1,35 @@
1# $NetBSD: Makefile,v 1.8 2018/08/27 20:46:18 schmonz Exp $ 1# $NetBSD: Makefile,v 1.9 2019/06/10 13:32:56 schmonz Exp $
2# 2#
3 3
4DISTNAME= discount-2.2.4 4GITHUB_PROJECT= discount
 5DISTNAME= v2.2.6
 6PKGNAME= ${GITHUB_PROJECT}-${DISTNAME:S/^v//}
5CATEGORIES= textproc 7CATEGORIES= textproc
6MASTER_SITES= ${HOMEPAGE} 8MASTER_SITES= ${MASTER_SITE_GITHUB:=Orc/}
7EXTRACT_SUFX= .tar.bz2 9DIST_SUBDIR= ${GITHUB_PROJECT}
8 10
9MAINTAINER= zecrazytux@zecrazytux.net 11MAINTAINER= zecrazytux@zecrazytux.net
10HOMEPAGE= http://www.pell.portland.or.us/~orc/Code/discount/ 12HOMEPAGE= http://www.pell.portland.or.us/~orc/Code/discount/
11COMMENT= Markdown C implementation 13COMMENT= Markdown C implementation
12LICENSE= modified-bsd 14LICENSE= modified-bsd
13 15
 16WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
 17
14HAS_CONFIGURE= YES 18HAS_CONFIGURE= YES
15CONFIGURE_SCRIPT= ./configure.sh 19CONFIGURE_SCRIPT= ./configure.sh
16CONFIGURE_ARGS= --prefix=${PREFIX} 20CONFIGURE_ARGS= --prefix=${PREFIX}
17CONFIGURE_ARGS+= --execdir=${PREFIX}/bin 21CONFIGURE_ARGS+= --execdir=${PREFIX}/bin
18CONFIGURE_ARGS+= --libdir=${PREFIX}/lib 22CONFIGURE_ARGS+= --libdir=${PREFIX}/lib
19CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR} 23CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}
20CONFIGURE_ARGS+= --shared 24CONFIGURE_ARGS+= --shared
21CONFIGURE_ARGS+= --enable-all-features 25CONFIGURE_ARGS+= --enable-all-features
22 26
 27USE_TOOLS+= pkg-config
23USE_LIBTOOL= yes 28USE_LIBTOOL= yes
24 29
 30PKGCONFIG_OVERRIDE+= libmarkdown.pc.in
 31
25INSTALL_TARGET= install.everything 32INSTALL_TARGET= install.everything
26TEST_TARGET= test 33TEST_TARGET= test
27 34
28.include "../../mk/bsd.pkg.mk" 35.include "../../mk/bsd.pkg.mk"

cvs diff -r1.9 -r1.10 pkgsrc/textproc/discount/distinfo (expand / switch to unified diff)

--- pkgsrc/textproc/discount/distinfo 2018/08/27 20:46:18 1.9
+++ pkgsrc/textproc/discount/distinfo 2019/06/10 13:32:56 1.10
@@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
1$NetBSD: distinfo,v 1.9 2018/08/27 20:46:18 schmonz Exp $ 1$NetBSD: distinfo,v 1.10 2019/06/10 13:32:56 schmonz Exp $
2 2
3SHA1 (discount-2.2.4.tar.bz2) = 038e754afe234d92e5f327353fab5772c3f97f63 3SHA1 (discount/v2.2.6.tar.gz) = 36aeb512a4429e3a672f5e6803dcd59d5ac1a817
4RMD160 (discount-2.2.4.tar.bz2) = 5270054635d152d81acb81a8d87f29a98750a1a0 4RMD160 (discount/v2.2.6.tar.gz) = ebd9a877842998afda0d0f1a2821280b16c9d16e
5SHA512 (discount-2.2.4.tar.bz2) = 0650e0ce3f6948e3a30fdaa1a810e895f64621c55df46c7a5ed8755e65c1b718b7a1d1a1bfe0a87a3a59fbb13fca8907718f1aa095125a4b6e152602b8e490cf 5SHA512 (discount/v2.2.6.tar.gz) = 4c5956dea78aacd3a105ddac13f1671d811a5b2b04990cdf8485c36190c8872c4b1b9432a7236f669c34b07564ecd0096632dced54d67de9eaf4f23641417ecc
6Size (discount-2.2.4.tar.bz2) = 99482 bytes 6Size (discount/v2.2.6.tar.gz) = 128790 bytes
7SHA1 (patch-Makefile.in) = 66270dca27485373279bd9ce8c445cc5a931e29a 7SHA1 (patch-Makefile.in) = cee33665390bc83d83bf6925886ae945254b66a8
8SHA1 (patch-generate.c) = 40ba6619c592531724ed78df5ffc99998e55498e 8SHA1 (patch-generate.c) = ca870b8ecf485bd14e9b3302c90fc4a97d73c2f7

cvs diff -r1.2 -r1.3 pkgsrc/textproc/discount/patches/patch-Makefile.in (expand / switch to unified diff)

--- pkgsrc/textproc/discount/patches/patch-Makefile.in 2018/04/23 14:42:03 1.2
+++ pkgsrc/textproc/discount/patches/patch-Makefile.in 2019/06/10 13:32:56 1.3
@@ -1,89 +1,92 @@ @@ -1,89 +1,92 @@
1$NetBSD: patch-Makefile.in,v 1.2 2018/04/23 14:42:03 schmonz Exp $ 1$NetBSD: patch-Makefile.in,v 1.3 2019/06/10 13:32:56 schmonz Exp $
2 2
3Libtoolize for portability across pkgsrc platforms. 3Libtoolize for portability across pkgsrc platforms.
4 4
5--- Makefile.in.orig 2018-03-02 22:52:05.000000000 +0000 5--- Makefile.in.orig 2019-04-15 15:28:20.000000000 +0000
6+++ Makefile.in 6+++ Makefile.in
7@@ -1,3 +1,8 @@ 7@@ -1,3 +1,4 @@
8+LIBTOOL=libtool --tag=CC 8+LIBTOOL=libtool --tag=CC
9+ 9 CC=@CC@
10+.c.o: 
11+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $< 
12+ 
13 CC=@CC@ -I. 
14 LFLAGS=-L. 
15 CFLAGS=@CFLAGS@ 10 CFLAGS=@CFLAGS@
16@@ -29,8 +34,10 @@ MAN3PAGES=mkd-callbacks.3 mkd-functions. 11 LDFLAGS=@LDFLAGS@
 12@@ -7,8 +8,8 @@ INSTALL_PROGRAM=@INSTALL_PROGRAM@
 13 INSTALL_DIR=@INSTALL_DIR@
 14 INSTALL_DATA=@INSTALL_DATA@
 15
 16-BUILD=$(CC) -I. $(CFLAGS)
 17-LINK=$(CC) -L. $(LDFLAGS)
 18+BUILD=$(LIBTOOL) --mode=compile $(CC) -I. $(CFLAGS)
 19+LINK=$(LIBTOOL) --mode=link $(CC) -L. $(LDFLAGS)
 20
 21 .c.o:
 22 $(BUILD) -c -o $@ $<
 23@@ -39,8 +40,10 @@ MAN3PAGES=mkd-callbacks.3 mkd-functions.
17 all: $(PGMS) $(SAMPLE_PGMS) $(TESTFRAMEWORK) 24 all: $(PGMS) $(SAMPLE_PGMS) $(TESTFRAMEWORK)
18  25
19 install: $(PGMS) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCDIR) $(DESTDIR)$(PKGDIR) 26 install: $(PGMS) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCDIR) $(DESTDIR)$(PKGDIR)
20- @INSTALL_PROGRAM@ $(PGMS) $(DESTDIR)$(BINDIR) 27- $(INSTALL_PROGRAM) $(PGMS) $(DESTDIR)$(BINDIR)
21- ./librarian.sh install libmarkdown VERSION $(DESTDIR)$(LIBDIR) 28- ./librarian.sh install libmarkdown VERSION $(DESTDIR)$(LIBDIR)
22+ for x in $(PGMS); do \ 29+ for x in $(PGMS); do \
23+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) $$x $(DESTDIR)$(BINDIR)/$$x; \ 30+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) $$x $(DESTDIR)$(BINDIR)/$$x; \
24+ done 31+ done
25+ $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) $(MKDLIB).la $(DESTDIR)$(LIBDIR)/$(MKDLIB).la 32+ $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) $(MKDLIB).la $(DESTDIR)$(LIBDIR)/$(MKDLIB).la
26 @INSTALL_DATA@ mkdio.h $(DESTDIR)$(INCDIR) 33 $(INSTALL_DATA) mkdio.h $(DESTDIR)$(INCDIR)
27 @MK_PKGCONFIG@@INSTALL_DATA@ $(MKDLIB).pc $(DESTDIR)$(PKGDIR) 34 @MK_PKGCONFIG@$(INSTALL_DATA) $(MKDLIB).pc $(DESTDIR)$(PKGDIR)
28  35
29@@ -39,7 +46,7 @@ install.everything: install install.samp 36@@ -49,7 +52,7 @@ install.everything: install install.samp
30 install.samples: $(SAMPLE_PGMS) install $(DESTDIR)$(BINDIR) 37 install.samples: $(SAMPLE_PGMS) install $(DESTDIR)$(BINDIR)
31 @INSTALL_DIR@ $(DESTDIR)$(MANDIR)/man1 38 $(INSTALL_DIR) $(DESTDIR)$(MANDIR)/man1
32 for x in $(SAMPLE_PGMS); do \ 39 for x in $(SAMPLE_PGMS); do \
33- @INSTALL_PROGRAM@ $$x $(DESTDIR)$(BINDIR)/$(SAMPLE_PFX)$$x; \ 40- $(INSTALL_PROGRAM) $$x $(DESTDIR)$(BINDIR)/$(SAMPLE_PFX)$$x; \
34+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) $$x $(DESTDIR)$(BINDIR)/$(SAMPLE_PFX)$$x; \ 41+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) $$x $(DESTDIR)$(BINDIR)/$(SAMPLE_PFX)$$x; \
35 @INSTALL_DATA@ $$x.1 $(DESTDIR)$(MANDIR)/man1/$(SAMPLE_PFX)$$x.1; \ 42 $(INSTALL_DATA) $$x.1 $(DESTDIR)$(MANDIR)/man1/$(SAMPLE_PFX)$$x.1; \
36 done 43 done
37  44
38@@ -75,7 +82,7 @@ $(DESTDIR)$(LIBDIR): 45@@ -100,19 +103,19 @@ mktags: mktags.o
39 @MK_PKGCONFIG@ @INSTALL_DIR@ $(DESTDIR)$(PKGDIR) 
40  
41 version.o: version.c VERSION branch 
42- $(CC) $(CFLAGS) -DBRANCH=`./branch` -DVERSION=\"`cat VERSION`\" -c version.c 
43+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -DBRANCH=`./branch` -DVERSION=\"`cat VERSION`\" -c version.c 
44  
45 VERSION: 
46 @true 
47@@ -87,20 +94,19 @@ blocktags: mktags 
48  46
49 # example programs 47 # example programs
50 @THEME@theme: theme.o $(COMMON) $(MKDLIB) mkdio.h 48 @THEME@theme: theme.o $(COMMON) $(MKDLIB) mkdio.h
51-@THEME@ $(CC) $(CFLAGS) $(LFLAGS) -o theme theme.o $(COMMON) -lmarkdown @LIBS@ 49-@THEME@ $(LINK) -o theme theme.o $(COMMON) -lmarkdown @LIBS@
52+@THEME@ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LFLAGS) -o theme theme.o $(COMMON) $(MKDLIB).la @LIBS@ 50+@THEME@ $(LINK) -o theme theme.o $(COMMON) $(MKDLIB).la @LIBS@
 51
53  52
54- 53 mkd2html: mkd2html.o $(MKDLIB) mkdio.h gethopt.h $(COMMON)
55-mkd2html: mkd2html.o $(MKDLIB) mkdio.h gethopt.h $(COMMON) 54- $(LINK) -o mkd2html mkd2html.o $(COMMON) -lmarkdown @LIBS@
56- $(CC) $(CFLAGS) $(LFLAGS) -o mkd2html mkd2html.o $(COMMON) -lmarkdown @LIBS@ 55+ $(LINK) -o mkd2html mkd2html.o $(COMMON) $(MKDLIB).la @LIBS@
57+mkd2html: mkd2html.o $(COMMON) $(MKDLIB) 
58+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LFLAGS) -o mkd2html mkd2html.o $(COMMON) $(MKDLIB).la @LIBS@ 
59  56
60 markdown: main.o $(COMMON) $(MKDLIB) 57 markdown: main.o $(COMMON) $(MKDLIB)
61- $(CC) $(CFLAGS) $(LFLAGS) -o markdown main.o $(COMMON) -lmarkdown @LIBS@ 58- $(LINK) -o markdown main.o $(COMMON) -lmarkdown @LIBS@
62+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LFLAGS) -o markdown main.o $(COMMON) $(MKDLIB).la @LIBS@ 59+ $(LINK) -o markdown main.o $(COMMON) $(MKDLIB).la @LIBS@
63  60
64-makepage: makepage.c $(COMMON) $(MKDLIB) mkdio.h 61 makepage.o: makepage.c mkdio.h
65- $(CC) $(CFLAGS) $(LFLAGS) -o makepage makepage.c $(COMMON) -lmarkdown @LIBS@ 62 $(BUILD) -c makepage.c
66+makepage: makepage.o $(COMMON) $(MKDLIB) 63 makepage: makepage.o $(COMMON) $(MKDLIB)
67+ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LFLAGS) -o makepage makepage.o $(COMMON) $(MKDLIB).la @LIBS@ 64- $(LINK) -o makepage makepage.o $(COMMON) -lmarkdown @LIBS@
 65+ $(LINK) -o makepage makepage.o $(COMMON) $(MKDLIB).la @LIBS@
68  66
69 pgm_options.o: pgm_options.c mkdio.h config.h 67 pgm_options.o: pgm_options.c mkdio.h config.h
70- $(CC) $(CFLAGS) -I. -c pgm_options.c 68 $(BUILD) -c pgm_options.c
71+ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -I. -c pgm_options.c 69@@ -126,8 +129,12 @@ gethopt.o: gethopt.c
72  
73 notspecial.o: notspecial.c 
74 $(CC) $(CFLAGS) -I. -c notspecial.c 
75@@ -111,8 +117,12 @@ gethopt.o: gethopt.c 
76 main.o: main.c mkdio.h config.h 70 main.o: main.c mkdio.h config.h
77 $(CC) $(CFLAGS) -I. -c main.c 71 $(BUILD) -c main.c
78  72
79-$(MKDLIB): $(OBJS) 73-$(MKDLIB): $(OBJS)
80- ./librarian.sh make $(MKDLIB) VERSION $(OBJS) 74- ./librarian.sh make $(MKDLIB) VERSION $(OBJS)
81+libtool-version-info: VERSION 75+libtool-version-info: VERSION
82+ awk -F. '{ printf "%d:%d:0\n", $$1 - 1, $$2 }' < VERSION > libtool-version-info 76+ awk -F. '{ printf "%d:%d:0\n", $$1 - 1, $$2 }' < VERSION > libtool-version-info
83+ 77+
84+$(MKDLIB): $(MKDLIB).la 78+$(MKDLIB): $(MKDLIB).la
85+$(MKDLIB).la: $(OBJS) libtool-version-info 79+$(MKDLIB).la: $(OBJS) libtool-version-info
86+ $(LIBTOOL) --mode=link @CC@ $(LDFLAGS) -o $(MKDLIB).la $(OBJS:S/.o/.lo/g) -version-info `cat libtool-version-info` -rpath $(LIBDIR) 80+ $(LINK) -o $(MKDLIB).la $(OBJS:S/.o/.lo/g) -version-info `cat libtool-version-info` -rpath $(LIBDIR)
87  81
88 verify: echo tools/checkbits.sh 82 verify: echo tools/checkbits.sh
89 @./echo -n "headers ... "; tools/checkbits.sh && echo "GOOD" 83 @./echo -n "headers ... "; tools/checkbits.sh && echo "GOOD"
 84@@ -139,7 +146,7 @@ test: $(PGMS) $(TESTFRAMEWORK) verify
 85
 86 pandoc_headers.o: tools/pandoc_headers.c config.h
 87 $(BUILD) -c -o pandoc_headers.o tools/pandoc_headers.c
 88-pandoc_headers: pandoc_headers.o
 89+pandoc_headers: pandoc_headers.o $(COMMON) $(MKDLIB)
 90 $(LINK) -o pandoc_headers pandoc_headers.o $(COMMON) -lmarkdown
 91
 92 branch.o: tools/branch.c config.h

cvs diff -r1.2 -r1.3 pkgsrc/textproc/discount/patches/patch-generate.c (expand / switch to unified diff)

--- pkgsrc/textproc/discount/patches/patch-generate.c 2018/07/27 15:50:45 1.2
+++ pkgsrc/textproc/discount/patches/patch-generate.c 2019/06/10 13:32:56 1.3
@@ -1,42 +1,42 @@ @@ -1,42 +1,42 @@
1$NetBSD: patch-generate.c,v 1.2 2018/07/27 15:50:45 schmonz Exp $ 1$NetBSD: patch-generate.c,v 1.3 2019/06/10 13:32:56 schmonz Exp $
2 2
3Fix self-tests on NetBSD. 3Fix self-tests on NetBSD.
4 4
5--- generate.c.orig 2018-03-02 22:52:05.000000000 +0000 5--- generate.c.orig 2019-04-15 15:28:20.000000000 +0000
6+++ generate.c 6+++ generate.c
7@@ -747,7 +747,7 @@ linkylinky(int image, MMIOT *f) 7@@ -757,7 +757,7 @@ linkylinky(int image, MMIOT *f)
8 else { 8 else {
9 int goodlink, implicit_mark = mmiottell(f); 9 int goodlink, implicit_mark = mmiottell(f);
10  10
11- if ( isspace(peek(f,1)) ) 11- if ( isspace(peek(f,1)) )
12+ if ( isspace((unsigned char)peek(f,1)) ) 12+ if ( isspace((unsigned char)peek(f,1)) )
13 pull(f); 13 pull(f);
14  14
15 if ( peek(f,1) == '[' ) { 15 if ( peek(f,1) == '[' ) {
16@@ -1151,7 +1151,7 @@ islike(MMIOT *f, char *s) 16@@ -1161,7 +1161,7 @@ islike(MMIOT *f, char *s)
17 } 17 }
18  18
19 for (i=1; i < len; i++) 19 for (i=1; i < len; i++)
20- if (tolower(peek(f,i)) != s[i]) 20- if (tolower(peek(f,i)) != s[i])
21+ if (tolower((unsigned char)peek(f,i)) != s[i]) 21+ if (tolower((unsigned char)peek(f,i)) != s[i])
22 return 0; 22 return 0;
23 return 1; 23 return 1;
24 } 24 }
25@@ -1269,7 +1269,7 @@ tickhandler(MMIOT *f, int tickchar, int  25@@ -1281,7 +1281,7 @@ tickhandler(MMIOT *f, int tickchar, int
26 int endticks, size; 26 int endticks, size;
27 int tick = nrticks(0, tickchar, f); 27 int tick = nrticks(0, tickchar, f);
28  28
29- if ( !allow_space && isspace(peek(f,tick)) ) 29- if ( !allow_space && isspace(peek(f,tick)) )
30+ if ( !allow_space && isspace((unsigned char)peek(f,tick)) ) 30+ if ( !allow_space && isspace((unsigned char)peek(f,tick)) )
31 return 0; 31 return 0;
32  32
33 if ( (tick >= minticks) && (size = matchticks(f,tickchar,tick,&endticks)) ) { 33 if ( (tick >= minticks) && (size = matchticks(f,tickchar,tick,&endticks)) ) {
34@@ -1297,7 +1297,7 @@ text(MMIOT *f) 34@@ -1309,7 +1309,7 @@ text(MMIOT *f)
35 int smartyflags = 0; 35 int smartyflags = 0;
36  36
37 while (1) { 37 while (1) {
38- if ( (f->flags & MKD_AUTOLINK) && isalpha(peek(f,1)) && !tag_text(f) ) 38- if ( is_flag_set(f->flags, MKD_AUTOLINK) && isalpha(peek(f,1)) && !tag_text(f) )
39+ if ( (f->flags & MKD_AUTOLINK) && isalpha((unsigned char)peek(f,1)) && !tag_text(f) ) 39+ if ( is_flag_set(f->flags, MKD_AUTOLINK) && isalpha((unsigned char)peek(f,1)) && !tag_text(f) )
40 maybe_autolink(f); 40 maybe_autolink(f);
41  41
42 c = pull(f); 42 c = pull(f);