diff options
author | Mark Spencer <markster@digium.com> | 2004-12-29 13:06:53 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-12-29 13:06:53 +0000 |
commit | 118b47674fb937cea0b9db77bc355db87d162ba6 (patch) | |
tree | d18c34e7ed8bf3e5fb01ed3bbc37cfcefb4084fe /app.c | |
parent | ed185670730366ee4d9a15a1d2c70d0887a0c110 (diff) |
Merge anthm's app_read addition, somewhat modified (bug #3013)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'app.c')
-rwxr-xr-x | app.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -1070,3 +1070,18 @@ int ast_app_group_match_get_count(char *groupmatch, char *category) return count; } + +int ast_seperate_app_args(char *buf, char delim, char **array, int arraylen) +{ + int x = 0; + memset(array, 0, arraylen * sizeof(char *)); + if (!buf) + return 0; + for (array[x] = buf ; x < arraylen && array[x]; x++) { + if ((array[x+1] = strchr(array[x], delim))) { + *array[x+1] = '\0'; + array[x+1]++; + } + } + return x; +} |