diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-08-28 15:54:42 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-08-28 15:54:54 (GMT) |
commit | 27af9a7922550a71a2e9d2b9f6a9f60aef0b4dda (patch) | |
tree | fe52ff7c826a75c89bab18078e146ea4a9de4b92 /tools | |
parent | 553b1a01f89265fc2f01c15687ddae40e6d1d81d (diff) | |
download | hdf5-27af9a7922550a71a2e9d2b9f6a9f60aef0b4dda.zip hdf5-27af9a7922550a71a2e9d2b9f6a9f60aef0b4dda.tar.gz hdf5-27af9a7922550a71a2e9d2b9f6a9f60aef0b4dda.tar.bz2 |
HD prefix and whitespace
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/h5tools_utils.h | 2 | ||||
-rw-r--r-- | tools/src/h5diff/h5diff_common.c | 6 | ||||
-rw-r--r-- | tools/src/h5import/h5import.c | 302 | ||||
-rw-r--r-- | tools/src/h5stat/h5stat.c | 88 | ||||
-rw-r--r-- | tools/test/h5import/h5importtest.c | 4 | ||||
-rw-r--r-- | tools/test/perform/perf.c | 70 |
6 files changed, 236 insertions, 236 deletions
diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h index a31ba3a..4c2bf1e 100644 --- a/tools/lib/h5tools_utils.h +++ b/tools/lib/h5tools_utils.h @@ -157,7 +157,7 @@ typedef struct { /* obtain link info from H5tools_get_symlink_info() */ typedef struct { H5O_type_t trg_type; /* OUT: target type */ - char *trg_path; /* OUT: target obj path. This must be freed + char *trg_path; /* OUT: target obj path. This must be freed * when used with H5tools_get_symlink_info() */ haddr_t objno; /* OUT: target object address */ unsigned long fileno; /* OUT: File number that target object is located in */ diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index 8f09c81..0c1521e 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -350,7 +350,7 @@ check_n_input( const char *str ) unsigned i; char c; - for (i = 0; i < strlen(str); i++) { + for (i = 0; i < HDstrlen(str); i++) { c = str[i]; if (i == 0) { if (c < 49 || c > 57) /* ascii values between 1 and 9 */ @@ -387,7 +387,7 @@ check_p_input( const char *str ) the atof return value on a hexadecimal input is different on some systems; we do a character check for this */ - if (strlen(str) > 2 && str[0] == '0' && str[1] == 'x') + if (HDstrlen(str) > 2 && str[0] == '0' && str[1] == 'x') return -1; x = atof(str); @@ -421,7 +421,7 @@ check_d_input( const char *str ) the atof return value on a hexadecimal input is different on some systems; we do a character check for this */ - if (strlen(str) > 2 && str[0] == '0' && str[1] == 'x') + if (HDstrlen(str) > 2 && str[0] == '0' && str[1] == 'x') return -1; x = atof(str); diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c index 76e78af..3b64a0e 100644 --- a/tools/src/h5import/h5import.c +++ b/tools/src/h5import/h5import.c @@ -494,7 +494,7 @@ static int readIntegerData(FILE *strm, struct Input *in) return (-1); } #ifdef H5DEBUGIMPORT - printf("readIntegerData %d (0x%.8X)\n", *in08, *in08); + HDprintf("readIntegerData %d (0x%.8X)\n", *in08, *in08); #endif } break; @@ -531,7 +531,7 @@ static int readIntegerData(FILE *strm, struct Input *in) */ *in16 = temp16; #ifdef H5DEBUGIMPORT - printf("readIntegerData %d (0x%.8X)\n", *in16, temp16); + HDprintf("readIntegerData %d (0x%.8X)\n", *in16, temp16); #endif } break; @@ -567,7 +567,7 @@ static int readIntegerData(FILE *strm, struct Input *in) */ *in32 = temp32; #ifdef H5DEBUGIMPORT - printf("readIntegerData %d (0x%.8X = 0x%.8X)\n", *in32, *in32, temp32); + HDprintf("readIntegerData %d (0x%.8X = 0x%.8X)\n", *in32, *in32, temp32); #endif } break; @@ -605,7 +605,7 @@ static int readIntegerData(FILE *strm, struct Input *in) */ *in64 = temp64; #ifdef H5DEBUGIMPORT - printf("readIntegerData %d (0x%.8X)\n", *in64, temp64); + HDprintf("readIntegerData %d (0x%.8X)\n", *in64, temp64); #endif } break; @@ -701,7 +701,7 @@ static int readUIntegerData(FILE *strm, struct Input *in) */ *in16 = temp16; #ifdef H5DEBUGIMPORT - printf("readUIntegerData %d (0x%.4X = 0x%.4X)\n", *in16, *in16, temp16); + HDprintf("readUIntegerData %d (0x%.4X = 0x%.4X)\n", *in16, *in16, temp16); #endif } break; @@ -737,7 +737,7 @@ static int readUIntegerData(FILE *strm, struct Input *in) */ *in32 = temp32; #ifdef H5DEBUGIMPORT - printf("readUIntegerData %d (0x%.8X = 0x%.8X)\n", *in32, *in32, temp32); + HDprintf("readUIntegerData %d (0x%.8X = 0x%.8X)\n", *in32, *in32, temp32); #endif } break; @@ -775,7 +775,7 @@ static int readUIntegerData(FILE *strm, struct Input *in) */ *in64 = temp64; #ifdef H5DEBUGIMPORT - printf("readUIntegerData %ld (0x%.8X = 0x%.8X)\n", *in64, *in64, temp64); + HDprintf("readUIntegerData %ld (0x%.8X = 0x%.8X)\n", *in64, *in64, temp64); #endif } break; @@ -855,7 +855,7 @@ static int readFloatData(FILE *strm, struct Input *in) */ *bfp32 = temp32; #ifdef H5DEBUGIMPORT - printf("readFloatData %ld (0x%.8X = 0x%.8X)\n", *bfp32, *bfp32, temp32); + HDprintf("readFloatData %ld (0x%.8X = 0x%.8X)\n", *bfp32, *bfp32, temp32); #endif } break; @@ -907,7 +907,7 @@ static int readFloatData(FILE *strm, struct Input *in) */ *bfp64 = temp64; #ifdef H5DEBUGIMPORT - printf("readFloatData %ld (0x%.16lX)\n", *bfp64, temp64); + HDprintf("readFloatData %ld (0x%.16lX)\n", *bfp64, temp64); #endif } break; @@ -1099,7 +1099,7 @@ static int processStrHDFData(FILE *strm, struct Input *in, hid_t file_id) *------------------------------------------------------------------------- */ #ifdef H5DEBUGIMPORT - printf("processStrHDFData DATATYPE STRING\n"); + HDprintf("processStrHDFData DATATYPE STRING\n"); #endif if ((type_id = H5Tcopy(H5T_C_S1)) < 0) @@ -1136,7 +1136,7 @@ static int processStrHDFData(FILE *strm, struct Input *in, hid_t file_id) } H5E_END_TRY; #ifdef H5DEBUGIMPORT - printf("processStrHDFData DATATYPE STRING groups created\n"); + HDprintf("processStrHDFData DATATYPE STRING groups created\n"); #endif if ((space_id = H5Screate_simple(in->rank, in->sizeOfDimension, NULL)) < 0) @@ -1149,7 +1149,7 @@ static int processStrHDFData(FILE *strm, struct Input *in, hid_t file_id) goto out; #ifdef H5DEBUGIMPORT - printf("processStrHDFData DATATYPE STRING ready to process strings\n"); + HDprintf("processStrHDFData DATATYPE STRING ready to process strings\n"); #endif line = 0; j = 0; @@ -1159,36 +1159,36 @@ static int processStrHDFData(FILE *strm, struct Input *in, hid_t file_id) str2 = NULL; str3 = NULL; #ifdef H5DEBUGIMPORT - printf("processStrHDFData DATATYPE STRING[%llu]={%s}\n", (unsigned long long)line, str1); + HDprintf("processStrHDFData DATATYPE STRING[%llu]={%s}\n", (unsigned long long)line, str1); #endif /* process string to remove the first and last quote char */ str2 = strchr(str1, '"'); if (str2 != NULL) { #ifdef H5DEBUGIMPORT - printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", strlen(str2), str2); + HDprintf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2); #endif str2++; #ifdef H5DEBUGIMPORT - printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", strlen(str2), str2); + HDprintf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2); #endif str3 = strrchr(str2, '"'); if (str3 != NULL) { #ifdef H5DEBUGIMPORT - printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", strlen(str3), str3); + HDprintf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str3), str3); #endif *str3 = '\0'; #ifdef H5DEBUGIMPORT - printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", strlen(str2), str2); + HDprintf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2); #endif - if(strlen(str2) > 0) { + if(HDstrlen(str2) > 0) { hid_t fspace_id; hsize_t start[1]; hsize_t count[1] = { 1 }; #ifdef H5DEBUGIMPORT - printf("processStrHDFData DATATYPE STRING[%llu] store %s\n", (unsigned long long)line, str2); + HDprintf("processStrHDFData DATATYPE STRING[%llu] store %s\n", (unsigned long long)line, str2); #endif if ((fspace_id = H5Dget_space(dset_id)) < 0) goto out; @@ -1210,7 +1210,7 @@ static int processStrHDFData(FILE *strm, struct Input *in, hid_t file_id) j++; } #ifdef H5DEBUGIMPORT - printf("processStrHDFData DATATYPE STRING eof reached\n"); + HDprintf("processStrHDFData DATATYPE STRING eof reached\n"); #endif /* close */ @@ -1223,7 +1223,7 @@ static int processStrHDFData(FILE *strm, struct Input *in, hid_t file_id) out: #ifdef H5DEBUGIMPORT - printf("processStrHDFData DATATYPE STRING error exit\n"); + HDprintf("processStrHDFData DATATYPE STRING error exit\n"); #endif /* disable error reporting */ H5E_BEGIN_TRY @@ -1437,7 +1437,7 @@ static int processConfigurationFile(char *infile, struct Input *in) } in->inputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif in->inputArchitecture = 0; /* default to NATIVE */ @@ -1450,7 +1450,7 @@ static int processConfigurationFile(char *infile, struct Input *in) if((scanret == 1) && !HDstrcmp("HDF5", key)) { #ifdef H5DEBUGIMPORT int pndx; - printf("\nh5dump file\n"); + HDprintf("\nh5dump file\n"); #endif in->h5dumpInput = 1; scanret = fscanf(strm, "%s", temp); /* filename */ @@ -1459,7 +1459,7 @@ static int processConfigurationFile(char *infile, struct Input *in) while (scanret == 1) { if(!HDstrcmp("DATASET", key)) { /* PATH */ #ifdef H5DEBUGIMPORT - printf("h5dump DATASET key\n"); + HDprintf("h5dump DATASET key\n"); #endif if (in->configOptionVector[PATH] == 1) { (void) HDfprintf(stderr, err3a, infile); @@ -1470,7 +1470,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATASET %s found\n", temp); + HDprintf("h5dump DATASET %s found\n", temp); #endif if (parsePathInfo(&in->path, temp) == -1) { (void) HDfprintf(stderr, err3b, infile); @@ -1479,12 +1479,12 @@ static int processConfigurationFile(char *infile, struct Input *in) in->configOptionVector[PATH] = 1; scanret = fscanf(strm, "%s", temp); /* start bracket */ #ifdef H5DEBUGIMPORT - printf("h5dump DATASET %s found\n", temp); + HDprintf("h5dump DATASET %s found\n", temp); #endif } /* if(!HDstrcmp("DATASET", key)) PATH */ else if(!HDstrcmp("DATATYPE", key)) { /* INPUT-CLASS */ #ifdef H5DEBUGIMPORT - printf("h5dump DATATYPE key\n"); + HDprintf("h5dump DATATYPE key\n"); #endif if (in->configOptionVector[INPUT_CLASS] == 1) { (void) HDfprintf(stderr, err4a, infile); @@ -1496,14 +1496,14 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATATYPE %s found\n", temp); + HDprintf("h5dump DATATYPE %s found\n", temp); #endif if ((kindex = getInputClassType(in, temp)) == -1) { (void) HDfprintf(stderr, err4b, infile); goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATATYPE type %d inputClass\n", in->inputClass); + HDprintf("h5dump DATATYPE type %d inputClass\n", in->inputClass); #endif in->configOptionVector[INPUT_CLASS] = 1; @@ -1519,21 +1519,21 @@ static int processConfigurationFile(char *infile, struct Input *in) in->outputClass = 2; } #ifdef H5DEBUGIMPORT - printf("h5dump DATATYPE type %d outputClass\n", in->outputClass); + HDprintf("h5dump DATATYPE type %d outputClass\n", in->outputClass); #endif if(in->inputClass == 5) { /* STRING */ int get_next_prop = 1; in->outputClass = -1; #ifdef H5DEBUGIMPORT - printf("h5dump DATATYPE STRING found\n"); + HDprintf("h5dump DATATYPE STRING found\n"); #endif if (fscanf(strm, "%s", temp) != 1) { /* start bracket */ (void) HDfprintf(stderr, "%s", err18); goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATATYPE STRING %s found\n", temp); + HDprintf("h5dump DATATYPE STRING %s found\n", temp); #endif if (fscanf(strm, "%s", temp) != 1) { /* string properties */ (void) HDfprintf(stderr, "%s", err18); @@ -1546,7 +1546,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATATYPE STRING STRSIZE %s found\n", temp); + HDprintf("h5dump DATATYPE STRING STRSIZE %s found\n", temp); #endif if (HDstrcmp("H5T_VARIABLE;", temp)) { char *more = temp; @@ -1556,7 +1556,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATATYPE STRING %d InputSize\n", in->inputSize); + HDprintf("h5dump DATATYPE STRING %d InputSize\n", in->inputSize); #endif } } @@ -1566,7 +1566,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATATYPE STRING STRPAD %s found\n", temp); + HDprintf("h5dump DATATYPE STRING STRPAD %s found\n", temp); #endif } else if(!HDstrcmp("CSET", key)) { /* CSET */ @@ -1575,7 +1575,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATATYPE STRING CSET %s found\n", temp); + HDprintf("h5dump DATATYPE STRING CSET %s found\n", temp); #endif } @@ -1585,7 +1585,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATATYPE STRING CTYPE %s found\n", temp); + HDprintf("h5dump DATATYPE STRING CTYPE %s found\n", temp); #endif } /* if(!HDstrcmp("CSET", key)) */ if (fscanf(strm, "%s", temp) != 1) { @@ -1593,7 +1593,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATATYPE STRING %s found\n", temp); + HDprintf("h5dump DATATYPE STRING %s found\n", temp); #endif if(!HDstrcmp("}", temp)) { /* end bracket */ get_next_prop = 0; @@ -1605,7 +1605,7 @@ static int processConfigurationFile(char *infile, struct Input *in) hsize_t temp_dims[MAX_NUM_DIMENSION]; #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE key\n"); + HDprintf("h5dump DATASPACE key\n"); #endif if (fscanf(strm, "%s", temp) != 1) { (void) HDfprintf(stderr, "%s", err18); @@ -1621,21 +1621,21 @@ static int processConfigurationFile(char *infile, struct Input *in) else if(!HDstrcmp("SIMPLE", temp)) { /* SIMPLE */ int icount = 0; #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE found\n"); + HDprintf("h5dump DATASPACE SIMPLE found\n"); #endif if (fscanf(strm, "%s", temp) != 1) { /* start bracket */ (void) HDfprintf(stderr, err6b, infile); goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE %s found\n", temp); + HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp); #endif if (fscanf(strm, "%s", temp) != 1) { /* start paren */ (void) HDfprintf(stderr, err6b, infile); goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE %s found\n", temp); + HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp); #endif if(!HDstrcmp("(", temp)) { /* start paren */ int get_next_dim = 1; @@ -1646,7 +1646,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE %s found\n", temp); + HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp); #endif while (get_next_dim) { char *more = temp; @@ -1656,7 +1656,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE %s found\n", temp); + HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp); #endif if(!HDstrcmp(")", temp)) { /* end paren */ in->rank = ++icount; @@ -1676,17 +1676,17 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE %ld rank\n", in->rank); + HDprintf("h5dump DATASPACE SIMPLE %ld rank\n", in->rank); #endif for (i = 0; i < in->rank; i++) { in->sizeOfDimension[i] = temp_dims[i]; } #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE dims[%ld]:", in->rank); + HDprintf("h5dump DATASPACE SIMPLE dims[%ld]:", in->rank); for (pndx = 0; pndx < in->rank; pndx++) { - printf(" %ld", in->sizeOfDimension[pndx]); + HDprintf(" %ld", in->sizeOfDimension[pndx]); } - printf("\n"); + HDprintf("\n"); #endif in->configOptionVector[DIM] = 1; } /* if(!HDstrcmp("(", key)) start paren */ @@ -1699,7 +1699,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE %s found\n", temp); + HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp); #endif if(!HDstrcmp("/", temp)) { /* / max dims */ if ((in->maxsizeOfDimension = (hsize_t *) HDmalloc ((size_t) in->rank * sizeof(hsize_t))) == NULL) { @@ -1710,25 +1710,25 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE %s found\n", temp); + HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp); #endif if(!HDstrcmp("(", temp)) { /* start paren */ int get_next_dim = 1; int i = 0; #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE process max dim values\n"); + HDprintf("h5dump DATASPACE SIMPLE process max dim values\n"); #endif if (fscanf(strm, "%s", temp) != 1) { /* max dim with optional comma */ (void) HDfprintf(stderr, err16c, infile); goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE %s found\n", temp); + HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp); #endif while (get_next_dim) { #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE get max dim value\n"); + HDprintf("h5dump DATASPACE SIMPLE get max dim value\n"); #endif if(!HDstrcmp("H5S_UNLIMITED", temp) || !HDstrcmp("H5S_UNLIMITED,", temp)) { /* unlimited */ in->maxsizeOfDimension[i] = H5S_UNLIMITED; @@ -1743,7 +1743,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE %s found\n", temp); + HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp); #endif if(!HDstrcmp(")", temp)) { /* end paren */ get_next_dim = 0; @@ -1757,12 +1757,12 @@ static int processConfigurationFile(char *infile, struct Input *in) } } /* while (get_next_dim) */ #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE maxdims[%ld]:", in->rank); + HDprintf("h5dump DATASPACE SIMPLE maxdims[%ld]:", in->rank); for (pndx = 0; pndx < in->rank; pndx++) { - printf(" %ld", in->maxsizeOfDimension[pndx]); + HDprintf(" %ld", in->maxsizeOfDimension[pndx]); } - printf("\n"); - printf("h5dump DATASPACE SIMPLE get max dim finished\n"); + HDprintf("\n"); + HDprintf("h5dump DATASPACE SIMPLE get max dim finished\n"); #endif } /* if(!HDstrcmp("(", key)) start paren */ else { @@ -1771,7 +1771,7 @@ static int processConfigurationFile(char *infile, struct Input *in) } scanret = fscanf(strm, "%s", temp); /* end bracket */ #ifdef H5DEBUGIMPORT - printf("h5dump DATASPACE SIMPLE %s found\n", temp); + HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp); #endif } /* if(!HDstrcmp("/", key)) max dims separator */ } /* else if(!HDstrcmp("SIMPLE", key)) */ @@ -1782,21 +1782,21 @@ static int processConfigurationFile(char *infile, struct Input *in) } /* else if(!HDstrcmp("DATASPACE", key)) RANK and DIMENSIONS */ else if(!HDstrcmp("STORAGE_LAYOUT", key)) { /* CHUNKED-DIMENSION-SIZES */ #ifdef H5DEBUGIMPORT - printf("h5dump STORAGE_LAYOUT key\n"); + HDprintf("h5dump STORAGE_LAYOUT key\n"); #endif if (fscanf(strm, "%s", temp) != 1) { /* start bracket */ (void) HDfprintf(stderr, err6b, infile); goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump STORAGE_LAYOUT %s found\n", temp); + HDprintf("h5dump STORAGE_LAYOUT %s found\n", temp); #endif if (fscanf(strm, "%s", temp) != 1) { /* CHUNKED */ (void) HDfprintf(stderr, err6b, infile); goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump STORAGE_LAYOUT %s found\n", temp); + HDprintf("h5dump STORAGE_LAYOUT %s found\n", temp); #endif if(!HDstrcmp("CHUNKED", temp)) { /* CHUNKED */ if ((in->sizeOfChunk = (hsize_t *) HDmalloc ((size_t) in->rank * sizeof(hsize_t))) == NULL) { @@ -1808,7 +1808,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp); + HDprintf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp); #endif if(!HDstrcmp("(", temp)) { /* start paren */ int get_next_dim = 1; @@ -1819,7 +1819,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp); + HDprintf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp); #endif while (get_next_dim) { char *more = temp; @@ -1829,7 +1829,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp); + HDprintf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp); #endif if(!HDstrcmp(")", temp)) { /* end paren */ in->configOptionVector[RANK] = 1; @@ -1844,11 +1844,11 @@ static int processConfigurationFile(char *infile, struct Input *in) } } /* while (get_next_dim) */ #ifdef H5DEBUGIMPORT - printf("h5dump STORAGE_LAYOUT CHUNKED dims [%ld]:", in->rank); + HDprintf("h5dump STORAGE_LAYOUT CHUNKED dims [%ld]:", in->rank); for (pndx = 0; pndx < in->rank; pndx++) { - printf(" %ld", in->sizeOfChunk[pndx]); + HDprintf(" %ld", in->sizeOfChunk[pndx]); } - printf("\n"); + HDprintf("\n"); #endif in->configOptionVector[DIM] = 1; } /* if(!HDstrcmp("(", key)) start paren */ @@ -1861,7 +1861,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp); + HDprintf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp); #endif if(!HDstrcmp("SIZE", temp)) { /* SIZE */ if (fscanf(strm, "%d", (&ival)) != 1) { @@ -1869,7 +1869,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump STORAGE_LAYOUT CHUNKED SIZE %d found\n", ival); + HDprintf("h5dump STORAGE_LAYOUT CHUNKED SIZE %d found\n", ival); #endif } while (HDstrcmp("}", temp)) { @@ -1878,7 +1878,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp); + HDprintf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp); #endif } in->configOptionVector[CHUNK] = 1; @@ -1886,53 +1886,53 @@ static int processConfigurationFile(char *infile, struct Input *in) } /* else if(!HDstrcmp("STORAGE_LAYOUT", key)) CHUNKED-DIMENSION-SIZES */ else if(!HDstrcmp("FILTERS", key)) { /* FILTERS */ #ifdef H5DEBUGIMPORT - printf("h5dump FILTERS key\n"); + HDprintf("h5dump FILTERS key\n"); #endif if (fscanf(strm, "%s", temp) != 1) { /* start bracket */ (void) HDfprintf(stderr, err6b, infile); goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump FILTERS %s found\n", temp); + HDprintf("h5dump FILTERS %s found\n", temp); #endif if (fscanf(strm, "%s", temp) != 1) { (void) HDfprintf(stderr, err6b, infile); goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump FILTERS %s found\n", temp); + HDprintf("h5dump FILTERS %s found\n", temp); #endif if(!HDstrcmp("COMPRESSION", temp)) { /* COMPRESSION */ #ifdef H5DEBUGIMPORT - printf("h5dump FILTERS COMPRESSION found\n"); + HDprintf("h5dump FILTERS COMPRESSION found\n"); #endif if (fscanf(strm, "%s", temp) != 1) { /* DEFLATE */ (void) HDfprintf(stderr, "%s", err18); goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump FILTERS COMPRESSION %s found\n", temp); + HDprintf("h5dump FILTERS COMPRESSION %s found\n", temp); #endif if (fscanf(strm, "%s", temp) != 1) { /* bgin bracket */ (void) HDfprintf(stderr, "%s", err18); goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump FILTERS COMPRESSION %s found\n", temp); + HDprintf("h5dump FILTERS COMPRESSION %s found\n", temp); #endif if (fscanf(strm, "%s", temp) != 1) { /* LEVEL */ (void) HDfprintf(stderr, "%s", err18); goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump FILTERS COMPRESSION %s found\n", temp); + HDprintf("h5dump FILTERS COMPRESSION %s found\n", temp); #endif if (fscanf(strm, "%d", (&ival)) != 1) { (void) HDfprintf(stderr, "%s", err19); goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump FILTERS COMPRESSION LEVEL %d found\n", ival); + HDprintf("h5dump FILTERS COMPRESSION LEVEL %d found\n", ival); #endif in->compressionParam = ival; if (fscanf(strm, "%s", temp) != 1) { /* end bracket */ @@ -1940,20 +1940,20 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump FILTERS COMPRESSION %s found\n", temp); + HDprintf("h5dump FILTERS COMPRESSION %s found\n", temp); #endif in->compressionType = 0; /* ONLY GZIP supported */ in->configOptionVector[COMPRESS] = 1; } else if(!HDstrcmp("CONTIGUOUS", temp)) { /* CONTIGUOUS */ #ifdef H5DEBUGIMPORT - printf("h5dump FILTERS CONTIGUOUS found\n"); + HDprintf("h5dump FILTERS CONTIGUOUS found\n"); #endif in->configOptionVector[COMPRESS] = 0; } else if(!HDstrcmp("NONE", temp)) { /* NONE */ #ifdef H5DEBUGIMPORT - printf("h5dump FILTERS NONE found\n"); + HDprintf("h5dump FILTERS NONE found\n"); #endif in->configOptionVector[COMPRESS] = 0; } @@ -1962,28 +1962,28 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump FILTERS %s found\n", temp); + HDprintf("h5dump FILTERS %s found\n", temp); #endif } else if(!HDstrcmp("SUBSET", key)) { /* reduce dimensions */ hsize_t temp_dims[MAX_NUM_DIMENSION]; int get_next_prop = 1; #ifdef H5DEBUGIMPORT - printf("h5dump SUBSET key\n"); + HDprintf("h5dump SUBSET key\n"); #endif if (fscanf(strm, "%s", temp) != 1) { /* start bracket */ (void) HDfprintf(stderr, err20, infile); goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump SUBSET %s found\n", temp); + HDprintf("h5dump SUBSET %s found\n", temp); #endif if (fscanf(strm, "%s", temp) != 1) { /* SUBSET keyword */ (void) HDfprintf(stderr, "%s", err18); goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump SUBSET %s found\n", temp); + HDprintf("h5dump SUBSET %s found\n", temp); #endif while (get_next_prop) { if(!HDstrcmp("COUNT", temp)) { /* COUNT */ @@ -1993,7 +1993,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump SUBSET %s found\n", temp); + HDprintf("h5dump SUBSET %s found\n", temp); #endif if(!HDstrcmp("(", temp)) { /* start paren */ int get_next_dim = 1; @@ -2004,7 +2004,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump SUBSET COUNT [%s] found\n", temp); + HDprintf("h5dump SUBSET COUNT [%s] found\n", temp); #endif while (get_next_dim) { char *more = temp; @@ -2014,7 +2014,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump SUBSET COUNT %s found\n", temp); + HDprintf("h5dump SUBSET COUNT %s found\n", temp); #endif if(!HDstrcmp(");", temp)) { /* end paren */ in->rank = ++icount; @@ -2033,11 +2033,11 @@ static int processConfigurationFile(char *infile, struct Input *in) in->sizeOfDimension[i] = temp_dims[i]; } #ifdef H5DEBUGIMPORT - printf("h5dump SUBSET COUNT dims: [%d]", in->rank); + HDprintf("h5dump SUBSET COUNT dims: [%d]", in->rank); for (pndx = 0; pndx < in->rank; pndx++) { - printf(" %ld", in->sizeOfDimension[pndx]); + HDprintf(" %ld", in->sizeOfDimension[pndx]); } - printf("\n"); + HDprintf("\n"); #endif in->configOptionVector[DIM] = 1; } /* if(!HDstrcmp("(", key)) start paren */ @@ -2049,7 +2049,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump SUBSET %s found\n", temp); + HDprintf("h5dump SUBSET %s found\n", temp); #endif if(!HDstrcmp("(", temp)) { /* start paren */ int get_next_dim = 1; @@ -2060,7 +2060,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump SUBSET BLOCK [%s] found\n", temp); + HDprintf("h5dump SUBSET BLOCK [%s] found\n", temp); #endif while (get_next_dim) { char *more = temp; @@ -2070,7 +2070,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump SUBSET BLOCK %s found\n", temp); + HDprintf("h5dump SUBSET BLOCK %s found\n", temp); #endif if(!HDstrcmp(");", temp)) { /* end paren */ in->rank = ++icount; @@ -2089,11 +2089,11 @@ static int processConfigurationFile(char *infile, struct Input *in) in->sizeOfDimension[i] = in->sizeOfDimension[i] * temp_dims[i]; } #ifdef H5DEBUGIMPORT - printf("h5dump SUBSET BLOCK dims: [%d]", in->rank); + HDprintf("h5dump SUBSET BLOCK dims: [%d]", in->rank); for (pndx = 0; pndx < in->rank; pndx++) { - printf(" %ld", in->sizeOfDimension[pndx]); + HDprintf(" %ld", in->sizeOfDimension[pndx]); } - printf("\n"); + HDprintf("\n"); #endif in->configOptionVector[DIM] = 1; } /* if(!HDstrcmp("(", key)) start paren */ @@ -2103,7 +2103,7 @@ static int processConfigurationFile(char *infile, struct Input *in) goto error; } #ifdef H5DEBUGIMPORT - printf("h5dump SUBSET %s found\n", temp); + HDprintf("h5dump SUBSET %s found\n", temp); #endif if(!HDstrcmp("}", temp)) { /* end bracket */ get_next_prop = 0; @@ -2112,7 +2112,7 @@ static int processConfigurationFile(char *infile, struct Input *in) } /* else if(!HDstrcmp("SUBSET", key)) */ else if(!HDstrcmp("DATA", key)) { /* FINSHED */ #ifdef H5DEBUGIMPORT - printf("h5dump DATA key\n"); + HDprintf("h5dump DATA key\n"); #endif scanret = 0; break; @@ -2120,32 +2120,32 @@ static int processConfigurationFile(char *infile, struct Input *in) scanret = fscanf(strm, "%s", key); } #ifdef H5DEBUGIMPORT - printf("h5dump path"); + HDprintf("h5dump path"); for (pndx = 0; pndx < in->path.count; pndx++) { - printf(" : %s", in->path.group[pndx]); - } - printf("\n"); - printf("h5dump inputClass=%d\n", in->inputClass); - printf("h5dump inputSize=%d\n", in->inputSize); - printf("h5dump inputArchitecture=%d\n", in->inputArchitecture); - printf("h5dump inputByteOrder=%d\n", in->inputByteOrder); - printf("h5dump rank=%d\n", in->rank); - printf("h5dump outputClass=%d\n", in->outputClass); - printf("h5dump outputSize=%d\n", in->outputSize); - printf("h5dump outputArchitecture=%d\n", in->outputArchitecture); - printf("h5dump outputByteOrder=%d\n", in->outputByteOrder); - printf("h5dump compressionType=%d\n", in->compressionType); - printf("h5dump compressionParam=%d\n", in->compressionParam); - printf("h5dump externFilename=%s\n", in->externFilename); - printf("h5dump sizeOfDimensions:\n"); + HDprintf(" : %s", in->path.group[pndx]); + } + HDprintf("\n"); + HDprintf("h5dump inputClass=%d\n", in->inputClass); + HDprintf("h5dump inputSize=%d\n", in->inputSize); + HDprintf("h5dump inputArchitecture=%d\n", in->inputArchitecture); + HDprintf("h5dump inputByteOrder=%d\n", in->inputByteOrder); + HDprintf("h5dump rank=%d\n", in->rank); + HDprintf("h5dump outputClass=%d\n", in->outputClass); + HDprintf("h5dump outputSize=%d\n", in->outputSize); + HDprintf("h5dump outputArchitecture=%d\n", in->outputArchitecture); + HDprintf("h5dump outputByteOrder=%d\n", in->outputByteOrder); + HDprintf("h5dump compressionType=%d\n", in->compressionType); + HDprintf("h5dump compressionParam=%d\n", in->compressionParam); + HDprintf("h5dump externFilename=%s\n", in->externFilename); + HDprintf("h5dump sizeOfDimensions:\n"); for (pndx = 0; pndx < in->rank; pndx++) { - printf(" %ld\n", in->sizeOfDimension[pndx]); + HDprintf(" %ld\n", in->sizeOfDimension[pndx]); } #endif } else { #ifdef H5DEBUGIMPORT - printf("original option keyword parsing\n"); + HDprintf("original option keyword parsing\n"); #endif while (scanret == 1) { if ((kindex = mapKeywordToIndex(key)) == -1) { @@ -2655,7 +2655,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 4; @@ -2676,7 +2676,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 4; @@ -2697,7 +2697,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 4; @@ -2718,7 +2718,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 4; @@ -2739,7 +2739,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 4; @@ -2760,7 +2760,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 4; @@ -2781,7 +2781,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 4; @@ -2802,7 +2802,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 4; @@ -2823,7 +2823,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 7; @@ -2844,7 +2844,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 7; @@ -2865,7 +2865,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 7; @@ -2886,7 +2886,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 7; @@ -2907,7 +2907,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 7; @@ -2928,7 +2928,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 7; @@ -2949,7 +2949,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 7; @@ -2970,7 +2970,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 7; @@ -3111,7 +3111,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 3; @@ -3132,7 +3132,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 3; @@ -3153,7 +3153,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 3; @@ -3174,7 +3174,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = 3; @@ -3250,7 +3250,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = -1; @@ -3269,7 +3269,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = -1; @@ -3288,7 +3288,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = -1; @@ -3307,7 +3307,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = -1; @@ -3326,7 +3326,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = -1; @@ -3345,7 +3345,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = -1; @@ -3364,7 +3364,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = -1; @@ -3383,7 +3383,7 @@ static int getInputClassType(struct Input *in, char * buffer) } in->outputByteOrder = kindex; #ifdef H5DEBUGIMPORT - printf("h5dump inputByteOrder %d\n", in->inputByteOrder); + HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder); #endif kindex = -1; @@ -3422,9 +3422,9 @@ static int getInputClassType(struct Input *in, char * buffer) if (in->configOptionVector[OUTPUT_SIZE] == 0) in->outputSize = in->inputSize; #ifdef H5DEBUGIMPORT - printf("h5dump DATATYPE InClass %d inputSize\n", in->inputSize); - printf("h5dump DATATYPE InClass %d outputSize\n", in->outputSize); - printf("h5dump DATATYPE InClass %d outputArchitecture\n", in->outputArchitecture); + HDprintf("h5dump DATATYPE InClass %d inputSize\n", in->inputSize); + HDprintf("h5dump DATATYPE InClass %d outputSize\n", in->outputSize); + HDprintf("h5dump DATATYPE InClass %d outputArchitecture\n", in->outputArchitecture); #endif in->inputClass = kindex; @@ -4631,7 +4631,7 @@ static int process(struct Options *opt) intype = createInputDataType(in); outtype = createOutputDataType(in); #ifdef H5DEBUGIMPORT - printf("process intype %ld outtype %ld\n", intype, outtype); + HDprintf("process intype %ld outtype %ld\n", intype, outtype); #endif /* create property list */ diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c index ff67cf1..dc1dc4a 100644 --- a/tools/src/h5stat/h5stat.c +++ b/tools/src/h5stat/h5stat.c @@ -24,11 +24,11 @@ /* Parameters to control statistics gathered */ /* Default threshold for small groups/datasets/attributes */ -#define DEF_SIZE_SMALL_GROUPS 10 -#define DEF_SIZE_SMALL_DSETS 10 -#define DEF_SIZE_SMALL_ATTRS 10 +#define DEF_SIZE_SMALL_GROUPS 10 +#define DEF_SIZE_SMALL_DSETS 10 +#define DEF_SIZE_SMALL_ATTRS 10 -#define SIZE_SMALL_SECTS 10 +#define SIZE_SMALL_SECTS 10 #define H5_NFILTERS_IMPL 8 /* Number of currently implemented filters + one to accommodate for user-define filters + one @@ -74,7 +74,7 @@ typedef struct iter_t { ohdr_info_t group_ohdr_info; /* Object header information for groups */ hsize_t max_attrs; /* Maximum attributes from a group */ - unsigned long *num_small_attrs; /* Size of small attributes tracked */ + unsigned long *num_small_attrs; /* Size of small attributes tracked */ unsigned attr_nbins; /* Number of bins for attribute counts */ unsigned long *attr_bins; /* Pointer to array of bins for attribute counts */ @@ -83,7 +83,7 @@ typedef struct iter_t { hsize_t max_dset_dims; /* Maximum dimension size of dataset */ unsigned long *small_dset_dims; /* Size of dimensions of small datasets tracked */ unsigned long dset_layouts[H5D_NLAYOUTS]; /* Type of storage for each dataset */ - unsigned long dset_comptype[H5_NFILTERS_IMPL]; /* Number of currently implemented filters */ + unsigned long dset_comptype[H5_NFILTERS_IMPL]; /* Number of currently implemented filters */ unsigned long dset_ntypes; /* Number of diff. dataset datatypes found */ dtype_info_t *dset_type_info; /* Pointer to dataset datatype information found */ unsigned dset_dim_nbins; /* Number of bins for dataset dimensions */ @@ -103,9 +103,9 @@ typedef struct iter_t { hsize_t super_ext_size; /* superblock extension size */ hsize_t ublk_size; /* user block size (if exists) */ H5F_fspace_strategy_t fs_strategy; /* File space management strategy */ - hbool_t fs_persist; /* Free-space persist or not */ + hbool_t fs_persist; /* Free-space persist or not */ hsize_t fs_threshold; /* Free-space section threshold */ - hsize_t fsp_size; /* File space page size */ + hsize_t fsp_size; /* File space page size */ hsize_t free_space; /* Amount of freespace in the file */ hsize_t free_hdr; /* Size of free space manager metadata in the file */ unsigned long num_small_sects[SIZE_SMALL_SECTS]; /* Size of small free-space sections */ @@ -136,9 +136,9 @@ static int display_dset_metadata = FALSE; /* display file space info f static int display_object = FALSE; /* not implemented yet */ /* Initialize threshold for small groups/datasets/attributes */ -static int sgroups_threshold = DEF_SIZE_SMALL_GROUPS; -static int sdsets_threshold = DEF_SIZE_SMALL_DSETS; -static int sattrs_threshold = DEF_SIZE_SMALL_ATTRS; +static int sgroups_threshold = DEF_SIZE_SMALL_GROUPS; +static int sdsets_threshold = DEF_SIZE_SMALL_DSETS; +static int sattrs_threshold = DEF_SIZE_SMALL_ATTRS; /* a structure for handling the order command-line parameters come in */ struct handler_t { @@ -257,7 +257,7 @@ leave(int ret) } - + /*------------------------------------------------------------------------- * Function: usage * @@ -297,7 +297,7 @@ static void usage(const char *prog) HDfprintf(stdout, " --enable-error-stack Prints messages from the HDF5 error stack as they occur\n"); } - + /*------------------------------------------------------------------------- * Function: ceil_log10 * @@ -324,7 +324,7 @@ ceil_log10(unsigned long x) return ret; } /* ceil_log10() */ - + /*------------------------------------------------------------------------- * Function: attribute_stats * @@ -374,7 +374,7 @@ attribute_stats(iter_t *iter, const H5O_info_t *oi) return 0; } /* end attribute_stats() */ - + /*------------------------------------------------------------------------- * Function: group_stats * @@ -456,7 +456,7 @@ done: return ret_value; } /* end group_stats() */ - + /*------------------------------------------------------------------------- * Function: dataset_stats * @@ -648,7 +648,7 @@ done: return ret_value; } /* end dataset_stats() */ - + /*------------------------------------------------------------------------- * Function: datatype_stats * @@ -680,7 +680,7 @@ done: return ret_value; } /* end datatype_stats() */ - + /*------------------------------------------------------------------------- * Function: obj_stats * @@ -736,7 +736,7 @@ done: return ret_value; } /* end obj_stats() */ - + /*------------------------------------------------------------------------- * Function: lnk_stats * @@ -834,7 +834,7 @@ freespace_stats(hid_t fid, iter_t *iter) return 0; } /* end freespace_stats() */ - + /*------------------------------------------------------------------------- * Function: hand_free * @@ -863,7 +863,7 @@ hand_free(struct handler_t *hand) } /* end if */ } /* end hand_free() */ - + /*------------------------------------------------------------------------- * Function: parse_command_line * @@ -1041,7 +1041,7 @@ error: return -1; } - + /*------------------------------------------------------------------------- * Function: iter_free * @@ -1106,7 +1106,7 @@ iter_free(iter_t *iter) } /* end if */ } /* end iter_free() */ - + /*------------------------------------------------------------------------- * Function: print_file_info * @@ -1138,7 +1138,7 @@ print_file_info(const iter_t *iter) return 0; } /* print_file_info() */ - + /*------------------------------------------------------------------------- * Function: print_file_metadata * @@ -1198,7 +1198,7 @@ print_file_metadata(const iter_t *iter) return 0; } /* print_file_metadata() */ - + /*------------------------------------------------------------------------- * Function: print_group_info * @@ -1255,7 +1255,7 @@ print_group_info(const iter_t *iter) return 0; } /* print_group_info() */ - + /*------------------------------------------------------------------------- * Function: print_group_metadata * @@ -1282,7 +1282,7 @@ print_group_metadata(const iter_t *iter) return 0; } /* print_group_metadata() */ - + /*------------------------------------------------------------------------- * Function: print_dataset_info * @@ -1369,7 +1369,7 @@ print_dataset_info(const iter_t *iter) return 0; } /* print_dataset_info() */ - + /*------------------------------------------------------------------------- * Function: print_dataset_metadata * @@ -1398,7 +1398,7 @@ print_dset_metadata(const iter_t *iter) return 0; } /* print_dset_metadata() */ - + /*------------------------------------------------------------------------- * Function: print_dset_dtype_meta * @@ -1439,7 +1439,7 @@ print_dset_dtype_meta(const iter_t *iter) return 0; } /* print_dset_dtype_meta() */ - + /*------------------------------------------------------------------------- * Function: print_attr_info * @@ -1488,7 +1488,7 @@ print_attr_info(const iter_t *iter) return 0; } /* print_attr_info() */ - + /*------------------------------------------------------------------------- * Function: print_freespace_info * @@ -1538,7 +1538,7 @@ print_freespace_info(const iter_t *iter) return 0; } /* print_freespace_info() */ - + /*------------------------------------------------------------------------- * Function: print_storage_summary * @@ -1602,7 +1602,7 @@ print_storage_summary(const iter_t *iter) return 0; } /* print_storage_summary() */ - + /*------------------------------------------------------------------------- * Function: print_file_statistics * @@ -1649,7 +1649,7 @@ print_file_statistics(const iter_t *iter) if(display_summary) print_storage_summary(iter); } /* print_file_statistics() */ - + /*------------------------------------------------------------------------- * Function: print_object_statistics * @@ -1672,7 +1672,7 @@ print_object_statistics(const char *name) printf("Object name %s\n", name); } /* print_object_statistics() */ - + /*------------------------------------------------------------------------- * Function: print_statistics * @@ -1698,7 +1698,7 @@ print_statistics(const char *name, const iter_t *iter) print_file_statistics(iter); } /* print_statistics() */ - + /*------------------------------------------------------------------------- * Function: main * @@ -1733,7 +1733,7 @@ main(int argc, const char *argv[]) /* Disable tools error reporting */ H5Eget_auto2(H5tools_ERR_STACK_g, &tools_func, &tools_edata); H5Eset_auto2(H5tools_ERR_STACK_g, NULL, NULL); - + HDmemset(&iter, 0, sizeof(iter)); if(parse_command_line(argc, argv, &hand) < 0) @@ -1780,15 +1780,15 @@ main(int argc, const char *argv[]) iter.free_hdr = finfo.free.meta_size; } /* end else */ - iter.num_small_groups = (unsigned long *)HDcalloc((size_t)sgroups_threshold, sizeof(unsigned long)); - iter.num_small_attrs = (unsigned long *)HDcalloc((size_t)(sattrs_threshold+1), sizeof(unsigned long)); - iter.small_dset_dims = (unsigned long *)HDcalloc((size_t)sdsets_threshold, sizeof(unsigned long)); + iter.num_small_groups = (unsigned long *)HDcalloc((size_t)sgroups_threshold, sizeof(unsigned long)); + iter.num_small_attrs = (unsigned long *)HDcalloc((size_t)(sattrs_threshold+1), sizeof(unsigned long)); + iter.small_dset_dims = (unsigned long *)HDcalloc((size_t)sdsets_threshold, sizeof(unsigned long)); - if(iter.num_small_groups == NULL || iter.num_small_attrs == NULL || iter.small_dset_dims == NULL) { - error_msg("Unable to allocate memory for tracking small groups/datasets/attributes\n"); + if(iter.num_small_groups == NULL || iter.num_small_attrs == NULL || iter.small_dset_dims == NULL) { + error_msg("Unable to allocate memory for tracking small groups/datasets/attributes\n"); h5tools_setstatus(EXIT_FAILURE); - goto done; - } + goto done; + } if((fcpl = H5Fget_create_plist(fid)) < 0) warn_msg("Unable to retrieve file creation property\n"); diff --git a/tools/test/h5import/h5importtest.c b/tools/test/h5import/h5importtest.c index 489bc01..bbb67b6 100644 --- a/tools/test/h5import/h5importtest.c +++ b/tools/test/h5import/h5importtest.c @@ -71,9 +71,9 @@ main(void) volatile uint32_t ibyte=0x01234567; /* 0 for big endian, 1 for little endian. */ if ((*((uint8_t*)(&ibyte))) == 0x67) - strncpy(machine_order, "LE", 2); + HDstrncpy(machine_order, "LE", 2); else - strncpy(machine_order, "BE", 2); + HDstrncpy(machine_order, "BE", 2); /* diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c index b421328..c6e62d5 100644 --- a/tools/test/perform/perf.c +++ b/tools/test/perform/perf.c @@ -63,13 +63,13 @@ #define H5FATAL 1 #define VRFY(val, mesg, fatal) do { \ if (!val) { \ - printf("Proc %d: ", mynod); \ + printf("Proc %d: ", mynod); \ printf("*** Assertion failed (%s) at line %4d in %s\n", \ mesg, (int)__LINE__, __FILE__); \ - if (fatal){ \ + if (fatal){ \ fflush(stdout); \ goto die_jar_jar_die; \ - } \ + } \ } \ } while(0) #define RANK 1 @@ -180,38 +180,38 @@ int main(int argc, char **argv) /* setup file access template with parallel IO access. */ if (opt_split_vfd){ - hid_t mpio_pl; - - mpio_pl = H5Pcreate (H5P_FILE_ACCESS); - VRFY((acc_tpl >= 0), "", H5FATAL); - ret = H5Pset_fapl_mpio(mpio_pl, MPI_COMM_WORLD, MPI_INFO_NULL); - VRFY((ret >= 0), "", H5FATAL); - - /* set optional allocation alignment */ - if (opt_alignment*opt_threshold != 1){ - ret = H5Pset_alignment(acc_tpl, opt_threshold, opt_alignment ); - VRFY((ret >= 0), "H5Pset_alignment succeeded", !H5FATAL); - } - - /* setup file access template */ - acc_tpl = H5Pcreate (H5P_FILE_ACCESS); - VRFY((acc_tpl >= 0), "", H5FATAL); - ret = H5Pset_fapl_split(acc_tpl, meta_ext, mpio_pl, raw_ext, mpio_pl); - VRFY((ret >= 0), "H5Pset_fapl_split succeeded", H5FATAL); - ret = H5Pclose(mpio_pl); - VRFY((ret >= 0), "H5Pclose mpio_pl succeeded", H5FATAL); + hid_t mpio_pl; + + mpio_pl = H5Pcreate (H5P_FILE_ACCESS); + VRFY((acc_tpl >= 0), "", H5FATAL); + ret = H5Pset_fapl_mpio(mpio_pl, MPI_COMM_WORLD, MPI_INFO_NULL); + VRFY((ret >= 0), "", H5FATAL); + + /* set optional allocation alignment */ + if (opt_alignment*opt_threshold != 1){ + ret = H5Pset_alignment(acc_tpl, opt_threshold, opt_alignment ); + VRFY((ret >= 0), "H5Pset_alignment succeeded", !H5FATAL); + } + + /* setup file access template */ + acc_tpl = H5Pcreate (H5P_FILE_ACCESS); + VRFY((acc_tpl >= 0), "", H5FATAL); + ret = H5Pset_fapl_split(acc_tpl, meta_ext, mpio_pl, raw_ext, mpio_pl); + VRFY((ret >= 0), "H5Pset_fapl_split succeeded", H5FATAL); + ret = H5Pclose(mpio_pl); + VRFY((ret >= 0), "H5Pclose mpio_pl succeeded", H5FATAL); }else{ - /* setup file access template */ - acc_tpl = H5Pcreate (H5P_FILE_ACCESS); - VRFY((acc_tpl >= 0), "", H5FATAL); - ret = H5Pset_fapl_mpio(acc_tpl, MPI_COMM_WORLD, MPI_INFO_NULL); - VRFY((ret >= 0), "", H5FATAL); - - /* set optional allocation alignment */ - if (opt_alignment*opt_threshold != 1){ - ret = H5Pset_alignment(acc_tpl, opt_threshold, opt_alignment ); - VRFY((ret >= 0), "H5Pset_alignment succeeded", !H5FATAL); - } + /* setup file access template */ + acc_tpl = H5Pcreate (H5P_FILE_ACCESS); + VRFY((acc_tpl >= 0), "", H5FATAL); + ret = H5Pset_fapl_mpio(acc_tpl, MPI_COMM_WORLD, MPI_INFO_NULL); + VRFY((ret >= 0), "", H5FATAL); + + /* set optional allocation alignment */ + if (opt_alignment*opt_threshold != 1){ + ret = H5Pset_alignment(acc_tpl, opt_threshold, opt_alignment ); + VRFY((ret >= 0), "H5Pset_alignment succeeded", !H5FATAL); + } } h5_fixname_no_suffix(FILENAME[0], acc_tpl, filename, sizeof filename); @@ -225,7 +225,7 @@ int main(int argc, char **argv) sid = H5Screate_simple(RANK, dims, NULL); VRFY((sid >= 0), "H5Screate_simple succeeded", H5FATAL); dataset = H5Dcreate2(fid, "Dataset1", H5T_NATIVE_CHAR, sid, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); VRFY((dataset >= 0), "H5Dcreate2 succeeded", H5FATAL); /* create the memory dataspace and the file dataspace */ |