Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
unique-xids
Commits
8b98c9ed
Commit
8b98c9ed
authored
Oct 08, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move more table-generating #includes into tbl/ subdir
parent
7a24aa37
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
29 additions
and
27 deletions
+29
-27
cache.h
bin/varnishd/cache.h
+2
-2
cache_ban.c
bin/varnishd/cache_ban.c
+1
-1
cache_http.c
bin/varnishd/cache_http.c
+5
-5
cache_vcl.c
bin/varnishd/cache_vcl.c
+1
-1
stevedore.c
bin/varnishd/stevedore.c
+1
-1
stevedore.h
bin/varnishd/stevedore.h
+2
-2
Makefile.am
include/Makefile.am
+6
-4
ban_vars.h
include/tbl/ban_vars.h
+0
-0
http_headers.h
include/tbl/http_headers.h
+0
-0
http_response.h
include/tbl/http_response.h
+0
-0
generate.py
lib/libvcl/generate.py
+2
-2
vcc_action.c
lib/libvcl/vcc_action.c
+2
-2
vcc_compile.c
lib/libvcl/vcc_compile.c
+3
-3
vcc_storage.c
lib/libvcl/vcc_storage.c
+2
-2
vcc_xref.c
lib/libvcl/vcc_xref.c
+2
-2
No files found.
bin/varnishd/cache.h
View file @
8b98c9ed
...
@@ -804,7 +804,7 @@ ssize_t HTC_Read(struct http_conn *htc, void *d, size_t len);
...
@@ -804,7 +804,7 @@ ssize_t HTC_Read(struct http_conn *htc, void *d, size_t len);
int
HTC_Complete
(
struct
http_conn
*
htc
);
int
HTC_Complete
(
struct
http_conn
*
htc
);
#define HTTPH(a, b, c, d, e, f, g) extern char b[];
#define HTTPH(a, b, c, d, e, f, g) extern char b[];
#include "http_headers.h"
#include "
tbl/
http_headers.h"
#undef HTTPH
#undef HTTPH
/* cache_main.c */
/* cache_main.c */
...
@@ -924,7 +924,7 @@ void VCL_Rel(struct VCL_conf **vcc);
...
@@ -924,7 +924,7 @@ void VCL_Rel(struct VCL_conf **vcc);
void
VCL_Poll
(
void
);
void
VCL_Poll
(
void
);
#define VCL_MET_MAC(l,u,b) void VCL_##l##_method(struct sess *);
#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
#undef VCL_MET_MAC
/* cache_vrt.c */
/* cache_vrt.c */
...
...
bin/varnishd/cache_ban.c
View file @
8b98c9ed
...
@@ -127,7 +127,7 @@ static const struct pvar {
...
@@ -127,7 +127,7 @@ static const struct pvar {
uint8_t
tag
;
uint8_t
tag
;
}
pvars
[]
=
{
}
pvars
[]
=
{
#define PVAR(a, b, c) { (a), (b), (c) },
#define PVAR(a, b, c) { (a), (b), (c) },
#include "ban_vars.h"
#include "
tbl/
ban_vars.h"
#undef PVAR
#undef PVAR
{
0
,
0
,
0
}
{
0
,
0
,
0
}
};
};
...
...
bin/varnishd/cache_http.c
View file @
8b98c9ed
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
#include "cache.h"
#include "cache.h"
#define HTTPH(a, b, c, d, e, f, g) char b[] = "*" a ":";
#define HTTPH(a, b, c, d, e, f, g) char b[] = "*" a ":";
#include "http_headers.h"
#include "
tbl/
http_headers.h"
#undef HTTPH
#undef HTTPH
/*lint -save -e773 not () */
/*lint -save -e773 not () */
...
@@ -91,7 +91,7 @@ static struct http_msg {
...
@@ -91,7 +91,7 @@ static struct http_msg {
const
char
*
txt
;
const
char
*
txt
;
}
http_msg
[]
=
{
}
http_msg
[]
=
{
#define HTTP_RESP(n, t) { n, t},
#define HTTP_RESP(n, t) { n, t},
#include "http_response.h"
#include "
tbl/
http_response.h"
{
0
,
NULL
}
{
0
,
NULL
}
};
};
...
@@ -830,7 +830,7 @@ http_EstimateWS(const struct http *fm, unsigned how, uint16_t *nhd)
...
@@ -830,7 +830,7 @@ http_EstimateWS(const struct http *fm, unsigned how, uint16_t *nhd)
#define HTTPH(a, b, c, d, e, f, g) \
#define HTTPH(a, b, c, d, e, f, g) \
if (((e) & how) && http_IsHdr(&fm->hd[u], (b))) \
if (((e) & how) && http_IsHdr(&fm->hd[u], (b))) \
continue;
continue;
#include "http_headers.h"
#include "
tbl/
http_headers.h"
#undef HTTPH
#undef HTTPH
l
+=
PRNDUP
(
Tlen
(
fm
->
hd
[
u
])
+
1
);
l
+=
PRNDUP
(
Tlen
(
fm
->
hd
[
u
])
+
1
);
(
*
nhd
)
++
;
(
*
nhd
)
++
;
...
@@ -859,7 +859,7 @@ http_FilterFields(struct worker *w, unsigned vsl_id, struct http *to,
...
@@ -859,7 +859,7 @@ http_FilterFields(struct worker *w, unsigned vsl_id, struct http *to,
#define HTTPH(a, b, c, d, e, f, g) \
#define HTTPH(a, b, c, d, e, f, g) \
if (((e) & how) && http_IsHdr(&fm->hd[u], (b))) \
if (((e) & how) && http_IsHdr(&fm->hd[u], (b))) \
continue;
continue;
#include "http_headers.h"
#include "
tbl/
http_headers.h"
#undef HTTPH
#undef HTTPH
http_copyheader
(
w
,
vsl_id
,
to
,
fm
,
u
);
http_copyheader
(
w
,
vsl_id
,
to
,
fm
,
u
);
}
}
...
@@ -1111,6 +1111,6 @@ HTTP_Init(void)
...
@@ -1111,6 +1111,6 @@ HTTP_Init(void)
{
{
#define HTTPH(a, b, c, d, e, f, g) b[0] = (char)strlen(b + 1);
#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
#undef HTTPH
}
}
bin/varnishd/cache_vcl.c
View file @
8b98c9ed
...
@@ -331,7 +331,7 @@ VCL_##func##_method(struct sess *sp) \
...
@@ -331,7 +331,7 @@ VCL_##func##_method(struct sess *sp) \
assert(!((1U << sp->handling) & ~bitmap)); \
assert(!((1U << sp->handling) & ~bitmap)); \
}
}
#include "vcl_returns.h"
#include "
tbl/
vcl_returns.h"
#undef VCL_MET_MAC
#undef VCL_MET_MAC
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
...
...
bin/varnishd/stevedore.c
View file @
8b98c9ed
...
@@ -597,5 +597,5 @@ VRT_Stv_##nm(const char *nm) \
...
@@ -597,5 +597,5 @@ VRT_Stv_##nm(const char *nm) \
return (stv->var_##nm(stv)); \
return (stv->var_##nm(stv)); \
}
}
#include "vrt_stv_var.h"
#include "
tbl/
vrt_stv_var.h"
#undef VRTSTVVAR
#undef VRTSTVVAR
bin/varnishd/stevedore.h
View file @
8b98c9ed
...
@@ -47,7 +47,7 @@ typedef void storage_close_f(const struct stevedore *);
...
@@ -47,7 +47,7 @@ typedef void storage_close_f(const struct stevedore *);
/* Prototypes for VCL variable responders */
/* Prototypes for VCL variable responders */
#define VRTSTVTYPE(ct) typedef ct storage_var_##ct(const struct stevedore *);
#define VRTSTVTYPE(ct) typedef ct storage_var_##ct(const struct stevedore *);
#include "vrt_stv_var.h"
#include "
tbl/
vrt_stv_var.h"
#undef VRTSTVTYPE
#undef VRTSTVTYPE
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
...
@@ -77,7 +77,7 @@ struct stevedore {
...
@@ -77,7 +77,7 @@ struct stevedore {
struct
lru
*
lru
;
struct
lru
*
lru
;
#define VRTSTVVAR(nm, vtype, ctype, dval) storage_var_##ctype *var_##nm;
#define VRTSTVVAR(nm, vtype, ctype, dval) storage_var_##ctype *var_##nm;
#include "vrt_stv_var.h"
#include "
tbl/
vrt_stv_var.h"
#undef VRTSTVVAR
#undef VRTSTVVAR
/* private fields */
/* private fields */
...
...
include/Makefile.am
View file @
8b98c9ed
...
@@ -11,7 +11,7 @@ pkginclude_HEADERS = \
...
@@ -11,7 +11,7 @@ pkginclude_HEADERS = \
vsm.h
vsm.h
nobase_noinst_HEADERS
=
\
nobase_noinst_HEADERS
=
\
ban_vars.h
\
tbl/
ban_vars.h
\
binary_heap.h
\
binary_heap.h
\
cli_common.h
\
cli_common.h
\
cli_priv.h
\
cli_priv.h
\
...
@@ -20,8 +20,8 @@ nobase_noinst_HEADERS = \
...
@@ -20,8 +20,8 @@ nobase_noinst_HEADERS = \
compat/execinfo.h
\
compat/execinfo.h
\
compat/srandomdev.h
\
compat/srandomdev.h
\
flopen.h
\
flopen.h
\
http_headers.h
\
tbl/
http_headers.h
\
http_response.h
\
tbl/
http_response.h
\
libvarnish.h
\
libvarnish.h
\
libvcl.h
\
libvcl.h
\
miniobj.h
\
miniobj.h
\
...
@@ -98,7 +98,9 @@ vmod_abi.h: vcs_version.h
...
@@ -98,7 +98,9 @@ vmod_abi.h: vcs_version.h
fi
;
\
fi
;
\
echo
"#define VMOD_ABI_Version
\"
@PACKAGE_STRING@
$$
GITID
\"
"
>
vmod_abi.h
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
\
vcl.h
\
vrt_obj.h
\
vrt_obj.h
\
vmod_abi.h
vmod_abi.h
include/ban_vars.h
→
include/
tbl/
ban_vars.h
View file @
8b98c9ed
File moved
include/http_headers.h
→
include/
tbl/
http_headers.h
View file @
8b98c9ed
File moved
include/http_response.h
→
include/
tbl/
http_response.h
View file @
8b98c9ed
File moved
lib/libvcl/generate.py
View file @
8b98c9ed
...
@@ -671,7 +671,7 @@ for i in returns:
...
@@ -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
)
file_header
(
fo
)
...
@@ -891,7 +891,7 @@ fo.close()
...
@@ -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
)
file_header
(
fo
)
...
...
lib/libvcl/vcc_action.c
View file @
8b98c9ed
...
@@ -269,7 +269,7 @@ parse_return(struct vcc *tl)
...
@@ -269,7 +269,7 @@ parse_return(struct vcc *tl)
retval = 1; \
retval = 1; \
} \
} \
} while (0);
} while (0);
#include "vcl_returns.h"
#include "
tbl/
vcl_returns.h"
#undef VCL_RET_MAC
#undef VCL_RET_MAC
if
(
!
retval
)
{
if
(
!
retval
)
{
VSB_printf
(
tl
->
sb
,
"Expected return action name.
\n
"
);
VSB_printf
(
tl
->
sb
,
"Expected return action name.
\n
"
);
...
@@ -330,7 +330,7 @@ static struct action_table {
...
@@ -330,7 +330,7 @@ static struct action_table {
#define VCL_RET_MAC(l, U, B) \
#define VCL_RET_MAC(l, U, B) \
{ #l, parse_new_syntax },
{ #l, parse_new_syntax },
#include "vcl_returns.h"
#include "
tbl/
vcl_returns.h"
#undef VCL_RET_MAC
#undef VCL_RET_MAC
/* Keep list sorted from here */
/* Keep list sorted from here */
...
...
lib/libvcl/vcc_compile.c
View file @
8b98c9ed
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
struct
method
method_tab
[]
=
{
struct
method
method_tab
[]
=
{
#define VCL_MET_MAC(l,U,m) { "vcl_"#l, m, VCL_MET_##U },
#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
#undef VCL_MET_MAC
{
NULL
,
0U
,
0
}
{
NULL
,
0U
,
0
}
};
};
...
@@ -374,7 +374,7 @@ EmitStruct(const struct vcc *tl)
...
@@ -374,7 +374,7 @@ EmitStruct(const struct vcc *tl)
Fc
(
tl
,
0
,
"
\t
.srcbody = srcbody,
\n
"
);
Fc
(
tl
,
0
,
"
\t
.srcbody = srcbody,
\n
"
);
#define VCL_MET_MAC(l,u,b) \
#define VCL_MET_MAC(l,u,b) \
Fc(tl, 0, "\t." #l "_func = VGC_function_vcl_" #l ",\n");
Fc(tl, 0, "\t." #l "_func = VGC_function_vcl_" #l ",\n");
#include "vcl_returns.h"
#include "
tbl/
vcl_returns.h"
#undef VCL_MET_MAC
#undef VCL_MET_MAC
Fc
(
tl
,
0
,
"};
\n
"
);
Fc
(
tl
,
0
,
"};
\n
"
);
}
}
...
@@ -722,7 +722,7 @@ VCC_Return_Name(unsigned method)
...
@@ -722,7 +722,7 @@ VCC_Return_Name(unsigned method)
switch
(
method
)
{
switch
(
method
)
{
#define VCL_RET_MAC(l, U, B) case VCL_RET_##U: return(#l);
#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
#undef VCL_RET_MAC
default:
default:
return
(
NULL
);
return
(
NULL
);
...
...
lib/libvcl/vcc_storage.c
View file @
8b98c9ed
...
@@ -80,7 +80,7 @@ vcc_Stv_mkvar(struct vcc *tl, const struct token *t, enum var_type fmt)
...
@@ -80,7 +80,7 @@ vcc_Stv_mkvar(struct vcc *tl, const struct token *t, enum var_type fmt)
v
->
name
=
TlDupTok
(
tl
,
t
);
v
->
name
=
TlDupTok
(
tl
,
t
);
v
->
r_methods
=
0
v
->
r_methods
=
0
#define VCL_MET_MAC(l,u,b) | VCL_MET_##u
#define VCL_MET_MAC(l,u,b) | VCL_MET_##u
#include "vcl_returns.h"
#include "
tbl/
vcl_returns.h"
#undef VCL_MET_MAC
#undef VCL_MET_MAC
;
;
v
->
fmt
=
fmt
;
v
->
fmt
=
fmt
;
...
@@ -93,7 +93,7 @@ static struct stvars {
...
@@ -93,7 +93,7 @@ static struct stvars {
enum
var_type
fmt
;
enum
var_type
fmt
;
}
stvars
[]
=
{
}
stvars
[]
=
{
#define VRTSTVVAR(nm, vtype, ctype, dval) { #nm, vtype },
#define VRTSTVVAR(nm, vtype, ctype, dval) { #nm, vtype },
#include "vrt_stv_var.h"
#include "
tbl/
vrt_stv_var.h"
#undef VRTSTVVAR
#undef VRTSTVVAR
{
NULL
,
BOOL
}
{
NULL
,
BOOL
}
};
};
...
...
lib/libvcl/vcc_xref.c
View file @
8b98c9ed
...
@@ -226,7 +226,7 @@ vcc_CheckActionRecurse(struct vcc *tl, struct proc *p, unsigned bitmap)
...
@@ -226,7 +226,7 @@ vcc_CheckActionRecurse(struct vcc *tl, struct proc *p, unsigned bitmap)
VSB_printf(tl->sb, "Invalid return \"" #l "\"\n");\
VSB_printf(tl->sb, "Invalid return \"" #l "\"\n");\
vcc_ErrWhere(tl, p->return_tok[VCL_RET_##U]); \
vcc_ErrWhere(tl, p->return_tok[VCL_RET_##U]); \
}
}
#include "vcl_returns.h"
#include "
tbl/
vcl_returns.h"
#undef VCL_RET_MAC
#undef VCL_RET_MAC
VSB_printf
(
tl
->
sb
,
"
\n
...in subroutine
\"
%.*s
\"\n
"
,
VSB_printf
(
tl
->
sb
,
"
\n
...in subroutine
\"
%.*s
\"\n
"
,
...
@@ -271,7 +271,7 @@ vcc_checkaction1(struct vcc *tl, const struct symbol *sym)
...
@@ -271,7 +271,7 @@ vcc_checkaction1(struct vcc *tl, const struct symbol *sym)
if (m->ret_bitmap & ((1 << VCL_RET_##U))) \
if (m->ret_bitmap & ((1 << VCL_RET_##U))) \
VSB_printf(tl->sb, " \"%s\"", #l);
VSB_printf(tl->sb, " \"%s\"", #l);
#include "vcl_returns.h"
#include "
tbl/
vcl_returns.h"
#undef VCL_RET_MAC
#undef VCL_RET_MAC
VSB_printf
(
tl
->
sb
,
"
\n
"
);
VSB_printf
(
tl
->
sb
,
"
\n
"
);
tl
->
err
=
1
;
tl
->
err
=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment