Commit 916ac619 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

On further consideration: give VCT it's own header file.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2685 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 2fe06a10
......@@ -54,33 +54,6 @@ time_t TIM_parse(const char *p);
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 *);
......
/*-
* Copyright (c) 2006 Verdens Gang AS
* Copyright (c) 2006-2008 Linpro AS
* All rights reserved.
*
* Author: Poul-Henning Kamp <phk@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)
......@@ -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. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment