Lines Matching defs:optnum
64 1.5 (26 Mar 2000): Check for optnum >= 0. Fixed some hardcoded paths in
953 sane_get_option_descriptor( SANE_Handle handle, SANE_Int optnum )
957 DBG(DOPT, "sane_get_option_descriptor(%p, %d)\n", handle, (int)optnum);
959 if( dev->status.open && optnum >= 0 && optnum < NUM_OPTIONS )
960 return &dev->opt[optnum];
966 sane_control_option( SANE_Handle handle, SANE_Int optnum,
972 DBG(DCODE, "sane_control_option(%p, %d, %d, %p, %p)\n", (void *) handle, (int)optnum, (int)action, valP, (void *) infoP);
982 if( optnum < 0 || optnum >= NUM_OPTIONS )
988 DBG(DOPT, "getting option %d (value=%d)\n", (int)optnum, (int)dev->val[optnum]);
990 switch( optnum ) {
999 *(SANE_Word *)valP = dev->val[optnum];
1007 if( !SANE_OPTION_IS_SETTABLE(dev->opt[optnum].cap) )
1009 status = sanei_constrain_value(&dev->opt[optnum], valP, infoP);
1013 DBG(DOPT, "setting option %d to %d\n", (int)optnum, (int)*(SANE_Word *)valP);
1015 switch( optnum ) {
1033 dev->val[optnum] = *(SANE_Word *)valP;