diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-17 22:43:14 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-17 22:43:14 +0000 |
commit | 332a2176094538e094fed8f1e5e251feb6b666e9 (patch) | |
tree | fc47a670fb157e5593d57abc86413feaabb2ca07 /man_validate.c | |
parent | fc10222b160be65e60f5afcce864bcc8a49b6b48 (diff) | |
download | mandoc-332a2176094538e094fed8f1e5e251feb6b666e9.tar.gz mandoc-332a2176094538e094fed8f1e5e251feb6b666e9.tar.zst mandoc-332a2176094538e094fed8f1e5e251feb6b666e9.zip |
style message about missing RCS ids; inspired by mdoclint
Diffstat (limited to 'man_validate.c')
-rw-r--r-- | man_validate.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/man_validate.c b/man_validate.c index 759c42ac..7426bfbb 100644 --- a/man_validate.c +++ b/man_validate.c @@ -170,6 +170,10 @@ check_root(CHKARGS) man->meta.date = man->quick ? mandoc_strdup("") : mandoc_normdate(man, NULL, n->line, n->pos); } + + if (man->meta.os_e && + (man->meta.rcsids & (1 << man->meta.os_e)) == 0) + mandoc_msg(MANDOCERR_RCS_MISSING, man->parse, 0, 0, NULL); } static void @@ -338,6 +342,10 @@ post_TH(CHKARGS) man->meta.os = mandoc_strdup(n->string); else if (man->defos != NULL) man->meta.os = mandoc_strdup(man->defos); + man->meta.os_e = man->meta.os == NULL ? MDOC_OS_OTHER : + strstr(man->meta.os, "OpenBSD") != NULL ? MDOC_OS_OPENBSD : + strstr(man->meta.os, "NetBSD") != NULL ? MDOC_OS_NETBSD : + MDOC_OS_OTHER; /* TITLE MSEC DATE OS ->VOL<- */ /* If missing, use the default VOL name for MSEC. */ |