[sane-devel] coolscan2 in 1.0.8
Henning Meier-Geinitz
henning at meier-geinitz.de
Sun Apr 14 10:55:33 BST 2002
Hi,
On Sat, Apr 13, 2002 at 09:11:58PM +0100, Major A wrote:
> I would be glad if coolscan2 could be included in SANE 1.0.8. It is
> currently in a reasonably stable version (0.1.3). Supported scanners
> are Nikon LS-30, LS-40, and possibly (but untested) LS-4000 and
> LS-8000.
>
> Could someone here please look at the backend to see whether the code
> is acceptable? It can be found at
I took a look at the CVS code.
In addition to the comments from Frank:
* Please provide a sample config file, maybe just comment out the example entries
from README.
* From the code:
sanei_usb_attach_matching_devices ("usb Nikon *", cs2_attach);
sanei_usb_attach_matching_devices ("usb 0x04b0 *", cs2_attach);
This won't work. The sanei function isn't that intelligent yet. You
can only give vendor and product ids, no "*" and no names. See
http://sanei.meier-geinitz.de/sanei__usb_8h.html#a8 for documentation.
* Concerning the exits mentioned by Frank: It shouldn't segfault
either :-) Try to catch the error condition and return
SANE_STATUS_NO_MEM to the frontend (or whatever error status is
appropriate).
* If you haven't done until now, check your backend with Frank's
tstbackend testsuite (http://fz.eryx.net/sane/).
* sane_set_io_mode must return SANE_STATUS_GOOD if m == SANE_FALSE
(non-blocking). Not that important, but that's what the standard says.
* Please run your code through "indent -gnu" to get the coding style
similar to that of the other SANE backends. See
doc/backend-writing.txt.
* When the code goes into SANE, please use a real version number in
coolscan2.desc (currently 1.0.0) and increase it with every change
in SANE CVS.
* There are some compilation warnings. At least those look more serious:
coolscan2.c:1597: warning: unknown conversion type character z' in format
coolscan2.c:1597: warning: unknown conversion type character z' in format
coolscan2.c:1597: warning: too many arguments for format
coolscan2.c: In function cs2_xmalloc':
coolscan2.c:2264: warning: unknown conversion type character z' in format
coolscan2.c:2264: warning: too many arguments for format
coolscan2.c: In function cs2_xrealloc':
coolscan2.c:2280: warning: unknown conversion type character z' in format
coolscan2.c:2280: warning: too many arguments for format
* Please contact me before the code is actually included in CVS, I
would like to compile it on some more platforms.
Bye,
Henning
More information about the sane-devel
mailing list