Lines Matching defs:match
113 // Returns -1 if short_too is set and the option does not match long_options.
145 int match = -1;
155 // exact match
156 match = i;
161 // a partial match of a single character.
164 if (match == -1) { // first partial match
165 match = i;
166 } else if (long_options[i].has_arg != long_options[match].has_arg ||
167 long_options[i].flag != long_options[match].flag ||
168 long_options[i].val != long_options[match].val) {
182 if (match != -1) { // option found
183 if (long_options[match].has_arg == no_argument && has_equal) {
191 long_options[match].flag ? 0 : long_options[match].val;
194 if (long_options[match].has_arg == required_argument ||
195 long_options[match].has_arg == optional_argument) {
198 } else if (long_options[match].has_arg == required_argument) {
203 if ((long_options[match].has_arg == required_argument) &&
214 long_options[match].flag ? 0 : long_options[match].val;
230 if (idx) *idx = match;
231 if (long_options[match].flag) {
232 *long_options[match].flag = long_options[match].val;
235 return long_options[match].val;