https://github.com/kubo/ya_getopt
GNU getopt and getopt_long for Windows and Unix-like OSes
https://github.com/kubo/ya_getopt
getopt getopt-long
Last synced: 4 months ago
JSON representation
GNU getopt and getopt_long for Windows and Unix-like OSes
- Host: GitHub
- URL: https://github.com/kubo/ya_getopt
- Owner: kubo
- Created: 2015-01-02T13:47:36.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2019-06-04T11:02:02.000Z (about 7 years ago)
- Last Synced: 2023-03-10T20:08:30.385Z (over 3 years ago)
- Topics: getopt, getopt-long
- Language: C
- Homepage:
- Size: 20.5 KB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ya_getopt - Yet another getopt
==============================
What is ya_getopt.
------------------
Ya_getopt is a drop-in replacement of [GNU C library getopt](http://man7.org/linux/man-pages/man3/getopt.3.html).
`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. \_\\_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
----------------------
* [public domain AT&T getopt](https://www.google.co.jp/search?q=public+domain+at%26t+getopt) public domain, no getopt_long, no getopt_long_only, no argv permutation
* [Free Getopt](http://freegetopt.sourceforge.net/) 3-clause BSD-style licence, no getopt_long, no getopt_long_only
* [getopt_port](https://github.com/kimgr/getopt_port/) 3-clause BSD-style licence, no getopt_long_only, no argv permutation
* [XGetopt - A Unix-compatible getopt() for MFC and Win32](http://www.codeproject.com/Articles/1940/XGetopt-A-Unix-compatible-getopt-for-MFC-and-Win32)
* [Full getopt Port for Unicode and Multibyte Microsoft Visual C, C++, or MFC Projects](http://www.codeproject.com/Articles/157001/Full-getopt-Port-for-Unicode-and-Multibyte-Microso) LGPL