[ale] calling fini
Chris Fowler
ChrisF at computone.com
Fri Mar 9 11:32:29 EST 2001
I ca'nt reporduce it either. I only get this problem under RH 7.0 not 6.2?
Weired?
Chris
-----Original Message-----
From: James Kinney [mailto:jkinney at localnetsolutions.com]
To: ale at ale.org
Sent: Friday, March 09, 2001 11:25 AM
To: Chris Fowler
Cc: 'mic at mathcs.emory.edu'; 'ale at ale.org'
Subject: RE: [ale] calling fini
double check your time.h. I can't reproduce your fini error.
James P. Kinney IIIÂ Â \Changing the mobile computing world/
President and COO     \         one Linux user        /
Local Net Solutions,LLC \          at a time.         /
770-493-8244Â Â Â Â Â Â Â Â Â Â Â Â \.___________________________./
On Fri, 9 Mar 2001, Chris Fowler wrote:
> Here is update code and stil getting: calling fini:
>
> #include <time.h>
>
> int
> main(void)
> {
> Â Â Â Â Â int hour = 0;
> Â Â Â Â Â int minutes = 0;
> Â Â Â Â Â int seconds = 0;
> Â Â Â Â Â char amp ='a';
> Â Â Â Â Â time_t *timet;
> Â Â Â Â Â struct tm *buf;
>
> Â Â Â Â Â time(timet);
> Â Â Â Â Â buf = localtime(timet);
>
> Â Â Â Â Â hour = buf->tm_hour;
> Â Â Â Â Â minutes = buf->tm_min;
> Â Â Â Â Â seconds = buf->tm_sec;
>
> Â Â Â Â Â if ( hour > 12 )
> Â Â Â Â Â {
> Â Â Â Â Â Â Â Â Â Â Â Â hour = hour - 12;
> Â Â Â Â Â Â Â Â Â Â Â Â amp = 'p';
> Â Â Â Â Â }
>
> Â Â Â Â Â printf("%02d:%02d:%02d%c\n", hour,minutes,seconds, amp);
> Â Â Â Â Â return 0;
> }
>
> -----Original Message-----
> From: mic at mathcs.emory.edu [mailto:mic at mathcs.emory.edu]
> Sent: Friday, March 09, 2001 11:11 AM
> To: ChrisF at computone.com
> Subject: Re: [ale] calling fini
>
>
> > Â Â Â char *test ='\0';
>
> C sillently promotes '\0' to 0 (NULL). You probably want:
>
> Â Â Â Â Â char *test = "\0";
>
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list