Lines Matching refs:templ
183 static bool match_templ(const char *templ, const char *opt, ssize_t *sep_idx) in match_templ() argument
185 const char *sep = strpbrk(templ, "= "); in match_templ()
189 (size_t)(sep[0] == '=' ? sep - templ + 1 : sep - templ); in match_templ()
191 if (strlen(opt) >= cmp_len && strncmp(templ, opt, cmp_len) == 0) { in match_templ()
193 *sep_idx = (ssize_t)(sep - templ); in match_templ()
201 if (strcmp(templ, opt) == 0) { in match_templ()
215 for (; opts != NULL && opts->templ != NULL; opts++) { in find_opt()
216 if (match_templ(opts->templ, opt, sep_idx)) in find_opt()
298 if (sep_idx > 0 && opt->templ[sep_idx + 1] == '%') { in parse_matched_arg()
301 opt->templ[sep_idx] == '=' ? &arg[sep_idx + 1] : &arg[sep_idx]; in parse_matched_arg()
303 if (opt->templ[sep_idx + 2] == 's') { in parse_matched_arg()
316 if (sscanf(param, &opt->templ[sep_idx + 1], var) == -1) { in parse_matched_arg()
320 param, (int)sep_idx, opt->templ); in parse_matched_arg()
345 for (; opt != NULL && opt->templ != NULL; in parse_arg()
348 if (sep_idx > 0 && opt->templ[sep_idx] == ' ' && in parse_arg()