[fork] header only argument parsing for c
Go to file
Intel A80486DX2-66 3385e48654
readme.md: update `example` to `example.out`; reformat
2024-04-21 19:45:24 +03:00
.gitignore extend .gitignore 2023-11-25 16:12:46 +03:00
Makefile initial commit 2020-07-12 12:23:05 -07:00
argh.h use type `size_t` instead of `int` where applicable 2024-04-21 15:03:31 +03:00
example.c example.c: use `atoi` instead of `atol` to parse into `int` 2024-04-21 18:06:38 +03:00
license.txt expand licensing information 2023-12-30 18:50:18 +03:00
readme.md readme.md: update `example` to `example.out`; reformat 2024-04-21 19:45:24 +03:00

readme.md

c-argh

why

minimal argument parsing shouldn't require a hundred lines of code.

what

header only argument parsing for c inspired by the simplicity of argh.

example

>> make

>> ./example.out -lph5 asdf 123
head: 5, prefix: 1, lz4: 1
pos arg 0: asdf
pos arg 1: 123

>> ./example.out --lz4 asdf -p 123 --head 5
head: 5, prefix: 1, lz4: 1
pos arg 0: asdf
pos arg 1: 123

>> ./example.out asdf 123 --head 5 --lz4
head: 5, prefix: 0, lz4: 1
pos arg 0: asdf
pos arg 1: 123