aboutsummaryrefslogtreecommitdiffstats
path: root/app.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-12-29 13:06:53 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-12-29 13:06:53 +0000
commitf4cfc00ddaafedf246c288bae1736e43d2382326 (patch)
treed18c34e7ed8bf3e5fb01ed3bbc37cfcefb4084fe /app.c
parent54d64330bd8655f1f02fe6fa21a776e69a37d88a (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-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;
+}