Extracting documentation from C code.

Lars Wirzenius wirzeniu at klaava.Helsinki.FI
Sun May 26 08:11:22 AEST 1991


In article <91137.144344PPH93 at DMSWWU1A.BITNET> PPH93 at 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 at cc.helsinki.fi



More information about the Comp.unix.programmer mailing list