2 /***************************************************************************
4 ****************************************************************************
5 * ncurses is copyright (C) 1992-1995 *
7 * zmbenhal@netcom.com *
9 * esr@snark.thyrsus.com *
11 * Permission is hereby granted to reproduce and distribute ncurses *
12 * by any means and for any fee, whether alone or as part of a *
13 * larger distribution, in source or in binary form, PROVIDED *
14 * this notice is included with any such distribution, and is not *
15 * removed from any of its header files. Mention of ncurses in any *
16 * applications linked with it is highly appreciated. *
18 * ncurses comes AS IS with no warranty, implied or expressed. *
20 ***************************************************************************/
23 #include <curses.priv.h>
28 MODULE_ID("$Id: lib_ti.c,v 1.7 1996/12/21 14:24:06 tom Exp $")
30 int tigetflag(const char *str)
34 T(("tigetflag(%s)", str));
36 for (i = 0; i < BOOLCOUNT; i++)
37 if (!strcmp(str, boolnames[i]))
38 return cur_term->type.Booleans[i];
40 return ABSENT_BOOLEAN;
43 int tigetnum(const char *str)
47 T(("tigetnum(%s)", str));
49 for (i = 0; i < NUMCOUNT; i++)
50 if (!strcmp(str, numnames[i]))
51 return cur_term->type.Numbers[i];
53 return CANCELLED_NUMERIC;
56 char *tigetstr(const char *str)
60 T(("tigetstr(%s)", str));
62 for (i = 0; i < STRCOUNT; i++)
63 if (!strcmp(str, strnames[i]))
64 return cur_term->type.Strings[i];
66 return CANCELLED_STRING;