mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 09:58:17 +00:00
add missing "execute" handler to phrase macro. (not yet tested)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6234 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -288,6 +288,36 @@ SWITCH_DECLARE(char *) switch_strip_spaces(const char *str)
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(char *) switch_separate_paren_args(char *str)
|
||||
{
|
||||
char *e, *args;
|
||||
switch_size_t br;
|
||||
|
||||
if ((args = strchr(str, '('))) {
|
||||
e = args - 1;
|
||||
*args++ = '\0';
|
||||
while(*e == ' ') {
|
||||
*e-- = '\0';
|
||||
}
|
||||
e = args;
|
||||
br = 1;
|
||||
while(e && *e) {
|
||||
if (*e == '(') {
|
||||
br++;
|
||||
} else if (br > 1 && *e == ')') {
|
||||
br--;
|
||||
} else if (br == 1 && *e == ')') {
|
||||
*e = '\0';
|
||||
break;
|
||||
}
|
||||
e++;
|
||||
}
|
||||
}
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_bool_t) switch_is_number(const char *str)
|
||||
{
|
||||
const char *p;
|
||||
|
Reference in New Issue
Block a user