Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-selector
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-selector
Commits
7fc3a4fe
Commit
7fc3a4fe
authored
Sep 07, 2020
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the patricia interface.
parent
7f6a85f9
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3 additions
and
980 deletions
+3
-980
Makefile.am
src/Makefile.am
+2
-6
patricia.c
src/patricia.c
+0
-433
patricia.h
src/patricia.h
+0
-75
Makefile.am
src/tests/bench/Makefile.am
+1
-5
bench.c
src/tests/bench/bench.c
+0
-461
No files found.
src/Makefile.am
View file @
7fc3a4fe
...
...
@@ -7,8 +7,6 @@ vmod_LTLIBRARIES = libvmod_selector.la
libvmod_selector_la_SOURCES
=
\
vmod_selector.c
\
patricia.h
\
patricia.c
\
qp.h
\
qp.c
\
popcnt_compat.h
\
...
...
@@ -26,11 +24,9 @@ dist_man_MANS = vmod_selector.3
@BUILD_VSC_SELECTOR@
vmod_selector.c
patricia.c
:
patricia
.h
vmod_selector.c
qp.c
:
qp.h popcnt_compat
.h
qp.c
:
qp.h popcnt_compat.h
ph.c
:
ph.h rnd.h
vmod_selector.c ph.c
:
ph.h rnd.h
vmod_selector.lo
:
$(nodist_libvmod_selector_la_SOURCES)
...
...
src/patricia.c
deleted
100644 → 0
View file @
7f6a85f9
This diff is collapsed.
Click to expand it.
src/patricia.h
deleted
100644 → 0
View file @
7f6a85f9
/*-
* Copyright (c) 2018 UPLEX Nils Goroll Systemoptimierung
* All rights reserved
*
* Author: Geoffrey Simmons <geoffrey.simmons@uplex.de>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <errno.h>
#include <limits.h>
#include <unistd.h>
#include "vsb.h"
struct
pt_y
;
struct
match_data
{
unsigned
magic
;
#define MATCH_DATA_MAGIC 0x0d9a845e
unsigned
*
indices
;
unsigned
limit
;
unsigned
n
;
unsigned
exact
;
unsigned
min
;
unsigned
max
;
};
struct
pt_stats
{
unsigned
magic
;
#define PT_STATS_MAGIC 0xf1c1114e
uint64_t
nodes
;
uint64_t
leaves
;
uint64_t
terms
;
uint64_t
nodesz
;
uint64_t
dmin
;
uint64_t
dmax
;
double
davg
;
};
void
PT_Init
(
void
);
int
PT_Inited
(
void
);
int
PT_Insert
(
struct
pt_y
*
*
restrict
root
,
unsigned
idx
,
char
*
const
restrict
*
const
restrict
strings
);
unsigned
PT_Lookup
(
const
struct
pt_y
*
const
restrict
root
,
char
*
const
restrict
*
const
restrict
strings
,
const
char
*
const
restrict
subject
);
int
PT_Prefixes
(
const
struct
pt_y
*
const
restrict
root
,
char
*
const
restrict
*
const
restrict
strings
,
const
char
*
const
restrict
subject
,
struct
match_data
*
const
restrict
match
);
void
PT_Stats
(
const
struct
pt_y
*
const
restrict
root
,
char
*
const
restrict
*
const
restrict
strings
,
struct
pt_stats
*
const
restrict
stats
);
void
PT_Free
(
struct
pt_y
*
y
);
struct
vsb
*
PT_Dump
(
struct
pt_y
*
root
,
char
**
strings
);
src/tests/bench/Makefile.am
View file @
7fc3a4fe
...
...
@@ -4,11 +4,7 @@ AM_CFLAGS = $(VARNISHAPI_CFLAGS) -I$(top_srcdir)/src -Wall -Werror -Wextra \
-std
=
c99
AM_LDFLAGS
=
$(VARNISHAPI_LIBS)
bin_PROGRAMS
=
bench bench_qp bench_ph
bench_SOURCES
=
bench.c
bench_LDADD
=
$(top_builddir)
/src/.libs/patricia.o
bin_PROGRAMS
=
bench_qp bench_ph
bench_qp_SOURCES
=
bench_qp.c
...
...
src/tests/bench/bench.c
deleted
100644 → 0
View file @
7f6a85f9
This diff is collapsed.
Click to expand it.
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