From: Allen Martin <amartin@nvidia.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [Patch v3] Consolidate bool type
Date: Thu, 24 Jan 2013 10:28:42 -0800 [thread overview]
Message-ID: <20130124182828.GD1836@badger> (raw)
In-Reply-To: <51017C19.3040009@freescale.com>
On Thu, Jan 24, 2013 at 10:23:21AM -0800, York Sun wrote:
> On 01/24/2013 10:14 AM, Scott Wood wrote:
> >> >
> >>
> >> I thought I have replaced all #define, enum, typedef. I have left alone
> >> those FALSE, False, false but add define like this
> >>
> >> +#include <stdbool.h>
> >> +#define TRUE true
> >> +#define FALSE false
> >> +#define True true
> >> +#define False false
> >>
> >> Isn't that enough?
> >
> > It's enough to make it build, but it would be better to fix the users.
> >
>
> Let me try to run a script to replace all of them to "false" and "true".
>
> York
>
>
Try this:
$ find . -type f -name \*.h -print | xargs perl -pi -e 's/(\b)FALSE(\b)/$1false$2/g'
$ find . -type f -name \*.h -print | xargs perl -pi -e 's/(\b)TRUE(\b)/$1true$2/g'
$ find . -type f -name \*.c -print | xargs perl -pi -e 's/(\b)FALSE(\b)/$1false$2/g'
$ find . -type f -name \*.c -print | xargs perl -pi -e 's/(\b)TRUE(\b)/$1true$2/g'
$ find . -type f -name \*.h -print | xargs perl -pi -e 's/(\b)False(\b)/$1false$2/g'
$ find . -type f -name \*.h -print | xargs perl -pi -e 's/(\b)True(\b)/$1true$2/g'
$ find . -type f -name \*.c -print | xargs perl -pi -e 's/(\b)False(\b)/$1false$2/g'
$ find . -type f -name \*.c -print | xargs perl -pi -e 's/(\b)True(\b)/$1true$2/g'
-Allen
--
nvpublic
next prev parent reply other threads:[~2013-01-24 18:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-23 21:41 [U-Boot] [Patch v3] Consolidate bool type York Sun
2013-01-23 21:46 ` York Sun
2013-01-23 21:52 ` Scott Wood
2013-01-23 22:01 ` York Sun
2013-01-23 22:02 ` Scott Wood
2013-01-23 22:05 ` York Sun
2013-01-23 22:10 ` Allen Martin
2013-01-24 17:34 ` Allen Martin
2013-01-24 17:54 ` York Sun
2013-01-24 18:03 ` York Sun
2013-01-24 18:14 ` Scott Wood
2013-01-24 18:23 ` York Sun
2013-01-24 18:28 ` Allen Martin [this message]
2013-01-24 18:49 ` York Sun
2013-01-24 18:25 ` Allen Martin
2013-01-24 18:26 ` Wolfgang Denk
2013-01-23 21:53 ` Scott Wood
2013-01-23 22:04 ` York Sun
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=20130124182828.GD1836@badger \
--to=amartin@nvidia.com \
--cc=u-boot@lists.denx.de \
/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