diff options
author | andmarti1424 <andmarti@gmail.com> | 2015-08-05 09:57:22 -0300 |
---|---|---|
committer | andmarti1424 <andmarti@gmail.com> | 2015-08-05 09:57:22 -0300 |
commit | 479d2905d61dad17d6da17bc6e4543f0c1055690 (patch) | |
tree | ba2c90439324782cc69092b8058447ec6bb17f88 /src | |
parent | f5da82418a2b7a972bcfce06d034277f6142a557 (diff) |
changed debug, error and info calls to scdebug, scerror and scinfo
Diffstat (limited to 'src')
-rw-r--r-- | src/filter.c | 10 | ||||
-rw-r--r-- | src/help.c | 9 | ||||
-rw-r--r-- | src/lex.c | 3 |
3 files changed, 13 insertions, 9 deletions
diff --git a/src/filter.c b/src/filter.c index 5fa3e0f..76e5ad6 100644 --- a/src/filter.c +++ b/src/filter.c @@ -3,11 +3,13 @@ #include "macros.h" #include "screen.h" #include "color.h" // for set_ucolor +#include "conf.h" #include "xmalloc.h" // for scxfree #include "filter.h" #include "math.h" #include "utils/string.h" #include <ctype.h> //for isalpha toupper +#include <stdlib.h> #include "sc.h" #include "cmds.h" @@ -53,7 +55,7 @@ void enable_filters(struct ent * left, struct ent * right) { results[0] = minr; // keep in first position the first row of the range! results[1] = maxr; // keep in second position the last row of the range! if (filters == NULL) { - error("There are no filters defined"); + scerror("There are no filters defined"); return; } active = 1; @@ -96,7 +98,7 @@ void enable_filters(struct ent * left, struct ent * right) { // disable any applied filter void disable_filters() { if (results == NULL) { - error("There are no filters active"); + scerror("There are no filters active"); return; } // oculto las filas que no cumplen con los filtros @@ -111,7 +113,7 @@ void disable_filters() { // Show details of each filter void show_filters() { if (filters == NULL) { - error("There are no filters defined"); + scerror("There are no filters defined"); return; } @@ -148,7 +150,7 @@ void free_filters() { // Remove a filter, freeing its memory void del_filter(int id) { if (filters == NULL || id < 0 || id > howmany) { - error("Cannot delete the filter"); + scerror("Cannot delete the filter"); return; } if (filters[id].eval != NULL) { @@ -9,6 +9,7 @@ #include "color.h" #include "utils/string.h" #include "help.h" +#include "conf.h" static char ** long_help; static int delta = 0; @@ -71,7 +72,7 @@ int load_help () { // main function of help void help() { if (load_help() == -1) { - error("Cannot open help file"); + scerror("Cannot open help file"); return; } delta = 0; @@ -225,7 +226,7 @@ void find_word(char * word, char order) { for (i = delta + 1; i < max - 1; i++) { if ((look_result = str_in_str(long_help[i], word)) >= 0) { delta = i; - info(""); + //scinfo(""); break; } } @@ -233,14 +234,14 @@ void find_word(char * word, char order) { for (i = delta - 1; i > 0; i--) { if ((look_result = str_in_str(long_help[i], word)) >= 0) { delta = i; - info(""); + //scinfo(""); break; } } } if (look_result == -1) { - info("Pattern not found."); + scinfo("Pattern not found."); } set_ucolor(input_win, &ucolors[NORMAL]); return; @@ -15,6 +15,7 @@ #include <limits.h> #include "lex.h" #include "sc.h" +#include "conf.h" typedef int bool; enum { false, true }; @@ -180,7 +181,7 @@ int yylex() { if (setjmp(fpe_buf)) { (void) signal(SIGFPE, sig_save); yylval.fval = v; - error("Floating point exception\n"); + scerror("Floating point exception\n"); isfunc = isgoto = 0; tokenst = NULL; return FNUMBER; |