From b3bbf7061a5906d3086a9fa08f36d77d77302e81 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Tue, 24 Feb 2009 11:43:13 +0000 Subject: Escape-sequence validation in place (for nodes). --- argv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'argv.c') diff --git a/argv.c b/argv.c index 5f591f3c..e9eafffc 100644 --- a/argv.c +++ b/argv.c @@ -1,4 +1,4 @@ -/* $Id: argv.c,v 1.29 2009/02/23 15:34:53 kristaps Exp $ */ +/* $Id: argv.c,v 1.30 2009/02/24 11:43:13 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -35,7 +35,7 @@ #define ARGS_DELIM (1 << 1) #define ARGS_TABSEP (1 << 2) -static int lookup(int, const char *); +static int argv_a2arg(int, const char *); static int args(struct mdoc *, int, int *, char *, int, char **); static int argv(struct mdoc *, int, @@ -466,7 +466,7 @@ args(struct mdoc *mdoc, int line, static int -lookup(int tok, const char *argv) +argv_a2arg(int tok, const char *argv) { switch (tok) { @@ -747,7 +747,7 @@ mdoc_argv(struct mdoc *mdoc, int line, int tok, if (buf[*pos]) buf[(*pos)++] = 0; - if (MDOC_ARG_MAX == (v->arg = lookup(tok, p))) { + if (MDOC_ARG_MAX == (v->arg = argv_a2arg(tok, p))) { if ( ! pwarn(mdoc, line, i, WARGVPARM)) return(ARGV_ERROR); return(ARGV_WORD); -- cgit v1.2.3