/****************************************************************************
- * Copyright (c) 2008-2013,2014 Free Software Foundation, Inc. *
+ * Copyright (c) 2008-2015,2016 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
# endif
#endif
-MODULE_ID("$Id: tinfo_driver.c,v 1.39 2014/09/27 21:58:57 tom Exp $")
+MODULE_ID("$Id: tinfo_driver.c,v 1.41 2016/09/10 20:14:56 tom Exp $")
/*
* SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
return "tinfo";
}
+#undef SETUP_FAIL
+#define SETUP_FAIL FALSE
+
static bool
drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, const char *tname, int *errret)
{
TERMINAL *termp;
SCREEN *sp;
+ START_TRACE();
T((T_CALLED("tinfo::drv_CanHandle(%p)"), TCB));
assert(TCB != 0 && tname != 0);
}
result = TRUE;
#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
if (command_character)
if ((pthread_self) && (pthread_kill) && (pthread_equal))
_nc_globals.read_thread = pthread_self();
# endif
- n = read(sp->_ifd, &c2, (size_t) 1);
+ n = (int) read(sp->_ifd, &c2, (size_t) 1);
#if USE_PTHREADS_EINTR
_nc_globals.read_thread = 0;
#endif