Christopher,
You are correct in that the C68 qdir_read function does not work on the QPC2
DOS device.
The cause is a slight difference in behaviour of the ioa.open trap#2 call
when the open mode=4 (to specify a directory mode open) for the DOS device
compared to other devices. For most devices if you open give the open call
a string such as "WIN1_LIB_FRED" then if the WIN1_LIB_ directory exists it
will be opened, and if not the WIN1_ directory will be opened. On the DOS
device you have to give the exact directory name with no trailing
information or it fails (e.g. "DOS_LIB_" - and this would fail if the LIB_
sub-directory did not exist).
The qdir_read function is written this way so that it behaves correctly
whether you have "soft" or "hard" directories on your system. It would be
possible to rewrite the logic of the qdir_read function to take account of
the existence of "hard" directories and thus work correctly on the DOS
device - but this would make the code slightly larger. It all depends on
whether Marcel can make the open behaviour of the DOS device be the same as
other devices (Marcel what do you think?).
Dave
----- Original Message -----
From: "Christopher Cave" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, February 12, 2001 5:44 PM
Subject: [ql-users] C68/QPC2/qdir_read
> Has anyone else come across a problem with the C68 function qdir_read when
> it is applied to DOS directories under QPC2? Calls to open, read and close
> files all work O.K. but not qdir_read.
>
> Christopher Cave
>
>