From 0a818c700353194d85baaf6a2f7f6ea32686b922 Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Mon, 6 Apr 2015 22:36:33 -0700 Subject: Prefix other C99 typedefs with utf8proc_ --- test/graphemetest.c | 6 +++--- test/normtest.c | 2 +- test/tests.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/graphemetest.c b/test/graphemetest.c index 0d82fa3..a05b6e2 100644 --- a/test/graphemetest.c +++ b/test/graphemetest.c @@ -5,7 +5,7 @@ int main(int argc, char **argv) char *buf = NULL; size_t bufsize = 0; FILE *f = argc > 1 ? fopen(argv[1], "r") : NULL; - uint8_t src[1024]; + utf8proc_uint8_t src[1024]; check(f != NULL, "error opening GraphemeBreakTest.txt"); while (getline(&buf, &bufsize, f) > 0) { @@ -39,10 +39,10 @@ int main(int argc, char **argv) src[si] = 0; /* NUL-terminate */ if (si) { - uint8_t utf8[1024]; /* copy src without 0xff grapheme separators */ + utf8proc_uint8_t utf8[1024]; /* copy src without 0xff grapheme separators */ size_t i = 0, j = 0; utf8proc_ssize_t glen; - uint8_t *g; /* utf8proc_map grapheme results */ + utf8proc_uint8_t *g; /* utf8proc_map grapheme results */ while (i < si) { if (src[i] != '/') utf8[j++] = src[i++]; diff --git a/test/normtest.c b/test/normtest.c index 7add4c6..555c14c 100644 --- a/test/normtest.c +++ b/test/normtest.c @@ -1,7 +1,7 @@ #include "tests.h" #define CHECK_NORM(NRM, norm, src) { \ - char *src_norm = (char*) utf8proc_ ## NRM((uint8_t*) src); \ + char *src_norm = (char*) utf8proc_ ## NRM((utf8proc_uint8_t*) src); \ check(!strcmp(norm, src_norm), \ "normalization failed for %s -> %s", src, norm); \ free(src_norm); \ diff --git a/test/tests.h b/test/tests.h index d4897f8..c27185d 100644 --- a/test/tests.h +++ b/test/tests.h @@ -47,7 +47,7 @@ size_t encode(char *dest, const char *buf) } check(sscanf(buf + i, "%x", &c) == 1, "invalid hex input %s", buf+i); i = j; /* skip to char after hex input */ - d += utf8proc_encode_char(c, (uint8_t *) (dest + d)); + d += utf8proc_encode_char(c, (utf8proc_uint8_t *) (dest + d)); } while (1); } -- cgit v1.2.3