comment style

Jim Miller jamiller at hpcupt1.cup.hp.com
Tue Feb 5 05:24:07 AEST 1991


>I got code  ...
>that used the "// ..." style of comment.  It was the devil to get out
>so that a "real" (from Ken & Dennis' pen) C compiler could compile it.

"It was the devil to get out" ... ?!?

Ever hear of sed?  How about AWK?  Just eliminate the comment's contents.

If you need to keep the comments in the source, sed/awk as an additional 
pre-processor step in your makefile should do the trick.

Granted, there might be cases where // might be in a literal, but
a quick look with fgrep should find those for you and then take additional
action (in a awk script).

O.K., so what am I so stupid that I'm not seeing?

   jim - ??? - miller
   jamiller at hpmpeb7.cup.hp.com
   (a.k.a James A. Miller; Jim the JAM; stupid; @!?$$!; ... )
   Anything I say will be used against me ...
   But my company doesn't know or approve or condone anything of mine here.



More information about the Comp.std.c mailing list