File src2man.1 of Package txt2man

.\" Text automatically generated by txt2man
.TH src2man 1 "03 Januar 2016" "src2man-1.5.6" ""
\fBsrc2man \fP- extract man pages from source files.
.fam C
\fBsrc2man\fP [\fB-n\fP][\fB-v\fP volume][\fB-r\fP \fIrelease\fP] [\fIsrcfile\fP \.\.\.]
.fam T
.fam T
\fBsrc2man\fP scans source file \fIsrcfile\fP. Only C source files are supported
for now. Comments blocks starting by "/** num", where num is a section
number, are converted into a man file, using \fBtxt2man\fP(1).
The first line of the comment block must contain the name of the manpage,
usually the function name, followed by a "-" and a short description.
The following lines are the "DESCRIPTION" section content, except if they
are in upper case, in which case they define a new section.
If the next line after a comment block is a C function prototype, then a
"SYNOPSIS" section will be filled using that prototype. This avoids to
duplicate the prototype in the comment block.
The best place for code documentation is in the source file, where the body is
implemented, not the header file which only contains the prototype. \fBsrc2man\fP
automatically searches for the presence of a prototype in the corresponding
header file, and if found, will print a "#include" statement in the synopsis.
No man page is created. The name of the manpages that would
be created are printed.
\fB-p\fP volume
Specify the name of the volume to be printed in center header
of generated manpages.
\fB-r\fP \fIrelease\fP
Specify the project and \fIrelease\fP number for the generated
The following example displays C code and comments to generate a manpage
.fam C
     /** 3
      * foobar - a sample dummy function
      * This line is now the first of the description section.
      * Note that function parameters parm1 and parm2 are highlighted
      * in the generated man page.
     int foobar(char *parm1, int parm2)
        return 0;

.fam T
\fBtxt2man\fP(1), \fBbookman\fP(1).
Marc Vertes <>