[sane-devel] plustek-s.c and plustek.c

Gerhard Jaeger gerhard at gjaeger.de
Fri Aug 5 05:51:49 UTC 2005


Hi,

On Thursday 04 August 2005 16:31, Rayudu Addagarla wrote:
> Hello
> I would like to know is the file plustek-s.c used in the plustek backend. 
> Its just have abstract functions no logic in functions returns some values 
> in every function. 
> Can I copy plustek-s.c for a new backend to start with.

NO - it's only a intermediate file, which is produced during the build step 
by libtool - see Makefile.in:
%-s.lo: %-s.c
        @$(LIBTOOL) $(MCOMP) $(COMPILE) -DSTUBS -DBACKEND_NAME=$* $<

Why plustek? Which scanner do you plan to support?

> To start with a new backend. what are the things.
> the sane document how to write a backend is not enough.

The document, plus the test-backend is enough!

> Tell me if i am right.
> lets say backend name is epson1001
> 1. create epson1001.c in backend directory 
> [have minimum methods in it. sane_init, sane_read etc.]
> 2. add epson1001 in BACKENDS in configure file
> Is that it.?
> will sane go through this backend, though it may now work.
> i mean when i say scanimage -L will it read the epson1001 library.

No, tweak backend/Makefile.in and add the backend for the build step,
also add the backend name to dll.conf, then it'll work.

> Is there any specific file to add backend name in the backends directory or 
> source tree of sane-backend.x.y.z
> 
> for getting started, i would like to have image file read from disk in 
> sane_read() function and return to front end. sort of imitating, as if its 
> scanning from real device.

See the pnm backend, which already does this (for PNM files).

Ciao,
Gerhard




More information about the sane-devel mailing list