Update main.rs
Added ncurses function
This commit is contained in:
parent
ba1b7ec819
commit
461ca2a884
15
src/main.rs
15
src/main.rs
@ -1,7 +1,7 @@
|
|||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::prelude::*;
|
use std::io::prelude::*;
|
||||||
use std::env;
|
use std::env;
|
||||||
use ncurses;
|
extern crate ncurses;
|
||||||
|
|
||||||
fn main() -> std::io::Result<()> {
|
fn main() -> std::io::Result<()> {
|
||||||
let args: Vec<String> = env::args().collect();
|
let args: Vec<String> = env::args().collect();
|
||||||
@ -13,5 +13,18 @@ fn main() -> std::io::Result<()> {
|
|||||||
file.read_to_string(&mut contents).expect("unreadable file.");
|
file.read_to_string(&mut contents).expect("unreadable file.");
|
||||||
|
|
||||||
println!("{}", contents);
|
println!("{}", contents);
|
||||||
|
screen();
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fn screen(){
|
||||||
|
|
||||||
|
ncurses::initscr();
|
||||||
|
ncurses::printw("Hello World!");
|
||||||
|
ncurses::refresh();
|
||||||
|
ncurses::getch();
|
||||||
|
ncurses::endwin();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user