aboutsummaryrefslogtreecommitdiffstats
path: root/say.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-27 02:25:12 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-27 02:25:12 +0000
commit20becc30e8c9bbbd04a627bf26bfd07f0d3dcb94 (patch)
treeb55473f1a4134f769fbf2cfd1fc845d11f549195 /say.c
parent71842c94b8aafbcd038d15e35d54506de97def56 (diff)
say minutes/seconds using existing 'say number' code for Danish (issue #5277)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6673 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'say.c')
-rwxr-xr-xsay.c32
1 files changed, 2 insertions, 30 deletions
diff --git a/say.c b/say.c
index 445fcd10a..87ea86aaa 100755
--- a/say.c
+++ b/say.c
@@ -3105,22 +3105,8 @@ int ast_say_date_with_format_en(struct ast_channel *chan, time_t time, const cha
snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_min);
res = wait_file(chan,ints,nextmsg,lang);
}
- } else if ((tm.tm_min < 21) || (tm.tm_min % 10 == 0)) {
- snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_min);
- res = wait_file(chan,ints,nextmsg,lang);
} else {
- int ten, one;
- ten = (tm.tm_min / 10) * 10;
- one = (tm.tm_min % 10);
- snprintf(nextmsg,sizeof(nextmsg), "digits/%d", ten);
- res = wait_file(chan,ints,nextmsg,lang);
- if (!res) {
- /* Fifty, not fifty-zero */
- if (one != 0) {
- snprintf(nextmsg,sizeof(nextmsg), "digits/%d", one);
- res = wait_file(chan,ints,nextmsg,lang);
- }
- }
+ res = ast_say_number(chan, tm.tm_min, ints, lang, (char *) NULL);
}
break;
case 'P':
@@ -3194,22 +3180,8 @@ int ast_say_date_with_format_en(struct ast_channel *chan, time_t time, const cha
snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_sec);
res = wait_file(chan,ints,nextmsg,lang);
}
- } else if ((tm.tm_sec < 21) || (tm.tm_sec % 10 == 0)) {
- snprintf(nextmsg,sizeof(nextmsg), "digits/%d", tm.tm_sec);
- res = wait_file(chan,ints,nextmsg,lang);
} else {
- int ten, one;
- ten = (tm.tm_sec / 10) * 10;
- one = (tm.tm_sec % 10);
- snprintf(nextmsg,sizeof(nextmsg), "digits/%d", ten);
- res = wait_file(chan,ints,nextmsg,lang);
- if (!res) {
- /* Fifty, not fifty-zero */
- if (one != 0) {
- snprintf(nextmsg,sizeof(nextmsg), "digits/%d", one);
- res = wait_file(chan,ints,nextmsg,lang);
- }
- }
+ res = ast_say_number(chan, tm.tm_sec, ints, lang, (char *) NULL);
}
break;
case 'T':