28 #define PARSE_TIMEOUT 1000 // default number of milli-seconds to wait 64 (c >=
'0' && c <=
'9') ||
65 (detectDecimal && c ==
'.'))
return c;
95 return findUntil(target, strlen(target), NULL, 0);
102 return findUntil(target, length, NULL, 0);
108 return findUntil(target, strlen(target), terminator, strlen(terminator));
116 if (terminator == NULL) {
118 return findMulti(t, 1) == 0 ?
true :
false;
120 MultiTarget t[2] = {{target, targetLen, 0}, {terminator, termLen, 0}};
121 return findMulti(t, 2) == 0 ?
true :
false;
132 bool isNegative =
false;
146 else if(c >=
'0' && c <=
'9')
147 value = value * 10 + c -
'0';
151 while( (c >=
'0' && c <=
'9') || c == ignore );
161 bool isNegative =
false;
162 bool isFraction =
false;
165 float fraction = 1.0;
179 else if(c >=
'0' && c <=
'9') {
180 value = value * 10 + c -
'0';
187 while( (c >=
'0' && c <=
'9') || (c ==
'.' && !isFraction) || c == ignore );
192 return value * fraction;
205 while (count < length) {
221 if (length < 1)
return 0;
223 while (index < length) {
225 if (c < 0 || c == terminator)
break;
248 while (c >= 0 && c != terminator)
271 if (c ==
t->str[
t->index]) {
272 if (++
t->index ==
t->len)
289 if (c !=
t->str[
t->index])
299 int diff = origIndex -
t->index;
301 for (i = 0; i <
t->index; ++i) {
302 if (
t->str[i] !=
t->str[i + diff])
GLuint GLsizei GLsizei * length
size_t readBytesUntil(char terminator, char *buffer, size_t length)
long parseInt(LookaheadMode lookahead=SKIP_ALL, char ignore=NO_IGNORE_CHAR)
bool findUntil(char *target, char *terminator)
GLsizei const GLfloat * value
unsigned long _startMillis
int peekNextDigit(LookaheadMode lookahead, bool detectDecimal)
float parseFloat(LookaheadMode lookahead=SKIP_ALL, char ignore=NO_IGNORE_CHAR)
unsigned long millis(void)
int findMulti(struct MultiTarget *targets, int tCount)
void setTimeout(unsigned long timeout)
size_t readBytes(char *buffer, size_t length)
String readStringUntil(char terminator)
GLuint GLuint GLsizei count