updated documentation headers for better readability.

This commit is contained in:
Daniel 2023-11-18 17:34:03 +00:00
parent d27a7b4ac6
commit 6275b255d5

View File

@ -1,8 +1,8 @@
/* /*
Program: Bibliofile Program: Bibliofile
Language: Rustc 1.71.0 Language: Rustc 1.74.0
ide: CLion ide: kate
Operating system: POP_OS Operating system: Arch Linux
Purpose: TUI-based ereader and library manager for Linux terminal environments. Purpose: TUI-based ereader and library manager for Linux terminal environments.
Last edited: 11/18/23 Last edited: 11/18/23
*/ */
@ -164,7 +164,12 @@ fn get_text(s: &mut Cursive) {
} }
/*
This function is called to turn the page back 1.
function: get_text
params: Cursive session
Returns type: void
*/
fn get_last_text(s: &mut Cursive) { fn get_last_text(s: &mut Cursive) {
@ -226,6 +231,12 @@ fn get_last_text(s: &mut Cursive) {
} }
/*
Loads basic config files for ebook. Checks if there is a bookmark, and if not, displays what it sees and passes along
to the appropriate function.
*/
fn get_init_text(s: &mut Cursive) { fn get_init_text(s: &mut Cursive) {
//removes old layer, builds new one //removes old layer, builds new one
@ -269,7 +280,7 @@ fn get_init_text(s: &mut Cursive) {
//refreshed screen layout //refreshed screen layout
s.add_layer(Dialog::around(TextView::new(text)) s.add_layer(Dialog::around(TextView::new(text))
.title(title.unwrap() + " page: " + &usize_num.to_string()) .title(title.unwrap() + " page: " + &usize_num.to_string())
.button("last", |s| {get_text(s);}) .button("last", |s| {get_last_text(s);})
.button("quit", |s| s.quit()) .button("quit", |s| s.quit())
.button("bookmark", move |s| {bookmark_func(s, page_num, &bookmark_file_name);}) .button("bookmark", move |s| {bookmark_func(s, page_num, &bookmark_file_name);})
.button("next", |s| {get_text(s);}) .button("next", |s| {get_text(s);})