mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
Merged revisions 94420 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r94420 | mmichelson | 2007-12-21 09:45:14 -0600 (Fri, 21 Dec 2007) | 5 lines Fixing Portuguese syntax for saying dates and times. Also some coding guidelines cleanup. (closes issue #11599, reported and patched by caio1982, coding guidelines cleanup by me) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2351,6 +2351,7 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
|
|||||||
break;
|
break;
|
||||||
/* On "ringall" strategy we only move to the next penalty level
|
/* On "ringall" strategy we only move to the next penalty level
|
||||||
when *all* ringing phones are done in the current penalty level */
|
when *all* ringing phones are done in the current penalty level */
|
||||||
|
ast_log(LOG_DEBUG, "I actually hit this...\n");
|
||||||
ring_one(qe, outgoing, &numbusies);
|
ring_one(qe, outgoing, &numbusies);
|
||||||
/* and retry... */
|
/* and retry... */
|
||||||
}
|
}
|
||||||
|
22
main/say.c
22
main/say.c
@@ -5298,7 +5298,7 @@ int ast_say_date_with_format_pt(struct ast_channel *chan, time_t time, const cha
|
|||||||
char sndfile[256], nextmsg[256];
|
char sndfile[256], nextmsg[256];
|
||||||
|
|
||||||
if (format == NULL)
|
if (format == NULL)
|
||||||
format = "Ad 'digits/pt-de' B 'digits/pt-de' Y 'digits/at' IMp";
|
format = "Ad 'digits/pt-de' B 'digits/pt-de' Y I 'digits/pt-e' Mp";
|
||||||
|
|
||||||
ast_localtime(&tv, &tm, timezone);
|
ast_localtime(&tv, &tm, timezone);
|
||||||
|
|
||||||
@@ -5369,8 +5369,6 @@ int ast_say_date_with_format_pt(struct ast_channel *chan, time_t time, const cha
|
|||||||
}
|
}
|
||||||
if (!res)
|
if (!res)
|
||||||
res = ast_say_number(chan, (tm.tm_hour % 12), ints, lang, "f");
|
res = ast_say_number(chan, (tm.tm_hour % 12), ints, lang, "f");
|
||||||
if ((!res) && (format[offset] == 'I'))
|
|
||||||
res = ast_say_date_with_format(chan, time, ints, lang, "P", timezone);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (tm.tm_hour == 0) {
|
if (tm.tm_hour == 0) {
|
||||||
@@ -5442,10 +5440,9 @@ int ast_say_date_with_format_pt(struct ast_channel *chan, time_t time, const cha
|
|||||||
res = wait_file(chan, ints, "digits/pt-hora", lang);
|
res = wait_file(chan, ints, "digits/pt-hora", lang);
|
||||||
if (tm.tm_hour != 1)
|
if (tm.tm_hour != 1)
|
||||||
if (!res)
|
if (!res)
|
||||||
res = wait_file(chan, ints, "digits/pt-sss", lang); } else {
|
res = wait_file(chan, ints, "digits/pt-sss", lang);
|
||||||
res = wait_file(chan,ints,"digits/pt-e",lang);
|
} else {
|
||||||
if (!res)
|
res = ast_say_number(chan, tm.tm_min, ints, lang, (char *) NULL);
|
||||||
res = ast_say_number(chan, tm.tm_min, ints, lang, (char *) NULL);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -5637,7 +5634,7 @@ int ast_say_date_with_format_tw(struct ast_channel *chan, time_t time, const cha
|
|||||||
res = wait_file(chan,ints,nextmsg,lang);
|
res = wait_file(chan,ints,nextmsg,lang);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!res) res = wait_file(chan,ints,"digits/day",lang);
|
if (!res) res = wait_file(chan,ints,"digits/day",lang);
|
||||||
break;
|
break;
|
||||||
case 'Y':
|
case 'Y':
|
||||||
/* Year */
|
/* Year */
|
||||||
@@ -6723,15 +6720,14 @@ static int ast_say_number_full_gr(struct ast_channel *chan, int num, const char
|
|||||||
/* 100 < num < 200 */
|
/* 100 < num < 200 */
|
||||||
snprintf(fn, sizeof(fn), "digits/hundred-100");
|
snprintf(fn, sizeof(fn), "digits/hundred-100");
|
||||||
num %= 100;
|
num %= 100;
|
||||||
}else if (num < 1000) {
|
} else if (num < 1000) {
|
||||||
/* 200 < num < 1000 */
|
/* 200 < num < 1000 */
|
||||||
snprintf(fn, sizeof(fn), "digits/hundred-%d", (num/100)*100);
|
snprintf(fn, sizeof(fn), "digits/hundred-%d", (num/100)*100);
|
||||||
num %= 100;
|
num %= 100;
|
||||||
}else if (num < 2000){
|
} else if (num < 2000){
|
||||||
snprintf(fn, sizeof(fn), "digits/xilia");
|
snprintf(fn, sizeof(fn), "digits/xilia");
|
||||||
num %= 1000;
|
num %= 1000;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
/* num > 1000 */
|
/* num > 1000 */
|
||||||
if (num < 1000000) {
|
if (num < 1000000) {
|
||||||
res = ast_say_number_full_gr(chan, (num / 1000), ints, chan->language, audiofd, ctrlfd);
|
res = ast_say_number_full_gr(chan, (num / 1000), ints, chan->language, audiofd, ctrlfd);
|
||||||
@@ -7274,7 +7270,7 @@ static int ast_say_number_full_ge(struct ast_channel *chan, int num, const char
|
|||||||
ast_free(new_string);
|
ast_free(new_string);
|
||||||
|
|
||||||
remainder = s + 1; /* position just after the found space char. */
|
remainder = s + 1; /* position just after the found space char. */
|
||||||
while(*remainder == ' ') /* skip multiple spaces */
|
while (*remainder == ' ') /* skip multiple spaces */
|
||||||
remainder++;
|
remainder++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user