diff --git a/src/rust/Cargo.lock b/src/rust/Cargo.lock index 6634226a5..c634ffbcb 100644 --- a/src/rust/Cargo.lock +++ b/src/rust/Cargo.lock @@ -186,6 +186,7 @@ dependencies = [ "env_logger", "iconv", "leptonica-sys", + "libc", "log", "num-integer", "num-traits", diff --git a/src/rust/Cargo.toml b/src/rust/Cargo.toml index c3052917f..b8f07bd7e 100644 --- a/src/rust/Cargo.toml +++ b/src/rust/Cargo.toml @@ -29,6 +29,7 @@ num-traits = "0.2.16" winapi = "0.3.9" cfg-if = "1.0.0" sha2 = "0.10.7" +libc = "0.2.147" [build-dependencies] bindgen = "0.58.1" diff --git a/src/rust/src/common.rs b/src/rust/src/common.rs index d23613f26..67da6fddb 100644 --- a/src/rust/src/common.rs +++ b/src/rust/src/common.rs @@ -45,15 +45,15 @@ impl CcxTeletextConfig { extraction_start: self.extraction_start.to_ctype(), extraction_end: self.extraction_end.to_ctype(), write_format: self.write_format.into(), - gui_mode_reports: self.gui_mode_reports as i32, - date_format: self.date_format as u32, - noautotimeref: self.noautotimeref as i32, - send_to_srv: self.send_to_srv as u32, - encoding: self.encoding as u32, - nofontcolor: self.nofontcolor as i32, - nohtmlescape: self.nohtmlescape as i32, - millis_separator: self.millis_separator as i8, - latrusmap: self.latrusmap as i32, + gui_mode_reports: self.gui_mode_reports as _, + date_format: self.date_format as _, + noautotimeref: self.noautotimeref as _, + send_to_srv: self.send_to_srv as _, + encoding: self.encoding as _, + nofontcolor: self.nofontcolor as _, + nohtmlescape: self.nohtmlescape as _, + millis_separator: self.millis_separator as _, + latrusmap: self.latrusmap as _, }; config.set_verbose(if self.verbose { 1 } else { 0 }); config.set_bom(if self.bom { 1 } else { 0 }); @@ -841,11 +841,11 @@ impl CcxOptions { hardsubx_hue: self.hardsubx_hue.unwrap_or_default(), hardsubx_lum_thresh: self.hardsubx_lum_thresh.unwrap_or(0.0), transcript_settings: self.transcript_settings.to_ctype(), - date_format: self.date as u32, + date_format: self.date as _, write_format_rewritten: self.write_format_rewritten as _, use_ass_instead_of_ssa: self.use_ass_instead_of_ssa as _, use_webvtt_styling: self.use_webvtt_styling as _, - debug_mask: self.debug_mask as i64, + debug_mask: self.debug_mask as _, debug_mask_on_debug: self.debug_mask_on_debug, udpsrc: get_raw_string(&self.udpsrc.clone().unwrap_or_default()), udpaddr: get_raw_string(&self.udpaddr.clone().unwrap_or_default()), @@ -856,7 +856,7 @@ impl CcxOptions { srv_addr: get_raw_string(&self.srv_addr.clone().unwrap_or_default()), srv_port: get_raw_string(&self.srv_port.unwrap_or_default().to_string()), noautotimeref: self.noautotimeref as _, - input_source: self.input_source as u32, + input_source: self.input_source as _, output_filename: get_raw_string(&self.output_filename.clone().unwrap_or_default()), inputfile: get_raw_strings(self.inputfile.clone().unwrap_or_default()), num_input_files: self.num_input_files.unwrap_or_default(),