From 2f25e4b83e9805beb1d5314c14fe5a0d59a240f3 Mon Sep 17 00:00:00 2001 From: "David M. Lee" Date: Wed, 9 Jan 2013 20:12:00 +0000 Subject: Move declaration of ast_regex_string_to_regex_pattern futher down strings.h. The prior location is before the declaration of struct ast_str, which causes compiler warnings. (closes issue ASTERISK-20852) Reported by: Pavel Troller Patches: strings.diff uploaded by Pavel Troller (license 6302) ........ Merged revisions 378747 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378748 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/strings.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h index 84261cdcb..afbda7816 100644 --- a/include/asterisk/strings.h +++ b/include/asterisk/strings.h @@ -252,21 +252,6 @@ int ast_build_string(char **buffer, size_t *space, const char *fmt, ...) __attri */ int ast_build_string_va(char **buffer, size_t *space, const char *fmt, va_list ap) __attribute__((format(printf, 3, 0))); -/*! - * \brief Given a string regex_string in the form of "/regex/", convert it into the form of "regex" - * - * This function will trim one leading / and one trailing / from a given input string - * ast_str regex_pattern must be preallocated before calling this function - * - * \return 0 on success, non-zero on failure. - * \return 1 if we only stripped a leading / - * \return 2 if we only stripped a trailing / - * \return 3 if we did not strip any / characters - * \param regex_string the string containing /regex/ - * \param regex_pattern the destination ast_str which will contain "regex" after execution - */ -int ast_regex_string_to_regex_pattern(const char *regex_string, struct ast_str **regex_pattern); - /*! * \brief Make sure something is true. * Determine if a string containing a boolean value is "true". @@ -386,6 +371,21 @@ struct ast_str { char __AST_STR_STR[0]; /*!< The string buffer */ }; +/*! + * \brief Given a string regex_string in the form of "/regex/", convert it into the form of "regex" + * + * This function will trim one leading / and one trailing / from a given input string + * ast_str regex_pattern must be preallocated before calling this function + * + * \return 0 on success, non-zero on failure. + * \return 1 if we only stripped a leading / + * \return 2 if we only stripped a trailing / + * \return 3 if we did not strip any / characters + * \param regex_string the string containing /regex/ + * \param regex_pattern the destination ast_str which will contain "regex" after execution + */ +int ast_regex_string_to_regex_pattern(const char *regex_string, struct ast_str **regex_pattern); + /*! * \brief Create a malloc'ed dynamic length string * -- cgit v1.2.3