Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!fernwood!uupsi!sunic!sics.se!fuug!news.funet.fi!hydra!klaava!wirzeniu From: wirzeniu@klaava.Helsinki.FI (Lars Wirzenius) Newsgroups: comp.unix.programmer Subject: Re: Extracting documentation from C code. Message-ID: <1991May25.221122.27484@klaava.Helsinki.FI> Date: 25 May 91 22:11:22 GMT References: <91137.144344PPH93@DMSWWU1A.BITNET> Organization: University of Helsinki Lines: 16 In article <91137.144344PPH93@DMSWWU1A.BITNET> PPH93@DMSWWU1A.BITNET (Thomas Heller) writes: >#if 0 > [nroff source for manual page] >#endif >main() {} The problem with this approach, is that all that nroff source still needs to be valid C tokens. You can't, for example, write a line that only consists of the word can't, since that would introduce an unterminated character constant. Not all compilers check this (but some do), of course, but it isn't valid according to the ANSI standard for C, so it is not good planning for to future. -- Lars Wirzenius wirzeniu@cc.helsinki.fi