version 1.10.6.1, 2012/07/30 09:26:56
|
version 1.10.6.3, 2012/07/30 11:11:39
|
Line 581 io_MakeAV(const char * __restrict csArgs, const char *
|
Line 581 io_MakeAV(const char * __restrict csArgs, const char *
|
* return: 0 error format; -1 error:: can`t read; >0 ok, number of readed items |
* return: 0 error format; -1 error:: can`t read; >0 ok, number of readed items |
*/ |
*/ |
int |
int |
io_MakeAV2(char ** __restrict psArgs, const char *csDelim, | io_MakeAV2(char * __restrict psArgs, const char *csDelim, |
char * __restrict psAttr, char * __restrict psValue) |
char * __restrict psAttr, char * __restrict psValue) |
{ |
{ |
register int ret = 0; |
register int ret = 0; |
char *pos; |
char *pos; |
|
|
if (!psArgs || !*psArgs || !csDelim) | if (!psArgs || !csDelim) |
return -1; |
return -1; |
|
|
pos = strpbrk(*psArgs, csDelim); | pos = strpbrk(psArgs, csDelim); |
if (pos) | if (pos) { |
*pos++ = 0; |
*pos++ = 0; |
ret++; | ret++; |
if (psAttr) | if (psAttr) |
psAttr = *psArgs; | psAttr = psArgs; |
| } else |
| return 0; |
|
|
if (psValue) { |
if (psValue) { |
if (pos && *pos) { |
if (pos && *pos) { |