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