summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzuxy <zuxy@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-10 13:52:44 +0000
committerzuxy <zuxy@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-10 13:52:44 +0000
commit534f6aa6b5648c70a2cb4b880fd67c68370e4e86 (patch)
treebb30ee28c8cbfe614d691c31fb23bc20669c213f
parente51a1598b4615c7a6e0d31c91f917e5ef52006ad (diff)
downloadmpv-534f6aa6b5648c70a2cb4b880fd67c68370e4e86.tar.bz2
mpv-534f6aa6b5648c70a2cb4b880fd67c68370e4e86.tar.xz
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
-rw-r--r--subreader.c8
1 files 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;