[Asterisk-cvs] asterisk say.c,1.69,1.70
kpfleming
kpfleming
Mon Sep 26 22:28:32 CDT 2005
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv24728
Modified Files:
say.c
Log Message:
say minutes/seconds using existing 'say number' code for Danish (issue #5277)
Index: say.c
===================================================================
RCS file: /usr/cvsroot/asterisk/say.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- say.c 14 Sep 2005 20:46:49 -0000 1.69
+++ say.c 27 Sep 2005 02:25:12 -0000 1.70
@@ -3105,22 +3105,8 @@
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 @@
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':
More information about the svn-commits
mailing list