diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-03-25 03:51:41 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-03-25 03:51:41 (GMT) |
commit | 42efc1c2b591e4cd45ec6cb3bdf32044343118d2 (patch) | |
tree | 0ab542871c32246199479e8933ff26286aaf629a /hl/test/test_table.c | |
parent | 3360c3af0c100ac4d3a2fe2865f34661da862ec5 (diff) | |
download | hdf5-42efc1c2b591e4cd45ec6cb3bdf32044343118d2.zip hdf5-42efc1c2b591e4cd45ec6cb3bdf32044343118d2.tar.gz hdf5-42efc1c2b591e4cd45ec6cb3bdf32044343118d2.tar.bz2 |
[svn-r18451] Description:
Bring r18172:18446 from trunk to revise_chunks branch.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'hl/test/test_table.c')
-rw-r--r-- | hl/test/test_table.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/hl/test/test_table.c b/hl/test/test_table.c index 433d49f..0fc4c84 100644 --- a/hl/test/test_table.c +++ b/hl/test/test_table.c @@ -16,6 +16,7 @@ #include <stdlib.h> #include <string.h> #include "h5hltest.h" +#include "H5srcdir.h" #include "H5TBpublic.h" #define TEST_FILE_BE "test_table_be.hdf5" @@ -123,19 +124,10 @@ static hid_t h5file_open(const char *fname, unsigned flags) { hid_t fid; /* identifier for the file */ - char *srcdir = getenv("srcdir"); /* the source directory */ - char data_file[512]=""; /* buffer to hold name of existing file */ - - /* compose the name of the file to open, using the srcdir, if appropriate */ - if (srcdir) - { - strcpy(data_file,srcdir); - strcat(data_file,"/"); - } - strcat(data_file,fname); + const char *data_file = H5_get_srcdir_filename(fname); /* open */ - if ((fid = H5Fopen(data_file,flags,H5P_DEFAULT))<0) + if ((fid = H5Fopen(data_file,flags,H5P_DEFAULT))<0) { fprintf(stderr,"Error: Cannot open file <%s>\n",data_file ); exit(1); @@ -154,7 +146,7 @@ static int cmp_par(hsize_t i, hsize_t j, particle_t *rbuf, particle_t *wbuf ) rbuf[i].lati != wbuf[j].lati || rbuf[i].longi != wbuf[j].longi || rbuf[i].pressure != wbuf[j].pressure || - rbuf[i].temperature != wbuf[j].temperature ) + rbuf[i].temperature != wbuf[j].temperature ) { fprintf(stderr,"read and write buffers have differences\n"); fprintf(stderr,"%s %ld %f %f %d\n", @@ -459,7 +451,7 @@ static int test_table(hid_t fid, int do_write) * data= 0 1 2 3 4 5 6 7 *------------------------------------------------------------------------- */ - wstart=0; + wstart=0; wrecords=8; if (H5TBwrite_records(fid,"table2",wstart,wrecords,type_size_mem,field_offset, field_size,wbuf)<0) |