You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Linux User 841fd84112 have ARGNEXT *return* a string instead of set an argument string. Add 3 weeks ago
LICENSE Initial commit 3 weeks ago
README.md have ARGNEXT *return* a string instead of set an argument string. Add 3 weeks ago
argp.h have ARGNEXT *return* a string instead of set an argument string. Add 3 weeks ago
example.c have ARGNEXT *return* a string instead of set an argument string. Add 3 weeks ago

README.md

argp

Dead simple argument parsing for C.

Functions nearly identically to the plan9 or suckless/20h implementations, just with ARGNEXT instead of ARGF/EARGF, 'progname' instead of argv0, and it's a bit easier to read (to me).

Usage

The example.c file in this repository shows how it can be used for flag arguments and options.

Drawbacks

Like the plan9 and 20h implementations, argp cannot parse "long" arguments that span multiple characters.