2015 Neil Edelman, distributed under the terms of the MIT License; see readme.txt, or

Cdoc is a light weight, JavaDoc-style, documentation generator for C. It is not aware of C, but searches in your file for the double asterisk '** ' comment. It does not support ascii art (three or more asterisks are not recognised.) It does not support writing html in your source code, and escapes '<>&' in html mode; placing two new lines is sufficient to start a new paragraph. Placing '* ' or '- ' as the first non-white space characters starts a list.

The following symbols are recognised:

Cdoc decides based on context of the following code whether it goes in the preamble, functions, or declarations. It uses simple, but inexact heuristic, which may become confused. It supports macro-generics if you write them just like, void A_BI_(Create, Thing)(void); it will transform it into, <A>Create<BI>Thing(void).

Each-expressions must come first on the line. These are accepted globally:

these are accepted in the preamble:

these are accepted before functions:

1.3; added @order, Greek, gave up
1.2; 2017-03 lists 1.0; 2017-03 initial version
Support old-style function definitions.
'\n', '@', '*', '/' in a comment does nothing because TextSep.


Function Summary

Return TypeFunction NameArgument List
int main int argc, char *argv[]

Function Detail


int main (int argc, char *argv[])

Accepts [ html | text | xml ] as an optional argument. The default is html. Input is by stdin and goes to stdout. Use case example:

cat Foo.c Foo.h | cdoc text > Foo.txt

parameter: argc
parameter: argv