Skip to content

An implementation of a command line argument parser for C.

License

Notifications You must be signed in to change notification settings

c-ware/argparse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

argparse

A basic command line argument parser written for C. Pretty much fully documented and ready to go. Comes with these features:

  • Variable number of positional arguments
  • Variable number of parameters to options
  • Repeatable options (similar to -L and -I in GCC) that can be 'collected'
  • Iterators for variable positional arguments, parameters to repetable options, as well as both fixed and variable option parameters
  • Error checking for number of parameters, unrecognized options, too many and too few positional arguments.
  • Extracting individual positional arguments
  • Getting an individual parameter to an option

It should be noted however, this library does not tackle the creation of help messages. This is mostly to simplify the desgin of the library. However, you can find examples on writing your own logic for displaying help messages, as well as how to write a basic program with argparse, in examples/isum.c

About

An implementation of a command line argument parser for C.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published