kopia lustrzana https://gitlab.com/sane-project/backends
Fixed warnings in "backend/umax1220u-common.c" and "backend/umax1220u.c".
Added notes about 2000U, 2200U and 2200US to "backend/umax1220u.desc"DEVEL_2_0_BRANCH-1
rodzic
514e7a99c6
commit
6b7f34f0de
|
@ -360,14 +360,14 @@ bescape (const unsigned char *data, int dlen, unsigned char *buf, int blen)
|
||||||
}
|
}
|
||||||
|
|
||||||
static SANE_Status
|
static SANE_Status
|
||||||
cwrite (UMAX_Handle * scan, UMAX_Cmd cmd, int len, const unsigned char *data,
|
cwrite (UMAX_Handle * scan, UMAX_Cmd cmd, size_t len, const unsigned char *data,
|
||||||
UMAX_Status_Byte * s)
|
UMAX_Status_Byte * s)
|
||||||
{
|
{
|
||||||
SANE_Status res;
|
SANE_Status res;
|
||||||
UMAX_Status_Byte s0, s4;
|
UMAX_Status_Byte s0, s4;
|
||||||
|
|
||||||
static unsigned char *escaped = NULL;
|
static unsigned char *escaped = NULL;
|
||||||
static int escaped_size = 0;
|
static size_t escaped_size = 0;
|
||||||
|
|
||||||
DBG (80, "cwrite: cmd = %d, len = %d\n", cmd, len);
|
DBG (80, "cwrite: cmd = %d, len = %d\n", cmd, len);
|
||||||
|
|
||||||
|
@ -407,7 +407,7 @@ cwrite (UMAX_Handle * scan, UMAX_Cmd cmd, int len, const unsigned char *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
static SANE_Status
|
static SANE_Status
|
||||||
cread (UMAX_Handle * scan, UMAX_Cmd cmd, int len, unsigned char *data,
|
cread (UMAX_Handle * scan, UMAX_Cmd cmd, size_t len, unsigned char *data,
|
||||||
UMAX_Status_Byte * s)
|
UMAX_Status_Byte * s)
|
||||||
{
|
{
|
||||||
SANE_Status res;
|
SANE_Status res;
|
||||||
|
@ -425,16 +425,11 @@ cread (UMAX_Handle * scan, UMAX_Cmd cmd, int len, unsigned char *data,
|
||||||
|
|
||||||
while (len > 0)
|
while (len > 0)
|
||||||
{
|
{
|
||||||
int req, n;
|
size_t req, n;
|
||||||
|
|
||||||
req = n = (len > 0xf000) ? 0xf000 : len;
|
req = n = (len > 0xf000) ? 0xf000 : len;
|
||||||
CHK (sanei_pv8630_prep_bulkread (scan->fd, n));
|
CHK (sanei_pv8630_prep_bulkread (scan->fd, n));
|
||||||
CHK (sanei_pv8630_bulkread (scan->fd, data, &n));
|
CHK (sanei_pv8630_bulkread (scan->fd, data, &n));
|
||||||
if (n < 0)
|
|
||||||
{
|
|
||||||
DBG (1, "qread: error reading\n");
|
|
||||||
return SANE_STATUS_IO_ERROR;
|
|
||||||
}
|
|
||||||
if (n < req)
|
if (n < req)
|
||||||
{
|
{
|
||||||
DBG (1, "qread: Expecting to read %d, only got %d\n", req, n);
|
DBG (1, "qread: Expecting to read %d, only got %d\n", req, n);
|
||||||
|
@ -458,7 +453,7 @@ cread (UMAX_Handle * scan, UMAX_Cmd cmd, int len, unsigned char *data,
|
||||||
|
|
||||||
/* Seems to be like cwrite, with a verification option? */
|
/* Seems to be like cwrite, with a verification option? */
|
||||||
static SANE_Status
|
static SANE_Status
|
||||||
cwritev (UMAX_Handle * scan, UMAX_Cmd cmd, int len, const unsigned char *data,
|
cwritev (UMAX_Handle * scan, UMAX_Cmd cmd, size_t len, const unsigned char *data,
|
||||||
UMAX_Status_Byte * s)
|
UMAX_Status_Byte * s)
|
||||||
{
|
{
|
||||||
SANE_Status res;
|
SANE_Status res;
|
||||||
|
|
|
@ -162,7 +162,7 @@ static SANE_Option_Descriptor optionResolutionDescriptor = {
|
||||||
sizeof (SANE_Word),
|
sizeof (SANE_Word),
|
||||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT | SANE_CAP_AUTOMATIC,
|
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT | SANE_CAP_AUTOMATIC,
|
||||||
SANE_CONSTRAINT_WORD_LIST,
|
SANE_CONSTRAINT_WORD_LIST,
|
||||||
{(SANE_String_Const *) optionResolutionList}
|
{(const SANE_String_Const *) optionResolutionList}
|
||||||
};
|
};
|
||||||
|
|
||||||
static SANE_Word optionResolutionValue = 75;
|
static SANE_Word optionResolutionValue = 75;
|
||||||
|
@ -302,7 +302,7 @@ static SANE_Option_Descriptor optionTopLeftXDescriptor = {
|
||||||
sizeof (SANE_Fixed),
|
sizeof (SANE_Fixed),
|
||||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT,
|
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT,
|
||||||
SANE_CONSTRAINT_RANGE,
|
SANE_CONSTRAINT_RANGE,
|
||||||
{(SANE_String_Const *) & widthRange}
|
{(const SANE_String_Const *) & widthRange}
|
||||||
};
|
};
|
||||||
|
|
||||||
static SANE_Status
|
static SANE_Status
|
||||||
|
@ -344,7 +344,7 @@ static SANE_Option_Descriptor optionTopLeftYDescriptor = {
|
||||||
sizeof (SANE_Fixed),
|
sizeof (SANE_Fixed),
|
||||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT,
|
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT,
|
||||||
SANE_CONSTRAINT_RANGE,
|
SANE_CONSTRAINT_RANGE,
|
||||||
{(SANE_String_Const *) & heightRange}
|
{(const SANE_String_Const *) & heightRange}
|
||||||
};
|
};
|
||||||
|
|
||||||
static SANE_Status
|
static SANE_Status
|
||||||
|
@ -386,7 +386,7 @@ static SANE_Option_Descriptor optionBotRightXDescriptor = {
|
||||||
sizeof (SANE_Fixed),
|
sizeof (SANE_Fixed),
|
||||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT,
|
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT,
|
||||||
SANE_CONSTRAINT_RANGE,
|
SANE_CONSTRAINT_RANGE,
|
||||||
{(SANE_String_Const *) & widthRange}
|
{(const SANE_String_Const *) & widthRange}
|
||||||
};
|
};
|
||||||
|
|
||||||
static SANE_Status
|
static SANE_Status
|
||||||
|
@ -428,7 +428,7 @@ static SANE_Option_Descriptor optionBotRightYDescriptor = {
|
||||||
sizeof (SANE_Fixed),
|
sizeof (SANE_Fixed),
|
||||||
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT,
|
SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT,
|
||||||
SANE_CONSTRAINT_RANGE,
|
SANE_CONSTRAINT_RANGE,
|
||||||
{(SANE_String_Const *) & heightRange}
|
{(const SANE_String_Const *) & heightRange}
|
||||||
};
|
};
|
||||||
|
|
||||||
static SANE_Status
|
static SANE_Status
|
||||||
|
|
|
@ -21,9 +21,22 @@
|
||||||
|
|
||||||
:mfg "UMAX" ; name a manufacturer
|
:mfg "UMAX" ; name a manufacturer
|
||||||
:url "http://www.umax.com/"
|
:url "http://www.umax.com/"
|
||||||
|
|
||||||
:model "Astra 1220U" ; name models for above-specified mfg.
|
:model "Astra 1220U" ; name models for above-specified mfg.
|
||||||
:interface "USB"
|
:interface "USB"
|
||||||
:comment "Rewrite of command-line driver by Paul Mackerras"
|
:comment "OK"
|
||||||
|
|
||||||
|
:model "Astra 2000U"
|
||||||
|
:interface "USB"
|
||||||
|
:comment "Sort of. Scans, but colors all messed up."
|
||||||
|
|
||||||
|
:model "Astra 2200U"
|
||||||
|
:interface "USB"
|
||||||
|
:comment "Incompatible."
|
||||||
|
|
||||||
|
:model "Astra 2200US"
|
||||||
|
:interface "USB"
|
||||||
|
:comment "Incompatible."
|
||||||
|
|
||||||
; :comment and :url specifiers are optional after :mfg, :model, :desc,
|
; :comment and :url specifiers are optional after :mfg, :model, :desc,
|
||||||
; and at the top-level.
|
; and at the top-level.
|
||||||
|
|
Ładowanie…
Reference in New Issue