Bob: I guess I got a little confused on what exactly you wanted. If you want to return a pointer, then, extrapolating from my first example, you need to pass a pointer to a pointer (my example in message #16, that Tater quoted, needs a small modification):
Code:
void parseIP(char *input, char **output)
{
*output = input + 4; // or whichever quad you left off at
*output = &input[4]; // this is equivalent to the above
}
...
char *input;
char *next_spot_to_parse;
parseIP(input, &next_spot_to_parse);
// now next_spot_to_parse points to the next quad
// you can pass that in as your new starting point for the next time:
parseIP(next_spot_to_parse, &next_spot_to_parse); // this works, since the first param is copied when passed in, so there is no conflict