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
ae65ef43
Commit
ae65ef43
authored
May 07, 2024
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vte: New VTE_dump() utility
parent
a367c015
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
vte.h
include/vte.h
+1
-0
vte.c
lib/libvarnish/vte.c
+17
-0
No files found.
include/vte.h
View file @
ae65ef43
...
@@ -47,4 +47,5 @@ int VTE_cat(struct vte *, const char *);
...
@@ -47,4 +47,5 @@ int VTE_cat(struct vte *, const char *);
int
VTE_printf
(
struct
vte
*
,
const
char
*
,
...)
v_printflike_
(
2
,
3
);
int
VTE_printf
(
struct
vte
*
,
const
char
*
,
...)
v_printflike_
(
2
,
3
);
int
VTE_finish
(
struct
vte
*
);
int
VTE_finish
(
struct
vte
*
);
int
VTE_format
(
const
struct
vte
*
,
VTE_format_f
*
func
,
void
*
priv
);
int
VTE_format
(
const
struct
vte
*
,
VTE_format_f
*
func
,
void
*
priv
);
int
VTE_dump
(
const
struct
vte
*
,
VTE_format_f
*
func
,
void
*
priv
);
void
VTE_destroy
(
struct
vte
**
);
void
VTE_destroy
(
struct
vte
**
);
lib/libvarnish/vte.c
View file @
ae65ef43
...
@@ -239,6 +239,23 @@ VTE_finish(struct vte *vte)
...
@@ -239,6 +239,23 @@ VTE_finish(struct vte *vte)
return (-1); \
return (-1); \
} while (0)
} while (0)
int
VTE_dump
(
const
struct
vte
*
vte
,
VTE_format_f
*
func
,
void
*
priv
)
{
const
char
*
p
;
CHECK_OBJ_NOTNULL
(
vte
,
VTE_MAGIC
);
AN
(
func
);
if
(
vte
->
o_sep
<=
0
)
return
(
-
1
);
p
=
VSB_data
(
vte
->
vsb
);
AN
(
p
);
VTE_FORMAT
(
func
,
priv
,
"%s"
,
p
);
return
(
0
);
}
int
int
VTE_format
(
const
struct
vte
*
vte
,
VTE_format_f
*
func
,
void
*
priv
)
VTE_format
(
const
struct
vte
*
vte
,
VTE_format_f
*
func
,
void
*
priv
)
{
{
...
...
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