Mailing List Archive

r212 - in trunk/varnish-cache: bin/varnishd include lib/libvcl
Author: phk
Date: 2006-06-20 13:39:20 +0200 (Tue, 20 Jun 2006)
New Revision: 212

Added:
trunk/varnish-cache/include/vcl.h
Removed:
trunk/varnish-cache/include/vcl_lang.h
Modified:
trunk/varnish-cache/bin/varnishd/cache_backend.c
trunk/varnish-cache/bin/varnishd/cache_fetch.c
trunk/varnish-cache/bin/varnishd/cache_main.c
trunk/varnish-cache/bin/varnishd/cache_pass.c
trunk/varnish-cache/bin/varnishd/cache_pipe.c
trunk/varnish-cache/bin/varnishd/cache_pool.c
trunk/varnish-cache/bin/varnishd/cache_vcl.c
trunk/varnish-cache/bin/varnishd/cache_vrt.c
trunk/varnish-cache/bin/varnishd/hash_simple_list.c
trunk/varnish-cache/bin/varnishd/rfc2616.c
trunk/varnish-cache/bin/varnishd/storage_file.c
trunk/varnish-cache/bin/varnishd/storage_malloc.c
trunk/varnish-cache/bin/varnishd/varnishd.c
trunk/varnish-cache/include/vrt.h
trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c
trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl
Log:
Rename vcl_lang.h to vcl.h and include practically nowhere.

Remove #include bogohandling in vcl_gen_fixed_token.tcl



Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-06-20 11:39:20 UTC (rev 212)
@@ -41,7 +41,6 @@

#include "libvarnish.h"
#include "shmlog.h"
-#include "vcl_lang.h"
#include "cache.h"

/* A backend connection */

Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-06-20 11:39:20 UTC (rev 212)
@@ -20,7 +20,6 @@

#include "libvarnish.h"
#include "shmlog.h"
-#include "vcl_lang.h"
#include "cache.h"

/*

Modified: trunk/varnish-cache/bin/varnishd/cache_main.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_main.c 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/bin/varnishd/cache_main.c 2006-06-20 11:39:20 UTC (rev 212)
@@ -19,7 +19,6 @@
#include "libvarnish.h"
#include "heritage.h"
#include "shmlog.h"
-#include "vcl_lang.h"
#include "cache.h"
#include "cli_event.h"


Modified: trunk/varnish-cache/bin/varnishd/cache_pass.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-06-20 11:39:20 UTC (rev 212)
@@ -19,7 +19,6 @@

#include "libvarnish.h"
#include "shmlog.h"
-#include "vcl_lang.h"
#include "cache.h"



Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-06-20 11:39:20 UTC (rev 212)
@@ -15,7 +15,6 @@

#include "libvarnish.h"
#include "shmlog.h"
-#include "vcl_lang.h"
#include "cache.h"

struct edir {

Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-06-20 11:39:20 UTC (rev 212)
@@ -16,7 +16,7 @@

#include "libvarnish.h"
#include "shmlog.h"
-#include "vcl_lang.h"
+#include "vcl.h"
#include "cache.h"

static TAILQ_HEAD(, sess) shd = TAILQ_HEAD_INITIALIZER(shd);

Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-06-20 11:39:20 UTC (rev 212)
@@ -13,7 +13,7 @@
#include "cli.h"
#include "cli_priv.h"
#include "shmlog.h"
-#include "vcl_lang.h"
+#include "vcl.h"
#include "libvarnish.h"
#include "cache.h"


Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-06-20 11:39:20 UTC (rev 212)
@@ -17,8 +17,8 @@
#include "cli_priv.h"
#include "shmlog.h"
#include "vrt.h"
+#include "vcl.h"
#include "libvarnish.h"
-#include "vcl_lang.h"
#include "cache.h"

/*--------------------------------------------------------------------*/

Modified: trunk/varnish-cache/bin/varnishd/hash_simple_list.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2006-06-20 11:39:20 UTC (rev 212)
@@ -10,7 +10,6 @@
#include <sys/queue.h>

#include <libvarnish.h>
-#include <vcl_lang.h>
#include <cache.h>

struct hsl_entry {

Modified: trunk/varnish-cache/bin/varnishd/rfc2616.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/rfc2616.c 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/bin/varnishd/rfc2616.c 2006-06-20 11:39:20 UTC (rev 212)
@@ -5,7 +5,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
-#include "vcl_lang.h"

#include "cache.h"
#include "libvarnish.h"

Modified: trunk/varnish-cache/bin/varnishd/storage_file.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-06-20 11:39:20 UTC (rev 212)
@@ -21,7 +21,6 @@
#include <sys/mman.h>
#include <sys/socket.h>

-#include "vcl_lang.h"
#include "libvarnish.h"
#include "cache.h"


Modified: trunk/varnish-cache/bin/varnishd/storage_malloc.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_malloc.c 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/bin/varnishd/storage_malloc.c 2006-06-20 11:39:20 UTC (rev 212)
@@ -9,7 +9,6 @@
#include <sys/queue.h>
#include <pthread.h>

-#include "vcl_lang.h"
#include "cache.h"

struct sma {

Modified: trunk/varnish-cache/bin/varnishd/varnishd.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/varnishd.c 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/bin/varnishd/varnishd.c 2006-06-20 11:39:20 UTC (rev 212)
@@ -25,8 +25,6 @@
#include <libvarnish.h>
#include <libvcl.h>

-#include "vcl_lang.h"
-
#include "mgt.h"
#include "heritage.h"
#include "cli_event.h"

Copied: trunk/varnish-cache/include/vcl.h (from rev 211, trunk/varnish-cache/include/vcl_lang.h)
===================================================================
--- trunk/varnish-cache/include/vcl_lang.h 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/include/vcl.h 2006-06-20 11:39:20 UTC (rev 212)
@@ -0,0 +1,28 @@
+/*
+ * $Id$
+ *
+ * Interface to a compiled VCL program.
+ *
+ * XXX: When this file is changed, lib/libvcl/vcl_gen_fixed_token.tcl
+ * XXX: *MUST* be rerun.
+ */
+
+struct sess;
+
+typedef void vcl_init_f(void);
+typedef int vcl_func_f(struct sess *sp);
+
+struct VCL_conf {
+ unsigned magic;
+#define VCL_CONF_MAGIC 0x7406c509 /* from /dev/random */
+ vcl_init_f *init_func;
+ vcl_func_f *recv_func;
+ vcl_func_f *hit_func;
+ vcl_func_f *miss_func;
+ vcl_func_f *fetch_func;
+ struct backend **backend;
+ unsigned nbackend;
+ struct vrt_ref *ref;
+ unsigned nref;
+ unsigned busy;
+};

Deleted: trunk/varnish-cache/include/vcl_lang.h
===================================================================
--- trunk/varnish-cache/include/vcl_lang.h 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/include/vcl_lang.h 2006-06-20 11:39:20 UTC (rev 212)
@@ -1,26 +0,0 @@
-/*
- * Stuff necessary to compile a VCL programs C code
- *
- * XXX: When this file is changed, lib/libvcl/vcl_gen_fixed_token.tcl
- * XXX: *MUST* be rerun.
- */
-
-struct sess;
-
-typedef void vcl_init_f(void);
-typedef int vcl_func_f(struct sess *sp);
-
-struct VCL_conf {
- unsigned magic;
-#define VCL_CONF_MAGIC 0x7406c509 /* from /dev/random */
- vcl_init_f *init_func;
- vcl_func_f *recv_func;
- vcl_func_f *hit_func;
- vcl_func_f *miss_func;
- vcl_func_f *fetch_func;
- struct backend **backend;
- unsigned nbackend;
- struct vrt_ref *ref;
- unsigned nref;
- unsigned busy;
-};

Modified: trunk/varnish-cache/include/vrt.h
===================================================================
--- trunk/varnish-cache/include/vrt.h 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/include/vrt.h 2006-06-20 11:39:20 UTC (rev 212)
@@ -1,5 +1,6 @@
-/* $Id$ */
/*
+ * $Id$
+ *
* Runtime support for compiled VCL programs.
*
* XXX: When this file is changed, lib/libvcl/vcl_gen_fixed_token.tcl

Modified: trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/lib/libvcl/vcl_fixed_token.c 2006-06-20 11:39:20 UTC (rev 212)
@@ -398,8 +398,10 @@
vcl_output_lang_h(FILE *f)
{
fputs("/*\n", f);
- fputs(" * Stuff necessary to compile a VCL programs C code\n", f);
+ fputs(" * $Id$\n", f);
fputs(" *\n", f);
+ fputs(" * Interface to a compiled VCL program.\n", f);
+ fputs(" *\n", f);
fputs(" * XXX: When this file is changed, lib/libvcl/vcl_gen_fixed_token.tcl\n", f);
fputs(" * XXX: *MUST* be rerun.\n", f);
fputs(" */\n", f);
@@ -423,8 +425,9 @@
fputs(" unsigned nref;\n", f);
fputs(" unsigned busy;\n", f);
fputs("};\n", f);
- fputs("/* $Id$ */\n", f);
fputs("/*\n", f);
+ fputs(" * $Id$ \n", f);
+ fputs(" *\n", f);
fputs(" * Runtime support for compiled VCL programs.\n", f);
fputs(" *\n", f);
fputs(" * XXX: When this file is changed, lib/libvcl/vcl_gen_fixed_token.tcl\n", f);
@@ -441,6 +444,7 @@
fputs("\n", f);
fputs("struct sess;\n", f);
fputs("struct backend;\n", f);
+ fputs("struct VCL_conf;\n", f);
fputs("\n", f);
fputs("struct vrt_ref {\n", f);
fputs(" unsigned line;\n", f);

Modified: trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl 2006-06-20 10:31:50 UTC (rev 211)
+++ trunk/varnish-cache/lib/libvcl/vcl_gen_fixed_token.tcl 2006-06-20 11:39:20 UTC (rev 212)
@@ -183,16 +183,6 @@

set fi [open $n]
while {[gets $fi a] >= 0} {
- if {"$a" == "#include <http_headers.h>"} {
- puts "FOO $a"
- set fx [open "../../include/http_headers.h"]
- while {[gets $fx b] >= 0} {
- regsub -all {"} $b {\"} b
- puts $fo "\tfputs(\"$b\\n\", f);"
- }
- close $fx
- continue
- }
regsub -all {\\} $a {\\\\} a
puts $fo "\tfputs(\"$a\\n\", f);"
}
@@ -203,7 +193,7 @@
puts $fo "void"
puts $fo "vcl_output_lang_h(FILE *f)"
puts $fo "{"
-copy_include ../../include/vcl_lang.h
+copy_include ../../include/vcl.h
copy_include ../../include/vrt.h

puts $fo "}"