diff --git a/ase/awk/awk.c b/ase/awk/awk.c index 30c43b66..3c7ba992 100644 --- a/ase/awk/awk.c +++ b/ase/awk/awk.c @@ -1,5 +1,5 @@ /* - * $Id: awk.c,v 1.114 2007-03-04 14:55:55 bacon Exp $ + * $Id: awk.c,v 1.115 2007-03-04 15:04:40 bacon Exp $ * * {License} */ @@ -40,7 +40,7 @@ ase_awk_t* ase_awk_open ( prmfns->misc.dprintf == ASE_NULL || prmfns->misc.abort == ASE_NULL) { - *errnum = ASE_AWK_ESYSFNS; + *errnum = ASE_AWK_EPRMFNS; return ASE_NULL; } diff --git a/ase/awk/awk.h b/ase/awk/awk.h index f50dac6c..1e7caf23 100644 --- a/ase/awk/awk.h +++ b/ase/awk/awk.h @@ -1,5 +1,5 @@ /* - * $Id: awk.h,v 1.200 2007-03-04 14:55:55 bacon Exp $ + * $Id: awk.h,v 1.201 2007-03-04 15:04:40 bacon Exp $ * * {License} */ @@ -217,10 +217,9 @@ enum ASE_AWK_EINTERN, /* internal error */ ASE_AWK_ERUNTIME, /* run-time error */ - ASE_AWK_ERUNNING, /* there are running instances */ ASE_AWK_EBLKNST, /* blocke nested too deeply */ ASE_AWK_EEXPRNST, /* expression nested too deeply */ - ASE_AWK_ESYSFNS, /* system functions not proper */ + ASE_AWK_EPRMFNS, /* system functions not proper */ ASE_AWK_ESINOP, ASE_AWK_ESINCL, diff --git a/ase/awk/awk_i.h b/ase/awk/awk_i.h index 68ed40b3..5490fde2 100644 --- a/ase/awk/awk_i.h +++ b/ase/awk/awk_i.h @@ -1,5 +1,5 @@ /* - * $Id: awk_i.h,v 1.110 2007-03-04 14:55:55 bacon Exp $ + * $Id: awk_i.h,v 1.111 2007-03-04 15:04:40 bacon Exp $ * * {License} */ @@ -195,7 +195,7 @@ struct ase_awk_t struct { - ase_char_t* fmt[1024]; + ase_char_t fmt[1024]; } tmp; /* housekeeping */ diff --git a/ase/awk/err.c b/ase/awk/err.c index 43c8f362..4b50c960 100644 --- a/ase/awk/err.c +++ b/ase/awk/err.c @@ -1,5 +1,5 @@ /* - * $Id: err.c,v 1.83 2007-03-04 14:55:55 bacon Exp $ + * $Id: err.c,v 1.84 2007-03-04 15:04:40 bacon Exp $ * * {License} */ @@ -30,7 +30,6 @@ static const ase_char_t* __geterrstr (int errnum) ASE_T("internal error that should never have happened"), ASE_T("general run-time error"), - ASE_T("one or more running instances"), ASE_T("block nested too deeply"), ASE_T("expressio nested too deeply"), ASE_T("system functions not provided or not proper"), diff --git a/ase/test/awk/awk.c b/ase/test/awk/awk.c index 79919314..d6356bd9 100644 --- a/ase/test/awk/awk.c +++ b/ase/test/awk/awk.c @@ -1,5 +1,5 @@ /* - * $Id: awk.c,v 1.182 2007-03-04 06:39:13 bacon Exp $ + * $Id: awk.c,v 1.183 2007-03-04 15:04:40 bacon Exp $ */ #include @@ -873,7 +873,7 @@ static int awk_main (int argc, ase_char_t* argv[]) #endif ase_printf ( ASE_T("ERROR: cannot open awk [%d] %s\n"), - errnum, ase_awk_geterrstr(errnum)); + errnum, ase_awk_geterrstr(ASE_NULL, errnum)); return -1; } @@ -919,10 +919,12 @@ static int awk_main (int argc, ase_char_t* argv[]) if (ase_awk_run (awk, mfn, &runios, &runcbs, runarg, ASE_NULL) == -1) { - int errnum = ase_awk_geterrnum(awk); ase_printf ( - ASE_T("error: cannot run program - [%d] %s\n"), - errnum, ase_awk_geterrstr(errnum)); + ASE_T("RUN ERROR: CODE [%d] LINE [%u] %s\n"), + ase_awk_geterrnum(awk), + (unsigned int)ase_awk_geterrlin(awk), + ase_awk_geterrmsg(awk)); + ase_awk_close (awk); return -1; } diff --git a/ase/test/awk/err-001.out b/ase/test/awk/err-001.out index 438c103c..e29eb6e1 100644 --- a/ase/test/awk/err-001.out +++ b/ase/test/awk/err-001.out @@ -1 +1 @@ -PARSE ERROR: CODE [36] LINE [2] invalid character '' +PARSE ERROR: CODE [35] LINE [2] invalid character '' diff --git a/ase/test/awk/err-003.out b/ase/test/awk/err-003.out index 313c6b50..55525424 100644 --- a/ase/test/awk/err-003.out +++ b/ase/test/awk/err-003.out @@ -5,4 +5,4 @@ BEGIN { abc = 10; } -RUN ERROR: CODE [91] LINE [5] map 'abc' not assignable with a scalar +RUN ERROR: CODE [90] LINE [5] map 'abc' not assignable with a scalar diff --git a/ase/test/awk/err-004.out b/ase/test/awk/err-004.out index ddf848d4..632adcf8 100644 --- a/ase/test/awk/err-004.out +++ b/ase/test/awk/err-004.out @@ -2,4 +2,4 @@ BEGIN { delete ARGC; } -RUN ERROR: CODE [85] LINE [2] variable 'ARGC' not deletable +RUN ERROR: CODE [84] LINE [2] variable 'ARGC' not deletable diff --git a/ase/test/awk/err-005.out b/ase/test/awk/err-005.out index b72d851e..d1d35a18 100644 --- a/ase/test/awk/err-005.out +++ b/ase/test/awk/err-005.out @@ -3,4 +3,4 @@ BEGIN { delete iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiix; } -RUN ERROR: CODE [85] LINE [3] variable 'iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii...' not deletable +RUN ERROR: CODE [84] LINE [3] variable 'iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii...' not deletable diff --git a/ase/test/awk/err-006.out b/ase/test/awk/err-006.out index 1d5d305b..7bc7ba2e 100644 --- a/ase/test/awk/err-006.out +++ b/ase/test/awk/err-006.out @@ -2,4 +2,4 @@ BEGIN { helpxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxhelphelp (); } -RUN ERROR: CODE [83] LINE [2] function 'helpxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxhel...' not found +RUN ERROR: CODE [82] LINE [2] function 'helpxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxhel...' not found diff --git a/ase/test/awk/err-007.out b/ase/test/awk/err-007.out index 8dc0c810..6357beaa 100644 --- a/ase/test/awk/err-007.out +++ b/ase/test/awk/err-007.out @@ -1 +1 @@ -PARSE ERROR: CODE [60] LINE [2] built-in function 'substr' redefined +PARSE ERROR: CODE [59] LINE [2] built-in function 'substr' redefined diff --git a/ase/test/awk/err-008.out b/ase/test/awk/err-008.out index 82de052b..ce5660d2 100644 --- a/ase/test/awk/err-008.out +++ b/ase/test/awk/err-008.out @@ -1 +1 @@ -PARSE ERROR: CODE [60] LINE [3] built-in function 'substr' redefined +PARSE ERROR: CODE [59] LINE [3] built-in function 'substr' redefined diff --git a/ase/test/awk/err-009.out b/ase/test/awk/err-009.out index 380c7232..539cefa1 100644 --- a/ase/test/awk/err-009.out +++ b/ase/test/awk/err-009.out @@ -1 +1 @@ -PARSE ERROR: CODE [61] LINE [9] function 'abc' redefined +PARSE ERROR: CODE [60] LINE [9] function 'abc' redefined diff --git a/ase/test/awk/err-010.out b/ase/test/awk/err-010.out index cb4cc63c..ba261aba 100644 --- a/ase/test/awk/err-010.out +++ b/ase/test/awk/err-010.out @@ -1 +1 @@ -PARSE ERROR: CODE [62] LINE [4] global variable 'abc' redefined +PARSE ERROR: CODE [61] LINE [4] global variable 'abc' redefined diff --git a/ase/test/awk/err-011.out b/ase/test/awk/err-011.out index 426df131..636449d8 100644 --- a/ase/test/awk/err-011.out +++ b/ase/test/awk/err-011.out @@ -1 +1 @@ -PARSE ERROR: CODE [63] LINE [4] parameter 'x' redefined +PARSE ERROR: CODE [62] LINE [4] parameter 'x' redefined diff --git a/ase/test/awk/err-012.out b/ase/test/awk/err-012.out index ce8b91f9..c549e6ea 100644 --- a/ase/test/awk/err-012.out +++ b/ase/test/awk/err-012.out @@ -1 +1 @@ -PARSE ERROR: CODE [61] LINE [11] function 'abc' redefined +PARSE ERROR: CODE [60] LINE [11] function 'abc' redefined diff --git a/ase/test/awk/err-013.out b/ase/test/awk/err-013.out index e0e9f386..94e08e01 100644 --- a/ase/test/awk/err-013.out +++ b/ase/test/awk/err-013.out @@ -1 +1 @@ -PARSE ERROR: CODE [61] LINE [1] function 'abc' redefined +PARSE ERROR: CODE [60] LINE [1] function 'abc' redefined