From ddeb802ade56ff64e3253d53fd320ce84e8625ad Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sun, 13 Aug 2006 06:33:30 +0000 Subject: [PATCH] *** empty log message *** --- ase/test/awk/awk.c | 17 +++++++---------- ase/test/awk/t23.awk | 1 + ase/test/awk/t28.awk | 5 +++++ 3 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 ase/test/awk/t28.awk diff --git a/ase/test/awk/awk.c b/ase/test/awk/awk.c index 18f91538..708783ee 100644 --- a/ase/test/awk/awk.c +++ b/ase/test/awk/awk.c @@ -1,5 +1,5 @@ /* - * $Id: awk.c,v 1.70 2006-08-10 16:06:52 bacon Exp $ + * $Id: awk.c,v 1.71 2006-08-13 06:33:30 bacon Exp $ */ #include @@ -525,16 +525,13 @@ static void __on_run_start (xp_awk_t* awk, void* handle, void* arg) xp_printf (XP_T("AWK PRORAM ABOUT TO START...\n")); } -static void __on_run_end (xp_awk_t* awk, void* handle, void* arg) +static void __on_run_end (xp_awk_t* awk, void* handle, int errnum, void* arg) { - int x; - - xp_awk_getrunerrnum (app_awk, app_run, &x); - if (x != XP_AWK_ENOERR) + if (errnum != XP_AWK_ENOERR) { - xp_printf (XP_T("AWK PRORAM ABOUT TO END WITH AN ERROR - %d - %s\n"), x, xp_awk_geterrstr (x)); + xp_printf (XP_T("AWK PRORAM ABOUT TO END WITH AN ERROR - %d - %s\n"), errnum, xp_awk_geterrstr (errnum)); } - else xp_printf (XP_T("AWK PRORAM ABOUT TO END...\n")); + else xp_printf (XP_T("AWK PRORAM ENDED SUCCESSFUL\n")); app_awk = NULL; app_run = NULL; @@ -635,8 +632,8 @@ static int __main (int argc, xp_char_t* argv[]) runios.file = process_extio_file; runios.console = process_extio_console; - runcbs.start = __on_run_start; - runcbs.end = __on_run_end; + runcbs.on_start = __on_run_start; + runcbs.on_end = __on_run_end; runcbs.custom_data = XP_NULL; if (xp_awk_run (awk, &runios, &runcbs) == -1) diff --git a/ase/test/awk/t23.awk b/ase/test/awk/t23.awk index 7cac49e0..d3a3c414 100644 --- a/ase/test/awk/t23.awk +++ b/ase/test/awk/t23.awk @@ -10,6 +10,7 @@ } */ + BEGIN { c["Europe"] = "XXX"; } /Europe/, /Africa/ { print $0; } diff --git a/ase/test/awk/t28.awk b/ase/test/awk/t28.awk new file mode 100644 index 00000000..1d5e353f --- /dev/null +++ b/ase/test/awk/t28.awk @@ -0,0 +1,5 @@ +END { + print index ("abc", "abc"); + print index ("abc", "b"); + print index ("abc", "k"); +}