changeset 32725:4802a80f7a50

Typedef the add subtitle function just like open_vob_func.
author cboesch
date Sun, 23 Jan 2011 13:10:29 +0000
parents 732cd2afae10
children 08adc582d9cc
files sub/subreader.c sub/subreader.h
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sub/subreader.c	Sun Jan 23 13:04:15 2011 +0000
+++ b/sub/subreader.c	Sun Jan 23 13:10:29 2011 +0000
@@ -2057,7 +2057,7 @@
  * @note Subtitles are tracked and scored in various places according to the
  *       user options, sorted, and then added by calling the add_f function.
  */
-void load_subtitles(const char *fname, int fps, void add_f(char *, float, int))
+void load_subtitles(const char *fname, int fps, open_sub_func add_f)
 {
     int i;
     char *mp_subdir, *path = NULL;
--- a/sub/subreader.h	Sun Jan 23 13:04:15 2011 +0000
+++ b/sub/subreader.h	Sun Jan 23 13:10:29 2011 +0000
@@ -83,6 +83,7 @@
 extern int flip_hebrew;
 extern int fribidi_flip_commas;
 
+typedef void (*open_sub_func)(char *, float, int);
 typedef int (*open_vob_func)(const char *, const char * const, int, void *);
 
 sub_data* sub_read_file (char *filename, float pts);
@@ -96,7 +97,7 @@
 const char* guess_buffer_cp(unsigned char* buffer, int buflen, const char *preferred_language, const char *fallback);
 const char* guess_cp(struct stream *st, const char *preferred_language, const char *fallback);
 #endif
-void load_subtitles(const char *fname, int fps, void add_f(char *, float, int));
+void load_subtitles(const char *fname, int fps, open_sub_func add_f);
 void load_vob_subtitle(const char *fname, const char * const spudec_ifo, void **spu, open_vob_func add_f);
 void list_sub_file(sub_data* subd);
 void dump_srt(sub_data* subd, float fps);