r2685 - in trunk/varnish-cache: include lib/libvarnish

phk at projects.linpro.no phk at projects.linpro.no
Sun Jun 15 17:43:21 CEST 2008


Author: phk
Date: 2008-06-15 17:43:21 +0200 (Sun, 15 Jun 2008)
New Revision: 2685

Added:
   trunk/varnish-cache/include/vct.h
Modified:
   trunk/varnish-cache/include/libvarnish.h
   trunk/varnish-cache/lib/libvarnish/vct.c
Log:
On further consideration: give VCT it's own header file.



Modified: trunk/varnish-cache/include/libvarnish.h
===================================================================
--- trunk/varnish-cache/include/libvarnish.h	2008-06-15 15:40:39 UTC (rev 2684)
+++ trunk/varnish-cache/include/libvarnish.h	2008-06-15 15:43:21 UTC (rev 2685)
@@ -54,33 +54,6 @@
 double TIM_mono(void);
 double TIM_real(void);
 
-/* 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_UALPHA	(1<<3)
-#define VCT_LOALPHA	(1<<4)
-#define VCT_DIGIT	(1<<5)
-#define VCT_HEX		(1<<6)
-
-extern unsigned char vct_typtab[256];
-
-static inline int
-vct_is(unsigned char x, unsigned char y)
-{
- 
-        return (vct_typtab[x] & (y));
-}
-
-#define vct_issp(x) vct_is(x, VCT_SP)
-#define vct_iscrlf(x) vct_is(x, VCT_CRLF)
-#define vct_islws(x) vct_is(x, VCT_LWS)
-#define vct_isctl(x) vct_is(x, VCT_CTL)
-
-/* NB: VCT always operate in ASCII, don't replace 0x0d with \r etc. */
-#define vct_skipcrlf(p) (p[0] == 0x0d && p[1] == 0x0a ? 2 : 1)
-
 /* from libvarnish/version.c */
 void varnish_version(const char *);
 

Copied: trunk/varnish-cache/include/vct.h (from rev 2684, trunk/varnish-cache/include/libvarnish.h)
===================================================================
--- trunk/varnish-cache/include/vct.h	                        (rev 0)
+++ trunk/varnish-cache/include/vct.h	2008-06-15 15:43:21 UTC (rev 2685)
@@ -0,0 +1,58 @@
+/*-
+ * Copyright (c) 2006 Verdens Gang AS
+ * Copyright (c) 2006-2008 Linpro AS
+ * All rights reserved.
+ *
+ * Author: Poul-Henning Kamp <phk at phk.freebsd.dk>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 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
+ * 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$
+ */
+
+/* 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_UALPHA	(1<<3)
+#define VCT_LOALPHA	(1<<4)
+#define VCT_DIGIT	(1<<5)
+#define VCT_HEX		(1<<6)
+
+extern unsigned char vct_typtab[256];
+
+static inline int
+vct_is(unsigned char x, unsigned char y)
+{
+ 
+        return (vct_typtab[x] & (y));
+}
+
+#define vct_issp(x) vct_is(x, VCT_SP)
+#define vct_iscrlf(x) vct_is(x, VCT_CRLF)
+#define vct_islws(x) vct_is(x, VCT_LWS)
+#define vct_isctl(x) vct_is(x, VCT_CTL)
+
+/* NB: VCT always operate in ASCII, don't replace 0x0d with \r etc. */
+#define vct_skipcrlf(p) (p[0] == 0x0d && p[1] == 0x0a ? 2 : 1)


Property changes on: trunk/varnish-cache/include/vct.h
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:mergeinfo
   + 

Modified: trunk/varnish-cache/lib/libvarnish/vct.c
===================================================================
--- trunk/varnish-cache/lib/libvarnish/vct.c	2008-06-15 15:40:39 UTC (rev 2684)
+++ trunk/varnish-cache/lib/libvarnish/vct.c	2008-06-15 15:43:21 UTC (rev 2685)
@@ -30,7 +30,7 @@
  * ctype(3) like functions, according to RFC2616
  */
 
-#include <libvarnish.h>
+#include <vct.h>
 
 /* NB: VCT always operate in ASCII, don't replace 0x0d with \r etc. */
 




More information about the varnish-commit mailing list