Home | History | Annotate | Download | only in librefuse

Lines Matching refs:templ

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