X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_ti.c;h=e9ae74623cf50a2cb3082a4dc7758a93f697754b;hp=6c94772a481923b63f7f7ee99ce824aa98872e09;hb=63e3cafac136d773331dee15633f1c9ef08c5493;hpb=85201fb67296429954e5c0a7784ec2c21a900c1d diff --git a/ncurses/tinfo/lib_ti.c b/ncurses/tinfo/lib_ti.c index 6c94772a..e9ae7462 100644 --- a/ncurses/tinfo/lib_ti.c +++ b/ncurses/tinfo/lib_ti.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2010,2013 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 * @@ -34,10 +34,9 @@ #include -#include #include -MODULE_ID("$Id: lib_ti.c,v 1.27 2009/07/28 22:03:36 tom Exp $") +MODULE_ID("$Id: lib_ti.c,v 1.30 2013/06/08 16:55:05 tom Exp $") #if 0 static bool @@ -54,9 +53,9 @@ NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetflag) (NCURSES_SP_DCLx NCURSES_CONST char *str) { int result = ABSENT_BOOLEAN; - int i, j; + int j = -1; - T((T_CALLED("tigetflag(%p, %s)"), SP_PARM, str)); + T((T_CALLED("tigetflag(%p, %s)"), (void *) SP_PARM, str)); if (HasTInfoTerminal(SP_PARM)) { TERMTYPE *tp = &(TerminalOf(SP_PARM)->type); @@ -68,7 +67,7 @@ NCURSES_SP_NAME(tigetflag) (NCURSES_SP_DCLx NCURSES_CONST char *str) } #if NCURSES_XNAMES else { - j = -1; + int i; for_each_ext_boolean(i, tp) { const char *capname = ExtBoolname(tp, i, boolnames); if (same_name(str, capname)) { @@ -98,10 +97,10 @@ tigetflag(NCURSES_CONST char *str) NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetnum) (NCURSES_SP_DCLx NCURSES_CONST char *str) { - int i, j; + int j = -1; int result = CANCELLED_NUMERIC; /* Solaris returns a -1 on error */ - T((T_CALLED("tigetnum(%p, %s)"), SP_PARM, str)); + T((T_CALLED("tigetnum(%p, %s)"), (void *) SP_PARM, str)); if (HasTInfoTerminal(SP_PARM)) { TERMTYPE *tp = &(TerminalOf(SP_PARM)->type); @@ -113,7 +112,7 @@ NCURSES_SP_NAME(tigetnum) (NCURSES_SP_DCLx NCURSES_CONST char *str) } #if NCURSES_XNAMES else { - j = -1; + int i; for_each_ext_number(i, tp) { const char *capname = ExtNumname(tp, i, numnames); if (same_name(str, capname)) { @@ -146,9 +145,9 @@ NCURSES_EXPORT(char *) NCURSES_SP_NAME(tigetstr) (NCURSES_SP_DCLx NCURSES_CONST char *str) { char *result = CANCELLED_STRING; - int i, j; + int j = -1; - T((T_CALLED("tigetstr(%p, %s)"), SP_PARM, str)); + T((T_CALLED("tigetstr(%p, %s)"), (void *) SP_PARM, str)); if (HasTInfoTerminal(SP_PARM)) { TERMTYPE *tp = &(TerminalOf(SP_PARM)->type); @@ -160,7 +159,7 @@ NCURSES_SP_NAME(tigetstr) (NCURSES_SP_DCLx NCURSES_CONST char *str) } #if NCURSES_XNAMES else { - j = -1; + int i; for_each_ext_string(i, tp) { const char *capname = ExtStrname(tp, i, strnames); if (same_name(str, capname)) {