An open API service indexing awesome lists of open source software.

https://github.com/darealshinji/getopt-for-windows

C getopt functions for Windows supporting char and wchar_t
https://github.com/darealshinji/getopt-for-windows

Last synced: 7 months ago
JSON representation

C getopt functions for Windows supporting char and wchar_t

Awesome Lists containing this project

README

          

OpenBSD's implementation of `getopt(3)` ported to be usable with
Microsoft's compiler (MSVC) and MinGW.

Both "narrow" and "wide" characters are supported using `TCHAR`:

```
TCHAR macro _UNICODE not defined _UNICODE defined

_tgetopt getopt _wgetopt
_tgetopt_long getopt_long _wgetopt_long
_tgetopt_long_only getopt_long_only _wgetopt_long_only
_toption option _woption
_toptarg optarg _woptarg
```

I hope that this will be useful to some people since MSVC lacks getopt and
MinGW doesn't have a wide characters version of it.
This code is released under permissive licenses (see source code for details).