diff --git a/backend/escl/escl_jpeg.c b/backend/escl/escl_jpeg.c index e284863d1..178d9e5c6 100644 --- a/backend/escl/escl_jpeg.c +++ b/backend/escl/escl_jpeg.c @@ -154,7 +154,7 @@ output_no_message(j_common_ptr __sane_unused__ cinfo) * \return SANE_STATUS_GOOD (if everything is OK, otherwise, SANE_STATUS_NO_MEM/SANE_STATUS_INVAL) */ SANE_Status -get_JPEG_data(capabilities_t *scanner, int *w, int *h, int *bps) + get_JPEG_data(capabilities_t *scanner, int *width, int *height, int *bps) { int start = 0; struct jpeg_decompress_struct cinfo; @@ -164,8 +164,8 @@ get_JPEG_data(capabilities_t *scanner, int *w, int *h, int *bps) int lineSize = 0; JDIMENSION x_off = 0; JDIMENSION y_off = 0; - JDIMENSION wid = 0; - JDIMENSION hei = 0; + JDIMENSION w = 0; + JDIMENSION h = 0; int pos = 0; if (scanner->tmp == NULL) @@ -204,10 +204,10 @@ get_JPEG_data(capabilities_t *scanner, int *w, int *h, int *bps) scanner->pos_x = 0; x_off = scanner->pos_x; - wid = scanner->width - x_off; + w = scanner->width - x_off; y_off = scanner->pos_y; - hei = scanner->height - y_off; - surface = malloc(wid * hei * cinfo.output_components); + h = scanner->height - y_off; + surface = malloc(w * h * cinfo.output_components); if (surface == NULL) { jpeg_destroy_decompress(&cinfo); DBG( 1, "Escl Jpeg : Memory allocation problem\n"); @@ -218,9 +218,9 @@ get_JPEG_data(capabilities_t *scanner, int *w, int *h, int *bps) return (SANE_STATUS_NO_MEM); } jpeg_start_decompress(&cinfo); - if (x_off > 0 || wid < cinfo.output_width) - jpeg_crop_scanline(&cinfo, &x_off, &wid); - lineSize = wid * cinfo.output_components; + if (x_off > 0 || w < cinfo.output_width) + jpeg_crop_scanline(&cinfo, &x_off, &w); + lineSize = w * cinfo.output_components; if (y_off > 0) jpeg_skip_scanlines(&cinfo, y_off); pos = 0; @@ -230,10 +230,10 @@ get_JPEG_data(capabilities_t *scanner, int *w, int *h, int *bps) pos++; } scanner->img_data = surface; - scanner->img_size = lineSize * hei; + scanner->img_size = lineSize * h; scanner->img_read = 0; - *w = wid; - *h = hei; + *width = w; + *height = h; *bps = cinfo.output_components; jpeg_finish_decompress(&cinfo); jpeg_destroy_decompress(&cinfo); @@ -245,8 +245,8 @@ get_JPEG_data(capabilities_t *scanner, int *w, int *h, int *bps) SANE_Status get_JPEG_data(capabilities_t __sane_unused__ *scanner, - int __sane_unused__ *w, - int __sane_unused__ *h, + int __sane_unused__ *width, + int __sane_unused__ *height, int __sane_unused__ *bps) { return (SANE_STATUS_INVAL);