summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-03-08 20:50:12 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-03-08 20:50:12 +0000
commit68fba3271bc79716f1743bd49dd75bbad59cb00d (patch)
tree374e9c51e1783cab9b88a0aa6ae06738835e24a0
parent946b90960143fc668d4b43c0acd0f2b0918fe14c (diff)
downloadmandoc-68fba3271bc79716f1743bd49dd75bbad59cb00d.tar.gz
Added .Ap.
-rw-r--r--action.c1
-rw-r--r--argv.c1
-rw-r--r--macro.c3
-rw-r--r--mdoc.c2
-rw-r--r--mdoc.h3
-rw-r--r--term.c14
-rw-r--r--validate.c1
7 files changed, 23 insertions, 2 deletions
diff --git a/action.c b/action.c
index 46af7a03..247f98fa 100644
--- a/action.c
+++ b/action.c
@@ -171,6 +171,7 @@ const struct actions mdoc_actions[MDOC_MAX] = {
{ NULL }, /* Fr */
{ NULL }, /* Ud */
{ NULL }, /* Lb */
+ { NULL }, /* Ap */
};
diff --git a/argv.c b/argv.c
index 61f9e06b..1bd1bd4c 100644
--- a/argv.c
+++ b/argv.c
@@ -207,6 +207,7 @@ static int mdoc_argflags[MDOC_MAX] = {
0, /* Fr */
0, /* Ud */
0, /* Lb */
+ 0, /* Ap */
};
diff --git a/macro.c b/macro.c
index e1de6b53..b68439eb 100644
--- a/macro.c
+++ b/macro.c
@@ -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):
diff --git a/mdoc.c b/mdoc.c
index b533470c..2a019ab4 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -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] = {
diff --git a/mdoc.h b/mdoc.h
index 1dace83c..cdf755ea 100644
--- a/mdoc.h
+++ b/mdoc.h
@@ -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. */
diff --git a/term.c b/term.c
index e4781c35..8c209a98 100644
--- a/term.c
+++ b/term.c
@@ -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)
{
diff --git a/validate.c b/validate.c
index fbd54780..89289961 100644
--- a/validate.c
+++ b/validate.c
@@ -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 */
};