Commit 8b98c9ed authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Move more table-generating #includes into tbl/ subdir

parent 7a24aa37
......@@ -804,7 +804,7 @@ ssize_t HTC_Read(struct http_conn *htc, void *d, size_t len);
int HTC_Complete(struct http_conn *htc);
#define HTTPH(a, b, c, d, e, f, g) extern char b[];
#include "http_headers.h"
#include "tbl/http_headers.h"
#undef HTTPH
/* cache_main.c */
......@@ -924,7 +924,7 @@ void VCL_Rel(struct VCL_conf **vcc);
void VCL_Poll(void);
#define VCL_MET_MAC(l,u,b) void VCL_##l##_method(struct sess *);
#include "vcl_returns.h"
#include "tbl/vcl_returns.h"
#undef VCL_MET_MAC
/* cache_vrt.c */
......
......@@ -127,7 +127,7 @@ static const struct pvar {
uint8_t tag;
} pvars[] = {
#define PVAR(a, b, c) { (a), (b), (c) },
#include "ban_vars.h"
#include "tbl/ban_vars.h"
#undef PVAR
{ 0, 0, 0}
};
......
......@@ -41,7 +41,7 @@
#include "cache.h"
#define HTTPH(a, b, c, d, e, f, g) char b[] = "*" a ":";
#include "http_headers.h"
#include "tbl/http_headers.h"
#undef HTTPH
/*lint -save -e773 not () */
......@@ -91,7 +91,7 @@ static struct http_msg {
const char *txt;
} http_msg[] = {
#define HTTP_RESP(n, t) { n, t},
#include "http_response.h"
#include "tbl/http_response.h"
{ 0, NULL }
};
......@@ -830,7 +830,7 @@ http_EstimateWS(const struct http *fm, unsigned how, uint16_t *nhd)
#define HTTPH(a, b, c, d, e, f, g) \
if (((e) & how) && http_IsHdr(&fm->hd[u], (b))) \
continue;
#include "http_headers.h"
#include "tbl/http_headers.h"
#undef HTTPH
l += PRNDUP(Tlen(fm->hd[u]) + 1);
(*nhd)++;
......@@ -859,7 +859,7 @@ http_FilterFields(struct worker *w, unsigned vsl_id, struct http *to,
#define HTTPH(a, b, c, d, e, f, g) \
if (((e) & how) && http_IsHdr(&fm->hd[u], (b))) \
continue;
#include "http_headers.h"
#include "tbl/http_headers.h"
#undef HTTPH
http_copyheader(w, vsl_id, to, fm, u);
}
......@@ -1111,6 +1111,6 @@ HTTP_Init(void)
{
#define HTTPH(a, b, c, d, e, f, g) b[0] = (char)strlen(b + 1);
#include "http_headers.h"
#include "tbl/http_headers.h"
#undef HTTPH
}
......@@ -331,7 +331,7 @@ VCL_##func##_method(struct sess *sp) \
assert(!((1U << sp->handling) & ~bitmap)); \
}
#include "vcl_returns.h"
#include "tbl/vcl_returns.h"
#undef VCL_MET_MAC
/*--------------------------------------------------------------------*/
......
......@@ -597,5 +597,5 @@ VRT_Stv_##nm(const char *nm) \
return (stv->var_##nm(stv)); \
}
#include "vrt_stv_var.h"
#include "tbl/vrt_stv_var.h"
#undef VRTSTVVAR
......@@ -47,7 +47,7 @@ typedef void storage_close_f(const struct stevedore *);
/* Prototypes for VCL variable responders */
#define VRTSTVTYPE(ct) typedef ct storage_var_##ct(const struct stevedore *);
#include "vrt_stv_var.h"
#include "tbl/vrt_stv_var.h"
#undef VRTSTVTYPE
/*--------------------------------------------------------------------*/
......@@ -77,7 +77,7 @@ struct stevedore {
struct lru *lru;
#define VRTSTVVAR(nm, vtype, ctype, dval) storage_var_##ctype *var_##nm;
#include "vrt_stv_var.h"
#include "tbl/vrt_stv_var.h"
#undef VRTSTVVAR
/* private fields */
......
......@@ -11,7 +11,7 @@ pkginclude_HEADERS = \
vsm.h
nobase_noinst_HEADERS = \
ban_vars.h \
tbl/ban_vars.h \
binary_heap.h \
cli_common.h \
cli_priv.h \
......@@ -20,8 +20,8 @@ nobase_noinst_HEADERS = \
compat/execinfo.h \
compat/srandomdev.h \
flopen.h \
http_headers.h \
http_response.h \
tbl/http_headers.h \
tbl/http_response.h \
libvarnish.h \
libvcl.h \
miniobj.h \
......@@ -98,7 +98,9 @@ vmod_abi.h: vcs_version.h
fi ; \
echo "#define VMOD_ABI_Version \"@PACKAGE_STRING@ $$GITID\"" > vmod_abi.h
CLEANFILES = vcl_returns.h \
CLEANFILES = \
tbl/vcl_returns.h \
tbl/vrt_stv_var.h \
vcl.h \
vrt_obj.h \
vmod_abi.h
......@@ -671,7 +671,7 @@ for i in returns:
#######################################################################
fo = open(buildroot + "/include/vcl_returns.h", "w")
fo = open(buildroot + "/include/tbl/vcl_returns.h", "w")
file_header(fo)
......@@ -891,7 +891,7 @@ fo.close()
#######################################################################
fo = open(buildroot + "/include/vrt_stv_var.h", "w")
fo = open(buildroot + "/include/tbl/vrt_stv_var.h", "w")
file_header(fo)
......
......@@ -269,7 +269,7 @@ parse_return(struct vcc *tl)
retval = 1; \
} \
} while (0);
#include "vcl_returns.h"
#include "tbl/vcl_returns.h"
#undef VCL_RET_MAC
if (!retval) {
VSB_printf(tl->sb, "Expected return action name.\n");
......@@ -330,7 +330,7 @@ static struct action_table {
#define VCL_RET_MAC(l, U, B) \
{ #l, parse_new_syntax },
#include "vcl_returns.h"
#include "tbl/vcl_returns.h"
#undef VCL_RET_MAC
/* Keep list sorted from here */
......
......@@ -70,7 +70,7 @@
struct method method_tab[] = {
#define VCL_MET_MAC(l,U,m) { "vcl_"#l, m, VCL_MET_##U },
#include "vcl_returns.h"
#include "tbl/vcl_returns.h"
#undef VCL_MET_MAC
{ NULL, 0U, 0}
};
......@@ -374,7 +374,7 @@ EmitStruct(const struct vcc *tl)
Fc(tl, 0, "\t.srcbody = srcbody,\n");
#define VCL_MET_MAC(l,u,b) \
Fc(tl, 0, "\t." #l "_func = VGC_function_vcl_" #l ",\n");
#include "vcl_returns.h"
#include "tbl/vcl_returns.h"
#undef VCL_MET_MAC
Fc(tl, 0, "};\n");
}
......@@ -722,7 +722,7 @@ VCC_Return_Name(unsigned method)
switch (method) {
#define VCL_RET_MAC(l, U, B) case VCL_RET_##U: return(#l);
#include "vcl_returns.h"
#include "tbl/vcl_returns.h"
#undef VCL_RET_MAC
default:
return (NULL);
......
......@@ -80,7 +80,7 @@ vcc_Stv_mkvar(struct vcc *tl, const struct token *t, enum var_type fmt)
v->name = TlDupTok(tl, t);
v->r_methods = 0
#define VCL_MET_MAC(l,u,b) | VCL_MET_##u
#include "vcl_returns.h"
#include "tbl/vcl_returns.h"
#undef VCL_MET_MAC
;
v->fmt = fmt;
......@@ -93,7 +93,7 @@ static struct stvars {
enum var_type fmt;
} stvars[] = {
#define VRTSTVVAR(nm, vtype, ctype, dval) { #nm, vtype },
#include "vrt_stv_var.h"
#include "tbl/vrt_stv_var.h"
#undef VRTSTVVAR
{ NULL, BOOL }
};
......
......@@ -226,7 +226,7 @@ vcc_CheckActionRecurse(struct vcc *tl, struct proc *p, unsigned bitmap)
VSB_printf(tl->sb, "Invalid return \"" #l "\"\n");\
vcc_ErrWhere(tl, p->return_tok[VCL_RET_##U]); \
}
#include "vcl_returns.h"
#include "tbl/vcl_returns.h"
#undef VCL_RET_MAC
VSB_printf(tl->sb, "\n...in subroutine \"%.*s\"\n",
......@@ -271,7 +271,7 @@ vcc_checkaction1(struct vcc *tl, const struct symbol *sym)
if (m->ret_bitmap & ((1 << VCL_RET_##U))) \
VSB_printf(tl->sb, " \"%s\"", #l);
#include "vcl_returns.h"
#include "tbl/vcl_returns.h"
#undef VCL_RET_MAC
VSB_printf(tl->sb, "\n");
tl->err = 1;
......
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