diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-11 16:24:11 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-11 16:24:11 (GMT) |
commit | d9e5ca72f39934531b534524d07cf784c3d0e613 (patch) | |
tree | 1913b13a317132523091035f1175b2291c8b9db7 /tools/h5import/h5import.c | |
parent | 053807fa81579e6bd9ac6a701ddcaac39e4d0b87 (diff) | |
download | hdf5-d9e5ca72f39934531b534524d07cf784c3d0e613.zip hdf5-d9e5ca72f39934531b534524d07cf784c3d0e613.tar.gz hdf5-d9e5ca72f39934531b534524d07cf784c3d0e613.tar.bz2 |
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'tools/h5import/h5import.c')
-rwxr-xr-x | tools/h5import/h5import.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c index 1babd9e..1424ac2 100755 --- a/tools/h5import/h5import.c +++ b/tools/h5import/h5import.c @@ -871,26 +871,25 @@ processStrData(FILE **strm, struct Input *in, hid_t file_id) /*enable error reporting */ } H5E_END_TRY; - if (( space_id = H5Screate_simple(1,dims,NULL)) < 0 ) + if((space_id = H5Screate_simple(1, dims, NULL)) < 0) goto out; - if (( mspace_id = H5Screate(H5S_SCALAR)) < 0 ) + if((mspace_id = H5Screate(H5S_SCALAR)) < 0) goto out; - if (( dset_id = H5Dcreate(handle, in->path.group[j], type_id, space_id, H5P_DEFAULT)) < 0) + if((dset_id = H5Dcreate2(handle, in->path.group[j], type_id, space_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; line = 0; - while ( !feof( *strm ) ) - { - c = fgetc( *strm ); + while(!feof(*strm)) { + c = fgetc(*strm); - str[ i ] = c; + str[i] = c; i++; - if ( c == 10 ) /* eol */ + if(c == 10) /* eol */ { char *str2 = str; hid_t fspace_id; @@ -2497,21 +2496,16 @@ process(struct Options *opt) } /* create dataspace */ - if (in->configOptionVector[EXTEND] == 1) - { + if(in->configOptionVector[EXTEND] == 1) dataspace = H5Screate_simple(in->rank, in->sizeOfDimension, in->maxsizeOfDimension); - } else - { dataspace = H5Screate_simple(in->rank, in->sizeOfDimension, NULL); - } /* disable error reporting */ H5E_BEGIN_TRY { /* create data set */ - if ((dataset = H5Dcreate(handle, in->path.group[j], outtype, dataspace, proplist)) < 0) - { - (void) fprintf(stderr, err5); + if((dataset = H5Dcreate2(handle, in->path.group[j], outtype, dataspace, H5P_DEFAULT, proplist, H5P_DEFAULT)) < 0) { + (void)fprintf(stderr, err5); H5Pclose(proplist); H5Sclose(dataspace); H5Fclose(file_id); @@ -2522,8 +2516,7 @@ process(struct Options *opt) } H5E_END_TRY; /* write dataset */ - if (H5Dwrite(dataset, intype, H5S_ALL, H5S_ALL, H5P_DEFAULT, (VOIDP)in->data) < 0) - { + if(H5Dwrite(dataset, intype, H5S_ALL, H5S_ALL, H5P_DEFAULT, (VOIDP)in->data) < 0) { (void) fprintf(stderr, err6); H5Dclose(dataset); H5Pclose(proplist); |