remove more useless stuff

master
Lukáš Hozda 4 years ago
parent 9258996b4f
commit e5ea26ff17

@ -221,14 +221,14 @@ pub struct Link {
} }
#[derive(Clone)] #[derive(Clone)]
pub struct Config { pub struct Config {
pub start_uri: String, //[libc::c_char; 512], pub start_uri: String,
pub cmd_text: String, //[libc::c_char; 512], pub cmd_text: String,
pub cmd_image: String, //[libc::c_char; 512], pub cmd_image: String,
pub cmd_browser: String, //[libc::c_char; 512], pub cmd_browser: String,
pub cmd_player: String, //[libc::c_char; 512], pub cmd_player: String,
pub color_prompt: String, //[libc::c_char; 512], pub color_prompt: String,
pub color_selector: String, //[libc::c_char; 512], pub color_selector: String,
pub verbose: String, //[libc::c_char; 512], pub verbose: String,
} }
pub static mut tmpfilename: [libc::c_char; 256] = [0; 256]; pub static mut tmpfilename: [libc::c_char; 256] = [0; 256];
@ -451,53 +451,6 @@ pub unsafe extern "C" fn init_config() {
let mut home: *const libc::c_char = 0 as *const libc::c_char; let mut home: *const libc::c_char = 0 as *const libc::c_char;
let mut i: libc::c_int = 0; let mut i: libc::c_int = 0;
/* copy defaults */ /* copy defaults */
snprintf(
CString::new(config.start_uri.clone()).unwrap().into_raw(),
mem::size_of::<[libc::c_char; 512]>() as libc::c_ulong,
b"gopher://gopher.floodgap.com:70\x00" as *const u8 as *const libc::c_char,
);
snprintf(
CString::new(config.cmd_text.clone()).unwrap().into_raw(),
mem::size_of::<[libc::c_char; 512]>() as libc::c_ulong,
b"%s\x00" as *const u8 as *const libc::c_char,
b"less\x00" as *const u8 as *const libc::c_char,
);
snprintf(
CString::new(config.cmd_image.clone()).unwrap().into_raw(),
mem::size_of::<[libc::c_char; 512]>() as libc::c_ulong,
b"%s\x00" as *const u8 as *const libc::c_char,
b"display\x00" as *const u8 as *const libc::c_char,
);
snprintf(
CString::new(config.cmd_browser.clone()).unwrap().into_raw(),
mem::size_of::<[libc::c_char; 512]>() as libc::c_ulong,
b"%s\x00" as *const u8 as *const libc::c_char,
b"firefox\x00" as *const u8 as *const libc::c_char,
);
snprintf(
CString::new(config.cmd_player.clone()).unwrap().into_raw(),
mem::size_of::<[libc::c_char; 512]>() as libc::c_ulong,
b"%s\x00" as *const u8 as *const libc::c_char,
b"mplayer\x00" as *const u8 as *const libc::c_char,
);
snprintf(
CString::new(config.color_prompt.clone()).unwrap().into_raw(),
mem::size_of::<[libc::c_char; 512]>() as libc::c_ulong,
b"%s\x00" as *const u8 as *const libc::c_char,
b"1;34\x00" as *const u8 as *const libc::c_char,
);
snprintf(
CString::new(config.color_selector.clone()).unwrap().into_raw(),
mem::size_of::<[libc::c_char; 512]>() as libc::c_ulong,
b"%s\x00" as *const u8 as *const libc::c_char,
b"1;32\x00" as *const u8 as *const libc::c_char,
);
snprintf(
CString::new(config.verbose.clone()).unwrap().into_raw(),
mem::size_of::<[libc::c_char; 512]>() as libc::c_ulong,
b"%s\x00" as *const u8 as *const libc::c_char,
b"true\x00" as *const u8 as *const libc::c_char,
);
i = 0 as libc::c_int; i = 0 as libc::c_int;
while i < 20 as libc::c_int { while i < 20 as libc::c_int {
bookmarks[i as usize][0 as libc::c_int as usize] = bookmarks[i as usize][0 as libc::c_int as usize] =

Loading…
Cancel
Save