2 Extern implementation of Nit module flat
7 #include "core__flat._ffi.h"
9 #include <android/log.h>
10 #define PRINT_ERROR(...) (void)__android_log_print(ANDROID_LOG_WARN, "Nit", __VA_ARGS__)
12 #define PRINT_ERROR(...) fprintf(stderr, __VA_ARGS__)
14 #line 16 "../lib/core/text/flat.nit"
19 void flat___NativeString_native_set_char___impl( char* self
, long pos
, uint32_t c
, long ln
)
21 #line 1256 "../lib/core/text/flat.nit"
24 char* dst
= self
+ pos
;
30 dst
[0] = 0xC0 | ((c
& 0x7C0) >> 6);
31 dst
[1] = 0x80 | (c
& 0x3F);
34 dst
[0] = 0xE0 | ((c
& 0xF000) >> 12);
35 dst
[1] = 0x80 | ((c
& 0xFC0) >> 6);
36 dst
[2] = 0x80 | (c
& 0x3F);
39 dst
[0] = 0xF0 | ((c
& 0x1C0000) >> 18);
40 dst
[1] = 0x80 | ((c
& 0x3F000) >> 12);
41 dst
[2] = 0x80 | ((c
& 0xFC0) >> 6);
42 dst
[3] = 0x80 | (c
& 0x3F);