diff options
author | mongo <mongo@iomega> | 2016-04-12 12:11:11 -0300 |
---|---|---|
committer | mongo <mongo@iomega> | 2016-04-12 12:11:11 -0300 |
commit | cc002346a1f5ee45cf1b1d6103b13e5c5137585f (patch) | |
tree | 98851d8cf581f77184774c4689b510fad17542b8 | |
parent | 86971a282be00d2404229e6e06fffbc578b14e07 (diff) |
Changed ncurses.h to ncursesw/curses.h
-rwxr-xr-x | src.scim2/cmds.c | 46 | ||||
-rwxr-xr-x | src.scim2/cmds_command.c | 30 | ||||
-rwxr-xr-x | src.scim2/cmds_edit.c | 4 | ||||
-rwxr-xr-x | src.scim2/cmds_insert.c | 2 | ||||
-rwxr-xr-x | src.scim2/cmds_normal.c | 38 | ||||
-rwxr-xr-x | src.scim2/cmds_visual.c | 18 | ||||
-rwxr-xr-x | src.scim2/color.c | 14 | ||||
-rwxr-xr-x | src.scim2/exec.c | 4 | ||||
-rwxr-xr-x | src.scim2/file.c | 52 | ||||
-rwxr-xr-x | src.scim2/filter.c | 8 | ||||
-rw-r--r-- | src.scim2/gram.c | 3928 | ||||
-rwxr-xr-x | src.scim2/help.c | 10 | ||||
-rwxr-xr-x | src.scim2/hide_show.c | 14 | ||||
-rwxr-xr-x | src.scim2/history.c | 2 | ||||
-rwxr-xr-x | src.scim2/input.c | 5 | ||||
-rwxr-xr-x | src.scim2/interp.c | 78 | ||||
-rwxr-xr-x | src.scim2/lex.c | 2 | ||||
-rwxr-xr-x | src.scim2/main.c | 30 | ||||
-rwxr-xr-x | src.scim2/maps.c | 6 | ||||
-rwxr-xr-x | src.scim2/pipe.c | 10 | ||||
-rwxr-xr-x | src.scim2/range.c | 14 | ||||
-rwxr-xr-x | src.scim2/screen.c | 12 | ||||
-rwxr-xr-x | src.scim2/sort.c | 10 | ||||
-rwxr-xr-x | src.scim2/undo.c | 12 | ||||
-rwxr-xr-x | src.scim2/vmtbl.c | 12 | ||||
-rwxr-xr-x | src.scim2/xls.c | 4 | ||||
-rwxr-xr-x | src.scim2/xlsx.c | 18 | ||||
-rwxr-xr-x | src.scim2/xmalloc.c | 4 |
28 files changed, 4151 insertions, 236 deletions
diff --git a/src.scim2/cmds.c b/src.scim2/cmds.c index 953e367..ff24949 100755 --- a/src.scim2/cmds.c +++ b/src.scim2/cmds.c @@ -1,4 +1,4 @@ -#include <curses.h> +#include <ncursesw/curses.h> #include <stdlib.h> #include <ctype.h> // for isdigit #include <wchar.h> @@ -74,7 +74,7 @@ void sync_refs() { for (j=0; j <= maxcol; j++) if ( (p = *ATBL(tbl, i, j)) && p->expr ) { syncref(p->expr); - //scinfo("%d %d %d", i, j, ++k); + //sc_info("%d %d %d", i, j, ++k); } return; } @@ -92,7 +92,7 @@ void syncref(register struct enode *e) { //if (e->e.v.vp->flags & iscleared) { if (e->e.v.vp->flags & is_deleted) { e->op = ERR_; - //scinfo("%d %d", e->e.v.vp->row, e->e.v.vp->col); + //sc_info("%d %d", e->e.v.vp->row, e->e.v.vp->col); e->e.o.left = NULL; e->e.o.right = NULL; } else if (e->e.v.vp->flags & may_sync) @@ -117,7 +117,7 @@ void deletecol() { struct ent **pp; if (any_locked_cells(0, curcol, maxrow, curcol)) { - scinfo("Locked cells encountered. Nothing changed"); + sc_info("Locked cells encountered. Nothing changed"); return; } @@ -179,7 +179,7 @@ void deletecol() { void copyent(register struct ent *n, register struct ent *p, int dr, int dc, int r1, int c1, int r2, int c2, int special) { if (!n || !p) { - scerror("internal error"); + sc_error("internal error"); return; } @@ -450,23 +450,23 @@ void doformat(int c1, int c2, int w, int p, int r) { if (c2 >= maxcols && !growtbl(GROWCOL, 0, c2)) c2 = maxcols-1 ; if (w == 0) { - scinfo("Width too small - setting to 1"); + sc_info("Width too small - setting to 1"); w = 1; } if (! atoi(get_conf_value("nocurses")) && w > COLS - rescol - 2) { - scinfo("Width too large - Maximum = %d", COLS - rescol - 2); + sc_info("Width too large - Maximum = %d", COLS - rescol - 2); w = COLS - rescol - 2; } if (p > w) { - scinfo("Precision too large"); + sc_info("Precision too large"); p = w; } checkbounds(&crows, &ccols); if (ccols < c2) { - scerror("Format statement failed to create implied column %d", c2); + sc_error("Format statement failed to create implied column %d", c2); return; } @@ -528,7 +528,7 @@ void formatcol(int c) { modflg++; break; } - scinfo("Current format is %d %d %d", fwidth[curcol], precision[curcol], realfmt[curcol]); + sc_info("Current format is %d %d %d", fwidth[curcol], precision[curcol], realfmt[curcol]); update(TRUE); return; } @@ -609,7 +609,7 @@ void deleterow() { if (any_locked_cells(currow, 0, currow, maxcol)) { - scinfo("Locked cells encountered. Nothing changed"); + sc_info("Locked cells encountered. Nothing changed"); } else { //flush_saved(); @@ -822,7 +822,7 @@ void del_selected_cells() { if (is_range_selected() != -1) { srange * r = get_selected_range(); if (any_locked_cells(r->tlrow, r->tlcol, r->brrow, r->brcol)) { - scerror("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); return; } yank_area(r->tlrow, r->tlcol, r->brrow, r->brcol, 'a', 1); @@ -845,7 +845,7 @@ void del_selected_cells() { // delete cell } else { if (any_locked_cells(currow, curcol, currow, curcol)) { - scerror("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); return; } yank_area(currow, curcol, currow, curcol, 'e', 1); @@ -961,9 +961,9 @@ void insert_or_edit_cell() { // REVISED - Send command to interpreter void send_to_interp(wchar_t * oper) { - //debug(oper); + //sc_debug("!!%ls!!", oper); wcstombs(line, oper, BUFFERSIZE); - //scdebug("enviado a intérprete. line >>%s<<", line); + //sc_debug("enviado a intérprete. line >>%s<<", line); linelim = 0; (void) yyparse(); if (atoi(get_conf_value("autocalc")) && ! loading) EvalAll(); @@ -1126,7 +1126,7 @@ struct ent * back_col(int arg) { if (c) c--; else { - scinfo ("At column A"); + sc_info ("At column A"); break; } while( col_hidden[c] && c ) @@ -1145,7 +1145,7 @@ struct ent * forw_col(int arg) { c++; else if (! growtbl(GROWCOL, 0, arg)) { /* get as much as needed */ - //scerror("cannot grow"); + //sc_error("cannot grow"); return lookat(currow, curcol); //break; } else @@ -1166,7 +1166,7 @@ struct ent * forw_row(int arg) { r++; else { if (! growtbl(GROWROW, arg, 0)) { - //scerror("cannot grow"); + //sc_error("cannot grow"); return lookat(currow, curcol); } else r++; @@ -1184,7 +1184,7 @@ struct ent * back_row(int arg) { while (arg--) { if (r) r--; else { - scinfo("At row zero"); + sc_info("At row zero"); break; } while (row_hidden[r] && r) @@ -1375,7 +1375,7 @@ void valueize_area(int sr, int sc, int er, int ec) { for (c = sc; c <= ec; c++) { p = *ATBL(tbl, r, c); if (p && p->flags&is_locked) { - scerror(" Cell %s%d is locked", coltoa(c), r); + sc_error(" Cell %s%d is locked", coltoa(c), r); continue; } #ifdef UNDO @@ -1439,7 +1439,7 @@ void select_inner_range(int * vir_tlrow, int * vir_tlcol, int * vir_brrow, int * int locked_cell(int r, int c) { struct ent *p = *ATBL(tbl, r, c); if (p && (p->flags & is_locked)) { - scerror("Cell %s%d is locked", coltoa(c), r) ; + sc_error("Cell %s%d is locked", coltoa(c), r) ; return 1; } return 0; @@ -1467,7 +1467,7 @@ int pad(int n, int r1, int c1, int r2, int c2) { int pad_exceed_width = 0; if (any_locked_cells(r1, c1, r2, c2)) { - scinfo("Locked cells encountered. Nothing changed"); + sc_info("Locked cells encountered. Nothing changed"); return -1; } @@ -1499,7 +1499,7 @@ int pad(int n, int r1, int c1, int r2, int c2) { #endif if (pad_exceed_width) { - scerror(" Could not add padding in some cells. Padding exceeded column width"); + sc_error(" Could not add padding in some cells. Padding exceeded column width"); return 1; } return 0; diff --git a/src.scim2/cmds_command.c b/src.scim2/cmds_command.c index 7873951..788ea1d 100755 --- a/src.scim2/cmds_command.c +++ b/src.scim2/cmds_command.c @@ -1,5 +1,5 @@ #include <string.h> -#include <curses.h> +#include <ncursesw/curses.h> #include <wchar.h> #include <stdlib.h> #include <ctype.h> // for isprint() @@ -193,7 +193,7 @@ void do_commandmode(struct block * sb) { int i; struct ent * p1 = *ATBL(tbl, currow, curcol); if (! p1 || ! p1->format) { - scerror("cell has no format"); + sc_error("cell has no format"); return; } swprintf(cline, BUFFERSIZE, L"%s", p1->format); @@ -314,9 +314,9 @@ void do_commandmode(struct block * sb) { del_range_chars(cline, 0, 4); if ( ! strlen(cline) ) { - scerror("Path to file to load is missing !"); + sc_error("Path to file to load is missing !"); } else if ( modflg && ! force_rewrite ) { - scerror("Changes were made since last save. Use '!' to force the load"); + sc_error("Changes were made since last save. Use '!' to force the load"); } else { delete_structures(); create_structures(); @@ -413,7 +413,7 @@ void do_commandmode(struct block * sb) { } else if ( ! wcsncmp(inputline, L"filteron", 8) ) { wcscpy(interp_line, inputline); if ( ! wcscmp(inputline, L"filteron") && p == -1) { // If there is no selected range - scerror("Please specify a range or select one"); + sc_error("Please specify a range or select one"); return; } else if (p != -1) { wchar_t cline [BUFFERSIZE]; @@ -453,7 +453,7 @@ void do_commandmode(struct block * sb) { swprintf(interp_line, BUFFERSIZE, L"fmt %s%d", coltoa(c), r); if (any_locked_cells(r, c, rf, cf)) { - scerror("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); return; } int l = wcslen(interp_line); @@ -485,7 +485,7 @@ void do_commandmode(struct block * sb) { wcstombs(line, interp_line, BUFFERSIZE); color_cell(r, c, rf, cf, line); #else - scerror("Color support not compiled in"); + sc_error("Color support not compiled in"); chg_mode('.'); inputline[0] = L'\0'; update(TRUE); @@ -499,7 +499,7 @@ void do_commandmode(struct block * sb) { del_range_chars(line, 0, 5); chg_color(line); #else - scerror("Color support not compiled in"); + sc_error("Color support not compiled in"); chg_mode('.'); inputline[0] = '\0'; update(TRUE); @@ -511,7 +511,7 @@ void do_commandmode(struct block * sb) { wcstombs(line, inputline, BUFFERSIZE); del_range_chars(line, 0, 3); parse_str(user_conf_d, line); - scinfo("Config value changed: %s", line); + sc_info("Config value changed: %s", line); } else if ( ! wcsncmp(inputline, L"pad ", 4) ) { int c = curcol, cf = curcol; @@ -593,7 +593,7 @@ void do_commandmode(struct block * sb) { } else if ( ! strncmp(cline, "i tab ", 6) ) { delim = '\t'; } else if ( ! strncmp(cline, "i xls ", 6) ) { #ifndef XLS - scerror("XLS import support not compiled in"); + sc_error("XLS import support not compiled in"); chg_mode('.'); inputline[0] = L'\0'; update(TRUE); @@ -602,7 +602,7 @@ void do_commandmode(struct block * sb) { delim = 'x'; } else if ( ! strncmp(cline, "i xlsx", 6) ) { #ifndef XLSX - scerror("XLSX import support not compiled in"); + sc_error("XLSX import support not compiled in"); chg_mode('.'); inputline[0]= L'\0'; update(TRUE); @@ -614,9 +614,9 @@ void do_commandmode(struct block * sb) { del_range_chars(cline, 0, 5); if ( ! strlen(cline) ) { - scerror("Path to file to import is missing !"); + sc_error("Path to file to import is missing !"); } else if ( modflg && ! force_rewrite ) { - scerror("Changes were made since last save. Save current file or use '!' to force the import."); + sc_error("Changes were made since last save. Save current file or use '!' to force the import."); } else { delete_structures(); create_structures(); @@ -636,7 +636,7 @@ void do_commandmode(struct block * sb) { update(TRUE); } } else { - scerror("COMMAND NOT FOUND !"); + sc_error("COMMAND NOT FOUND !"); } #ifdef HISTORY_FILE @@ -660,7 +660,7 @@ void do_commandmode(struct block * sb) { void ins_in_line(wint_t d) { //DEBUG - //scinfo("3: %d %lc", d, d); + //sc_info("3: %d %lc", d, d); add_wchar(inputline, (wchar_t) d, inputline_pos++); return; diff --git a/src.scim2/cmds_edit.c b/src.scim2/cmds_edit.c index fdd7b2a..40f6d31 100755 --- a/src.scim2/cmds_edit.c +++ b/src.scim2/cmds_edit.c @@ -1,5 +1,5 @@ #include <string.h> -#include <curses.h> +#include <ncursesw/curses.h> //#include <ctype.h> // for isalnum isprint #include "cmds.h" #include "screen.h" @@ -57,7 +57,7 @@ void do_editmode(struct block * sb) { inputline[inputline_pos] = c; ++inputline_pos; - mvwaddwstr(input_win, 0, 1 + rescol, inputline); + mvwprintw(input_win, 0, 1 + rescol, "%ls", inputline); wmove(input_win, 0, inputline_pos + 1 + rescol); wrefresh(input_win); } diff --git a/src.scim2/cmds_insert.c b/src.scim2/cmds_insert.c index 42e54a4..2ddba70 100755 --- a/src.scim2/cmds_insert.c +++ b/src.scim2/cmds_insert.c @@ -44,7 +44,7 @@ void do_insertmode(struct block * sb) { insert_or_edit_cell(); } else if ( wcslen(inputline) < (COLS - 14) && sc_isprint(sb->value)) { // Write new char - //DEBUG scinfo("2: %d %lc", sb->value, sb->value); + //DEBUG sc_info("2: %d %lc", sb->value, sb->value); ins_in_line(sb->value); show_header(input_win); diff --git a/src.scim2/cmds_normal.c b/src.scim2/cmds_normal.c index 4e4088b..2c14d1e 100755 --- a/src.scim2/cmds_normal.c +++ b/src.scim2/cmds_normal.c @@ -106,11 +106,11 @@ void do_normalmode(struct block * buf) { unselect_ranges(); e = tick(buf->pnext->value); if (row_hidden[e->row]) { - scerror("Cell row is hidden"); + sc_error("Cell row is hidden"); break; } if (col_hidden[e->col]) { - scerror("Cell column is hidden"); + sc_error("Cell column is hidden"); break; } lastrow = currow; @@ -146,7 +146,7 @@ void do_normalmode(struct block * buf) { if (loc != NULL) { f = nl_langinfo(D_FMT); } else { - scerror("No locale set. Nothing changed"); + sc_error("No locale set. Nothing changed"); } int p, r = currow, c = curcol, rf = currow, cf = curcol; if ( (p = is_range_selected()) != -1) { @@ -157,14 +157,14 @@ void do_normalmode(struct block * buf) { cf = sr->brcol; } if (any_locked_cells(r, c, rf, cf)) { - scerror("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); return; } dateformat(lookat(r, c), lookat(rf, cf), f); update(TRUE); break; #else - scinfo("Build made without USELOCALE enabled"); + sc_info("Build made without USELOCALE enabled"); #endif } @@ -397,7 +397,7 @@ void do_normalmode(struct block * buf) { inputline_pos = 0; if (start_edit_mode(buf, 's')) show_header(input_win); else { - scinfo("No string value to edit"); + sc_info("No string value to edit"); chg_mode('.'); show_celldetails(input_win); print_mode(input_win); @@ -440,7 +440,7 @@ void do_normalmode(struct block * buf) { srange * r = m->rng; yank_area(r->tlrow, r->tlcol, r->brrow, r->brcol, 'a', cmd_multiplier); if (paste_yanked_ents(0, 'c') == -1) { - scerror("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); break; } @@ -557,7 +557,7 @@ void do_normalmode(struct block * buf) { cf = sr->brcol; } if ( any_locked_cells(r, c, rf, cf) && (buf->pnext->value == L'h' || buf->pnext->value == L'k') ) { - scerror("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); return; } #ifdef UNDO @@ -621,7 +621,7 @@ void do_normalmode(struct block * buf) { if (buf->pnext->value == L'r') { if (any_locked_cells(currow, 0, currow + cmd_multiplier, maxcol)) { - scerror("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); return; } #ifdef UNDO @@ -640,7 +640,7 @@ void do_normalmode(struct block * buf) { } else if (buf->pnext->value == L'c') { if (any_locked_cells(0, curcol, maxrow, curcol + cmd_multiplier)) { - scerror("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); return; } #ifdef UNDO @@ -717,7 +717,7 @@ void do_normalmode(struct block * buf) { // paste cell below or left case L'p': if (paste_yanked_ents(0, 'a') == -1) { - scerror("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); break; } update(TRUE); @@ -729,7 +729,7 @@ void do_normalmode(struct block * buf) { if (buf->pnext->value == L'v' || buf->pnext->value == L'f' || buf->pnext->value == L'c') { int res = buf->value == L'P' ? paste_yanked_ents(0, buf->pnext->value) : paste_yanked_ents(1, buf->pnext->value); // paste cell above or right if (res == -1) { - scerror("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); break; } update(TRUE); @@ -739,7 +739,7 @@ void do_normalmode(struct block * buf) { // paste cell above or right case L't': if (paste_yanked_ents(1, 'a') == -1) { - scerror("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); break; } update(TRUE); @@ -776,7 +776,7 @@ void do_normalmode(struct block * buf) { cf = sr->brcol; } if (any_locked_cells(r, c, rf, cf)) { - scerror("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); return; } wchar_t cline [BUFFERSIZE]; @@ -881,7 +881,7 @@ void do_normalmode(struct block * buf) { update(TRUE); break; #else - scerror("Build was done without UNDO support"); + sc_error("Build was done without UNDO support"); #endif // redo @@ -893,7 +893,7 @@ void do_normalmode(struct block * buf) { update(TRUE); break; #else - scerror("Build was done without UNDO support"); + sc_error("Build was done without UNDO support"); #endif case L'{': // left align @@ -910,7 +910,7 @@ void do_normalmode(struct block * buf) { cf = sr->brcol; } if (any_locked_cells(r, c, rf, cf)) { - scerror("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); return; } #ifdef UNDO @@ -966,7 +966,7 @@ void do_normalmode(struct block * buf) { brcol = sr->brcol; } if (any_locked_cells(tlrow, tlcol, brrow, brcol)) { - scerror("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); return; } if (atoi(get_conf_value("numeric")) == 1) goto numeric; @@ -982,7 +982,7 @@ void do_normalmode(struct block * buf) { if ( ! p ) { continue; } else if (p->expr && !(p->flags & is_strexpr)) { - //scerror("Can't increment / decrement a formula"); + //sc_error("Can't increment / decrement a formula"); continue; } else if (p->flags & is_valid) { #ifdef UNDO diff --git a/src.scim2/cmds_visual.c b/src.scim2/cmds_visual.c index a6c03b4..90e0d07 100755 --- a/src.scim2/cmds_visual.c +++ b/src.scim2/cmds_visual.c @@ -1,4 +1,4 @@ -#include <curses.h> +#include <ncursesw/curses.h> #include <stdlib.h> #include "screen.h" @@ -103,7 +103,7 @@ void do_visualmode(struct block * buf) { break; case OKEY_ENTER: - scinfo("Press <C-o> to begin selection or <Esc> key to exit VISUAL MODE"); + sc_info("Press <C-o> to begin selection or <Esc> key to exit VISUAL MODE"); return; } @@ -245,10 +245,10 @@ void do_visualmode(struct block * buf) { struct ent * e = tick(buf->pnext->value); if (row_hidden[e->row]) { - scerror("Cell row is hidden"); + sc_error("Cell row is hidden"); return; } else if (col_hidden[e->col]) { - scerror("Cell column is hidden"); + sc_error("Cell column is hidden"); return; } r->tlrow = r->tlrow < e->row ? r->tlrow : e->row; @@ -335,10 +335,10 @@ void do_visualmode(struct block * buf) { if (loc != NULL) { f = nl_langinfo(D_FMT); } else { - scerror("No locale set. Nothing changed"); + sc_error("No locale set. Nothing changed"); } if (any_locked_cells(r->tlrow, r->tlcol, r->brrow, r->brcol)) { - scerror("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); return; } dateformat(lookat(r->tlrow, r->tlcol), lookat(r->brrow, r->brcol), f); @@ -347,7 +347,7 @@ void do_visualmode(struct block * buf) { clr_header(input_win, 0); show_header(input_win); #else - scinfo("Build made without USELOCALE enabled"); + sc_info("Build made without USELOCALE enabled"); #endif // EDITION COMMANDS @@ -363,7 +363,7 @@ void do_visualmode(struct block * buf) { // left / right / center align } else if (buf->value == L'{' || buf->value == L'}' || buf->value == L'|') { if (any_locked_cells(r->tlrow, r->tlcol, r->brrow, r->brcol)) { - scerror("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); return; } wchar_t interp_line[BUFFERSIZE]; @@ -437,7 +437,7 @@ void do_visualmode(struct block * buf) { int ic = cmd_multiplier + 1; if ( any_locked_cells(r->tlrow, r->tlcol, r->brrow, r->brcol) && (buf->pnext->value == L'h' || buf->pnext->value == L'k') ) { - scerror("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); return; } #ifdef UNDO diff --git a/src.scim2/color.c b/src.scim2/color.c index b1eca07..5b69a97 100755 --- a/src.scim2/color.c +++ b/src.scim2/color.c @@ -1,7 +1,7 @@ #include <sys/types.h> #include <string.h> #include <stdlib.h> // for atoi -#include <curses.h> +#include <ncursesw/curses.h> #include <ctype.h> #include <unistd.h> @@ -201,7 +201,7 @@ void chg_color(char * str) { // Validate we got enough keys to change a color if (get(d, "fg") == '\0' || get(d, "bg") == '\0' || get(d, "type") == '\0') { - scerror("Color definition incomplete"); + sc_error("Color definition incomplete"); destroy_dictionary(d); return; } @@ -212,7 +212,7 @@ void chg_color(char * str) { (get(d_colors_param, get(d, "bg")) == NULL) || (get(d_colors_param, get(d, "type")) == NULL) ) { - scerror("One of the values specified is wrong. Please check the values of type, fg and bg."); + sc_error("One of the values specified is wrong. Please check the values of type, fg and bg."); destroy_dictionary(d); return; } @@ -238,7 +238,7 @@ void chg_color(char * str) { // supports undo / redo void color_cell(int r, int c, int rf, int cf, char * str) { if (any_locked_cells(r, c, rf, cf)) { - scinfo("Locked cells encountered. Nothing changed"); + sc_error("Locked cells encountered. Nothing changed"); return; } @@ -256,7 +256,7 @@ void color_cell(int r, int c, int rf, int cf, char * str) { if ( ((get(d, "fg") != '\0' && get(d_colors_param, get(d, "fg")) == NULL) || (get(d, "bg") != '\0' && get(d_colors_param, get(d, "bg")) == NULL))) { - scerror("One of the values specified is wrong. Please check the values of type, fg and bg."); + sc_error("One of the values specified is wrong. Please check the values of type, fg and bg."); destroy_dictionary(d); return; } @@ -350,14 +350,14 @@ int redefine_color(char * color, int r, int g, int b) { if (res == 0) { winchg(); if (! loading) - scinfo("Color %s redefined to %d %d %d.", color, r, g, b); + sc_info("Color %s redefined to %d %d %d.", color, r, g, b); return 0; } } #endif if (! loading) - scinfo("Could not redefine color"); + sc_error("Could not redefine color"); return -1; } diff --git a/src.scim2/exec.c b/src.scim2/exec.c index 8e0f640..67664eb 100755 --- a/src.scim2/exec.c +++ b/src.scim2/exec.c @@ -20,7 +20,7 @@ int exec_cmd (char * line) { int my_pipe[2]; if (pipe(my_pipe) == -1) { - scerror("Error creating pipe"); + sc_error("Error creating pipe"); getchar(); reset_prog_mode(); refresh(); @@ -30,7 +30,7 @@ int exec_cmd (char * line) { pid_t child_id = fork(); if (child_id == -1) { - scerror("Fork error"); + sc_error("Fork error"); getchar(); reset_prog_mode(); refresh(); diff --git a/src.scim2/file.c b/src.scim2/file.c index a78c144..40f4d1a 100755 --- a/src.scim2/file.c +++ b/src.scim2/file.c @@ -7,7 +7,7 @@ #include <errno.h> #include <stdlib.h> #include <unistd.h> -//#include <curses.h> +//#include <ncursesw/curses.h> #include <ncursesw/curses.h> #include <sys/wait.h> @@ -118,7 +118,7 @@ int file_exists(const char * fname) { // This function checks if a file suffered mods since it was open int modcheck() { if (modflg && ! atoi(get_conf_value("nocurses"))) { - scerror("File not saved since last change. Add '!' to force"); + sc_error("File not saved since last change. Add '!' to force"); return(1); } return 0; @@ -132,7 +132,7 @@ int savefile() { char name[BUFFERSIZE]; if (! curfile[0] && wcslen(inputline) < 3) { // casos ":w" ":w!" ":x" ":x!" - scerror("There is no filename"); + sc_error("There is no filename"); return -1; } @@ -143,7 +143,7 @@ int savefile() { del_range_chars(name, 0, 1 + force_rewrite); if (! force_rewrite && file_exists(name)) { - scerror("File already exists. Use \"!\" to force rewrite."); + sc_error("File already exists. Use \"!\" to force rewrite."); return -1; } @@ -152,7 +152,7 @@ int savefile() { } if (writefile(curfile, 0, 0, maxrow, maxcol) < 0) { - scerror("File could not be saved"); + sc_error("File could not be saved"); return -1; } return 0; @@ -218,11 +218,11 @@ int writefile(char * fname, int r0, int c0, int rn, int cn) { */ if ((f = openfile(tfname, &pid, NULL)) == NULL) { - scerror("Can't create file \"%s\"", save); + sc_error("Can't create file \"%s\"", save); return -1; } - scinfo("Writing file \"%s\"...", save); + sc_info("Writing file \"%s\"...", save); write_fd(f, r0, c0, rn, cn); closefile(f, pid, 0); @@ -230,7 +230,7 @@ int writefile(char * fname, int r0, int c0, int rn, int cn) { if (! pid) { (void) strcpy(curfile, save); modflg = 0; - scinfo("File \"%s\" written", curfile); + sc_info("File \"%s\" written", curfile); } return 0; @@ -447,7 +447,7 @@ int readfile(char * fname, int eraseflg) { #ifndef XLSX if (! atoi(get_conf_value("nocurses"))) { if (loading) loading = 0; - scerror("XLSX import support not compiled in"); + sc_error("XLSX import support not compiled in"); } #else open_xlsx(fname, "UTF-8"); @@ -460,7 +460,7 @@ int readfile(char * fname, int eraseflg) { } else if (len > 4 && ! strcasecmp( & fname[len-4], ".xls")){ #ifndef XLS if (loading) loading = 0; - scerror("XLS import support not compiled in"); + sc_error("XLS import support not compiled in"); #else open_xls(fname, "UTF-8"); #endif @@ -493,7 +493,7 @@ int readfile(char * fname, int eraseflg) { } else if (! atoi(get_conf_value("nocurses"))) { if (loading) loading = 0; - scinfo("\"%s\" is not a SC-IM compatible file", fname); |