X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_termcap.c;h=4d42307519f1fbe0f5d47f7404f037908c703ec2;hp=e9dae85bdd9780ee8d406f6027ac56bb242f22f9;hb=03f728e5bb3630a54fffc4a2ff2f8dbfcce9088e;hpb=f79b52fddd95c7a6f1ead29ef9c39eb8cdf60795 diff --git a/ncurses/tinfo/lib_termcap.c b/ncurses/tinfo/lib_termcap.c index e9dae85b..4d423075 100644 --- a/ncurses/tinfo/lib_termcap.c +++ b/ncurses/tinfo/lib_termcap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2010,2011 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 * @@ -48,7 +48,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_termcap.c,v 1.73 2010/12/25 19:27:12 tom Exp $") +MODULE_ID("$Id: lib_termcap.c,v 1.76 2011/10/22 17:12:41 tom Exp $") NCURSES_EXPORT_VAR(char *) UP = 0; NCURSES_EXPORT_VAR(char *) BC = 0; @@ -97,7 +97,7 @@ NCURSES_SP_NAME(tgetent) (NCURSES_SP_DCLx char *bufp, const char *name) #ifdef USE_TERM_DRIVER if (termp == 0 || !((TERMINAL_CONTROL_BLOCK *) termp)->drv->isTerminfo) - return (rc); + returnCode(rc); #endif /* @@ -203,10 +203,11 @@ static bool same_tcname(const char *a, const char *b) { fprintf(stderr, "compare(%s,%s)\n", a, b); - return !strncmp(a, b, 2); + return !strncmp(a, b, (size_t) 2); } + #else -#define same_tcname(a,b) !strncmp(a,b,2) +#define same_tcname(a,b) !strncmp(a, b, (size_t) 2) #endif /*************************************************************************** @@ -351,7 +352,7 @@ NCURSES_SP_NAME(tgetstr) (NCURSES_SP_DCLx NCURSES_CONST char *id, char **area) #endif if (j >= 0) { result = tp->Strings[j]; - TR(TRACE_DATABASE, ("found match : %s", _nc_visbuf(result))); + TR(TRACE_DATABASE, ("found match %d: %s", j, _nc_visbuf(result))); /* setupterm forces canceled strings to null */ if (VALID_STRING(result)) { if (result == exit_attribute_mode