From 928c820d0458ec3c83be18418385b4bb16b96fec Mon Sep 17 00:00:00 2001 From: David Young Date: Mon, 30 Mar 2020 14:34:27 -0500 Subject: Straggler: add htri_to_string() for converting htri_t to a string constant. --- src/H5public.h | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); -- cgit v0.12