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_image.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_image.c')
-rw-r--r-- | hl/test/test_image.c | 45 |
1 files changed, 4 insertions, 41 deletions
diff --git a/hl/test/test_image.c b/hl/test/test_image.c index 426ae1d..1332841 100644 --- a/hl/test/test_image.c +++ b/hl/test/test_image.c @@ -16,6 +16,7 @@ #include <stdlib.h> #include <string.h> #include "h5hltest.h" +#include "H5srcdir.h" #include "H5LTpublic.h" #include "H5IMpublic.h" #include "pal_rgb.h" @@ -510,8 +511,7 @@ static int test_generate(void) int imax, jmax, kmax; float valex, xmin, xmax, value; FILE *f; - char *srcdir = getenv("srcdir"); /* the source directory */ - char data_file[512]=""; /* buffer to hold name of existing data file */ + const char *data_file = H5_get_srcdir_filename(DATA_FILE4); int i; /* create a file using default properties */ @@ -521,17 +521,6 @@ static int test_generate(void) printf("Testing read and process data and make indexed images\n"); /*------------------------------------------------------------------------- - * 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,DATA_FILE4); - - /*------------------------------------------------------------------------- * read data; the file data format is described below *------------------------------------------------------------------------- */ @@ -723,20 +712,7 @@ static int read_data( const char* fname, /*IN*/ char str[20]; FILE *f; int w, h; - char *srcdir = getenv("srcdir"); /* the source directory */ - char data_file[512]=""; /* buffer to hold name of existing data file */ - - /*------------------------------------------------------------------------- - * compose the name of the file to open, using "srcdir", if appropriate - *------------------------------------------------------------------------- - */ - strcpy(data_file, ""); - if (srcdir) - { - strcpy(data_file, srcdir); - strcat(data_file, "/"); - } - strcat(data_file,fname); + const char *data_file = H5_get_srcdir_filename(fname); /*------------------------------------------------------------------------- * read @@ -811,20 +787,7 @@ static int read_palette(const char* fname, unsigned int green; unsigned int blue; unsigned nentries; - char *srcdir = getenv("srcdir"); /* the source directory */ - char data_file[512]; /* buffer to hold name of existing data file */ - - /*------------------------------------------------------------------------- - * compose the name of the file to open, using "srcdir", if appropriate - *------------------------------------------------------------------------- - */ - strcpy(data_file, ""); - if (srcdir) - { - strcpy(data_file, srcdir); - strcat(data_file, "/"); - } - strcat(data_file,fname); + const char *data_file = H5_get_srcdir_filename(fname); /* ensure the given palette is valid */ if (!palette) |