From 48bfdf6e2c1c50e712ec6ded2b64d433d8c3d7fc Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 21 Apr 2006 06:06:32 +0000 Subject: [PATCH] *** empty log message *** --- ase/awk/awk_i.h | 35 ++++++++++++++++++++++++++++++++++- ase/awk/run.c | 6 ++++-- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/ase/awk/awk_i.h b/ase/awk/awk_i.h index 652d0c36..25a1a987 100644 --- a/ase/awk/awk_i.h +++ b/ase/awk/awk_i.h @@ -1,5 +1,5 @@ /* - * $Id: awk_i.h,v 1.4 2006-04-16 04:31:38 bacon Exp $ + * $Id: awk_i.h,v 1.5 2006-04-21 06:06:32 bacon Exp $ */ #ifndef _XP_AWK_AWKI_H_ @@ -20,6 +20,39 @@ typedef struct xp_awk_chain_t xp_awk_chain_t; +/* + * +struct xp_awk_parse_t +{ + int opt; +}; + +struct xp_awk_run_t +{ + int opt; +}; + +awk = xp_awk_open (); +xp_awk_parse (awk, "source"); +thr = create_thread (5); + +thr[0]->xp_awk_run (awk, "data1"); +thr[1]->xp_awk_run (awk, "data2"); +thr[2]->xp_awk_run (awk, "data3"); + +xp_awk_setcallback (void* __command_callback (int cmd, void* arg), void* arg); +xp_awk_run (awk) +{ +run_stack = malloc (run_stack_size); +while () +{ +if (command_callback) if (command_callback (XP_AWK_ABORT) == yes) break; +run with run_stack +} +} + +*/ + struct xp_awk_t { /* options */ diff --git a/ase/awk/run.c b/ase/awk/run.c index 0ca17147..6b4bb73e 100644 --- a/ase/awk/run.c +++ b/ase/awk/run.c @@ -1,5 +1,5 @@ /* - * $Id: run.c,v 1.64 2006-04-20 16:17:01 bacon Exp $ + * $Id: run.c,v 1.65 2006-04-21 06:06:32 bacon Exp $ */ #include @@ -28,6 +28,7 @@ #define EXIT_CONTINUE 2 #define EXIT_FUNCTION 3 #define EXIT_GLOBAL 4 +#define EXIT_ABORT 5 #define PANIC(awk,code) \ do { (awk)->errnum = (code); return XP_NULL; } while (0) @@ -239,7 +240,8 @@ int xp_awk_run (xp_awk_t* awk) (xp_awk_nde_blk_t*)awk->tree.begin) == -1) n = -1; } - while (awk->run.exit_level != EXIT_GLOBAL) + while (awk->run.exit_level != EXIT_GLOBAL && + awk->run.exit_level != EXIT_ABORT) { awk->run.exit_level = EXIT_NONE;