From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Sun Date: Thu, 24 Jan 2013 10:49:31 -0800 Subject: [U-Boot] [Patch v3] Consolidate bool type In-Reply-To: <20130124182828.GD1836@badger> References: <51005A1C.1010308@freescale.com> <1358977924.9710.8@snotra> <51005DCD.3010706@freescale.com> <1358978574.9710.10@snotra> <51005EA6.1050104@freescale.com> <20130124173447.GB1836@badger> <5101755E.1050406@freescale.com> <51017785.9060705@freescale.com> <1359051277.24865.8@snotra> <51017C19.3040009@freescale.com> <20130124182828.GD1836@badger> Message-ID: <5101823B.9000302@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 01/24/2013 10:28 AM, Allen Martin wrote: > 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 >>>> +#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' > Thanks. I used xargs sed -i "s/\bTrue\b/true/g" following your git grep. York