summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-22 19:10:48 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-22 19:10:48 +0000
commit88d20eead0ae7a10800a000fd389e1b49ed6431e (patch)
treea0bbda1b5b19b4230610a6bed451488681d84755
parentcbab9e7de022e9e548c5f200ceb9b259492b1fb8 (diff)
downloadmandoc-88d20eead0ae7a10800a000fd389e1b49ed6431e.tar.gz
mandoc-88d20eead0ae7a10800a000fd389e1b49ed6431e.tar.zst
mandoc-88d20eead0ae7a10800a000fd389e1b49ed6431e.zip
Lint fixes.
-rw-r--r--Makefile1
-rw-r--r--main.c5
-rw-r--r--terminal.c10
3 files changed, 9 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 147f7ad0..b357c99f 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,7 @@ CFLAGS += $(VFLAGS)
# If you want to strip `Xo/Xc' macro pairs, enable this. Really, only
# OpenBSD should be doing this while it kicks its cruft.
CFLAGS += -DSTRIP_XO
+LINTFLAGS += -DSTRIP_XO
LIBLNS = macro.ln mdoc.ln hash.ln strings.ln xstd.ln argv.ln \
validate.ln action.ln lib.ln att.ln arch.ln vol.ln \
diff --git a/main.c b/main.c
index 889b3387..71836e3a 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.8 2009/03/22 19:01:11 kristaps Exp $ */
+/* $Id: main.c,v 1.9 2009/03/22 19:10:48 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@openbsd.org>
*
@@ -401,13 +401,14 @@ fdesc(struct buf *blk, struct buf *ln,
lnn++;
continue;
}
+ macro = 0;
#endif /* STRIP_XO */
ln->buf[pos] = 0;
if ( ! mdoc_parseln(mdoc, lnn, ln->buf))
return(0);
lnn++;
- macro = pos = 0;
+ pos = 0;
}
}
diff --git a/terminal.c b/terminal.c
index db993159..d007e833 100644
--- a/terminal.c
+++ b/terminal.c
@@ -1,4 +1,4 @@
-/* $Id: terminal.c,v 1.5 2009/03/21 13:09:29 kristaps Exp $ */
+/* $Id: terminal.c,v 1.6 2009/03/22 19:10:48 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@openbsd.org>
*
@@ -46,8 +46,8 @@ static void term_nescape(struct termp *,
static void term_chara(struct termp *, char);
static void term_stringa(struct termp *,
const char *, size_t);
-static int term_isopendelim(const char *, size_t);
-static int term_isclosedelim(const char *, size_t);
+static int term_isopendelim(const char *, int);
+static int term_isclosedelim(const char *, int);
static void sanity(const struct mdoc_node *); /* XXX */
@@ -129,7 +129,7 @@ term_alloc(enum termenc enc)
static int
-term_isclosedelim(const char *p, size_t len)
+term_isclosedelim(const char *p, int len)
{
if (1 != len)
@@ -163,7 +163,7 @@ term_isclosedelim(const char *p, size_t len)
static int
-term_isopendelim(const char *p, size_t len)
+term_isopendelim(const char *p, int len)
{
if (1 != len)