Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
a32c8272
Commit
a32c8272
authored
Oct 27, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put some "section headers" in the compiled VCL code.
parent
174552e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
generate.py
lib/libvcc/generate.py
+7
-4
vcc_compile.c
lib/libvcc/vcc_compile.c
+1
-1
No files found.
lib/libvcc/generate.py
View file @
a32c8272
...
...
@@ -542,7 +542,9 @@ def emit_vcl_tnames(fo, tokens):
#######################################################################
# Read a C-source file and spit out code that outputs it with VSB_cat()
def
emit_file
(
fo
,
fn
):
def
emit_file
(
fo
,
fd
,
bn
):
fn
=
fd
+
"/"
+
bn
fi
=
open
(
fn
)
fc
=
fi
.
read
()
fi
.
close
()
...
...
@@ -553,6 +555,7 @@ def emit_file(fo, fn):
x
=
0
l
=
0
fo
.
write
(
"
\n\t
/*
%
s */
\n\n
"
%
fn
)
fo
.
write
(
'
\t
VSB_cat(sb, "/* ---===###
%
s ###===--- */
\\
n");
\n
'
%
bn
)
for
c
in
fc
:
if
l
==
0
:
fo
.
write
(
"
\t
VSB_cat(sb,
\"
"
)
...
...
@@ -878,9 +881,9 @@ vcl_output_lang_h(struct vsb *sb)
{
"""
)
emit_file
(
fo
,
buildroot
+
"/
include/vcl.h"
)
emit_file
(
fo
,
srcroot
+
"/
include/vrt.h"
)
emit_file
(
fo
,
buildroot
+
"/
include/vrt_obj.h"
)
emit_file
(
fo
,
buildroot
,
"
include/vcl.h"
)
emit_file
(
fo
,
srcroot
,
"
include/vrt.h"
)
emit_file
(
fo
,
buildroot
,
"
include/vrt_obj.h"
)
fo
.
write
(
"""
}
...
...
lib/libvcc/vcc_compile.c
View file @
a32c8272
...
...
@@ -626,7 +626,7 @@ vcc_CompileSource(const struct vcc *tl0, struct vsb *sb, struct source *sp)
sym
->
wildcard
=
vcc_Stv_Wildcard
;
vcl_output_lang_h
(
tl
->
fh
);
Fh
(
tl
,
0
,
"
\n
/* ---===### VCC generated
below her
e ###===---*/
\n
"
);
Fh
(
tl
,
0
,
"
\n
/* ---===### VCC generated
cod
e ###===---*/
\n
"
);
Fh
(
tl
,
0
,
"
\n
extern const struct VCL_conf VCL_conf;
\n
"
);
/* Macro for accessing directors */
...
...
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