X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_setup.c;h=ab27eb1d8eb90f5719376bc3195de017ef392c6f;hp=9bfe17a861a64c078dbb55124328dc8bfc6fece9;hb=b0916ab669030bac5c8590c0d66e36e1b9b34e9b;hpb=c002077d39fa24ddfe33793eb22942d9518da6fd;ds=sidebyside diff --git a/ncurses/tinfo/lib_setup.c b/ncurses/tinfo/lib_setup.c index 9bfe17a8..ab27eb1d 100644 --- a/ncurses/tinfo/lib_setup.c +++ b/ncurses/tinfo/lib_setup.c @@ -1,5 +1,5 @@ /**************************************************************************** - * 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 * @@ -47,7 +47,7 @@ #include #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 $") /**************************************************************************** * @@ -449,7 +449,7 @@ _nc_setup_tinfo(const char *const tn, TERMTYPE *const tp) ** 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; @@ -464,7 +464,7 @@ _nc_tinfo_cmdch(TERMINAL * termp, char proto) 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; } } @@ -560,7 +560,7 @@ TINFO_SETUP_TERM(TERMINAL ** tp, NCURSES_CONST char *tname, int Filedes, int *errret, - bool reuse) + int reuse) { #ifdef USE_TERM_DRIVER TERMINAL_CONTROL_BLOCK *TCB = 0; @@ -666,7 +666,7 @@ TINFO_SETUP_TERM(TERMINAL ** tp, const TERMTYPE *fallback = _nc_fallback(tname); if (fallback) { - termp->type = *fallback; + _nc_copy_termtype(&(termp->type),fallback); status = TGETENT_YES; } } @@ -680,7 +680,7 @@ TINFO_SETUP_TERM(TERMINAL ** tp, } } #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 @@ -690,7 +690,7 @@ TINFO_SETUP_TERM(TERMINAL ** tp, 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 @@ -789,7 +789,7 @@ NCURSES_EXPORT(int) _nc_setupterm(NCURSES_CONST char *tname, int Filedes, int *errret, - bool reuse) + int reuse) { int res; TERMINAL *termp;