From 58912f68c2489bcee787599837447e0d64dfd61a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 24 May 2017 21:03:56 +0200 Subject: New upstream version 1.0.27 --- backend/hp4200.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'backend/hp4200.c') diff --git a/backend/hp4200.c b/backend/hp4200.c index a069be6..589157d 100644 --- a/backend/hp4200.c +++ b/backend/hp4200.c @@ -698,7 +698,6 @@ compute_first_gain_offset (int target, int max, int min, int *gain, static int write_gamma (HP4200_Scanner * s) { - SANE_Status status; int color; int i; unsigned char gamma[1024]; @@ -728,7 +727,7 @@ write_gamma (HP4200_Scanner * s) sanei_pv8630_write_byte (s->fd, PV8630_REPPADDRESS, 0x06); sanei_pv8630_prep_bulkread (s->fd, sizeof (read_gamma)); to_read = sizeof (read_gamma); - status = sanei_usb_read_bulk (s->fd, read_gamma, &to_read); + sanei_usb_read_bulk (s->fd, read_gamma, &to_read); retval = memcmp (read_gamma, gamma, sizeof (read_gamma)); if (retval != 0) { @@ -1047,7 +1046,6 @@ do_coarse_calibration (HP4200_Scanner * s, struct coarse_t *coarse) int step_size; int ff_step_size; char steps_to_reverse; - char hdpi_div; char line_rate_color; int vdpi; /* vertical dots per inch */ int hdpi_code; @@ -1085,7 +1083,6 @@ do_coarse_calibration (HP4200_Scanner * s, struct coarse_t *coarse) vdpi = 150; hdpi_code = 0; - hdpi_div = hdpi_mapping[hdpi_code]; active_pixels_start = 0x40; line_end = 0x2ee0; s->mclk_div = 2; @@ -1395,7 +1392,6 @@ do_fine_calibration (HP4200_Scanner * s, struct coarse_t *coarse) int vdpi; /* vertical dots per inch */ int hdpi_code; int calibrated; - int first_time; int lines_to_process; static char me[] = "do_fine_calibration"; @@ -1495,7 +1491,6 @@ do_fine_calibration (HP4200_Scanner * s, struct coarse_t *coarse) cache_write (s); calibrated = 0; - first_time = 1; cal_line = malloc (cal_line_size + 1024); average = malloc (sizeof (int) * line_length * 3); memset (average, 0, sizeof (int) * line_length * 3); @@ -2437,7 +2432,7 @@ sane_exit (void) } if (device->dev.name) { - free (device->dev.name); + free ((void *) device->dev.name); } free (device); } -- cgit v1.2.3 From 1687222e1b9e74c89cafbb5910e72d8ec7bfd40f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 31 Jul 2019 16:59:49 +0200 Subject: New upstream version 1.0.28 --- backend/hp4200.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'backend/hp4200.c') diff --git a/backend/hp4200.c b/backend/hp4200.c index 589157d..d4d4f64 100644 --- a/backend/hp4200.c +++ b/backend/hp4200.c @@ -5,24 +5,24 @@ modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Developers: - Adrian Perez Jorge (APJ) - + Adrian Perez Jorge (APJ) - Creator of the original HP4200C backend code. adrianpj@easynews.com - - Andrew John Lewis (AJL) - + + Andrew John Lewis (AJL) - lewi0235@tc.umn.edu Arnar Mar Hrafnkelsson (AMH) - @@ -43,7 +43,7 @@ TODO: image size and the scanner-to-host bandwidth. - improve image quality. - fix problem concerning mangled images - + */ #define BUILD 2 @@ -1498,7 +1498,7 @@ do_fine_calibration (HP4200_Scanner * s, struct coarse_t *coarse) int i; for (i = 0; i < 12; i++) { - memset (registro[i], 0, 5460 * 3); + memset (registro[i], 0, 5460 * 3 * sizeof(registro[0])); } } @@ -1884,7 +1884,7 @@ prepare_for_a_scan (HP4200_Scanner * s) calculated horizontal dpi code */ hdpi_div = hdpi_mapping[hdpi_code]; - /* image_width is set to the correct number of pixels by calling + /* image_width is set to the correct number of pixels by calling fxn. This might be the reason we can't do high res full width scans though...not sure. */ /*s->user_parms.image_width /= 4; */ -- cgit v1.2.3