Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: "James Giles" <jamesgiles@worldnet.att.net>
Subject: Re: Forcing 32-bit integers and math
Date: 1998/10/18	[thread overview]
Message-ID: <70dqod$47n@bgtnsc02.worldnet.att.net> (raw)
In-Reply-To: uezpaxr22v.fsf@altair.dfrc.nasa.gov


Richard Maine wrote in message ...
...
>P.S. I *HAVE* seen a non-unix system (Elxsi) that used only headers with no
>trailer or other way to record the size of the preceding record.  Backspace
>even worked - wanna know how?  It kept track of the current record number
>and, if you wanted to backspace, it rewound the file and skipped N-2 records.

Ouch.  Well, in order to get to record N, it should have traversed the
file sequentially.  Why not keep track of the previous record's length
instead of just the record number?  Then a single backspace would
be easy.  Multiple backspaces would still require going back to the
start.  Actually, you could make a trade-off between memory overhead
in the I/O implementation and the time required for backspacing by
keeping the last N record lengths on a stack (throwing away the oldest
one when you try to push more than N) and figuring what value of
N is sufficient for the "average" number of consecutive backspaces.
It cold be made to work I suppose.  Not worth it though: better
to have the backward link.

--
J. Giles





  reply	other threads:[~1998-10-18  4:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <YQsT1.507$525.1552696@ptah.visi.com>
     [not found] ` <6vt65k$5hp$1@walter-fddi.cray.com>
1998-10-14  4:00   ` Forcing 32-bit integers and math G. Hugh SONG
1998-10-14  4:00     ` Greg Lindahl
1998-10-15  4:00       ` H.W. Stockman
1998-10-15  4:00         ` Jeff Drummond
1998-10-15  4:00         ` Greg Lindahl
1998-10-15  4:00           ` James Giles
1998-10-15  4:00             ` Richard Maine
1998-10-18  4:00               ` James Giles [this message]
1998-10-15  4:00             ` Greg Lindahl
1998-10-16  4:00               ` Jeff Drummond
1998-10-16  4:00                 ` James Giles
1998-10-15  4:00       ` Jeff Drummond
1998-10-15  4:00     ` Toon Moene
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox