<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Wed, 16 Jan 1985 02:23:00 GMT
From   : grayson%uiucuxc.uucp@BRL-TGR.ARPA
Subject: Re: Screen Editor

Probably the only way is to write zeroes into the directory entries
( and then reset the disk system ).
But this involves knowing how those allocation block numbers are stored
in the directory entries, and this is really a mess.  The allocation
block numbers can be either 1 or 2 bytes in length (you can figure it
out), so there may be either 8 or 16 of them per directory entry.
Even worse, it may happen that there is not a one-to-one correspondence
between directory entries and extents.  A directory entry that addresses
two extents is possible, and then the extent number on the first directory
entry of the file will be 0 or 1, depending on whether the file extends
into the second extent.  The reason for this is that the field which
indicates the number of 128 byte records in the extent is just 1 byte
long, with maximum allowable value of 128.  Thus 16K is the maximum 
extent size.
       It's probably posssible to write the code to shrink the file
portably, but only if you have access to some of these other types of
CP/M systems for debugging.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>