2007-07-07 23:47:35 +00:00
|
|
|
#include "string.h"
|
2007-06-25 01:34:07 +00:00
|
|
|
#include "jni.h"
|
|
|
|
|
2007-06-29 16:42:39 +00:00
|
|
|
#undef JNIEXPORT
|
|
|
|
#define JNIEXPORT __attribute__ ((visibility("default")))
|
|
|
|
|
2007-07-07 23:47:35 +00:00
|
|
|
extern "C" JNIEXPORT jstring JNICALL
|
2007-07-26 00:48:28 +00:00
|
|
|
Java_java_lang_System_getProperty(JNIEnv* e, jclass, jstring key)
|
2007-07-07 23:47:35 +00:00
|
|
|
{
|
|
|
|
jstring value = 0;
|
|
|
|
|
2007-07-27 00:06:05 +00:00
|
|
|
const char* chars = e->GetStringUTFChars(key, 0);
|
2007-07-07 23:47:35 +00:00
|
|
|
if (chars) {
|
|
|
|
if (strcmp(chars, "line.separator") == 0) {
|
|
|
|
value = e->NewStringUTF("\n");
|
|
|
|
}
|
2007-07-27 00:06:05 +00:00
|
|
|
e->ReleaseStringUTFChars(key, chars);
|
2007-07-07 23:47:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|