[asterisk-commits] tilghman: trunk r84079 - in /trunk: ./ main/say.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 28 09:22:58 CDT 2007


Author: tilghman
Date: Fri Sep 28 09:22:58 2007
New Revision: 84079

URL: http://svn.digium.com/view/asterisk?view=rev&rev=84079
Log:
Merged revisions 84078 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84078 | tilghman | 2007-09-28 09:13:47 -0500 (Fri, 28 Sep 2007) | 2 lines

Correct pronunciations of numbers for .nl (Closes issue #10837)

........

Modified:
    trunk/   (props changed)
    trunk/main/say.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/say.c
URL: http://svn.digium.com/view/asterisk/trunk/main/say.c?view=diff&rev=84079&r1=84078&r2=84079
==============================================================================
--- trunk/main/say.c (original)
+++ trunk/main/say.c Fri Sep 28 09:22:58 2007
@@ -1603,21 +1603,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