summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-03-30 19:34:27 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-03-30 19:34:27 (GMT)
commit928c820d0458ec3c83be18418385b4bb16b96fec (patch)
treeaf900004734e91b3ce081374b795fbd777cbe2e3 /src
parentd0b8accbc1fbc533d436ddcc4de1ccc7964d55d5 (diff)
downloadhdf5-928c820d0458ec3c83be18418385b4bb16b96fec.zip
hdf5-928c820d0458ec3c83be18418385b4bb16b96fec.tar.gz
hdf5-928c820d0458ec3c83be18418385b4bb16b96fec.tar.bz2
Straggler: add htri_to_string() for converting htri_t to a string
constant.
Diffstat (limited to 'src')
-rw-r--r--src/H5public.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/H5public.h b/src/H5public.h
index 828c2d6..d04af03 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -338,6 +338,17 @@ typedef struct H5_ih_info_t {
hsize_t heap_size;
} H5_ih_info_t;
+static inline const char *
+htri_to_string(htri_t v)
+{
+ if (v == 0)
+ return "false";
+ else if (v < 0)
+ return "error";
+ else
+ return "true";
+}
+
/* Functions in H5.c */
H5_DLL herr_t H5open(void);
H5_DLL herr_t H5close(void);