From 48faf189c83bf53b445744c47ccf23ee8817810f Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Sun, 28 Feb 2021 01:26:03 -0800 Subject: [PATCH] Cleanup from removing most of main.c --- main.c | 7 +------ src/lib.rs | 5 ++--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/main.c b/main.c index 0aa5f2b..c98a4c0 100644 --- a/main.c +++ b/main.c @@ -36,16 +36,11 @@ const char version[] = VERSION; extern char *optarg; extern int optind; -extern void print_message_from_rust(); -extern void print_usage(); extern int rust_main(int argc, char** argv); +//TODO handle this correctly int trace_flag = 0; -void usage() { - print_usage(); -} - int main(int argc, char **argv) { return rust_main(argc, argv); } diff --git a/src/lib.rs b/src/lib.rs index 276df8f..e5d16e6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,8 +15,7 @@ extern { fn radio_download(); } -#[no_mangle] -pub extern "C" fn print_usage() { +fn print_usage() { let version = VERSION.unwrap_or("-----"); print!("DMR Config, Version {}, {}", version, COPYRIGHT); @@ -64,7 +63,7 @@ fn get_options() -> Options { } #[no_mangle] -pub extern "C" fn rust_main(argc: c_int, argv: *const *const c_char) -> c_int { +pub extern "C" fn rust_main(_argc: c_int, _argv: *const *const c_char) -> c_int { let args = std::env::args().skip(1); let matches = match get_options().parse(args) {