diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-05-30 11:00:53 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-05-30 11:00:53 +0000 |
commit | 00b1408577108687d502b7b56de8e3399986a349 (patch) | |
tree | c535af78076f266b280ec03a40300ce7f501a720 /mdoc_action.c | |
parent | 6183dbfbb27ceb32859b32133331b06f0b3037f4 (diff) | |
download | mandoc-00b1408577108687d502b7b56de8e3399986a349.tar.gz mandoc-00b1408577108687d502b7b56de8e3399986a349.tar.zst mandoc-00b1408577108687d502b7b56de8e3399986a349.zip |
Made `Dt' default to LOCAL and UNKNOWN instead of local and unknown (note case).
Have `Dt' default to UNKNOWN if it's an empty string.
Raise a warning if `Dt' title isn't capitalised.
Sync'd `Dt' documentation with reality.
Diffstat (limited to 'mdoc_action.c')
-rw-r--r-- | mdoc_action.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mdoc_action.c b/mdoc_action.c index 7fa1bf6b..ff1400a3 100644 --- a/mdoc_action.c +++ b/mdoc_action.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_action.c,v 1.62 2010/05/29 18:58:52 kristaps Exp $ */ +/* $Id: mdoc_action.c,v 1.63 2010/05/30 11:00:53 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -499,8 +499,8 @@ post_dt(POST_ARGS) if (NULL == (nn = n->child)) { /* XXX: make these macro values. */ /* FIXME: warn about missing values. */ - m->meta.title = mandoc_strdup("unknown"); - m->meta.vol = mandoc_strdup("local"); + m->meta.title = mandoc_strdup("UNKNOWN"); + m->meta.vol = mandoc_strdup("LOCAL"); m->meta.msec = mandoc_strdup("1"); return(post_prol(m, n)); } @@ -509,12 +509,13 @@ post_dt(POST_ARGS) * --> title = TITLE, volume = local, msec = 0, arch = NULL */ - m->meta.title = mandoc_strdup(nn->string); + m->meta.title = mandoc_strdup + ('\0' == nn->string[0] ? "UNKNOWN" : nn->string); if (NULL == (nn = nn->next)) { /* FIXME: warn about missing msec. */ /* XXX: make this a macro value. */ - m->meta.vol = mandoc_strdup("local"); + m->meta.vol = mandoc_strdup("LOCAL"); m->meta.msec = mandoc_strdup("1"); return(post_prol(m, n)); } |