[Coco] cprep19 __FILE__ fix?
gene heskett
gheskett at wdtv.com
Wed May 25 20:22:15 EDT 2011
On Wednesday, May 25, 2011 08:15:20 PM Willard Goosey did opine:
> On Wed, May 25, 2011 at 02:49:23PM -0700, Michael Furman wrote:
> > Willard, I looked into this a few months ago. Off the top of my
> > haead:
> >
> > 1) I have some source for the Krieder C library, but when I
> > 1) assembled it, it was not exactly the same as binary copies
> > 1) floating around. This reduces my confidence that the resulting
> > 1) clib after hacking will actually work properly, and makes it
> > 1) difficult to generate a patch that will always work. The date
> > 1) command returns the correct year.
>
> Bleah. I'm still trying to debug curses, I'm not about to start
> messing around with clib.
>
> > 3) I took a look at Nitros9's date command and it has some Y2Kish
> > 3) stuff there but it's not clear if it works correctly. The
> > 3) algorithm there seemed a bit convoluted or worked the problem
> > 3) backwards (from my perspective) for some unknown reason (to
> > 3) optimize it? for 8-bit math apparently?). The comment in
> > 3) date.asm is from Grandpa Gene:
> > * 5 1996/09/25 Gene Heskett
> > * Made Y2K compliant.
>
> I believe there was some trouble about making sure <2000 dates in file
> timestamps and things like that didn't break, but I don't really
> remember the discussion, I just used the results.
>
> Gene? Any comments?
>
ISTR I worked on the date command to add an offset of 100 if it was before
1980 or so. It WILL eventually break, but likely long after they boil me
done & burn the remains.
> > 4) It appears that Nitros9 keeps a 1-byte year,
This has been true since os9 version 1.00. Every byte of the DP0 page was
allocated from the gitgo, so there is no room to expand.
> > so this is what one
> > 4) would expect F$Time to return. According to OS9Defs:
> > D.Time equ . System Time
> > D.Year rmb 1
And ISTR the clock module constrains that byte to a $00 to $63 value.
> Heh, gonna be trouble in 2157, or maybe even 2028 if something tries
> to look at that as a signed number.
Either way there won't be a lot I can do about it by then...
> > I'll try to fill in the rest of details from my previous
> > investigation of this issue later this evening.
>
> Good luck!
>
> > The result was that to fix UUCPBB (Which reported the year as 19111
> > in some places and 111 in others) I basically changed any occurrence
> > of '19%d', year to '%d', 1900+year. This was a hack that doesn't
> > address the real lower level problem.
>
> Heh, yup. That's the plan for cprep19. ;-) Since the date string is
> of fixed length, I know which characters to overwrite.
>
> Willard
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
<http://tinyurl.com/ddg5bz>
<http://www.cantrip.org/gatto.html>
H. L. Mencken's Law:
Those who can -- do.
Those who can't -- teach.
Martin's Extension:
Those who cannot teach -- administrate.
More information about the Coco
mailing list