[Mplayer-cvslog] CVS: main subreader.c,1.34,1.35
Atmosfear
atmos4 at mplayer.dev.hu
Sun Nov 11 16:41:19 CET 2001
- Previous message: [Mplayer-cvslog] CVS: main/libvo osd.c,1.9,1.10
- Next message: [Mplayer-cvslog] CVS: main/libmpdemux demuxer.c,1.41,1.42 open.c,1.19,1.20 tv.c,1.8,1.9 tv.h,1.6,1.7 tvi_dummy.c,1.4,1.5 tvi_v4l.c,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv19617
Modified Files:
subreader.c
Log Message:
Applied SAMI patch by Evgeny Chukreev <codedj at echo dot ru>
Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- subreader.c 26 Oct 2001 22:14:19 -0000 1.34
+++ subreader.c 11 Nov 2001 15:41:17 -0000 1.35
@@ -89,16 +89,21 @@
case 3: /* get all text until '<' appears */
if (*s == '\0') { break; }
- else if (*s == '<') { state = 4; }
- else if (!strncasecmp (s, " ", 6)) { *p++ = ' '; s += 6; }
- else if (*s == '\r') { s++; }
- else if (!strncasecmp (s, "<br>", 4) || *s == '\n') {
+ else if (!strncasecmp (s, "<br>", 4)) {
*p = '\0'; p = text; trail_space (text);
if (text[0] != '\0')
current->text[current->lines++] = strdup (text);
- if (*s == '\n') s++; else s += 4;
+ s += 4;
}
+ else if (*s == '<') { state = 4; }
+ else if (!strncasecmp (s, " ", 6)) { *p++ = ' '; s += 6; }
+ else if (*s == '\t') { *p++ = ' '; s++; }
+ else if (*s == '\r' || *s == '\n') { s++; }
else *p++ = *s++;
+
+ /* skip duplicated space */
+ if (p > text + 2) if (*(p-1) == ' ' && *(p-2) == ' ') p--;
+
continue;
case 4: /* get current->end or skip <TAG> */
- Previous message: [Mplayer-cvslog] CVS: main/libvo osd.c,1.9,1.10
- Next message: [Mplayer-cvslog] CVS: main/libmpdemux demuxer.c,1.41,1.42 open.c,1.19,1.20 tv.c,1.8,1.9 tv.h,1.6,1.7 tvi_dummy.c,1.4,1.5 tvi_v4l.c,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list