summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/utf8proc/test/normtest.c
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/utf8proc/test/normtest.c')
-rw-r--r--3rdparty/utf8proc/test/normtest.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/3rdparty/utf8proc/test/normtest.c b/3rdparty/utf8proc/test/normtest.c
index 555c14c84bf..627ee79fd26 100644
--- a/3rdparty/utf8proc/test/normtest.c
+++ b/3rdparty/utf8proc/test/normtest.c
@@ -1,21 +1,20 @@
#include "tests.h"
#define CHECK_NORM(NRM, norm, src) { \
- char *src_norm = (char*) utf8proc_ ## NRM((utf8proc_uint8_t*) src); \
- check(!strcmp(norm, src_norm), \
+ unsigned char *src_norm = (unsigned char*) utf8proc_ ## NRM((utf8proc_uint8_t*) src); \
+ check(!strcmp((char *) norm, (char *) src_norm), \
"normalization failed for %s -> %s", src, norm); \
free(src_norm); \
}
int main(int argc, char **argv)
{
- char *buf = NULL;
- size_t bufsize = 0;
+ unsigned char buf[8192];
FILE *f = argc > 1 ? fopen(argv[1], "r") : NULL;
- char source[1024], NFC[1024], NFD[1024], NFKC[1024], NFKD[1024];
+ unsigned char source[1024], NFC[1024], NFD[1024], NFKC[1024], NFKD[1024];
check(f != NULL, "error opening NormalizationTest.txt");
- while (getline(&buf, &bufsize, f) > 0) {
+ while (simple_getline(buf, f) > 0) {
size_t offset;
lineno += 1;