r70 - trunk/varnish-cache/lib/libvcl

phk at projects.linpro.no phk at projects.linpro.no
Mon Mar 27 11:00:51 CEST 2006


Author: phk
Date: 2006-03-27 11:00:51 +0200 (Mon, 27 Mar 2006)
New Revision: 70

Modified:
   trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl
Log:
Don't generate sparse array code.


Modified: trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl	2006-03-24 10:46:46 UTC (rev 69)
+++ trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl	2006-03-27 09:00:51 UTC (rev 70)
@@ -158,14 +158,17 @@
 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




More information about the varnish-commit mailing list