[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Availability of various calls



In <9508151600.AA28634@mail.imc.exec.nhs.uk>,
Chris Ridd (chris@imc.exec.nhs.uk) wrote:

>I'm looking a little at how to make the mintlibs more independant of the
>Mint version, so it will work better on other OSes (eg MagiC) and extensions
>(eg MetaDOS).
>
>So, I was wondering: are the Directory scanning calls Dopendir, Dreaddir,
>Drewinddir, and Dclosedir always available for all drives, or are they just
>available on a per-drive basis?

MiNT implements Dopendir/Dreaddir for all drives, but MetaDOS
doesn't - apparently there are MetaDOS drivers out there that
implement these functions only for CD-ROMs (in order to provide
access to CD-ROMs using long filenames)...

The best (and safest) way to handle this appears to be to *always*
call Dopendir() first, and only to use Fsfirst() if Dopendir()
failed with EINVF (-32L)...

>Would they also be available on all media used in removeable drives?
>
>Looking ahead somewhat, would it be sensible to assume that if a call like
>Psignal() is implemented, Pkill/Psigaction/etc are also implemented?

I think it's safer not to depend on this - a future version of
MagiC (the operating system) might implement only a subset of MiNT's
signal handling facilities; I'd better always check for EINVF...

Martin

-- 
 Martin Koehling // mk@anuurn.do.open.de