case BACKEND:
if (tl->t->tok == '=') {
NextToken(tl);
- Fc(tl, 0, "= &VGC_backend_%T;\n",
- tl->t);
+ Fc(tl, 0, "= &VGC_backend_%T;\n", tl->t);
NextToken(tl);
break;
}
tl->curproc = AddProc(tl, tl->t, 1);
tl->curproc->exists++;
AddDef(tl, tl->t, R_FUNC);
- Fh(tl, 0,
- "static int VGC_function_%T (struct sess *sp);\n", tl->t);
+ Fh(tl, 0, "static int VGC_function_%T (struct sess *sp);\n", tl->t);
Fc(tl, 1, "static int\n");
Fc(tl, 1, "VGC_function_%T (struct sess *sp)\n", tl->t);
NextToken(tl);
unsigned lin, pos;
const char *p;
- Fh(tl, 0,
- "#define VGC_NREFS %u\n", tl->cnt + 1);
- Fh(tl, 0,
- "static struct vrt_ref VGC_ref[VGC_NREFS];\n");
- Fc(tl, 0,
- "static struct vrt_ref VGC_ref[VGC_NREFS] = {\n");
+ Fh(tl, 0, "#define VGC_NREFS %u\n", tl->cnt + 1);
+ Fh(tl, 0, "static struct vrt_ref VGC_ref[VGC_NREFS];\n");
+ Fc(tl, 0, "static struct vrt_ref VGC_ref[VGC_NREFS] = {\n");
lin = 1;
pos = 0;
p = tl->b;
pos++;
}
- Fc(tl, 0,
- "%*.*s[%3u] = { %4u, %3u, 0, \"T\" },\n",
- INDENT, INDENT, "",
+ Fc(tl, 0, " [%3u] = { %4u, %3u, 0, \"T\" },\n",
t->cnt, lin, pos + 1, t);
}
Fc(tl, 0, "};\n");
{
struct ref *r;
- Fc(tl, 0,
- "\nstatic void\n"
- "VGC_Init(void)\n"
- "{\n\n");
-
- Fc(tl, 0,
- "\tVRT_alloc_backends(&VCL_conf);\n");
+ Fc(tl, 0, "\nstatic void\nVGC_Init(void)\n{\n\n");
+ Fc(tl, 0, "\tVRT_alloc_backends(&VCL_conf);\n");
TAILQ_FOREACH(r, &tl->refs, list) {
switch(r->type) {
case R_ACL:
break;
case R_BACKEND:
- Fc(tl, 0,
- "\tVGC_init_backend_%T();\n", r->name);
+ Fc(tl, 0, "\tVGC_init_backend_%T();\n", r->name);
break;
}
}
{
Fc(tl, 0, "\nstruct VCL_conf VCL_conf = {\n");
- Fc(tl, 0,
- "\t.magic = VCL_CONF_MAGIC,\n");
- Fc(tl, 0,
- "\t.init_func = VGC_Init,\n");
+ Fc(tl, 0, "\t.magic = VCL_CONF_MAGIC,\n");
+ Fc(tl, 0, "\t.init_func = VGC_Init,\n");
Fc(tl, 0, "\t.recv_func = VGC_function_vcl_recv,\n");
Fc(tl, 0, "\t.hit_func = VGC_function_vcl_hit,\n");
Fc(tl, 0, "\t.miss_func = VGC_function_vcl_miss,\n");
Fc(tl, 0, "\t.fetch_func = VGC_function_vcl_fetch,\n");
- Fc(tl, 0,
- "\t.nbackend = %d,\n", tl->nbackend);
- Fc(tl, 0,
- "\t.ref = VGC_ref,\n");
- Fc(tl, 0,
- "\t.nref = VGC_NREFS,\n");
+ Fc(tl, 0, "\t.nbackend = %d,\n", tl->nbackend);
+ Fc(tl, 0, "\t.ref = VGC_ref,\n");
+ Fc(tl, 0, "\t.nref = VGC_NREFS,\n");
Fc(tl, 0, "};\n");
}