[sane-devel] RFC: New sanei_pv8630 interface
Henning Meier-Geinitz
henning at meier-geinitz.de
Sun Dec 16 15:37:17 GMT 2001
Hi,
On Sat, Dec 15, 2001 at 02:19:16PM -0700, Marcio Luis Teixeira wrote:
> In an effort to reduce code duplication, I would like to propose a draft
> for a
> new sanei interface for the PV8630 chip. The current draft can be found
> here:
>
> http://umax1220u-sane.sourceforge.net/sanei/
Hey, that's cool! As I don't have such a scanner I had only a quick
look on it. If it doesn't break anything, I'm not opposed to commit it
to CVS.
The only (not very important) issue: Keep an eye on readability and
code style (see doc/backend-writing.txt). I'm not counting spaces or
tabs but the position of "{" should be constant at least in one file.
Example:
sanei_pv8630_write_byte( int fd, SANEI_PV_Index index, SANE_Byte byte )
{
and
SANE_Status
sanei_pv8630_read_byte( int fd, SANEI_PV_Index index, SANE_Byte *byte ) {
SANE_Status status;
IIRC GNU coding standard says the former is the correct one.
A had a look at the sanei_usb patch and the only thing I would like to
comment on is again coding style and documentation :-)
sanei_usb.h: The addition of "extern" is ok and it's my fault :-)
Could you add some more lines about what the parameters int rtype,
int req, int value, and int index mean? Also please keep the lines
below 80 characters.
sanei_usb.c: Add the copyright of the person who wrote the code. Line
length, brackets et. (see above). In DBG statements, use the full
name of the function ("sanei_usb_control_msg: ...") to avoid
confusion.
I can't test if it works because my scanners don't need control
messages for scanning.
Bye,
Henning
More information about the sane-devel
mailing list