aboutsummaryrefslogtreecommitdiffstats
path: root/libcmap_sprint_range.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-12-21 13:27:17 +0100
committerMattias Andrée <m@maandree.se>2025-12-21 13:27:17 +0100
commit3c801c0e2eeb3fbf0b7029296143de869c893bfb (patch)
treed75044f785bfd6a2d1526e1b26699bd3ef59c182 /libcmap_sprint_range.c
parentImplement script and block listing (diff)
downloadlibcmap-3c801c0e2eeb3fbf0b7029296143de869c893bfb.tar.gz
libcmap-3c801c0e2eeb3fbf0b7029296143de869c893bfb.tar.bz2
libcmap-3c801c0e2eeb3fbf0b7029296143de869c893bfb.tar.xz
Add range print functions
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'libcmap_sprint_range.c')
-rw-r--r--libcmap_sprint_range.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libcmap_sprint_range.c b/libcmap_sprint_range.c
new file mode 100644
index 0000000..800fee5
--- /dev/null
+++ b/libcmap_sprint_range.c
@@ -0,0 +1,10 @@
+/* See LICENSE file for copyright and license details. */
+#include "libcmap.h"
+#include <limits.h>
+
+
+int
+libcmap_sprint_range(char *buf, const struct libcmap_range *range, const char *endash)
+{
+ return libcmap_snprint_range(buf, buf ? SIZE_MAX : (size_t)0, range, endash);
+}