summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdoc_action.c3
-rw-r--r--mdoc_macro.c2
-rw-r--r--mdoc_term.c15
-rw-r--r--mdoc_validate.c4
4 files changed, 17 insertions, 7 deletions
diff --git a/mdoc_action.c b/mdoc_action.c
index 8d36635e..3babc5d1 100644
--- a/mdoc_action.c
+++ b/mdoc_action.c
@@ -665,7 +665,8 @@ post_lk(POST_ARGS)
n = m->last;
m->next = MDOC_NEXT_CHILD;
- /* FIXME: this isn't documented anywhere! */
+
+ /* XXX: this isn't documented anywhere! */
if ( ! mdoc_word_alloc(m, m->last->line,
m->last->pos, "~"))
return(0);
diff --git a/mdoc_macro.c b/mdoc_macro.c
index 9b3eb212..709dc3d7 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -83,7 +83,7 @@ const struct mdoc_macro __mdoc_macros[MDOC_MAX] = {
{ in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Fn */
{ in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Ft */
{ in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Ic */
- { in_line_eoln, 0 }, /* In */ /* FIXME: historic usage! */
+ { in_line_argn, MDOC_CALLABLE | MDOC_PARSED }, /* In */
{ in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Li */
{ in_line_eoln, 0 }, /* Nd */
{ in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Nm */
diff --git a/mdoc_term.c b/mdoc_term.c
index f1055069..5cd50eee 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1838,8 +1838,12 @@ static int
termp_in_pre(DECL_ARGS)
{
+ /* XXX This conforms to new-groff style. */
TERMPAIR_SETFLAG(p, pair, ttypes[TTYPE_INCLUDE]);
- term_word(p, "#include");
+
+ if (SEC_SYNOPSIS == node->sec)
+ term_word(p, "#include");
+
term_word(p, "<");
p->flags |= TERMP_NOSPACE;
return(1);
@@ -1854,9 +1858,16 @@ termp_in_post(DECL_ARGS)
p->flags |= TERMP_NOSPACE;
term_word(p, ">");
- term_newln(p);
if (SEC_SYNOPSIS != node->sec)
return;
+
+ term_newln(p);
+ /*
+ * XXX Not entirely correct. If `.In foo bar' is specified in
+ * the SYNOPSIS section, then it produces a single break after
+ * the <foo>; mandoc asserts a vertical space. Since this
+ * construction is rarely used, I think it's fine.
+ */
if (node->next && MDOC_In != node->next->tok)
term_vspace(p);
}
diff --git a/mdoc_validate.c b/mdoc_validate.c
index fe8ac1be..8afba182 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -85,7 +85,6 @@ static int eerr_le2(POST_ARGS);
static int eerr_eq1(POST_ARGS);
static int eerr_ge1(POST_ARGS);
static int ewarn_eq0(POST_ARGS);
-static int ewarn_eq1(POST_ARGS);
static int bwarn_ge1(POST_ARGS);
static int hwarn_eq1(POST_ARGS);
static int ewarn_ge1(POST_ARGS);
@@ -129,7 +128,7 @@ static v_post posts_wline[] = { bwarn_ge1, herr_eq0, NULL };
static v_post posts_sh[] = { herr_ge1, bwarn_ge1, post_sh, NULL };
static v_post posts_bl[] = { bwarn_ge1, post_bl, NULL };
static v_post posts_it[] = { post_it, NULL };
-static v_post posts_in[] = { ewarn_eq1, NULL };
+static v_post posts_in[] = { eerr_eq1, NULL };
static v_post posts_ss[] = { herr_ge1, NULL };
static v_post posts_pf[] = { eerr_eq1, NULL };
static v_post posts_lb[] = { eerr_eq1, NULL };
@@ -408,7 +407,6 @@ CHECK_CHILD_DEFN(err, eq, ==) /* err_child_eq() */
CHECK_CHILD_DEFN(err, lt, <) /* err_child_lt() */
CHECK_CHILD_DEFN(warn, lt, <) /* warn_child_lt() */
CHECK_BODY_DEFN(ge1, warn, warn_child_gt, 0) /* bwarn_ge1() */
-CHECK_ELEM_DEFN(eq1, warn, warn_child_eq, 1) /* ewarn_eq1() */
CHECK_ELEM_DEFN(eq0, warn, warn_child_eq, 0) /* ewarn_eq0() */
CHECK_ELEM_DEFN(ge1, warn, warn_child_gt, 0) /* ewarn_gt1() */
CHECK_ELEM_DEFN(eq1, err, err_child_eq, 1) /* eerr_eq1() */