diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-04 03:43:10 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-04 03:43:10 +0000 |
commit | 1d2cc0bca445bdfd8a45920b6f52553215ca5414 (patch) | |
tree | 56af51f8a78199fe20d1dfb4a5cfe4f66c80df50 /include | |
parent | 741dead410df7e0efc12ceecd447f5da832d5d72 (diff) |
re-implement ast_separate_app_args with clearer code and in a way that doesn't fail with certain combinations of array size and delimiter count
add doxygen docs for ast_separate_app_args
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5566 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rwxr-xr-x | include/asterisk/app.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/asterisk/app.h b/include/asterisk/app.h index b50dfe36b..8d571e28e 100755 --- a/include/asterisk/app.h +++ b/include/asterisk/app.h @@ -162,7 +162,18 @@ int ast_app_group_get_count(char *group, char *category); /*! Get the current channel count of all groups that match the specified pattern and category. */ int ast_app_group_match_get_count(char *groupmatch, char *category); -/*! Create an argc argv type structure for app args */ +/*! + \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 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) + + Note: if there are more arguments in the string than the array will hold, the last element of + the array will contain the remaining arguments, not separated. + + \return The number of arguments found, or zero if the function arguments are not valid. +*/ int ast_separate_app_args(char *buf, char delim, char **array, int arraylen); /*! Present a dialtone and collect a certain length extension. Returns 1 on valid extension entered, -1 on hangup, or 0 on invalid extension. Note that if 'collect' holds digits already, new digits will be appended, so be sure it's initialized properly */ |