Mail Archives: djgpp/1999/08/01/21:50:58
I hope everyone is NOT are incredibly rude as this person
is? Imagine an attitude like HIS in the _real_ world...
it wouldn't him far (and probably hasn't).
Such an increbile show of impolitedness can be excused ONCE;
lets see about next time.
At 02:38 AM 8/2/99 +0200, you wrote:
>On Sun, 1 Aug 1999, Radical NetSurfer wrote:
> ^^
> Why can't you state your real name instead of
> some silly alias?
>
>> When I try to compile this sample code (from the Libc.hlp file), it
>> compiles with no problems, HOWEVER, it does not work!!!
>>
>> what's wrong ?!?
>> how is it FIXED ?!?
>>
>> #include <stdio.h>
>> #include <time.h>
>>
>> /* size_t strftime(char *buf, size_t n, const char *format, const
>> struct tm *time); */
>>
>> struct tm t;
>>
>> char buf[100];
>>
>> strftime(buf, 100, "%B %d, %Y", &t);
>>
>> printf("Date/Time: %s\n", buf);
-----------------------
>> compiles: AOK
>> outputs: January 00, 1900
>> why this funky incorrect output?!?
>
>What would you expect? You have to initialise 't' to some time+date
>(using mktime for example).
the Libc.hlp file makes NO mention of this. if the documentation
of GCC/ LIBC is DEFICIENT... that is obviously not my fault.
>> PLEASE: What other faulty things (ie SURPRISES) am I in
>> store for with DJGPP ?!?
>
>Learn C programming first, then you can complain about bugs you
>think you've found.
>
>Gisle V.
- Raw text -