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 | d767ea8dca6d98f405dc7525a38d5a6d61b3652f (patch) | |
tree | 46981a9a6b321d10b4c856989b73f4fb815dda6b /mdoc_action.c | |
parent | b64011c9d38153292597008b06e898298b3ab30f (diff) | |
download | mandoc-d767ea8dca6d98f405dc7525a38d5a6d61b3652f.tar.gz |
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 | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mdoc_action.c b/mdoc_action.c index 9ac5e604..3d94c3fd 100644 --- a/mdoc_action.c +++ b/mdoc_action.c @@ -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)); } |