| 177 | } |
| 178 | |
| 179 | char *av_strtok(char *s, const char *delim, char **saveptr) |
| 180 | { |
| 181 | char *tok; |
| 182 | |
| 183 | if (!s && !(s = *saveptr)) |
| 184 | return NULL; |
| 185 | |
| 186 | /* skip leading delimiters */ |
| 187 | s += strspn(s, delim); |
| 188 | |
| 189 | /* s now points to the first non delimiter char, or to the end of the string */ |
| 190 | if (!*s) { |
| 191 | *saveptr = NULL; |
| 192 | return NULL; |
| 193 | } |
| 194 | tok = s++; |
| 195 | |
| 196 | /* skip non delimiters */ |
| 197 | s += strcspn(s, delim); |
| 198 | if (*s) { |
| 199 | *s = 0; |
| 200 | *saveptr = s+1; |
| 201 | } else { |
| 202 | *saveptr = NULL; |
| 203 | } |
| 204 | |
| 205 | return tok; |
| 206 | } |
| 207 | |
| 208 | int av_strcasecmp(const char *a, const char *b) |
| 209 | { |
no outgoing calls
no test coverage detected