equal
deleted
inserted
replaced
4 static void new_word(const char *str) |
4 static void new_word(const char *str) |
5 { |
5 { |
6 printf("%s\n", str); |
6 printf("%s\n", str); |
7 } |
7 } |
8 |
8 |
9 static int skip_newline(const char *str, int *index) |
|
10 { |
|
11 while(str[*index] != 0 && str[*index] != '\n') |
|
12 { |
|
13 ++*index; |
|
14 } |
|
15 |
|
16 if (str[*index] == '\n') |
|
17 return *index; |
|
18 |
|
19 return -1; |
|
20 } |
|
21 |
|
22 static int until_noword(const char *str, int *index) |
|
23 { |
|
24 while(str[*index] != 0 && |
|
25 str[*index] != ' ' && |
|
26 str[*index] != '\n' && |
|
27 str[*index] != '\r' && |
|
28 str[*index] != ',') |
|
29 { |
|
30 ++*index; |
|
31 } |
|
32 |
|
33 if (str[*index] != 0) |
|
34 return *index; |
|
35 |
|
36 return -1; |
|
37 } |
|
38 |
|
39 static int until_newword(const unsigned char *str, int *index) |
|
40 { |
|
41 while(str[*index] != 0 && str[*index] < 128) |
|
42 { |
|
43 ++*index; |
|
44 } |
|
45 |
|
46 if (str[*index] != 0); |
|
47 return *index; |
|
48 |
|
49 return -1; |
|
50 } |
|
51 |
9 |
52 void zprocess_def(const char *root, char *def) |
10 void zprocess_def(const char *root, char *def) |
53 { |
11 { |
54 int index = 0; |
12 int index = 0; |
55 int res; |
13 int res; |