diff options
-rw-r--r-- | mdoc.7 | 4 | ||||
-rw-r--r-- | mdoc_term.c | 6 | ||||
-rw-r--r-- | mdoc_validate.c | 23 | ||||
-rw-r--r-- | regress/mdoc/Bt/bt.in | 11 | ||||
-rw-r--r-- | regress/mdoc/Ud/ud.in | 11 |
5 files changed, 47 insertions, 8 deletions
@@ -1,4 +1,4 @@ -.\" $Id: mdoc.7,v 1.109 2010/05/26 09:35:35 kristaps Exp $ +.\" $Id: mdoc.7,v 1.110 2010/05/26 10:39:35 kristaps Exp $ .\" .\" Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv> .\" @@ -1820,6 +1820,8 @@ line. .Ss \&Sy .Ss \&Tn .Ss \&Ud +Prints out +.Dq currently under development. .Ss \&Ux Format the UNIX name. Accepts no argument. diff --git a/mdoc_term.c b/mdoc_term.c index 3503483a..f149d5c0 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.130 2010/05/24 21:51:20 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.131 2010/05/26 10:39:35 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -1192,6 +1192,7 @@ termp_rv_pre(DECL_ARGS) term_fontpop(p); term_word(p, "is set to indicate the error."); + p->flags |= TERMP_SENTENCE; return(0); } @@ -1224,6 +1225,7 @@ termp_ex_pre(DECL_ARGS) term_word(p, "utility exits"); term_word(p, "0 on success, and >0 if an error occurs."); + p->flags |= TERMP_SENTENCE; return(0); } @@ -1425,6 +1427,7 @@ termp_bt_pre(DECL_ARGS) { term_word(p, "is currently in beta test."); + p->flags |= TERMP_SENTENCE; return(0); } @@ -1445,6 +1448,7 @@ termp_ud_pre(DECL_ARGS) { term_word(p, "currently under development."); + p->flags |= TERMP_SENTENCE; return(0); } diff --git a/mdoc_validate.c b/mdoc_validate.c index 56a587ff..9d2baad7 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.83 2010/05/26 09:35:35 kristaps Exp $ */ +/* $Id: mdoc_validate.c,v 1.84 2010/05/26 10:39:35 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -92,6 +92,7 @@ static int post_sh(POST_ARGS); static int post_sh_body(POST_ARGS); static int post_sh_head(POST_ARGS); static int post_st(POST_ARGS); +static int post_eoln(POST_ARGS); static int post_vt(POST_ARGS); static int pre_an(PRE_ARGS); static int pre_bd(PRE_ARGS); @@ -111,6 +112,7 @@ static v_post posts_bd[] = { hwarn_eq0, bwarn_ge1, NULL }; static v_post posts_bf[] = { hwarn_le1, post_bf, NULL }; static v_post posts_bl[] = { bwarn_ge1, post_bl, NULL }; static v_post posts_bool[] = { eerr_eq1, ebool, NULL }; +static v_post posts_eoln[] = { post_eoln, NULL }; static v_post posts_fo[] = { hwarn_eq1, bwarn_ge1, NULL }; static v_post posts_it[] = { post_it, NULL }; static v_post posts_lb[] = { eerr_eq1, post_lb, NULL }; @@ -127,7 +129,6 @@ static v_post posts_text1[] = { eerr_eq1, NULL }; static v_post posts_vt[] = { post_vt, NULL }; static v_post posts_wline[] = { bwarn_ge1, herr_eq0, NULL }; static v_post posts_wtext[] = { ewarn_ge1, NULL }; -static v_post posts_xr[] = { ewarn_ge1, NULL }; static v_pre pres_an[] = { pre_an, NULL }; static v_pre pres_bd[] = { pre_display, pre_bd, NULL }; static v_pre pres_bl[] = { pre_bl, NULL }; @@ -184,7 +185,7 @@ const struct valids mdoc_valids[MDOC_MAX] = { { NULL, posts_st }, /* St */ { NULL, NULL }, /* Va */ { NULL, posts_vt }, /* Vt */ - { NULL, posts_xr }, /* Xr */ + { NULL, posts_wtext }, /* Xr */ { NULL, posts_text }, /* %A */ { NULL, posts_text }, /* %B */ /* FIXME: can be used outside Rs/Re. */ { NULL, posts_text }, /* %D */ /* FIXME: check date with mandoc_a2time(). */ @@ -246,10 +247,10 @@ const struct valids mdoc_valids[MDOC_MAX] = { { NULL, NULL }, /* Oc */ { NULL, posts_wline }, /* Bk */ { NULL, NULL }, /* Ek */ - { NULL, posts_notext }, /* Bt */ + { NULL, posts_eoln }, /* Bt */ { NULL, NULL }, /* Hf */ { NULL, NULL }, /* Fr */ - { NULL, posts_notext }, /* Ud */ + { NULL, posts_eoln }, /* Ud */ { NULL, posts_lb }, /* Lb */ { NULL, posts_notext }, /* Lp */ { NULL, posts_text }, /* Lk */ @@ -391,7 +392,7 @@ 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_BODY_DEFN(ge1, err, err_child_gt, 0) /* berr_ge1() */ -CHECK_ELEM_DEFN(ge1, warn, warn_child_gt, 0) /* ewarn_gt1() */ +CHECK_ELEM_DEFN(ge1, warn, warn_child_gt, 0) /* ewarn_ge1() */ CHECK_ELEM_DEFN(eq1, err, err_child_eq, 1) /* eerr_eq1() */ CHECK_ELEM_DEFN(le1, err, err_child_lt, 2) /* eerr_le1() */ CHECK_ELEM_DEFN(eq0, err, err_child_eq, 0) /* eerr_eq0() */ @@ -829,6 +830,16 @@ post_lb(POST_ARGS) static int +post_eoln(POST_ARGS) +{ + + if (NULL == mdoc->last->child) + return(1); + return(mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_ARGSLOST)); +} + + +static int post_vt(POST_ARGS) { const struct mdoc_node *n; diff --git a/regress/mdoc/Bt/bt.in b/regress/mdoc/Bt/bt.in new file mode 100644 index 00000000..576bc2b9 --- /dev/null +++ b/regress/mdoc/Bt/bt.in @@ -0,0 +1,11 @@ +.Dd $Mdocdate: May 26 2010 $ +.Dt FOO 1 +.Os +.Sh NAME +.Nm foo +.Nd bar +.Sh DESCRIPTION +blah blah blah +.Bt asdf +blah blah blah +.Bt ) ; diff --git a/regress/mdoc/Ud/ud.in b/regress/mdoc/Ud/ud.in new file mode 100644 index 00000000..e4cc5329 --- /dev/null +++ b/regress/mdoc/Ud/ud.in @@ -0,0 +1,11 @@ +.Dd $Mdocdate: May 26 2010 $ +.Dt FOO 1 +.Os +.Sh NAME +.Nm foo +.Nd bar +.Sh DESCRIPTION +blah blah blah +.Ud asdf +blah blah blah +.Ud ) ; |