17c478bd9Sstevel@tonic-gateH 27c478bd9Sstevel@tonic-gate!rm -f bool num str boolnames numnames strnames boolvals numvals strvals tnames.c tinames.c tifnames.c term.h ./tmp/term.h.new ./tmp/tmp.awk ./tmp/term.h 37c478bd9Sstevel@tonic-gatee caps 47c478bd9Sstevel@tonic-gateg/^#/d 57c478bd9Sstevel@tonic-gate/--- begin bool/+1,/--- end bool/-1 w bool 67c478bd9Sstevel@tonic-gate/--- begin num/+1,/--- end num/-1 w num 77c478bd9Sstevel@tonic-gate/--- begin str/+1,/--- end str/-1 w str 87c478bd9Sstevel@tonic-gateE bool 97c478bd9Sstevel@tonic-gate1,$s/" .*/", / 107c478bd9Sstevel@tonic-gate1,$s/.* "/"/ 117c478bd9Sstevel@tonic-gate1,$-10g/^/.,+9j 127c478bd9Sstevel@tonic-gate+,$j 137c478bd9Sstevel@tonic-gate1i 147c478bd9Sstevel@tonic-gatechar *boolnames[] = 157c478bd9Sstevel@tonic-gate { 167c478bd9Sstevel@tonic-gate. 177c478bd9Sstevel@tonic-gate$a 187c478bd9Sstevel@tonic-gate0 197c478bd9Sstevel@tonic-gate }; 207c478bd9Sstevel@tonic-gate 217c478bd9Sstevel@tonic-gate. 227c478bd9Sstevel@tonic-gatew tinames.c 237c478bd9Sstevel@tonic-gatee bool 247c478bd9Sstevel@tonic-gate1,$s/^[^"]*"[^"]*".// 257c478bd9Sstevel@tonic-gate1,$s/" .*/", / 267c478bd9Sstevel@tonic-gate1,$-10g/^/.,+9j 277c478bd9Sstevel@tonic-gate+,$j 287c478bd9Sstevel@tonic-gate1i 297c478bd9Sstevel@tonic-gatechar *boolcodes[] = 307c478bd9Sstevel@tonic-gate { 317c478bd9Sstevel@tonic-gate. 327c478bd9Sstevel@tonic-gate$a 337c478bd9Sstevel@tonic-gate0 347c478bd9Sstevel@tonic-gate }; 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gate. 377c478bd9Sstevel@tonic-gatew tnames.c 387c478bd9Sstevel@tonic-gatee bool 397c478bd9Sstevel@tonic-gate1,$s/^\([a-z][0-9a-z_]*\),.*/"\1", / 407c478bd9Sstevel@tonic-gate1,$-4g/^/.,+3j 417c478bd9Sstevel@tonic-gate+,$j 427c478bd9Sstevel@tonic-gate1i 437c478bd9Sstevel@tonic-gatechar *boolfnames[] = 447c478bd9Sstevel@tonic-gate { 457c478bd9Sstevel@tonic-gate. 467c478bd9Sstevel@tonic-gate$a 477c478bd9Sstevel@tonic-gate0 487c478bd9Sstevel@tonic-gate }; 497c478bd9Sstevel@tonic-gate 507c478bd9Sstevel@tonic-gate. 517c478bd9Sstevel@tonic-gatew tifnames.c 527c478bd9Sstevel@tonic-gatee bool 537c478bd9Sstevel@tonic-gate1,$s;"[^"]*"[ ]*".." ;/* ; 547c478bd9Sstevel@tonic-gate1,$s;$; */; 557c478bd9Sstevel@tonic-gate1,$s;^; ; 567c478bd9Sstevel@tonic-gate1i 577c478bd9Sstevel@tonic-gate char 587c478bd9Sstevel@tonic-gate. 597c478bd9Sstevel@tonic-gate$a 607c478bd9Sstevel@tonic-gate Sentinel; /* End of bools. DO NOT MOVE! */ 617c478bd9Sstevel@tonic-gate. 627c478bd9Sstevel@tonic-gatew boolvals 637c478bd9Sstevel@tonic-gatee num 647c478bd9Sstevel@tonic-gate1,$s/" .*/", / 657c478bd9Sstevel@tonic-gate1,$s/.* "/"/ 667c478bd9Sstevel@tonic-gate1,$-10g/^/.,+9j 677c478bd9Sstevel@tonic-gate+,$j 687c478bd9Sstevel@tonic-gate1i 697c478bd9Sstevel@tonic-gatechar *numnames[] = 707c478bd9Sstevel@tonic-gate { 717c478bd9Sstevel@tonic-gate. 727c478bd9Sstevel@tonic-gate$a 737c478bd9Sstevel@tonic-gate0 747c478bd9Sstevel@tonic-gate }; 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gate. 777c478bd9Sstevel@tonic-gate0r tinames.c 787c478bd9Sstevel@tonic-gatew tinames.c 797c478bd9Sstevel@tonic-gatee num 807c478bd9Sstevel@tonic-gate1,$s/^[^"]*"[^"]*".// 817c478bd9Sstevel@tonic-gate1,$s/" .*/", / 827c478bd9Sstevel@tonic-gate1,$-10g/^/.,+9j 837c478bd9Sstevel@tonic-gate+,$j 847c478bd9Sstevel@tonic-gate1i 857c478bd9Sstevel@tonic-gatechar *numcodes[] = 867c478bd9Sstevel@tonic-gate { 877c478bd9Sstevel@tonic-gate. 887c478bd9Sstevel@tonic-gate$a 897c478bd9Sstevel@tonic-gate0 907c478bd9Sstevel@tonic-gate }; 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gate. 937c478bd9Sstevel@tonic-gate0r tnames.c 947c478bd9Sstevel@tonic-gatew tnames.c 957c478bd9Sstevel@tonic-gatee num 967c478bd9Sstevel@tonic-gate1,$s/^\([a-z][0-9a-z_]*\),.*/"\1", / 977c478bd9Sstevel@tonic-gate1,$-4g/^/.,+3j 987c478bd9Sstevel@tonic-gate+,$j 997c478bd9Sstevel@tonic-gate1i 1007c478bd9Sstevel@tonic-gatechar *numfnames[] = 1017c478bd9Sstevel@tonic-gate { 1027c478bd9Sstevel@tonic-gate. 1037c478bd9Sstevel@tonic-gate$a 1047c478bd9Sstevel@tonic-gate0 1057c478bd9Sstevel@tonic-gate }; 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gate. 1087c478bd9Sstevel@tonic-gate0r tifnames.c 1097c478bd9Sstevel@tonic-gatew tifnames.c 1107c478bd9Sstevel@tonic-gatee num 1117c478bd9Sstevel@tonic-gate1,$s;"[^"]*"[ ]*".." ;/* ; 1127c478bd9Sstevel@tonic-gate1,$s;$; */; 1137c478bd9Sstevel@tonic-gate1,$s;^; ; 1147c478bd9Sstevel@tonic-gate1i 1157c478bd9Sstevel@tonic-gate short 1167c478bd9Sstevel@tonic-gate. 1177c478bd9Sstevel@tonic-gate$a 1187c478bd9Sstevel@tonic-gate Sentinel; /* End of nums. DO NOT MOVE! */ 1197c478bd9Sstevel@tonic-gate. 1207c478bd9Sstevel@tonic-gatew numvals 1217c478bd9Sstevel@tonic-gatee str 1227c478bd9Sstevel@tonic-gate1,$s/" .*/", / 1237c478bd9Sstevel@tonic-gate1,$s/.* "/"/ 1247c478bd9Sstevel@tonic-gate1,$-10g/^/.,+9j 1257c478bd9Sstevel@tonic-gate+,$j 1267c478bd9Sstevel@tonic-gate1i 1277c478bd9Sstevel@tonic-gatechar *strnames[] = 1287c478bd9Sstevel@tonic-gate { 1297c478bd9Sstevel@tonic-gate. 1307c478bd9Sstevel@tonic-gate$a 1317c478bd9Sstevel@tonic-gate0 1327c478bd9Sstevel@tonic-gate }; 1337c478bd9Sstevel@tonic-gate 1347c478bd9Sstevel@tonic-gate. 1357c478bd9Sstevel@tonic-gate0r tinames.c 1367c478bd9Sstevel@tonic-gatew tinames.c 1377c478bd9Sstevel@tonic-gatee str 1387c478bd9Sstevel@tonic-gate1,$s/^[^"]*"[^"]*".// 1397c478bd9Sstevel@tonic-gate1,$s/" .*/", / 1407c478bd9Sstevel@tonic-gate1,$-10g/^/.,+9j 1417c478bd9Sstevel@tonic-gate+,$j 1427c478bd9Sstevel@tonic-gate1i 1437c478bd9Sstevel@tonic-gatechar *strcodes[] = 1447c478bd9Sstevel@tonic-gate { 1457c478bd9Sstevel@tonic-gate. 1467c478bd9Sstevel@tonic-gate$a 1477c478bd9Sstevel@tonic-gate0 1487c478bd9Sstevel@tonic-gate }; 1497c478bd9Sstevel@tonic-gate 1507c478bd9Sstevel@tonic-gate. 1517c478bd9Sstevel@tonic-gate0r tnames.c 1527c478bd9Sstevel@tonic-gatew tnames.c 1537c478bd9Sstevel@tonic-gatee str 1547c478bd9Sstevel@tonic-gate1,$s/^\([a-z][0-9a-z_]*\),.*/"\1", / 1557c478bd9Sstevel@tonic-gate1,$-4g/^/.,+3j 1567c478bd9Sstevel@tonic-gate+,$j 1577c478bd9Sstevel@tonic-gate1i 1587c478bd9Sstevel@tonic-gatechar *strfnames[] = 1597c478bd9Sstevel@tonic-gate { 1607c478bd9Sstevel@tonic-gate. 1617c478bd9Sstevel@tonic-gate$a 1627c478bd9Sstevel@tonic-gate0 1637c478bd9Sstevel@tonic-gate }; 1647c478bd9Sstevel@tonic-gate 1657c478bd9Sstevel@tonic-gate. 1667c478bd9Sstevel@tonic-gate0r tifnames.c 1677c478bd9Sstevel@tonic-gatew tifnames.c 1687c478bd9Sstevel@tonic-gatee str 1697c478bd9Sstevel@tonic-gate1,$s;"[^"]*"[ ]*".." ;/* ; 1707c478bd9Sstevel@tonic-gate1,$s;$; */; 1717c478bd9Sstevel@tonic-gate1,$s;^; strs.; 1727c478bd9Sstevel@tonic-gate$a 1737c478bd9Sstevel@tonic-gate Sentinel; /* End of strings. DO NOT MOVE! */ 1747c478bd9Sstevel@tonic-gate. 1757c478bd9Sstevel@tonic-gatew strvals 1767c478bd9Sstevel@tonic-gate1,$d 1777c478bd9Sstevel@tonic-gater tnames.c 1787c478bd9Sstevel@tonic-gate1i 1797c478bd9Sstevel@tonic-gate#pragma ident "%Z%%M% %I% %E% SMI" 1807c478bd9Sstevel@tonic-gate 1817c478bd9Sstevel@tonic-gate/* tnames.c: Made automatically from caps and maketerm.ed - don't edit me! */ 1827c478bd9Sstevel@tonic-gate. 1837c478bd9Sstevel@tonic-gate1,$s/ $// 1847c478bd9Sstevel@tonic-gate0r copyright.h 185*a6600459Sstevel1,.g/#pragma ident/d 1867c478bd9Sstevel@tonic-gatew tnames.c 1877c478bd9Sstevel@tonic-gate1,$d 1887c478bd9Sstevel@tonic-gater tinames.c 1897c478bd9Sstevel@tonic-gate1i 1907c478bd9Sstevel@tonic-gate#pragma ident "%Z%%M% %I% %E% SMI" 1917c478bd9Sstevel@tonic-gate 1927c478bd9Sstevel@tonic-gate/* tinames.c: Made automatically from caps and maketerm.ed - don't edit me! */ 1937c478bd9Sstevel@tonic-gate. 1947c478bd9Sstevel@tonic-gate1,$s/ $// 1957c478bd9Sstevel@tonic-gate0r copyright.h 196*a6600459Sstevel1,.g/#pragma ident/d 1977c478bd9Sstevel@tonic-gatew tinames.c 1987c478bd9Sstevel@tonic-gate1,$d 1997c478bd9Sstevel@tonic-gater tifnames.c 2007c478bd9Sstevel@tonic-gate1i 2017c478bd9Sstevel@tonic-gate#pragma ident "%Z%%M% %I% %E% SMI" 2027c478bd9Sstevel@tonic-gate 2037c478bd9Sstevel@tonic-gate/* tifnames.c: Made automatically from caps and maketerm.ed - don't edit me! */ 2047c478bd9Sstevel@tonic-gate. 2057c478bd9Sstevel@tonic-gate1,$s/ $// 2067c478bd9Sstevel@tonic-gate0r copyright.h 207*a6600459Sstevel1,.g/#pragma ident/d 2087c478bd9Sstevel@tonic-gatew tifnames.c 2097c478bd9Sstevel@tonic-gatee bool 2107c478bd9Sstevel@tonic-gate1,$d 2117c478bd9Sstevel@tonic-gatea 2127c478bd9Sstevel@tonic-gate 2137c478bd9Sstevel@tonic-gatetypedef char *charptr; 2147c478bd9Sstevel@tonic-gatestruct strs { 2157c478bd9Sstevel@tonic-gate charptr 2167c478bd9Sstevel@tonic-gate. 2177c478bd9Sstevel@tonic-gater strvals 2187c478bd9Sstevel@tonic-gate1,.s/strs\.// 2197c478bd9Sstevel@tonic-gate$a 2207c478bd9Sstevel@tonic-gate}; 2217c478bd9Sstevel@tonic-gate 2227c478bd9Sstevel@tonic-gatestruct _bool_struct { 2237c478bd9Sstevel@tonic-gate. 2247c478bd9Sstevel@tonic-gater boolvals 2257c478bd9Sstevel@tonic-gatea 2267c478bd9Sstevel@tonic-gate}; 2277c478bd9Sstevel@tonic-gate 2287c478bd9Sstevel@tonic-gatestruct _num_struct { 2297c478bd9Sstevel@tonic-gate. 2307c478bd9Sstevel@tonic-gater numvals 2317c478bd9Sstevel@tonic-gatea 2327c478bd9Sstevel@tonic-gate}; 2337c478bd9Sstevel@tonic-gate. 2347c478bd9Sstevel@tonic-gatew ./tmp/term.h.new 2357c478bd9Sstevel@tonic-gatee ./tmp/term.h.new 2367c478bd9Sstevel@tonic-gateg/^ ./s/^ / _/ 2377c478bd9Sstevel@tonic-gatew ./tmp/term.h.new 2387c478bd9Sstevel@tonic-gatee boolvals 2397c478bd9Sstevel@tonic-gate.kb 2407c478bd9Sstevel@tonic-gate.r numvals 2417c478bd9Sstevel@tonic-gate.kn 2427c478bd9Sstevel@tonic-gate1,$v/^ /d 2437c478bd9Sstevel@tonic-gate1,$s/^ // 2447c478bd9Sstevel@tonic-gate1,$s/ [^ ].*/ / 2457c478bd9Sstevel@tonic-gate1,$s/,/ / 2467c478bd9Sstevel@tonic-gate1,'bs/.*/#define & CURB _&/ 2477c478bd9Sstevel@tonic-gate'b+1,'ns/.*/#define & CURN _&/ 2487c478bd9Sstevel@tonic-gate1,$g/;/d 2497c478bd9Sstevel@tonic-gatew ./tmp/term.h.new2 2507c478bd9Sstevel@tonic-gatee strvals 2517c478bd9Sstevel@tonic-gate1,$v/^ /d 2527c478bd9Sstevel@tonic-gate1,$s/^ // 2537c478bd9Sstevel@tonic-gate1,$s/ [^ ].*/ / 2547c478bd9Sstevel@tonic-gate1,$s/,/ / 2557c478bd9Sstevel@tonic-gate1,$s/.*/#define & CURS _&/ 2567c478bd9Sstevel@tonic-gate1,$s/strs\.// 2577c478bd9Sstevel@tonic-gate1,$s/strs.\(.\)/strs._\1/ 2587c478bd9Sstevel@tonic-gate1,$g/;/d 2597c478bd9Sstevel@tonic-gatew 2607c478bd9Sstevel@tonic-gatee ./tmp/term.h.new2 2617c478bd9Sstevel@tonic-gate$r strvals 2627c478bd9Sstevel@tonic-gatew ./tmp/term.h.new1 2637c478bd9Sstevel@tonic-gatee ./tmp/term.h.new1 2647c478bd9Sstevel@tonic-gate$r ./tmp/term.h.new 2657c478bd9Sstevel@tonic-gatew ./tmp/term.h.new 2667c478bd9Sstevel@tonic-gatee ./tmp/term.h.new 2677c478bd9Sstevel@tonic-gate1,$s/[ ]*$// 2687c478bd9Sstevel@tonic-gate1,$s/CURS _strs/CURS strs/ 2697c478bd9Sstevel@tonic-gatew ./tmp/term.h.new 2707c478bd9Sstevel@tonic-gatee ./tmp/term.h.new 2717c478bd9Sstevel@tonic-gate1;/CURS strs/+100;.,+99s/CURS strs/CURS strs2/ 2727c478bd9Sstevel@tonic-gate.+1,+100s/CURS strs/CURS strs3/ 2737c478bd9Sstevel@tonic-gate.+1,$s/CURS strs/CURS strs4/ 2747c478bd9Sstevel@tonic-gate/^struct strs/+101s/,/;/ 2757c478bd9Sstevel@tonic-gatea 2767c478bd9Sstevel@tonic-gate}; 2777c478bd9Sstevel@tonic-gate 2787c478bd9Sstevel@tonic-gatestruct strs2 { 2797c478bd9Sstevel@tonic-gate charptr 2807c478bd9Sstevel@tonic-gate. 2817c478bd9Sstevel@tonic-gate+100s/,/;/ 2827c478bd9Sstevel@tonic-gatea 2837c478bd9Sstevel@tonic-gate}; 2847c478bd9Sstevel@tonic-gate 2857c478bd9Sstevel@tonic-gatestruct strs3 { 2867c478bd9Sstevel@tonic-gate charptr 2877c478bd9Sstevel@tonic-gate. 2887c478bd9Sstevel@tonic-gate+100s/,/;/ 2897c478bd9Sstevel@tonic-gatea 2907c478bd9Sstevel@tonic-gate}; 2917c478bd9Sstevel@tonic-gate 2927c478bd9Sstevel@tonic-gatestruct strs4 { 2937c478bd9Sstevel@tonic-gate charptr 2947c478bd9Sstevel@tonic-gate. 2957c478bd9Sstevel@tonic-gate1,$s/_Sentinel/Sentinel/ 2967c478bd9Sstevel@tonic-gatew ./tmp/term.h.new 2977c478bd9Sstevel@tonic-gatee ./tmp/term.h.new 2987c478bd9Sstevel@tonic-gateg/[ .]_cursor_/s/_cursor_/_crsr_/ 2997c478bd9Sstevel@tonic-gateg/[ .]_delete_/s/_delete_/_dlt_/ 3007c478bd9Sstevel@tonic-gateg/[ .]_enter_/s/_enter_/_entr_/ 3017c478bd9Sstevel@tonic-gateg/[ .]_insert_/s/_insert_/_ins_/ 3027c478bd9Sstevel@tonic-gateg/[ .]_key_/s/_key_/_ky_/ 3037c478bd9Sstevel@tonic-gateg/[ .]_keypad_/s/_keypad_/_kpad_/ 3047c478bd9Sstevel@tonic-gateg/[ .]_label_/s/_label_/_labl_/ 3057c478bd9Sstevel@tonic-gateg/[ .]_memory_/s/_memory_/_mem_/ 3067c478bd9Sstevel@tonic-gateg/[ .]_parm_/s/_parm_/_prm_/ 3077c478bd9Sstevel@tonic-gateg/[ .]_scroll_/s/_scroll_/_scrll_/ 3087c478bd9Sstevel@tonic-gateg/^ _......[,;] \//s/, /,/ 3097c478bd9Sstevel@tonic-gateg/^ _..............[,;] \//s/, /,/ 3107c478bd9Sstevel@tonic-gateg/^ _......................[,;] \//s/, /,/ 3117c478bd9Sstevel@tonic-gatew ./tmp/term.h.new 3127c478bd9Sstevel@tonic-gatee ./tmp/term.h.new 3137c478bd9Sstevel@tonic-gate!# the following lines GO away when Vr2 compat code goes away 3147c478bd9Sstevel@tonic-gate1;/^#define auto_left_margin/,/^#define xon_xoff/s/CURB.*/CUR _b/ 3157c478bd9Sstevel@tonic-gate1;/^#define auto_left_margin/,/^#define xon_xoff/w ./tmp/tmp.term.h 3167c478bd9Sstevel@tonic-gate1;/^#define auto_left_margin/,/^#define xon_xoff/d 3177c478bd9Sstevel@tonic-gate!/usr/bin/echo '{printf "\%s\%d\\n", $0,++i}' > ./tmp/tmp.awk 3187c478bd9Sstevel@tonic-gate.-1r !awk -f ./tmp/tmp.awk < ./tmp/tmp.term.h 3197c478bd9Sstevel@tonic-gate1;/^#define columns/,/^#define width_status_line/s/CURN.*/CUR _c/ 3207c478bd9Sstevel@tonic-gate1;/^#define columns/,/^#define width_status_line/w ./tmp/tmp.term.h 3217c478bd9Sstevel@tonic-gate1;/^#define columns/,/^#define width_status_line/d 3227c478bd9Sstevel@tonic-gate!/usr/bin/echo '{printf "\%s\%d\\n", $0,++i}' > ./tmp/tmp.awk 3237c478bd9Sstevel@tonic-gate.-1r !awk -f ./tmp/tmp.awk < ./tmp/tmp.term.h 3247c478bd9Sstevel@tonic-gate1;/^#define back_tab/,/^#define lab_f8/s/CURS.*/CUR _Vr2_Astrs._s/ 3257c478bd9Sstevel@tonic-gate1;/^#define back_tab/,/^#define lab_f8/w ./tmp/tmp.term.h 3267c478bd9Sstevel@tonic-gate1;/^#define back_tab/,/^#define lab_f8/d 3277c478bd9Sstevel@tonic-gate!/usr/bin/echo '{printf "\%s\%d\\n", $0,++i}' > ./tmp/tmp.awk 3287c478bd9Sstevel@tonic-gate.-1r !awk -f ./tmp/tmp.awk < ./tmp/tmp.term.h 3297c478bd9Sstevel@tonic-gate1;/^#define lab_f9/,/^#define prtr_non/s/CURS.*/CUR _Vr2_Bstrs._s/ 3307c478bd9Sstevel@tonic-gate1;/^#define lab_f9/,/^#define prtr_non/w ./tmp/tmp.term.h 3317c478bd9Sstevel@tonic-gate1;/^#define lab_f9/,/^#define prtr_non/d 3327c478bd9Sstevel@tonic-gate!/usr/bin/echo 'BEGIN{i=100}\n{printf "\%s\%d\\n", $0,++i}' > ./tmp/tmp.awk 3337c478bd9Sstevel@tonic-gate.-1r !awk -f ./tmp/tmp.awk < ./tmp/tmp.term.h 3347c478bd9Sstevel@tonic-gate!rm -f ./tmp/tmp.term.h ./tmp/tmp.awk 3357c478bd9Sstevel@tonic-gatew ./tmp/term.h.new 3367c478bd9Sstevel@tonic-gatee ./tmp/term.h.new 3377c478bd9Sstevel@tonic-gate!# Vr2 compat code ends here 3387c478bd9Sstevel@tonic-gate1i 3397c478bd9Sstevel@tonic-gate#ifndef _TERM_H 3407c478bd9Sstevel@tonic-gate#define _TERM_H 3417c478bd9Sstevel@tonic-gate 3427c478bd9Sstevel@tonic-gate#pragma ident "%Z%%M% %I% %E% SMI" 3437c478bd9Sstevel@tonic-gate 3447c478bd9Sstevel@tonic-gate/* 3457c478bd9Sstevel@tonic-gate * term.h - this file is automatically made from caps and maketerm.ed. 3467c478bd9Sstevel@tonic-gate * Don't make changes directly to term.h. 3477c478bd9Sstevel@tonic-gate */ 3487c478bd9Sstevel@tonic-gate 3497c478bd9Sstevel@tonic-gate#ifdef __cplusplus 3507c478bd9Sstevel@tonic-gateextern "C" { 3517c478bd9Sstevel@tonic-gate#endif 3527c478bd9Sstevel@tonic-gate 3537c478bd9Sstevel@tonic-gate. 3547c478bd9Sstevel@tonic-gate$a 3557c478bd9Sstevel@tonic-gate 3567c478bd9Sstevel@tonic-gatestruct _str_struct { 3577c478bd9Sstevel@tonic-gate struct strs strs; 3587c478bd9Sstevel@tonic-gate struct strs2 strs2; 3597c478bd9Sstevel@tonic-gate struct strs3 strs3; 3607c478bd9Sstevel@tonic-gate struct strs4 strs4; 3617c478bd9Sstevel@tonic-gate}; 3627c478bd9Sstevel@tonic-gate 3637c478bd9Sstevel@tonic-gate#define NUM_ATTRIBUTES 9 3647c478bd9Sstevel@tonic-gate#define UNACCESSIBLE 1 3657c478bd9Sstevel@tonic-gate#define NO_TERMINAL 2 3667c478bd9Sstevel@tonic-gate#define CORRUPTED 3 3677c478bd9Sstevel@tonic-gate#define ENTRY_TOO_LONG 4 3687c478bd9Sstevel@tonic-gate#define TERMINFO_TOO_LONG 5 3697c478bd9Sstevel@tonic-gate#define TERM_BAD_MALLOC 6 3707c478bd9Sstevel@tonic-gate#define NOT_READABLE 7 3717c478bd9Sstevel@tonic-gate#define _VR2_COMPAT_CODE 3727c478bd9Sstevel@tonic-gate#ifdef _VR2_COMPAT_CODE 3737c478bd9Sstevel@tonic-gatestruct _Vr2_Astrs { 3747c478bd9Sstevel@tonic-gate charptr 3757c478bd9Sstevel@tonic-gate _s1, _s2, _s3, _s4, _s5, _s6, _s7, _s8, _s9, _s10, 3767c478bd9Sstevel@tonic-gate _s11, _s12, _s13, _s14, _s15, _s16, _s17, _s18, _s19, _s20, 3777c478bd9Sstevel@tonic-gate _s21, _s22, _s23, _s24, _s25, _s26, _s27, _s28, _s29, _s30, 3787c478bd9Sstevel@tonic-gate _s31, _s32, _s33, _s34, _s35, _s36, _s37, _s38, _s39, _s40, 3797c478bd9Sstevel@tonic-gate _s41, _s42, _s43, _s44, _s45, _s46, _s47, _s48, _s49, _s50, 3807c478bd9Sstevel@tonic-gate _s51, _s52, _s53, _s54, _s55, _s56, _s57, _s58, _s59, _s60, 3817c478bd9Sstevel@tonic-gate _s61, _s62, _s63, _s64, _s65, _s66, _s67, _s68, _s69, _s70, 3827c478bd9Sstevel@tonic-gate _s71, _s72, _s73, _s74, _s75, _s76, _s77, _s78, _s79, _s80, 3837c478bd9Sstevel@tonic-gate _s81, _s82, _s83, _s84, _s85, _s86, _s87, _s88, _s89, _s90, 3847c478bd9Sstevel@tonic-gate _s91, _s92, _s93, _s94, _s95, _s96, _s97, _s98, _s99, _s100; 3857c478bd9Sstevel@tonic-gate}; 3867c478bd9Sstevel@tonic-gate 3877c478bd9Sstevel@tonic-gatestruct _Vr2_Bstrs { 3887c478bd9Sstevel@tonic-gate charptr 3897c478bd9Sstevel@tonic-gate _s101, _s102, _s103, _s104, _s105, _s106, _s107, _s108, _s109, _s110, 3907c478bd9Sstevel@tonic-gate _s111, _s112, _s113, _s114, _s115, _s116, _s117, _s118, _s119, _s120, 3917c478bd9Sstevel@tonic-gate _s121, _s122, _s123, _s124, _s125, _s126, _s127, _s128, _s129, _s130, 3927c478bd9Sstevel@tonic-gate _s131, _s132, _s133, _s134, _s135, _s136, _s137, _s138, _s139, _s140, 3937c478bd9Sstevel@tonic-gate _s141, _s142, _s143, _s144, _s145; 3947c478bd9Sstevel@tonic-gate}; 3957c478bd9Sstevel@tonic-gate#endif /* _VR2_COMPAT_CODE */ 3967c478bd9Sstevel@tonic-gate 3977c478bd9Sstevel@tonic-gatetypedef struct { 3987c478bd9Sstevel@tonic-gate char *_sends; /* Characters sent when key is pressed */ 3997c478bd9Sstevel@tonic-gate short _keyval; /* "char" we pass back to program */ 4007c478bd9Sstevel@tonic-gate} _KEY_MAP; 4017c478bd9Sstevel@tonic-gate 4027c478bd9Sstevel@tonic-gatetypedef struct { 4037c478bd9Sstevel@tonic-gate short foreground; /* foreground color */ 4047c478bd9Sstevel@tonic-gate short background; /* background color */ 4057c478bd9Sstevel@tonic-gate bool init; /* TRUE if pair was initialized */ 4067c478bd9Sstevel@tonic-gate} _Color_pair; 4077c478bd9Sstevel@tonic-gate 4087c478bd9Sstevel@tonic-gate 4097c478bd9Sstevel@tonic-gatetypedef struct { 4107c478bd9Sstevel@tonic-gate short r, g, b; 4117c478bd9Sstevel@tonic-gate} _Color; 4127c478bd9Sstevel@tonic-gate 4137c478bd9Sstevel@tonic-gate 4147c478bd9Sstevel@tonic-gate/* 4157c478bd9Sstevel@tonic-gate * This definition for the term struct allows the boolean, number 4167c478bd9Sstevel@tonic-gate * and string information to grow in the future and still allow .o 4177c478bd9Sstevel@tonic-gate * compatibility. 4187c478bd9Sstevel@tonic-gate */ 4197c478bd9Sstevel@tonic-gate 4207c478bd9Sstevel@tonic-gatestruct term { 4217c478bd9Sstevel@tonic-gate#ifdef _VR2_COMPAT_CODE 4227c478bd9Sstevel@tonic-gate char 4237c478bd9Sstevel@tonic-gate _b1, _b2, _b3, _b4, _b5, _b6, _b7, _b8, _b9, _b10, 4247c478bd9Sstevel@tonic-gate _b11, _b12, _b13, _b14, _b15, _b16, _b17, _b18, _b19, _b20, _b21; 4257c478bd9Sstevel@tonic-gate short 4267c478bd9Sstevel@tonic-gate _c1, _c2, _c3, _c4, _c5, _c6, _c7, _c8; 4277c478bd9Sstevel@tonic-gate struct _Vr2_Astrs _Vr2_Astrs; 4287c478bd9Sstevel@tonic-gate struct _Vr2_Bstrs _Vr2_Bstrs; 4297c478bd9Sstevel@tonic-gate#endif /* _VR2_COMPAT_CODE */ 4307c478bd9Sstevel@tonic-gate short Filedes; /* file descriptor being written to */ 4317c478bd9Sstevel@tonic-gate SGTTY Ottyb, /* original state of the terminal */ 4327c478bd9Sstevel@tonic-gate Nttyb; /* current state of the terminal */ 4337c478bd9Sstevel@tonic-gate#ifdef SYSV 4347c478bd9Sstevel@tonic-gate SGTTYS Ottybs, /* original state of the terminal */ 4357c478bd9Sstevel@tonic-gate Nttybs; /* current state of the terminal */ 4367c478bd9Sstevel@tonic-gate#endif 4377c478bd9Sstevel@tonic-gate#ifdef DIOCSETT 4387c478bd9Sstevel@tonic-gate struct termcb new, old; /* CB/UNIX virtual terminals */ 4397c478bd9Sstevel@tonic-gate#endif 4407c478bd9Sstevel@tonic-gate#ifdef LTILDE 4417c478bd9Sstevel@tonic-gate int newlmode, oldlmode; /* BSD tty driver */ 4427c478bd9Sstevel@tonic-gate#endif 4437c478bd9Sstevel@tonic-gate /* end of Vr2 structure */ 4447c478bd9Sstevel@tonic-gate struct _bool_struct *_bools; 4457c478bd9Sstevel@tonic-gate struct _num_struct *_nums; 4467c478bd9Sstevel@tonic-gate struct _str_struct *_strs; 4477c478bd9Sstevel@tonic-gate char *_strtab; 4487c478bd9Sstevel@tonic-gate#ifdef FIONREAD 4497c478bd9Sstevel@tonic-gate long timeout; /* for BSD halfdelay mode */ 4507c478bd9Sstevel@tonic-gate#endif 4517c478bd9Sstevel@tonic-gate /* end of Vr3 structure */ 4527c478bd9Sstevel@tonic-gate chtype sgr_mode; /* current phys. graphic rendition */ 4537c478bd9Sstevel@tonic-gate chtype sgr_faked; /* attributes faked by vidputs */ 4547c478bd9Sstevel@tonic-gate int _delay; /* timeout for inputs */ 4557c478bd9Sstevel@tonic-gate int _inputfd; /* input file descriptor */ 4567c478bd9Sstevel@tonic-gate int _check_fd; /* typeahead file descriptor */ 4577c478bd9Sstevel@tonic-gate _KEY_MAP **_keys, /* key map */ 4587c478bd9Sstevel@tonic-gate *internal_keys; /* pointer to free key structures */ 4597c478bd9Sstevel@tonic-gate short _ksz, /* size of keymap */ 4607c478bd9Sstevel@tonic-gate _lastkey_ordered, /* where the last ordered key is */ 4617c478bd9Sstevel@tonic-gate _lastmacro_ordered, /* where last ordered macro is */ 4627c478bd9Sstevel@tonic-gate _first_macro; 4637c478bd9Sstevel@tonic-gate bool funckeystarter[0400]; 4647c478bd9Sstevel@tonic-gate /* map of which chars start fn keys */ 4657c478bd9Sstevel@tonic-gate bool _fl_rawmode, /* in cbreak(=1) or raw(=2) mode */ 4667c478bd9Sstevel@tonic-gate fl_typeahdok, /* ok to use typeahead */ 4677c478bd9Sstevel@tonic-gate _cursorstate, /* cursor: 0=invis, 1=norm, 2=vvis */ 4687c478bd9Sstevel@tonic-gate _iwait; /* true if input-pending */ 4697c478bd9Sstevel@tonic-gate short _regs[26]; /* tparm static registers */ 4707c478bd9Sstevel@tonic-gate#define INP_QSIZE 32 4717c478bd9Sstevel@tonic-gate chtype /* a place to put stuff ungetch'ed */ 4727c478bd9Sstevel@tonic-gate _input_queue[INP_QSIZE]; 4737c478bd9Sstevel@tonic-gate short _ungotten; /* # chars ungotten by ungetch() */ 4747c478bd9Sstevel@tonic-gate char _chars_on_queue; /* # chars on queue */ 4757c478bd9Sstevel@tonic-gate#ifdef _VR3_COMPAT_CODE 4767c478bd9Sstevel@tonic-gate _ochtype *_acsmap; 4777c478bd9Sstevel@tonic-gate chtype *_acs32map; /* map of alternate char set chars */ 4787c478bd9Sstevel@tonic-gate#else /* _VR3_COMPAT_CODE */ 4797c478bd9Sstevel@tonic-gate chtype *_acsmap; /* map of alternate char set chars */ 4807c478bd9Sstevel@tonic-gate#endif /* _VR3_COMPAT_CODE */ 4817c478bd9Sstevel@tonic-gate char *turn_on_seq[NUM_ATTRIBUTES]; 4827c478bd9Sstevel@tonic-gate chtype bit_vector; 4837c478bd9Sstevel@tonic-gate char *cursor_seq[3]; 4847c478bd9Sstevel@tonic-gate char _termname[15]; 4857c478bd9Sstevel@tonic-gate char *turn_off_seq[3]; 4867c478bd9Sstevel@tonic-gate chtype check_turn_off; 4877c478bd9Sstevel@tonic-gate chtype non_faked_mode; 4887c478bd9Sstevel@tonic-gate _Color_pair _cur_pair; 4897c478bd9Sstevel@tonic-gate _Color_pair *_pairs_tbl; 4907c478bd9Sstevel@tonic-gate _Color *_color_tbl; 4917c478bd9Sstevel@tonic-gate}; 4927c478bd9Sstevel@tonic-gate 4937c478bd9Sstevel@tonic-gatetypedef struct term TERMINAL; 4947c478bd9Sstevel@tonic-gate 4957c478bd9Sstevel@tonic-gate/* allow old names for these capabilities */ 4967c478bd9Sstevel@tonic-gate#define beehive_glitch no_esc_ctlc 4977c478bd9Sstevel@tonic-gate#define teleray_glitch dest_tabs_magic_smso 4987c478bd9Sstevel@tonic-gate 4997c478bd9Sstevel@tonic-gateextern TERMINAL *cur_term; 5007c478bd9Sstevel@tonic-gateextern struct _bool_struct *cur_bools; 5017c478bd9Sstevel@tonic-gateextern struct _num_struct *cur_nums; 5027c478bd9Sstevel@tonic-gateextern struct _str_struct *cur_strs; 5037c478bd9Sstevel@tonic-gate 5047c478bd9Sstevel@tonic-gate#ifdef SINGLE 5057c478bd9Sstevel@tonic-gateextern TERMINAL _first_term; 5067c478bd9Sstevel@tonic-gateextern struct _bool_struct _frst_bools; 5077c478bd9Sstevel@tonic-gateextern struct _num_struct _frst_nums; 5087c478bd9Sstevel@tonic-gateextern struct _str_struct _frst_strs; 5097c478bd9Sstevel@tonic-gate 5107c478bd9Sstevel@tonic-gate#define CUR _first_term. 5117c478bd9Sstevel@tonic-gate#define CURB _frst_bools. 5127c478bd9Sstevel@tonic-gate#define CURN _frst_nums. 5137c478bd9Sstevel@tonic-gate#define CURS _frst_strs. 5147c478bd9Sstevel@tonic-gate#define PROGTTY _first_term.Nttyb 5157c478bd9Sstevel@tonic-gate#define SHELLTTY _first_term.Ottyb 5167c478bd9Sstevel@tonic-gate#ifdef SYSV 5177c478bd9Sstevel@tonic-gate#define PROGTTYS _first_term.Nttybs 5187c478bd9Sstevel@tonic-gate#define SHELLTTYS _first_term.Ottybs 5197c478bd9Sstevel@tonic-gate#endif 5207c478bd9Sstevel@tonic-gate#else 5217c478bd9Sstevel@tonic-gate#define CUR cur_term-> 5227c478bd9Sstevel@tonic-gate#define CURB cur_bools-> 5237c478bd9Sstevel@tonic-gate#define CURN cur_nums-> 5247c478bd9Sstevel@tonic-gate#define CURS cur_strs-> 5257c478bd9Sstevel@tonic-gate#define PROGTTY (cur_term->Nttyb) 5267c478bd9Sstevel@tonic-gate#define SHELLTTY (cur_term->Ottyb) 5277c478bd9Sstevel@tonic-gate#ifdef SYSV 5287c478bd9Sstevel@tonic-gate#define PROGTTYS (cur_term->Nttybs) 5297c478bd9Sstevel@tonic-gate#define SHELLTTYS (cur_term->Ottybs) 5307c478bd9Sstevel@tonic-gate#endif 5317c478bd9Sstevel@tonic-gate#endif 5327c478bd9Sstevel@tonic-gate 5337c478bd9Sstevel@tonic-gate#ifndef NOMACROS 5347c478bd9Sstevel@tonic-gate#define set_curterm setcurterm 5357c478bd9Sstevel@tonic-gate#define del_curterm delterm 5367c478bd9Sstevel@tonic-gate#else /* NOMACROS */ 5377c478bd9Sstevel@tonic-gate 5387c478bd9Sstevel@tonic-gate#ifdef __STDC__ 5397c478bd9Sstevel@tonic-gateextern TERMINAL *set_curterm(TERMINAL *); 5407c478bd9Sstevel@tonic-gateextern int del_curterm(TERMINAL *); 5417c478bd9Sstevel@tonic-gate#else /* __STDC__ */ 5427c478bd9Sstevel@tonic-gateextern TERMINAL *set_curterm(); 5437c478bd9Sstevel@tonic-gateextern int del_curterm(); 5447c478bd9Sstevel@tonic-gate#endif /* __STDC__ */ 5457c478bd9Sstevel@tonic-gate 5467c478bd9Sstevel@tonic-gate#endif /* NOMACROS */ 5477c478bd9Sstevel@tonic-gate 5487c478bd9Sstevel@tonic-gateextern short term_errno; 5497c478bd9Sstevel@tonic-gate 5507c478bd9Sstevel@tonic-gate#ifdef SYSV 5517c478bd9Sstevel@tonic-gateextern int prog_istermios; 5527c478bd9Sstevel@tonic-gateextern int shell_istermios; 5537c478bd9Sstevel@tonic-gate#endif 5547c478bd9Sstevel@tonic-gate 5557c478bd9Sstevel@tonic-gateextern char term_parm_err[], *term_err_strings[], *Def_term, 5567c478bd9Sstevel@tonic-gate *boolnames[], *boolcodes[], *boolfnames[], 5577c478bd9Sstevel@tonic-gate *numnames[], *numcodes[], *numfnames[], 5587c478bd9Sstevel@tonic-gate *strnames[], *strcodes[], *strfnames[]; 5597c478bd9Sstevel@tonic-gate 5607c478bd9Sstevel@tonic-gate#ifdef __STDC__ 5617c478bd9Sstevel@tonic-gateextern TERMINAL *setcurterm(TERMINAL *); 5627c478bd9Sstevel@tonic-gate 5637c478bd9Sstevel@tonic-gate#if defined(_XPG4_2) || defined(_LP64) || defined(__cplusplus) 5647c478bd9Sstevel@tonic-gateextern char 5657c478bd9Sstevel@tonic-gate *tparm(char *, long, long, long, long, long, long, long, long, long); 5667c478bd9Sstevel@tonic-gate#else 5677c478bd9Sstevel@tonic-gate/* this is wrong, but is needed for historical reasons */ 5687c478bd9Sstevel@tonic-gateextern char *tparm(); 5697c478bd9Sstevel@tonic-gate#endif 5707c478bd9Sstevel@tonic-gate 5717c478bd9Sstevel@tonic-gateextern char *tgetstr(char *, char **), 5727c478bd9Sstevel@tonic-gate *tigetstr(char *), 5737c478bd9Sstevel@tonic-gate *termname(void); 5747c478bd9Sstevel@tonic-gate 5757c478bd9Sstevel@tonic-gateextern int tgetent(char *, char *), tgetflag(char *), tgetnum(char *), 5767c478bd9Sstevel@tonic-gate tputs(char *, int, int (*)(char)), putp(char *), 5777c478bd9Sstevel@tonic-gate tigetint(char *), tigetflag(char *), tigetnum(char *), 5787c478bd9Sstevel@tonic-gate vidputs(chtype, int (*)(char)), vidattr(chtype); 5797c478bd9Sstevel@tonic-gate 5807c478bd9Sstevel@tonic-gateextern int resetterm(void), fixterm(void), saveterm(void), 5817c478bd9Sstevel@tonic-gate restartterm(char *, int, int *), delterm(TERMINAL *); 5827c478bd9Sstevel@tonic-gate 5837c478bd9Sstevel@tonic-gateextern void termerr(void), tinputfd(int); 5847c478bd9Sstevel@tonic-gate#else /* __STDC__ */ 5857c478bd9Sstevel@tonic-gateextern TERMINAL *setcurterm(); 5867c478bd9Sstevel@tonic-gateextern char *tparm(), *tgoto(), *tgetstr(), *tigetstr(), 5877c478bd9Sstevel@tonic-gate *termname(); 5887c478bd9Sstevel@tonic-gate 5897c478bd9Sstevel@tonic-gateextern int tgetent(), tgetflag(), tgetnum(), 5907c478bd9Sstevel@tonic-gate tigetint(), tigetflag(), tigetnum(), 5917c478bd9Sstevel@tonic-gate tputs(), putp(), vidputs(), vidattr(); 5927c478bd9Sstevel@tonic-gate 5937c478bd9Sstevel@tonic-gateextern int resetterm(), fixterm(), saveterm(), 5947c478bd9Sstevel@tonic-gate restartterm(), delterm(); 5957c478bd9Sstevel@tonic-gate 5967c478bd9Sstevel@tonic-gateextern void termerr(), tinputfd(); 5977c478bd9Sstevel@tonic-gate#endif /* __STDC__ */ 5987c478bd9Sstevel@tonic-gate 5997c478bd9Sstevel@tonic-gate#ifdef __cplusplus 6007c478bd9Sstevel@tonic-gate} 6017c478bd9Sstevel@tonic-gate#endif 6027c478bd9Sstevel@tonic-gate 6037c478bd9Sstevel@tonic-gate#endif /* _TERM_H */ 6047c478bd9Sstevel@tonic-gate. 6057c478bd9Sstevel@tonic-gate0r copyright.h 606*a6600459Sstevel1,.g/#pragma ident/d 607*a6600459Sstevelg/\@(\#)maketerm.ed/s//\@(\#)term.h/ 6087c478bd9Sstevel@tonic-gate1,$s/,\/\*/, \/\*/ 6097c478bd9Sstevel@tonic-gatew term.h 6107c478bd9Sstevel@tonic-gate!rm -f boolnames boolvals bool numnames numvals num strnames strvals str ./tmp/term.h.new ./tmp/tmp.awk ./tmp/tmp.term.h 6117c478bd9Sstevel@tonic-gateq 612