Inline program documentation

You can document programs and their commandline interface using inline documentation.

Tags
PROGRAM

Defines the start of a program documentation.

@short_description:

Defines a short description of the program. (Optional)

@synopsis:

Defines the arguments, or list of arguments that the program can take. (Optional)

@see_also:

See Also manual page section. (Optional)

@arg:

Argument(s) passed to the program and their description. (Optional)

Description:

A longer description of the program.

Returns:

Specificy what value(s) the program returns. (Optional)

3.4.1. Example of program documentation.

Example 3-12Program documentation block
/**
 * PROGRAM:test-program
 * @short_description: A test program
 * @synopsis: test-program [*OPTIONS*...] --arg1 *arg* *FILE*
 * @see_also: test(1)
 * @--arg1 *arg*: set arg1 to *arg*
 * @--arg2 *arg*: set arg2 to *arg*
 * @-v, --version: Print the version number
 * @-h, --help: Print the help message
 *
 * Long description of program.
 *
 * Returns: Zero on success, non-zero on failure
 */
int main(int argc, char *argv[])
{
	return 0;
}