This commit is contained in:
hyung-hwan 2007-12-07 21:05:04 +00:00
parent da5982c8d3
commit d34285c827
2 changed files with 21 additions and 2 deletions

View File

@ -14,6 +14,25 @@
x[30] = d; x[30] = d;
} }
* fixed a control-flow bug in the following context.
function error() { exit (1); }
function getx()
{
if (x == 2) error();
return x++;
}
function gety() { return y++; }
BEGIN {
x = 0;
y = 0;
print getx() + gety();
print getx() + gety();
/* this following line should not have been printed as
* exit() is executed in getx(). */
print getx() + gety();
print getx() + gety();
}
[0.3.2] [0.3.2]
* fixed a build problem for x64 target in MSVC2005 * fixed a build problem for x64 target in MSVC2005

View File

@ -804,7 +804,7 @@ static int print_awk_value (ase_awk_pair_t* pair, void* arg)
static void on_run_statement ( static void on_run_statement (
ase_awk_run_t* run, ase_size_t line, void* custom) ase_awk_run_t* run, ase_size_t line, void* custom)
{ {
dprintf (L"running %d\n", (int)line); /*dprintf (L"running %d\n", (int)line);*/
} }
static void on_run_return ( static void on_run_return (
@ -1180,7 +1180,7 @@ static int awk_main (int argc, ase_char_t* argv[])
ase_awk_setmaxdepth ( ase_awk_setmaxdepth (
awk, ASE_AWK_DEPTH_BLOCK_PARSE | ASE_AWK_DEPTH_EXPR_PARSE, 50); awk, ASE_AWK_DEPTH_BLOCK_PARSE | ASE_AWK_DEPTH_EXPR_PARSE, 50);
ase_awk_setmaxdepth ( ase_awk_setmaxdepth (
awk, ASE_AWK_DEPTH_BLOCK_RUN | ASE_AWK_DEPTH_EXPR_RUN, 1000); awk, ASE_AWK_DEPTH_BLOCK_RUN | ASE_AWK_DEPTH_EXPR_RUN, 500);
/*ase_awk_setkeyword (awk, ASE_T("func"), 4, ASE_T("FX"), 2);*/ /*ase_awk_setkeyword (awk, ASE_T("func"), 4, ASE_T("FX"), 2);*/