summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-09-16 20:49:06 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-09-16 20:49:06 +0000
commitfff866326138584471c95aa4b65f20e473c455a2 (patch)
treea51827a1a1b7cd70e35319d29e5fe183c31e64af
parent7247395c704e001fab02fd797a5d6dac44de2fd8 (diff)
downloadmandoc-fff866326138584471c95aa4b65f20e473c455a2.tar.gz
Lintifications.
-rw-r--r--man_hash.c4
-rw-r--r--mdoc_action.c2
-rw-r--r--mdoc_hash.c4
-rw-r--r--mdoc_macro.c26
4 files changed, 18 insertions, 18 deletions
diff --git a/man_hash.c b/man_hash.c
index 9d8f6c09..4d839d7d 100644
--- a/man_hash.c
+++ b/man_hash.c
@@ -22,7 +22,7 @@
#include "libman.h"
-static unsigned char table[26 * 6];
+static u_char table[26 * 6];
void
@@ -42,7 +42,7 @@ man_hash_init(void)
for (j = 0; j < 6; j++)
if (UCHAR_MAX == table[x + j]) {
- table[x + j] = i;
+ table[x + j] = (u_char)i;
break;
}
assert(j < 6);
diff --git a/mdoc_action.c b/mdoc_action.c
index 13267a87..8a58bcc8 100644
--- a/mdoc_action.c
+++ b/mdoc_action.c
@@ -53,7 +53,7 @@ static int post_tilde(POST_ARGS);
static int pre_bd(PRE_ARGS);
static int pre_dl(PRE_ARGS);
-const struct actions mdoc_actions[MDOC_MAX] = {
+static const struct actions mdoc_actions[MDOC_MAX] = {
{ NULL, NULL }, /* Ap */
{ NULL, post_dd }, /* Dd */
{ NULL, post_dt }, /* Dt */
diff --git a/mdoc_hash.c b/mdoc_hash.c
index 44e147f7..4088e79a 100644
--- a/mdoc_hash.c
+++ b/mdoc_hash.c
@@ -25,7 +25,7 @@
#include "libmdoc.h"
-static unsigned char table[27 * 12];
+static u_char table[27 * 12];
void
@@ -46,7 +46,7 @@ mdoc_hash_init(void)
for (j = 0; j < 12; j++)
if (UCHAR_MAX == table[major + j]) {
- table[major + j] = i;
+ table[major + j] = (u_char)i;
break;
}
diff --git a/mdoc_macro.c b/mdoc_macro.c
index 704fbd8b..9e70cc80 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -46,8 +46,8 @@ static int rew_sub(enum mdoc_type, struct mdoc *,
static int rew_last(struct mdoc *,
const struct mdoc_node *);
static int append_delims(struct mdoc *, int, int *, char *);
-static int lookup(struct mdoc *, int, const char *);
-static int lookup_raw(struct mdoc *, const char *);
+static int lookup(int, const char *);
+static int lookup_raw(const char *);
static int swarn(struct mdoc *, enum mdoc_type, int, int,
const struct mdoc_node *);
@@ -258,12 +258,12 @@ mdoc_macroend(struct mdoc *m)
* Look up a macro from within a subsequent context.
*/
static int
-lookup(struct mdoc *mdoc, int from, const char *p)
+lookup(int from, const char *p)
{
if ( ! (MDOC_PARSED & mdoc_macros[from].flags))
return(MDOC_MAX);
- return(lookup_raw(mdoc, p));
+ return(lookup_raw(p));
}
@@ -271,7 +271,7 @@ lookup(struct mdoc *mdoc, int from, const char *p)
* Lookup a macro following the initial line macro.
*/
static int
-lookup_raw(struct mdoc *mdoc, const char *p)
+lookup_raw(const char *p)
{
int res;
@@ -669,7 +669,7 @@ blk_exp_close(MACRO_PROT_ARGS)
if (ARGS_EOLN == c)
break;
- if (MDOC_MAX != (c = lookup(m, tok, p))) {
+ if (MDOC_MAX != (c = lookup(tok, p))) {
if ( ! flushed) {
if ( ! rew_sub(MDOC_BLOCK, m, tok, line, ppos))
return(0);
@@ -753,7 +753,7 @@ in_line(MACRO_PROT_ARGS)
/* Quoted words shouldn't be looked-up. */
- c = ARGS_QWORD == w ? MDOC_MAX : lookup(m, tok, p);
+ c = ARGS_QWORD == w ? MDOC_MAX : lookup(tok, p);
/*
* In this case, we've located a submacro and must
@@ -932,7 +932,7 @@ blk_full(MACRO_PROT_ARGS)
continue;
}
- if (MDOC_MAX == (c = lookup(m, tok, p))) {
+ if (MDOC_MAX == (c = lookup(tok, p))) {
if ( ! mdoc_word_alloc(m, line, lastarg, p))
return(0);
continue;
@@ -995,7 +995,7 @@ blk_part_imp(MACRO_PROT_ARGS)
if (ARGS_EOLN == c)
break;
- if (MDOC_MAX == (c = lookup(m, tok, p))) {
+ if (MDOC_MAX == (c = lookup(tok, p))) {
if ( ! mdoc_word_alloc(m, line, la, p))
return(0);
continue;
@@ -1098,7 +1098,7 @@ blk_part_exp(MACRO_PROT_ARGS)
if (ARGS_EOLN == c)
break;
- if (MDOC_MAX != (c = lookup(m, tok, p))) {
+ if (MDOC_MAX != (c = lookup(tok, p))) {
if ( ! flushed) {
if ( ! rew_sub(MDOC_HEAD, m, tok, line, ppos))
return(0);
@@ -1209,7 +1209,7 @@ in_line_argn(MACRO_PROT_ARGS)
if (ARGS_EOLN == c)
break;
- if (MDOC_MAX != (c = lookup(m, tok, p))) {
+ if (MDOC_MAX != (c = lookup(tok, p))) {
if ( ! flushed && ! rew_elem(m, tok))
return(0);
flushed = 1;
@@ -1284,7 +1284,7 @@ in_line_eoln(MACRO_PROT_ARGS)
if (ARGS_EOLN == w)
break;
- c = ARGS_QWORD == w ? MDOC_MAX : lookup(m, tok, p);
+ c = ARGS_QWORD == w ? MDOC_MAX : lookup(tok, p);
if (MDOC_MAX != c) {
if ( ! rew_elem(m, tok))
@@ -1333,7 +1333,7 @@ phrase(struct mdoc *m, int line, int ppos, char *buf)
if (ARGS_EOLN == w)
break;
- c = ARGS_QWORD == w ? MDOC_MAX : lookup_raw(m, p);
+ c = ARGS_QWORD == w ? MDOC_MAX : lookup_raw(p);
if (MDOC_MAX != c) {
if ( ! mdoc_macro(m, c, line, la, &pos, buf))