arg_syntax(3)

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(3), arg_dump(3), arg_glossary(3), arg_record(3), arg_scanargv(3), arg_scanstr(3), arg_typestr(3)