| 1193 | } |
| 1194 | |
| 1195 | static int match_placeholder_arg_value(const char *to_parse, const char *candidate, |
| 1196 | const char **end, const char **valuestart, |
| 1197 | size_t *valuelen) |
| 1198 | { |
| 1199 | const char *p; |
| 1200 | |
| 1201 | if (!(skip_prefix(to_parse, candidate, &p))) |
| 1202 | return 0; |
| 1203 | if (valuestart) { |
| 1204 | if (*p == '=') { |
| 1205 | *valuestart = p + 1; |
| 1206 | *valuelen = strcspn(*valuestart, ",)"); |
| 1207 | p = *valuestart + *valuelen; |
| 1208 | } else { |
| 1209 | if (*p != ',' && *p != ')') |
| 1210 | return 0; |
| 1211 | *valuestart = NULL; |
| 1212 | *valuelen = 0; |
| 1213 | } |
| 1214 | } |
| 1215 | if (*p == ',') { |
| 1216 | *end = p + 1; |
| 1217 | return 1; |
| 1218 | } |
| 1219 | if (*p == ')') { |
| 1220 | *end = p; |
| 1221 | return 1; |
| 1222 | } |
| 1223 | return 0; |
| 1224 | } |
| 1225 | |
| 1226 | static int match_placeholder_bool_arg(const char *to_parse, const char *candidate, |
| 1227 | const char **end, int *val) |
no outgoing calls
no test coverage detected