*** empty log message ***

This commit is contained in:
hyung-hwan 2006-12-23 06:33:47 +00:00
parent 5082a77c2e
commit eaf49fce98
12 changed files with 27 additions and 23 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: rex.c,v 1.52 2006-12-13 14:16:12 bacon Exp $
* $Id: rex.c,v 1.53 2006-12-23 06:33:47 bacon Exp $
*/
#include <ase/awk/awk_i.h>
@ -410,7 +410,7 @@ static int __build_pattern (__builder_t* builder)
if (builder->depth.max > 0 && builder->depth.cur >= builder->depth.max)
{
builder->errnum = ASE_AWK_ERECURSION;
builder->errnum = ASE_AWK_ERECUR;
return -1;
}
@ -1076,7 +1076,7 @@ static const ase_byte_t* __match_branch_body (
if (matcher->depth.max > 0 && matcher->depth.cur >= matcher->depth.max)
{
matcher->errnum = ASE_AWK_ERECURSION;
matcher->errnum = ASE_AWK_ERECUR;
return ASE_NULL;
}

View File

@ -1,5 +1,5 @@
/*
* $Id: run.c,v 1.305 2006-12-19 14:20:30 bacon Exp $
* $Id: run.c,v 1.306 2006-12-23 06:33:47 bacon Exp $
*/
#include <ase/awk/awk_i.h>
@ -1660,7 +1660,7 @@ static int __run_block (ase_awk_run_t* run, ase_awk_nde_blk_t* nde)
if (run->depth.max.block > 0 &&
run->depth.cur.block >= run->depth.max.block)
{
run->errnum = ASE_AWK_ERECURSION;
run->errnum = ASE_AWK_ERECUR;
return -1;;
}

View File

@ -1,5 +1,5 @@
/*
* $Id: awk.c,v 1.145 2006-12-19 14:49:24 bacon Exp $
* $Id: awk.c,v 1.146 2006-12-23 06:33:47 bacon Exp $
*/
#include <ase/awk/awk.h>
@ -186,6 +186,7 @@ static FILE* awk_popen (const ase_char_t* cmd, const ase_char_t* mode)
n = wcstombs (mode_mb, mode, ASE_COUNTOF(mode_mb));
if (n == -1) return NULL;
if (n == ASE_COUNTOF(mode_mb)) cmd_mb[ASE_COUNTOF(mode_mb)-1] = '\0';
return popen (cmd_mb, mode_mb);
#endif
}
@ -289,6 +290,7 @@ static ase_ssize_t process_extio_pipe (
case ASE_AWK_IO_CLOSE:
{
fflush ((FILE*)epa->handle);
awk_dprintf (ASE_T("closing %s of type (pipe) %d\n"), epa->name, epa->type);
fclose ((FILE*)epa->handle);
epa->handle = NULL;

View File

@ -1,5 +1,5 @@
{
print __global9,$1,$__global9;
print NF,$1,$NF;
}
3 Beth 0

View File

@ -1,5 +1,5 @@
{
print __global10,$0;
print NR,$0;
}
1 Beth 4.00 0

View File

@ -1,4 +1,4 @@
(__global9 != 3) {
(NF != 3) {
print $0,"number of fields is not equal to 3";
}

View File

@ -1,4 +1,4 @@
END {
print __global10,"employees";
print NR,"employees";
}
6 employees

View File

@ -3,9 +3,9 @@
}
END {
print __global10,"employees";
print NR,"employees";
print "total pay is",pay;
print "average pay is",(pay / __global10);
print "average pay is",(pay / NR);
}
6 employees
total pay is 337.5

View File

@ -1,9 +1,9 @@
{
nc = ((nc + length ($0)) + 1);
nw = (nw + __global9);
nw = (nw + NF);
}
END {
print __global10,"lines,",nw,"words,",nc,"characters";
print NR,"lines,",nw,"words,",nc,"characters";
}
6 lines, 18 words, 77 characters

View File

@ -1,9 +1,9 @@
{
line[__global10] = $0;
line[NR] = $0;
}
END {
i = __global10;
i = NR;
while ((i > 0))
{
print line[i];

View File

@ -1,10 +1,10 @@
{
line[__global10] = $0;
line[NR] = $0;
}
END {
i = __global10;
for (i = __global10; (i > 0); i = (i - 1))
i = NR;
for (i = NR; (i > 0); i = (i - 1))
print line[i];
}
Susie 4.25 18

View File

@ -31,8 +31,8 @@ run_script_for_test()
echo ">> RUNNING $script"
./awk "$script" "$data" > "$output.$pid"
#diff -y "$output" "$output.$pid"
diff "$output" "$output.$pid"
diff -y "$output" "$output.$pid"
#diff "$output" "$output.$pid"
if [ $? -ne 0 ]
then
rm -f "$output.$pid"
@ -55,7 +55,7 @@ run_test()
echo "###################################"
echo "PROBLEM(S) DETECTED IN $script.".
echo "###################################"
break
return 1
fi
done
@ -67,9 +67,11 @@ run_test()
echo "###################################"
echo "PROBLEM(S) DETECTED IN $script.".
echo "###################################"
break
return 1
fi
done
return 0
}
#--------#