source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: print a BAGARG message if -T markdown is requested on man(7)
Date: Sat, 14 Aug 2021 08:53:39 -0500 (EST)	[thread overview]
Message-ID: <c2aa88c932e076b7@mandoc.bsd.lv> (raw)

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


                 reply	other threads:[~2021-08-14 13:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=c2aa88c932e076b7@mandoc.bsd.lv \
    --to=schwarze@mandoc.bsd.lv \
    --cc=source@mandoc.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).