Mail Archives: djgpp/1998/02/20/23:30:38
Ian Miller wrote:
>
> pneyz <pneyz AT bethany DOT edu> writes:
>
> > Is there a DJGPP utility to strip comments from files? I started coding
> > one then realized someone's probably already done it and it would save
> > me the trouble.
> >
> > If there isn't one, I'd like to submit the one I write (if I have to) to
> > the next release. Does anyone think this would be a (semi-)useful
> > utility?
>
> 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.
That's what I thought of, too. But you'd have something like
stdout
turned into whatever, probably something you'll never recognize.
Maybe you need something like
#ifndef REMOVE_COMMENTS
#include <all_header_files>
#endif
and a
cpp -DREMOVE_COMMENTS foo.c
so the preprocesser doesn't see
#define stdout what_ever
Fingers crossed.
> Does anyone know of a utility to add comments to source files. Now that
> *would* be useful. :)
There probably is an Emacs mode for that somewhere ;-)
(I just couldn't resist)
--
Ciao
Tom
*************************************************************
* Thomas Demmer *
* Lehrstuhl fuer Stroemungsmechanik *
* Ruhr-Uni-Bochum *
* Universitaetsstr. 150 *
* D-44780 Bochum *
* Tel: +49 234 700 6434 *
* Fax: +49 234 709 4162 *
* http://www.lstm.ruhr-uni-bochum.de/~demmer *
*************************************************************
- Raw text -