Mercurial > mplayer.hg
comparison subreader.c @ 1761:827b551bbcab
subdump
author | arpi |
---|---|
date | Wed, 29 Aug 2001 20:15:41 +0000 |
parents | cbedcfab877b |
children | a9e51734ea00 |
comparison
equal
deleted
inserted
replaced
1760:d40da1ac8a9f | 1761:827b551bbcab |
---|---|
500 } | 500 } |
501 | 501 |
502 return NULL; | 502 return NULL; |
503 } | 503 } |
504 | 504 |
505 #if 0 | 505 void list_sub_file(subtitle* subs){ |
506 int main(int argc, char **argv) { // for testing | |
507 | |
508 int i,j; | 506 int i,j; |
509 subtitle *subs; | |
510 subtitle *egysub; | |
511 | |
512 if(argc<2){ | |
513 printf("\nUsage: subreader filename.sub\n\n"); | |
514 exit(1); | |
515 } | |
516 | |
517 subs=sub_read_file(argv[1]); | |
518 if(!subs){ | |
519 printf("Couldn't load file... let's write a bugreport :)\n"); | |
520 exit(1); | |
521 } | |
522 | 507 |
523 for(j=0;j<sub_num;j++){ | 508 for(j=0;j<sub_num;j++){ |
524 egysub=&subs[j]; | 509 subtitle* egysub=&subs[j]; |
525 printf ("%i line%c (%li-%li) ", | 510 printf ("%i line%c (%li-%li) ", |
526 egysub->lines, | 511 egysub->lines, |
527 (1==egysub->lines)?' ':'s', | 512 (1==egysub->lines)?' ':'s', |
528 egysub->start, | 513 egysub->start, |
529 egysub->end); | 514 egysub->end); |
533 printf ("\n"); | 518 printf ("\n"); |
534 } | 519 } |
535 | 520 |
536 printf ("Subtitle format %s time.\n", sub_uses_time?"uses":"doesn't use"); | 521 printf ("Subtitle format %s time.\n", sub_uses_time?"uses":"doesn't use"); |
537 printf ("Read %i subtitles, %i errors.\n", sub_num, sub_errs); | 522 printf ("Read %i subtitles, %i errors.\n", sub_num, sub_errs); |
523 | |
524 } | |
525 | |
526 #if 0 | |
527 int main(int argc, char **argv) { // for testing | |
528 | |
529 int i,j; | |
530 subtitle *subs; | |
531 subtitle *egysub; | |
532 | |
533 if(argc<2){ | |
534 printf("\nUsage: subreader filename.sub\n\n"); | |
535 exit(1); | |
536 } | |
537 | |
538 subs=sub_read_file(argv[1]); | |
539 if(!subs){ | |
540 printf("Couldn't load file... let's write a bugreport :)\n"); | |
541 exit(1); | |
542 } | |
543 | |
544 list_sub_file(subs); | |
545 | |
538 return 0; | 546 return 0; |
539 } | 547 } |
540 #endif | 548 #endif |