diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-06-15 14:26:41 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-06-15 14:26:41 (GMT) |
commit | 435c8b2d7d58f361b8a74ff5bf8e53333b5f6878 (patch) | |
tree | 9daf721fad6cb812c9007d864fcb04e1bd522f96 | |
parent | fabb5167ba3afb1f32784d274df67f8b6195e5ea (diff) | |
download | hdf5-435c8b2d7d58f361b8a74ff5bf8e53333b5f6878.zip hdf5-435c8b2d7d58f361b8a74ff5bf8e53333b5f6878.tar.gz hdf5-435c8b2d7d58f361b8a74ff5bf8e53333b5f6878.tar.bz2 |
[svn-r8688] Purpose:
h5dump new feature
Description:
add processing of tab characters (in the context of the new option process CR/LF)
Solution:
Platforms tested:
linux
solaris
AIX
Misc. update:
-rw-r--r-- | tools/h5dump/h5dumpgentest.c | 2 | ||||
-rw-r--r-- | tools/lib/h5tools_str.c | 5 | ||||
-rw-r--r-- | tools/testfiles/tfilters.h5 | bin | 48928 -> 48928 bytes | |||
-rw-r--r-- | tools/testfiles/tstring.ddl | 6 |
4 files changed, 8 insertions, 5 deletions
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index 75c5bd1..f540c25 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -4475,7 +4475,7 @@ static void gent_filters() hsize_t dims2[1]={2}; hvl_t buf2[2]; hsize_t dims3[1]={1}; - char buf3[]={"this is\n a string with three\n newline\n escape characters"}; + char buf3[]={"this is\n a string \twith three\n newline\n escape \tcharacters"}; hsize_t dims4[1]={6}; char buf4[6]={"abcdef"}; hobj_ref_t buf5[5]; diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index b717b3a..6656c81 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -466,7 +466,10 @@ h5tools_print_char(h5tools_str_t *str, const h5dump_t *info, unsigned char ch) h5tools_str_append(str, "\\r"); break; case '\t': - h5tools_str_append(str, "\\t"); + if (info->do_lf) + h5tools_str_append(str, "\t"); + else + h5tools_str_append(str, "\\t"); break; default: if (isprint(ch)) diff --git a/tools/testfiles/tfilters.h5 b/tools/testfiles/tfilters.h5 Binary files differindex 94c64bd..7f19ad4 100644 --- a/tools/testfiles/tfilters.h5 +++ b/tools/testfiles/tfilters.h5 diff --git a/tools/testfiles/tstring.ddl b/tools/testfiles/tstring.ddl index d6df34b..241f04e 100644 --- a/tools/testfiles/tstring.ddl +++ b/tools/testfiles/tstring.ddl @@ -4,7 +4,7 @@ Expected output for 'h5dump -e -d string tfilters.h5' HDF5 "tfilters.h5" { DATASET "string" { DATATYPE H5T_STRING { - STRSIZE 57; + STRSIZE 59; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; @@ -12,9 +12,9 @@ DATASET "string" { DATASPACE SIMPLE { ( 1 ) / ( 1 ) } DATA { (0) "this is - a string with three + a string with three newline - escape characters" + escape characters" } } } |