[sane-devel] On functions

m. allan noah anoah at pfeiffer.edu
Mon Dec 8 16:16:52 GMT 2003


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 
described...

allan

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





More information about the sane-devel mailing list