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
ca5fe969
Commit
ca5fe969
authored
Jun 22, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://git.varnish-cache.org/git/varnish-cache
parents
8f85e380
403a3619
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
74 deletions
+8
-74
flint.sh
bin/varnishd/flint.sh
+7
-0
libvarnish.h
include/libvarnish.h
+0
-2
vcc_backend.c
lib/libvcl/vcc_backend.c
+0
-38
vcc_compile.h
lib/libvcl/vcc_compile.h
+0
-7
vcc_expr.c
lib/libvcl/vcc_expr.c
+1
-1
vcc_var.c
lib/libvcl/vcc_var.c
+0
-26
No files found.
bin/varnishd/flint.sh
View file @
ca5fe969
#!/bin/sh
if
[
"x
$1
"
=
"x-ok"
-a
-f
_.fl
]
;
then
echo
"Saved as reference"
mv
_.fl _.fl.old
exit
0
fi
flexelint
\
../flint.lnt
\
flint.lnt
\
...
...
@@ -21,5 +27,6 @@ if [ -f _.fl.old ] ; then
fi
if
[
"x
$1
"
=
"x-ok"
]
;
then
echo
"Saved as reference"
mv
_.fl _.fl.old
fi
include/libvarnish.h
View file @
ca5fe969
...
...
@@ -104,8 +104,6 @@ int vtmpfile(char *);
char
*
vreadfile
(
const
char
*
pfx
,
const
char
*
fn
,
ssize_t
*
sz
);
char
*
vreadfd
(
int
fd
,
ssize_t
*
sz
);
const
char
*
VCS_Version
(
void
);
/* Safe printf into a fixed-size buffer */
#define bprintf(buf, fmt, ...) \
do { \
...
...
lib/libvcl/vcc_backend.c
View file @
ca5fe969
...
...
@@ -210,44 +210,6 @@ Emit_Sockaddr(struct vcc *tl, const struct token *t_host, const char *port)
}
}
/*--------------------------------------------------------------------
* When a new VCL is loaded, it is likely to contain backend declarations
* identical to other loaded VCL programs, and we want to reuse the state
* of those in order to not have to relearn statistics, DNS etc.
*
* This function emits a space separated text-string of the tokens which
* define a given backend which can be used to determine "identical backend"
* in that context.
*/
void
vcc_EmitBeIdent
(
const
struct
vcc
*
tl
,
struct
vsb
*
v
,
int
serial
,
const
struct
token
*
first
,
const
struct
token
*
last
)
{
assert
(
first
!=
last
);
VSB_printf
(
v
,
"
\t
.ident ="
);
if
(
serial
>=
0
)
{
VSB_printf
(
v
,
"
\n\t
\"
%.*s %.*s [%d]
\"
"
,
PF
(
tl
->
t_policy
),
PF
(
tl
->
t_dir
),
serial
);
}
else
{
VSB_printf
(
v
,
"
\n\t
\"
%.*s %.*s
\"
"
,
PF
(
tl
->
t_policy
),
PF
(
tl
->
t_dir
));
}
while
(
1
)
{
if
(
first
->
dec
!=
NULL
)
VSB_printf
(
v
,
"
\n\t
\"\\\"\"
%.*s
\"\\\"
\"
"
,
PF
(
first
));
else
VSB_printf
(
v
,
"
\n\t
\"
%.*s
\"
"
,
PF
(
first
));
if
(
first
==
last
)
break
;
first
=
VTAILQ_NEXT
(
first
,
list
);
AN
(
first
);
}
VSB_printf
(
v
,
",
\n
"
);
}
/*--------------------------------------------------------------------
* Parse a backend probe specification
*/
...
...
lib/libvcl/vcc_compile.h
View file @
ca5fe969
...
...
@@ -210,8 +210,6 @@ void vcc_IsField(struct vcc *tl, struct token **t, struct fld_spec *fs);
void
vcc_FieldsOk
(
struct
vcc
*
tl
,
const
struct
fld_spec
*
fs
);
void
Emit_Sockaddr
(
struct
vcc
*
tl
,
const
struct
token
*
t_host
,
const
char
*
port
);
void
vcc_EmitBeIdent
(
const
struct
vcc
*
tl
,
struct
vsb
*
v
,
int
serial
,
const
struct
token
*
first
,
const
struct
token
*
last
);
/* vcc_compile.c */
extern
struct
method
method_tab
[];
...
...
@@ -245,7 +243,6 @@ parsedirector_f vcc_ParseRoundRobinDirector;
void
vcc_RTimeVal
(
struct
vcc
*
tl
,
double
*
);
void
vcc_TimeVal
(
struct
vcc
*
tl
,
double
*
);
unsigned
vcc_UintVal
(
struct
vcc
*
tl
);
double
vcc_DoubleVal
(
struct
vcc
*
tl
);
void
vcc_Expr
(
struct
vcc
*
tl
,
enum
var_type
typ
);
void
vcc_Expr_Call
(
struct
vcc
*
tl
,
const
struct
symbol
*
sym
);
void
vcc_Expr_Init
(
struct
vcc
*
tl
);
...
...
@@ -267,8 +264,6 @@ sym_wildcard_t vcc_Stv_Wildcard;
/* vcc_string.c */
char
*
vcc_regexp
(
struct
vcc
*
tl
);
int
vcc_StringVal
(
struct
vcc
*
tl
);
void
vcc_ExpectedStringval
(
struct
vcc
*
tl
);
/* vcc_symb.c */
struct
symbol
*
VCC_AddSymbolStr
(
struct
vcc
*
tl
,
const
char
*
name
,
enum
symkind
);
...
...
@@ -303,8 +298,6 @@ void vcc_AddToken(struct vcc *tl, unsigned tok, const char *b,
sym_wildcard_t
vcc_Var_Wildcard
;
const
struct
var
*
vcc_FindVar
(
struct
vcc
*
tl
,
const
struct
token
*
t
,
int
wr_access
,
const
char
*
use
);
void
vcc_VarVal
(
struct
vcc
*
tl
,
const
struct
var
*
vp
,
const
struct
token
*
vt
);
/* vcc_vmod.c */
void
vcc_ParseImport
(
struct
vcc
*
tl
);
...
...
lib/libvcl/vcc_expr.c
View file @
ca5fe969
...
...
@@ -145,7 +145,7 @@ vcc_NumVal(struct vcc *tl, double *d, int *frac)
vcc_NextToken
(
tl
);
}
double
static
double
vcc_DoubleVal
(
struct
vcc
*
tl
)
{
double
d
;
...
...
lib/libvcl/vcc_var.c
View file @
ca5fe969
...
...
@@ -121,29 +121,3 @@ vcc_FindVar(struct vcc *tl, const struct token *t, int wr_access,
vcc_ErrWhere
(
tl
,
t
);
return
(
NULL
);
}
/*--------------------------------------------------------------------*/
void
vcc_VarVal
(
struct
vcc
*
tl
,
const
struct
var
*
vp
,
const
struct
token
*
vt
)
{
double
d
;
if
(
vp
->
fmt
==
TIME
)
{
vcc_TimeVal
(
tl
,
&
d
);
ERRCHK
(
tl
);
Fb
(
tl
,
0
,
"%g"
,
d
);
}
else
if
(
vp
->
fmt
==
DURATION
)
{
vcc_RTimeVal
(
tl
,
&
d
);
ERRCHK
(
tl
);
Fb
(
tl
,
0
,
"%g"
,
d
);
}
else
if
(
vp
->
fmt
==
INT
)
{
Fb
(
tl
,
0
,
"%u"
,
vcc_UintVal
(
tl
));
}
else
{
AN
(
vt
);
VSB_printf
(
tl
->
sb
,
"Variable has incompatible type.
\n
"
);
vcc_ErrWhere
(
tl
,
vt
);
return
;
}
}
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