discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: "discuss@mdocml.bsd.lv" <discuss@mdocml.bsd.lv>
Subject: Nested displays?
Date: Mon, 19 Jul 2010 13:42:46 +0200	[thread overview]
Message-ID: <4C443A36.6090201@bsd.lv> (raw)

[-- 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));
 }
 
 

             reply	other threads:[~2010-07-19 11:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-19 11:42 Kristaps Dzonsons [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C443A36.6090201@bsd.lv \
    --to=kristaps@bsd.lv \
    --cc=discuss@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).