Lines Matching refs:p_cur
28 int at_tok_start(char **p_cur) in at_tok_start() argument
30 if (*p_cur == NULL) { in at_tok_start()
37 *p_cur = strchr(*p_cur, ':'); in at_tok_start()
39 if (*p_cur == NULL) { in at_tok_start()
43 (*p_cur)++; in at_tok_start()
48 static void skipWhiteSpace(char **p_cur) in skipWhiteSpace() argument
50 if (*p_cur == NULL) return; in skipWhiteSpace()
52 while (**p_cur != '\0' && isspace(**p_cur)) { in skipWhiteSpace()
53 (*p_cur)++; in skipWhiteSpace()
57 static void skipNextComma(char **p_cur) in skipNextComma() argument
59 if (*p_cur == NULL) return; in skipNextComma()
61 while (**p_cur != '\0' && **p_cur != ',') { in skipNextComma()
62 (*p_cur)++; in skipNextComma()
65 if (**p_cur == ',') { in skipNextComma()
66 (*p_cur)++; in skipNextComma()
70 static char * nextTok(char **p_cur) in nextTok() argument
74 skipWhiteSpace(p_cur); in nextTok()
76 if (*p_cur == NULL) { in nextTok()
78 } else if (**p_cur == '"') { in nextTok()
79 (*p_cur)++; in nextTok()
80 ret = strsep(p_cur, "\""); in nextTok()
81 skipNextComma(p_cur); in nextTok()
83 ret = strsep(p_cur, ","); in nextTok()
97 static int at_tok_nextint_base(char **p_cur, int *p_out, int base, int uns) in at_tok_nextint_base() argument
101 if (*p_cur == NULL) { in at_tok_nextint_base()
105 ret = nextTok(p_cur); in at_tok_nextint_base()
134 int at_tok_nextint(char **p_cur, int *p_out) in at_tok_nextint() argument
136 return at_tok_nextint_base(p_cur, p_out, 10, 0); in at_tok_nextint()
145 int at_tok_nexthexint(char **p_cur, int *p_out) in at_tok_nexthexint() argument
147 return at_tok_nextint_base(p_cur, p_out, 16, 1); in at_tok_nexthexint()
150 int at_tok_nextbool(char **p_cur, char *p_out) in at_tok_nextbool() argument
155 ret = at_tok_nextint(p_cur, &result); in at_tok_nextbool()
173 int at_tok_nextstr(char **p_cur, char **p_out) in at_tok_nextstr() argument
175 if (*p_cur == NULL) { in at_tok_nextstr()
179 *p_out = nextTok(p_cur); in at_tok_nextstr()
185 int at_tok_hasmore(char **p_cur) in at_tok_hasmore() argument
187 return ! (*p_cur == NULL || **p_cur == '\0'); in at_tok_hasmore()