[packages/hdf-eos5] - more type fixes, but still crashes
qboosh
qboosh at pld-linux.org
Sun Dec 22 17:09:25 CET 2019
commit d8a2c2e52aab7d187a373e7503c308d3ef29bb54
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Dec 22 17:10:10 2019 +0100
- more type fixes, but still crashes
hdf-eos5-types.patch | 1842 +++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 1837 insertions(+), 5 deletions(-)
---
diff --git a/hdf-eos5-types.patch b/hdf-eos5-types.patch
index e3622bb..754186a 100644
--- a/hdf-eos5-types.patch
+++ b/hdf-eos5-types.patch
@@ -194,7 +194,181 @@
HE5_EHprint(errbuf, __FILE__, __LINE__);
free(errbuf);
--- hdfeos5/src/PTapi.c.orig 2017-11-13 17:02:43.000000000 +0100
-+++ hdfeos5/src/PTapi.c 2019-12-10 16:35:37.164494445 +0100
++++ hdfeos5/src/PTapi.c 2019-12-22 16:52:42.205447245 +0100
+@@ -101,103 +101,103 @@
+
+ /* File/Point access routine */
+
+-int
++hid_t
+ HE5_PTopenF(char *filename, uintn Flags);
+-int
+-HE5_PTcreateF(int FileID, char *pointname);
+-int
+-HE5_PTattachF(int FileID, char *pointname);
+-int
+-HE5_PTdetachF(int pointID);
+-int
+-HE5_PTcloseF(int FileID);
++hid_t
++HE5_PTcreateF(hid_t FileID, char *pointname);
++hid_t
++HE5_PTattachF(hid_t FileID, char *pointname);
++herr_t
++HE5_PTdetachF(hid_t pointID);
++herr_t
++HE5_PTcloseF(hid_t FileID);
+
+ /* Definition routines */
+
+-int
+-HE5_PTdeflevelF(int pointID, const char *levelname, int rank[], char *fieldlist, long *dim_sizes, int dtype[], int array[]);
+-int
+-HE5_PTdeflinkageF(int pointID, char *parent, char *child, char *linkfield);
++herr_t
++HE5_PTdeflevelF(hid_t pointID, const char *levelname, int rank[], char *fieldlist, long *dim_sizes, hid_t dtype[], int array[]);
++herr_t
++HE5_PTdeflinkageF(hid_t pointID, char *parent, char *child, char *linkfield);
+
+ /* I/O routines */
+
+-int
+-HE5_PTreadlevelF(int pointID, int level, char *fieldname, int ntype, void *datbuf);
+-int
+-HE5_PTupdatelevelF(int pointID, int level, char *fieldlist, long nrec, long recs[], int ntype, void *data);
+-int
+-HE5_PTwritelevelF(int pointID, int level, long count[], char *fieldname, int ntype, void *data);
+-int
+-HE5_PTwriteattrF(int pointID, const char *attrname, int ntype, long fortcount[], void *datbuf);
+-int
+-HE5_PTwritegrpattrF(int pointID, const char *attrname, int ntype, long fortcount[], void * datbuf);
+-int
+-HE5_PTwritelocattrF(int pointID, const char *levelname, const char *attrname, int ntype, long count[],void * datbuf);
+-int
+-HE5_PTreadattrF(int pointID, const char *attrname, void *datbuf);
+-int
+-HE5_PTreadgrpattrF(int pointID, const char *attrname, void *datbuf);
+-int
+-HE5_PTreadlocattrF(int pointID, const char *levelname, const char *attrname, void *datbuf);
+-int
+-HE5_PTwrbckptrF(int pointID, int level);
+-int
+-HE5_PTwrfwdptrF(int pointID, int level);
++herr_t
++HE5_PTreadlevelF(hid_t pointID, int level, char *fieldname, int ntype, void *datbuf);
++herr_t
++HE5_PTupdatelevelF(hid_t pointID, int level, char *fieldlist, long nrec, long recs[], int ntype, void *data);
++herr_t
++HE5_PTwritelevelF(hid_t pointID, int level, long count[], char *fieldname, int ntype, void *data);
++herr_t
++HE5_PTwriteattrF(hid_t pointID, const char *attrname, int ntype, long fortcount[], void *datbuf);
++herr_t
++HE5_PTwritegrpattrF(hid_t pointID, const char *attrname, int ntype, long fortcount[], void * datbuf);
++herr_t
++HE5_PTwritelocattrF(hid_t pointID, const char *levelname, const char *attrname, int ntype, long count[],void * datbuf);
++herr_t
++HE5_PTreadattrF(hid_t pointID, const char *attrname, void *datbuf);
++herr_t
++HE5_PTreadgrpattrF(hid_t pointID, const char *attrname, void *datbuf);
++herr_t
++HE5_PTreadlocattrF(hid_t pointID, const char *levelname, const char *attrname, void *datbuf);
++herr_t
++HE5_PTwrbckptrF(hid_t pointID, int level);
++herr_t
++HE5_PTwrfwdptrF(hid_t pointID, int level);
+
+ /* Inquiry routines */
+
+-int
+-HE5_PTnrecsF(int pointID, int level);
++hsize_t
++HE5_PTnrecsF(hid_t pointID, int level);
+ int
+ HE5_PTnlevelsF(hid_t pointID);
+ int
+-HE5_PTnfieldsF(int pointID, int level, char *fieldlist, long *strbufsize);
+-int
+-HE5_PTlevelindxF(int pointID, const char *levelname);
+-int
+-HE5_PTgetlevelnameF(int pointID, int level, char *levelname, long *strbufsize);
+-int
+-HE5_PTbcklinkinfoF(int pointID, int level, char *linkfield);
+-int
+-HE5_PTfwdlinkinfoF(int pointID, int level, char *linkfield);
+-int
+-HE5_PTlevelinfoF(int pointID, int level, char *levelname, int rank[], char *fieldlist, long *dim_sizes, long *datasize, long offset[], int dtype[]);
+-int
+-HE5_PTinqdatatypeF(int pointID, char *fieldname, char *attrname, int fieldgroup, int *Type, int *Class, int *Order, long *size);
++HE5_PTnfieldsF(hid_t pointID, int level, char *fieldlist, long *strbufsize);
+ int
++HE5_PTlevelindxF(hid_t pointID, const char *levelname);
++herr_t
++HE5_PTgetlevelnameF(hid_t pointID, int level, char *levelname, long *strbufsize);
++herr_t
++HE5_PTbcklinkinfoF(hid_t pointID, int level, char *linkfield);
++herr_t
++HE5_PTfwdlinkinfoF(hid_t pointID, int level, char *linkfield);
++herr_t
++HE5_PTlevelinfoF(hid_t pointID, int level, char *levelname, int rank[], char *fieldlist, long *dim_sizes, long *datasize, long offset[], hid_t dtype[]);
++herr_t
++HE5_PTinqdatatypeF(hid_t pointID, char *fieldname, char *attrname, int fieldgroup, hid_t *Type, H5T_class_t *Class, H5T_order_t *Order, size_t *size);
++long
+ HE5_PTinqpointF(const char *filename, char *pointlist, long *strbufsize);
+-int
+-HE5_PTattrinfoF(int pointID, const char *attrname, int *numbertype, long *fortcount);
+-int
+-HE5_PTgrpattrinfoF(int pointID, const char *attrname, int *numbertype, long *fortcount);
+-int
+-HE5_PTlocattrinfoF(int pointID, const char *levelname, const char *attrname, int *numbertype, long *fortcount);
+-int
+-HE5_PTattrinfoF2(int pointID, const char *attrname, int *numbertype, long *fortcount, long *fortsize);
+-int
+-HE5_PTgrpattrinfoF2(int pointID, const char *attrname, int *numbertype, long *fortcount, long *fortsize);
+-int
+-HE5_PTlocattrinfoF2(int pointID, const char *levelname, const char *attrname, int *numbertype, long *fortcount, long *fortsize);
++herr_t
++HE5_PTattrinfoF(hid_t pointID, const char *attrname, hid_t *numbertype, hsize_t *fortcount);
++herr_t
++HE5_PTgrpattrinfoF(hid_t pointID, const char *attrname, hid_t *numbertype, hsize_t *fortcount);
++herr_t
++HE5_PTlocattrinfoF(hid_t pointID, const char *levelname, const char *attrname, hid_t *numbertype, hsize_t *fortcount);
++herr_t
++HE5_PTattrinfoF2(hid_t pointID, const char *attrname, hid_t *numbertype, hsize_t *fortcount, hsize_t *fortsize);
++herr_t
++HE5_PTgrpattrinfoF2(hid_t pointID, const char *attrname, hid_t *numbertype, hsize_t *fortcount, hsize_t *fortsize);
++herr_t
++HE5_PTlocattrinfoF2(hid_t pointID, const char *levelname, const char *attrname, hid_t *numbertype, hsize_t *fortcount, hsize_t *fortsize);
+ long
+-HE5_PTinqattrsF(int pointID, char *attrnames, long *strbufsize);
++HE5_PTinqattrsF(hid_t pointID, char *attrnames, long *strbufsize);
+ long
+-HE5_PTinqgrpattrsF(int pointID, char *attrnames, long *strbufsize);
++HE5_PTinqgrpattrsF(hid_t pointID, char *attrnames, long *strbufsize);
+ long
+-HE5_PTinqlocattrsF(int pointID, const char *levelname, char *attrnames, long *strbufsize);
+-int
+-HE5_PTnumtypeinfoF(int pointID, int level, int numtype[]);
++HE5_PTinqlocattrsF(hid_t pointID, const char *levelname, char *attrnames, long *strbufsize);
++herr_t
++HE5_PTnumtypeinfoF(hid_t pointID, int level, hid_t numtype[]);
+
+
+ /* Fortran Wrapper Utility Routines */
+
+-static int
++static herr_t
+ HE5_PTfort2c(long dims[], int rank, int datatype, void *inputfortbuf, void *outputfortbuf);
+-static int
++static herr_t
+ HE5_PTc2fort(long dims[], int rank, int datatype, void *inputfortbuf, void *outputfortbuf);
+
+ /* Fortran Wrappers (internal routines) */
+
+-static int
++static herr_t
+ HE5_PTgetfort_order(long *dims, int dim_index, long *c_index, int rank, long *P, long *coeffs, long *n);
+ static herr_t
+ HE5_PTreadlevel_f(hid_t pointID, int level, char *fieldname, hid_t dtype, void *datbuf);
@@ -821,7 +821,7 @@
status = HE5_PTgetlevelname_fromSM(pointID, i, LevelName);
if ( status == FAIL )
@@ -312,7 +486,311 @@
H5Epush(__FILE__, "HE5_PTreadlevel", __LINE__, H5E_FILE, H5E_SEEKERROR, errbuf);
HE5_EHprint(errbuf, __FILE__, __LINE__);
return(status);
-@@ -9099,7 +9099,7 @@
+@@ -8310,13 +8310,11 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
++hid_t
+ HE5_PTopenF(char *filename, uintn Flags)
+ {
+ hid_t fid = FAIL;/* hdf5 type file ID */
+
+- int FileID = FAIL;/* Return file ID */
+-
+ uintn flags = 9999;/* HDF5 file access code */
+
+ char *errbuf = NULL;/* Error message buffer */
+@@ -8358,11 +8356,9 @@
+ }
+
+
+- FileID = (int)fid;
+-
+ free(errbuf);
+
+- return(FileID);
++ return(fid);
+ }
+
+
+@@ -8394,13 +8390,10 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTcreateF(int FileID, char *pointname)
++hid_t
++HE5_PTcreateF(hid_t FileID, char *pointname)
+ {
+- int PointID = FAIL;/* point ID (return value) */
+-
+ hid_t pointID = FAIL;/* HDF5 type point ID */
+- hid_t fid = FAIL;/* HDF5 type file ID */
+
+ char *errbuf = (char *)NULL; /* Buffer for error message */
+
+@@ -8414,9 +8407,7 @@
+ return(FAIL);
+ }
+
+- fid = (hid_t)FileID;
+-
+- pointID = HE5_PTcreate(fid, pointname);
++ pointID = HE5_PTcreate(FileID, pointname);
+ if (pointID == FAIL)
+ {
+ sprintf(errbuf, "Error calling HE5_PTcreate() from FORTRAN wrapper. \n");
+@@ -8428,8 +8419,7 @@
+
+ free(errbuf);
+
+- PointID = (int)pointID;
+- return(PointID);
++ return(pointID);
+ }
+
+
+@@ -8462,13 +8452,10 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTattachF(int FileID, char *pointname)
++hid_t
++HE5_PTattachF(hid_t FileID, char *pointname)
+ {
+- int PointID = FAIL; /* Return value of the Point ID */
+-
+ hid_t pointID = FAIL; /* HDF5 type Point ID */
+- hid_t fid = FAIL; /* HDF5 type file ID */
+
+ char *errbuf = (char *)NULL;/* Buffer for error message */
+
+@@ -8484,9 +8471,7 @@
+ }
+
+
+- fid = (hid_t)FileID;
+-
+- pointID = HE5_PTattach(fid, pointname);
++ pointID = HE5_PTattach(FileID, pointname);
+ if(pointID == FAIL)
+ {
+ sprintf(errbuf, "Error calling HE5_PTattach() from FORTRAN wrapper. \n");
+@@ -8498,8 +8483,7 @@
+
+ free(errbuf);
+
+- PointID = (int)pointID;
+- return(PointID);
++ return(pointID);
+
+ }
+
+@@ -8534,15 +8518,11 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTdetachF(int PointID)
++herr_t
++HE5_PTdetachF(hid_t PointID)
+ {
+- int ret = FAIL;/* (int) Return status variable */
+-
+ herr_t status = FAIL;/* routine return status variable */
+
+- hid_t pointID = FAIL;/* HDF5 type point ID */
+-
+ char *errbuf = (char *)NULL;/*Error message buffer */
+
+
+@@ -8557,9 +8537,7 @@
+ return(FAIL);
+ }
+
+- pointID = (hid_t)PointID;
+-
+- status = HE5_PTdetach(pointID);
++ status = HE5_PTdetach(PointID);
+ if(status == FAIL)
+ {
+ sprintf(errbuf, "Error calling HE5_PTdetach() from FORTRAN wrapper. \n");
+@@ -8571,8 +8549,7 @@
+
+ free(errbuf);
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+
+@@ -8604,13 +8581,9 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTcloseF(int FileID)
++herr_t
++HE5_PTcloseF(hid_t FileID)
+ {
+- int ret = FAIL;/* (int) return status variable */
+-
+- hid_t fid = FAIL;/* HDF5 type file ID */
+-
+ herr_t status = FAIL;/* routine return status variable */
+
+ char *errbuf = (char *)NULL;/*Error message buffer */
+@@ -8626,11 +8599,9 @@
+ return(FAIL);
+ }
+
+- fid = (hid_t)FileID;
+-
+ /* Call HE5_PTclose to perform file close */
+ /* -------------------------------------- */
+- status = HE5_PTclose(fid);
++ status = HE5_PTclose(FileID);
+ if(status == FAIL)
+ {
+ sprintf(errbuf, "Error calling HE5_PTclose() from FORTRAN wrapper. \n");
+@@ -8643,8 +8614,7 @@
+
+ free(errbuf);
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+ /* Definition routines */
+@@ -8687,15 +8657,11 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTdeflevelF(int pointID, const char *levelname, int rank[], char *fieldlist, long *dim_sizes, int dtype[], int array[])
++herr_t
++HE5_PTdeflevelF(hid_t pointID, const char *levelname, int rank[], char *fieldlist, long *dim_sizes, hid_t dtype[], int array[])
+ {
+ herr_t status = FAIL;/* routine return status variable */
+-
+- int ret = FAIL;/* (int) Return status variable */
+ int i, j, k = 0;
+-
+- hid_t PointID = FAIL;
+
+ HE5_CmpDTSinfo dtsinfo;
+
+@@ -8827,11 +8793,9 @@
+
+ dtsinfo.datasize = (size_t)datasize;
+
+- PointID = (hid_t)pointID;
+-
+ /* Call HE5_PTdeflevel() */
+ /* --------------------- */
+- status = HE5_PTdeflevel(PointID, levelname, &dtsinfo);
++ status = HE5_PTdeflevel(pointID, levelname, &dtsinfo);
+ if (status == FAIL )
+ {
+ sprintf(errbuf, "Call to HE5_PTdeflevel() failed. \n");
+@@ -8848,8 +8812,7 @@
+ free(datatype_size);
+ free(datasize_field);
+ free(offset);
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+
+@@ -8884,14 +8847,10 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTdeflinkageF(int pointID, char *parent, char *child, char *linkfield)
++herr_t
++HE5_PTdeflinkageF(hid_t pointID, char *parent, char *child, char *linkfield)
+ {
+- int ret = FAIL;/* (int) Return status variable */
+-
+ herr_t status = FAIL;/* routine return status variable */
+-
+- hid_t PointID = FAIL;/* hdf5 type file ID */
+
+ char *errbuf = NULL;/* Error message buffer */
+
+@@ -8906,11 +8865,9 @@
+ return(FAIL);
+ }
+
+- PointID = (hid_t)pointID;
+-
+ /* Call HE5_PTdeflinkage */
+ /* -------------------------------------- */
+- status = HE5_PTdeflinkage(PointID, parent, child, linkfield);
++ status = HE5_PTdeflinkage(pointID, parent, child, linkfield);
+ if(status == FAIL)
+ {
+ sprintf(errbuf, "Error calling HE5_PTdeflinkageF() from FORTRAN wrapper. \n");
+@@ -8918,11 +8875,9 @@
+ HE5_EHprint(errbuf, __FILE__, __LINE__);
+ }
+
+- ret = (int)status;
+-
+ free(errbuf);
+
+- return(ret);
++ return(status);
+ }
+
+
+@@ -8961,14 +8916,11 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTreadlevelF(int pointID, int level, char *fieldname, int ntype, void *datbuf)
++herr_t
++HE5_PTreadlevelF(hid_t pointID, int level, char *fieldname, int ntype, void *datbuf)
+ {
+- int ret = FAIL;/* (int) return status variable */
+-
+ herr_t status = FAIL;/* routine return status variable */
+
+- hid_t ptID = FAIL;
+ hid_t dtype = FAIL;/* HDF5 type data type ID */
+
+ char *errbuf = (char *)NULL;/*Error message buffer */
+@@ -8994,11 +8946,9 @@
+ dtype = ntype;
+ }
+
+- ptID = (hid_t)pointID;
+-
+ /* Call HE5_PTreadlevel_f to read data */
+ /* ----------------------------------- */
+- status = HE5_PTreadlevel_f(ptID, level, fieldname, dtype, datbuf);
++ status = HE5_PTreadlevel_f(pointID, level, fieldname, dtype, datbuf);
+ if (status == FAIL)
+ {
+ sprintf(errbuf, "Reading data failed.\n");
+@@ -9008,8 +8958,7 @@
+
+ free(errbuf);
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+
+ }
+
+@@ -9099,7 +9048,7 @@
if (nlevels == 0)
{
status = FAIL;
@@ -321,7 +799,7 @@
H5Epush(__FILE__, "HE5_PTreadlevel_f", __LINE__, H5E_BTREE, H5E_NOTFOUND, errbuf);
HE5_EHprint(errbuf, __FILE__, __LINE__);
return(status);
-@@ -9109,7 +9109,7 @@
+@@ -9109,7 +9058,7 @@
/* Report error if level # to large */
/* -------------------------------- */
status = FAIL;
@@ -330,7 +808,48 @@
H5Epush(__FILE__, "HE5_PTreadlevel_f", __LINE__, H5E_FILE, H5E_SEEKERROR, errbuf);
HE5_EHprint(errbuf, __FILE__, __LINE__);
return(status);
-@@ -9513,7 +9513,7 @@
+@@ -9350,14 +9299,11 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTwritelevelF(int pointID, int level, long count[], char *fieldname, int ntype, void *data)
++herr_t
++HE5_PTwritelevelF(hid_t pointID, int level, long count[], char *fieldname, int ntype, void *data)
+ {
+ herr_t status = FAIL;/* routine return status variable */
+
+- int ret = FAIL;/* (int) return status variable */
+-
+- hid_t ptID = FAIL;
+ hid_t dtype = FAIL;/* HDF5 type data type ID */
+
+ hsize_t count_t1[1] = {0};
+@@ -9385,12 +9331,11 @@
+ dtype = ntype;
+ }
+
+- ptID = (hid_t)pointID;
+ count_t1[0] = (hsize_t)count[0];
+
+ /* WRITE data */
+ /* ---------- */
+- status = HE5_PTwritelevel_f(ptID, level, count_t1, fieldname, ntype, dtype, data);
++ status = HE5_PTwritelevel_f(pointID, level, count_t1, fieldname, ntype, dtype, data);
+ if (status == FAIL)
+ {
+ sprintf(errbuf, "Cannot write updated data to the level. \n");
+@@ -9400,8 +9345,7 @@
+
+ free(errbuf);
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+
+ }
+
+@@ -9513,7 +9457,7 @@
if (nlevels == 0)
{
status = FAIL;
@@ -339,7 +858,7 @@
H5Epush(__FILE__, "HE5_PTwritelevel_f", __LINE__, H5E_BTREE, H5E_NOTFOUND, errbuf);
HE5_EHprint(errbuf, __FILE__, __LINE__);
return(status);
-@@ -9523,7 +9523,7 @@
+@@ -9523,7 +9467,7 @@
/* Report error if level # to large */
/* -------------------------------- */
status = FAIL;
@@ -348,6 +867,1319 @@
H5Epush(__FILE__, "HE5_PTwritelevel_f", __LINE__, H5E_ARGS, H5E_BADVALUE, errbuf);
HE5_EHprint(errbuf, __FILE__, __LINE__);
return(status);
+@@ -9821,14 +9765,10 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTwrbckptrF(int pointID, int level)
++herr_t
++HE5_PTwrbckptrF(hid_t pointID, int level)
+ {
+- int ret = FAIL;/* (int) Return status variable */
+-
+ herr_t status = FAIL;/* routine return status variable */
+-
+- hid_t PointID = FAIL;/* HDF5 type point ID */
+
+ char *errbuf = (char *)NULL;/*Error message buffer */
+
+@@ -9844,9 +9784,7 @@
+ return(FAIL);
+ }
+
+- PointID = (hid_t)pointID;
+-
+- status = HE5_PTwrbckptr(PointID, level);
++ status = HE5_PTwrbckptr(pointID, level);
+ if (status == FAIL)
+ {
+ sprintf(errbuf, "Cannot write back pointer records. \n");
+@@ -9857,8 +9795,7 @@
+
+ free(errbuf);
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+
+@@ -9890,15 +9827,11 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTwrfwdptrF(int pointID, int level)
++herr_t
++HE5_PTwrfwdptrF(hid_t pointID, int level)
+ {
+- int ret = FAIL;/* (int) Return status variable */
+-
+ herr_t status = FAIL;/* routine return status variable */
+
+- hid_t PointID = FAIL;/* HDF5 type point ID */
+-
+ char *errbuf = (char *)NULL;/*Error message buffer */
+
+
+@@ -9913,9 +9846,7 @@
+ return(FAIL);
+ }
+
+- PointID = (hid_t)pointID;
+-
+- status = HE5_PTwrfwdptr(PointID, level - 1);
++ status = HE5_PTwrfwdptr(pointID, level - 1);
+ if (status == FAIL)
+ {
+ sprintf(errbuf, "Cannot write back pointer records. \n");
+@@ -9926,8 +9857,7 @@
+
+ free(errbuf);
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+
+@@ -9963,12 +9893,11 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTupdatelevelF(int pointID, int level, char *fieldlist, long nrec, long recs[], int ntype, void *data)
++herr_t
++HE5_PTupdatelevelF(hid_t pointID, int level, char *fieldlist, long nrec, long recs[], int ntype, void *data)
+ {
+ herr_t status = FAIL;
+
+- hid_t PointID = FAIL;
+ hid_t dtype = FAIL; /* HDF5 type data type ID */
+
+ hsize_t nrec_t = 0;
+@@ -9976,7 +9905,6 @@
+ hssize_t *recs_t;
+
+ int i;
+- int ret = FAIL;
+
+ char *errbuf = (char *)NULL;/*Error message buffer */
+
+@@ -9989,7 +9917,7 @@
+ {
+ H5Epush(__FILE__, "HE5_PTcloseF", __LINE__, H5E_FILE, H5E_NOSPACE, "Cannot allocate memory for error buffer.");
+ HE5_EHprint("Error: Cannot allocate memory for error buffer, occured", __FILE__, __LINE__);
+- return(ret);
++ return(status);
+ }
+
+ dtype = HE5_EHconvdatatype(ntype);
+@@ -10002,7 +9930,6 @@
+ dtype = ntype;
+ }
+
+- PointID = (hid_t)pointID;
+ nrec_t = (hsize_t)nrec;
+
+ recs_t = (hssize_t *)calloc(nrec, sizeof(hssize_t));
+@@ -10013,7 +9940,7 @@
+
+ /* Call HE5_PTupdatelevel_f() */
+ /* -------------------------- */
+- status = HE5_PTupdatelevel_f(PointID, level, fieldlist, nrec_t, recs_t, ntype, dtype, data);
++ status = HE5_PTupdatelevel_f(pointID, level, fieldlist, nrec_t, recs_t, ntype, dtype, data);
+ if (status == FAIL)
+ {
+ sprintf(errbuf, "Trouble calling HE5_PTupdatelevel_f(). \n");
+@@ -10025,8 +9952,7 @@
+ free(errbuf);
+ if (recs_t != NULL) free(recs_t);
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+
+@@ -10701,16 +10627,14 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTwriteattrF(int pointID, const char *attrname, int ntype, long fortcount[], void *datbuf)
++herr_t
++HE5_PTwriteattrF(hid_t pointID, const char *attrname, int ntype, long fortcount[], void *datbuf)
+ {
+
+- int ret = FAIL;/* int return status variable */
+ int rank = 1; /* Note: It is assumed that fortcout has just */
+ /* one element to agree with EHattr function */
+ int i; /* Loop index */
+
+- hid_t PointID = FAIL;/* HDF-EOS Swath ID */
+ hid_t numbertype = FAIL;/* HDF5 data type ID */
+
+ herr_t status = FAIL;/* routine return status variable */
+@@ -10755,8 +10679,6 @@
+ for (i = 0; i < rank; i++)
+ count[i] = (hsize_t)fortcount[rank - 1 - i];
+
+- PointID = (hid_t)pointID;
+-
+ if ((numbertype == HE5T_CHARSTRING) || (numbertype == H5T_NATIVE_CHAR) || (numbertype == H5T_C_S1))
+ {
+ if (strlen((char *)datbuf) < count[0])
+@@ -10787,7 +10709,7 @@
+
+ /* Call PTwriteattr() */
+ /* ------------------ */
+- status = HE5_PTwriteattr(PointID, attrname, numbertype, count, tempbuf);
++ status = HE5_PTwriteattr(pointID, attrname, numbertype, count, tempbuf);
+ if( status == FAIL)
+ {
+ sprintf(errbuf,"Cannot write data to the attribute \"%s\".\n", attrname);
+@@ -10806,7 +10728,7 @@
+ {
+ /* Call PTwriteattr() */
+ /* ------------------ */
+- status = HE5_PTwriteattr(PointID, attrname, numbertype, count, datbuf);
++ status = HE5_PTwriteattr(pointID, attrname, numbertype, count, datbuf);
+ if( status == FAIL)
+ {
+ sprintf(errbuf,"Cannot write data to the attribute \"%s\".\n", attrname);
+@@ -10821,8 +10743,7 @@
+ free(errbuf);
+ }
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+
+ }
+
+@@ -10859,16 +10780,14 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTwritegrpattrF(int pointID, const char *attrname, int ntype, long fortcount[], void * datbuf)
++herr_t
++HE5_PTwritegrpattrF(hid_t pointID, const char *attrname, int ntype, long fortcount[], void * datbuf)
+ {
+- int ret = FAIL; /* (int) return status variable */
+ int rank = 1; /* Rank variable */
+ int i; /* Loop index */
+
+ herr_t status = FAIL; /* routine return status variable */
+
+- hid_t PointID = FAIL; /* HDF5 type Swath ID */
+ hid_t numbertype = FAIL; /* HDF5 data type ID */
+
+ hsize_t *count = (hsize_t *)NULL;/* Pointer to count array (C order) */
+@@ -10915,8 +10834,6 @@
+ for (i = 0; i < rank; i++)
+ count[i] = (hsize_t)fortcount[rank - 1 - i];
+
+- PointID = (hid_t)pointID;
+-
+ if ((numbertype == HE5T_CHARSTRING) || (numbertype == H5T_NATIVE_CHAR) || (numbertype == H5T_C_S1))
+ {
+ if (strlen((char *)datbuf) < count[0])
+@@ -10945,7 +10862,7 @@
+ strncpy(tempbuf, (char *)datbuf, count[0]);
+ tempbuf[count[0]] = '\0';
+
+- status = HE5_PTwritegrpattr(PointID, attrname, numbertype, count, tempbuf);
++ status = HE5_PTwritegrpattr(pointID, attrname, numbertype, count, tempbuf);
+ if(status == FAIL)
+ {
+ sprintf(errbuf,"Cannot write group attribute value.\n");
+@@ -10962,7 +10879,7 @@
+ }
+ else
+ {
+- status = HE5_PTwritegrpattr(PointID, attrname, numbertype, count, datbuf);
++ status = HE5_PTwritegrpattr(pointID, attrname, numbertype, count, datbuf);
+ if(status == FAIL)
+ {
+ sprintf(errbuf,"Cannot write group attribute value.\n");
+@@ -10976,8 +10893,7 @@
+ free(errbuf);
+ }
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+
+@@ -11014,10 +10930,9 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTwritelocattrF(int pointID, const char *levelname, const char *attrname, int ntype, long fortcount[],void * datbuf)
++herr_t
++HE5_PTwritelocattrF(hid_t pointID, const char *levelname, const char *attrname, int ntype, long fortcount[],void * datbuf)
+ {
+- int ret = FAIL; /* routine return status variable */
+ int rank = 1; /* Note: It is assumed that fortcout has just */
+ /* one element to agree with EHattr function */
+ int i = 0;
+@@ -11026,7 +10941,6 @@
+
+ hsize_t *count = (hsize_t *)NULL;/* Pointer to count array (C order) */
+
+- hid_t PointID = FAIL; /* Swath HDF5 type ID */
+ hid_t numbertype = FAIL; /* HDF5 dta type ID */
+
+ char *errbuf = (char *)NULL; /* error message buffer */
+@@ -11069,8 +10983,6 @@
+ for (i = 0; i < rank; i++)
+ count[i] = (hsize_t)fortcount[rank - 1 - i];
+
+- PointID = (hid_t)pointID;
+-
+ if ((numbertype == HE5T_CHARSTRING) || (numbertype == H5T_NATIVE_CHAR) || (numbertype == H5T_C_S1))
+ {
+ if (strlen((char *)datbuf) < count[0])
+@@ -11101,7 +11013,7 @@
+
+ /* Write local attribute buffer */
+ /* ---------------------------- */
+- status = HE5_PTwritelocattr(PointID, levelname, attrname, numbertype, count, tempbuf);
++ status = HE5_PTwritelocattr(pointID, levelname, attrname, numbertype, count, tempbuf);
+ if(status == FAIL)
+ {
+ sprintf(errbuf,"Cannot write local attribute value.\n");
+@@ -11120,7 +11032,7 @@
+ {
+ /* Write local attribute buffer */
+ /* ---------------------------- */
+- status = HE5_PTwritelocattr(PointID, levelname, attrname, numbertype, count, datbuf);
++ status = HE5_PTwritelocattr(pointID, levelname, attrname, numbertype, count, datbuf);
+ if(status == FAIL)
+ {
+ sprintf(errbuf,"Cannot write local attribute value.\n");
+@@ -11134,8 +11046,7 @@
+ free(errbuf);
+ }
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+
+ }
+
+@@ -11168,22 +11079,16 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTreadattrF(int pointID, const char *attrname, void *datbuf)
++herr_t
++HE5_PTreadattrF(hid_t pointID, const char *attrname, void *datbuf)
+ {
+- int ret = FAIL;/* routine return status variable */
+-
+ herr_t status = FAIL;/* routine return status variable */
+
+- hid_t PointID = FAIL;/* HDF-EOS point ID */
+-
+ char errbuf[HE5_HDFE_ERRBUFSIZE];/* Error message buffer */
+
+- PointID = (hid_t)pointID;
+-
+ /* Read the attribute buffer */
+ /* ------------------------- */
+- status = HE5_PTreadattr(PointID, attrname, datbuf);
++ status = HE5_PTreadattr(pointID, attrname, datbuf);
+ if ( status == FAIL )
+ {
+ sprintf(errbuf, "Cannot read the attribute value. \n");
+@@ -11191,8 +11096,7 @@
+ HE5_EHprint(errbuf, __FILE__, __LINE__);
+ }
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+
+@@ -11224,20 +11128,14 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTreadgrpattrF(int pointID, const char *attrname, void *datbuf)
++herr_t
++HE5_PTreadgrpattrF(hid_t pointID, const char *attrname, void *datbuf)
+ {
+- int ret = FAIL; /* (int) return status */
+-
+ herr_t status = FAIL; /* return status variable */
+
+- hid_t PointID = FAIL; /* HDF5 type Point ID */
+-
+ char errbuf[HE5_HDFE_ERRBUFSIZE]; /* Error message buffer */
+
+- PointID = (hid_t)pointID;
+-
+- status = HE5_PTreadgrpattr(PointID,attrname,datbuf);
++ status = HE5_PTreadgrpattr(pointID,attrname,datbuf);
+ if(status == FAIL)
+ {
+ sprintf(errbuf,"Cannot read Group Attribute \"%s\".\n", attrname);
+@@ -11245,8 +11143,7 @@
+ HE5_EHprint(errbuf, __FILE__, __LINE__);
+ }
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+
+@@ -11279,21 +11176,15 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTreadlocattrF(int pointID, const char *levelname, const char *attrname, void *datbuf)
++herr_t
++HE5_PTreadlocattrF(hid_t pointID, const char *levelname, const char *attrname, void *datbuf)
+ {
+- int ret = FAIL;/* return status variable */
+-
+ herr_t status = FAIL;/* return status variable */
+-
+- hid_t PointID = FAIL;/* HDF5 type Point ID */
+
+ char errbuf[HE5_HDFE_ERRBUFSIZE];/* Error message buffer */
+
+
+- PointID = (hid_t)pointID;
+-
+- status = HE5_PTreadlocattr( PointID, levelname, attrname, datbuf);
++ status = HE5_PTreadlocattr(pointID, levelname, attrname, datbuf);
+ if(status == FAIL)
+ {
+ sprintf(errbuf,"Cannot read Attribute \"%s\" associated wth the \"%s\" level.\n", attrname,levelname);
+@@ -11301,8 +11192,7 @@
+ HE5_EHprint(errbuf, __FILE__, __LINE__);
+ }
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+
+@@ -11337,12 +11227,11 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-static int
++static herr_t
+ HE5_PTc2fort(long dims[], int rank, int datatype, void *inputfortbuf, void *outputfortbuf)
+ {
+ herr_t status = FAIL;/* routine return status variable */
+
+- int ret = FAIL;/* (int) return status variable */
+ int i = 0;
+ int dim_index = 0;
+
+@@ -11568,9 +11457,8 @@
+ free(errbuf);
+
+ status = 0;
+- ret = (int)status;
+
+- return(ret);
++ return(status);
+ }
+
+ /*----------------------------------------------------------------------------|
+@@ -11604,12 +11492,11 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-static int
++static herr_t
+ HE5_PTfort2c(long dims[], int rank, int datatype, void *inputfortbuf, void *outputfortbuf)
+ {
+ herr_t status = FAIL;/* routine return status variable */
+
+- int ret = FAIL;/* (int) return status variable */
+ int i = 0;
+ int dim_index = 0;
+
+@@ -11832,9 +11719,7 @@
+ free(fort_order_buf);
+ free(errbuf);
+
+- ret = (int)status;
+-
+- return(ret);
++ return(status);
+ }
+
+ /*----------------------------------------------------------------------------|
+@@ -11878,12 +11763,11 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-static int
++static herr_t
+ HE5_PTgetfort_order(long *dims, int dim_index, long *c_index, int rank, long *P, long *coeffs, long *n)
+ {
+ herr_t status = FAIL;/* routine return status variable */
+
+- int ret = FAIL;/* (int) return status variable */
+ int i = 0;
+ int j = 0;
+ int k = 0;
+@@ -11954,8 +11838,7 @@
+ free(errbuf);
+
+ status = 0;
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+ /* Inquiry routines */
+@@ -11989,17 +11872,13 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTnrecsF(int pointID, int level)
++hsize_t
++HE5_PTnrecsF(hid_t pointID, int level)
+ {
+- hid_t PointID = FAIL;/* HDF5 type point ID */
+-
+ hsize_t nallrec = 0; /* Number of records in Point */
+
+ char *errbuf = (char *)NULL;/*Error message buffer */
+
+- PointID = (hid_t)pointID;
+-
+ /* Allocate memory for error buffer */
+ /* -------------------------------- */
+ errbuf = (char * )calloc( HE5_HDFE_ERRBUFSIZE, sizeof(char));
+@@ -12010,7 +11889,7 @@
+ return(FAIL);
+ }
+
+- nallrec = HE5_PTnrecs(PointID, level);
++ nallrec = HE5_PTnrecs(pointID, level);
+ if(nallrec == 0)
+ {
+ sprintf(errbuf, "No records in current level. \n");
+@@ -12019,7 +11898,7 @@
+ }
+
+ free(errbuf);
+- return((int)nallrec);
++ return(nallrec);
+ }
+
+
+@@ -12115,7 +11994,7 @@
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+ int
+-HE5_PTnfieldsF(int pointID, int level, char *fieldlist, long *strbufsize)
++HE5_PTnfieldsF(hid_t pointID, int level, char *fieldlist, long *strbufsize)
+ {
+ hid_t PointID = FAIL;/* HDF5 type point ID */
+
+@@ -12123,8 +12002,6 @@
+
+ char *errbuf = (char *)NULL;/*Error message buffer */
+
+- PointID = (hid_t)pointID;
+-
+ /* Allocate memory for error buffer */
+ /* -------------------------------- */
+ errbuf = (char * )calloc( HE5_HDFE_ERRBUFSIZE, sizeof(char));
+@@ -12137,7 +12014,7 @@
+
+ /* Get number of fields and fieldlist */
+ /* ---------------------------------- */
+- nfields = HE5_PTnfields(PointID, level, fieldlist, strbufsize);
++ nfields = HE5_PTnfields(pointID, level, fieldlist, strbufsize);
+ if(nfields == 0)
+ {
+ sprintf(errbuf, "Cannot retrieve the number of fields. \n");
+@@ -12180,16 +12057,12 @@
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+ int
+-HE5_PTlevelindxF(int pointID, const char *levelname)
++HE5_PTlevelindxF(hid_t pointID, const char *levelname)
+ {
+- hid_t PointID = FAIL;/* HDF5 type point ID */
+-
+ int index = FAIL;
+
+ char *errbuf = (char *)NULL;/*Error message buffer */
+
+- PointID = (hid_t)pointID;
+-
+ /* Allocate memory for error buffer */
+ /* -------------------------------- */
+ errbuf = (char * )calloc( HE5_HDFE_ERRBUFSIZE, sizeof(char));
+@@ -12200,11 +12073,9 @@
+ return(FAIL);
+ }
+
+- PointID = (hid_t)pointID;
+-
+ /* Get index of named Level */
+ /* ---------------------------------- */
+- index = HE5_PTlevelindx(PointID, levelname);
++ index = HE5_PTlevelindx(pointID, levelname);
+ if(index == FAIL)
+ {
+ sprintf(errbuf, "Cannot retrieve the Level Index. \n");
+@@ -12245,15 +12116,11 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTgetlevelnameF(int pointID, int level, char *levelname, long *strbufsize)
++herr_t
++HE5_PTgetlevelnameF(hid_t pointID, int level, char *levelname, long *strbufsize)
+ {
+- int ret = FAIL;
+-
+ herr_t status = FAIL;/* routine return status variable */
+
+- hid_t PointID = FAIL;
+-
+ char *errbuf = (char *)NULL;/*Error message buffer */
+
+
+@@ -12264,15 +12131,13 @@
+ {
+ H5Epush(__FILE__, "HE5_PTgetlevelnameF", __LINE__, H5E_RESOURCE, H5E_NOSPACE, "Cannot allocate memory to error buffer.");
+ HE5_EHprint("Error: Cannot allocate memory for error buffer, occured", __FILE__, __LINE__);
+- return(ret);
++ return(status);
+ }
+
+- PointID = (hid_t)pointID;
+-
+ /* Get index of named Level */
+ /* ---------------------------------- */
+
+- status = HE5_PTgetlevelname( PointID, level, levelname, strbufsize);
++ status = HE5_PTgetlevelname(pointID, level, levelname, strbufsize);
+ if(status == FAIL)
+ {
+ sprintf(errbuf, "Cannot retrieve the Level Name. \n");
+@@ -12281,8 +12146,7 @@
+ }
+
+ free(errbuf);
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+ /*----------------------------------------------------------------------------|
+@@ -12315,15 +12179,11 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTbcklinkinfoF(int pointID, int level, char *linkfield)
++herr_t
++HE5_PTbcklinkinfoF(hid_t pointID, int level, char *linkfield)
+ {
+- int ret = FAIL;
+-
+ herr_t status = FAIL;/* routine return status variable */
+
+- hid_t PointID = FAIL;/* HDF5 type point ID */
+-
+ char *errbuf = (char *)NULL;/*Error message buffer */
+
+
+@@ -12334,12 +12194,10 @@
+ {
+ H5Epush(__FILE__, "HE5_PTbcklinkinfoF", __LINE__, H5E_RESOURCE, H5E_NOSPACE, "Cannot allocate memory to error buffer.");
+ HE5_EHprint("Error: Cannot allocate memory for error buffer, occured", __FILE__, __LINE__);
+- return(ret);
++ return(status);
+ }
+
+- PointID = (hid_t)pointID;
+-
+- status = HE5_PTbcklinkinfo( PointID, level, linkfield);
++ status = HE5_PTbcklinkinfo(pointID, level, linkfield);
+ if(status == FAIL)
+ {
+ sprintf(errbuf, "Error in Fortran Wrapper HE5_PTbcklinkinfoF(). \n");
+@@ -12349,8 +12207,7 @@
+
+ free(errbuf);
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+ /*----------------------------------------------------------------------------|
+@@ -12383,15 +12240,11 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTfwdlinkinfoF(int pointID, int level, char *linkfield)
++herr_t
++HE5_PTfwdlinkinfoF(hid_t pointID, int level, char *linkfield)
+ {
+- int ret = FAIL;
+-
+ herr_t status = FAIL;/* routine return status variable */
+
+- hid_t PointID = FAIL;/* HDF5 type point ID */
+-
+ char *errbuf = (char *)NULL;/*Error message buffer */
+
+
+@@ -12402,12 +12255,10 @@
+ {
+ H5Epush(__FILE__, "HE5_PTfwdlinkinfoF", __LINE__, H5E_RESOURCE, H5E_NOSPACE, "Cannot allocate memory to error buffer.");
+ HE5_EHprint("Error: Cannot allocate memory for error buffer, occured", __FILE__, __LINE__);
+- return(ret);
++ return(status);
+ }
+
+- PointID = (hid_t)pointID;
+-
+- status = HE5_PTfwdlinkinfo( PointID, level, linkfield);
++ status = HE5_PTfwdlinkinfo(pointID, level, linkfield);
+ if(status == FAIL)
+ {
+ sprintf(errbuf, "Error in Fortran Wrapper HE5_PTfwdlinkinfoF(). \n");
+@@ -12416,8 +12267,7 @@
+ }
+
+ free(errbuf);
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+ /*----------------------------------------------------------------------------|
+@@ -12460,16 +12310,13 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTlevelinfoF(int pointID, int level, char *levelname, int rank[], char *fieldlist, long *dim_sizes, long *datasize, long offset[], int dtype[])
++herr_t
++HE5_PTlevelinfoF(hid_t pointID, int level, char *levelname, int rank[], char *fieldlist, long *dim_sizes, long *datasize, long offset[], hid_t dtype[])
+ {
+ herr_t status = FAIL;/* routine return status variable */
+-
+- hid_t PointID = FAIL;
+
+ HE5_CmpDTSinfo dtsinfo;
+
+- int ret = FAIL;/* (int) Return status variable */
+ int i, j, k = 0;
+ long nfields = FAIL;
+ long max_rank = 0;
+@@ -12478,12 +12325,9 @@
+ char errbuf[HE5_HDFE_ERRBUFSIZE]; /* error message buffer */
+
+
+- PointID = (hid_t)pointID;
+-
+-
+ /* Call HE5_PTlevelinfo to get information structure */
+ /* ------------------------------------------------- */
+- status = HE5_PTlevelinfo(PointID, level, &dtsinfo);
++ status = HE5_PTlevelinfo(pointID, level, &dtsinfo);
+ if (status == FAIL)
+ {
+ sprintf(errbuf, "Call to HE5_PTlevelinfo failed.\n");
+@@ -12505,7 +12349,7 @@
+
+ /* Get the levelname */
+ /* ----------------- */
+- status = HE5_PTgetlevelname(PointID, level, levelname, &strbufsize);
++ status = HE5_PTgetlevelname(pointID, level, levelname, &strbufsize);
+ if (status == FAIL)
+ {
+ sprintf(errbuf, "Call to HE5_PTgetlevelname failed.\n");
+@@ -12518,7 +12362,7 @@
+ {
+ rank[i] = dtsinfo.rank[i];
+ offset[i] = (long)dtsinfo.offset[i];
+- dtype[i] = (int)dtsinfo.dtype[i];
++ dtype[i] = dtsinfo.dtype[i];
+ }
+
+ /* Get fieldlist (output from HE5_PTnfields) */
+@@ -12548,8 +12392,7 @@
+ }
+ }
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+
+@@ -12586,17 +12429,14 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTinqdatatypeF(int pointID, char *fieldname, char *attrname, int fieldgroup, int *Type, int *Class, int *Order, long *size)
++herr_t
++HE5_PTinqdatatypeF(hid_t pointID, char *fieldname, char *attrname, int fieldgroup, hid_t *Type, H5T_class_t *Class, H5T_order_t *Order, size_t *size)
+ {
+- int ret = FAIL; /* (int) status variable */
+-
+ herr_t status = FAIL; /* return status variable */
+
+ size_t *tsize = (size_t *)NULL; /* data size variable */
+
+ hid_t *typeID = (hid_t *)NULL; /* HDF5 Data type ID */
+- hid_t PointID = FAIL; /* HDF5 type Point ID */
+
+ H5T_class_t *classID = (H5T_class_t *)NULL;/* Data type class ID */
+ H5T_order_t *order = (H5T_order_t *)NULL;/* Byte order of datatype */
+@@ -12667,11 +12507,9 @@
+ return(FAIL);
+ }
+
+- PointID = (hid_t)pointID;
+-
+ /* Get data type information */
+ /* ------------------------- */
+- status = HE5_PTinqdatatype(PointID, fieldname, attrname, fieldgroup, typeID, classID, order, tsize);
++ status = HE5_PTinqdatatype(pointID, fieldname, attrname, fieldgroup, typeID, classID, order, tsize);
+ if(status == FAIL)
+ {
+ sprintf(errbuf,"Cannot get information about data type.\n");
+@@ -12679,10 +12517,10 @@
+ HE5_EHprint(errbuf, __FILE__, __LINE__);
+ }
+
+- *Type = (int)(*typeID);
+- *Class = (int)(*classID);
+- *Order = (int)(*order);
+- *size = (long)(*tsize);
++ *Type = (*typeID);
++ *Class = (*classID);
++ *Order = (*order);
++ *size = (*tsize);
+
+ free(errbuf);
+ free(typeID);
+@@ -12690,8 +12528,7 @@
+ free(order);
+ free(tsize);
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+
+@@ -12723,11 +12560,9 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
++long
+ HE5_PTinqpointF(const char *filename, char *pointlist, long *strbufsize)
+ {
+- int npoint = FAIL;
+-
+ long nPoint = FAIL;/* Number of point structures in file (return) */
+
+ char errbuf[HE5_HDFE_ERRBUFSIZE];/* Error message buffer */
+@@ -12740,8 +12575,7 @@
+ HE5_EHprint(errbuf, __FILE__, __LINE__);
+ }
+
+- npoint = (int)nPoint;
+- return(npoint);
++ return(nPoint);
+ }
+
+ /*----------------------------------------------------------------------------|
+@@ -12775,17 +12609,13 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTattrinfoF(int pointID, const char *attrname, int *numbertype, long *fortcount)
++herr_t
++HE5_PTattrinfoF(hid_t pointID, const char *attrname, hid_t *numbertype, hsize_t *fortcount)
+ {
+- int ret = FAIL; /* (int) return status variable */
+-
+ herr_t status = FAIL; /* return status variable */
+
+ hid_t *ntype = (hid_t *)NULL; /* Data type class ID */
+
+- hid_t PointID = FAIL; /* HDF5 type Point ID */
+-
+ hsize_t *count = (hsize_t *)NULL; /* Pointer to count (C order) */
+
+ char *errbuf = (char *)NULL; /* error message buffer */
+@@ -12821,9 +12651,7 @@
+ return(FAIL);
+ }
+
+- PointID = (hid_t)pointID;
+-
+- status = HE5_PTattrinfo(PointID, attrname, ntype, count);
++ status = HE5_PTattrinfo(pointID, attrname, ntype, count);
+ if(status == FAIL)
+ {
+ sprintf(errbuf,"Cannot get information about attribute \"%s\".\n", attrname);
+@@ -12831,15 +12659,14 @@
+ HE5_EHprint(errbuf, __FILE__, __LINE__);
+ }
+
+- *fortcount = (long)(*count);
+- *numbertype = (int)(*ntype);
++ *fortcount = (*count);
++ *numbertype = (*ntype);
+
+ free(errbuf);
+ free(count);
+ free(ntype);
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+
+@@ -12875,17 +12702,13 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTattrinfoF2(int pointID, const char *attrname, int *numbertype, long *fortcount, long *fortsize)
++herr_t
++HE5_PTattrinfoF2(hid_t pointID, const char *attrname, hid_t *numbertype, hsize_t *fortcount, hsize_t *fortsize)
+ {
+- int ret = FAIL; /* (int) return status variable */
+-
+ herr_t status = FAIL; /* return status variable */
+
+ hid_t *ntype = (hid_t *)NULL; /* Data type class ID */
+
+- hid_t PointID = FAIL; /* HDF5 type Point ID */
+-
+ hsize_t *count = (hsize_t *)NULL; /* Pointer to count of array elements */
+
+ hsize_t *size = (hsize_t *)NULL; /* Pointer to size of array elements */
+@@ -12933,9 +12756,7 @@
+ return(FAIL);
+ }
+
+- PointID = (hid_t)pointID;
+-
+- status = HE5_PTattrinfo2(PointID, attrname, ntype, count, size);
++ status = HE5_PTattrinfo2(pointID, attrname, ntype, count, size);
+ if(status == FAIL)
+ {
+ sprintf(errbuf,"Cannot get information about attribute \"%s\".\n", attrname);
+@@ -12943,17 +12764,16 @@
+ HE5_EHprint(errbuf, __FILE__, __LINE__);
+ }
+
+- *fortcount = (long)(*count);
+- *fortsize = (long)(*size);
+- *numbertype = (int)(*ntype);
++ *fortcount = (*count);
++ *fortsize = (*size);
++ *numbertype = (*ntype);
+
+ free(errbuf);
+ free(count);
+ free(size);
+ free(ntype);
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+
+@@ -12990,17 +12810,13 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTgrpattrinfoF(int pointID, const char *attrname, int *numbertype, long *fortcount)
++herr_t
++HE5_PTgrpattrinfoF(hid_t pointID, const char *attrname, hid_t *numbertype, hsize_t *fortcount)
+ {
+- int ret = FAIL; /* (int) return status variable */
+-
+ herr_t status = FAIL; /* routine return status variable */
+
+ hid_t *ntype = (hid_t *)NULL; /* Data type class ID */
+
+- hid_t PointID = FAIL; /* HDF5 type Point ID */
+-
+ hsize_t *count = (hsize_t *)NULL;/* Pointer to count (C order) */
+
+ char *errbuf = (char *)NULL; /* error message buffer */
+@@ -13036,9 +12852,7 @@
+ return(FAIL);
+ }
+
+- PointID = (hid_t)pointID;
+-
+- status = HE5_PTgrpattrinfo(PointID, attrname, ntype, count);
++ status = HE5_PTgrpattrinfo(pointID, attrname, ntype, count);
+ if(status == FAIL)
+ {
+ sprintf(errbuf,"Cannot get information about group attribute.\n");
+@@ -13046,15 +12860,14 @@
+ HE5_EHprint(errbuf, __FILE__, __LINE__);
+ }
+
+- *fortcount = (long)(*count);
+- *numbertype = (int)(*ntype);
++ *fortcount = (*count);
++ *numbertype = (*ntype);
+
+ free(errbuf);
+ free(count);
+ free(ntype);
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+
+@@ -13092,17 +12905,13 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTgrpattrinfoF2(int pointID, const char *attrname, int *numbertype, long *fortcount, long *fortsize)
++herr_t
++HE5_PTgrpattrinfoF2(hid_t pointID, const char *attrname, hid_t *numbertype, hsize_t *fortcount, hsize_t *fortsize)
+ {
+- int ret = FAIL; /* (int) return status variable */
+-
+ herr_t status = FAIL; /* routine return status variable */
+
+ hid_t *ntype = (hid_t *)NULL; /* Data type class ID */
+
+- hid_t PointID = FAIL; /* HDF5 type Point ID */
+-
+ hsize_t *count = (hsize_t *)NULL; /* Pointer to count of array elements */
+
+ hsize_t *size = (hsize_t *)NULL; /* Pointer to size of array elements */
+@@ -13150,9 +12959,7 @@
+ return(FAIL);
+ }
+
+- PointID = (hid_t)pointID;
+-
+- status = HE5_PTgrpattrinfo2(PointID, attrname, ntype, count, size);
++ status = HE5_PTgrpattrinfo2(pointID, attrname, ntype, count, size);
+ if(status == FAIL)
+ {
+ sprintf(errbuf,"Cannot get information about group attribute.\n");
+@@ -13160,17 +12967,16 @@
+ HE5_EHprint(errbuf, __FILE__, __LINE__);
+ }
+
+- *fortcount = (long)(*count);
+- *fortsize = (long)(*size);
+- *numbertype = (int)(*ntype);
++ *fortcount = (*count);
++ *fortsize = (*size);
++ *numbertype = (*ntype);
+
+ free(errbuf);
+ free(count);
+ free(size);
+ free(ntype);
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+ /*----------------------------------------------------------------------------|
+@@ -13206,17 +13012,13 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTlocattrinfoF(int pointID, const char *levelname, const char *attrname, int *numbertype, long *fortcount)
++herr_t
++HE5_PTlocattrinfoF(hid_t pointID, const char *levelname, const char *attrname, hid_t *numbertype, hsize_t *fortcount)
+ {
+- int ret = FAIL; /* (int) return status variable */
+-
+ herr_t status = FAIL; /* routine return status variable */
+
+ hid_t *ntype = (hid_t *)NULL; /* Data type class ID */
+
+- hid_t PointID = FAIL; /* HDF5 type Point ID */
+-
+ hsize_t *count = (hsize_t *)NULL;/* Pointer to count (C order) */
+
+ char *errbuf = (char *)NULL; /* error message buffer */
+@@ -13252,9 +13054,7 @@
+ return(FAIL);
+ }
+
+- PointID = (hid_t)pointID;
+-
+- status = HE5_PTlocattrinfo(PointID, levelname, attrname, ntype, count);
++ status = HE5_PTlocattrinfo(pointID, levelname, attrname, ntype, count);
+ if(status == FAIL)
+ {
+ sprintf(errbuf,"Cannot get information about local attribute.\n");
+@@ -13262,16 +13062,14 @@
+ HE5_EHprint(errbuf, __FILE__, __LINE__);
+ }
+
+- *fortcount = (long)(*count);
+- *numbertype = (int)(*ntype);
++ *fortcount = (*count);
++ *numbertype = (*ntype);
+
+ free(errbuf);
+ free(count);
+ free(ntype);
+
+-
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+
+@@ -13309,17 +13107,13 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTlocattrinfoF2(int pointID, const char *levelname, const char *attrname, int *numbertype, long *fortcount, long *fortsize)
++herr_t
++HE5_PTlocattrinfoF2(hid_t pointID, const char *levelname, const char *attrname, hid_t *numbertype, hsize_t *fortcount, hsize_t *fortsize)
+ {
+- int ret = FAIL; /* (int) return status variable */
+-
+ herr_t status = FAIL; /* routine return status variable */
+
+ hid_t *ntype = (hid_t *)NULL; /* Data type class ID */
+
+- hid_t PointID = FAIL; /* HDF5 type Point ID */
+-
+ hsize_t *count = (hsize_t *)NULL; /* Pointer to count of array elements */
+
+ hsize_t *size = (hsize_t *)NULL; /* Pointer to size of array elements */
+@@ -13367,9 +13161,7 @@
+ return(FAIL);
+ }
+
+- PointID = (hid_t)pointID;
+-
+- status = HE5_PTlocattrinfo2(PointID, levelname, attrname, ntype, count, size);
++ status = HE5_PTlocattrinfo2(pointID, levelname, attrname, ntype, count, size);
+ if(status == FAIL)
+ {
+ sprintf(errbuf,"Cannot get information about local attribute.\n");
+@@ -13377,18 +13169,16 @@
+ HE5_EHprint(errbuf, __FILE__, __LINE__);
+ }
+
+- *fortcount = (long)(*count);
+- *fortsize = (long)(*size);
+- *numbertype = (int)(*ntype);
++ *fortcount = (*count);
++ *fortsize = (*size);
++ *numbertype = (*ntype);
+
+ free(errbuf);
+ free(count);
+ free(size);
+ free(ntype);
+
+-
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+
+@@ -13425,12 +13215,10 @@
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+ long
+-HE5_PTinqattrsF(int pointID, char *attrnames, long *strbufsize)
++HE5_PTinqattrsF(hid_t pointID, char *attrnames, long *strbufsize)
+ {
+ long nattr = FAIL;/* Number of attributes (return) */
+
+- hid_t PointID = FAIL;/* HDF5 type Point ID */
+-
+ char errbuf[HE5_HDFE_ERRBUFSIZE];/* Error message buffer */
+
+ char *attrnames_t = (char *)NULL;
+@@ -13439,8 +13227,6 @@
+
+ int result = 1;
+
+- PointID = (hid_t)pointID;
+-
+ /* Change Fortran character '0' to NULL if needed */
+ /* ---------------------------------------------- */
+ buffer1[0] = attrnames[0];
+@@ -13449,8 +13235,8 @@
+
+ if( memcmp(buffer1,buffer,sizeof(buffer)) == 0 ) { result = 0; }
+
+- if( result == 0 ) nattr = HE5_PTinqattrs(PointID, attrnames_t, strbufsize);
+- if( result != 0 ) nattr = HE5_PTinqattrs(PointID, attrnames, strbufsize);
++ if( result == 0 ) nattr = HE5_PTinqattrs(pointID, attrnames_t, strbufsize);
++ if( result != 0 ) nattr = HE5_PTinqattrs(pointID, attrnames, strbufsize);
+
+ if ( nattr < 0 )
+ {
+@@ -13499,12 +13285,10 @@
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+ long
+-HE5_PTinqgrpattrsF(int pointID, char *attrnames, long *strbufsize)
++HE5_PTinqgrpattrsF(hid_t pointID, char *attrnames, long *strbufsize)
+ {
+ long nattr = FAIL; /* Number of attributes (return) */
+
+- hid_t PointID = FAIL; /* HDF5 type swath ID */
+-
+ char errbuf[HE5_HDFE_ERRBUFSIZE];/* Error message buffer */
+
+ char *attrnames_t = (char *)NULL;
+@@ -13513,8 +13297,6 @@
+
+ int result = 1;
+
+- PointID = (hid_t)pointID;
+-
+ /* Change Fortran character '0' to NULL if needed */
+ /* ---------------------------------------------- */
+ buffer1[0] = attrnames[0];
+@@ -13523,8 +13305,8 @@
+
+ if( memcmp(buffer1,buffer,sizeof(buffer)) == 0 ) { result = 0; }
+
+- if( result == 0 ) nattr = HE5_PTinqgrpattrs(PointID, attrnames_t, strbufsize);
+- if( result != 0 ) nattr = HE5_PTinqgrpattrs(PointID, attrnames, strbufsize);
++ if( result == 0 ) nattr = HE5_PTinqgrpattrs(pointID, attrnames_t, strbufsize);
++ if( result != 0 ) nattr = HE5_PTinqgrpattrs(pointID, attrnames, strbufsize);
+ if ( nattr < 0 )
+ {
+ sprintf(errbuf, "Cannot retrieve the attributes. \n");
+@@ -13570,11 +13352,9 @@
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+ long
+-HE5_PTinqlocattrsF(int pointID, const char *levelname, char *attrnames, long *strbufsize)
++HE5_PTinqlocattrsF(hid_t pointID, const char *levelname, char *attrnames, long *strbufsize)
+ {
+ long nattr = FAIL; /* Number of attributes */
+-
+- hid_t PointID = FAIL; /* HDF5 type swath ID */
+
+ char errbuf[HE5_HDFE_ERRBUFSIZE];/* Error message buffer */
+ char *attrnames_t = (char *)NULL;
+@@ -13583,8 +13363,6 @@
+
+ int result = 1;
+
+- PointID = (hid_t)pointID;
+-
+ /* Change Fortran character '0' to NULL if needed */
+ /* ---------------------------------------------- */
+ buffer1[0] = attrnames[0];
+@@ -13593,8 +13371,8 @@
+
+ if( memcmp(buffer1,buffer,sizeof(buffer)) == 0 ) { result = 0; }
+
+- if( result == 0 ) nattr = HE5_PTinqlocattrs(PointID, levelname, attrnames_t, strbufsize);
+- if( result != 0 ) nattr = HE5_PTinqlocattrs(PointID, levelname, attrnames, strbufsize);
++ if( result == 0 ) nattr = HE5_PTinqlocattrs(pointID, levelname, attrnames_t, strbufsize);
++ if( result != 0 ) nattr = HE5_PTinqlocattrs(pointID, levelname, attrnames, strbufsize);
+ if ( nattr < 0 )
+ {
+ sprintf(errbuf, "Cannot retrieve the attributes. \n");
+@@ -13635,28 +13413,22 @@
+ | |
+ | END_PROLOG |
+ -----------------------------------------------------------------------------*/
+-int
+-HE5_PTnumtypeinfoF(int pointID, int level, int numtype[])
++herr_t
++HE5_PTnumtypeinfoF(hid_t pointID, int level, hid_t numtype[])
+ {
+ herr_t status = FAIL;/* routine return status variable */
+-
+- hid_t PointID = FAIL;/* HDF-EOS Point ID */
+
+ HE5_CmpDTSinfo dtsinfo;
+
+- int ret = FAIL;/* (int) Return status variable */
+ int i = 0;
+ long nfields = FAIL;/* Number of fields in the level*/
+
+ char errbuf[HE5_HDFE_ERRBUFSIZE]; /* error message buffer */
+
+
+- PointID = (hid_t)pointID;
+-
+-
+ /* Call HE5_PTlevelinfo to get information structure */
+ /* ------------------------------------------------- */
+- status = HE5_PTlevelinfo(PointID, level, &dtsinfo);
++ status = HE5_PTlevelinfo(pointID, level, &dtsinfo);
+ if (status == FAIL)
+ {
+ sprintf(errbuf, "Call to HE5_PTlevelinfo failed.\n");
+@@ -13669,11 +13441,10 @@
+
+ for( i = 0; i < nfields; i++ )
+ {
+- numtype[i] = (int)dtsinfo.numtype[i];
++ numtype[i] = dtsinfo.numtype[i];
+ }
+
+- ret = (int)status;
+- return(ret);
++ return(status);
+ }
+
+
--- hdfeos5/src/SWapi.c.orig 2019-12-10 16:45:34.831256606 +0100
+++ hdfeos5/src/SWapi.c 2019-12-10 16:45:38.444570365 +0100
@@ -2020,6 +2020,9 @@
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/hdf-eos5.git/commitdiff/d8a2c2e52aab7d187a373e7503c308d3ef29bb54
More information about the pld-cvs-commit
mailing list