projects
/
xmlrpc-c
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
initial load of upstream version 1.06.32
[xmlrpc-c]
/
lib
/
abyss
/
src
/
token.c
1
#include "xmlrpc-c/abyss.h"
2
3
#include "token.h"
4
5
void
6
NextToken(const char ** const pP) {
7
8
abyss_bool gotToken;
9
10
gotToken = FALSE;
11
12
while (!gotToken) {
13
switch (**pP) {
14
case '\t':
15
case ' ':
16
++(*pP);
17
break;
18
default:
19
gotToken = TRUE;
20
};
21
}
22
}
23
24
25
26
char *
27
GetToken(char ** const pP) {
28
29
char * p0;
30
31
p0 = *pP;
32
33
while (1) {
34
switch (**pP) {
35
case '\t':
36
case ' ':
37
case CR:
38
case LF:
39
case '\0':
40
if (p0 == *pP)
41
return NULL;
42
43
if (**pP) {
44
**pP = '\0';
45
++(*pP);
46
};
47
return p0;
48
49
default:
50
++(*pP);
51
};
52
}
53
}
54