diff options
-rw-r--r-- | command.c | 6 | ||||
-rw-r--r-- | menu.c | 2 | ||||
-rw-r--r-- | ted.c | 6 | ||||
-rw-r--r-- | ted.h | 10 |
4 files changed, 12 insertions, 12 deletions
@@ -311,7 +311,7 @@ void command_execute(Ted *ted, Command c, i64 argument) { menu_open(ted, MENU_OPEN); break; case CMD_NEW: - (void)ted_new_file(ted, NULL); + ted_new_file(ted, NULL); break; case CMD_SAVE: ted->last_save_time = ted->frame_time; @@ -331,7 +331,7 @@ void command_execute(Ted *ted, Command c, i64 argument) { break; case CMD_SAVE_ALL: ted->last_save_time = ted->frame_time; - (void)ted_save_all(ted); + ted_save_all(ted); break; case CMD_RELOAD_ALL: ted_reload_all(ted); @@ -412,7 +412,7 @@ void command_execute(Ted *ted, Command c, i64 argument) { case CMD_OPEN_CONFIG: { char local_config_filename[TED_PATH_MAX]; strbuf_printf(local_config_filename, "%s" PATH_SEPARATOR_STR TED_CFG, ted->local_data_dir); - (void)ted_open_file(ted, local_config_filename); + ted_open_file(ted, local_config_filename); } break; case CMD_COMMAND_SELECTOR: menu_open(ted, MENU_COMMAND_SELECTOR); @@ -181,7 +181,7 @@ void menu_update(Ted *ted) { if (selected_file) { // open that file! menu_close(ted); - (void)ted_open_file(ted, selected_file); + ted_open_file(ted, selected_file); free(selected_file); } } break; @@ -377,7 +377,7 @@ TextBuffer *ted_get_buffer_with_file(Ted *ted, const char *path) { return NULL; } -Status ted_open_file(Ted *ted, const char *filename) { +bool ted_open_file(Ted *ted, const char *filename) { char path[TED_PATH_MAX]; ted_path_full(ted, filename, path, sizeof path); @@ -408,7 +408,7 @@ Status ted_open_file(Ted *ted, const char *filename) { } } -Status ted_new_file(Ted *ted, const char *filename) { +bool ted_new_file(Ted *ted, const char *filename) { u16 buffer_idx, tab_idx; char path[TED_PATH_MAX]; if (filename) @@ -432,7 +432,7 @@ Status ted_new_file(Ted *ted, const char *filename) { } -Status ted_save_all(Ted *ted) { +bool ted_save_all(Ted *ted) { bool success = true; bool *buffers_used = ted->buffers_used; for (u16 i = 0; i < TED_MAX_BUFFERS; ++i) { @@ -726,7 +726,7 @@ void buffer_copy_or_cut(TextBuffer *buffer, bool cut); void buffer_copy(TextBuffer *buffer); void buffer_cut(TextBuffer *buffer); void buffer_paste(TextBuffer *buffer); -Status buffer_load_file(TextBuffer *buffer, const char *filename); +bool buffer_load_file(TextBuffer *buffer, const char *filename); void buffer_reload(TextBuffer *buffer); bool buffer_externally_changed(TextBuffer *buffer); void buffer_new_file(TextBuffer *buffer, const char *filename); @@ -1042,7 +1042,7 @@ void ted_seterr_to_buferr(Ted *ted, TextBuffer *buffer); bool ted_haserr(Ted *ted); // Returns the buffer containing the file at `path`, or NULL if there is none. TextBuffer *ted_get_buffer_with_file(Ted *ted, const char *path); -Status ted_save_all(Ted *ted); +bool ted_save_all(Ted *ted); void ted_reload_all(Ted *ted); const char *ted_geterr(Ted *ted); // Load all the fonts ted will use. @@ -1057,8 +1057,8 @@ LSP *ted_get_lsp_by_id(Ted *ted, LSPID id); LSP *ted_get_lsp(Ted *ted, const char *path, Language language); LSP *ted_active_lsp(Ted *ted); u32 ted_color(Ted *ted, ColorSetting color); -Status ted_open_file(Ted *ted, const char *filename); -Status ted_new_file(Ted *ted, const char *filename); +bool ted_open_file(Ted *ted, const char *filename); +bool ted_new_file(Ted *ted, const char *filename); // returns the index of an available buffer, or -1 if none are available i32 ted_new_buffer(Ted *ted); // Returns the index of an available node, or -1 if none are available @@ -1067,7 +1067,7 @@ i32 ted_new_node(Ted *ted); // Make sure you set active_buffer to something else if you delete it! void ted_delete_buffer(Ted *ted, u16 index); // save all changes to all buffers with unsaved changes. -Status ted_save_all(Ted *ted); +bool ted_save_all(Ted *ted); // sets the active buffer to this buffer, and updates active_node, etc. accordingly // you can pass NULL to buffer to make it so no buffer is active. void ted_switch_to_buffer(Ted *ted, TextBuffer *buffer); |