From 212e7dc31c1e884976ccd4e1509b656371494d58 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 27 Mar 2006 09:00:51 +0000 Subject: [PATCH] Don't generate sparse array code. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@70 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl b/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl index 8c13712b..d3c98b33 100755 --- a/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl +++ b/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl @@ -158,14 +158,17 @@ puts $fo " }" puts $fo "}" puts $fo "" -puts $fo "const char *tnames\[256\] = {" +puts $fo "const char *tnames\[256\];\n" +puts $fo "void" +puts $fo "init_tnames(void)" +puts $fo "{" foreach i $token2 { - puts $fo "\t\[[lindex $i 0]\] = \"[lindex $i 0]\" /* t2 $i */," + puts $fo "\ttnames\[[lindex $i 0]\] = \"[lindex $i 0]\";" } foreach i $tokens { - puts $fo "\t\[[lindex $i 0]\] = \"[lindex $i 1]\" /* t $i */," + puts $fo "\ttnames\[[lindex $i 0]\] = \"[lindex $i 1]\";" } -puts $fo "};" +puts $fo "}" close $foh close $fo -- 2.39.5