Index: asterisk/say.c
===================================================================
RCS file: /usr/cvsroot/asterisk/say.c,v
retrieving revision 1.16
diff -r1.16 say.c
90a91
>         int playa = 0;
94,95c95,158
< 	if (0) {
< 	/* XXX Only works for english XXX */
---
> 	if (strcasecmp(language, "fr") == 0) {
> 		/* French numbers */
> 		while(!res && (num || playh || playa)) {
> 			if (playh) {
> 				snprintf(fn, sizeof(fn), "digits/hundred");
> 				playh = 0;
> 			} else
> 			if (playa) {
> 				snprintf(fn, sizeof(fn), "digits/et");
> 				playa = 0;
> 			} else
> 			if (num < 21) {
> 				snprintf(fn, sizeof(fn), "digits/%d", num);
> 				num = 0;
> 			} else
>                         if (num < 70) {
>                                 snprintf(fn, sizeof(fn), "digits/%d", (num/10)*10);
>                                 if ((num % 10) == 1) playa++;
>                                 num = num % 10;
>                         } else
>                         if (num < 80) {
>                                 snprintf(fn, sizeof(fn), "digits/60");
>                                 if ((num % 10) == 1) playa++;
>                                 num = num - 60;
>                         } else
>                         if (num < 100) {
>                                 snprintf(fn, sizeof(fn), "digits/80");
>                                 num = num - 80;
>                         } else
>                         if (num < 200) {
>                                 snprintf(fn, sizeof(fn), "digits/hundred");
>                                 num = num - 100;
>                         } else
>                         if (num < 1000) {
>                                 snprintf(fn, sizeof(fn), "digits/%d", (num/100));
>                                 playh++;
>                                 num = num % 100;
>                         } else
>                         if (num < 2000) {
>                                 snprintf(fn, sizeof(fn), "digits/thousand");
>                                 num = num - 1000;
>                         } else
>                         if (num < 1000000) {
>                                 res = ast_say_number_full(chan, num / 1000, ints, language, audiofd, ctrlfd);
>                                 if (res) return res;
>                                 snprintf(fn, sizeof(fn), "digits/thousand");
>                                 num = num % 1000;
>                         } else
>                         if (num < 1000000000) {
>                                 res = ast_say_number_full(chan, num / 1000000, ints, language, audiofd, ctrlfd);
>                                 if (res) return res;
>                                 snprintf(fn, sizeof(fn), "digits/million");
>                                 num = num % 1000000;
>                         } else {
>                                 ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
>                                 res = -1;
>                         }
>                         if (!res) {
>                                 res = ast_streamfile(chan, fn, language);
>                                 if (!res)
>                                         res = ast_waitstream(chan, ints);
>                                 ast_stopstream(chan);
>                         }
> 		}
156a220
> 	int playa = 0;
160,161c224,287
< 	if (0) {
< 	/* XXX Only works for english XXX */
---
>         if (strcasecmp(language, "fr") == 0) {
>                 /* French numbers */
>                 while(!res && (num || playh || playa)) {
>                         if (playh) {
>                                 snprintf(fn, sizeof(fn), "digits/hundred");
>                                 playh = 0;
>                         } else
>                         if (playa) {
>                                 snprintf(fn, sizeof(fn), "digits/et");
>                                 playa = 0;
>                         } else
>                         if (num < 21) {
>                                 snprintf(fn, sizeof(fn), "digits/%d", num);
>                                 num = 0;
>                         } else
>                         if (num < 70) {
>                                 snprintf(fn, sizeof(fn), "digits/%d", (num/10)*10);
>                                 if ((num % 10) == 1) playa++;
>                                 num = num % 10;
>                         } else
>                         if (num < 80) {
>                                 snprintf(fn, sizeof(fn), "digits/60");
>                                 if ((num % 10) == 1) playa++;
>                                 num = num - 60;
>                         } else
>                         if (num < 100) {
>                                 snprintf(fn, sizeof(fn), "digits/80");
>                                 num = num - 80;
>                         } else
>                         if (num < 200) {
>                                 snprintf(fn, sizeof(fn), "digits/hundred");
>                                 num = num - 100;
>                         } else
>                         if (num < 1000) {
>                                 snprintf(fn, sizeof(fn), "digits/%d", (num/100));
>                                 playh++;
>                                 num = num % 100;
>                         } else
>                         if (num < 2000) {
>                                 snprintf(fn, sizeof(fn), "digits/thousand");
>                                 num = num - 1000;
>                         } else
>                         if (num < 1000000) {
>                                 res = ast_say_number(chan, num / 1000, ints, language);
>                                 if (res) return res;
>                                 snprintf(fn, sizeof(fn), "digits/thousand");
>                                 num = num % 1000;
>                         } else 
>                         if (num < 1000000000) {
>                                 res = ast_say_number(chan, num / 1000000, ints, language);
>                                 if (res) return res;
>                                 snprintf(fn, sizeof(fn), "digits/million");
>                                 num = num % 1000000;
>                         } else {
>                                 ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
>                                 res = -1;
>                         }
>                         if (!res) {
>                                 res = ast_streamfile(chan, fn, language);
>                                 if (!res)
>                                         res = ast_waitstream(chan, ints);
>                                 ast_stopstream(chan);
>                         }
> 		}
