diff options
-rw-r--r-- | mdoc_action.c | 5 | ||||
-rw-r--r-- | mdoc_macro.c | 4 | ||||
-rw-r--r-- | mdoc_term.c | 17 | ||||
-rw-r--r-- | mdoc_validate.c | 6 |
4 files changed, 21 insertions, 11 deletions
diff --git a/mdoc_action.c b/mdoc_action.c index f02716ba..438b6752 100644 --- a/mdoc_action.c +++ b/mdoc_action.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_action.c,v 1.23 2009/07/06 13:04:52 kristaps Exp $ */ +/* $Id: mdoc_action.c,v 1.24 2009/07/07 11:47:17 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -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 c324449d..ed31d01b 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.17 2009/07/07 09:29:15 kristaps Exp $ */ +/* $Id: mdoc_macro.c,v 1.18 2009/07/07 11:47:17 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -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 688aec86..8e4db782 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.21 2009/07/05 19:25:10 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.22 2009/07/07 11:47:17 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -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 c4b769e4..195fe462 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.24 2009/07/07 09:52:08 kristaps Exp $ */ +/* $Id: mdoc_validate.c,v 1.25 2009/07/07 11:47:17 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -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() */ |