summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTony Kelman <tony@kelman.net>2015-04-06 22:36:33 -0700
committerTony Kelman <tony@kelman.net>2015-04-06 22:36:33 -0700
commit0a818c700353194d85baaf6a2f7f6ea32686b922 (patch)
tree859d990277010fe6fa5d7d3e3ed53081cbee9388 /test
parentad277229234b77ac3d334860f6857921060dcb37 (diff)
downloadlibutf8proc-0a818c700353194d85baaf6a2f7f6ea32686b922.tar.gz
libutf8proc-0a818c700353194d85baaf6a2f7f6ea32686b922.tar.bz2
Prefix other C99 typedefs with utf8proc_
Diffstat (limited to 'test')
-rw-r--r--test/graphemetest.c6
-rw-r--r--test/normtest.c2
-rw-r--r--test/tests.h2
3 files changed, 5 insertions, 5 deletions
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);
}