Diff for libcfg+/src/platon/str/strplus.c between version 1.13 and 1.14
| version 1.13, 2002/02/28 08:48:56 |
version 1.14, 2002/02/28 15:46:17 |
| Line 78 str_white_str(str, substr, size) |
|
| Line 78 str_white_str(str, substr, size) |
|
| plen = strlen(substr); |
plen = strlen(substr); |
| |
|
| for (start = str, pptr = substr; slen >= plen; start++, slen--) { |
for (start = str, pptr = substr; slen >= plen; start++, slen--) { |
| |
|
| /* Find start of pattern in string. */ |
/* Find start of pattern in string. */ |
| while (*start != *substr) { |
while (*start != *substr) { |
| |
|
| |
if (isspace(*start) && isspace(*substr)) |
| |
break; |
| |
|
| start++; |
start++; |
| slen--; |
slen--; |
| /* If pattern longer than string. */ |
/* If pattern longer than string. */ |
| Line 91 str_white_str(str, substr, size) |
|
| Line 96 str_white_str(str, substr, size) |
|
| sptr = start; |
sptr = start; |
| pptr = substr; |
pptr = substr; |
| |
|
| while (*sptr == *pptr) { |
//while (*sptr == *pptr || (isspace(sptr) && isspace(pptr))) { |
| sptr++; |
while (1) { |
| pptr++; |
if (! isspace(*sptr)) { |
| ssize++; |
while (*sptr == *pptr) { |
| |
sptr++; |
| while (isspace(*sptr)) { |
pptr++; |
| ++sptr; |
ssize++; |
| |
} |
| if (isspace(*pptr)) { |
} |
| ++ssize; |
else { |
| ++pptr; |
|
| |
while (isspace(*sptr)) { |
| |
++sptr; |
| |
|
| |
if (isspace(*pptr)) { |
| |
++ssize; |
| |
++pptr; |
| |
} |
| |
else |
| |
++ssize; |
| } |
} |
| else |
|
| ++ssize; |
|
| } |
} |
| |
|
| /* If end of pattern then pattern was found. */ |
/* If end of pattern then pattern was found. */ |
Platon Group <platon@platon.org> http://platon.org/
|
|