/****************************************************************************
- * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2011,2012 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 *
#include <locale.h>
#endif
-MODULE_ID("$Id: lib_setup.c,v 1.141 2011/08/13 16:07:22 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.143 2012/02/29 11:50:19 Werner.Fink Exp $")
/****************************************************************************
*
** and substitute it in for the prototype given in 'command_character'.
*/
void
-_nc_tinfo_cmdch(TERMINAL * termp, char proto)
+_nc_tinfo_cmdch(TERMINAL * termp, int proto)
{
unsigned i;
char CC;
CC = *tmp;
for_each_string(i, &(termp->type)) {
for (tmp = termp->type.Strings[i]; tmp && *tmp; tmp++) {
- if (*tmp == proto)
+ if (UChar(*tmp) == proto)
*tmp = CC;
}
}
NCURSES_CONST char *tname,
int Filedes,
int *errret,
- bool reuse)
+ int reuse)
{
#ifdef USE_TERM_DRIVER
TERMINAL_CONTROL_BLOCK *TCB = 0;
const TERMTYPE *fallback = _nc_fallback(tname);
if (fallback) {
- termp->type = *fallback;
+ _nc_copy_termtype(&(termp->type),fallback);
status = TGETENT_YES;
}
}
}
}
#if !USE_REENTRANT
- strncpy(ttytype, termp->type.term_names, NAMESIZE - 1);
+ strncpy(ttytype, termp->type.term_names, (size_t) (NAMESIZE - 1));
ttytype[NAMESIZE - 1] = '\0';
#endif
set_curterm(termp);
if (command_character)
- _nc_tinfo_cmdch(termp, *command_character);
+ _nc_tinfo_cmdch(termp, UChar(*command_character));
/*
* If an application calls setupterm() rather than initscr() or
_nc_setupterm(NCURSES_CONST char *tname,
int Filedes,
int *errret,
- bool reuse)
+ int reuse)
{
int res;
TERMINAL *termp;