From f41ff496b1d146aedd268df248fa9811f753db5d Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sun, 4 Feb 2007 04:40:33 +0000 Subject: [PATCH] *** empty log message *** --- ase/awk/rex.c | 7 ++++--- ase/rel/doc.awk | 29 +++++++++++++++++++++++++++-- ase/test/awk/regress.sh | 4 ++-- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/ase/awk/rex.c b/ase/awk/rex.c index 6d02ea1e..b624fe63 100644 --- a/ase/awk/rex.c +++ b/ase/awk/rex.c @@ -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} */ @@ -333,10 +333,11 @@ int ase_awk_matchrex ( matcher.ignorecase = (option & ASE_AWK_REX_IGNORECASE)? 1: 0; mat.matched = ase_false; -/* TODO: should it allow an offset here??? */ + /* TODO: should it allow an offset here??? */ 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) { diff --git a/ase/rel/doc.awk b/ase/rel/doc.awk index 833281d4..b9da2e2f 100644 --- a/ase/rel/doc.awk +++ b/ase/rel/doc.awk @@ -3,16 +3,29 @@ global header, mode; BEGIN { header = 1; mode = 0; + + output=ARGV[0]; + gsub (/\.man/, ".html", output); + + print "OUTPUT TO: " output; + + print ""; + print ""; } header && /^\.[[:alpha:]]+[[:space:]]/ { if ($1 == ".title") { - print "TITLE: " $2; + print "" $2 ""; } } -header && !/^\.[[:alpha:]]+[[:space:]]/ { header = 0; } +header && !/^\.[[:alpha:]]+[[:space:]]/ { + + header = 0; + print ""; + print ""; +} !header { local text; @@ -38,6 +51,13 @@ header && !/^\.[[:alpha:]]+[[:space:]]/ { header = 0; } { print "
"; } + else + { + gsub ("<", "\\<"); + gsub (">", "\\>"); + print $0; + print "
"; + } } else if (mode == 1) { @@ -54,3 +74,8 @@ header && !/^\.[[:alpha:]]+[[:space:]]/ { header = 0; } } } } + +END { + print ""; + print ""; +} diff --git a/ase/test/awk/regress.sh b/ase/test/awk/regress.sh index 6ed1d4d5..9b24b97f 100755 --- a/ase/test/awk/regress.sh +++ b/ase/test/awk/regress.sh @@ -6,7 +6,7 @@ run_script_for_init() data="$2" output=`echo $script | sed 's/\.awk$/.out/g'` - ./awk "$script" "$data" > "$output" + ./awk -d -f "$script" "$data" > "$output" } run_init() @@ -29,7 +29,7 @@ run_script_for_test() output=`echo $script | sed 's/\.awk$/.out/g'` echo ">> RUNNING $script" - ./awk -f "$script" "$data" > "$output.$pid" + ./awk -d -f "$script" "$data" > "$output.$pid" #diff -y "$output" "$output.$pid" diff "$output" "$output.$pid"