Remove incorrect use of ctype.h functions.

As far as I can tell the code should not change behaviour
depending on locale in any of these places.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
Reimar Döffinger
2013-03-03 11:17:50 +01:00
parent 2cffe38df3
commit 88d55b827d
27 changed files with 90 additions and 60 deletions

View File

@@ -3641,11 +3641,11 @@ int av_get_frame_filename(char *buf, int buf_size,
if (c == '%') {
do {
nd = 0;
while (isdigit(*p)) {
while (av_isdigit(*p)) {
nd = nd * 10 + *p++ - '0';
}
c = *p++;
} while (isdigit(c));
} while (av_isdigit(c));
switch(c) {
case '%':
@@ -3866,7 +3866,7 @@ int ff_hex_to_data(uint8_t *data, const char *p)
p += strspn(p, SPACE_CHARS);
if (*p == '\0')
break;
c = toupper((unsigned char) *p++);
c = av_toupper((unsigned char) *p++);
if (c >= '0' && c <= '9')
c = c - '0';
else if (c >= 'A' && c <= 'F')
@@ -3989,7 +3989,7 @@ void ff_parse_key_value(const char *str, ff_parse_key_val_cb callback_get_buf,
int key_len, dest_len = 0;
/* Skip whitespace and potential commas. */
while (*ptr && (isspace(*ptr) || *ptr == ','))
while (*ptr && (av_isspace(*ptr) || *ptr == ','))
ptr++;
if (!*ptr)
break;
@@ -4022,7 +4022,7 @@ void ff_parse_key_value(const char *str, ff_parse_key_val_cb callback_get_buf,
if (*ptr == '\"')
ptr++;
} else {
for (; *ptr && !(isspace(*ptr) || *ptr == ','); ptr++)
for (; *ptr && !(av_isspace(*ptr) || *ptr == ','); ptr++)
if (dest && dest < dest_end)
*dest++ = *ptr;
}