Commit 1a8c5a33 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Rename "struct tokenlist" to "struct vcc", it is much more than a simple

list of tokens and we need it to learn even more tricks now, which
will expose the type name outside this source directory.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4991 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 84d4c6e4
...@@ -97,7 +97,7 @@ vcl_acl_cmp(struct acl_e *ae1, struct acl_e *ae2) ...@@ -97,7 +97,7 @@ vcl_acl_cmp(struct acl_e *ae1, struct acl_e *ae2)
static void static void
vcc_acl_add_entry(struct tokenlist *tl, const struct acl_e *ae, int l, vcc_acl_add_entry(struct vcc *tl, const struct acl_e *ae, int l,
const unsigned char *u, int fam) const unsigned char *u, int fam)
{ {
struct acl_e *ae2, *aen; struct acl_e *ae2, *aen;
...@@ -162,7 +162,7 @@ vcc_acl_add_entry(struct tokenlist *tl, const struct acl_e *ae, int l, ...@@ -162,7 +162,7 @@ vcc_acl_add_entry(struct tokenlist *tl, const struct acl_e *ae, int l,
} }
static void static void
vcc_acl_try_getaddrinfo(struct tokenlist *tl, struct acl_e *ae) vcc_acl_try_getaddrinfo(struct vcc *tl, struct acl_e *ae)
{ {
struct addrinfo *res0, *res, hint; struct addrinfo *res0, *res, hint;
struct sockaddr_in *sin4; struct sockaddr_in *sin4;
...@@ -246,7 +246,7 @@ vcc_acl_try_getaddrinfo(struct tokenlist *tl, struct acl_e *ae) ...@@ -246,7 +246,7 @@ vcc_acl_try_getaddrinfo(struct tokenlist *tl, struct acl_e *ae)
*/ */
static int static int
vcc_acl_try_netnotation(struct tokenlist *tl, struct acl_e *ae) vcc_acl_try_netnotation(struct vcc *tl, struct acl_e *ae)
{ {
unsigned char b[4]; unsigned char b[4];
int i, j, k; int i, j, k;
...@@ -275,7 +275,7 @@ vcc_acl_try_netnotation(struct tokenlist *tl, struct acl_e *ae) ...@@ -275,7 +275,7 @@ vcc_acl_try_netnotation(struct tokenlist *tl, struct acl_e *ae)
} }
static void static void
vcc_acl_entry(struct tokenlist *tl) vcc_acl_entry(struct vcc *tl)
{ {
struct acl_e *ae; struct acl_e *ae;
...@@ -332,7 +332,7 @@ vcc_acl_entry(struct tokenlist *tl) ...@@ -332,7 +332,7 @@ vcc_acl_entry(struct tokenlist *tl)
/*lint -save -e506 -e774 -e550 */ /*lint -save -e506 -e774 -e550 */
static void static void
c_is_a_silly_language(const struct tokenlist *tl) c_is_a_silly_language(const struct vcc *tl)
{ {
struct sockaddr sa; struct sockaddr sa;
...@@ -351,7 +351,7 @@ c_is_a_silly_language(const struct tokenlist *tl) ...@@ -351,7 +351,7 @@ c_is_a_silly_language(const struct tokenlist *tl)
/*lint -restore */ /*lint -restore */
static void static void
vcc_acl_emit(const struct tokenlist *tl, const char *acln, int anon) vcc_acl_emit(const struct vcc *tl, const char *acln, int anon)
{ {
struct acl_e *ae; struct acl_e *ae;
int depth, l, m, i; int depth, l, m, i;
...@@ -449,7 +449,7 @@ vcc_acl_emit(const struct tokenlist *tl, const char *acln, int anon) ...@@ -449,7 +449,7 @@ vcc_acl_emit(const struct tokenlist *tl, const char *acln, int anon)
} }
void void
vcc_Cond_Ip(const struct var *vp, struct tokenlist *tl) vcc_Cond_Ip(const struct var *vp, struct vcc *tl)
{ {
unsigned tcond; unsigned tcond;
char acln[32]; char acln[32];
...@@ -486,7 +486,7 @@ vcc_Cond_Ip(const struct var *vp, struct tokenlist *tl) ...@@ -486,7 +486,7 @@ vcc_Cond_Ip(const struct var *vp, struct tokenlist *tl)
} }
void void
vcc_Acl(struct tokenlist *tl) vcc_Acl(struct vcc *tl)
{ {
struct token *an; struct token *an;
char acln[1024]; char acln[1024];
......
...@@ -47,7 +47,7 @@ SVNID("$Id$") ...@@ -47,7 +47,7 @@ SVNID("$Id$")
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
parse_call(struct tokenlist *tl) parse_call(struct vcc *tl)
{ {
vcc_NextToken(tl); vcc_NextToken(tl);
...@@ -63,7 +63,7 @@ parse_call(struct tokenlist *tl) ...@@ -63,7 +63,7 @@ parse_call(struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
parse_error(struct tokenlist *tl) parse_error(struct vcc *tl)
{ {
struct var *vp; struct var *vp;
...@@ -102,7 +102,7 @@ parse_error(struct tokenlist *tl) ...@@ -102,7 +102,7 @@ parse_error(struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
illegal_assignment(const struct tokenlist *tl, const char *type) illegal_assignment(const struct vcc *tl, const char *type)
{ {
vsb_printf(tl->sb, "Invalid assignment operator "); vsb_printf(tl->sb, "Invalid assignment operator ");
...@@ -112,7 +112,7 @@ illegal_assignment(const struct tokenlist *tl, const char *type) ...@@ -112,7 +112,7 @@ illegal_assignment(const struct tokenlist *tl, const char *type)
} }
static void static void
parse_set(struct tokenlist *tl) parse_set(struct vcc *tl)
{ {
struct var *vp; struct var *vp;
struct token *at, *vt; struct token *at, *vt;
...@@ -244,7 +244,7 @@ parse_set(struct tokenlist *tl) ...@@ -244,7 +244,7 @@ parse_set(struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
parse_unset(struct tokenlist *tl) parse_unset(struct vcc *tl)
{ {
struct var *vp; struct var *vp;
...@@ -277,7 +277,7 @@ static const struct purge_var { ...@@ -277,7 +277,7 @@ static const struct purge_var {
}; };
static void static void
parse_purge(struct tokenlist *tl) parse_purge(struct vcc *tl)
{ {
const struct purge_var *pv; const struct purge_var *pv;
...@@ -359,7 +359,7 @@ parse_purge(struct tokenlist *tl) ...@@ -359,7 +359,7 @@ parse_purge(struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
parse_purge_url(struct tokenlist *tl) parse_purge_url(struct vcc *tl)
{ {
vcc_NextToken(tl); vcc_NextToken(tl);
...@@ -379,7 +379,7 @@ parse_purge_url(struct tokenlist *tl) ...@@ -379,7 +379,7 @@ parse_purge_url(struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
parse_esi(struct tokenlist *tl) parse_esi(struct vcc *tl)
{ {
vcc_NextToken(tl); vcc_NextToken(tl);
...@@ -389,7 +389,7 @@ parse_esi(struct tokenlist *tl) ...@@ -389,7 +389,7 @@ parse_esi(struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
parse_new_syntax(struct tokenlist *tl) parse_new_syntax(struct vcc *tl)
{ {
vsb_printf(tl->sb, "Please change \"%.*s\" to \"return(%.*s)\".\n", vsb_printf(tl->sb, "Please change \"%.*s\" to \"return(%.*s)\".\n",
...@@ -400,7 +400,7 @@ parse_new_syntax(struct tokenlist *tl) ...@@ -400,7 +400,7 @@ parse_new_syntax(struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
parse_panic(struct tokenlist *tl) parse_panic(struct vcc *tl)
{ {
vcc_NextToken(tl); vcc_NextToken(tl);
...@@ -418,7 +418,7 @@ parse_panic(struct tokenlist *tl) ...@@ -418,7 +418,7 @@ parse_panic(struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
parse_return(struct tokenlist *tl) parse_return(struct vcc *tl)
{ {
int retval = 0; int retval = 0;
...@@ -450,7 +450,7 @@ parse_return(struct tokenlist *tl) ...@@ -450,7 +450,7 @@ parse_return(struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
parse_rollback(struct tokenlist *tl) parse_rollback(struct vcc *tl)
{ {
vcc_NextToken(tl); vcc_NextToken(tl);
...@@ -460,7 +460,7 @@ parse_rollback(struct tokenlist *tl) ...@@ -460,7 +460,7 @@ parse_rollback(struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
parse_synthetic(struct tokenlist *tl) parse_synthetic(struct vcc *tl)
{ {
vcc_NextToken(tl); vcc_NextToken(tl);
...@@ -477,7 +477,7 @@ parse_synthetic(struct tokenlist *tl) ...@@ -477,7 +477,7 @@ parse_synthetic(struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
typedef void action_f(struct tokenlist *tl); typedef void action_f(struct vcc *tl);
static struct action_table { static struct action_table {
const char *name; const char *name;
...@@ -507,7 +507,7 @@ static struct action_table { ...@@ -507,7 +507,7 @@ static struct action_table {
}; };
int int
vcc_ParseAction(struct tokenlist *tl) vcc_ParseAction(struct vcc *tl)
{ {
struct token *at; struct token *at;
struct action_table *atp; struct action_table *atp;
......
...@@ -97,7 +97,7 @@ CheckHostPort(const char *host, const char *port) ...@@ -97,7 +97,7 @@ CheckHostPort(const char *host, const char *port)
*/ */
static void static void
Emit_Sockaddr(struct tokenlist *tl, const struct token *t_host, Emit_Sockaddr(struct vcc *tl, const struct token *t_host,
const char *port) const char *port)
{ {
struct addrinfo *res, *res0, *res1, hint; struct addrinfo *res, *res0, *res1, hint;
...@@ -190,7 +190,7 @@ Emit_Sockaddr(struct tokenlist *tl, const struct token *t_host, ...@@ -190,7 +190,7 @@ Emit_Sockaddr(struct tokenlist *tl, const struct token *t_host,
*/ */
static void static void
vcc_EmitBeIdent(const struct tokenlist *tl, struct vsb *v, vcc_EmitBeIdent(const struct vcc *tl, struct vsb *v,
int serial, const struct token *first, const struct token *last) int serial, const struct token *first, const struct token *last)
{ {
...@@ -222,7 +222,7 @@ vcc_EmitBeIdent(const struct tokenlist *tl, struct vsb *v, ...@@ -222,7 +222,7 @@ vcc_EmitBeIdent(const struct tokenlist *tl, struct vsb *v,
*/ */
static void static void
vcc_ProbeRedef(struct tokenlist *tl, struct token **t_did, vcc_ProbeRedef(struct vcc *tl, struct token **t_did,
struct token *t_field) struct token *t_field)
{ {
/* .url and .request are mutually exclusive */ /* .url and .request are mutually exclusive */
...@@ -238,7 +238,7 @@ vcc_ProbeRedef(struct tokenlist *tl, struct token **t_did, ...@@ -238,7 +238,7 @@ vcc_ProbeRedef(struct tokenlist *tl, struct token **t_did,
} }
static void static void
vcc_ParseProbeSpec(struct tokenlist *tl) vcc_ParseProbeSpec(struct vcc *tl)
{ {
struct fld_spec *fs; struct fld_spec *fs;
struct token *t_field; struct token *t_field;
...@@ -378,7 +378,7 @@ vcc_ParseProbeSpec(struct tokenlist *tl) ...@@ -378,7 +378,7 @@ vcc_ParseProbeSpec(struct tokenlist *tl)
*/ */
void void
vcc_ParseProbe(struct tokenlist *tl) vcc_ParseProbe(struct vcc *tl)
{ {
struct token *t_probe; struct token *t_probe;
...@@ -402,7 +402,7 @@ vcc_ParseProbe(struct tokenlist *tl) ...@@ -402,7 +402,7 @@ vcc_ParseProbe(struct tokenlist *tl)
*/ */
static void static void
vcc_ParseHostDef(struct tokenlist *tl, int serial, const char *vgcname) vcc_ParseHostDef(struct vcc *tl, int serial, const char *vgcname)
{ {
struct token *t_field; struct token *t_field;
struct token *t_first; struct token *t_first;
...@@ -612,7 +612,7 @@ vcc_ParseHostDef(struct tokenlist *tl, int serial, const char *vgcname) ...@@ -612,7 +612,7 @@ vcc_ParseHostDef(struct tokenlist *tl, int serial, const char *vgcname)
*/ */
void void
vcc_ParseBackendHost(struct tokenlist *tl, int serial, char **nm) vcc_ParseBackendHost(struct vcc *tl, int serial, char **nm)
{ {
struct host *h; struct host *h;
struct token *t; struct token *t;
...@@ -666,7 +666,7 @@ vcc_ParseBackendHost(struct tokenlist *tl, int serial, char **nm) ...@@ -666,7 +666,7 @@ vcc_ParseBackendHost(struct tokenlist *tl, int serial, char **nm)
*/ */
static void static void
vcc_ParseSimpleDirector(struct tokenlist *tl) vcc_ParseSimpleDirector(struct vcc *tl)
{ {
struct host *h; struct host *h;
char vgcname[BUFSIZ]; char vgcname[BUFSIZ];
...@@ -700,7 +700,7 @@ static const struct dirlist { ...@@ -700,7 +700,7 @@ static const struct dirlist {
}; };
void void
vcc_ParseDirector(struct tokenlist *tl) vcc_ParseDirector(struct vcc *tl)
{ {
struct token *t_first; struct token *t_first;
struct dirlist const *dl; struct dirlist const *dl;
......
...@@ -67,7 +67,7 @@ vcc_ResetFldSpec(struct fld_spec *f) ...@@ -67,7 +67,7 @@ vcc_ResetFldSpec(struct fld_spec *f)
} }
struct fld_spec * struct fld_spec *
vcc_FldSpec(struct tokenlist *tl, const char *first, ...) vcc_FldSpec(struct vcc *tl, const char *first, ...)
{ {
struct fld_spec f[100], *r; struct fld_spec f[100], *r;
int n = 0; int n = 0;
...@@ -94,7 +94,7 @@ vcc_FldSpec(struct tokenlist *tl, const char *first, ...) ...@@ -94,7 +94,7 @@ vcc_FldSpec(struct tokenlist *tl, const char *first, ...)
} }
void void
vcc_IsField(struct tokenlist *tl, struct token **t, struct fld_spec *fs) vcc_IsField(struct vcc *tl, struct token **t, struct fld_spec *fs)
{ {
struct token *t_field; struct token *t_field;
...@@ -128,7 +128,7 @@ vcc_IsField(struct tokenlist *tl, struct token **t, struct fld_spec *fs) ...@@ -128,7 +128,7 @@ vcc_IsField(struct tokenlist *tl, struct token **t, struct fld_spec *fs)
} }
void void
vcc_FieldsOk(struct tokenlist *tl, const struct fld_spec *fs) vcc_FieldsOk(struct vcc *tl, const struct fld_spec *fs)
{ {
for (; fs->name != NULL; fs++) { for (; fs->name != NULL; fs++) {
......
...@@ -89,7 +89,7 @@ static const char *vcc_default_vcl_b, *vcc_default_vcl_e; ...@@ -89,7 +89,7 @@ static const char *vcc_default_vcl_b, *vcc_default_vcl_e;
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
TlDoFree(struct tokenlist *tl, void *p) TlDoFree(struct vcc *tl, void *p)
{ {
struct membit *mb; struct membit *mb;
...@@ -101,7 +101,7 @@ TlDoFree(struct tokenlist *tl, void *p) ...@@ -101,7 +101,7 @@ TlDoFree(struct tokenlist *tl, void *p)
void * void *
TlAlloc(struct tokenlist *tl, unsigned len) TlAlloc(struct vcc *tl, unsigned len)
{ {
void *p; void *p;
...@@ -130,7 +130,7 @@ IsMethod(const struct token *t) ...@@ -130,7 +130,7 @@ IsMethod(const struct token *t)
*/ */
void void
Fh(const struct tokenlist *tl, int indent, const char *fmt, ...) Fh(const struct vcc *tl, int indent, const char *fmt, ...)
{ {
va_list ap; va_list ap;
...@@ -142,7 +142,7 @@ Fh(const struct tokenlist *tl, int indent, const char *fmt, ...) ...@@ -142,7 +142,7 @@ Fh(const struct tokenlist *tl, int indent, const char *fmt, ...)
} }
void void
Fb(const struct tokenlist *tl, int indent, const char *fmt, ...) Fb(const struct vcc *tl, int indent, const char *fmt, ...)
{ {
va_list ap; va_list ap;
...@@ -155,7 +155,7 @@ Fb(const struct tokenlist *tl, int indent, const char *fmt, ...) ...@@ -155,7 +155,7 @@ Fb(const struct tokenlist *tl, int indent, const char *fmt, ...)
} }
void void
Fc(const struct tokenlist *tl, int indent, const char *fmt, ...) Fc(const struct vcc *tl, int indent, const char *fmt, ...)
{ {
va_list ap; va_list ap;
...@@ -167,7 +167,7 @@ Fc(const struct tokenlist *tl, int indent, const char *fmt, ...) ...@@ -167,7 +167,7 @@ Fc(const struct tokenlist *tl, int indent, const char *fmt, ...)
} }
void void
Fi(const struct tokenlist *tl, int indent, const char *fmt, ...) Fi(const struct vcc *tl, int indent, const char *fmt, ...)
{ {
va_list ap; va_list ap;
...@@ -179,7 +179,7 @@ Fi(const struct tokenlist *tl, int indent, const char *fmt, ...) ...@@ -179,7 +179,7 @@ Fi(const struct tokenlist *tl, int indent, const char *fmt, ...)
} }
void void
Ff(const struct tokenlist *tl, int indent, const char *fmt, ...) Ff(const struct vcc *tl, int indent, const char *fmt, ...)
{ {
va_list ap; va_list ap;
...@@ -239,7 +239,7 @@ EncToken(struct vsb *sb, const struct token *t) ...@@ -239,7 +239,7 @@ EncToken(struct vsb *sb, const struct token *t)
*/ */
static void static void
LocTable(const struct tokenlist *tl) LocTable(const struct vcc *tl)
{ {
struct token *t; struct token *t;
unsigned lin, pos; unsigned lin, pos;
...@@ -288,7 +288,7 @@ LocTable(const struct tokenlist *tl) ...@@ -288,7 +288,7 @@ LocTable(const struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
EmitInitFunc(const struct tokenlist *tl) EmitInitFunc(const struct vcc *tl)
{ {
Fc(tl, 0, "\nstatic void\nVGC_Init(struct cli *cli)\n{\n\n"); Fc(tl, 0, "\nstatic void\nVGC_Init(struct cli *cli)\n{\n\n");
...@@ -299,7 +299,7 @@ EmitInitFunc(const struct tokenlist *tl) ...@@ -299,7 +299,7 @@ EmitInitFunc(const struct tokenlist *tl)
} }
static void static void
EmitFiniFunc(const struct tokenlist *tl) EmitFiniFunc(const struct vcc *tl)
{ {
Fc(tl, 0, "\nstatic void\nVGC_Fini(struct cli *cli)\n{\n\n"); Fc(tl, 0, "\nstatic void\nVGC_Fini(struct cli *cli)\n{\n\n");
...@@ -312,7 +312,7 @@ EmitFiniFunc(const struct tokenlist *tl) ...@@ -312,7 +312,7 @@ EmitFiniFunc(const struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
EmitStruct(const struct tokenlist *tl) EmitStruct(const struct vcc *tl)
{ {
struct source *sp; struct source *sp;
...@@ -405,7 +405,7 @@ vcc_file_source(struct vsb *sb, const char *fn) ...@@ -405,7 +405,7 @@ vcc_file_source(struct vsb *sb, const char *fn)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
vcc_resolve_includes(struct tokenlist *tl) vcc_resolve_includes(struct vcc *tl)
{ {
struct token *t, *t1, *t2; struct token *t, *t1, *t2;
struct source *sp; struct source *sp;
...@@ -453,10 +453,10 @@ vcc_resolve_includes(struct tokenlist *tl) ...@@ -453,10 +453,10 @@ vcc_resolve_includes(struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static struct tokenlist * static struct vcc *
vcc_NewTokenList(void) vcc_NewTokenList(void)
{ {
struct tokenlist *tl; struct vcc *tl;
int i; int i;
tl = calloc(sizeof *tl, 1); tl = calloc(sizeof *tl, 1);
...@@ -498,7 +498,7 @@ vcc_NewTokenList(void) ...@@ -498,7 +498,7 @@ vcc_NewTokenList(void)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static char * static char *
vcc_DestroyTokenList(struct tokenlist *tl, char *ret) vcc_DestroyTokenList(struct vcc *tl, char *ret)
{ {
struct membit *mb; struct membit *mb;
struct source *sp; struct source *sp;
...@@ -534,7 +534,7 @@ vcc_DestroyTokenList(struct tokenlist *tl, char *ret) ...@@ -534,7 +534,7 @@ vcc_DestroyTokenList(struct tokenlist *tl, char *ret)
static char * static char *
vcc_CompileSource(struct vsb *sb, struct source *sp) vcc_CompileSource(struct vsb *sb, struct source *sp)
{ {
struct tokenlist *tl; struct vcc *tl;
char *of; char *of;
int i; int i;
......
...@@ -63,7 +63,7 @@ struct token { ...@@ -63,7 +63,7 @@ struct token {
VTAILQ_HEAD(tokenhead, token); VTAILQ_HEAD(tokenhead, token);
struct tokenlist { struct vcc {
struct tokenhead tokens; struct tokenhead tokens;
VTAILQ_HEAD(, source) sources; VTAILQ_HEAD(, source) sources;
VTAILQ_HEAD(, membit) membits; VTAILQ_HEAD(, membit) membits;
...@@ -149,23 +149,23 @@ struct method { ...@@ -149,23 +149,23 @@ struct method {
/* vcc_acl.c */ /* vcc_acl.c */
void vcc_Acl(struct tokenlist *tl); void vcc_Acl(struct vcc *tl);
void vcc_Cond_Ip(const struct var *vp, struct tokenlist *tl); void vcc_Cond_Ip(const struct var *vp, struct vcc *tl);
/* vcc_action.c */ /* vcc_action.c */
int vcc_ParseAction(struct tokenlist *tl); int vcc_ParseAction(struct vcc *tl);
/* vcc_backend.c */ /* vcc_backend.c */
struct fld_spec; struct fld_spec;
typedef void parsedirector_f(struct tokenlist *tl); typedef void parsedirector_f(struct vcc *tl);
void vcc_ParseProbe(struct tokenlist *tl); void vcc_ParseProbe(struct vcc *tl);
void vcc_ParseDirector(struct tokenlist *tl); void vcc_ParseDirector(struct vcc *tl);
void vcc_ParseBackendHost(struct tokenlist *tl, int serial, char **nm); void vcc_ParseBackendHost(struct vcc *tl, int serial, char **nm);
struct fld_spec * vcc_FldSpec(struct tokenlist *tl, const char *first, ...); struct fld_spec * vcc_FldSpec(struct vcc *tl, const char *first, ...);
void vcc_ResetFldSpec(struct fld_spec *f); void vcc_ResetFldSpec(struct fld_spec *f);
void vcc_IsField(struct tokenlist *tl, struct token **t, struct fld_spec *fs); void vcc_IsField(struct vcc *tl, struct token **t, struct fld_spec *fs);
void vcc_FieldsOk(struct tokenlist *tl, const struct fld_spec *fs); void vcc_FieldsOk(struct vcc *tl, const struct fld_spec *fs);
/* vcc_compile.c */ /* vcc_compile.c */
extern struct method method_tab[]; extern struct method method_tab[];
...@@ -176,14 +176,14 @@ extern struct method method_tab[]; ...@@ -176,14 +176,14 @@ extern struct method method_tab[];
* I -> Initializer function * I -> Initializer function
* F -> Finish function * F -> Finish function
*/ */
void Fh(const struct tokenlist *tl, int indent, const char *fmt, ...); void Fh(const struct vcc *tl, int indent, const char *fmt, ...);
void Fc(const struct tokenlist *tl, int indent, const char *fmt, ...); void Fc(const struct vcc *tl, int indent, const char *fmt, ...);
void Fb(const struct tokenlist *tl, int indent, const char *fmt, ...); void Fb(const struct vcc *tl, int indent, const char *fmt, ...);
void Fi(const struct tokenlist *tl, int indent, const char *fmt, ...); void Fi(const struct vcc *tl, int indent, const char *fmt, ...);
void Ff(const struct tokenlist *tl, int indent, const char *fmt, ...); void Ff(const struct vcc *tl, int indent, const char *fmt, ...);
void EncToken(struct vsb *sb, const struct token *t); void EncToken(struct vsb *sb, const struct token *t);
int IsMethod(const struct token *t); int IsMethod(const struct token *t);
void *TlAlloc(struct tokenlist *tl, unsigned len); void *TlAlloc(struct vcc *tl, unsigned len);
/* vcc_dir_random.c */ /* vcc_dir_random.c */
parsedirector_f vcc_ParseRandomDirector; parsedirector_f vcc_ParseRandomDirector;
...@@ -195,52 +195,52 @@ parsedirector_f vcc_ParseRoundRobinDirector; ...@@ -195,52 +195,52 @@ parsedirector_f vcc_ParseRoundRobinDirector;
extern struct var vcc_vars[]; extern struct var vcc_vars[];
/* vcc_parse.c */ /* vcc_parse.c */
void vcc_Parse(struct tokenlist *tl); void vcc_Parse(struct vcc *tl);
void vcc_RTimeVal(struct tokenlist *tl, double *); void vcc_RTimeVal(struct vcc *tl, double *);
void vcc_TimeVal(struct tokenlist *tl, double *); void vcc_TimeVal(struct vcc *tl, double *);
void vcc_SizeVal(struct tokenlist *tl, double *); void vcc_SizeVal(struct vcc *tl, double *);
unsigned vcc_UintVal(struct tokenlist *tl); unsigned vcc_UintVal(struct vcc *tl);
double vcc_DoubleVal(struct tokenlist *tl); double vcc_DoubleVal(struct vcc *tl);
/* vcc_string.c */ /* vcc_string.c */
char *vcc_regexp(struct tokenlist *tl); char *vcc_regexp(struct vcc *tl);
int vcc_StringVal(struct tokenlist *tl); int vcc_StringVal(struct vcc *tl);
void vcc_ExpectedStringval(struct tokenlist *tl); void vcc_ExpectedStringval(struct vcc *tl);
/* vcc_token.c */ /* vcc_token.c */
void vcc_Coord(const struct tokenlist *tl, struct vsb *vsb, void vcc_Coord(const struct vcc *tl, struct vsb *vsb,
const struct token *t); const struct token *t);
void vcc_ErrToken(const struct tokenlist *tl, const struct token *t); void vcc_ErrToken(const struct vcc *tl, const struct token *t);
void vcc_ErrWhere(struct tokenlist *tl, const struct token *t); void vcc_ErrWhere(struct vcc *tl, const struct token *t);
void vcc__Expect(struct tokenlist *tl, unsigned tok, int line); void vcc__Expect(struct vcc *tl, unsigned tok, int line);
int vcc_Teq(const struct token *t1, const struct token *t2); int vcc_Teq(const struct token *t1, const struct token *t2);
int vcc_IdIs(const struct token *t, const char *p); int vcc_IdIs(const struct token *t, const char *p);
void vcc_ExpectCid(struct tokenlist *tl); void vcc_ExpectCid(struct vcc *tl);
void vcc_Lexer(struct tokenlist *tl, struct source *sp); void vcc_Lexer(struct vcc *tl, struct source *sp);
void vcc_NextToken(struct tokenlist *tl); void vcc_NextToken(struct vcc *tl);
void vcc__ErrInternal(struct tokenlist *tl, const char *func, void vcc__ErrInternal(struct vcc *tl, const char *func,
unsigned line); unsigned line);
void vcc_AddToken(struct tokenlist *tl, unsigned tok, const char *b, void vcc_AddToken(struct vcc *tl, unsigned tok, const char *b,
const char *e); const char *e);
/* vcc_var.c */ /* vcc_var.c */
struct var *vcc_FindVar(struct tokenlist *tl, const struct token *t, struct var *vcc_FindVar(struct vcc *tl, const struct token *t,
struct var *vl, int wr_access, const char *use); struct var *vl, int wr_access, const char *use);
void vcc_VarVal(struct tokenlist *tl, const struct var *vp, void vcc_VarVal(struct vcc *tl, const struct var *vp,
const struct token *vt); const struct token *vt);
/* vcc_xref.c */ /* vcc_xref.c */
void vcc_AddDef(struct tokenlist *tl, struct token *t, enum ref_type type); void vcc_AddDef(struct vcc *tl, struct token *t, enum ref_type type);
void vcc_AddRef(struct tokenlist *tl, struct token *t, enum ref_type type); void vcc_AddRef(struct vcc *tl, struct token *t, enum ref_type type);
int vcc_CheckReferences(struct tokenlist *tl); int vcc_CheckReferences(struct vcc *tl);
void vcc_AddCall(struct tokenlist *tl, struct token *t); void vcc_AddCall(struct vcc *tl, struct token *t);
struct proc *vcc_AddProc(struct tokenlist *tl, struct token *t); struct proc *vcc_AddProc(struct vcc *tl, struct token *t);
void vcc_ProcAction(struct proc *p, unsigned action, struct token *t); void vcc_ProcAction(struct proc *p, unsigned action, struct token *t);
int vcc_CheckAction(struct tokenlist *tl); int vcc_CheckAction(struct vcc *tl);
void vcc_AddUses(struct tokenlist *tl, const struct token *t, unsigned mask, void vcc_AddUses(struct vcc *tl, const struct token *t, unsigned mask,
const char *use); const char *use);
int vcc_CheckUses(struct tokenlist *tl); int vcc_CheckUses(struct vcc *tl);
#define ERRCHK(tl) do { if ((tl)->err) return; } while (0) #define ERRCHK(tl) do { if ((tl)->err) return; } while (0)
#define ErrInternal(tl) vcc__ErrInternal(tl, __func__, __LINE__) #define ErrInternal(tl) vcc__ErrInternal(tl, __func__, __LINE__)
......
...@@ -50,7 +50,7 @@ SVNID("$Id$") ...@@ -50,7 +50,7 @@ SVNID("$Id$")
*/ */
void void
vcc_ParseRandomDirector(struct tokenlist *tl) vcc_ParseRandomDirector(struct vcc *tl)
{ {
struct token *t_field, *t_be; struct token *t_field, *t_be;
int nelem; int nelem;
......
...@@ -49,7 +49,7 @@ SVNID("$Id$") ...@@ -49,7 +49,7 @@ SVNID("$Id$")
*/ */
void void
vcc_ParseRoundRobinDirector(struct tokenlist *tl) vcc_ParseRoundRobinDirector(struct vcc *tl)
{ {
struct token *t_field, *t_be; struct token *t_field, *t_be;
int nelem; int nelem;
......
...@@ -44,8 +44,8 @@ SVNID("$Id$") ...@@ -44,8 +44,8 @@ SVNID("$Id$")
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void vcc_Compound(struct tokenlist *tl); static void vcc_Compound(struct vcc *tl);
static void vcc_Cond_0(struct tokenlist *tl); static void vcc_Cond_0(struct vcc *tl);
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
...@@ -65,7 +65,7 @@ static void vcc_Cond_0(struct tokenlist *tl); ...@@ -65,7 +65,7 @@ static void vcc_Cond_0(struct tokenlist *tl);
*/ */
static double static double
vcc_TimeUnit(struct tokenlist *tl) vcc_TimeUnit(struct vcc *tl)
{ {
double sc = 1.0; double sc = 1.0;
...@@ -98,7 +98,7 @@ vcc_TimeUnit(struct tokenlist *tl) ...@@ -98,7 +98,7 @@ vcc_TimeUnit(struct tokenlist *tl)
*/ */
static double static double
vcc_SizeUnit(struct tokenlist *tl) vcc_SizeUnit(struct vcc *tl)
{ {
double sc = 1.0; double sc = 1.0;
...@@ -128,7 +128,7 @@ vcc_SizeUnit(struct tokenlist *tl) ...@@ -128,7 +128,7 @@ vcc_SizeUnit(struct tokenlist *tl)
*/ */
unsigned unsigned
vcc_UintVal(struct tokenlist *tl) vcc_UintVal(struct vcc *tl)
{ {
unsigned d = 0; unsigned d = 0;
const char *p; const char *p;
...@@ -148,7 +148,7 @@ vcc_UintVal(struct tokenlist *tl) ...@@ -148,7 +148,7 @@ vcc_UintVal(struct tokenlist *tl)
*/ */
double double
vcc_DoubleVal(struct tokenlist *tl) vcc_DoubleVal(struct vcc *tl)
{ {
double d = 0.0, e = 0.1; double d = 0.0, e = 0.1;
const char *p; const char *p;
...@@ -177,7 +177,7 @@ vcc_DoubleVal(struct tokenlist *tl) ...@@ -177,7 +177,7 @@ vcc_DoubleVal(struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
void void
vcc_RTimeVal(struct tokenlist *tl, double *d) vcc_RTimeVal(struct vcc *tl, double *d)
{ {
double v, sc; double v, sc;
int sign = 1; int sign = 1;
...@@ -196,7 +196,7 @@ vcc_RTimeVal(struct tokenlist *tl, double *d) ...@@ -196,7 +196,7 @@ vcc_RTimeVal(struct tokenlist *tl, double *d)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
void void
vcc_TimeVal(struct tokenlist *tl, double *d) vcc_TimeVal(struct vcc *tl, double *d)
{ {
double v, sc; double v, sc;
...@@ -210,7 +210,7 @@ vcc_TimeVal(struct tokenlist *tl, double *d) ...@@ -210,7 +210,7 @@ vcc_TimeVal(struct tokenlist *tl, double *d)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
void void
vcc_SizeVal(struct tokenlist *tl, double *d) vcc_SizeVal(struct vcc *tl, double *d)
{ {
double v, sc; double v, sc;
...@@ -224,7 +224,7 @@ vcc_SizeVal(struct tokenlist *tl, double *d) ...@@ -224,7 +224,7 @@ vcc_SizeVal(struct tokenlist *tl, double *d)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
vcc_Cond_String(const struct var *vp, struct tokenlist *tl) vcc_Cond_String(const struct var *vp, struct vcc *tl)
{ {
char *p; char *p;
...@@ -258,7 +258,7 @@ vcc_Cond_String(const struct var *vp, struct tokenlist *tl) ...@@ -258,7 +258,7 @@ vcc_Cond_String(const struct var *vp, struct tokenlist *tl)
} }
static void static void
vcc_Cond_Int(const struct var *vp, struct tokenlist *tl) vcc_Cond_Int(const struct var *vp, struct vcc *tl)
{ {
Fb(tl, 1, "%s ", vp->rname); Fb(tl, 1, "%s ", vp->rname);
...@@ -287,14 +287,14 @@ vcc_Cond_Int(const struct var *vp, struct tokenlist *tl) ...@@ -287,14 +287,14 @@ vcc_Cond_Int(const struct var *vp, struct tokenlist *tl)
} }
static void static void
vcc_Cond_Bool(const struct var *vp, const struct tokenlist *tl) vcc_Cond_Bool(const struct var *vp, const struct vcc *tl)
{ {
Fb(tl, 1, "%s\n", vp->rname); Fb(tl, 1, "%s\n", vp->rname);
} }
static void static void
vcc_Cond_Backend(const struct var *vp, struct tokenlist *tl) vcc_Cond_Backend(const struct var *vp, struct vcc *tl)
{ {
Fb(tl, 1, "%s\n", vp->rname); Fb(tl, 1, "%s\n", vp->rname);
...@@ -320,7 +320,7 @@ vcc_Cond_Backend(const struct var *vp, struct tokenlist *tl) ...@@ -320,7 +320,7 @@ vcc_Cond_Backend(const struct var *vp, struct tokenlist *tl)
} }
static void static void
vcc_Cond_2(struct tokenlist *tl) vcc_Cond_2(struct vcc *tl)
{ {
struct var *vp; struct var *vp;
...@@ -370,7 +370,7 @@ vcc_Cond_2(struct tokenlist *tl) ...@@ -370,7 +370,7 @@ vcc_Cond_2(struct tokenlist *tl)
} }
static void static void
vcc_Cond_1(struct tokenlist *tl) vcc_Cond_1(struct vcc *tl)
{ {
Fb(tl, 1, "(\n"); Fb(tl, 1, "(\n");
...@@ -384,7 +384,7 @@ vcc_Cond_1(struct tokenlist *tl) ...@@ -384,7 +384,7 @@ vcc_Cond_1(struct tokenlist *tl)
} }
static void static void
vcc_Cond_0(struct tokenlist *tl) vcc_Cond_0(struct vcc *tl)
{ {
Fb(tl, 1, "(\n"); Fb(tl, 1, "(\n");
...@@ -398,7 +398,7 @@ vcc_Cond_0(struct tokenlist *tl) ...@@ -398,7 +398,7 @@ vcc_Cond_0(struct tokenlist *tl)
} }
static void static void
vcc_Conditional(struct tokenlist *tl) vcc_Conditional(struct vcc *tl)
{ {
SkipToken(tl, '('); SkipToken(tl, '(');
...@@ -412,7 +412,7 @@ vcc_Conditional(struct tokenlist *tl) ...@@ -412,7 +412,7 @@ vcc_Conditional(struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
vcc_IfStmt(struct tokenlist *tl) vcc_IfStmt(struct vcc *tl)
{ {
SkipToken(tl, T_IF); SkipToken(tl, T_IF);
...@@ -451,7 +451,7 @@ vcc_IfStmt(struct tokenlist *tl) ...@@ -451,7 +451,7 @@ vcc_IfStmt(struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
vcc_Compound(struct tokenlist *tl) vcc_Compound(struct vcc *tl)
{ {
int i; int i;
...@@ -505,7 +505,7 @@ vcc_Compound(struct tokenlist *tl) ...@@ -505,7 +505,7 @@ vcc_Compound(struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void static void
vcc_Function(struct tokenlist *tl) vcc_Function(struct vcc *tl)
{ {
int m; int m;
...@@ -560,7 +560,7 @@ vcc_Function(struct tokenlist *tl) ...@@ -560,7 +560,7 @@ vcc_Function(struct tokenlist *tl)
* End of input * End of input
*/ */
typedef void parse_f(struct tokenlist *tl); typedef void parse_f(struct vcc *tl);
static struct toplev { static struct toplev {
const char *name; const char *name;
...@@ -575,7 +575,7 @@ static struct toplev { ...@@ -575,7 +575,7 @@ static struct toplev {
}; };
void void
vcc_Parse(struct tokenlist *tl) vcc_Parse(struct vcc *tl)
{ {
struct toplev *tp; struct toplev *tp;
......
...@@ -47,7 +47,7 @@ SVNID("$Id$") ...@@ -47,7 +47,7 @@ SVNID("$Id$")
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
char * char *
vcc_regexp(struct tokenlist *tl) vcc_regexp(struct vcc *tl)
{ {
char buf[BUFSIZ], *p; char buf[BUFSIZ], *p;
vre_t *t; vre_t *t;
...@@ -81,7 +81,7 @@ vcc_regexp(struct tokenlist *tl) ...@@ -81,7 +81,7 @@ vcc_regexp(struct tokenlist *tl)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static int static int
vcc_regsub(struct tokenlist *tl, int all) vcc_regsub(struct vcc *tl, int all)
{ {
char *p; char *p;
...@@ -140,7 +140,7 @@ vcc_regsub(struct tokenlist *tl, int all) ...@@ -140,7 +140,7 @@ vcc_regsub(struct tokenlist *tl, int all)
*/ */
int int
vcc_StringVal(struct tokenlist *tl) vcc_StringVal(struct vcc *tl)
{ {
struct var *vp; struct var *vp;
...@@ -198,7 +198,7 @@ vcc_StringVal(struct tokenlist *tl) ...@@ -198,7 +198,7 @@ vcc_StringVal(struct tokenlist *tl)
} }
void void
vcc_ExpectedStringval(struct tokenlist *tl) vcc_ExpectedStringval(struct vcc *tl)
{ {
if (!tl->err) { if (!tl->err) {
......
...@@ -48,7 +48,7 @@ SVNID("$Id$") ...@@ -48,7 +48,7 @@ SVNID("$Id$")
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
void void
vcc_ErrToken(const struct tokenlist *tl, const struct token *t) vcc_ErrToken(const struct vcc *tl, const struct token *t)
{ {
if (t->tok == EOI) if (t->tok == EOI)
...@@ -60,7 +60,7 @@ vcc_ErrToken(const struct tokenlist *tl, const struct token *t) ...@@ -60,7 +60,7 @@ vcc_ErrToken(const struct tokenlist *tl, const struct token *t)
} }
void void
vcc__ErrInternal(struct tokenlist *tl, const char *func, unsigned line) vcc__ErrInternal(struct vcc *tl, const char *func, unsigned line)
{ {
vsb_printf(tl->sb, "VCL compiler internal error at %s():%u\n", vsb_printf(tl->sb, "VCL compiler internal error at %s():%u\n",
...@@ -97,7 +97,7 @@ vcc_icoord(struct vsb *vsb, const struct token *t, const char **ll) ...@@ -97,7 +97,7 @@ vcc_icoord(struct vsb *vsb, const struct token *t, const char **ll)
} }
void void
vcc_Coord(const struct tokenlist *tl, struct vsb *vsb, const struct token *t) vcc_Coord(const struct vcc *tl, struct vsb *vsb, const struct token *t)
{ {
if (t == NULL) if (t == NULL)
...@@ -106,7 +106,7 @@ vcc_Coord(const struct tokenlist *tl, struct vsb *vsb, const struct token *t) ...@@ -106,7 +106,7 @@ vcc_Coord(const struct tokenlist *tl, struct vsb *vsb, const struct token *t)
} }
void void
vcc_ErrWhere(struct tokenlist *tl, const struct token *t) vcc_ErrWhere(struct vcc *tl, const struct token *t)
{ {
unsigned x, y; unsigned x, y;
const char *p, *l, *e; const char *p, *l, *e;
...@@ -156,7 +156,7 @@ vcc_ErrWhere(struct tokenlist *tl, const struct token *t) ...@@ -156,7 +156,7 @@ vcc_ErrWhere(struct tokenlist *tl, const struct token *t)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
void void
vcc_NextToken(struct tokenlist *tl) vcc_NextToken(struct vcc *tl)
{ {
tl->t = VTAILQ_NEXT(tl->t, list); tl->t = VTAILQ_NEXT(tl->t, list);
...@@ -170,7 +170,7 @@ vcc_NextToken(struct tokenlist *tl) ...@@ -170,7 +170,7 @@ vcc_NextToken(struct tokenlist *tl)
} }
void void
vcc__Expect(struct tokenlist *tl, unsigned tok, int line) vcc__Expect(struct vcc *tl, unsigned tok, int line)
{ {
if (tl->t->tok == tok) if (tl->t->tok == tok)
return; return;
...@@ -228,7 +228,7 @@ vcc_isCid(const struct token *t) ...@@ -228,7 +228,7 @@ vcc_isCid(const struct token *t)
} }
void void
vcc_ExpectCid(struct tokenlist *tl) vcc_ExpectCid(struct vcc *tl)
{ {
ExpectErr(tl, ID); ExpectErr(tl, ID);
...@@ -260,7 +260,7 @@ vcc_xdig(const char c) ...@@ -260,7 +260,7 @@ vcc_xdig(const char c)
} }
static int static int
vcc_decstr(struct tokenlist *tl) vcc_decstr(struct vcc *tl)
{ {
const char *p; const char *p;
char *q; char *q;
...@@ -309,7 +309,7 @@ vcc_decstr(struct tokenlist *tl) ...@@ -309,7 +309,7 @@ vcc_decstr(struct tokenlist *tl)
*/ */
void void
vcc_AddToken(struct tokenlist *tl, unsigned tok, const char *b, const char *e) vcc_AddToken(struct vcc *tl, unsigned tok, const char *b, const char *e)
{ {
struct token *t; struct token *t;
...@@ -331,7 +331,7 @@ vcc_AddToken(struct tokenlist *tl, unsigned tok, const char *b, const char *e) ...@@ -331,7 +331,7 @@ vcc_AddToken(struct tokenlist *tl, unsigned tok, const char *b, const char *e)
*/ */
void void
vcc_Lexer(struct tokenlist *tl, struct source *sp) vcc_Lexer(struct vcc *tl, struct source *sp)
{ {
const char *p, *q; const char *p, *q;
unsigned u; unsigned u;
......
...@@ -44,7 +44,7 @@ SVNID("$Id$") ...@@ -44,7 +44,7 @@ SVNID("$Id$")
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static struct var * static struct var *
HeaderVar(struct tokenlist *tl, const struct token *t, const struct var *vh) HeaderVar(struct vcc *tl, const struct token *t, const struct var *vh)
{ {
char *p; char *p;
struct var *v; struct var *v;
...@@ -87,7 +87,7 @@ HeaderVar(struct tokenlist *tl, const struct token *t, const struct var *vh) ...@@ -87,7 +87,7 @@ HeaderVar(struct tokenlist *tl, const struct token *t, const struct var *vh)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
struct var * struct var *
vcc_FindVar(struct tokenlist *tl, const struct token *t, struct var *vl, vcc_FindVar(struct vcc *tl, const struct token *t, struct var *vl,
int wr_access, const char *use) int wr_access, const char *use)
{ {
struct var *v; struct var *v;
...@@ -132,7 +132,7 @@ vcc_FindVar(struct tokenlist *tl, const struct token *t, struct var *vl, ...@@ -132,7 +132,7 @@ vcc_FindVar(struct tokenlist *tl, const struct token *t, struct var *vl,
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
void void
vcc_VarVal(struct tokenlist *tl, const struct var *vp, const struct token *vt) vcc_VarVal(struct vcc *tl, const struct var *vp, const struct token *vt)
{ {
double d; double d;
......
...@@ -80,7 +80,7 @@ struct proc { ...@@ -80,7 +80,7 @@ struct proc {
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static const char * static const char *
vcc_typename(struct tokenlist *tl, const struct ref *r) vcc_typename(struct vcc *tl, const struct ref *r)
{ {
switch (r->type) { switch (r->type) {
case R_FUNC: return ("function"); case R_FUNC: return ("function");
...@@ -102,7 +102,7 @@ vcc_typename(struct tokenlist *tl, const struct ref *r) ...@@ -102,7 +102,7 @@ vcc_typename(struct tokenlist *tl, const struct ref *r)
*/ */
static struct ref * static struct ref *
vcc_findref(struct tokenlist *tl, struct token *t, enum ref_type type) vcc_findref(struct vcc *tl, struct token *t, enum ref_type type)
{ {
struct ref *r; struct ref *r;
...@@ -121,14 +121,14 @@ vcc_findref(struct tokenlist *tl, struct token *t, enum ref_type type) ...@@ -121,14 +121,14 @@ vcc_findref(struct tokenlist *tl, struct token *t, enum ref_type type)
} }
void void
vcc_AddRef(struct tokenlist *tl, struct token *t, enum ref_type type) vcc_AddRef(struct vcc *tl, struct token *t, enum ref_type type)
{ {
vcc_findref(tl, t, type)->refcnt++; vcc_findref(tl, t, type)->refcnt++;
} }
void void
vcc_AddDef(struct tokenlist *tl, struct token *t, enum ref_type type) vcc_AddDef(struct vcc *tl, struct token *t, enum ref_type type)
{ {
struct ref *r; struct ref *r;
const char *tp; const char *tp;
...@@ -149,7 +149,7 @@ vcc_AddDef(struct tokenlist *tl, struct token *t, enum ref_type type) ...@@ -149,7 +149,7 @@ vcc_AddDef(struct tokenlist *tl, struct token *t, enum ref_type type)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
int int
vcc_CheckReferences(struct tokenlist *tl) vcc_CheckReferences(struct vcc *tl)
{ {
struct ref *r; struct ref *r;
const char *type; const char *type;
...@@ -184,7 +184,7 @@ vcc_CheckReferences(struct tokenlist *tl) ...@@ -184,7 +184,7 @@ vcc_CheckReferences(struct tokenlist *tl)
*/ */
static struct proc * static struct proc *
vcc_findproc(struct tokenlist *tl, struct token *t) vcc_findproc(struct vcc *tl, struct token *t)
{ {
struct proc *p; struct proc *p;
...@@ -201,7 +201,7 @@ vcc_findproc(struct tokenlist *tl, struct token *t) ...@@ -201,7 +201,7 @@ vcc_findproc(struct tokenlist *tl, struct token *t)
} }
struct proc * struct proc *
vcc_AddProc(struct tokenlist *tl, struct token *t) vcc_AddProc(struct vcc *tl, struct token *t)
{ {
struct proc *p; struct proc *p;
...@@ -212,7 +212,7 @@ vcc_AddProc(struct tokenlist *tl, struct token *t) ...@@ -212,7 +212,7 @@ vcc_AddProc(struct tokenlist *tl, struct token *t)
} }
void void
vcc_AddUses(struct tokenlist *tl, const struct token *t, unsigned mask, vcc_AddUses(struct vcc *tl, const struct token *t, unsigned mask,
const char *use) const char *use)
{ {
struct procuse *pu; struct procuse *pu;
...@@ -229,7 +229,7 @@ vcc_AddUses(struct tokenlist *tl, const struct token *t, unsigned mask, ...@@ -229,7 +229,7 @@ vcc_AddUses(struct tokenlist *tl, const struct token *t, unsigned mask,
} }
void void
vcc_AddCall(struct tokenlist *tl, struct token *t) vcc_AddCall(struct vcc *tl, struct token *t)
{ {
struct proccall *pc; struct proccall *pc;
struct proc *p; struct proc *p;
...@@ -254,7 +254,7 @@ vcc_ProcAction(struct proc *p, unsigned returns, struct token *t) ...@@ -254,7 +254,7 @@ vcc_ProcAction(struct proc *p, unsigned returns, struct token *t)
} }
static int static int
vcc_CheckActionRecurse(struct tokenlist *tl, struct proc *p, unsigned bitmap) vcc_CheckActionRecurse(struct vcc *tl, struct proc *p, unsigned bitmap)
{ {
unsigned u; unsigned u;
struct proccall *pc; struct proccall *pc;
...@@ -299,7 +299,7 @@ vcc_CheckActionRecurse(struct tokenlist *tl, struct proc *p, unsigned bitmap) ...@@ -299,7 +299,7 @@ vcc_CheckActionRecurse(struct tokenlist *tl, struct proc *p, unsigned bitmap)
} }
int int
vcc_CheckAction(struct tokenlist *tl) vcc_CheckAction(struct vcc *tl)
{ {
struct proc *p; struct proc *p;
struct method *m; struct method *m;
...@@ -348,7 +348,7 @@ vcc_FindIllegalUse(const struct proc *p, const struct method *m) ...@@ -348,7 +348,7 @@ vcc_FindIllegalUse(const struct proc *p, const struct method *m)
} }
static int static int
vcc_CheckUseRecurse(struct tokenlist *tl, const struct proc *p, vcc_CheckUseRecurse(struct vcc *tl, const struct proc *p,
struct method *m) struct method *m)
{ {
struct proccall *pc; struct proccall *pc;
...@@ -377,7 +377,7 @@ vcc_CheckUseRecurse(struct tokenlist *tl, const struct proc *p, ...@@ -377,7 +377,7 @@ vcc_CheckUseRecurse(struct tokenlist *tl, const struct proc *p,
} }
int int
vcc_CheckUses(struct tokenlist *tl) vcc_CheckUses(struct vcc *tl)
{ {
struct proc *p; struct proc *p;
struct method *m; struct method *m;
......
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