diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-07-15 11:25:39 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-07-15 11:25:39 +0200 |
commit | 1edb02101a9306fc711cd422ed507d18165b1691 (patch) | |
tree | bd2d48a139bfbe869f4f49359b63097931a45e7b /backend/gphoto2.c | |
parent | 2ca8a81bd0d99fe4d75c229d0e988d8ef710285f (diff) |
move from support/1.0.27 to feature/1.0.27
Diffstat (limited to 'backend/gphoto2.c')
-rw-r--r-- | backend/gphoto2.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/backend/gphoto2.c b/backend/gphoto2.c index 7b297c4..c8af306 100644 --- a/backend/gphoto2.c +++ b/backend/gphoto2.c @@ -353,14 +353,23 @@ static const SANE_Device *devlist[] = { * debug_func - called for gphoto2 debugging output (if enabled) */ static void +#ifdef GPLOGFUNC_NO_VARGS +debug_func (GPLogLevel level, const char *domain, const char *message, + void __sane_unused__ * data) +#else debug_func (GPLogLevel level, const char *domain, const char *format, - va_list args, void UNUSEDARG * data) + va_list args, void __sane_unused__ * data) +#endif { if (level == GP_LOG_ERROR) DBG (0, "%s(ERROR): ", domain); else DBG (0, "%s(%i): ", domain, level); +#ifdef GPLOGFUNC_NO_VARGS + DBG (0, "%s", message); +#else sanei_debug_msg (0, DBG_LEVEL, STRINGIFY (BACKEND_NAME), format, args); +#endif DBG (0, "\n"); } @@ -650,7 +659,7 @@ change_res (SANE_Byte res) * is present, and initialize gphoto2 */ SANE_Status -sane_init (SANE_Int * version_code, SANE_Auth_Callback UNUSEDARG authorize) +sane_init (SANE_Int * version_code, SANE_Auth_Callback __sane_unused__ authorize) { SANE_Int n, entries; SANE_Char f[] = "sane_init"; @@ -940,7 +949,7 @@ sane_exit (void) */ SANE_Status sane_get_devices (const SANE_Device *** device_list, SANE_Bool - UNUSEDARG local_only) + __sane_unused__ local_only) { DBG (127, "sane_get_devices called\n"); @@ -1314,7 +1323,7 @@ my_source_mgr; typedef my_source_mgr *my_src_ptr; METHODDEF (void) -jpeg_init_source (j_decompress_ptr UNUSEDARG cinfo) +jpeg_init_source (j_decompress_ptr __sane_unused__ cinfo) { /* nothing to do */ } @@ -1361,7 +1370,7 @@ METHODDEF (void) jpeg_skip_input_data (j_decompress_ptr cinfo, long num_bytes) } METHODDEF (void) -jpeg_term_source (j_decompress_ptr UNUSEDARG cinfo) +jpeg_term_source (j_decompress_ptr __sane_unused__ cinfo) { /* no work necessary here */ } @@ -1476,7 +1485,7 @@ sane_start (SANE_Handle handle) * sane_read() - From SANE API */ SANE_Status -sane_read (SANE_Handle UNUSEDARG handle, SANE_Byte * data, +sane_read (SANE_Handle __sane_unused__ handle, SANE_Byte * data, SANE_Int max_length, SANE_Int * length) { if (Cam_data.scanning == SANE_FALSE) @@ -1530,7 +1539,7 @@ sane_read (SANE_Handle UNUSEDARG handle, SANE_Byte * data, * sane_cancel() - From SANE API */ void -sane_cancel (SANE_Handle UNUSEDARG handle) +sane_cancel (SANE_Handle __sane_unused__ handle) { if (Cam_data.scanning) { @@ -1544,8 +1553,8 @@ sane_cancel (SANE_Handle UNUSEDARG handle) * sane_set_io_mode() - From SANE API */ SANE_Status -sane_set_io_mode (SANE_Handle UNUSEDARG handle, SANE_Bool - UNUSEDARG non_blocking) +sane_set_io_mode (SANE_Handle __sane_unused__ handle, SANE_Bool + __sane_unused__ non_blocking) { /* sane_set_io_mode() is only valid during a scan */ if (Cam_data.scanning) @@ -1570,7 +1579,7 @@ sane_set_io_mode (SANE_Handle UNUSEDARG handle, SANE_Bool * sane_get_select_fd() - From SANE API */ SANE_Status -sane_get_select_fd (SANE_Handle UNUSEDARG handle, SANE_Int UNUSEDARG * fd) +sane_get_select_fd (SANE_Handle __sane_unused__ handle, SANE_Int __sane_unused__ * fd) { return SANE_STATUS_UNSUPPORTED; } @@ -1738,13 +1747,13 @@ read_dir (SANE_String dir, SANE_Bool read_files) { if (gp_list_free (dir_list) < 0) { - DBG (0, "%s: errror: gp_list_free failed\n", f); + DBG (0, "%s: error: gp_list_free failed\n", f); } dir_list = NULL; } if (gp_list_new (&dir_list) < 0) { - DBG (0, "%s: errror: gp_list_new failed\n", f); + DBG (0, "%s: error: gp_list_new failed\n", f); } if (read_files) @@ -1783,7 +1792,7 @@ read_info (SANE_String_Const fname) * set_res - set picture size depending on resolution settings */ static void -set_res (SANE_Int UNUSEDARG lowres) +set_res (SANE_Int __sane_unused__ lowres) { if (gphoto2_opt_thumbnails) { @@ -1943,7 +1952,6 @@ converter_scan_complete (void) static SANE_Status converter_init (SANE_Handle handle) { - SANE_Int row_stride; struct jpeg_error_mgr jerr; my_src_ptr src; @@ -1982,8 +1990,6 @@ exit(1); dest_mgr = sanei_jpeg_jinit_write_ppm (&cinfo); (void) jpeg_start_decompress (&cinfo); - row_stride = cinfo.output_width * cinfo.output_components; - parms.bytes_per_line = cinfo.output_width * 3; /* 3 colors */ parms.pixels_per_line = cinfo.output_width; parms.lines = cinfo.output_height; |