Lines Matching defs:templ
74 match_opt(const char *templ, const char *opt)
78 len = strlen(templ);
79 sep = strcspn(templ, "=");
82 sep = strcspn(templ, " ");
85 if (sep < len && (templ[sep + 1] == '\0' || templ[sep + 1] == '%')) {
86 if (strncmp(opt, templ, sep) == 0)
92 if (strcmp(opt, templ) == 0)
198 for(; o != NULL && o->templ; o++) {
199 sep = match_opt(o->templ, opt);
207 if (o->templ[sep] == '=')
209 else if (o->templ[sep] == ' ') {
213 } else if (strchr(o->templ, '%') != NULL) {
229 } else if (strchr(o->templ, '%') == NULL) {
232 } else if (strstr(o->templ, "%s") != NULL) {
237 if (sscanf(opt, o->templ, data + o->off) != 1) {
239 "option %s\n", val, o->templ);
420 while (this_opt->templ) {
421 if (match_opt(this_opt->templ, opt))