Lines Matching defs:option

13    License, or (at your option) any later version.
320 SANE_Int option, count;
328 for (option = 0; option < NUM_OPTIONS; ++option)
330 s->opt[option].size = sizeof (SANE_Word);
331 s->opt[option].cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
2147 sane_get_option_descriptor (SANE_Handle handle, SANE_Int option)
2151 if ((unsigned) option >= NUM_OPTIONS)
2153 DBG (DBG_FUNC, "sane_get_option_descriptor: option = %s (%d)\n",
2154 s->opt[option].name, option);
2155 return s->opt + option;
2160 sane_control_option (SANE_Handle handle, SANE_Int option,
2169 "sane_control_option: start: action = %s, option = %s (%d)\n",
2173 s->opt[option].name, option);
2185 if (option >= NUM_OPTIONS || option < 0)
2188 "sane_control_option: option %d >= NUM_OPTIONS || option < 0\n",
2189 option);
2193 cap = s->opt[option].cap;
2196 DBG (DBG_ERR, "sane_control_option: option %d is inactive\n", option);
2201 switch (option)
2214 *(SANE_Word *) val = s->val[option].w;
2218 strcpy (val, s->val[option].s);
2222 strcpy (val, s->val[option].s);
2225 DBG (DBG_ERR, "sane_control_option: can't get unknown option %d\n",
2226 option);
2234 DBG (DBG_ERR, "sane_control_option: option %d is not settable\n",
2235 option);
2239 status = sanei_constrain_value (s->opt + option, val, &myinfo);
2247 switch (option)
2256 s->val[option].w = *(SANE_Word *) val;
2263 s->val[option].w = *(SANE_Word *) val;
2267 if (s->val[option].s)
2268 free (s->val[option].s);
2269 s->val[option].s = strdup (val);
2270 if (strcmp (s->val[option].s, SANE_VALUE_SCAN_MODE_LINEART) == 0)
2282 if (strcmp (s->val[option].s, val) != 0)
2284 if (s->val[option].s)
2285 free (s->val[option].s);
2286 s->val[option].s = strdup (val);
2287 if (strcmp (s->val[option].s, "Reflective") == 0)
2296 else if (0 == strcmp (s->val[option].s, "Negative"))
2307 else if (0 == strcmp (s->val[option].s, "Positive"))
2320 DBG (DBG_ERR, "sane_control_option: can't set unknown option %d\n",
2321 option);
2326 DBG (DBG_ERR, "sane_control_option: unknown action %d for option %d\n",
2327 action, option);