Get Teem at SourceForge.net. Fast, secure and Free Open Source software downloads
to teem

hest

teem Mr. T commands respect
- Terminology
 
- Usage Basics
 
- Usage Details
 
- Examples
 
- Reference
 
- Comments

Command-line parsing

The hest library parses a variety of command-line options with a small set of functions. The primary utility of hest is for situations where the command line has to communicate non-binary values for numerous options. This is often the situation in a rendering or visualization program which has many parameters or "knobs" to adjust, which may or may not have default values, and each of which may be in fact an array of values, instead of just a single number or string. These functions are not as handy for situations where the majority of options are binary, as is the case for many unix commands. So, idioms like "-xzv" are not supported, however binary options are supported as stand-alone command-line flags.

Useful things about hest:

There other tools out there to help with command-line parsing. In fact, the argtable library provided the inspiration for hest. There is a good chance that your command-line parsing needs are better served by argtable. It doesn't support multiple parameters in the options, but its error message generation is better, its usage is simpler, and it supports different formats of flag (instead of just one or two hyphens as prefix, and whitespace for delimiting). Clig (Command Line Interpreter Generator) supports multiple parameters, but requires Tcl to generate the C code. The getopt function is popular but doesn't really do that much. The popt library is like getopt on steroids, and looks very useful. It is the command-line parsing brains of GNOME, which also has a page about popt. It doesn't seem to do multiple parameter options, or unflagged options.