source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: print a BAGARG message if -T markdown is requested on man(7)
@ 2021-08-14 13:53 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2021-08-14 13:53 UTC (permalink / raw)
  To: source

Log Message:
-----------
print a BAGARG message if -T markdown is requested on man(7) input;
suggested by Michael Stapelberg at debian dot org

Modified Files:
--------------
    mandoc:
        main.c
        mandoc.1
        mandoc.h
        mandoc_msg.c

Revision Data
-------------
Index: mandoc.1
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mandoc.1,v
retrieving revision 1.252
retrieving revision 1.253
diff -Lmandoc.1 -Lmandoc.1 -u -p -r1.252 -r1.253
--- mandoc.1
+++ mandoc.1
@@ -2371,6 +2371,14 @@ The
 .Fl O Cm tag
 option was specified but the tag was not found in any of the displayed
 manual pages.
+.It Sy "\-Tmarkdown unsupported for man(7) input"
+.Pq man
+The
+.Fl T Cm markdown
+option was specified but an input file uses the
+.Xr man 7
+language.
+No output is produced for that input file.
 .El
 .Sh SEE ALSO
 .Xr apropos 1 ,
Index: mandoc.h
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mandoc.h,v
retrieving revision 1.273
retrieving revision 1.274
diff -Lmandoc.h -Lmandoc.h -u -p -r1.273 -r1.274
--- mandoc.h
+++ mandoc.h
@@ -257,6 +257,7 @@ enum	mandocerr {
 	MANDOCERR_BADVAL_BAD, /* bad argument value */
 	MANDOCERR_BADVAL_DUPE, /* duplicate argument value */
 	MANDOCERR_TAG, /* no such tag */
+	MANDOCERR_MAN_TMARKDOWN, /* -Tmarkdown unsupported for man(7) input */
 
 	MANDOCERR_SYSERR, /* ===== start of system errors ===== */
 
Index: mandoc_msg.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mandoc_msg.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -Lmandoc_msg.c -Lmandoc_msg.c -u -p -r1.15 -r1.16
--- mandoc_msg.c
+++ mandoc_msg.c
@@ -257,6 +257,7 @@ static	const char *const type_message[MA
 	"bad option value",
 	"duplicate option value",
 	"no such tag",
+	"-Tmarkdown unsupported for man(7) input",
 
 	/* system errors */
 	NULL,
Index: main.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/main.c,v
retrieving revision 1.355
retrieving revision 1.356
diff -Lmain.c -Lmain.c -u -p -r1.355 -r1.356
--- main.c
+++ main.c
@@ -968,6 +968,9 @@ parse(struct mparse *mp, int fd, const c
 		case OUTT_PS:
 			terminal_man(outst->outdata, meta);
 			break;
+		case OUTT_MARKDOWN:
+			mandoc_msg(MANDOCERR_MAN_TMARKDOWN, 0, 0, NULL);
+			break;
 		default:
 			break;
 		}
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-14 13:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-14 13:53 mandoc: print a BAGARG message if -T markdown is requested on man(7) schwarze

source@mandoc.bsd.lv

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.vuxu.org/mandoc-source

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 mandoc-source mandoc-source/ https://inbox.vuxu.org/mandoc-source \
		source@mandoc.bsd.lv
	public-inbox-index mandoc-source

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.mandoc.source


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git