There's been a discussion recently in Debian about having our
"lint"-like sanity-checking tools for packages enable some groff warning
options to catch common mistakes in manual pages. There'll probably be
quite a few false positives at first, but I think at least -wmac is
worth enabling in this context.

Ivan Shmakov sent me a patch to create a MANROFFOPT environment variable
which lets you say something like 'MANROFFOPT=-wmac man groff'. I like
this and will apply it to man-db. However, unfortunately, groff's nroff
wrapper doesn't recognise the -w and -W options and treats them as an
error. Could this be fixed? I've attached a patch which adds support for
them.

There are a couple of comments in the nroff script and in its manual
page that note that warnings are suppressed. Does this mean groff
warnings? I agree that this is an appropriate default, of course, but
it's good to be able to turn them on.

Thanks,

-- 
Colin Watson                                       [EMAIL PROTECTED]
Index: src/roff/nroff/nroff.man
===================================================================
RCS file: /sources/groff/groff/src/roff/nroff/nroff.man,v
retrieving revision 1.18
diff -p -u -r1.18 nroff.man
--- src/roff/nroff/nroff.man	19 Nov 2007 20:36:46 -0000	1.18
+++ src/roff/nroff/nroff.man	24 Nov 2007 10:43:15 -0000
@@ -109,8 +109,10 @@ The
 .BR \-m ,
 .BR \-n ,
 .BR \-o ,
+.BR \-r ,
+.BR \-w ,
 and
-.B \-r
+.B \-W
 options have the effect described in
 .BR @[EMAIL PROTECTED] (@MAN1EXT@).
 In addition,
Index: src/roff/nroff/nroff.sh
===================================================================
RCS file: /sources/groff/groff/src/roff/nroff/nroff.sh,v
retrieving revision 1.21
diff -p -u -r1.21 nroff.sh
--- src/roff/nroff/nroff.sh	19 Nov 2007 20:36:46 -0000	1.21
+++ src/roff/nroff/nroff.sh	24 Nov 2007 10:43:15 -0000
@@ -78,10 +78,10 @@ for i
     -[eq] | -s*)
       # ignore these options
       ;;
-    -[dMmrnoT])
+    -[dMmrnowWT])
       echo "$prog: option $1 requires an argument" >&2
       exit 1 ;;
-    -[iptSUC] | -[dMmrno]*)
+    -[iptSUC] | -[dMmrnowW]*)
       opts="$opts $1" ;;
     -T*)
       Topt=$1 ;;
@@ -96,7 +96,7 @@ for i
       exit 0 ;;
     --help)
       echo "usage: nroff [-CchipStUv] [-dCS] [-MDIR] [-mNAME] [-nNUM] [-oLIST]"
-      echo "             [-rCN] [-Tname] [FILE...]"
+      echo "             [-wNAME] [-WNAME] [-rCN] [-Tname] [FILE...]"
       exit 0 ;;
     --)
       shift

Reply via email to