summaryrefslogtreecommitdiffstats
path: root/argv.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-12 16:30:50 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-12 16:30:50 +0000
commit03f7a9976b388e476f2850c33f22cc63572f6a48 (patch)
tree212211aed9deabbdb3b4aabe5c95343e84e0bb28 /argv.c
parentdd35a6706a756677ff1c2734a6eb2fad8a6784fb (diff)
downloadmandoc-03f7a9976b388e476f2850c33f22cc63572f6a48.tar.gz
Added -nested (doesn't do anything).
Added .%C. .Cd is now callable. Added .Rv -std.
Diffstat (limited to 'argv.c')
-rw-r--r--argv.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/argv.c b/argv.c
index 1742e1cb..7228e5f4 100644
--- a/argv.c
+++ b/argv.c
@@ -94,10 +94,11 @@ static int mdoc_argvflags[MDOC_ARG_MAX] = {
ARGV_MULTI, /* MDOC_Column */
ARGV_SINGLE, /* MDOC_Width */
ARGV_NONE, /* MDOC_Compact */
- ARGV_SINGLE, /* MDOC_Std */
+ ARGV_OPT_SINGLE, /* MDOC_Std */
ARGV_NONE, /* MDOC_Filled */
ARGV_NONE, /* MDOC_Words */
ARGV_NONE, /* MDOC_Emphasis */
+ ARGV_NONE, /* MDOC_Symbolic */
ARGV_NONE /* MDOC_Symbolic */
};
@@ -216,6 +217,7 @@ static int mdoc_argflags[MDOC_MAX] = {
ARGS_DELIM, /* Brq */
0, /* Bro */
ARGS_DELIM, /* Brc */
+ ARGS_QUOTED, /* %C */
};
@@ -735,6 +737,8 @@ argv_a2arg(int tok, const char *argv)
return(MDOC_Offset);
else if (xstrcmp(argv, "compact"))
return(MDOC_Compact);
+ else if (xstrcmp(argv, "nested"))
+ return(MDOC_Nested);
break;
case (MDOC_Rv):
@@ -840,25 +844,11 @@ static int
argv(struct mdoc *mdoc, int tok, int line,
struct mdoc_argv *v, int *pos, char *buf)
{
- int fl;
v->sz = 0;
v->value = NULL;
- fl = mdoc_argvflags[v->arg];
- /*
- * Override the default per-argument value.
- */
-
- switch (tok) {
- case (MDOC_Ex):
- fl = ARGV_OPT_SINGLE;
- break;
- default:
- break;
- }
-
- switch (fl) {
+ switch (mdoc_argvflags[v->arg]) {
case (ARGV_SINGLE):
return(argv_single(mdoc, line, v, pos, buf));
case (ARGV_MULTI):