[sane-devel] [SANE2 proposal] Error handling

Julien BLACHE jb@jblache.org
Sat, 29 Nov 2003 17:23:24 +0100

Andi McLean <andi.mclean@ntlworld.com> wrote:


> Why not combine the two e.g.
> typedef SANE_Status
> {
>   int code;
>   int backend_code;
> } SANE_Status;

That's another possibility, but given the way the SANE status codes
are defined at the moment, they could share a 32 bit integer with a
backend-specific status code without any problem. So let's spare some
memory ;)

> You could always use a short instead of an int, which is almost the same
> as proposal 2, but easier to access (No nasty bit manipulation)

That'd only require simple macros to build and use the SANE_Status
returned, it's not that nasty or difficult imho ;)


Julien BLACHE                                   <http://www.jblache.org>