From ba462f755ef1091cb8d43b04d048b542b7fb9597 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 26 Jan 2007 15:27:01 +0000 Subject: [PATCH] *** empty log message *** --- ase/awk/Awk.java | 6 +++--- ase/awk/jni.c | 24 +++++++++++++----------- ase/awk/makefile.lnx.gcc | 6 +++--- ase/awk/makefile.msw.bcc | 4 ++-- ase/awk/makefile.msw.cl | 4 ++-- 5 files changed, 23 insertions(+), 21 deletions(-) diff --git a/ase/awk/Awk.java b/ase/awk/Awk.java index 77e4761c..49f17b24 100644 --- a/ase/awk/Awk.java +++ b/ase/awk/Awk.java @@ -1,5 +1,5 @@ /* - * $Id: Awk.java,v 1.22 2007-01-25 14:10:02 bacon Exp $ + * $Id: Awk.java,v 1.23 2007-01-26 15:27:00 bacon Exp $ */ package ase.awk; @@ -44,8 +44,8 @@ public abstract class Awk System.getProperty("os.name")); os.arch / os.version; */ //System.load ("c://projects//ase/awk/aseawk.dll"); - URL url = ase.awk.Awk.class.getResource("aseawk.dll"); - if (url == null) url = ase.awk.Awk.class.getResource("libaseawk_jni.so"); + URL url = ase.awk.Awk.class.getResource("aseawk_jni.dll"); + if (url == null) url = ase.awk.Awk.class.getResource("aseawk_jni.so"); if (url != null) System.load (url.getFile()); /* diff --git a/ase/awk/jni.c b/ase/awk/jni.c index 451870a3..03773250 100644 --- a/ase/awk/jni.c +++ b/ase/awk/jni.c @@ -1,5 +1,5 @@ /* - * $Id: jni.c,v 1.54 2007-01-25 14:10:03 bacon Exp $ + * $Id: jni.c,v 1.55 2007-01-26 15:27:00 bacon Exp $ */ #include @@ -213,9 +213,7 @@ static void throw_exception ( env, CLASS_OUTOFMEMORYERROR); if (except_class == NULL) return; - (*env)->ThrowNew ( - env, except_class, - ase_awk_geterrstr(ASE_AWK_ENOMEM)); + (*env)->ThrowNew (env, except_class, "out of memory"); (*env)->DeleteLocalRef (env, except_class); return; } @@ -226,7 +224,8 @@ static void throw_exception ( } else { - except_msg = (*env)->NewString (env, msg, ase_awk_strlen(msg)); + except_msg = (*env)->NewString ( + env, (jchar*)msg, ase_awk_strlen(msg)); } if (except_msg == NULL) @@ -784,7 +783,8 @@ static ase_ssize_t __java_open_extio ( else { extio_name = (*env)->NewString ( - env, extio->name, ase_awk_strlen(extio->name)); + env, (jchar*)extio->name, + ase_awk_strlen(extio->name)); } if (extio_name == NULL) @@ -1173,7 +1173,6 @@ static int __handle_bfn ( { jclass class; jmethodID method; - jthrowable thrown; jstring name; const char* name_utf; run_data_t* run_data; @@ -1213,7 +1212,7 @@ static int __handle_bfn ( name = (*env)->NewString (env, tmp, fnl); free (tmp); } - else name = (*env)->NewString (env, fnm, fnl); + else name = (*env)->NewString (env, (jchar*)fnm, fnl); if (name == NULL) { @@ -1307,7 +1306,7 @@ static int __handle_bfn ( else { arg = (*env)->NewString (env, - ((ase_awk_val_str_t*)v)->buf, + (jchar*)((ase_awk_val_str_t*)v)->buf, ((ase_awk_val_str_t*)v)->len); } } @@ -1920,12 +1919,15 @@ JNIEXPORT jobject JNICALL Java_ase_awk_Awk_strtonum ( } for (i = 0; i < len; i++) tmp[i] = (ase_char_t)ptr[i]; - n = ase_awk_strtonum ((ase_awk_run_t*)runid, tmp, len, &lv, &rv); + n = ase_awk_strtonum ( + (ase_awk_run_t*)runid, tmp, len, &lv, &rv); free (tmp); } else { - n = ase_awk_strtonum ((ase_awk_run_t*)runid, ptr, len, &lv, &rv); + n = ase_awk_strtonum ( + (ase_awk_run_t*)runid, + (ase_char_t*)ptr, len, &lv, &rv); } (*env)->ReleaseStringChars (env, str, ptr); diff --git a/ase/awk/makefile.lnx.gcc b/ase/awk/makefile.lnx.gcc index 6530beb5..ad916880 100644 --- a/ase/awk/makefile.lnx.gcc +++ b/ase/awk/makefile.lnx.gcc @@ -30,10 +30,10 @@ lib: $(C_OBJS) $(AR) cr lib$(OUT).a $(C_OBJS) jni: lib $(JNI_OBJS) $(JAVA_OBJS) - $(CC) -shared -o lib$(OUT)_jni.so $(JNI_OBJS) -lm -L. -l$(OUT) + $(CC) -shared -o $(OUT)_jni.so $(JNI_OBJS) -lm -L. -l$(OUT) -#$(CC) -fPIC -shared -static-libgcc -o lib$(OUT)_jni.so -L. -laseawk -lm libaseawk.a jni.o -#$(LD) -fPIC -shared -soname lib$(OUT).so -o lib$(OUT).so -L . -l aseawk jni.o +#$(CC) -fPIC -shared -static-libgcc -o $(OUT)_jni.so -L. -laseawk -lm libaseawk.a jni.o +#$(LD) -fPIC -shared -soname lib$(OUT).so -o $(OUT)_jni.so -L . -l aseawk jni.o clean: rm -rf $(C_OBJS) $(JNI_OBJS) $(JAVA_OBJS) lib$(OUT).a lib$(OUT).so *.o diff --git a/ase/awk/makefile.msw.bcc b/ase/awk/makefile.msw.bcc index f67ab84f..a4be1eba 100644 --- a/ase/awk/makefile.msw.bcc +++ b/ase/awk/makefile.msw.bcc @@ -40,10 +40,10 @@ lib: $(C_OBJS) ! jni: lib $(JNI_OBJS) $(JAVA_OBJS) - $(LD) $(LDFLAGS) $(STARTUP) $(JNI_OBJS),$(OUT).dll,,$(JNI_LIBS),jni.def, + $(LD) $(LDFLAGS) $(STARTUP) $(JNI_OBJS),$(OUT)_jni.dll,,$(JNI_LIBS),jni.def, clean: - -del $(OBJS) $(OUT).lib $(OUT).dll *.obj *.class + -del $(OBJS) $(OUT).lib $(OUT)_jni.dll *.obj *.class .SUFFIXES: .c .obj .java .class .c.obj: diff --git a/ase/awk/makefile.msw.cl b/ase/awk/makefile.msw.cl index 8501bbce..f1e4bffa 100644 --- a/ase/awk/makefile.msw.cl +++ b/ase/awk/makefile.msw.cl @@ -30,12 +30,12 @@ lib: $(C_OBJS) jni: lib $(JNI_OBJS) $(JAVA_OBJS) $(LD) /dll /def:jni.def /subsystem:windows /version:0.1 /release @<< -/nologo /out:$(OUT).dll $(JNI_OBJS) /implib:tmp.lib user32.lib $(OUT).lib +/nologo /out:$(OUT)_jni.dll $(JNI_OBJS) /implib:tmp.lib user32.lib $(OUT).lib << del tmp.lib tmp.exp clean: - del $(OBJS) $(OUT).lib $(OUT).dll *.obj *.class + del $(OBJS) $(OUT).lib $(OUT)_jni.dll *.obj *.class .SUFFIXES: .c .obj .java .class .c.obj: