Re: [Openocd-development] [PATCH] change ir_scan to bool

2009-05-17 Thread Rick Altherr
A common way of handling these types of format-string differences for 32/64 bit cases is to define macros named things like PRIX32 which expands to the proper % sequence to print a 32-bit number as hex. We could do something similar for size_t and introduce something like PRIuSIZE. For an

Re: [Openocd-development] [PATCH] change ir_scan to bool

2009-05-17 Thread Øyvind Harboe
On Sun, May 17, 2009 at 11:20 AM, Michael Bruck wrote: > At least the arm11 port has a macro ZU that is intended to be used > when size_t is printed. I recently saw a patch that ignored that, but > I didn't comment on this error because it is like fighting windmills. > Someone who regularly compil

Re: [Openocd-development] [PATCH] change ir_scan to bool

2009-05-17 Thread Michael Bruck
At least the arm11 port has a macro ZU that is intended to be used when size_t is printed. I recently saw a patch that ignored that, but I didn't comment on this error because it is like fighting windmills. Someone who regularly compiles mingw (or a cross-compile farm) would be in a better position

Re: [Openocd-development] [PATCH] change ir_scan to bool

2009-05-16 Thread Martin Panter
On 16/05/2009, Øyvind Harboe wrote: > I take it GCC is used to build on Windows so we don't have > to worry, overly much, about Visual C++ oddities w/C. Mingw uses GCC to compile, but it uses the VC++ C runtime library. So I think you do need to be a bit careful sometimes, eg with the C99 print

Re: [Openocd-development] [PATCH] change ir_scan to bool

2009-05-16 Thread Øyvind Harboe
Committed. Thanks! -- Øyvind Harboe Embedded software and hardware consulting services http://consulting.zylin.com ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development

Re: [Openocd-development] [PATCH] change ir_scan to bool

2009-05-16 Thread Zach Welch
On Sat, 2009-05-16 at 21:10 +0200, Øyvind Harboe wrote: > On Sat, May 16, 2009 at 8:42 PM, Zach Welch wrote: > > On Sat, 2009-05-16 at 14:37 +0200, Øyvind Harboe wrote: > >> Hmmm I love true & false as much as the next guy + I'd even like to > >> see some restrained usage of C++ instead of all

Re: [Openocd-development] [PATCH] change ir_scan to bool

2009-05-16 Thread Øyvind Harboe
On Sat, May 16, 2009 at 8:42 PM, Zach Welch wrote: > On Sat, 2009-05-16 at 14:37 +0200, Øyvind Harboe wrote: >> Hmmm I love true & false as much as the next guy + I'd even like to >> see some restrained usage of C++ instead of all the ad hoc constructs >> in C that mimic object oriented featur

Re: [Openocd-development] [PATCH] change ir_scan to bool

2009-05-16 Thread Zach Welch
On Sat, 2009-05-16 at 14:37 +0200, Øyvind Harboe wrote: > Hmmm I love true & false as much as the next guy + I'd even like to > see some restrained usage of C++ instead of all the ad hoc constructs > in C that mimic object oriented features... > > I think it would be wrong of me to commit this

Re: [Openocd-development] [PATCH] change ir_scan to bool

2009-05-16 Thread Michael Bruck
(I thought I replied to this, but it seems the mail got lost.) I would suggest to apply it if no one objects rather than to wait if someone chimes in on this trivial change. Also bool is C99 Michael On Sat, May 16, 2009 at 2:37 PM, Øyvind Harboe wrote: > Hmmm I love true & false as much

Re: [Openocd-development] [PATCH] change ir_scan to bool

2009-05-16 Thread Øyvind Harboe
Hmmm I love true & false as much as the next guy + I'd even like to see some restrained usage of C++ instead of all the ad hoc constructs in C that mimic object oriented features... I think it would be wrong of me to commit this unless there is somebody else that speaks up for it too --

[Openocd-development] [PATCH] change ir_scan to bool

2009-05-16 Thread Michael Bruck
Changing ir_scan to bool more clearly illustrates its semantics and use: - change 'ir_scan' from 'int' to 'bool' to document its semantics Michael openocd-ir_scan-to-bool-290d4d1 Description: Binary data ___ Openocd-development mailing list Openocd-