*** empty log message ***
This commit is contained in:
		@ -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>
 | 
					#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)
 | 
						if (builder->depth.max > 0 && builder->depth.cur >= builder->depth.max)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		builder->errnum = ASE_AWK_ERECURSION;
 | 
							builder->errnum = ASE_AWK_ERECUR;
 | 
				
			||||||
		return -1;
 | 
							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)
 | 
						if (matcher->depth.max > 0 && matcher->depth.cur >= matcher->depth.max)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		matcher->errnum = ASE_AWK_ERECURSION;
 | 
							matcher->errnum = ASE_AWK_ERECUR;
 | 
				
			||||||
		return ASE_NULL;
 | 
							return ASE_NULL;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -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>
 | 
					#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 &&
 | 
						if (run->depth.max.block > 0 &&
 | 
				
			||||||
	    run->depth.cur.block >= run->depth.max.block)
 | 
						    run->depth.cur.block >= run->depth.max.block)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		run->errnum = ASE_AWK_ERECURSION;
 | 
							run->errnum = ASE_AWK_ERECUR;
 | 
				
			||||||
		return -1;;
 | 
							return -1;;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -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>
 | 
					#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));
 | 
						n = wcstombs (mode_mb, mode, ASE_COUNTOF(mode_mb));
 | 
				
			||||||
	if (n == -1) return NULL;
 | 
						if (n == -1) return NULL;
 | 
				
			||||||
	if (n == ASE_COUNTOF(mode_mb)) cmd_mb[ASE_COUNTOF(mode_mb)-1] = '\0';
 | 
						if (n == ASE_COUNTOF(mode_mb)) cmd_mb[ASE_COUNTOF(mode_mb)-1] = '\0';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return popen (cmd_mb, mode_mb);
 | 
						return popen (cmd_mb, mode_mb);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -289,6 +290,7 @@ static ase_ssize_t process_extio_pipe (
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		case ASE_AWK_IO_CLOSE:
 | 
							case ASE_AWK_IO_CLOSE:
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
 | 
								fflush ((FILE*)epa->handle);
 | 
				
			||||||
			awk_dprintf (ASE_T("closing %s of type (pipe) %d\n"),  epa->name, epa->type);
 | 
								awk_dprintf (ASE_T("closing %s of type (pipe) %d\n"),  epa->name, epa->type);
 | 
				
			||||||
			fclose ((FILE*)epa->handle);
 | 
								fclose ((FILE*)epa->handle);
 | 
				
			||||||
			epa->handle = NULL;
 | 
								epa->handle = NULL;
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	print __global9,$1,$__global9;
 | 
						print NF,$1,$NF;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
3 Beth 0
 | 
					3 Beth 0
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	print __global10,$0;
 | 
						print NR,$0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
1 Beth	4.00	0
 | 
					1 Beth	4.00	0
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
(__global9 != 3) {
 | 
					(NF != 3) {
 | 
				
			||||||
	print $0,"number of fields is not equal to 3";
 | 
						print $0,"number of fields is not equal to 3";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
END {
 | 
					END {
 | 
				
			||||||
	print __global10,"employees";
 | 
						print NR,"employees";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
6 employees
 | 
					6 employees
 | 
				
			||||||
 | 
				
			|||||||
@ -3,9 +3,9 @@
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
END {
 | 
					END {
 | 
				
			||||||
	print __global10,"employees";
 | 
						print NR,"employees";
 | 
				
			||||||
	print "total pay is",pay;
 | 
						print "total pay is",pay;
 | 
				
			||||||
	print "average pay is",(pay / __global10);
 | 
						print "average pay is",(pay / NR);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
6 employees
 | 
					6 employees
 | 
				
			||||||
total pay is 337.5
 | 
					total pay is 337.5
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,9 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	nc = ((nc + length ($0)) + 1);
 | 
						nc = ((nc + length ($0)) + 1);
 | 
				
			||||||
	nw = (nw + __global9);
 | 
						nw = (nw + NF);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
END {
 | 
					END {
 | 
				
			||||||
	print __global10,"lines,",nw,"words,",nc,"characters";
 | 
						print NR,"lines,",nw,"words,",nc,"characters";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
6 lines, 18 words, 77 characters
 | 
					6 lines, 18 words, 77 characters
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,9 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	line[__global10] = $0;
 | 
						line[NR] = $0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
END {
 | 
					END {
 | 
				
			||||||
	i = __global10;
 | 
						i = NR;
 | 
				
			||||||
	while ((i > 0))
 | 
						while ((i > 0))
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		print line[i];
 | 
							print line[i];
 | 
				
			||||||
 | 
				
			|||||||
@ -1,10 +1,10 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	line[__global10] = $0;
 | 
						line[NR] = $0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
END {
 | 
					END {
 | 
				
			||||||
	i = __global10;
 | 
						i = NR;
 | 
				
			||||||
	for (i = __global10; (i > 0); i = (i - 1))
 | 
						for (i = NR; (i > 0); i = (i - 1))
 | 
				
			||||||
		print line[i];
 | 
							print line[i];
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
Susie	4.25	18
 | 
					Susie	4.25	18
 | 
				
			||||||
 | 
				
			|||||||
@ -31,8 +31,8 @@ run_script_for_test()
 | 
				
			|||||||
	echo ">> RUNNING $script"
 | 
						echo ">> RUNNING $script"
 | 
				
			||||||
	./awk "$script" "$data" > "$output.$pid"
 | 
						./awk "$script" "$data" > "$output.$pid"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	#diff -y "$output" "$output.$pid" 
 | 
						diff -y "$output" "$output.$pid" 
 | 
				
			||||||
	diff "$output" "$output.$pid" 
 | 
						#diff "$output" "$output.$pid" 
 | 
				
			||||||
	if [ $? -ne 0 ]
 | 
						if [ $? -ne 0 ]
 | 
				
			||||||
	then
 | 
						then
 | 
				
			||||||
		rm -f "$output.$pid"
 | 
							rm -f "$output.$pid"
 | 
				
			||||||
@ -55,7 +55,7 @@ run_test()
 | 
				
			|||||||
			echo "###################################"
 | 
								echo "###################################"
 | 
				
			||||||
			echo "PROBLEM(S) DETECTED IN $script.".
 | 
								echo "PROBLEM(S) DETECTED IN $script.".
 | 
				
			||||||
			echo "###################################"
 | 
								echo "###################################"
 | 
				
			||||||
			break
 | 
								return 1
 | 
				
			||||||
		fi
 | 
							fi
 | 
				
			||||||
	done
 | 
						done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -67,9 +67,11 @@ run_test()
 | 
				
			|||||||
			echo "###################################"
 | 
								echo "###################################"
 | 
				
			||||||
			echo "PROBLEM(S) DETECTED IN $script.".
 | 
								echo "PROBLEM(S) DETECTED IN $script.".
 | 
				
			||||||
			echo "###################################"
 | 
								echo "###################################"
 | 
				
			||||||
			break
 | 
								return 1
 | 
				
			||||||
		fi
 | 
							fi
 | 
				
			||||||
	done
 | 
						done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return 0
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#--------#
 | 
					#--------#
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user