Be more explicit in Makefiles about external libraries linking
[TD_C.git] / TP_13 / exo2 / src / main.c
index 854ddb9c1e52d9dd6a90622eda0b11120080e55b..bdc1ccd881172d9e3c206cd493e9001a6054e05d 100644 (file)
@@ -17,6 +17,12 @@ int main() {
     char* exit_msg = malloc(str_max_length * sizeof(char));
 
     initscr();
+    if (has_colors() == false) {
+        endwin();
+        printf("Votre terminal ne supporte pas les couleurs.\n");
+        exit(EXIT_FAILURE);
+    }
+    start_color();
     getmaxyx(stdscr, row, col);
     noecho();
     curs_set(0);