gnome-scan r731 - in trunk: . modules/gsane



Author: bersace
Date: Sun Dec 21 18:19:58 2008
New Revision: 731
URL: http://svn.gnome.org/viewvc/gnome-scan?rev=731&view=rev

Log:
Make functions prototypes consistent.

Modified:
   trunk/ChangeLog
   trunk/modules/gsane/gsane-option-handler-generic.c
   trunk/modules/gsane/gsane-option-handler.c
   trunk/modules/gsane/gsane-option-handler.h
   trunk/modules/gsane/gsane-scanner.c

Modified: trunk/modules/gsane/gsane-option-handler-generic.c
==============================================================================
--- trunk/modules/gsane/gsane-option-handler-generic.c	(original)
+++ trunk/modules/gsane/gsane-option-handler-generic.c	Sun Dec 21 18:19:58 2008
@@ -125,7 +125,7 @@
 
 
 static void
-gsane_option_handler_generic_handle_bool_option(GSaneOptionHandler *handler, SANE_Int n, const SANE_Option_Descriptor*desc, const gchar* group)
+gsane_option_handler_generic_handle_bool_option(GSaneOptionHandler *handler, const SANE_Option_Descriptor*desc, SANE_Int n, const gchar* group)
 {
 	GSaneOptionHandlerGeneric* self = GSANE_OPTION_HANDLER_GENERIC(handler);
 	gboolean value = gsane_option_handler_get_bool(handler, desc, n, NULL);
@@ -136,7 +136,7 @@
 }
 
 static void
-gsane_option_handler_generic_handle_int_option(GSaneOptionHandler *handler, SANE_Int n, const SANE_Option_Descriptor*desc, const gchar* group)
+gsane_option_handler_generic_handle_int_option(GSaneOptionHandler *handler, const SANE_Option_Descriptor*desc, SANE_Int n, const gchar* group)
 {
 	GSaneOptionHandlerGeneric* self = GSANE_OPTION_HANDLER_GENERIC(handler);
 	gint value, min, step, max;
@@ -161,7 +161,7 @@
 }
 
 static void
-gsane_option_handler_generic_handle_double_option(GSaneOptionHandler *handler, SANE_Int n, const SANE_Option_Descriptor*desc, const gchar* group)
+gsane_option_handler_generic_handle_double_option(GSaneOptionHandler *handler, const SANE_Option_Descriptor*desc, SANE_Int n, const gchar* group)
 {
 	GSaneOptionHandlerGeneric* self = GSANE_OPTION_HANDLER_GENERIC(handler);
 	gdouble value, min, step, max;
@@ -186,7 +186,7 @@
 }
 
 static void
-gsane_option_handler_generic_handle_string_option(GSaneOptionHandler *handler, SANE_Int n, const SANE_Option_Descriptor*desc, const gchar* group)
+gsane_option_handler_generic_handle_string_option(GSaneOptionHandler *handler, const SANE_Option_Descriptor*desc, SANE_Int n, const gchar* group)
 {
 	GSaneOptionHandlerGeneric* self = GSANE_OPTION_HANDLER_GENERIC(handler);
 	gchar* value = gsane_option_handler_get_string(handler, desc, n, NULL);
@@ -199,31 +199,31 @@
 }
 
 static void
-gsane_option_handler_generic_handle_non_list_option(GSaneOptionHandler *handler, SANE_Int n, const SANE_Option_Descriptor*desc, const gchar* group)
+gsane_option_handler_generic_handle_non_list_option(GSaneOptionHandler *handler, const SANE_Option_Descriptor*desc, SANE_Int n, const gchar* group)
 {
 	gint array_length;
 
 	/* instanciate option with default value depending on SANE_Value_Type */
 	switch(desc->type) {
 	case SANE_TYPE_BOOL:
-		gsane_option_handler_generic_handle_bool_option(handler, n, desc, group);
+		gsane_option_handler_generic_handle_bool_option(handler, desc, n, group);
 		break;
 	case SANE_TYPE_INT:
 		array_length = desc->size / sizeof(SANE_Word);
 		if (array_length > 1)
 			g_debug("Ignoring int array option %s", desc->name);
 		else
-			gsane_option_handler_generic_handle_int_option(handler, n, desc, group);
+			gsane_option_handler_generic_handle_int_option(handler, desc, n, group);
 		break;
 	case SANE_TYPE_FIXED:
 		array_length = desc->size / sizeof(SANE_Word);
 		if (array_length > 1)
 			g_debug("Ignoring double array option %s", desc->name);
 		else
-			gsane_option_handler_generic_handle_double_option(handler, n, desc, group);
+			gsane_option_handler_generic_handle_double_option(handler, desc, n, group);
 		break;
 	case SANE_TYPE_STRING:
-		gsane_option_handler_generic_handle_string_option(handler, n, desc, group);
+		gsane_option_handler_generic_handle_string_option(handler, desc, n, group);
 		break;
 	default:
 		g_debug("\toption %d : <unhandled> %s", n, desc->name);
@@ -232,7 +232,7 @@
 }
 
 static GSList*
-gsane_option_handler_generic_enum_list_int_values(GSaneOptionHandler *handler, SANE_Int n, const SANE_Option_Descriptor*desc, const gchar* group)
+gsane_option_handler_generic_enum_list_int_values(GSaneOptionHandler *handler, const SANE_Option_Descriptor*desc, SANE_Int n, const gchar* group)
 {
 	GSList *list = NULL;
 	gint count = desc->constraint.word_list[0];
@@ -259,7 +259,7 @@
 }
 
 static GSList*
-gsane_option_handler_generic_enum_list_double_values(GSaneOptionHandler *handler, SANE_Int n, const SANE_Option_Descriptor*desc, const gchar* group)
+gsane_option_handler_generic_enum_list_double_values(GSaneOptionHandler *handler, const SANE_Option_Descriptor*desc, SANE_Int n, const gchar* group)
 {
 	GSList *list = NULL;
 	gint count = desc->constraint.word_list[0];
@@ -282,7 +282,7 @@
 }
 
 static GSList*
-gsane_option_handler_generic_enum_list_string_values(GSaneOptionHandler *handler, SANE_Int n, const SANE_Option_Descriptor*desc, const gchar* group)
+gsane_option_handler_generic_enum_list_string_values(GSaneOptionHandler *handler, const SANE_Option_Descriptor*desc, SANE_Int n, const gchar* group)
 {
 	GSList *list = NULL;
 	gint i;
@@ -306,7 +306,7 @@
 
 
 static void
-gsane_option_handler_generic_handle_list_option(GSaneOptionHandler *handler, SANE_Int n, const SANE_Option_Descriptor*desc, const gchar* group)
+gsane_option_handler_generic_handle_list_option(GSaneOptionHandler *handler, const SANE_Option_Descriptor*desc, SANE_Int n, const gchar* group)
 {
 	GSaneOptionHandlerGeneric* self = GSANE_OPTION_HANDLER_GENERIC(handler);
 	GSList *values = NULL;
@@ -319,17 +319,17 @@
 		if (array_length > 1)
 			g_debug("Ignoring int enum array option %s", desc->name);
 		else
-			values = gsane_option_handler_generic_enum_list_int_values(handler, n, desc, group);
+			values = gsane_option_handler_generic_enum_list_int_values(handler, desc, n, group);
 		break;
 	case SANE_TYPE_FIXED:
 		array_length = desc->size/sizeof(SANE_Fixed);
 		if (array_length > 1)
 			g_debug("Ignoring double enum array option %s", desc->name);
 		else
-			values = gsane_option_handler_generic_enum_list_double_values(handler, n, desc, group);
+			values = gsane_option_handler_generic_enum_list_double_values(handler, desc, n, group);
 		break;
 	case SANE_TYPE_STRING:
-		values = gsane_option_handler_generic_enum_list_string_values(handler, n, desc, group);
+		values = gsane_option_handler_generic_enum_list_string_values(handler, desc, n, group);
 		break;
 	default:
 		g_debug("\toption %d : <unhandled> %s", n, desc->name);
@@ -347,7 +347,7 @@
 }
 
 static void
-gsane_option_handler_generic_handle_option(GSaneOptionHandler *handler, SANE_Int n, const SANE_Option_Descriptor*desc, const gchar* group)
+gsane_option_handler_generic_handle_option(GSaneOptionHandler *handler, const SANE_Option_Descriptor*desc, SANE_Int n, const gchar* group)
 {
 	GSaneOptionHandlerGeneric* self = GSANE_OPTION_HANDLER_GENERIC(handler);
 	self->priv->index = n;
@@ -356,11 +356,11 @@
 	switch(desc->constraint_type) {
 	case SANE_CONSTRAINT_NONE:
 	case SANE_CONSTRAINT_RANGE:
-		gsane_option_handler_generic_handle_non_list_option(handler, n, desc, group);
+		gsane_option_handler_generic_handle_non_list_option(handler, desc, n, group);
 		break;
 	case SANE_CONSTRAINT_WORD_LIST:
 	case SANE_CONSTRAINT_STRING_LIST:
-		gsane_option_handler_generic_handle_list_option(handler, n, desc, group);
+		gsane_option_handler_generic_handle_list_option(handler, desc, n, group);
 		break;
 	}
 

Modified: trunk/modules/gsane/gsane-option-handler.c
==============================================================================
--- trunk/modules/gsane/gsane-option-handler.c	(original)
+++ trunk/modules/gsane/gsane-option-handler.c	Sun Dec 21 18:19:58 2008
@@ -81,15 +81,15 @@
 
 /* handle-options abstract method */
 static void
-gsane_option_handler_default_handle_option(GSaneOptionHandler *self, SANE_Int n, const SANE_Option_Descriptor* desc, const gchar* group)
+gsane_option_handler_default_handle_option(GSaneOptionHandler *self, const SANE_Option_Descriptor* desc, SANE_Int n, const gchar* group)
 {
 	g_warning("gsane_option_handler_handle_option not implemented by %s", g_type_name(G_TYPE_FROM_INSTANCE(self)));
 }
 
 void
-gsane_option_handler_handle_option(GSaneOptionHandler *self, SANE_Int n, const SANE_Option_Descriptor* desc, const gchar*group)
+gsane_option_handler_handle_option(GSaneOptionHandler *self, const SANE_Option_Descriptor* desc, SANE_Int n, const gchar*group)
 {
-	GSANE_OPTION_HANDLER_GET_CLASS(self)->handle_option(self, n, desc, group);
+	GSANE_OPTION_HANDLER_GET_CLASS(self)->handle_option(self, desc, n, group);
 }
 
 /* reload-options abstract method */

Modified: trunk/modules/gsane/gsane-option-handler.h
==============================================================================
--- trunk/modules/gsane/gsane-option-handler.h	(original)
+++ trunk/modules/gsane/gsane-option-handler.h	Sun Dec 21 18:19:58 2008
@@ -41,7 +41,7 @@
 struct _GSaneOptionHandlerClass
 {
 	GTypeClass	parent_class;
-	void		(*handle_option) (GSaneOptionHandler*self, SANE_Int n, const SANE_Option_Descriptor*desc, const gchar* group);
+	void		(*handle_option) (GSaneOptionHandler*self, const SANE_Option_Descriptor*desc, SANE_Int n, const gchar* group);
 	void		(*reload_options) (GSaneOptionHandler*self);
 	/* Whether the scanner must have a unique instance of the
 	   option handler */
@@ -64,7 +64,7 @@
 /* option handler methods */
 GSaneOptionHandler* gsane_option_handler_new(GType type, GnomeScanScanner *scanner, SANE_Handle handle);
 void gsane_option_handler_destroy(GSaneOptionHandler *self);
-void gsane_option_handler_handle_option(GSaneOptionHandler *self, SANE_Int n, const SANE_Option_Descriptor* desc, const gchar*group);
+void gsane_option_handler_handle_option(GSaneOptionHandler *self, const SANE_Option_Descriptor* desc, SANE_Int n, const gchar*group);
 void gsane_option_handler_reload_options(GSaneOptionHandler *self);
 
 gboolean gsane_option_handler_get_bool(GSaneOptionHandler *self, const SANE_Option_Descriptor* desc, SANE_Int index, GError **error);

Modified: trunk/modules/gsane/gsane-scanner.c
==============================================================================
--- trunk/modules/gsane/gsane-scanner.c	(original)
+++ trunk/modules/gsane/gsane-scanner.c	Sun Dec 21 18:19:58 2008
@@ -157,7 +157,7 @@
 	}
 
 	/* pass SANE option to handler */
-	gsane_option_handler_handle_option(handler, n, desc, group);
+	gsane_option_handler_handle_option(handler, desc, n, group);
 
 	g_type_class_unref(handler_class);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]