If you know clig
already, you may be interested in the
changes since the last release.
If you feel the need to download older versions, have a look at the software-directory.
Remark: clig is not CLIG. If you were looking for the Clig Grapher for linguistic data structures by Karsten Konrad, you should go to the CLIG homepage . Both tools don't have anything to do with each other. They share their names only due to a historical coincidence.
Cmdline *parseCmdline(int argc, char **argv)
which parses the command-line of a typical C-program and
returns the result in a structure of type Cmdline
.
However, one of the main reasons to use clig is maybe the automatic
generation of a usage()
-function which is always
up-to-date with respect to the options actually understood by the
program.
clig
. Here an
option -rgb
is declared with parameters of type
int
. Within the C-program, it will be called
rgb
. The next line contains in quotes a usage string to
be displayed by the generated usage()
-function. The line
count=3,3
specifies that the option -rgb
must be followed by exactly 3 integer values. Finally the allowed
range for the three values is specified.
An example demonstrating most features of clig is also available.
Currently, clig
understands the following option types:
Flag
Float
Int
String
Clig
is implemented in Tcl and you will not be able to
make it work without. The generated C-code is Tcl-free.
getopt()
is the only way to go are
silently ignored.