From 1cb374c820264d33a2e568e12807b7b406847062 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 12 Mar 2007 12:57:47 +0000 Subject: [PATCH] *** empty log message *** --- ase/awk/awk.c | 44 +++++++++++++++++++++------------------- ase/awk/tree.c | 4 +++- ase/doc/awk-en.man | 2 -- ase/test/awk/err-001.out | 2 +- ase/test/awk/err-003.out | 2 +- ase/test/awk/err-004.out | 2 +- ase/test/awk/err-005.out | 2 +- ase/test/awk/err-006.out | 2 +- ase/test/awk/err-014.out | 1 + ase/test/awk/err-015.out | 1 + ase/test/awk/err-016.out | 1 + ase/test/awk/err-017.out | 1 + ase/test/awk/err-018.out | 1 + ase/test/awk/err-019.out | 1 + ase/test/awk/err-020.out | 5 +++++ 15 files changed, 42 insertions(+), 29 deletions(-) create mode 100644 ase/test/awk/err-014.out create mode 100644 ase/test/awk/err-015.out create mode 100644 ase/test/awk/err-016.out create mode 100644 ase/test/awk/err-017.out create mode 100644 ase/test/awk/err-018.out create mode 100644 ase/test/awk/err-019.out create mode 100644 ase/test/awk/err-020.out diff --git a/ase/awk/awk.c b/ase/awk/awk.c index 6551e7f0..7d6d93cf 100644 --- a/ase/awk/awk.c +++ b/ase/awk/awk.c @@ -1,5 +1,5 @@ /* - * $Id: awk.c,v 1.117 2007-03-09 14:19:54 bacon Exp $ + * $Id: awk.c,v 1.118 2007-03-12 12:55:57 bacon Exp $ * * {License} */ @@ -17,26 +17,28 @@ ase_awk_t* ase_awk_open (const ase_awk_prmfns_t* prmfns, void* custom_data) { ase_awk_t* awk; - ASE_ASSERT ( - prmfns != ASE_NULL && - prmfns->mmgr.malloc != ASE_NULL && - prmfns->mmgr.free != ASE_NULL && - prmfns->ccls.is_upper != ASE_NULL && - prmfns->ccls.is_lower != ASE_NULL && - prmfns->ccls.is_alpha != ASE_NULL && - prmfns->ccls.is_digit != ASE_NULL && - prmfns->ccls.is_xdigit != ASE_NULL && - prmfns->ccls.is_alnum != ASE_NULL && - prmfns->ccls.is_space != ASE_NULL && - prmfns->ccls.is_print != ASE_NULL && - prmfns->ccls.is_graph != ASE_NULL && - prmfns->ccls.is_cntrl != ASE_NULL && - prmfns->ccls.is_punct != ASE_NULL && - prmfns->ccls.to_upper != ASE_NULL && - prmfns->ccls.to_lower != ASE_NULL && - prmfns->misc.pow != ASE_NULL && - prmfns->misc.sprintf != ASE_NULL && - prmfns->misc.dprintf != ASE_NULL); + ASE_ASSERT (prmfns != ASE_NULL); + + ASE_ASSERT (prmfns->mmgr.malloc != ASE_NULL && + prmfns->mmgr.free != ASE_NULL); + + ASE_ASSERT (prmfns->ccls.is_upper != ASE_NULL && + prmfns->ccls.is_lower != ASE_NULL && + prmfns->ccls.is_alpha != ASE_NULL && + prmfns->ccls.is_digit != ASE_NULL && + prmfns->ccls.is_xdigit != ASE_NULL && + prmfns->ccls.is_alnum != ASE_NULL && + prmfns->ccls.is_space != ASE_NULL && + prmfns->ccls.is_print != ASE_NULL && + prmfns->ccls.is_graph != ASE_NULL && + prmfns->ccls.is_cntrl != ASE_NULL && + prmfns->ccls.is_punct != ASE_NULL && + prmfns->ccls.to_upper != ASE_NULL && + prmfns->ccls.to_lower != ASE_NULL); + + ASE_ASSERT (prmfns->misc.pow != ASE_NULL && + prmfns->misc.sprintf != ASE_NULL && + prmfns->misc.dprintf != ASE_NULL); #if defined(_WIN32) && defined(_MSC_VER) && defined(_DEBUG) awk = (ase_awk_t*) malloc (ASE_SIZEOF(ase_awk_t)); diff --git a/ase/awk/tree.c b/ase/awk/tree.c index 04454537..f7cca8e7 100644 --- a/ase/awk/tree.c +++ b/ase/awk/tree.c @@ -1,5 +1,5 @@ /* - * $Id: tree.c,v 1.106 2007-03-06 14:51:53 bacon Exp $ + * $Id: tree.c,v 1.107 2007-03-12 12:53:12 bacon Exp $ * * {License} */ @@ -305,6 +305,8 @@ static int __print_expression (ase_awk_t* awk, ase_awk_nde_t* nde) PUT_SRCSTR (awk, ASE_T("\\v")); else if (ptr[i] == ASE_T('\a')) PUT_SRCSTR (awk, ASE_T("\\a")); + else if (ptr[i] == ASE_T('\0')) + PUT_SRCSTR (awk, ASE_T("\\0")); else PUT_SRCSTRX (awk, &ptr[i], 1); } diff --git a/ase/doc/awk-en.man b/ase/doc/awk-en.man index 76b779d2..b2a87d44 100644 --- a/ase/doc/awk-en.man +++ b/ase/doc/awk-en.man @@ -78,9 +78,7 @@ struct ase_awk_prmfns_t { ase_awk_pow_t pow; ase_awk_sprintf_t sprintf; - ase_awk_aprintf_t aprintf; ase_awk_dprintf_t dprintf; - ase_awk_abort_t abort; void* custom_data; } misc; }; diff --git a/ase/test/awk/err-001.out b/ase/test/awk/err-001.out index e29eb6e1..0bcc6e8d 100644 --- a/ase/test/awk/err-001.out +++ b/ase/test/awk/err-001.out @@ -1 +1 @@ -PARSE ERROR: CODE [35] LINE [2] invalid character '' +PARSE ERROR: CODE [34] LINE [2] invalid character '' diff --git a/ase/test/awk/err-003.out b/ase/test/awk/err-003.out index 55525424..168a050b 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 [90] LINE [5] map 'abc' not assignable with a scalar +RUN ERROR: CODE [98] 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 632adcf8..9b766b92 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 [84] LINE [2] variable 'ARGC' not deletable +RUN ERROR: CODE [90] LINE [2] variable 'ARGC' not deletable diff --git a/ase/test/awk/err-005.out b/ase/test/awk/err-005.out index d1d35a18..72c4358c 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 [84] LINE [3] variable 'iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii...' not deletable +RUN ERROR: CODE [90] LINE [3] variable 'iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii...' not deletable diff --git a/ase/test/awk/err-006.out b/ase/test/awk/err-006.out index 7bc7ba2e..3155deb8 100644 --- a/ase/test/awk/err-006.out +++ b/ase/test/awk/err-006.out @@ -2,4 +2,4 @@ BEGIN { helpxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxhelphelp (); } -RUN ERROR: CODE [82] LINE [2] function 'helpxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxhel...' not found +RUN ERROR: CODE [88] LINE [2] function 'helpxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxhel...' not found diff --git a/ase/test/awk/err-014.out b/ase/test/awk/err-014.out new file mode 100644 index 00000000..ff02cf45 --- /dev/null +++ b/ase/test/awk/err-014.out @@ -0,0 +1 @@ +PARSE ERROR: CODE [46] LINE [5] a colon expected in place of ';' diff --git a/ase/test/awk/err-015.out b/ase/test/awk/err-015.out new file mode 100644 index 00000000..1c061382 --- /dev/null +++ b/ase/test/awk/err-015.out @@ -0,0 +1 @@ +PARSE ERROR: CODE [41] LINE [2] a left parenthesis expected in place of '=' diff --git a/ase/test/awk/err-016.out b/ase/test/awk/err-016.out new file mode 100644 index 00000000..514025e5 --- /dev/null +++ b/ase/test/awk/err-016.out @@ -0,0 +1 @@ +PARSE ERROR: CODE [55] LINE [2] BEGIN not followed by a left bracket on the same line diff --git a/ase/test/awk/err-017.out b/ase/test/awk/err-017.out new file mode 100644 index 00000000..82efcf63 --- /dev/null +++ b/ase/test/awk/err-017.out @@ -0,0 +1 @@ +PARSE ERROR: CODE [66] LINE [1] '+' not a valid parameter name diff --git a/ase/test/awk/err-018.out b/ase/test/awk/err-018.out new file mode 100644 index 00000000..fe048c82 --- /dev/null +++ b/ase/test/awk/err-018.out @@ -0,0 +1 @@ +PARSE ERROR: CODE [67] LINE [1] '+' not a valid variable name diff --git a/ase/test/awk/err-019.out b/ase/test/awk/err-019.out new file mode 100644 index 00000000..ef881643 --- /dev/null +++ b/ase/test/awk/err-019.out @@ -0,0 +1 @@ +PARSE ERROR: CODE [67] LINE [3] '+' not a valid variable name diff --git a/ase/test/awk/err-020.out b/ase/test/awk/err-020.out new file mode 100644 index 00000000..7330188b --- /dev/null +++ b/ase/test/awk/err-020.out @@ -0,0 +1,5 @@ +BEGIN { + print abc > "123\0abc"; +} + +RUN ERROR: CODE [113] LINE [2] i/o name containing a null character