This commit is contained in:
hyung-hwan 2008-02-08 01:03:06 +00:00
parent 8c191a6a06
commit 04c12f891b
6 changed files with 29 additions and 20 deletions

View File

@ -1532,7 +1532,7 @@ void Awk::onRunStatement (Run& run, size_t line)
} }
Awk::ssize_t Awk::sourceReader ( Awk::ssize_t Awk::sourceReader (
int cmd, void* arg, char_t* data, size_t count) iocmd_t cmd, void* arg, char_t* data, size_t count)
{ {
Awk* awk = (Awk*)arg; Awk* awk = (Awk*)arg;
@ -1550,7 +1550,7 @@ Awk::ssize_t Awk::sourceReader (
} }
Awk::ssize_t Awk::sourceWriter ( Awk::ssize_t Awk::sourceWriter (
int cmd, void* arg, char_t* data, size_t count) iocmd_t cmd, void* arg, char_t* data, size_t count)
{ {
Awk* awk = (Awk*)arg; Awk* awk = (Awk*)arg;
@ -1568,7 +1568,7 @@ Awk::ssize_t Awk::sourceWriter (
} }
Awk::ssize_t Awk::pipeHandler ( Awk::ssize_t Awk::pipeHandler (
int cmd, void* arg, char_t* data, size_t count) iocmd_t cmd, void* arg, char_t* data, size_t count)
{ {
extio_t* extio = (extio_t*)arg; extio_t* extio = (extio_t*)arg;
Awk* awk = (Awk*)extio->custom_data; Awk* awk = (Awk*)extio->custom_data;
@ -1600,7 +1600,7 @@ Awk::ssize_t Awk::pipeHandler (
} }
Awk::ssize_t Awk::fileHandler ( Awk::ssize_t Awk::fileHandler (
int cmd, void* arg, char_t* data, size_t count) iocmd_t cmd, void* arg, char_t* data, size_t count)
{ {
extio_t* extio = (extio_t*)arg; extio_t* extio = (extio_t*)arg;
Awk* awk = (Awk*)extio->custom_data; Awk* awk = (Awk*)extio->custom_data;
@ -1632,7 +1632,7 @@ Awk::ssize_t Awk::fileHandler (
} }
Awk::ssize_t Awk::consoleHandler ( Awk::ssize_t Awk::consoleHandler (
int cmd, void* arg, char_t* data, size_t count) iocmd_t cmd, void* arg, char_t* data, size_t count)
{ {
extio_t* extio = (extio_t*)arg; extio_t* extio = (extio_t*)arg;
Awk* awk = (Awk*)extio->custom_data; Awk* awk = (Awk*)extio->custom_data;

View File

@ -41,6 +41,8 @@ public:
typedef ase_awk_map_t map_t; typedef ase_awk_map_t map_t;
/** Represents a key/value pair */ /** Represents a key/value pair */
typedef ase_awk_pair_t pair_t; typedef ase_awk_pair_t pair_t;
/** Represents the IO command */
typedef ase_awk_iocmd_t iocmd_t;
/** Represents the external I/O context */ /** Represents the external I/O context */
typedef ase_awk_extio_t extio_t; typedef ase_awk_extio_t extio_t;
/** Represents the run-time context */ /** Represents the run-time context */
@ -1038,16 +1040,16 @@ protected:
// static glue members for various handlers // static glue members for various handlers
static ssize_t sourceReader ( static ssize_t sourceReader (
int cmd, void* arg, char_t* data, size_t count); iocmd_t cmd, void* arg, char_t* data, size_t count);
static ssize_t sourceWriter ( static ssize_t sourceWriter (
int cmd, void* arg, char_t* data, size_t count); iocmd_t cmd, void* arg, char_t* data, size_t count);
static ssize_t pipeHandler ( static ssize_t pipeHandler (
int cmd, void* arg, char_t* data, size_t count); iocmd_t cmd, void* arg, char_t* data, size_t count);
static ssize_t fileHandler ( static ssize_t fileHandler (
int cmd, void* arg, char_t* data, size_t count); iocmd_t cmd, void* arg, char_t* data, size_t count);
static ssize_t consoleHandler ( static ssize_t consoleHandler (
int cmd, void* arg, char_t* data, size_t count); iocmd_t cmd, void* arg, char_t* data, size_t count);
static int functionHandler ( static int functionHandler (
run_t* run, const char_t* name, size_t len); run_t* run, const char_t* name, size_t len);

View File

@ -37,8 +37,9 @@ typedef int (*ase_awk_sprintf_t) (
const ase_char_t* fmt, ...); const ase_char_t* fmt, ...);
typedef void (*ase_awk_dprintf_t) (void* custom, const ase_char_t* fmt, ...); typedef void (*ase_awk_dprintf_t) (void* custom, const ase_char_t* fmt, ...);
typedef enum ase_awk_iocmd_t ase_awk_iocmd_t;
typedef ase_ssize_t (*ase_awk_io_t) ( typedef ase_ssize_t (*ase_awk_io_t) (
int cmd, void* arg, ase_char_t* data, ase_size_t count); ase_awk_iocmd_t cmd, void* arg, ase_char_t* data, ase_size_t count);
struct ase_awk_extio_t struct ase_awk_extio_t
{ {

View File

@ -61,11 +61,11 @@ enum
}; };
static ase_ssize_t read_source ( static ase_ssize_t read_source (
int cmd, void* arg, ase_char_t* data, ase_size_t count); ase_awk_iocmd_t cmd, void* arg, ase_char_t* data, ase_size_t count);
static ase_ssize_t write_source ( static ase_ssize_t write_source (
int cmd, void* arg, ase_char_t* data, ase_size_t count); ase_awk_iocmd_t cmd, void* arg, ase_char_t* data, ase_size_t count);
static ase_ssize_t process_extio ( static ase_ssize_t process_extio (
int cmd, void* arg, ase_char_t* data, ase_size_t count); ase_awk_iocmd_t cmd, void* arg, ase_char_t* data, ase_size_t count);
static ase_char_t* dup_str ( static ase_char_t* dup_str (
ase_awk_t* awk, const jchar* str, ase_size_t len); ase_awk_t* awk, const jchar* str, ase_size_t len);
@ -1453,7 +1453,7 @@ static ase_ssize_t java_next_extio (
} }
static ase_ssize_t read_source ( static ase_ssize_t read_source (
int cmd, void* arg, ase_char_t* data, ase_size_t count) ase_awk_iocmd_t cmd, void* arg, ase_char_t* data, ase_size_t count)
{ {
srcio_data_t* srcio_data = (srcio_data_t*)arg; srcio_data_t* srcio_data = (srcio_data_t*)arg;
@ -1477,7 +1477,7 @@ static ase_ssize_t read_source (
} }
static ase_ssize_t write_source ( static ase_ssize_t write_source (
int cmd, void* arg, ase_char_t* data, ase_size_t count) ase_awk_iocmd_t cmd, void* arg, ase_char_t* data, ase_size_t count)
{ {
srcio_data_t* srcio_data = (srcio_data_t*)arg; srcio_data_t* srcio_data = (srcio_data_t*)arg;
@ -1501,7 +1501,7 @@ static ase_ssize_t write_source (
} }
static ase_ssize_t process_extio ( static ase_ssize_t process_extio (
int cmd, void* arg, ase_char_t* data, ase_size_t size) ase_awk_iocmd_t cmd, void* arg, ase_char_t* data, ase_size_t size)
{ {
ase_awk_extio_t* epa = (ase_awk_extio_t*)arg; ase_awk_extio_t* epa = (ase_awk_extio_t*)arg;
runio_data_t* runio_data = (runio_data_t*)epa->custom_data; runio_data_t* runio_data = (runio_data_t*)epa->custom_data;

View File

@ -59,7 +59,7 @@ OBJ_FILES_JAR = \
$(TMP_DIR)\ase\awk\Context.class \ $(TMP_DIR)\ase\awk\Context.class \
$(TMP_DIR)\ase\awk\Clearable.class \ $(TMP_DIR)\ase\awk\Clearable.class \
$(TMP_DIR)\ase\awk\Argument.class \ $(TMP_DIR)\ase\awk\Argument.class \
$(TMP_DIR)\ase\awk\Return.class $(TMP_DIR)\ase\awk\Return.class \
$(TMP_DIR)\ase\awk\Extio.class \ $(TMP_DIR)\ase\awk\Extio.class \
$(TMP_DIR)\ase\awk\IO.class \ $(TMP_DIR)\ase\awk\IO.class \
$(TMP_DIR)\ase\awk\Console.class \ $(TMP_DIR)\ase\awk\Console.class \

View File

@ -7,10 +7,16 @@
# -Tpe # -Tpe
# -Tpd /dll # -Tpd /dll
!ifndef MODE
MODE = release
!endif
CC = bcc32 CC = bcc32
CXX = bcc32
LD = ilink32 LD = ilink32
CFLAGS = -O2 -WM -WU -RT- -w -I..\..\.. CFLAGS = -O2 -WM -WU -RT- -w -q -I..\..\..
LDFLAGS = -ap -Tpe -Gn -c -L..\..\awk -L..\..\cmn -L..\..\utl CXXFLAGS = -O2 -WM -WU -RT- -w -q -I..\..\..
LDFLAGS = -ap -Tpe -Gn -c -q -L..\..\awk -L..\..\cmn -L..\..\utl
LIBS = import32.lib cw32mt.lib aseawk.lib asecmn.lib aseutl.lib LIBS = import32.lib cw32mt.lib aseawk.lib asecmn.lib aseutl.lib
STARTUP = c0x32w.obj STARTUP = c0x32w.obj