summaryrefslogtreecommitdiffstats
path: root/src/macros.h
diff options
context:
space:
mode:
authormongo <mongo@iomega>2016-08-29 15:32:13 -0300
committermongo <mongo@iomega>2016-08-29 15:32:13 -0300
commit93ff070c9e08e7492dc4d261db285964eebc0378 (patch)
treef6165b0d9bb3f58d5575ec3919e9966b4646d36d /src/macros.h
parentfa658e8e2d475bd97ca85e01ceafa0ca1ad57cee (diff)
Changed sc_error sc_info and sc_debug functions to MACROS
Diffstat (limited to 'src/macros.h')
-rw-r--r--src/macros.h46
1 files changed, 35 insertions, 11 deletions
diff --git a/src/macros.h b/src/macros.h
index 31b16eb..817d2fc 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -48,14 +48,38 @@
//#include <ncursesw/curses.h>
extern WINDOW * input_win;
-/*
-#ifdef USECOLORS
-//#define error(...) if ( ! atoi(get_conf_value("nocurses"))) { set_ucolor(input_win, &ucolors[ERROR_MSG]); wmove(input_win, 1, 0); wprintw(input_win, __VA_ARGS__); wclrtoeol(input_win); wrefresh(input_win); } else { printf(__VA_ARGS__); printf("\n"); }
-//#define info(...) if ( ! atoi(get_conf_value("nocurses"))) { set_ucolor(input_win, &ucolors[INFO_MSG]); mvwprintw(input_win, 1, 0, __VA_ARGS__); wclrtoeol(input_win); wrefresh(input_win); } else { printf(__VA_ARGS__); printf("\n"); }
-//#define debug(...) if ( ! atoi(get_conf_value("nocurses"))) { set_ucolor(input_win, &ucolors[INFO_MSG]); mvwprintw(input_win, 1, 0, __VA_ARGS__); wclrtoeol(input_win); wtimeout(input_win, -1); wgetch(input_win); wtimeout(input_win, TIMEOUT_CURSES); wrefresh(input_win); } else { printf(__VA_ARGS__); printf("\n"); }
-#else
-//#define error(...) if ( ! atoi(get_conf_value("nocurses"))) { wmove(input_win, 1, 0); wprintw(input_win, __VA_ARGS__); wclrtoeol(input_win); wrefresh(input_win); } else { printf(__VA_ARGS__); printf("\n"); }
-//#define info(...) if ( ! atoi(get_conf_value("nocurses"))) { mvwprintw(input_win, 1, 0, __VA_ARGS__); wclrtoeol(input_win); wrefresh(input_win); } else { printf(__VA_ARGS__); printf("\n"); }
-//#define debug(...) if ( ! atoi(get_conf_value("nocurses"))) { mvwprintw(input_win, 1, 0, __VA_ARGS__); wclrtoeol(input_win); wtimeout(input_win, -1); wgetch(input_win); wtimeout(input_win, TIMEOUT_CURSES); wrefresh(input_win); } else { printf(__VA_ARGS__); printf("\n"); }
-#endif
-*/
+#define N_INIT_PAIRS 18
+
+#define BLACK COLOR_BLACK
+#define RED COLOR_RED
+#define GREEN COLOR_GREEN
+#define YELLOW COLOR_YELLOW
+#define BLUE COLOR_BLUE
+#define MAGENTA COLOR_MAGENTA
+#define CYAN COLOR_CYAN
+#define WHITE COLOR_WHITE
+
+#define HEADINGS 0
+#define WELCOME 1
+#define CELL_SELECTION 2
+#define CELL_SELECTION_SC 3
+#define NUMB 4
+#define STRG 5
+#define DATEF 6
+#define EXPRESSION 7
+#define INFO_MSG 8
+#define ERROR_MSG 9
+#define MODE 10
+#define CELL_ID 11
+#define CELL_FORMAT 12
+#define CELL_CONTENT 13
+#define INPUT 14
+#define NORMAL 15
+#define CELL_ERROR 16
+#define CELL_NEGATIVE 17
+//#define DEFAULT 18
+#define DEBUG_MSG 19
+
+#define sc_error(x, ...) sc_msg(x, ERROR_MSG, ##__VA_ARGS__)
+#define sc_debug(x, ...) sc_msg(x, DEBUG_MSG, ##__VA_ARGS__)
+#define sc_info(x, ...) sc_msg(x, INFO_MSG, ##__VA_ARGS__)