db@cbosgd.UUCP (Deceased Bird) (06/28/86)
I got my Aztec C 1.06H.1 update disk the other day and installed it. I don't know to what extent calling the update number expedited delivery, but I got the disk within about 5 days of my call. Note that it is not a bootable disk (which it explains in the README file, which you could cat if the disk was bootable :-)). The System file is version 3.1.1 and the SHELL has a date of (I believe) 6/4/86. So far, no major problems. I discovered that the trouble I'd been having with my application (an 8085 diasassembler, don't ask {okay, ask!}) was not due to some inherent problem in the SHELL or System (though it might be a compiler bug) but rather to nested calls to the new time functions provided with 1.06H. I was doing a call like: strcpy(s, ctime(time((time_t)NULL))); which apparently doesn't work right most of the time (I got address errors when it died). Breaking the function calls apart, as in: time(&foo); bar = ctime(&foo); strcpy(s, bar); (where foo, bar, s, etc. all have the appropriate definitions) seems to have fixed the problem. Note that in the nested version, I had everything declared with the proper pointer types, etc., so I don't think it was a case of the old A-to-D register switcheroo. Despite the initial problem getting them to work, having the UNIX time functions is very handy (thanks, Manx!). BTW: Does anybody know if Manx expects us to return the H.1 update disk? There wasn't any reminder to that effect in the package. Dave Bursik/..cbosgd!db
naftoli@aecom.UUCP (Robert N. Berlinger) (07/01/86)
> I was doing a call like: > > strcpy(s, ctime(time((time_t)NULL))); > > which apparently doesn't work right most of the time (I got address errors > when it died). Breaking the function calls apart, as in: > > time(&foo); > bar = ctime(&foo); > strcpy(s, bar); > > (where foo, bar, s, etc. all have the appropriate definitions) seems to have > fixed the problem. These are not equivalent! "time((time_t)NULL)" does not return a pointer, it returns a time_t. Ctime, however, does expect a pointer, which you properly passed in your second version. There is no way to nest them, in this case. -- Robert Berlinger Systems Analyst Albert Einstein College of Medicine UUCP: ...{philabs,cucard,pegasus,ihnp4,rocky2}!aecom!naftoli Compuserve: 73047,741
db@cbosgd.UUCP (Deceased Bird) (07/09/86)
g/compiler bug/s//programmer error/g In article <347@aecom.UUCP> naftoli@aecom.UUCP (Robert N. Berlinger) writes: >> I was doing a call like: >> >> strcpy(s, ctime(time((time_t)NULL))); >> [/etc, /etc] >> > >These are not equivalent! "time((time_t)NULL)" does not return a >pointer, it returns a time_t. Ctime, however, does expect a >pointer, which you properly passed in your second version. There >is no way to nest them, in this case. I sit corrected. Thanks for pointing this out! (Send me e-mail to collect your prize! {Hurry, supplies are limited!}) Dave Bursik/..cbosgd!db