6429 SMB domain join doesn't work with libreSSL
[unleashed.git] / usr / src / lib / libcurses / screen / tiget.ed
blob6e9c1988e470038c54f9ff4990e508e6d6515ea3
2 !rm -f tiget.c
3 0a
4 #pragma ident   "%Z%%M% %I%     %E% SMI"
6 /*
7  * Routines to retrieve a value based on the short terminfo name.
8  * This file is created from tiget.ed. DO NOT EDIT ME!
9  */
11 #include        <sys/types.h>
12 #include        "curses_inc.h"
14 /* generated by sort on caps */
15 static  short   booloffsets[] =
16                 {
18 !sed -e '1,/^--- begin bool/d' -e '/^--- end bool/,$d' -e '/^#/d' < caps | awk '{printf "\t/* \%s */\t\%d,\n", $2, i++}' | sort > ./tmp/tiget.tmp
19 .r !cat ./tmp/tiget.tmp
21                 };
23 /* generated by sort on caps */
24 static  short   numoffsets[] =
25                 {
27 !sed -e '1,/^--- begin num/d' -e '/^--- end num/,$d' -e '/^#/d' < caps | awk '{printf "\t/* \%s */\t\%d,\n", $2, i++}' | sort > ./tmp/tiget.tmp
28 .r !cat ./tmp/tiget.tmp
30                 };
32 /* generated by sort on caps */
33 static  short   stroffsets[] =
34                 {
36 !sed -e '1,/^--- begin str/d' -e '/^--- end str/,$d' -e '/^#/d' < caps | awk '{printf "\t/* \%s */\t\%d,\n", $2, i++}' | sort > ./tmp/tiget.tmp
37 .r !cat ./tmp/tiget.tmp
38 !rm ./tmp/tiget.tmp
40                 };
43  * Return the value of the boolean capability tistr.
44  * Return -1 if the name is not a boolean capability.
45  */
47 int
48 tigetflag(char *tistr)
50         int     offset;
51         char    *bool_array = (char *) cur_bools;
53         return (((offset = _tcsearch(tistr, booloffsets, boolnames,
54             _NUMELEMENTS(booloffsets), 0)) == -1) ? -1 : bool_array[offset]);
58  * Return the value of the numeric capability tistr.
59  * Return -2 if the name is not a numeric capability.
60  */
62 int
63 tigetnum(char *tistr)
65         int     offset;
66         short   *num_array = (short *) cur_nums;
68         return (((offset = _tcsearch(tistr, numoffsets, numnames,
69             _NUMELEMENTS(numoffsets), 0)) == -1) ? -2 : num_array[offset]);
73  * Return the value of the string capability tistr.
74  * Return (char *) -1 if the name is not a string capability.
75  */
77 char    *
78 tigetstr(char *tistr)
80         int     offset;
81         char    **str_array = (char **) cur_strs;
83         return (((offset = _tcsearch(tistr, stroffsets, strnames,
84             _NUMELEMENTS(stroffsets), 0)) == -1) ? (char *) -1 :
85             str_array[offset]);
88 0r copyright.h
89 1,.g/#pragma ident/d
90 w tiget.c