On Thu, 17 Aug 2006, David Berry wrote:
> DAT__ROOT and DAT__NOLOC have different notional meanings; one is a
> valid locator to the root of the file system, and the other is an invalid
> locator. Supplied with DAT__NOLOC, ndf_open would report an error, but
> supplied with DAT__ROOT it would function as normal. At the moment,
> ndfPlace cannot distinguish these two cases.
Are you proposing that we make changes to the keoe branch? There is now
quite a bit of C code that has been modified to use NULL instead of
Sorry I didn't notice the difference in my haste to have a proper C API
for HDS (I should have realised this when I noticed that NDF was the only
place that used this).
How should we do this then? I definitely don't want the C interface to
have to do a string compare every time it gets a HDSLoc pointer so
defining DAT__ROOT as (HDSLoc*)"DAT__ROOT" is not a runner from my
One solution would be for something like this in dat_par.h:
static const HDSLoc * DAT__ROOT = (HDSLoc *)(0x1); /* some random invalid pointer */
Another may be to define a const global in HDS and then declare it as
extern in dat_par.h. Then we could have it as a (HDSLoc*)"DAT__ROOT" but
it wouldn't matter since we would just compare the pointer to DAT__ROOT
not the contents.