added getyxmax

TODO: See why files of type "Unicode text, UTF-8 text" works but "Unicode text, UTF-8 (with BOM) text, with CRLF line terminators" does not.

TODO: add menu to select works, add line numbering, scrolling ability, and bookmarks
This commit is contained in:
Daniel Jones 2023-03-17 16:27:16 -05:00
parent 49e69b0c6f
commit 617c882b6c

View File

@ -35,7 +35,13 @@ fn main() -> std::io::Result<()> {
//screen init function //screen init function
fn screen(line: &str){ fn screen(line: &str){
let mut stdscr: i8 = 0;
let mut w: i32 = 0; //width
let mut h: i32 = 0; //height
ncurses::getmaxyx(&mut stdscr, &mut h, &mut w);
ncurses::initscr(); ncurses::initscr();
ncurses::clear();
ncurses::addstr(line); ncurses::addstr(line);
ncurses::refresh(); ncurses::refresh();
ncurses::getch(); ncurses::getch();