749 |
next_arg(char *src, char needle) |
next_arg(char *src, char needle) |
750 |
{ |
{ |
751 |
char *nextval; |
char *nextval; |
752 |
|
char *p; |
753 |
|
|
754 |
// EOS |
// EOS |
755 |
if (*src == (char) 0x00) |
if (*src == (char) 0x00) |
756 |
return 0; |
return 0; |
757 |
|
|
758 |
// more args available. |
p = src; |
759 |
nextval = strchr(src, needle); |
// skip escaped needles. |
760 |
|
while( (nextval = strchr(p, needle) ) ) |
761 |
|
{ |
762 |
|
if( *(nextval-1) != '\\' ) |
763 |
|
break; |
764 |
|
p = nextval +1; |
765 |
|
} |
766 |
|
|
767 |
|
// more args available |
768 |
if (nextval) |
if (nextval) |
769 |
{ |
{ |
770 |
*nextval = (char) 0x00; |
*nextval = (char) 0x00; |