From f9901b77b13039c26189f3af164e7998c038a07f Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Thu, 7 Oct 2004 21:11:29 +0000 Subject: * et_c.awk, et_h.awk: Fix off-by-one error. * et_c.pl, et_h.pl: Regenerated. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16813 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/et/ChangeLog | 5 +++++ src/util/et/et_c.awk | 2 +- src/util/et/et_c.pl | 2 +- src/util/et/et_h.awk | 3 ++- 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 + + * et_c.awk, et_h.awk: Fix off-by-one error. + * et_c.pl, et_h.pl: Regenerated. + 2004-10-06 Ken Raeburn * 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 " > 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 '); &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; -- cgit v1.1