Re: Invalid Time with SDFiler 1.0
- From: Wes <wjltemp-gg@xxxxxxxxx>
- Date: Sun, 23 Sep 2007 11:55:00 -0700
On Sep 23, 7:42 pm, TW <timwess...@xxxxxxxxx> wrote:
The file was created directly onto :3: using the ARCHIVE command. My
guess is that the time was somewhere between 17:04:59.5 and 17:50:00.0
and that bad rounding took place. In any case, perhaps the seconds
field could be MOD 60 to prevent it from crashing the filer.
Maybe. If I remember right the source is included. . . so go right
ahead. :-)
TW
Actually, I tried before I posted, but frankly, looking at the source
code was a humbling experience. But after your encouragement, I
decided to try again. I couldn't figure out why the string "invalid
time" wasn't anywhere in your source till I realized that it was
coming from the TOD>t$ function. With that missing link, I inserted
the following above the only call to TOD>t$ in broswer.S
For all you sysRPL experts, consider the following more of a proof of
concept. I'm sure it can be improved considerably, but it does fix
the problem.
---------------------------------------------------------------------
(
In case the file timestamp has an invalid seconds field such as
17.0460, as has been know to happen, use MOD 60 on the seconds.
Convert h.mmSS -> h.mmss
)
DUP ( h.mmSS h.mmSS )
%2
TRCXY ( h.mmSS h.mm )
SWAP ( h.mm h.mmSS )
% .01
%MOD ( h.mm 0.00SS )
% .006
%MOD ( h.mm 0.00ss )
%+ ( h.mmss )
( end of modifications )
TOD>t$
---------------------------------------------------------------------
No doubt, it would be better to make this change in SDLIB instead.
from
value=tdate.tm_sec+tdate.tm_min*100+tdate.tm_hour*10000;
to
value=tdate.tm_sec%60+tdate.tm_min*100+tdate.tm_hour*10000;
-wes
.
- References:
- Invalid Time with SDFiler 1.0
- From: Wes
- Re: Invalid Time with SDFiler 1.0
- From: TW
- Invalid Time with SDFiler 1.0
- Prev by Date: Re: Invalid Time with SDFiler 1.0
- Next by Date: Re: "When" comand
- Previous by thread: Re: Invalid Time with SDFiler 1.0
- Next by thread: Re: Invalid Time with SDFiler 1.0
- Index(es):
Relevant Pages
|
Loading