From ab5d790e2689a4039883a6de0eead2ab0a3be742 Mon Sep 17 00:00:00 2001 From: Frank Zago Date: Mon, 19 Sep 2005 19:57:48 +0000 Subject: [PATCH] Replaced __unused__ with __sane_unused__ to avoid a namespace conflict. --- backend/dc210.c | 18 +++++++++--------- backend/leo.c | 10 +++++----- backend/matsushita.c | 10 +++++----- backend/sceptre.c | 10 +++++----- backend/sp15c-scsi.h | 5 ++++- backend/sp15c.h | 7 +++++-- backend/teco1.c | 10 +++++----- backend/teco2.c | 12 ++++++------ backend/teco3.c | 10 +++++----- include/sane/sanei_backend.h | 4 ++-- 10 files changed, 51 insertions(+), 45 deletions(-) diff --git a/backend/dc210.c b/backend/dc210.c index d0ceef8a9..e76b470dd 100644 --- a/backend/dc210.c +++ b/backend/dc210.c @@ -653,7 +653,7 @@ change_res (int fd, unsigned char res) } SANE_Status -sane_init (SANE_Int * version_code, SANE_Auth_Callback __unused__ authorize) +sane_init (SANE_Int * version_code, SANE_Auth_Callback __sane_unused__ authorize) { char f[] = "sane_init"; @@ -826,7 +826,7 @@ static const SANE_Device dev[] = { SANE_Status sane_get_devices (const SANE_Device *** device_list, - SANE_Bool __unused__ local_only) + SANE_Bool __sane_unused__ local_only) { static const SANE_Device *devlist[] = { dev + 0, 0 @@ -1127,7 +1127,7 @@ my_source_mgr; typedef my_source_mgr *my_src_ptr; METHODDEF (void) -sanei_jpeg_init_source (j_decompress_ptr __unused__ cinfo) +sanei_jpeg_init_source (j_decompress_ptr __sane_unused__ cinfo) { /* nothing to do */ } @@ -1169,7 +1169,7 @@ sanei_jpeg_skip_input_data (j_decompress_ptr cinfo, long num_bytes) } METHODDEF (void) -sanei_jpeg_term_source (j_decompress_ptr __unused__ cinfo) +sanei_jpeg_term_source (j_decompress_ptr __sane_unused__ cinfo) { /* no work necessary here */ } @@ -1274,7 +1274,7 @@ sane_start (SANE_Handle handle) } SANE_Status -sane_read (SANE_Handle __unused__ handle, SANE_Byte * data, +sane_read (SANE_Handle __sane_unused__ handle, SANE_Byte * data, SANE_Int max_length, SANE_Int * length) { @@ -1377,7 +1377,7 @@ sane_read (SANE_Handle __unused__ handle, SANE_Byte * data, } void -sane_cancel (SANE_Handle __unused__ handle) +sane_cancel (SANE_Handle __sane_unused__ handle) { DBG (127, "sane_cancel() called\n"); if (Camera.scanning) @@ -1387,14 +1387,14 @@ sane_cancel (SANE_Handle __unused__ handle) } SANE_Status -sane_set_io_mode (SANE_Handle __unused__ handle, - SANE_Bool __unused__ non_blocking) +sane_set_io_mode (SANE_Handle __sane_unused__ handle, + SANE_Bool __sane_unused__ non_blocking) { return SANE_STATUS_UNSUPPORTED; } SANE_Status -sane_get_select_fd (SANE_Handle __unused__ handle, SANE_Int __unused__ * fd) +sane_get_select_fd (SANE_Handle __sane_unused__ handle, SANE_Int __sane_unused__ * fd) { return SANE_STATUS_UNSUPPORTED; } diff --git a/backend/leo.c b/backend/leo.c index 2f3b8edb1..aced79608 100644 --- a/backend/leo.c +++ b/backend/leo.c @@ -433,7 +433,7 @@ leo_identify_scanner (Leo_Scanner * dev) /* SCSI sense handler. Callback for SANE. */ static SANE_Status -leo_sense_handler (int scsi_fd, unsigned char *result, void __unused__ *arg) +leo_sense_handler (int scsi_fd, unsigned char *result, void __sane_unused__ *arg) { int asc, ascq, sensekey; int len; @@ -1290,7 +1290,7 @@ leo_send_halftone_pattern (Leo_Scanner * dev) /* Sane entry points */ SANE_Status -sane_init (SANE_Int * version_code, SANE_Auth_Callback __unused__ authorize) +sane_init (SANE_Int * version_code, SANE_Auth_Callback __sane_unused__ authorize) { FILE *fp; char dev_name[PATH_MAX]; @@ -1337,7 +1337,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback __unused__ authorize) } SANE_Status -sane_get_devices (const SANE_Device *** device_list, SANE_Bool __unused__ local_only) +sane_get_devices (const SANE_Device *** device_list, SANE_Bool __sane_unused__ local_only) { Leo_Scanner *dev; int i; @@ -1911,7 +1911,7 @@ sane_read (SANE_Handle handle, SANE_Byte * buf, SANE_Int max_len, } SANE_Status -sane_set_io_mode (SANE_Handle __unused__ handle, SANE_Bool __unused__ non_blocking) +sane_set_io_mode (SANE_Handle __sane_unused__ handle, SANE_Bool __sane_unused__ non_blocking) { SANE_Status status; Leo_Scanner *dev = handle; @@ -1938,7 +1938,7 @@ sane_set_io_mode (SANE_Handle __unused__ handle, SANE_Bool __unused__ non_blocki } SANE_Status -sane_get_select_fd (SANE_Handle __unused__ handle, SANE_Int __unused__ * fd) +sane_get_select_fd (SANE_Handle __sane_unused__ handle, SANE_Int __sane_unused__ * fd) { DBG (DBG_proc, "sane_get_select_fd: enter\n"); diff --git a/backend/matsushita.c b/backend/matsushita.c index 091858e8f..c10856440 100644 --- a/backend/matsushita.c +++ b/backend/matsushita.c @@ -840,7 +840,7 @@ get_int_list_index (const SANE_Word list[], const SANE_Word value) /* SCSI sense handler. Callback for SANE. */ static SANE_Status -matsushita_sense_handler (int scsi_fd, unsigned char *result, void __unused__ *arg) +matsushita_sense_handler (int scsi_fd, unsigned char *result, void __sane_unused__ *arg) { int asc, ascq, sensekey; int len; @@ -1703,7 +1703,7 @@ do_cancel (Matsushita_Scanner * dev) /* Entry points */ SANE_Status -sane_init (SANE_Int * version_code, SANE_Auth_Callback __unused__ authorize) +sane_init (SANE_Int * version_code, SANE_Auth_Callback __sane_unused__ authorize) { FILE *fp; char dev_name[PATH_MAX]; @@ -1750,7 +1750,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback __unused__ authorize) } SANE_Status -sane_get_devices (const SANE_Device *** device_list, SANE_Bool __unused__ local_only) +sane_get_devices (const SANE_Device *** device_list, SANE_Bool __sane_unused__ local_only) { Matsushita_Scanner *dev; int i; @@ -2412,7 +2412,7 @@ sane_read (SANE_Handle handle, SANE_Byte * buf, SANE_Int max_len, } SANE_Status -sane_set_io_mode (SANE_Handle __unused__ handle, SANE_Bool __unused__ non_blocking) +sane_set_io_mode (SANE_Handle __sane_unused__ handle, SANE_Bool __sane_unused__ non_blocking) { SANE_Status status; Matsushita_Scanner *dev = handle; @@ -2436,7 +2436,7 @@ sane_set_io_mode (SANE_Handle __unused__ handle, SANE_Bool __unused__ non_blocki } SANE_Status -sane_get_select_fd (SANE_Handle __unused__ handle, SANE_Int __unused__ * fd) +sane_get_select_fd (SANE_Handle __sane_unused__ handle, SANE_Int __sane_unused__ * fd) { DBG (DBG_proc, "sane_get_select_fd: enter\n"); diff --git a/backend/sceptre.c b/backend/sceptre.c index bdfd5b141..5474d3ccd 100644 --- a/backend/sceptre.c +++ b/backend/sceptre.c @@ -521,7 +521,7 @@ sceptre_adjust_raster (Sceptre_Scanner * dev, size_t size_in) * Since this scanner does not have REQUEST SENSE, it is always an * error if this function is called.*/ static SANE_Status -sceptre_sense_handler (int scsi_fd, unsigned char __unused__ *result, void __unused__ *arg) +sceptre_sense_handler (int scsi_fd, unsigned char __sane_unused__ *result, void __sane_unused__ *arg) { DBG (DBG_proc, "sceptre_sense_handler (scsi_fd = %d)\n", scsi_fd); @@ -1307,7 +1307,7 @@ sceptre_send_gamma (Sceptre_Scanner * dev) /* Entry points */ SANE_Status -sane_init (SANE_Int * version_code, SANE_Auth_Callback __unused__ authorize) +sane_init (SANE_Int * version_code, SANE_Auth_Callback __sane_unused__ authorize) { FILE *fp; char dev_name[PATH_MAX]; @@ -1354,7 +1354,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback __unused__ authorize) } SANE_Status -sane_get_devices (const SANE_Device *** device_list, SANE_Bool __unused__ local_only) +sane_get_devices (const SANE_Device *** device_list, SANE_Bool __sane_unused__ local_only) { Sceptre_Scanner *dev; int i; @@ -1991,7 +1991,7 @@ sane_read (SANE_Handle handle, SANE_Byte * buf, SANE_Int max_len, } SANE_Status -sane_set_io_mode (SANE_Handle __unused__ handle, SANE_Bool __unused__ non_blocking) +sane_set_io_mode (SANE_Handle __sane_unused__ handle, SANE_Bool __sane_unused__ non_blocking) { SANE_Status status; Sceptre_Scanner *dev = handle; @@ -2018,7 +2018,7 @@ sane_set_io_mode (SANE_Handle __unused__ handle, SANE_Bool __unused__ non_blocki } SANE_Status -sane_get_select_fd (SANE_Handle __unused__ handle, SANE_Int __unused__ * fd) +sane_get_select_fd (SANE_Handle __sane_unused__ handle, SANE_Int __sane_unused__ * fd) { DBG (DBG_proc, "sane_get_select_fd: enter\n"); diff --git a/backend/sp15c-scsi.h b/backend/sp15c-scsi.h index 23b519e90..4babc8bf4 100644 --- a/backend/sp15c-scsi.h +++ b/backend/sp15c-scsi.h @@ -49,6 +49,9 @@ static const char RCSid_sh[] = "$Header$"; /* ------------------------------------------------------------------------- */ /* * $Log$ + * Revision 1.6 2005/09/19 19:57:48 fzago-guest + * Replaced __unused__ with __sane_unused__ to avoid a namespace conflict. + * * Revision 1.5 2004/11/13 19:53:04 fzago-guest * Fixes some warnings. * @@ -540,7 +543,7 @@ static scsiblk window_descriptor_blockB = /* ==================================================================== */ -static scsiblk __unused__ *lint_catcher[] = +static scsiblk __sane_unused__ *lint_catcher[] = {&reserve_unitB, &release_unitB, &inquiryB, diff --git a/backend/sp15c.h b/backend/sp15c.h index bcec54a54..3d986f070 100644 --- a/backend/sp15c.h +++ b/backend/sp15c.h @@ -49,6 +49,9 @@ static const char RCSid_h[] = "$Header$"; /* ------------------------------------------------------------------------- */ /* * $Log$ + * Revision 1.7 2005/09/19 19:57:48 fzago-guest + * Replaced __unused__ with __sane_unused__ to avoid a namespace conflict. + * * Revision 1.6 2004/11/13 19:53:04 fzago-guest * Fixes some warnings. * @@ -273,7 +276,7 @@ static int static int wait_scanner (struct sp15c *s); -static int __unused__ +static int __sane_unused__ sp15c_object_position (struct sp15c *s); static SANE_Status @@ -282,7 +285,7 @@ static SANE_Status static void swap_res (struct sp15c *s); -static int __unused__ +static int __sane_unused__ sp15c_object_discharge (struct sp15c *s); static int diff --git a/backend/teco1.c b/backend/teco1.c index 5fd074caa..65b7d6185 100644 --- a/backend/teco1.c +++ b/backend/teco1.c @@ -576,7 +576,7 @@ teco_get_inquiry_82 (Teco_Scanner * dev) /* SCSI sense handler. Callback for SANE. * These scanners never set asc or ascq. */ static SANE_Status -teco_sense_handler (int __unused__ scsi_fd, unsigned char *result, void __unused__ *arg) +teco_sense_handler (int __sane_unused__ scsi_fd, unsigned char *result, void __sane_unused__ *arg) { int sensekey; int len; @@ -1468,7 +1468,7 @@ do_cancel (Teco_Scanner * dev) /* Sane entry points */ SANE_Status -sane_init (SANE_Int * version_code, SANE_Auth_Callback __unused__ authorize) +sane_init (SANE_Int * version_code, SANE_Auth_Callback __sane_unused__ authorize) { FILE *fp; char dev_name[PATH_MAX]; @@ -1515,7 +1515,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback __unused__ authorize) } SANE_Status -sane_get_devices (const SANE_Device *** device_list, SANE_Bool __unused__ local_only) +sane_get_devices (const SANE_Device *** device_list, SANE_Bool __sane_unused__ local_only) { Teco_Scanner *dev; int i; @@ -2160,7 +2160,7 @@ sane_read (SANE_Handle handle, SANE_Byte * buf, SANE_Int max_len, } SANE_Status -sane_set_io_mode (SANE_Handle __unused__ handle, SANE_Bool __unused__ non_blocking) +sane_set_io_mode (SANE_Handle __sane_unused__ handle, SANE_Bool __sane_unused__ non_blocking) { SANE_Status status; Teco_Scanner *dev = handle; @@ -2187,7 +2187,7 @@ sane_set_io_mode (SANE_Handle __unused__ handle, SANE_Bool __unused__ non_blocki } SANE_Status -sane_get_select_fd (SANE_Handle __unused__ handle, SANE_Int __unused__ *fd) +sane_get_select_fd (SANE_Handle __sane_unused__ handle, SANE_Int __sane_unused__ *fd) { DBG (DBG_proc, "sane_get_select_fd: enter\n"); diff --git a/backend/teco2.c b/backend/teco2.c index 148ca559f..d377b24c3 100644 --- a/backend/teco2.c +++ b/backend/teco2.c @@ -59,7 +59,7 @@ VM656A, VM6586 update 2004/08/05, use of SANE_VALUE_SCAN_MODE_LINEART, _GRAY, and _COLOR, changed use of %d to %ld (when bytes values are displayed) - update 2005/03/04, use of __unused__ + update 2005/03/04, use of __sane_unused__ update 2005/07/29. Removed using teco_request_sense (dev) routine for VM3564 */ @@ -1669,7 +1669,7 @@ teco_scan (Teco_Scanner * dev) /* SCSI sense handler. Callback for SANE. */ static SANE_Status -teco_sense_handler (int scsi_fd, unsigned char *result, void __unused__ *arg) +teco_sense_handler (int scsi_fd, unsigned char *result, void __sane_unused__ *arg) { int asc, ascq, sensekey; int len; @@ -2504,7 +2504,7 @@ do_cancel (Teco_Scanner * dev) /* Sane entry points */ SANE_Status -sane_init (SANE_Int * version_code, SANE_Auth_Callback __unused__ authorize) +sane_init (SANE_Int * version_code, SANE_Auth_Callback __sane_unused__ authorize) { FILE *fp; char dev_name[PATH_MAX]; @@ -2551,7 +2551,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback __unused__ authorize) } SANE_Status -sane_get_devices (const SANE_Device *** device_list, SANE_Bool __unused__ local_only) +sane_get_devices (const SANE_Device *** device_list, SANE_Bool __sane_unused__ local_only) { Teco_Scanner *dev; int i; @@ -3341,7 +3341,7 @@ sane_read (SANE_Handle handle, SANE_Byte * buf, SANE_Int max_len, } SANE_Status -sane_set_io_mode (SANE_Handle __unused__ handle, SANE_Bool __unused__ non_blocking) +sane_set_io_mode (SANE_Handle __sane_unused__ handle, SANE_Bool __sane_unused__ non_blocking) { SANE_Status status; Teco_Scanner *dev = handle; @@ -3368,7 +3368,7 @@ sane_set_io_mode (SANE_Handle __unused__ handle, SANE_Bool __unused__ non_blocki } SANE_Status -sane_get_select_fd (SANE_Handle __unused__ handle, SANE_Int __unused__ * fd) +sane_get_select_fd (SANE_Handle __sane_unused__ handle, SANE_Int __sane_unused__ * fd) { DBG (DBG_proc, "sane_get_select_fd: enter\n"); diff --git a/backend/teco3.c b/backend/teco3.c index d9a461abc..b712f908a 100644 --- a/backend/teco3.c +++ b/backend/teco3.c @@ -422,7 +422,7 @@ teco_identify_scanner (Teco_Scanner * dev) /* SCSI sense handler. Callback for SANE. * These scanners never set asc or ascq. */ static SANE_Status -teco_sense_handler (int __unused__ scsi_fd, unsigned char *result, void __unused__ *arg) +teco_sense_handler (int __sane_unused__ scsi_fd, unsigned char *result, void __sane_unused__ *arg) { int sensekey; int len; @@ -1490,7 +1490,7 @@ do_cancel (Teco_Scanner * dev) /* Sane entry points */ SANE_Status -sane_init (SANE_Int * version_code, SANE_Auth_Callback __unused__ authorize) +sane_init (SANE_Int * version_code, SANE_Auth_Callback __sane_unused__ authorize) { FILE *fp; char dev_name[PATH_MAX]; @@ -1537,7 +1537,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback __unused__ authorize) } SANE_Status -sane_get_devices (const SANE_Device *** device_list, SANE_Bool __unused__ local_only) +sane_get_devices (const SANE_Device *** device_list, SANE_Bool __sane_unused__ local_only) { Teco_Scanner *dev; int i; @@ -2152,7 +2152,7 @@ sane_read (SANE_Handle handle, SANE_Byte * buf, SANE_Int max_len, } SANE_Status -sane_set_io_mode (SANE_Handle __unused__ handle, SANE_Bool __unused__ non_blocking) +sane_set_io_mode (SANE_Handle __sane_unused__ handle, SANE_Bool __sane_unused__ non_blocking) { SANE_Status status; Teco_Scanner *dev = handle; @@ -2179,7 +2179,7 @@ sane_set_io_mode (SANE_Handle __unused__ handle, SANE_Bool __unused__ non_blocki } SANE_Status -sane_get_select_fd (SANE_Handle __unused__ handle, SANE_Int __unused__ * fd) +sane_get_select_fd (SANE_Handle __sane_unused__ handle, SANE_Int __sane_unused__ * fd) { DBG (DBG_proc, "sane_get_select_fd: enter\n"); diff --git a/include/sane/sanei_backend.h b/include/sane/sanei_backend.h index 09820e6f5..f2a1ffa25 100644 --- a/include/sane/sanei_backend.h +++ b/include/sane/sanei_backend.h @@ -20,11 +20,11 @@ /* __unused tells the compiler a variable is unused, so the * compiler doesn't spit a warning. */ -#define __unused__ __attribute__((unused)) +#define __sane_unused__ __attribute__((unused)) #else -#define __unused__ +#define __sane_unused__ #endif