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.