diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-07-17 10:56:57 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-07-17 10:56:57 +0000 |
commit | e9573f136b1ae4896155ec0066bf3f7ef8bd4de0 (patch) | |
tree | a381f04866bc6e23d3d8336d4560a7a34f9c2721 | |
parent | 29d2cd44871e73c9fa0e17ee3a7171e571619a84 (diff) | |
download | mandoc-e9573f136b1ae4896155ec0066bf3f7ef8bd4de0.tar.gz |
Added `br' and `sp' macros (requested by joerg@netbsd.org, jmc@openbsd.org).
-rw-r--r-- | mdoc.c | 2 | ||||
-rw-r--r-- | mdoc.h | 4 | ||||
-rw-r--r-- | mdoc_action.c | 2 | ||||
-rw-r--r-- | mdoc_argv.c | 2 | ||||
-rw-r--r-- | mdoc_macro.c | 2 | ||||
-rw-r--r-- | mdoc_term.c | 13 | ||||
-rw-r--r-- | mdoc_validate.c | 2 |
7 files changed, 25 insertions, 2 deletions
@@ -117,7 +117,7 @@ const char *const __mdoc_macronames[MDOC_MAX] = { /* LINTED */ "Brc", "\%C", "Es", "En", /* LINTED */ - "Dx", "\%Q" + "Dx", "\%Q", "br", "sp" }; const char *const __mdoc_argnames[MDOC_ARG_MAX] = { @@ -147,7 +147,9 @@ #define MDOC_En 115 #define MDOC_Dx 116 #define MDOC__Q 117 -#define MDOC_MAX 118 +#define MDOC_br 118 +#define MDOC_sp 119 +#define MDOC_MAX 120 /* What follows is a list of ALL possible macro arguments. */ diff --git a/mdoc_action.c b/mdoc_action.c index b3e471fc..42e1e390 100644 --- a/mdoc_action.c +++ b/mdoc_action.c @@ -172,6 +172,8 @@ const struct actions mdoc_actions[MDOC_MAX] = { { NULL, NULL }, /* En */ { NULL, NULL }, /* Dx */ { NULL, NULL }, /* %Q */ + { NULL, NULL }, /* br */ + { NULL, NULL }, /* sp */ }; static int concat(struct mdoc *, const struct mdoc_node *, diff --git a/mdoc_argv.c b/mdoc_argv.c index d4e957f2..2ddafa65 100644 --- a/mdoc_argv.c +++ b/mdoc_argv.c @@ -208,6 +208,8 @@ static int mdoc_argflags[MDOC_MAX] = { 0, /* En */ 0, /* Dx */ ARGS_QUOTED, /* %Q */ + 0, /* br */ + 0, /* sp */ }; diff --git a/mdoc_macro.c b/mdoc_macro.c index 664263e9..14b5fddd 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -172,6 +172,8 @@ const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { { obsolete, 0 }, /* En */ { in_line_argn, MDOC_CALLABLE | MDOC_PARSED }, /* Dx */ { in_line_eoln, 0 }, /* %Q */ + { in_line_eoln, 0 }, /* br */ + { in_line_eoln, 0 }, /* sp */ }; const struct mdoc_macro * const mdoc_macros = __mdoc_macros; diff --git a/mdoc_term.c b/mdoc_term.c index e4a3bdc5..016e8a62 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -130,6 +130,7 @@ static int termp_ar_pre(DECL_ARGS); static int termp_bd_pre(DECL_ARGS); static int termp_bf_pre(DECL_ARGS); static int termp_bq_pre(DECL_ARGS); +static int termp_br_pre(DECL_ARGS); static int termp_brq_pre(DECL_ARGS); static int termp_bt_pre(DECL_ARGS); static int termp_cd_pre(DECL_ARGS); @@ -292,6 +293,8 @@ static const struct termact termacts[MDOC_MAX] = { { NULL, NULL }, /* En */ { termp_xx_pre, NULL }, /* Dx */ { NULL, NULL }, /* %Q */ + { termp_br_pre, NULL }, /* br */ + { NULL, NULL }, /* sp */ }; #ifdef __linux__ @@ -1830,6 +1833,16 @@ termp_in_post(DECL_ARGS) /* ARGSUSED */ static int +termp_br_pre(DECL_ARGS) +{ + + term_newln(p); + return(1); +} + + +/* ARGSUSED */ +static int termp_brq_pre(DECL_ARGS) { diff --git a/mdoc_validate.c b/mdoc_validate.c index 0c7826a0..915d2f18 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -270,6 +270,8 @@ const struct valids mdoc_valids[MDOC_MAX] = { { NULL, NULL }, /* En */ { NULL, NULL }, /* Dx */ { NULL, posts_text }, /* %Q */ + { NULL, posts_notext }, /* br */ + { NULL, NULL }, /* sp */ }; |