17c478bd9Sstevel@tonic-gateH 27c478bd9Sstevel@tonic-gate!rm -f tifget.c 37c478bd9Sstevel@tonic-gate0a 47c478bd9Sstevel@tonic-gate#pragma ident "%Z%%M% %I% %E% SMI" 57c478bd9Sstevel@tonic-gate 67c478bd9Sstevel@tonic-gate/* 77c478bd9Sstevel@tonic-gate * Routines to retrieve a value based on the short terminfo name. 87c478bd9Sstevel@tonic-gate * This file is created from tifget.ed. DO NOT EDIT ME! 97c478bd9Sstevel@tonic-gate */ 107c478bd9Sstevel@tonic-gate 117c478bd9Sstevel@tonic-gate#include <sys/types.h> 127c478bd9Sstevel@tonic-gate#include "curses_inc.h" 137c478bd9Sstevel@tonic-gate 147c478bd9Sstevel@tonic-gate/* generated by sort on caps */ 157c478bd9Sstevel@tonic-gatestatic short booloffsets[] = 167c478bd9Sstevel@tonic-gate { 177c478bd9Sstevel@tonic-gate. 187c478bd9Sstevel@tonic-gate!sed -e '1,/^--- begin bool/d' -e '/^--- end bool/,$d' -e '/^#/d' < caps | awk '{printf "\t/* \%s */\t\%d,\n", $1, i++}' | sort > ./tmp/tifget.tmp 197c478bd9Sstevel@tonic-gate.r !cat ./tmp/tifget.tmp 207c478bd9Sstevel@tonic-gate.a 217c478bd9Sstevel@tonic-gate }; 227c478bd9Sstevel@tonic-gate 237c478bd9Sstevel@tonic-gate/* generated by sort on caps */ 247c478bd9Sstevel@tonic-gatestatic short numoffsets[] = 257c478bd9Sstevel@tonic-gate { 267c478bd9Sstevel@tonic-gate. 277c478bd9Sstevel@tonic-gate!sed -e '1,/^--- begin num/d' -e '/^--- end num/,$d' -e '/^#/d' < caps | awk '{printf "\t/* \%s */\t\%d,\n", $1, i++}' | sort > ./tmp/tifget.tmp 287c478bd9Sstevel@tonic-gate.r !cat ./tmp/tifget.tmp 297c478bd9Sstevel@tonic-gate.a 307c478bd9Sstevel@tonic-gate }; 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate/* generated by sort on caps */ 337c478bd9Sstevel@tonic-gatestatic short stroffsets[] = 347c478bd9Sstevel@tonic-gate { 357c478bd9Sstevel@tonic-gate. 367c478bd9Sstevel@tonic-gate!sed -e '1,/^--- begin str/d' -e '/^--- end str/,$d' -e '/^#/d' < caps | awk '{printf "\t/* \%s */\t\%d,\n", $1, i++}' | sort > ./tmp/tifget.tmp 377c478bd9Sstevel@tonic-gate.r !cat ./tmp/tifget.tmp 387c478bd9Sstevel@tonic-gate!rm ./tmp/tifget.tmp 397c478bd9Sstevel@tonic-gate.a 407c478bd9Sstevel@tonic-gate }; 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gate/* 437c478bd9Sstevel@tonic-gate * Return the value of the long-named boolean capability tistr. 447c478bd9Sstevel@tonic-gate * Return -1 if the name is not a boolean capability. 457c478bd9Sstevel@tonic-gate */ 467c478bd9Sstevel@tonic-gate 477c478bd9Sstevel@tonic-gateint 487c478bd9Sstevel@tonic-gatetifgetflag(char *tistr) 497c478bd9Sstevel@tonic-gate{ 507c478bd9Sstevel@tonic-gate int offset; 517c478bd9Sstevel@tonic-gate char *bool_array = (char *) cur_bools; 527c478bd9Sstevel@tonic-gate 537c478bd9Sstevel@tonic-gate return (((offset = _tcsearch(tistr, booloffsets, boolfnames, 547c478bd9Sstevel@tonic-gate _NUMELEMENTS(booloffsets), 0)) == -1) ? -1 : bool_array[offset]); 557c478bd9Sstevel@tonic-gate} 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gate/* 587c478bd9Sstevel@tonic-gate * Return the value of the long-named numeric capability tistr. 597c478bd9Sstevel@tonic-gate * Return -2 if the name is not a numeric capability. 607c478bd9Sstevel@tonic-gate */ 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gateint 637c478bd9Sstevel@tonic-gatetifgetnum(char *tistr) 647c478bd9Sstevel@tonic-gate{ 657c478bd9Sstevel@tonic-gate int offset; 667c478bd9Sstevel@tonic-gate short *num_array = (short *) cur_nums; 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gate return (((offset = _tcsearch(tistr, numoffsets, numfnames, 697c478bd9Sstevel@tonic-gate _NUMELEMENTS(numoffsets), 0)) == -1) ? -2 : num_array[offset]); 707c478bd9Sstevel@tonic-gate} 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gate/* 737c478bd9Sstevel@tonic-gate * Return the value of the long-named string capability tistr. 747c478bd9Sstevel@tonic-gate * Return (char *) -1 if the name is not a string capability. 757c478bd9Sstevel@tonic-gate */ 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gatechar * 787c478bd9Sstevel@tonic-gatetifgetstr(char *tistr) 797c478bd9Sstevel@tonic-gate{ 807c478bd9Sstevel@tonic-gate int offset; 817c478bd9Sstevel@tonic-gate char **str_array = (char **) cur_strs; 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gate return (((offset = _tcsearch(tistr, stroffsets, strfnames, 847c478bd9Sstevel@tonic-gate _NUMELEMENTS(stroffsets), 0)) == -1) ? (char *) -1 : 857c478bd9Sstevel@tonic-gate str_array[offset]); 867c478bd9Sstevel@tonic-gate} 877c478bd9Sstevel@tonic-gate. 887c478bd9Sstevel@tonic-gate0r copyright.h 89*a6600459Sstevel1,.g/#pragma ident/d 907c478bd9Sstevel@tonic-gatew tifget.c 917c478bd9Sstevel@tonic-gateq 92