[MINC-development] namespaces

Andrew Janke minc-development@bic.mni.mcgill.ca
Thu, 19 Jun 2003 09:29:17 +1000


On Wed, 18 Jun 2003, Vicka Corey wrote:

> In specific the ones we've had trouble with include:
>
> #define  PI           M_PI                  /* from math.h */
> #define  ABS( x )   ( ((x) > 0) ? (x) : (-(x)) )
> #define  FABS( x )   fabs( (double) x )
> #define  SIGN( x )  ( ((x) > 0) ? 1 : (((x) < 0) ? -1 : 0) )
> #define  FSIGN( x )  ( ((x) > 0.0) ? 1.0 : (((x) < 0.0) ? -1.0 : 0.0) ..

So is the general consensus to change just the problem #defines or the lot?

   $ grep \#define /usr/local/mni/include/volume_io/* | wc -l
        234

All 234 of them at that.

I'm all for adding a VOLIO_ prefix to the start of all of them, then creating a
volume_io_old.h with all the old #defines in it.  This will of course cause some
carnage in the ensuing few weeks... ;)



--
Andrew Janke   ( rotor@cmr.uq.edu.au || www.cmr.uq.edu.au/~rotor )
Australia->University of Queensland->Centre for Magnetic Resonance
W: +61 7 3365 4100  ||  H: +61 7 3800 4042  ||  M: +61 4 2138 8581