Inline program documentation

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


Defines the start of a program documentation.


Defines a short description of the program. (Optional)


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


See Also manual page section. (Optional)


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


A longer description of the program.


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;