POV-Ray : Newsgroups : povray.programming : Re: Unicode for POVRay : Re: Unicode for POVRay Server Time
28 Jul 2024 20:32:26 EDT (-0400)
  Re: Unicode for POVRay  
From: Ron Parker
Date: 14 Jun 1999 10:33:10
Message: <376512a6@news.povray.org>
On 14 Jun 1999 01:34:36 -0400, Nieminen Mika wrote:
>Ronald L. Parker <par### [at] mailfwicom> wrote:
>: BTW, I have a minor bone to pick with you.  Please don't use // to
>: comment things in your code.  GCC doesn't like it, and many other C
>: compilers don't either.
>
>  Tip: If you want to automatically enclose those comments with /* ... */,
>you can try this sed command:
>  sed "s/\/\/.*$/\/*&*\//" file.c
>
>  (Cryptic, uh? :) )

less cryptic, and with a backup:
  mv file.c file.c.bak; perl -pe "s#//(.*)$#/* $1 */#" <file.c.bak >file.c

Both methods would fail if the // comment happened to contain the '*/'
sequence of characters, but that's rare.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.