mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
app_voicemail, say: Fix various leading whitespace problems
In af90afd90c
, Japanese language support
was added to app_voicemail and main/say.c, but the leading whitespace
is not consistent with Asterisk coding guidelines. This patch fixes
that.
Whitespace only, no functional change.
ASTERISK~23324
Reported by: Kevin McCoy
Change-Id: I72c725f5930084673749bd7c9cc426a987f08e87
This commit is contained in:
@@ -7892,7 +7892,7 @@ static int get_folder_ja(struct ast_channel *chan, int start)
|
||||
int x;
|
||||
int d;
|
||||
char fn[256];
|
||||
for (x = start; x< 5; x++) { /* For all folders */
|
||||
for (x = start; x < 5; x++) { /* For all folders */
|
||||
if ((d = ast_say_number(chan, x, AST_DIGIT_ANY, ast_channel_language(chan), (char *) NULL))) {
|
||||
return d;
|
||||
}
|
||||
@@ -7936,7 +7936,7 @@ static int get_folder2(struct ast_channel *chan, char *fn, int start)
|
||||
(res != '#') && (res >= 0) &&
|
||||
loops < 4) {
|
||||
/* res = get_folder(chan, 0); */
|
||||
if (!strcasecmp(ast_channel_language(chan),"ja")) { /* Japanese syntax */
|
||||
if (!strcasecmp(ast_channel_language(chan), "ja")) { /* Japanese syntax */
|
||||
res = get_folder_ja(chan, 0);
|
||||
} else { /* Default syntax */
|
||||
res = get_folder(chan, 0);
|
||||
@@ -10667,7 +10667,6 @@ static int vm_instructions(struct ast_channel *chan, struct ast_vm_user *vmu, st
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int vm_newuser_setup(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms, char *fmtc, signed char record_gain)
|
||||
{
|
||||
int cmd = 0;
|
||||
|
12
main/say.c
12
main/say.c
@@ -7916,6 +7916,7 @@ static int ast_say_number_full_ja(struct ast_channel *chan, int num, const char
|
||||
int res = 0;
|
||||
int playh = 0;
|
||||
char fn[256] = "";
|
||||
|
||||
if (!num)
|
||||
return ast_say_digits_full(chan, 0, ints, language, audiofd, ctrlfd);
|
||||
|
||||
@@ -8027,7 +8028,9 @@ int ast_say_date_ja(struct ast_channel *chan, time_t t, const char *ints, const
|
||||
struct timeval tv = { t, 0 };
|
||||
char fn[256];
|
||||
int res = 0;
|
||||
|
||||
ast_localtime(&tv, &tm, NULL);
|
||||
|
||||
if (!res)
|
||||
res = ast_say_number(chan, tm.tm_year + 1900, ints, lang, (char *) NULL);
|
||||
if (!res)
|
||||
@@ -8113,7 +8116,6 @@ static int ast_say_time_gr(struct ast_channel *chan, time_t t, const char *ints,
|
||||
/* Japanese */
|
||||
static int ast_say_time_ja(struct ast_channel *chan, time_t t, const char *ints, const char *lang)
|
||||
{
|
||||
|
||||
struct timeval tv = { t, 0 };
|
||||
struct ast_tm tm;
|
||||
int res = 0;
|
||||
@@ -8198,7 +8200,7 @@ int ast_say_datetime_ja(struct ast_channel *chan, time_t t, const char *ints, co
|
||||
struct ast_tm tm;
|
||||
char fn[256];
|
||||
int res = 0;
|
||||
int hour, pm=0;
|
||||
int hour, pm = 0;
|
||||
|
||||
ast_localtime(&tv, &tm, NULL);
|
||||
|
||||
@@ -8435,7 +8437,7 @@ int ast_say_date_with_format_ja(struct ast_channel *chan, time_t time, const cha
|
||||
{
|
||||
struct timeval tv = { time, 0 };
|
||||
struct ast_tm tm;
|
||||
int res=0, offset, sndoffset;
|
||||
int res = 0, offset, sndoffset;
|
||||
char sndfile[256], nextmsg[256];
|
||||
|
||||
if (!format)
|
||||
@@ -8443,13 +8445,13 @@ int ast_say_date_with_format_ja(struct ast_channel *chan, time_t time, const cha
|
||||
|
||||
ast_localtime(&tv, &tm, timezone);
|
||||
|
||||
for (offset=0 ; format[offset] != '\0' ; offset++) {
|
||||
for (offset = 0; format[offset] != '\0'; offset++) {
|
||||
ast_log(LOG_DEBUG, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
|
||||
switch (format[offset]) {
|
||||
/* NOTE: if you add more options here, please try to be consistent with strftime(3) */
|
||||
case '\'':
|
||||
/* Literal name of a sound file */
|
||||
for (sndoffset = 0 ; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++) {
|
||||
for (sndoffset = 0; (format[++offset] != '\'') && (sndoffset < sizeof(sndfile) - 1) ; sndoffset++) {
|
||||
sndfile[sndoffset] = format[offset];
|
||||
}
|
||||
sndfile[sndoffset] = '\0';
|
||||
|
Reference in New Issue
Block a user