[svn-r26417] Removed compiler warnings from HL. HDF5-237

Tested: h5committest
This commit is contained in:
Scot Breitenfeld 2015-03-10 14:02:41 -05:00
parent 89da5458b6
commit 04a3b2a458
24 changed files with 1198 additions and 1287 deletions

View File

@ -48,11 +48,9 @@ FILE * fort_header;
#define FFILE "H5fortran_types.f90"
/* Prototypes for the write routines */
void writeTypedef(const char* c_type, unsigned int size);
void writeFloatTypedef(const char* c_type, unsigned int size);
void writeTypedefDefault(unsigned int size);
void writeToFiles(const char* fortran_type, const char* c_type, int size, unsigned int kind);
void writeFloatToFiles(const char* fortran_type, const char* c_type, int size, unsigned int kind);
void writeTypedef(const char* c_typedef, const char* c_type, unsigned int size);
void writeTypedefDefault(const char* c_typedef, unsigned int size);
void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, unsigned int kind);
static void
initCfile(void)
@ -121,38 +119,23 @@ endFfile(void)
}
/* Define a c_int_x type in the C header */
void writeTypedef(const char* c_type, unsigned int size)
void writeTypedef(const char* c_typedef, const char* c_type, unsigned int size)
{
fprintf(c_header, "#define c_int_%u %s\n", size, c_type);
}
/* Define a c_float_x type in the C header */
void writeFloatTypedef(const char* c_type, unsigned int size)
{
fprintf(c_header, "#define c_float_%u %s\n", size, c_type);
fprintf(c_header, "#define c_%s_%u %s\n", c_typedef, size, c_type);
}
/* Call this function if there is no matching C type for sizes > 1 */
void writeTypedefDefault(unsigned int size)
void writeTypedefDefault(const char* c_typedef, unsigned int size)
{
assert(size %2 == 0);
fprintf(c_header, "typedef struct {c_int_%u a; c_int_%u b;} c_int_%u\n", size / 2, size / 2, size);
fprintf(c_header, "typedef struct {c_%s_%u a; c_%s_%u b;} c_%s_%u\n", c_typedef, size / 2, c_typedef, size / 2, c_typedef, size);
}
/* Create matching Fortran and C types by writing to both files */
void writeToFiles(const char* fortran_type, const char* c_type, int size, unsigned int kind)
void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, unsigned int kind)
{
fprintf(fort_header, " INTEGER, PARAMETER :: %s = %u\n", fortran_type, kind);
fprintf(c_header, "typedef c_int_%d %s;\n", size, c_type);
}
/* Create matching Fortran and C floating types by writing to both files */
void writeFloatToFiles(const char* fortran_type, const char* c_type, int size, unsigned int kind)
{
fprintf(fort_header, " INTEGER, PARAMETER :: %s = %u\n", fortran_type, kind);
fprintf(c_header, "typedef c_float_%d %s;\n", size, c_type);
fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type);
}
int main(void)
@ -180,68 +163,89 @@ int main(void)
#if defined H5_FORTRAN_HAS_INTEGER_1_KIND
if(sizeof(long long) == 1)
writeTypedef("long long", 1);
writeTypedef("int", "long long", 1);
else if(sizeof(long) == 1)
writeTypedef("long", 1);
writeTypedef("int", "long", 1);
else if(sizeof(int) == 1)
writeTypedef("int", 1);
writeTypedef("int", "int", 1);
else if(sizeof(short) == 1)
writeTypedef("short", 1);
writeTypedef("int", "short", 1);
else
writeTypedef("char", 1);
writeTypedef("int", "char", 1);
/* Actually, char is not necessarily one byte.
* But if char isn't, then nothing is, so this
* is as close as we can get. */
if(sizeof(size_t) == 1)
writeTypedef("size_t", "size_t", 1);
if(sizeof(hsize_t) == 1)
writeTypedef("hsize_t", "hsize_t", 1);
#endif /*H5_FORTRAN_HAS_INTEGER_1_KIND*/
#if defined H5_FORTRAN_HAS_INTEGER_2_KIND
if(sizeof(long long) == 2)
writeTypedef("long long", 2);
writeTypedef("int", "long long", 2);
else if(sizeof(long) == 2)
writeTypedef("long", 2);
writeTypedef("int", "long", 2);
else if(sizeof(int) == 2)
writeTypedef("int", 2);
writeTypedef("int", "int", 2);
else if(sizeof(short) == 2)
writeTypedef("short", 2);
writeTypedef("int", "short", 2);
else
writeTypedefDefault(2);
writeTypedefDefault("int",2);
if(sizeof(size_t) == 2)
writeTypedef("size_t", "size_t", 2);
if(sizeof(hsize_t) == 2)
writeTypedef("hsize_t", "hsize_t", 2);
#endif /*H5_FORTRAN_HAS_INTEGER_2_KIND*/
#if defined H5_FORTRAN_HAS_INTEGER_4_KIND
if(sizeof(long long) == 4)
writeTypedef("long long", 4);
writeTypedef("int", "long long", 4);
else if(sizeof(long) == 4)
writeTypedef("long", 4);
writeTypedef("int", "long", 4);
else if(sizeof(int) == 4)
writeTypedef("int", 4);
writeTypedef("int", "int", 4);
else if(sizeof(short) == 4)
writeTypedef("short", 4);
writeTypedef("int", "short", 4);
else
writeTypedefDefault(4);
writeTypedefDefault("int",4);
if(sizeof(size_t) == 4)
writeTypedef("size_t", "size_t", 4);
if(sizeof(hsize_t) == 4)
writeTypedef("hsize_t", "hsize_t", 4);
#endif /*H5_FORTRAN_HAS_INTEGER_4_KIND*/
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND
if(sizeof(long long) == 8)
writeTypedef("long long", 8);
writeTypedef("int", "long long", 8);
else if(sizeof(long) == 8)
writeTypedef("long", 8);
writeTypedef("int", "long", 8);
else if(sizeof(int) == 8)
writeTypedef("int", 8);
writeTypedef("int", "int", 8);
else if(sizeof(short) == 8)
writeTypedef("short", 8);
writeTypedef("int", "short", 8);
else
writeTypedefDefault(8);
writeTypedefDefault("int",8);
if(sizeof(size_t) == 8)
writeTypedef("size_t", "size_t", 8);
if(sizeof(hsize_t) == 8)
writeTypedef("hsize_t", "hsize_t", 8);
#endif /*H5_FORTRAN_HAS_INTEGER_8_KIND*/
/* Define c_float_x */
#if defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND || defined H5_FORTRAN_HAS_REAL_4_KIND
if(sizeof(long double) == 4)
writeFloatTypedef("long double", 4);
writeTypedef("float", "long double", 4);
else if(sizeof(double) == 4)
writeFloatTypedef("double", 4);
writeTypedef("float", "double", 4);
else if(sizeof(float) == 4)
writeFloatTypedef("float", 4);
writeTypedef("float", "float", 4);
else
{ printf("Fortran REAL is 4 bytes, no corresponding C floating type\n");
printf("Quitting....\n");
@ -251,11 +255,11 @@ int main(void)
#if defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND || defined H5_FORTRAN_HAS_REAL_8_KIND
if(sizeof(long double) == 8)
writeFloatTypedef("long double", 8);
writeTypedef("float", "long double", 8);
else if(sizeof(double) == 8)
writeFloatTypedef("double", 8);
writeTypedef("float", "double", 8);
else if(sizeof(float) == 8)
writeFloatTypedef("float", 8);
writeTypedef("float", "float", 8);
else
{ printf("Fortran REAL is 16 bytes, no corresponding C floating type\n");
printf("Quitting....\n");
@ -265,11 +269,11 @@ int main(void)
#if defined H5_FORTRAN_HAS_REAL_NATIVE_16_KIND || defined H5_FORTRAN_HAS_REAL_16_KIND
if(sizeof(long double) == 16)
writeFloatTypedef("long double", 16);
writeTypedef("float", "long double", 16);
else if(sizeof(double) == 16)
writeFloatTypedef("double", 16);
writeTypedef("float", "double", 16);
else if(sizeof(float) == 16)
writeFloatTypedef("float", 16);
writeTypedef("float", "float", 16);
else /*C has no 16 byte float so disable it in Fortran*/
{ printf("warning: Fortran REAL is 16 bytes, no corresponding C floating type\n");
printf(" Disabling Fortran 16 byte REALs\n");
@ -281,13 +285,13 @@ int main(void)
fprintf(c_header, "\n");
/* haddr_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HADDR_T >= 8
writeToFiles("HADDR_T", "haddr_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
writeToFiles("int","HADDR_T", "haddr_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HADDR_T >= 4
writeToFiles("HADDR_T", "haddr_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
writeToFiles("int","HADDR_T", "haddr_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HADDR_T >= 2
writeToFiles("HADDR_T", "haddr_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
writeToFiles("int","HADDR_T", "haddr_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HADDR_T >= 1
writeToFiles("HADDR_T", "haddr_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
writeToFiles("int","HADDR_T", "haddr_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#else
/* Error: couldn't find a size for haddr_t */
return -1;
@ -295,13 +299,13 @@ int main(void)
/* hsize_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HSIZE_T >= 8
writeToFiles("HSIZE_T", "hsize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HSIZE_T >= 4
writeToFiles("HSIZE_T", "hsize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HSIZE_T >= 2
writeToFiles("HSIZE_T", "hsize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HSIZE_T >= 1
writeToFiles("HSIZE_T", "hsize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#else
/* Error: couldn't find a size for hsize_t */
return -1;
@ -309,13 +313,13 @@ int main(void)
/* hssize_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HSSIZE_T >= 8
writeToFiles("HSSIZE_T", "hssize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
writeToFiles("int","HSSIZE_T", "hssize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HSSIZE_T >= 4
writeToFiles("HSSIZE_T", "hssize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
writeToFiles("int","HSSIZE_T", "hssize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HSSIZE_T >= 2
writeToFiles("HSSIZE_T", "hssize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
writeToFiles("int","HSSIZE_T", "hssize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HSSIZE_T >= 1
writeToFiles("HSSIZE_T", "hssize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
writeToFiles("int","HSSIZE_T", "hssize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#else
/* Error: couldn't find a size for hssize_t */
return -1;
@ -323,13 +327,13 @@ int main(void)
/* off_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_OFF_T >= 8
writeToFiles("OFF_T", "off_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
writeToFiles("int","OFF_T", "off_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_OFF_T >= 4
writeToFiles("OFF_T", "off_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
writeToFiles("int","OFF_T", "off_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_OFF_T >= 2
writeToFiles("OFF_T", "off_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
writeToFiles("int","OFF_T", "off_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_OFF_T >= 1
writeToFiles("OFF_T", "off_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
writeToFiles("int","OFF_T", "off_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#else
/* Error: couldn't find a size for off_t */
return -1;
@ -337,13 +341,13 @@ int main(void)
/* size_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_SIZE_T >= 8
writeToFiles("SIZE_T", "size_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
writeToFiles("size_t","SIZE_T", "size_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_SIZE_T >= 4
writeToFiles("SIZE_T", "size_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
writeToFiles("size_t","SIZE_T", "size_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_SIZE_T >= 2
writeToFiles("SIZE_T", "size_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
writeToFiles("size_t","SIZE_T", "size_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_SIZE_T >= 1
writeToFiles("SIZE_T", "size_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
writeToFiles("size_t","SIZE_T", "size_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#else
/* Error: couldn't find a size for size_t */
return -1;
@ -351,13 +355,13 @@ int main(void)
/* int */
#if defined H5_FORTRAN_HAS_NATIVE_8_KIND
writeToFiles("Fortran_INTEGER", "int_f", 8, H5_FORTRAN_HAS_NATIVE_8_KIND);
writeToFiles("int","Fortran_INTEGER", "int_f", 8, H5_FORTRAN_HAS_NATIVE_8_KIND);
#elif defined H5_FORTRAN_HAS_NATIVE_4_KIND
writeToFiles("Fortran_INTEGER", "int_f", 4, H5_FORTRAN_HAS_NATIVE_4_KIND);
writeToFiles("int","Fortran_INTEGER", "int_f", 4, H5_FORTRAN_HAS_NATIVE_4_KIND);
#elif defined H5_FORTRAN_HAS_NATIVE_2_KIND
writeToFiles("Fortran_INTEGER", "int_f", 2, H5_FORTRAN_HAS_NATIVE_2_KIND);
writeToFiles("int","Fortran_INTEGER", "int_f", 2, H5_FORTRAN_HAS_NATIVE_2_KIND);
#elif defined H5_FORTRAN_HAS_NATIVE_1_KIND
writeToFiles("Fortran_INTEGER", "int_f", 1, H5_FORTRAN_HAS_NATIVE_1_KIND);
writeToFiles("int","Fortran_INTEGER", "int_f", 1, H5_FORTRAN_HAS_NATIVE_1_KIND);
#else
/* Error: couldn't find a size for int */
return -1;
@ -397,7 +401,7 @@ int main(void)
{
sprintf(chrA, "Fortran_INTEGER_%d", FoundIntSize[i]);
sprintf(chrB, "int_%d_f", FoundIntSize[i]);
writeToFiles(chrA, chrB, FoundIntSize[i], FoundIntSizeKind[i]);
writeToFiles("int",chrA, chrB, FoundIntSize[i], FoundIntSizeKind[i]);
}
else /* Did not find the integer type */
{
@ -408,7 +412,7 @@ int main(void)
{
sprintf(chrA, "Fortran_INTEGER_%d", (-1)*FoundIntSize[i]);
sprintf(chrB, "int_%d_f", (-1)*FoundIntSize[i]);
writeToFiles(chrA, chrB, FoundIntSize[j], FoundIntSizeKind[j]);
writeToFiles("int",chrA, chrB, FoundIntSize[j], FoundIntSizeKind[j]);
flag = 1;
break;
}
@ -421,7 +425,7 @@ int main(void)
{
sprintf(chrA, "Fortran_INTEGER_%d", (-1)*FoundIntSize[i]);
sprintf(chrB, "int_%d_f", (-1)*FoundIntSize[i]);
writeToFiles(chrA, chrB, FoundIntSize[j], FoundIntSizeKind[j]);
writeToFiles("int",chrA, chrB, FoundIntSize[j], FoundIntSizeKind[j]);
flag = 1;
break;
}
@ -464,7 +468,7 @@ int main(void)
{
sprintf(chrA, "Fortran_REAL_%d", FoundRealSize[i]);
sprintf(chrB, "real_%d_f", FoundRealSize[i]);
writeFloatToFiles(chrA, chrB, FoundRealSize[i], FoundRealSizeKind[i]);
writeToFiles("float",chrA, chrB, FoundRealSize[i], FoundRealSizeKind[i]);
}
else /* Did not find the real type */
{
@ -476,11 +480,11 @@ int main(void)
sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]);
sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]);
if(FoundRealSize[j]>4) {
writeFloatToFiles(chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]);
writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]);
flag = 1;
}
/* else { */
/* writeFloatToFiles(chrA, chrB, FoundRealSize[j]); */
/* writeToFiles("float", chrA, chrB, FoundRealSize[j]); */
/* } */
flag = 1;
break;
@ -495,9 +499,9 @@ int main(void)
sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]);
sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]);
if(FoundRealSize[j]>4)
writeFloatToFiles(chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]);
writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]);
/* else { */
/* writeFloatToFiles(chrA, chrB, FoundRealSize[j]); */
/* writeToFiles("float", chrA, chrB, FoundRealSize[j]); */
/* } */
flag = 1;
break;
@ -511,15 +515,15 @@ int main(void)
/* hid_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HID_T >= 8
writeToFiles("HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
writeToFiles("int","HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HID_T >= 4
writeToFiles("HID_T", "hid_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
writeToFiles("int","HID_T", "hid_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HID_T >= 2
writeToFiles("HID_T", "hid_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
writeToFiles("int","HID_T", "hid_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HID_T >= 1
writeToFiles("HID_T", "hid_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
writeToFiles("int","HID_T", "hid_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HID_T >= 4
writeToFiles("HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
writeToFiles("int","HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#else
/* Error: couldn't find a size for hid_t */
return -1;
@ -528,12 +532,12 @@ int main(void)
/* real_f */
#if defined H5_FORTRAN_HAS_REAL_NATIVE_16_KIND
if(H5_C_HAS_REAL_NATIVE_16 != 0) {
writeFloatToFiles("Fortran_REAL", "real_f", 16, H5_FORTRAN_HAS_REAL_NATIVE_16_KIND);
writeToFiles("float","Fortran_REAL", "real_f", 16, H5_FORTRAN_HAS_REAL_NATIVE_16_KIND);
}
#elif defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND
writeFloatToFiles("Fortran_REAL", "real_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND);
writeToFiles("float", "Fortran_REAL", "real_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND);
#elif defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND
writeFloatToFiles("Fortran_REAL", "real_f", 4, H5_FORTRAN_HAS_REAL_NATIVE_4_KIND);
writeToFiles("float", "Fortran_REAL", "real_f", 4, H5_FORTRAN_HAS_REAL_NATIVE_4_KIND);
#else
/* Error: couldn't find a size for real_f */
return -1;
@ -542,13 +546,13 @@ int main(void)
/* double_f */
#if defined H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND
if(H5_C_HAS_REAL_NATIVE_16 != 0) { /* Check if C has 16 byte floats */
writeFloatToFiles("Fortran_DOUBLE", "double_f", 16, H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND);
writeToFiles("float", "Fortran_DOUBLE", "double_f", 16, H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND);
} else {
#if defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND /* Fall back to 8 byte floats */
writeFloatToFiles("Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND);
writeToFiles("float", "Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND);
}
#elif defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND /* Fall back to 4 byte floats */
writeFloatToFiles("Fortran_DOUBLE", "double_f", 4, H5_FORTRAN_HAS_REAL_NATIVE_4_KIND);
writeToFiles("float", "Fortran_DOUBLE", "double_f", 4, H5_FORTRAN_HAS_REAL_NATIVE_4_KIND);
}
#else
/* Error: couldn't find a size for double_f when fortran has 16 byte reals */
@ -557,7 +561,7 @@ int main(void)
#endif
#elif defined H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND
writeFloatToFiles("Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND);
writeToFiles("float", "Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND);
#else
/* Error: couldn't find a size for real_f */
return -1;

View File

@ -35,7 +35,7 @@
*-------------------------------------------------------------------------
*/
int_f
nh5dsset_scale_c(hid_t_f *dsid, _fcd dimname, int_f *dimnamelen)
nh5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen)
{
char *c_dimname = NULL;
int_f ret_value = 0;
@ -217,7 +217,7 @@ nh5dsis_scale_c( hid_t_f *did, int_f *is_scale)
*-------------------------------------------------------------------------
*/
int_f
nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, int_f *labellen)
nh5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen)
{
char *c_label = NULL;
int_f ret_value = 0;
@ -269,14 +269,14 @@ nh5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size)
/*
* Allocate buffer to hold label
*/
if ((c_label = HDmalloc((size_t)*size + 1)) == NULL)
if ((c_label = (char *)HDmalloc((size_t)*size + 1)) == NULL)
HGOTO_DONE(FAIL);
/*
* call H5DSget_label function.
*/
if( (size_c = (size_t_f)H5DSget_label( (hid_t)*did, (unsigned)*idx, c_label, (size_t)*size+1)) < 0)
if( (size_c = H5DSget_label( (hid_t)*did, (unsigned)*idx, c_label, (size_t)*size+1)) < 0)
HGOTO_DONE(FAIL)
/*
@ -287,7 +287,7 @@ nh5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size)
done:
*size = (size_t_f)size_c; /* Don't subtract '1' because H5DSget_label doesn't include the
* trailing NULL in the length calculation, Ref. HDFFV-7596 */
* trailing NULL in the length calculation, Ref. HDFFV-7596 */
if(c_label) HDfree(c_label);
return ret_value;
@ -318,14 +318,14 @@ nh5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size)
/*
* Allocate buffer to hold name
*/
if ((c_scale_name = HDmalloc((size_t)*size + 1)) == NULL)
if ((c_scale_name = (char *)HDmalloc((size_t)*size + 1)) == NULL)
HGOTO_DONE(FAIL);
/*
* call H5DSget_scale_name function.
*/
if( (size_c = (size_t_f)H5DSget_scale_name( (hid_t)*did, c_scale_name, (size_t)*size+1)) < 0)
if( (size_c = H5DSget_scale_name( (hid_t)*did, c_scale_name, (size_t)*size+1)) < 0)
HGOTO_DONE(FAIL)
/*

View File

@ -57,7 +57,7 @@ CONTAINS
CHARACTER(LEN=*), INTENT(in), OPTIONAL :: dimname ! The dimension name
INTEGER :: errcode ! Error code
INTEGER:: dimname_len ! length of dimname (if present)
INTEGER(SIZE_T) :: dimname_len ! length of dimname (if present)
INTERFACE
INTEGER FUNCTION H5DSset_scale_c(dsid, dimname, dimname_len )
@ -70,7 +70,7 @@ CONTAINS
!DEC$ATTRIBUTES reference :: dimname
INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale
CHARACTER(LEN=*), INTENT(in) :: dimname ! The dimension name
INTEGER, INTENT(in) :: dimname_len
INTEGER(SIZE_T), INTENT(in) :: dimname_len
END FUNCTION H5DSset_scale_c
END INTERFACE
@ -78,7 +78,7 @@ CONTAINS
dimname_len = LEN(dimname)
errcode = H5DSset_scale_c(dsid, dimname, dimname_len )
ELSE
errcode = H5DSset_scale_c(dsid, " ", 0 )
errcode = H5DSset_scale_c(dsid, " ", INT(0,SIZE_T) )
ENDIF
END SUBROUTINE H5DSset_scale_f
@ -348,7 +348,7 @@ CONTAINS
CHARACTER(LEN=*), INTENT(in) :: label ! The label
INTEGER :: errcode ! Error code
INTEGER :: label_len ! Length of label
INTEGER(SIZE_T) :: label_len ! Length of label
INTEGER :: c_idx
INTERFACE
@ -363,7 +363,7 @@ CONTAINS
INTEGER(hid_t), INTENT(in) :: did ! The dataset
INTEGER , INTENT(in) :: idx ! The dimension
CHARACTER(LEN=*), INTENT(in) :: label ! The label
INTEGER, INTENT(in) :: label_len ! Length of label
INTEGER(SIZE_T), INTENT(in) :: label_len ! Length of label
END FUNCTION H5DSset_label_c
END INTERFACE

View File

@ -470,7 +470,7 @@ herr_t H5IM_get_palette(hid_t loc_id,
hid_t attr_space_id;
hid_t attr_class;
hssize_t n_refs;
hsize_t dim_ref;
size_t dim_ref;
hobj_ref_t *refbuf; /* buffer to read references */
hid_t pal_id;
@ -503,9 +503,9 @@ herr_t H5IM_get_palette(hid_t loc_id,
n_refs = H5Sget_simple_extent_npoints(attr_space_id);
dim_ref = n_refs;
dim_ref = (size_t)n_refs;
refbuf = HDmalloc(sizeof(hobj_ref_t) * (int)dim_ref);
refbuf = (hobj_ref_t *)HDmalloc(sizeof(hobj_ref_t) * dim_ref);
if(H5Aread(attr_id, attr_type, refbuf) < 0)
goto out;

View File

@ -40,7 +40,7 @@
int_f
nh5immake_image_8bit_c (hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
hsize_t_f *width,
hsize_t_f *height,
@ -50,15 +50,13 @@ nh5immake_image_8bit_c (hid_t_f *loc_id,
herr_t ret;
hid_t c_loc_id;
char *c_name = NULL;
int c_namelen;
hsize_t w = (hsize_t)*width;
hsize_t h = (hsize_t)*height;
/*
* convert FORTRAN name to C name
*/
c_namelen = (int)*namelen;
c_name = (char *)HD5f2cstring(name, c_namelen);
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
@ -103,30 +101,25 @@ done:
int_f
nh5imread_image_c (hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *buf)
{
int ret_value = -1;
herr_t ret;
hid_t c_loc_id;
char *c_name = NULL;
int c_namelen;
/*
* convert FORTRAN name to C name
*/
c_namelen = (int)*namelen;
c_name = (char *)HD5f2cstring(name, c_namelen);
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
/*
* call H5IMread_image function.
*/
c_loc_id = (hid_t)*loc_id;
ret = H5IMread_imagef(c_loc_id,c_name,buf);
ret = H5IMread_imagef((hid_t)*loc_id,c_name,buf);
if (ret < 0)
goto done;
@ -161,9 +154,9 @@ done:
int_f
nh5immake_image_24bit_c (hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *ilen,
size_t_f *ilen,
_fcd il,
hsize_t_f *width,
hsize_t_f *height,
@ -173,22 +166,18 @@ nh5immake_image_24bit_c (hid_t_f *loc_id,
herr_t ret;
hid_t c_loc_id;
char *c_name = NULL;
int c_namelen;
char *c_il = NULL;
int c_ilen;
hsize_t w = (hsize_t)*width;
hsize_t h = (hsize_t)*height;
/*
* convert FORTRAN name to C name
*/
c_namelen = *namelen;
c_name = (char *)HD5f2cstring(name, c_namelen);
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
c_ilen = *ilen;
c_il = (char *)HD5f2cstring(il, c_ilen);
c_il = (char *)HD5f2cstring(il, (size_t)*ilen);
if (c_il == NULL)
goto done;
@ -197,7 +186,7 @@ nh5immake_image_24bit_c (hid_t_f *loc_id,
*/
c_loc_id = (hid_t)*loc_id;
ret = H5IMmake_image_24bitf(c_loc_id,c_name,w,h,c_il,buf);
ret = H5IMmake_image_24bitf(c_loc_id,c_name,w,h,c_il,(int_f *)buf);
if (ret < 0)
goto done;
@ -234,20 +223,19 @@ done:
int_f
nh5imget_image_info_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
hsize_t_f *width,
hsize_t_f *height,
hsize_t_f *planes,
hsize_t_f *npals,
int_f *ilen,
size_t_f *ilen,
_fcd interlace)
{
int ret_value = -1;
herr_t ret;
hid_t c_loc_id;
char *c_name = NULL;
int c_namelen;
hsize_t c_width;
hsize_t c_height;
hsize_t c_planes;
@ -257,15 +245,14 @@ nh5imget_image_info_c(hid_t_f *loc_id,
/*
* convert FORTRAN name to C name
*/
c_namelen = *namelen;
c_name = (char *)HD5f2cstring(name, c_namelen);
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
/*
* allocate buffer to hold name of an attribute
*/
if ((c_buf = HDmalloc((size_t)*ilen +1)) == NULL)
if ((c_buf = (char *)HDmalloc((size_t)*ilen +1)) == NULL)
goto done;
/*
@ -321,19 +308,17 @@ done:
int_f
nh5imis_image_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name)
{
hid_t c_loc_id;
char *c_name = NULL;
int c_namelen;
herr_t ret;
/*
* convert FORTRAN name to C name
*/
c_namelen = *namelen;
c_name = (char *)HD5f2cstring(name, c_namelen);
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL) return -1;
/*
@ -372,7 +357,7 @@ nh5imis_image_c(hid_t_f *loc_id,
int_f
nh5immake_palette_c (hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
hsize_t_f *dims,
void *buf)
@ -386,16 +371,16 @@ nh5immake_palette_c (hid_t_f *loc_id,
/*
* convert FORTRAN name to C name
*/
if(NULL == (c_name = (char *)HD5f2cstring(name, (int)*namelen)))
if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL)
for(i = 0; i < rank ; i++)
c_dims[i] = dims[i];
c_dims[i] = (hsize_t)dims[i];
/*
* call H5IMmake_palette function.
*/
if(H5IMmake_palettef((hid_t)*loc_id, c_name, c_dims, buf) < 0)
if(H5IMmake_palettef((hid_t)*loc_id, c_name, c_dims, (int_f *)buf) < 0)
HGOTO_DONE(FAIL)
done:
@ -427,9 +412,9 @@ done:
int_f
nh5imlink_palette_c (hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *ilen,
size_t_f *ilen,
_fcd pal_name)
{
int ret_value = -1;
@ -437,19 +422,15 @@ nh5imlink_palette_c (hid_t_f *loc_id,
hid_t c_loc_id;
char *c_name = NULL;
char *c_namepal = NULL;
int c_namelen;
int c_namelenpal;
/*
* convert FORTRAN name to C name
*/
c_namelen = *namelen;
c_name = (char *)HD5f2cstring(name, c_namelen);
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
c_namelenpal = *ilen;
c_namepal = (char *)HD5f2cstring(pal_name, c_namelenpal);
c_namepal = (char *)HD5f2cstring(pal_name, (size_t)*ilen);
if (c_namepal == NULL)
goto done;
@ -496,9 +477,9 @@ done:
int_f
nh5imunlink_palette_c (hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *ilen,
size_t_f *ilen,
_fcd pal_name)
{
int ret_value = -1;
@ -506,20 +487,15 @@ nh5imunlink_palette_c (hid_t_f *loc_id,
hid_t c_loc_id;
char *c_name = NULL;
char *c_namepal = NULL;
int c_namelen;
int c_namelenpal;
/*
* convert FORTRAN name to C name
*/
c_namelen = *namelen;
c_name = (char *)HD5f2cstring(name, c_namelen);
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
c_namelenpal = *ilen;
c_namepal = (char *)HD5f2cstring(pal_name, c_namelenpal);
c_namepal = (char *)HD5f2cstring(pal_name, (size_t)*ilen);
if (c_namepal == NULL)
goto done;
@ -567,7 +543,7 @@ done:
int_f
nh5imget_npalettes_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
hsize_t_f *npals)
{
@ -575,14 +551,12 @@ nh5imget_npalettes_c(hid_t_f *loc_id,
herr_t ret;
hid_t c_loc_id;
char *c_name = NULL;
int c_namelen;
hssize_t c_npals;
/*
* convert FORTRAN name to C name
*/
c_namelen = *namelen;
c_name = (char *)HD5f2cstring(name, c_namelen);
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
@ -631,7 +605,7 @@ done:
int_f
nh5imget_palette_info_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *pal_number,
hsize_t_f *dims)
@ -640,15 +614,13 @@ nh5imget_palette_info_c(hid_t_f *loc_id,
herr_t ret;
hid_t c_loc_id;
char *c_name = NULL;
int c_namelen;
hsize_t c_dims[2];
int i;
/*
* convert FORTRAN name to C name
*/
c_namelen = *namelen;
c_name = (char *)HD5f2cstring(name, c_namelen);
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
@ -700,7 +672,7 @@ done:
int_f
nh5imget_palette_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *pal_number,
void *buf)
@ -709,13 +681,11 @@ nh5imget_palette_c(hid_t_f *loc_id,
herr_t ret;
hid_t c_loc_id;
char *c_name = NULL;
int c_namelen;
/*
* convert FORTRAN name to C name
*/
c_namelen = *namelen;
c_name = (char *)HD5f2cstring(name, c_namelen);
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL)
goto done;
@ -724,7 +694,7 @@ nh5imget_palette_c(hid_t_f *loc_id,
*/
c_loc_id = (hid_t)*loc_id;
ret = H5IMget_palettef(c_loc_id,c_name,*pal_number,buf);
ret = H5IMget_palettef(c_loc_id,c_name,*pal_number,(int_f *)buf);
if (ret < 0)
goto done;
@ -760,19 +730,17 @@ done:
int_f
nh5imis_palette_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name)
{
hid_t c_loc_id;
char *c_name;
int c_namelen;
herr_t ret;
/*
* convert FORTRAN name to C name
*/
c_namelen = *namelen;
c_name = (char *)HD5f2cstring(name, c_namelen);
c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL) return -1;
/*

View File

@ -62,7 +62,7 @@ subroutine h5immake_image_8bit_f(loc_id,&
integer(hsize_t), intent(in) :: height ! height of image
integer, intent(in), dimension(*) :: buf ! buffer
integer :: errcode ! error code
integer :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
interface
integer function h5immake_image_8bit_c(loc_id,namelen,dset_name,width,height,buf)
@ -73,11 +73,11 @@ subroutine h5immake_image_8bit_f(loc_id,&
!DEC$ENDIF
!DEC$ATTRIBUTES reference :: dset_name
integer(hid_t), intent(in) :: loc_id ! file or group identifier
integer :: namelen ! lenght of name buffer
integer(size_t) :: namelen ! length of name buffer
character(len=*), intent(in) :: dset_name ! name of the dataset
integer(hsize_t), intent(in) :: width ! width of image
integer(hsize_t), intent(in) :: height ! height of image
integer , intent(in), dimension(*) :: buf ! buffer
integer , intent(in), dimension(*) :: buf ! buffer
end function h5immake_image_8bit_c
end interface
@ -123,7 +123,7 @@ subroutine h5imread_image_f(loc_id,&
character(len=*), intent(in) :: dset_name ! name of the dataset
integer, intent(inout), dimension(*) :: buf ! buffer
integer :: errcode ! error code
integer :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
interface
integer function h5imread_image_c(loc_id,namelen,dset_name,buf)
@ -134,7 +134,7 @@ subroutine h5imread_image_f(loc_id,&
!DEC$ENDIF
!DEC$ATTRIBUTES reference :: dset_name
integer(hid_t), intent(in) :: loc_id ! file or group identifier
integer :: namelen ! lenght of name buffer
integer(size_t) :: namelen ! length of name buffer
character(len=*), intent(in) :: dset_name ! name of the dataset
integer, intent(inout), dimension(*) :: buf ! buffer
end function h5imread_image_c
@ -187,8 +187,8 @@ subroutine h5immake_image_24bit_f(loc_id,&
character(len=*), intent(in) :: il ! interlace
integer, intent(in), dimension(*) :: buf ! buffer
integer :: errcode ! error code
integer :: namelen ! name length
integer :: ilen ! name length
INTEGER(size_t) :: namelen ! name length
integer(size_t) :: ilen ! name length
interface
integer function h5immake_image_24bit_c(loc_id,namelen,dset_name,ilen,il,width,height,buf)
@ -205,8 +205,8 @@ subroutine h5immake_image_24bit_f(loc_id,&
integer(hsize_t), intent(in) :: height ! height of image
character(len=*), intent(in) :: il ! interlace
integer, intent(in), dimension(*) :: buf ! buffer
integer :: namelen ! lenght of name buffer
integer :: ilen ! name length
integer(size_t) :: namelen ! length of name buffer
integer(size_t) :: ilen ! name length
end function h5immake_image_24bit_c
end interface
@ -262,8 +262,8 @@ subroutine h5imget_image_info_f(loc_id,&
integer(hsize_t), intent(inout) :: npals ! palettes
character(len=*), intent(inout) :: interlace ! interlace
integer :: errcode ! error code
integer :: namelen ! name length
integer :: ilen ! name length
integer(size_t) :: namelen ! name length
integer(size_t) :: ilen ! name length
interface
integer function h5imget_image_info_c(loc_id,namelen,dset_name,width,height,planes,npals,ilen,interlace)
@ -281,8 +281,8 @@ subroutine h5imget_image_info_f(loc_id,&
integer(hsize_t), intent(inout) :: planes ! color planes
integer(hsize_t), intent(inout) :: npals ! palettes
character(len=*), intent(inout) :: interlace ! interlace
integer :: namelen ! name length
integer :: ilen ! name length
integer(size_t) :: namelen ! name length
integer(size_t) :: ilen ! name length
end function h5imget_image_info_c
end interface
@ -325,7 +325,7 @@ integer function h5imis_image_f(loc_id,&
integer(hid_t), intent(in) :: loc_id ! file or group identifier
character(len=*), intent(in) :: dset_name ! name of the dataset
integer :: errcode ! error code
integer :: namelen ! name length
integer(size_t) :: namelen ! name length
interface
integer function h5imis_image_c(loc_id,namelen,dset_name)
@ -336,7 +336,7 @@ integer function h5imis_image_f(loc_id,&
!DEC$ENDIF
!DEC$ATTRIBUTES reference :: dset_name
integer(hid_t), intent(in) :: loc_id ! file or group identifier
integer :: namelen ! lenght of name buffer
integer(size_t) :: namelen ! length of name buffer
character(len=*), intent(in) :: dset_name ! name of the dataset
end function h5imis_image_c
end interface
@ -385,7 +385,7 @@ subroutine h5immake_palette_f(loc_id,&
integer(hsize_t), intent(in), dimension(*) :: pal_dims ! dimensions
integer, intent(in), dimension(*) :: buf ! buffer
integer :: errcode ! error code
integer :: namelen ! name length
integer(size_t) :: namelen ! name length
interface
integer function h5immake_palette_c(loc_id,namelen,dset_name,pal_dims,buf)
@ -396,7 +396,7 @@ subroutine h5immake_palette_f(loc_id,&
!DEC$ENDIF
!DEC$ATTRIBUTES reference :: dset_name
integer(hid_t), intent(in) :: loc_id ! file or group identifier
integer :: namelen ! lenght of name buffer
integer(size_t) :: namelen ! length of name buffer
character(len=*), intent(in) :: dset_name ! name of the dataset
integer(hsize_t), intent(in), dimension(*) :: pal_dims ! dimensions
integer, intent(in), dimension(*) :: buf ! buffer
@ -444,8 +444,8 @@ subroutine h5imlink_palette_f(loc_id,&
character(len=*), intent(in) :: dset_name ! name of the dataset
character(len=*), intent(in) :: pal_name ! palette name
integer :: errcode ! error code
integer :: namelen ! name length
integer :: ilen ! name length
integer(size_t) :: namelen ! name length
integer(size_t) :: ilen ! name length
interface
integer function h5imlink_palette_c(loc_id,namelen,dset_name,ilen,pal_name)
@ -459,8 +459,8 @@ subroutine h5imlink_palette_f(loc_id,&
integer(hid_t), intent(in) :: loc_id ! file or group identifier
character(len=*), intent(in) :: dset_name ! name of the dataset
character(len=*), intent(in) :: pal_name ! palette name
integer :: namelen ! name length
integer :: ilen ! name length
integer(size_t) :: namelen ! name length
integer(size_t) :: ilen ! name length
end function h5imlink_palette_c
end interface
@ -507,8 +507,8 @@ subroutine h5imunlink_palette_f(loc_id,&
character(len=*), intent(in) :: dset_name ! name of the dataset
character(len=*), intent(in) :: pal_name ! palette name
integer :: errcode ! error code
integer :: namelen ! name length
integer :: ilen ! name length
integer(size_t) :: namelen ! name length
integer(size_t) :: ilen ! name length
interface
integer function h5imunlink_palette_c(loc_id,namelen,dset_name,ilen,pal_name)
@ -522,8 +522,8 @@ subroutine h5imunlink_palette_f(loc_id,&
integer(hid_t), intent(in) :: loc_id ! file or group identifier
character(len=*), intent(in) :: dset_name ! name of the dataset
character(len=*), intent(in) :: pal_name ! palette name
integer :: namelen ! name length
integer :: ilen ! name length
integer(size_t) :: namelen ! name length
integer(size_t) :: ilen ! name length
end function h5imunlink_palette_c
end interface
@ -570,7 +570,7 @@ subroutine h5imget_npalettes_f(loc_id,&
character(len=*), intent(in) :: dset_name ! name of the dataset
integer(hsize_t), intent(inout) :: npals ! palettes
integer :: errcode ! error code
integer :: namelen ! name length
integer(size_t) :: namelen ! name length
interface
integer function h5imget_npalettes_c(loc_id,namelen,dset_name,npals)
@ -583,7 +583,7 @@ subroutine h5imget_npalettes_f(loc_id,&
integer(hid_t), intent(in) :: loc_id ! file or group identifier
character(len=*), intent(in) :: dset_name ! name of the dataset
integer(hsize_t), intent(inout) :: npals ! palettes
integer :: namelen ! name length
integer(size_t) :: namelen ! name length
end function h5imget_npalettes_c
end interface
@ -631,7 +631,7 @@ subroutine h5imget_palette_info_f(loc_id,&
integer, intent(in) :: pal_number ! palette number
integer(hsize_t), dimension(*), intent(inout) :: dims ! dimensions
integer :: errcode ! error code
integer :: namelen ! name length
integer(size_t) :: namelen ! name length
interface
integer function h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims)
@ -645,7 +645,7 @@ subroutine h5imget_palette_info_f(loc_id,&
character(len=*), intent(in) :: dset_name ! name of the dataset
integer, intent(in) :: pal_number ! palette number
integer(hsize_t), dimension(*), intent(inout) :: dims ! dimensions
integer :: namelen ! name length
integer(size_t) :: namelen ! name length
end function h5imget_palette_info_c
end interface
@ -694,7 +694,7 @@ subroutine h5imget_palette_f(loc_id,&
integer, intent(in) :: pal_number ! palette number
integer, intent(inout), dimension(*) :: buf ! buffer
integer :: errcode ! error code
integer :: namelen ! name length
integer(size_t) :: namelen ! name length
interface
integer function h5imget_palette_c(loc_id,namelen,dset_name,pal_number,buf)
@ -705,7 +705,7 @@ subroutine h5imget_palette_f(loc_id,&
!DEC$ENDIF
!DEC$ATTRIBUTES reference :: dset_name
integer(hid_t), intent(in) :: loc_id ! file or group identifier
integer :: namelen ! lenght of name buffer
integer(size_t) :: namelen ! length of name buffer
character(len=*), intent(in) :: dset_name ! name of the dataset
integer, intent(in) :: pal_number ! palette number
integer, intent(inout), dimension(*) :: buf ! buffer
@ -750,7 +750,7 @@ integer function h5imis_palette_f(loc_id,&
integer(hid_t), intent(in) :: loc_id ! file or group identifier
character(len=*), intent(in) :: dset_name ! name of the dataset
integer :: errcode ! error code
integer :: namelen ! name length
integer(size_t) :: namelen ! name length
interface
integer function h5imis_palette_c(loc_id,namelen,dset_name)
@ -761,7 +761,7 @@ integer function h5imis_palette_f(loc_id,&
!DEC$ENDIF
!DEC$ATTRIBUTES reference :: dset_name
integer(hid_t), intent(in) :: loc_id ! file or group identifier
integer :: namelen ! lenght of name buffer
integer(size_t) :: namelen ! length of name buffer
character(len=*), intent(in) :: dset_name ! name of the dataset
end function h5imis_palette_c
end interface

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -37,10 +37,10 @@
*-------------------------------------------------------------------------
*/
int_f
nh5tbmake_table_c(int_f *namelen1,
nh5tbmake_table_c(size_t_f *namelen1,
_fcd name1,
hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
hsize_t_f *nfields,
hsize_t_f *nrecords,
@ -49,8 +49,8 @@ nh5tbmake_table_c(int_f *namelen1,
hid_t_f *field_types,
hsize_t_f *chunk_size,
int_f *compress,
int_f *char_len_field_names, /* field_names lenghts */
int_f *max_char_size_field_names, /* char len of fields */
size_t_f *char_len_field_names, /* field_names lenghts */
size_t_f *max_char_size_field_names, /* char len of fields */
char *field_names) /* field_names */
{
char *c_name = NULL;
@ -64,7 +64,7 @@ nh5tbmake_table_c(int_f *namelen1,
char *tmp = NULL, *tmp_p;
int_f ret_value = 0;
num_elem = *nfields;
num_elem = (hsize_t)*nfields;
/*
* convert FORTRAN name to C name
@ -79,7 +79,7 @@ nh5tbmake_table_c(int_f *namelen1,
HGOTO_DONE(FAIL)
for(i = 0; i < num_elem; i++) {
c_field_offset[i] = field_offset[i];
c_field_offset[i] = (size_t)field_offset[i];
c_field_types[i] = field_types[i];
} /* end for */
@ -100,7 +100,7 @@ nh5tbmake_table_c(int_f *namelen1,
if(NULL == (c_field_names[i] = (char *)HDmalloc((size_t)char_len_field_names[i] + 1)))
HGOTO_DONE(FAIL)
HDmemcpy(c_field_names[i], tmp_p, (size_t)char_len_field_names[i]);
c_field_names[i][char_len_field_names[i]] = '\0';
c_field_names[i][char_len_field_names[i]] = '\0';
tmp_p = tmp_p + *max_char_size_field_names;
} /* end for */
@ -123,7 +123,7 @@ done:
if(c_field_names[i])
HDfree(c_field_names[i]);
} /* end for */
HDfree(c_field_names);
HDfree(c_field_names);
} /* end if */
if(tmp)
HDfree(tmp);
@ -152,9 +152,9 @@ done:
*/
int_f
nh5tbwrite_field_name_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *namelen1,
size_t_f *namelen1,
_fcd field_name,
hsize_t_f *start,
hsize_t_f *nrecords,
@ -192,9 +192,9 @@ done:
int_f
nh5tbwrite_field_name_int_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *namelen1,
size_t_f *namelen1,
_fcd field_name,
hsize_t_f *start,
hsize_t_f *nrecords,
@ -207,9 +207,9 @@ nh5tbwrite_field_name_int_c(hid_t_f *loc_id,
int_f
nh5tbwrite_field_name_fl_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *namelen1,
size_t_f *namelen1,
_fcd field_name,
hsize_t_f *start,
hsize_t_f *nrecords,
@ -222,9 +222,9 @@ nh5tbwrite_field_name_fl_c(hid_t_f *loc_id,
int_f
nh5tbwrite_field_name_dl_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *namelen1,
size_t_f *namelen1,
_fcd field_name,
hsize_t_f *start,
hsize_t_f *nrecords,
@ -237,9 +237,9 @@ nh5tbwrite_field_name_dl_c(hid_t_f *loc_id,
int_f
nh5tbwrite_field_name_st_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *namelen1,
size_t_f *namelen1,
_fcd field_name,
hsize_t_f *start,
hsize_t_f *nrecords,
@ -267,9 +267,9 @@ nh5tbwrite_field_name_st_c(hid_t_f *loc_id,
*/
int_f
nh5tbread_field_name_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *namelen1,
size_t_f *namelen1,
_fcd field_name,
hsize_t_f *start,
hsize_t_f *nrecords,
@ -307,9 +307,9 @@ done:
int_f
nh5tbread_field_name_int_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *namelen1,
size_t_f *namelen1,
_fcd field_name,
hsize_t_f *start,
hsize_t_f *nrecords,
@ -322,9 +322,9 @@ nh5tbread_field_name_int_c(hid_t_f *loc_id,
int_f
nh5tbread_field_name_fl_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *namelen1,
size_t_f *namelen1,
_fcd field_name,
hsize_t_f *start,
hsize_t_f *nrecords,
@ -337,9 +337,9 @@ nh5tbread_field_name_fl_c(hid_t_f *loc_id,
int_f
nh5tbread_field_name_dl_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *namelen1,
size_t_f *namelen1,
_fcd field_name,
hsize_t_f *start,
hsize_t_f *nrecords,
@ -352,9 +352,9 @@ nh5tbread_field_name_dl_c(hid_t_f *loc_id,
int_f
nh5tbread_field_name_st_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *namelen1,
size_t_f *namelen1,
_fcd field_name,
hsize_t_f *start,
hsize_t_f *nrecords,
@ -382,7 +382,7 @@ nh5tbread_field_name_st_c(hid_t_f *loc_id,
*/
int_f
nh5tbwrite_field_index_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *field_index,
hsize_t_f *start,
@ -418,7 +418,7 @@ done:
int_f
nh5tbwrite_field_index_int_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *field_index,
hsize_t_f *start,
@ -432,7 +432,7 @@ nh5tbwrite_field_index_int_c(hid_t_f *loc_id,
int_f
nh5tbwrite_field_index_fl_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *field_index,
hsize_t_f *start,
@ -446,7 +446,7 @@ nh5tbwrite_field_index_fl_c(hid_t_f *loc_id,
int_f
nh5tbwrite_field_index_dl_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *field_index,
hsize_t_f *start,
@ -460,7 +460,7 @@ nh5tbwrite_field_index_dl_c(hid_t_f *loc_id,
int_f
nh5tbwrite_field_index_st_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *field_index,
hsize_t_f *start,
@ -489,7 +489,7 @@ nh5tbwrite_field_index_st_c(hid_t_f *loc_id,
*/
int_f
nh5tbread_field_index_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *field_index,
hsize_t_f *start,
@ -524,7 +524,7 @@ done:
int_f
nh5tbread_field_index_int_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *field_index,
hsize_t_f *start,
@ -538,7 +538,7 @@ nh5tbread_field_index_int_c(hid_t_f *loc_id,
int_f
nh5tbread_field_index_fl_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *field_index,
hsize_t_f *start,
@ -552,7 +552,7 @@ nh5tbread_field_index_fl_c(hid_t_f *loc_id,
int_f
nh5tbread_field_index_dl_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *field_index,
hsize_t_f *start,
@ -566,7 +566,7 @@ nh5tbread_field_index_dl_c(hid_t_f *loc_id,
int_f
nh5tbread_field_index_st_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *field_index,
hsize_t_f *start,
@ -595,9 +595,9 @@ nh5tbread_field_index_st_c(hid_t_f *loc_id,
*/
int_f
nh5tbinsert_field_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *namelen1,
size_t_f *namelen1,
_fcd field_name,
hid_t_f *field_type,
int_f *position,
@ -633,9 +633,9 @@ done:
int_f
nh5tbinsert_field_int_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *namelen1,
size_t_f *namelen1,
_fcd field_name,
hid_t_f *field_type,
int_f *position,
@ -647,9 +647,9 @@ nh5tbinsert_field_int_c(hid_t_f *loc_id,
int_f
nh5tbinsert_field_fl_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *namelen1,
size_t_f *namelen1,
_fcd field_name,
hid_t_f *field_type,
int_f *position,
@ -661,9 +661,9 @@ nh5tbinsert_field_fl_c(hid_t_f *loc_id,
int_f
nh5tbinsert_field_dl_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *namelen1,
size_t_f *namelen1,
_fcd field_name,
hid_t_f *field_type,
int_f *position,
@ -675,9 +675,9 @@ nh5tbinsert_field_dl_c(hid_t_f *loc_id,
int_f
nh5tbinsert_field_st_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *namelen1,
size_t_f *namelen1,
_fcd field_name,
hid_t_f *field_type,
int_f *position,
@ -704,9 +704,9 @@ nh5tbinsert_field_st_c(hid_t_f *loc_id,
*/
int_f
nh5tbdelete_field_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
int_f *namelen1,
size_t_f *namelen1,
_fcd field_name)
{
char *c_name = NULL;
@ -753,7 +753,7 @@ done:
*/
int_f
nh5tbget_table_info_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
hsize_t_f *nfields,
hsize_t_f *nrecords)
@ -803,16 +803,16 @@ done:
*/
int_f
nh5tbget_field_info_c(hid_t_f *loc_id,
int_f *namelen,
size_t_f *namelen,
_fcd name,
hsize_t_f *nfields,
size_t_f *field_sizes,
size_t_f *field_offsets,
size_t_f *type_size,
int_f *namelen2, /* field_names lenghts */
int_f *lenmax, /* character len max */
size_t_f *namelen2, /* field_names lenghts */
size_t_f *lenmax, /* character len max */
_fcd field_names, /* field_names */
int_f *maxlen_out)
size_t_f *maxlen_out)
{
char *c_name = NULL;
@ -867,9 +867,9 @@ nh5tbget_field_info_c(hid_t_f *loc_id,
size_t field_name_len = HDstrlen(c_field_names[i]);
HDmemcpy(tmp_p, c_field_names[i], field_name_len);
namelen2[i] = (int_f)field_name_len;
length = MAX(length, strlen((c_field_names[i])));
tmp_p = tmp_p + c_lenmax;
namelen2[i] = (size_t_f)field_name_len;
length = MAX(length, strlen((c_field_names[i])));
tmp_p = tmp_p + c_lenmax;
} /* end for */
HD5packFstring(tmp, _fcdtocp(field_names), (size_t)( c_lenmax* c_nfields));
@ -880,7 +880,7 @@ nh5tbget_field_info_c(hid_t_f *loc_id,
field_offsets[i] = (size_t_f)c_field_offsets[i];
} /* end for */
*maxlen_out = (int_f)length;
*maxlen_out = (size_t_f)length;
done:
if(c_name)

View File

@ -93,14 +93,12 @@ SUBROUTINE h5tbmake_table_f(table_title,&
errcode )
IMPLICIT NONE
!
!This definition is needed for Windows DLLs
!DEC$if defined(BUILD_HDF5_HL_DLL)
!DEC$attributes dllexport :: h5tbmake_table_f
!DEC$endif
!
CHARACTER(LEN=*), INTENT(in) :: table_title ! name of the dataset
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset
@ -112,12 +110,12 @@ SUBROUTINE h5tbmake_table_f(table_title,&
INTEGER(hid_t), DIMENSION(1:nfields), INTENT(in) :: field_types ! field types
INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size
INTEGER, INTENT(in) :: compress ! compress
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
INTEGER :: errcode ! error code
INTEGER, DIMENSION(1:nfields) :: char_len_field_names ! field name lengths
INTEGER :: max_char_size_field_names ! character len of field names
INTEGER :: i ! general purpose integer
INTEGER(size_t), DIMENSION(1:nfields) :: char_len_field_names ! field name lengths
INTEGER(size_t) :: max_char_size_field_names ! character len of field names
INTEGER(hsize_t) :: i ! general purpose integer
INTERFACE
@ -155,10 +153,10 @@ SUBROUTINE h5tbmake_table_f(table_title,&
INTEGER(hid_t), DIMENSION(nfields), INTENT(in) :: field_types ! field types
INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size
INTEGER, INTENT(in) :: compress ! compress
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER, DIMENSION(nfields) :: char_len_field_names ! field name's lengths
INTEGER :: max_char_size_field_names ! character len of field names
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
INTEGER(size_t), DIMENSION(nfields) :: char_len_field_names ! field name's lengths
INTEGER(size_t) :: max_char_size_field_names ! character len of field names
END FUNCTION h5tbmake_table_c
END INTERFACE
@ -232,8 +230,8 @@ SUBROUTINE h5tbwrite_field_name_f_int(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
INTERFACE
INTEGER FUNCTION h5tbwrite_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,&
@ -254,8 +252,8 @@ SUBROUTINE h5tbwrite_field_name_f_int(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
END FUNCTION h5tbwrite_field_name_int_c
END INTERFACE
@ -308,8 +306,8 @@ SUBROUTINE h5tbwrite_field_name_f_float(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
INTERFACE
INTEGER FUNCTION h5tbwrite_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,&
@ -330,8 +328,8 @@ SUBROUTINE h5tbwrite_field_name_f_float(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
END FUNCTION h5tbwrite_field_name_fl_c
END INTERFACE
@ -386,8 +384,8 @@ SUBROUTINE h5tbwrite_field_name_f_double(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
INTERFACE
INTEGER FUNCTION h5tbwrite_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,&
@ -408,8 +406,8 @@ SUBROUTINE h5tbwrite_field_name_f_double(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
END FUNCTION h5tbwrite_field_name_dl_c
END INTERFACE
@ -462,8 +460,8 @@ SUBROUTINE h5tbwrite_field_name_f_string(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
INTERFACE
INTEGER FUNCTION h5tbwrite_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,&
@ -484,8 +482,8 @@ SUBROUTINE h5tbwrite_field_name_f_string(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
END FUNCTION h5tbwrite_field_name_st_c
END INTERFACE
@ -539,8 +537,8 @@ SUBROUTINE h5tbread_field_name_f_int(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
INTERFACE
INTEGER FUNCTION h5tbread_field_name_int_c(loc_id,namelen,dset_name,namelen1,field_name,&
@ -561,8 +559,8 @@ SUBROUTINE h5tbread_field_name_f_int(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
END FUNCTION h5tbread_field_name_int_c
END INTERFACE
@ -615,8 +613,8 @@ SUBROUTINE h5tbread_field_name_f_float(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
INTERFACE
INTEGER FUNCTION h5tbread_field_name_fl_c(loc_id,namelen,dset_name,namelen1,field_name,&
@ -637,8 +635,8 @@ SUBROUTINE h5tbread_field_name_f_float(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
END FUNCTION h5tbread_field_name_fl_c
END INTERFACE
@ -691,8 +689,8 @@ SUBROUTINE h5tbread_field_name_f_double(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
INTERFACE
INTEGER FUNCTION h5tbread_field_name_dl_c(loc_id,namelen,dset_name,namelen1,field_name,&
@ -713,8 +711,8 @@ SUBROUTINE h5tbread_field_name_f_double(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
END FUNCTION h5tbread_field_name_dl_c
END INTERFACE
@ -767,8 +765,8 @@ SUBROUTINE h5tbread_field_name_f_string(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
INTERFACE
INTEGER FUNCTION h5tbread_field_name_st_c(loc_id,namelen,dset_name,namelen1,field_name,&
@ -789,8 +787,8 @@ SUBROUTINE h5tbread_field_name_f_string(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
END FUNCTION h5tbread_field_name_st_c
END INTERFACE
@ -844,7 +842,7 @@ SUBROUTINE h5tbwrite_field_index_f_int(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
INTERFACE
INTEGER FUNCTION h5tbwrite_field_index_int_c(loc_id,namelen,dset_name,field_index,&
@ -864,7 +862,7 @@ SUBROUTINE h5tbwrite_field_index_f_int(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
END FUNCTION h5tbwrite_field_index_int_c
END INTERFACE
@ -916,7 +914,7 @@ SUBROUTINE h5tbwrite_field_index_f_float(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
INTERFACE
INTEGER FUNCTION h5tbwrite_field_index_fl_c(loc_id,namelen,dset_name,field_index,&
@ -936,7 +934,7 @@ SUBROUTINE h5tbwrite_field_index_f_float(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
END FUNCTION h5tbwrite_field_index_fl_c
END INTERFACE
@ -990,7 +988,7 @@ SUBROUTINE h5tbwrite_field_index_f_double(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
INTERFACE
INTEGER FUNCTION h5tbwrite_field_index_dl_c(loc_id,namelen,dset_name,field_index,&
@ -1010,7 +1008,7 @@ SUBROUTINE h5tbwrite_field_index_f_double(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
END FUNCTION h5tbwrite_field_index_dl_c
END INTERFACE
@ -1062,7 +1060,7 @@ SUBROUTINE h5tbwrite_field_index_f_string(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
INTERFACE
INTEGER FUNCTION h5tbwrite_field_index_st_c(loc_id,namelen,dset_name,field_index,&
@ -1082,7 +1080,7 @@ SUBROUTINE h5tbwrite_field_index_f_string(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
END FUNCTION h5tbwrite_field_index_st_c
END INTERFACE
@ -1135,7 +1133,7 @@ SUBROUTINE h5tbread_field_index_f_int(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
INTERFACE
INTEGER FUNCTION h5tbread_field_index_int_c(loc_id,namelen,dset_name,field_index,&
@ -1155,7 +1153,7 @@ SUBROUTINE h5tbread_field_index_f_int(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
END FUNCTION h5tbread_field_index_int_c
END INTERFACE
@ -1207,7 +1205,7 @@ SUBROUTINE h5tbread_field_index_f_float(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
INTERFACE
INTEGER FUNCTION h5tbread_field_index_fl_c(loc_id,namelen,dset_name,field_index,&
@ -1227,7 +1225,7 @@ SUBROUTINE h5tbread_field_index_f_float(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
END FUNCTION h5tbread_field_index_fl_c
END INTERFACE
@ -1279,7 +1277,7 @@ SUBROUTINE h5tbread_field_index_f_double(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
INTERFACE
INTEGER FUNCTION h5tbread_field_index_dl_c(loc_id,namelen,dset_name,field_index,&
@ -1299,7 +1297,7 @@ SUBROUTINE h5tbread_field_index_f_double(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
END FUNCTION h5tbread_field_index_dl_c
END INTERFACE
@ -1351,7 +1349,7 @@ SUBROUTINE h5tbread_field_index_f_string(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
INTERFACE
INTEGER FUNCTION h5tbread_field_index_st_c(loc_id,namelen,dset_name,field_index,&
@ -1371,7 +1369,7 @@ SUBROUTINE h5tbread_field_index_f_string(loc_id,&
INTEGER(size_t), INTENT(in) :: type_size ! type size
CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
END FUNCTION h5tbread_field_index_st_c
END INTERFACE
@ -1420,8 +1418,8 @@ SUBROUTINE h5tbinsert_field_f_int(loc_id,&
INTEGER(hid_t), INTENT(in) :: field_type ! field type
INTEGER, INTENT(in) :: field_index ! field_index
INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
INTEGER :: errcode ! error code
@ -1442,8 +1440,8 @@ SUBROUTINE h5tbinsert_field_f_int(loc_id,&
INTEGER(hid_t), INTENT(in) :: field_type ! field type
INTEGER, INTENT(in) :: field_index ! field_index
INTEGER, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length length
END FUNCTION h5tbinsert_field_int_c
END INTERFACE
@ -1494,8 +1492,8 @@ SUBROUTINE h5tbinsert_field_f_float(loc_id,&
INTEGER(hid_t), INTENT(in) :: field_type ! field type
INTEGER, INTENT(in) :: field_index ! field_index
REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
INTEGER :: errcode ! error code
@ -1516,8 +1514,8 @@ SUBROUTINE h5tbinsert_field_f_float(loc_id,&
INTEGER(hid_t), INTENT(in) :: field_type ! field type
INTEGER, INTENT(in) :: field_index ! field_index
REAL, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length length
END FUNCTION h5tbinsert_field_fl_c
END INTERFACE
@ -1568,8 +1566,8 @@ SUBROUTINE h5tbinsert_field_f_double(loc_id,&
INTEGER(hid_t), INTENT(in) :: field_type ! field type
INTEGER, INTENT(in) :: field_index ! field_index
DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
INTEGER :: errcode ! error code
@ -1590,8 +1588,8 @@ SUBROUTINE h5tbinsert_field_f_double(loc_id,&
INTEGER(hid_t), INTENT(in) :: field_type ! field type
INTEGER, INTENT(in) :: field_index ! field_index
DOUBLE PRECISION, INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length length
END FUNCTION h5tbinsert_field_dl_c
END INTERFACE
@ -1643,8 +1641,8 @@ SUBROUTINE h5tbinsert_field_f_string(loc_id,&
INTEGER(hid_t), INTENT(in) :: field_type ! field type
INTEGER, INTENT(in) :: field_index ! field_index
CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
INTEGER :: errcode ! error code
@ -1665,8 +1663,8 @@ SUBROUTINE h5tbinsert_field_f_string(loc_id,&
INTEGER(hid_t), INTENT(in) :: field_type ! field type
INTEGER, INTENT(in) :: field_index ! field_index
CHARACTER(LEN=*), INTENT(in), DIMENSION(*) :: buf ! data buffer
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length length
END FUNCTION h5tbinsert_field_st_c
END INTERFACE
@ -1712,8 +1710,8 @@ SUBROUTINE h5tbdelete_field_f(loc_id,&
INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier
CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset
CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length
INTEGER :: errcode ! error code
@ -1730,8 +1728,8 @@ SUBROUTINE h5tbdelete_field_f(loc_id,&
INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier
CHARACTER(LEN=*), INTENT(IN) :: dset_name ! name of the dataset
CHARACTER(LEN=*), INTENT(IN) :: field_name ! name of the field
INTEGER :: namelen ! name length
INTEGER :: namelen1 ! name length length
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: namelen1 ! name length length
END FUNCTION h5tbdelete_field_c
END INTERFACE
@ -1781,7 +1779,7 @@ SUBROUTINE h5tbget_table_info_f(loc_id,&
INTEGER(hsize_t), INTENT(inout):: nfields ! nfields
INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords
INTEGER :: errcode ! error code
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
INTERFACE
INTEGER FUNCTION h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords)
@ -1795,7 +1793,7 @@ SUBROUTINE h5tbget_table_info_f(loc_id,&
CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset
INTEGER(hsize_t), INTENT(inout):: nfields ! nfields
INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords
INTEGER :: namelen ! name length
INTEGER(size_t) :: namelen ! name length
END FUNCTION h5tbget_table_info_c
END INTERFACE
@ -1819,7 +1817,7 @@ END SUBROUTINE h5tbget_table_info_f
! Comments:
!
! Modifications:
! Added optional parameter for returning the maximum character lenght
! Added optional parameter for returning the maximum character length
! in the field name array. March 3, 2011
!
!-------------------------------------------------------------------------
@ -1828,9 +1826,9 @@ SUBROUTINE h5tbget_field_info_f(loc_id,&
dset_name,&
nfields,&
field_names,&
field_sizes,&
field_offsets,&
type_size,&
field_sizes,&
field_offsets,&
type_size,&
errcode, maxlen_out )
IMPLICIT NONE
@ -1849,11 +1847,11 @@ SUBROUTINE h5tbget_field_info_f(loc_id,&
INTEGER(size_t), INTENT(inout):: type_size ! type size
INTEGER :: errcode ! error code
INTEGER, OPTIONAL :: maxlen_out ! maximum character len of the field names
INTEGER :: namelen ! name length
INTEGER, DIMENSION(nfields) :: namelen2 ! name lengths
INTEGER :: i ! general purpose integer
INTEGER :: maxlen
INTEGER :: c_maxlen_out
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t), DIMENSION(nfields) :: namelen2 ! name lengths
INTEGER(hsize_t) :: i ! general purpose integer
INTEGER(size_t) :: maxlen
INTEGER(size_t) :: c_maxlen_out
INTERFACE
INTEGER FUNCTION h5tbget_field_info_c(loc_id,namelen,dset_name,nfields,&
@ -1872,10 +1870,10 @@ SUBROUTINE h5tbget_field_info_f(loc_id,&
INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_sizes ! field sizes
INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_offsets ! field offsets
INTEGER(size_t), INTENT(inout):: type_size ! type size
INTEGER :: namelen ! name length
INTEGER :: maxlen ! maxiumum length of input field names
INTEGER, DIMENSION(1:nfields) :: namelen2 ! name lengths
INTEGER :: c_maxlen_out ! maximum character length of a field array element
INTEGER(size_t) :: namelen ! name length
INTEGER(size_t) :: maxlen ! maxiumum length of input field names
INTEGER(size_t), DIMENSION(1:nfields) :: namelen2 ! name lengths
INTEGER(size_t) :: c_maxlen_out ! maximum character length of a field array element
END FUNCTION h5tbget_field_info_c
END INTERFACE

View File

@ -91,7 +91,7 @@ SUBROUTINE test_testds(err)
!-------------------------------------------------------------------------
! attach the DS_1_NAME dimension scale to DSET_NAME at dimension 1
!-------------------------------------------------------------------------
CALL test_begin(' Test Attaching Dimension Scale ')
! get the dataset id for DSET_NAME

View File

@ -111,13 +111,11 @@ end do
! Initialize FORTRAN predefined datatypes.
!
call h5open_f(errcode)
!
! Create a new file using default properties.
!
call h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode)
!-------------------------------------------------------------------------
! indexed image
!-------------------------------------------------------------------------

View File

@ -63,7 +63,6 @@ INTEGER :: i ! general purpose integer
CALL test_begin(' Make/Read datasets (1D) ')
!
! Initialize the data array.
!
@ -186,8 +185,8 @@ USE HDF5 ! module of HDF5 library
IMPLICIT NONE
INTEGER, PARAMETER :: DIM1 = 4; ! columns
INTEGER, PARAMETER :: DIM2 = 6; ! rows
INTEGER(HSIZE_T), PARAMETER :: DIM1 = 4; ! columns
INTEGER(HSIZE_T), PARAMETER :: DIM2 = 6; ! rows
CHARACTER(len=9), PARAMETER :: filename = "dsetf2.h5"! File name
CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name
CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name
@ -205,7 +204,7 @@ REAL, DIMENSION(DIM1,DIM2) :: buf3r ! Data buffer
DOUBLE PRECISION, DIMENSION(DIM1,DIM2) :: buf4 ! Data buffer
DOUBLE PRECISION, DIMENSION(DIM1,DIM2) :: buf4r ! Data buffer
INTEGER :: errcode ! Error flag
INTEGER :: i, j, n ! general purpose integers
INTEGER(HSIZE_T) :: i, j, n ! general purpose integers
CALL test_begin(' Make/Read datasets (2D) ')
@ -215,15 +214,15 @@ CALL test_begin(' Make/Read datasets (2D) ')
!
n=1
DO i = 1, DIM1*DIM2
buf(i) = n;
buf(i) = INT(n)
n = n + 1
END DO
DO i = 1, dims(1)
DO j = 1, dims(2)
buf2(i,j) = (i-1)*dims(2) + j;
buf3(i,j) = (i-1)*dims(2) + j;
buf4(i,j) = (i-1)*dims(2) + j;
buf2(i,j) = INT((i-1)*dims(2) + j)
buf3(i,j) = INT((i-1)*dims(2) + j)
buf4(i,j) = INT((i-1)*dims(2) + j)
END DO
END DO
@ -373,9 +372,9 @@ USE HDF5 ! module of HDF5 library
IMPLICIT NONE
INTEGER, PARAMETER :: DIM1 = 6; ! columns
INTEGER, PARAMETER :: DIM2 = 4; ! rows
INTEGER, PARAMETER :: DIM3 = 2; ! layers
INTEGER, PARAMETER :: DIM1 = 6 ! columns
INTEGER, PARAMETER :: DIM2 = 4 ! rows
INTEGER, PARAMETER :: DIM3 = 2 ! layers
CHARACTER(len=9), PARAMETER :: filename = "dsetf3.h5" ! File name
CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name
CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name
@ -394,7 +393,7 @@ DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3) :: buf4 ! Data buffer
DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3) :: buf4r ! Data buffer
INTEGER :: rank = 3 ! Dataset rank
INTEGER :: errcode ! Error flag
INTEGER :: i, j, k, n ! general purpose integers
INTEGER(HSIZE_T) :: i, j, k, n ! general purpose integers
INTEGER :: type_class
INTEGER(SIZE_T) :: type_size
@ -406,20 +405,20 @@ CALL test_begin(' Make/Read datasets (3D) ')
!
n=1
DO i = 1, DIM1*DIM2*DIM3
buf(i) = n;
buf(i) = INT(n)
n = n + 1
END DO
n = 1
DO i = 1, dims(1)
DO j = 1, dims(2)
DO k = 1, dims(3)
buf2(i,j,k) = n;
buf3(i,j,k) = n;
buf4(i,j,k) = n;
n = n + 1
END DO
END DO
DO j = 1, dims(2)
DO k = 1, dims(3)
buf2(i,j,k) = INT(n)
buf3(i,j,k) = INT(n)
buf4(i,j,k) = INT(n)
n = n + 1
END DO
END DO
END DO
!
@ -625,7 +624,7 @@ SUBROUTINE test_datasetND(rank)
DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: dbuf_7 ! Data buffer
DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:) :: dbufr_7 ! Data buffer
INTEGER :: errcode ! Error flag
INTEGER :: i, j, k, l, m, n, o, nn ! general purpose integers
INTEGER(HSIZE_T) :: i, j, k, l, m, n, o, nn ! general purpose integers
INTEGER :: type_class
INTEGER(SIZE_T) :: type_size
CHARACTER(LEN=1) :: ichr1
@ -651,9 +650,9 @@ SUBROUTINE test_datasetND(rank)
DO j = 1, DIM2
DO k = 1, DIM3
DO l = 1, DIM4
ibuf_4(i,j,k,l) = nn
rbuf_4(i,j,k,l) = nn
dbuf_4(i,j,k,l) = nn
ibuf_4(i,j,k,l) = INT(nn)
rbuf_4(i,j,k,l) = INT(nn)
dbuf_4(i,j,k,l) = INT(nn)
nn = nn + 1
END DO
END DO
@ -677,9 +676,9 @@ SUBROUTINE test_datasetND(rank)
DO k = 1, DIM3
DO l = 1, DIM4
DO m = 1, DIM5
ibuf_5(i,j,k,l,m) = nn
rbuf_5(i,j,k,l,m) = nn
dbuf_5(i,j,k,l,m) = nn
ibuf_5(i,j,k,l,m) = INT(nn)
rbuf_5(i,j,k,l,m) = INT(nn)
dbuf_5(i,j,k,l,m) = INT(nn)
nn = nn + 1
END DO
END DO
@ -705,9 +704,9 @@ SUBROUTINE test_datasetND(rank)
DO l = 1, DIM4
DO m = 1, DIM5
DO n = 1, DIM6
ibuf_6(i,j,k,l,m,n) = nn
rbuf_6(i,j,k,l,m,n) = nn
dbuf_6(i,j,k,l,m,n) = nn
ibuf_6(i,j,k,l,m,n) = INT(nn)
rbuf_6(i,j,k,l,m,n) = INT(nn)
dbuf_6(i,j,k,l,m,n) = INT(nn)
nn = nn + 1
END DO
END DO
@ -735,9 +734,9 @@ SUBROUTINE test_datasetND(rank)
DO m = 1, DIM5
DO n = 1, DIM6
DO o = 1, DIM7
ibuf_7(i,j,k,l,m,n,o) = nn
rbuf_7(i,j,k,l,m,n,o) = nn
dbuf_7(i,j,k,l,m,n,o) = nn
ibuf_7(i,j,k,l,m,n,o) = INT(nn)
rbuf_7(i,j,k,l,m,n,o) = INT(nn)
dbuf_7(i,j,k,l,m,n,o) = INT(nn)
nn = nn + 1
END DO
END DO
@ -1045,7 +1044,7 @@ SUBROUTINE test_datasets()
CHARACTER(len=9), PARAMETER :: filename = "dsetf4.h5"! File name
INTEGER(HID_T) :: file_id ! File identifier
INTEGER :: errcode ! Error flag
INTEGER, PARAMETER :: DIM1 = 10; ! Dimension of array
INTEGER, PARAMETER :: DIM1 = 10 ! Dimension of array
CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name
CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name
CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name
@ -1086,10 +1085,10 @@ SUBROUTINE test_datasets()
!
n = 1
DO i = 1, DIM1
buf2(i) = n;
buf3(i) = n;
buf4(i) = n;
n = n + 1;
buf2(i) = n
buf3(i) = n
buf4(i) = n
n = n + 1
END DO
!-------------------------------------------------------------------------
@ -1344,8 +1343,8 @@ SUBROUTINE test_attributes()
CHARACTER(len=9), PARAMETER :: filename = "dsetf5.h5"! File name
CHARACTER(len=9), PARAMETER :: filename1 ="tattr.h5" ! C written attribute file
INTEGER(HID_T) :: file_id ! File identifier
INTEGER(HID_T) :: file_id1
INTEGER, PARAMETER :: DIM1 = 10; ! Dimension of array
! INTEGER(HID_T) :: file_id1
INTEGER, PARAMETER :: DIM1 = 10 ! Dimension of array
CHARACTER(LEN=5), PARAMETER :: attrname1 = "attr1" ! Attribute name
CHARACTER(LEN=5), PARAMETER :: attrname2 = "attr2" ! Attribute name
CHARACTER(LEN=5), PARAMETER :: attrname3 = "attr3" ! Attribute name
@ -1355,8 +1354,8 @@ SUBROUTINE test_attributes()
CHARACTER(LEN=16), PARAMETER :: buf_c = "string attribute"
CHARACTER(LEN=8) :: bufr1 ! Data buffer
CHARACTER(LEN=10) :: bufr1_lg ! Data buffer
CHARACTER(LEN=16) :: bufr_c ! Data buffer
CHARACTER(LEN=18) :: bufr_c_lg ! Data buffer
! CHARACTER(LEN=16) :: bufr_c ! Data buffer
! CHARACTER(LEN=18) :: bufr_c_lg ! Data buffer
INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer
INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer
REAL, DIMENSION(DIM1) :: buf3 ! Data buffer
@ -1395,10 +1394,10 @@ SUBROUTINE test_attributes()
size = DIM1
n = 1
DO i = 1, DIM1
buf2(i) = n;
buf3(i) = n;
buf4(i) = n;
n = n + 1;
buf2(i) = n
buf3(i) = n
buf4(i) = n
n = n + 1
END DO
@ -1443,7 +1442,6 @@ SUBROUTINE test_attributes()
! write attribute.
!
CALL h5ltset_attribute_float_f(file_id,dsetname1,attrname3,buf3,size,errcode)
!
! read attribute.
!
@ -1460,7 +1458,6 @@ SUBROUTINE test_attributes()
ENDIF
END DO
CALL passed()
!-------------------------------------------------------------------------
@ -1468,8 +1465,7 @@ SUBROUTINE test_attributes()
!-------------------------------------------------------------------------
CALL test_begin(' Set/Get attributes double ')
!
! write attribute.
!

View File

@ -144,7 +144,8 @@ herr_t H5DSattach_scale(hid_t did,
hid_t dsid_j; /* DS dataset ID in DIMENSION_LIST */
H5O_info_t oi1, oi2;
H5I_type_t it1, it2;
int i, len;
int i;
size_t len;
int found_ds=0;
htri_t is_scale;
@ -242,7 +243,7 @@ herr_t H5DSattach_scale(hid_t did,
if (has_dimlist == 0)
{
dims[0] = rank;
dims[0] = (hsize_t)rank;
/* space for the attribute */
if((sid = H5Screate_simple(1, dims, NULL)) < 0)
@ -477,7 +478,7 @@ herr_t H5DSattach_scale(hid_t did,
dsbuf[nelmts - 1] = dsl;
/* create a new data space for the new references array */
dims[0] = nelmts;
dims[0] = (hsize_t)nelmts;
if((sid = H5Screate_simple(1, dims, NULL)) < 0)
goto out;
@ -798,7 +799,7 @@ herr_t H5DSdetach_scale(hid_t did,
for(ii=0; ii<nelmts; ii++) {
/* First check if we have the same dimension index */
if((int)idx == dsbuf[ii].dim_idx) {
if(idx == dsbuf[ii].dim_idx) {
/* get the reference to the dataset */
ref = dsbuf[ii].ref;
@ -853,7 +854,7 @@ herr_t H5DSdetach_scale(hid_t did,
if(nelmts)
{
/* create a new data space for the new references array */
dims[0] = nelmts;
dims[0] = (hsize_t)nelmts;
if((sid = H5Screate_simple(1, dims, NULL)) < 0)
goto out;
@ -1153,7 +1154,7 @@ htri_t H5DSis_attached(hid_t did,
goto out;
/* same object */
if(oi3.fileno == oi4.fileno && oi3.addr == oi4.addr && (int)idx==dsbuf[i].dim_idx)
if(oi3.fileno == oi4.fileno && oi3.addr == oi4.addr && idx==dsbuf[i].dim_idx)
found_dset=1;
/* close the dereferenced dataset */
@ -1478,7 +1479,7 @@ herr_t H5DSset_label(hid_t did, unsigned int idx, const char *label)
if (has_labels == 0)
{
dims[0] = rank;
dims[0] = (hsize_t)rank;
/* space for the attribute */
if ((sid = H5Screate_simple(1, dims, NULL)) < 0)

View File

@ -28,7 +28,7 @@
/* attribute type of a DS dataset */
typedef struct ds_list_t {
hobj_ref_t ref; /* object reference */
int dim_idx; /* dimension index of the dataset */
unsigned int dim_idx; /* dimension index of the dataset */
} ds_list_t;

View File

@ -628,9 +628,9 @@ herr_t H5IMlink_palette( hid_t loc_id,
n_refs = H5Sget_simple_extent_npoints(asid);
dim_ref = n_refs + 1;
dim_ref = (hsize_t)n_refs + 1;
refbuf = (hobj_ref_t*)HDmalloc( sizeof(hobj_ref_t) * (int)dim_ref );
refbuf = (hobj_ref_t*)HDmalloc( sizeof(hobj_ref_t) * (size_t)dim_ref );
if ( H5Aread( aid, atid, refbuf ) < 0)
goto out;
@ -949,9 +949,9 @@ herr_t H5IMget_palette_info( hid_t loc_id,
n_refs = H5Sget_simple_extent_npoints(asid);
dim_ref = n_refs;
dim_ref = (hsize_t)n_refs;
refbuf = (hobj_ref_t*)HDmalloc( sizeof(hobj_ref_t) * (int)dim_ref );
refbuf = (hobj_ref_t*)HDmalloc( sizeof(hobj_ref_t) * (size_t)dim_ref );
if ( H5Aread( aid, atid, refbuf ) < 0)
goto out;
@ -1067,9 +1067,9 @@ herr_t H5IMget_palette( hid_t loc_id,
n_refs = H5Sget_simple_extent_npoints(asid);
dim_ref = n_refs;
dim_ref = (hsize_t)n_refs;
refbuf = (hobj_ref_t*)HDmalloc( sizeof(hobj_ref_t) * (int)dim_ref );
refbuf = (hobj_ref_t*)HDmalloc( sizeof(hobj_ref_t) * (size_t)dim_ref );
if ( H5Aread( aid, atid, refbuf ) < 0)
goto out;

View File

@ -2398,7 +2398,7 @@ print_enum(hid_t type, char* str, size_t *str_len, hbool_t no_ubuf, size_t indt)
for (i = 0; i < nmembs; i++) {
if((name[i] = H5Tget_member_name(type, (unsigned)i))==NULL)
goto out;
if(H5Tget_member_value(type, (unsigned)i, value + i * super_size) < 0)
if(H5Tget_member_value(type, (unsigned)i, value + (size_t)i * super_size) < 0)
goto out;
}
@ -2426,7 +2426,7 @@ print_enum(hid_t type, char* str, size_t *str_len, hbool_t no_ubuf, size_t indt)
/*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size"
*strangely, unless use another pointer "copy".*/
copy = value+i*dst_size;
copy = value + (size_t)i * dst_size;
if (H5T_SGN_NONE == H5Tget_sign(native))
HDsnprintf(tmp_str, TMP_LEN, "%u", *((unsigned int*)((void *)copy)));
else
@ -2557,6 +2557,7 @@ char* H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *sl
switch (tcls) {
case H5T_INTEGER:
case H5T_BITFIELD:
if (H5Tequal(dtype, H5T_STD_I8BE)) {
HDsnprintf(dt_str, *slen, "H5T_STD_I8BE");
} else if (H5Tequal(dtype, H5T_STD_I8LE)) {
@ -3053,9 +3054,19 @@ next:
case H5T_TIME:
HDsnprintf(dt_str, *slen, "H5T_TIME: not yet implemented");
break;
case H5T_BITFIELD:
HDsnprintf(dt_str, *slen, "H5T_BITFIELD: not yet implemented");
case H5T_NO_CLASS:
HDsnprintf(dt_str, *slen, "H5T_NO_CLASS");
break;
case H5T_REFERENCE:
if (H5Tequal(dtype, H5T_STD_REF_DSETREG) == TRUE) {
HDsnprintf(dt_str, *slen, " H5T_REFERENCE { H5T_STD_REF_DSETREG }");
}
else {
HDsnprintf(dt_str, *slen, " H5T_REFERENCE { H5T_STD_REF_OBJECT }");
}
break;
case H5T_NCLASSES:
break;
default:
HDsnprintf(dt_str, *slen, "unknown data type");
}

View File

@ -33,7 +33,7 @@
#define TESTING2(WHAT) {printf("%-70s", "Testing " WHAT); fflush(stdout);}
#define TESTING3(WHAT) {printf("%-70s", "" WHAT); fflush(stdout);}
/* Implrements verbose 'assert' with 'goto error' exit */
/* Implements verbose 'assert' with 'goto error' exit */
#define VERIFY(condition, string) do { if (!(condition)) FAIL_PUTS_ERROR(string) } while(0)
#endif /* _H5HLTEST_H */

View File

@ -3126,7 +3126,7 @@ static int test_simple(void)
if(H5DSget_scale_name(dsid, name_out, (size_t)name_len+1) < 0)
goto out;
if(HDstrncmp("Latitude set 0",name_out, name_len)!=0)
if(HDstrncmp("Latitude set 0",name_out, (size_t)name_len)!=0)
goto out;
if(name_out) {
HDfree(name_out);

View File

@ -501,20 +501,20 @@ filter_bogus1(unsigned int flags, size_t UNUSED cd_nelmts,
size_t *buf_size, void **buf)
{
int *int_ptr=(int *)*buf; /* Pointer to the data values */
ssize_t buf_left=*buf_size; /* Amount of data buffer left to process */
ssize_t buf_left=(ssize_t)*buf_size; /* Amount of data buffer left to process */
if(flags & H5Z_FLAG_REVERSE) { /* read */
/* Substract the "add on" value to all the data values */
while(buf_left>0) {
*int_ptr++ -= (int)ADD_ON;
buf_left -= sizeof(int);
buf_left -= (ssize_t)sizeof(int);
} /* end while */
} /* end if */
else { /* write */
/* Add the "add on" value to all the data values */
while(buf_left>0) {
*int_ptr++ += (int)ADD_ON;
buf_left -= sizeof(int);
buf_left -= (ssize_t)sizeof(int);
} /* end while */
} /* end else */
@ -538,20 +538,20 @@ filter_bogus2(unsigned int flags, size_t UNUSED cd_nelmts,
size_t *buf_size, void **buf)
{
int *int_ptr=(int *)*buf; /* Pointer to the data values */
ssize_t buf_left=*buf_size; /* Amount of data buffer left to process */
ssize_t buf_left=(ssize_t)*buf_size; /* Amount of data buffer left to process */
if(flags & H5Z_FLAG_REVERSE) { /* read */
/* Substract the "add on" value to all the data values */
while(buf_left>0) {
*int_ptr++ /= (int)FACTOR;
buf_left -= sizeof(int);
buf_left -= (ssize_t)sizeof(int);
} /* end while */
} /* end if */
else { /* write */
/* Add the "add on" value to all the data values */
while(buf_left>0) {
*int_ptr++ *= (int)FACTOR;
buf_left -= sizeof(int);
buf_left -= (ssize_t)sizeof(int);
} /* end while */
} /* end else */

View File

@ -300,7 +300,7 @@ static int test_dsets( void )
for (i = 0; i < DIM; i++)
{
if ( data_float_in[i] != data_float_out[i] ) {
if(!FLT_ABS_EQUAL(data_float_in[i],data_float_out[i])) {
goto out;
}
}
@ -311,7 +311,7 @@ static int test_dsets( void )
for (i = 0; i < DIM; i++)
{
if ( data_float_in[i] != data_float_out[i] ) {
if(!FLT_ABS_EQUAL(data_float_in[i],data_float_out[i])) {
goto out;
}
}
@ -336,7 +336,7 @@ static int test_dsets( void )
for (i = 0; i < DIM; i++)
{
if ( data_double_in[i] != data_double_out[i] ) {
if(!DBL_ABS_EQUAL(data_double_in[i],data_double_out[i])) {
goto out;
}
}
@ -347,7 +347,7 @@ static int test_dsets( void )
for (i = 0; i < DIM; i++)
{
if ( data_double_in[i] != data_double_out[i] ) {
if(!DBL_ABS_EQUAL(data_double_in[i],data_double_out[i])) {
goto out;
}
}
@ -959,7 +959,7 @@ static herr_t make_attributes( hid_t loc_id, const char* obj_name )
for (i = 0; i < 5; i++)
{
if ( attr_float_in[i] != attr_float_out[i] ) {
if(!FLT_ABS_EQUAL(attr_float_in[i],attr_float_out[i])) {
return -1;
}
}
@ -970,7 +970,7 @@ static herr_t make_attributes( hid_t loc_id, const char* obj_name )
for (i = 0; i < 5; i++)
{
if ( attr_float_in[i] != attr_float_out[i] ) {
if(!FLT_ABS_EQUAL(attr_float_in[i],attr_float_out[i])) {
return -1;
}
}
@ -1003,7 +1003,7 @@ static herr_t make_attributes( hid_t loc_id, const char* obj_name )
for (i = 0; i < 5; i++)
{
if ( attr_double_in[i] != attr_double_out[i] ) {
if(!DBL_ABS_EQUAL(attr_double_in[i],attr_double_out[i])) {
return -1;
}
}
@ -1014,7 +1014,7 @@ static herr_t make_attributes( hid_t loc_id, const char* obj_name )
for (i = 0; i < 5; i++)
{
if ( attr_double_in[i] != attr_double_out[i] ) {
if(!DBL_ABS_EQUAL(attr_double_in[i],attr_double_out[i])) {
return -1;
}
}
@ -1046,7 +1046,7 @@ static herr_t make_attributes( hid_t loc_id, const char* obj_name )
TESTING("H5LTget_attribute_info");
if(NULL==(dims_out = (hsize_t*) HDmalloc( sizeof(hsize_t) * rank_out ))) return -1;
if(NULL==(dims_out = (hsize_t*) HDmalloc( sizeof(hsize_t) * (size_t)rank_out ))) return -1;
if ( H5LTget_attribute_info( loc_id, obj_name, ATTR2_NAME, dims_out, &type_class, &type_size) < 0 ) {
HDfree( dims_out );

View File

@ -75,8 +75,8 @@ static int cmp_par(size_t i, size_t j, particle_t *rbuf, particle_t *wbuf )
if ( ( HDstrcmp( rbuf[i].name, wbuf[j].name ) != 0 ) ||
rbuf[i].lati != wbuf[j].lati ||
rbuf[i].longi != wbuf[j].longi ||
rbuf[i].pressure != wbuf[j].pressure ||
rbuf[i].temperature != wbuf[j].temperature ) {
!FLT_ABS_EQUAL(rbuf[i].pressure,wbuf[j].pressure) ||
!DBL_ABS_EQUAL(rbuf[i].temperature,wbuf[j].temperature) ) {
return -1;
}
return 0;

View File

@ -166,14 +166,14 @@ static int cmp_par(hsize_t i, hsize_t j, particle_t *rbuf, particle_t *wbuf )
if ( ( HDstrcmp( rbuf[i].name, wbuf[j].name ) != 0 ) ||
rbuf[i].lati != wbuf[j].lati ||
rbuf[i].longi != wbuf[j].longi ||
rbuf[i].pressure != wbuf[j].pressure ||
rbuf[i].temperature != wbuf[j].temperature )
!FLT_ABS_EQUAL(rbuf[i].pressure,wbuf[j].pressure) ||
!DBL_ABS_EQUAL(rbuf[i].temperature,wbuf[j].temperature) )
{
HDfprintf(stderr,"read and write buffers have differences\n");
HDfprintf(stderr,"%s %ld %f %f %d\n",
rbuf[i].name,rbuf[i].longi,rbuf[i].pressure,rbuf[i].temperature,rbuf[i].lati);
rbuf[i].name,rbuf[i].longi,(double)rbuf[i].pressure,rbuf[i].temperature,rbuf[i].lati);
HDfprintf(stderr,"%s %ld %f %f %d\n",
wbuf[j].name,wbuf[j].longi,wbuf[j].pressure,wbuf[j].temperature,wbuf[j].lati);
wbuf[j].name,wbuf[j].longi,(double)wbuf[j].pressure,wbuf[j].temperature,wbuf[j].lati);
return -1;
}
return 0;
@ -1138,14 +1138,14 @@ static int test_table(hid_t fid, int do_write)
{
if ( i >= 2 && i <= 4 )
{
if ( rbuf[i].lati != position_in[i-NRECORDS_ADD+1].lati ||
if ( rbuf[i].lati != position_in[i-NRECORDS_ADD+1].lati ||
rbuf[i].longi != position_in[i-NRECORDS_ADD+1].longi ||
rbuf[i].pressure != pressure_in[i-NRECORDS_ADD+1] )
!FLT_ABS_EQUAL(rbuf[i].pressure,pressure_in[i-NRECORDS_ADD+1]) )
{
HDfprintf(stderr,"%ld %f %d\n",
rbuf[i].longi,rbuf[i].pressure,rbuf[i].lati);
rbuf[i].longi,(double)rbuf[i].pressure,rbuf[i].lati);
HDfprintf(stderr,"%ld %f %d\n",
position_in[i].longi,pressure_in[i],position_in[i].lati);
position_in[i].longi,(double)pressure_in[i],position_in[i].lati);
goto out;
}
}
@ -1200,9 +1200,9 @@ static int test_table(hid_t fid, int do_write)
goto out;
/* Compare the extracted table with the initial values */
for( i = 0; i < NRECORDS; i++ )
for ( i = 0; i < NRECORDS; i++ )
{
if ( pressure_out[i] != pressure_in[i] ) {
if ( !FLT_ABS_EQUAL(pressure_out[i], pressure_in[i]) ) {
goto out;
}
}
@ -1265,7 +1265,7 @@ static int test_table(hid_t fid, int do_write)
for( i = 0; i < NRECORDS; i++ )
{
if ( ( HDstrcmp( namepre_out[i].name, namepre_in[i].name ) != 0 ) ||
namepre_out[i].pressure != namepre_in[i].pressure ) {
!FLT_ABS_EQUAL(namepre_out[i].pressure,namepre_in[i].pressure) ) {
goto out;
}
}
@ -1294,7 +1294,7 @@ static int test_table(hid_t fid, int do_write)
{
hsize_t iistart = start;
if ( ( HDstrcmp( namepre_out[i].name, namepre_in[iistart+i].name ) != 0 ) ||
namepre_out[i].pressure != namepre_in[iistart+i].pressure ) {
!FLT_ABS_EQUAL(namepre_out[i].pressure, namepre_in[iistart+i].pressure) ) {
goto out;
}
}
@ -1353,7 +1353,7 @@ static int test_table(hid_t fid, int do_write)
{
if ( rbuf[i].lati != position_in[i-NRECORDS_ADD+1].lati ||
rbuf[i].longi != position_in[i-NRECORDS_ADD+1].longi ||
rbuf[i].pressure != pressure_in[i-NRECORDS_ADD+1] )
!FLT_ABS_EQUAL(rbuf[i].pressure,pressure_in[i-NRECORDS_ADD+1]) )
goto out;
}
}
@ -1406,7 +1406,7 @@ static int test_table(hid_t fid, int do_write)
/* compare the extracted table with the initial values */
for( i = 0; i < NRECORDS; i++ )
{
if ( pressure_out[i] != pressure_in[i] ) {
if ( !FLT_ABS_EQUAL(pressure_out[i], pressure_in[i]) ) {
goto out;
}
}
@ -1471,10 +1471,10 @@ static int test_table(hid_t fid, int do_write)
/* compare the extracted table with the initial values */
for( i = 0; i < NRECORDS; i++ )
{
if ( ( HDstrcmp( namepre_out[i].name, namepre_in[i].name ) != 0 ) ||
namepre_out[i].pressure != namepre_in[i].pressure ) {
goto out;
}
if ( ( HDstrcmp( namepre_out[i].name, namepre_in[i].name ) != 0 ) ||
!FLT_ABS_EQUAL(namepre_out[i].pressure,namepre_in[i].pressure) ) {
goto out;
}
}
/* reset buffer */
@ -1502,8 +1502,8 @@ static int test_table(hid_t fid, int do_write)
for( i = 0; i < 3; i++ )
{
int iistart = (int) start;
if ( ( HDstrcmp( namepre_out[i].name, wbuf[iistart+i].name ) != 0 ) ||
namepre_out[i].pressure != wbuf[iistart+i].pressure ) {
if ( ( HDstrcmp( namepre_out[i].name, wbuf[iistart+(int)i].name ) != 0 ) ||
!FLT_ABS_EQUAL(namepre_out[i].pressure, wbuf[iistart+(int)i].pressure) ) {
goto out;
}
}
@ -1546,8 +1546,8 @@ static int test_table(hid_t fid, int do_write)
if ( ( HDstrcmp( rbuf2[i].name, wbuf[i].name ) != 0 ) ||
rbuf2[i].lati != wbuf[i].lati ||
rbuf2[i].longi != wbuf[i].longi ||
rbuf2[i].pressure != wbuf[i].pressure ||
rbuf2[i].temperature != wbuf[i].temperature ||
!FLT_ABS_EQUAL(rbuf2[i].pressure,wbuf[i].pressure) ||
!DBL_ABS_EQUAL(rbuf2[i].temperature,wbuf[i].temperature) ||
rbuf2[i].new_field != buf_new[i] ) {
goto out;
}
@ -1587,7 +1587,7 @@ static int test_table(hid_t fid, int do_write)
if ( ( HDstrcmp( rbuf3[i].name, wbuf[i].name ) != 0 ) ||
rbuf3[i].lati != wbuf[i].lati ||
rbuf3[i].longi != wbuf[i].longi ||
rbuf3[i].temperature != wbuf[i].temperature ) {
!DBL_ABS_EQUAL(rbuf3[i].temperature,wbuf[i].temperature) ) {
goto out;
}
}