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

RE: [MiNT] What's in, what's out?



> From: owner-mint@fishpool.com [mailto:owner-mint@fishpool.com]On Behalf
> Of Konrad M. Kokoszkiewicz
> Sent: Friday, November 26, 1999 2:47 PM
> To: Julian Reschke
> Cc: mint@fishpool.com
> Subject: Re: [MiNT] What's in, what's out?
>
>
> Hi,
>
> I generally agree but,
>
> > d) by discussing new APIs before it's too late (for instance, a function
> > that reads system variables and returns the value in d0 is A
> Very Bad Thing,
> > because you can't detect EINVAL reliably).
>
> I don't know where this superstition came from, but Ssystem(S_GETxxx)
> functions NEVER RETURN ANY ERROR, so there's no "EINVAL" to be detected.
> If one wants to be sure these functions are present, there's a defined way
> to check it (please READ the doc).

OK, sorry, I didn't check (somebody mentioned this as a problem in a
newsgroup).

So, it is usable, but it requires keeping a flag, or doing a version check
every time. Probably not such a big issue if you move it into a library
function.

Generally I'd like to repeat that mixing success/error codes with return
values almost always leads to confusion (like 16-bite negative return values
from Fopen(), or the return value of Fseek() on a file between 2 GB and 4
GB), and so on...