diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-10-15 01:33:12 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-10-15 01:33:12 +0000 |
commit | 76a194cc65e1b59ce8ec8b2e23f8412ce9b83fbf (patch) | |
tree | 75a60bbe2c0b7ba34c5a44c37288e9aebb0ad635 | |
parent | c73e1ec1c6a54b399da7b779448188ef6db6db68 (diff) | |
download | mandoc-76a194cc65e1b59ce8ec8b2e23f8412ce9b83fbf.tar.gz |
Added support for `Bd -centered', which appears in newer groffs (not yet implemented in centre-capable front-ends, i.e., -Thtml).
-rw-r--r-- | mdoc.c | 2 | ||||
-rw-r--r-- | mdoc.h | 3 | ||||
-rw-r--r-- | mdoc_argv.c | 2 | ||||
-rw-r--r-- | mdoc_html.c | 4 | ||||
-rw-r--r-- | mdoc_term.c | 2 |
5 files changed, 11 insertions, 2 deletions
@@ -127,7 +127,7 @@ const char *const __mdoc_argnames[MDOC_ARG_MAX] = { "ohang", "inset", "column", "width", "compact", "std", "filled", "words", "emphasis", - "symbolic", "nested" + "symbolic", "nested", "centered" }; const char * const *mdoc_macronames = __mdoc_macronames; @@ -179,7 +179,8 @@ #define MDOC_Emphasis 23 #define MDOC_Symbolic 24 #define MDOC_Nested 25 -#define MDOC_ARG_MAX 26 +#define MDOC_Centred 26 +#define MDOC_ARG_MAX 27 /* Type of a syntax node. */ enum mdoc_type { diff --git a/mdoc_argv.c b/mdoc_argv.c index 64f9abc3..8f70fe23 100644 --- a/mdoc_argv.c +++ b/mdoc_argv.c @@ -591,6 +591,8 @@ argv_a2arg(int tok, const char *p) return(MDOC_Offset); else if (0 == strcmp(p, "compact")) return(MDOC_Compact); + else if (0 == strcmp(p, "centered")) + return(MDOC_Centred); break; case (MDOC_Bf): diff --git a/mdoc_html.c b/mdoc_html.c index 89998348..c38c5e6c 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1357,6 +1357,8 @@ mdoc_bd_pre(MDOC_ARGS) case (MDOC_Compact): comp = 1; break; + case (MDOC_Centred): + /* FALLTHROUGH */ case (MDOC_Ragged): /* FALLTHROUGH */ case (MDOC_Filled): @@ -1366,6 +1368,8 @@ mdoc_bd_pre(MDOC_ARGS) case (MDOC_Literal): type = bl->args->argv[i].arg; break; + default: + break; } if (MDOC_BLOCK == n->type) { diff --git a/mdoc_term.c b/mdoc_term.c index 4bba41de..d9de29c1 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1559,6 +1559,8 @@ termp_bd_pre(DECL_ARGS) for (type = -1, i = 0; i < (int)nn->args->argc; i++) { switch (nn->args->argv[i].arg) { + case (MDOC_Centred): + /* FALLTHROUGH */ case (MDOC_Ragged): /* FALLTHROUGH */ case (MDOC_Filled): |