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
ffeec826
Commit
ffeec826
authored
Apr 20, 2018
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Whitespace OCD
parent
b8c80ccb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
36 deletions
+35
-36
vjsn.c
lib/libvarnish/vjsn.c
+35
-36
No files found.
lib/libvarnish/vjsn.c
View file @
ffeec826
...
...
@@ -520,42 +520,41 @@ vjsn_dump(const struct vjsn *js, FILE *fo)
*
* And run this python in test_parsing:
import glob
skip = {}
def emit(fin):
if fin in skip:
return
x = bytearray(open(fin).read())
if 0 in x:
return
if len(x) > 1000:
return
t = '\t"'
for i in x:
t += "\\x%02x" % i
if len(t) > 64:
print(t + '"')
t = '\t"'
print(t + '",')
print("const char *good[] = {")
l = list(glob.glob("y_*"))
l.sort()
for f in l:
emit(f)
print("\tNULL")
print("};")
print("const char *bad[] = {")
l = list(glob.glob("n_*"))
l.sort()
for f in l:
emit(f)
print("\tNULL")
print("};")
import glob
skip = {}
def emit(fin):
if fin in skip:
return
x = bytearray(open(fin).read())
if 0 in x:
return
if len(x) > 1000:
return
t = '\t"'
for i in x:
t += "\\x%02x" % i
if len(t) > 64:
print(t + '"')
t = '\t"'
print(t + '",')
print("const char *good[] = {")
l = list(glob.glob("y_*"))
l.sort()
for f in l:
emit(f)
print("\tNULL")
print("};")
print("const char *bad[] = {")
l = list(glob.glob("n_*"))
l.sort()
for f in l:
emit(f)
print("\tNULL")
print("};")
*/
static
const
char
*
good
[]
=
{
...
...
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