aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-07-17 10:56:57 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-07-17 10:56:57 +0000
commit72e26562c1fc079294e29413bc0fc473e7be3bef (patch)
tree2a32a18c956c409bc6579655ba945ef4ebdb1180
parent7fafcb2c03b038694a5b491d804a46d7436cc167 (diff)
downloadmandoc-72e26562c1fc079294e29413bc0fc473e7be3bef.tar.gz
mandoc-72e26562c1fc079294e29413bc0fc473e7be3bef.tar.zst
mandoc-72e26562c1fc079294e29413bc0fc473e7be3bef.zip
Added `br' and `sp' macros (requested by joerg@netbsd.org, jmc@openbsd.org).
-rw-r--r--mdoc.c4
-rw-r--r--mdoc.h6
-rw-r--r--mdoc_action.c4
-rw-r--r--mdoc_argv.c4
-rw-r--r--mdoc_macro.c4
-rw-r--r--mdoc_term.c15
-rw-r--r--mdoc_validate.c4
7 files changed, 32 insertions, 9 deletions
diff --git a/mdoc.c b/mdoc.c
index f156db9e..ae7e663a 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc.c,v 1.92 2009/07/16 13:42:12 kristaps Exp $ */
+/* $Id: mdoc.c,v 1.93 2009/07/17 10:56:57 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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] = {
diff --git a/mdoc.h b/mdoc.h
index 578e1f86..3c260c86 100644
--- a/mdoc.h
+++ b/mdoc.h
@@ -1,4 +1,4 @@
-/* $Id: mdoc.h,v 1.65 2009/07/12 20:50:08 kristaps Exp $ */
+/* $Id: mdoc.h,v 1.66 2009/07/17 10:56:57 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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 88e70b54..99b392db 100644
--- a/mdoc_action.c
+++ b/mdoc_action.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_action.c,v 1.29 2009/07/16 13:17:51 kristaps Exp $ */
+/* $Id: mdoc_action.c,v 1.30 2009/07/17 10:56:57 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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 8341c205..d410d84a 100644
--- a/mdoc_argv.c
+++ b/mdoc_argv.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_argv.c,v 1.13 2009/07/15 15:26:19 kristaps Exp $ */
+/* $Id: mdoc_argv.c,v 1.14 2009/07/17 10:56:57 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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 b206a4f2..4a4624bf 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_macro.c,v 1.19 2009/07/12 16:34:16 kristaps Exp $ */
+/* $Id: mdoc_macro.c,v 1.20 2009/07/17 10:56:57 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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 ea58a790..41338aa5 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.43 2009/07/16 13:27:24 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.44 2009/07/17 10:56:57 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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 419b9c60..c2ce03e3 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.32 2009/07/13 07:23:07 kristaps Exp $ */
+/* $Id: mdoc_validate.c,v 1.33 2009/07/17 10:56:57 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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 */
};