From 0ed26b313243fe8d50014289e52f043f61782286 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 25 Feb 2009 12:32:50 +0000 Subject: NetBSD Lintified. --- index.sgml | 20 ++++++++++++-------- strings.c | 12 ++++++------ validate.c | 8 ++++---- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/index.sgml b/index.sgml index 4dcba802..14fc1815 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

@@ -132,7 +136,7 @@
- Copyright © 2009 Kristaps Džonsons, $Date: 2009/02/24 12:20:52 $ + Copyright © 2009 Kristaps Džonsons, $Date: 2009/02/25 12:32:50 $
diff --git a/strings.c b/strings.c index accca571..78ff9d9a 100644 --- a/strings.c +++ b/strings.c @@ -1,4 +1,4 @@ -/* $Id: strings.c,v 1.18 2009/02/24 14:52:55 kristaps Exp $ */ +/* $Id: strings.c,v 1.19 2009/02/25 12:32:50 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -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); @@ -178,9 +178,9 @@ mdoc_atotime(const char *p) (void)memset(&tm, 0, sizeof(struct tm)); - if (xstrcmp(p, "$Mdocdate: February 24 2009 $")) + if (xstrcmp(p, "$Mdocdate: February 25 2009 $")) return(time(NULL)); - if ((pp = strptime(p, "$Mdocdate: February 24 2009 $", &tm)) && 0 == *pp) + if ((pp = strptime(p, "$Mdocdate: February 25 2009 $", &tm)) && 0 == *pp) return(mktime(&tm)); /* XXX - this matches "June 1999", which is wrong. */ if ((pp = strptime(p, "%b %d %Y", &tm)) && 0 == *pp) diff --git a/validate.c b/validate.c index 7b109965..72a5dea0 100644 --- a/validate.c +++ b/validate.c @@ -1,4 +1,4 @@ -/* $Id: validate.c,v 1.59 2009/02/25 11:37:05 kristaps Exp $ */ +/* $Id: validate.c,v 1.60 2009/02/25 12:32:50 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -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 v1.2.3-56-ge451