Commit 7a24aa37 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Start #include reorg. The table-building #includes will all go into

the tbl/ subdirectory
parent 0e63559a
......@@ -224,7 +224,7 @@ struct acct {
#define VSC_F(n, t, l, f, e,d) L##l(t, n)
#define VSC_DO_MAIN
struct dstat {
#include "vsc_fields.h"
#include "tbl/vsc_fields.h"
};
#undef VSC_F
#undef VSC_DO_MAIN
......
......@@ -53,7 +53,7 @@ wrk_sumstat(struct worker *w)
#define L1(n) (VSC_C_main->n += w->stats.n)
#define VSC_DO_MAIN
#define VSC_F(n, t, l, f, d, e) L##l(n);
#include "vsc_fields.h"
#include "tbl/vsc_fields.h"
#undef VSC_F
#undef VSC_DO_MAIN
#undef L0
......
#
pkginclude_HEADERS = \
vsm.h \
vsl.h \
tbl/vsc_all.h \
tbl/vsc_fields.h \
tbl/vsl_tags.h \
varnishapi.h \
vcli.h \
vsl_tags.h \
vsc_fields.h \
vsc_all.h \
vsc.h \
varnishapi.h
vsl.h \
vsm.h
nobase_noinst_HEADERS = \
ban_vars.h \
......
The include files in this directory are special, they are used to
define sets of objects using macros, such that a list of all such
objects can be compiled into the code by including these files with
a properly defined macro.
......@@ -31,30 +31,30 @@
VSC_DO(LCK, lck, VSC_TYPE_LCK)
#define VSC_DO_LCK
#include "vsc_fields.h"
#include "tbl/vsc_fields.h"
#undef VSC_DO_LCK
VSC_DONE(LCK, lck, VSC_TYPE_LCK)
VSC_DO(MAIN, main, VSC_TYPE_MAIN)
#define VSC_DO_MAIN
#include "vsc_fields.h"
#include "tbl/vsc_fields.h"
#undef VSC_DO_MAIN
VSC_DONE(MAIN, main, VSC_TYPE_MAIN)
VSC_DO(SMA, sma, VSC_TYPE_SMA)
#define VSC_DO_SMA
#include "vsc_fields.h"
#include "tbl/vsc_fields.h"
#undef VSC_DO_SMA
VSC_DONE(SMA, sma, VSC_TYPE_SMA)
VSC_DO(SMF, smf, VSC_TYPE_SMF)
#define VSC_DO_SMF
#include "vsc_fields.h"
#include "tbl/vsc_fields.h"
#undef VSC_DO_SMF
VSC_DONE(SMF, smf, VSC_TYPE_SMF)
VSC_DO(VBE, vbe, VSC_TYPE_VBE)
#define VSC_DO_VBE
#include "vsc_fields.h"
#include "tbl/vsc_fields.h"
#undef VSC_DO_VBE
VSC_DONE(VBE, vbe, VSC_TYPE_VBE)
......@@ -43,7 +43,7 @@
#define VSC_DO(u,l,t) struct VSC_C_##l {
#define VSC_DONE(u,l,t) };
#include "vsc_all.h"
#include "tbl/vsc_all.h"
#undef VSC_DO
#undef VSC_F
......
......@@ -74,7 +74,7 @@
enum VSL_tag_e {
SLT_Bogus = 0,
#define SLTM(foo) SLT_##foo,
#include "vsl_tags.h"
#include "tbl/vsl_tags.h"
#undef SLTM
SLT_Reserved = 255
};
......
......@@ -309,7 +309,7 @@ iter_call(const struct vsc *vsc, VSC_iter_f *func, void *priv,
return (0); \
}
#include "vsc_all.h"
#include "tbl/vsc_all.h"
#undef VSC_DO
#undef VSC_F
#undef VSC_DONE
......@@ -339,7 +339,7 @@ VSC_Iter(struct VSM_data *vd, VSC_iter_f *func, void *priv)
if (!i) \
continue; \
}
#include "vsc_all.h"
#include "tbl/vsc_all.h"
#undef VSC_F
#undef VSC_DO
#undef VSC_DONE
......
......@@ -53,7 +53,7 @@
const char *VSL_tags[256] = {
#define SLTM(foo) [SLT_##foo] = #foo,
#include "vsl_tags.h"
#include "tbl/vsl_tags.h"
#undef SLTM
};
......
......@@ -27,7 +27,7 @@ int main(int argc, char **argv)
P("=============");
P("");
#define VSC_DO_MAIN
#include "vsc_fields.h"
#include "tbl/vsc_fields.h"
#undef VSC_DO_MAIN
P("");
......@@ -35,7 +35,7 @@ int main(int argc, char **argv)
P("=============");
P("");
#define VSC_DO_LCK
#include "vsc_fields.h"
#include "tbl/vsc_fields.h"
#undef VSC_DO_LCK
P("");
......@@ -43,7 +43,7 @@ int main(int argc, char **argv)
P("===========================");
P("");
#define VSC_DO_SMA
#include "vsc_fields.h"
#include "tbl/vsc_fields.h"
#undef VSC_DO_SMA
P("");
......@@ -51,7 +51,7 @@ int main(int argc, char **argv)
P("=========================");
P("");
#define VSC_DO_SMF
#include "vsc_fields.h"
#include "tbl/vsc_fields.h"
#undef VSC_DO_SMF
P("");
......@@ -59,7 +59,7 @@ int main(int argc, char **argv)
P("====================");
P("");
#define VSC_DO_VBE
#include "vsc_fields.h"
#include "tbl/vsc_fields.h"
#undef VSC_DO_VBE
return 0;
......
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