summaryrefslogtreecommitdiff
path: root/app.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-12-29 13:06:53 +0000
committerMark Spencer <markster@digium.com>2004-12-29 13:06:53 +0000
commit118b47674fb937cea0b9db77bc355db87d162ba6 (patch)
treed18c34e7ed8bf3e5fb01ed3bbc37cfcefb4084fe /app.c
parented185670730366ee4d9a15a1d2c70d0887a0c110 (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-xapp.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/app.c b/app.c
index dc078ce2a..c910605c5 100755
--- a/app.c
+++ b/app.c
@@ -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;
+}