r3580 - in branches/2.0/varnish-cache: bin/varnishadm bin/varnishd bin/varnishhist bin/varnishlog bin/varnishncsa bin/varnishreplay bin/varnishstat bin/varnishtest bin/varnishtop include lib/libvarnish lib/libvarnishapi lib/libvcl

tfheen at projects.linpro.no tfheen at projects.linpro.no
Thu Feb 5 09:45:26 CET 2009


Author: tfheen
Date: 2009-02-05 09:45:25 +0100 (Thu, 05 Feb 2009)
New Revision: 3580

Modified:
   branches/2.0/varnish-cache/bin/varnishadm/varnishadm.c
   branches/2.0/varnish-cache/bin/varnishd/Makefile.am
   branches/2.0/varnish-cache/bin/varnishd/cache.h
   branches/2.0/varnish-cache/bin/varnishd/cache_acceptor.c
   branches/2.0/varnish-cache/bin/varnishd/cache_acceptor.h
   branches/2.0/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c
   branches/2.0/varnish-cache/bin/varnishd/cache_acceptor_ports.c
   branches/2.0/varnish-cache/bin/varnishd/cache_backend.c
   branches/2.0/varnish-cache/bin/varnishd/cache_backend_cfg.c
   branches/2.0/varnish-cache/bin/varnishd/cache_backend_poll.c
   branches/2.0/varnish-cache/bin/varnishd/cache_ban.c
   branches/2.0/varnish-cache/bin/varnishd/cache_center.c
   branches/2.0/varnish-cache/bin/varnishd/cache_cli.c
   branches/2.0/varnish-cache/bin/varnishd/cache_dir_random.c
   branches/2.0/varnish-cache/bin/varnishd/cache_dir_round_robin.c
   branches/2.0/varnish-cache/bin/varnishd/cache_dir_simple.c
   branches/2.0/varnish-cache/bin/varnishd/cache_expire.c
   branches/2.0/varnish-cache/bin/varnishd/cache_fetch.c
   branches/2.0/varnish-cache/bin/varnishd/cache_hash.c
   branches/2.0/varnish-cache/bin/varnishd/cache_http.c
   branches/2.0/varnish-cache/bin/varnishd/cache_httpconn.c
   branches/2.0/varnish-cache/bin/varnishd/cache_panic.c
   branches/2.0/varnish-cache/bin/varnishd/cache_pipe.c
   branches/2.0/varnish-cache/bin/varnishd/cache_pool.c
   branches/2.0/varnish-cache/bin/varnishd/cache_vcl.c
   branches/2.0/varnish-cache/bin/varnishd/cache_vrt.c
   branches/2.0/varnish-cache/bin/varnishd/cache_vrt_esi.c
   branches/2.0/varnish-cache/bin/varnishd/cache_vrt_re.c
   branches/2.0/varnish-cache/bin/varnishd/default.vcl
   branches/2.0/varnish-cache/bin/varnishd/hash_classic.c
   branches/2.0/varnish-cache/bin/varnishd/hash_simple_list.c
   branches/2.0/varnish-cache/bin/varnishd/hash_slinger.h
   branches/2.0/varnish-cache/bin/varnishd/heritage.h
   branches/2.0/varnish-cache/bin/varnishd/mgt_child.c
   branches/2.0/varnish-cache/bin/varnishd/mgt_cli.c
   branches/2.0/varnish-cache/bin/varnishd/mgt_param.c
   branches/2.0/varnish-cache/bin/varnishd/mgt_vcc.c
   branches/2.0/varnish-cache/bin/varnishd/shmlog.c
   branches/2.0/varnish-cache/bin/varnishd/stevedore.c
   branches/2.0/varnish-cache/bin/varnishd/storage_file.c
   branches/2.0/varnish-cache/bin/varnishd/storage_malloc.c
   branches/2.0/varnish-cache/bin/varnishd/storage_umem.c
   branches/2.0/varnish-cache/bin/varnishd/varnishd.c
   branches/2.0/varnish-cache/bin/varnishhist/varnishhist.c
   branches/2.0/varnish-cache/bin/varnishlog/varnishlog.c
   branches/2.0/varnish-cache/bin/varnishncsa/varnishncsa.c
   branches/2.0/varnish-cache/bin/varnishreplay/varnishreplay.c
   branches/2.0/varnish-cache/bin/varnishstat/varnishstat.c
   branches/2.0/varnish-cache/bin/varnishtest/vtc.c
   branches/2.0/varnish-cache/bin/varnishtest/vtc.h
   branches/2.0/varnish-cache/bin/varnishtest/vtc_client.c
   branches/2.0/varnish-cache/bin/varnishtest/vtc_http.c
   branches/2.0/varnish-cache/bin/varnishtest/vtc_log.c
   branches/2.0/varnish-cache/bin/varnishtest/vtc_sema.c
   branches/2.0/varnish-cache/bin/varnishtest/vtc_server.c
   branches/2.0/varnish-cache/bin/varnishtest/vtc_varnish.c
   branches/2.0/varnish-cache/bin/varnishtop/varnishtop.c
   branches/2.0/varnish-cache/include/cli.h
   branches/2.0/varnish-cache/include/http_headers.h
   branches/2.0/varnish-cache/include/libvarnish.h
   branches/2.0/varnish-cache/include/stat_field.h
   branches/2.0/varnish-cache/include/varnishapi.h
   branches/2.0/varnish-cache/include/vcl.h
   branches/2.0/varnish-cache/include/vcl_returns.h
   branches/2.0/varnish-cache/include/vct.h
   branches/2.0/varnish-cache/include/vev.h
   branches/2.0/varnish-cache/include/vqueue.h
   branches/2.0/varnish-cache/include/vrt.h
   branches/2.0/varnish-cache/include/vsb.h
   branches/2.0/varnish-cache/lib/libvarnish/assert.c
   branches/2.0/varnish-cache/lib/libvarnish/binary_heap.c
   branches/2.0/varnish-cache/lib/libvarnish/cli_common.c
   branches/2.0/varnish-cache/lib/libvarnish/num.c
   branches/2.0/varnish-cache/lib/libvarnish/tcp.c
   branches/2.0/varnish-cache/lib/libvarnish/vct.c
   branches/2.0/varnish-cache/lib/libvarnish/version.c
   branches/2.0/varnish-cache/lib/libvarnish/vlu.c
   branches/2.0/varnish-cache/lib/libvarnish/vss.c
   branches/2.0/varnish-cache/lib/libvarnishapi/instance.c
   branches/2.0/varnish-cache/lib/libvarnishapi/shmlog.c
   branches/2.0/varnish-cache/lib/libvcl/vcc_acl.c
   branches/2.0/varnish-cache/lib/libvcl/vcc_action.c
   branches/2.0/varnish-cache/lib/libvcl/vcc_backend.c
   branches/2.0/varnish-cache/lib/libvcl/vcc_compile.c
   branches/2.0/varnish-cache/lib/libvcl/vcc_compile.h
   branches/2.0/varnish-cache/lib/libvcl/vcc_dir_random.c
   branches/2.0/varnish-cache/lib/libvcl/vcc_dir_round_robin.c
   branches/2.0/varnish-cache/lib/libvcl/vcc_fixed_token.c
   branches/2.0/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl
   branches/2.0/varnish-cache/lib/libvcl/vcc_gen_obj.tcl
   branches/2.0/varnish-cache/lib/libvcl/vcc_obj.c
   branches/2.0/varnish-cache/lib/libvcl/vcc_parse.c
   branches/2.0/varnish-cache/lib/libvcl/vcc_priv.h
   branches/2.0/varnish-cache/lib/libvcl/vcc_string.c
   branches/2.0/varnish-cache/lib/libvcl/vcc_token.c
   branches/2.0/varnish-cache/lib/libvcl/vcc_xref.c
Log:
Merge r3324: White-space commit from hell.

I need a printout for a code-walkthrough and this commit wraps lines,
removes trailing space, space before TAB and other iregularities.

Some generated files have been compacted a bit.

A few changes to comments along the way.



Modified: branches/2.0/varnish-cache/bin/varnishadm/varnishadm.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishadm/varnishadm.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishadm/varnishadm.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -90,14 +90,16 @@
 		exit(1);
 	}
 	if (!(p = strchr(buf, ' '))) {
-		fprintf(stderr, "An error occured in parsing of status code.\n");
+		fprintf(stderr,
+		    "An error occured in parsing of status code.\n");
 		exit(1);
 	}
 	*p = '\0';
 	status = strtol(buf, &p, 10);
 	pp = p+1;
 	if (!(p = strchr(pp, '\n'))) {
-		fprintf(stderr, "An error occured in parsing of number of bytes returned.\n");
+		fprintf(stderr, "An error occured "
+		    "in parsing of number of bytes returned.\n");
 		exit(1);
 	}
 	*p = '\0';

Modified: branches/2.0/varnish-cache/bin/varnishd/Makefile.am
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/Makefile.am	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/Makefile.am	2009-02-05 08:45:25 UTC (rev 3580)
@@ -89,7 +89,7 @@
 # Turn the default.vcl file into a C-string we can include in the program.
 #
 default_vcl.h:	default.vcl Makefile
-	sed -e 's/"/\\"/g' -e 's/$$/\\n"/' -e 's/^/	"/' $(srcdir)/default.vcl > $@
+	sed -e 's/"/\\"/g' -e 's/$$/\\n"/' -e 's/^/ "/' $(srcdir)/default.vcl > $@
 
 # Explicitly record dependency
 mgt_vcc.c:	default_vcl.h

Modified: branches/2.0/varnish-cache/bin/varnishd/cache.h
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -135,11 +135,11 @@
 	struct ws		*ws;
 
 	unsigned char		conds;		/* If-* headers present */
-	enum httpwhence 	logtag;
+	enum httpwhence		logtag;
 	int			status;
 	double			protover;
 
-	txt 			hd[HTTP_HDR_MAX];
+	txt			hd[HTTP_HDR_MAX];
 	unsigned char		hdf[HTTP_HDR_MAX];
 #define HDF_FILTER		(1 << 0)	/* Filtered by Connection */
 	unsigned		nhd;
@@ -246,7 +246,7 @@
 struct object {
 	unsigned		magic;
 #define OBJECT_MAGIC		0x32851d42
-	unsigned 		refcnt;
+	unsigned		refcnt;
 	unsigned		xid;
 	struct objhead		*objhead;
 	struct storage		*objstore;
@@ -349,7 +349,7 @@
 
 	enum step		step;
 	unsigned		cur_method;
-	unsigned 		handling;
+	unsigned		handling;
 	unsigned char		sendbody;
 	unsigned char		wantbody;
 	int			err_code;
@@ -465,25 +465,32 @@
 void http_ClrHeader(struct http *to);
 unsigned http_Write(struct worker *w, const struct http *hp, int resp);
 void http_CopyResp(struct http *to, const struct http *fm);
-void http_SetResp(struct http *to, const char *proto, const char *status, const char *response);
-void http_FilterFields(struct worker *w, int fd, struct http *to, const struct http *fm, unsigned how);
+void http_SetResp(struct http *to, const char *proto, const char *status,
+    const char *response);
+void http_FilterFields(struct worker *w, int fd, struct http *to,
+    const struct http *fm, unsigned how);
 void http_FilterHeader(struct sess *sp, unsigned how);
-void http_PutProtocol(struct worker *w, int fd, struct http *to, const char *protocol);
+void http_PutProtocol(struct worker *w, int fd, struct http *to,
+    const char *protocol);
 void http_PutStatus(struct worker *w, int fd, struct http *to, int status);
-void http_PutResponse(struct worker *w, int fd, struct http *to, const char *response);
-void http_PrintfHeader(struct worker *w, int fd, struct http *to, const char *fmt, ...);
+void http_PutResponse(struct worker *w, int fd, struct http *to,
+    const char *response);
+void http_PrintfHeader(struct worker *w, int fd, struct http *to,
+    const char *fmt, ...);
 void http_SetHeader(struct worker *w, int fd, struct http *to, const char *hdr);
 void http_SetH(struct http *to, unsigned n, const char *fm);
 void http_ForceGet(struct http *to);
 void http_Setup(struct http *ht, struct ws *ws);
 int http_GetHdr(const struct http *hp, const char *hdr, char **ptr);
-int http_GetHdrField(const struct http *hp, const char *hdr, const char *field, char **ptr);
+int http_GetHdrField(const struct http *hp, const char *hdr,
+    const char *field, char **ptr);
 int http_GetStatus(const struct http *hp);
 const char *http_GetReq(const struct http *hp);
 const char *http_GetProto(const struct http *hp);
 int http_HdrIs(const struct http *hp, const char *hdr, const char *val);
 int http_DissectRequest(struct sess *sp);
-int http_DissectResponse(struct worker *w, const struct http_conn *htc, struct http *sp);
+int http_DissectResponse(struct worker *w, const struct http_conn *htc,
+    struct http *sp);
 const char *http_DoConnection(struct http *hp);
 void http_CopyHome(struct worker *w, int fd, struct http *hp);
 void http_Unset(struct http *hp, const char *hdr);
@@ -538,21 +545,23 @@
 void WSL(struct worker *w, enum shmlogtag tag, int id, const char *fmt, ...);
 void WSL_Flush(struct worker *w, int overflow);
 
-#define DSL(flag, tag, id, ...) 				\
+#define DSL(flag, tag, id, ...)					\
 	do {							\
 		if (params->diag_bitmap & (flag))		\
 			VSL((tag), (id), __VA_ARGS__);		\
 	} while (0)
 
-#define WSP(sess, tag, ...) 					\
+#define WSP(sess, tag, ...)					\
 	WSL((sess)->wrk, tag, (sess)->fd, __VA_ARGS__)
 
-#define WSPR(sess, tag, txt) 					\
+#define WSPR(sess, tag, txt)					\
 	WSLR((sess)->wrk, tag, (sess)->fd, txt)
 
 #define INCOMPL() do {							\
 	VSL(SLT_Debug, 0, "INCOMPLETE AT: %s(%d)", __func__, __LINE__); \
-	fprintf(stderr,"INCOMPLETE AT: %s(%d)\n", (const char *)__func__, __LINE__);	\
+	fprintf(stderr,							\
+	    "INCOMPLETE AT: %s(%d)\n",					\
+	    (const char *)__func__, __LINE__);				\
 	abort();							\
 	} while (0)
 #endif
@@ -616,10 +625,10 @@
 		    __func__, __FILE__, __LINE__, (r));		\
 	}							\
 } while (0)
-#define LOCK(foo) 						\
-do { 								\
+#define LOCK(foo)						\
+do {								\
 	if (!(params->diag_bitmap & 0x18)) {			\
-		AZ(pthread_mutex_lock(foo)); 			\
+		AZ(pthread_mutex_lock(foo));			\
 	} else {						\
 		int ixjd = pthread_mutex_trylock(foo);		\
 		assert(ixjd == 0 || ixjd == EBUSY);		\
@@ -627,11 +636,11 @@
 			VSL(SLT_Debug, 0,			\
 			    "MTX_CONTEST(%s,%s,%d," #foo ")",	\
 			    __func__, __FILE__, __LINE__);	\
-			AZ(pthread_mutex_lock(foo)); 		\
+			AZ(pthread_mutex_lock(foo));		\
 		} else if (params->diag_bitmap & 0x8) {		\
 			VSL(SLT_Debug, 0,			\
 			    "MTX_LOCK(%s,%s,%d," #foo ")",	\
-			    __func__, __FILE__, __LINE__); 	\
+			    __func__, __FILE__, __LINE__);	\
 		}						\
 	}							\
 } while (0)

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_acceptor.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_acceptor.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_acceptor.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -28,9 +28,6 @@
  *
  * $Id$
  *
- * XXX: We need to pass sessions back into the event engine when they are
- * reused.  Not sure what the most efficient way is for that.  For now
- * write the session pointer to a pipe which the event engine monitors.
  */
 
 #include "config.h"
@@ -68,7 +65,7 @@
 
 static struct acceptor *vca_act;
 
-static pthread_t 	vca_thread_acct;
+static pthread_t	vca_thread_acct;
 static struct timeval	tv_sndtimeo;
 static struct timeval	tv_rcvtimeo;
 static struct linger	linger;
@@ -227,12 +224,15 @@
 					break;
 				case EMFILE:
 					VSL(SLT_Debug, ls->sock,
-					    "Too many open files when accept(2)ing. Sleeping.");
-					TIM_sleep(params->accept_fd_holdoff * 1000.0);
+					    "Too many open files "
+					    "when accept(2)ing. Sleeping.");
+					TIM_sleep(
+					    params->accept_fd_holdoff * 1000.0);
 					break;
 				default:
 					VSL(SLT_Debug, ls->sock,
-					    "Accept failed: %s", strerror(errno));
+					    "Accept failed: %s",
+					    strerror(errno));
 					/* XXX: stats ? */
 					break;
 				}
@@ -320,7 +320,7 @@
 	(void)cli;
 	(void)av;
 	(void)priv;
-	
+
 	if (vca_act == NULL)
 		vca_act = vca_acceptors[0];
 
@@ -356,7 +356,7 @@
 			cli_out(cli, "default");
 		else
 			cli_out(cli, "%s", vca_act->name);
-		
+
 		cli_out(cli, " (");
 		for (i = 0; vca_acceptors[i] != NULL; i++)
 			cli_out(cli, "%s%s", i == 0 ? "" : ", ",

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_acceptor.h
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_acceptor.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_acceptor.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -35,7 +35,7 @@
 typedef void acceptor_pass_f(struct sess *);
 
 struct acceptor {
-	const char 		*name;
+	const char		*name;
 	acceptor_init_f		*init;
 	acceptor_pass_f		*pass;
 };

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -85,7 +85,7 @@
 	assert(sp->fd >= 0);
 	DSL(0x04, SLT_Debug, sp->fd, "KQ: EV_SET sp %p arm %x", sp, arm);
 	EV_SET(&ki[nki], sp->fd, EVFILT_READ, arm, 0, 0, sp);
-	if (++nki == NKEV) 
+	if (++nki == NKEV)
 		vca_kq_flush();
 }
 

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_acceptor_ports.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_acceptor_ports.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_acceptor_ports.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -61,7 +61,8 @@
 static void
 vca_add(int fd, void *data)
 {
-	AZ(port_associate(solaris_dport, PORT_SOURCE_FD, fd, POLLIN | POLLERR | POLLPRI, data));
+	AZ(port_associate(solaris_dport, PORT_SOURCE_FD, fd,
+	    POLLIN | POLLERR | POLLPRI, data));
 }
 
 static void
@@ -120,7 +121,8 @@
 		ts.tv_sec = 0L;
 		ts.tv_nsec = 50L /*ms*/  * 1000L /*us*/  * 1000L /*ns*/;
 		nevents = 1;
-		if (port_getn(solaris_dport, ev, MAX_EVENTS, &nevents, &ts) == 0) {
+		if (port_getn(solaris_dport, ev, MAX_EVENTS, &nevents, &ts)
+		     == 0) {
 			for (ei=0; ei<nevents; ei++) {
 				vca_port_ev(ev + ei);
 			}

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_backend.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_backend.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_backend.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -82,7 +82,8 @@
  */
 
 static int
-VBE_TryConnect(const struct sess *sp, int pf, const struct sockaddr *sa, socklen_t salen, const struct backend *bp)
+VBE_TryConnect(const struct sess *sp, int pf, const struct sockaddr *sa,
+    socklen_t salen, const struct backend *bp)
 {
 	int s, i, tmo;
 	char abuf1[TCP_ADDRBUFSIZE], abuf2[TCP_ADDRBUFSIZE];
@@ -91,7 +92,7 @@
 	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
 
 	s = socket(pf, SOCK_STREAM, 0);
-	if (s < 0) 
+	if (s < 0)
 		return (s);
 
 	tmo = params->connect_timeout;
@@ -257,7 +258,7 @@
 
 	if (s < 0) {
 		LOCK(&bp->mtx);
-		bp->n_conn--;		
+		bp->n_conn--;
 		bp->refcount--;		/* Only keep ref on success */
 		UNLOCK(&bp->mtx);
 	}

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_backend_cfg.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_backend_cfg.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_backend_cfg.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -227,9 +227,9 @@
 	/*
 	 * Copy over the sockaddrs
 	 */
-	if (vb->ipv4_sockaddr != NULL) 
+	if (vb->ipv4_sockaddr != NULL)
 		copy_sockaddr(&b->ipv4, &b->ipv4len, vb->ipv4_sockaddr);
-	if (vb->ipv6_sockaddr != NULL) 
+	if (vb->ipv6_sockaddr != NULL)
 		copy_sockaddr(&b->ipv6, &b->ipv6len, vb->ipv6_sockaddr);
 
 	assert(b->ipv4 != NULL || b->ipv6 != NULL);

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_backend_poll.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_backend_poll.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_backend_poll.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -62,14 +62,14 @@
 #define VBP_TARGET_MAGIC		0x6b7cb656
 
 	struct backend			*backend;
-	struct vrt_backend_probe 	probe;
+	struct vrt_backend_probe	probe;
 	int				stop;
 	char				*req;
 	int				req_len;
 
 	char				resp_buf[128];
 	unsigned			good;
-	
+
 	/* Collected statistics */
 #define BITMAP(n, c, t, b)	uint64_t	n;
 #include "cache_backend_poll.h"
@@ -86,7 +86,7 @@
 static VTAILQ_HEAD(, vbp_target)	vbp_list =
     VTAILQ_HEAD_INITIALIZER(vbp_list);
 
-static char default_request[] = 
+static char default_request[] =
     "GET / HTTP/1.1\r\n"
     "Connection: close\r\n"
     "\r\n";
@@ -324,7 +324,7 @@
 		    vt->backend->vcl_name, logmsg, bits,
 		    vt->good, vt->probe.threshold, vt->probe.window,
 		    vt->last, vt->avg, vt->resp_buf);
-			
+
 		if (!vt->stop)
 			TIM_sleep(vt->probe.interval);
 	}
@@ -363,15 +363,15 @@
 	cli_out(cli, "Current states  good: %2u threshold: %2u window: %2u\n",
 	    vt->good, vt->probe.threshold, vt->probe.window);
 	cli_out(cli, "Average responsetime of good probes: %.6f\n", vt->avg);
-	cli_out(cli, 
+	cli_out(cli,
 	    "Oldest                       "
 	    "                             Newest\n");
-	cli_out(cli, 
+	cli_out(cli,
 	    "============================="
 	    "===================================\n");
 
 #define BITMAP(n, c, t, b)					\
-		if ((vt->n != 0) || (b)) 				\
+		if ((vt->n != 0) || (b))			\
 			vbp_bitmap(cli, (c), vt->n, (t));
 #include "cache_backend_poll.h"
 #undef BITMAP
@@ -391,10 +391,10 @@
 }
 
 static struct cli_proto debug_cmds[] = {
-        { "debug.health", "debug.health",
-                "\tDump backend health stuff\n",
-                0, 0, vbp_health },
-        { NULL }
+	{ "debug.health", "debug.health",
+		"\tDump backend health stuff\n",
+		0, 0, vbp_health },
+	{ NULL }
 };
 
 /*--------------------------------------------------------------------

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_ban.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_ban.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_ban.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -250,10 +250,10 @@
 	(void)av;
 	(void)priv;
 	/*
- 	 * XXX: Strictly speaking, this loop traversal is not lock-safe
+	 * XXX: Strictly speaking, this loop traversal is not lock-safe
 	 * XXX: because we might inspect the last ban while it gets
 	 * XXX: destroyed.  To properly fix this, we would need to either
- 	 * XXX: hold the lock over the entire loop, or grab refcounts
+	 * XXX: hold the lock over the entire loop, or grab refcounts
 	 * XXX: under lock for each element of the list.
 	 * XXX: We do neither, and hope for the best.
 	 */

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_center.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_center.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -109,7 +109,6 @@
 	return (0);
 }
 
-
 /*--------------------------------------------------------------------
  * We have a refcounted object on the session, now deliver it.
  *
@@ -175,7 +174,7 @@
 
 	sp->director = NULL;
 	sp->restarts = 0;
-					
+
 	RES_WriteObj(sp);
 	HSH_Deref(sp->obj);
 	sp->obj = NULL;
@@ -183,7 +182,6 @@
 	return (0);
 }
 
-
 /*--------------------------------------------------------------------
  * This is the final state, figure out if we should close or recycle
  * the client connection
@@ -209,7 +207,7 @@
 	AZ(sp->bereq);
 	sp->director = NULL;
 	sp->restarts = 0;
-					
+
 	if (sp->vcl != NULL && sp->esis == 0) {
 		if (sp->wrk->vcl != NULL)
 			VCL_Rel(&sp->wrk->vcl);
@@ -282,7 +280,6 @@
 	return (1);
 }
 
-
 /*--------------------------------------------------------------------
  * Emit an error
  *
@@ -327,9 +324,9 @@
 	http_PutStatus(w, sp->fd, h, sp->err_code);
 	now = TIM_real();
 	TIM_format(now, date);
-        http_PrintfHeader(w, sp->fd, h, "Date: %s", date);
-        http_PrintfHeader(w, sp->fd, h, "Server: Varnish");
-        http_PrintfHeader(w, sp->fd, h, "Retry-After: %d", params->err_ttl);
+	http_PrintfHeader(w, sp->fd, h, "Date: %s", date);
+	http_PrintfHeader(w, sp->fd, h, "Server: Varnish");
+	http_PrintfHeader(w, sp->fd, h, "Retry-After: %d", params->err_ttl);
 
 	if (sp->err_reason != NULL)
 		http_PutResponse(w, sp->fd, h, sp->err_reason);
@@ -344,7 +341,6 @@
 	return (0);
 }
 
-
 /*--------------------------------------------------------------------
  * We have fetched the headers from the backend, ask the VCL code what
  * to do next, then head off in that direction.
@@ -370,7 +366,7 @@
 DOT vcl_fetch -> recv [label="restart"]
 DOT vcl_fetch -> rstfetch [label="restart",color=purple]
 DOT rstfetch [label="RESTART",shape=plaintext]
-DOT fetch -> errfetch 
+DOT fetch -> errfetch
 DOT vcl_fetch -> errfetch [label="error"]
 DOT errfetch [label="ERROR",shape=plaintext]
  */
@@ -558,7 +554,6 @@
 	}
 }
 
-
 /*--------------------------------------------------------------------
  * LOOKUP
  * Hash things together and look object up in hash-table.
@@ -656,7 +651,6 @@
 	return (0);
 }
 
-
 /*--------------------------------------------------------------------
  * We had a miss, ask VCL, proceed as instructed
  *
@@ -721,7 +715,6 @@
 	}
 }
 
-
 /*--------------------------------------------------------------------
  * Start pass processing by getting headers from backend, then
  * continue in passbody.
@@ -826,7 +819,6 @@
 	return (0);
 }
 
-
 /*--------------------------------------------------------------------
  * RECV
  * We have a complete request, set everything up and start it.
@@ -1008,14 +1000,14 @@
 	    sp->step == STP_START ||
 	    sp->step == STP_LOOKUP ||
 	    sp->step == STP_RECV);
-	  
+
 	/*
 	 * Whenever we come in from the acceptor we need to set blocking
 	 * mode, but there is no point in setting it when we come from
 	 * ESI or when a parked sessions returns.
 	 * It would be simpler to do this in the acceptor, but we'd rather
 	 * do the syscall in the worker thread.
- 	 */
+	 */
 	if (sp->step == STP_FIRST || sp->step == STP_START)
 		TCP_blocking(sp->fd);
 
@@ -1060,8 +1052,8 @@
 static void
 cli_debug_xid(struct cli *cli, const char * const *av, void *priv)
 {
-        (void)priv;
-	if (av[2] != NULL) 
+	(void)priv;
+	if (av[2] != NULL)
 		xids = strtoul(av[2], NULL, 0);
 	cli_out(cli, "XID is %u", xids);
 }

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_cli.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_cli.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_cli.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -90,7 +90,7 @@
 }
 
 /*--------------------------------------------------------------------
- * Called when we have a full line, look through all three command 
+ * Called when we have a full line, look through all three command
  * lists to find it.
  */
 
@@ -182,19 +182,19 @@
 
 #define SZOF(foo)       cli_out(cli, \
     "sizeof(%s) = %zd = 0x%zx\n", #foo, sizeof(foo), sizeof(foo));
-        SZOF(struct ws);
-        SZOF(struct http);
-        SZOF(struct http_conn);
-        SZOF(struct acct);
-        SZOF(struct worker);
-        SZOF(struct workreq);
-        SZOF(struct bereq);
-        SZOF(struct storage);
-        SZOF(struct object);
-        SZOF(struct objhead);
-        SZOF(struct sess);
-        SZOF(struct vbe_conn);
-        SZOF(struct varnish_stats);
+	SZOF(struct ws);
+	SZOF(struct http);
+	SZOF(struct http_conn);
+	SZOF(struct acct);
+	SZOF(struct worker);
+	SZOF(struct workreq);
+	SZOF(struct bereq);
+	SZOF(struct storage);
+	SZOF(struct object);
+	SZOF(struct objhead);
+	SZOF(struct sess);
+	SZOF(struct vbe_conn);
+	SZOF(struct varnish_stats);
 }
 
 /*--------------------------------------------------------------------*/

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_dir_random.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_dir_random.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_dir_random.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -136,7 +136,7 @@
 
 	CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
 	CAST_OBJ_NOTNULL(vs, d->priv, VDI_RANDOM_MAGIC);
-	
+
 	vh = vs->hosts;
 	for (i = 0; i < vs->nhosts; i++, vh++)
 		VBE_DropRef(vh->backend);
@@ -147,13 +147,14 @@
 }
 
 void
-VRT_init_dir_random(struct cli *cli, struct director **bp, const struct vrt_dir_random *t)
+VRT_init_dir_random(struct cli *cli, struct director **bp,
+    const struct vrt_dir_random *t)
 {
 	struct vdi_random *vs;
 	const struct vrt_dir_random_entry *te;
 	struct vdi_random_host *vh;
 	int i;
-	
+
 	(void)cli;
 
 	ALLOC_OBJ(vs, VDI_RANDOM_MAGIC);

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_dir_round_robin.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_dir_round_robin.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_dir_round_robin.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -111,7 +111,7 @@
 
 	CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
 	CAST_OBJ_NOTNULL(vs, d->priv, VDI_ROUND_ROBIN_MAGIC);
-	
+
 	vh = vs->hosts;
 	for (i = 0; i < vs->nhosts; i++, vh++)
 		VBE_DropRef(vh->backend);
@@ -123,13 +123,14 @@
 }
 
 void
-VRT_init_dir_round_robin(struct cli *cli, struct director **bp, const struct vrt_dir_round_robin *t)
+VRT_init_dir_round_robin(struct cli *cli, struct director **bp,
+    const struct vrt_dir_round_robin *t)
 {
 	struct vdi_round_robin *vs;
 	const struct vrt_dir_round_robin_entry *te;
 	struct vdi_round_robin_host *vh;
 	int i;
-	
+
 	(void)cli;
 
 	ALLOC_OBJ(vs, VDI_ROUND_ROBIN_MAGIC);

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_dir_simple.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_dir_simple.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_dir_simple.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -85,7 +85,7 @@
 
 	CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
 	CAST_OBJ_NOTNULL(vs, d->priv, VDI_SIMPLE_MAGIC);
-	
+
 	VBE_DropRef(vs->backend);
 	free(vs->dir.vcl_name);
 	vs->dir.magic = 0;
@@ -93,10 +93,11 @@
 }
 
 void
-VRT_init_dir_simple(struct cli *cli, struct director **bp, const struct vrt_dir_simple *t)
+VRT_init_dir_simple(struct cli *cli, struct director **bp,
+    const struct vrt_dir_simple *t)
 {
 	struct vdi_simple *vs;
-	
+
 	(void)cli;
 
 	ALLOC_OBJ(vs, VDI_SIMPLE_MAGIC);

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_expire.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_expire.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_expire.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -65,7 +65,7 @@
  * Objects have sideways references in the binary heap and the LRU list
  * and we want to avoid paging in a lot of objects just to move them up
  * or down the binheap or to move a unrelated object on the LRU list.
- * To avoid this we use a proxy object, objexp, to hold the relevant 
+ * To avoid this we use a proxy object, objexp, to hold the relevant
  * housekeeping fields parts of an object.
  */
 
@@ -219,7 +219,7 @@
 }
 
 /*--------------------------------------------------------------------
- * We have changed one or more of the object timers, shuffle it 
+ * We have changed one or more of the object timers, shuffle it
  * accordingly in the binheap
  *
  * The VCL code can send us here on a non-cached object, just return.
@@ -289,7 +289,7 @@
 			t = TIM_real();
 			continue;
 		}
-	
+
 		o = oe->obj;
 		CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
 		assert(oe->timer_idx != BINHEAP_NOIDX);
@@ -364,7 +364,7 @@
 	 * with active references, likely means that it is already in core. An
 	 * object with no active references will be prodded further anyway.
 	 *
-	 * NB: Checking refcount here is no guarantee that it does not gain 
+	 * NB: Checking refcount here is no guarantee that it does not gain
 	 * another ref while we ponder its destiny without the lock held.
 	 */
 	LOCK(&exp_mtx);
@@ -415,7 +415,7 @@
 
 	/* Insert in binheap and lru again */
 	LOCK(&exp_mtx);
-	VSL_stats->n_lru_nuked--; 		/* It was premature */
+	VSL_stats->n_lru_nuked--;		/* It was premature */
 	VSL_stats->n_lru_saved++;
 	binheap_insert(exp_heap, oe);
 	assert(oe->timer_idx != BINHEAP_NOIDX);

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_fetch.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_fetch.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_fetch.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -342,7 +342,7 @@
 	 * header if one is necessary.
 	 * XXX: This possibly ought to go into the default VCL
 	 */
-	if (!http_GetHdr(hp, H_Host, &b)) 
+	if (!http_GetHdr(hp, H_Host, &b))
 		VBE_AddHostHeader(sp);
 
 	TCP_blocking(vc->fd);	/* XXX: we should timeout instead */
@@ -469,8 +469,8 @@
 static void
 debug_fragfetch(struct cli *cli, const char * const *av, void *priv)
 {
-        (void)priv;
-        (void)cli;
+	(void)priv;
+	(void)cli;
 	fetchfrag = strtoul(av[2], NULL, 0);
 }
 

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_hash.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_hash.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_hash.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -119,7 +119,7 @@
 		VTAILQ_INIT(&w->nobj->store);
 		VTAILQ_INIT(&w->nobj->esibits);
 		VSL_stats->n_object++;
-		
+
 	} else
 		CHECK_OBJ_NOTNULL(w->nobj, OBJECT_MAGIC);
 }
@@ -223,7 +223,7 @@
 		}
 		if (!o->cacheable)
 			continue;
-		if (o->ttl == 0) 
+		if (o->ttl == 0)
 			continue;
 		if (BAN_CheckObject(o, h->hd[HTTP_HDR_URL].b, oh->hash)) {
 			o->ttl = 0;
@@ -327,9 +327,9 @@
 	if (o->ws_o->overflow)
 		VSL_stats->n_objoverflow++;
 	if (params->diag_bitmap & 0x40)
-		WSP(sp, SLT_Debug, 
+		WSP(sp, SLT_Debug,
 		    "Object %u workspace free %u", o->xid, WS_Free(o->ws_o));
-	
+
 	oh = o->objhead;
 	if (oh != NULL) {
 		CHECK_OBJ(oh, OBJHEAD_MAGIC);

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_http.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_http.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_http.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -55,9 +55,9 @@
 #undef HTTPH
 
 /*lint -save -e773 not () */
-#define LOGMTX2(ax, bx, cx) 	[bx] = SLT_##ax##cx
+#define LOGMTX2(ax, bx, cx)	[bx] = SLT_##ax##cx
 
-#define LOGMTX1(ax) { 		\
+#define LOGMTX1(ax) {					\
 	LOGMTX2(ax, HTTP_HDR_REQ,	Request),	\
 	LOGMTX2(ax, HTTP_HDR_RESPONSE,	Response),	\
 	LOGMTX2(ax, HTTP_HDR_STATUS,	Status),	\
@@ -229,12 +229,13 @@
 }
 
 /*--------------------------------------------------------------------
- * Find a given headerfield, and if present and wanted, the beginning 
+ * Find a given headerfield, and if present and wanted, the beginning
  * of its value.
  */
 
 int
-http_GetHdrField(const struct http *hp, const char *hdr, const char *field, char **ptr)
+http_GetHdrField(const struct http *hp, const char *hdr,
+    const char *field, char **ptr)
 {
 	char *h, *e;
 	unsigned fl;
@@ -271,7 +272,7 @@
 			return (1);
 		}
 		/* Skip token */
-		while (*h && !vct_issepctl(*h)) 
+		while (*h && !vct_issepctl(*h))
 			h++;
 	}
 	return (0);
@@ -410,7 +411,8 @@
  */
 
 static int
-http_splitline(struct worker *w, int fd, struct http *hp, const struct http_conn *htc, int h1, int h2, int h3)
+http_splitline(struct worker *w, int fd, struct http *hp,
+    const struct http_conn *htc, int h1, int h2, int h3)
 {
 	char *p;
 
@@ -513,7 +515,8 @@
 /*--------------------------------------------------------------------*/
 
 int
-http_DissectResponse(struct worker *w, const struct http_conn *htc, struct http *hp)
+http_DissectResponse(struct worker *w, const struct http_conn *htc,
+    struct http *hp)
 {
 	int i;
 
@@ -530,13 +533,13 @@
 		if (hp->status == 0)
 			hp->status = i;
 	} else {
-		hp->status = 
+		hp->status =
 		    strtoul(hp->hd[HTTP_HDR_STATUS].b, NULL /* XXX */, 10);
 	}
 	if (hp->hd[HTTP_HDR_RESPONSE].b == NULL ||
 	    !Tlen(hp->hd[HTTP_HDR_RESPONSE])) {
 		/* Backend didn't send a response string, use the standard */
-		hp->hd[HTTP_HDR_RESPONSE].b = 
+		hp->hd[HTTP_HDR_RESPONSE].b =
 		    TRUST_ME(http_StatusMessage(hp->status));
 		hp->hd[HTTP_HDR_RESPONSE].e =
 		    strchr(hp->hd[HTTP_HDR_RESPONSE].b, '\0');
@@ -606,7 +609,8 @@
 }
 
 void
-http_SetResp(struct http *to, const char *proto, const char *status, const char *response)
+http_SetResp(struct http *to, const char *proto, const char *status,
+    const char *response)
 {
 
 	CHECK_OBJ_NOTNULL(to, HTTP_MAGIC);
@@ -616,7 +620,8 @@
 }
 
 static void
-http_copyheader(struct worker *w, int fd, struct http *to, const struct http *fm, unsigned n)
+http_copyheader(struct worker *w, int fd, struct http *to,
+    const struct http *fm, unsigned n)
 {
 
 	CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC);
@@ -636,7 +641,8 @@
 /*--------------------------------------------------------------------*/
 
 void
-http_FilterFields(struct worker *w, int fd, struct http *to, const struct http *fm, unsigned how)
+http_FilterFields(struct worker *w, int fd, struct http *to,
+    const struct http *fm, unsigned how)
 {
 	unsigned u;
 
@@ -664,10 +670,10 @@
 	struct bereq *bereq;
 	struct http *hp;
 
-        bereq = VBE_new_bereq();
-        AN(bereq);
-        hp = bereq->http;
-        hp->logtag = HTTP_Tx;
+	bereq = VBE_new_bereq();
+	AN(bereq);
+	hp = bereq->http;
+	hp->logtag = HTTP_Tx;
 
 	http_copyreq(hp, sp->http, how);
 	http_FilterFields(sp->wrk, sp->fd, hp, sp->http, how);
@@ -741,7 +747,8 @@
 /*--------------------------------------------------------------------*/
 
 static void
-http_PutField(struct worker *w, int fd, struct http *to, int field, const char *string)
+http_PutField(struct worker *w, int fd, struct http *to, int field,
+    const char *string)
 {
 	char *p;
 	unsigned l;
@@ -763,7 +770,8 @@
 }
 
 void
-http_PutProtocol(struct worker *w, int fd, struct http *to, const char *protocol)
+http_PutProtocol(struct worker *w, int fd, struct http *to,
+    const char *protocol)
 {
 
 	http_PutField(w, fd, to, HTTP_HDR_PROTO, protocol);
@@ -781,14 +789,16 @@
 }
 
 void
-http_PutResponse(struct worker *w, int fd, struct http *to, const char *response)
+http_PutResponse(struct worker *w, int fd, struct http *to,
+    const char *response)
 {
 
 	http_PutField(w, fd, to, HTTP_HDR_RESPONSE, response);
 }
 
 void
-http_PrintfHeader(struct worker *w, int fd, struct http *to, const char *fmt, ...)
+http_PrintfHeader(struct worker *w, int fd, struct http *to,
+    const char *fmt, ...)
 {
 	va_list ap;
 	unsigned l, n;
@@ -818,7 +828,7 @@
 	unsigned u, v;
 
 	for (v = u = HTTP_HDR_FIRST; u < hp->nhd; u++) {
-		if (http_IsHdr(&hp->hd[u], hdr)) 
+		if (http_IsHdr(&hp->hd[u], hdr))
 			continue;
 		if (v != u) {
 			memcpy(&hp->hd[v], &hp->hd[u], sizeof hp->hd[v]);

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_httpconn.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_httpconn.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_httpconn.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -133,7 +133,7 @@
 
 	CHECK_OBJ_NOTNULL(htc, HTTP_CONN_MAGIC);
 	i = htc_header_complete(&htc->rxbuf);
-	if (i < 0) 
+	if (i < 0)
 		htc->rxbuf.e = htc->rxbuf.b;
 	if (i <= 0)
 		return (0);
@@ -195,7 +195,7 @@
 		p += l;
 		len -= l;
 		htc->pipeline.b += l;
-		if (htc->pipeline.b == htc->pipeline.e) 
+		if (htc->pipeline.b == htc->pipeline.e)
 			htc->pipeline.b = htc->pipeline.e = NULL;
 	}
 	if (len == 0)

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_panic.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_panic.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_panic.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -64,15 +64,15 @@
 	    ws, ws->overflow ? "overflow" : "");
 	vsb_printf(vsp, "%*sid = \"%s\",\n", indent + 2, "", ws->id);
 	vsb_printf(vsp, "%*s{s,f,r,e} = {%p,", indent + 2, "", ws->s);
-	if (ws->f > ws->s) 
+	if (ws->f > ws->s)
 		vsb_printf(vsp, ",+%d", ws->f - ws->s);
 	else
 		vsb_printf(vsp, ",%p", ws->f);
-	if (ws->r > ws->s) 
+	if (ws->r > ws->s)
 		vsb_printf(vsp, ",+%d", ws->r - ws->s);
 	else
 		vsb_printf(vsp, ",%p", ws->r);
-	if (ws->e > ws->s) 
+	if (ws->e > ws->s)
 		vsb_printf(vsp, ",+%d", ws->e - ws->s);
 	else
 		vsb_printf(vsp, ",%p", ws->e);
@@ -258,7 +258,8 @@
 /*--------------------------------------------------------------------*/
 
 static void
-pan_ic(const char *func, const char *file, int line, const char *cond, int err, int xxx)
+pan_ic(const char *func, const char *file, int line, const char *cond,
+    int err, int xxx)
 {
 	int l;
 	char *p;
@@ -296,7 +297,7 @@
 		vsb_printf(vsp, "  thread = (%s)", q);
 	if (!(params->diag_bitmap & 0x2000)) {
 		sp = THR_GetSession();
-		if (sp != NULL) 
+		if (sp != NULL)
 			pan_sess(sp);
 	}
 	vsb_printf(vsp, "\n");
@@ -307,7 +308,7 @@
 	memcpy(p, panicstr, l);
 	if (params->diag_bitmap & 0x4000)
 		(void)fputs(panicstr, stderr);
-		
+
 #ifdef HAVE_ABORT2
 	if (params->diag_bitmap & 0x8000) {
 		void *arg[1];

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_pipe.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_pipe.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_pipe.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -111,7 +111,7 @@
 		fds[0].revents = 0;
 		fds[1].revents = 0;
 		i = poll(fds, 2, params->pipe_timeout * 1000);
-		if (i < 1) 
+		if (i < 1)
 			break;
 		if (fds[0].revents && rdf(vc->fd, sp->fd)) {
 			(void)shutdown(vc->fd, SHUT_RD);

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_pool.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_pool.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_pool.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -79,7 +79,7 @@
 struct wq {
 	unsigned		magic;
 #define WQ_MAGIC		0x606658fa
-	MTX 			mtx;
+	MTX			mtx;
 	struct workerhead	idle;
 	VTAILQ_HEAD(, workreq)	overflow;
 	unsigned		nthr;
@@ -456,7 +456,7 @@
 
 /*--------------------------------------------------------------------
  * Periodic pool herding thread
- * 
+ *
  * Do things which we can do at our leisure:
  *  Add pools
  *  Scale constants

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_vcl.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_vcl.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_vcl.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -208,8 +208,8 @@
 	struct vcls *vcl, *vcl2;
 
 	ASSERT_CLI();
-	VTAILQ_FOREACH_SAFE(vcl, &vcl_head, list, vcl2) 
-		if (vcl->conf->discard && vcl->conf->busy == 0) 
+	VTAILQ_FOREACH_SAFE(vcl, &vcl_head, list, vcl2)
+		if (vcl->conf->discard && vcl->conf->busy == 0)
 			VCL_Nuke(vcl);
 }
 
@@ -323,7 +323,7 @@
 									\
 	sp->handling = 0;						\
 	sp->cur_method = VCL_MET_ ## upper;				\
-	WSP(sp, SLT_VCL_call, "%s", #func); 				\
+	WSP(sp, SLT_VCL_call, "%s", #func);				\
 	sp->vcl->func##_func(sp);					\
 	WSP(sp, SLT_VCL_return, "%s", vcl_handlingname(sp->handling));	\
 	sp->cur_method = 0;						\
@@ -342,7 +342,7 @@
 	{ CLI_VCL_LIST,         ccf_config_list },
 	{ CLI_VCL_DISCARD,      ccf_config_discard },
 	{ CLI_VCL_USE,          ccf_config_use },
-	{ NULL }        
+	{ NULL }
 };
 
 void

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_vrt.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_vrt.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_vrt.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -136,7 +136,7 @@
 		if (b + x < e)
 			memcpy(b, h, x);
 		b += x;
-		if (b + 1 < e) 
+		if (b + 1 < e)
 			*b++ = ' ';
 	}
 	while (p != vrt_magic_string_end) {
@@ -148,7 +148,7 @@
 		b += x;
 		p = va_arg(ap, const char *);
 	}
-	if (b + 1 < e) 
+	if (b + 1 < e)
 		*b++ = '\0';
 	if (b > e) {
 		WS_Release(hp->ws, 0);
@@ -164,7 +164,8 @@
 /*--------------------------------------------------------------------*/
 
 void
-VRT_SetHdr(const struct sess *sp , enum gethdr_e where, const char *hdr, const char *p, ...)
+VRT_SetHdr(const struct sess *sp , enum gethdr_e where, const char *hdr,
+    const char *p, ...)
 {
 	struct http *hp;
 	va_list ap;
@@ -190,7 +191,8 @@
 /*--------------------------------------------------------------------*/
 
 static void
-vrt_do_string(struct worker *w, int fd, struct http *hp, int fld, const char *err, const char *p, va_list ap)
+vrt_do_string(struct worker *w, int fd, struct http *hp, int fld,
+    const char *err, const char *p, va_list ap)
 {
 	char *b;
 
@@ -519,7 +521,8 @@
 
 	if (sp->mysockaddr->sa_family == AF_UNSPEC)
 		AZ(getsockname(sp->fd, sp->mysockaddr, &sp->mysockaddrlen));
-	TCP_name(sp->mysockaddr, sp->mysockaddrlen, abuf, sizeof abuf, pbuf, sizeof pbuf);
+	TCP_name(sp->mysockaddr, sp->mysockaddrlen,
+	    abuf, sizeof abuf, pbuf, sizeof pbuf);
 
 	return (atoi(pbuf));
 }
@@ -672,7 +675,7 @@
 	*sp->http = *sp->http0;
 	WS_Reset(sp->ws, sp->ws_req);
 }
-	
+
 /*--------------------------------------------------------------------*/
 
 /*lint -e{818} sp could be const */
@@ -725,7 +728,7 @@
 void
 VRT_purge(const char *regexp, int hash)
 {
-	
+
 	if (regexp != NULL)
 		(void)BAN_Add(NULL, regexp, hash);
 }

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_vrt_esi.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_vrt_esi.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_vrt_esi.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -95,7 +95,7 @@
 	char buf[256], *q;
 	txt t;
 
-	if (i == 0) 
+	if (i == 0)
 		i = p - ew->t.b;
 	if (i > 20) {
 		i = 20;
@@ -234,7 +234,7 @@
 
 	/* Value, if any ? */
 	*val = *in;
-	if (in->b >= in->e) 
+	if (in->b >= in->e)
 		return (1);
 
 	if (*in->b == '"') {
@@ -287,7 +287,7 @@
 		    tag.e - tag.b, tag.b,
 		    val.e - val.b, val.b);
 		if (Tlen(tag) != 3 || memcmp(tag.b, "src", 3))
-			continue; 
+			continue;
 		if (Tlen(val) == 0) {
 			esi_error(ew, tag.b, Tlen(tag),
 			    "ESI esi:include src attribute withou value");
@@ -351,7 +351,7 @@
 
 /*--------------------------------------------------------------------
  * Zoom over a piece of object and dike out all releveant esi: pieces.
- * The entire txt may not be processed because an interesting part 
+ * The entire txt may not be processed because an interesting part
  * could possibly span into the next chunk of storage.
  * Return value: number of bytes processed.
  */
@@ -385,7 +385,7 @@
 				if (!memcmp(p, "]]>", 3)) {
 					ew->incdata = 0;
 					p += 3;
-				} else 
+				} else
 					p++;
 			}
 			continue;
@@ -464,7 +464,7 @@
 			ew->incdata = 1;
 			p += 9;
 			continue;
-		} 
+		}
 
 		/* Ignore non esi elements, if so instructed */
 		if ((params->esi_syntax & 0x02)) {
@@ -510,7 +510,7 @@
 				esi_error(ew, p, 1 + q - p, ew->remflg ?
 				    "ESI 1.0 forbids nested esi:remove"
 				    : "ESI 1.0 esi:remove not opened");
-					
+
 				if (!ew->remflg) {
 					ew->o.e = p;
 					esi_addverbatim(ew);
@@ -561,7 +561,7 @@
 			continue;
 		}
 		if (r + 10 < q && !memcmp(r, "esi:include", 11)) {
-			
+
 			ew->o.e = p;
 			esi_addverbatim(ew);
 
@@ -723,7 +723,7 @@
 			p = NULL;
 			continue;
 		}
-		assert(t.e > t.b + u); 	/* XXX incredibly long element ? */
+		assert(t.e > t.b + u);	/* XXX incredibly long element ? */
 		memcpy(t.b, p, u);
 
 		/* Peel start off next chunk, until and including '<' */
@@ -755,7 +755,7 @@
 		ew->t = t;
 		q = esi_parse(ew);
 		assert(q == ew->t.e);	/* XXX */
-	
+
 		/* 'p' is cached starting point for next storage part */
 	}
 

Modified: branches/2.0/varnish-cache/bin/varnishd/cache_vrt_re.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_vrt_re.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_vrt_re.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -104,7 +104,8 @@
 }
 
 const char *
-VRT_regsub(const struct sess *sp, int all, const char *str, void *re, const char *sub)
+VRT_regsub(const struct sess *sp, int all, const char *str, void *re,
+    const char *sub)
 {
 	regmatch_t pm[10];
 	regex_t *t;
@@ -161,7 +162,7 @@
 	if (res.b >= res.e) {
 		WS_Release(sp->http->ws, 0);
 		return (str);
-	} 
+	}
 	Tcheck(res);
 	WS_ReleaseP(sp->http->ws, res.b);
 	return (b0);

Modified: branches/2.0/varnish-cache/bin/varnishd/default.vcl
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/default.vcl	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/default.vcl	2009-02-05 08:45:25 UTC (rev 3580)
@@ -16,23 +16,24 @@
  *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $Id$
  *
  * The default VCL code.
  *
- * NB! You do NOT need to copy & paste all of this into your won vcl code,
- * if you do not handle one of the functions, the compiler will automaticall
- * fall back to the default code.
+ * NB! You do NOT need to copy & paste all of these functions into your
+ * own vcl code, if you do not provide a definition of one of these
+ * functions, the compiler will automatically fall back to the default
+ * code from this file.
  *
  * This code will be prefixed with a backend declaration built from the
  * -b argument.
@@ -134,7 +135,9 @@
     <p>"} obj.response {"</p>
     <h3>Guru Meditation:</h3>
     <p>XID: "} req.xid {"</p>
-    <address><a href="http://www.varnish-cache.org/">Varnish</a></address>
+    <address>
+       <a href="http://www.varnish-cache.org/">Varnish</a>
+    </address>
   </body>
 </html>
 "};

Modified: branches/2.0/varnish-cache/bin/varnishd/hash_classic.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/hash_classic.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/hash_classic.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -249,7 +249,7 @@
 /*--------------------------------------------------------------------*/
 
 struct hash_slinger hcl_slinger = {
-	.magic	= 	SLINGER_MAGIC,
+	.magic	=	SLINGER_MAGIC,
 	.name	=	"classic",
 	.init	=	hcl_init,
 	.start	=	hcl_start,

Modified: branches/2.0/varnish-cache/bin/varnishd/hash_simple_list.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/hash_simple_list.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/hash_simple_list.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -90,25 +90,23 @@
 		UNLOCK(&hsl_mutex);
 		return (nobj);
 	}
-	if (nobj == NULL) {
-		UNLOCK(&hsl_mutex);
-		return (NULL);
-	}
-	he2 = calloc(sizeof *he2, 1);
-	XXXAN(he2);
-	he2->obj = nobj;
-	he2->refcnt = 1;
+	if (nobj != NULL) {
+		he2 = calloc(sizeof *he2, 1);
+		XXXAN(he2);
+		he2->obj = nobj;
+		he2->refcnt = 1;
 
-	nobj->hashpriv = he2;
-	nobj->hash = malloc(sp->lhashptr);
-	XXXAN(nobj->hash);
-	nobj->hashlen = sp->lhashptr;
-	HSH_Copy(sp, nobj);
+		nobj->hashpriv = he2;
+		nobj->hash = malloc(sp->lhashptr);
+		XXXAN(nobj->hash);
+		nobj->hashlen = sp->lhashptr;
+		HSH_Copy(sp, nobj);
 
-	if (he != NULL)
-		VTAILQ_INSERT_BEFORE(he, he2, list);
-	else
-		VTAILQ_INSERT_TAIL(&hsl_head, he2, list);
+		if (he != NULL)
+			VTAILQ_INSERT_BEFORE(he, he2, list);
+		else
+			VTAILQ_INSERT_TAIL(&hsl_head, he2, list);
+	}
 	UNLOCK(&hsl_mutex);
 	return (nobj);
 }
@@ -143,5 +141,5 @@
 	.name	=	"simple",
 	.start	=	hsl_start,
 	.lookup =	hsl_lookup,
-	.deref 	=	hsl_deref,
+	.deref	=	hsl_deref,
 };

Modified: branches/2.0/varnish-cache/bin/varnishd/hash_slinger.h
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/hash_slinger.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/hash_slinger.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -33,7 +33,8 @@
 
 typedef void hash_init_f(int ac, char * const *av);
 typedef void hash_start_f(void);
-typedef struct objhead *hash_lookup_f(const struct sess *sp, struct objhead *nobj);
+typedef struct objhead *
+    hash_lookup_f(const struct sess *sp, struct objhead *nobj);
 typedef int hash_deref_f(const struct objhead *obj);
 
 struct hash_slinger {

Modified: branches/2.0/varnish-cache/bin/varnishd/heritage.h
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/heritage.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/heritage.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -77,7 +77,7 @@
 
 	/* TTL used for lack of anything better */
 	unsigned		default_ttl;
-	
+
 	/* TTL used for synthesized error pages */
 	unsigned		err_ttl;
 
@@ -193,4 +193,5 @@
 
 void child_main(void);
 
-int varnish_instance(const char *n_arg, char *name, size_t namelen, char *dir, size_t dirlen);
+int varnish_instance(const char *n_arg, char *name, size_t namelen,
+    char *dir, size_t dirlen);

Modified: branches/2.0/varnish-cache/bin/varnishd/mgt_child.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/mgt_child.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/mgt_child.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -194,7 +194,7 @@
 			continue;
 		}
 		ls->sock = VSS_bind(ls->addr);
-		if (ls->sock < 0) 
+		if (ls->sock < 0)
 			continue;
 
 		mgt_child_inherit(ls->sock, "sock");
@@ -269,7 +269,7 @@
 	child_cli_in = cp[0];
 
 	/*
-	 * Open pipe for child stdout/err 
+	 * Open pipe for child stdout/err
 	 * NB: not inherited, because we dup2() it to stdout/stderr in child
 	 */
 	AZ(pipe(cp));
@@ -548,7 +548,7 @@
 	AZ(sigaction(SIGPIPE, &sac, NULL));
 	AZ(sigaction(SIGHUP, &sac, NULL));
 
-	if (!dflag && !mgt_has_vcl()) 
+	if (!dflag && !mgt_has_vcl())
 		REPORT0(LOG_ERR, "No VCL loaded yet");
 	else if (!dflag) {
 		start_child(NULL);

Modified: branches/2.0/varnish-cache/bin/varnishd/mgt_cli.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/mgt_cli.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/mgt_cli.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -66,8 +66,8 @@
 static int		cli_i = -1, cli_o = -1;
 
 struct telnet {
-	int 			fd;
-	struct vev 		*ev;
+	int			fd;
+	struct vev		*ev;
 	VTAILQ_ENTRY(telnet)	list;
 };
 
@@ -108,7 +108,7 @@
 		    "help %s\n", av[2] != NULL ? av[2] : "")) {
 			cli_out(cli, "%s", p);
 			cli_result(cli, u);
-		} 
+		}
 		free(p);
 	}
 }
@@ -144,7 +144,7 @@
 	{ CLI_PARAM_SHOW,	mcf_param_show, NULL },
 	{ CLI_PARAM_SET,	mcf_param_set, NULL },
 
-	{ CLI_QUIT, 		mcf_close, NULL},
+	{ CLI_QUIT,		mcf_close, NULL},
 #if 0
 	{ CLI_SERVER_RESTART },
 	{ CLI_ZERO },

Modified: branches/2.0/varnish-cache/bin/varnishd/mgt_param.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/mgt_param.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/mgt_param.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -155,7 +155,8 @@
 /*--------------------------------------------------------------------*/
 
 static void
-tweak_generic_uint(struct cli *cli, volatile unsigned *dest, const char *arg, unsigned min, unsigned max)
+tweak_generic_uint(struct cli *cli, volatile unsigned *dest, const char *arg,
+    unsigned min, unsigned max)
 {
 	unsigned u;
 
@@ -215,7 +216,7 @@
 				master.uid = getuid();
 				return;
 			}
-		} else 
+		} else
 			pw = getpwnam(arg);
 		if (pw == NULL) {
 			cli_out(cli, "Unknown user");
@@ -229,7 +230,7 @@
 		/* set group to user's primary group */
 		if ((gr = getgrgid(pw->pw_gid)) != NULL &&
 		    (gr = getgrnam(gr->gr_name)) != NULL &&
-		    gr->gr_gid == pw->pw_gid) 
+		    gr->gr_gid == pw->pw_gid)
 			REPLACE(master.group, gr->gr_name);
 	} else if (master.user) {
 		cli_out(cli, "%s (%d)", master.user, (int)master.uid);
@@ -276,7 +277,8 @@
 /*--------------------------------------------------------------------*/
 
 static void
-tweak_thread_pool_min(struct cli *cli, const struct parspec *par, const char *arg)
+tweak_thread_pool_min(struct cli *cli, const struct parspec *par,
+    const char *arg)
 {
 
 	tweak_generic_uint(cli, &master.wthread_min, arg,
@@ -286,7 +288,8 @@
 /*--------------------------------------------------------------------*/
 
 static void
-tweak_thread_pool_max(struct cli *cli, const struct parspec *par, const char *arg)
+tweak_thread_pool_max(struct cli *cli, const struct parspec *par,
+    const char *arg)
 {
 
 	(void)par;
@@ -310,7 +313,8 @@
 }
 
 static void
-tweak_listen_address(struct cli *cli, const struct parspec *par, const char *arg)
+tweak_listen_address(struct cli *cli, const struct parspec *par,
+    const char *arg)
 {
 	char **av;
 	int i;

Modified: branches/2.0/varnish-cache/bin/varnishd/mgt_vcc.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/mgt_vcc.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/mgt_vcc.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -65,7 +65,7 @@
 
 struct vclprog {
 	VTAILQ_ENTRY(vclprog)	list;
-	char 			*name;
+	char			*name;
 	char			*fname;
 	int			active;
 };
@@ -487,7 +487,7 @@
 		cli_result(cli, CLIS_PARAM);
 		return;
 	}
-	
+
 	sb = vsb_newauto();
 	XXXAN(sb);
 	vf = mgt_VccCompile(sb, av[3], NULL, 0);
@@ -577,7 +577,7 @@
 	vp = mcf_find_vcl(cli, av[2]);
 	if (vp == NULL)
 		return;
-	if (vp->active != 0) 
+	if (vp->active != 0)
 		return;
 	if (child_pid >= 0 &&
 	    mgt_cli_askchild(&status, &p, "vcl.use %s\n", av[2])) {

Modified: branches/2.0/varnish-cache/bin/varnishd/shmlog.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/shmlog.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/shmlog.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -86,7 +86,7 @@
 	p[__SHMLOG_ID_HIGH] = (id >> 8) & 0xff;
 	p[__SHMLOG_ID_LOW] = id & 0xff;
 	p[SHMLOG_DATA + len] = '\0';
-	p[SHMLOG_NEXTTAG + len] = SLT_ENDMARKER;	
+	p[SHMLOG_NEXTTAG + len] = SLT_ENDMARKER;
 	/* XXX: Write barrier here */
 	p[SHMLOG_TAG] = tag;
 }
@@ -159,7 +159,7 @@
 		p = logstart + loghead->ptr;
 		n = vsnprintf((char *)(p + SHMLOG_DATA), 256, fmt, ap);
 		if (n > 255)
-			n = 255; 	/* we truncate long fields */
+			n = 255;	/* we truncate long fields */
 		vsl_hdr(tag, p, n, id);
 		loghead->ptr += SHMLOG_NEXTTAG + n;
 		assert(loghead->ptr < loghead->size);
@@ -254,7 +254,7 @@
 		p = w->wlp;
 		n = vsnprintf((char *)(p + SHMLOG_DATA), 256, fmt, ap);
 		if (n > 255)
-			n = 255; 	/* we truncate long fields */
+			n = 255;	/* we truncate long fields */
 		vsl_hdr(tag, p, n, id);
 		w->wlp += SHMLOG_NEXTTAG + n;
 		assert(w->wlp < w->wle);

Modified: branches/2.0/varnish-cache/bin/varnishd/stevedore.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/stevedore.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/stevedore.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -105,7 +105,7 @@
 
 	if (stv->init != NULL)
 		stv->init(stv, ac, av);
-	else if (ac != 0) 
+	else if (ac != 0)
 		ARGV_ERR("(-s%s) too many arguments\n", stv->name);
 
 	VTAILQ_INSERT_TAIL(&stevedores, stv, list);

Modified: branches/2.0/varnish-cache/bin/varnishd/storage_file.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/storage_file.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/storage_file.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -185,7 +185,7 @@
 	i = 0;
 	while(1) {
 		o = l;
-		if (o == l && o > 0) 
+		if (o == l && o > 0)
 			break;
 		l >>= 1;
 		i++;
@@ -303,7 +303,7 @@
 
 	if (S_ISREG(st.st_mode)) {
 		sc->fd = open(fn, O_RDWR);
-		if (sc->fd < 0) 
+		if (sc->fd < 0)
 			ARGV_ERR("(-sfile) \"%s\" could not open (%s)\n",
 			    fn, strerror(errno));
 		AZ(fstat(sc->fd, &st));

Modified: branches/2.0/varnish-cache/bin/varnishd/storage_malloc.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/storage_malloc.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/storage_malloc.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -132,7 +132,7 @@
 	(void)parent;
 
 	AZ(av[ac]);
-	if (ac > 1) 
+	if (ac > 1)
 		ARGV_ERR("(-smalloc) too many arguments\n");
 
 	if (ac == 0 || *av[0] == '\0')
@@ -141,7 +141,7 @@
 	e = str2bytes(av[0], &u, 0);
 	if (e != NULL)
 		ARGV_ERR("(-smalloc) size \"%s\": %s\n", av[0], e);
-	if ((u != (uintmax_t)(size_t)u)) 
+	if ((u != (uintmax_t)(size_t)u))
 		ARGV_ERR("(-smalloc) size \"%s\": too big\n", av[0]);
 
 	printf("storage_malloc: max size %ju MB.\n",

Modified: branches/2.0/varnish-cache/bin/varnishd/storage_umem.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/storage_umem.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/storage_umem.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -139,7 +139,7 @@
 	(void)parent;
 
 	AZ(av[ac]);
-	if (ac > 1) 
+	if (ac > 1)
 		ARGV_ERR("(-sumem) too many arguments\n");
 
 	if (ac == 0 || *av[0] == '\0')
@@ -148,7 +148,7 @@
 	e = str2bytes(av[0], &u, 0);
 	if (e != NULL)
 		ARGV_ERR("(-sumem) size \"%s\": %s\n", av[0], e);
-	if ((u != (uintmax_t)(size_t)u)) 
+	if ((u != (uintmax_t)(size_t)u))
 		ARGV_ERR("(-sumem) size \"%s\": too big\n", av[0]);
 	smu_max = u;
 }

Modified: branches/2.0/varnish-cache/bin/varnishd/varnishd.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/varnishd.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishd/varnishd.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -136,7 +136,7 @@
 	av = ParseArgv(spec, ARGV_COMMA);
 	AN(av);
 
-	if (av[0] != NULL) 
+	if (av[0] != NULL)
 		ARGV_ERR("%s\n", av[0]);
 
 	if (av[1] == NULL)
@@ -175,7 +175,7 @@
 	av = ParseArgv(h_arg, ARGV_COMMA);
 	AN(av);
 
-	if (av[0] != NULL) 
+	if (av[0] != NULL)
 		ARGV_ERR("%s\n", av[0]);
 
 	if (av[1] == NULL)
@@ -226,7 +226,8 @@
 	fprintf(stderr, FMT, "", "  -s file  [default: use /tmp]");
 	fprintf(stderr, FMT, "", "  -s file,<dir_or_file>");
 	fprintf(stderr, FMT, "", "  -s file,<dir_or_file>,<size>");
-	fprintf(stderr, FMT, "", "  -s file,<dir_or_file>,<size>,<granularity>");
+	fprintf(stderr, FMT, "",
+	    "  -s file,<dir_or_file>,<size>,<granularity>");
 	fprintf(stderr, FMT, "-t", "Default TTL");
 	fprintf(stderr, FMT, "-T address:port",
 	    "Telnet listen address and port");
@@ -252,10 +253,10 @@
 	av = ParseArgv(argv, ARGV_COMMA);
 	AN(av);
 
-	if (av[0] != NULL) 
+	if (av[0] != NULL)
 		ARGV_ERR("%s\n", av[0]);
 
-	if (av[1] == NULL) 
+	if (av[1] == NULL)
 		usage();
 
 	u = arg_ul(av[1]);
@@ -462,7 +463,8 @@
 	MCF_ParamInit(cli);
 	cli_check(cli);
 
-	while ((o = getopt(argc, argv, "a:b:Cdf:Fg:h:l:n:P:p:s:T:t:u:Vw:")) != -1)
+	while ((o = getopt(argc, argv,
+	    "a:b:Cdf:Fg:h:l:n:P:p:s:T:t:u:Vw:")) != -1)
 		switch (o) {
 		case 'a':
 			MCF_ParamSet(cli, "listen_address", optarg);
@@ -580,7 +582,7 @@
 		exit(1);
 	}
 
-	if (n_arg != NULL) 
+	if (n_arg != NULL)
 		openlog(n_arg, LOG_PID, LOG_LOCAL0);
 	else
 		openlog("varnishd", LOG_PID, LOG_LOCAL0);
@@ -624,7 +626,7 @@
 	if (d_flag == 1)
 		printf("%d\n", getpid());
 
-	if (pfh != NULL && vpf_write(pfh)) 
+	if (pfh != NULL && vpf_write(pfh))
 		fprintf(stderr, "NOTE: Could not write PID file\n");
 
 	mgt_run(d_flag, T_arg);

Modified: branches/2.0/varnish-cache/bin/varnishhist/varnishhist.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishhist/varnishhist.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishhist/varnishhist.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -147,7 +147,8 @@
 }
 
 static int
-h_hist(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned spec, const char *ptr)
+h_hist(void *priv, enum shmlogtag tag, unsigned fd, unsigned len,
+    unsigned spec, const char *ptr)
 {
 	double b;
 	int i, j;
@@ -308,8 +309,8 @@
 static void
 usage(void)
 {
-	fprintf(stderr,
-	    "usage: varnishhist %s [-n varnish_name] [-V] [-w delay]\n", VSL_USAGE);
+	fprintf(stderr, "usage: varnishhist "
+	    "%s [-n varnish_name] [-V] [-w delay]\n", VSL_USAGE);
 	exit(1);
 }
 

Modified: branches/2.0/varnish-cache/bin/varnishlog/varnishlog.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishlog/varnishlog.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishlog/varnishlog.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -120,7 +120,8 @@
 }
 
 static int
-h_order(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned spec, const char *ptr)
+h_order(void *priv, enum shmlogtag tag, unsigned fd, unsigned len,
+    unsigned spec, const char *ptr)
 {
 	char type;
 
@@ -261,7 +262,7 @@
 
 	flags = (a_flag ? O_APPEND : O_TRUNC) | O_WRONLY | O_CREAT;
 #ifdef O_LARGEFILE
-        flags |= O_LARGEFILE;
+	flags |= O_LARGEFILE;
 #endif
 	if (!strcmp(w_arg, "-"))
 		fd = STDOUT_FILENO;
@@ -308,8 +309,8 @@
 static void
 usage(void)
 {
-	fprintf(stderr,
-	    "usage: varnishlog %s [-aDoV] [-n varnish_name] [-P file] [-w file]\n", VSL_USAGE);
+	fprintf(stderr, "usage: varnishlog "
+	    "%s [-aDoV] [-n varnish_name] [-P file] [-w file]\n", VSL_USAGE);
 	exit(1);
 }
 

Modified: branches/2.0/varnish-cache/bin/varnishncsa/varnishncsa.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishncsa/varnishncsa.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishncsa/varnishncsa.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -105,7 +105,8 @@
 static int prefer_x_forwarded_for = 0;
 
 static int
-isprefix(const char *str, const char *prefix, const char *end, const char **next)
+isprefix(const char *str, const char *prefix, const char *end,
+    const char **next)
 {
 
 	while (str < end && *str && *prefix &&
@@ -511,7 +512,9 @@
 usage(void)
 {
 
-	fprintf(stderr, "usage: varnishncsa %s [-aDV] [-n varnish_name] [-P file] [-w file]\n", VSL_USAGE);
+	fprintf(stderr,
+	    "usage: varnishncsa %s [-aDV] [-n varnish_name] "
+	    "[-P file] [-w file]\n", VSL_USAGE);
 	exit(1);
 }
 

Modified: branches/2.0/varnish-cache/bin/varnishreplay/varnishreplay.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishreplay/varnishreplay.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishreplay/varnishreplay.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -251,7 +251,8 @@
 
 		while (fd >= newnthreads)
 			newnthreads += newnthreads + 1;
-		newthreads = realloc(newthreads, newnthreads * sizeof *newthreads);
+		newthreads = realloc(newthreads,
+		    newnthreads * sizeof *newthreads);
 		XXXAN(newthreads != NULL);
 		memset(newthreads + nthreads, 0,
 		    (newnthreads - nthreads) * sizeof *newthreads);
@@ -557,12 +558,15 @@
 
 		if (!thr->method || !thr->url || !thr->proto) {
 			thr->bogus = 1;
-		} else if (strcmp(thr->method, "GET") != 0 && strcmp(thr->method, "HEAD") != 0) {
+		} else if (strcmp(thr->method, "GET") != 0 &&
+		    strcmp(thr->method, "HEAD") != 0) {
 			thr->bogus = 1;
 		} else if (strcmp(thr->proto, "HTTP/1.0") == 0) {
-			reopen = !(thr->conn && strcasecmp(thr->conn, "keep-alive") == 0);
+			reopen = !(thr->conn &&
+			    strcasecmp(thr->conn, "keep-alive") == 0);
 		} else if (strcmp(thr->proto, "HTTP/1.1") == 0) {
-			reopen = (thr->conn && strcasecmp(thr->conn, "close") == 0);
+			reopen = (thr->conn &&
+			    strcasecmp(thr->conn, "close") == 0);
 		} else {
 			thr->bogus = 1;
 		}
@@ -701,7 +705,8 @@
 usage(void)
 {
 
-	fprintf(stderr, "usage: varnishreplay [-D] -a address:port -r logfile\n");
+	fprintf(stderr,
+	    "usage: varnishreplay [-D] -a address:port -r logfile\n");
 	exit(1);
 }
 
@@ -743,7 +748,11 @@
 	signal(SIGPIPE, SIG_IGN);
 
 	pthread_attr_init(&thread_attr);
-	/* XXX: seting the stack size manually reduces the memory usasage and increases speed */
+
+	/*
+	 * XXX: seting the stack size manually reduces the memory usage
+	 * XXX: (allowing more threads) and increases speed (?)
+	 */
 	pthread_attr_setstacksize(&thread_attr, 32768);
 
 	while (VSL_Dispatch(vd, gen_traffic, NULL) == 0)

Modified: branches/2.0/varnish-cache/bin/varnishstat/varnishstat.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishstat/varnishstat.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishstat/varnishstat.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -81,9 +81,10 @@
 
 		while (field_start != NULL) {
 			field_end = field_start + field_length;
-			if ((field_start == fields || *(field_start - 1) == ',') &&
-				(*field_end == ',' || *field_end == '\0'))
-					return (match_value);
+			if ((field_start == fields ||
+			    *(field_start - 1) == ',') &&
+			    (*field_end == ',' || *field_end == '\0'))
+				return (match_value);
 			field_start = strstr( field_end, field );
 		}
 	}
@@ -237,14 +238,20 @@
 usage(void)
 {
 #define FMT "    %-28s # %s\n"
-	fprintf(stderr, "usage: varnishstat [-1lV] [-f field_list] [-n varnish_name] [-w delay]\n");
+	fprintf(stderr, "usage: varnishstat "
+	    "[-1lV] [-f field_list] [-n varnish_name] [-w delay]\n");
 	fprintf(stderr, FMT, "-1", "Print the statistics once and exit");
-	fprintf(stderr, FMT, "-f field_list", "Comma separated list of fields to display. ");
-	fprintf(stderr, FMT, "", "If it starts with '^' it is used as an exclusion list");
-	fprintf(stderr, FMT, "-l", "Lists the available fields to use with the -f option");
-	fprintf(stderr, FMT, "-n varnish_name", "The varnishd instance to get logs from");
+	fprintf(stderr, FMT, "-f field_list",
+	    "Comma separated list of fields to display. ");
+	fprintf(stderr, FMT, "",
+	    "If it starts with '^' it is used as an exclusion list");
+	fprintf(stderr, FMT, "-l",
+	    "Lists the available fields to use with the -f option");
+	fprintf(stderr, FMT, "-n varnish_name",
+	    "The varnishd instance to get logs from");
 	fprintf(stderr, FMT, "-V", "Display the version number and exit");
-	fprintf(stderr, FMT, "-w delay", "Wait delay seconds between updates.  The default is 1.");
+	fprintf(stderr, FMT, "-w delay",
+	    "Wait delay seconds between updates.  The default is 1.");
 #undef FMT
 	exit(1);
 }
@@ -252,7 +259,7 @@
 static void
 list_fields(void)
 {
-	fprintf(stderr, "Available fields to use with the varnishstat -f option:\n");
+	fprintf(stderr, "Varnishstat -f option fields:\n");
 	fprintf(stderr, "Field name           Description\n");
 	fprintf(stderr, "----------           -----------\n");
 	fprintf(stderr, "uptime               Child uptime\n");
@@ -290,7 +297,8 @@
 
 		valid_field = 0;
 		for (i = 0; all_fields[i] != NULL; i++) {
-			if (strncmp(field_start, all_fields[i], field_length) == 0 && field_length == strlen( all_fields[i] )) {
+			if (strncmp(field_start, all_fields[i], field_length)
+			     == 0 && field_length == strlen( all_fields[i])) {
 				valid_field = 1;
 				break;
 			}
@@ -346,7 +354,7 @@
 
 	if ((VSL_stats = VSL_OpenStats(n_arg)) == NULL)
 		exit(1);
-	
+
 	if (fields != NULL && !valid_fields(fields)) {
 		usage();
 		exit(1);

Modified: branches/2.0/varnish-cache/bin/varnishtest/vtc.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishtest/vtc.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishtest/vtc.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2006-2008 Linpro AS
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -10,7 +10,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -140,7 +140,8 @@
 						p++;
 					} else {
 						if (*p == '\n')
-							fprintf(stderr, "Unterminated quoted string in line:\n%s", p);
+							fprintf(stderr,
+				"Unterminated quoted string in line:\n%s", p);
 						assert(*p != '\n');
 						*q++ = *p;
 					}
@@ -184,7 +185,7 @@
 			fprintf(stderr, "Unknown command: \"%s\"", token_s[0]);
 			exit (1);
 		}
-	
+
 		assert(cp->cmd != NULL);
 		cp->cmd(token_s, priv, cmd, vl);
 		if (stop)
@@ -377,7 +378,7 @@
 }
 
 /**********************************************************************
- * Main 
+ * Main
  */
 
 int

Modified: branches/2.0/varnish-cache/bin/varnishtest/vtc.h
===================================================================
--- branches/2.0/varnish-cache/bin/varnishtest/vtc.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishtest/vtc.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2006-2008 Linpro AS
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -10,7 +10,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -22,7 +22,7 @@
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
- * 
+ *
  * $Id$
  */
 
@@ -30,7 +30,9 @@
 struct vtclog;
 struct cmds;
 
-#define CMD_ARGS char * const *av, void *priv, const struct cmds *cmd, struct vtclog *vl
+#define CMD_ARGS \
+    char * const *av, void *priv, const struct cmds *cmd, struct vtclog *vl
+
 typedef void cmd_f(CMD_ARGS);
 
 struct cmds {
@@ -38,7 +40,8 @@
 	cmd_f		*cmd;
 };
 
-void parse_string(char *buf, const struct cmds *cmd, void *priv, struct vtclog *vl);
+void parse_string(char *buf, const struct cmds *cmd, void *priv,
+    struct vtclog *vl);
 
 cmd_f cmd_dump;
 cmd_f cmd_delay;
@@ -60,4 +63,5 @@
 struct vtclog *vtc_logopen(const char *id);
 void vtc_logclose(struct vtclog *vl);
 void vtc_log(struct vtclog *vl, unsigned lvl, const char *fmt, ...);
-void vtc_dump(struct vtclog *vl, unsigned lvl, const char *pfx, const char *str);
+void vtc_dump(struct vtclog *vl, unsigned lvl, const char *pfx,
+    const char *str);

Modified: branches/2.0/varnish-cache/bin/varnishtest/vtc_client.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishtest/vtc_client.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishtest/vtc_client.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2006-2008 Linpro AS
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -10,7 +10,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -50,7 +50,7 @@
 	VTAILQ_ENTRY(client)	list;
 
 	char			*spec;
-	
+
 	char			*connect;
 
 	pthread_t		tp;
@@ -208,7 +208,7 @@
 	VTAILQ_FOREACH(c, &clients, list)
 		if (!strcmp(c->name, av[0]))
 			break;
-	if (c == NULL) 
+	if (c == NULL)
 		c = client_new(av[0]);
 	av++;
 

Modified: branches/2.0/varnish-cache/bin/varnishtest/vtc_http.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishtest/vtc_http.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishtest/vtc_http.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2006-2008 Linpro AS
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -10,7 +10,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -75,8 +75,8 @@
 {
 	int i, j, k, l;
 	char *b;
-	
-	
+
+
 	AN(len);
 	i = strtoul(len, NULL, 0);
 	assert(i > 0);
@@ -347,8 +347,8 @@
 {
 	char *p, *q;
 	int i, l, ll;
-	
 
+
 	ll = 0;
 	p = http_find_header(hh, "content-length");
 	if (p != NULL) {
@@ -397,7 +397,7 @@
 			ll += i;
 		} while (i > 0);
 		vtc_dump(hp->vl, 4, "rxeof", hp->body);
-	} 
+	}
 	sprintf(hp->bodylen, "%d", ll);
 }
 
@@ -419,7 +419,7 @@
 		p = hp->rxbuf + hp->prxbuf - 1;
 		i = 0;
 		for (i = 0; p > hp->rxbuf; p--) {
-			if (*p != '\n') 
+			if (*p != '\n')
 				break;
 			if (p - 1 > hp->rxbuf && p[-1] == '\r')
 				p--;
@@ -456,7 +456,7 @@
 	vtc_log(hp->vl, 3, "rxresp");
 	http_rxhdr(hp);
 	http_splitheader(hp, 0);
-	if (!strcmp(hp->resp[1], "200")) 
+	if (!strcmp(hp->resp[1], "200"))
 		http_swallow_body(hp, hp->resp, 1);
 	else
 		http_swallow_body(hp, hp->resp, 0);
@@ -506,7 +506,7 @@
 		if (!strcmp(*av, "-hdr")) {
 			vsb_printf(hp->vsb, "%s%s", av[1], nl);
 			av++;
-		} else 
+		} else
 			break;
 	}
 	for(; *av != NULL; av++) {
@@ -525,7 +525,7 @@
 		fprintf(stderr, "Unknown http txresp spec: %s\n", *av);
 		exit (1);
 	}
-	if (body != NULL) 
+	if (body != NULL)
 		vsb_printf(hp->vsb, "Content-Length: %d%s", strlen(body), nl);
 	vsb_cat(hp->vsb, nl);
 	if (body != NULL) {
@@ -621,7 +621,7 @@
 		fprintf(stderr, "Unknown http txreq spec: %s\n", *av);
 		exit (1);
 	}
-	if (body != NULL) 
+	if (body != NULL)
 		vsb_printf(hp->vsb, "Content-Length: %d%s", strlen(body), nl);
 	vsb_cat(hp->vsb, nl);
 	if (body != NULL) {

Modified: branches/2.0/varnish-cache/bin/varnishtest/vtc_log.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishtest/vtc_log.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishtest/vtc_log.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2006-2008 Linpro AS
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -10,7 +10,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -56,7 +56,7 @@
 	struct vtclog *vl;
 
 	ALLOC_OBJ(vl, VTCLOG_MAGIC);
-	AN(vl);	
+	AN(vl);
 	vl->id = id;
 	vl->vsb = vsb_newauto();
 	return (vl);
@@ -125,7 +125,7 @@
 	vsb_clear(vl->vsb);
 	if (pfx == NULL)
 		pfx = "";
-	if (str == NULL) 
+	if (str == NULL)
 		vsb_printf(vl->vsb, "%s %-4s %s(null)\n",
 		    lead[lvl], vl->id, pfx);
 	else

Modified: branches/2.0/varnish-cache/bin/varnishtest/vtc_sema.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishtest/vtc_sema.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishtest/vtc_sema.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2006-2008 Linpro AS
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -10,7 +10,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -141,7 +141,7 @@
 	VTAILQ_FOREACH(r, &semas, list)
 		if (!strcmp(r->name, av[0]))
 			break;
-	if (r == NULL) 
+	if (r == NULL)
 		r = sema_new(av[0], vl);
 	AZ(pthread_mutex_unlock(&sema_mtx));
 	av++;

Modified: branches/2.0/varnish-cache/bin/varnishtest/vtc_server.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishtest/vtc_server.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishtest/vtc_server.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2006-2008 Linpro AS
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -10,7 +10,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -54,7 +54,7 @@
 
 	unsigned		repeat;
 	char			*spec;
-	
+
 	int			depth;
 	int			sock;
 	char			*listen;
@@ -234,7 +234,7 @@
 		/* Reset and free */
 		VTAILQ_FOREACH_SAFE(s, &servers, list, s2) {
 			VTAILQ_REMOVE(&servers, s, list);
-			if (s->sock >= 0) 
+			if (s->sock >= 0)
 				server_wait(s);
 			server_delete(s);
 		}
@@ -247,7 +247,7 @@
 	VTAILQ_FOREACH(s, &servers, list)
 		if (!strcmp(s->name, av[0]))
 			break;
-	if (s == NULL) 
+	if (s == NULL)
 		s = server_new(av[0]);
 	av++;
 

Modified: branches/2.0/varnish-cache/bin/varnishtest/vtc_varnish.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishtest/vtc_varnish.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishtest/vtc_varnish.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2006-2008 Linpro AS
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -10,7 +10,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -446,7 +446,7 @@
 	for (i = 0; i < 10; i++, usleep(100000)) {
 
 
-#define MAC_STAT(n, t, f, d) 					\
+#define MAC_STAT(n, t, f, d)					\
 		if (!strcmp(av[0], #n)) {			\
 			val = v->stats->n;			\
 		} else
@@ -510,7 +510,7 @@
 	VTAILQ_FOREACH(v, &varnishes, list)
 		if (!strcmp(v->name, av[0]))
 			break;
-	if (v == NULL) 
+	if (v == NULL)
 		v = varnish_new(av[0]);
 	av++;
 

Modified: branches/2.0/varnish-cache/bin/varnishtop/varnishtop.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishtop/varnishtop.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/bin/varnishtop/varnishtop.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -286,7 +286,8 @@
 static void
 usage(void)
 {
-	fprintf(stderr, "usage: varnishtop %s [-1fV] [-n varnish_name]\n", VSL_USAGE);
+	fprintf(stderr,
+	    "usage: varnishtop %s [-1fV] [-n varnish_name]\n", VSL_USAGE);
 	exit(1);
 }
 

Modified: branches/2.0/varnish-cache/include/cli.h
===================================================================
--- branches/2.0/varnish-cache/include/cli.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/include/cli.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -57,7 +57,7 @@
 	"url.query",							\
 	"url.query <url>",						\
 	"\tQuery the cache status of a specific URL.\n"			\
-	    "\tReturns the TTL, size and checksum of the object.", 	\
+	    "\tReturns the TTL, size and checksum of the object.",	\
 	1, 1
 
 #define CLI_PURGE_URL							\

Modified: branches/2.0/varnish-cache/include/http_headers.h
===================================================================
--- branches/2.0/varnish-cache/include/http_headers.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/include/http_headers.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -28,6 +28,8 @@
  *
  * $Id$
  *
+ * Argument list:
+ * ---------------------------------------
  * a	Http header name
  * b	session field name
  * c	Request(1)/Response(2) bitfield
@@ -38,8 +40,6 @@
  *
  * see [RFC2616 13.5.1 End-to-end and Hop-by-hop Headers]
  *
- *    a                         b                       c  d  e  f  g
- *--------------------------------------------------------------------
  */
 
 #ifndef HTTPH_R_PASS
@@ -51,52 +51,51 @@
 #define HTTPH_A_DELIVER	(1 << 5)	/* Response (o->c) for deliver */
 #endif
 
-HTTPH("Keep-Alive",		H_Keep_Alive,		3, 3, HTTPH_R_PASS|HTTPH_A_PASS|HTTPH_R_FETCH, 0, 0)	/* RFC2068 */
-
-HTTPH("Accept",			H_Accept,		1, 0, 0, 0, 0)	/* RFC2616 14.1 */
-HTTPH("Accept-Charset",		H_Accept_Charset,	1, 0, 0, 0, 0)	/* RFC2616 14.2 */
-HTTPH("Accept-Encoding",	H_Accept_Encoding,	1, 0, 0, 0, 0)	/* RFC2616 14.3 */
-HTTPH("Accept-Language",	H_Accept_Language,	1, 0, 0, 0, 0)	/* RFC2616 14.4 */
-HTTPH("Accept-Ranges",		H_Accept_Ranges,	2, 3, HTTPH_R_PASS|HTTPH_A_PASS|HTTPH_R_FETCH|HTTPH_A_INS, 0, 0)	/* RFC2616 14.5 */
-HTTPH("Age",			H_Age,			2, 0, HTTPH_A_INS, 0, 0)	/* RFC2616 14.6 */
-HTTPH("Allow",			H_Allow,		2, 0, 0, 0, 0)	/* RFC2616 14.7 */
-HTTPH("Authorization",		H_Authorization,	1, 0, 0, 0, 0)	/* RFC2616 14.8 */
-HTTPH("Cache-Control",		H_Cache_Control,	3, 3, HTTPH_R_PASS|HTTPH_R_FETCH, 0, 0)	/* RFC2616 14.9 */
-HTTPH("Connection",		H_Connection,		3, 3, HTTPH_R_PASS|HTTPH_A_PASS|HTTPH_R_FETCH|HTTPH_A_INS, 0, 0)	/* RFC2616 14.10 */
-HTTPH("Content-Encoding",	H_Content_Encoding,	2, 0, 0, 0, 0)	/* RFC2616 14.11 */
-HTTPH("Content-Langugae",	H_Content_Language,	2, 0, 0, 0, 0)	/* RFC2616 14.12 */
-HTTPH("Content-Length",		H_Content_Length,	2, 2, HTTPH_R_FETCH|HTTPH_A_INS, 0, 0)	/* RFC2616 14.13 */
-HTTPH("Content-Location",	H_Content_Location,	2, 0, 0, 0, 0)  /* RFC2616 14.14 */
-HTTPH("Content-MD5",		H_Content_MD5,		2, 0, 0, 0, 0)  /* RFC2616 14.15 */
-HTTPH("Content-Range",		H_Content_Range,	2, 3, HTTPH_R_PASS|HTTPH_A_PASS|HTTPH_R_FETCH|HTTPH_A_INS, 0, 0)  /* RFC2616 14.16 */
-HTTPH("Content-Type",		H_Content_Type,		2, 0, 0, 0, 0)  /* RFC2616 14.17 */
-HTTPH("Date",			H_Date,			2, 0, HTTPH_A_DELIVER, 0, 0)  /* RFC2616 14.18 */
-HTTPH("ETag", 			H_ETag,			2, 0, 0, 0, 0)	/* RFC2616 14.19 */
-HTTPH("Expect",			H_Expect,		1, 0, 0, 0, 0)	/* RFC2616 14.20 */
-HTTPH("Expires",		H_Expires,		2, 0, 0, 0, 0)	/* RFC2616 14.21 */
-HTTPH("From",			H_From,			1, 0, 0, 0, 0)	/* RFC2616 14.22 */
-HTTPH("Host",			H_Host,			1, 0, 0, 0, 0)	/* RFC2616 14.23 */
-HTTPH("If-Match",		H_If_Match,		1, 1, HTTPH_R_FETCH, 0, 0)	/* RFC2616 14.24 */
-HTTPH("If-Modified-Since",	H_If_Modified_Since,	1, 1, HTTPH_R_FETCH, 0, 0)	/* RFC2616 14.25 */
-HTTPH("If-None-Match",		H_If_None_Match,	1, 1, HTTPH_R_FETCH, 0, 0)	/* RFC2616 14.26 */
-HTTPH("If-Range",		H_If_Range,		1, 1, HTTPH_R_FETCH, 0, 0)	/* RFC2616 14.27 */
-HTTPH("If-Unmodified-Since",	H_If_Unmodifed_Since,	1, 1, HTTPH_R_FETCH, 0, 0)	/* RFC2616 14.28 */
-HTTPH("Last-Modified",		H_Last_Modified,	2, 0, 0, 0, 0)	/* RFC2616 14.29 */
-HTTPH("Location",		H_Location,		2, 0, 0, 0, 0)	/* RFC2616 14.30 */
-HTTPH("Max-Forwards",		H_Max_Forwards,		1, 0, 0, 0, 0)	/* RFC2616 14.31 */
-HTTPH("Pragma",			H_Pragma,		1, 0, 0, 0, 0)  /* RFC2616 14.32 */
-HTTPH("Proxy-Authenticate",	H_Proxy_Authenticate,	2, 3, HTTPH_R_FETCH|HTTPH_A_INS, 0, 0)	/* RFC2616 14.33 */
-HTTPH("Proxy-Authorization",	H_Proxy_Authorization,	1, 3, HTTPH_R_FETCH|HTTPH_A_INS, 0, 0)	/* RFC2616 14.34 */
-HTTPH("Range",			H_Range,		1, 0, 0, 0, 0)	/* RFC2616 14.35 */
-HTTPH("Referer",		H_Referer,		1, 0, 0, 0, 0)	/* RFC2616 14.36 */
-HTTPH("Retry-After",		H_Retry_After,		2, 0, 0, 0, 0)	/* RFC2616 14.37 */
-HTTPH("Server",			H_Server,		2, 0, 0, 0, 0)	/* RFC2616 14.38 */
-HTTPH("TE",			H_TE,			1, 3, HTTPH_R_PASS|HTTPH_A_PASS|HTTPH_R_FETCH|HTTPH_A_INS, 0, 0)	/* RFC2616 14.39 */
-HTTPH("Trailer",		H_Trailer,		1, 3, HTTPH_R_PASS|HTTPH_A_PASS|HTTPH_R_FETCH|HTTPH_A_INS, 0, 0)	/* RFC2616 14.40 */
-HTTPH("Transfer-Encoding", 	H_Transfer_Encoding,	2, 3, HTTPH_R_PASS|HTTPH_A_PASS|HTTPH_R_FETCH|HTTPH_A_INS, 0, 0)	/* RFC2616 14.41 */
-HTTPH("Upgrade", 		H_Upgrade,		2, 3, HTTPH_R_PASS|HTTPH_A_PASS|HTTPH_R_FETCH|HTTPH_A_INS, 0, 0)	/* RFC2616 14.42 */
-HTTPH("User-Agent",		H_User_Agent,		1, 0, 0, 0, 0)	/* RFC2616 14.43 */
-HTTPH("Vary",			H_Vary,			2, 0, 0, 0, 0)	/* RFC2616 14.44 */
-HTTPH("Via",			H_Via,			2, 0, 0, 0, 0)	/* RFC2616 14.45 */
-HTTPH("Warning",		H_Warning,		2, 0, 0, 0, 0)	/* RFC2616 14.46 */
-HTTPH("WWW-Authenticate",	H_WWW_Authenticate,	2, 0, 0, 0, 0)	/* RFC2616 14.47 */
+HTTPH("Keep-Alive",		H_Keep_Alive,		3, 3, HTTPH_R_PASS | HTTPH_A_PASS | HTTPH_R_FETCH,					0, 0)	/* RFC2068 */
+HTTPH("Accept",			H_Accept,		1, 0, 0,										0, 0)	/* RFC2616 14.1 */
+HTTPH("Accept-Charset",		H_Accept_Charset,	1, 0, 0,										0, 0)	/* RFC2616 14.2 */
+HTTPH("Accept-Encoding",	H_Accept_Encoding,	1, 0, 0,										0, 0)	/* RFC2616 14.3 */
+HTTPH("Accept-Language",	H_Accept_Language,	1, 0, 0,										0, 0)	/* RFC2616 14.4 */
+HTTPH("Accept-Ranges",		H_Accept_Ranges,	2, 3, HTTPH_R_PASS | HTTPH_A_PASS | HTTPH_R_FETCH | HTTPH_A_INS,			0, 0)	/* RFC2616 14.5 */
+HTTPH("Age",			H_Age,			2, 0, 						    HTTPH_A_INS,			0, 0)	/* RFC2616 14.6 */
+HTTPH("Allow",			H_Allow,		2, 0, 0,										0, 0)	/* RFC2616 14.7 */
+HTTPH("Authorization",		H_Authorization,	1, 0, 0,										0, 0)	/* RFC2616 14.8 */
+HTTPH("Cache-Control",		H_Cache_Control,	3, 3, HTTPH_R_PASS | 		    HTTPH_R_FETCH,					0, 0)	/* RFC2616 14.9 */
+HTTPH("Connection",		H_Connection,		3, 3, HTTPH_R_PASS | HTTPH_A_PASS | HTTPH_R_FETCH | HTTPH_A_INS,			0, 0)	/* RFC2616 14.10 */
+HTTPH("Content-Encoding",	H_Content_Encoding,	2, 0, 0,										0, 0)	/* RFC2616 14.11 */
+HTTPH("Content-Langugae",	H_Content_Language,	2, 0, 0,										0, 0)	/* RFC2616 14.12 */
+HTTPH("Content-Length",		H_Content_Length,	2, 2, 				    HTTPH_R_FETCH | HTTPH_A_INS,			0, 0)	/* RFC2616 14.13 */
+HTTPH("Content-Location",	H_Content_Location,	2, 0, 0,										0, 0)	/* RFC2616 14.14 */
+HTTPH("Content-MD5",		H_Content_MD5,		2, 0, 0,										0, 0)	/* RFC2616 14.15 */
+HTTPH("Content-Range",		H_Content_Range,	2, 3, HTTPH_R_PASS | HTTPH_A_PASS | HTTPH_R_FETCH | HTTPH_A_INS,			0, 0)	/* RFC2616 14.16 */
+HTTPH("Content-Type",		H_Content_Type,		2, 0, 0,										0, 0)	/* RFC2616 14.17 */
+HTTPH("Date",			H_Date,			2, 0, 								HTTPH_A_DELIVER,	0, 0)	/* RFC2616 14.18 */
+HTTPH("ETag",			H_ETag,			2, 0, 0,										0, 0)	/* RFC2616 14.19 */
+HTTPH("Expect",			H_Expect,		1, 0, 0,										0, 0)	/* RFC2616 14.20 */
+HTTPH("Expires",		H_Expires,		2, 0, 0,										0, 0)	/* RFC2616 14.21 */
+HTTPH("From",			H_From,			1, 0, 0,										0, 0)	/* RFC2616 14.22 */
+HTTPH("Host",			H_Host,			1, 0, 0,										0, 0)	/* RFC2616 14.23 */
+HTTPH("If-Match",		H_If_Match,		1, 1, 				    HTTPH_R_FETCH,					0, 0)	/* RFC2616 14.24 */
+HTTPH("If-Modified-Since",	H_If_Modified_Since,	1, 1, 				    HTTPH_R_FETCH,					0, 0)	/* RFC2616 14.25 */
+HTTPH("If-None-Match",		H_If_None_Match,	1, 1, 				    HTTPH_R_FETCH,					0, 0)	/* RFC2616 14.26 */
+HTTPH("If-Range",		H_If_Range,		1, 1, 				    HTTPH_R_FETCH,					0, 0)	/* RFC2616 14.27 */
+HTTPH("If-Unmodified-Since",	H_If_Unmodifed_Since,	1, 1, 				    HTTPH_R_FETCH,					0, 0)	/* RFC2616 14.28 */
+HTTPH("Last-Modified",		H_Last_Modified,	2, 0, 0,										0, 0)	/* RFC2616 14.29 */
+HTTPH("Location",		H_Location,		2, 0, 0,										0, 0)	/* RFC2616 14.30 */
+HTTPH("Max-Forwards",		H_Max_Forwards,		1, 0, 0,										0, 0)	/* RFC2616 14.31 */
+HTTPH("Pragma",			H_Pragma,		1, 0, 0,										0, 0)	/* RFC2616 14.32 */
+HTTPH("Proxy-Authenticate",	H_Proxy_Authenticate,	2, 3, 				    HTTPH_R_FETCH | HTTPH_A_INS,			0, 0)	/* RFC2616 14.33 */
+HTTPH("Proxy-Authorization",	H_Proxy_Authorization,	1, 3, 				    HTTPH_R_FETCH | HTTPH_A_INS,			0, 0)	/* RFC2616 14.34 */
+HTTPH("Range",			H_Range,		1, 0, 0,										0, 0)	/* RFC2616 14.35 */
+HTTPH("Referer",		H_Referer,		1, 0, 0,										0, 0)	/* RFC2616 14.36 */
+HTTPH("Retry-After",		H_Retry_After,		2, 0, 0,										0, 0)	/* RFC2616 14.37 */
+HTTPH("Server",			H_Server,		2, 0, 0,										0, 0)	/* RFC2616 14.38 */
+HTTPH("TE",			H_TE,			1, 3, HTTPH_R_PASS | HTTPH_A_PASS | HTTPH_R_FETCH | HTTPH_A_INS,			0, 0)	/* RFC2616 14.39 */
+HTTPH("Trailer",		H_Trailer,		1, 3, HTTPH_R_PASS | HTTPH_A_PASS | HTTPH_R_FETCH | HTTPH_A_INS,			0, 0)	/* RFC2616 14.40 */
+HTTPH("Transfer-Encoding",	H_Transfer_Encoding,	2, 3, HTTPH_R_PASS | HTTPH_A_PASS | HTTPH_R_FETCH | HTTPH_A_INS,			0, 0)	/* RFC2616 14.41 */
+HTTPH("Upgrade",		H_Upgrade,		2, 3, HTTPH_R_PASS | HTTPH_A_PASS | HTTPH_R_FETCH | HTTPH_A_INS,			0, 0)	/* RFC2616 14.42 */
+HTTPH("User-Agent",		H_User_Agent,		1, 0, 0,										0, 0)	/* RFC2616 14.43 */
+HTTPH("Vary",			H_Vary,			2, 0, 0,										0, 0)	/* RFC2616 14.44 */
+HTTPH("Via",			H_Via,			2, 0, 0,										0, 0)	/* RFC2616 14.45 */
+HTTPH("Warning",		H_Warning,		2, 0, 0,										0, 0)	/* RFC2616 14.46 */
+HTTPH("WWW-Authenticate",	H_WWW_Authenticate,	2, 0, 0,										0, 0)	/* RFC2616 14.47 */

Modified: branches/2.0/varnish-cache/include/libvarnish.h
===================================================================
--- branches/2.0/varnish-cache/include/libvarnish.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/include/libvarnish.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -60,8 +60,10 @@
 void TCP_blocking(int sock);
 void TCP_nonblocking(int sock);
 #ifdef SOL_SOCKET
-void TCP_name(const struct sockaddr *addr, unsigned l, char *abuf, unsigned alen, char *pbuf, unsigned plen);
-int TCP_connect(int s, const struct sockaddr *name, socklen_t namelen, int msec);
+void TCP_name(const struct sockaddr *addr, unsigned l, char *abuf,
+    unsigned alen, char *pbuf, unsigned plen);
+int TCP_connect(int s, const struct sockaddr *name, socklen_t namelen,
+    int msec);
 void TCP_close(int *s);
 #endif
 
@@ -88,7 +90,8 @@
  *	handle gracefully, such as malloc failure.
  */
 
-typedef void lbv_assert_f(const char *, const char *, int, const char *, int, int);
+typedef void lbv_assert_f(const char *, const char *, int, const char *,
+    int, int);
 
 extern lbv_assert_f *lbv_assert;
 
@@ -96,14 +99,14 @@
 #define assert(e)	((void)(e))
 #else /* WITH_ASSERTS */
 #define assert(e)							\
-do { 									\
+do {									\
 	if (!(e))							\
 		lbv_assert(__func__, __FILE__, __LINE__, #e, errno, 0);	\
 } while (0)
 #endif
 
 #define xxxassert(e)							\
-do { 									\
+do {									\
 	if (!(e))							\
 		lbv_assert(__func__, __FILE__, __LINE__, #e, errno, 1); \
 } while (0)
@@ -114,7 +117,7 @@
 #define XXXAZ(foo)	do { xxxassert((foo) == 0); } while (0)
 #define XXXAN(foo)	do { xxxassert((foo) != 0); } while (0)
 #define diagnostic(foo)	assert(foo)
-#define WRONG(expl) 							\
+#define WRONG(expl)							\
 do {									\
 	lbv_assert(__func__, __FILE__, __LINE__, expl, errno, 3);	\
 } while (0)

Modified: branches/2.0/varnish-cache/include/stat_field.h
===================================================================
--- branches/2.0/varnish-cache/include/stat_field.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/include/stat_field.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -37,7 +37,8 @@
 MAC_STAT(cache_miss,		uint64_t, 'a', "Cache misses")
 
 MAC_STAT(backend_conn,		uint64_t, 'a', "Backend connections success")
-MAC_STAT(backend_unhealthy,	uint64_t, 'a', "Backend connections not attempted")
+MAC_STAT(backend_unhealthy,	uint64_t, 'a',
+    "Backend connections not attempted")
 MAC_STAT(backend_busy,		uint64_t, 'a', "Backend connections too many")
 MAC_STAT(backend_fail,		uint64_t, 'a', "Backend connections failures")
 MAC_STAT(backend_reuse,		uint64_t, 'a', "Backend connections reuses")

Modified: branches/2.0/varnish-cache/include/varnishapi.h
===================================================================
--- branches/2.0/varnish-cache/include/varnishapi.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/include/varnishapi.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -41,11 +41,13 @@
 int base64_decode(char *d, unsigned dlen, const char *s);
 
 /* shmlog.c */
-typedef int vsl_handler(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned spec, const char *ptr);
+typedef int vsl_handler(void *priv, enum shmlogtag tag, unsigned fd,
+    unsigned len, unsigned spec, const char *ptr);
 #define VSL_S_CLIENT	(1 << 0)
 #define VSL_S_BACKEND	(1 << 1)
 #define VSL_ARGS	"bCcdI:i:k:r:s:X:x:"
-#define VSL_USAGE	"[-bCcd] [-i tag] [-I regexp] [-k keep] [-r file] [-s skip] [-X regexp] [-x tag]"
+#define VSL_USAGE	"[-bCcd] [-i tag] [-I regexp] [-k keep]" \
+			" [-r file] [-s skip] [-X regexp] [-x tag]"
 vsl_handler VSL_H_Print;
 struct VSL_data;
 struct VSL_data *VSL_New(void);
@@ -60,6 +62,6 @@
 extern const char *VSL_tags[256];
 
 /* instance.c */
-int		 varnish_instance(const char *n_arg, char *name, size_t namelen, char *dir, size_t dirlen);
-
+int varnish_instance(const char *n_arg, char *name, size_t namelen, char *dir,
+    size_t dirlen);
 #endif

Modified: branches/2.0/varnish-cache/include/vcl.h
===================================================================
--- branches/2.0/varnish-cache/include/vcl.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/include/vcl.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -23,7 +23,7 @@
         unsigned        nref;
         unsigned        busy;
         unsigned        discard;
-        
+
 	unsigned	nsrc;
 	const char	**srcname;
 	const char	**srcbody;

Modified: branches/2.0/varnish-cache/include/vcl_returns.h
===================================================================
--- branches/2.0/varnish-cache/include/vcl_returns.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/include/vcl_returns.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -34,18 +34,30 @@
 #endif
 
 #ifdef VCL_MET_MAC
-VCL_MET_MAC(recv,RECV,(VCL_RET_ERROR|VCL_RET_PASS|VCL_RET_PIPE|VCL_RET_LOOKUP))
-VCL_MET_MAC(pipe,PIPE,(VCL_RET_ERROR|VCL_RET_PIPE))
-VCL_MET_MAC(pass,PASS,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS))
-VCL_MET_MAC(hash,HASH,(VCL_RET_HASH))
-VCL_MET_MAC(miss,MISS,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS|VCL_RET_FETCH))
-VCL_MET_MAC(hit,HIT,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS|VCL_RET_DELIVER))
-VCL_MET_MAC(fetch,FETCH,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS|VCL_RET_DELIVER))
-VCL_MET_MAC(deliver,DELIVER,(VCL_RET_RESTART|VCL_RET_DELIVER))
-VCL_MET_MAC(prefetch,PREFETCH,(VCL_RET_FETCH|VCL_RET_PASS))
-VCL_MET_MAC(timeout,TIMEOUT,(VCL_RET_FETCH|VCL_RET_DISCARD))
-VCL_MET_MAC(discard,DISCARD,(VCL_RET_DISCARD|VCL_RET_KEEP))
-VCL_MET_MAC(error,ERROR,(VCL_RET_DELIVER))
+VCL_MET_MAC(recv,RECV,(
+    VCL_RET_ERROR|VCL_RET_PASS|VCL_RET_PIPE|VCL_RET_LOOKUP))
+VCL_MET_MAC(pipe,PIPE,(
+    VCL_RET_ERROR|VCL_RET_PIPE))
+VCL_MET_MAC(pass,PASS,(
+    VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS))
+VCL_MET_MAC(hash,HASH,(
+    VCL_RET_HASH))
+VCL_MET_MAC(miss,MISS,(
+    VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS|VCL_RET_FETCH))
+VCL_MET_MAC(hit,HIT,(
+    VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS|VCL_RET_DELIVER))
+VCL_MET_MAC(fetch,FETCH,(
+    VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS|VCL_RET_DELIVER))
+VCL_MET_MAC(deliver,DELIVER,(
+    VCL_RET_RESTART|VCL_RET_DELIVER))
+VCL_MET_MAC(prefetch,PREFETCH,(
+    VCL_RET_FETCH|VCL_RET_PASS))
+VCL_MET_MAC(timeout,TIMEOUT,(
+    VCL_RET_FETCH|VCL_RET_DISCARD))
+VCL_MET_MAC(discard,DISCARD,(
+    VCL_RET_DISCARD|VCL_RET_KEEP))
+VCL_MET_MAC(error,ERROR,(
+    VCL_RET_DELIVER))
 #else
 #define VCL_MET_RECV	(1 << 0)
 #define VCL_MET_PIPE	(1 << 1)

Modified: branches/2.0/varnish-cache/include/vct.h
===================================================================
--- branches/2.0/varnish-cache/include/vct.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/include/vct.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -31,10 +31,10 @@
 
 /* from libvarnish/vct.c */
 
-#define VCT_SP    	(1<<0)
-#define VCT_CRLF  	(1<<1)
-#define VCT_LWS   	(VCT_CRLF | VCT_SP)
-#define VCT_CTL   	(1<<2)
+#define VCT_SP		(1<<0)
+#define VCT_CRLF	(1<<1)
+#define VCT_LWS		(VCT_CRLF | VCT_SP)
+#define VCT_CTL		(1<<2)
 #define VCT_ALPHA	(1<<3)
 #define VCT_SEPARATOR	(1<<4)
 #define VCT_DIGIT	(1<<5)
@@ -45,8 +45,8 @@
 static inline int
 vct_is(unsigned char x, unsigned char y)
 {
- 
-        return (vct_typtab[x] & (y));
+
+	return (vct_typtab[x] & (y));
 }
 
 #define vct_issp(x) vct_is(x, VCT_SP)

Modified: branches/2.0/varnish-cache/include/vev.h
===================================================================
--- branches/2.0/varnish-cache/include/vev.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/include/vev.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -40,7 +40,7 @@
 
 struct vev {
 	unsigned		magic;
-#define VEV_MAGIC		0x46bbd419 
+#define VEV_MAGIC		0x46bbd419
 
 	/* pub */
 	const char		*name;

Modified: branches/2.0/varnish-cache/include/vqueue.h
===================================================================
--- branches/2.0/varnish-cache/include/vqueue.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/include/vqueue.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -220,7 +220,8 @@
 } while (0)
 
 #define	VSTAILQ_INSERT_AFTER(head, tqelm, elm, field) do {		\
-	if ((VSTAILQ_NEXT((elm), field) = VSTAILQ_NEXT((tqelm), field)) == NULL)\
+	if ((VSTAILQ_NEXT((elm), field) =				\
+	    VSTAILQ_NEXT((tqelm), field)) == NULL)			\
 		(head)->vstqh_last = &VSTAILQ_NEXT((elm), field);	\
 	VSTAILQ_NEXT((tqelm), field) = (elm);				\
 } while (0)
@@ -241,7 +242,8 @@
 	(VSTAILQ_EMPTY((head)) ?					\
 		NULL :							\
 	        ((struct type *)(void *)				\
-		((char *)((head)->vstqh_last) - __offsetof(struct type, field))))
+		((char *)((head)->vstqh_last) - 			\
+		     __offsetof(struct type, field))))
 
 #define	VSTAILQ_NEXT(elm, field)	((elm)->field.vstqe_next)
 
@@ -320,7 +322,8 @@
 
 #define	VLIST_INSERT_HEAD(head, elm, field) do {			\
 	if ((VLIST_NEXT((elm), field) = VLIST_FIRST((head))) != NULL)	\
-		VLIST_FIRST((head))->field.vle_prev = &VLIST_NEXT((elm), field);\
+		VLIST_FIRST((head))->field.vle_prev =			\
+		    &VLIST_NEXT((elm), field);				\
 	VLIST_FIRST((head)) = (elm);					\
 	(elm)->field.vle_prev = &VLIST_FIRST((head));			\
 } while (0)
@@ -329,7 +332,7 @@
 
 #define	VLIST_REMOVE(elm, field) do {					\
 	if (VLIST_NEXT((elm), field) != NULL)				\
-		VLIST_NEXT((elm), field)->field.vle_prev = 		\
+		VLIST_NEXT((elm), field)->field.vle_prev =		\
 		    (elm)->field.vle_prev;				\
 	*(elm)->field.vle_prev = VLIST_NEXT((elm), field);		\
 } while (0)
@@ -394,8 +397,9 @@
 } while (0)
 
 #define	VTAILQ_INSERT_AFTER(head, listelm, elm, field) do {		\
-	if ((VTAILQ_NEXT((elm), field) = VTAILQ_NEXT((listelm), field)) != NULL)\
-		VTAILQ_NEXT((elm), field)->field.vtqe_prev = 		\
+	if ((VTAILQ_NEXT((elm), field) =				\
+	    VTAILQ_NEXT((listelm), field)) != NULL)			\
+		VTAILQ_NEXT((elm), field)->field.vtqe_prev =		\
 		    &VTAILQ_NEXT((elm), field);				\
 	else {								\
 		(head)->vtqh_last = &VTAILQ_NEXT((elm), field);		\
@@ -438,7 +442,7 @@
 
 #define	VTAILQ_REMOVE(head, elm, field) do {				\
 	if ((VTAILQ_NEXT((elm), field)) != NULL)			\
-		VTAILQ_NEXT((elm), field)->field.vtqe_prev = 		\
+		VTAILQ_NEXT((elm), field)->field.vtqe_prev =		\
 		    (elm)->field.vtqe_prev;				\
 	else {								\
 		(head)->vtqh_last = (elm)->field.vtqe_prev;		\

Modified: branches/2.0/varnish-cache/include/vrt.h
===================================================================
--- branches/2.0/varnish-cache/include/vrt.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/include/vrt.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -70,7 +70,7 @@
 
 	double				connect_timeout;
 	unsigned			max_connections;
-	struct vrt_backend_probe 	probe;
+	struct vrt_backend_probe	probe;
 };
 
 /*
@@ -92,9 +92,9 @@
 };
 
 struct vrt_dir_random {
-	const char 				*name;
+	const char				*name;
 	unsigned				retries;
-	unsigned 				nmember;
+	unsigned				nmember;
 	const struct vrt_dir_random_entry	*members;
 };
 
@@ -108,7 +108,7 @@
 
 struct vrt_dir_round_robin {
 	const char				*name;
-	unsigned 				nmember;
+	unsigned				nmember;
 	const struct vrt_dir_round_robin_entry	*members;
 };
 
@@ -137,7 +137,8 @@
 void VRT_re_fini(void *);
 int VRT_re_match(const char *, void *re);
 int VRT_re_test(struct vsb *, const char *, int sub);
-const char *VRT_regsub(const struct sess *sp, int all, const char *, void *, const char *);
+const char *VRT_regsub(const struct sess *sp, int all, const char *,
+    void *, const char *);
 
 void VRT_panic(struct sess *sp,  const char *, ...);
 void VRT_purge(const char *, int hash);
@@ -149,7 +150,8 @@
 
 enum gethdr_e { HDR_REQ, HDR_RESP, HDR_OBJ, HDR_BEREQ };
 char *VRT_GetHdr(const struct sess *, enum gethdr_e where, const char *);
-void VRT_SetHdr(const struct sess *, enum gethdr_e where, const char *, const char *, ...);
+void VRT_SetHdr(const struct sess *, enum gethdr_e where, const char *,
+    const char *, ...);
 void VRT_handling(struct sess *sp, unsigned hand);
 
 /* Simple stuff */
@@ -163,9 +165,12 @@
 void VRT_synth_page(struct sess *sp, unsigned flags, const char *, ...);
 
 /* Backend related */
-void VRT_init_dir_simple(struct cli *, struct director **, const struct vrt_dir_simple *);
-void VRT_init_dir_random(struct cli *, struct director **, const struct vrt_dir_random *);
-void VRT_init_dir_round_robin(struct cli *, struct director **, const struct vrt_dir_round_robin *);
+void VRT_init_dir_simple(struct cli *, struct director **,
+    const struct vrt_dir_simple *);
+void VRT_init_dir_random(struct cli *, struct director **,
+    const struct vrt_dir_random *);
+void VRT_init_dir_round_robin(struct cli *, struct director **,
+    const struct vrt_dir_round_robin *);
 void VRT_fini_dir(struct cli *, struct director *);
 
 char *VRT_IP_string(const struct sess *sp, const struct sockaddr *sa);

Modified: branches/2.0/varnish-cache/include/vsb.h
===================================================================
--- branches/2.0/varnish-cache/include/vsb.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/include/vsb.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -63,9 +63,11 @@
 int		 vsb_bcpy(struct vsb *, const void *, size_t);
 int		 vsb_cat(struct vsb *, const char *);
 int		 vsb_cpy(struct vsb *, const char *);
-int		 vsb_printf(struct vsb *, const char *, ...) /* __printflike(2, 3) */;
+int		 vsb_printf(struct vsb *, const char *, ...)
+    /* __printflike(2, 3) */;
 #ifdef va_start
-int		 vsb_vprintf(struct vsb *, const char *, va_list) /* __printflike(2, 0) */;
+int		 vsb_vprintf(struct vsb *, const char *, va_list)
+    /* __printflike(2, 0) */;
 #endif
 int		 vsb_putc(struct vsb *, int);
 int		 vsb_trim(struct vsb *);

Modified: branches/2.0/varnish-cache/lib/libvarnish/assert.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvarnish/assert.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvarnish/assert.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -41,7 +41,8 @@
 #include "libvarnish.h"
 
 static void
-lbv_assert_default(const char *func, const char *file, int line, const char *cond, int err, int xxx)
+lbv_assert_default(const char *func, const char *file, int line,
+    const char *cond, int err, int xxx)
 {
 
 	if (xxx) {

Modified: branches/2.0/varnish-cache/lib/libvarnish/binary_heap.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvarnish/binary_heap.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvarnish/binary_heap.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -225,11 +225,9 @@
 
 #ifdef TEST_DRIVER
 /* Test driver -------------------------------------------------------*/
-
 #include <stdio.h>
 
 #if 0
-
 static int
 cmp(void *priv, void *a, void *b)
 {
@@ -295,11 +293,9 @@
 			dump(bh, "Delete", u);
 	}
 	printf("Deletes done\n");
-
 	return (0);
 }
 #else
-
 struct foo {
 	unsigned	idx;
 	unsigned	key;
@@ -310,7 +306,6 @@
 
 struct foo ff[N];
 
-
 static int
 cmp(void *priv, void *a, void *b)
 {
@@ -359,12 +354,12 @@
 	struct binheap *bh;
 	unsigned u, v;
 
-#if 0
-	srandomdev();
-	u = random();
-	printf("Seed %u\n", u);
-	srandom(u);
-#endif
+	if (0) {
+		srandomdev();
+		u = random();
+		printf("Seed %u\n", u);
+		srandom(u);
+	}
 	bh = binheap_new(NULL, cmp, update);
 	for (u = 0; u < M; u++) {
 		v = random() % N;

Modified: branches/2.0/varnish-cache/lib/libvarnish/cli_common.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvarnish/cli_common.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvarnish/cli_common.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -132,7 +132,8 @@
 {
 
 	cli_result(cli, CLIS_PARAM);
-	cli_out(cli, "Parameter error, use \"help [command]\" for more info.\n");
+	cli_out(cli,
+	    "Parameter error, use \"help [command]\" for more info.\n");
 }
 
 int

Modified: branches/2.0/varnish-cache/lib/libvarnish/num.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvarnish/num.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvarnish/num.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -125,45 +125,45 @@
 	uintmax_t val;
 	const char *err;
 } test_cases[] = {
-	{ "1",			(uintmax_t)0,		(uintmax_t)1 },
-	{ "1B",			(uintmax_t)0,		(uintmax_t)1<<0 },
-	{ "1 B",		(uintmax_t)0,		(uintmax_t)1<<0 },
-	{ "1.3B",		(uintmax_t)0,		(uintmax_t)1 },
-	{ "1.7B",		(uintmax_t)0,		(uintmax_t)2 },
+	{ "1",			(uintmax_t)0,	(uintmax_t)1 },
+	{ "1B",			(uintmax_t)0,	(uintmax_t)1<<0 },
+	{ "1 B",		(uintmax_t)0,	(uintmax_t)1<<0 },
+	{ "1.3B",		(uintmax_t)0,	(uintmax_t)1 },
+	{ "1.7B",		(uintmax_t)0,	(uintmax_t)2 },
 
-	{ "1024",		(uintmax_t)0,		(uintmax_t)1024 },
-	{ "1k",			(uintmax_t)0,		(uintmax_t)1<<10 },
-	{ "1kB",		(uintmax_t)0,		(uintmax_t)1<<10 },
-	{ "1.3kB",		(uintmax_t)0,		(uintmax_t)1331 },
-	{ "1.7kB",		(uintmax_t)0,		(uintmax_t)1741 },
+	{ "1024",		(uintmax_t)0,	(uintmax_t)1024 },
+	{ "1k",			(uintmax_t)0,	(uintmax_t)1<<10 },
+	{ "1kB",		(uintmax_t)0,	(uintmax_t)1<<10 },
+	{ "1.3kB",		(uintmax_t)0,	(uintmax_t)1331 },
+	{ "1.7kB",		(uintmax_t)0,	(uintmax_t)1741 },
 
-	{ "1048576",		(uintmax_t)0,		(uintmax_t)1048576 },
-	{ "1M",			(uintmax_t)0,		(uintmax_t)1<<20 },
-	{ "1MB",		(uintmax_t)0,		(uintmax_t)1<<20 },
-	{ "1.3MB",		(uintmax_t)0,		(uintmax_t)1363149 },
-	{ "1.7MB",		(uintmax_t)0,		(uintmax_t)1782579 },
+	{ "1048576",		(uintmax_t)0,	(uintmax_t)1048576 },
+	{ "1M",			(uintmax_t)0,	(uintmax_t)1<<20 },
+	{ "1MB",		(uintmax_t)0,	(uintmax_t)1<<20 },
+	{ "1.3MB",		(uintmax_t)0,	(uintmax_t)1363149 },
+	{ "1.7MB",		(uintmax_t)0,	(uintmax_t)1782579 },
 
-	{ "1073741824",		(uintmax_t)0,		(uintmax_t)1073741824 },
-	{ "1G",			(uintmax_t)0,		(uintmax_t)1<<30 },
-	{ "1GB",		(uintmax_t)0,		(uintmax_t)1<<30 },
-	{ "1.3GB",		(uintmax_t)0,		(uintmax_t)1395864371 },
-	{ "1.7GB",		(uintmax_t)0,		(uintmax_t)1825361101 },
+	{ "1073741824",		(uintmax_t)0,	(uintmax_t)1073741824 },
+	{ "1G",			(uintmax_t)0,	(uintmax_t)1<<30 },
+	{ "1GB",		(uintmax_t)0,	(uintmax_t)1<<30 },
+	{ "1.3GB",		(uintmax_t)0,	(uintmax_t)1395864371 },
+	{ "1.7GB",		(uintmax_t)0,	(uintmax_t)1825361101 },
 
-	{ "1099511627776",	(uintmax_t)0,		(uintmax_t)1099511627776ULL },
-	{ "1T",			(uintmax_t)0,		(uintmax_t)1<<40 },
-	{ "1TB",		(uintmax_t)0,		(uintmax_t)1<<40 },
-	{ "1.3TB",		(uintmax_t)0,		(uintmax_t)1429365116109ULL },
-	{ "1.7TB",		(uintmax_t)0,		(uintmax_t)1869169767219ULL },
+	{ "1099511627776",	(uintmax_t)0,	(uintmax_t)1099511627776ULL },
+	{ "1T",			(uintmax_t)0,	(uintmax_t)1<<40 },
+	{ "1TB",		(uintmax_t)0,	(uintmax_t)1<<40 },
+	{ "1.3TB",		(uintmax_t)0,	(uintmax_t)1429365116109ULL },
+	{ "1.7TB",		(uintmax_t)0,	(uintmax_t)1869169767219ULL },
 
 	{ "1%",			(uintmax_t)1024,	(uintmax_t)10 },
 	{ "2%",			(uintmax_t)1024,	(uintmax_t)20 },
 	{ "3%",			(uintmax_t)1024,	(uintmax_t)31 },
 
 	/* Check the error checks */
-	{ "",			0,			0,				err_miss_num },
-	{ "m",			0,			0,				err_invalid_num },
-	{ "4%",			0,			0,				err_abs_req },
-	{ "3*",			0,			0,				err_invalid_suff },
+	{ "",			0,	0,	err_miss_num },
+	{ "m",			0,	0,	err_invalid_num },
+	{ "4%",			0,	0,	err_abs_req },
+	{ "3*",			0,	0,	err_invalid_suff },
 
 	/* TODO: add more */
 

Modified: branches/2.0/varnish-cache/lib/libvarnish/tcp.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvarnish/tcp.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvarnish/tcp.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -58,7 +58,8 @@
 /*--------------------------------------------------------------------*/
 
 void
-TCP_name(const struct sockaddr *addr, unsigned l, char *abuf, unsigned alen, char *pbuf, unsigned plen)
+TCP_name(const struct sockaddr *addr, unsigned l, char *abuf, unsigned alen,
+    char *pbuf, unsigned plen)
 {
 	int i;
 
@@ -119,7 +120,7 @@
 
 /*--------------------------------------------------------------------
  * Functions for controlling NONBLOCK mode.
- * 
+ *
  * We use FIONBIO because it is cheaper than fcntl(2), which requires
  * us to do two syscalls, one to get and one to set, the latter of
  * which mucks about a bit before it ends up calling ioctl(FIONBIO),

Modified: branches/2.0/varnish-cache/lib/libvarnish/vct.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvarnish/vct.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvarnish/vct.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -70,12 +70,12 @@
 	[0x1d]	=	VCT_CTL,
 	[0x1e]	=	VCT_CTL,
 	[0x1f]	=	VCT_CTL,
-        [0x20]  =	VCT_SP | VCT_SEPARATOR,
-        [0x22]  =	VCT_SEPARATOR,
-        [0x28]  =	VCT_SEPARATOR,
-        [0x29]  =	VCT_SEPARATOR,
-        [0x2c]  =	VCT_SEPARATOR,
-        [0x2f]  =	VCT_SEPARATOR,
+	[0x20]  =	VCT_SP | VCT_SEPARATOR,
+	[0x22]  =	VCT_SEPARATOR,
+	[0x28]  =	VCT_SEPARATOR,
+	[0x29]  =	VCT_SEPARATOR,
+	[0x2c]  =	VCT_SEPARATOR,
+	[0x2f]  =	VCT_SEPARATOR,
 	[0x30]	=	VCT_DIGIT | VCT_HEX,
 	[0x31]	=	VCT_DIGIT | VCT_HEX,
 	[0x32]	=	VCT_DIGIT | VCT_HEX,
@@ -86,13 +86,13 @@
 	[0x37]	=	VCT_DIGIT | VCT_HEX,
 	[0x38]	=	VCT_DIGIT | VCT_HEX,
 	[0x39]	=	VCT_DIGIT | VCT_HEX,
-        [0x3a]  =	VCT_SEPARATOR,
-        [0x3b]  =	VCT_SEPARATOR,
-        [0x3c]  =	VCT_SEPARATOR,
-        [0x3d]  =	VCT_SEPARATOR,
-        [0x3e]  =	VCT_SEPARATOR,
-        [0x3f]  =	VCT_SEPARATOR,
-        [0x40]  =	VCT_SEPARATOR,
+	[0x3a]  =	VCT_SEPARATOR,
+	[0x3b]  =	VCT_SEPARATOR,
+	[0x3c]  =	VCT_SEPARATOR,
+	[0x3d]  =	VCT_SEPARATOR,
+	[0x3e]  =	VCT_SEPARATOR,
+	[0x3f]  =	VCT_SEPARATOR,
+	[0x40]  =	VCT_SEPARATOR,
 	[0x41]	=	VCT_UPALPHA | VCT_HEX,
 	[0x42]	=	VCT_UPALPHA | VCT_HEX,
 	[0x43]	=	VCT_UPALPHA | VCT_HEX,
@@ -119,9 +119,9 @@
 	[0x58]	=	VCT_UPALPHA,
 	[0x59]	=	VCT_UPALPHA,
 	[0x5a]	=	VCT_UPALPHA,
-        [0x5b]  =	VCT_SEPARATOR,
-        [0x5c]  =	VCT_SEPARATOR,
-        [0x5d]  =	VCT_SEPARATOR,
+	[0x5b]  =	VCT_SEPARATOR,
+	[0x5c]  =	VCT_SEPARATOR,
+	[0x5d]  =	VCT_SEPARATOR,
 	[0x61]	=	VCT_LOALPHA | VCT_HEX,
 	[0x62]	=	VCT_LOALPHA | VCT_HEX,
 	[0x63]	=	VCT_LOALPHA | VCT_HEX,
@@ -148,7 +148,7 @@
 	[0x78]	=	VCT_LOALPHA,
 	[0x79]	=	VCT_LOALPHA,
 	[0x7a]	=	VCT_LOALPHA,
-        [0x7b]  =	VCT_SEPARATOR,
-        [0x7d]  =	VCT_SEPARATOR,
+	[0x7b]  =	VCT_SEPARATOR,
+	[0x7d]  =	VCT_SEPARATOR,
 	[0x7f]	=	VCT_CTL,
 };

Modified: branches/2.0/varnish-cache/lib/libvarnish/version.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvarnish/version.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvarnish/version.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -43,5 +43,6 @@
 {
 	fprintf(stderr, "%s (%s-%s)\n", progname,
 	    PACKAGE_TARNAME, PACKAGE_VERSION);
-	fprintf(stderr, "Copyright (c) 2006-2008 Linpro AS / Verdens Gang AS\n");
+	fprintf(stderr,
+	    "Copyright (c) 2006-2008 Linpro AS / Verdens Gang AS\n");
 }

Modified: branches/2.0/varnish-cache/lib/libvarnish/vlu.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvarnish/vlu.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvarnish/vlu.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -63,7 +63,7 @@
 		if (l->buf == NULL) {
 			FREE_OBJ(l);
 			l = NULL;
-		} 
+		}
 	}
 	return (l);
 }

Modified: branches/2.0/varnish-cache/lib/libvarnish/vss.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvarnish/vss.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvarnish/vss.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -283,7 +283,7 @@
 		if (retval >= 0)
 			break;
 	}
-	for (n = 0; n < nvaddr; n++) 
+	for (n = 0; n < nvaddr; n++)
 		free(vaddr[n]);
 	free(vaddr);
 	free(addr);

Modified: branches/2.0/varnish-cache/lib/libvarnishapi/instance.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvarnishapi/instance.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvarnishapi/instance.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -39,8 +39,7 @@
 
 int
 varnish_instance(const char *n_arg,
-    char *name, size_t namelen,
-    char *dir, size_t dirlen)
+    char *name, size_t namelen, char *dir, size_t dirlen)
 {
 	size_t len;
 

Modified: branches/2.0/varnish-cache/lib/libvarnishapi/shmlog.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvarnishapi/shmlog.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvarnishapi/shmlog.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -362,7 +362,8 @@
 /*--------------------------------------------------------------------*/
 
 int
-VSL_H_Print(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned spec, const char *ptr)
+VSL_H_Print(void *priv, enum shmlogtag tag, unsigned fd, unsigned len,
+    unsigned spec, const char *ptr)
 {
 	FILE *fo = priv;
 	int type;

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_acl.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_acl.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_acl.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -52,7 +52,7 @@
 struct acl_e {
 	VTAILQ_ENTRY(acl_e)	list;
 	unsigned char		data[VRT_ACL_MAXADDR + 1];
-	unsigned 		mask;
+	unsigned		mask;
 	unsigned		not;
 	unsigned		para;
 	struct token		*t_addr;
@@ -74,9 +74,9 @@
 	if (ae2->mask < m)
 		m = ae2->mask;
 	for (; m >= 8; m -= 8) {
-		if (*p1 < *p2)	
+		if (*p1 < *p2)
 			return (-1);
-		if (*p1 > *p2)	
+		if (*p1 > *p2)
 			return (1);
 		p1++;
 		p2++;
@@ -135,7 +135,8 @@
 }
 
 static void
-vcc_acl_emit_entry(struct tokenlist *tl, const struct acl_e *ae, int l, const unsigned char *u, int fam)
+vcc_acl_emit_entry(struct tokenlist *tl, const struct acl_e *ae, int l,
+    const unsigned char *u, int fam)
 {
 	struct acl_e *ae2;
 
@@ -186,7 +187,7 @@
 			Fh(tl, 1, "/* Ignored ACL entry: %s%s",
 			    ae->para ? "\"(\" " : "", ae->not ? "\"!\" " : "");
 			EncToken(tl->fh, ae->t_addr);
-			if (ae->t_mask) 
+			if (ae->t_mask)
 				Fh(tl, 0, "/%u", ae->mask);
 			Fh(tl, 0, "%s\n", ae->para ? " \")\"" : "");
 			Fh(tl, 1, " * getaddrinfo:  %s */\n",
@@ -322,7 +323,8 @@
 }
 
 static void
-vcc_acl_bot(const struct tokenlist *tl, const char *acln, int silent, const char *pfx)
+vcc_acl_bot(const struct tokenlist *tl, const char *acln, int silent,
+    const char *pfx)
 {
 	struct acl_e *ae;
 	int depth, l, m, i;
@@ -346,7 +348,7 @@
 		Fh(tl, 0, "\tunsigned int fam;\n");
 	else
 		assert(0 == __LINE__);
-		
+
 	Fh(tl, 0, "\n");
 	Fh(tl, 0, "\ta = p;\n");
 	Fh(tl, 0, "\tVRT_memmove(&fam, a + %d, sizeof fam);\n",
@@ -421,7 +423,7 @@
 		Fh(tl, 0, "\t%*sreturn (%d);\n", -i, "", ae->not ? 0 : 1);
 	}
 
-	for (; 0 <= depth; depth--) 
+	for (; 0 <= depth; depth--)
 		Fh(tl, 0, "\t%*.*s}\n", depth, depth, "");
 	if (!silent)
 		Fh(tl, 0, "\tVRT_acl_log(sp, \"NO_MATCH %s\");\n", acln);
@@ -439,7 +441,8 @@
 		vcc_NextToken(tl);
 		ExpectErr(tl, ID);
 		vcc_AddRef(tl, tl->t, R_ACL);
-		Fb(tl, 1, "match_acl_named_%.*s(sp, %s)\n", PF(tl->t), vp->rname);
+		Fb(tl, 1, "match_acl_named_%.*s(sp, %s)\n",
+		    PF(tl->t), vp->rname);
 		vcc_NextToken(tl);
 		break;
 	case T_EQ:

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_action.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_action.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_action.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -42,13 +42,13 @@
 
 /*--------------------------------------------------------------------*/
 
-#define VCL_RET_MAC(l,u,b,i) 				\
+#define VCL_RET_MAC(l,u,b,i)				\
 static void						\
 parse_##l(struct tokenlist *tl)				\
 {							\
 							\
-	Fb(tl, 1, "VRT_done(sp, VCL_RET_%s);\n", #u); 	\
-	vcc_ProcAction(tl->curproc, i, tl->t); 		\
+	Fb(tl, 1, "VRT_done(sp, VCL_RET_%s);\n", #u);	\
+	vcc_ProcAction(tl->curproc, i, tl->t);		\
 	vcc_NextToken(tl);				\
 }
 
@@ -61,7 +61,7 @@
 parse_restart_real(struct tokenlist *tl)
 {
 	struct token *t1;
-	
+
 	t1 = VTAILQ_NEXT(tl->t, list);
 	if (t1->tok == ID && vcc_IdIs(t1, "rollback")) {
 		Fb(tl, 1, "VRT_Rollback(sp);\n");
@@ -201,7 +201,8 @@
 				Fb(tl, 0, "%u", vcc_UintVal(tl));
 				vcc_NextToken(tl);
 			} else {
-				vsb_printf(tl->sb, "Cannot assign this variable type.\n");
+				vsb_printf(tl->sb,
+				    "Cannot assign this variable type.\n");
 				vcc_ErrWhere(tl, vt);
 				return;
 			}
@@ -269,7 +270,7 @@
 			vcc_ExpectedStringval(tl);
 			return;
 		}
-		do 
+		do
 			Fb(tl, 0, ", ");
 		while (vcc_StringVal(tl));
 		if (tl->t->tok != ';') {
@@ -338,17 +339,17 @@
 {
 
 	vcc_NextToken(tl);
-	
+
 	Fb(tl, 1, "VRT_purge(");
-	
+
 	Expect(tl, '(');
 	vcc_NextToken(tl);
-	
+
 	if (!vcc_StringVal(tl)) {
 		vcc_ExpectedStringval(tl);
 		return;
 	}
-	
+
 	Expect(tl, ')');
 	vcc_NextToken(tl);
 	Fb(tl, 0, ", 0);\n");
@@ -362,17 +363,17 @@
 {
 
 	vcc_NextToken(tl);
-	
+
 	Fb(tl, 1, "VRT_purge(");
-	
+
 	Expect(tl, '(');
 	vcc_NextToken(tl);
-	
+
 	if (!vcc_StringVal(tl)) {
 		vcc_ExpectedStringval(tl);
 		return;
 	}
-	
+
 	Expect(tl, ')');
 	vcc_NextToken(tl);
 	Fb(tl, 0, ", 1);\n");
@@ -392,13 +393,13 @@
 parse_panic(struct tokenlist *tl)
 {
 	vcc_NextToken(tl);
-	
+
 	Fb(tl, 1, "VRT_panic(sp, ");
 	if (!vcc_StringVal(tl)) {
 		vcc_ExpectedStringval(tl);
 		return;
 	}
-	do 
+	do
 		Fb(tl, 0, ", ");
 	while (vcc_StringVal(tl));
 	Fb(tl, 0, " vrt_magic_string_end);\n");
@@ -410,13 +411,13 @@
 parse_synthetic(struct tokenlist *tl)
 {
 	vcc_NextToken(tl);
-	
+
 	Fb(tl, 1, "VRT_synth_page(sp, 0, ");
 	if (!vcc_StringVal(tl)) {
 		vcc_ExpectedStringval(tl);
 		return;
 	}
-	do 
+	do
 		Fb(tl, 0, ", ");
 	while (vcc_StringVal(tl));
 	Fb(tl, 0, " vrt_magic_string_end);\n");
@@ -432,21 +433,21 @@
 } action_table[] = {
 	{ "restart",	parse_restart_real },
 #define VCL_RET_MAC(l, u, b, i) { #l, parse_##l },
-#define VCL_RET_MAC_E(l, u, b, i) VCL_RET_MAC(l, u, b, i) 
+#define VCL_RET_MAC_E(l, u, b, i) VCL_RET_MAC(l, u, b, i)
 #include "vcl_returns.h"
 #undef VCL_RET_MAC
 #undef VCL_RET_MAC_E
 
 	/* Keep list sorted from here */
-	{ "call", 		parse_call },
+	{ "call",		parse_call },
 	{ "esi",		parse_esi },
 	{ "panic",		parse_panic },
 	{ "purge_hash",		parse_purge_hash },
 	{ "purge_url",		parse_purge_url },
-	{ "remove", 		parse_unset }, /* backward compatibility */
-	{ "set", 		parse_set },
-	{ "synthetic", 		parse_synthetic },
-	{ "unset", 		parse_unset },
+	{ "remove",		parse_unset }, /* backward compatibility */
+	{ "set",		parse_set },
+	{ "synthetic",		parse_synthetic },
+	{ "unset",		parse_unset },
 	{ NULL,			NULL }
 };
 

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_backend.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_backend.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_backend.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -37,7 +37,7 @@
  * A VCL backend therefore has an implicit director of type "simple" created
  * by the compiler, but not visible in VCL.
  *
- * A VCL backend is a "named host", these can be referenced by name form
+ * A VCL backend is a "named host", these can be referenced by name from
  * VCL directors, but not from VCL backends.
  *
  * The reason for this quasimadness is that we want to collect statistics
@@ -90,13 +90,14 @@
 }
 
 /*--------------------------------------------------------------------
- * Struct sockaddr is not really designed to be a compile time 
+ * Struct sockaddr is not really designed to be a compile time
  * initialized data structure, so we encode it as a byte-string
  * and put it in an official sockaddr when we load the VCL.
  */
 
 static void
-Emit_Sockaddr(struct tokenlist *tl, const struct token *t_host, const char *port)
+Emit_Sockaddr(struct tokenlist *tl, const struct token *t_host,
+    const char *port)
 {
 	struct addrinfo *res, *res0, hint;
 	int n4, n6, len, error, retval;
@@ -118,7 +119,7 @@
 		if (res->ai_family == PF_INET) {
 			if (n4++ == 0)
 				emit = "ipv4_sockaddr";
-			else 
+			else
 				multiple = "IPv4";
 		} else if (res->ai_family == PF_INET6) {
 			if (n6++ == 0)
@@ -155,12 +156,12 @@
 		Fh(tl, 0, "    %3u, /* Length */\n",  res->ai_addrlen);
 		u = (void*)res->ai_addr;
 		for (len = 0; len < res->ai_addrlen; len++) {
-			if ((len % 8) == 0) 
+			if ((len % 8) == 0)
 				Fh(tl, 0, "   ");
 			Fh(tl, 0, " %3u", u[len]);
 			if (len + 1 < res->ai_addrlen)
 				Fh(tl, 0, ",");
-			if ((len % 8) == 7) 
+			if ((len % 8) == 7)
 				Fh(tl, 0, "\n");
 		}
 		Fh(tl, 0, "\n};\n");
@@ -188,7 +189,9 @@
  */
 
 static void
-vcc_EmitBeIdent(struct vsb *v, const struct token *name, const struct token *qual, int serial, const struct token *first, const struct token *last)
+vcc_EmitBeIdent(struct vsb *v, const struct token *name,
+    const struct token *qual, int serial, const struct token *first,
+    const struct token *last)
 {
 
 	AN(name);
@@ -276,7 +279,7 @@
 	vcc_NextToken(tl);
 
 	for (; fs->name != NULL; fs++) {
-		if (!vcc_IdIs(t_field, fs->name + 1)) 
+		if (!vcc_IdIs(t_field, fs->name + 1))
 			continue;
 		if (fs->found == NULL) {
 			fs->found = t_field;
@@ -315,7 +318,8 @@
  */
 
 static void
-vcc_ProbeRedef(struct tokenlist *tl, struct token **t_did, struct token *t_field)
+vcc_ProbeRedef(struct tokenlist *tl, struct token **t_did,
+    struct token *t_field)
 {
 	/* .url and .request are mutually exclusive */
 
@@ -446,25 +450,14 @@
 }
 
 /*--------------------------------------------------------------------
- * Parse and emit a backend host definition 
+ * Parse and emit a backend host definition
  *
- * The syntax is the following:
- *
- * backend_host_def:
- *	'{' be_elements '}'
- *
- * be_elements:
- *	be_element
- *	be_element be_elements
- *
- * be_element:
- *	'.' name '=' value ';'
- *
  * The struct vrt_backend is emitted to Fh().
  */
 
 static void
-vcc_ParseHostDef(struct tokenlist *tl, int *nbh, const struct token *name, const struct token *qual, int serial)
+vcc_ParseHostDef(struct tokenlist *tl, int *nbh, const struct token *name,
+    const struct token *qual, int serial)
 {
 	struct token *t_field;
 	struct token *t_first;
@@ -627,7 +620,8 @@
  */
 
 void
-vcc_ParseBackendHost(struct tokenlist *tl, int *nbh, const struct token *name, const struct token *qual, int serial)
+vcc_ParseBackendHost(struct tokenlist *tl, int *nbh, const struct token *name,
+    const struct token *qual, int serial)
 {
 	struct host *h;
 	struct token *t;
@@ -674,7 +668,8 @@
  */
 
 static void
-vcc_ParseSimpleDirector(struct tokenlist *tl, const struct token *t_first, struct token *t_dir)
+vcc_ParseSimpleDirector(struct tokenlist *tl, const struct token *t_first,
+    struct token *t_dir)
 {
 	struct host *h;
 
@@ -707,8 +702,8 @@
 	const char	*name;
 	parsedirector_f	*func;
 } dirlist[] = {
-	{ "random", 		vcc_ParseRandomDirector },
-	{ "round-robin", 	vcc_ParseRoundRobinDirector },
+	{ "random",		vcc_ParseRandomDirector },
+	{ "round-robin",	vcc_ParseRoundRobinDirector },
 	{ NULL,		NULL }
 };
 
@@ -738,7 +733,7 @@
 		t_policy = tl->t;
 		vcc_NextToken(tl);
 
-		for (dl = dirlist; dl->name != NULL; dl++) 
+		for (dl = dirlist; dl->name != NULL; dl++)
 			if (vcc_IdIs(t_policy, dl->name))
 				break;
 		if (dl->name == NULL) {

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_compile.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_compile.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_compile.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -704,6 +704,4 @@
 	vcc_default_vcl_b = default_vcl;
 	vcc_default_vcl_e = strchr(default_vcl, '\0');
 	assert(vcc_default_vcl_e != NULL);
-
-	vcl_init_tnames();
 }

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_compile.h
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_compile.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_compile.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -158,10 +158,12 @@
 
 /* vcc_backend.c */
 struct fld_spec;
-typedef void parsedirector_f(struct tokenlist *tl, const struct token *t_policy, const struct token *t_dir);
+typedef void parsedirector_f(struct tokenlist *tl,
+    const struct token *t_policy, const struct token *t_dir);
 
 void vcc_ParseDirector(struct tokenlist *tl);
-void vcc_ParseBackendHost(struct tokenlist *tl, int *nbr, const struct token *name, const struct token *qual, int serial);
+void vcc_ParseBackendHost(struct tokenlist *tl, int *nbr,
+    const struct token *name, const struct token *qual, int serial);
 struct fld_spec * vcc_FldSpec(struct tokenlist *tl, const char *first, ...);
 void vcc_ResetFldSpec(struct fld_spec *f);
 void vcc_IsField(struct tokenlist *tl, struct token **t, struct fld_spec *fs);
@@ -203,7 +205,8 @@
 void vcc_ExpectedStringval(struct tokenlist *tl);
 
 /* vcc_token.c */
-void vcc_Coord(const struct tokenlist *tl, struct vsb *vsb, const struct token *t);
+void vcc_Coord(const struct tokenlist *tl, struct vsb *vsb,
+    const struct token *t);
 void vcc_ErrToken(const struct tokenlist *tl, const struct token *t);
 void vcc_ErrWhere(struct tokenlist *tl, const struct token *t);
 void vcc__Expect(struct tokenlist *tl, unsigned tok, int line);
@@ -212,11 +215,14 @@
 void vcc_ExpectCid(struct tokenlist *tl);
 void vcc_Lexer(struct tokenlist *tl, struct source *sp);
 void vcc_NextToken(struct tokenlist *tl);
-void vcc__ErrInternal(struct tokenlist *tl, const char *func, unsigned line);
-void vcc_AddToken(struct tokenlist *tl, unsigned tok, const char *b, const char *e);
+void vcc__ErrInternal(struct tokenlist *tl, const char *func,
+    unsigned line);
+void vcc_AddToken(struct tokenlist *tl, unsigned tok, const char *b,
+    const char *e);
 
 /* vcc_var.c */
-struct var *vcc_FindVar(struct tokenlist *tl, const struct token *t, struct var *vl);
+struct var *vcc_FindVar(struct tokenlist *tl, const struct token *t,
+    struct var *vl);
 
 /* vcc_xref.c */
 void vcc_AddDef(struct tokenlist *tl, struct token *t, enum ref_type type);

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_dir_random.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_dir_random.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_dir_random.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -50,7 +50,8 @@
  */
 
 void
-vcc_ParseRandomDirector(struct tokenlist *tl, const struct token *t_policy, const struct token *t_dir)
+vcc_ParseRandomDirector(struct tokenlist *tl, const struct token *t_policy,
+    const struct token *t_dir)
 {
 	struct token *t_field, *t_be;
 	int nbh, nelem;
@@ -91,7 +92,7 @@
 		ExpectErr(tl, '{');
 		vcc_NextToken(tl);
 		Fc(tl, 0, "\t{");
-	
+
 		while (tl->t->tok != '}') {	/* Member fields */
 			vcc_IsField(tl, &t_field, mfs);
 			ERRCHK(tl);

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_dir_round_robin.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_dir_round_robin.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_dir_round_robin.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -49,7 +49,8 @@
  */
 
 void
-vcc_ParseRoundRobinDirector(struct tokenlist *tl, const struct token *t_policy, const struct token *t_dir)
+vcc_ParseRoundRobinDirector(struct tokenlist *tl, const struct token *t_policy,
+    const struct token *t_dir)
 {
 	struct token *t_field, *t_be;
 	int nbh, nelem;
@@ -58,9 +59,8 @@
 
 	fs = vcc_FldSpec(tl, "!backend", NULL);
 
-	Fc(tl, 0,
-	    "\nstatic const struct vrt_dir_round_robin_entry vdrre_%.*s[] = {\n",
-	    PF(t_dir));
+	Fc(tl, 0, "\nstatic const struct vrt_dir_round_robin_entry "
+	    "vdrre_%.*s[] = {\n", PF(t_dir));
 
 	for (nelem = 0; tl->t->tok != '}'; nelem++) {	/* List of members */
 		first = "";
@@ -71,7 +71,7 @@
 		ExpectErr(tl, '{');
 		vcc_NextToken(tl);
 		Fc(tl, 0, "\t{");
-	
+
 		while (tl->t->tok != '}') {	/* Member fields */
 			vcc_IsField(tl, &t_field, fs);
 			ERRCHK(tl);
@@ -103,8 +103,7 @@
 	Fc(tl, 0, "\t.nmember = %d,\n", nelem);
 	Fc(tl, 0, "\t.members = vdrre_%.*s,\n", PF(t_dir));
 	Fc(tl, 0, "};\n");
-	Fi(tl, 0,
-	    "\tVRT_init_dir_round_robin(cli, &VGC_backend_%.*s , &vdrr_%.*s);\n",
-	    PF(t_dir), PF(t_dir));
+	Fi(tl, 0, "\tVRT_init_dir_round_robin("
+	    "cli, &VGC_backend_%.*s , &vdrr_%.*s);\n", PF(t_dir), PF(t_dir));
 	Ff(tl, 0, "\tVRT_fini_dir(cli, VGC_backend_%.*s);\n", PF(t_dir));
 }

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_fixed_token.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_fixed_token.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_fixed_token.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -13,211 +13,145 @@
 #include "vcc_priv.h"
 #include "vsb.h"
 
+#define M1()     do {*q = p + 1; return (p[0]); } while (0)
+#define M2(c, t) do {if (p[1] == (c)) { *q = p + 2; return (t); }} while (0)
+
 unsigned
 vcl_fixed_token(const char *p, const char **q)
 {
 
 	switch (p[0]) {
 	case '!':
-		if (p[1] == '=') {
-			*q = p + 2;
-			return (T_NEQ);
-		}
-		*q = p + 1;
-		return (p[0]);
+		M2('=', T_NEQ);
+		M1();
 	case '%':
-		*q = p + 1;
-		return (p[0]);
+		M1();
 	case '&':
-		if (p[1] == '&') {
-			*q = p + 2;
-			return (T_CAND);
-		}
-		*q = p + 1;
-		return (p[0]);
+		M2('&', T_CAND);
+		M1();
 	case '(':
-		*q = p + 1;
-		return (p[0]);
+		M1();
 	case ')':
-		*q = p + 1;
-		return (p[0]);
+		M1();
 	case '*':
-		if (p[1] == '=') {
-			*q = p + 2;
-			return (T_MUL);
-		}
-		*q = p + 1;
-		return (p[0]);
+		M2('=', T_MUL);
+		M1();
 	case '+':
-		if (p[1] == '=') {
-			*q = p + 2;
-			return (T_INCR);
-		}
-		if (p[1] == '+') {
-			*q = p + 2;
-			return (T_INC);
-		}
-		*q = p + 1;
-		return (p[0]);
+		M2('=', T_INCR);
+		M2('+', T_INC);
+		M1();
 	case ',':
-		*q = p + 1;
-		return (p[0]);
+		M1();
 	case '-':
-		if (p[1] == '=') {
-			*q = p + 2;
-			return (T_DECR);
-		}
-		if (p[1] == '-') {
-			*q = p + 2;
-			return (T_DEC);
-		}
-		*q = p + 1;
-		return (p[0]);
+		M2('=', T_DECR);
+		M2('-', T_DEC);
+		M1();
 	case '.':
-		*q = p + 1;
-		return (p[0]);
+		M1();
 	case '/':
-		if (p[1] == '=') {
-			*q = p + 2;
-			return (T_DIV);
-		}
-		*q = p + 1;
-		return (p[0]);
+		M2('=', T_DIV);
+		M1();
 	case ';':
-		*q = p + 1;
-		return (p[0]);
+		M1();
 	case '<':
-		if (p[1] == '=') {
-			*q = p + 2;
-			return (T_LEQ);
-		}
-		if (p[1] == '<') {
-			*q = p + 2;
-			return (T_SHL);
-		}
-		*q = p + 1;
-		return (p[0]);
+		M2('=', T_LEQ);
+		M2('<', T_SHL);
+		M1();
 	case '=':
-		if (p[1] == '=') {
-			*q = p + 2;
-			return (T_EQ);
-		}
-		*q = p + 1;
-		return (p[0]);
+		M2('=', T_EQ);
+		M1();
 	case '>':
-		if (p[1] == '>') {
-			*q = p + 2;
-			return (T_SHR);
-		}
-		if (p[1] == '=') {
-			*q = p + 2;
-			return (T_GEQ);
-		}
-		*q = p + 1;
-		return (p[0]);
+		M2('>', T_SHR);
+		M2('=', T_GEQ);
+		M1();
 	case 'e':
-		if (p[1] == 'l' && p[2] == 's' && 
-		    p[3] == 'i' && p[4] == 'f' && !isvar(p[5])) {
+		if (p[1] == 'l' && p[2] == 's' && p[3] == 'i' &&
+		    p[4] == 'f' && !isvar(p[5])) {
 			*q = p + 5;
 			return (T_ELSIF);
 		}
-		if (p[1] == 'l' && p[2] == 's' && 
-		    p[3] == 'e' && p[4] == 'i' && p[5] == 'f'
-		     && !isvar(p[6])) {
+		if (p[1] == 'l' && p[2] == 's' && p[3] == 'e' &&
+		    p[4] == 'i' && p[5] == 'f' && !isvar(p[6])) {
 			*q = p + 6;
 			return (T_ELSEIF);
 		}
-		if (p[1] == 'l' && p[2] == 's' && 
-		    p[3] == 'e' && !isvar(p[4])) {
+		if (p[1] == 'l' && p[2] == 's' && p[3] == 'e'
+		     && !isvar(p[4])) {
 			*q = p + 4;
 			return (T_ELSE);
 		}
 		return (0);
 	case 'i':
-		if (p[1] == 'n' && p[2] == 'c' && 
-		    p[3] == 'l' && p[4] == 'u' && p[5] == 'd' && 
-		    p[6] == 'e' && !isvar(p[7])) {
+		if (p[1] == 'n' && p[2] == 'c' && p[3] == 'l' &&
+		    p[4] == 'u' && p[5] == 'd' && p[6] == 'e'
+		     && !isvar(p[7])) {
 			*q = p + 7;
 			return (T_INCLUDE);
 		}
-		if (p[1] == 'f' && !isvar(p[2])) {
-			*q = p + 2;
-			return (T_IF);
-		}
+		M2('f', T_IF);
 		return (0);
 	case '{':
-		*q = p + 1;
-		return (p[0]);
+		M1();
 	case '|':
-		if (p[1] == '|') {
-			*q = p + 2;
-			return (T_COR);
-		}
-		*q = p + 1;
-		return (p[0]);
+		M2('|', T_COR);
+		M1();
 	case '}':
-		*q = p + 1;
-		return (p[0]);
+		M1();
 	case '~':
-		*q = p + 1;
-		return (p[0]);
+		M1();
 	default:
 		return (0);
 	}
 }
 
-const char *vcl_tnames[256];
+const char *vcl_tnames[256] = {
+	['!'] = "'!'",
+	['%'] = "'%'",
+	['&'] = "'&'",
+	['('] = "'('",
+	[')'] = "')'",
+	['*'] = "'*'",
+	['+'] = "'+'",
+	[','] = "','",
+	['-'] = "'-'",
+	['.'] = "'.'",
+	['/'] = "'/'",
+	['<'] = "'<'",
+	['='] = "'='",
+	['>'] = "'>'",
+	['{'] = "'{'",
+	['}'] = "'}'",
+	['|'] = "'|'",
+	['~'] = "'~'",
+	[';'] = "';'",
+	[CNUM] = "CNUM",
+	[CSRC] = "CSRC",
+	[CSTR] = "CSTR",
+	[EOI] = "EOI",
+	[ID] = "ID",
+	[T_CAND] = "&&",
+	[T_COR] = "||",
+	[T_DEC] = "--",
+	[T_DECR] = "-=",
+	[T_DIV] = "/=",
+	[T_ELSE] = "else",
+	[T_ELSEIF] = "elseif",
+	[T_ELSIF] = "elsif",
+	[T_EQ] = "==",
+	[T_GEQ] = ">=",
+	[T_IF] = "if",
+	[T_INC] = "++",
+	[T_INCLUDE] = "include",
+	[T_INCR] = "+=",
+	[T_LEQ] = "<=",
+	[T_MUL] = "*=",
+	[T_NEQ] = "!=",
+	[T_SHL] = "<<",
+	[T_SHR] = ">>",
+	[VAR] = "VAR",
+};
 
 void
-vcl_init_tnames(void)
-{
-	vcl_tnames['!'] = "'!'";
-	vcl_tnames['%'] = "'%'";
-	vcl_tnames['&'] = "'&'";
-	vcl_tnames['('] = "'('";
-	vcl_tnames[')'] = "')'";
-	vcl_tnames['*'] = "'*'";
-	vcl_tnames['+'] = "'+'";
-	vcl_tnames[','] = "','";
-	vcl_tnames['-'] = "'-'";
-	vcl_tnames['.'] = "'.'";
-	vcl_tnames['/'] = "'/'";
-	vcl_tnames['<'] = "'<'";
-	vcl_tnames['='] = "'='";
-	vcl_tnames['>'] = "'>'";
-	vcl_tnames['{'] = "'{'";
-	vcl_tnames['}'] = "'}'";
-	vcl_tnames['|'] = "'|'";
-	vcl_tnames['~'] = "'~'";
-	vcl_tnames[';'] = "';'";
-	vcl_tnames[CNUM] = "CNUM";
-	vcl_tnames[CSRC] = "CSRC";
-	vcl_tnames[CSTR] = "CSTR";
-	vcl_tnames[EOI] = "EOI";
-	vcl_tnames[ID] = "ID";
-	vcl_tnames[T_CAND] = "&&";
-	vcl_tnames[T_COR] = "||";
-	vcl_tnames[T_DEC] = "--";
-	vcl_tnames[T_DECR] = "-=";
-	vcl_tnames[T_DIV] = "/=";
-	vcl_tnames[T_ELSE] = "else";
-	vcl_tnames[T_ELSEIF] = "elseif";
-	vcl_tnames[T_ELSIF] = "elsif";
-	vcl_tnames[T_EQ] = "==";
-	vcl_tnames[T_GEQ] = ">=";
-	vcl_tnames[T_IF] = "if";
-	vcl_tnames[T_INC] = "++";
-	vcl_tnames[T_INCLUDE] = "include";
-	vcl_tnames[T_INCR] = "+=";
-	vcl_tnames[T_LEQ] = "<=";
-	vcl_tnames[T_MUL] = "*=";
-	vcl_tnames[T_NEQ] = "!=";
-	vcl_tnames[T_SHL] = "<<";
-	vcl_tnames[T_SHR] = ">>";
-	vcl_tnames[VAR] = "VAR";
-}
-
-void
 vcl_output_lang_h(struct vsb *sb)
 {
 	vsb_cat(sb, "#define VCL_RET_ERROR  (1 << 0)\n");
@@ -230,287 +164,185 @@
 	vsb_cat(sb, "#define VCL_RET_DISCARD  (1 << 7)\n");
 	vsb_cat(sb, "#define VCL_RET_KEEP  (1 << 8)\n");
 	vsb_cat(sb, "#define VCL_RET_RESTART  (1 << 9)\n");
-	vsb_cat(sb, "/*\n");
-	vsb_cat(sb, " * $Id$\n");
-	vsb_cat(sb, " *\n");
-	vsb_cat(sb, " * NB:  This file is machine generated, DO NOT EDIT!\n");
-	vsb_cat(sb, " *\n");
-	vsb_cat(sb, " * Edit vcc_gen_fixed_token.tcl instead\n");
-	vsb_cat(sb, " */\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "struct sess;\n");
-	vsb_cat(sb, "struct cli;\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "typedef void vcl_init_f(struct cli *);\n");
-	vsb_cat(sb, "typedef void vcl_fini_f(struct cli *);\n");
-	vsb_cat(sb, "typedef int vcl_func_f(struct sess *sp);\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "struct VCL_conf {\n");
-	vsb_cat(sb, "	unsigned        magic;\n");
-	vsb_cat(sb, "#define VCL_CONF_MAGIC  0x7406c509      /* from /dev/random */\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "        struct director  **director;\n");
-	vsb_cat(sb, "        unsigned        ndirector;\n");
-	vsb_cat(sb, "        struct vrt_ref  *ref;\n");
-	vsb_cat(sb, "        unsigned        nref;\n");
-	vsb_cat(sb, "        unsigned        busy;\n");
-	vsb_cat(sb, "        unsigned        discard;\n");
-	vsb_cat(sb, "        \n");
-	vsb_cat(sb, "	unsigned	nsrc;\n");
-	vsb_cat(sb, "	const char	**srcname;\n");
-	vsb_cat(sb, "	const char	**srcbody;\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "	unsigned	nhashcount;\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "        vcl_init_f      *init_func;\n");
-	vsb_cat(sb, "        vcl_fini_f      *fini_func;\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "	vcl_func_f	*recv_func;\n");
-	vsb_cat(sb, "	vcl_func_f	*pipe_func;\n");
-	vsb_cat(sb, "	vcl_func_f	*pass_func;\n");
-	vsb_cat(sb, "	vcl_func_f	*hash_func;\n");
-	vsb_cat(sb, "	vcl_func_f	*miss_func;\n");
-	vsb_cat(sb, "	vcl_func_f	*hit_func;\n");
-	vsb_cat(sb, "	vcl_func_f	*fetch_func;\n");
-	vsb_cat(sb, "	vcl_func_f	*deliver_func;\n");
-	vsb_cat(sb, "	vcl_func_f	*prefetch_func;\n");
-	vsb_cat(sb, "	vcl_func_f	*timeout_func;\n");
-	vsb_cat(sb, "	vcl_func_f	*discard_func;\n");
-	vsb_cat(sb, "	vcl_func_f	*error_func;\n");
-	vsb_cat(sb, "};\n");
-	vsb_cat(sb, "/*-\n");
-	vsb_cat(sb, " * Copyright (c) 2006 Verdens Gang AS\n");
-	vsb_cat(sb, " * Copyright (c) 2006-2008 Linpro AS\n");
-	vsb_cat(sb, " * All rights reserved.\n");
-	vsb_cat(sb, " *\n");
-	vsb_cat(sb, " * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>\n");
-	vsb_cat(sb, " *\n");
-	vsb_cat(sb, " * Redistribution and use in source and binary forms, with or without\n");
-	vsb_cat(sb, " * modification, are permitted provided that the following conditions\n");
-	vsb_cat(sb, " * are met:\n");
-	vsb_cat(sb, " * 1. Redistributions of source code must retain the above copyright\n");
-	vsb_cat(sb, " *    notice, this list of conditions and the following disclaimer.\n");
-	vsb_cat(sb, " * 2. Redistributions in binary form must reproduce the above copyright\n");
-	vsb_cat(sb, " *    notice, this list of conditions and the following disclaimer in the\n");
-	vsb_cat(sb, " *    documentation and/or other materials provided with the distribution.\n");
-	vsb_cat(sb, " *\n");
-	vsb_cat(sb, " * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n");
-	vsb_cat(sb, " * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n");
-	vsb_cat(sb, " * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n");
-	vsb_cat(sb, " * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE\n");
-	vsb_cat(sb, " * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n");
-	vsb_cat(sb, " * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n");
-	vsb_cat(sb, " * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n");
-	vsb_cat(sb, " * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n");
-	vsb_cat(sb, " * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n");
-	vsb_cat(sb, " * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n");
-	vsb_cat(sb, " * SUCH DAMAGE.\n");
-	vsb_cat(sb, " *\n");
-	vsb_cat(sb, " * $Id$\n");
-	vsb_cat(sb, " *\n");
-	vsb_cat(sb, " * Runtime support for compiled VCL programs.\n");
-	vsb_cat(sb, " *\n");
-	vsb_cat(sb, " * XXX: When this file is changed, lib/libvcl/vcc_gen_fixed_token.tcl\n");
-	vsb_cat(sb, " * XXX: *MUST* be rerun.\n");
-	vsb_cat(sb, " */\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "struct sess;\n");
-	vsb_cat(sb, "struct vsb;\n");
-	vsb_cat(sb, "struct cli;\n");
-	vsb_cat(sb, "struct director;\n");
-	vsb_cat(sb, "struct VCL_conf;\n");
-	vsb_cat(sb, "struct sockaddr;\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "/*\n");
-	vsb_cat(sb, " * A backend probe specification\n");
-	vsb_cat(sb, " */\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "extern void *vrt_magic_string_end;\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "struct vrt_backend_probe {\n");
-	vsb_cat(sb, "	const char	*url;\n");
-	vsb_cat(sb, "	const char	*request;\n");
-	vsb_cat(sb, "	double		timeout;\n");
-	vsb_cat(sb, "	double		interval;\n");
-	vsb_cat(sb, "	unsigned	window;\n");
-	vsb_cat(sb, "	unsigned	threshold;\n");
-	vsb_cat(sb, "};\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "/*\n");
-	vsb_cat(sb, " * A backend is a host+port somewhere on the network\n");
-	vsb_cat(sb, " */\n");
-	vsb_cat(sb, "struct vrt_backend {\n");
-	vsb_cat(sb, "	const char			*vcl_name;\n");
-	vsb_cat(sb, "	const char			*ident;\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "	const char			*hosthdr;\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "	const unsigned char		*ipv4_sockaddr;\n");
-	vsb_cat(sb, "	const unsigned char		*ipv6_sockaddr;\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "	double				connect_timeout;\n");
-	vsb_cat(sb, "	unsigned			max_connections;\n");
-	vsb_cat(sb, "	struct vrt_backend_probe 	probe;\n");
-	vsb_cat(sb, "};\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "/*\n");
-	vsb_cat(sb, " * A director with a predictable reply\n");
-	vsb_cat(sb, " */\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "struct vrt_dir_simple {\n");
-	vsb_cat(sb, "	const char				*name;\n");
-	vsb_cat(sb, "	const struct vrt_backend		*host;\n");
-	vsb_cat(sb, "};\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "/*\n");
-	vsb_cat(sb, " * A director with an unpredictable reply\n");
-	vsb_cat(sb, " */\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "struct vrt_dir_random_entry {\n");
-	vsb_cat(sb, "	const struct vrt_backend		*host;\n");
-	vsb_cat(sb, "	double					weight;\n");
-	vsb_cat(sb, "};\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "struct vrt_dir_random {\n");
-	vsb_cat(sb, "	const char 				*name;\n");
-	vsb_cat(sb, "	unsigned				retries;\n");
-	vsb_cat(sb, "	unsigned 				nmember;\n");
-	vsb_cat(sb, "	const struct vrt_dir_random_entry	*members;\n");
-	vsb_cat(sb, "};\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "/*\n");
-	vsb_cat(sb, " * A director with round robin selection\n");
-	vsb_cat(sb, " */\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "struct vrt_dir_round_robin_entry {\n");
-	vsb_cat(sb, "	const struct vrt_backend		*host;\n");
-	vsb_cat(sb, "};\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "struct vrt_dir_round_robin {\n");
-	vsb_cat(sb, "	const char				*name;\n");
-	vsb_cat(sb, "	unsigned 				nmember;\n");
-	vsb_cat(sb, "	const struct vrt_dir_round_robin_entry	*members;\n");
-	vsb_cat(sb, "};\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "/*\n");
-	vsb_cat(sb, " * other stuff.\n");
-	vsb_cat(sb, " * XXX: document when bored\n");
-	vsb_cat(sb, " */\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "struct vrt_ref {\n");
-	vsb_cat(sb, "	unsigned	source;\n");
-	vsb_cat(sb, "	unsigned	offset;\n");
-	vsb_cat(sb, "	unsigned	line;\n");
-	vsb_cat(sb, "	unsigned	pos;\n");
-	vsb_cat(sb, "	unsigned	count;\n");
-	vsb_cat(sb, "	const char	*token;\n");
-	vsb_cat(sb, "};\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "/* ACL related */\n");
-	vsb_cat(sb, "#define VRT_ACL_MAXADDR		16	/* max(IPv4, IPv6) */\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "void VRT_acl_log(const struct sess *, const char *msg);\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "/* Regexp related */\n");
-	vsb_cat(sb, "void VRT_re_init(void **, const char *, int sub);\n");
-	vsb_cat(sb, "void VRT_re_fini(void *);\n");
-	vsb_cat(sb, "int VRT_re_match(const char *, void *re);\n");
-	vsb_cat(sb, "int VRT_re_test(struct vsb *, const char *, int sub);\n");
-	vsb_cat(sb, "const char *VRT_regsub(const struct sess *sp, int all, const char *, void *, const char *);\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "void VRT_panic(struct sess *sp,  const char *, ...);\n");
-	vsb_cat(sb, "void VRT_purge(const char *, int hash);\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "void VRT_count(const struct sess *, unsigned);\n");
-	vsb_cat(sb, "int VRT_rewrite(const char *, const char *);\n");
-	vsb_cat(sb, "void VRT_error(struct sess *, unsigned, const char *);\n");
-	vsb_cat(sb, "int VRT_switch_config(const char *);\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "enum gethdr_e { HDR_REQ, HDR_RESP, HDR_OBJ, HDR_BEREQ };\n");
-	vsb_cat(sb, "char *VRT_GetHdr(const struct sess *, enum gethdr_e where, const char *);\n");
-	vsb_cat(sb, "void VRT_SetHdr(const struct sess *, enum gethdr_e where, const char *, const char *, ...);\n");
-	vsb_cat(sb, "void VRT_handling(struct sess *sp, unsigned hand);\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "/* Simple stuff */\n");
-	vsb_cat(sb, "int VRT_strcmp(const char *s1, const char *s2);\n");
-	vsb_cat(sb, "void VRT_memmove(void *dst, const void *src, unsigned len);\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "void VRT_ESI(struct sess *sp);\n");
-	vsb_cat(sb, "void VRT_Rollback(struct sess *sp);\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "/* Synthetic pages */\n");
-	vsb_cat(sb, "void VRT_synth_page(struct sess *sp, unsigned flags, const char *, ...);\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "/* Backend related */\n");
-	vsb_cat(sb, "void VRT_init_dir_simple(struct cli *, struct director **, const struct vrt_dir_simple *);\n");
-	vsb_cat(sb, "void VRT_init_dir_random(struct cli *, struct director **, const struct vrt_dir_random *);\n");
-	vsb_cat(sb, "void VRT_init_dir_round_robin(struct cli *, struct director **, const struct vrt_dir_round_robin *);\n");
-	vsb_cat(sb, "void VRT_fini_dir(struct cli *, struct director *);\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "char *VRT_IP_string(const struct sess *sp, const struct sockaddr *sa);\n");
-	vsb_cat(sb, "char *VRT_int_string(const struct sess *sp, int);\n");
-	vsb_cat(sb, "char *VRT_double_string(const struct sess *sp, double);\n");
-	vsb_cat(sb, "const char *VRT_backend_string(struct sess *sp);\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "#define VRT_done(sp, hand)			\\\n");
-	vsb_cat(sb, "	do {					\\\n");
-	vsb_cat(sb, "		VRT_handling(sp, hand);		\\\n");
-	vsb_cat(sb, "		return (1);			\\\n");
-	vsb_cat(sb, "	} while (0)\n");
-	vsb_cat(sb, "/*\n");
-	vsb_cat(sb, " * $Id$\n");
-	vsb_cat(sb, " *\n");
-	vsb_cat(sb, " * NB:  This file is machine generated, DO NOT EDIT!\n");
-	vsb_cat(sb, " *\n");
-	vsb_cat(sb, " * Edit vcc_gen_obj.tcl instead\n");
-	vsb_cat(sb, " */\n");
-	vsb_cat(sb, "\n");
-	vsb_cat(sb, "struct sockaddr * VRT_r_client_ip(const struct sess *);\n");
-	vsb_cat(sb, "struct sockaddr * VRT_r_server_ip(struct sess *);\n");
-	vsb_cat(sb, "int VRT_r_server_port(struct sess *);\n");
-	vsb_cat(sb, "const char * VRT_r_req_request(const struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_req_request(const struct sess *, const char *, ...);\n");
-	vsb_cat(sb, "const char * VRT_r_req_url(const struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_req_url(const struct sess *, const char *, ...);\n");
-	vsb_cat(sb, "const char * VRT_r_req_proto(const struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_req_proto(const struct sess *, const char *, ...);\n");
-	vsb_cat(sb, "void VRT_l_req_hash(struct sess *, const char *);\n");
-	vsb_cat(sb, "struct director * VRT_r_req_backend(struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_req_backend(struct sess *, struct director *);\n");
-	vsb_cat(sb, "int VRT_r_req_restarts(const struct sess *);\n");
-	vsb_cat(sb, "double VRT_r_req_grace(struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_req_grace(struct sess *, double);\n");
-	vsb_cat(sb, "const char * VRT_r_req_xid(struct sess *);\n");
-	vsb_cat(sb, "const char * VRT_r_bereq_request(const struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_bereq_request(const struct sess *, const char *, ...);\n");
-	vsb_cat(sb, "const char * VRT_r_bereq_url(const struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_bereq_url(const struct sess *, const char *, ...);\n");
-	vsb_cat(sb, "const char * VRT_r_bereq_proto(const struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_bereq_proto(const struct sess *, const char *, ...);\n");
-	vsb_cat(sb, "const char * VRT_r_obj_proto(const struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_obj_proto(const struct sess *, const char *, ...);\n");
-	vsb_cat(sb, "int VRT_r_obj_status(const struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_obj_status(const struct sess *, int);\n");
-	vsb_cat(sb, "const char * VRT_r_obj_response(const struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_obj_response(const struct sess *, const char *, ...);\n");
-	vsb_cat(sb, "int VRT_r_obj_hits(const struct sess *);\n");
-	vsb_cat(sb, "unsigned VRT_r_obj_cacheable(const struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_obj_cacheable(const struct sess *, unsigned);\n");
-	vsb_cat(sb, "double VRT_r_obj_ttl(const struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_obj_ttl(const struct sess *, double);\n");
-	vsb_cat(sb, "double VRT_r_obj_grace(const struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_obj_grace(const struct sess *, double);\n");
-	vsb_cat(sb, "double VRT_r_obj_prefetch(const struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_obj_prefetch(const struct sess *, double);\n");
-	vsb_cat(sb, "double VRT_r_obj_lastuse(const struct sess *);\n");
-	vsb_cat(sb, "const char * VRT_r_obj_hash(const struct sess *);\n");
-	vsb_cat(sb, "const char * VRT_r_resp_proto(const struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_resp_proto(const struct sess *, const char *, ...);\n");
-	vsb_cat(sb, "int VRT_r_resp_status(const struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_resp_status(const struct sess *, int);\n");
-	vsb_cat(sb, "const char * VRT_r_resp_response(const struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_resp_response(const struct sess *, const char *, ...);\n");
-	vsb_cat(sb, "double VRT_r_now(const struct sess *);\n");
-	vsb_cat(sb, "unsigned VRT_r_req_backend_healthy(const struct sess *);\n");
+
+	/* ../../include/vcl.h */
+
+	vsb_cat(sb, "/*\n * $Id: vcc_gen_fixed_token.tcl 3098 2008-08-18 08");
+	vsb_cat(sb, ":18:43Z phk $\n *\n * NB:  This file is machine genera");
+	vsb_cat(sb, "ted, DO NOT EDIT!\n *\n * Edit vcc_gen_fixed_token.tcl");
+	vsb_cat(sb, " instead\n */\n\nstruct sess;\nstruct cli;\n\ntypedef ");
+	vsb_cat(sb, "void vcl_init_f(struct cli *);\ntypedef void vcl_fini_");
+	vsb_cat(sb, "f(struct cli *);\ntypedef int vcl_func_f(struct sess *");
+	vsb_cat(sb, "sp);\n\nstruct VCL_conf {\n\tunsigned        magic;\n#");
+	vsb_cat(sb, "define VCL_CONF_MAGIC  0x7406c509      /* from /dev/ra");
+	vsb_cat(sb, "ndom */\n\n        struct director  **director;\n     ");
+	vsb_cat(sb, "   unsigned        ndirector;\n        struct vrt_ref ");
+	vsb_cat(sb, " *ref;\n        unsigned        nref;\n        unsigne");
+	vsb_cat(sb, "d        busy;\n        unsigned        discard;\n\n\t");
+	vsb_cat(sb, "unsigned\tnsrc;\n\tconst char\t**srcname;\n\tconst cha");
+	vsb_cat(sb, "r\t**srcbody;\n\n\tunsigned\tnhashcount;\n\n        vc");
+	vsb_cat(sb, "l_init_f      *init_func;\n        vcl_fini_f      *fi");
+	vsb_cat(sb, "ni_func;\n\n\tvcl_func_f\t*recv_func;\n\tvcl_func_f\t*");
+	vsb_cat(sb, "pipe_func;\n\tvcl_func_f\t*pass_func;\n\tvcl_func_f\t*");
+	vsb_cat(sb, "hash_func;\n\tvcl_func_f\t*miss_func;\n\tvcl_func_f\t*");
+	vsb_cat(sb, "hit_func;\n\tvcl_func_f\t*fetch_func;\n\tvcl_func_f\t*");
+	vsb_cat(sb, "deliver_func;\n\tvcl_func_f\t*prefetch_func;\n\tvcl_fu");
+	vsb_cat(sb, "nc_f\t*timeout_func;\n\tvcl_func_f\t*discard_func;\n\t");
+	vsb_cat(sb, "vcl_func_f\t*error_func;\n};\n");
+
+	/* ../../include/vrt.h */
+
+	vsb_cat(sb, "/*-\n * Copyright (c) 2006 Verdens Gang AS\n * Copyrig");
+	vsb_cat(sb, "ht (c) 2006-2008 Linpro AS\n * All rights reserved.\n ");
+	vsb_cat(sb, "*\n * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>\n");
+	vsb_cat(sb, " *\n * Redistribution and use in source and binary for");
+	vsb_cat(sb, "ms, with or without\n * modification, are permitted pr");
+	vsb_cat(sb, "ovided that the following conditions\n * are met:\n * ");
+	vsb_cat(sb, "1. Redistributions of source code must retain the abov");
+	vsb_cat(sb, "e copyright\n *    notice, this list of conditions and");
+	vsb_cat(sb, " the following disclaimer.\n * 2. Redistributions in b");
+	vsb_cat(sb, "inary form must reproduce the above copyright\n *    n");
+	vsb_cat(sb, "otice, this list of conditions and the following discl");
+	vsb_cat(sb, "aimer in the\n *    documentation and/or other materia");
+	vsb_cat(sb, "ls provided with the distribution.\n *\n * THIS SOFTWA");
+	vsb_cat(sb, "RE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'");
+	vsb_cat(sb, "' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING");
+	vsb_cat(sb, ", BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF ME");
+	vsb_cat(sb, "RCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n *");
+	vsb_cat(sb, " ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBU");
+	vsb_cat(sb, "TORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTA");
+	vsb_cat(sb, "L, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (I");
+	vsb_cat(sb, "NCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUT");
+	vsb_cat(sb, "E GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS");
+	vsb_cat(sb, "; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ");
+	vsb_cat(sb, "ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n");
+	vsb_cat(sb, " * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWI");
+	vsb_cat(sb, "SE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFT");
+	vsb_cat(sb, "WARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH D");
+	vsb_cat(sb, "AMAGE.\n *\n * $Id: vrt.h 3234 2008-09-29 07:32:26Z ph");
+	vsb_cat(sb, "k $\n *\n * Runtime support for compiled VCL programs.");
+	vsb_cat(sb, "\n *\n * XXX: When this file is changed, lib/libvcl/vc");
+	vsb_cat(sb, "c_gen_fixed_token.tcl\n * XXX: *MUST* be rerun.\n */\n");
+	vsb_cat(sb, "\nstruct sess;\nstruct vsb;\nstruct cli;\nstruct direc");
+	vsb_cat(sb, "tor;\nstruct VCL_conf;\nstruct sockaddr;\n\n/*\n * A b");
+	vsb_cat(sb, "ackend probe specification\n */\n\nextern void *vrt_ma");
+	vsb_cat(sb, "gic_string_end;\n\nstruct vrt_backend_probe {\n\tconst");
+	vsb_cat(sb, " char\t*url;\n\tconst char\t*request;\n\tdouble\t\ttim");
+	vsb_cat(sb, "eout;\n\tdouble\t\tinterval;\n\tunsigned\twindow;\n\tu");
+	vsb_cat(sb, "nsigned\tthreshold;\n};\n\n/*\n * A backend is a host+");
+	vsb_cat(sb, "port somewhere on the network\n */\nstruct vrt_backend");
+	vsb_cat(sb, " {\n\tconst char\t\t\t*vcl_name;\n\tconst char\t\t\t*i");
+	vsb_cat(sb, "dent;\n\n\tconst char\t\t\t*hosthdr;\n\n\tconst unsign");
+	vsb_cat(sb, "ed char\t\t*ipv4_sockaddr;\n\tconst unsigned char\t\t*");
+	vsb_cat(sb, "ipv6_sockaddr;\n\n\tdouble\t\t\t\tconnect_timeout;\n\t");
+	vsb_cat(sb, "unsigned\t\t\tmax_connections;\n\tstruct vrt_backend_p");
+	vsb_cat(sb, "robe\tprobe;\n};\n\n/*\n * A director with a predictab");
+	vsb_cat(sb, "le reply\n */\n\nstruct vrt_dir_simple {\n\tconst char");
+	vsb_cat(sb, "\t\t\t\t*name;\n\tconst struct vrt_backend\t\t*host;\n");
+	vsb_cat(sb, "};\n\n/*\n * A director with an unpredictable reply\n ");
+	vsb_cat(sb, "*/\n\nstruct vrt_dir_random_entry {\n\tconst struct vr");
+	vsb_cat(sb, "t_backend\t\t*host;\n\tdouble\t\t\t\t\tweight;\n};\n\n");
+	vsb_cat(sb, "struct vrt_dir_random {\n\tconst char\t\t\t\t*name;\n\t");
+	vsb_cat(sb, "unsigned\t\t\t\tretries;\n\tunsigned\t\t\t\tnmember;\n");
+	vsb_cat(sb, "\tconst struct vrt_dir_random_entry\t*members;\n};\n\n");
+	vsb_cat(sb, "/*\n * A director with round robin selection\n */\n\ns");
+	vsb_cat(sb, "truct vrt_dir_round_robin_entry {\n\tconst struct vrt_");
+	vsb_cat(sb, "backend\t\t*host;\n};\n\nstruct vrt_dir_round_robin {\n");
+	vsb_cat(sb, "\tconst char\t\t\t\t*name;\n\tunsigned\t\t\t\tnmember;");
+	vsb_cat(sb, "\n\tconst struct vrt_dir_round_robin_entry\t*members;\n");
+	vsb_cat(sb, "};\n\n\n/*\n * other stuff.\n * XXX: document when bor");
+	vsb_cat(sb, "ed\n */\n\nstruct vrt_ref {\n\tunsigned\tsource;\n\tun");
+	vsb_cat(sb, "signed\toffset;\n\tunsigned\tline;\n\tunsigned\tpos;\n");
+	vsb_cat(sb, "\tunsigned\tcount;\n\tconst char\t*token;\n};\n\n/* AC");
+	vsb_cat(sb, "L related */\n#define VRT_ACL_MAXADDR\t\t16\t/* max(IP");
+	vsb_cat(sb, "v4, IPv6) */\n\nvoid VRT_acl_log(const struct sess *, ");
+	vsb_cat(sb, "const char *msg);\n\n/* Regexp related */\nvoid VRT_re");
+	vsb_cat(sb, "_init(void **, const char *, int sub);\nvoid VRT_re_fi");
+	vsb_cat(sb, "ni(void *);\nint VRT_re_match(const char *, void *re);");
+	vsb_cat(sb, "\nint VRT_re_test(struct vsb *, const char *, int sub)");
+	vsb_cat(sb, ";\nconst char *VRT_regsub(const struct sess *sp, int a");
+	vsb_cat(sb, "ll, const char *,\n    void *, const char *);\n\nvoid ");
+	vsb_cat(sb, "VRT_panic(struct sess *sp,  const char *, ...);\nvoid ");
+	vsb_cat(sb, "VRT_purge(const char *, int hash);\n\nvoid VRT_count(c");
+	vsb_cat(sb, "onst struct sess *, unsigned);\nint VRT_rewrite(const ");
+	vsb_cat(sb, "char *, const char *);\nvoid VRT_error(struct sess *, ");
+	vsb_cat(sb, "unsigned, const char *);\nint VRT_switch_config(const ");
+	vsb_cat(sb, "char *);\n\nenum gethdr_e { HDR_REQ, HDR_RESP, HDR_OBJ");
+	vsb_cat(sb, ", HDR_BEREQ };\nchar *VRT_GetHdr(const struct sess *, ");
+	vsb_cat(sb, "enum gethdr_e where, const char *);\nvoid VRT_SetHdr(c");
+	vsb_cat(sb, "onst struct sess *, enum gethdr_e where, const char *,");
+	vsb_cat(sb, "\n    const char *, ...);\nvoid VRT_handling(struct se");
+	vsb_cat(sb, "ss *sp, unsigned hand);\n\n/* Simple stuff */\nint VRT");
+	vsb_cat(sb, "_strcmp(const char *s1, const char *s2);\nvoid VRT_mem");
+	vsb_cat(sb, "move(void *dst, const void *src, unsigned len);\n\nvoi");
+	vsb_cat(sb, "d VRT_ESI(struct sess *sp);\nvoid VRT_Rollback(struct ");
+	vsb_cat(sb, "sess *sp);\n\n/* Synthetic pages */\nvoid VRT_synth_pa");
+	vsb_cat(sb, "ge(struct sess *sp, unsigned flags, const char *, ...)");
+	vsb_cat(sb, ";\n\n/* Backend related */\nvoid VRT_init_dir_simple(s");
+	vsb_cat(sb, "truct cli *, struct director **,\n    const struct vrt");
+	vsb_cat(sb, "_dir_simple *);\nvoid VRT_init_dir_random(struct cli *");
+	vsb_cat(sb, ", struct director **,\n    const struct vrt_dir_random");
+	vsb_cat(sb, " *);\nvoid VRT_init_dir_round_robin(struct cli *, stru");
+	vsb_cat(sb, "ct director **,\n    const struct vrt_dir_round_robin ");
+	vsb_cat(sb, "*);\nvoid VRT_fini_dir(struct cli *, struct director *");
+	vsb_cat(sb, ");\n\nchar *VRT_IP_string(const struct sess *sp, const");
+	vsb_cat(sb, " struct sockaddr *sa);\nchar *VRT_int_string(const str");
+	vsb_cat(sb, "uct sess *sp, int);\nchar *VRT_double_string(const str");
+	vsb_cat(sb, "uct sess *sp, double);\nconst char *VRT_backend_string");
+	vsb_cat(sb, "(struct sess *sp);\n\n#define VRT_done(sp, hand)\t\t\t");
+	vsb_cat(sb, "\\\n\tdo {\t\t\t\t\t\\\n\t\tVRT_handling(sp, hand);\t\t");
+	vsb_cat(sb, "\\\n\t\treturn (1);\t\t\t\\\n\t} while (0)\n");
+
+	/* ../../include/vrt_obj.h */
+
+	vsb_cat(sb, "/*\n * $Id: vrt_obj.h 3169 2008-09-08 09:49:01Z tfheen");
+	vsb_cat(sb, " $\n *\n * NB:  This file is machine generated, DO NOT");
+	vsb_cat(sb, " EDIT!\n *\n * Edit vcc_gen_obj.tcl instead\n */\n\nst");
+	vsb_cat(sb, "ruct sockaddr * VRT_r_client_ip(const struct sess *);\n");
+	vsb_cat(sb, "struct sockaddr * VRT_r_server_ip(struct sess *);\nint");
+	vsb_cat(sb, " VRT_r_server_port(struct sess *);\nconst char * VRT_r");
+	vsb_cat(sb, "_req_request(const struct sess *);\nvoid VRT_l_req_req");
+	vsb_cat(sb, "uest(const struct sess *, const char *, ...);\nconst c");
+	vsb_cat(sb, "har * VRT_r_req_url(const struct sess *);\nvoid VRT_l_");
+	vsb_cat(sb, "req_url(const struct sess *, const char *, ...);\ncons");
+	vsb_cat(sb, "t char * VRT_r_req_proto(const struct sess *);\nvoid V");
+	vsb_cat(sb, "RT_l_req_proto(const struct sess *, const char *, ...)");
+	vsb_cat(sb, ";\nvoid VRT_l_req_hash(struct sess *, const char *);\n");
+	vsb_cat(sb, "struct director * VRT_r_req_backend(struct sess *);\nv");
+	vsb_cat(sb, "oid VRT_l_req_backend(struct sess *, struct director *");
+	vsb_cat(sb, ");\nint VRT_r_req_restarts(const struct sess *);\ndoub");
+	vsb_cat(sb, "le VRT_r_req_grace(struct sess *);\nvoid VRT_l_req_gra");
+	vsb_cat(sb, "ce(struct sess *, double);\nconst char * VRT_r_req_xid");
+	vsb_cat(sb, "(struct sess *);\nconst char * VRT_r_bereq_request(con");
+	vsb_cat(sb, "st struct sess *);\nvoid VRT_l_bereq_request(const str");
+	vsb_cat(sb, "uct sess *, const char *, ...);\nconst char * VRT_r_be");
+	vsb_cat(sb, "req_url(const struct sess *);\nvoid VRT_l_bereq_url(co");
+	vsb_cat(sb, "nst struct sess *, const char *, ...);\nconst char * V");
+	vsb_cat(sb, "RT_r_bereq_proto(const struct sess *);\nvoid VRT_l_ber");
+	vsb_cat(sb, "eq_proto(const struct sess *, const char *, ...);\ncon");
+	vsb_cat(sb, "st char * VRT_r_obj_proto(const struct sess *);\nvoid ");
+	vsb_cat(sb, "VRT_l_obj_proto(const struct sess *, const char *, ...");
+	vsb_cat(sb, ");\nint VRT_r_obj_status(const struct sess *);\nvoid V");
+	vsb_cat(sb, "RT_l_obj_status(const struct sess *, int);\nconst char");
+	vsb_cat(sb, " * VRT_r_obj_response(const struct sess *);\nvoid VRT_");
+	vsb_cat(sb, "l_obj_response(const struct sess *, const char *, ...)");
+	vsb_cat(sb, ";\nint VRT_r_obj_hits(const struct sess *);\nunsigned ");
+	vsb_cat(sb, "VRT_r_obj_cacheable(const struct sess *);\nvoid VRT_l_");
+	vsb_cat(sb, "obj_cacheable(const struct sess *, unsigned);\ndouble ");
+	vsb_cat(sb, "VRT_r_obj_ttl(const struct sess *);\nvoid VRT_l_obj_tt");
+	vsb_cat(sb, "l(const struct sess *, double);\ndouble VRT_r_obj_grac");
+	vsb_cat(sb, "e(const struct sess *);\nvoid VRT_l_obj_grace(const st");
+	vsb_cat(sb, "ruct sess *, double);\ndouble VRT_r_obj_prefetch(const");
+	vsb_cat(sb, " struct sess *);\nvoid VRT_l_obj_prefetch(const struct");
+	vsb_cat(sb, " sess *, double);\ndouble VRT_r_obj_lastuse(const stru");
+	vsb_cat(sb, "ct sess *);\nconst char * VRT_r_obj_hash(const struct ");
+	vsb_cat(sb, "sess *);\nconst char * VRT_r_resp_proto(const struct s");
+	vsb_cat(sb, "ess *);\nvoid VRT_l_resp_proto(const struct sess *, co");
+	vsb_cat(sb, "nst char *, ...);\nint VRT_r_resp_status(const struct ");
+	vsb_cat(sb, "sess *);\nvoid VRT_l_resp_status(const struct sess *, ");
+	vsb_cat(sb, "int);\nconst char * VRT_r_resp_response(const struct s");
+	vsb_cat(sb, "ess *);\nvoid VRT_l_resp_response(const struct sess *,");
+	vsb_cat(sb, " const char *, ...);\ndouble VRT_r_now(const struct se");
+	vsb_cat(sb, "ss *);\nunsigned VRT_r_req_backend_healthy(const struc");
+	vsb_cat(sb, "t sess *);\n");
 }

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl	2009-02-05 08:45:25 UTC (rev 3580)
@@ -30,7 +30,7 @@
 # Generate various .c and .h files for the VCL compiler and the interfaces
 # for it.
 
-# These are the metods which can be called in the VCL program. 
+# These are the metods which can be called in the VCL program.
 # Second element is list of valid return actions.
 #
 set methods {
@@ -66,7 +66,7 @@
 # Language keywords
 #
 set keywords {
-	include 
+	include
 
 	if else elseif elsif
 }
@@ -104,7 +104,8 @@
 proc warns {fd} {
 
 	puts $fd "/*"
-	puts $fd { * $Id$}
+	puts $fd \
+	    { * $Id$}
 	puts $fd " *"
 	puts $fd " * NB:  This file is machine generated, DO NOT EDIT!"
 	puts $fd " *"
@@ -135,7 +136,7 @@
         unsigned        nref;
         unsigned        busy;
         unsigned        discard;
-        
+
 	unsigned	nsrc;
 	const char	**srcname;
 	const char	**srcbody;
@@ -160,12 +161,13 @@
 puts $for "#ifdef VCL_RET_MAC"
 set i 0
 foreach k $returns {
+	set u [string toupper $k]
 	if {$k == "error"} {
 		puts $for "#ifdef VCL_RET_MAC_E"
-		puts $for "VCL_RET_MAC_E($k, [string toupper $k], (1 << $i), $i)"
+		puts $for "VCL_RET_MAC_E($k, $u, (1 << $i), $i)"
 		puts $for "#endif"
 	} else {
-		puts $for "VCL_RET_MAC($k, [string toupper $k], (1 << $i), $i)"
+		puts $for "VCL_RET_MAC($k, $u, (1 << $i), $i)"
 	}
 	incr i
 }
@@ -184,7 +186,7 @@
 	puts -nonewline $for "VCL_MET_MAC([lindex $m 0]"
 	puts -nonewline $for ",[string toupper [lindex $m 0]]"
 	set l [lindex $m 1]
-	puts -nonewline $for ",(VCL_RET_[string toupper [lindex $l 0]]"
+	puts -nonewline $for ",(\n    VCL_RET_[string toupper [lindex $l 0]]"
 	foreach r [lrange $l 1 end] {
 		puts -nonewline $for "|VCL_RET_[string toupper $r]"
 	}
@@ -260,6 +262,9 @@
 set seq [lsort [array names xx]]
 
 puts $fo {
+#define M1()     do {*q = p + 1; return (p[0]); } while (0)
+#define M2(c, t) do {if (p[1] == (c)) { *q = p + 2; return (t); }} while (0)
+
 unsigned
 vcl_fixed_token(const char *p, const char **q)}
 puts $fo "{"
@@ -279,25 +284,33 @@
 	scan "$ch" "%c" cx
 	puts $fo "	case '$ch':"
 	set retval "0"
+	set m1 0
 	foreach tt $l {
 		set k [lindex $tt 0]
 		if {[string length $k] == 1} {
-			puts $fo "\t\t*q = p + 1;"
-			set retval {p[0]}
+			puts $fo "\t\tM1();"
+			set m1 1
 			continue;
 		}
+		if {[string length $k] == 2} {
+			puts -nonewline $fo "		M2("
+			puts -nonewline $fo "'[string index $k 1]'"
+			puts            $fo ", [lindex $tt 1]);"
+			continue;
+		} 
 		puts -nonewline $fo "		if ("
 		for {set i 1} {$i < [string length $k]} {incr i} {
 			if {$i > 1} {
-				puts -nonewline $fo " && "
-				if {![expr $i % 3]} {
-					puts -nonewline $fo "\n\t\t    "
+				puts -nonewline $fo " &&"
+				if {[expr $i % 3] == 1} {
+					puts -nonewline $fo "\n\t\t   "
 				}
+				puts -nonewline $fo " "
 			}
 			puts -nonewline $fo "p\[$i\] == '[string index $k $i]'"
 		}
 		if {[lindex $tt 2]} {
-			if {![expr $i % 3]} {
+			if {[expr $i % 3] == 1} {
 				puts -nonewline $fo "\n\t\t    "
 			}
 			puts -nonewline $fo " && !isvar(p\[$i\])"
@@ -307,8 +320,10 @@
 		puts $fo "\t\t\treturn ([lindex $tt 1]);"
 		puts $fo "\t\t}"
 	}
-	puts $fo "\t\treturn ($retval);"
-} 
+	if {$m1 == 0} {
+		puts $fo "\t\treturn ($retval);"
+	}
+}
 
 puts $fo "	default:"
 puts $fo "		return (0);"
@@ -316,17 +331,14 @@
 puts $fo "}"
 
 puts $fo ""
-puts $fo "const char *vcl_tnames\[256\];\n"
-puts $fo "void"
-puts $fo "vcl_init_tnames(void)"
-puts $fo "{"
+puts $fo "const char *vcl_tnames\[256\] = {"
 foreach i $token2 {
-	puts $fo "\tvcl_tnames\[[lindex $i 0]\] = \"[lindex $i 0]\";"
+	puts $fo "\t\[[lindex $i 0]\] = \"[lindex $i 0]\","
 }
 foreach i $tokens {
-	puts $fo "\tvcl_tnames\[[lindex $i 0]\] = \"[lindex $i 1]\";"
+	puts $fo "\t\[[lindex $i 0]\] = \"[lindex $i 1]\","
 }
-puts $fo "}"
+puts $fo "};"
 
 #----------------------------------------------------------------------
 # Create the C-code which emits the boilerplate definitions for the
@@ -335,11 +347,43 @@
 proc copy_include {n} {
 	global fo
 
+	puts $fo "\n\t/* $n */\n"
 	set fi [open $n]
+	set n 0
 	while {[gets $fi a] >= 0} {
-		regsub -all {\\} $a {\\\\} a
-		puts $fo "\tvsb_cat(sb, \"$a\\n\");"
+		for {set b 0} {$b < [string length $a]} {incr b} {
+			if {$n == 0} {
+				puts -nonewline $fo "\tvsb_cat(sb, \""
+			}
+			set c [string index $a $b]
+			if {"$c" == "\\"} {
+				puts -nonewline $fo "\\\\"
+				incr n
+			} elseif {"$c" == "\t"} {
+				puts -nonewline $fo "\\t"
+				incr n
+			} else {
+				puts -nonewline $fo "$c"
+			}
+			incr n
+			if {$n > 53} {
+				puts $fo "\");"
+				set n 0
+			}
+		}
+		if {$n == 0} {
+			puts -nonewline $fo "\tvsb_cat(sb, \""
+		}
+		puts -nonewline $fo "\\n"
+		incr n 2
+		if {$n > 53} {
+			puts $fo "\");"
+			set n 0
+		}
 	}
+	if {$n > 0} {
+		puts $fo "\");"
+	}
 	close $fi
 }
 
@@ -349,7 +393,8 @@
 puts $fo "{"
 set i 0
 foreach k $returns {
-	puts $fo "\tvsb_cat(sb, \"#define VCL_RET_[string toupper $k]  (1 << $i)\\n\");"
+	set u [string toupper $k]
+	puts $fo "\tvsb_cat(sb, \"#define VCL_RET_$u  (1 << $i)\\n\");"
 	incr i
 }
 

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_gen_obj.tcl
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_gen_obj.tcl	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_gen_obj.tcl	2009-02-05 08:45:25 UTC (rev 3580)
@@ -261,15 +261,31 @@
 
 proc method_map {m} {
 
-	set l ""
+	set l1 ""
+	set l2 ""
 	foreach i $m {
-		append l " | "
-		append l VCL_MET_[string toupper $i]
+		if {[string length $l2] > 55} {
+			if {$l1 != ""} {
+				append l1 "\n\t    "
+			}
+			append l1 "$l2"
+			set l2 ""
+		}
+		if {$l2 != "" || $l1 != ""} {
+			append l2 " | "
+		}
+		append l2 VCL_MET_[string toupper $i]
 	}
-	if {$l == ""} {
+	if {$l2 != ""} {
+		if {$l1 != ""} {
+			append l1 "\n\t    "
+		}
+		append l1 "$l2"
+	}
+	if {$l1 == ""} {
 		return "0"
 	}
-	return [string range $l 3 end]
+	return $l1
 }
 
 proc vars {v pa} {
@@ -289,12 +305,12 @@
 			puts $fo  "\t\{ \"$n\", $t, [string length $n],"
 		}
 		if {$a == "RO" || $a == "RW"} {
-			puts $fo  "\t    \"VRT_r_${m}($pa)\","
+			puts -nonewline $fo  "\t    \"VRT_r_${m}($pa)\","
 			if {![regexp HDR_ $t]} {
 				puts $fp  "$tt($t) VRT_r_${m}($ty);"
 			}
 		} else {
-			puts $fo  "\t    NULL,"
+			puts -nonewline $fo  "\t    NULL,"
 		}
 		if {$a == "WO" || $a == "RW"} {
 			puts $fo  "\t    \"VRT_l_${m}($pa, \","
@@ -307,7 +323,7 @@
 		} else {
 			puts $fo  "\t    NULL,"
 		}
-		puts $fo  "\t    V_$a,"
+		puts -nonewline $fo  "\t    V_$a,"
 		if {![regexp HDR_ $t]} {
 			puts $fo  "\t    0,"
 		} else {

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_obj.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_obj.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_obj.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -12,235 +12,195 @@
 
 struct var vcc_vars[] = {
 	{ "client.ip", IP, 9,
-	    "VRT_r_client_ip(sp)",
-	    NULL,
-	    V_RO,
-	    0,
-	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_ERROR
+	    "VRT_r_client_ip(sp)",	    NULL,
+	    V_RO,	    0,
+	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
+	     | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
+	     | VCL_MET_ERROR
 	},
 	{ "server.ip", IP, 9,
-	    "VRT_r_server_ip(sp)",
-	    NULL,
-	    V_RO,
-	    0,
-	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_ERROR
+	    "VRT_r_server_ip(sp)",	    NULL,
+	    V_RO,	    0,
+	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
+	     | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
+	     | VCL_MET_ERROR
 	},
 	{ "server.port", INT, 11,
-	    "VRT_r_server_port(sp)",
-	    NULL,
-	    V_RO,
-	    0,
-	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_ERROR
+	    "VRT_r_server_port(sp)",	    NULL,
+	    V_RO,	    0,
+	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
+	     | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
+	     | VCL_MET_ERROR
 	},
 	{ "req.request", STRING, 11,
-	    "VRT_r_req_request(sp)",
-	    "VRT_l_req_request(sp, ",
-	    V_RW,
-	    0,
-	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_ERROR
+	    "VRT_r_req_request(sp)",	    "VRT_l_req_request(sp, ",
+	    V_RW,	    0,
+	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
+	     | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_ERROR
 	},
 	{ "req.url", STRING, 7,
-	    "VRT_r_req_url(sp)",
-	    "VRT_l_req_url(sp, ",
-	    V_RW,
-	    0,
-	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_ERROR
+	    "VRT_r_req_url(sp)",	    "VRT_l_req_url(sp, ",
+	    V_RW,	    0,
+	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
+	     | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_ERROR
 	},
 	{ "req.proto", STRING, 9,
-	    "VRT_r_req_proto(sp)",
-	    "VRT_l_req_proto(sp, ",
-	    V_RW,
-	    0,
-	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_ERROR
+	    "VRT_r_req_proto(sp)",	    "VRT_l_req_proto(sp, ",
+	    V_RW,	    0,
+	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
+	     | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_ERROR
 	},
 	{ "req.http.", HEADER, 9,
-	    "VRT_r_req_http_(sp)",
-	    "VRT_l_req_http_(sp, ",
-	    V_RW,
-	    "HDR_REQ",
-	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_ERROR
+	    "VRT_r_req_http_(sp)",	    "VRT_l_req_http_(sp, ",
+	    V_RW,	    "HDR_REQ",
+	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
+	     | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_ERROR
 	},
 	{ "req.hash", HASH, 8,
-	    NULL,
-	    "VRT_l_req_hash(sp, ",
-	    V_WO,
-	    0,
+	    NULL,	    "VRT_l_req_hash(sp, ",
+	    V_WO,	    0,
 	    VCL_MET_HASH | VCL_MET_ERROR
 	},
 	{ "req.backend", BACKEND, 11,
-	    "VRT_r_req_backend(sp)",
-	    "VRT_l_req_backend(sp, ",
-	    V_RW,
-	    0,
-	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_ERROR
+	    "VRT_r_req_backend(sp)",	    "VRT_l_req_backend(sp, ",
+	    V_RW,	    0,
+	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
+	     | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_ERROR
 	},
 	{ "req.restarts", INT, 12,
-	    "VRT_r_req_restarts(sp)",
-	    NULL,
-	    V_RO,
-	    0,
-	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_ERROR
+	    "VRT_r_req_restarts(sp)",	    NULL,
+	    V_RO,	    0,
+	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
+	     | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
+	     | VCL_MET_ERROR
 	},
 	{ "req.grace", TIME, 9,
-	    "VRT_r_req_grace(sp)",
-	    "VRT_l_req_grace(sp, ",
-	    V_RW,
-	    0,
-	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_ERROR
+	    "VRT_r_req_grace(sp)",	    "VRT_l_req_grace(sp, ",
+	    V_RW,	    0,
+	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
+	     | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
+	     | VCL_MET_ERROR
 	},
 	{ "req.xid", STRING, 7,
-	    "VRT_r_req_xid(sp)",
-	    NULL,
-	    V_RO,
-	    0,
-	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_ERROR
+	    "VRT_r_req_xid(sp)",	    NULL,
+	    V_RO,	    0,
+	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
+	     | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
+	     | VCL_MET_ERROR
 	},
 	{ "bereq.request", STRING, 13,
-	    "VRT_r_bereq_request(sp)",
-	    "VRT_l_bereq_request(sp, ",
-	    V_RW,
-	    0,
+	    "VRT_r_bereq_request(sp)",	    "VRT_l_bereq_request(sp, ",
+	    V_RW,	    0,
 	    VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_FETCH
 	},
 	{ "bereq.url", STRING, 9,
-	    "VRT_r_bereq_url(sp)",
-	    "VRT_l_bereq_url(sp, ",
-	    V_RW,
-	    0,
+	    "VRT_r_bereq_url(sp)",	    "VRT_l_bereq_url(sp, ",
+	    V_RW,	    0,
 	    VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_FETCH
 	},
 	{ "bereq.proto", STRING, 11,
-	    "VRT_r_bereq_proto(sp)",
-	    "VRT_l_bereq_proto(sp, ",
-	    V_RW,
-	    0,
+	    "VRT_r_bereq_proto(sp)",	    "VRT_l_bereq_proto(sp, ",
+	    V_RW,	    0,
 	    VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_FETCH
 	},
 	{ "bereq.http.", HEADER, 11,
-	    "VRT_r_bereq_http_(sp)",
-	    "VRT_l_bereq_http_(sp, ",
-	    V_RW,
-	    "HDR_BEREQ",
+	    "VRT_r_bereq_http_(sp)",	    "VRT_l_bereq_http_(sp, ",
+	    V_RW,	    "HDR_BEREQ",
 	    VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_MISS | VCL_MET_FETCH
 	},
 	{ "obj.proto", STRING, 9,
-	    "VRT_r_obj_proto(sp)",
-	    "VRT_l_obj_proto(sp, ",
-	    V_RW,
-	    0,
+	    "VRT_r_obj_proto(sp)",	    "VRT_l_obj_proto(sp, ",
+	    V_RW,	    0,
 	    VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_ERROR
 	},
 	{ "obj.status", INT, 10,
-	    "VRT_r_obj_status(sp)",
-	    "VRT_l_obj_status(sp, ",
-	    V_RW,
-	    0,
+	    "VRT_r_obj_status(sp)",	    "VRT_l_obj_status(sp, ",
+	    V_RW,	    0,
 	    VCL_MET_FETCH | VCL_MET_ERROR
 	},
 	{ "obj.response", STRING, 12,
-	    "VRT_r_obj_response(sp)",
-	    "VRT_l_obj_response(sp, ",
-	    V_RW,
-	    0,
+	    "VRT_r_obj_response(sp)",	    "VRT_l_obj_response(sp, ",
+	    V_RW,	    0,
 	    VCL_MET_FETCH | VCL_MET_ERROR
 	},
 	{ "obj.hits", INT, 8,
-	    "VRT_r_obj_hits(sp)",
-	    NULL,
-	    V_RO,
-	    0,
+	    "VRT_r_obj_hits(sp)",	    NULL,
+	    V_RO,	    0,
 	    VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
 	},
 	{ "obj.http.", HEADER, 9,
-	    "VRT_r_obj_http_(sp)",
-	    "VRT_l_obj_http_(sp, ",
-	    V_RW,
-	    "HDR_OBJ",
+	    "VRT_r_obj_http_(sp)",	    "VRT_l_obj_http_(sp, ",
+	    V_RW,	    "HDR_OBJ",
 	    VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_ERROR
 	},
 	{ "obj.cacheable", BOOL, 13,
-	    "VRT_r_obj_cacheable(sp)",
-	    "VRT_l_obj_cacheable(sp, ",
-	    V_RW,
-	    0,
-	    VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DISCARD | VCL_MET_TIMEOUT | VCL_MET_ERROR
+	    "VRT_r_obj_cacheable(sp)",	    "VRT_l_obj_cacheable(sp, ",
+	    V_RW,	    0,
+	    VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DISCARD | VCL_MET_TIMEOUT
+	     | VCL_MET_ERROR
 	},
 	{ "obj.ttl", TIME, 7,
-	    "VRT_r_obj_ttl(sp)",
-	    "VRT_l_obj_ttl(sp, ",
-	    V_RW,
-	    0,
-	    VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DISCARD | VCL_MET_TIMEOUT | VCL_MET_ERROR
+	    "VRT_r_obj_ttl(sp)",	    "VRT_l_obj_ttl(sp, ",
+	    V_RW,	    0,
+	    VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DISCARD | VCL_MET_TIMEOUT
+	     | VCL_MET_ERROR
 	},
 	{ "obj.grace", TIME, 9,
-	    "VRT_r_obj_grace(sp)",
-	    "VRT_l_obj_grace(sp, ",
-	    V_RW,
-	    0,
-	    VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DISCARD | VCL_MET_TIMEOUT | VCL_MET_ERROR
+	    "VRT_r_obj_grace(sp)",	    "VRT_l_obj_grace(sp, ",
+	    V_RW,	    0,
+	    VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DISCARD | VCL_MET_TIMEOUT
+	     | VCL_MET_ERROR
 	},
 	{ "obj.prefetch", RTIME, 12,
-	    "VRT_r_obj_prefetch(sp)",
-	    "VRT_l_obj_prefetch(sp, ",
-	    V_RW,
-	    0,
+	    "VRT_r_obj_prefetch(sp)",	    "VRT_l_obj_prefetch(sp, ",
+	    V_RW,	    0,
 	    VCL_MET_FETCH | VCL_MET_PREFETCH
 	},
 	{ "obj.lastuse", TIME, 11,
-	    "VRT_r_obj_lastuse(sp)",
-	    NULL,
-	    V_RO,
-	    0,
-	    VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_DISCARD | VCL_MET_TIMEOUT | VCL_MET_ERROR
+	    "VRT_r_obj_lastuse(sp)",	    NULL,
+	    V_RO,	    0,
+	    VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_DISCARD
+	     | VCL_MET_TIMEOUT | VCL_MET_ERROR
 	},
 	{ "obj.hash", STRING, 8,
-	    "VRT_r_obj_hash(sp)",
-	    NULL,
-	    V_RO,
-	    0,
-	    VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_ERROR
+	    "VRT_r_obj_hash(sp)",	    NULL,
+	    V_RO,	    0,
+	    VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
+	     | VCL_MET_ERROR
 	},
 	{ "resp.proto", STRING, 10,
-	    "VRT_r_resp_proto(sp)",
-	    "VRT_l_resp_proto(sp, ",
-	    V_RW,
-	    0,
+	    "VRT_r_resp_proto(sp)",	    "VRT_l_resp_proto(sp, ",
+	    V_RW,	    0,
 	    VCL_MET_DELIVER
 	},
 	{ "resp.status", INT, 11,
-	    "VRT_r_resp_status(sp)",
-	    "VRT_l_resp_status(sp, ",
-	    V_RW,
-	    0,
+	    "VRT_r_resp_status(sp)",	    "VRT_l_resp_status(sp, ",
+	    V_RW,	    0,
 	    VCL_MET_DELIVER
 	},
 	{ "resp.response", STRING, 13,
-	    "VRT_r_resp_response(sp)",
-	    "VRT_l_resp_response(sp, ",
-	    V_RW,
-	    0,
+	    "VRT_r_resp_response(sp)",	    "VRT_l_resp_response(sp, ",
+	    V_RW,	    0,
 	    VCL_MET_DELIVER
 	},
 	{ "resp.http.", HEADER, 10,
-	    "VRT_r_resp_http_(sp)",
-	    "VRT_l_resp_http_(sp, ",
-	    V_RW,
-	    "HDR_RESP",
+	    "VRT_r_resp_http_(sp)",	    "VRT_l_resp_http_(sp, ",
+	    V_RW,	    "HDR_RESP",
 	    VCL_MET_DELIVER
 	},
 	{ "now", TIME, 3,
-	    "VRT_r_now(sp)",
-	    NULL,
-	    V_RO,
-	    0,
-	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_DISCARD | VCL_MET_TIMEOUT
+	    "VRT_r_now(sp)",	    NULL,
+	    V_RO,	    0,
+	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
+	     | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
+	     | VCL_MET_DISCARD | VCL_MET_TIMEOUT
 	},
 	{ "req.backend.healthy", BOOL, 19,
-	    "VRT_r_req_backend_healthy(sp)",
-	    NULL,
-	    V_RO,
-	    0,
-	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_DISCARD | VCL_MET_TIMEOUT
+	    "VRT_r_req_backend_healthy(sp)",	    NULL,
+	    V_RO,	    0,
+	    VCL_MET_RECV | VCL_MET_PIPE | VCL_MET_PASS | VCL_MET_HASH
+	     | VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER
+	     | VCL_MET_DISCARD | VCL_MET_TIMEOUT
 	},
 	{ NULL }
 };

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_parse.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_parse.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_parse.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -56,7 +56,7 @@
 
 #define C(tl, sep)	do {					\
 	Fb(tl, 1, "VRT_count(sp, %u)%s\n", ++tl->cnt, sep);	\
-	tl->t->cnt = tl->cnt; 					\
+	tl->t->cnt = tl->cnt;					\
 } while (0)
 
 /*--------------------------------------------------------------------
@@ -615,7 +615,7 @@
 			break;
 		case ID:
 			for (tp = toplev; tp->name != NULL; tp++) {
-				if (!vcc_IdIs(tl->t, tp->name)) 
+				if (!vcc_IdIs(tl->t, tp->name))
 					continue;
 				tp->func(tl);
 				break;

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_priv.h
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_priv.h	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_priv.h	2009-02-05 08:45:25 UTC (rev 3580)
@@ -40,7 +40,6 @@
 #define isvar(c) (isident(c) || (c) == '.')
 unsigned vcl_fixed_token(const char *p, const char **q);
 extern const char *vcl_tnames[256];
-void vcl_init_tnames(void);
 void vcl_output_lang_h(struct vsb *sb);
 
 #define PF(t)	(int)((t)->e - (t)->b), (t)->b

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_string.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_string.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_string.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -88,7 +88,7 @@
 
 	Expect(tl, ',');
 	vcc_NextToken(tl);
-	
+
 	Expect(tl, CSTR);
 	p = vcc_regexp(tl, 1);
 	vcc_NextToken(tl);
@@ -96,7 +96,7 @@
 
 	Expect(tl, ',');
 	vcc_NextToken(tl);
-	
+
 	if (!vcc_StringVal(tl)) {
 		vcc_ExpectedStringval(tl);
 		return (0);
@@ -119,7 +119,7 @@
  */
 
 int
-vcc_StringVal(struct tokenlist *tl) 
+vcc_StringVal(struct tokenlist *tl)
 {
 	struct var *vp;
 
@@ -154,9 +154,8 @@
 			Fb(tl, 0, "VRT_backend_string(sp)");
 			break;
 		default:
-			vsb_printf(tl->sb,
-			    "String representation of '%s' not implemented yet.\n",
-				vp->name);
+			vsb_printf(tl->sb, "String representation of '%s'"
+			    " not implemented yet.\n", vp->name);
 			vcc_ErrWhere(tl, tl->t);
 			return (0);
 		}

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_token.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_token.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_token.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -113,7 +113,7 @@
 
 	vcc_icoord(tl->sb, t, &l);
 	vsb_printf(tl->sb, "\n");
-	
+
 	x = y = 0;
 	e = t->src->e;
 	for (p = l; p < e && *p != '\n'; p++) {
@@ -221,7 +221,7 @@
 
 	assert(t->tok == ID);
 	for (q = t->b; q < t->e; q++) {
-		if (!isalnum(*q) && *q != '_') 
+		if (!isalnum(*q) && *q != '_')
 			return (0);
 	}
 	return (1);
@@ -394,7 +394,7 @@
 			vcc_ErrWhere(tl, tl->t);
 			return;
 		}
-	
+
 		/* Recognize long-strings */
 		if (*p == '{' && p[1] == '"') {
 			for (q = p + 2; q < sp->e; q++) {
@@ -406,7 +406,7 @@
 			if (q < sp->e) {
 				p = q + 2;
 				u = tl->t->e - tl->t->b;
-				u -= 4; 	/* {" ... "} */
+				u -= 4;		/* {" ... "} */
 				tl->t->dec = TlAlloc(tl, u + 1 );
 				AN(tl->t->dec);
 				memcpy(tl->t->dec, tl->t->b + 2, u);

Modified: branches/2.0/varnish-cache/lib/libvcl/vcc_xref.c
===================================================================
--- branches/2.0/varnish-cache/lib/libvcl/vcc_xref.c	2009-02-05 08:37:41 UTC (rev 3579)
+++ branches/2.0/varnish-cache/lib/libvcl/vcc_xref.c	2009-02-05 08:45:25 UTC (rev 3580)
@@ -340,13 +340,14 @@
 	struct procuse *pu;
 
 	VTAILQ_FOREACH(pu, &p->uses, list)
-		if (!(pu->v->methods & m->bitval)) 
+		if (!(pu->v->methods & m->bitval))
 			return (pu);
 	return (NULL);
 }
 
 static int
-vcc_CheckUseRecurse(struct tokenlist *tl, const struct proc *p, struct method *m)
+vcc_CheckUseRecurse(struct tokenlist *tl, const struct proc *p,
+    struct method *m)
 {
 	struct proccall *pc;
 	struct procuse *pu;
@@ -356,7 +357,7 @@
 		vsb_printf(tl->sb,
 		    "Variable \"%.*s\" is not available in %s\n",
 		    PF(pu->t), m->name);
-		vcc_ErrWhere(tl, pu->t); 
+		vcc_ErrWhere(tl, pu->t);
 		vsb_printf(tl->sb, "\n...in function \"%.*s\"\n",
 		    PF(p->name));
 		vcc_ErrWhere(tl, p->name);



More information about the varnish-commit mailing list