diff --git a/src/lib_ccx/ccx_common_option.h b/src/lib_ccx/ccx_common_option.h index a55773ce..831c73db 100644 --- a/src/lib_ccx/ccx_common_option.h +++ b/src/lib_ccx/ccx_common_option.h @@ -93,6 +93,6 @@ struct ccx_s_options // Options from user parameters struct ccx_s_write wbout2; }; -struct ccx_s_options ccx_options; +extern struct ccx_s_options ccx_options; void init_options (struct ccx_s_options *options); #endif diff --git a/src/lib_ccx/ccx_common_structs.h b/src/lib_ccx/ccx_common_structs.h index c119fbcf..140d9180 100644 --- a/src/lib_ccx/ccx_common_structs.h +++ b/src/lib_ccx/ccx_common_structs.h @@ -14,7 +14,8 @@ struct ccx_common_logging_t { void(*debug_ftn) (LLONG mask, const char *fmt, ...); // Used to process debug output. Mask can be ignored (custom set by debug_mask). void(*log_ftn)(const char *fmt, ...); // Used to print things. Replacement of standard printf, to allow more control. void(*gui_ftn)(enum ccx_common_logging_gui message_type, ...); // Used to display things in a gui (if appropriate). Is called with the message_type and appropriate variables (described in enum) -} ccx_common_logging; +}; +extern struct ccx_common_logging_t ccx_common_logging; enum subtype { diff --git a/src/lib_ccx/ccx_common_timing.c b/src/lib_ccx/ccx_common_timing.c index 47b83b32..29676fa6 100644 --- a/src/lib_ccx/ccx_common_timing.c +++ b/src/lib_ccx/ccx_common_timing.c @@ -41,7 +41,10 @@ struct gop_time_code gop_time, first_gop_time, printed_gop; LLONG fts_at_gop_start = 0; int gop_rollover = 0; -void ccx_common_timing_init(LLONG *file_position,int no_sync){ +struct ccx_common_timing_settings_t ccx_common_timing_settings; + +void ccx_common_timing_init(LLONG *file_position,int no_sync) +{ ccx_common_timing_settings.disable_sync_check = 0; ccx_common_timing_settings.is_elementary_stream = 0; ccx_common_timing_settings.file_position = file_position; diff --git a/src/lib_ccx/ccx_common_timing.h b/src/lib_ccx/ccx_common_timing.h index 968710b9..af645d2e 100644 --- a/src/lib_ccx/ccx_common_timing.h +++ b/src/lib_ccx/ccx_common_timing.h @@ -19,7 +19,8 @@ struct ccx_common_timing_settings_t { int no_sync; // If 1, there will be no sync at all. Mostly useful for debugging. int is_elementary_stream; // Needs to be set, as it's used in set_fts. LLONG *file_position; // The position of the file -} ccx_common_timing_settings; +}; +extern struct ccx_common_timing_settings_t ccx_common_timing_settings; struct ccx_boundary_time { diff --git a/src/lib_ccx/ccx_decoders_structs.h b/src/lib_ccx/ccx_decoders_structs.h index 8f7ff18d..1fce1b35 100644 --- a/src/lib_ccx/ccx_decoders_structs.h +++ b/src/lib_ccx/ccx_decoders_structs.h @@ -70,10 +70,11 @@ typedef struct eia608_screen // A CC buffer int cur_xds_packet_class; } eia608_screen; -struct ccx_decoderrs_common_settings_t { +struct ccx_decoders_common_settings_t { LLONG subs_delay; // ms to delay (or advance) subs enum ccx_output_format output_format; // What kind of output format should be used? -} ccx_decoders_common_settings; +}; +extern struct ccx_decoders_common_settings_t ccx_decoders_common_settings; #define CCX_DECODERS_STRUCTS_H -#endif \ No newline at end of file +#endif diff --git a/src/lib_ccx/ccx_encoders_helpers.c b/src/lib_ccx/ccx_encoders_helpers.c index 1291c639..118fbc7d 100644 --- a/src/lib_ccx/ccx_encoders_helpers.c +++ b/src/lib_ccx/ccx_encoders_helpers.c @@ -17,7 +17,7 @@ char **spell_lower = NULL; char **spell_correct = NULL; int spell_words = 0; int spell_capacity = 0; - +struct ccx_encoders_helpers_settings_t ccx_encoders_helpers_settings; // Some basic English words, so user-defined doesn't have to // include the common stuff static const char *spell_builtin[] = diff --git a/src/lib_ccx/ccx_encoders_helpers.h b/src/lib_ccx/ccx_encoders_helpers.h index 14bb11e4..a043efdf 100644 --- a/src/lib_ccx/ccx_encoders_helpers.h +++ b/src/lib_ccx/ccx_encoders_helpers.h @@ -18,7 +18,8 @@ struct ccx_encoders_helpers_settings_t { int no_font_color; int no_type_setting; enum ccx_encoding_type encoding; -} ccx_encoders_helpers_settings; +}; +extern struct ccx_encoders_helpers_settings_t ccx_encoders_helpers_settings; // Helper functions void correct_case(int line_num, struct eia608_screen *data); diff --git a/src/lib_ccx/lib_ccx.c b/src/lib_ccx/lib_ccx.c index 596768ae..5b7c064c 100644 --- a/src/lib_ccx/lib_ccx.c +++ b/src/lib_ccx/lib_ccx.c @@ -1,7 +1,8 @@ #include "lib_ccx.h" #include "ccx_common_option.h" - +struct ccx_common_logging_t ccx_common_logging; +struct ccx_decoders_common_settings_t ccx_decoders_common_settings; struct lib_ccx_ctx* init_libraries(struct ccx_s_options *opt) { struct lib_ccx_ctx *ctx;