discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Nested displays?
@ 2010-07-19 11:42 Kristaps Dzonsons
  2010-07-19 12:03 ` Jason McIntyre
  0 siblings, 1 reply; 5+ messages in thread
From: Kristaps Dzonsons @ 2010-07-19 11:42 UTC (permalink / raw)
  To: discuss

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

Hi,

Can anybody think of a reason why display types (`Bd', `D1', `Dl')
shouldn't be nested?  Enclosed is a patch that downgrades the message to
ERROR (from FATAL) and lets these through.

Ok?

Kristaps

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 2414 bytes --]

? callgrind.out.15706
? config.h
? config.log
? foo.1
? foo.1.html
? foo.3
? foo.7
? foo.html
? mandoc
? patch.txt
? relayd.8
? relayd.8.html
? spamd.8
? ssh.1
? ssh.1.html
? regress/output
Index: main.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/main.c,v
retrieving revision 1.98
diff -u -r1.98 main.c
--- main.c	7 Jul 2010 15:04:54 -0000	1.98
+++ main.c	19 Jul 2010 11:42:15 -0000
@@ -151,6 +151,7 @@
 	"macro requires body argument(s)",
 	"macro requires argument(s)",
 	"no title in document",
+	"displays may not be nested",
 	"missing list type",
 	"missing display type",
 	"missing font type",
@@ -160,7 +161,6 @@
 	"generic fatal error",
 
 	"column syntax is inconsistent",
-	"displays may not be nested",
 	"unsupported display type",
 	"blocks badly nested",
 	"no such block is open",
Index: mandoc.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.h,v
retrieving revision 1.16
diff -u -r1.16 mandoc.h
--- mandoc.h	5 Jul 2010 20:10:22 -0000	1.16
+++ mandoc.h	19 Jul 2010 11:42:15 -0000
@@ -82,6 +82,7 @@
 	MANDOCERR_NOBODY, /* macro requires body argument(s) */
 	MANDOCERR_NOARGV, /* macro requires argument(s) */
 	MANDOCERR_NOTITLE, /* no title in document */
+	MANDOCERR_NESTEDDISP, /* displays may not be nested */
 	MANDOCERR_LISTTYPE, /* missing list type */
 	MANDOCERR_DISPTYPE, /* missing display type */
 	MANDOCERR_FONTTYPE, /* missing font type */
@@ -91,8 +92,6 @@
 	MANDOCERR_FATAL, /* ===== end of fatal errors ===== */
 
 	MANDOCERR_COLUMNS, /* column syntax is inconsistent */
-	/* FIXME: this should be a MANDOCERR_ERROR */
-	MANDOCERR_NESTEDDISP, /* displays may not be nested */
 	MANDOCERR_BADDISP, /* unsupported display type */
 	MANDOCERR_SCOPEFATAL, /* blocks badly nested */
 	MANDOCERR_SYNTNOSCOPE, /* no scope to rewind: syntax violated */
Index: mdoc_validate.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_validate.c,v
retrieving revision 1.111
diff -u -r1.111 mdoc_validate.c
--- mdoc_validate.c	19 Jul 2010 11:11:54 -0000	1.111
+++ mdoc_validate.c	19 Jul 2010 11:42:15 -0000
@@ -528,8 +528,7 @@
 	if (NULL == node)
 		return(1);
 
-	mdoc_nmsg(mdoc, n, MANDOCERR_NESTEDDISP);
-	return(0);
+	return(mdoc_nmsg(mdoc, n, MANDOCERR_NESTEDDISP));
 }
 
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-07-19 17:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-19 11:42 Nested displays? Kristaps Dzonsons
2010-07-19 12:03 ` Jason McIntyre
2010-07-19 13:37   ` Kristaps Dzonsons
2010-07-19 16:48   ` Joerg Sonnenberger
2010-07-19 17:09   ` Ingo 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).