blob: 5dd8a7e85ec1e8634cd4ba45d7edc77e4fc7030d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
/* See LICENSE file for copyright and license details. */
#include "common.h"
int
libcmap_snprint_range(char *buf, size_t bufsize, const struct libcmap_range *range, const char *endash)
{
if (range->first == range->last)
return snprintf(buf, bufsize, SINGLETON_RANGE_FMT, SINGLETON_RANGE_ARGS(range));
else
return snprintf(buf, bufsize, RANGE_FMT, RANGE_ARGS(range, endash));
}
|