From owner-freebsd-bugs Tue Jan 15 19:20:12 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 103BD37B41C for ; Tue, 15 Jan 2002 19:20:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0G3K1Y65514; Tue, 15 Jan 2002 19:20:01 -0800 (PST) (envelope-from gnats) Date: Tue, 15 Jan 2002 19:20:01 -0800 (PST) Message-Id: <200201160320.g0G3K1Y65514@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Tim J. Robbins" Subject: Re: bin/33834 Reply-To: "Tim J. Robbins" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/33834; it has been noted by GNATS. From: "Tim J. Robbins" To: Sheldon Hearn 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