aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-06 21:32:23 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-06 21:32:23 +0000
commiteac30d741194acadac0a26f1ad3cec1e32a86ca2 (patch)
treee8818c78e616be2b5d8958c474a57c2a44f885a3 /include/asterisk
parent8f3ab72bb2d05279e0583b588a8b34b1a48f8de3 (diff)
Merged revisions 210908 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r210908 | tilghman | 2009-08-06 16:29:26 -0500 (Thu, 06 Aug 2009) | 9 lines Allow Gosub to recognize quote delimiters without consuming them. (closes issue #15557) Reported by: rain Patches: 20090723__issue15557.diff.txt uploaded by tilghman (license 14) Tested by: rain Review: https://reviewboard.asterisk.org/r/316/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@210909 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/app.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/asterisk/app.h b/include/asterisk/app.h
index cc2a3330d..2fc2ebc04 100644
--- a/include/asterisk/app.h
+++ b/include/asterisk/app.h
@@ -324,7 +324,9 @@ int ast_app_group_list_unlock(void);
the argc argument counter field.
*/
#define AST_STANDARD_APP_ARGS(args, parse) \
- args.argc = ast_app_separate_args(parse, ',', args.argv, ((sizeof(args) - offsetof(typeof(args), argv)) / sizeof(args.argv[0])))
+ args.argc = __ast_app_separate_args(parse, ',', 1, args.argv, ((sizeof(args) - offsetof(typeof(args), argv)) / sizeof(args.argv[0])))
+#define AST_STANDARD_RAW_ARGS(args, parse) \
+ args.argc = __ast_app_separate_args(parse, ',', 0, args.argv, ((sizeof(args) - offsetof(typeof(args), argv)) / sizeof(args.argv[0])))
/*!
\brief Performs the 'nonstandard' argument separation process for an application.
@@ -337,12 +339,15 @@ int ast_app_group_list_unlock(void);
the argc argument counter field.
*/
#define AST_NONSTANDARD_APP_ARGS(args, parse, sep) \
- args.argc = ast_app_separate_args(parse, sep, args.argv, ((sizeof(args) - offsetof(typeof(args), argv)) / sizeof(args.argv[0])))
+ args.argc = __ast_app_separate_args(parse, sep, 1, args.argv, ((sizeof(args) - offsetof(typeof(args), argv)) / sizeof(args.argv[0])))
+#define AST_NONSTANDARD_RAW_ARGS(args, parse, sep) \
+ args.argc = __ast_app_separate_args(parse, sep, 0, args.argv, ((sizeof(args) - offsetof(typeof(args), argv)) / sizeof(args.argv[0])))
/*!
\brief Separate a string into arguments in an array
\param buf The string to be parsed (this must be a writable copy, as it will be modified)
\param delim The character to be used to delimit arguments
+ \param remove_chars Remove backslashes and quote characters, while parsing
\param array An array of 'char *' to be filled in with pointers to the found arguments
\param arraylen The number of elements in the array (i.e. the number of arguments you will accept)
@@ -353,7 +358,8 @@ int ast_app_group_list_unlock(void);
\return The number of arguments found, or zero if the function arguments are not valid.
*/
-unsigned int ast_app_separate_args(char *buf, char delim, char **array, int arraylen);
+unsigned int __ast_app_separate_args(char *buf, char delim, int remove_chars, char **array, int arraylen);
+#define ast_app_separate_args(a,b,c,d) __ast_app_separate_args(a,b,1,c,d)
/*!
\brief A structure to hold the description of an application 'option'.