aboutsummaryrefslogtreecommitdiffstats
path: root/libcmap_dprint_range.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcmap_dprint_range.c')
-rw-r--r--libcmap_dprint_range.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libcmap_dprint_range.c b/libcmap_dprint_range.c
new file mode 100644
index 0000000..7047871
--- /dev/null
+++ b/libcmap_dprint_range.c
@@ -0,0 +1,12 @@
+/* See LICENSE file for copyright and license details. */
+#include "common.h"
+
+
+int
+libcmap_dprint_range(int fd, const struct libcmap_range *range, const char *endash)
+{
+ if (range->first == range->last)
+ return dprintf(fd, SINGLETON_RANGE_FMT, SINGLETON_RANGE_ARGS(range));
+ else
+ return dprintf(fd, RANGE_FMT, RANGE_ARGS(range, endash));
+}