Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!psuvax1!psuvm!dbngmd13!dmswwu1c!pph93 From: PPH93@DMSWWU1A.BITNET (Thomas Heller) Newsgroups: comp.unix.programmer Subject: Re: Extracting documentation from C code. Message-ID: <91137.144344PPH93@DMSWWU1A.BITNET> Date: 17 May 91 13:16:15 GMT References: Distribution: comp Lines: 43 Organisation: Westfaelische Wilhelms-Universitaet, Muenster, Germany In article , benny@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 <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 <dummy.data 1 2 3 4 5 DATA_BASE exit 0 #endif main() {} ---cut here--- ---------------------------------------------- Thomas Heller, University of Muenster, Germany