blob: 4567a8756a0faf85e2533782640b2e0a1b26feba (
plain) (
tree)
|
|
char** separate_commandline (char *msg, char sep)
{
unsigned int len;
char** two_words;
/* Yes, do nothing, just get len ! */
for (len = 0; msg[len] != sep; len++);
two_words = malloc (sizeof(char*) * 2);
msg[len] = '\0';
two_words[0] = msg;
two_words[1] = msg + len + 1;
return (two_words);
}
|