summaryrefslogtreecommitdiffstats
path: root/subreader.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-25 14:52:29 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-25 14:52:29 +0200
commit0f72485ee72d23fe1ff3db39310836f776ba9f6a (patch)
tree1504ed9f7fc96b890dbb5431e19b4ef2da000822 /subreader.c
parent8b33a04d023e858e413bf720f68b40c4297e059a (diff)
parent4e50b6df73fd6aa3e426aba796f38b9357ea457b (diff)
downloadmpv-0f72485ee72d23fe1ff3db39310836f776ba9f6a.tar.bz2
mpv-0f72485ee72d23fe1ff3db39310836f776ba9f6a.tar.xz
Merge svn changes up to r30264
Conflicts: gui/wm/ws.c
Diffstat (limited to 'subreader.c')
-rw-r--r--subreader.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/subreader.c b/subreader.c
index f1b5b44f5e..a6b40ac3ec 100644
--- a/subreader.c
+++ b/subreader.c
@@ -1734,18 +1734,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;
@@ -1784,7 +1784,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;