diff options
author | mongo <andmarti@gmail.com> | 2017-04-06 16:24:29 -0300 |
---|---|---|
committer | mongo <andmarti@gmail.com> | 2017-04-06 16:24:29 -0300 |
commit | 7248f70ce4c9391abc3355a93aac2004e0eb7018 (patch) | |
tree | 660a8f858138316502374f6eaf5b9c06e3e83fac /src | |
parent | b66f544f1b2e2fcdf7b36343b833cf712419f639 (diff) |
renamed some ui functions
Diffstat (limited to 'src')
-rw-r--r-- | src/cmds.c | 2 | ||||
-rw-r--r-- | src/cmds_command.c | 12 | ||||
-rw-r--r-- | src/cmds_edit.c | 2 | ||||
-rw-r--r-- | src/cmds_insert.c | 2 | ||||
-rw-r--r-- | src/cmds_normal.c | 92 | ||||
-rw-r--r-- | src/cmds_visual.c | 18 | ||||
-rw-r--r-- | src/color.c | 5 | ||||
-rw-r--r-- | src/dep_graph.c | 4 | ||||
-rw-r--r-- | src/exec.c | 6 | ||||
-rw-r--r-- | src/file.c | 4 | ||||
-rw-r--r-- | src/filter.c | 2 | ||||
-rw-r--r-- | src/freeze.c | 2 | ||||
-rw-r--r-- | src/gram.y | 10 | ||||
-rw-r--r-- | src/hide_show.c | 4 | ||||
-rw-r--r-- | src/input.c | 6 | ||||
-rw-r--r-- | src/main.c | 4 | ||||
-rw-r--r-- | src/tui.c | 78 | ||||
-rw-r--r-- | src/tui.h | 28 | ||||
-rw-r--r-- | src/version.h | 2 |
19 files changed, 140 insertions, 143 deletions
@@ -581,7 +581,7 @@ void formatcol(int c) { break; } sc_info("Current format is %d %d %d", fwidth[curcol], precision[curcol], realfmt[curcol]); - update(TRUE); + ui_update(TRUE); return; } diff --git a/src/cmds_command.c b/src/cmds_command.c index 2b6d42c..b8b3a36 100644 --- a/src/cmds_command.c +++ b/src/cmds_command.c @@ -358,7 +358,7 @@ void do_commandmode(struct block * sb) { readfile(p.we_wordv[0], 0); //EvalAll(); // is it necessary? modflg = 0; - //update(TRUE); + //ui_update(TRUE); } wordfree(&p); @@ -632,16 +632,16 @@ void do_commandmode(struct block * sb) { } else if ( ! wcscmp(inputline, L"set") ) { char valores[ (get_maxkey_length(user_conf_d) + get_maxvalue_length(user_conf_d) + 1) * user_conf_d->len ]; get_conf_values(valores); - show_text(valores); + ui_show_text(valores); } else if ( ! wcscmp(inputline, L"version") ) { - show_text(rev); + ui_show_text(rev); } else if ( ! wcscmp(inputline, L"showmaps") ) { extern int len_maps; char valores[MAXMAPITEM * len_maps]; get_mappings(valores); - show_text(valores); + ui_show_text(valores); } else if ( ! wcsncmp(inputline, L"nmap", 4) || ! wcsncmp(inputline, L"imap", 4) || @@ -804,7 +804,7 @@ void do_commandmode(struct block * sb) { import_csv(cline, delim); // csv or tab delim import } modflg = 0; - update(TRUE); + ui_update(TRUE); } } else { sc_error("COMMAND NOT FOUND !"); @@ -823,7 +823,7 @@ void do_commandmode(struct block * sb) { chg_mode('.'); inputline[0]=L'\0'; set_comp(0); // unmark tab completion - update(TRUE); + ui_update(TRUE); } return; } diff --git a/src/cmds_edit.c b/src/cmds_edit.c index 38cfa7a..b189016 100644 --- a/src/cmds_edit.c +++ b/src/cmds_edit.c @@ -136,7 +136,7 @@ void do_editmode(struct block * sb) { curcol = forw_col(1)->col; break; } - update(TRUE); + ui_update(TRUE); return; } else if (sb->value == L'a') { // a diff --git a/src/cmds_insert.c b/src/cmds_insert.c index 3ec13df..2b0396c 100644 --- a/src/cmds_insert.c +++ b/src/cmds_insert.c @@ -157,7 +157,7 @@ void do_insertmode(struct block * sb) { curcol = forw_col(1)->col; break; } - update(TRUE); + ui_update(TRUE); return; diff --git a/src/cmds_normal.c b/src/cmds_normal.c index decc0ba..51356a5 100644 --- a/src/cmds_normal.c +++ b/src/cmds_normal.c @@ -59,7 +59,7 @@ void do_normalmode(struct block * buf) { lastrow = currow; currow = forw_row(1)->row; unselect_ranges(); - update(TRUE); + ui_update(TRUE); break; case L'k': @@ -68,7 +68,7 @@ void do_normalmode(struct block * buf) { lastrow = currow; currow = back_row(1)->row; unselect_ranges(); - update(TRUE); + ui_update(TRUE); break; case L'h': @@ -77,7 +77,7 @@ void do_normalmode(struct block * buf) { lastcol = curcol; curcol = back_col(1)->col; unselect_ranges(); - update(TRUE); + ui_update(TRUE); break; case L'l': @@ -86,7 +86,7 @@ void do_normalmode(struct block * buf) { lastcol = curcol; curcol = forw_col(1)->col; unselect_ranges(); - update(TRUE); + ui_update(TRUE); break; case L'0': @@ -103,7 +103,7 @@ void do_normalmode(struct block * buf) { else curcol = left_limit()->col; unselect_ranges(); - update(TRUE); + ui_update(TRUE); break; case L'$': @@ -112,7 +112,7 @@ void do_normalmode(struct block * buf) { lastcol = curcol; curcol = right_limit()->col; unselect_ranges(); - update(TRUE); + ui_update(TRUE); break; case L'^': @@ -120,7 +120,7 @@ void do_normalmode(struct block * buf) { lastrow = currow; currow = goto_top()->row; unselect_ranges(); - update(TRUE); + ui_update(TRUE); break; case L'#': @@ -129,7 +129,7 @@ void do_normalmode(struct block * buf) { currow = goto_bottom()->row; if (currow == lastrow && curcol == lastcol) currow = go_end()->row; unselect_ranges(); - update(TRUE); + ui_update(TRUE); break; // Tick @@ -149,7 +149,7 @@ void do_normalmode(struct block * buf) { lastcol = curcol; currow = e->row; curcol = e->col; - update(TRUE); + ui_update(TRUE); break; // CTRL j @@ -162,7 +162,7 @@ void do_normalmode(struct block * buf) { cf = sr->brcol; } auto_justify(c, cf, DEFWIDTH); // auto justify columns - update(TRUE); + ui_update(TRUE); break; } @@ -193,7 +193,7 @@ void do_normalmode(struct block * buf) { return; } dateformat(lookat(r, c), lookat(rf, cf), f); - update(TRUE); + ui_update(TRUE); break; #else sc_info("Build made without USELOCALE enabled"); @@ -211,7 +211,7 @@ void do_normalmode(struct block * buf) { currow = forw_row(n)->row; unselect_ranges(); scroll_down(n); - update(TRUE); + ui_update(TRUE); break; } @@ -226,7 +226,7 @@ void do_normalmode(struct block * buf) { currow = back_row(n)->row; unselect_ranges(); scroll_up(n); - update(TRUE); + ui_update(TRUE); break; } @@ -237,7 +237,7 @@ void do_normalmode(struct block * buf) { currow = e->row; curcol = e->col; unselect_ranges(); - update(TRUE); + ui_update(TRUE); break; case L'b': @@ -247,28 +247,28 @@ void do_normalmode(struct block * buf) { currow = e->row; curcol = e->col; unselect_ranges(); - update(TRUE); + ui_update(TRUE); break; case L'H': lastrow = currow; currow = vert_top()->row; unselect_ranges(); - update(TRUE); + ui_update(TRUE); break; case L'M': lastrow = currow; currow = vert_middle()->row; unselect_ranges(); - update(TRUE); + ui_update(TRUE); break; case L'L': lastrow = currow; currow = vert_bottom()->row; unselect_ranges(); - update(TRUE); + ui_update(TRUE); break; case L'G': // goto end @@ -278,7 +278,7 @@ void do_normalmode(struct block * buf) { currow = e->row; curcol = e->col; unselect_ranges(); - update(TRUE); + ui_update(TRUE); break; // GOTO goto @@ -295,7 +295,7 @@ void do_normalmode(struct block * buf) { center_hidden_cols=0; offscr_sc_rows = 0; offscr_sc_cols = 0; - update(TRUE); + ui_update(TRUE); break; case L'g': @@ -347,19 +347,19 @@ void do_normalmode(struct block * buf) { send_to_interp(interp_line); } unselect_ranges(); - update(TRUE); + ui_update(TRUE); break; // repeat last goto command - backwards case L'N': go_previous(); - update(TRUE); + ui_update(TRUE); break; // repeat last goto command case L'n': go_last(); - update(TRUE); + ui_update(TRUE); break; // END OF MOVEMENT COMMANDS @@ -390,7 +390,7 @@ void do_normalmode(struct block * buf) { #ifdef HISTORY_FILE add(commandline_history, L""); #endif - handle_cursor(); + ui_handle_cursor(); inputline_pos = 0; real_inputline_pos = 0; ui_show_header(); @@ -400,7 +400,7 @@ void do_normalmode(struct block * buf) { case L'v': chg_mode('v'); ui_show_header(); - handle_cursor(); + ui_handle_cursor(); start_visualmode(currow, curcol, currow, curcol); break; @@ -449,7 +449,7 @@ void do_normalmode(struct block * buf) { // del current cell or range case L'x': del_selected_cells(); - update(TRUE); + ui_update(TRUE); break; // format col or freeze range @@ -561,7 +561,7 @@ void do_normalmode(struct block * buf) { } //if (atoi(get_conf_value("autocalc"))) EvalAll(); - update(TRUE); + ui_update(TRUE); break; } @@ -583,7 +583,7 @@ void do_normalmode(struct block * buf) { } else if (buf->pnext->value == L'v') { valueize_area(r, c, rf, cf); } - update(TRUE); + ui_update(TRUE); break; } @@ -591,7 +591,7 @@ void do_normalmode(struct block * buf) { case L'R': if (bs == 3) { create_range(buf->pnext->value, buf->pnext->pnext->value, NULL, NULL); - update(TRUE); + ui_update(TRUE); } break; @@ -618,7 +618,7 @@ void do_normalmode(struct block * buf) { show_col(c, arg); } cmd_multiplier = 0; - update(TRUE); + ui_update(TRUE); break; } @@ -635,7 +635,7 @@ void do_normalmode(struct block * buf) { } shift(r, c, rf, cf, buf->pnext->value); unselect_ranges(); - update(TRUE); + ui_update(TRUE); break; } @@ -660,7 +660,7 @@ void do_normalmode(struct block * buf) { if (atoi(get_conf_value("autocalc")) && ! loading) EvalAll(); } - update(TRUE); + ui_update(TRUE); break; } @@ -694,7 +694,7 @@ void do_normalmode(struct block * buf) { #ifdef UNDO end_undo_action(); #endif - update(TRUE); + ui_update(TRUE); break; } @@ -725,7 +725,7 @@ void do_normalmode(struct block * buf) { #ifdef UNDO end_undo_action(); #endif - update(TRUE); + ui_update(TRUE); break; } @@ -757,7 +757,7 @@ void do_normalmode(struct block * buf) { sc_error("Locked cells encountered. Nothing changed"); break; } - update(TRUE); + ui_update(TRUE); break; case L'P': @@ -769,7 +769,7 @@ void do_normalmode(struct block * buf) { sc_error("Locked cells encountered. Nothing changed"); break; } - update(TRUE); + ui_update(TRUE); } break; @@ -779,7 +779,7 @@ void do_normalmode(struct block * buf) { sc_error("Locked cells encountered. Nothing changed"); break; } - update(TRUE); + ui_update(TRUE); break; // select inner range - Vir @@ -820,7 +820,7 @@ void do_normalmode(struct block * buf) { swprintf(cline, BUFFERSIZE, L"autojus %s:", coltoa(c)); swprintf(cline + wcslen(cline), BUFFERSIZE, L"%s", coltoa(cf)); send_to_interp(cline); - update(TRUE); + ui_update(TRUE); } break; @@ -927,26 +927,26 @@ void do_normalmode(struct block * buf) { break; } } - update(TRUE); + ui_update(TRUE); break; // scroll up a line case ctl('y'): scroll_up(1); - update(TRUE); + ui_update(TRUE); break; // scroll down a line case ctl('e'): scroll_down(1); - update(TRUE); + ui_update(TRUE); break; // undo case L'u': #ifdef UNDO do_undo(); - update(TRUE); + ui_update(TRUE); break; #else sc_error("Build was done without UNDO support"); @@ -956,7 +956,7 @@ void do_normalmode(struct block * buf) { case ctl('r'): #ifdef UNDO do_redo(); - update(TRUE); + ui_update(TRUE); break; #else sc_error("Build was done without UNDO support"); @@ -995,7 +995,7 @@ void do_normalmode(struct block * buf) { end_undo_action(); #endif cmd_multiplier = 0; - update(TRUE); + ui_update(TRUE); break; } @@ -1005,7 +1005,7 @@ void do_normalmode(struct block * buf) { case L'@': EvalAll(); - update(TRUE); + ui_update(TRUE); break; // increase or decrease numeric value of cell or range @@ -1056,7 +1056,7 @@ void do_normalmode(struct block * buf) { #endif if (atoi(get_conf_value("autocalc"))) EvalAll(); cmd_multiplier = 0; - update(TRUE); + ui_update(TRUE); } break; diff --git a/src/cmds_visual.c b/src/cmds_visual.c index 28e2d72..b46c04d 100644 --- a/src/cmds_visual.c +++ b/src/cmds_visual.c @@ -53,9 +53,9 @@ void start_visualmode(int tlrow, int tlcol, int brrow, int brcol) { } if (visual_submode == '0') { // Started visual mode with 'v' command - update(TRUE); + ui_update(TRUE); } else { // Started visual mode with 'C-v' command - update(FALSE); + ui_update(FALSE); moving = TRUE; } return; @@ -110,7 +110,7 @@ void do_visualmode(struct block * buf) { r->brrow = currow; r->brcol = curcol; - update(FALSE); + ui_update(FALSE); return; } @@ -438,15 +438,15 @@ void do_visualmode(struct block * buf) { #ifdef HISTORY_FILE add(commandline_history, L""); #endif - handle_cursor(); + ui_handle_cursor(); inputline_pos = 0; real_inputline_pos = 0; return; } - //if (visual_submode == '0') - // update(TRUE); - //else { - update(FALSE); - //} + if (visual_submode == '0') + ui_update(TRUE); + else { + ui_update(FALSE); + } } diff --git a/src/color.c b/src/color.c index cb5b900..f4b0930 100644 --- a/src/color.c +++ b/src/color.c @@ -290,8 +290,7 @@ void color_cell(int r, int c, int rf, int cf, char * str) { } destroy_dictionary(d); - if (! loading) - update(TRUE); + if (! loading) ui_update(TRUE); return; } @@ -339,7 +338,7 @@ void unformat(int r, int c, int rf, int cf) { #ifdef UNDO end_undo_action(); #endif - update(TRUE); + ui_update(TRUE); } return; } diff --git a/src/dep_graph.c b/src/dep_graph.c index b8c568c..9438e98 100644 --- a/src/dep_graph.c +++ b/src/dep_graph.c @@ -166,7 +166,7 @@ void print_vertexs() { char det[BUFFERSIZE] = ""; if (graph == NULL) { strcpy(det, "Graph is empty"); - show_text((char *) &det); + ui_show_text((char *) &det); return; } vertexT * temp = graph->vertices; @@ -219,7 +219,7 @@ void print_vertexs() { } temp = temp->next; } - show_text((char *) msg); + ui_show_text((char *) msg); free(msg); return; } @@ -26,7 +26,7 @@ int exec_cmd (char * line) { getchar(); reset_prog_mode(); refresh(); - update(TRUE); + ui_update(TRUE); return -1; } @@ -36,7 +36,7 @@ int exec_cmd (char * line) { getchar(); reset_prog_mode(); refresh(); - update(TRUE); + ui_update(TRUE); return -1; } @@ -80,7 +80,7 @@ int exec_cmd (char * line) { getchar(); reset_prog_mode(); refresh(); - update(TRUE); + ui_update(TRUE); } #endif return 0; @@ -690,8 +690,8 @@ void closefile(FILE *f, int pid, int rfd) { cbreak(); nonl(); noecho (); -#endif } +#endif } } if (brokenpipe) { @@ -915,7 +915,7 @@ void export_plain(char * fname, int r0, int c0, int rn, int cn) { // If a numeric value exists if ( (*pp)->flags & is_valid) { - res = get_formated_value(pp, col, formated_s); + res = ui_get_formated_value(pp, col, formated_s); // res = 0, indicates that in num we store a date // res = 1, indicates a format is applied in num if (res == 0 || res == 1) { diff --git a/src/filter.c b/src/filter.c index 8d1da95..14e475a 100644 --- a/src/filter.c +++ b/src/filter.c @@ -133,7 +133,7 @@ void show_filters() { for (i=0; i < howmany; i++) if (filters[i].eval != NULL) sprintf(valores + strlen(valores), "%d + %s\n", i, filters[i].eval); - show_text(valores); + ui_show_text(valores); return; } diff --git a/src/freeze.c b/src/freeze.c index bd1393b..f6d6ebb 100644 --- a/src/freeze.c +++ b/src/freeze.c @@ -28,6 +28,6 @@ void remove_frange() { freeze_ranges = NULL; center_hidden_rows = 0; center_hidden_cols = 0; - update(TRUE); + ui_update(TRUE); return; } @@ -385,7 +385,7 @@ command: sprintf(det + strlen(det), "is_label: %d\n" , e->flags & is_label); sprintf(det + strlen(det), "iscleared: %d\n" , e->flags & iscleared); sprintf(det + strlen(det), "may_sync: %d\n" , e->flags & may_sync); - show_text((char *) &det); + ui_show_text((char *) &det); } | S_LET var_or_range '=' { @@ -669,7 +669,7 @@ command: } | S_REBUILD_GRAPH { rebuild_graph(); - update(FALSE); + ui_update(FALSE); } | S_PRINT_GRAPH { print_vertexs(); } @@ -678,21 +678,21 @@ command: do_undo(); // sync_refs(); EvalAll(); - update(TRUE); + ui_update(TRUE); } | S_REDO { do_redo(); // sync_refs(); EvalAll(); - update(TRUE); + ui_update(TRUE); } // For scripting and piping | S_RECALC { EvalAll(); - //update(1); + //ui_update(1); //changed = 0; } | S_GETNUM var_or_range { diff --git a/src/hide_show.c b/src/hide_show.c index 35ded0c..005db49 100644 --- a/src/hide_show.c +++ b/src/hide_show.c @@ -139,7 +139,7 @@ void show_hiddenrows() { for (r = 0; r < maxrow; r++) { if (row_hidden[r]) sprintf(valores + strlen(valores), "- %d\n", r); // 12 } - show_text(valores); + ui_show_text(valores); return; } @@ -155,7 +155,7 @@ void show_hiddencols() { for (c = 0; c < maxcol; c++) { if (col_hidden[c]) sprintf(valores + strlen(valores), "- %s\n", coltoa(c)); // 8 } - show_text(valores); + ui_show_text(valores); return; } diff --git a/src/input.c b/src/input.c index 8061614..be3632e 100644 --- a/src/input.c +++ b/src/input.c @@ -42,7 +42,7 @@ void handle_input(struct block * buffer) { if (cmd_pending) ui_print_mult_pend(); // Modify cursor state according to the current mode - handle_cursor(); + ui_handle_cursor(); // Read new character from stdin return_value = ui_getch(&wd); @@ -130,7 +130,7 @@ void break_waitcmd_loop(struct block * buffer) { cmd_multiplier = 0; // Reset the multiplier inputline[0] = L'\0'; // clean inputline flush_buf(buffer); - update(TRUE); + ui_update(TRUE); return; } @@ -212,7 +212,7 @@ void handle_mult(int * cmd_multiplier, struct block * buf, long timeout) { //if (is_single_command(buf, timeout) == EDITION_CMD) // copybuffer(buf, lastcmd_buffer); // save stdin buffer content in lastcmd buffer exec_mult(buf, timeout); - if (*cmd_multiplier > 1) { *cmd_multiplier = 1; update(TRUE); } + if (*cmd_multiplier > 1) { *cmd_multiplier = 1; ui_update(TRUE); } *cmd_multiplier = 0; return; @@ -200,12 +200,12 @@ int main (int argc, char ** argv) { // we show welcome screen if no spreadsheet was passed to SC-IM // and no input was sent throw pipeline if ( ! curfile[0] && ! wcslen(stdin_buffer)) { - do_welcome(); + ui_do_welcome(); // show mode and cell's details in status bar ui_print_mode(); ui_show_celldetails(); } else { - update(TRUE); + ui_update(TRUE); } } else { f = fopen("/dev/tty", "rw"); @@ -14,7 +14,7 @@ * ui_query // function to read text from stdin * ui_do_welcome // function used when starting sc-im without a file as a parameter * ui_handle_cursor // function used to handle cursor depending on current mode - * ui_yyerror // error routine for yacc parser + * yyerror // error routine for yacc parser * ui_show_text // function that shows text in a child process. * used for set, version, showmaps, print_graph, * showfilters, hiddenrows and hiddencols commands @@ -26,15 +26,15 @@ * ui_start_colors // exclusive ui startup routine for colors * ui_clr_header // functions that clears a line in header bar * ui_print_mode // function that shows current mode in top right of screen - * get_formated_value // function used for exporting spreadsheet to plain text + * ui_get_formated_value // function used for exporting spreadsheet to plain text * * these are local funtions that might not be needed to reimplement if writing another ui: * ui_set_ucolor // function called internally for setting a color - * show_content - * show_sc_col_headings - * show_sc_row_headings - * write_j - * add_cell_detail // Add details of an ent to a char * received as a parameter. used for input_win + * ui_show_content + * ui_show_sc_col_headings + * ui_show_sc_row_headings + * ui_write_j + * ui_add_cell_detail // Add details of an ent to a char * received as a parameter. used for input_win * * ANYONE WHO WANTS TO PORT THIS TO ANOTHER UI, WOULD JUST NEED TO REIMPLEMENT THIS FILE * AND HELP() IN HELP.C @@ -138,7 +138,7 @@ void ui_stop_screen() { } /* this function asks user for input from stdin. - * shall be non blocking and should + * should be non blocking and should * return -1 when no key was press * return 0 when key was press. * it receives * wint_t as a parameter. @@ -150,7 +150,7 @@ int ui_getch(wint_t * wd) { /* this function asks user for input from stdin. - * shall be blocking and should + * should be blocking and should * return -1 when ESC was pressed * return 0 otherwise. * it receives * wint_t as a parameter. @@ -203,9 +203,9 @@ void ui_sc_msg(char * s, int type, ...) { } // Welcome screen -void do_welcome() { +void ui_do_welcome() { char * msg_title = "SC-IM - SpreadSheet Calculator Improvised"; - char * msg_by = "A SC fork by Andrés Martinelli"; + char * msg_by = "An SC fork by Andrés Martinelli"; char * msg_version = rev; char * msg_help = "Press :help<Enter> to get help "; char * msg_help2 = "Press <Enter> to enter NORMAL mode"; @@ -219,8 +219,8 @@ void do_welcome() { // show headings int mxcol = offscr_sc_cols + calc_offscr_sc_cols() - 1; int mxrow = offscr_sc_rows + calc_offscr_sc_rows() - 1; - show_sc_col_headings(main_win, mxcol); - show_sc_row_headings(main_win, mxrow); + ui_show_sc_col_headings(main_win, mxcol); + ui_show_sc_row_headings(main_win, mxrow); #ifdef USECOLORS ui_set_ucolor(main_win, &ucolors[WELCOME]); @@ -268,7 +268,7 @@ void do_welcome() { // function that refreshes grid of screen // if header flag is set, the first column of screen gets refreshed -void update(int header) { +void ui_update(int header) { if (loading) return; if (cmd_multiplier > 1) return; if (atoi(get_conf_value("nocurses"))) return; @@ -318,13 +318,13 @@ void update(int header) { // Show the content of the cells // Numeric values, strings. - show_content(main_win, mxrow, mxcol); + ui_show_content(main_win, mxrow, mxcol); // Show sc_col headings: A, B, C, D.. - show_sc_col_headings(main_win, mxcol); + ui_show_sc_col_headings(main_win, mxcol); // Show sc_row headings: 0, 1, 2, 3.. - show_sc_row_headings(main_win, mxrow); + ui_show_sc_row_headings(main_win, mxrow); // Refresh curses windows wrefresh(main_win); @@ -333,7 +333,7 @@ void update(int header) { } // Enable cursor and echo depending on the current mode -void handle_cursor() { +void ui_handle_cursor() { switch (curmode) { case COMMAND_MODE: noecho(); @@ -356,7 +356,7 @@ void handle_cursor() { * JUSTIF: 0 left shift * JUSTIF: 1 right shift */ -void write_j(WINDOW * win, const char * word, const unsigned int row, const unsigned int justif) { +void ui_write_j(WINDOW * win, const char * word, const unsigned int row, const unsigned int justif) { (justif == 0) ? (wmove(win, row, 0) && wclrtoeol(win)) : wmove(win, row, COLS - strlen(word)); wprintw(win, "%s", word); return; @@ -456,11 +456,11 @@ void ui_print_mode() { if (curmode == NORMAL_MODE) { strcat(strm, " -- NORMAL --"); - write_j(input_win, strm, row, RIGHT); + ui_write_j(input_win, strm, row, RIGHT); } else if (curmode == INSERT_MODE) { strcat(strm, " -- INSERT --"); - write_j(input_win, strm, row, RIGHT); + ui_write_j(input_win, strm, row, RIGHT); #ifdef USECOLORS ui_set_ucolor(input_win, &ucolors[INPUT]); @@ -471,18 +471,18 @@ void ui_print_mode() { } else if (curmode == EDIT_MODE) { strcat(strm, " -- EDIT --"); - write_j(input_win, strm, row, RIGHT); + ui_write_j(input_win, strm, row, RIGHT); } else if (curmode == VISUAL_MODE) { strcat(strm, " -- VISUAL --"); if (visual_submode != '0') strcpy(strm, " << VISUAL >>"); - write_j(input_win, strm, row, RIGHT); + ui_write_j(input_win, strm, row, RIGHT); } else if (curmode == COMMAND_MODE) { strcat(strm, "-- COMMAND --"); - write_j(input_win, strm, row, RIGHT); + ui_write_j(input_win, strm, row, RIGHT); #ifdef USECOLORS ui_set_ucolor(input_win, &ucolors[INPUT]); #endif @@ -495,7 +495,7 @@ void ui_print_mode() { |