Commit a32c8272 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Put some "section headers" in the compiled VCL code.

parent 174552e3
......@@ -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('\tVSB_cat(sb, "/* ---===### %s ###===--- */\\n");\n' % bn)
for c in fc:
if l == 0:
fo.write("\tVSB_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("""
}
......
......@@ -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 here ###===---*/\n");
Fh(tl, 0, "\n/* ---===### VCC generated code ###===---*/\n");
Fh(tl, 0, "\nextern const struct VCL_conf VCL_conf;\n");
/* Macro for accessing directors */
......
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