Lines Matching defs:option
8 License, or (at your option) any later version.
371 * Sets up the option descriptors for a device
872 else if (strncmp(config_line_ptr, "option", 6) == 0)
874 /* Format for options: option <name> [<value>]
883 DBG (1, "sane_init: parse error in line %d after ``option''\n",
891 DBG (1, "sane_init: parse error in line %d after ``option''\n",
901 /* The option has a value.
912 "``option %s %s''\n", line, optname,
924 DBG (2, "sane_init: global option found in local scope, "
929 DBG (1, "sane_init: unexpected value for option no_epp\n");
942 " ``option''\n", line);
1082 * option descriptors are initialized
1159 DBG (1, "sane_open: could not set option %s for device (%s)\n",
1163 option cannot be handled ?
1165 an illegal option value or an unknown option should not
1243 sane_get_option_descriptor (SANE_Handle handle, SANE_Int option)
1247 if ((unsigned) option >= NUM_OPTIONS)
1249 DBG (2, "sane_get_option_descriptor: option %d doesn't exist\n", option);
1253 return hndl->opt + option;
1258 * Reads or writes an option
1265 * Depending on ``action'' the value of the option is either read
1270 * on the option, that is written, other options also change
1274 sane_control_option (SANE_Handle handle, SANE_Int option,
1290 if ((unsigned int) option >= NUM_OPTIONS)
1292 DBG (2, "sane_control_option: option %d doesn't exist\n", option);
1296 cap = hndl->opt[option].cap;
1300 DBG (2, "sane_control_option: option %d isn't active\n", option);
1307 switch (option)
1322 *(SANE_Word *) val = hndl->val[option].w;
1331 memcpy (val, hndl->val[option].wa, hndl->opt[option].size);
1338 strcpy (val, hndl->val[option].s);
1347 DBG (2, "sane_control_option: option can't be set (%s)\n",
1348 hndl->opt[option].name);
1352 status = sanei_constrain_value (hndl->opt + option, val, info);
1361 switch (option)
1377 hndl->val[option].w = *(SANE_Word *) val;
1386 memcpy (hndl->val[option].wa, val, hndl->opt[option].size);
1392 if (hndl->val[option].s)
1393 free (hndl->val[option].s);
1395 hndl->val[option].s = strdup (val);
1438 char *old_val = hndl->val[option].s;
1451 hndl->val[option].s = strdup (val);
1507 * scanmode: according to the option SCANMODE, but