*** empty log message ***

This commit is contained in:
hyung-hwan 2007-02-04 04:40:33 +00:00
parent 1294babb4e
commit f41ff496b1
3 changed files with 33 additions and 7 deletions

View File

@ -1,5 +1,5 @@
/* /*
* $Id: rex.c,v 1.56 2007-02-03 10:47:41 bacon Exp $ * $Id: rex.c,v 1.57 2007-02-04 04:40:33 bacon Exp $
* *
* {License} * {License}
*/ */
@ -333,10 +333,11 @@ int ase_awk_matchrex (
matcher.ignorecase = (option & ASE_AWK_REX_IGNORECASE)? 1: 0; matcher.ignorecase = (option & ASE_AWK_REX_IGNORECASE)? 1: 0;
mat.matched = ase_false; mat.matched = ase_false;
/* TODO: should it allow an offset here??? */ /* TODO: should it allow an offset here??? */
mat.match_ptr = str + offset; mat.match_ptr = str + offset;
while (mat.match_ptr < matcher.match.str.end) /*while (mat.match_ptr < matcher.match.str.end)*/
while (mat.match_ptr <= matcher.match.str.end)
{ {
if (__match_pattern (&matcher, code, &mat) == ASE_NULL) if (__match_pattern (&matcher, code, &mat) == ASE_NULL)
{ {

View File

@ -3,16 +3,29 @@ global header, mode;
BEGIN { BEGIN {
header = 1; header = 1;
mode = 0; mode = 0;
output=ARGV[0];
gsub (/\.man/, ".html", output);
print "OUTPUT TO: " output;
print "</html>";
print "</head>";
} }
header && /^\.[[:alpha:]]+[[:space:]]/ { header && /^\.[[:alpha:]]+[[:space:]]/ {
if ($1 == ".title") if ($1 == ".title")
{ {
print "TITLE: " $2; print "<title>" $2 "</title>";
} }
} }
header && !/^\.[[:alpha:]]+[[:space:]]/ { header = 0; } header && !/^\.[[:alpha:]]+[[:space:]]/ {
header = 0;
print "</head>";
print "<body>";
}
!header { !header {
local text; local text;
@ -38,6 +51,13 @@ header && !/^\.[[:alpha:]]+[[:space:]]/ { header = 0; }
{ {
print "<br>"; print "<br>";
} }
else
{
gsub ("<", "\\&lt;");
gsub (">", "\\&gt;");
print $0;
print "<br>";
}
} }
else if (mode == 1) else if (mode == 1)
{ {
@ -54,3 +74,8 @@ header && !/^\.[[:alpha:]]+[[:space:]]/ { header = 0; }
} }
} }
} }
END {
print "</body>";
print "</html>";
}

View File

@ -6,7 +6,7 @@ run_script_for_init()
data="$2" data="$2"
output=`echo $script | sed 's/\.awk$/.out/g'` output=`echo $script | sed 's/\.awk$/.out/g'`
./awk "$script" "$data" > "$output" ./awk -d -f "$script" "$data" > "$output"
} }
run_init() run_init()
@ -29,7 +29,7 @@ run_script_for_test()
output=`echo $script | sed 's/\.awk$/.out/g'` output=`echo $script | sed 's/\.awk$/.out/g'`
echo ">> RUNNING $script" echo ">> RUNNING $script"
./awk -f "$script" "$data" > "$output.$pid" ./awk -d -f "$script" "$data" > "$output.$pid"
#diff -y "$output" "$output.$pid" #diff -y "$output" "$output.$pid"
diff "$output" "$output.$pid" diff "$output" "$output.$pid"