main.c and http.c

implement the flag_h for usage and use marcos instead of magic number.