[Nexus-developers] Problem in current napi5.c
Akeroyd, FA (Freddie)
F.A.Akeroyd at rl.ac.uk
Mon Sep 18 18:05:15 BST 2006
Peter,
I'm not an expert on that part of the code, but my guess is that
pFile->iCurrentG is only zero for a global attribute and non-zero when
inside both a group and a dataset/SDS within a group; hence the "-1" is
to remove counting of the "nexus_class" group attribute that is
automatically added by the API. The problem would then be caused by the
code subtracting one from the dataset attributes count that satisfies
(pFile->iCurrentG > 0 && pFile->iCurrentD > 0)
as well as from group attributes count (where it is needed). If I am
correct in my understanding of iCurrentG and iCurrentD then the fix is
to change line 1951 of napi5.c (Revision: 1.24) from
if (pFile->iCurrentG > 0)
to
if (pFile->iCurrentG > 0 && pFile->iCurrentD == 0)
Regards,
Freddie
-----Original Message-----
From: nexus-developers-bounces at anl.gov
[mailto:nexus-developers-bounces at anl.gov] On Behalf Of Peterson, Peter
F.
Sent: 14 September 2006 21:40
To: nexus-developers at anl.gov
Subject: [Nexus-developers] Problem in current napi5.c
"napi5.c" is reporting the wrong number of attributes in the function
"NX5getattrinfo". It reports back one less attribute than actually
exists in the file (when compared to NEXUS_3_0_1_BETA tag). As far as I
can tell the comparison "(pFile->iCurrentG > 0)" is always returning
true.
Can somebody please fix this?
P^2
_______________________________________________
NeXus-developers mailing list
NeXus-developers at anl.gov
http://www.neutron.anl.gov/mailman/listinfo/nexus-developers
More information about the NeXus-developers
mailing list