int unpack_data(char *buf, size_t buflen, char *data, size_t datalen, struct encoder *enc) { if (!enc->eats_dots()) datalen = inline_undotify(data, datalen); return enc->decode(buf, &buflen, data, datalen); }
END_TEST START_TEST(test_inline_undotify) { char temp[1024]; char *b; memset(temp, 0, sizeof(temp)); strcpy(temp, dottests[_i].b); b = temp; inline_undotify(b, sizeof(temp)); fail_unless(strcmp(dottests[_i].a, temp) == 0, "'%s' != '%s'", temp, dottests[_i].a); }