[commit] r3914 - freeswitch/trunk/src/mod/say/mod_say_en
Author: anthm Date: Fri Jan 5 19:57:54 2007 New Revision: 3914 Modified: freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c Log: add fixes from mmurdock, thanks mike Modified: freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c ============================================================================== --- freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c (original) +++ freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c Fri Jan 5 19:57:54 2007 @@ -420,7 +420,12 @@ if ((cents = strchr(sbuf, '.'))) { *cents++ = '\0'; } - + + /* If positive sign - skip over" */ + if (sbuf[0] == '+') { + dollars++; + } + /* If negative say "negative" */ if (sbuf[0] == '-') { say_file("negative.wav"); @@ -439,14 +444,20 @@ /* Say "and" */ say_file("and.wav"); - /* Say cents */ - en_say_general_count(session, cents, type, method, args); - if (atoi(cents) == 1) { - say_file("cent.wav"); - } - else { - say_file("cents.wav"); - } + /* Say cents */ + if (cents) { + en_say_general_count(session, cents, type, method, args); + if (atoi(cents) == 1) { + say_file("cent.wav"); + } + else { + say_file("cents.wav"); + } + } + else { + say_file("digits/0.wav"); + say_file("cents.wav"); + } return SWITCH_STATUS_SUCCESS; }
participants (1)
-
Freeswitch SVN