Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Compile errors for zsh 4.0.4 on Aix 4.3.3

The Etc/MACHINES file said you want more info on this error.
Here it is.  I have attached two of the relevant files.
Please let me know if you need more.

make[3]: Entering directory `/home/travis/aixbin/zsh-4.0.4/Src/Modules'
cc -qlanglvl=ansi -c -I.  -DHAVE_CONFIG_H -O  -o parameter.o parameter.c
echo '' parameter.o | sed 's" " Modules/"g' >> ../../Src/stamp-modobjs.tmp
cc -qlanglvl=ansi -c -I.  -DHAVE_CONFIG_H -O  -o termcap.o termcap.c
"termcap.c", line 71.13: 1506-334 (S) Identifier boolcodes has already been defined on line 1342 of "/usr/include/term.h".

#ifndef _AIX32_CURSES

/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* bos430 src/bos/usr/ccs/lib/libxcurses/copyright.h 1.2                  */
/*                                                                        */
/* Licensed Materials - Property of IBM                                   */
/*                                                                        */
/* Restricted Materials of IBM                                            */
/*                                                                        */
/* (C) COPYRIGHT International Business Machines Corp. 1994,1997          */
/* All Rights Reserved                                                    */
/*                                                                        */
/* US Government Users Restricted Rights - Use, duplication or            */
/* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.      */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */
/* @(#)97	1.2  src/bos/usr/ccs/lib/libxcurses/copyright.h, libcurses, bos430, 9737A_430 2/29/96 10:34:49  */
 *   FUNCTIONS: none
 *   ORIGINS: 27, 110
 *   (C) COPYRIGHT International Business Machines Corp. 1994,1996
 *   All Rights Reserved
 *   Licensed Materials - Property of IBM
 *   US Government Users Restricted Rights - Use, duplication or
 *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
 * Copyright (c) 1984-1994
 * Novell, Inc. All Rights Reserved.
 * The copyright notice above does not evidence any 
 * actual or intended publication of such source code.
/*      Copyright (c) 1984 AT&T
 *        All Rights Reserved
 *      The copyright notice above does not evidence any
 *      actual or intended publication of such source code.

#ifdef IDENT
#ident  "$Header: copyright.h 1.2 91/06/26 $"
#endif /* IDENT */
#ifdef IDENT
#ident	"@( #)curses:common/lib/xlibcurses/screen/maketerm.ed"
#endif /* IDENT */

 * term.h - this file is automatically made from caps and maketerm.ed.
 * Don't make changes directly to term.h.
 * Guard against multiple includes.

#ifndef _TERM_H

#define _TERM_H        /* define prevents multiple includes */

#ifndef auto_left_margin

#define auto_left_margin 		CUR _b1
#define auto_right_margin 		CUR _b2
#define no_esc_ctlc 			CUR _b3
#define ceol_standout_glitch 		CUR _b4
#define eat_newline_glitch 		CUR _b5
#define erase_overstrike 		CUR _b6
#define generic_type 			CUR _b7
#define hard_copy 			CUR _b8
#define has_meta_key 			CUR _b9
#define has_status_line 		CUR _b10
#define insert_null_glitch 		CUR _b11
#define memory_above 			CUR _b12
#define memory_below 			CUR _b13
#define move_insert_mode 		CUR _b14
#define move_standout_mode 		CUR _b15
#define over_strike 			CUR _b16
#define status_line_esc_ok 		CUR _b17
#define dest_tabs_magic_smso 		CUR _b18
#define tilde_glitch 			CUR _b19
#define transparent_underline 		CUR _b20
#define xon_xoff 			CUR _b21
#define needs_xon_xoff 			CURB _needs_xon_xoff
#define prtr_silent 			CURB _prtr_silent
#define hard_cursor 			CURB _hard_cursor
#define non_rev_rmcup 			CURB _non_rev_rmcup
#define no_pad_char 			CURB _no_pad_char
#define non_dest_scroll_region 		CURB _non_dest_scroll_region
#define can_change 			CURB _can_change
#define back_color_erase 		CURB _back_color_erase
#define hue_lightness_saturation 		CURB _hue_lightness_saturation
#define col_addr_glitch 		CURB _col_addr_glitch
#define cr_cancels_micro_mode 		CURB _cr_cancels_micro_mode
#define has_print_wheel 		CURB _has_print_wheel
#define row_addr_glitch 		CURB _row_addr_glitch
#define semi_auto_right_margin 		CURB _semi_auto_right_margin
#define cpi_changes_res 		CURB _cpi_changes_res
#define lpi_changes_res 		CURB _lpi_changes_res
#define columns 			CUR _c1
#define init_tabs 			CUR _c2
#define lines 				CUR _c3
#define lines_of_memory 		CUR _c4
#define magic_cookie_glitch 		CUR _c5
#define padding_baud_rate 		CUR _c6
#define virtual_terminal 		CUR _c7
#define width_status_line 		CUR _c8
#define num_labels 			CURN _num_labels
#define label_height 			CURN _labl_height
#define label_width 			CURN _labl_width
#define max_attributes 			CURN _max_attributes
#define maximum_windows 		CURN _maximum_windows
#define max_colors 			CURN _max_colors
#define max_pairs 			CURN _max_pairs
#define no_color_video 			CURN _no_color_video
#define buffer_capacity 		CURN _buffer_capacity
#define dot_vert_spacing 		CURN _dot_vert_spacing
#define dot_horz_spacing 		CURN _dot_horz_spacing
#define max_micro_address 		CURN _max_micro_address
#define max_micro_jump 			CURN _max_micro_jump
#define micro_col_size 		CURN _micro_col_size
#define micro_line_size 		CURN _micro_line_size
#define number_of_pins 			CURN _number_of_pins
#define output_res_char 		CURN _output_res_char
#define output_res_line 		CURN _output_res_line
#define output_res_horz_inch 		CURN _output_res_horz_inch
#define output_res_vert_inch 		CURN _output_res_vert_inch
#define print_rate 			CURN _print_rate
#define wide_char_size 			CURN _wide_char_size
#define buttons 			CURN _buttons
#define bit_image_entwining 		CURN _bit_image_entwining
#define bit_image_type 			CURN _bit_image_type
#define back_tab 			CUR _Vr2_Astrs._s1
#define bell 				CUR _Vr2_Astrs._s2
#define carriage_return 		CUR _Vr2_Astrs._s3
#define change_scroll_region 		CUR _Vr2_Astrs._s4
#define clear_all_tabs 			CUR _Vr2_Astrs._s5
#define clear_screen 			CUR _Vr2_Astrs._s6
#define clr_eol 			CUR _Vr2_Astrs._s7
#define clr_eos 			CUR _Vr2_Astrs._s8
#define column_address 			CUR _Vr2_Astrs._s9
#define command_character 		CUR _Vr2_Astrs._s10
#define cursor_address 			CUR _Vr2_Astrs._s11
#define cursor_down 			CUR _Vr2_Astrs._s12
#define cursor_home 			CUR _Vr2_Astrs._s13
#define cursor_invisible 		CUR _Vr2_Astrs._s14
#define cursor_left 			CUR _Vr2_Astrs._s15
#define cursor_mem_address 		CUR _Vr2_Astrs._s16
#define cursor_normal 			CUR _Vr2_Astrs._s17
#define cursor_right 			CUR _Vr2_Astrs._s18
#define cursor_to_ll 			CUR _Vr2_Astrs._s19
#define cursor_up 			CUR _Vr2_Astrs._s20
#define cursor_visible 			CUR _Vr2_Astrs._s21
#define delete_character 		CUR _Vr2_Astrs._s22
#define delete_line 			CUR _Vr2_Astrs._s23
#define dis_status_line 		CUR _Vr2_Astrs._s24
#define down_half_line 			CUR _Vr2_Astrs._s25
#define enter_alt_charset_mode 		CUR _Vr2_Astrs._s26
#define enter_blink_mode 		CUR _Vr2_Astrs._s27
#define enter_bold_mode 		CUR _Vr2_Astrs._s28
#define enter_ca_mode 			CUR _Vr2_Astrs._s29
#define enter_delete_mode 		CUR _Vr2_Astrs._s30
#define enter_dim_mode 			CUR _Vr2_Astrs._s31
#define enter_insert_mode 		CUR _Vr2_Astrs._s32
#define enter_secure_mode 		CUR _Vr2_Astrs._s33
#define enter_protected_mode 		CUR _Vr2_Astrs._s34
#define enter_reverse_mode 		CUR _Vr2_Astrs._s35
#define enter_standout_mode 		CUR _Vr2_Astrs._s36
#define enter_underline_mode 		CUR _Vr2_Astrs._s37
#define erase_chars 			CUR _Vr2_Astrs._s38
#define exit_alt_charset_mode 		CUR _Vr2_Astrs._s39
#define exit_attribute_mode 		CUR _Vr2_Astrs._s40
#define exit_ca_mode 			CUR _Vr2_Astrs._s41
#define exit_delete_mode 		CUR _Vr2_Astrs._s42
#define exit_insert_mode 		CUR _Vr2_Astrs._s43
#define exit_standout_mode 		CUR _Vr2_Astrs._s44
#define exit_underline_mode 		CUR _Vr2_Astrs._s45
#define flash_screen 			CUR _Vr2_Astrs._s46
#define form_feed 			CUR _Vr2_Astrs._s47
#define from_status_line 		CUR _Vr2_Astrs._s48
#define init_1string 			CUR _Vr2_Astrs._s49
#define init_2string 			CUR _Vr2_Astrs._s50
#define init_3string 			CUR _Vr2_Astrs._s51
#define init_file 			CUR _Vr2_Astrs._s52
#define insert_character 		CUR _Vr2_Astrs._s53
#define insert_line 			CUR _Vr2_Astrs._s54
#define insert_padding 			CUR _Vr2_Astrs._s55
#define key_backspace 			CUR _Vr2_Astrs._s56
#define key_catab 			CUR _Vr2_Astrs._s57
#define key_clear 			CUR _Vr2_Astrs._s58
#define key_ctab 			CUR _Vr2_Astrs._s59
#define key_dc 				CUR _Vr2_Astrs._s60
#define key_dl 				CUR _Vr2_Astrs._s61
#define key_down 			CUR _Vr2_Astrs._s62
#define key_eic 			CUR _Vr2_Astrs._s63
#define key_eol 			CUR _Vr2_Astrs._s64
#define key_eos 			CUR _Vr2_Astrs._s65
#define key_f0 				CUR _Vr2_Astrs._s66
#define key_f1 				CUR _Vr2_Astrs._s67
#define key_f10 			CUR _Vr2_Astrs._s68
#define key_f2 				CUR _Vr2_Astrs._s69
#define key_f3 				CUR _Vr2_Astrs._s70
#define key_f4 				CUR _Vr2_Astrs._s71
#define key_f5 				CUR _Vr2_Astrs._s72
#define key_f6 				CUR _Vr2_Astrs._s73
#define key_f7 				CUR _Vr2_Astrs._s74
#define key_f8 				CUR _Vr2_Astrs._s75
#define key_f9 				CUR _Vr2_Astrs._s76
#define key_home 			CUR _Vr2_Astrs._s77
#define key_ic 				CUR _Vr2_Astrs._s78
#define key_il 				CUR _Vr2_Astrs._s79
#define key_left 			CUR _Vr2_Astrs._s80
#define key_ll 				CUR _Vr2_Astrs._s81
#define key_npage 			CUR _Vr2_Astrs._s82
#define key_ppage 			CUR _Vr2_Astrs._s83
#define key_right 			CUR _Vr2_Astrs._s84
#define key_sf 				CUR _Vr2_Astrs._s85
#define key_sr 				CUR _Vr2_Astrs._s86
#define key_stab 			CUR _Vr2_Astrs._s87
#define key_up 				CUR _Vr2_Astrs._s88
#define keypad_local 			CUR _Vr2_Astrs._s89
#define keypad_xmit 			CUR _Vr2_Astrs._s90
#define lab_f0 				CUR _Vr2_Astrs._s91
#define lab_f1 				CUR _Vr2_Astrs._s92
#define lab_f10 			CUR _Vr2_Astrs._s93
#define lab_f2 				CUR _Vr2_Astrs._s94
#define lab_f3 				CUR _Vr2_Astrs._s95
#define lab_f4 				CUR _Vr2_Astrs._s96
#define lab_f5 				CUR _Vr2_Astrs._s97
#define lab_f6 				CUR _Vr2_Astrs._s98
#define lab_f7 				CUR _Vr2_Astrs._s99
#define lab_f8 				CUR _Vr2_Astrs._s100
#define lab_f9 				CUR _Vr2_Bstrs._s101
#define meta_off 			CUR _Vr2_Bstrs._s102
#define meta_on 			CUR _Vr2_Bstrs._s103
#define newline 			CUR _Vr2_Bstrs._s104
#define pad_char 			CUR _Vr2_Bstrs._s105
#define parm_dch 			CUR _Vr2_Bstrs._s106
#define parm_delete_line 		CUR _Vr2_Bstrs._s107
#define parm_down_cursor 		CUR _Vr2_Bstrs._s108
#define parm_ich 			CUR _Vr2_Bstrs._s109
#define parm_index 			CUR _Vr2_Bstrs._s110
#define parm_insert_line 		CUR _Vr2_Bstrs._s111
#define parm_left_cursor 		CUR _Vr2_Bstrs._s112
#define parm_right_cursor 		CUR _Vr2_Bstrs._s113
#define parm_rindex 			CUR _Vr2_Bstrs._s114
#define parm_up_cursor 			CUR _Vr2_Bstrs._s115
#define pkey_key 			CUR _Vr2_Bstrs._s116
#define pkey_local 			CUR _Vr2_Bstrs._s117
#define pkey_xmit 			CUR _Vr2_Bstrs._s118
#define print_screen 			CUR _Vr2_Bstrs._s119
#define prtr_off 			CUR _Vr2_Bstrs._s120
#define prtr_on 			CUR _Vr2_Bstrs._s121
#define repeat_char 			CUR _Vr2_Bstrs._s122
#define reset_1string 			CUR _Vr2_Bstrs._s123
#define reset_2string 			CUR _Vr2_Bstrs._s124
#define reset_3string 			CUR _Vr2_Bstrs._s125
#define reset_file 			CUR _Vr2_Bstrs._s126
#define restore_cursor 			CUR _Vr2_Bstrs._s127
#define row_address 			CUR _Vr2_Bstrs._s128
#define save_cursor 			CUR _Vr2_Bstrs._s129
#define scroll_forward 			CUR _Vr2_Bstrs._s130
#define scroll_reverse 			CUR _Vr2_Bstrs._s131
#define set_attributes 			CUR _Vr2_Bstrs._s132
#define set_tab 			CUR _Vr2_Bstrs._s133
#define set_window 			CUR _Vr2_Bstrs._s134
#define tab 				CUR _Vr2_Bstrs._s135
#define to_status_line 			CUR _Vr2_Bstrs._s136
#define underline_char 			CUR _Vr2_Bstrs._s137
#define up_half_line 			CUR _Vr2_Bstrs._s138
#define init_prog 			CUR _Vr2_Bstrs._s139
#define key_a1 				CUR _Vr2_Bstrs._s140
#define key_a3 				CUR _Vr2_Bstrs._s141
#define key_b2 				CUR _Vr2_Bstrs._s142
#define key_c1 				CUR _Vr2_Bstrs._s143
#define key_c3 				CUR _Vr2_Bstrs._s144
#define prtr_non 			CUR _Vr2_Bstrs._s145
#define box_chars_1 			CURS strs2._box_chars_1
#define box_chars_2 			CURS strs2._box_chars_2
#define box_attr_1 			CURS strs2._box_attr_1
#define box_attr_2 			CURS strs2._box_attr_2
#define color_bg_0 			CURS strs2._color_bg_0
#define color_bg_1 			CURS strs2._color_bg_1
#define color_bg_2 			CURS strs2._color_bg_2
#define color_bg_3 			CURS strs2._color_bg_3
#define color_bg_4 			CURS strs2._color_bg_4
#define color_bg_5 			CURS strs2._color_bg_5
#define color_bg_6 			CURS strs2._color_bg_6
#define color_bg_7 			CURS strs2._color_bg_7
#define color_fg_0 			CURS strs2._color_fg_0
#define color_fg_1 			CURS strs2._color_fg_1
#define color_fg_2 			CURS strs2._color_fg_2
#define color_fg_3 			CURS strs2._color_fg_3
#define color_fg_4 			CURS strs2._color_fg_4
#define color_fg_5 			CURS strs2._color_fg_5
#define color_fg_6 			CURS strs2._color_fg_6
#define color_fg_7 			CURS strs2._color_fg_7
#define font_0 				CURS strs2._font_0
#define font_1 				CURS strs2._font_1
#define font_2 				CURS strs2._font_2
#define font_3 				CURS strs2._font_3
#define font_4 				CURS strs2._font_4
#define font_5 				CURS strs2._font_5
#define font_6 				CURS strs2._font_6
#define font_7 				CURS strs2._font_7
#define key_back_tab 			CURS strs2._ky_back_tab
#define key_do 				CURS strs2._ky_do
#define key_command 			CURS strs2._ky_command
#define key_command_pane 		CURS strs2._ky_command_pane
#define key_end 			CURS strs2._ky_end
#define key_help 			CURS strs2._ky_help
#define key_newline 			CURS strs2._ky_newline
#define key_next_pane 			CURS strs2._ky_next_pane
#define key_prev_cmd 			CURS strs2._ky_prev_cmd
#define key_prev_pane 			CURS strs2._ky_prev_pane
#define key_quit 			CURS strs2._ky_quit
#define key_select_aix 			CURS strs2._ky_select_aix
#define key_scroll_left 		CURS strs2._ky_scroll_left
#define key_scroll_right 		CURS strs2._ky_scroll_right
#define key_tab 			CURS strs2._ky_tab
#define key_smap_in1 			CURS strs2._ky_smap_in1
#define key_smap_out1 			CURS strs2._ky_smap_out1
#define key_smap_in2 			CURS strs2._ky_smap_in2
#define key_smap_out2 			CURS strs2._ky_smap_out2
#define key_smap_in3 			CURS strs2._ky_smap_in3
#define key_smap_out3 			CURS strs2._ky_smap_out3
#define key_smap_in4 			CURS strs2._ky_smap_in4
#define key_smap_out4 			CURS strs2._ky_smap_out4
#define key_smap_in5 			CURS strs2._ky_smap_in5
#define key_smap_out5 			CURS strs2._ky_smap_out5
#define appl_defined_str 		CURS strs2._appl_defined_str
#define key_smap_in6 			CURS strs2._ky_smap_in6
#define key_smap_out6 			CURS strs3._ky_smap_out6
#define key_smap_in7 			CURS strs3._ky_smap_in7
#define key_smap_out7 			CURS strs3._ky_smap_out7
#define key_smap_in8 			CURS strs3._ky_smap_in8
#define key_smap_out8 			CURS strs3._ky_smap_out8
#define key_smap_in9 			CURS strs3._ky_smap_in9
#define key_smap_out9 			CURS strs3._ky_smap_out9
#define key_sf1 			CURS strs3._ky_sf1
#define key_sf2 			CURS strs3._ky_sf2
#define key_sf3 			CURS strs3._ky_sf3
#define key_sf4 			CURS strs3._ky_sf4
#define key_sf5 			CURS strs3._ky_sf5
#define key_sf6 			CURS strs3._ky_sf6
#define key_sf7 			CURS strs3._ky_sf7
#define key_sf8 			CURS strs3._ky_sf8
#define key_sf9 			CURS strs3._ky_sf9
#define key_sf10 			CURS strs3._ky_sf10
#define key_f11 			CURS strs3._ky_f11
#define key_f12 			CURS strs3._ky_f12
#define key_f13 			CURS strs3._ky_f13
#define key_f14 			CURS strs3._ky_f14
#define key_f15 			CURS strs3._ky_f15
#define key_f16 			CURS strs3._ky_f16
#define key_f17 			CURS strs3._ky_f17
#define key_f18 			CURS strs3._ky_f18
#define key_f19 			CURS strs3._ky_f19
#define key_f20 			CURS strs3._ky_f20
#define key_f21 			CURS strs3._ky_f21
#define key_f22 			CURS strs3._ky_f22
#define key_f23 			CURS strs3._ky_f23
#define key_f24 			CURS strs3._ky_f24
#define key_f25 			CURS strs3._ky_f25
#define key_f26 			CURS strs3._ky_f26
#define key_f27 			CURS strs3._ky_f27
#define key_f28 			CURS strs3._ky_f28
#define key_f29 			CURS strs3._ky_f29
#define key_f30 			CURS strs3._ky_f30
#define key_f31 			CURS strs3._ky_f31
#define key_f32 			CURS strs3._ky_f32
#define key_f33 			CURS strs3._ky_f33
#define key_f34 			CURS strs3._ky_f34
#define key_f35 			CURS strs3._ky_f35
#define key_f36 			CURS strs3._ky_f36
#define key_f37 			CURS strs3._ky_f37
#define key_f38 			CURS strs3._ky_f38
#define key_f39 			CURS strs3._ky_f39
#define key_f40 			CURS strs3._ky_f40
#define key_f41 			CURS strs3._ky_f41
#define key_f42 			CURS strs3._ky_f42
#define key_f43 			CURS strs3._ky_f43
#define key_f44 			CURS strs3._ky_f44
#define key_f45 			CURS strs3._ky_f45
#define key_f46 			CURS strs3._ky_f46
#define key_f47 			CURS strs3._ky_f47
#define key_f48 			CURS strs3._ky_f48
#define key_f49 			CURS strs3._ky_f49
#define key_f50 			CURS strs3._ky_f50
#define key_f51 			CURS strs3._ky_f51
#define key_f52 			CURS strs3._ky_f52
#define key_f53 			CURS strs3._ky_f53
#define key_f54 			CURS strs3._ky_f54
#define key_f55 			CURS strs3._ky_f55
#define key_f56 			CURS strs3._ky_f56
#define key_f57 			CURS strs3._ky_f57
#define key_f58 			CURS strs3._ky_f58
#define key_f59 			CURS strs3._ky_f59
#define key_f60 			CURS strs3._ky_f60
#define key_f61 			CURS strs3._ky_f61
#define key_f62 			CURS strs3._ky_f62
#define key_f63 			CURS strs3._ky_f63
#define key_action 			CURS strs3._ky_action
#define enter_topline_mode 		CURS strs3._entr_topline_mode
#define enter_bottom_mode 		CURS strs3._entr_bottom_mode
#define enter_rvert_mode 		CURS strs3._entr_rvert_mode
#define enter_lvert_mode 		CURS strs3._entr_lvert_mode
#define char_padding 			CURS strs3._char_padding
#define acs_chars 			CURS strs3._acs_chars
#define plab_norm 			CURS strs3._plab_norm
#define key_btab 			CURS strs3._ky_btab
#define enter_xon_mode 			CURS strs3._entr_xon_mode
#define exit_xon_mode 			CURS strs3._exit_xon_mode
#define enter_am_mode 			CURS strs3._entr_am_mode
#define exit_am_mode 			CURS strs3._exit_am_mode
#define xon_character 			CURS strs3._xon_character
#define xoff_character 			CURS strs3._xoff_character
#define ena_acs 			CURS strs3._ena_acs
#define label_on 			CURS strs3._labl_on
#define label_off 			CURS strs3._labl_off
#define key_beg 			CURS strs3._ky_beg
#define key_cancel 			CURS strs3._ky_cancel
#define key_close 			CURS strs3._ky_close
#define key_copy 			CURS strs3._ky_copy
#define key_create 			CURS strs3._ky_create
#define key_enter 			CURS strs3._ky_enter
#define key_exit 			CURS strs3._ky_exit
#define key_find 			CURS strs3._ky_find
#define key_mark 			CURS strs3._ky_mark
#define key_message 			CURS strs3._ky_message
#define key_move 			CURS strs3._ky_move
#define key_next 			CURS strs3._ky_next
#define key_open 			CURS strs4._ky_open
#define key_options 			CURS strs4._ky_options
#define key_previous 			CURS strs4._ky_previous
#define key_print 			CURS strs4._ky_print
#define key_redo 			CURS strs4._ky_redo
#define key_reference 			CURS strs4._ky_reference
#define key_refresh 			CURS strs4._ky_refresh
#define key_replace 			CURS strs4._ky_replace
#define key_restart 			CURS strs4._ky_restart
#define key_resume 			CURS strs4._ky_resume
#define key_save 			CURS strs4._ky_save
#define key_suspend 			CURS strs4._ky_suspend
#define key_undo 			CURS strs4._ky_undo
#define key_sbeg 			CURS strs4._ky_sbeg
#define key_scancel 			CURS strs4._ky_scancel
#define key_scommand 			CURS strs4._ky_scommand
#define key_scopy 			CURS strs4._ky_scopy
#define key_screate 			CURS strs4._ky_screate
#define key_sdc 			CURS strs4._ky_sdc
#define key_sdl 			CURS strs4._ky_sdl
#define key_select 			CURS strs4._ky_select
#define key_send 			CURS strs4._ky_send
#define key_seol 			CURS strs4._ky_seol
#define key_sexit 			CURS strs4._ky_sexit
#define key_sfind 			CURS strs4._ky_sfind
#define key_shelp 			CURS strs4._ky_shelp
#define key_shome 			CURS strs4._ky_shome
#define key_sic 			CURS strs4._ky_sic
#define key_sleft 			CURS strs4._ky_sleft
#define key_smessage 			CURS strs4._ky_smessage
#define key_smove 			CURS strs4._ky_smove
#define key_snext 			CURS strs4._ky_snext
#define key_soptions 			CURS strs4._ky_soptions
#define key_sprevious 			CURS strs4._ky_sprevious
#define key_sprint 			CURS strs4._ky_sprint
#define key_sredo 			CURS strs4._ky_sredo
#define key_sreplace 			CURS strs4._ky_sreplace
#define key_sright 			CURS strs4._ky_sright
#define key_srsume 			CURS strs4._ky_srsume
#define key_ssave 			CURS strs4._ky_ssave
#define key_ssuspend 			CURS strs4._ky_ssuspend
#define key_sundo 			CURS strs4._ky_sundo
#define req_for_input 			CURS strs4._req_for_input
#define clr_bol 			CURS strs4._clr_bol
#define clear_margins 			CURS strs4._clear_margins
#define set_left_margin 		CURS strs4._set_left_margin
#define set_right_margin 		CURS strs4._set_right_margin
#define label_format 			CURS strs4._labl_format
#define set_clock 			CURS strs4._set_clock
#define display_clock 			CURS strs4._display_clock
#define remove_clock 			CURS strs4._remove_clock
#define create_window 			CURS strs4._create_window
#define goto_window 			CURS strs4._goto_window
#define hangup 				CURS strs4._hangup
#define dial_phone 			CURS strs4._dial_phone
#define quick_dial 			CURS strs4._quick_dial
#define tone 				CURS strs4._tone
#define pulse 				CURS strs4._pulse
#define flash_hook 			CURS strs4._flash_hook
#define fixed_pause 			CURS strs4._fixed_pause
#define wait_tone 			CURS strs4._wait_tone
#define user0 				CURS strs4._user0
#define user1 				CURS strs4._user1
#define user2 				CURS strs4._user2
#define user3 				CURS strs4._user3
#define user4 				CURS strs4._user4
#define user5 				CURS strs4._user5
#define user6 				CURS strs4._user6
#define user7 				CURS strs4._user7
#define user8 				CURS strs4._user8
#define user9 				CURS strs4._user9
#define orig_pair 			CURS strs4._orig_pair
#define orig_colors 			CURS strs4._orig_colors
#define initialize_color 		CURS strs4._initialize_color
#define initialize_pair 		CURS strs4._initialize_pair
#define set_color_pair 			CURS strs4._set_color_pair
#define set_foreground 			CURS strs4._set_foreground
#define set_background 			CURS strs4._set_background
#define change_char_pitch 		CURS strs4._change_char_pitch
#define change_line_pitch 		CURS strs4._change_line_pitch
#define change_res_horz 		CURS strs4._change_res_horz
#define change_res_vert 		CURS strs4._change_res_vert
#define define_char 			CURS strs4._define_char
#define enter_doublewide_mode 		CURS strs4._entr_doublewide_mode
#define enter_draft_quality 		CURS strs4._entr_draft_quality
#define enter_italics_mode 		CURS strs4._entr_italics_mode
#define enter_leftward_mode 		CURS strs4._entr_leftward_mode
#define enter_micro_mode 		CURS strs4._entr_micro_mode
#define enter_near_letter_quality 		CURS strs4._entr_near_letter_quality
#define enter_normal_quality 		CURS strs4._entr_normal_quality
#define enter_shadow_mode 		CURS strs4._entr_shadow_mode
#define enter_subscript_mode 		CURS strs4._entr_subscript_mode
#define enter_superscript_mode 		CURS strs4._entr_superscript_mode
#define enter_upward_mode 		CURS strs4._entr_upward_mode
#define exit_doublewide_mode 		CURS strs4._exit_doublewide_mode
#define exit_italics_mode 		CURS strs4._exit_italics_mode
#define exit_leftward_mode 		CURS strs4._exit_leftward_mode
#define exit_micro_mode 		CURS strs4._exit_micro_mode
#define exit_shadow_mode 		CURS strs4._exit_shadow_mode
#define exit_subscript_mode 		CURS strs4._exit_subscript_mode
#define exit_superscript_mode 		CURS strs4._exit_superscript_mode
#define exit_upward_mode 		CURS strs4._exit_upward_mode
#define micro_column_address 		CURS strs4._micro_column_address
#define micro_down 			CURS strs4._micro_down
#define micro_left 			CURS strs4._micro_left
#define micro_right 			CURS strs4._micro_right
#define micro_row_address 		CURS strs4._micro_row_address
#define micro_up 			CURS strs4._micro_up
#define order_of_pins 			CURS strs4._order_of_pins
#define parm_down_micro 		CURS strs4._prm_down_micro
#define parm_left_micro 		CURS strs4._prm_left_micro
#define parm_right_micro 		CURS strs4._prm_right_micro
#define parm_up_micro 			CURS strs4._prm_up_micro
#define select_char_set 		CURS strs4._select_char_set
#define set_bottom_margin 		CURS strs4._set_bottom_margin
#define set_bottom_margin_parm 		CURS strs4._set_bottom_margin_parm
#define set_left_margin_parm 		CURS strs4._set_left_margin_parm
#define set_right_margin_parm 		CURS strs4._set_right_margin_parm
#define set_top_margin 			CURS strs4._set_top_margin
#define set_top_margin_parm 		CURS strs4._set_top_margin_parm
#define start_bit_image 		CURS strs4._start_bit_image
#define start_char_set_def 		CURS strs4._start_char_set_def
#define stop_bit_image 			CURS strs4._stop_bit_image
#define stop_char_set_def 		CURS strs4._stop_char_set_def
#define subscript_characters 		CURS strs4._subscript_characters
#define superscript_characters 		CURS strs4._superscript_characters
#define these_cause_cr 			CURS strs4._these_cause_cr
#define zero_motion 			CURS strs4._zero_motion
#define char_set_names 			CURS strs4._char_set_names
#define key_mouse 			CURS strs4._ky_mouse
#define mouse_info 			CURS strs4._mouse_info
#define req_mouse_pos 			CURS strs4._req_mouse_pos
#define get_mouse 			CURS strs4._get_mouse
#define set_a_foreground 		CURS strs4._set_a_foreground
#define set_a_background 		CURS strs4._set_a_background
#define pkey_plab 			CURS strs4._pkey_plab
#define device_type 			CURS strs4._device_type
#define code_set_init 			CURS strs4._code_set_init
#define set0_des_seq 			CURS strs4._set0_des_seq
#define set1_des_seq 			CURS strs4._set1_des_seq
#define set2_des_seq 			CURS strs4._set2_des_seq
#define set3_des_seq 			CURS strs4._set3_des_seq
#define set_lr_margin 			CURS strs4._set_lr_margin
#define set_tb_margin 			CURS strs4._set_tb_margin
#define bit_image_repeat 		CURS strs4._bit_image_repeat
#define bit_image_newline 		CURS strs4._bit_image_newline
#define bit_image_carriage_return 		CURS strs4._bit_image_carriage_return
#define color_names 			CURS strs4._color_names
#define define_bit_image_region 		CURS strs4._define_bit_image_region
#define end_bit_image_region 		CURS strs4._end_bit_image_region
#define set_color_band 			CURS strs4._set_color_band
#define set_page_length 		CURS strs4._set_page_length
#define display_pc_char 		CURS strs4._display_pc_char
#define enter_pc_charset_mode 		CURS strs4._entr_pc_charset_mode
#define exit_pc_charset_mode 		CURS strs4._exit_pc_charset_mode
#define enter_scancode_mode 		CURS strs4._entr_scancode_mode
#define exit_scancode_mode 		CURS strs4._exit_scancode_mode
#define pc_term_options 		CURS strs4._pc_term_options
#define scancode_escape 		CURS strs4._scancode_escape
#define alt_scancode_esc 		CURS strs4._alt_scancode_esc
#define set_pglen_inch 			CURS strs4._set_pglen_inch

typedef char *charptr;
struct strs {
	_back_tab,		/* Back tab */
	_bell,			/* Audible signal (bell) */
	_carriage_return,	/* Carriage return (*) */
	_change_scroll_region,	/* change to lines #1 thru #2 (vt100) (G) */
	_clear_all_tabs,	/* Clear all tab stops. */
	_clear_screen,		/* Clear screen (*) */
	_clr_eol,		/* Clear to end of line */
	_clr_eos,		/* Clear to end of display (*) */
	_column_address,	/* Set cursor column (G) */
	_command_character,	/* Term. settable cmd char in prototype */
	_crsr_address,		/* Cursor motion to row #1 col #2 (G) */
	_crsr_down,		/* Down one line */
	_crsr_home,		/* Home cursor (if no cup) */
	_crsr_invisible,	/* Make cursor invisible */
	_crsr_left,		/* Move cursor left one space. */
	_crsr_mem_address,	/* Memory relative cursor addressing. */
	_crsr_normal,		/* Make cursor appear normal (undo vs/vi) */
	_crsr_right,		/* Non-destructive space (cursor right) */
	_crsr_to_ll,		/* Last line, first column (if no cup) */
	_crsr_up,		/* Upline (cursor up) */
	_crsr_visible,		/* Make cursor very visible */
	_dlt_character,	/* Delete character (*) */
	_dlt_line,		/* Delete line (*) */
	_dis_status_line,	/* Disable status line */
	_down_half_line,	/* Half-line down (forward 1/2 linefeed) */
	_entr_alt_charset_mode,	/* Start alternate character set */
	_entr_blink_mode,	/* Turn on blinking */
	_entr_bold_mode,	/* Turn on bold (extra bright) mode */
	_entr_ca_mode,		/* String to begin programs that use cup */
	_entr_delete_mode,	/* Delete mode (enter) */
	_entr_dim_mode,		/* Turn on half-bright mode */
	_entr_insert_mode,	/* Insert mode (enter); */
	_entr_secure_mode,	/* Turn on blank mode (chars invisible) */
	_entr_protected_mode,	/* Turn on protected mode */
	_entr_reverse_mode,	/* Turn on reverse video mode */
	_entr_standout_mode,	/* Begin stand out mode */
	_entr_underline_mode,	/* Start underscore mode */
	_erase_chars,		/* Erase #1 characters (G) */
	_exit_alt_charset_mode,	/* End alternate character set */
	_exit_attribute_mode,	/* Turn off all attributes */
	_exit_ca_mode,		/* String to end programs that use cup */
	_exit_delete_mode,	/* End delete mode */
	_exit_insert_mode,	/* End insert mode; */
	_exit_standout_mode,	/* End stand out mode */
	_exit_underline_mode,	/* End underscore mode */
	_flash_screen,		/* Visible bell (may not move cursor) */
	_form_feed,		/* Hardcopy terminal page eject (*) */
	_from_status_line,	/* Return from status line */
	_init_1string,		/* Terminal initialization string */
	_init_2string,		/* Terminal initialization string */
	_init_3string,		/* Terminal initialization string */
	_init_file,		/* Name of file containing is */
	_ins_character,	/* Insert character */
	_ins_line,		/* Add new blank line (*) */
	_ins_padding,		/* Insert pad after character inserted (*) */
	_ky_backspace,		/* KEY_BACKSPACE, 03507, Sent by backspace key */
	_ky_catab,		/* KEY_CATAB, 03626, Sent by clear-all-tabs key. */
	_ky_clear,		/* KEY_CLEAR, 03615, Sent by clear screen or erase key. */
	_ky_ctab,		/* KEY_CTAB, 03625, Sent by clear-tab key */
	_ky_dc,			/* KEY_DC, 03612, Sent by delete character key. */
	_ky_dl,			/* KEY_DL, 03610, Sent by delete line key. */
	_ky_down,		/* KEY_DOWN, 03502, Sent by terminal down arrow key */
	_ky_eic,		/* KEY_EIC, 03614, Sent by rmir or smir in insert mode. */
	_ky_eol,		/* KEY_EOL, 03617, Sent by clear-to-end-of-line key. */
	_ky_eos,		/* KEY_EOS, 03616, Sent by clear-to-end-of-screen key. */
	_ky_f0,			/* KEY_F(0), 03510, function key f0. */
	_ky_f1,			/* KEY_F(1), 03511, function key f1. */
	_ky_f10,		/* KEY_F(10), 03522, function key f10. */
	_ky_f2,			/* KEY_F(2), 03512, function key f2. */
	_ky_f3,			/* KEY_F(3), 03513, function key f3. */
	_ky_f4,			/* KEY_F(4), 03514, function key f4. */
	_ky_f5,			/* KEY_F(5), 03515, function key f5. */
	_ky_f6,			/* KEY_F(6), 03516, function key f6. */
	_ky_f7,			/* KEY_F(7), 03517, function key f7. */
	_ky_f8,			/* KEY_F(8), 03520, function key f8. */
	_ky_f9,			/* KEY_F(9), 03521, function key f9. */
	_ky_home,		/* KEY_HOME, 03506, Sent by home key. */
	_ky_ic,			/* KEY_IC, 03613, Sent by ins char/enter ins mode key. */
	_ky_il,			/* KEY_IL, 03611, Sent by insert line. */
	_ky_left,		/* KEY_LEFT, 03504, Sent by terminal left arrow key */
	_ky_ll,			/* KEY_LL, 03633, Sent by home-down key */
	_ky_npage,		/* KEY_NPAGE, 03622, Sent by next-page key */
	_ky_ppage,		/* KEY_PPAGE, 03623, Sent by previous-page key */
	_ky_right,		/* KEY_RIGHT, 03505, Sent by terminal right arrow key */
	_ky_sf,			/* KEY_SF, 03620, Sent by scroll-forward/down key */
	_ky_sr,			/* KEY_SR, 03621, Sent by scroll-backward/up key */
	_ky_stab,		/* KEY_STAB, 03624, Sent by set-tab key */
	_ky_up,			/* KEY_UP, 03503, Sent by terminal up arrow key */
	_kpad_local,		/* Out of "keypad transmit" mode */
	_kpad_xmit,		/* Put terminal in "keypad transmit" mode */
	_lab_f0,		/* Labels on function key f0 if not f0 */
	_lab_f1,		/* Labels on function key f1 if not f1 */
	_lab_f10,		/* Labels on function key f10 if not f10 */
	_lab_f2,		/* Labels on function key f2 if not f2 */
	_lab_f3,		/* Labels on function key f3 if not f3 */
	_lab_f4,		/* Labels on function key f4 if not f4 */
	_lab_f5,		/* Labels on function key f5 if not f5 */
	_lab_f6,		/* Labels on function key f6 if not f6 */
	_lab_f7,		/* Labels on function key f7 if not f7 */
	_lab_f8;			/* Labels on function key f8 if not f8 */

struct strs2 {
	_lab_f9,		/* Labels on function key f9 if not f9 */
	_meta_off,		/* Turn off "meta mode" */
	_meta_on,		/* Turn on "meta mode" (8th bit) */
	_newline,		/* Newline (behaves like cr followed by lf) */
	_pad_char,		/* Pad character (rather than null) */
	_prm_dch,		/* Delete #1 chars (G*) */
	_prm_delete_line,	/* Delete #1 lines (G*) */
	_prm_down_cursor,	/* Move cursor down #1 lines. (G*) */
	_prm_ich,		/* Insert #1 blank chars (G*) */
	_prm_index,		/* Scroll forward #1 lines. (G) */
	_prm_insert_line,	/* Add #1 new blank lines (G*) */
	_prm_left_cursor,	/* Move cursor left #1 spaces (G) */
	_prm_right_cursor,	/* Move cursor right #1 spaces. (G*) */
	_prm_rindex,		/* Scroll backward #1 lines. (G) */
	_prm_up_cursor,		/* Move cursor up #1 lines. (G*) */
	_pkey_key,		/* Prog funct key #1 to type string #2 */
	_pkey_local,		/* Prog funct key #1 to execute string #2 */
	_pkey_xmit,		/* Prog funct key #1 to xmit string #2 */
	_print_screen,		/* Print contents of the screen */
	_prtr_off,		/* Turn off the printer */
	_prtr_on,		/* Turn on the printer */
	_repeat_char,		/* Repeat char #1 #2 times.  (G*) */
	_reset_1string,		/* Reset terminal completely to sane modes. */
	_reset_2string,		/* Reset terminal completely to sane modes. */
	_reset_3string,		/* Reset terminal completely to sane modes. */
	_reset_file,		/* Name of file containing reset string. */
	_restore_cursor,	/* Restore cursor to position of last sc. */
	_row_address,		/* Like hpa but sets row. (G) */
	_save_cursor,		/* Save cursor position. */
	_scrll_forward,		/* Scroll text up */
	_scrll_reverse,		/* Scroll text down */
	_set_attributes,	/* Define the video attributes (G9) */
	_set_tab,		/* Set a tab in all rows, current column. */
	_set_window,		/* Current window is lines #1-#2 cols #3-#4 */
	_tab,			/* Tab to next 8 space hardware tab stop. */
	_to_status_line,	/* Go to status line, col #1 */
	_underline_char,	/* Underscore one char and move past it */
	_up_half_line,		/* Half-line up (reverse 1/2 linefeed) */
	_init_prog,		/* Path name of program for init. */
	_ky_a1,			/* KEY_A1, 03634, Upper left of keypad */
	_ky_a3,			/* KEY_A3, 03635, Upper right of keypad */
	_ky_b2,			/* KEY_B2, 03636, Center of keypad */
	_ky_c1,			/* KEY_C1, 03637, Lower left of keypad */
	_ky_c3,			/* KEY_C3, 03640, Lower right of keypad */
	_prtr_non,		/* Turn on the printer for #1 bytes. */
	_box_chars_1,		/* Box characters primary set */
	_box_chars_2,		/* Box characters alternate set */
	_box_attr_1,		/* Attributes for box_chars_1 */
	_box_attr_2,		/* Attributes for box_chars_2 */
	_color_bg_0,		/* Background color 0 black */
	_color_bg_1,		/* Background color 1 red */
	_color_bg_2,		/* Background color 2 green */
	_color_bg_3,		/* Background color 3 brown */
	_color_bg_4,		/* Background color 4 blue */
	_color_bg_5,		/* Background color 5 magenta */
	_color_bg_6,		/* Background color 6 cyan */
	_color_bg_7,		/* Background color 7 white */
	_color_fg_0,		/* Foreground color 0 white */
	_color_fg_1,		/* Foreground color 1 red */
	_color_fg_2,		/* Foreground color 2 green */
	_color_fg_3,		/* Foreground color 3 brown */
	_color_fg_4,		/* Foreground color 4 blue */
	_color_fg_5,		/* Foreground color 5 magenta */
	_color_fg_6,		/* Foreground color 6 cyan */
	_color_fg_7,		/* Foreground color 7 black */
	_font_0,		/* Select font 0 */
	_font_1,		/* Select font 1 */
	_font_2,		/* Select font 2 */
	_font_3,		/* Select font 3 */
	_font_4,		/* Select font 4 */
	_font_5,		/* Select font 5 */
	_font_6,		/* Select font 6 */
	_font_7,		/* Select font 7 */
	_ky_back_tab,		/* AIX back tab key */
	_ky_do,			/* Do request key */
	_ky_command,		/* KEY_COMMAND, 03645, cmd (command) key */
	_ky_command_pane,	/* Command pane key */
	_ky_end,		/* KEY_END, 03650, end key */
	_ky_help,		/* KEY_HELP, 03653, help key */
	_ky_newline,		/* Newline key */
	_ky_next_pane,		/* Next pane key */
	_ky_prev_cmd,		/* Previous command key */
	_ky_prev_pane,		/* Previous pane key */
	_ky_quit,		/* Quit key */
	_ky_select_aix,		/* AIX select key */
	_ky_scroll_left,	/* Scroll left */
	_ky_scroll_right,	/* Scroll right */
	_ky_tab,		/* Tab key */
	_ky_smap_in1,		/* input for special mapped key 1 */
	_ky_smap_out1,		/* output for mapped key 1 */
	_ky_smap_in2,		/* input for special mapped key 2 */
	_ky_smap_out2,		/* output for mapped key 2 */
	_ky_smap_in3,		/* input for special mapped key 3 */
	_ky_smap_out3,		/* output for mapped key 3 */
	_ky_smap_in4,		/* input for special mapped key 4 */
	_ky_smap_out4,		/* output for mapped key 4 */
	_ky_smap_in5,		/* input for special mapped key 5 */
	_ky_smap_out5,		/* output for mapped key 5 */
	_appl_defined_str,	/* Application defined terminal string */
	_ky_smap_in6;		/* input for special mapped key 6 */

struct strs3 {
	_ky_smap_out6,		/* output for mapped key 6 */
	_ky_smap_in7,		/* input for special mapped key 7 */
	_ky_smap_out7,		/* output for mapped key 7 */
	_ky_smap_in8,		/* input for special mapped key 8 */
	_ky_smap_out8,		/* output for mapped key 8 */
	_ky_smap_in9,		/* input for special mapped key 9 */
	_ky_smap_out9,		/* output for mapped key 9 */
	_ky_sf1,		/* Special function key 1 */
	_ky_sf2,		/* Special function key 2 */
	_ky_sf3,		/* Special function key 3 */
	_ky_sf4,		/* Special function key 4 */
	_ky_sf5,		/* Special function key 5 */
	_ky_sf6,		/* Special function key 6 */
	_ky_sf7,		/* Special function key 7 */
	_ky_sf8,		/* Special function key 8 */
	_ky_sf9,		/* Special function key 9 */
	_ky_sf10,		/* Special function key 10 */
	_ky_f11,		/* KEY_F(11), 03523, Sent by function key f11. */
	_ky_f12,		/* KEY_F(12), 03524, Sent by function key f12. */
	_ky_f13,		/* KEY_F(13), 03525, Sent by function key f13. */
	_ky_f14,		/* KEY_F(14), 03526, Sent by function key f14. */
	_ky_f15,		/* KEY_F(15), 03527, Sent by function key f15. */
	_ky_f16,		/* KEY_F(16), 03530, Sent by function key f16. */
	_ky_f17,		/* KEY_F(17), 03531, Sent by function key f17. */
	_ky_f18,		/* KEY_F(18), 03532, Sent by function key f18. */
	_ky_f19,		/* KEY_F(19), 03533, Sent by function key f19. */
	_ky_f20,		/* KEY_F(20), 03534, Sent by function key f20. */
	_ky_f21,		/* KEY_F(21), 03535, Sent by function key f21. */
	_ky_f22,		/* KEY_F(22), 03536, Sent by function key f22. */
	_ky_f23,		/* KEY_F(23), 03537, Sent by function key f23. */
	_ky_f24,		/* KEY_F(24), 03540, Sent by function key f24. */
	_ky_f25,		/* KEY_F(25), 03541, Sent by function key f25. */
	_ky_f26,		/* KEY_F(26), 03542, Sent by function key f26. */
	_ky_f27,		/* KEY_F(27), 03543, Sent by function key f27. */
	_ky_f28,		/* KEY_F(28), 03544, Sent by function key f28. */
	_ky_f29,		/* KEY_F(29), 03545, Sent by function key f29. */
	_ky_f30,		/* KEY_F(30), 03546, Sent by function key f30. */
	_ky_f31,		/* KEY_F(31), 03547, Sent by function key f31. */
	_ky_f32,		/* KEY_F(32), 03550, Sent by function key f32. */
	_ky_f33,		/* KEY_F(33), 03551, Sent by function key f33. */
	_ky_f34,		/* KEY_F(34), 03552, Sent by function key f34. */
	_ky_f35,		/* KEY_F(35), 03553, Sent by function key f35. */
	_ky_f36,		/* KEY_F(36), 03554, Sent by function key f36. */
	_ky_f37,		/* KEY_F(37), 03555, Sent by function key f37. */
	_ky_f38,		/* KEY_F(38), 03556, Sent by function key f38. */
	_ky_f39,		/* KEY_F(39), 03557, Sent by function key f39. */
	_ky_f40,		/* KEY_F(40), 03560, Sent by function key f40. */
	_ky_f41,		/* KEY_F(41), 03561, Sent by function key f41. */
	_ky_f42,		/* KEY_F(42), 03562, Sent by function key f42. */
	_ky_f43,		/* KEY_F(43), 03563, Sent by function key f43. */
	_ky_f44,		/* KEY_F(44), 03564, Sent by function key f44. */
	_ky_f45,		/* KEY_F(45), 03565, Sent by function key f45. */
	_ky_f46,		/* KEY_F(46), 03566, Sent by function key f46. */
	_ky_f47,		/* KEY_F(47), 03567, Sent by function key f47. */
	_ky_f48,		/* KEY_F(48), 03570, Sent by function key f48. */
	_ky_f49,		/* KEY_F(49), 03571, Sent by function key f49. */
	_ky_f50,		/* KEY_F(50), 03572, Sent by function key f50. */
	_ky_f51,		/* KEY_F(51), 03573, Sent by function key f51. */
	_ky_f52,		/* KEY_F(52), 03574, Sent by function key f52. */
	_ky_f53,		/* KEY_F(53), 03575, Sent by function key f53. */
	_ky_f54,		/* KEY_F(54), 03576, Sent by function key f54. */
	_ky_f55,		/* KEY_F(55), 03577, Sent by function key f55. */
	_ky_f56,		/* KEY_F(56), 03600, Sent by function key f56. */
	_ky_f57,		/* KEY_F(57), 03601, Sent by function key f57. */
	_ky_f58,		/* KEY_F(58), 03602, Sent by function key f58. */
	_ky_f59,		/* KEY_F(59), 03603, Sent by function key f59. */
	_ky_f60,		/* KEY_F(60), 03604, Sent by function key f60. */
	_ky_f61,		/* KEY_F(61), 03605, Sent by function key f61. */
	_ky_f62,		/* KEY_F(62), 03606, Sent by function key f62. */
	_ky_f63,		/* KEY_F(63), 03607, Sent by function key f63. */
	_ky_action,		/* KEY_ACTION, 03731, Sent by the action key. */
	_entr_topline_mode,	/* Start topline mode. */
	_entr_bottom_mode,	/* Start bottom mode. */
	_entr_rvert_mode,	/* Start right vertical line mode. */
	_entr_lvert_mode,	/* Start left vertical line mode. */
	_char_padding,		/* Like ip but when in replace mode */
	_acs_chars,		/* Graphic charset pairs aAbBcC - def=vt100 */
	_plab_norm,		/* Prog label #1 to show string #2 */
	_ky_btab,		/* KEY_BTAB, 03641, Back tab key */
	_entr_xon_mode,		/* Turn on xon/xoff handshaking */
	_exit_xon_mode,		/* Turn off xon/xoff handshaking */
	_entr_am_mode,		/* Turn on automatic margins */
	_exit_am_mode,		/* Turn off automatic margins */
	_xon_character,		/* X-on character */
	_xoff_character,	/* X-off character */
	_ena_acs,		/* Enable alternate char set */
	_labl_on,		/* Turn on soft labels */
	_labl_off,		/* Turn off soft labels */
	_ky_beg,		/* KEY_BEG, 03642, beg(inning) key */
	_ky_cancel,		/* KEY_CANCEL, 03643, cancel key */
	_ky_close,		/* KEY_CLOSE, 03644, close key */
	_ky_copy,		/* KEY_COPY, 03646, copy key */
	_ky_create,		/* KEY_CREATE, 03647, create key */
	_ky_enter,		/* KEY_ENTER, 03627, Enter/send (unreliable) */
	_ky_exit,		/* KEY_EXIT, 03651, exit key */
	_ky_find,		/* KEY_FIND, 03652, find key */
	_ky_mark,		/* KEY_MARK, 03654, mark key */
	_ky_message,		/* KEY_MESSAGE, 03655, message key */
	_ky_move,		/* KEY_MOVE, 03656, move key */
	_ky_next;		/* KEY_NEXT, 03657, next object key */

struct strs4 {
	_ky_open,		/* KEY_OPEN, 03660, open key */
	_ky_options,		/* KEY_OPTIONS, 03661, options key */
	_ky_previous,		/* KEY_PREVIOUS, 03662, previous object key */
	_ky_print,		/* KEY_PRINT, 03632, print or copy */
	_ky_redo,		/* KEY_REDO, 03663, redo key */
	_ky_reference,		/* KEY_REFERENCE, 03664, ref(erence) key */
	_ky_refresh,		/* KEY_REFRESH, 03665, refresh key */
	_ky_replace,		/* KEY_REPLACE, 03666, replace key */
	_ky_restart,		/* KEY_RESTART, 03667, restart key */
	_ky_resume,		/* KEY_RESUME, 03670, resume key */
	_ky_save,		/* KEY_SAVE, 03671, save key */
	_ky_suspend,		/* KEY_SUSPEND, 03727, suspend key */
	_ky_undo,		/* KEY_UNDO, 03730, undo key */
	_ky_sbeg,		/* KEY_SBEG, 03672, shifted beginning key */
	_ky_scancel,		/* KEY_SCANCEL, 03673, shifted cancel key */
	_ky_scommand,		/* KEY_SCOMMAND, 03674, shifted command key */
	_ky_scopy,		/* KEY_SCOPY, 03675, shifted copy key */
	_ky_screate,		/* KEY_SCREATE, 03676, shifted create key */
	_ky_sdc,		/* KEY_SDC, 03677, shifted delete char key */
	_ky_sdl,		/* KEY_SDL, 03700, shifted delete line key */
	_ky_select,		/* KEY_SELECT, 03701, select key */
	_ky_send,		/* KEY_SEND, 03702, shifted end key */
	_ky_seol,		/* KEY_SEOL, 03703, shifted clear line key */
	_ky_sexit,		/* KEY_SEXIT, 03704, shifted exit key */
	_ky_sfind,		/* KEY_SFIND, 03705, shifted find key */
	_ky_shelp,		/* KEY_SHELP, 03706, shifted help key */
	_ky_shome,		/* KEY_SHOME, 03707, shifted home key */
	_ky_sic,		/* KEY_SIC, 03710, shifted input key */
	_ky_sleft,		/* KEY_SLEFT, 03711, shifted left arrow key */
	_ky_smessage,		/* KEY_SMESSAGE, 03712, shifted message key */
	_ky_smove,		/* KEY_SMOVE, 03713, shifted move key */
	_ky_snext,		/* KEY_SNEXT, 03714, shifted next key */
	_ky_soptions,		/* KEY_SOPTIONS, 03715, shifted options key */
	_ky_sprevious,		/* KEY_SPREVIOUS, 03716, shifted prev key */
	_ky_sprint,		/* KEY_SPRINT, 03717, shifted print key */
	_ky_sredo,		/* KEY_SREDO, 03720, shifted redo key */
	_ky_sreplace,		/* KEY_SREPLACE, 03721, shifted replace key */
	_ky_sright,		/* KEY_SRIGHT, 03722, shifted right arrow */
	_ky_srsume,		/* KEY_SRSUME, 03723, shifted resume key */
	_ky_ssave,		/* KEY_SSAVE, 03724, shifted save key */
	_ky_ssuspend,		/* KEY_SSUSPEND, 03725, shifted suspend key */
	_ky_sundo,		/* KEY_SUNDO, 03726, shifted undo key */
	_req_for_input,		/* send next input char (for ptys) */
	_clr_bol,		/* Clear to beginning of line, inclusive */
	_clear_margins,		/* Clear left and right soft margins */
	_set_left_margin,	/* Set soft left margin */
	_set_right_margin,	/* Set soft right margin */
	_labl_format,		/* Label format */
	_set_clock,		/* Set time-of-day clock */
	_display_clock,		/* Display time-of-day clock */
	_remove_clock,		/* Remove time-of-day clock */
	_create_window,		/* Define win #1 to go from #2,#3 to #4,#5 */
	_goto_window,		/* Got to window #1 */
	_hangup,		/* Hang-up phone */
	_dial_phone,		/* Dial phone number #1 */
	_quick_dial,		/* Dial phone number #1, without progress detection */
	_tone,			/* Select touch tone dialing */
	_pulse,			/* Select pulse dialing */
	_flash_hook,		/* Flash the switch hook */
	_fixed_pause,		/* Pause for 2-3 seconds */
	_wait_tone,		/* Wait for dial tone */
	_user0,			/* User string 0 */
	_user1,			/* User string 1 */
	_user2,			/* User string 2 */
	_user3,			/* User string 3 */
	_user4,			/* User string 4 */
	_user5,			/* User string 5 */
	_user6,			/* User string 6 */
	_user7,			/* User string 7 */
	_user8,			/* User string 8 */
	_user9,			/* User string 9 */
	_orig_pair,		/* Original color-pair */
	_orig_colors,		/* Original colors */
	_initialize_color,	/* Initialize the definition of color */
	_initialize_pair,	/* Initialize color pair */
	_set_color_pair,	/* Set color pair	 */
	_set_foreground,	/* Set foreground color using RGB escape */
	_set_background,	/* Set background color using RGB escape */
	_change_char_pitch,	/* Change no. characters per inch */
	_change_line_pitch,	/* Change no. lines per inch */
	_change_res_horz,	/* Change horizontal resolution */
	_change_res_vert,	/* Change vertical resolution */
	_define_char,		/* Define a character in a character set */
	_entr_doublewide_mode,	/* Enable double wide printing */
	_entr_draft_quality,	/* Set draft quality print */
	_entr_italics_mode,	/* Enable italics */
	_entr_leftward_mode,	/* Enable leftward carriage motion */
	_entr_micro_mode,	/* Enable micro motion capabilities */
	_entr_near_letter_quality,	/* Set near-letter quality print */
	_entr_normal_quality,	/* Set normal quality print */
	_entr_shadow_mode,	/* Enable shadow printing */
	_entr_subscript_mode,	/* Enable subscript printing */
	_entr_superscript_mode,	/* Enable superscript printing */
	_entr_upward_mode,	/* Enable upward carriage motion */
	_exit_doublewide_mode,	/* Disable double wide printing */
	_exit_italics_mode,	/* Disable italics */
	_exit_leftward_mode,	/* Enable rightward (normal) carriage motion */
	_exit_micro_mode,	/* Disable micro motion capabilities */
	_exit_shadow_mode,	/* Disable shadow printing */
	_exit_subscript_mode,	/* Disable subscript printing */
	_exit_superscript_mode,	/* Disable superscript printing */
	_exit_upward_mode,	/* Enable downward (normal) carriage motion */
	_micro_column_address,	/* Like column_address for micro adjustment */
	_micro_down,		/* Like cursor_down for micro adjustment */
	_micro_left,		/* Like cursor_left for micro adjustment */
	_micro_right,		/* Like cursor_right for micro adjustment */
	_micro_row_address,	/* Like row_address for micro adjustment */
	_micro_up,		/* Like cursor_up for micro adjustment */
	_order_of_pins,		/* Matches software bits to print-head pins */
	_prm_down_micro,	/* Like parm_down_cursor for micro adjust. */
	_prm_left_micro,	/* Like parm_left_cursor for micro adjust. */
	_prm_right_micro,	/* Like parm_right_cursor for micro adjust. */
	_prm_up_micro,		/* Like parm_up_cursor for micro adjust. */
	_select_char_set,	/* Select character set */
	_set_bottom_margin,	/* Set soft bottom margin at current line */
	_set_bottom_margin_parm,/* Set soft bottom margin */
	_set_left_margin_parm,	/* Set soft left margin */
	_set_right_margin_parm,	/* Set soft right margin */
	_set_top_margin,	/* Set soft top margin at current line */
	_set_top_margin_parm,	/* Set soft top margin */
	_start_bit_image,	/* Start printing bit image graphics */
	_start_char_set_def,	/* Start definition of a character set */
	_stop_bit_image,	/* End printing bit image graphics */
	_stop_char_set_def,	/* End definition of a character set */
	_subscript_characters,	/* List of ``subscript-able'' characters */
	_superscript_characters,/* List of ``superscript-able'' characters */
	_these_cause_cr,	/* Printing any of these chars causes cr */
	_zero_motion,		/* No motion for the subsequent character */
	_char_set_names,	/* List of character set names */
	_ky_mouse,		/* KEY_MOUSE, 03732, Mouse event has occured */
	_mouse_info,		/* Mouse status information */
	_req_mouse_pos,		/* Request mouse position report */
	_get_mouse,		/* Curses should get button events */
	_set_a_foreground,	/* Set foreground color using ANSI escape */
	_set_a_background,	/* Set background color using ANSI escape */
	_pkey_plab,		/* Prog key #1 to xmit string #2 and show string #3 */
	_device_type,		/* Indicate language/codeset support */
	_code_set_init,		/* Init sequence for multiple codesets */
	_set0_des_seq,		/* Shift into codeset 0 (EUC set 0, ASCII) */
	_set1_des_seq,		/* Shift into codeset 1 */
	_set2_des_seq,		/* Shift into codeset 2 */
	_set3_des_seq,		/* Shift into codeset 3 */
	_set_lr_margin,		/* Sets both left and right margins */
	_set_tb_margin,		/* Sets both top and bottom margins */
	_bit_image_repeat,	/* Repeat bit-image cell #1 #2 times (use tparm) */
	_bit_image_newline,	/* Move to next row of the bit image (use tparm) */
	_bit_image_carriage_return,	/* Move to beginning of same row (use tparm) */
	_color_names,		/* Give name for color #1 */
	_define_bit_image_region,	/* Define rectangular bit-image region (use tparm) */
	_end_bit_image_region,	/* End a bit-image region (use tparm) */
	_set_color_band,	/* Change to ribbon color #1 */
	_set_page_length,	/* Set page length to #1 lines (use tparm) */
	_display_pc_char,	/* Display PC character */
	_entr_pc_charset_mode,	/* Enter PC character display mode */
	_exit_pc_charset_mode,	/* Disable PC character display mode */
	_entr_scancode_mode,	/* Enter PC scancode mode */
	_exit_scancode_mode,	/* Disable PC scancode mode */
	_pc_term_options,	/* PC terminal options */
	_scancode_escape,	/* Escape for scancode emulation */
	_alt_scancode_esc,	/* Alternate escape for scancode emulation */
	_set_pglen_inch,	/* Set page length to #1 hundredths of an inch (use tparm) */
	Sentinel;		/* End of strings. DO NOT MOVE! */

struct _bool_struct {
	_auto_left_margin,	/* cub1 wraps from column 0 to last column */
	_auto_right_margin,	/* Terminal has automatic margins */
	_no_esc_ctlc,		/* Beehive (f1=escape, f2=ctrl C) */
	_ceol_standout_glitch,	/* Standout not erased by overwriting (hp) */
	_eat_newline_glitch,	/* newline ignored after 80 cols (Concept) */
	_erase_overstrike,	/* Can erase overstrikes with a blank */
	_generic_type,		/* Generic line type (e.g. dialup, switch). */
	_hard_copy,		/* Hardcopy terminal */
	_has_meta_key,		/* Has a meta key (shift, sets parity bit) */
	_has_status_line,	/* Has extra "status line" */
	_ins_null_glitch,	/* Insert mode distinguishes nulls */
	_mem_above,		/* Display may be retained above the screen */
	_mem_below,		/* Display may be retained below the screen */
	_move_insert_mode,	/* Safe to move while in insert mode */
	_move_standout_mode,	/* Safe to move in standout modes */
	_over_strike,		/* Terminal overstrikes */
	_status_line_esc_ok,	/* Escape can be used on the status line */
	_dest_tabs_magic_smso,	/* Tabs destructive, magic so char (t1061) */
	_tilde_glitch,		/* Hazeltine; can't print ~'s */
	_transparent_underline,	/* underline character overstrikes */
	_xon_xoff,		/* Terminal uses xon/xoff handshaking */
	_needs_xon_xoff,	/* Padding won't work, xon/xoff required */
	_prtr_silent,		/* Printer won't echo on screen. */
	_hard_cursor,		/* Cursor is hard to see. */
	_non_rev_rmcup,		/* Smcup does not reverse rmcup. */
	_no_pad_char,		/* Pad character doesn't exist. */
	_non_dest_scroll_region,/* Scrolling region is non-destructive. */
	_can_change,		/* Can re-define existing color */
	_back_color_erase,	/* Erases screen with current background */
	_hue_lightness_saturation,	/* HLS color notation is used (Tek) */
	_col_addr_glitch,	/* Only positive motion for hpa/mhpa caps */
	_cr_cancels_micro_mode,	/* Using cr turns off micro mode */
	_has_print_wheel,	/* Printer needs operator to change character set */
	_row_addr_glitch,	/* Only positive motion for vpa/mvpa caps */
	_semi_auto_right_margin,/* Printing in last column causes cr */
	_cpi_changes_res,	/* Changing char. pitch changes resolution */
	_lpi_changes_res,	/* Changing line pitch changes resolution */
	Sentinel;		/* End of bools. DO NOT MOVE! */

struct _num_struct {
	_columns,		/* Number of columns in a line */
	_init_tabs,		/* Tabs initially every # spaces. */
	_lines,			/* Number of lines on screen or page */
	_lines_of_memory,	/* Lines of memory if > lines.  0 => varies */
	_magic_cookie_glitch,	/* Number blank chars left by smso or rmso */
	_padding_baud_rate,	/* Lowest baud rate where padding needed */
	_virtual_terminal,	/* Virtual terminal number (CB/Unix) */
	_width_status_line,	/* # columns in status line */
	_num_labels,		/* # of labels on screen (start at 1) */
	_labl_height,		/* # rows in each label */
	_labl_width,		/* # cols in each label */
	_max_attributes,	/* max combined video attributes terminal can display */
	_maximum_windows,	/* Maximum number of defineable windows */
	_max_colors,		/* max # of color on the screen */
	_max_pairs,		/* max # of color pairs on the screen */
	_no_color_video,	/* Video attributes that cannot be used with colors */
	_buffer_capacity,	/* Number of bytes buffered before printing */
	_dot_vert_spacing,	/* Spacing of pins vertically in pins per inch */
	_dot_horz_spacing,	/* Spacing of dots horizontally in dots per inch */
	_max_micro_address,	/* Maximum value in micro_..._address */
	_max_micro_jump,	/* Maximum value in parm_..._micro */
	_micro_col_size,	/* Character step size when in micro mode */
	_micro_line_size,	/* Line step size when in micro mode */
	_number_of_pins,	/* Number of pins in print-head */
	_output_res_char,	/* Horizontal resolution in units per character */
	_output_res_line,	/* Vertical resolution in units per line */
	_output_res_horz_inch,	/* Horizontal resolution in units per inch */
	_output_res_vert_inch,	/* Vertical resolution in units per inch */
	_print_rate,		/* Print rate in characters per second */
	_wide_char_size,	/* Character step size when in double wide mode */
	_buttons,		/* Number of buttons on the mouse */
	_bit_image_entwining,	/* Number of passes for each bit-image row */
	_bit_image_type,	/* Type of bit-image device */
	Sentinel;		/* End of nums. DO NOT MOVE! */

struct _str_struct {
	struct strs strs;
	struct strs2 strs2;
	struct strs3 strs3;
	struct strs4 strs4;

#define	NO_TERMINAL		2
#define CORRUPTED		3
#define	ENTRY_TOO_LONG		4
#define	TERM_BAD_MALLOC		6
#define NOT_READABLE		7
#define TERMCAP_TOO_LONG        8
#define _VR2_COMPAT_CODE
struct _Vr2_Astrs {
	_s1,  _s2,  _s3,  _s4,  _s5,  _s6,  _s7,  _s8,  _s9,  _s10,
	_s11, _s12, _s13, _s14, _s15, _s16, _s17, _s18, _s19, _s20,
	_s21, _s22, _s23, _s24, _s25, _s26, _s27, _s28, _s29, _s30,
	_s31, _s32, _s33, _s34, _s35, _s36, _s37, _s38, _s39, _s40,
	_s41, _s42, _s43, _s44, _s45, _s46, _s47, _s48, _s49, _s50,
	_s51, _s52, _s53, _s54, _s55, _s56, _s57, _s58, _s59, _s60,
	_s61, _s62, _s63, _s64, _s65, _s66, _s67, _s68, _s69, _s70,
	_s71, _s72, _s73, _s74, _s75, _s76, _s77, _s78, _s79, _s80,
	_s81, _s82, _s83, _s84, _s85, _s86, _s87, _s88, _s89, _s90,
	_s91, _s92, _s93, _s94, _s95, _s96, _s97, _s98, _s99, _s100;

struct _Vr2_Bstrs {
	_s101, _s102, _s103, _s104, _s105, _s106, _s107, _s108, _s109, _s110,
	_s111, _s112, _s113, _s114, _s115, _s116, _s117, _s118, _s119, _s120,
	_s121, _s122, _s123, _s124, _s125, _s126, _s127, _s128, _s129, _s130,
	_s131, _s132, _s133, _s134, _s135, _s136, _s137, _s138, _s139, _s140,
	_s141, _s142, _s143, _s144, _s145;
#endif /* _VR2_COMPAT_CODE */

typedef struct {
	char *_sends;	/* Characters sent when key is pressed */
	short _keyval;	/* "char" we pass back to program */

typedef struct {
	short  foreground;   /* foreground color */
	short  background;   /* background color */
	bool   init;         /* TRUE if pair was initialized */
} _Color_pair;

typedef struct {
	short	r, g, b;
} _Color;

 * This definition for the term struct allows the boolean, number
 * and string information to grow in the future and still allow .o
 * compatibility.

#ifndef __Mbstate_t_
	#define __Mbstate_t_
	typedef short	Mbstate_t;  /* local mbstate_t as defined in wchar.h */

struct term {
	_b1,  _b2,  _b3,  _b4,  _b5,  _b6,  _b7,  _b8,  _b9,  _b10,
	_b11, _b12, _b13, _b14, _b15, _b16, _b17, _b18, _b19, _b20, _b21;
	_c1, _c2, _c3, _c4, _c5, _c6, _c7, _c8;
	struct _Vr2_Astrs _Vr2_Astrs;
	struct _Vr2_Bstrs _Vr2_Bstrs;
#endif /* _VR2_COMPAT_CODE */
	short Filedes;		/* file descriptor being written to */
	SGTTY Ottyb,		/* original state of the terminal */
	      Nttyb;		/* current state of the terminal */
	struct termcb new, old;	/* CB/UNIX virtual terminals */
#ifdef LTILDE
	int newlmode, oldlmode;	/* BSD tty driver */
	/* end of Vr2 structure */
	struct _bool_struct *_bools;
	struct _num_struct *_nums;
	struct _str_struct *_strs;
	char *_strtab;
	long timeout;		/* for BSD halfdelay mode */
	/* end of Vr3 structure */
	attr_t sgr_mode;		/* current phys. graphic rendition */
	attr_t sgr_faked;		/* attributes faked by vidputs */
	int    _delay;			/* timeout for inputs */
	int    _inputfd;		/* input file descriptor */
	int    _check_fd;		/* typeahead file descriptor */
	_KEY_MAP	**_keys,	/* key map */
			*internal_keys;	/* pointer to free key structures */
	short		_ksz,		/* size of keymap */
			_lastkey_ordered,/* where the last ordered key is */
			_lastmacro_ordered,/* where the last ordered macro is */
	bool				/* map of which chars start fn keys */
	bool		_fl_rawmode,	/* in cbreak(=1) or raw(=2) mode */
			fl_typeahdok,	/* ok to use typeahead */
			_cursorstate,	/* cursor: 0=invis, 1=norm, 2=vvis */
			_iwait;		/* true if input-pending */
	short		_regs[26];	/* tparm static registers */
#define INP_QSIZE	32
	int				/* a place to put stuff ungetch'ed */
	short		_ungotten;	/* # chars ungotten by ungetch() */
	char		_chars_on_queue; /* # chars on queue */
	cchar_t		*_acsmap;	/* map of alternate char set chars */
	char		*turn_on_seq[NUM_ATTRIBUTES];
	attr_t		bit_vector;
	char		*cursor_seq[3];
	char		_termname[15];
	char		*turn_off_seq[3];
	attr_t		check_turn_off;
    	_Color_pair	_cur_pair;
    	_Color_pair	*_pairs_tbl;
    	_Color		*_color_tbl;
	Mbstate_t	 shift_state;

typedef struct term TERMINAL;

/* allow old names for these capabilities */
#define beehive_glitch	no_esc_ctlc
#define teleray_glitch	dest_tabs_magic_smso

extern TERMINAL			*cur_term;
extern struct _bool_struct	*cur_bools;
extern struct _num_struct	*cur_nums;
extern struct _str_struct	*cur_strs;

#ifdef SINGLE
extern TERMINAL			_first_term;
extern struct _bool_struct	_frst_bools;
extern struct _num_struct	_frst_nums;
extern struct _str_struct	_frst_strs;

# define CUR			_first_term.
# define CURB			_frst_bools.
# define CURN			_frst_nums.
# define CURS			_frst_strs.
# define PROGTTY		_first_term.Nttyb
# define SHELLTTY		_first_term.Ottyb
# define CUR			cur_term->
# define CURB			cur_bools->
# define CURN			cur_nums->
# define CURS			cur_strs->
# define PROGTTY		(cur_term->Nttyb)
# define SHELLTTY		(cur_term->Ottyb)

#ifndef NOMACROS
#define set_curterm	setcurterm
#define del_curterm	delterm
#else   /* NOMACROS */

#if defined(__STDC__) || !defined(_NO_PROTO)
extern	TERMINAL	*set_curterm(TERMINAL *);
extern	int		del_curterm(TERMINAL *);
#else   /* __STDC__ */
extern	TERMINAL	*set_curterm();
extern	int		del_curterm();
#endif  /* __STDC__ */

#endif  /* NOMACROS */

extern	short	term_errno;

extern	char	term_parm_err[], *term_err_strings[], *Def_term,
		*boolnames[], *boolcodes[], *boolfnames[],
		*numnames[], *numcodes[], *numfnames[],
		*strnames[], *strcodes[], *strfnames[];

#if defined(__STDC__) || !defined(_NO_PROTO)   /* needed for tparm.c  */
extern	TERMINAL	*setcurterm(TERMINAL *);
extern  char    *tparm(char *instring, ...);
extern  char    *tparm(char *, long, long, long, long,  
                  long, long, long, long, long);       
#endif  /* _TPARM_COMPAT */

extern  char	*tgoto(const char *, int, int),
		*tgetstr(char *, char **),
		*tigetstr(char *),

extern	int	tgetent(char *, const char *), tgetflag(char *), tgetnum(char *),
        	tigetflag(char *), tigetnum(char *),
		tputs(const char *, int, int (*)(int)), putp(const char *);

extern	int	resetterm(void), fixterm(void), saveterm(void),
		restartterm(char *, int, int *), delterm(TERMINAL *);

extern	void	termerr(void), tinputfd(int);
#else  /* __STDC__ */
extern	TERMINAL	*setcurterm();
extern	char	*tparm(), *tgoto(), *tgetstr(), *tigetstr(),

extern	int	tgetent(), tgetflag(), tgetnum(), tigetflag(), tigetnum(),
		tputs(), putp();

extern	int	resetterm(), fixterm(), saveterm(),
		restartterm(), delterm();

extern	void	termerr(), tinputfd();
#endif /* __STDC__ */

#endif /* auto_left_margin */
#endif /* _TERM_H */

#else /* _AIX32_CURSES */

 * term3.h - this file is automatically made from caps and maketerm.ex.
 * Guard against multiple includes.

#ifndef _H_TERM
#define _H_TERM

#define auto_left_margin	CUR Auto_left_margin
#define auto_right_margin	CUR Auto_right_margin
#define beehive_glitch	CUR Beehive_glitch
#define ceol_standout_glitch	CUR Ceol_standout_glitch
#define eat_newline_glitch	CUR Eat_newline_glitch
#define erase_overstrike	CUR Erase_overstrike
#define generic_type	CUR Generic_type
#define hard_copy	CUR Hard_copy
#define has_meta_key	CUR Has_meta_key
#define has_status_line	CUR Has_status_line
#define insert_null_glitch	CUR Insert_null_glitch
#define memory_above	CUR Memory_above
#define memory_below	CUR Memory_below
#define move_insert_mode	CUR Move_insert_mode
#define move_standout_mode	CUR Move_standout_mode
#define over_strike	CUR Over_strike
#define status_line_esc_ok	CUR Status_line_esc_ok
#define teleray_glitch	CUR Teleray_glitch
#define tilde_glitch	CUR Tilde_glitch
#define transparent_underline	CUR Transparent_underline
#define xon_xoff	CUR Xon_xoff
#define columns	CUR Columns
#define init_tabs	CUR Init_tabs
#define lines	CUR Lines
#define lines_of_memory	CUR Lines_of_memory
#define magic_cookie_glitch	CUR Magic_cookie_glitch
#define padding_baud_rate	CUR Padding_baud_rate
#define virtual_terminal	CUR Virtual_terminal
#define width_status_line	CUR Width_status_line
#define back_tab	CUR strs.Back_tab
#define bell	CUR strs.Bell
#define carriage_return	CUR strs.Carriage_return
#define change_scroll_region	CUR strs.Change_scroll_region
#define clear_all_tabs	CUR strs.Clear_all_tabs
#define clear_screen	CUR strs.Clear_screen
#define clr_eol	CUR strs.Clr_eol
#define clr_eos	CUR strs.Clr_eos
#define column_address	CUR strs.Column_address
#define command_character	CUR strs.Command_character
#define cursor_address	CUR strs.Cursor_address
#define cursor_down	CUR strs.Cursor_down
#define cursor_home	CUR strs.Cursor_home
#define cursor_invisible	CUR strs.Cursor_invisible
#define cursor_left	CUR strs.Cursor_left
#define cursor_mem_address	CUR strs.Cursor_mem_address
#define cursor_normal	CUR strs.Cursor_normal
#define cursor_right	CUR strs.Cursor_right
#define cursor_to_ll	CUR strs.Cursor_to_ll
#define cursor_up	CUR strs.Cursor_up
#define cursor_visible	CUR strs.Cursor_visible
#define delete_character	CUR strs.Delete_character
#define delete_line	CUR strs.Delete_line
#define dis_status_line	CUR strs.Dis_status_line
#define down_half_line	CUR strs.Down_half_line
#define enter_alt_charset_mode	CUR strs.Enter_alt_charset_mode
#define enter_blink_mode	CUR strs.Enter_blink_mode
#define enter_bold_mode	CUR strs.Enter_bold_mode
#define enter_ca_mode	CUR strs.Enter_ca_mode
#define enter_delete_mode	CUR strs.Enter_delete_mode
#define enter_dim_mode	CUR strs.Enter_dim_mode
#define enter_insert_mode	CUR strs.Enter_insert_mode
#define enter_secure_mode	CUR strs.Enter_secure_mode
#define enter_protected_mode	CUR strs.Enter_protected_mode
#define enter_reverse_mode	CUR strs.Enter_reverse_mode
#define enter_standout_mode	CUR strs.Enter_standout_mode
#define enter_underline_mode	CUR strs.Enter_underline_mode
#define erase_chars	CUR strs.Erase_chars
#define exit_alt_charset_mode	CUR strs.Exit_alt_charset_mode
#define exit_attribute_mode	CUR strs.Exit_attribute_mode
#define exit_ca_mode	CUR strs.Exit_ca_mode
#define exit_delete_mode	CUR strs.Exit_delete_mode
#define exit_insert_mode	CUR strs.Exit_insert_mode
#define exit_standout_mode	CUR strs.Exit_standout_mode
#define exit_underline_mode	CUR strs.Exit_underline_mode
#define flash_screen	CUR strs.Flash_screen
#define form_feed	CUR strs.Form_feed
#define from_status_line	CUR strs.From_status_line
#define init_1string	CUR strs.Init_1string
#define init_2string	CUR strs.Init_2string
#define init_3string	CUR strs.Init_3string
#define init_file	CUR strs.Init_file
#define insert_character	CUR strs.Insert_character
#define insert_line	CUR strs.Insert_line
#define insert_padding	CUR strs.Insert_padding
#define key_backspace	CUR strs.Key_backspace
#define key_catab	CUR strs.Key_catab
#define key_clear	CUR strs.Key_clear
#define key_ctab	CUR strs.Key_ctab
#define key_dc	CUR strs.Key_dc
#define key_dl	CUR strs.Key_dl
#define key_down	CUR strs.Key_down
#define key_eic	CUR strs.Key_eic
#define key_eol	CUR strs.Key_eol
#define key_eos	CUR strs.Key_eos
#define key_f0	CUR strs.Key_f0
#define key_f1	CUR strs.Key_f1
#define key_f10	CUR strs.Key_f10
#define key_f2	CUR strs.Key_f2
#define key_f3	CUR strs.Key_f3
#define key_f4	CUR strs.Key_f4
#define key_f5	CUR strs.Key_f5
#define key_f6	CUR strs.Key_f6
#define key_f7	CUR strs.Key_f7
#define key_f8	CUR strs.Key_f8
#define key_f9	CUR strs.Key_f9
#define key_home	CUR strs.Key_home
#define key_ic	CUR strs.Key_ic
#define key_il	CUR strs.Key_il
#define key_left	CUR strs.Key_left
#define key_ll	CUR strs.Key_ll
#define key_npage	CUR strs.Key_npage
#define key_ppage	CUR strs.Key_ppage
#define key_right	CUR strs.Key_right
#define key_sf	CUR strs.Key_sf
#define key_sr	CUR strs.Key_sr
#define key_stab	CUR strs.Key_stab
#define key_up	CUR strs.Key_up
#define keypad_local	CUR strs.Keypad_local
#define keypad_xmit	CUR strs.Keypad_xmit
#define lab_f0	CUR strs.Lab_f0
#define lab_f1	CUR strs.Lab_f1
#define lab_f10	CUR strs.Lab_f10
#define lab_f2	CUR strs.Lab_f2
#define lab_f3	CUR strs.Lab_f3
#define lab_f4	CUR strs.Lab_f4
#define lab_f5	CUR strs.Lab_f5
#define lab_f6	CUR strs.Lab_f6
#define lab_f7	CUR strs.Lab_f7
#define lab_f8	CUR strs.Lab_f8
#define lab_f9	CUR strs2.Lab_f9
#define meta_off	CUR strs2.Meta_off
#define meta_on	CUR strs2.Meta_on
#define newline	CUR strs2.Newline
#define pad_char	CUR strs2.Pad_char
#define parm_dch	CUR strs2.Parm_dch
#define parm_delete_line	CUR strs2.Parm_delete_line
#define parm_down_cursor	CUR strs2.Parm_down_cursor
#define parm_ich	CUR strs2.Parm_ich
#define parm_index	CUR strs2.Parm_index
#define parm_insert_line	CUR strs2.Parm_insert_line
#define parm_left_cursor	CUR strs2.Parm_left_cursor
#define parm_right_cursor	CUR strs2.Parm_right_cursor
#define parm_rindex	CUR strs2.Parm_rindex
#define parm_up_cursor	CUR strs2.Parm_up_cursor
#define pkey_key	CUR strs2.Pkey_key
#define pkey_local	CUR strs2.Pkey_local
#define pkey_xmit	CUR strs2.Pkey_xmit
#define print_screen	CUR strs2.Print_screen
#define prtr_off	CUR strs2.Prtr_off
#define prtr_on	CUR strs2.Prtr_on
#define repeat_char	CUR strs2.Repeat_char
#define reset_1string	CUR strs2.Reset_1string
#define reset_2string	CUR strs2.Reset_2string
#define reset_3string	CUR strs2.Reset_3string
#define reset_file	CUR strs2.Reset_file
#define restore_cursor	CUR strs2.Restore_cursor
#define row_address	CUR strs2.Row_address
#define save_cursor	CUR strs2.Save_cursor
#define scroll_forward	CUR strs2.Scroll_forward
#define scroll_reverse	CUR strs2.Scroll_reverse
#define set_attributes	CUR strs2.Set_attributes
#define set_tab	CUR strs2.Set_tab
#define set_window	CUR strs2.Set_window
#define tab	CUR strs2.Tab
#define to_status_line	CUR strs2.To_status_line
#define underline_char	CUR strs2.Underline_char
#define up_half_line	CUR strs2.Up_half_line
#define init_prog	CUR strs2.Init_prog
#define key_a1	CUR strs2.Key_a1
#define key_a3	CUR strs2.Key_a3
#define key_b2	CUR strs2.Key_b2
#define key_c1	CUR strs2.Key_c1
#define key_c3	CUR strs2.Key_c3
#define prtr_non	CUR strs2.Prtr_non
#define box_chars_1	CUR strs2.Box_chars_1
#define box_chars_2	CUR strs2.Box_chars_2
#define box_attr_1	CUR strs2.Box_attr_1
#define box_attr_2	CUR strs2.Box_attr_2
#define color_bg_0	CUR strs2.Color_bg_0
#define color_bg_1	CUR strs2.Color_bg_1
#define color_bg_2	CUR strs2.Color_bg_2
#define color_bg_3	CUR strs2.Color_bg_3
#define color_bg_4	CUR strs2.Color_bg_4
#define color_bg_5	CUR strs2.Color_bg_5
#define color_bg_6	CUR strs2.Color_bg_6
#define color_bg_7	CUR strs2.Color_bg_7
#define color_fg_0	CUR strs2.Color_fg_0
#define color_fg_1	CUR strs2.Color_fg_1
#define color_fg_2	CUR strs2.Color_fg_2
#define color_fg_3	CUR strs2.Color_fg_3
#define color_fg_4	CUR strs2.Color_fg_4
#define color_fg_5	CUR strs2.Color_fg_5
#define color_fg_6	CUR strs2.Color_fg_6
#define color_fg_7	CUR strs2.Color_fg_7
#define font_0	CUR strs2.Font_0
#define font_1	CUR strs2.Font_1
#define font_2	CUR strs2.Font_2
#define font_3	CUR strs2.Font_3
#define font_4	CUR strs2.Font_4
#define font_5	CUR strs2.Font_5
#define font_6	CUR strs2.Font_6
#define font_7	CUR strs2.Font_7
#define key_back_tab	CUR strs2.Key_back_tab
#define key_do	CUR strs2.Key_do
#define key_command	CUR strs2.Key_command
#define key_command_pane	CUR strs2.Key_command_pane
#define key_end	CUR strs2.Key_end
#define key_help	CUR strs2.Key_help
#define key_newline	CUR strs2.Key_newline
#define key_next_pane	CUR strs2.Key_next_pane
#define key_prev_cmd	CUR strs2.Key_prev_cmd
#define key_prev_pane	CUR strs2.Key_prev_pane
#define key_quit	CUR strs2.Key_quit
#define key_select	CUR strs2.Key_select
#define key_scroll_left	CUR strs2.Key_scroll_left
#define key_scroll_right	CUR strs2.Key_scroll_right
#define key_tab	CUR strs2.Key_tab
#define key_smap_in1	CUR strs2.Key_smap_in1
#define key_smap_out1	CUR strs2.Key_smap_out1
#define key_smap_in2	CUR strs2.Key_smap_in2
#define key_smap_out2	CUR strs2.Key_smap_out2
#define key_smap_in3	CUR strs2.Key_smap_in3
#define key_smap_out3	CUR strs2.Key_smap_out3
#define key_smap_in4	CUR strs2.Key_smap_in4
#define key_smap_out4	CUR strs2.Key_smap_out4
#define key_smap_in5	CUR strs2.Key_smap_in5
#define key_smap_out5	CUR strs2.Key_smap_out5
#define appl_defined_str	CUR strs2.Appl_defined_str
#define key_smap_in6	CUR strs2.Key_smap_in6
#define key_smap_out6	CUR strs2.Key_smap_out6
#define key_smap_in7	CUR strs2.Key_smap_in7
#define key_smap_out7	CUR strs2.Key_smap_out7
#define key_smap_in8	CUR strs2.Key_smap_in8
#define key_smap_out8	CUR strs2.Key_smap_out8
#define key_smap_in9	CUR strs2.Key_smap_in9
#define key_smap_out9	CUR strs2.Key_smap_out9
#define key_sf1	CUR strs2.Key_sf1
#define key_sf2	CUR strs2.Key_sf2
#define key_sf3	CUR strs2.Key_sf3
#define key_sf4	CUR strs2.Key_sf4
#define key_sf5	CUR strs2.Key_sf5
#define key_sf6	CUR strs2.Key_sf6
#define key_sf7	CUR strs2.Key_sf7
#define key_sf8	CUR strs2.Key_sf8
#define key_sf9	CUR strs2.Key_sf9
#define key_sf10	CUR strs2.Key_sf10
#define key_f11	CUR strs2.Key_f11
#define key_f12	CUR strs2.Key_f12
#define key_f13	CUR strs2.Key_f13
#define key_f14	CUR strs2.Key_f14
#define key_f15	CUR strs2.Key_f15
#define key_f16	CUR strs2.Key_f16
#define key_f17	CUR strs2.Key_f17
#define key_f18	CUR strs2.Key_f18
#define key_f19	CUR strs2.Key_f19
#define key_f20	CUR strs2.Key_f20
#define key_f21	CUR strs2.Key_f21
#define key_f22	CUR strs2.Key_f22
#define key_f23	CUR strs2.Key_f23
#define key_f24	CUR strs2.Key_f24
#define key_f25	CUR strs2.Key_f25
#define key_f26	CUR strs2.Key_f26
#define key_f27	CUR strs2.Key_f27
#define key_f28	CUR strs2.Key_f28
#define key_f29	CUR strs2.Key_f29
#define key_f30	CUR strs2.Key_f30
#define key_f31	CUR strs2.Key_f31
#define key_f32	CUR strs2.Key_f32
#define key_f33	CUR strs2.Key_f33
#define key_f34	CUR strs2.Key_f34
#define key_f35	CUR strs2.Key_f35
#define key_f36	CUR strs2.Key_f36
#define key_f37	CUR strs2.Key_f37
#define key_f38	CUR strs2.Key_f38
#define key_f39	CUR strs2.Key_f39
#define key_f40	CUR strs2.Key_f40
#define key_f41	CUR strs2.Key_f41
#define key_f42	CUR strs2.Key_f42
#define key_f43	CUR strs2.Key_f43
#define key_f44	CUR strs2.Key_f44
#define key_f45	CUR strs2.Key_f45
#define key_f46	CUR strs2.Key_f46
#define key_f47	CUR strs2.Key_f47
#define key_f48	CUR strs2.Key_f48
#define key_f49	CUR strs2.Key_f49
#define key_f50	CUR strs2.Key_f50
#define key_f51	CUR strs2.Key_f51
#define key_f52	CUR strs2.Key_f52
#define key_f53	CUR strs2.Key_f53
#define key_f54	CUR strs2.Key_f54
#define key_f55	CUR strs2.Key_f55
#define key_f56	CUR strs2.Key_f56
#define key_f57	CUR strs2.Key_f57
#define key_f58	CUR strs2.Key_f58
#define key_f59	CUR strs2.Key_f59
#define key_f60	CUR strs2.Key_f60
#define key_f61	CUR strs2.Key_f61
#define key_f62	CUR strs2.Key_f62
#define key_f63	CUR strs2.Key_f63
#define key_action	CUR strs2.Key_action
#define enter_topline_mode	CUR strs2.Enter_topline_mode
#define enter_bottom_mode	CUR strs2.Enter_bottom_mode
#define enter_rvert_mode	CUR strs2.Enter_rvert_mode
#define enter_lvert_mode	CUR strs2.Enter_lvert_mode

typedef char *charptr ;

struct strs {
	Back_tab,	/* Back tab (P)*/
	Bell,	/* Audible signal (bell) (P)*/
	Carriage_return,	/* Carriage return (P*)*/
	Change_scroll_region,	/* change to lines #1 thru #2 (vt100) (PG)*/
	Clear_all_tabs,	/* Clear all tab stops. (P)*/
	Clear_screen,	/* Clear screen (P*)*/
	Clr_eol,	/* Clear to end of line (P)*/
	Clr_eos,	/* Clear to end of display (P*)*/
	Column_address,	/* Set cursor column (PG)*/
	Command_character,	/* Term. settable cmd char in prototype*/
	Cursor_address,	/* Cursor motion to row #1 col #2 (PG)*/
	Cursor_down,	/* Down one line*/
	Cursor_home,	/* Home cursor (if no cup)*/
	Cursor_invisible,	/* Make cursor invisible*/
	Cursor_left,	/* Move cursor left one space.*/
	Cursor_mem_address,	/* Memory relative cursor addressing.*/
	Cursor_normal,	/* Make cursor appear normal (undo vs/vi)*/
	Cursor_right,	/* Non-destructive space (cursor right)*/
	Cursor_to_ll,	/* Last line, first column (if no cup)*/
	Cursor_up,	/* Upline (cursor up)*/
	Cursor_visible,	/* Make cursor very visible*/
	Delete_character,	/* Delete character (P*)*/
	Delete_line,	/* Delete line (P*)*/
	Dis_status_line,	/* Disable status line*/
	Down_half_line,	/* Half-line down (forward 1/2 linefeed)*/
	Enter_alt_charset_mode,	/* Start alternate character set (P)*/
	Enter_blink_mode,	/* Turn on blinking*/
	Enter_bold_mode,	/* Turn on bold (extra bright) mode*/
	Enter_ca_mode,	/* String to begin programs that use cup*/
	Enter_delete_mode,	/* Delete mode (enter)*/
	Enter_dim_mode,	/* Turn on half-bright mode*/
	Enter_insert_mode,	/* Insert mode (enter);*/
	Enter_secure_mode,	/* Turn on blank mode (chars invisible)*/
	Enter_protected_mode,	/* Turn on protected mode*/
	Enter_reverse_mode,	/* Turn on reverse video mode*/
	Enter_standout_mode,	/* Begin stand out mode*/
	Enter_underline_mode,	/* Start underscore mode*/
	Erase_chars,	/* Erase #1 characters (PG)*/
	Exit_alt_charset_mode,	/* End alternate character set (P)*/
	Exit_attribute_mode,	/* Turn off all attributes*/
	Exit_ca_mode,	/* String to end programs that use cup*/
	Exit_delete_mode,	/* End delete mode*/
	Exit_insert_mode,	/* End insert mode;*/
	Exit_standout_mode,	/* End stand out mode*/
	Exit_underline_mode,	/* End underscore mode*/
	Flash_screen,	/* Visible bell (may not move cursor)*/
	Form_feed,	/* Hardcopy terminal page eject (P*)*/
	From_status_line,	/* Return from status line*/
	Init_1string,	/* Terminal initialization string*/
	Init_2string,	/* Terminal initialization string*/
	Init_3string,	/* Terminal initialization string*/
	Init_file,	/* Name of file containing is*/
	Insert_character,	/* Insert character (P)*/
	Insert_line,	/* Add new blank line (P*)*/
	Insert_padding,	/* Insert pad after character inserted (P*)*/
	Key_backspace,	/* Sent by backspace key*/
	Key_catab,	/* Sent by clear-all-tabs key.*/
	Key_clear,	/* Sent by clear screen or erase key.*/
	Key_ctab,	/* Sent by clear-tab key*/
	Key_dc,	/* Sent by delete character key.*/
	Key_dl,	/* Sent by delete line key.*/
	Key_down,	/* Sent by terminal down arrow key*/
	Key_eic,	/* Sent by rmir or smir in insert mode.*/
	Key_eol,	/* Sent by clear-to-end-of-line key.*/
	Key_eos,	/* Sent by clear-to-end-of-screen key.*/
	Key_f0,	/* Sent by function key f0.*/
	Key_f1,	/* Sent by function key f1.*/
	Key_f10,	/* Sent by function key f10.*/
	Key_f2,	/* Sent by function key f2.*/
	Key_f3,	/* Sent by function key f3.*/
	Key_f4,	/* Sent by function key f4.*/
	Key_f5,	/* Sent by function key f5.*/
	Key_f6,	/* Sent by function key f6.*/
	Key_f7,	/* Sent by function key f7.*/
	Key_f8,	/* Sent by function key f8.*/
	Key_f9,	/* Sent by function key f9.*/
	Key_home,	/* Sent by home key.*/
	Key_ic,	/* Sent by ins char/enter ins mode key.*/
	Key_il,	/* Sent by insert line.*/
	Key_left,	/* Sent by terminal left arrow key*/
	Key_ll,	/* Sent by home-down key*/
	Key_npage,	/* Sent by next-page key*/
	Key_ppage,	/* Sent by previous-page key*/
	Key_right,	/* Sent by terminal right arrow key*/
	Key_sf,	/* Sent by scroll-forward/down key*/
	Key_sr,	/* Sent by scroll-backward/up key*/
	Key_stab,	/* Sent by set-tab key*/
	Key_up,	/* Sent by terminal up arrow key*/
	Keypad_local,	/* Out of "keypad transmit" mode*/
	Keypad_xmit,	/* Put terminal in "keypad transmit" mode*/
	Lab_f0,	/* Labels on function key f0 if not f0*/
	Lab_f1,	/* Labels on function key f1 if not f1*/
	Lab_f10,	/* Labels on function key f10 if not f10*/
	Lab_f2,	/* Labels on function key f2 if not f2*/
	Lab_f3,	/* Labels on function key f3 if not f3*/
	Lab_f4,	/* Labels on function key f4 if not f4*/
	Lab_f5,	/* Labels on function key f5 if not f5*/
	Lab_f6,	/* Labels on function key f6 if not f6*/
	Lab_f7,	/* Labels on function key f7 if not f7*/
	Lab_f8;	/* Labels on function key f8 if not f8*/
struct strs2 {
	Lab_f9,	/* Labels on function key f9 if not f9*/
	Meta_off,	/* Turn off "meta mode"*/
	Meta_on,	/* Turn on "meta mode" (8th bit)*/
	Newline,	/* Newline (behaves like cr followed by lf)*/
	Pad_char,	/* Pad character (rather than null)*/
	Parm_dch,	/* Delete #1 chars (PG*)*/
	Parm_delete_line,	/* Delete #1 lines (PG*)*/
	Parm_down_cursor,	/* Move cursor down #1 lines. (PG*)*/
	Parm_ich,	/* Insert #1 blank chars (PG*)*/
	Parm_index,	/* Scroll forward #1 lines. (PG)*/
	Parm_insert_line,	/* Add #1 new blank lines (PG*)*/
	Parm_left_cursor,	/* Move cursor left #1 spaces (PG)*/
	Parm_right_cursor,	/* Move cursor right #1 spaces. (PG*)*/
	Parm_rindex,	/* Scroll backward #1 lines. (PG)*/
	Parm_up_cursor,	/* Move cursor up #1 lines. (PG*)*/
	Pkey_key,	/* Prog funct key #1 to type string #2*/
	Pkey_local,	/* Prog funct key #1 to execute string #2*/
	Pkey_xmit,	/* Prog funct key #1 to xmit string #2*/
	Print_screen,	/* Print contents of the screen*/
	Prtr_off,	/* Turn off the printer*/
	Prtr_on,	/* Turn on the printer*/
	Repeat_char,	/* Repeat char #1 #2 times.  (PG*)*/
	Reset_1string,	/* Reset terminal completely to sane modes.*/
	Reset_2string,	/* Reset terminal completely to sane modes.*/
	Reset_3string,	/* Reset terminal completely to sane modes.*/
	Reset_file,	/* Name of file containing reset string.*/
	Restore_cursor,	/* Restore cursor to position of last sc.*/
	Row_address,	/* Like hpa but sets row. (PG)*/
	Save_cursor,	/* Save cursor position. (P)*/
	Scroll_forward,	/* Scroll text up (P)*/
	Scroll_reverse,	/* Scroll text down (P)*/
	Set_attributes,	/* Define the video attributes (PG9)*/
	Set_tab,	/* Set a tab in all rows, current column.*/
	Set_window,	/* Current window is lines #1-#2 cols #3-#4*/
	Tab,	/* Tab to next 8 space hardware tab stop.*/
	To_status_line,	/* Go to status line*/
	Underline_char,	/* Underscore one char and move past it*/
	Up_half_line,	/* Half-line up (reverse 1/2 linefeed)*/
	Init_prog,	/* Path name of program for init.*/
	Key_a1,	/* Upper left of keypad*/
	Key_a3,	/* Upper right of keypad*/
	Key_b2,	/* Center of keypad*/
	Key_c1,	/* Lower left of keypad*/
	Key_c3,	/* Lower right of keypad*/
	Prtr_non,	/* Turn on the printer for #1 bytes.*/
	Box_chars_1,	/* Box characters primary set*/
	Box_chars_2,	/* Box characters alternate set*/
	Box_attr_1,	/* Attributes for box_chars_1*/
	Box_attr_2,	/* Attributes for box_chars_2*/
	Color_bg_0,	/* Background color 0 black*/
	Color_bg_1,	/* Background color 1 red*/
	Color_bg_2,	/* Background color 2 green*/
	Color_bg_3,	/* Background color 3 brown*/
	Color_bg_4,	/* Background color 4 blue*/
	Color_bg_5,	/* Background color 5 magenta*/
	Color_bg_6,	/* Background color 6 cyan*/
	Color_bg_7,	/* Background color 7 white*/
	Color_fg_0,	/* Foreground color 0 white*/
	Color_fg_1,	/* Foreground color 1 red*/
	Color_fg_2,	/* Foreground color 2 green*/
	Color_fg_3,	/* Foreground color 3 brown*/
	Color_fg_4,	/* Foreground color 4 blue*/
	Color_fg_5,	/* Foreground color 5 magenta*/
	Color_fg_6,	/* Foreground color 6 cyan*/
	Color_fg_7,	/* Foreground color 7 black*/
	Font_0,	/* Select font 0*/
	Font_1,	/* Select font 1*/
	Font_2,	/* Select font 2*/
	Font_3,	/* Select font 3*/
	Font_4,	/* Select font 4*/
	Font_5,	/* Select font 5*/
	Font_6,	/* Select font 6*/
	Font_7,	/* Select font 7*/
	Key_back_tab,	/* Backtab key*/
	Key_do,	/* Do request key*/
	Key_command,	/* Command request key*/
	Key_command_pane,	/* Command pane key*/
	Key_end,	/* End key*/
	Key_help,	/* Help key*/
	Key_newline,	/* Newline key*/
	Key_next_pane,	/* Next pane key*/
	Key_prev_cmd,	/* Previous command key*/
	Key_prev_pane,	/* Previous pane key*/
	Key_quit,	/* Quit key*/
	Key_select,	/* Select key*/
	Key_scroll_left,	/* Scroll left*/
	Key_scroll_right,	/* Scroll right*/
	Key_tab,	/* Tab key*/
	Key_smap_in1,	/* input for special mapped key 1*/
	Key_smap_out1,	/* output for mapped key 1*/
	Key_smap_in2,	/* input for special mapped key 2*/
	Key_smap_out2,	/* output for mapped key 2*/
	Key_smap_in3,	/* input for special mapped key 3*/
	Key_smap_out3,	/* output for mapped key 3*/
	Key_smap_in4,	/* input for special mapped key 4*/
	Key_smap_out4,	/* output for mapped key 4*/
	Key_smap_in5,	/* input for special mapped key 5*/
	Key_smap_out5,	/* output for mapped key 5*/
	Appl_defined_str,	/* Application defined terminal string*/
	Key_smap_in6,	/* input for special mapped key 6*/
	Key_smap_out6,	/* output for mapped key 6*/
	Key_smap_in7,	/* input for special mapped key 7*/
	Key_smap_out7,	/* output for mapped key 7*/
	Key_smap_in8,	/* input for special mapped key 8*/
	Key_smap_out8,	/* output for mapped key 8*/
	Key_smap_in9,	/* input for special mapped key 9*/
	Key_smap_out9,	/* output for mapped key 9*/
	Key_sf1,	/* Special function key 1*/
	Key_sf2,	/* Special function key 2*/
	Key_sf3,	/* Special function key 3*/
	Key_sf4,	/* Special function key 4*/
	Key_sf5,	/* Special function key 5*/
	Key_sf6,	/* Special function key 6*/
	Key_sf7,	/* Special function key 7*/
	Key_sf8,	/* Special function key 8*/
	Key_sf9,	/* Special function key 9*/
	Key_sf10,	/* Special function key 10*/
	Key_f11,	/* Sent by function key f11.*/
	Key_f12,	/* Sent by function key f12.*/
	Key_f13,	/* Sent by function key f13.*/
	Key_f14,	/* Sent by function key f14.*/
	Key_f15,	/* Sent by function key f15.*/
	Key_f16,	/* Sent by function key f16.*/
	Key_f17,	/* Sent by function key f17.*/
	Key_f18,	/* Sent by function key f18.*/
	Key_f19,	/* Sent by function key f19.*/
	Key_f20,	/* Sent by function key f20.*/
	Key_f21,	/* Sent by function key f21.*/
	Key_f22,	/* Sent by function key f22.*/
	Key_f23,	/* Sent by function key f23.*/
	Key_f24,	/* Sent by function key f24.*/
	Key_f25,	/* Sent by function key f25.*/
	Key_f26,	/* Sent by function key f26.*/
	Key_f27,	/* Sent by function key f27.*/
	Key_f28,	/* Sent by function key f28.*/
	Key_f29,	/* Sent by function key f29.*/
	Key_f30,	/* Sent by function key f30.*/
	Key_f31,	/* Sent by function key f31.*/
	Key_f32,	/* Sent by function key f32.*/
	Key_f33,	/* Sent by function key f33.*/
	Key_f34,	/* Sent by function key f34.*/
	Key_f35,	/* Sent by function key f35.*/
	Key_f36,	/* Sent by function key f36.*/
	Key_f37,	/* Sent by function key f37.*/
	Key_f38,	/* Sent by function key f38.*/
	Key_f39,	/* Sent by function key f39.*/
	Key_f40,	/* Sent by function key f40.*/
	Key_f41,	/* Sent by function key f41.*/
	Key_f42,	/* Sent by function key f42.*/
	Key_f43,	/* Sent by function key f43.*/
	Key_f44,	/* Sent by function key f44.*/
	Key_f45,	/* Sent by function key f45.*/
	Key_f46,	/* Sent by function key f46.*/
	Key_f47,	/* Sent by function key f47.*/
	Key_f48,	/* Sent by function key f48.*/
	Key_f49,	/* Sent by function key f49.*/
	Key_f50,	/* Sent by function key f50.*/
	Key_f51,	/* Sent by function key f51.*/
	Key_f52,	/* Sent by function key f52.*/
	Key_f53,	/* Sent by function key f53.*/
	Key_f54,	/* Sent by function key f54.*/
	Key_f55,	/* Sent by function key f55.*/
	Key_f56,	/* Sent by function key f56.*/
	Key_f57,	/* Sent by function key f57.*/
	Key_f58,	/* Sent by function key f58.*/
	Key_f59,	/* Sent by function key f59.*/
	Key_f60,	/* Sent by function key f60.*/
	Key_f61,	/* Sent by function key f61.*/
	Key_f62,	/* Sent by function key f62.*/
	Key_f63,	/* Sent by function key f63.*/
	Key_action,	/* Sent by the action key.*/
	Enter_topline_mode,	/* Start topline mode.*/
	Enter_bottom_mode,	/* Start bottom mode.*/
	Enter_rvert_mode,	/* Start right vertical line mode.*/
	Enter_lvert_mode;	/* Start left vertical line mode.*/
} ;

struct term {
	Auto_left_margin,	/* cub1 wraps from column 0 to last column*/
	Auto_right_margin,	/* Terminal has automatic margins*/
	Beehive_glitch,	/* Beehive (f1=escape, f2=ctrl C)*/
	Ceol_standout_glitch,	/* Standout not erased by overwriting (hp)*/
	Eat_newline_glitch,	/* newline ignored after 80 cols (Concept)*/
	Erase_overstrike,	/* Can erase overstrikes with a blank*/
	Generic_type,	/* Generic line type (e.g. dialup, switch).*/
	Hard_copy,	/* Hardcopy terminal*/
	Has_meta_key,	/* Has a meta key (shift, sets parity bit)*/
	Has_status_line,	/* Has extra "status line"*/
	Insert_null_glitch,	/* Insert mode distinguishes nulls*/
	Memory_above,	/* Display may be retained above the screen*/
	Memory_below,	/* Display may be retained below the screen*/
	Move_insert_mode,	/* Safe to move while in insert mode*/
	Move_standout_mode,	/* Safe to move in standout modes*/
	Over_strike,	/* Terminal overstrikes*/
	Status_line_esc_ok,	/* Escape can be used on the status line*/
	Teleray_glitch,	/* Tabs destructive, magic so char (t1061)*/
	Tilde_glitch,	/* Hazeltine; can't print ~'s*/
	Transparent_underline,	/* underline character overstrikes*/
	Xon_xoff;	/* Terminal uses xon/xoff handshaking*/
	Columns,	/* Number of columns in a line*/
	Init_tabs,	/* Tabs initially every # spaces.*/
	Lines,	/* Number of lines on screen or page*/
	Lines_of_memory,	/* Lines of memory if > lines.  0 => varies*/
	Magic_cookie_glitch,	/* Number blank chars left by smso or rmso*/
	Padding_baud_rate,	/* Lowest baud rate where padding needed*/
	Virtual_terminal,	/* Virtual terminal number (CB/Unix)*/
	Width_status_line;	/* # columns in status line*/

	struct strs strs;
	struct strs2 strs2;
	short Filedes;		/* file descriptor being written to */
	SGTTY Ottyb,		/* original state of the terminal */
	      Nttyb;		/* current state of the terminal */
extern struct term *cur_term;

#ifdef SINGLE
extern struct term _first_term;
# define CUR	_first_term.
# define CUR	cur_term->

#endif /* _H_TERM */

#endif /* _AIX32_CURSES */
 * termcap.c - termcap manipulation through curses
 * This file is part of zsh, the Z shell.
 * Copyright (c) 1992-1997 Paul Falstad
 * All rights reserved.
 * Permission is hereby granted, without written agreement and without
 * license or royalty fees, to use, copy, modify, and distribute this
 * software and to distribute modified versions of this software for any
 * purpose, provided that the above copyright notice and the following
 * two paragraphs appear in all copies of this software.
 * In no event shall Paul Falstad or the Zsh Development Group be liable
 * to any party for direct, indirect, special, incidental, or consequential
 * damages arising out of the use of this software and its documentation,
 * even if Paul Falstad and the Zsh Development Group have been advised of
 * the possibility of such damage.
 * Paul Falstad and the Zsh Development Group specifically disclaim any
 * warranties, including, but not limited to, the implied warranties of
 * merchantability and fitness for a particular purpose.  The software
 * provided hereunder is on an "as is" basis, and Paul Falstad and the
 * Zsh Development Group have no obligation to provide maintenance,
 * support, updates, enhancements, or modifications.

 * We need to include the zsh headers later to avoid clashes with
 * the definitions on some systems, however we need the configuration
 * file to decide whether we should avoid curses.h, which clashes
 * with several zsh constants on some systems (e.g. SunOS 4).
#include "../../config.h"

# if defined(HAVE_CURSES_H) && defined(HAVE_TERM_H)
#  define USES_TERM_H 1
# else
#   define USES_TERMCAP_H 1
#  endif
# endif

#include "termcap.mdh"
#include "termcap.pro"

static char termcap_nam[] = "termcap";

# ifdef USES_TERM_H
#  ifdef HAVE_TERMIO_H
#   include <termio.h>
#  endif
#   include <curses.h>
#  endif
#  include <term.h>
# else
#   include <termcap.h>
#  endif
# endif

static Param termcap_pm;

static char *boolcodes[] = {
    "bw", "am", "ut", "cc", "xs", "YA", "YF", "YB", "xt", "xn", "eo",
    "gn", "hc", "HC", "km", "YC", "hs", "hl", "in", "YG", "da", "db",
    "mi", "ms", "nx", "xb", "NP", "ND", "NR", "os", "5i", "YD", "YE",
    "es", "hz", "ul", "xo", NULL};

static int
ztgetflag(char *s)
    char **b;

    /* ncurses can tell if an existing boolean capability is *
     * off, but other curses variants can't, so we fudge it. *
     * This feature of ncurses appears to have gone away as  *
     * of NCURSES_MAJOR_VERSION == 5, so don't rely on it.   */
    switch (tgetflag(s)) {
    case -1:
    case 0:
	for (b = (char **)boolcodes; *b; ++b)
	    if (s[0] == (*b)[0] && s[1] == (*b)[1])
		return 0;
	return 1;
    return -1;

/* echotc: output a termcap */

static int
bin_echotc(char *name, char **argv, char *ops, int func)
    char *s, buf[2048], *t, *u;
    int num, argct;

    s = *argv++;
    if (termflags & TERM_BAD)
	return 1;
    if ((termflags & TERM_UNKNOWN) && (isset(INTERACTIVE) || !init_term()))
	return 1;
    /* if the specified termcap has a numeric value, display it */
    if ((num = tgetnum(s)) != -1) {
	printf("%d\n", num);
	return 0;
    /* if the specified termcap is boolean, and set, say so  */
    switch (ztgetflag(s)) {
    case -1:
    case 0:
	return 0;
	return 0;
    /* get a string-type capability */
    u = buf;
    t = tgetstr(s, &u);
    if (t == (char *)-1 || !t || !*t) {
	/* capability doesn't exist, or (if boolean) is off */
	zwarnnam(name, "no such capability: %s", s, 0);
	return 1;
    /* count the number of arguments required */
    for (argct = 0, u = t; *u; u++)
	if (*u == '%') {
	    if (u++, (*u == 'd' || *u == '2' || *u == '3' || *u == '.' ||
		      *u == '+'))
    /* check that the number of arguments provided is correct */
    if (arrlen(argv) != argct) {
	zwarnnam(name, (arrlen(argv) < argct) ? "not enough arguments" :
		 "too many arguments", NULL, 0);
	return 1;
    /* output string, through the proper termcap functions */
    if (!argct)
	tputs(t, 1, putraw);
    else {
	num = (argv[1]) ? atoi(argv[1]) : atoi(*argv);
	tputs(tgoto(t, atoi(*argv), num), num, putraw);
    return 0;

#else /* ! HAVE_TGETENT */

#define bin_echotc bin_notavail

#endif /* HAVE_TGETENT */

static struct builtin bintab[] = {
    BUILTIN("echotc", 0, bin_echotc, 1, -1, 0, NULL, NULL),


/* Empty dummy function for special hash parameters. */

static void

/* Create a simple special hash parameter. */

static Param
    Param pm;
    HashTable ht;


    if (!(pm = createparam(termcap_nam, PM_SPECIAL|PM_HIDE|PM_HIDEVAL|
	return NULL;

    pm->level = pm->old ? locallevel : 0;
    pm->gets.hfn = hashgetfn;
    pm->sets.hfn = hashsetfn;
    pm->unsetfn = stdunsetfn;
    pm->u.hash = ht = newhashtable(7, termcap_nam, NULL);

    ht->hash        = hasher;
    ht->emptytable  = (TableFunc) shempty;
    ht->filltable   = NULL;
    ht->addnode     = (AddNodeFunc) shempty;
    ht->getnode     = ht->getnode2 = gettermcap;
    ht->removenode  = (RemoveNodeFunc) shempty;
    ht->disablenode = NULL;
    ht->enablenode  = NULL;
    ht->freenode    = (FreeNodeFunc) shempty;
    ht->printnode   = printparamnode;
    ht->scantab     = scantermcap;

    return (termcap_pm = pm);

static HashNode
gettermcap(HashTable ht, char *name)
    int len, num;
    char *tcstr, buf[2048], *u;
    Param pm = NULL;

    /* This depends on the termcap stuff in init.c */
    if (termflags & TERM_BAD)
	return NULL;
    if ((termflags & TERM_UNKNOWN) && (isset(INTERACTIVE) || !init_term()))
	return NULL;

    unmetafy(name, &len);

    pm = (Param) zhalloc(sizeof(struct param));
    pm->nam = dupstring(name);
    pm->flags = PM_READONLY;
    pm->sets.cfn = NULL;
    pm->gets.cfn = strgetfn;
    pm->sets.ifn = NULL;
    pm->gets.ifn = intgetfn;
    pm->unsetfn = NULL;
    pm->ct = 0;
    pm->env = NULL;
    pm->ename = NULL;
    pm->old = NULL;
    pm->level = 0;
    u = buf;

    /* logic in the following cascade copied from echotc, above */

    if ((num = tgetnum(name)) != -1) {
	pm->u.val = num;
	pm->flags |= PM_INTEGER;
	return (HashNode) pm;
    switch (ztgetflag(name)) {
    case -1:
    case 0:
	pm->u.str = dupstring("no");
	pm->flags |= PM_SCALAR;
	return (HashNode) pm;
	pm->u.str = dupstring("yes");
	pm->flags |= PM_SCALAR;
	return (HashNode) pm;
    if ((tcstr = tgetstr(name, &u)) != NULL && tcstr != (char *)-1)
	pm->u.str = dupstring(tcstr);
	pm->flags |= PM_SCALAR;
	/* zwarn("no such capability: %s", name, 0); */
	pm->u.str = dupstring("");
	pm->flags |= PM_UNSET;
    return (HashNode) pm;

static void
scantermcap(HashTable ht, ScanFunc func, int flags)
    Param pm = NULL;
    int num;
    char **capcode, *tcstr, buf[2048], *u;

    static char *numcodes[] = {
	"co", "it", "lh", "lw", "li", "lm", "sg", "ma", "Co", "pa", "MW",
	"NC", "Nl", "pb", "vt", "ws", "Yo", "Yp", "Ya", "BT", "Yc", "Yb",
	"Yd", "Ye", "Yf", "Yg", "Yh", "Yi", "Yk", "Yj", "Yl", "Ym", "Yn",

    static char *strcodes[] = {
	"ac", "bt", "bl", "cr", "ZA", "ZB", "ZC", "ZD", "cs", "rP", "ct",
	"MC", "cl", "cb", "ce", "cd", "ch", "CC", "CW", "cm", "do", "ho",
	"vi", "le", "CM", "ve", "nd", "ll", "up", "vs", "ZE", "dc", "dl",
	"DI", "ds", "DK", "hd", "eA", "as", "SA", "mb", "md", "ti", "dm",
	"mh", "ZF", "ZG", "im", "ZH", "ZI", "ZJ", "ZK", "ZL", "mp", "mr",
	"mk", "ZM", "so", "ZN", "ZO", "us", "ZP", "SX", "ec", "ae", "RA",
	"me", "te", "ed", "ZQ", "ei", "ZR", "ZS", "ZT", "ZU", "se", "ZV",
	"ZW", "ue", "ZX", "RX", "PA", "fh", "vb", "ff", "fs", "WG", "HU",
	"i1", "is", "i3", "if", "iP", "Ic", "Ip", "ic", "al", "ip", "K1",
	"K3", "K2", "kb", "@1", "kB", "K4", "K5", "@2", "ka", "kC", "@3",
	"@4", "@5", "@6", "kt", "kD", "kL", "kd", "kM", "@7", "@8", "kE",
	"kS", "@9", "k0", "k1", "k;", "F1", "F2", "F3", "F4", "F5", "F6",
	"F7", "F8", "F9", "k2", "FA", "FB", "FC", "FD", "FE", "FF", "FG",
	"FH", "FI", "FJ", "k3", "FK", "FL", "FM", "FN", "FO", "FP", "FQ",
	"FR", "FS", "FT", "k4", "FU", "FV", "FW", "FX", "FY", "FZ", "Fa",
	"Fb", "Fc", "Fd", "k5", "Fe", "Ff", "Fg", "Fh", "Fi", "Fj", "Fk",
	"Fl", "Fm", "Fn", "k6", "Fo", "Fp", "Fq", "Fr", "k7", "k8", "k9",
	"@0", "%1", "kh", "kI", "kA", "kl", "kH", "%2", "%3", "%4", "%5",
	"kN", "%6", "%7", "kP", "%8", "%9", "%0", "&1", "&2", "&3", "&4",
	"&5", "kr", "&6", "&9", "&0", "*1", "*2", "*3", "*4", "*5", "*6",
	"*7", "*8", "*9", "kF", "*0", "#1", "#2", "#3", "#4", "%a", "%b",
	"%c", "%d", "%e", "%f", "kR", "%g", "%h", "%i", "%j", "!1", "!2",
	"kT", "!3", "&7", "&8", "ku", "ke", "ks", "l0", "l1", "la", "l2",
	"l3", "l4", "l5", "l6", "l7", "l8", "l9", "Lf", "LF", "LO", "mo",
	"mm", "ZY", "ZZ", "Za", "Zb", "Zc", "Zd", "nw", "Ze", "oc", "op",
	"pc", "DC", "DL", "DO", "Zf", "IC", "SF", "AL", "LE", "Zg", "RI",
	"Zh", "SR", "UP", "Zi", "pk", "pl", "px", "pn", "ps", "pO", "pf",
	"po", "PU", "QD", "RC", "rp", "RF", "r1", "r2", "r3", "rf", "rc",
	"cv", "sc", "sf", "sr", "Zj", "sa", "Sb", "Zk", "Zl", "SC", "sp",
	"Sf", "ML", "Zm", "MR", "Zn", "st", "Zo", "Zp", "wi", "Zq", "Zr",
	"Zs", "Zt", "Zu", "Zv", "ta", "Zw", "ts", "TO", "uc", "hu", "u0",
	"u1", "u2", "u3", "u4", "u5", "u6", "u7", "u8", "u9", "WA", "XF",
	"XN", "Zx", "S8", "Yv", "Zz", "Xy", "Zy", "ci", "Yw", "Yx", "dv",
	"S1", "Yy", "S2", "S4", "S3", "S5", "Gm", "Km", "Mi", "S6", "xl",
	"RQ", "S7", "s0", "s1", "s2", "s3", "AB", "AF", "Yz", "ML", "YZ",
	"MT", "Xh", "Xl", "Xo", "Xr", "Xt", "Xv", "sA", "sL", NULL};

    pm = (Param) zhalloc(sizeof(struct param));
    pm->sets.cfn = NULL;
    pm->gets.cfn = strgetfn;
    pm->sets.ifn = NULL;
    pm->gets.ifn = intgetfn;
    pm->unsetfn = NULL;
    pm->ct = 0;
    pm->env = NULL;
    pm->ename = NULL;
    pm->old = NULL;
    u = buf;

    pm->flags = PM_READONLY | PM_SCALAR;
    for (capcode = (char **)boolcodes; *capcode; capcode++) {
	if ((num = ztgetflag(*capcode)) != -1) {
	    pm->u.str = num ? dupstring("yes") : dupstring("no");
	    pm->nam = dupstring(*capcode);
	    func((HashNode) pm, flags);

    pm->flags = PM_READONLY | PM_INTEGER;
    for (capcode = (char **)numcodes; *capcode; capcode++) {
	if ((num = tgetnum(*capcode)) != -1) {
	    pm->u.val = num;
	    pm->nam = dupstring(*capcode);
	    func((HashNode) pm, flags);

    pm->flags = PM_READONLY | PM_SCALAR;
    for (capcode = (char **)strcodes; *capcode; capcode++) {
	if ((tcstr = (char *)tgetstr(*capcode,&u)) != NULL &&
	    tcstr != (char *)-1) {
	    pm->u.str = dupstring(tcstr);
	    pm->nam = dupstring(*capcode);
	    func((HashNode) pm, flags);

#endif /* HAVE_TGETENT */

setup_(Module m)
    return 0;

boot_(Module m)
    setupterm((char *)0, 1, (int *)0);
# endif

    if (!createtchash())
    	return 1;
    return  !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));

cleanup_(Module m)
    Param pm;

    if ((pm = (Param) paramtab->getnode(paramtab, termcap_nam)) &&
	pm == termcap_pm) {
	pm->flags &= ~PM_READONLY;
	unsetparam_pm(pm, 0, 1);
    deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
    return 0;

finish_(Module m)
    return 0;

Messages sorted by: Reverse Date, Date, Thread, Author