You can download the gzipped PostScript documentation or the latest release as * clig-1.9.11.tar.gz, * clig-1.9.11.1.tar.gz, or * clig-1.9.11.1-0.tar.gz, which includes the documentation.
*Note: these are all linking to the same file, because the "official" maintainer is a lazy pig and has created confusion over which release is actuallu the latest. The OFFICIAL latest release is clig-1.9.11.tar.gz.
If you know clig
already, you may be interested in the changes since the last release.
Clig creates for your C-Program or lets you use in your Tcl-script
Clig takes as input a simple description file.
Clig generates standard C (well, I tried as hard as I can :-) It is reported to work well with C++. Within a Tcl-script, code generation is not necessary. Just declare your command line arguments and then run the parser.
The resulting code is self contained and does not depend on a library (except for libc, of course).
Clig is written in Tcl
Clig is free software. Its licence is the GPL.
Int -rgb rgb \ "specifies a color by its red, green and blue components"\ -c 3 3 \ -r 0 255It shows most of the features available in
clig
. Here an option -rgb
is declared with parameters of type int
. Within the C-program or Tcl-script, it will be called rgb
. The next line contains in quotes a usage string to be displayed by the generated usage()
-function. The line -c 3 3
specifies that the option -rgb
must be followed by at least 3 but no more than three (i.e. 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
Double
double
parameters.Int
Long
String
Clig
is implemented in Tcl and you will not be able to make it work without. The generated C-code is Tcl-free.
Clig has been originally been written by Harald Kirsch and is now mantained by Sven Geggus.
getopt()
is the only way to go are silently ignored.