* mdocml: Warn about unknown volume or arch in Dt macro arguments; patch
@ 2012-11-16 22:21 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2012-11-16 22:21 UTC (permalink / raw)
To: source
Log Message:
-----------
Warn about unknown volume or arch in Dt macro arguments;
patch written by Nicolas Joly <njoly at pasteur dot fr>.
Modified Files:
--------------
mdocml:
mandoc.h
mdoc_validate.c
read.c
Revision Data
-------------
Index: mdoc_validate.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_validate.c,v
retrieving revision 1.189
retrieving revision 1.190
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.189 -r1.190
--- mdoc_validate.c
+++ mdoc_validate.c
@@ -2205,9 +2205,9 @@ post_dt(POST_ARGS)
free(mdoc->meta.vol);
mdoc->meta.vol = mandoc_strdup(cp);
} else {
- /* FIXME: warn about bad arch. */
cp = mdoc_a2arch(nn->string);
if (NULL == cp) {
+ mdoc_nmsg(mdoc, nn, MANDOCERR_BADVOLARCH);
free(mdoc->meta.vol);
mdoc->meta.vol = mandoc_strdup(nn->string);
} else
Index: mandoc.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.h,v
retrieving revision 1.104
retrieving revision 1.105
diff -Lmandoc.h -Lmandoc.h -u -p -r1.104 -r1.105
--- mandoc.h
+++ mandoc.h
@@ -50,6 +50,7 @@ enum mandocerr {
MANDOCERR_NOTITLE, /* no title in document */
MANDOCERR_UPPERCASE, /* document title should be all caps */
MANDOCERR_BADMSEC, /* unknown manual section */
+ MANDOCERR_BADVOLARCH, /* unknown manual volume or arch */
MANDOCERR_NODATE, /* date missing, using today's date */
MANDOCERR_BADDATE, /* cannot parse date, using it verbatim */
MANDOCERR_PROLOGOOO, /* prologue macros out of order */
Index: read.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/read.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -Lread.c -Lread.c -u -p -r1.31 -r1.32
--- read.c
+++ read.c
@@ -95,6 +95,7 @@ static const char * const mandocerrs[MAN
"no title in document",
"document title should be all caps",
"unknown manual section",
+ "unknown manual volume or arch",
"date missing, using today's date",
"cannot parse date, using it verbatim",
"prologue macros out of order",
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-11-16 22:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-16 22:21 mdocml: Warn about unknown volume or arch in Dt macro arguments; patch schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).