From owner-freebsd-questions Fri Feb 23 01:29:07 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id BAA22173 for questions-outgoing; Fri, 23 Feb 1996 01:29:07 -0800 (PST) Received: from gilberto.physik.rwth-aachen.de (gilberto.physik.rwth-aachen.de [137.226.31.2]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id BAA22166 for ; Fri, 23 Feb 1996 01:29:03 -0800 (PST) Received: (from kuku@localhost) by gilberto.physik.rwth-aachen.de (8.6.11/8.6.9) id KAA19917; Fri, 23 Feb 1996 10:25:47 +0100 Message-Id: <199602230925.KAA19917@gilberto.physik.rwth-aachen.de> Subject: Re: cc in FreeBSD To: wsantee@wsantee.oz.net (Wes Santee) Date: Fri, 23 Feb 1996 10:25:46 +0100 (MET) From: "Christoph P. Kukulies" Cc: wollman@lcs.mit.edu, questions@freebsd.org In-Reply-To: <199602230735.XAA00579@wsantee.oz.net> from "Wes Santee" at Feb 22, 96 11:35:43 pm From: Christoph Kukulies Reply-To: Christoph Kukulies X-Mailer: ELM [version 2.4 PL25 ME8b] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org Precedence: bulk > > 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 | ) > ( (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