From b1e34549c190b63293cbef10cb80383fa8607b29 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Sun, 25 Nov 2018 21:15:21 +0000 Subject: core: Split out the ability to parse wildcard files and directories from the Include/IncludeOptional directives into a generic set of functions ap_dir_nofnmatch() and ap_dir_fnmatch(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1847430 13f79535-47bb-0310-9956-ffa450edef68 --- include/http_config.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/http_config.h') diff --git a/include/http_config.h b/include/http_config.h index f940f84f6a..b74c61bf3f 100644 --- a/include/http_config.h +++ b/include/http_config.h @@ -938,6 +938,21 @@ AP_DECLARE(const char *) ap_walk_config(ap_directive_t *conftree, cmd_parms *parms, ap_conf_vector_t *section_vector); +/** + * Convenience function to create a ap_dir_match_t structure from a cmd_parms. + * + * @param cmd The command. + * @param flags Flags to indicate whether optional or recursive. + * @param cb Callback for each file found that matches the wildcard. Return NULL on + * success, an error string on error. + * @param ctx Context for the callback. + * @return Structure ap_dir_match_t with fields populated, allocated from the + * cmd->temp_pool. + */ +AP_DECLARE(ap_dir_match_t *)ap_dir_cfgmatch(cmd_parms *cmd, int flags, + const char *(*cb)(ap_dir_match_t *w, const char *fname), void *ctx) + __attribute__((nonnull(1,3))); + /** * @defgroup ap_check_cmd_context Check command context * @{ -- cgit v1.2.3