Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!caen!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!tardis.computer-science.edinburgh.ac.uk!gtoal From: gtoal@tardis.computer-science.edinburgh.ac.uk Newsgroups: comp.unix.programmer Subject: Re: Extracting documentation from C code. Message-ID: <9105180910.AA21944@ucbvax.Berkeley.EDU> Date: 18 May 91 09:20:18 GMT References: Sender: usenet@ucbvax.BERKELEY.EDU Organization: Unix Anarchy, Edinburgh University. Lines: 32 In article benny@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...