Lines Matching defs:stringp
1648 * *stringp. Allocates memory for it and copies it there. The
1650 * before $VAR_NAME, it is returned in '*prefix'. The *stringp is
1660 * The function modifies *stringp, and *prefix - if not NULL - points
1661 * to the original *stringp, *varname - if not NULL - is malloced and
1664 * Returns 0 if the *stringp was an empty string.
1668 static int tplg_get_varname(char **stringp, char **prefix, char **varname)
1675 prefix_len = strcspn(*stringp, "$");
1676 *prefix = *stringp;
1677 (*stringp) += prefix_len;
1678 if (**stringp == '$') {
1679 if ((*stringp)[1] == '[') {
1684 varname_len += strcspn((*stringp) + varname_len + 1, "[]") + 1;
1685 if ((*stringp)[varname_len] == '[')
1687 else if ((*stringp)[varname_len] == ']')
1697 while (isalnum((*stringp)[varname_len]) || (*stringp)[varname_len] == '_')
1709 strncpy(*varname, *stringp, varname_len);
1711 (*stringp) += varname_len;