Extracting documentation from C code.
Thomas Heller
PPH93 at DMSWWU1A.BITNET
Fri May 17 23:16:15 AEST 1991
In article <BENNY.91May15185447 at dimona.vlss.amdahl.com>, benny at vlss.amdahl.com
(Benny Schnaider) says:
>
>Hi,
>
>I am looking for a utility to extract documentation from a "C"
>program. I want to have the documentation source as part of the "C" code
>(comments) which can be easily extracted in a troff (man page)
>format. The output should be similar to man 3 output format.
>
>Thanks,
>Benny
What do you think about this approach:
(One problem is that this no longer looks very much like a C-program).
----save the following as dummy.c----
#if 0
echo "extracting man-page"
cat <<MAN_PAGE >dummy.1
.TH DUMMY 1L
.SH NAME
dummy \- do nothing
.SH DESCRIPTION
.B dummy
does nothing.
It uses therefor the file
.I dummy.data .
.SH FILES
dummy.data
.SH BUGS
none
MAN_PAGE
echo "extracting database"
cat <<DATA_BASE >dummy.data
1 2 3 4 5
DATA_BASE
exit 0
#endif
main() {}
---cut here---
----------------------------------------------
Thomas Heller, University of Muenster, Germany <PPH93 at DMSWWU1A.BITNET>
More information about the Comp.unix.programmer
mailing list