summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormongo <andmarti@gmail.com>2017-04-06 16:24:29 -0300
committermongo <andmarti@gmail.com>2017-04-06 16:24:29 -0300
commit7248f70ce4c9391abc3355a93aac2004e0eb7018 (patch)
tree660a8f858138316502374f6eaf5b9c06e3e83fac
parentb66f544f1b2e2fcdf7b36343b833cf712419f639 (diff)
renamed some ui functions
-rwxr-xr-xfiles/ui_example/tui.c14
-rwxr-xr-xfiles/ui_example/tui.h28
-rw-r--r--src/cmds.c2
-rw-r--r--src/cmds_command.c12
-rw-r--r--src/cmds_edit.c2
-rw-r--r--src/cmds_insert.c2
-rw-r--r--src/cmds_normal.c92
-rw-r--r--src/cmds_visual.c18
-rw-r--r--src/color.c5
-rw-r--r--src/dep_graph.c4
-rw-r--r--src/exec.c6
-rw-r--r--src/file.c4
-rw-r--r--src/filter.c2
-rw-r--r--src/freeze.c2
-rw-r--r--src/gram.y10
-rw-r--r--src/hide_show.c4
-rw-r--r--src/input.c6
-rw-r--r--src/main.c4
-rw-r--r--src/tui.c78
-rw-r--r--src/tui.h28
-rw-r--r--src/version.h2
21 files changed, 160 insertions, 165 deletions
diff --git a/files/ui_example/tui.c b/files/ui_example/tui.c
index ee6f47a..9f911be 100755
--- a/files/ui_example/tui.c
+++ b/files/ui_example/tui.c
@@ -54,7 +54,7 @@ int kbhit() {
}
/* 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.
@@ -79,7 +79,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.
@@ -122,21 +122,21 @@ void ui_sc_msg(char * s, int type, ...) {
}
// Welcome screen
-void do_welcome() {
+void ui_do_welcome() {
printf("welcome screen\n");
return;
}
// 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) {
printf("update\n");
printf("value of current cell: %d %d %f\n", currow, curcol, lookat(currow, curcol)->v);
return;
}
// Enable cursor and echo depending on the current mode
-void handle_cursor() {
+void ui_handle_cursor() {
}
// Print multiplier and pending operator on the status bar
@@ -167,11 +167,11 @@ void yyerror(char * err) {
return;
}
-int get_formated_value(struct ent ** p, int col, char * value) {
+int ui_get_formated_value(struct ent ** p, int col, char * value) {
return -1;
}
-void show_text(char * val) {
+void ui_show_text(char * val) {
printf("%s", val);
return;
}
diff --git a/files/ui_example/tui.h b/files/ui_example/tui.h
index 514a421..392bfd1 100755
--- a/files/ui_example/tui.h
+++ b/files/ui_example/tui.h
@@ -31,23 +31,21 @@ void ui_print_mult_pend();
void ui_show_header();
void ui_show_celldetails();
void ui_print_mode();
-
-void do_welcome();
-void update(int header);
-void show_content(WINDOW * win, int mxrow, int mxcol);
-void show_sc_row_headings(WINDOW * win, int mxrow);
-void show_sc_col_headings(WINDOW * win, int mxcol);
-int get_formated_value(struct ent ** p, int col, char * value);
-int calc_cols_show();
-void show_cursor(WINDOW * win);
-void handle_cursor();
-void add_cell_detail(char * d, struct ent * p1);
-void write_j(WINDOW * win, const char * word, const unsigned int row, const unsigned int justif);
-
+void ui_do_welcome();
+void ui_update(int header);
+int ui_get_formated_value(struct ent ** p, int col, char * value);
+void ui_handle_cursor();
void yyerror(char *err); // error routine for yacc (gram.y)
-void show_text(char * val);
+void ui_show_text(char * val);
void ui_bail(lua_State *L, char * msg);
char * ui_query(char * initial_msg);
-void ui_set_ucolor(WINDOW * w, struct ucolor * uc);
void ui_start_colors();
void ui_sc_msg(char * s, int type, ...);
+
+void ui_set_ucolor(WINDOW * w, struct ucolor * uc);
+void ui_show_content(WINDOW * win, int mxrow, int mxcol);
+void ui_show_sc_row_headings(WINDOW * win, int mxrow);
+void ui_show_sc_col_headings(WINDOW * win, int mxcol);
+void ui_add_cell_detail(char * d, struct ent * p1);
+void ui_write_j(WINDOW * win, const char * word, const unsigned int row, const unsigned int justif);
+void ui_show_cursor(WINDOW * win);
diff --git a/src/cmds.c b/src/cmds.c
index 8c13e05..109a05f 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -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;
}
diff --git a/src/exec.c b/src/exec.c
index 1c726c3..9ae2c2b 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -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;
diff --git a/src/file.c b/src/file.c
index ed24802..7302f17 100644
--- a/src/file.c
+++ b/src/file.c
@@ -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;
}
diff --git a/src/gram.y b/src/gram.y
index e8d1745..363be20 100644
--- a/src/gram.y
+++ b/src/gram.y
@@ -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;
diff --git a/src/main.c b/src/main.c
index 25767a2..37ca5f3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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");
diff --git a/src/tui.c b/src/tui.c
index 6b8b6ac..cbb484a 100644
--- a/src/tui.c
+++ b/src/tui.c
@@ -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