From 534f6aa6b5648c70a2cb4b880fd67c68370e4e86 Mon Sep 17 00:00:00 2001 From: zuxy Date: Sun, 10 Jan 2010 13:52:44 +0000 Subject: Use !isspace() to replace isalnum() to avoid filename mismatch under MBCS locale like those in East Asia where most glyphs are neither alphabetical nor numerical. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30258 b3059339-0415-0410-9bf9-f77b7e298cf2 --- subreader.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/subreader.c b/subreader.c index 0776ea2b17..4c1c0a8181 100644 --- a/subreader.c +++ b/subreader.c @@ -1729,18 +1729,18 @@ char * strreplace( char * in,char * what,char * whereof ) static void strcpy_trim(char *d, char *s) { // skip leading whitespace - while (*s && !isalnum(*s)) { + while (*s && isspace(*s)) { s++; } for (;;) { // copy word - while (*s && isalnum(*s)) { + while (*s && !isspace(*s)) { *d = tolower(*s); s++; d++; } if (*s == 0) break; // trim excess whitespace - while (*s && !isalnum(*s)) { + while (*s && isspace(*s)) { s++; } if (*s == 0) break; @@ -1779,7 +1779,7 @@ static void strcpy_get_ext(char *d, char *s) static int whiteonly(char *s) { while (*s) { - if (isalnum(*s)) return 0; + if (!isspace(*s)) return 0; s++; } return 1; -- cgit v1.2.3