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
6b2a3a39
Commit
6b2a3a39
authored
Jun 13, 2013
by
Martin Blix Grydeland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rst option generation
parent
673a8555
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
7 deletions
+19
-7
vapi_options.h
include/vapi/vapi_options.h
+3
-3
opt2rst.c
lib/libvarnishtools/opt2rst.c
+16
-4
No files found.
include/vapi/vapi_options.h
View file @
6b2a3a39
...
...
@@ -60,7 +60,7 @@
)
#define VSL_OPT_g \
VOPT("g:", "[-g
{session|request|vxid|raw}
]", "Grouping mode", \
VOPT("g:", "[-g
<session|request|vxid|raw>
]", "Grouping mode", \
"The grouping of the log records. The default is to group" \
" by request." \
)
...
...
@@ -74,7 +74,7 @@
)
#define VSL_OPT_I \
VOPT("I:", "[-I
[tag:]regex
]", "Include by regex", \
VOPT("I:", "[-I
<[tag:]regex>
]", "Include by regex", \
"Include by regex matching. Output only records matching" \
" tag and regular expression. Applies to any tag if tag" \
" is * or empty.\n" \
...
...
@@ -115,7 +115,7 @@
)
#define VSL_OPT_X \
VOPT("X:", "[-X
[tag:]regex
]", "Exclude by regex", \
VOPT("X:", "[-X
<[tag:]regex>
]", "Exclude by regex", \
"Exclude by regex matching. Do not output records matching" \
" tag and regular expression. Applies to any tag if tag" \
" is * or empty." \
...
...
lib/libvarnishtools/opt2rst.c
View file @
6b2a3a39
...
...
@@ -30,17 +30,29 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include "vapi/voptget.h"
static
void
print_nobrackets
(
const
char
*
s
)
{
for
(;
*
s
;
s
++
)
{
if
(
strchr
(
"[]"
,
*
s
))
continue
;
printf
(
"%c"
,
*
s
);
const
char
*
e
;
/* Remove whitespace */
while
(
isspace
(
*
s
))
s
++
;
e
=
s
+
strlen
(
s
);
while
(
e
>
s
&&
isspace
(
e
[
-
1
]))
e
--
;
/* Remove outer layer brackets if present */
if
(
e
>
s
&&
*
s
==
'['
&&
e
[
-
1
]
==
']'
)
{
s
++
;
e
--
;
}
printf
(
"%.*s"
,
(
int
)(
e
-
s
),
s
);
}
static
void
...
...
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