fmemopen instead of strtok_r