diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-03-30 21:30:45 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-03-30 21:30:45 +0200 |
commit | ee770c2346eb37e0dcb8b6cf3eaacf3d8efd6bbc (patch) | |
tree | 58f05092be1a17a939e861f8cadcda1b6ca2ecef /backend/s9036.c | |
parent | 0da9e21872802cfc6e975b1ebaf9efb9e5934d84 (diff) | |
parent | fef76e17ed4c607ea73b81279f9ef1d7121be900 (diff) |
Merge branch 'release/experimental/1.0.29-1_experimental1'experimental/1.0.29-1_experimental1
Diffstat (limited to 'backend/s9036.c')
-rw-r--r-- | backend/s9036.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/backend/s9036.c b/backend/s9036.c index 1b97f80..4124b7b 100644 --- a/backend/s9036.c +++ b/backend/s9036.c @@ -51,7 +51,7 @@ static S9036_Device *s9036_devices; /* sets loc_s bytes long value at offset loc in scsi command to value size */ -static void +static void set_size (Byte * loc, int loc_s, size_t size) { int i; @@ -62,7 +62,7 @@ set_size (Byte * loc, int loc_s, size_t size) } } -static long +static long reserve_unit (int fd) { const Byte scsi_reserve[] = @@ -73,7 +73,7 @@ reserve_unit (int fd) return sanei_scsi_cmd (fd, scsi_reserve, sizeof (scsi_reserve), 0, 0); } -static long +static long release_unit (int fd) { const Byte scsi_release[] = @@ -654,9 +654,9 @@ init_options (S9036_Scanner * s) static const SANE_Range percentage_range = { - -100 << SANE_FIXED_SCALE_SHIFT, /* minimum */ - 100 << SANE_FIXED_SCALE_SHIFT, /* maximum */ - 1 << SANE_FIXED_SCALE_SHIFT /* quantization */ + SANE_FIX(-100), /* minimum */ + SANE_FIX(100), /* maximum */ + SANE_FIX(1) /* quantization */ }; static const SANE_Range automatic_adjust_range = @@ -871,7 +871,7 @@ sane_exit (void) sane_close (dev->handle); free (dev); } - + if (devlist) free (devlist); } @@ -881,7 +881,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only) { S9036_Device *dev; int i; - + local_only = local_only; /* silence compilation warnings */ if (devlist) @@ -1022,6 +1022,7 @@ sane_control_option (SANE_Handle handle, SANE_Int option, case OPT_BR_Y: if (info) *info |= SANE_INFO_RELOAD_PARAMS; + // fall through case OPT_BRIGHT_ADJUST: case OPT_CONTR_ADJUST: s->val[option] = *(SANE_Word *) val; @@ -1237,7 +1238,7 @@ sane_start (SANE_Handle handle) return SANE_STATUS_GOOD; } -static void +static void copy_buffer (S9036_Scanner * s, SANE_Byte ** buf, SANE_Int * max_len, SANE_Int * len) { @@ -1327,7 +1328,7 @@ SANE_Status sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking) { handle = handle; /* silence compilation warnings */ - + DBG (1, "sane_set_io_mode(%d)\n", non_blocking); return (non_blocking == SANE_TRUE) ? |