Lines Matching defs:option
11 option) any later version.
1411 sane_get_option_descriptor (SANE_Handle handle, SANE_Int option)
1415 if ((unsigned) option >= NUM_OPTIONS)
1417 return s->opt + option;
1421 sane_control_option (SANE_Handle handle, SANE_Int option,
1433 if (option >= NUM_OPTIONS || !SANE_OPTION_IS_ACTIVE (s->opt[option].cap))
1438 switch (option)
1453 *(SANE_Word *) val = s->val[option].w;
1457 *(SANE_Bool *) val = s->val[option].b;
1463 strcpy (val, s->val[option].s);
1472 if (!SANE_OPTION_IS_SETTABLE (s->opt[option].cap))
1475 status = sanei_constrain_value (s->opt + option, val, info);
1479 switch (option)
1496 s->val[option].w = *(SANE_Word *) val;
1500 s->val[option].b = *(SANE_Bool *) val;
1503 if (strcmp (s->val[option].s, (SANE_String) val))
1508 if (s->val[option].s)
1509 free (s->val[option].s);
1511 s->val[option].s = strdup (val);
1513 if (strcmp (s->val[option].s, "Gray (6 bit)") == 0)
1515 else if (strcmp (s->val[option].s, "Gray (8 bit)") == 0)
1517 else if (strcmp (s->val[option].s, "Color (18 bit)") == 0)
1519 else if (strcmp (s->val[option].s, "Color (24 bit)") == 0)
1596 if (info && strcmp (s->val[option].s, (SANE_String) val))
1598 if (s->val[option].s)
1599 free (s->val[option].s);
1600 s->val[option].s = strdup (val);