Extracting documentation from C code.

gtoal at tardis.computer-science.edinburgh.ac.uk gtoal at tardis.computer-science.edinburgh.ac.uk
Sat May 18 19:20:18 AEST 1991


In article <BENNY.91May15185447 at dimona.vlss.amdahl.com> benny at vlss.amdahl.com (Benny Schnaider) writes:
: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

There are a whole suite of tools to do this used by the TeX community;
you write your program in a format called 'web', which can be
processed to produce either a source file or a TeX documenty.

Web originally handled Pascal, but there are now many webs 
available, including at least two implementations for C.

The only drawback of this system is that the actual file that you
edit isn't as readable as you'ld like - the readable version is
the formatted output.  If you have a good graphics system, an
interactive TeX previewer, and a fast CPU to run all this stuff, it
can't be beaten.

Check your local TeX group/guru's for details.  Find Knuth's paper
'literate programming in web'.

Regards
Graham
PS Sorry it's not troff, so maybe it isn't really appropriate for
your particular job, but I thought I'd post anyway as others
might be interested...



More information about the Comp.unix.programmer mailing list