replace variable parse with getopt_long

Origin the opt_parse is write by bruteforce.
I replace it with getopt_long in getopt.h
It is easier to use getopt_long to add more options. (Yeah I make this for the issue for the command line option to in/out put file)