MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / Java_AllocString

Function Java_AllocString

src/android/Platform_Android.c:219–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219jobject Java_AllocString(JNIEnv* env, const cc_string* str) {
220 cc_uint8 tmp[2048 + 4];
221 cc_uint8* cur;
222 int i, len = 0;
223
224 for (i = 0; i < str->length && len < 2048; i++) {
225 cur = tmp + len;
226 len += Convert_CP437ToUtf8(str->buffer[i], cur);
227 }
228 tmp[len] = '\0';
229 return (*env)->NewStringUTF(env, (const char*)tmp);
230}
231
232jbyteArray Java_AllocBytes(JNIEnv* env, const void* src, cc_uint32 len) {
233 if (!len) return NULL;

Callers 13

java_nextTextPartFunction · 0.85
LBackend_ButtonUpdateFunction · 0.85
LBackend_CheckboxShowFunction · 0.85
LBackend_InputUpdateFunction · 0.85
LBackend_LabelUpdateFunction · 0.85
GetTableDetailsFunction · 0.85
LBackend_TableUpdateFunction · 0.85
Clipboard_SetTextFunction · 0.85
Window_SaveFileDialogFunction · 0.85
OnscreenKeyboard_OpenFunction · 0.85
OnscreenKeyboard_SetTextFunction · 0.85
Process_StartOpenFunction · 0.85

Calls 1

Convert_CP437ToUtf8Function · 0.85

Tested by

no test coverage detected