1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-08 17:22:05 +03:00

regex-quote: New API.

* lib/regex-quote.h: Include <stdbool.h>.
(struct regex_quote_spec): New type.
(regex_quote_spec_posix, regex_quote_spec_gnu, regex_quote_spec_pcre):
New declarations.
(regex_quote_length, regex_quote_copy, regex_quote): Take a
'const struct regex_quote_spec *' argument.
* lib/regex-quote.c (RE_*, PCRE_*): New macros.
(pcre_special): New constant.
(regex_quote_spec_posix, regex_quote_spec_gnu, regex_quote_spec_pcre):
New functions.
(regex_quote_length, regex_quote_copy, regex_quote): Take a
'const struct regex_quote_spec *' argument.
* modules/regex-quote (Depends-on): Add stdbool.
* tests/test-regex-quote.c (check): Update for new API. Add test for
anchored results.
* NEWS: Mention the API change.
Reported by Reuben Thomas and Eric Blake.
This commit is contained in:
Bruno Haible
2011-03-08 10:09:47 +01:00
parent 6ff7b70e24
commit fbfced515f
6 changed files with 265 additions and 43 deletions

View File

@@ -6,6 +6,7 @@ lib/regex-quote.h
lib/regex-quote.c
Depends-on:
stdbool
xalloc
mbuiter