Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
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
unique-xids
Commits
992ebc91
Commit
992ebc91
authored
Nov 08, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement VRE options with hard linkage to PCRE options instead
of maintaining magic hex-bit values that must match.
parent
2befbaf9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
vre.h
include/vre.h
+2
-2
vre.c
lib/libvarnish/vre.c
+13
-0
No files found.
include/vre.h
View file @
992ebc91
...
...
@@ -48,8 +48,8 @@ typedef struct vre vre_t;
#define VRE_ERROR_NOMATCH (-1)
/* And those to PCRE options */
#define VRE_CASELESS 0x00000001
#define VRE_NOTEMPTY_ATSTART 0x10000000
extern
const
unsigned
VRE_CASELESS
;
extern
const
unsigned
VRE_NOTEMPTY_ATSTART
;
vre_t
*
VRE_compile
(
const
char
*
,
int
,
const
char
**
,
int
*
);
int
VRE_exec
(
const
vre_t
*
code
,
const
char
*
subject
,
int
length
,
...
...
lib/libvarnish/vre.c
View file @
992ebc91
...
...
@@ -43,6 +43,19 @@ struct vre {
pcre
*
re
;
};
/*
* We don't want to spread or even expose the majority of PCRE options
* so we establish our own options and implement hard linkage to PCRE
* here.
*/
const
unsigned
VRE_CASELESS
=
PCRE_CASELESS
;
const
unsigned
VRE_NOTEMPTY_ATSTART
=
#ifdef PCRE_NOTEMPTY_ATSTART
PCRE_NOTEMPTY_ATSTART
;
#else
0
;
#endif
vre_t
*
VRE_compile
(
const
char
*
pattern
,
int
options
,
const
char
**
errptr
,
int
*
erroffset
)
...
...
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