diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -24,11 +24,13 @@ #include <assert.h> #endif -const int color[] = { +const int colors[] = { COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_YELLOW, COLOR_BLUE, COLOR_MAGENTA, COLOR_CYAN, COLOR_WHITE}; + + #define MAX_PATH 1024 #define EVENT_SIZE ( sizeof (struct inotify_event) ) #define EVENT_BUF_LEN ( 1024 * ( EVENT_SIZE + 16 ) ) @@ -181,8 +183,9 @@ int main(int argc, char* argv[]){ CHECK(wrefresh, sep_win); init_readline(); - for(int i = 0 ; i < 9 ; i++) { - init_pair( i+1, i, COLOR_BLACK); + const int nbColor = sizeof colors / sizeof *colors; + for(int i = 2 ; i < nbColor ; i++) { + init_pair( i, colors[i], COLOR_BLACK); } // inotify stuff |