Lines Matching defs:option
11 License, or (at your option) any later version.
1162 if (strcmp (word, "option") == 0)
1220 "option `%s'\n", linenumber, word);
1418 sane_get_option_descriptor (SANE_Handle handle, SANE_Int option)
1422 if (((unsigned) option >= NUM_OPTIONS) || (option < 0))
1424 DBG (3, "sane_get_option_descriptor: option %d >= NUM_OPTIONS or < 0\n",
1425 option);
1433 if (s->opt[option].name && s->opt[option].name[0] != 0)
1434 DBG (4, "sane_get_option_descriptor for option %s (%sactive%s)\n",
1435 s->opt[option].name,
1436 s->opt[option].cap & SANE_CAP_INACTIVE ? "in" : "",
1437 s->opt[option].cap & SANE_CAP_ADVANCED ? ", advanced" : "");
1439 DBG (4, "sane_get_option_descriptor for option \"%s\" (%sactive%s)\n",
1440 s->opt[option].title,
1441 s->opt[option].cap & SANE_CAP_INACTIVE ? "in" : "",
1442 s->opt[option].cap & SANE_CAP_ADVANCED ? ", advanced" : "");
1443 return s->opt + option;
1447 sane_control_option (SANE_Handle handle, SANE_Int option,
1455 if (((unsigned) option >= NUM_OPTIONS) || (option < 0))
1457 DBG (3, "sane_control_option: option %d < 0 or >= NUM_OPTIONS\n",
1458 option);
1466 if (!val && s->opt[option].type != SANE_TYPE_BUTTON)
1472 if (s->opt[option].name && s->opt[option].name[0] != 0)
1473 DBG (4, "sane_control_option (%s option %s)\n",
1476 s->opt[option].name);
1478 DBG (4, "sane_control_option (%s option \"%s\")\n",
1481 s->opt[option].title);
1488 DBG (3, "sane_control_option: don't use while scanning (option %s)\n",
1489 s->opt[option].name);
1493 cap = s->opt[option].cap;
1497 DBG (3, "sane_control_option: option %s is inactive\n",
1498 s->opt[option].name);
1504 switch (option)
1516 *(SANE_Word *) val = s->val[option].w;
1523 memcpy (val, s->val[option].wa, s->opt[option].size);
1529 strcpy (val, s->val[option].s);
1537 DBG (3, "sane_control_option: option %s is not setable\n",
1538 s->opt[option].name);
1542 status = sanei_constrain_value (s->opt + option, val, info);
1545 DBG (4, "sane_control_option: constrain_value error (option %s)\n",
1546 s->opt[option].name);
1550 switch (option)
1563 s->val[option].w = *(SANE_Word *) val;
1570 memcpy (s->val[option].wa, val, s->opt[option].size);
1575 SANE_Char *old_val = s->val[option].s;
1586 s->val[option].s = strdup (val);
1587 if (!s->val[option].s)
1596 if (strcmp (s->val[option].s, SANE_VALUE_SCAN_MODE_LINEART) == 0)
1616 if (s->val[option].s)
1617 free (s->val[option].s);
1618 s->val[option].s = strdup (val);
1619 if (!s->val[option].s)
1664 DBG (4, "sane_control_option: unknown action for option %s\n",
1665 s->opt[option].name);