DISCONTINUED: dead simple (commandline) option parser in/for C
C
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
.gitignore
.valgrindrc
Doxyfile
LICENSE
Makefile
README.md

README.md

op

op stands for option parser. This is a dead simple library to parse commandline options from C programs.

It provides:

  • both short and long options
  • assign-options (E.G.: --foo "this is a string")
  • multi-assign-options (E.G.: --foo argopt1 argopt2)
  • short option grouping (-a -b -c is the same as -abc)

It does not provide:

  • key value assignments like --foo=bar

And is designed to be useable in a dead simple way.

The goal of this library is not high performance, as I don't think an argument parsing library has to be high performant. It will also not provide a "print help summary" option.

Usage

All visible functions have a prefix "op_". See tests/main.c for example how to use the library.

Version 2.0

After version 2.0, I will only write bug fixes for this lib. If you want some features in this lib, please write a pull request. I want this lib for my other project (thessc). So if it's working, I have no interests in adding features if I don't need them (but in bugfixes of course).

Version numbers are 2.x for bugfixes, there will be no version 3.0, if nobody writes it. I will not do it.