In the following function:
char *mystrtok(const char *input, const char *delim,char *rest) {
int i;
for (i = 0; input[i] != *delim && input[i
change the prototype to
char *mystrtok(const char *input, const char *delim, const char *rest);
you could also cast your 'input' variable with a (char*) type which would resolve the warning. just be careful using explicit casts like this so as not to modify constants themselves.
rest = (char*)input + i + 2;
input
is a pointer to a constant char, and you're assigning it to a pointer to a non-constant char. This here might be an interesting reading for you.