diff options
-rw-r--r-- | src/util/et/ChangeLog | 5 | ||||
-rw-r--r-- | src/util/et/et_c.awk | 2 | ||||
-rw-r--r-- | src/util/et/et_c.pl | 2 | ||||
-rw-r--r-- | src/util/et/et_h.awk | 3 | ||||
-rw-r--r-- | src/util/et/et_h.pl | 3 |
5 files changed, 11 insertions, 4 deletions
diff --git a/src/util/et/ChangeLog b/src/util/et/ChangeLog index 0c71148..9349834 100644 --- a/src/util/et/ChangeLog +++ b/src/util/et/ChangeLog @@ -1,3 +1,8 @@ +2004-10-07 Tom Yu <tlyu@mit.edu> + + * et_c.awk, et_h.awk: Fix off-by-one error. + * et_c.pl, et_h.pl: Regenerated. + 2004-10-06 Ken Raeburn <raeburn@mit.edu> * et_c.awk, et_h.awk: Complain if the error table is too large. diff --git a/src/util/et/et_c.awk b/src/util/et/et_c.awk index 3368842..cc277f5 100644 --- a/src/util/et/et_c.awk +++ b/src/util/et/et_c.awk @@ -184,7 +184,7 @@ c2n["_"]=63 skipone=0 } END { - if (table_item_count > 255) { + if (table_item_count > 256) { print "Error table too large!" | "cat 1>&2" exit 1 } diff --git a/src/util/et/et_c.pl b/src/util/et/et_c.pl index a4348a4..a845eb0 100644 --- a/src/util/et/et_c.pl +++ b/src/util/et/et_c.pl @@ -230,7 +230,7 @@ line: while (<>) { $skipone = 0; } -if ($table_item_count > 255) { +if ($table_item_count > 256) { &Pick('|', 'cat 1>&2') && (print $fh 'Error table too large!'); exit 1; diff --git a/src/util/et/et_h.awk b/src/util/et/et_h.awk index 3800838..e3d9fa4 100644 --- a/src/util/et/et_h.awk +++ b/src/util/et/et_h.awk @@ -113,6 +113,7 @@ c2n["_"]=63 print "" > outfile print "#include <com_err.h>" > outfile print "" > outfile + table_item_count = 0 } /^[ \t]*(error_code|ec)[ \t]+[A-Z_0-9]+,/ { @@ -136,7 +137,7 @@ c2n["_"]=63 } END { - if (table_item_count > 255) { + if (table_item_count > 256) { print "Error table too large!" | "cat 1>&2" exit 1 } diff --git a/src/util/et/et_h.pl b/src/util/et/et_h.pl index b5d1ee9..e0965de 100644 --- a/src/util/et/et_h.pl +++ b/src/util/et/et_h.pl @@ -140,6 +140,7 @@ line: while (<>) { (print $fh '#include <com_err.h>'); &Pick('>', $outfile) && (print $fh ''); + $table_item_count = 0; } if (/^[ \t]*(error_code|ec)[ \t]+[A-Z_0-9]+,/) { @@ -168,7 +169,7 @@ line: while (<>) { } } -if ($table_item_count > 255) { +if ($table_item_count > 256) { &Pick('|', 'cat 1>&2') && (print $fh 'Error table too large!'); exit 1; |