From 8d1ccbc72b66b5b506e2f1d1c219b6575bd57805 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sun, 9 Apr 2006 15:34:38 +0000 Subject: [PATCH] *** empty log message *** --- ase/awk/run.c | 22 ++++++++++++++++++---- ase/test/awk/awk.c | 4 +++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/ase/awk/run.c b/ase/awk/run.c index bf6051d8..3c69d534 100644 --- a/ase/awk/run.c +++ b/ase/awk/run.c @@ -1,5 +1,5 @@ /* - * $Id: run.c,v 1.39 2006-04-09 15:31:13 bacon Exp $ + * $Id: run.c,v 1.40 2006-04-09 15:34:38 bacon Exp $ */ #include @@ -1724,12 +1724,12 @@ static xp_awk_val_t* __eval_call (xp_awk_t* awk, xp_awk_nde_t* nde) /* * --------------------- - * locn <- stack top + * localn <- stack top * --------------------- * .... * --------------------- - * loc0 local variables are pushed by __run_block - * --------------------- + * local0 local variables are pushed by __run_block + * ===================== * argn * --------------------- * .... @@ -1745,6 +1745,20 @@ static xp_awk_val_t* __eval_call (xp_awk_t* awk, xp_awk_nde_t* nde) * previous stack top * --------------------- * previous stack base <- stack base + * ===================== + * 0 (nargs) <- stack top + * --------------------- + * return value + * --------------------- + * previous stack top + * --------------------- + * previous stack base <- stack base + * ===================== + * globaln + * --------------------- + * .... + * --------------------- + * global0 * --------------------- */ diff --git a/ase/test/awk/awk.c b/ase/test/awk/awk.c index efdaf094..b488737b 100644 --- a/ase/test/awk/awk.c +++ b/ase/test/awk/awk.c @@ -1,5 +1,5 @@ /* - * $Id: awk.c,v 1.16 2006-04-06 16:25:37 bacon Exp $ + * $Id: awk.c,v 1.17 2006-04-09 15:31:13 bacon Exp $ */ #include @@ -74,6 +74,8 @@ int xp_main (int argc, char* argv[]) XP_AWK_EXPLICIT | XP_AWK_UNIQUE | XP_AWK_SHADING | XP_AWK_IMPLICIT | XP_AWK_SHIFT); + xp_awk_setrunopt (awk, XP_AWK_RUNMAIN); + if (xp_awk_parse(awk) == -1) { xp_printf ( XP_TEXT("error: cannot parse program - [%d] %s\n"),