Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions data/data_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def c_entry(comb1_indicies, comb2_indicies)
end
end

$stdout << "const int32_t utf8proc_sequences[] = {\n "
$stdout << "const utf8proc_int32_t utf8proc_sequences[] = {\n "
i = 0
$int_array.each do |entry|
i += 1
Expand All @@ -280,7 +280,7 @@ def c_entry(comb1_indicies, comb2_indicies)
end
$stdout << "};\n\n"

$stdout << "const uint16_t utf8proc_stage1table[] = {\n "
$stdout << "const utf8proc_uint16_t utf8proc_stage1table[] = {\n "
i = 0
stage1.each do |entry|
i += 1
Expand All @@ -292,7 +292,7 @@ def c_entry(comb1_indicies, comb2_indicies)
end
$stdout << "};\n\n"

$stdout << "const uint16_t utf8proc_stage2table[] = {\n "
$stdout << "const utf8proc_uint16_t utf8proc_stage2table[] = {\n "
i = 0
stage2.flatten.each do |entry|
i += 1
Expand All @@ -311,7 +311,7 @@ def c_entry(comb1_indicies, comb2_indicies)
}
$stdout << "};\n\n"

$stdout << "const int32_t utf8proc_combinations[] = {\n "
$stdout << "const utf8proc_int32_t utf8proc_combinations[] = {\n "
i = 0
comb1st_indicies.keys.each_index do |a|
comb2nd_indicies.keys.each_index do |b|
Expand Down
8 changes: 4 additions & 4 deletions test/graphemetest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
ssize_t glen;
uint8_t *g; /* utf8proc_map grapheme results */
utf8proc_ssize_t glen;
utf8proc_uint8_t *g; /* utf8proc_map grapheme results */
while (i < si) {
if (src[i] != '/')
utf8[j++] = src[i++];
Expand Down
2 changes: 1 addition & 1 deletion test/normtest.c
Original file line number Diff line number Diff line change
@@ -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); \
Expand Down
2 changes: 1 addition & 1 deletion test/tests.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Loading