during compilation of sane-1.0.1 with
gcc-2.95.2
glib-1.2.6
gtk+-1.2.6
gimp-1.1.14
I got
xscanimage.c:79: conflicting types for `GIMP_EXTENSION'
/usr/local/include/libgimp/gimpenums.h:289: previous declaration of `GIMP_EXTENSION'
file:gimpenums.h
typedef enum
{
GIMP_INTERNAL,
GIMP_PLUGIN,
GIMP_EXTENSION,
GIMP_TEMPORARY
} GimpPDBProcType;
file:xscanimage.c
enum
{
STANDALONE, GIMP_EXTENSION
};
I replaced GIMP_EXTENSION with GIMP_EXTENSION2 in xscanimage.c.
Starting program: /usr/local/bin/xscanimage Program received signal SIGSEGV, Segmentation fault. 0x4036b021 in init_options (s=0x80958a8) at epson.c:1672 1672 s->val[ OPT_BR_X].w = s->hw->x_range->max; It happens with my SCSI scanner if I forgot to set the permissions of (x)scanimage with chmod. Looks like a return code is ignored somewhere in sane.
- scanimage executable exit now with sane status, the status SANE_STATUS_EOF is mapped to SANE_STATUS_GOOD.- I added a new batch option
scanimage --batch[=pathname] scanimage -b[=pathname]the default for pathname is "out%d.pnm" where %d is replaced with 1, 2, ... . If you don't know what %d means type "man printf".Notes
- take care that the resulting pathname is not longer than 1023 characters.
- if scanimage fails or is running out of documents to scan (means anytime you use the --batch option) it produce an empty file at the very end.
- It will overwrite existing files.
scanimage --device-name=epson:/dev/scanner --source=Automatic\ Document\ Feeder --mode=Binary --resolution=300 --halftoning=Text\ Enhanced\ Technology --batch