summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_str.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-05-03 17:56:23 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-05-03 17:56:23 (GMT)
commit907a5a1df061e3343d6783c354574fcbb409f73b (patch)
tree7314cd2cc9d7b64aa7c32ae00f6319fc7a4366c3 /tools/lib/h5tools_str.c
parent344352d88e5e0359b4b727fcbe88917822dd06a3 (diff)
downloadhdf5-907a5a1df061e3343d6783c354574fcbb409f73b.zip
hdf5-907a5a1df061e3343d6783c354574fcbb409f73b.tar.gz
hdf5-907a5a1df061e3343d6783c354574fcbb409f73b.tar.bz2
[svn-r20713] Packed Bits Merge:
removed option defines and #ifdef/#endif refactored all printf to HDfprintf in h5dump.c formatted and indention improvements synched with 1.8 branch Tested: local linux
Diffstat (limited to 'tools/lib/h5tools_str.c')
-rw-r--r--tools/lib/h5tools_str.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 7630e9a..ed13ac4 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -795,98 +795,78 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
}
else if (H5Tequal(type, H5T_NATIVE_INT)) {
HDmemcpy(&tempint, vp, sizeof(int));
-#ifdef H5_HAVE_H5DUMP_PACKED_BITS
if(packed_bits_num) {
tempint = (tempint >> packed_data_offset) & packed_data_mask;
}
-#endif
h5tools_str_append(str, OPT(info->fmt_int, "%d"), tempint);
}
else if (H5Tequal(type, H5T_NATIVE_UINT)) {
HDmemcpy(&tempuint, vp, sizeof(unsigned int));
-#ifdef H5_HAVE_H5DUMP_PACKED_BITS
if(packed_bits_num) {
tempuint = (tempuint >> packed_data_offset) & packed_data_mask;
}
-#endif
h5tools_str_append(str, OPT(info->fmt_uint, "%u"), tempuint);
}
else if (H5Tequal(type, H5T_NATIVE_SCHAR)) {
char tempchar;
HDmemcpy(&tempchar, cp_vp, sizeof(char));
-#ifdef H5_HAVE_H5DUMP_PACKED_BITS
if(packed_bits_num) {
tempchar = (tempchar >> packed_data_offset) & packed_data_mask;
}
-#endif
h5tools_str_append(str, OPT(info->fmt_schar, "%hhd"), tempchar);
}
else if (H5Tequal(type, H5T_NATIVE_UCHAR)) {
unsigned char tempuchar;
HDmemcpy(&tempuchar, ucp_vp, sizeof(unsigned char));
-#ifdef H5_HAVE_H5DUMP_PACKED_BITS
if(packed_bits_num) {
tempuchar = (tempuchar >> packed_data_offset) & packed_data_mask;
}
-#endif
h5tools_str_append(str, OPT(info->fmt_uchar, "%u"), tempuchar);
}
else if (H5Tequal(type, H5T_NATIVE_SHORT)) {
short tempshort;
HDmemcpy(&tempshort, vp, sizeof(short));
-#ifdef H5_HAVE_H5DUMP_PACKED_BITS
if(packed_bits_num) {
tempshort = (tempshort >> packed_data_offset) & packed_data_mask;
}
-#endif
h5tools_str_append(str, OPT(info->fmt_short, "%d"), tempshort);
}
else if (H5Tequal(type, H5T_NATIVE_USHORT)) {
unsigned short tempushort;
HDmemcpy(&tempushort, vp, sizeof(unsigned short));
-#ifdef H5_HAVE_H5DUMP_PACKED_BITS
if(packed_bits_num) {
tempushort = (tempushort >> packed_data_offset) & packed_data_mask;
}
-#endif
h5tools_str_append(str, OPT(info->fmt_ushort, "%u"), tempushort);
}
else if (H5Tequal(type, H5T_NATIVE_LONG)) {
HDmemcpy(&templong, vp, sizeof(long));
-#ifdef H5_HAVE_H5DUMP_PACKED_BITS
if(packed_bits_num) {
templong = (templong >> packed_data_offset) & packed_data_mask;
}
-#endif
h5tools_str_append(str, OPT(info->fmt_long, "%ld"), templong);
}
else if (H5Tequal(type, H5T_NATIVE_ULONG)) {
HDmemcpy(&tempulong, vp, sizeof(unsigned long));
-#ifdef H5_HAVE_H5DUMP_PACKED_BITS
if(packed_bits_num) {
tempulong = (tempulong >> packed_data_offset) & packed_data_mask;
}
-#endif
h5tools_str_append(str, OPT(info->fmt_ulong, "%lu"), tempulong);
}
else if (H5Tequal(type, H5T_NATIVE_LLONG)) {
HDmemcpy(&templlong, vp, sizeof(long long));
-#ifdef H5_HAVE_H5DUMP_PACKED_BITS
if(packed_bits_num) {
templlong = (templlong >> packed_data_offset) & packed_data_mask;
}
-#endif
h5tools_str_append(str, OPT(info->fmt_llong, fmt_llong), templlong);
}
else if (H5Tequal(type, H5T_NATIVE_ULLONG)) {
HDmemcpy(&tempullong, vp, sizeof(unsigned long long));
-#ifdef H5_HAVE_H5DUMP_PACKED_BITS
if(packed_bits_num) {
tempullong = (tempullong >> packed_data_offset) & packed_data_mask;
}
-#endif
h5tools_str_append(str, OPT(info->fmt_ullong, fmt_ullong), tempullong);
}
else if (H5Tequal(type, H5T_NATIVE_HSSIZE)) {