*** empty log message ***
This commit is contained in:
parent
87e972f36b
commit
9dfac6ebdb
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: StdAwk.java,v 1.13 2007-01-25 14:10:03 bacon Exp $
|
||||
* $Id: StdAwk.java,v 1.14 2007-01-30 11:24:40 bacon Exp $
|
||||
*/
|
||||
|
||||
package ase.awk;
|
||||
@ -180,7 +180,7 @@ public abstract class StdAwk extends Awk
|
||||
/* == console interface == */
|
||||
protected int openConsole (Extio extio)
|
||||
{
|
||||
//System.err.println ("[open_console called.... name: " + extio.getName() + " mode: " + extio.getMode());
|
||||
System.err.println ("[open_console called.... name: " + extio.getName() + " mode: " + extio.getMode());
|
||||
|
||||
int mode = extio.getMode ();
|
||||
|
||||
@ -210,11 +210,13 @@ public abstract class StdAwk extends Awk
|
||||
osw = get_stream_writer (cout[cout_no]);
|
||||
if (osw == null) return -1;
|
||||
|
||||
System.out.println ("setting console output name ....");
|
||||
extio.setHandle (osw);
|
||||
try { setConsoleOutputName (extio, cout[cout_no]); }
|
||||
catch (Exception e) { return -1; }
|
||||
|
||||
cout_no++;
|
||||
System.out.println ("open ok....");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: jni.c,v 1.60 2007-01-30 10:55:27 bacon Exp $
|
||||
* $Id: jni.c,v 1.61 2007-01-30 11:24:40 bacon Exp $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@ -1108,17 +1108,14 @@ static ase_ssize_t __process_extio (
|
||||
ase_awk_extio_t* epa = (ase_awk_extio_t*)arg;
|
||||
runio_data_t* runio_data = (runio_data_t*)epa->custom_data;
|
||||
|
||||
printf ("__process_extio...\n");
|
||||
if (cmd == ASE_AWK_IO_OPEN)
|
||||
{
|
||||
printf ("__process_extio open...\n");
|
||||
return __java_open_extio (
|
||||
runio_data->env, runio_data->obj,
|
||||
"openExtio", epa);
|
||||
}
|
||||
else if (cmd == ASE_AWK_IO_CLOSE)
|
||||
{
|
||||
printf ("__process_extio close...\n");
|
||||
return __java_close_extio (
|
||||
runio_data->env, runio_data->obj,
|
||||
"closeExtio", epa);
|
||||
@ -1131,7 +1128,6 @@ printf ("__process_extio close...\n");
|
||||
}
|
||||
else if (cmd == ASE_AWK_IO_WRITE)
|
||||
{
|
||||
printf ("__process_extio write...\n");
|
||||
return __java_write_extio (
|
||||
runio_data->env, runio_data->obj,
|
||||
"writeExtio", epa, data, size);
|
||||
@ -1811,6 +1807,7 @@ JNIEXPORT void JNICALL Java_ase_awk_Awk_setofilename (
|
||||
jsize len;
|
||||
jint n;
|
||||
|
||||
printf ("setofilename....\n");
|
||||
len = (*env)->GetStringLength (env, name);
|
||||
ptr = (*env)->GetStringChars (env, name, JNI_FALSE);
|
||||
if (ptr == NULL)
|
||||
@ -1824,11 +1821,12 @@ JNIEXPORT void JNICALL Java_ase_awk_Awk_setofilename (
|
||||
return;
|
||||
}
|
||||
|
||||
printf ("setofilename 11111....\n");
|
||||
if (ASE_SIZEOF(jchar) != ASE_SIZEOF(ase_char_t))
|
||||
{
|
||||
ase_size_t i;
|
||||
ase_char_t* tmp = (ase_char_t*)
|
||||
malloc (ASE_SIZEOF(ase_char_t)*len);
|
||||
malloc (ASE_SIZEOF(ase_char_t)*(len+1));
|
||||
if (tmp == ASE_NULL)
|
||||
{
|
||||
(*env)->ReleaseStringChars (env, name, ptr);
|
||||
@ -1841,8 +1839,12 @@ JNIEXPORT void JNICALL Java_ase_awk_Awk_setofilename (
|
||||
return;
|
||||
}
|
||||
|
||||
printf ("setofilename 22222....%d\n", len);
|
||||
for (i = 0; i < len; i++) tmp[i] = (ase_char_t)ptr[i];
|
||||
tmp[len] = ASE_T('\0');
|
||||
printf ("setofilename 333333....[%ls], %d\n", tmp, len);
|
||||
n = ase_awk_setofilename (run, tmp, len);
|
||||
printf ("setofilename 444444....\n");
|
||||
free (tmp);
|
||||
}
|
||||
else
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: Awk.java,v 1.23 2007-01-29 04:39:22 bacon Exp $
|
||||
* $Id: Awk.java,v 1.24 2007-01-30 11:24:40 bacon Exp $
|
||||
*/
|
||||
|
||||
package ase.test.awk;
|
||||
@ -95,6 +95,7 @@ public class Awk extends ase.awk.StdAwk
|
||||
System.out.println ("Option: [" + awk.getOption() + "]");
|
||||
|
||||
awk.parse ();
|
||||
System.out.println ("about to run the program");
|
||||
awk.run ();
|
||||
}
|
||||
catch (ase.awk.Exception e)
|
||||
|
25
ase/test/awk/makefile.mac.gcc
Normal file
25
ase/test/awk/makefile.mac.gcc
Normal file
@ -0,0 +1,25 @@
|
||||
SRCS = awk.c
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -O2 -Wall -D_REENTRANT -D_THREAD_SAFE -I../../..
|
||||
LDFLAGS = -L../../awk
|
||||
LIBS = -laseawk -lm
|
||||
|
||||
all: awk
|
||||
|
||||
awk: $(OBJS)
|
||||
$(CC) -o $@ awk.o $(LDFLAGS) $(LIBS)
|
||||
|
||||
java:
|
||||
javac -classpath ../../.. Awk.java AwkApplet.java
|
||||
|
||||
jrun:
|
||||
java -Xms1m -Xmx2m -classpath ../../.. ase.test.awk.Awk
|
||||
|
||||
clean:
|
||||
rm -rf *.o *.class awk
|
||||
|
||||
.SUFFIXES: .c .o
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $<
|
Loading…
Reference in New Issue
Block a user