*** empty log message ***
This commit is contained in:
parent
1e877d9529
commit
a425e74af7
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: awk.h,v 1.212 2007-03-20 10:44:44 bacon Exp $
|
||||
* $Id: awk.h,v 1.213 2007-03-23 07:45:22 bacon Exp $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
@ -112,7 +112,7 @@ struct ase_awk_runcbs_t
|
||||
|
||||
struct ase_awk_runarg_t
|
||||
{
|
||||
const ase_char_t* ptr;
|
||||
ase_char_t* ptr;
|
||||
ase_size_t len;
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: jni.c,v 1.75 2007-03-19 03:33:53 bacon Exp $
|
||||
* $Id: jni.c,v 1.76 2007-03-23 07:45:22 bacon Exp $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
@ -310,7 +310,7 @@ JNIEXPORT void JNICALL Java_ase_awk_Awk_open (JNIEnv* env, jobject obj)
|
||||
ase_awk_t* awk;
|
||||
ase_awk_prmfns_t prmfns;
|
||||
awk_data_t* awk_data;
|
||||
int opt, errnum;
|
||||
int opt;
|
||||
|
||||
memset (&prmfns, 0, sizeof(prmfns));
|
||||
|
||||
@ -352,13 +352,13 @@ JNIEXPORT void JNICALL Java_ase_awk_Awk_open (JNIEnv* env, jobject obj)
|
||||
|
||||
memset (awk_data, 0, sizeof(awk_data_t));
|
||||
|
||||
awk = ase_awk_open (&prmfns, awk_data, &errnum);
|
||||
awk = ase_awk_open (&prmfns, awk_data);
|
||||
if (awk == NULL)
|
||||
{
|
||||
throw_exception (
|
||||
env,
|
||||
ase_awk_geterrstr(ASE_NULL, errnum),
|
||||
errnum,
|
||||
ase_awk_geterrstr(ASE_NULL, ASE_AWK_ENOMEM),
|
||||
ASE_AWK_ENOMEM,
|
||||
0);
|
||||
return;
|
||||
}
|
||||
@ -464,7 +464,7 @@ JNIEXPORT void JNICALL Java_ase_awk_Awk_parse (JNIEnv* env, jobject obj)
|
||||
(*env)->DeleteLocalRef (env, run_data.object_class); \
|
||||
} while (0)
|
||||
|
||||
static ase_char_t* java_strxdup (jchar* str, jint len)
|
||||
static ase_char_t* java_strxdup (const jchar* str, jint len)
|
||||
{
|
||||
if (len > 0 && ASE_SIZEOF(jchar) != ASE_SIZEOF(ase_char_t))
|
||||
{
|
||||
@ -503,7 +503,7 @@ JNIEXPORT void JNICALL Java_ase_awk_Awk_run (JNIEnv* env, jobject obj, jstring m
|
||||
ase_char_t* mmm;
|
||||
|
||||
ase_size_t len, i;
|
||||
jchar* ptr;
|
||||
const jchar* ptr;
|
||||
|
||||
ase_awk_runarg_t* runarg = NULL;
|
||||
|
||||
@ -678,7 +678,7 @@ JNIEXPORT void JNICALL Java_ase_awk_Awk_run (JNIEnv* env, jobject obj, jstring m
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
jchar* tmp;
|
||||
const jchar* tmp;
|
||||
jstring obj = (jstring)(*env)->GetObjectArrayElement (env, args, i);
|
||||
|
||||
runarg[i].len = (*env)->GetStringLength (env, obj);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: Awk.java,v 1.27 2007-02-23 08:54:03 bacon Exp $
|
||||
* $Id: Awk.java,v 1.28 2007-03-23 07:45:22 bacon Exp $
|
||||
*/
|
||||
|
||||
package ase.test.awk;
|
||||
@ -71,7 +71,7 @@ public class Awk extends ase.awk.StdAwk
|
||||
protected String[] sourceInputNames ()
|
||||
{
|
||||
String[] sin = new String[1];
|
||||
sin[0] = "t.awk";
|
||||
sin[0] = "c:/projects/ase/test/awk/t.awk";
|
||||
return sin;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,11 @@
|
||||
<html>
|
||||
<body>
|
||||
<!--
|
||||
<applet code="ase.test.awk.AwkApplet" codebase="../../.." width="200" height="200"></applet>
|
||||
-->
|
||||
<applet code="AwkApplet" archive="AwkApplet.jar" codebase="." codebase="../../.." width="200" height="200">
|
||||
</applet>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package ase.test.awk;
|
||||
//package ase.test.awk;
|
||||
|
||||
import java.applet.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
public class AwkApplet extends Applet
|
||||
{
|
||||
@ -27,11 +27,27 @@ public class AwkApplet extends Applet
|
||||
|
||||
private void run_awk ()
|
||||
{
|
||||
Awk awk = null;
|
||||
ase.test.awk.Awk awk = null;
|
||||
|
||||
try
|
||||
{
|
||||
awk = new Awk ();
|
||||
/*
|
||||
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()); */
|
||||
|
||||
try
|
||||
{
|
||||
System.load ("c:/projects/ase/test/awk/aseawk_jni.dll");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.err.println ("fuck you");
|
||||
}
|
||||
|
||||
|
||||
awk = new ase.test.awk.Awk ();
|
||||
awk.parse ();
|
||||
awk.run ();
|
||||
}
|
||||
|
@ -25,10 +25,15 @@ mini: mini.obj
|
||||
|
||||
java:
|
||||
javac -classpath ../../.. Awk.java
|
||||
javac -classpath ../../.. AwkApplet.java
|
||||
|
||||
jrun:
|
||||
java -classpath ../../.. ase.test.awk.Awk
|
||||
|
||||
cert:
|
||||
keytool -genkey -keystore ase.store -alias asecert
|
||||
keytool -export -keystore ase.store -alias asecert -file ase.cer
|
||||
|
||||
clean:
|
||||
del $(OBJS) *.obj aseawk.exe mini.exe
|
||||
|
||||
|
8
ase/test/awk/mkjar.bat
Normal file
8
ase/test/awk/mkjar.bat
Normal file
@ -0,0 +1,8 @@
|
||||
cd ..\..\..
|
||||
move ase\test\awk\AwkApplet*.class .
|
||||
jar cvf AwkApplet.jar *.class ase\test\awk\*.class ase\awk\*.class
|
||||
move AwkApplet.jar ase\test\awk
|
||||
cd ase\test\awk
|
||||
|
||||
copy ..\..\awk\aseawk_jni.dll .
|
||||
jarsigner -keystore ase.store AwkApplet.jar asecert
|
Loading…
Reference in New Issue
Block a user