My test code always returns -1.
Reading the open code in libsrc, it looks like it can fail at setfcb
and from there cascade. This is another issue (maybe), in setfcb the
fc->use flag is set to I+U_CON in the read code we are checking for
U_RDR. Does that get changed somewhere behind the curtains.
N0% stat dev:
CON: is CRT:
RDR: is TTY:
PUN: is TTY:
LST: is TTY:
jacotton wrote:This is another issue (maybe), in setfcb the
fc->use flag is set to I+U_CON in the read code we are checking for
U_RDR. Does that get changed somewhere behind the curtains.
This looks okay, i = 1 for RDR:, so that should be 1 + 4 = 5 = U_RDR
To make things easier, I've created a separate library for fileio with devices - just link with -lcpmdevice and that version of fileio will be used in preference to the simple version. I'm can't remember what the issue with zxcc was, but it seems to have disappeared now.