#include #include int main() { // Initialize the curses library initscr(); // Get the terminal capabilities char term_buffer[1024]; const char* term_type = getenv("TERM"); if (term_type == NULL) { fprintf(stderr, "Unable to determine the terminal type.\n"); endwin(); return 1; } // Get the "Ce" capability that caused the crash in vim char* str = tgetstr("Ce", NULL); if (str == NULL) { fprintf(stderr, "Terminal does not support 'Ce' capability.\n"); endwin(); return 1; } printf("Terminal does support 'Ce' capability.\n"); // Cleanup and exit endwin(); return 0; }