- char this_opt[20];
- int i, j;
- if (*cp == ' ' || *cp == ',')
- {
- cp++;
- continue;
- }
- for (i = 0; i < (sizeof(this_opt)-1) &&
- cp[i] && cp[i] != ' ' && cp[i] != ','; i++)
- this_opt[i] = cp[i];
- this_opt[i] = 0;
- for (j = 0; opt_array[j].name; j++)
- {
- if (yaz_matchstr(this_opt, opt_array[j].name) == 0)
- {
- ODR_MASK_SET(opt, opt_array[j].opt);
- break;
- }
- }
- if (!opt_array[j].name)
- {
- if (error_pos)
- {
- *error_pos = cp - opt_str;
- return -1;
- }
- }
- cp += i;
+ char this_opt[42];
+ int i, j;
+ if (*cp == ' ' || *cp == ',')
+ {
+ cp++;
+ continue;
+ }
+ for (i = 0; i < (sizeof(this_opt)-1) &&
+ cp[i] && cp[i] != ' ' && cp[i] != ','; i++)
+ this_opt[i] = cp[i];
+ this_opt[i] = 0;
+ for (j = 0; opt_array[j].name; j++)
+ {
+ if (yaz_matchstr(this_opt, opt_array[j].name) == 0)
+ {
+ ODR_MASK_SET(opt, opt_array[j].opt);
+ break;
+ }
+ }
+ if (!opt_array[j].name)
+ {
+ if (error_pos)
+ {
+ *error_pos = cp - opt_str;
+ return -1;
+ }
+ }
+ cp += i;