[sane-devel] On functions

m. allan noah anoah@pfeiffer.edu
Mon, 8 Dec 2003 11:16:52 -0500 (EST)

you did not tell us what you are trying to do, make a frontend program or 
a backend driver.

looking at existing code for either one is the best way to start.

sane_init() and sane_open() are provided by the backends for the frontend 
to call separately, so you dont normally see the arrangement you 


On Mon, 8 Dec 2003, Jason Anderson wrote:

> I'm pretty new to SANE and I'm trying to figure out how to use certain functions, such as the sane_open function.
> Could I, for example, use it in and "if" statement like this:
> /////////////////////
> #include <sane/sane.h>
> //Start it up
> SANE_Status sane_init() {
>   if (SANE_Status sane_open("foo0", "fubu") == sane_status_io_error ) {
>        printf("Sorry, something went wrong\n");
>        return 0;
>    		}
> }
> /////////////////////
> Or does it require something special?

"so don't tell us it can't be done, putting down what you don't know.
money isn't our god, integrity will free our souls" - Max Cavalera