0strezz/geto
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
geto: geto is an alternative (my alternative) to getopt library by GNU. It offers a more robust set of options in order to parse your programs more easily and handle the possible errors in the process. api: you can take a look at `demo.c` in order to understand how the library works and how you can interact with it. features: it supports -a shortname flags --abc longname flags -a <arg> arguments for shortname flags --abc <arg> arguments for longname flags --abc=<arg> arguments for longname flags using `=` -axyz multiple shortname flags at once (*) -- a b c everything is a positional argument after `--` ($) example: program -a --number=5 --name "juan diego" -- filename1.txt filename2.txt *: When `-axyz` is parsed, geto will make sure none of the flags provided take an argument, if one of them does, such flags shall be at the end of the group so the argument can be associated to it. $: positional arguments are allocated via calloc, therefore it is responsability of the programmer to free such memory, it can be done via calling `geto_free_posargs` or manually.