changeset 1761:827b551bbcab

subdump
author arpi
date Wed, 29 Aug 2001 20:15:41 +0000
parents d40da1ac8a9f
children 914bdbe33cf8
files subreader.c
diffstat 1 files changed, 23 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/subreader.c	Wed Aug 29 19:33:17 2001 +0000
+++ b/subreader.c	Wed Aug 29 20:15:41 2001 +0000
@@ -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