use proper tokenizer in get_pos()
The initial idea was to use strtok(). However strtok() is ugly and stupid beyond repair:
1/ You always need to single out the first token from the rest, putting in a NULL pointer for the remaining token, to say to strtok() to continue from the "current position". this makes code more complicated and not easy to follow (what does it mean to tokenize a NULL string?).
2/ The "current position" is stored "within" strtok() (probably some static char *current_pos), so it is not thread safe. There is strtok_r() which is POSIX only, and strtok_s(), which is C11. In practice, even my latest glibc on Linux doesn't have strtok_s(), let alone mingw. Anyway it still suffers disease #1 above.

Surprisingly it is very easy to code a string tokenizer that beats the crap out of any version of strtok() out there. So let's add a new my_libc module while at it. There may be more functions needed with portability issues.