From 2cafdf2a4b325553b7a37c10f6abc2723984cfcb Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 25 Feb 2009 12:32:50 +0000 Subject: NetBSD Lintified. --- index.sgml | 18 +++++++++++------- strings.c | 6 +++--- validate.c | 6 +++--- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/index.sgml b/index.sgml index c2b07154..8bfee954 100644 --- a/index.sgml +++ b/index.sgml @@ -86,7 +86,9 @@ % cd /tmp
% ftp -V -o- http://mdocml.bsd.lv/snapshots/mdocml.tar.gz | tar -zvxf -
% cd mdocml
- % make && make regress && make install + % make all
+ % make regress
+ # make install

@@ -100,12 +102,14 @@

- % sudo pkg_delete mdocml
- % cd /usr/ports/devel/
- % sudo rm -rf mdocml
- % ftp -V -o- http://mdocml.bsd.lv/ports-openbsd/mdocml.tar.gz | sudo tar -zvxf -
- % cd mdocml
- % sudo make && sudo make regress && sudo make install + # pkg_delete mdocml
+ # cd /usr/ports/devel/
+ # rm -rf mdocml
+ # ftp -V -o- http://mdocml.bsd.lv/ports-openbsd/mdocml.tar.gz | tar -zvxf -
+ # cd mdocml
+ # make build
+ # make regress
+ # make install

diff --git a/strings.c b/strings.c index ec96904c..632f4db9 100644 --- a/strings.c +++ b/strings.c @@ -62,9 +62,9 @@ mdoc_isescape(const char *p) case ('e'): return(2); case ('('): - if (0 == *++p || ! isgraph(*p)) + if (0 == *++p || ! isgraph((int)*p)) return(0); - if (0 == *++p || ! isgraph(*p)) + if (0 == *++p || ! isgraph((int)*p)) return(0); return(4); case ('['): @@ -74,7 +74,7 @@ mdoc_isescape(const char *p) } for (c = 3, p++; *p && ']' != *p; p++, c++) - if ( ! isgraph(*p)) + if ( ! isgraph((int)*p)) break; return(*p == ']' ? c : 0); diff --git a/validate.c b/validate.c index c4fbfa48..3a0acbc4 100644 --- a/validate.c +++ b/validate.c @@ -481,7 +481,7 @@ check_text(struct mdoc *mdoc, size_t line, size_t pos, const char *p) size_t c; for ( ; *p; p++) { - if ( ! isprint(*p) && '\t' != *p) + if ( ! isprint((int)*p) && '\t' != *p) return(mdoc_perr(mdoc, line, pos, "invalid characters")); if ('\\' != *p) @@ -540,7 +540,7 @@ pre_display(PRE_ARGS) static int pre_bl(PRE_ARGS) { - int type, err, i; + int type, i; struct mdoc_arg *argv; size_t argc; @@ -552,7 +552,7 @@ pre_bl(PRE_ARGS) /* Make sure that only one type of list is specified. */ /* LINTED */ - for (i = 0, type = err = 0; i < (int)argc; i++) { + for (i = 0, type = 0; i < (int)argc; i++) { argv = &n->data.block.argv[i]; switch (argv->arg) { -- cgit