Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Feb 1996 10:25:46 +0100 (MET)
From:      Christoph Kukulies <kuku@gilberto.physik.rwth-aachen.de>
To:        wsantee@wsantee.oz.net (Wes Santee)
Cc:        wollman@lcs.mit.edu, questions@freebsd.org
Subject:   Re: cc in FreeBSD
Message-ID:  <199602230925.KAA19917@gilberto.physik.rwth-aachen.de>
In-Reply-To: <199602230735.XAA00579@wsantee.oz.net> from "Wes Santee" at Feb 22, 96 11:35:43 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> Garrett A. Wollman sez:
> > 
> > > Not sure if this question is apropos for the Questions list, but is
> > > there a switch in the cc for FreeBSD (gcc 2.6.3, looks like) that
> > > allows C++-style comments in a C source file?
> > 
> > Nope.  Try this:
> > 
> > perl -spi.bak -e 's,//(.*)$,/*$1 */,' *.c

You script will fail on this:

main(){ double a=3.//* this is a comment*/4.;printf("%f",a);}


> > 
> 
> You guys are simply amazing.  That's all there is to it.  Here I was
> being pretty glib about writing this in about 4 lines of Perl code and
> it comes back to me demonstrated in one.  Wow.  (I guess to be fair, 2
> of those lines were the equivilant of the '-p' switch which I didn't
> know about).  Good show!
> 
> Cheers,
> -- 
> ( -Wes Santee <wsantee@wsantee.oz.net>  |                                )
> (             <wsantee@oz.net> (backup) | No one told you when to run... )
> ( http://www.oz.net/~wsantee            \------------------------------- )
> ( finger for PGP info                                 Powered by FreeBSD )
> 

--Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602230925.KAA19917>