delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2004/10/24/20:40:06

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
Date: Sun, 24 Oct 2004 18:39:26 -0600
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Subject: Re: C99 strftime and Related Changes
In-reply-to: <200403201212.i2KCCH6g023568@speedy.ludd.ltu.se>
To: djgpp-workers AT delorie DOT com
Message-id: <0oion09hu4nhpmqa60nqkg2f1b3gie3hmf@4ax.com>
Organization: Systematic Software
MIME-version: 1.0
X-Mailer: Forte Agent 1.93/32.576 English (American)
References: <md3k501lsepls2ofobjc7d9v6vqnoukuc0 AT 4ax DOT com>
<200403201212 DOT i2KCCH6g023568 AT speedy DOT ludd DOT ltu DOT se>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id i9P0dTRY011835
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

[repost]
On Sat, 20 Mar 2004 13:12:17 +0100 (CET), ams AT ludd DOT ltu DOT se wrote:

>According to Brian Inglis:
>> liblocal.02/src/ansi/locale/setlocal.pat to liblocal.02/src/ansi/locale/setlocal.c
>> 
>> liblocal.02/src/ansi/time/strftime.pat to liblocal.02/src/ansi/time/strftime.c
>
>Is this really applicable to djgpp? I've never noticed any
>liblocal. OTOH I haven't been looking.

It's part of the localisation changes by ASA in contrib. 

>> CHANGES C99 Time Related Changes
>...
>> liblocal.02/src/ansi/time/strftime.c
>> src/libc/ansi/time/strftime.c

These were and are the same file. 

>> #define required constants;
>> add YEAR() conversion macro and ISLEAPYEAR() test macro;
>> add weekday enum definitions;
>> add iso_year() and iso_week() functions;
>> accept and ignore C99 E and O modifiers;
>> add C99 %F, %G, %g, %V formats;
>> add %s (GNU) format;
>> fix %z ISO 8601/RFC 822 time zone results
>> 
>> 
>> src/libc/ansi/time/strftime.txh
>> 
>> add new formats; add all modifiers; make descriptions consistent
>
>These changes should be put into src/docs/kb/wc204.txi.

Single entry for strftime sufficient? 

>> tests/libc/ansi/time/makefile
>> 
>> add strftiml.c and strftimt.c tests
>> 
>> 
>> tests/libc/ansi/time/strftime.c
>> 
>> change inline macro calls to table driven tests;
>> add new tests and results for all formats, including unsupported letters
>> 
>> 
>> tests/libc/ansi/time/xstrftm.c
>> 
>> add standard and current locale changes; output each locale name
>> 
>> 
>> tests/libc/ansi/time/strftiml.c
>> 
>> list all formats, including unsupported letters
>> 
>> 
>> tests/libc/ansi/time/strftimt.c
>> 
>> exception tester covering all formats;
>> table driven supporting locales and time zones;
>> many corner cases for non/ISO week and weekdays
>
>Possibly these as well, but I don't think we do. 
>
>But they are good as a commit messages.
>
>
>> --- setlocal.c	2002-07-17 02:16:36.000000000 -0600
>> +++ setlocal.c	2004-02-24 01:57:18.000000000 -0700
>
>It's not clear where this file resides I (and I suspect the others
>too) muchly prefer if you do a diff from a directory higher up. It's
>much easier to apply the patch. And we see immediately which
>setlocal.c you mean.

Okay, good point, will redo. 

>> Index: makefile
>> ===================================================================
>> RCS file: /cvs/djgpp/djgpp/tests/libc/ansi/time/makefile,v
>> retrieving revision 1.3
>> diff -u -t -r1.3 makefile
>> --- makefile	8 Nov 2003 12:19:41 -0000	1.3
>> +++ makefile	17 Mar 2004 06:57:18 -0000
>> @@ -4,6 +4,8 @@
>>  SRC += strftime.c
>>  SRC += tzinfo.c
>>  SRC += xstrftm.c
>> +SRC += strftimt.c
>> +SRC += strftiml.c
>
>Nothing serious, but why not keep them in alphabetical order?

Tend to add new stuff at end of lists, will change. 

>I didn't look much at the code as I prefer test programs and it's a
>lot of test cases you have made. Alas it's doubtful if I'll have the
>time to try them.
>
>I looked at the start of the info file patch and it looked
>good. (After a while it became just a list of format parameters which
>I didn't verify.)

I generated some of the non-obvious values e.g. %V %s, as part of the
new test cases, and I cross checked the Standard, docs, tests, and
code. But bugs are always likely. 

-- 
Thanks. Take care, Brian Inglis

Business:  +1(403)547-8816 	Brian DOT Inglis AT SystematicSW DOT ab DOT ca
Residence: +1(403)239-6520 	BWInglis AT Shaw DOT ca
Cellular:  +1(403)708-7006 	Brian_Inglis AT CompuServe DOT com
Facsimile: +1(403)547-8816 	Brian_Inglis AT CSi DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019