diff options
author | Grant Gayed <ggayed> | 2003-08-08 21:17:06 +0000 |
---|---|---|
committer | Grant Gayed <ggayed> | 2003-08-08 21:17:06 +0000 |
commit | 38e23d067c681e2f6d4eedd990f7acb4e0416bd6 (patch) | |
tree | 0ee26c106d73831d3ca4c01942a69f934387f0f6 | |
parent | 56124a7d872e77705ed209a0fbc3fb11ebde70aa (diff) | |
download | eclipse.platform.swt-38e23d067c681e2f6d4eedd990f7acb4e0416bd6.tar.gz eclipse.platform.swt-38e23d067c681e2f6d4eedd990f7acb4e0416bd6.tar.xz eclipse.platform.swt-38e23d067c681e2f6d4eedd990f7acb4e0416bd6.zip |
*** empty log message ***
3 files changed, 29 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/motif/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/motif/library/os.c index ea7f1bde3e..9027deaa4b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/motif/library/os.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/motif/library/os.c @@ -14,6 +14,18 @@ #define OS_NATIVE(func) Java_org_eclipse_swt_internal_motif_OS_##func +#ifndef NO_CODESET +JNIEXPORT jint JNICALL OS_NATIVE(CODESET) + (JNIEnv *env, jclass that) +{ + jint rc; + NATIVE_ENTER(env, that, "CODESET\n") + rc = (jint)CODESET; + NATIVE_EXIT(env, that, "CODESET\n") + return rc; +} +#endif + #ifndef NO_ConnectionNumber JNIEXPORT jint JNICALL OS_NATIVE(ConnectionNumber) (JNIEnv *env, jclass that, jint arg0) @@ -67,6 +79,18 @@ JNIEXPORT void JNICALL OS_NATIVE(FD_1ZERO) } #endif +#ifndef NO_LC_1CTYPE +JNIEXPORT jint JNICALL OS_NATIVE(LC_1CTYPE) + (JNIEnv *env, jclass that) +{ + jint rc; + NATIVE_ENTER(env, that, "LC_1CTYPE\n") + rc = (jint)LC_CTYPE; + NATIVE_EXIT(env, that, "LC_1CTYPE\n") + return rc; +} +#endif + #ifndef NO_MB_1CUR_1MAX JNIEXPORT jint JNICALL OS_NATIVE(MB_1CUR_1MAX) (JNIEnv *env, jclass that) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/motif/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/motif/library/os.h index d6e8eb4e8c..15688f1682 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/motif/library/os.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/motif/library/os.h @@ -37,6 +37,7 @@ #include <stdio.h> #include <assert.h> #include <langinfo.h> +#include <locale.h> #include <iconv.h> #include <stdlib.h> #ifdef _HPUX diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/motif/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/motif/OS.java index eda79fd609..7e5128e48f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/motif/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/motif/OS.java @@ -36,8 +36,8 @@ public class OS { IsAIX = isAIX; IsSunOS = isSunOS; IsLinux = isLinux; IsHPUX = isHPUX; IsDBLocale = OS.MB_CUR_MAX () != 1; } - public static final int CODESET = OS.IsLinux ? 14 : 49; - public static final int LC_CTYPE = OS.IsAIX ? 1 : 0; + public static final int CODESET = CODESET (); + public static final int LC_CTYPE = LC_CTYPE (); static final int RESOURCE_LENGTH = 1024 * 3; static final int RESOURCE_START = OS.XtMalloc (RESOURCE_LENGTH); @@ -528,9 +528,11 @@ public class OS { /** Natives */ public static final synchronized native int Call(int proc, int arg1, int arg2); public static final synchronized native int ConnectionNumber(int display); +public static final native int CODESET(); public static final native boolean FD_ISSET(int fd, byte[] fd_set); public static final native void FD_SET(int fd, byte[] fd_set); public static final native void FD_ZERO(byte[] fd_set); +public static final native int LC_CTYPE(); public static final native int MB_CUR_MAX(); public static final synchronized native int overrideShellWidgetClass(); public static final synchronized native int shellWidgetClass(); |