regex-quote: New API.
authorBruno Haible <bruno@clisp.org>
Tue, 8 Mar 2011 09:09:47 +0000 (10:09 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 8 Mar 2011 09:09:47 +0000 (10:09 +0100)
commitfbfced515f325dd000c80fa35ade86e567d0ea3c
tree15edd13725f7da5660cd80cd1d968df9a7d24569
parent6ff7b70e24f0e84e9f65ef6d021ff239cad0b2b4
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.
ChangeLog
NEWS
lib/regex-quote.c
lib/regex-quote.h
modules/regex-quote
tests/test-regex-quote.c