Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37404350
en ru br
Репозитории ALT
S:1.5-alt1.38416.2
D:1.0-alt35.27330.1
5.1: 1.0-alt35.32624.0.M50P.1
4.1: 1.0-alt35.26470.1
4.0: 1.0-alt35.23722.M40.1
www.altlinux.org/Changes

Группа :: Видео
Пакет: mplayer

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: 0006-fixed-subreader.patch
Скачать


From 6e2730fb4dfe043680184734a78b156344b49c7e Mon Sep 17 00:00:00 2001
From: Led <led@altlinux.org>
Date: Sat, 25 May 2013 05:47:09 +0300
Subject: [PATCH] fixed subreader
---
 MPlayer/sub/subreader.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/MPlayer/sub/subreader.c b/MPlayer/sub/subreader.c
index 3c815d1320..a1f05c4d63 100644
--- a/MPlayer/sub/subreader.c
+++ b/MPlayer/sub/subreader.c
@@ -1888,22 +1888,16 @@ char * strreplace( char * in,char * what,char * whereof )
 static void strcpy_trim(char *d, const char *s)
 {
     // skip leading whitespace
-    while (*s && isspace(*s)) {
-	s++;
-    }
-    for (;;) {
+    for (; *s && isascii(*s) && !isalnum(*s); s++);
+    for (;; d++) {
 	// copy word
-	while (*s && !isspace(*s)) {
-	    *d = tolower(*s);
-	    s++; d++;
-	}
+	for (; *s && (!isascii(*s) || isalnum(*s)); s++, d++)
+	    *d = *s;
 	if (*s == 0) break;
 	// trim excess whitespace
-	while (*s && isspace(*s)) {
-	    s++;
-	}
+	for (; *s && isascii(*s) && !isalnum(*s); s++);
 	if (*s == 0) break;
-	*d++ = ' ';
+	*d = ' ';
     }
     *d = 0;
 }
-- 
2.33.7
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin