From: knakasato AT aol DOT com (KNakasato) Newsgroups: comp.os.msdos.djgpp Subject: Re: Utility to strip comments from C/C++ source? Date: 20 Feb 1998 22:27:34 GMT Lines: 32 Message-ID: <19980220222700.RAA24539@ladder02.news.aol.com> NNTP-Posting-Host: ladder02.news.aol.com References: <87lnv6wo4s DOT fsf AT hasn DOT dera DOT gov DOT uk> Organization: AOL http://www.aol.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article <87lnv6wo4s DOT fsf AT hasn DOT dera DOT gov DOT uk>, Ian Miller writes: > >The C preprocessor already does this. Of course, it does a bunch of other >things too (expands macros and so on) but it's probably worth looking at. >I suspect you can control what it does with command line switches if you >run it by hand. > >Out of interest, why would you want to do this? If compilation speed is important, minds well remove it from all header files that don't need it, and keep as *.txt if you need it. >Does anyone know of a utility to add comments to source files. Now that >*would* be useful. :) sure :-) #include char buf[0x1000]; int main() { puts("/*Copyright (C) This source is now owned by me.*/"); while (gets(buf)) puts(buf); return 0; } Aloha