Date: Sun, 1 Aug 1999 21:50:18 -0400 (EDT) Message-Id: <1.5.4.16.19990801215003.337f3ebc@erie.net> X-Sender: calculs2 AT erie DOT net X-Mailer: Windows Eudora Light Version 1.5.4 (16) Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: djgpp AT delorie DOT com From: Rich Subject: Re: strftime BROKEN??? Reply-To: djgpp AT delorie DOT com 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 >> #include >> >> /* 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.