discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: "LÉVAI Dániel" <leva@ecentrum.hu>
Cc: discuss@mdocml.bsd.lv
Subject: Re: "cannot parse date" for a seemingly valid .Dd parameter
Date: Thu, 28 Aug 2014 19:35:22 +0200	[thread overview]
Message-ID: <20140828173522.GT912@iris.usta.de> (raw)
In-Reply-To: <20140828163215.GN29425@serenity.local>

Hi Daniel,

LÉVAI Dániel wrote on Thu, Aug 28, 2014 at 06:32:15PM +0200:

> So here are the new outputs of the given commands:
> 
> $ ./configure
[...]
> wchar: yes

Good.

> manpath: no

By the way, that is odd.  Given that the bug hides so skillfully,
i'd like to pay attention to any clue.  You say you are on Linux?
Can you show the output of:

 $ manpath
 $ which manpath
 $ man -w manpath
 $ ls -ald /etc/man*
 $ man -w man.conf
 $ man -V

> $ ./mandoc -Wall -Tlocale test.1 > /dev/null
[...]
> ascii_init: LC_TIME = hu_HU.UTF-8

Good.

> And my new config.h:
[...]
> #define HAVE_WCHAR 1

Good.

So even though we haven't found your bug yet, your report already
resulted in one useful bugfix.

> "Unfortunately", CVS HEAD still doesn't emit my original problem
> when using '-Tlint'.

So we have no choice but to retry with 1.13.1.  Please go to your
checkout area and do this:

 $ cvs up -C
 $ cvs up -r VERSION_1_13_1
 $ patch < tmp.patch  # the debug patch appended below (for 1.13.1)
 $ make clean
 $ make

And then we need the usual sequence of commands again...

Yours,
  Ingo


Index: main.c
===================================================================
RCS file: /cvs/mdocml/main.c,v
retrieving revision 1.177
diff -u -p -r1.177 main.c
--- main.c	21 Jun 2014 22:24:01 -0000	1.177
+++ main.c	28 Aug 2014 17:33:02 -0000
@@ -21,6 +21,7 @@
 #endif
 
 #include <assert.h>
+#include <locale.h>
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
@@ -89,6 +90,9 @@ main(int argc, char *argv[])
 	int		 options;
 	enum mandoclevel rc;
 	char		*defos;
+
+	fprintf(stderr, "main: LC_TIME = %s\n",
+	    setlocale(LC_TIME, NULL));
 
 	progname = strrchr(argv[0], '/');
 	if (progname == NULL)
Index: mandoc.c
===================================================================
RCS file: /cvs/mdocml/mandoc.c,v
retrieving revision 1.83
diff -u -p -r1.83 mandoc.c
--- mandoc.c	6 Jul 2014 19:09:00 -0000	1.83
+++ mandoc.c	28 Aug 2014 17:33:02 -0000
@@ -25,6 +25,7 @@
 #include <ctype.h>
 #include <errno.h>
 #include <limits.h>
+#include <locale.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -456,8 +457,11 @@ a2time(time_t *t, const char *fmt, const
 
 	memset(&tm, 0, sizeof(struct tm));
 
+	fprintf(stderr, "a2time: LC_TIME = %s\n",
+	    setlocale(LC_TIME, NULL));
 	pp = NULL;
 #ifdef	HAVE_STRPTIME
+	fprintf(stderr, "a2time: calling strptime()\n");
 	pp = strptime(p, fmt, &tm);
 #endif
 	if (NULL != pp && '\0' == *pp) {
Index: term_ascii.c
===================================================================
RCS file: /cvs/mdocml/term_ascii.c,v
retrieving revision 1.27
diff -u -p -r1.27 term_ascii.c
--- term_ascii.c	1 Aug 2014 19:25:52 -0000	1.27
+++ term_ascii.c	28 Aug 2014 17:33:02 -0000
@@ -94,9 +94,13 @@ ascii_init(enum termenc enc, char *outop
 
 #ifdef	USE_WCHAR
 	if (TERMENC_ASCII != enc) {
+		fprintf(stderr, "ascii_init: LC_TIME = %s\n",
+		    setlocale(LC_TIME, NULL));
 		v = TERMENC_LOCALE == enc ?
 		    setlocale(LC_ALL, "") :
 		    setlocale(LC_CTYPE, "en_US.UTF-8");
+		fprintf(stderr, "ascii_init: LC_TIME = %s\n",
+		    setlocale(LC_TIME, NULL));
 		if (NULL != v && MB_CUR_MAX > 1) {
 			p->enc = enc;
 			p->advance = locale_advance;


--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

  reply	other threads:[~2014-08-28 17:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-27 14:58 LÉVAI Dániel
2014-08-27 15:07 ` Kristaps Dzonsons
2014-08-27 15:15   ` LÉVAI Dániel
2014-08-28  0:43     ` Ingo Schwarze
2014-08-28  8:39       ` LÉVAI Dániel
2014-08-28 16:11         ` Ingo Schwarze
2014-08-28 16:32           ` LÉVAI Dániel
2014-08-28 17:35             ` Ingo Schwarze [this message]
2014-08-28 18:06               ` LÉVAI Dániel
2014-08-28 19:49                 ` Ingo Schwarze
2014-08-28 21:07                   ` LÉVAI Dániel
2014-08-29 15:38                     ` Ingo Schwarze
2014-08-30  8:57                       ` LÉVAI Dániel

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=20140828173522.GT912@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=discuss@mdocml.bsd.lv \
    --cc=leva@ecentrum.hu \
    /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).