kopia lustrzana https://gitlab.com/sane-project/backends
Fix tstbackend errors
rodzic
4b8c5eb3f0
commit
16762f0a4c
|
@ -2092,7 +2092,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
||||||
(action ==
|
(action ==
|
||||||
SANE_ACTION_SET_VALUE ? "SET" : (action ==
|
SANE_ACTION_SET_VALUE ? "SET" : (action ==
|
||||||
SANE_ACTION_GET_VALUE ? "GET" :
|
SANE_ACTION_GET_VALUE ? "GET" :
|
||||||
"SETAUTO")), value, info);
|
"SETAUTO")), value, (void *)info);
|
||||||
|
|
||||||
if (handle != MAGIC || !is_open)
|
if (handle != MAGIC || !is_open)
|
||||||
return SANE_STATUS_INVAL; /* Unknown handle ... */
|
return SANE_STATUS_INVAL; /* Unknown handle ... */
|
||||||
|
@ -2284,6 +2284,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
||||||
case SANE_ACTION_SET_AUTO:
|
case SANE_ACTION_SET_AUTO:
|
||||||
switch (option)
|
switch (option)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
case DC25_OPT_CONTRAST:
|
case DC25_OPT_CONTRAST:
|
||||||
dc25_opt_contrast = SANE_FIX (DC25_OPT_CONTRAST_DEFAULT);
|
dc25_opt_contrast = SANE_FIX (DC25_OPT_CONTRAST_DEFAULT);
|
||||||
break;
|
break;
|
||||||
|
@ -2291,6 +2292,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
||||||
case DC25_OPT_GAMMA:
|
case DC25_OPT_GAMMA:
|
||||||
dc25_opt_gamma = SANE_FIX (DC25_OPT_GAMMA_DEFAULT);
|
dc25_opt_gamma = SANE_FIX (DC25_OPT_GAMMA_DEFAULT);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return SANE_STATUS_UNSUPPORTED; /* We are DUMB */
|
return SANE_STATUS_UNSUPPORTED; /* We are DUMB */
|
||||||
|
@ -2335,7 +2337,8 @@ sane_start (SANE_Handle handle)
|
||||||
int n, i;
|
int n, i;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
DBG (127, "sane_start called\n");
|
DBG (127, "sane_start called, handle=%x\n",handle);
|
||||||
|
|
||||||
if (handle != MAGIC || !is_open ||
|
if (handle != MAGIC || !is_open ||
|
||||||
(dc25_opt_image_number == 0 && dc25_opt_snap == SANE_FALSE))
|
(dc25_opt_image_number == 0 && dc25_opt_snap == SANE_FALSE))
|
||||||
return SANE_STATUS_INVAL; /* Unknown handle ... */
|
return SANE_STATUS_INVAL; /* Unknown handle ... */
|
||||||
|
@ -2557,6 +2560,10 @@ sane_read (SANE_Handle UNUSEDARG handle, SANE_Byte * data,
|
||||||
{
|
{
|
||||||
DBG (127, "sane_read called, maxlen=%d\n", max_length);
|
DBG (127, "sane_read called, maxlen=%d\n", max_length);
|
||||||
|
|
||||||
|
if ( ! started ) {
|
||||||
|
return SANE_STATUS_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (dc25_opt_thumbnails)
|
if (dc25_opt_thumbnails)
|
||||||
{
|
{
|
||||||
if (total_bytes_read == THUMBSIZE)
|
if (total_bytes_read == THUMBSIZE)
|
||||||
|
@ -2726,9 +2733,25 @@ sane_cancel (SANE_Handle UNUSEDARG handle)
|
||||||
SANE_Status
|
SANE_Status
|
||||||
sane_set_io_mode (SANE_Handle UNUSEDARG handle,
|
sane_set_io_mode (SANE_Handle UNUSEDARG handle,
|
||||||
SANE_Bool UNUSEDARG non_blocking)
|
SANE_Bool UNUSEDARG non_blocking)
|
||||||
|
{
|
||||||
|
/* sane_set_io_mode() is only valid during a scan */
|
||||||
|
if (started)
|
||||||
|
{
|
||||||
|
if (non_blocking == SANE_FALSE)
|
||||||
|
{
|
||||||
|
return SANE_STATUS_GOOD;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
return SANE_STATUS_UNSUPPORTED;
|
return SANE_STATUS_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* We aren't currently scanning */
|
||||||
|
return SANE_STATUS_INVAL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SANE_Status
|
SANE_Status
|
||||||
sane_get_select_fd (SANE_Handle UNUSEDARG handle, SANE_Int * UNUSEDARG fd)
|
sane_get_select_fd (SANE_Handle UNUSEDARG handle, SANE_Int * UNUSEDARG fd)
|
||||||
|
|
|
@ -271,8 +271,6 @@ static int zoom_x (struct pixmap *source, struct pixmap *dest);
|
||||||
|
|
||||||
static int zoom_y (struct pixmap *source, struct pixmap *dest);
|
static int zoom_y (struct pixmap *source, struct pixmap *dest);
|
||||||
|
|
||||||
static int save_pixmap (struct pixmap *p, char *name, int orientation, int format);
|
|
||||||
|
|
||||||
static int comet_to_pixmap (unsigned char *, struct pixmap *);
|
static int comet_to_pixmap (unsigned char *, struct pixmap *);
|
||||||
|
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue