summaryrefslogtreecommitdiff
path: root/apps/app_festival.c
diff options
context:
space:
mode:
authorSean Bright <sean@malleable.com>2008-08-10 14:45:25 +0000
committerSean Bright <sean@malleable.com>2008-08-10 14:45:25 +0000
commit3ffb39833b25a02108214d7584733bc6b9c334df (patch)
tree9d240f929d1efd30035a0505db16ba0f8e1ca439 /apps/app_festival.c
parent357bf3e90be71578e0b32303c41c5d29f2714c2b (diff)
More RSW merges. Everything from apps/ except for the big offenders
app_voicemail and app_queue. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_festival.c')
-rw-r--r--apps/app_festival.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/app_festival.c b/apps/app_festival.c
index 42b71fb76..d9659ebef 100644
--- a/apps/app_festival.c
+++ b/apps/app_festival.c
@@ -330,22 +330,22 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
snprintf(newfestivalcommand, strln, "%s%s%s", startcmd, args.text, endcmd);
festivalcommand = newfestivalcommand;
} else { /* This else parses the festivalcommand that we're sent from the config file for \n's, etc */
- int i, j;
+ int x, j;
newfestivalcommand = alloca(strlen(festivalcommand) + strlen(args.text) + 1);
- for (i = 0, j = 0; i < strlen(festivalcommand); i++) {
- if (festivalcommand[i] == '\\' && festivalcommand[i + 1] == 'n') {
+ for (x = 0, j = 0; x < strlen(festivalcommand); x++) {
+ if (festivalcommand[x] == '\\' && festivalcommand[x + 1] == 'n') {
newfestivalcommand[j++] = '\n';
- i++;
- } else if (festivalcommand[i] == '\\') {
- newfestivalcommand[j++] = festivalcommand[i + 1];
- i++;
- } else if (festivalcommand[i] == '%' && festivalcommand[i + 1] == 's') {
+ x++;
+ } else if (festivalcommand[x] == '\\') {
+ newfestivalcommand[j++] = festivalcommand[x + 1];
+ x++;
+ } else if (festivalcommand[x] == '%' && festivalcommand[x + 1] == 's') {
sprintf(&newfestivalcommand[j], "%s", args.text); /* we know it is big enough */
j += strlen(args.text);
- i++;
+ x++;
} else
- newfestivalcommand[j++] = festivalcommand[i];
+ newfestivalcommand[j++] = festivalcommand[x];
}
newfestivalcommand[j] = '\0';
festivalcommand = newfestivalcommand;