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 | c744f48b5fc53bd65103347682c3cb21e22e93aa (patch) | |
tree | f4b63562c1373a7270f223f1d88350daedfd38c3 | |
parent | 5410a79872e5e765de34d19df2959124707f5c9f (diff) | |
download | mandoc-c744f48b5fc53bd65103347682c3cb21e22e93aa.tar.gz mandoc-c744f48b5fc53bd65103347682c3cb21e22e93aa.tar.zst mandoc-c744f48b5fc53bd65103347682c3cb21e22e93aa.zip |
Added .Ap.
-rw-r--r-- | action.c | 3 | ||||
-rw-r--r-- | argv.c | 3 | ||||
-rw-r--r-- | macro.c | 5 | ||||
-rw-r--r-- | mdoc.c | 4 | ||||
-rw-r--r-- | mdoc.h | 5 | ||||
-rw-r--r-- | term.c | 16 | ||||
-rw-r--r-- | validate.c | 3 |
7 files changed, 30 insertions, 9 deletions
@@ -1,4 +1,4 @@ -/* $Id: action.c,v 1.35 2009/03/08 13:01:35 kristaps Exp $ */ +/* $Id: action.c,v 1.36 2009/03/08 20:50:12 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se> * @@ -171,6 +171,7 @@ const struct actions mdoc_actions[MDOC_MAX] = { { NULL }, /* Fr */ { NULL }, /* Ud */ { NULL }, /* Lb */ + { NULL }, /* Ap */ }; @@ -1,4 +1,4 @@ -/* $Id: argv.c,v 1.41 2009/03/08 12:46:38 kristaps Exp $ */ +/* $Id: argv.c,v 1.42 2009/03/08 20:50:12 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se> * @@ -207,6 +207,7 @@ static int mdoc_argflags[MDOC_MAX] = { 0, /* Fr */ 0, /* Ud */ 0, /* Lb */ + 0, /* Ap */ }; @@ -1,4 +1,4 @@ -/* $Id: macro.c,v 1.60 2009/03/08 19:32:03 kristaps Exp $ */ +/* $Id: macro.c,v 1.61 2009/03/08 20:50:12 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se> * @@ -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): @@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.55 2009/03/08 18:02:36 kristaps Exp $ */ +/* $Id: mdoc.c,v 1.56 2009/03/08 20:50:12 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se> * @@ -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] = { @@ -1,4 +1,4 @@ -/* $Id: mdoc.h,v 1.40 2009/03/08 18:02:36 kristaps Exp $ */ +/* $Id: mdoc.h,v 1.41 2009/03/08 20:50:12 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se> * @@ -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. */ @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.47 2009/03/08 19:38:08 kristaps Exp $ */ +/* $Id: term.c,v 1.48 2009/03/08 20:50:12 kristaps Exp $ */ /* * Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -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) { @@ -1,4 +1,4 @@ -/* $Id: validate.c,v 1.74 2009/03/08 18:02:36 kristaps Exp $ */ +/* $Id: validate.c,v 1.75 2009/03/08 20:50:12 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se> * @@ -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 */ }; |