/****************************************************************************
- * Copyright 2018-2021,2022 Thomas E. Dickey *
+ * Copyright 2018-2023,2024 Thomas E. Dickey *
* Copyright 2008-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
# endif
#endif
-MODULE_ID("$Id: tinfo_driver.c,v 1.73 2022/08/13 14:36:43 tom Exp $")
+MODULE_ID("$Id: tinfo_driver.c,v 1.75 2024/05/11 19:20:44 tom Exp $")
/*
* SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
save_ttytype(termp);
#endif
- if (command_character)
- _nc_tinfo_cmdch(termp, *command_character);
+ if (VALID_STRING(command_character))
+ _nc_tinfo_cmdch(termp, UChar(*command_character));
/*
* If an application calls setupterm() rather than initscr() or
* variable.
*/
if ((value = _nc_getenv_num("LINES")) > 0) {
- *linep = value;
+ *linep = Min(value, MAX_ENV_LINES);
T(("screen size: environment LINES = %d", *linep));
}
if ((value = _nc_getenv_num("COLUMNS")) > 0) {
- *colp = value;
+ *colp = Min(value, MAX_ENV_COLUMNS);
T(("screen size: environment COLUMNS = %d", *colp));
}
}