Mail Archives: djgpp-workers/2001/08/21/13:10:58
> From: "Andrew Cottrell" <acottrel AT ihug DOT com DOT au>
> Date: Tue, 21 Aug 2001 23:08:31 +1000
>
> I found that the problem appears to be in the 3F00 call. I have included a
> sample app below that can be used to debug and test any changes.
> If I comment out the 3F00 call and instead use _read() these also cause the
> problem to occur, this is expected as _read() also calls 3F00.
But your annotations in the source seem to indicate that the first two
calls to seekerprint fail, while the other 3 succeed. Do you have any
potential explanation for this? The calls seem identical, or am I
missing something obvious?
> The output from the sample app I am using (with allow more conditional
> printf's and #if 0... for debugging) is:
> seek.c 178 4200, flags = 0x02 pos = 0x0000:0000 Char at offset [0] = (3)
> seek.c 178 4200, flags = 0x02 pos = 0x0000:0001 Char at offset [1] = (4)
> seek.c 178 4200, flags = 0x02 pos = 0x0000:0000 Char at offset [0] = (1)
> seek.c 178 4200, flags = 0x02 pos = 0x0000:0001 Char at offset [1] = (2)
> seek.c 178 4200, flags = 0x02 pos = 0x0000:0002 Char at offset [2] = (3)
Thanks for the footwork. However, it is hard to track what yuo
describe, because the above output is inconsistent with the program's
source you posted. Could you please post a session script which shows
output from the source of the test program you posted, including
output from ac_get_magic?
> Taking a wild guess could this be something to do with the STDIN being
> openned as a LFN and the 3F00 requiring a SFN type handle?
So you are saying that any lseek after reading from handle 0 isn't
working? That is, you can't seek a file if it was redirected into the
standard input?
If so, either they treat handle 0 specially, or the reason is deeper.
How about if you open a file with LFN call--does lseek after read work
then?
> (I have no idea how the STDIN handle is setup.)
It isn't set up by our library, itr is simply preconnected by the
shell whcih invoked the DJGPP program. That is, when the DJGPP
program starts, its handle 0 is already connected to the file, instead
of being connected to the CON device.
- Raw text -