diff --git a/src/lib.rs b/src/lib.rs index 8528d77..7864c2b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,8 @@ use std::ffi::CStr; use libc::c_char; +mod radio; + const COPYRIGHT: &'static str = "Copyright (C) 2018 Serge Vakulenko KK6ABQ"; #[no_mangle] @@ -54,17 +56,6 @@ pub extern "C" fn process_options() { } -extern { - fn radio_list_c(); -} - -#[no_mangle] -pub extern "C" fn radio_list() { - unsafe { - radio_list_c(); - } -} - #[cfg(test)] mod tests { #[test] diff --git a/src/radio.rs b/src/radio.rs new file mode 100644 index 0000000..58d293b --- /dev/null +++ b/src/radio.rs @@ -0,0 +1,10 @@ +extern { + fn radio_list_c(); +} + +#[no_mangle] +pub extern "C" fn radio_list() { + unsafe { + radio_list_c(); + } +}