[MINC-development] ABS and SIGN

Steve ROBBINS minc-development@bic.mni.mcgill.ca
Tue, 17 Jun 2003 14:00:30 -0400


On Tue, Jun 17, 2003 at 01:24:54PM -0400, Robert VINCENT wrote:
> Hi Vicka,
> 
> While I know there are some "namespace pollution" issues with MINC, I'm a
> little surprised that this is causing a problem, since none of these
> symbols is defined in the public "minc.h" header file.

Maybe they are using volume_io: SIGN is defined in <volume_io/basic.h>.  That
header is one of the worst offenders: it's got MIN, MAX, TRUE, FALSE, PI, ON,
etc etc.

But on the topic of ABS: why not just replace it with fabs() or abs()
as appropriate and do away with the define.

SIGN is actually only used in one file that I can detect:
progs/mincview/invert_raw_image.c.  And that file has its own
definition of SIGN anyway.  So it could be removed from volume_io/basic.h
with no ill effects for MINC per se.

How about we make "clean up the namespace" a release goal for MINC 1.2?  What
needs some thought is providing backward compatibility for clients of the
library who do use these symbols.  Mainly the decision is: do we make current
users do something special to define the symbols, or do we make future users
do something special to get a clean namespace?  Where "something special" is
either "#define a symbol" or "#include a different header".

-S