/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ /* * University Copyright- Copyright (c) 1982, 1986, 1988 * The Regents of the University of California * All Rights Reserved * * University Acknowledgment- Portions of this document are derived from * software developed by the University of California, Berkeley, and its * contributors. */ #pragma ident "%Z%%M% %I% %E% SMI" /* * Routines to retrieve a value based on the short terminfo name. * This file is created from tiget.ed. DO NOT EDIT ME! */ #include #include "curses_inc.h" /* generated by sort on caps */ static short booloffsets[] = { /* "am" */ 1, /* "bce" */ 28, /* "bw" */ 0, /* "ccc" */ 27, /* "chts" */ 23, /* "cpix" */ 35, /* "crxm" */ 31, /* "da" */ 11, /* "daisy" */ 32, /* "db" */ 12, /* "eo" */ 5, /* "eslok" */ 16, /* "gn" */ 6, /* "hc" */ 7, /* "hls" */ 29, /* "hs" */ 9, /* "hz" */ 18, /* "in" */ 10, /* "km" */ 8, /* "lpix" */ 36, /* "mc5i" */ 22, /* "mir" */ 13, /* "msgr" */ 14, /* "ndscr" */ 26, /* "npc" */ 25, /* "nrrmc" */ 24, /* "nxon" */ 21, /* "os" */ 15, /* "sam" */ 34, /* "ul" */ 19, /* "xenl" */ 4, /* "xhp" */ 3, /* "xhpa" */ 30, /* "xon" */ 20, /* "xsb" */ 2, /* "xt" */ 17, /* "xvpa" */ 33, }; /* generated by sort on caps */ static short numoffsets[] = { /* "bitwin" */ 31, /* "bitype" */ 32, /* "btns" */ 30, /* "bufsz" */ 16, /* "colors" */ 13, /* "cols" */ 0, /* "cps" */ 28, /* "it" */ 1, /* "lh" */ 9, /* "lines" */ 2, /* "lm" */ 3, /* "lw" */ 10, /* "ma" */ 11, /* "maddr" */ 19, /* "mcs" */ 21, /* "mjump" */ 20, /* "mls" */ 22, /* "ncv" */ 15, /* "nlab" */ 8, /* "npins" */ 23, /* "orc" */ 24, /* "orhi" */ 26, /* "orl" */ 25, /* "orvi" */ 27, /* "pairs" */ 14, /* "pb" */ 5, /* "spinh" */ 18, /* "spinv" */ 17, /* "vt" */ 6, /* "widcs" */ 29, /* "wnum" */ 12, /* "wsl" */ 7, /* "xmc" */ 4, }; /* generated by sort on caps */ static short stroffsets[] = { /* "acsc" */ 146, /* "bel" */ 1, /* "bicr" */ 372, /* "binel" */ 371, /* "birep" */ 370, /* "blink" */ 26, /* "bold" */ 27, /* "cbt" */ 0, /* "chr" */ 306, /* "civis" */ 13, /* "clear" */ 5, /* "cmdch" */ 9, /* "cnorm" */ 16, /* "colornm" */ 373, /* "cpi" */ 304, /* "cr" */ 2, /* "csin" */ 363, /* "csnm" */ 354, /* "csr" */ 3, /* "cub" */ 111, /* "cub1" */ 14, /* "cud" */ 107, /* "cud1" */ 11, /* "cuf" */ 112, /* "cuf1" */ 17, /* "cup" */ 10, /* "cuu" */ 114, /* "cuu1" */ 19, /* "cvr" */ 307, /* "cvvis" */ 20, /* "cwin" */ 277, /* "dch" */ 105, /* "dch1" */ 21, /* "dclk" */ 275, /* "defbi" */ 374, /* "defc" */ 308, /* "devt" */ 362, /* "dial" */ 280, /* "dim" */ 30, /* "dispc" */ 378, /* "dl" */ 106, /* "dl1" */ 22, /* "docr" */ 352, /* "dsl" */ 23, /* "ech" */ 37, /* "ed" */ 7, /* "ehhlm" */ 386, /* "el" */ 6, /* "el1" */ 269, /* "elhlm" */ 387, /* "elohlm" */ 388, /* "enacs" */ 155, /* "endbi" */ 375, /* "erhlm" */ 389, /* "ethlm" */ 390, /* "evhlm" */ 391, /* "ff" */ 46, /* "flash" */ 45, /* "fln" */ 273, /* "fsl" */ 47, /* "getm" */ 358, /* "hd" */ 24, /* "home" */ 12, /* "hook" */ 284, /* "hpa" */ 8, /* "ht" */ 134, /* "hts" */ 132, /* "hu" */ 137, /* "hup" */ 279, /* "ich" */ 108, /* "ich1" */ 52, /* "if" */ 51, /* "il" */ 110, /* "il1" */ 53, /* "ind" */ 129, /* "indn" */ 109, /* "initc" */ 299, /* "initp" */ 300, /* "invis" */ 32, /* "ip" */ 54, /* "iprog" */ 138, /* "is1" */ 48, /* "is2" */ 49, /* "is3" */ 50, /* "kBEG" */ 186, /* "kCAN" */ 187, /* "kCMD" */ 188, /* "kCPY" */ 189, /* "kCRT" */ 190, /* "kDC" */ 191, /* "kDL" */ 192, /* "kEND" */ 194, /* "kEOL" */ 195, /* "kEXT" */ 196, /* "kFND" */ 197, /* "kHLP" */ 198, /* "kHOM" */ 199, /* "kIC" */ 200, /* "kLFT" */ 201, /* "kMOV" */ 203, /* "kMSG" */ 202, /* "kNXT" */ 204, /* "kOPT" */ 205, /* "kPRT" */ 207, /* "kPRV" */ 206, /* "kRDO" */ 208, /* "kRES" */ 211, /* "kRIT" */ 210, /* "kRPL" */ 209, /* "kSAV" */ 212, /* "kSPD" */ 213, /* "kUND" */ 214, /* "ka1" */ 139, /* "ka3" */ 140, /* "kb2" */ 141, /* "kbeg" */ 158, /* "kbs" */ 55, /* "kc1" */ 142, /* "kc3" */ 143, /* "kcan" */ 159, /* "kcbt" */ 148, /* "kclo" */ 160, /* "kclr" */ 57, /* "kcmd" */ 161, /* "kcpy" */ 162, /* "kcrt" */ 163, /* "kctab" */ 58, /* "kcub1" */ 79, /* "kcud1" */ 61, /* "kcuf1" */ 83, /* "kcuu1" */ 87, /* "kdch1" */ 59, /* "kdl1" */ 60, /* "ked" */ 64, /* "kel" */ 63, /* "kend" */ 164, /* "kent" */ 165, /* "kext" */ 166, /* "kf0" */ 65, /* "kf1" */ 66, /* "kf10" */ 67, /* "kf11" */ 216, /* "kf12" */ 217, /* "kf13" */ 218, /* "kf14" */ 219, /* "kf15" */ 220, /* "kf16" */ 221, /* "kf17" */ 222, /* "kf18" */ 223, /* "kf19" */ 224, /* "kf2" */ 68, /* "kf20" */ 225, /* "kf21" */ 226, /* "kf22" */ 227, /* "kf23" */ 228, /* "kf24" */ 229, /* "kf25" */ 230, /* "kf26" */ 231, /* "kf27" */ 232, /* "kf28" */ 233, /* "kf29" */ 234, /* "kf3" */ 69, /* "kf30" */ 235, /* "kf31" */ 236, /* "kf32" */ 237, /* "kf33" */ 238, /* "kf34" */ 239, /* "kf35" */ 240, /* "kf36" */ 241, /* "kf37" */ 242, /* "kf38" */ 243, /* "kf39" */ 244, /* "kf4" */ 70, /* "kf40" */ 245, /* "kf41" */ 246, /* "kf42" */ 247, /* "kf43" */ 248, /* "kf44" */ 249, /* "kf45" */ 250, /* "kf46" */ 251, /* "kf47" */ 252, /* "kf48" */ 253, /* "kf49" */ 254, /* "kf5" */ 71, /* "kf50" */ 255, /* "kf51" */ 256, /* "kf52" */ 257, /* "kf53" */ 258, /* "kf54" */ 259, /* "kf55" */ 260, /* "kf56" */ 261, /* "kf57" */ 262, /* "kf58" */ 263, /* "kf59" */ 264, /* "kf6" */ 72, /* "kf60" */ 265, /* "kf61" */ 266, /* "kf62" */ 267, /* "kf63" */ 268, /* "kf7" */ 73, /* "kf8" */ 74, /* "kf9" */ 75, /* "kfnd" */ 167, /* "khlp" */ 168, /* "khome" */ 76, /* "khts" */ 86, /* "kich1" */ 77, /* "kil1" */ 78, /* "kind" */ 84, /* "kll" */ 80, /* "kmous" */ 355, /* "kmov" */ 171, /* "kmrk" */ 169, /* "kmsg" */ 170, /* "knp" */ 81, /* "knxt" */ 172, /* "kopn" */ 173, /* "kopt" */ 174, /* "kpp" */ 82, /* "kprt" */ 176, /* "kprv" */ 175, /* "krdo" */ 177, /* "kref" */ 178, /* "kres" */ 182, /* "krfr" */ 179, /* "kri" */ 85, /* "krmir" */ 62, /* "krpl" */ 180, /* "krst" */ 181, /* "ksav" */ 183, /* "kslt" */ 193, /* "kspd" */ 184, /* "ktbc" */ 56, /* "kund" */ 185, /* "lf0" */ 90, /* "lf1" */ 91, /* "lf10" */ 92, /* "lf2" */ 93, /* "lf3" */ 94, /* "lf4" */ 95, /* "lf5" */ 96, /* "lf6" */ 97, /* "lf7" */ 98, /* "lf8" */ 99, /* "lf9" */ 100, /* "ll" */ 18, /* "lpi" */ 305, /* "mc0" */ 118, /* "mc4" */ 119, /* "mc5" */ 120, /* "mc5p" */ 144, /* "mcub" */ 336, /* "mcub1" */ 330, /* "mcud" */ 335, /* "mcud1" */ 329, /* "mcuf" */ 337, /* "mcuf1" */ 331, /* "mcuu" */ 338, /* "mcuu1" */ 333, /* "mgc" */ 270, /* "mhpa" */ 328, /* "minfo" */ 356, /* "mrcup" */ 15, /* "mvpa" */ 332, /* "nel" */ 103, /* "oc" */ 298, /* "op" */ 297, /* "pad" */ 104, /* "pause" */ 285, /* "pctrm" */ 383, /* "pfkey" */ 115, /* "pfloc" */ 116, /* "pfx" */ 117, /* "pfxl" */ 361, /* "pln" */ 147, /* "porder" */ 334, /* "prot" */ 33, /* "pulse" */ 283, /* "qdial" */ 281, /* "rbim" */ 348, /* "rc" */ 126, /* "rcsd" */ 349, /* "rep" */ 121, /* "reqmp" */ 357, /* "rev" */ 34, /* "rf" */ 125, /* "rfi" */ 215, /* "ri" */ 130, /* "rin" */ 113, /* "ritm" */ 321, /* "rlm" */ 322, /* "rmacs" */ 38, /* "rmam" */ 152, /* "rmclk" */ 276, /* "rmcup" */ 40, /* "rmdc" */ 41, /* "rmicm" */ 323, /* "rmir" */ 42, /* "rmkx" */ 88, /* "rmln" */ 157, /* "rmm" */ 101, /* "rmp" */ 145, /* "rmpch" */ 380, /* "rmsc" */ 382, /* "rmso" */ 43, /* "rmul" */ 44, /* "rmxon" */ 150, /* "rs1" */ 122, /* "rs2" */ 123, /* "rs3" */ 124, /* "rshm" */ 324, /* "rsubm" */ 325, /* "rsupm" */ 326, /* "rum" */ 327, /* "rwidm" */ 320, /* "s0ds" */ 364, /* "s1ds" */ 365, /* "s2ds" */ 366, /* "s3ds" */ 367, /* "sbim" */ 346, /* "sc" */ 128, /* "scesa" */ 385, /* "scesc" */ 384, /* "sclk" */ 274, /* "scp" */ 301, /* "scs" */ 339, /* "scsd" */ 347, /* "sdrfq" */ 310, /* "setab" */ 360, /* "setaf" */ 359, /* "setb" */ 303, /* "setcolor" */ 376, /* "setf" */ 302, /* "sgr" */ 131, /* "sgr0" */ 39, /* "sgr1" */ 392, /* "sitm" */ 311, /* "slength" */ 393, /* "slines" */ 377, /* "slm" */ 312, /* "smacs" */ 25, /* "smam" */ 151, /* "smcup" */ 28, /* "smdc" */ 29, /* "smgb" */ 340, /* "smgbp" */ 341, /* "smgl" */ 271, /* "smglp" */ 342, /* "smglr" */ 368, /* "smgr" */ 272, /* "smgrp" */ 343, /* "smgt" */ 344, /* "smgtb" */ 369, /* "smgtp" */ 345, /* "smicm" */ 313, /* "smir" */ 31, /* "smkx" */ 89, /* "smln" */ 156, /* "smm" */ 102, /* "smpch" */ 379, /* "smsc" */ 381, /* "smso" */ 35, /* "smul" */ 36, /* "smxon" */ 149, /* "snlq" */ 314, /* "snrmq" */ 315, /* "sshm" */ 316, /* "ssubm" */ 317, /* "ssupm" */ 318, /* "subcs" */ 350, /* "sum" */ 319, /* "supcs" */ 351, /* "swidm" */ 309, /* "tbc" */ 4, /* "tone" */ 282, /* "tsl" */ 135, /* "u0" */ 287, /* "u1" */ 288, /* "u2" */ 289, /* "u3" */ 290, /* "u4" */ 291, /* "u5" */ 292, /* "u6" */ 293, /* "u7" */ 294, /* "u8" */ 295, /* "u9" */ 296, /* "uc" */ 136, /* "vpa" */ 127, /* "wait" */ 286, /* "wind" */ 133, /* "wingo" */ 278, /* "xoffc" */ 154, /* "xonc" */ 153, /* "zerom" */ 353, }; /* * Return the value of the boolean capability tistr. * Return -1 if the name is not a boolean capability. */ int tigetflag(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. */ int tigetnum(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(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]); }