pike.git
/
src
/
modules
/
SANE
/
sane.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/modules/SANE/sane.c:196:
/*! @class Scanner */ /*! @decl void create(string name) */ static void f_scanner_create( INT32 args ) { char *name; if(!sane_is_inited) init_sane();
-
get_all_args(
"create"
, args, "%s", &name );
+
get_all_args(
NULL
, args, "%s", &name );
if( sane_open( name, &THIS->h ) ) Pike_error("Failed to open scanner \"%s\"\n", name ); } /*! @decl array(mapping) list_options() *! *! This method returns an array where every element is a *! mapping, layed out as follows. *!
pike.git/src/modules/SANE/sane.c:306:
*! If no value is specified, the option is set to it's default value */ static void f_scanner_set_option( INT32 args ) { char *name; int no; INT_TYPE int_value; FLOAT_TYPE float_value; SANE_Int tmp; const SANE_Option_Descriptor *d;
-
get_all_args(
"set_option"
, args, "%s", &name );
+
get_all_args(
NULL
, args, "%s", &name );
no = find_option( name, &d ); if( args > 1 ) { switch( d->type ) { case SANE_TYPE_BOOL: case SANE_TYPE_INT: case SANE_TYPE_BUTTON:
-
sp++;get_all_args(
"set_option"
, args, "%I", &int_value );sp--;
+
sp++;get_all_args(
NULL
, args, "%I", &int_value );sp--;
sane_control_option( THIS->h, no, SANE_ACTION_SET_VALUE, &int_value, &tmp ); break; case SANE_TYPE_FIXED:
-
sp++;get_all_args(
"set_option"
, args, "%F", &float_value );sp--;
+
sp++;get_all_args(
NULL
, args, "%F", &float_value );sp--;
int_value = SANE_FIX(((double)float_value)); sane_control_option( THIS->h, no, SANE_ACTION_SET_VALUE, &int_value, &tmp ); break; case SANE_TYPE_STRING:
-
sp++;get_all_args(
"set_option"
, args, "%s", &name );sp--;
+
sp++;get_all_args(
NULL
, args, "%s", &name );sp--;
sane_control_option( THIS->h, no, SANE_ACTION_SET_VALUE, &name, &tmp ); case SANE_TYPE_GROUP: break; } } else { int_value = 1; sane_control_option( THIS->h, no, SANE_ACTION_SET_AUTO, &int_value, &tmp ); } }
pike.git/src/modules/SANE/sane.c:350:
/*! @decl mixed get_option( string name ) */ static void f_scanner_get_option( INT32 args ) { char *name; int no; SANE_Int int_value; float f; SANE_Int tmp; const SANE_Option_Descriptor *d;
-
get_all_args(
"get_option"
, args, "%s", &name );
+
get_all_args(
NULL
, args, "%s", &name );
no = find_option( name, &d ); switch( d->type ) { case SANE_TYPE_BOOL: case SANE_TYPE_INT: case SANE_TYPE_BUTTON: sane_control_option( THIS->h, no, SANE_ACTION_GET_VALUE, &int_value, &tmp );