# HG changeset patch # User atmos4 # Date 1033865207 0 # Node ID e1962f1bb326837da43cd3524feb11c59201779f # Parent 8d73a0292932fdafa0984f04c2d126163f806429 Skip html tags (like ) inside subviewer subtitles. diff -r 8d73a0292932 -r e1962f1bb326 subreader.c --- a/subreader.c Sun Oct 06 00:22:32 2002 +0000 +++ b/subreader.c Sun Oct 06 00:46:47 2002 +0000 @@ -239,9 +239,28 @@ len=0; for (p=line; *p!='\n' && *p!='\r' && *p; p++,len++); if (len) { - current->text[i]=(char *)malloc (len+1); + int j=0,skip=0; + char *curptr=current->text[i]=(char *)malloc (len+1); if (!current->text[i]) return ERR; - strncpy (current->text[i], line, len); current->text[i][len]='\0'; + //strncpy (current->text[i], line, len); current->text[i][len]='\0'; + for(j; j') { + skip=0; + continue; + } + if(line[j]=='<') { + skip=1; + continue; + } + if(skip) { + continue; + } + *curptr=line[j]; + curptr++; + } + *curptr='\0'; + i++; } else { break;