Date: Tue, 15 Jan 2002 19:20:01 -0800 (PST) From: "Tim J. Robbins" <tim@robbins.dropbear.id.au> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/33834 Message-ID: <200201160320.g0G3K1Y65514@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/33834; it has been noted by GNATS. From: "Tim J. Robbins" <tim@robbins.dropbear.id.au> To: Sheldon Hearn <sheldonh@starjuice.net> Cc: bug-followup@FreeBSD.ORG Subject: Re: bin/33834 Date: Wed, 16 Jan 2002 14:16:10 +1100 The Single Unix Spec V2 at http://www.opengroup.org/onlinepubs/007908799/xsh/strptime.html makes no mention of %G, %g, %u, %V, %v, %z, so I think it would be wasted effort to support them, they should just be documented as exceptions to the "All conversion specifications are identical to those described in strptime(3)" statement. %n and %t are described by SUSV2, here is a patch to add them: --- strptime.c.old Sun Jan 13 21:33:40 2002 +++ strptime.c Wed Jan 16 13:41:18 2002 @@ -121,6 +121,12 @@ return 0; break; + case 't': + case 'n': + while (*buf != '\0' && isspace((unsigned char)*buf)) + buf++; + break; + case '+': buf = _strptime(buf, Locale->date_fmt, tm); if (buf == 0) If this patch is used the manual page should be updated to explain that %t and %n eat any whitespace, not just a tab for %t and newline for %n like strftime(). The "BUGS" section of strptime(3) talks of specifiers being "defined", but does not say by what. It says %e and %l may scan too many digits, but SUSV2 allows this; it can scan as many digits as it likes. Similarly, the zero-padded values comment doesn't apply to SUSV2 either. The comments in the code say the same kind of thing. I don't have the expertise with calendar systems to implement the %U or %W specifiers. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201160320.g0G3K1Y65514>