[sane-devel] Lexmark X1100 backend available
Henning Meier-Geinitz
henning at meier-geinitz.de
Sun Sep 25 16:41:37 UTC 2005
Hi,
On Sat, Sep 24, 2005 at 07:45:45PM -0400, Fred Odendaal wrote:
> I've put a patch file for the Lexmark X1100 backend on my website.
> Instructions for getting it are at
> http://ca.geocities.com/freshshelf@rogers.com/scanner_driver/download.html
Ok, let's have a look (I only mention stuff that hasn't already been
listed by other people):
AUTHORS:
- your email address is missing
configure.in
- is missing (ok, for now it's ok but the final patch that should go
to CVS should have configure.in patched, not configure)
backend/Makefile.in:
| libsane-lexmark.la: $(addsuffix .lo,$(EXTRA_lexmark))
See below for comments.
| libsane-lexmark.la: ../sanei/sanei_config2.lo
Are you sure that you need this (this is used for SCSI devices)
backend/lexmark.c
| static SANE_String_Const mode_list[] = {
| "Color", "Gray", "Black & White", NULL
| };
"Lineart" is used in most backends instead of "Black & White". See
also include/saneopts.h:
#define SANE_VALUE_SCAN_MODE_COLOR SANE_I18N("Color")
#define SANE_VALUE_SCAN_MODE_GRAY SANE_I18N("Gray")
#define SANE_VALUE_SCAN_MODE_LINEART SANE_I18N("Lineart")
| SANE_Status
| init_options (Lexmark_Device * lexmark_device)
All functions that are not part of the SANE API must be either
static or start with "sanei_lexmark_". I would make everything
static and only rename the functions in lexmark-x1100.c that are
called from lexmark.c "sanei_lexmark_". Or, as a workaround, just
#include lexmark-x1100.c in lexmark.c and make everything but the
API functions static. See doc/backend-writing.txt for details.
| sane_init
In my experience it's a good idea to print the version/build number of
the backend in a DBG message. That way you always know what version
was used when you get a bug report. For an example, see gt68xx.c.
| in sane_start
| sane_get_parameters (handle, 0);
check return value?
|if ((lexmark_device->params.lines == 0) ||
| (lexmark_device->params.pixels_per_line == 0) ||
| (lexmark_device->params.bytes_per_line == 0))
| return SANE_STATUS_INVAL;
A DBG message twelling what's wrong would be nice.
backend/lexmark-x1100.c:
- no problems found
One additional thing: You could write a test for the chipset used in
these scanners in tools/check-usb-chip.c. That way it's easy to find
out which other scanners also use the same chipset.
Once you have implemented the changes mentioned here and you have a
manual page, please provide another patch so the backend can be
included into CVS.
Bye,
Henning
More information about the sane-devel
mailing list