aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_validate.c
diff options
context:
space:
mode:
Diffstat (limited to 'man_validate.c')
-rw-r--r--man_validate.c8
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. */