Files
Arquivotheca.SunOS-4.1.4/usr.lib/libcurses/screen/tiget.ed
seta75D ff309bfe1c Init
2021-10-11 18:37:13 -03:00

91 lines
2.1 KiB
Plaintext

# @(#)tiget.ed 1.1 94/10/31 SMI; from S5R3.1 1.16
H
!rm -f tiget.c
0a
#ifndef lint
static char sccsid[] = "@(#)tiget.ed 1.1 94/10/31 SMI"; /* from S5R3.1 1.16 */
#endif
/*
* Routines to retrieve a value based on the short terminfo name.
* This file is created from tiget.ed. DO NOT EDIT ME!
*/
#include "curses_inc.h"
/* generated by sort on caps */
static short booloffsets[] =
{
.
!sed -e '1,/^--- begin bool/d' -e '/^#/,$d' < caps | awk '{printf "\t/* \%s */\t\%d,\n", $2, i++}' | sort > ./tmp/tiget.tmp
.r !cat ./tmp/tiget.tmp
.a
};
/* generated by sort on caps */
static short numoffsets[] =
{
.
!sed -e '1,/^--- begin num/d' -e '/^#/,$d' < caps | awk '{printf "\t/* \%s */\t\%d,\n", $2, i++}' | sort > ./tmp/tiget.tmp
.r !cat ./tmp/tiget.tmp
.a
};
/* generated by sort on caps */
static short stroffsets[] =
{
.
!sed -e '1,/^--- begin str/d' -e '/^#/,$d' < caps | awk '{printf "\t/* \%s */\t\%d,\n", $2, i++}' | sort > ./tmp/tiget.tmp
.r !cat ./tmp/tiget.tmp
!rm ./tmp/tiget.tmp
.a
};
/*
* Return the value of the boolean capability tistr.
* Return -1 if the name is not a boolean capability.
*/
tigetflag(tistr)
register char *tistr;
{
int offset;
char *bool_array = (char *) cur_bools;
return (((offset = _tcsearch(tistr, booloffsets, boolnames, _NUMELEMENTS(booloffsets), 0)) == -1) ? -1 : bool_array[offset]);
}
/*
* Return the value of the numeric capability tistr.
* Return -2 if the name is not a numeric capability.
*/
tigetnum(tistr)
register char *tistr;
{
int offset;
short *num_array = (short *) cur_nums;
return (((offset = _tcsearch(tistr, numoffsets, numnames, _NUMELEMENTS(numoffsets), 0)) == -1) ? -2 : num_array[offset]);
}
/*
* Return the value of the string capability tistr.
* Return (char *) -1 if the name is not a string capability.
*/
char *
tigetstr(tistr)
register char *tistr;
{
int offset;
char **str_array = (char **) cur_strs;
return (((offset = _tcsearch(tistr, stroffsets, strnames, _NUMELEMENTS(stroffsets), 0)) == -1) ? (char *) -1 : str_array[offset]);
}
.
0r copyright.h
/SMI/d
w tiget.c
q