qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] RFC: mass comment conversion from C99 to C89


From: Blue Swirl
Subject: Re: [Qemu-devel] RFC: mass comment conversion from C99 to C89
Date: Sat, 15 Jan 2011 17:27:33 +0000

On Sat, Jan 15, 2011 at 5:20 PM, Laurent Vivier <address@hidden> wrote:
> Le samedi 15 janvier 2011 à 16:02 +0000, Blue Swirl a écrit :
>> With the sed script below (my first I think), I'm able to convert most
>
> nice script. Did you try awk ?

No, this just evolved from one-liner command into multi-line command
and then I suddenly had this.

>> files in QEMU from C99 comment style to C89. When successive line with
>> C99 comments are converted, the comments are merged. Two files
>
> [ This remembers me the port of gstreamer to AIX using xlc, which was
> C89 only... ]
>
>> (hw/rtl8139.c and microblaze-dis.c) still fail.
>>
>> Is this a good idea?
>
> I think line like:
>
> //#define DEBUG
>
> should be changed to
>
> #if 0
> #define DEBUG
> #endif
>
> as it is not really a comment but a flag.
>
> Of course a new challenge appears: identify block of following
> "//#define" (like in linux-user/sparc64/termbits.h ;-) )

The real fix IMHO would be to convert the debug statements into
tracepoints. My script actually avoids converting sequences starting
with  //#.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]