#include <locale.h>
#endif
-MODULE_ID("$Id: lib_setup.c,v 1.165 2016/02/13 21:20:05 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.167 2016/09/10 20:07:30 tom Exp $")
/****************************************************************************
*
*colp = (int) columns;
if (_nc_prescreen.use_env || _nc_prescreen.use_tioctl) {
- int value;
-
#ifdef __EMX__
{
int screendata[2];
#endif /* HAVE_SIZECHANGE */
if (_nc_prescreen.use_env) {
+ int value;
+
if (_nc_prescreen.use_tioctl) {
/*
* If environment variables are used, update them.
void
_nc_tinfo_cmdch(TERMINAL * termp, int proto)
{
- unsigned i;
- char CC;
char *tmp;
/*
* name as an environment variable - using the same symbol.
*/
if ((tmp = getenv("CC")) != 0 && strlen(tmp) == 1) {
- CC = *tmp;
+ unsigned i;
+ char CC = *tmp;
+
for_each_string(i, &(termp->type)) {
for (tmp = termp->type.Strings[i]; tmp && *tmp; tmp++) {
if (UChar(*tmp) == proto)
{
#ifdef USE_TERM_DRIVER
TERMINAL_CONTROL_BLOCK *TCB = 0;
-#else
- int status;
#endif
TERMINAL *termp;
SCREEN *sp = 0;
my_tcb = typeCalloc(TERMINAL_CONTROL_BLOCK, 1);
termp = &(my_tcb->term);
#else
+ int status;
+
termp = typeCalloc(TERMINAL, 1);
#endif
if (termp == 0) {
}
}
#if !USE_REENTRANT
- strncpy(ttytype, termp->type.term_names, (size_t) (NAMESIZE - 1));
- ttytype[NAMESIZE - 1] = '\0';
+#define MY_SIZE (size_t) (NAMESIZE - 1)
+ _nc_STRNCPY(ttytype, termp->type.term_names, MY_SIZE);
+ ttytype[MY_SIZE] = '\0';
#endif
termp->Filedes = (short) Filedes;