summaryrefslogtreecommitdiffstats
path: root/src/H5.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-06-19 10:00:18 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-06-19 10:00:18 (GMT)
commit54e2de04d3b7a0359c80cc995f94b63123f4a4da (patch)
treed50159e9aa9dd4adec72206272a20760dea1f315 /src/H5.c
parentb246f9d5eda4a8de5fb7f0f7fa9b8783db03a1ed (diff)
downloadhdf5-54e2de04d3b7a0359c80cc995f94b63123f4a4da.zip
hdf5-54e2de04d3b7a0359c80cc995f94b63123f4a4da.tar.gz
hdf5-54e2de04d3b7a0359c80cc995f94b63123f4a4da.tar.bz2
[svn-r12423] Purpose:
New feature Description: Add '%t' format for HDfprintf() to print htri_t (and hbool_t) values. Platforms tested: FreeBSD 4.11 (sleipnir) Linux 2.4 (chicago) h5committest
Diffstat (limited to 'src/H5.c')
-rw-r--r--src/H5.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/H5.c b/src/H5.c
index 9b052d1..0bbe225 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -1025,6 +1025,15 @@ HDfprintf(FILE *stream, const char *fmt, ...)
n = fprintf (stream, format_templ, nout);
break;
+ case 't':
+ {
+ htri_t tri_var = va_arg (ap, htri_t);
+ if (tri_var > 0) fprintf (stream, "TRUE");
+ else if (!tri_var) fprintf (stream, "FALSE");
+ else fprintf (stream, "FAIL(%d)", (int)tri_var);
+ }
+ break;
+
default:
HDfputs (format_templ, stream);
n = (int)HDstrlen (format_templ);