Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Oct 2000 17:54:31 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        "Andrey A. Chernov" <ache@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/lib/libc/stdtime strftime.3 strftime.c
Message-ID:  <20001026175431.A93234@sunbay.com>
In-Reply-To: <200010261422.HAA97091@freefall.freebsd.org>; from ache@FreeBSD.org on Thu, Oct 26, 2000 at 07:22:42AM -0700
References:  <200010261422.HAA97091@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--qDbXVdCdHGoSgWSk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Oct 26, 2000 at 07:22:42AM -0700, Andrey A. Chernov wrote:
> ache        2000/10/26 07:22:42 PDT
> 
>   Modified files:
>     lib/libc/stdtime     strftime.3 strftime.c 
>   Log:
>   Force %c to be "%a %Ef %T %Y" to eliminate problems with bad c_fmt
>   
>   Submitted by:	ru
>   
>   Revision  Changes    Path
>   1.21      +5 -5      src/lib/libc/stdtime/strftime.3
>   1.26      +3 -2      src/lib/libc/stdtime/strftime.c
> 
Thanks, and a few notes.

The strptime.c needs a similar fix, and the next logical step would be
to eliminate the c_fmt member of the lc_time_T structure completely.
Here is the patch (untested), without the src/share/timedef part.


-- 
Ruslan Ermilov		Oracle Developer/DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

--qDbXVdCdHGoSgWSk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=p

Index: strptime.c
===================================================================
RCS file: /home/ncvs/src/lib/libc/stdtime/strptime.c,v
retrieving revision 1.17
diff -u -p -r1.17 strptime.c
--- strptime.c	1999/12/10 10:52:54	1.17
+++ strptime.c	2000/10/26 14:49:39
@@ -143,7 +143,7 @@ label:
 			break;
 
 		case 'c':
-			buf = _strptime(buf, Locale->c_fmt, tm);
+			buf = _strptime(buf, "%a %Ef %T %Y", tm);
 			if (buf == 0)
 				return 0;
 			break;
Index: timelocal.c
===================================================================
RCS file: /home/ncvs/src/lib/libc/stdtime/timelocal.c,v
retrieving revision 1.9
diff -u -p -r1.9 timelocal.c
--- timelocal.c	2000/06/29 17:21:45	1.9
+++ timelocal.c	2000/10/26 14:49:39
@@ -76,14 +76,6 @@ const struct lc_time_T	_C_time_locale = 
 	*/
 	"%m/%d/%y",
 
-	/*
-	** c_fmt (ctime-compatible)
-	** Note that
-	**	"%a %b %d %H:%M:%S %Y"
-	** is used by Solaris 2.3.
-	*/
-	"%a %Ef %X %Y",
-
 	/* am */
 	"AM",
 
Index: timelocal.h
===================================================================
RCS file: /home/ncvs/src/lib/libc/stdtime/timelocal.h,v
retrieving revision 1.5
diff -u -p -r1.5 timelocal.h
--- timelocal.h	1999/11/30 19:24:07	1.5
+++ timelocal.h	2000/10/26 14:49:39
@@ -37,7 +37,6 @@ struct lc_time_T {
 	const char *	weekday[7];
 	const char *	X_fmt;
 	const char *	x_fmt;
-	const char *	c_fmt;
 	const char *	am;
 	const char *	pm;
 	const char *	date_fmt;

--qDbXVdCdHGoSgWSk--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001026175431.A93234>