[Mplayer-cvslog] CVS: main subreader.c,1.22,1.23

Arpi of Ize arpi at mplayer.dev.hu
Wed Aug 29 22:15:43 CEST 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv28857

Modified Files:
	subreader.c 
Log Message:
subdump

Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- subreader.c	22 Aug 2001 21:38:35 -0000	1.22
+++ subreader.c	29 Aug 2001 20:15:41 -0000	1.23
@@ -502,6 +502,27 @@
  return NULL;
 }
 
+void list_sub_file(subtitle* subs){
+    int i,j;
+
+    for(j=0;j<sub_num;j++){
+	subtitle* egysub=&subs[j];
+        printf ("%i line%c (%li-%li) ",
+		    egysub->lines,
+		    (1==egysub->lines)?' ':'s',
+		    egysub->start,
+		    egysub->end);
+	for (i=0; i<egysub->lines; i++) {
+	    printf ("%s%s",egysub->text[i], i==egysub->lines-1?"":" <BREAK> ");
+	}
+	printf ("\n");
+    }
+
+    printf ("Subtitle format %s time.\n", sub_uses_time?"uses":"doesn't use");
+    printf ("Read %i subtitles, %i errors.\n", sub_num, sub_errs);
+
+}
+
 #if 0
 int main(int argc, char **argv) {  // for testing
 
@@ -519,22 +540,9 @@
         printf("Couldn't load file... let's write a bugreport :)\n");
         exit(1);
     }
+    
+    list_sub_file(subs);
 
-    for(j=0;j<sub_num;j++){
-	egysub=&subs[j];
-        printf ("%i line%c (%li-%li) ",
-		    egysub->lines,
-		    (1==egysub->lines)?' ':'s',
-		    egysub->start,
-		    egysub->end);
-	for (i=0; i<egysub->lines; i++) {
-	    printf ("%s%s",egysub->text[i], i==egysub->lines-1?"":" <BREAK> ");
-	}
-	printf ("\n");
-    }
-
-    printf ("Subtitle format %s time.\n", sub_uses_time?"uses":"doesn't use");
-    printf ("Read %i subtitles, %i errors.\n", sub_num, sub_errs);
     return 0;
 }
 #endif




More information about the MPlayer-cvslog mailing list