Please check the manual page getopt(3).