* Define WITH_SEP and WITHOUT_SEP for k. compatiblity
* Extend enum replace_special with REPLACE_SPEC
* Add pv_spec_t type to the union in replace_with
... | ... |
@@ -37,11 +37,16 @@ |
37 | 37 |
#define _re_h |
38 | 38 |
|
39 | 39 |
#include "str.h" |
40 |
+#include "pvar.h" |
|
40 | 41 |
#include "parser/msg_parser.h" |
41 | 42 |
#include <sys/types.h> /* for regex */ |
42 | 43 |
#include <regex.h> |
43 | 44 |
|
44 |
-enum replace_special { REPLACE_NMATCH, REPLACE_CHAR, REPLACE_URI }; |
|
45 |
+#define WITH_SEP 1 |
|
46 |
+#define WITHOUT_SEP 0 |
|
47 |
+ |
|
48 |
+enum replace_special { REPLACE_NMATCH, REPLACE_CHAR, REPLACE_URI, |
|
49 |
+ REPLACE_SPEC }; |
|
45 | 50 |
|
46 | 51 |
struct replace_with{ |
47 | 52 |
int offset; /* offset in string */ |
... | ... |
@@ -50,6 +55,7 @@ struct replace_with{ |
50 | 55 |
union{ |
51 | 56 |
int nmatch; |
52 | 57 |
char c; |
58 |
+ pv_spec_t spec; |
|
53 | 59 |
}u; |
54 | 60 |
}; |
55 | 61 |
|