From: Stefan Weil <weil@mail.berlios.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Laurent Vivier <Laurent@vivier.eu>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] RFC: mass comment conversion from C99 to C89
Date: Sat, 15 Jan 2011 18:44:23 +0100 [thread overview]
Message-ID: <4D31DCF7.2060909@mail.berlios.de> (raw)
In-Reply-To: <1295112015.2795.6.camel@Quad>
Am 15.01.2011 18:20, schrieb Laurent Vivier:
> 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 ?
>
>> 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.
The pattern //~ is also some kind of flag.
I must admit that I introduced some of these lines because
my favorite editor (SciTE) allows to toggle these
lines to code.
Laurent's solution would be fine for those, too.
It's also possible to replace all #if 0 by #if 1
to test compilation of debug code.
Is there an urgent need to fix all C99 comments?
I'd appreciate to see blanks at line endings or
tabs fixed, too. At least fixing the blanks is
much easier than fixing C99 comments.
Regards,
Stefan
next prev parent reply other threads:[~2011-01-15 17:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-15 16:02 [Qemu-devel] RFC: mass comment conversion from C99 to C89 Blue Swirl
2011-01-15 17:20 ` Laurent Vivier
2011-01-15 17:27 ` Blue Swirl
2011-01-15 17:44 ` Stefan Weil [this message]
2011-01-15 18:01 ` Blue Swirl
2011-01-17 0:12 ` Peter Maydell
2011-01-17 15:04 ` Anthony Liguori
2011-01-17 20:17 ` Blue Swirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D31DCF7.2060909@mail.berlios.de \
--to=weil@mail.berlios.de \
--cc=Laurent@vivier.eu \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).