diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2021-08-17 19:55:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-17 19:55:18 (GMT) |
commit | c0ef1fd6de3ff20cc8fc49c05ca71254c784bea6 (patch) | |
tree | fb2bdf05e276e3614b3b5c343447cd82f4e6718b /tools/test/h5jam/h5jamgentest.c | |
parent | 2bca2ca6f1ef1b60bb8541413c5f2e68ff5549d3 (diff) | |
download | hdf5-c0ef1fd6de3ff20cc8fc49c05ca71254c784bea6.zip hdf5-c0ef1fd6de3ff20cc8fc49c05ca71254c784bea6.tar.gz hdf5-c0ef1fd6de3ff20cc8fc49c05ca71254c784bea6.tar.bz2 |
Reverts PR 906 and 907 due to binary compatibility issues (#918)
Diffstat (limited to 'tools/test/h5jam/h5jamgentest.c')
-rw-r--r-- | tools/test/h5jam/h5jamgentest.c | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/tools/test/h5jam/h5jamgentest.c b/tools/test/h5jam/h5jamgentest.c index f616c82..1da6b63 100644 --- a/tools/test/h5jam/h5jamgentest.c +++ b/tools/test/h5jam/h5jamgentest.c @@ -31,7 +31,24 @@ #define UBTXT3 "u511.txt" #define UBTXT4 "u512.txt" #define UBTXT5 "u513.txt" +/* not used yet +#define UBTXT6 "u1023.txt" +#define UBTXT7 "u1024.txt" +#define UBTXT8 "u1025.txt" +#define UBTXT9 "u2047.txt" +#define UBTXT10 "u2048.txt" +#define UBTXT11 "u2049.txt" +#define UBBIN1 "u0.dat" +#define UBBIN2 "u10.dat" +#define UBBIN3 "u511.dat" +#define UBBIN4 "u512.dat" +#define UBBIN5 "u513.dat" +*/ +/* not used yet +#define FILE1 "tnull.h5" +#define FILE2 "tnullwithub.h5" +*/ /* tall is same as dumper test */ #define FILE7 "tall.h5" #define FILE8 "twithub.h5" @@ -49,6 +66,17 @@ char pattern[11] = "abcdefghij"; #define BUF_SIZE 1024 +/* Element selection information */ + +typedef enum { RED, GREEN, BLUE, WHITE, BLACK } enumtype; + +/* Compound datatype */ +typedef struct s1_t { + unsigned int a; + unsigned int b; + float c; +} s1_t; + /* A UD link traversal function. Shouldn't actually be called. */ static hid_t UD_traverse(const char H5_ATTR_UNUSED *link_name, hid_t H5_ATTR_UNUSED cur_group, @@ -280,18 +308,65 @@ create_textfile(const char *name, size_t size) HDclose(fd); } +#ifdef notdef +/* not used yet */ +void +create_binfile(char *name, off_t size) +{ + char *buf; + int fd; + int i; + char *bp; + + fd = creat(name, 0777); + HDassert(fd >= 0); + + buf = HDcalloc(size, 1); + HDassert(buf); + + /* fill buf with pattern */ + bp = buf; + for (i = 0; i < size; i++) + *bp++ = (char)i & 0xff; + + (void)HDwrite(fd, buf, size); + + HDclose(fd); +} +#endif + /*------------------------------------------------------------------------- * Function: main * *------------------------------------------------------------------------- */ + int main(void) { + + /* + create_textfile(UBTXT1, (size_t)0); + */ create_textfile(UBTXT2, (size_t)10); create_textfile(UBTXT3, (size_t)511); create_textfile(UBTXT4, (size_t)512); create_textfile(UBTXT5, (size_t)513); + /* + create_textfile(UBTXT6, (size_t)1023); + create_textfile(UBTXT7, (size_t)1024); + create_textfile(UBTXT8, (size_t)1025); + create_textfile(UBTXT9, (size_t)2047); + create_textfile(UBTXT10, (size_t)2048); + create_textfile(UBTXT11, (size_t)2049); + + create_binfile(UBBIN1, (off_t)0); + create_binfile(UBBIN2, (off_t)10); + create_binfile(UBBIN3, (off_t)511); + create_binfile(UBBIN4, (off_t)512); + create_binfile(UBBIN5, (off_t)513); + + */ gent_ub(FILE7, (size_t)0, (size_t)0); gent_ub(FILE8, (size_t)512, HDstrlen(pattern)); gent_ub(FILE9, (size_t)1024, (size_t)513); |