- switch (i) {
- case (0):
- mdoc->meta.title = xstrdup(p);
- break;
- case (1):
- mdoc->meta.msec = mdoc_atomsec(p);
- if (MSEC_DEFAULT != mdoc->meta.msec)
- break;
- return(mdoc_nerr(mdoc, n, "invalid parameter syntax"));
- case (2):
- mdoc->meta.vol = mdoc_atovol(p);
- if (VOL_DEFAULT != mdoc->meta.vol)
- break;
- mdoc->meta.arch = mdoc_atoarch(p);
- if (ARCH_DEFAULT != mdoc->meta.arch)
- break;
- return(mdoc_nerr(mdoc, n, "invalid parameter syntax"));
- default:
- return(mdoc_nerr(mdoc, n, "too many parameters"));
- }
+ if ((cp = mdoc_a2msec(n->string))) {
+ mdoc->meta.vol = xstrdup(cp);
+ errno = 0;
+ lval = strtol(n->string, &ep, 10);
+ if (n->string[0] != '\0' && *ep == '\0')
+ mdoc->meta.msec = (int)lval;
+ } else
+ mdoc->meta.vol = xstrdup(n->string);
+
+ if (NULL == (n = n->next)) {
+ mdoc_msg(mdoc, "volume: %s", mdoc->meta.vol);
+ mdoc_msg(mdoc, "arch: <unset>");
+ mdoc_msg(mdoc, "msec: %d", mdoc->meta.msec);
+ return(post_prologue(mdoc));