source@mandoc.bsd.lv
 help / color / Atom feed
* mandoc: Do not print the style message "missing date" when the date is 
@ 2019-05-21  8:04 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-05-21  8:04 UTC (permalink / raw)
  To: source

Log Message:
-----------
Do not print the style message "missing date" when the date is given
as "$Mdocdate$" without an actual date.  That is the canonical way to
write a new manual page and not bad style at all.
Misleading message reported by kn@ on tech@.

Modified Files:
--------------
    mandoc:
        mandoc.c

Revision Data
-------------
Index: mandoc.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mandoc.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -Lmandoc.c -Lmandoc.c -u -p -r1.114 -r1.115
--- mandoc.c
+++ mandoc.c
@@ -541,10 +541,10 @@ mandoc_normdate(struct roff_man *man, ch
 
 	/* No date specified: use today's date. */
 
-	if (in == NULL || *in == '\0' || strcmp(in, "$" "Mdocdate$") == 0) {
+	if (in == NULL || *in == '\0')
 		mandoc_msg(MANDOCERR_DATE_MISSING, ln, pos, NULL);
+	if (in == NULL || *in == '\0' || strcmp(in, "$" "Mdocdate$") == 0)
 		return time2a(time(NULL));
-	}
 
 	/* Valid mdoc(7) date format. */
 
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

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

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-21  8:04 mandoc: Do not print the style message "missing date" when the date is schwarze

source@mandoc.bsd.lv

Archives are clonable: git clone --mirror http://inbox.vuxu.org/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