Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.77 KB

README.md

File metadata and controls

38 lines (26 loc) · 1.77 KB

ya_getopt - Yet another getopt

What is ya_getopt.

Ya_getopt is a drop-in replacement of GNU C library getopt. getopt(), getopt_long() and getopt_long_only() are implemented excluding the following GNU extension features.

  1. If optstring contains W followed by a semicolon, then -W foo is treated as the long option --foo.

  2. _<PID>_GNU_nonoption_argv_flags_

The license is 2-clause BSD-style license. You can use the Linux getopt compatible function under Windows, Solaris and so on without having to worry about license issue.

Note for contributors

Don't send me a patch if you have looked at GNU C library getopt source code. That's because I made this with clean room design to avoid the influence of the GNU LGPL.

Please make a test script passed by the GNU C library getopt but not by ya_getopt instead.

License

2-clause BSD-style license

Other getopt functions