From: Tom Yu Date: Thu, 7 Oct 2004 21:11:29 +0000 (+0000) Subject: * et_c.awk, et_h.awk: Fix off-by-one error. X-Git-Tag: krb5-1.4-beta1~28 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f9901b77b13039c26189f3af164e7998c038a07f;p=krb5.git * 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 --- diff --git a/src/util/et/ChangeLog b/src/util/et/ChangeLog index 0c7114832..934983400 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 336884235..cc277f5dc 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 a4348a409..a845eb0f8 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 380083830..e3d9fa4c7 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 b5d1ee980..e0965de4d 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;