getopt.c port WIP