diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-29 13:06:53 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-29 13:06:53 +0000 |
commit | f4cfc00ddaafedf246c288bae1736e43d2382326 (patch) | |
tree | d18c34e7ed8bf3e5fb01ed3bbc37cfcefb4084fe /app.c | |
parent | 54d64330bd8655f1f02fe6fa21a776e69a37d88a (diff) |
Merge anthm's app_read addition, somewhat modified (bug #3013)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4587 f38db490-d61c-443f-a65b-d21fe96a405b
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; +} |