head 1.1; access; symbols pkgsrc-2026Q1:1.1.0.4 pkgsrc-2026Q1-base:1.1 pkgsrc-2025Q4:1.1.0.2 pkgsrc-2025Q4-base:1.1; locks; strict; comment @// @; 1.1 date 2025.10.02.11.49.44; author nia; state Exp; branches; next ; commitid joTuSMKhX6GUnZcG; desc @@ 1.1 log @cmake39: Initial import. This version of cmake is intended for: - users who wish to compile software written before CMake 4. - developers who wish to test their software with an old cmake version to ensure maximum compatibility. - platforms which lack a C++11 compiler. - platforms which lack support for libuv (e.g. HP-UX). @ text @$NetBSD: patch-Source_CursesDialog_ccmake.cxx,v 1.5 2017/07/19 17:44:34 adam Exp $ initscr() error path include cstdlib for exit --- Source/CursesDialog/ccmake.cxx.orig 2017-07-18 15:22:54.000000000 +0000 +++ Source/CursesDialog/ccmake.cxx @@@@ -11,6 +11,7 @@@@ #include "cmake.h" #include "cmsys/Encoding.hxx" +#include #include #include #include @@@@ -49,7 +50,11 @@@@ void onsig(int /*unused*/) { if (cmCursesForm::CurrentForm) { endwin(); - initscr(); /* Initialization */ + if (initscr() == NULL) { + static const char errmsg[] = "terminal setup failed\n"; + write(STDERR_FILENO, errmsg, sizeof(errmsg) - 1); + exit (1); + } noecho(); /* Echo off */ cbreak(); /* nl- or cr not needed */ keypad(stdscr, true); /* Use key symbols as KEY_DOWN */ @@@@ -124,7 +129,10 @@@@ int main(int argc, char const* const* ar cmCursesForm::DebugStart(); } - initscr(); /* Initialization */ + if (initscr() == NULL) { + fprintf(stderr, "terminal setup failed\n"); + exit (1); + } noecho(); /* Echo off */ cbreak(); /* nl- or cr not needed */ keypad(stdscr, true); /* Use key symbols as KEY_DOWN */ @