2N/A#pragma ident "%Z%%M% %I% %E% SMI"
2N/A * Routines to retrieve a value based on the short terminfo name.
2N/A/* generated by sort on caps */
2N/Astatic short booloffsets[] =
2N/A!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 2N/A/* generated by sort on caps */
2N/Astatic short numoffsets[] =
2N/A!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 2N/A/* generated by sort on caps */
2N/Astatic short stroffsets[] =
2N/A!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 2N/A * Return the value of the boolean capability tistr.
2N/A * Return -1 if the name is not a boolean capability.
2N/Atigetflag(char *tistr)
2N/A char *bool_array = (char *) cur_bools;
2N/A return (((offset = _tcsearch(tistr, booloffsets, boolnames,
2N/A _NUMELEMENTS(booloffsets), 0)) == -1) ? -1 : bool_array[offset]);
2N/A * Return the value of the numeric capability tistr.
2N/A * Return -2 if the name is not a numeric capability.
2N/Atigetnum(char *tistr)
2N/A short *num_array = (short *) cur_nums;
2N/A return (((offset = _tcsearch(tistr, numoffsets, numnames,
2N/A _NUMELEMENTS(numoffsets), 0)) == -1) ? -2 : num_array[offset]);
2N/A * Return the value of the string capability tistr.
2N/A * Return (char *) -1 if the name is not a string capability.
2N/Atigetstr(char *tistr)
2N/A char **str_array = (char **) cur_strs;
2N/A return (((offset = _tcsearch(tistr, stroffsets, strnames,
2N/A _NUMELEMENTS(stroffsets), 0)) == -1) ? (char *) -1 :