| 3 | static int thunk_test = 1; |
| 4 | |
| 5 | static utf8proc_int32_t custom(utf8proc_int32_t codepoint, void *thunk) |
| 6 | { |
| 7 | check(((int *) thunk) == &thunk_test, "unexpected thunk passed"); |
| 8 | if (codepoint == 'a') |
| 9 | return 'b'; |
| 10 | if (codepoint == 'S') |
| 11 | return 0x00df; /* ß */ |
| 12 | return codepoint; |
| 13 | } |
| 14 | |
| 15 | int main(void) |
| 16 | { |