14 void RangeList::add_combined(
const PosRange& range, iterator found) {
35 bool isSet = strchr(set_bytes, SAI_data[pos]);
37 while (SAI_data[pos]) {
39 size_t setCount = strspn(SAI_data+pos, set_bytes);
45 size_t clrCount = strcspn(SAI_data+pos, set_bytes);
64 static const char *dump(
const RangeList& rlist) {
68 buf.
nprintf(40,
"%i-%i,", i->start(), i->end());
73 static const char *dump_reverse(
const RangeList& rlist) {
77 buf.
nprintf(40,
"%i-%i,", i->start(), i->end());
83 void TEST_RangeList() {
143 static const char *
convert(
const char *saistring,
const char *set_bytes,
bool invert) {
148 void TEST_string2RangeList() {
void cut_tail(size_t byte_count)
PosRange intersection(PosRange r1, PosRange r2)
range_set::const_iterator iterator
void convert(const FormattedFile &in, const FormattedFile &out)
void add(const PosRange &range)
#define TEST_PUBLISH(testfunction)
bool contains(int pos) const
reverse_iterator rend() const
reverse_iterator rbegin() const
RangeList inverse(ExplicitRange versus)
void nprintf(size_t maxlen, const char *templat,...) __ATTR__FORMAT_MEMBER(2)
RangeList build_RangeList_from_string(const char *SAI_data, const char *set_bytes, bool invert)
const char * get_data() const
range_set::const_reverse_iterator reverse_iterator
#define TEST_EXPECT_EQUAL(expr, want)