NAME
arg_syntax - Generates a 'usage' syntax string from an argument table
SYNOPSIS
#include <argtable.h>
const char *arg_syntax(const arg_rec *argtable, int n);
PARAMETERS
-
const arg_rec *argtable
-
Ptr to argument table.
-
int n
-
Number of entries in argtable[].
DESCRIPTION
Builds a syntactical description of the allowable command line arguments
specified by the 'argtable' array.
The resulting string is stored in static data within the local scope of
this function. Its contents are overwritten by subsequent calls.
The syntactical description is generated as a single line of space
separated argument descriptors, each comprising of the argument's tag
string and name string concatenated together. For example,
"Myprog x y [z] [-r <double>] [-o <outfile>] [-verbose] <infile> [debug=<on/off>]"
If an argument is optional (has a non-NULL default value) then its
descriptor is enclosed in square brackets.
NULL name strings are substituted with the argument's data type enclosed
in angled brackets, as in <int>, <double>, or <string>.
If both the tag and the name are empty strings ("") then the argument is
omitted from the description altogether. This allows the suppression of
individual arguments that you do not want to appear.
RETURN VALUE
Returns a pointer to the syntax string.
SEE ALSO
arg_catargs
,
arg_dump
,
arg_glossary
,
arg_record
,
arg_scanargv
,
arg_scanstr
,
arg_typestr