diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-08 20:50:12 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-03-08 20:50:12 +0000 |
commit | 68fba3271bc79716f1743bd49dd75bbad59cb00d (patch) | |
tree | 374e9c51e1783cab9b88a0aa6ae06738835e24a0 | |
parent | 946b90960143fc668d4b43c0acd0f2b0918fe14c (diff) | |
download | mandoc-68fba3271bc79716f1743bd49dd75bbad59cb00d.tar.gz |
Added .Ap.
-rw-r--r-- | action.c | 1 | ||||
-rw-r--r-- | argv.c | 1 | ||||
-rw-r--r-- | macro.c | 3 | ||||
-rw-r--r-- | mdoc.c | 2 | ||||
-rw-r--r-- | mdoc.h | 3 | ||||
-rw-r--r-- | term.c | 14 | ||||
-rw-r--r-- | validate.c | 1 |
7 files changed, 23 insertions, 2 deletions
@@ -171,6 +171,7 @@ const struct actions mdoc_actions[MDOC_MAX] = { { NULL }, /* Fr */ { NULL }, /* Ud */ { NULL }, /* Lb */ + { NULL }, /* Ap */ }; @@ -207,6 +207,7 @@ static int mdoc_argflags[MDOC_MAX] = { 0, /* Fr */ 0, /* Ud */ 0, /* Lb */ + 0, /* Ap */ }; @@ -181,6 +181,7 @@ const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { { macro_obsolete, 0 }, /* Fr */ { macro_constant, 0 }, /* Ud */ { macro_constant, 0 }, /* Lb */ + { macro_constant_delimited, MDOC_CALLABLE | MDOC_PARSED }, /* Ap */ }; const struct mdoc_macro * const mdoc_macros = __mdoc_macros; @@ -1204,6 +1205,8 @@ macro_constant_delimited(MACRO_PROT_ARGS) */ switch (tok) { + case (MDOC_Ap): + /* FALLTHROUGH */ case (MDOC_No): /* FALLTHROUGH */ case (MDOC_Ns): @@ -70,7 +70,7 @@ const char *const __mdoc_macronames[MDOC_MAX] = { "Tn", "Ux", "Xc", "Xo", "Fo", "Fc", "Oo", "Oc", "Bk", "Ek", "Bt", "Hf", - "Fr", "Ud", "Lb", + "Fr", "Ud", "Lb", "Ap" }; const char *const __mdoc_argnames[MDOC_ARG_MAX] = { @@ -138,7 +138,8 @@ #define MDOC_Fr 104 #define MDOC_Ud 105 #define MDOC_Lb 106 -#define MDOC_MAX 107 +#define MDOC_Ap 107 +#define MDOC_MAX 108 /* What follows is a list of ALL possible macro arguments. */ @@ -130,6 +130,7 @@ DECL_PREPOST(termp_ss); DECL_PREPOST(termp_sq); DECL_PREPOST(termp_vt); +DECL_PRE(termp_ap); DECL_PRE(termp_ar); DECL_PRE(termp_at); DECL_PRE(termp_bf); @@ -274,6 +275,7 @@ const struct termact __termacts[MDOC_MAX] = { { NULL, NULL }, /* Fr */ { termp_ud_pre, NULL }, /* Ud */ { termp_lb_pre, termp_lb_post }, /* Lb */ + { termp_ap_pre, NULL }, /* Lb */ }; const struct termact *termacts = __termacts; @@ -1700,6 +1702,18 @@ termp_sm_pre(DECL_ARGS) /* ARGSUSED */ static int +termp_ap_pre(DECL_ARGS) +{ + + p->flags |= TERMP_NOSPACE; + word(p, "\\(aq"); + p->flags |= TERMP_NOSPACE; + return(1); +} + + +/* ARGSUSED */ +static int termp__t_pre(DECL_ARGS) { @@ -298,6 +298,7 @@ const struct valids mdoc_valids[MDOC_MAX] = { { NULL, NULL }, /* Fr */ { NULL, posts_notext }, /* Ud */ { pres_lb, posts_lb }, /* Lb */ + { NULL, NULL }, /* Lb */ }; |