08/22/83 ttt_info_ The ttt_info_ subroutine extracts information from the terminal type table (TTT). Entry points in ttt_info_: (List is generated by the help command) :Entry: additional_info: 05/04/83 ttt_info_$additional_info Function: This entry point returns additional information for a specified terminal type to be used by I/O modules other than tty_. Syntax: declare ttt_info_$additional_info entry (char(*), char(*) varying, fixed bin(35)); call ttt_info_$additional_info (tt_name, add_info, code); Arguments: tt_name is the terminal type name. (Input) add_info is the additional information string. (Output). If no additional information is defined for the terminal type, a null string is returned. Maximum length is 512 characters. code is a standard status code. (Output) :Entry: decode_answerback: 05/04/83 ttt_info_$decode_answerback Function: This entry point decodes a specified answerback string into a terminal type name and terminal identifier. Syntax: declare ttt_info_$decode_answerback entry (char(*), fixed bin, char(*), char(*), fixed bin(35)); call ttt_info_$decode_answerback (ansb, line_type, tt_name, id, code); Arguments: ansb is the answerback string. (Input) line_type is a line type number with which the decoded terminal type must be compatible. (Input). A nonpositive line type number is ignored. For further description, see the tty_ I/O module. tt_name is the terminal type name decoded from the answerback. (Output). Its length should be at least 32 characters. If no terminal type is indicated, a null string is returned. id is the terminal identifier decoded from the answerback. (Output). Its length should be at least four characters. If no id is indicated, a null string is returned. code is a standard status code. (Output) :Entry: decode_type: 05/04/83 ttt_info_$decode_type Function: This entry point obtains the terminal type name that corresponds to a specified terminal type code number. Syntax: declare ttt_info_$decode_type entry (fixed bin, char(*), fixed bin(35)); call ttt_info_$decode_type (type_code, tt_name, code); Arguments: type_code is the terminal type code number. (Input) tt_name is the corresponding terminal type name. (Output) code is a standard status code. (Output) :Entry: dialup_flags: 05/04/83 ttt_info_$dialup_flags Function: This entry point returns the values of two flags for a specified terminal type. Syntax: declare ttt_info_$dialup_flags entry (char(*), bit(1), bit(1), fixed bin(35)); call ttt_info_$dialup_flags (tt_name, ppm_flag, cpo_flag, code); Arguments: tt_name is the terminal type name. (Input) ppm_flag indicates whether a preaccess message should be printed when an unrecognizable login line is received from a terminal of the specified type (Output): "1"b yes "0"b no cpo_flag indicates whether "conditional printer off" is defined for the terminal type; i.e., if the answerback indicates whether a terminal is equipped with the printer off feature (Output): "1"b yes "0"b no code is a standard status code. (Output) :Entry: encode_type: 05/04/83 ttt_info_$encode_type Function: This entry point obtains a code number that corresponds to a specified terminal type name. Syntax: declare ttt_info_$encode_type entry (char(*), fixed bin, fixed bin(35)); call ttt_info_$encode_type (tt_name, type_code, code); Arguments: tt_name is the terminal type name. (Input) type_code is the corresponding terminal type code number. (Output) code is a standard status code. (Output) :Entry: function_key_data: 05/04/83 ttt_info_$function_key_data Function: This entry point returns a collection of information describing the function keys of a specified terminal type. Syntax: dcl ttt_info_$function_key_data entry (char(*), ptr, ptr, fixed bin (35)); call ttt_info_$function_key_data (tt_name, areap, function_key_data_ptr, code); Arguments: tt_name is the terminal type name. (Input) areap points to an area where the function_key_data info structure can be allocated. (Input). If null, the system free area is used. If the area is not large enough, the area condition is signaled. function_key_data_ptr points to the function_key_data structure allocated by this entry point. (Output). The structure is described below. code is a standard system status code. (Output) Data Structure: The data structure allocated by this routine is declared in the include file function_key_data.incl.pl1. dcl 1 function_key_data aligned based (function_key_data_ptr), 2 version fixed bin, 2 highest fixed bin, 2 sequence, 3 seq_ptr pointer, 3 seq_len fixed bin (21), 2 cursor_motion_keys, 3 home (0:3) like key_info, 3 left (0:3) like key_info, 3 up (0:3) like key_info, 3 right (0:3) like key_info, 3 down (0:3) like key_info, 2 function_keys (0:function_key_data_highest refer (function_key_data.highest), 0:3) like key_info; dcl (KEY_PLAIN init (0), KEY_SHIFT init (1), KEY_CTRL init (2), KEY_CTRL_AND_SHIFT init (3)) fixed bin internal static options (constant); dcl 1 key_info unaligned based (key_info_ptr), 2 sequence_index fixed bin (12) unsigned unaligned, 2 sequence_length fixed bin (6) unsigned unaligned; Structure elements: version is the version of this structure. It should be set to function_key_data_version_1. highest is the number of the highest function key defined. sequence defines the character string holding the concatenation of all the sequences. The sequence for a given key is defined as a substring of this string. seq_ptr is the address of the string. seq_len is its length. cursor_motion_keys defines some miscellaneous keys whose names connote motion of the cursor. Note that the meaning of these keys is defined only by the application, which may or may not choose to take advantage of the mnemonic value of these key legends. home defines the sequences for the HOME key, used by itself, with SHIFT, with CONTROL, and with SHIFT and CONTROL. An absent sequence has a sequence length of zero. left defines the left arrow key in the same way as HOME is defined. up defines the up-arrow key. right defines the right-arrow key. down defines the down-arrow key. function_keys defines the sequences for the function keys of the terminal. If the terminal has no function key labelled "0", all sequences for 0 have zero length. key_info defines a given sequence. sequence_index is the index of the beginning of the sequence in the string of all sequences. sequence_length is the length of the sequence. If zero, the sequence is not present. Notes: Mnemonic values are defined for the subscripts for various key combinations: KEY_PLAIN, KEY_SHIFT, KEY_CTRL, and KEY_CTRL_AND_SHIFT. For example, the sequence for the left-arrow key with SHIFT is: substr (function_key_seqs, function_key_data.left(KEY_SHIFT).sequence_offset, function_key_data.left(KEY_SHIFT).sequence_length) :Entry: initial_string: 05/04/83 ttt_info_$initial_string Function: This entry point returns a string that can be used to initialize terminals of a specified terminal type. The string must be transmitted to the terminal in raw output (rawo) mode. The initial string is most commonly used to set tabs on terminals that support tabs set by software. Syntax: declare ttt_info_$initial_string entry (char(*), char(*) varying, fixed bin(35)); call ttt_info_$initial_string (tt_name, istr_info, code); Arguments: tt_name is the terminal type name. (Input) istr_info is the initial string. (Output). If no initial string is defined for the terminal type, a null string is returned. Maximum length is 512 characters. code is a standard status code. (Output) :Entry: modes: 05/04/83 ttt_info_$modes Function: This entry point returns the default modes for a specified terminal type. Syntax: declare ttt_info_$modes entry (char(*), char(*), fixed bin(35)); call ttt_info_$modes (tt_name, modes, code); Arguments: tt_name is the terminal type name. (Input) modes is the default modes string for the terminal type. (Output). If its length is less than 256 characters, the entire modes string is not necessarily returned. code is a standard status code. (Output) :Entry: preaccess_type: 05/04/83 ttt_info_$preaccess_type Function: This entry point returns the terminal type name associated with a specified preaccess request. Syntax: declare ttt_info_$preaccess_type entry (char(*), char(*), fixed bin(35)); call ttt_info_$preaccess_type (request, tt_name, code)); Arguments: request is one of the following three preaccess requests: MAP, 963, or 029. (Input) tt_name is the name of the associated terminal type. (Output). Its length should be at least 32 characters. code is a standard status code. (Output) :Entry: terminal_data: 05/04/83 ttt_info_$terminal_data Function: This entry point returns a collection of information that describes a specified terminal type. Syntax: declare ttt_info_$terminal_data entry (char(*), fixed bin, fixed bin, ptr, fixed bin(35)); call ttt_info_$terminal_data (tt_name, line_type, baud, ttd_ptr, code); Arguments: tt_name is the terminal type name. (Input) line_type is a line type number against which the compatibility of the terminal type is verified. (Input). If nonpositive, the line type number is ignored. For further description, see the tty_ I/O module. baud is a baud rate used to select the appropriate delay table. (Input) ttd_ptr is a pointer to a structure in which information is returned. (Input). (See "Notes" below.) code is a standard status code. (Output). If the terminal type is incompatible with the line type, a value of error_table_$incompatible_term_type is returned. Notes: The ttd_ptr argument should point to the following structure (terminal_type_data.incl.pl1): dcl 1 terminal_type_data aligned, 2 version fixed bin, 2 old_type fixed bin, 2 name char(32) unaligned, 2 tables, 3 input_tr_ptr ptr, 3 output_tr_ptr ptr, 3 input_cv_ptr ptr, 3 output_cv_ptr ptr, 3 special_ptr ptr, 3 delay_ptr ptr, 2 editing_chars unaligned, 3 erase char(1) unaligned, 3 kill char(1) unaligned, 2 framing_chars unaligned, 3 frame_begin char(1) unaligned, 3 frame_end char(1) unaligned, 2 flags, unaligned, 3 keyboard_locking bit(1), 3 input_timeout bit(1), 3 output_block_acknowledge bit(1), 3 mbz bit(15), 2 line_delimiter char(1) unaligned, 2 mbz bit(9) unaligned, 2 flow_control_chars unaligned, 3 input_suspend char(1), 3 input_resume char(1), 3 output_suspend_etb char(1), 3 output_resume_ack char(1), 2 output_buffer_size fixed bin; Structure elements: version is the version number of the above structure. (Input). It must be 1 or 2. old_type is the old terminal type number that corresponds to the terminal type name. (Output). (The old terminal type number is provided only for compatibility with the obsolete set_type and info tty_ order requests.) A value of -1 indicates that no corresponding old type exists. name is the terminal type name. (Output) input_tr_ptr is a pointer to a structure containing the input translation table. (Output). This structure is identical to the info structure for the set_input_translation order of the tty_ I/O module. output_tr_ptr is a pointer to a structure containing the output translation table. (Output). This structure is identical to the info structure for the set_output_translation order of the tty_ I/O module. input_cv_ptr is a pointer to a structure containing the input conversion table. (Output). This structure is identical to the info structure for the set_input_conversion order of the tty_ I/O module. output_cv_ptr is a pointer to a structure containing the output conversion table. (Output). This structure is identical to the info structure for the set_output_conversion order of the tty_ I/O module. special_ptr is a pointer to a structure containing the special characters table. (Output). This structure is identical to the info structure for the set_special order of the tty_ I/O module. delay_ptr is a pointer to a structure containing the delay table. (Output). This structure is identical to the info structure for the set_delay order of the tty_ I/O module. erase is the erase character. (Output) kill is the kill character. (Output) frame_begin is the frame-begin character. (Output) frame_end is the frame-end character. (Output) keyboard_locking indicates whether the terminal type requires keyboard locking and unlocking. (Output) "1"b yes "0"b no input_timeout is "1"b if the timeout option was specified on an input_resume statement in the TTF. (Output) output_block_acknowledge is "1"b if output_end_of_block and output_acknowledge statements were specified in the TTF. (Output) mbz must be "0"b. line_delimiter is the line delimiter character. (Output) The remaining elements are not present if version (above) is 1. flow_control_chars identifies the flow control characters. input_suspend is the character sent to the terminal to suspend input, or sent by the terminal to indicate that it is suspending input. (Output) input_resume is the character sent to the terminal to resume input. (Output) output_suspend_etb is the character sent by the terminal to suspend output if output_block_acknowledge is "0"b; otherwise, it is the character to be appended to each output block. (Output) output_resume_ack is the character sent by the terminal to resume output if output_block_acknowledge is "0"b; otherwise, it is the character used to acknowledge an output block. (Output) output_buffer_size is the size, in characters, of the terminal's buffer, for use with a block acknowledgement protocol. (Output). It is 0 unless output_block_acknowledge is "1"b. :Entry: video_info: 05/04/83 ttt_info_$video_info Function: This entry point is used to obtain a copy of the video sequences table for a particular terminal type. Syntax: declare ttt_info_$video_info entry (char (*), fixed bin, ptr, ptr, fixed bin(35)); call ttt_info_$video_info (terminal_type, baud_rate, areap, tty_vtbl_ptr, code); Arguments: terminal_type is the name of the terminal type for which the video table is required. (Input) baud_rate is the current baud rate of the terminal. (Input). This can be set to 0 if it is unknown. area is a pointer to an area where the video table may be allocated. (Input). If null, the system free area is used. tty_vtbl_ptr is a pointer to the video table, if present. (Output) code is a standard system status code. (Output) Notes: The format of a video table is given in the include file tty_video_tables.incl.pl1. dcl 1 tty_video_table aligned based (ttyvtblp), 2 version fixed bin, 2 screen_height fixed bin, 2 screen_line_length fixed bin, 2 scroll_count fixed bin, 2 flags unaligned, 3 overstrike_available bit (1) unal, 3 automatic_crlf bit (1) unal, 3 simulate_eol bit (1) unal, 3 pad bit (33) unaligned, 2 video_chars_len fixed binary (21) 2 pad (2) bin (36) 2 nseq fixed bin, 2 sequences (N_VIDEO_SEQUENCES refer (tty_video_table.nseq)) like tty_video_seq aligned, 2 video_chars char (tty_video_table_video_chars_len refer (tty_video_table.video_chars_len)) unal; Structure elements: version is the version of this structure. It must be tty_video_tables_version_1, also declared in this include file. screen_height is the number of lines on this terminal. screen_line_length is the number of character positions (columns) in each line. scroll_count is the number of lines scrolled upward when a scroll command is sent to the terminal (if the terminal is capable of scrolling). For most terminals this will be 1. A value of 0 indicates that one line is scrolled. flags describe characteristics of the terminal. overstrike_available is "1"b if the terminal can overstrike (i.e., more than one character can be seen in the same character position). automatic_crlf is "1"b if the terminal performs a carriage return and line feed when a character is displayed in the last column. simulate_eol is reserved for future expansion. pad has an undefined value, and is reserved for future expansion. video_chars_len specifies the length of the string containing all video sequences. pad is reserved for future expansion. nseq is the number of the highest video sequence defined for this terminal. Not all sequences are defined for all terminals, so programs should check this value before indexing the sequence array. sequences is an array of video sequences. Each element of the array specifies the character sequence for a video control operation. The indices for specific sequences are defined by constants also declared in this include file. See below. video_chars is a string holding concatenations of all video sequences. The include file defines values for the indices into the array of sequences for the video operations supported. The names of these values are: ABS_POS, CLEAR_SCREEN, CLEAR_TO_EOS, HOME, CLEAR_TO_EOL, CURSOR_UP, CURSOR_RIGHT, CURSOR_DOWN, CURSOR_LEFT, INSERT_CHARS, END_INSERT_CHARS, DELETE_CHARS, INSERT_LINES, DELETE_LINES. The include file also defines N_VIDEO_SEQUENCES, which is the number of the highest index ever defined. A video sequence is defined by the tty_video_seq structure in the include file tty_video_tables.incl.pl1. dcl 1 tty_video_seq based (ttyvseqp) aligned, 2 flags unaligned, 3 present bit (1) unal, 3 interpret bit (1) unal, 3 able_to_repeat bit (1) unal, 3 cpad_present bit (1) unal, 3 cpad_in_chars bit (1) unal, 3 pad bit (7) unaligned, 3 general bit (6) unaligned, 2 cpad fixed bin (18) unsigned unaligned, 2 pad bit (15) unal, 2 len fixed bin (9) unsigned unaligned, 2 seq_index fixed bin (12) unsigned unaligned; Structure elements: present is "1"b if the operation is supported. interpret is "1"b if the sequence contains the encoding of the line, column, or repeat count and must be inspected more closely. able_to_repeat is "1"b if the terminal can perform multiple sequences of this operation by receiving a single-character sequence containing the repeat count that is encoded in the sequence. cpad_present is "1"b if the terminal requires padding after the operation. cpad_in_chars is "1"b if the padding is in characters, or "0"b if the padding is in tenths of milliseconds. If the baud rate is supplied to the ttt_info_$video_info subroutine, then padding is always expressed in characters. pad is reserved for future expansion. general is reserved for future expansion to define per-sequence information. cpad is the padding count in units defined by cpad_in_chars. pad is reserved for future expansion. len is the length of the string of characters defining this sequence. seq_index is the index of the start of the string in tty_video_table.video_chars. Many terminals allow a repetition count to be supplied with an operation (e.g., to delete multiple lines). Positioning operations require line and column coordinates. These values must be expressed in some encoding. A variety of encodings are supported. Parameters to be transmitted are specified by an encoding character in the video sequence string. An encoding character is a nine-bit byte whose high order bit is set and is defined by the structure tty_numeric_encoding in the include file tty_video_tables.incl.pl1. The encoding scheme is described in the write-up for the video_info table of the Terminal Type file in the Programmer's Reference Manual. dcl 1 tty_numeric_encoding based unaligned, 2 flags, 3 must_be_on bit (1) unal, 3 express_in_decimal bit (1) unal, 3 express_in_octal bit (1) unal, 3 offset_is_0 bit (1) unal, 2 l_c_or_n fixed bin (2) unsigned unaligned, 2 num_digits fixed bin (2) unsigned unaligned, 2 pad bit (1) unaligned 2 offset fixed bin (8) unaligned; Structure elements: must_be_on is "1"b for an encoding character. express_in_decimal is "1"b if the value should be expressed as decimal digits. express_in_octal is "1"b if the value should be expressed in octal digits. If both flags are off, the value should be sent as a single character. offset_is_0 if "0"b, the following byte is a fixed bin(8) value to be added to the value before encoding. If "1"b, the offset is 0, and the next byte has no special significance. l_c_or_n specifies the type of value to be encoded. Its value can be 0, 1, or 2, and indicates that this encoding character specifies the line number, column number, or repeat count, respectively. num_digits specifies the number of digits to be sent. A value of 0 causes all significant digits to be sent, with leading zeroes suppressed. pad is reserved for future expansion. offset is present only if offset_is_0 is "0"b. It gives an offset to be added to the value before expressing it in octal or decimal. ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved