[asterisk-commits] tilghman: branch 1.4 r84078 - /branches/1.4/main/say.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Sep 28 09:13:47 CDT 2007
Author: tilghman
Date: Fri Sep 28 09:13:47 2007
New Revision: 84078
URL: http://svn.digium.com/view/asterisk?view=rev&rev=84078
Log:
Correct pronunciations of numbers for .nl (Closes issue #10837)
Modified:
branches/1.4/main/say.c
Modified: branches/1.4/main/say.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/say.c?view=diff&rev=84078&r1=84077&r2=84078
==============================================================================
--- branches/1.4/main/say.c (original)
+++ branches/1.4/main/say.c Fri Sep 28 09:13:47 2007
@@ -1506,21 +1506,35 @@
snprintf(fn, sizeof(fn), "digits/%d", num - units);
num = 0;
}
+ } else if (num < 200) {
+ /* hundred, not one-hundred */
+ ast_copy_string(fn, "digits/hundred", sizeof(fn));
+ num -= ((num / 100) * 100);
+ } else if (num < 1000) {
+ snprintf(fn, sizeof(fn), "digits/%d", num / 100);
+ playh++;
+ num -= ((num / 100) * 100);
} else {
- if (num < 1000) {
- snprintf(fn, sizeof(fn), "digits/%d", (num/100));
- playh++;
- num -= ((num / 100) * 100);
+ if (num < 1100) {
+ /* thousand, not one-thousand */
+ num = num % 1000;
+ ast_copy_string(fn, "digits/thousand", sizeof(fn));
+ } else if (num < 10000) { /* 1,100 to 9,9999 */
+ res = ast_say_number_full_nl(chan, num / 100, ints, language, audiofd, ctrlfd);
+ if (res)
+ return res;
+ num = num % 100;
+ ast_copy_string(fn, "digits/hundred", sizeof(fn));
} else {
if (num < 1000000) { /* 1,000,000 */
- res = ast_say_number_full_en(chan, num / 1000, ints, language, audiofd, ctrlfd);
+ res = ast_say_number_full_nl(chan, num / 1000, ints, language, audiofd, ctrlfd);
if (res)
return res;
num = num % 1000;
snprintf(fn, sizeof(fn), "digits/thousand");
} else {
if (num < 1000000000) { /* 1,000,000,000 */
- res = ast_say_number_full_en(chan, num / 1000000, ints, language, audiofd, ctrlfd);
+ res = ast_say_number_full_nl(chan, num / 1000000, ints, language, audiofd, ctrlfd);
if (res)
return res;
num = num % 1000000;
More information about the asterisk-commits
mailing list