[sane-devel] coolscan2 in 1.0.8
Major A
andras at users.sourceforge.net
Sun Apr 14 16:35:01 BST 2002
Henning,
thanks for checking the code.
> * Please provide a sample config file, maybe just comment out the example entries
> from README.
Done.
> * 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.
I have no way of testing this, but from the feedback I got from an
LS-40 user I thought that this worked (not the first version, but the
second). As there is only one USB scanner in question, I've added the
explicit PID now.
> * 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).
Will check this later today.
> * 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.
OK, thanks.
> * 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.
OK, I'll do that just before the code makes it into SANE CVS. The only
two major deviations are long lines and "{", which I usually put in
the same line as the if/switch/etc.
> * 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
These come from the "z" type modifier in the output format string. Is
there any clean way of printing a size_t without using this modifier,
which is not supported in ISO C89?
Thanks,
Andras
===========================================================================
Major Andras
e-mail: andras at users.sourceforge.net
www: http://andras.webhop.org/
===========================================================================
More information about the sane-devel
mailing list