gttype (2) --- return the user's terminal type 03/24/82 _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n integer function gttype (ttype) character ttype (MAXTERMTYPE) Library: vswtlb (standard Subsystem library) _F_u_n_c_t_i_o_n 'Gttype' obtains the user's terminal type by calling routines to (1) look in the Subsystem common area, (2) look in the =termlist= file, and (3) ask the user. The terminal type is checked in each case, and if it is invalid, it is ignored. The function returns YES if the character string representing the terminal type is returned in 'ttype' and NO otherwise. Since 'gttype' will return NO only if the user refuses to give a terminal type (by entering end-of-file), most programs just terminate with a call to 'error' if 'gttype' returns NO. _I_m_p_l_e_m_e_n_t_a_t_i_o_n 'Gttype' calls 'ttyp$r' to obtain the terminal type from the common area. If the string is empty or if the terminal type in the common area is invalid, it calls 'ttyp$f' to obtain the terminal type in the "=termlist=" file. If no valid type is present in =termlist=, 'gttype' calls 'ttyp$q' to request the terminal type from the user. _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d ttype _C_a_l_l_s ttyp$f, ttyp$q, ttyp$r _S_e_e _A_l_s_o gtattr (2), ttyp$v (6) gttype (2) - 1 - gttype (2)