Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Robert Dubner
OpenLDAP
Commits
1d1cd218
Commit
1d1cd218
authored
Mar 10, 2004
by
Pierangelo Masarati
Browse files
allow '$' as action prefix instead of '%'; backward compatibility is preserved
parent
823fa170
Changes
3
Hide whitespace changes
Inline
Side-by-side
libraries/librewrite/map.c
View file @
1d1cd218
...
...
@@ -51,7 +51,7 @@ rewrite_map_parse(
* Go to the end of the map invocation (the right closing brace)
*/
for
(
p
=
string
,
cnt
=
1
;
p
[
0
]
!=
'\0'
&&
cnt
>
0
;
p
++
)
{
if
(
p
[
0
]
==
REWRITE_SUBMATCH_ESCAPE
)
{
if
(
IS_
REWRITE_SUBMATCH_ESCAPE
(
p
[
0
]
)
)
{
/*
* '%' marks the beginning of a new map
*/
...
...
libraries/librewrite/rewrite-int.h
View file @
1d1cd218
...
...
@@ -55,7 +55,10 @@
*/
/* the '\' conflicts with slapd.conf parsing */
/* #define REWRITE_SUBMATCH_ESCAPE '\\' */
#define REWRITE_SUBMATCH_ESCAPE '%'
#define REWRITE_SUBMATCH_ESCAPE_ORIG '%'
#define REWRITE_SUBMATCH_ESCAPE '$'
#define IS_REWRITE_SUBMATCH_ESCAPE(c) \
((c) == REWRITE_SUBMATCH_ESCAPE || (c) == REWRITE_SUBMATCH_ESCAPE_ORIG)
/*
* REGEX flags
...
...
libraries/librewrite/subst.c
View file @
1d1cd218
...
...
@@ -55,11 +55,11 @@ rewrite_subst_compile(
/*
* Keep only single escapes '%'
*/
if
(
p
[
0
]
!=
REWRITE_SUBMATCH_ESCAPE
)
{
if
(
!
IS_
REWRITE_SUBMATCH_ESCAPE
(
p
[
0
]
)
)
{
continue
;
}
if
(
p
[
1
]
==
REWRITE_SUBMATCH_ESCAPE
)
{
if
(
IS_
REWRITE_SUBMATCH_ESCAPE
(
p
[
1
]
)
)
{
/* Pull &p[1] over p, including the trailing '\0' */
AC_MEMCPY
((
char
*
)
p
,
&
p
[
1
],
strlen
(
p
)
);
continue
;
...
...
Write
Preview
Supports
Markdown
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