1 08/22/83 ttt_info_
2
3
4 The ttt_info_ subroutine extracts information from the terminal type
5 table TTT.
6
7
8 Entry points in ttt_info_:
9 List is generated by the help command
10
11
12 :Entry: additional_info: 05/04/83 ttt_info_$additional_info
13
14
15 Function: This entry point returns additional information for a
16 specified terminal type to be used by I/O modules other than tty_.
17
18
19 Syntax:
20 declare ttt_info_$additional_info entry char* char* varying
21 fixed bin35;
22 call ttt_info_$additional_info tt_name add_info code;
23
24
25 Arguments:
26 tt_name
27 is the terminal type name. Input
28 add_info
29 is the additional information string. Output. If no additional
30 information is defined for the terminal type, a null string is
31 returned. Maximum length is 512 characters.
32 code
33 is a standard status code. Output
34
35
36 :Entry: decode_answerback: 05/04/83 ttt_info_$decode_answerback
37
38
39 Function: This entry point decodes a specified answerback string into
40 a terminal type name and terminal identifier.
41
42
43 Syntax:
44 declare ttt_info_$decode_answerback entry char* fixed bin char*
45 char* fixed bin35;
46 call ttt_info_$decode_answerback ansb line_type tt_name id code;
47
48
49 Arguments:
50 ansb
51 is the answerback string. Input
52 line_type
53 is a line type number with which the decoded terminal type must be
54 compatible. Input. A nonpositive line type number is ignored.
55 For further description, see the tty_ I/O module.
56 tt_name
57 is the terminal type name decoded from the answerback. Output.
58 Its length should be at least 32 characters. If no terminal type is
59 indicated, a null string is returned.
60 id
61 is the terminal identifier decoded from the answerback. Output.
62 Its length should be at least four characters. If no id is
63 indicated, a null string is returned.
64 code
65 is a standard status code. Output
66
67
68 :Entry: decode_type: 05/04/83 ttt_info_$decode_type
69
70
71 Function: This entry point obtains the terminal type name that
72 corresponds to a specified terminal type code number.
73
74
75 Syntax:
76 declare ttt_info_$decode_type entry fixed bin char*
77 fixed bin35;
78 call ttt_info_$decode_type type_code tt_name code;
79
80
81 Arguments:
82 type_code
83 is the terminal type code number. Input
84 tt_name
85 is the corresponding terminal type name. Output
86 code
87 is a standard status code. Output
88
89
90 :Entry: dialup_flags: 05/04/83 ttt_info_$dialup_flags
91
92
93 Function: This entry point returns the values of two flags for a
94 specified terminal type.
95
96
97 Syntax:
98 declare ttt_info_$dialup_flags entry char* bit1 bit1
99 fixed bin35;
100 call ttt_info_$dialup_flags tt_name ppm_flag cpo_flag code;
101
102
103 Arguments:
104 tt_name
105 is the terminal type name. Input
106 ppm_flag
107 indicates whether a preaccess message should be printed when an
108 unrecognizable login line is received from a terminal of the
109 specified type Output:
110 "1"b yes
111 "0"b no
112 cpo_flag
113 indicates whether "conditional printer off" is defined for the
114 terminal type; i.e., if the answerback indicates whether a terminal
115 is equipped with the printer off feature Output:
116 "1"b yes
117 "0"b no
118 code
119 is a standard status code. Output
120
121
122 :Entry: encode_type: 05/04/83 ttt_info_$encode_type
123
124
125 Function: This entry point obtains a code number that corresponds to a
126 specified terminal type name.
127
128
129 Syntax:
130 declare ttt_info_$encode_type entry char* fixed bin
131 fixed bin35;
132 call ttt_info_$encode_type tt_name type_code code;
133
134
135 Arguments:
136 tt_name
137 is the terminal type name. Input
138 type_code
139 is the corresponding terminal type code number. Output
140 code
141 is a standard status code. Output
142
143
144 :Entry: function_key_data: 05/04/83 ttt_info_$function_key_data
145
146
147 Function: This entry point returns a collection of information
148 describing the function keys of a specified terminal type.
149
150
151 Syntax:
152 dcl ttt_info_$function_key_data entry char* ptr ptr
153 fixed bin 35;
154 call ttt_info_$function_key_data tt_name areap
155 function_key_data_ptr code;
156
157
158 Arguments:
159 tt_name
160 is the terminal type name. Input
161 areap
162 points to an area where the function_key_data info structure can be
163 allocated. Input. If null, the system free area is used. If the
164 area is not large enough, the area condition is signaled.
165 function_key_data_ptr
166 points to the function_key_data structure allocated by this entry
167 point. Output. The structure is described below.
168 code
169 is a standard system status code. Output
170
171
172 Data Structure:
173 The data structure allocated by this routine is declared in the include
174 file function_key_data.incl.pl1.
175 dcl 1 function_key_data aligned based function_key_data_ptr,
176 2 version fixed bin,
177 2 highest fixed bin,
178 2 sequence,
179 3 seq_ptr pointer,
180 3 seq_len fixed bin 21,
181 2 cursor_motion_keys,
182 3 home 0:3 like key_info,
183 3 left 0:3 like key_info,
184 3 up 0:3 like key_info,
185 3 right 0:3 like key_info,
186 3 down 0:3 like key_info,
187 2 function_keys 0:function_key_data_highest refer
188 function_key_data.highest 0:3 like key_info;
189
190
191 dcl KEY_PLAIN init 0
192 KEY_SHIFT init 1
193 KEY_CTRL init 2
194 KEY_CTRL_AND_SHIFT init 3
195 fixed bin internal static options constant;
196
197 dcl 1 key_info unaligned based key_info_ptr,
198 2 sequence_index fixed bin 12 unsigned unaligned,
199 2 sequence_length fixed bin 6 unsigned unaligned;
200
201
202 Structure elements:
203 version
204 is the version of this structure. It should be set to
205 function_key_data_version_1.
206 highest
207 is the number of the highest function key defined.
208 sequence
209 defines the character string holding the concatenation of all the
210 sequences. The sequence for a given key is defined as a
211 substring of this string.
212 seq_ptr
213 is the address of the string.
214 seq_len
215 is its length.
216
217
218 cursor_motion_keys
219 defines some miscellaneous keys whose names connote motion of the
220 cursor. Note that the meaning of these keys is defined only by
221 the application, which may or may not choose to take advantage of
222 the mnemonic value of these key legends.
223 home
224 defines the sequences for the HOME key, used by itself, with
225 SHIFT, with CONTROL, and with SHIFT and CONTROL. An absent
226 sequence has a sequence length of zero.
227 left
228 defines the left arrow key in the same way as HOME is defined.
229 up
230 defines the up-arrow key.
231
232
233 right
234 defines the right-arrow key.
235 down
236 defines the down-arrow key.
237 function_keys
238 defines the sequences for the function keys of the terminal. If
239 the terminal has no function key labelled "0", all sequences for
240 0 have zero length.
241 key_info
242 defines a given sequence.
243 sequence_index
244 is the index of the beginning of the sequence in the string of
245 all sequences.
246 sequence_length
247 is the length of the sequence. If zero, the sequence is not
248 present.
249
250
251 Notes:
252 Mnemonic values are defined for the subscripts for various key
253 combinations: KEY_PLAIN, KEY_SHIFT, KEY_CTRL, and KEY_CTRL_AND_SHIFT.
254 For example, the sequence for the left-arrow key with SHIFT is:
255 substr function_key_seqs
256 function_key_data.leftKEY_SHIFT.sequence_offset
257 function_key_data.leftKEY_SHIFT.sequence_length
258
259
260 :Entry: initial_string: 05/04/83 ttt_info_$initial_string
261
262
263 Function: This entry point returns a string that can be used to
264 initialize terminals of a specified terminal type. The string must be
265 transmitted to the terminal in raw output rawo mode. The initial
266 string is most commonly used to set tabs on terminals that support tabs
267 set by software.
268
269
270 Syntax:
271 declare ttt_info_$initial_string entry char* char* varying
272 fixed bin35;
273 call ttt_info_$initial_string tt_name istr_info code;
274
275
276 Arguments:
277 tt_name
278 is the terminal type name. Input
279 istr_info
280 is the initial string. Output. If no initial string is defined
281 for the terminal type, a null string is returned. Maximum length is
282 512 characters.
283 code
284 is a standard status code. Output
285
286
287 :Entry: modes: 05/04/83 ttt_info_$modes
288
289
290 Function: This entry point returns the default modes for a specified
291 terminal type.
292
293
294 Syntax:
295 declare ttt_info_$modes entry char* char* fixed bin35;
296 call ttt_info_$modes tt_name modes code;
297
298
299 Arguments:
300 tt_name
301 is the terminal type name. Input
302 modes
303 is the default modes string for the terminal type. Output. If
304 its length is less than 256 characters, the entire modes string is
305 not necessarily returned.
306 code
307 is a standard status code. Output
308
309
310 :Entry: preaccess_type: 05/04/83 ttt_info_$preaccess_type
311
312
313 Function: This entry point returns the terminal type name associated
314 with a specified preaccess request.
315
316
317 Syntax:
318 declare ttt_info_$preaccess_type entry char* char*
319 fixed bin35;
320 call ttt_info_$preaccess_type request tt_name code);
321
322
323 Arguments:
324 request
325 is one of the following three preaccess requests: MAP, 963, or 029.
326 Input
327 tt_name
328 is the name of the associated terminal type. Output. Its length
329 should be at least 32 characters.
330 code
331 is a standard status code. Output
332
333
334 :Entry: terminal_data: 05/04/83 ttt_info_$terminal_data
335
336
337 Function: This entry point returns a collection of information that
338 describes a specified terminal type.
339
340
341 Syntax:
342 declare ttt_info_$terminal_data entry char* fixed bin fixed bin
343 ptr fixed bin35;
344 call ttt_info_$terminal_data tt_name line_type baud ttd_ptr code;
345
346
347 Arguments:
348 tt_name
349 is the terminal type name. Input
350 line_type
351 is a line type number against which the compatibility of the
352 terminal type is verified. Input. If nonpositive, the line type
353 number is ignored. For further description, see the tty_ I/O
354 module.
355 baud
356 is a baud rate used to select the appropriate delay table. Input
357 ttd_ptr
358 is a pointer to a structure in which information is returned.
359 Input. See "Notes" below.
360 code
361 is a standard status code. Output. If the terminal type is
362 incompatible with the line type, a value of
363 error_table_$incompatible_term_type is returned.
364
365
366 Notes:
367 The ttd_ptr argument should point to the following structure
368 terminal_type_data.incl.pl1:
369 dcl 1 terminal_type_data aligned,
370 2 version fixed bin,
371 2 old_type fixed bin,
372 2 name char32 unaligned,
373 2 tables,
374 3 input_tr_ptr ptr,
375 3 output_tr_ptr ptr,
376 3 input_cv_ptr ptr,
377 3 output_cv_ptr ptr,
378 3 special_ptr ptr,
379 3 delay_ptr ptr,
380 2 editing_chars unaligned,
381 3 erase char1 unaligned,
382 3 kill char1 unaligned,
383
384
385 2 framing_chars unaligned,
386 3 frame_begin char1 unaligned,
387 3 frame_end char1 unaligned,
388 2 flags, unaligned,
389 3 keyboard_locking bit1,
390 3 input_timeout bit1,
391 3 output_block_acknowledge bit1,
392 3 mbz bit15,
393 2 line_delimiter char1 unaligned,
394 2 mbz bit9 unaligned,
395 2 flow_control_chars unaligned,
396 3 input_suspend char1,
397 3 input_resume char1,
398 3 output_suspend_etb char1,
399 3 output_resume_ack char1,
400 2 output_buffer_size fixed bin;
401
402
403 Structure elements:
404 version
405 is the version number of the above structure. Input. It must
406 be 1 or 2.
407 old_type
408 is the old terminal type number that corresponds to the terminal
409 type name. Output. The old terminal type number is provided
410 only for compatibility with the obsolete set_type and info tty_
411 order requests. A value of -1 indicates that no corresponding
412 old type exists.
413 name
414 is the terminal type name. Output
415
416
417 input_tr_ptr
418 is a pointer to a structure containing the input translation
419 table. Output. This structure is identical to the info
420 structure for the set_input_translation order of the tty_ I/O
421 module.
422 output_tr_ptr
423 is a pointer to a structure containing the output translation
424 table. Output. This structure is identical to the info
425 structure for the set_output_translation order of the tty_ I/O
426 module.
427 input_cv_ptr
428 is a pointer to a structure containing the input conversion
429 table. Output. This structure is identical to the info
430 structure for the set_input_conversion order of the tty_ I/O
431 module.
432
433
434 output_cv_ptr
435 is a pointer to a structure containing the output conversion
436 table. Output. This structure is identical to the info
437 structure for the set_output_conversion order of the tty_ I/O
438 module.
439 special_ptr
440 is a pointer to a structure containing the special characters
441 table. Output. This structure is identical to the info
442 structure for the set_special order of the tty_ I/O module.
443 delay_ptr
444 is a pointer to a structure containing the delay table.
445 Output. This structure is identical to the info structure for
446 the set_delay order of the tty_ I/O module.
447 erase
448 is the erase character. Output
449
450
451 kill
452 is the kill character. Output
453 frame_begin
454 is the frame-begin character. Output
455 frame_end
456 is the frame-end character. Output
457 keyboard_locking
458 indicates whether the terminal type requires keyboard locking and
459 unlocking. Output
460 "1"b yes
461 "0"b no
462
463
464 input_timeout
465 is "1"b if the timeout option was specified on an input_resume
466 statement in the TTF. Output
467 output_block_acknowledge
468 is "1"b if output_end_of_block and output_acknowledge statements
469 were specified in the TTF. Output
470 mbz
471 must be "0"b.
472 line_delimiter
473 is the line delimiter character. Output
474
475
476 The remaining elements are not present if version above is 1.
477 flow_control_chars
478 identifies the flow control characters.
479 input_suspend
480 is the character sent to the terminal to suspend input, or sent
481 by the terminal to indicate that it is suspending input.
482 Output
483 input_resume
484 is the character sent to the terminal to resume input. Output
485 output_suspend_etb
486 is the character sent by the terminal to suspend output if
487 output_block_acknowledge is "0"b; otherwise, it is the character
488 to be appended to each output block. Output
489
490
491 output_resume_ack
492 is the character sent by the terminal to resume output if
493 output_block_acknowledge is "0"b; otherwise, it is the character
494 used to acknowledge an output block. Output
495 output_buffer_size
496 is the size, in characters, of the terminal's buffer, for use
497 with a block acknowledgement protocol. Output. It is 0 unless
498 output_block_acknowledge is "1"b.
499
500
501 :Entry: video_info: 05/04/83 ttt_info_$video_info
502
503
504 Function: This entry point is used to obtain a copy of the video
505 sequences table for a particular terminal type.
506
507
508 Syntax:
509 declare ttt_info_$video_info entry char * fixed bin ptr ptr
510 fixed bin35;
511 call ttt_info_$video_info terminal_type baud_rate areap
512 tty_vtbl_ptr code;
513
514
515 Arguments:
516 terminal_type
517 is the name of the terminal type for which the video table is
518 required. Input
519 baud_rate
520 is the current baud rate of the terminal. Input. This can be set
521 to 0 if it is unknown.
522 area
523 is a pointer to an area where the video table may be allocated.
524 Input. If null, the system free area is used.
525 tty_vtbl_ptr
526 is a pointer to the video table, if present. Output
527 code
528 is a standard system status code. Output
529
530
531 Notes:
532 The format of a video table is given in the include file
533 tty_video_tables.incl.pl1.
534 dcl 1 tty_video_table aligned based ttyvtblp,
535 2 version fixed bin,
536 2 screen_height fixed bin,
537 2 screen_line_length fixed bin,
538 2 scroll_count fixed bin,
539 2 flags unaligned,
540 3 overstrike_available bit 1 unal,
541 3 automatic_crlf bit 1 unal,
542 3 simulate_eol bit 1 unal,
543 3 pad bit 33 unaligned,
544
545
546 2 video_chars_len fixed binary 21
547 2 pad 2 bin 36
548 2 nseq fixed bin,
549 2 sequences N_VIDEO_SEQUENCES refer
550 tty_video_table.nseq
551 like tty_video_seq aligned,
552 2 video_chars char tty_video_table_video_chars_len
553 refer tty_video_table.video_chars_len
554 unal;
555
556
557 Structure elements:
558 version
559 is the version of this structure. It must be
560 tty_video_tables_version_1, also declared in this include file.
561 screen_height
562 is the number of lines on this terminal.
563 screen_line_length
564 is the number of character positions columns in each line.
565 scroll_count
566 is the number of lines scrolled upward when a scroll command is
567 sent to the terminal if the terminal is capable of scrolling.
568 For most terminals this will be 1. A value of 0 indicates that
569 one line is scrolled.
570
571
572 flags
573 describe characteristics of the terminal.
574 overstrike_available
575 is "1"b if the terminal can overstrike i.e. more than one
576 character can be seen in the same character position.
577 automatic_crlf
578 is "1"b if the terminal performs a carriage return and line feed
579 when a character is displayed in the last column.
580 simulate_eol
581 is reserved for future expansion.
582 pad
583 has an undefined value, and is reserved for future expansion.
584 video_chars_len
585 specifies the length of the string containing all video
586 sequences.
587
588
589 pad
590 is reserved for future expansion.
591 nseq
592 is the number of the highest video sequence defined for this
593 terminal. Not all sequences are defined for all terminals, so
594 programs should check this value before indexing the sequence
595 array.
596 sequences
597 is an array of video sequences. Each element of the array
598 specifies the character sequence for a video control operation.
599 The indices for specific sequences are defined by constants also
600 declared in this include file. See below.
601 video_chars
602 is a string holding concatenations of all video sequences.
603
604
605 The include file defines values for the indices into the array of
606 sequences for the video operations supported. The names of these
607 values are: ABS_POS, CLEAR_SCREEN, CLEAR_TO_EOS, HOME, CLEAR_TO_EOL,
608 CURSOR_UP, CURSOR_RIGHT, CURSOR_DOWN, CURSOR_LEFT, INSERT_CHARS,
609 END_INSERT_CHARS, DELETE_CHARS, INSERT_LINES, DELETE_LINES. The
610 include file also defines N_VIDEO_SEQUENCES, which is the number of the
611 highest index ever defined.
612
613
614 A video sequence is defined by the tty_video_seq structure in the
615 include file tty_video_tables.incl.pl1.
616 dcl 1 tty_video_seq based ttyvseqp aligned,
617 2 flags unaligned,
618 3 present bit 1 unal,
619 3 interpret bit 1 unal,
620 3 able_to_repeat bit 1 unal,
621 3 cpad_present bit 1 unal,
622 3 cpad_in_chars bit 1 unal,
623 3 pad bit 7 unaligned,
624 3 general bit 6 unaligned,
625 2 cpad fixed bin 18 unsigned unaligned,
626 2 pad bit 15 unal,
627 2 len fixed bin 9 unsigned unaligned,
628 2 seq_index fixed bin 12 unsigned unaligned;
629
630
631 Structure elements:
632 present
633 is "1"b if the operation is supported.
634 interpret
635 is "1"b if the sequence contains the encoding of the line,
636 column, or repeat count and must be inspected more closely.
637 able_to_repeat
638 is "1"b if the terminal can perform multiple sequences of this
639 operation by receiving a single-character sequence containing the
640 repeat count that is encoded in the sequence.
641 cpad_present
642 is "1"b if the terminal requires padding after the operation.
643
644
645 cpad_in_chars
646 is "1"b if the padding is in characters, or "0"b if the padding
647 is in tenths of milliseconds. If the baud rate is supplied to
648 the ttt_info_$video_info subroutine, then padding is always
649 expressed in characters.
650 pad
651 is reserved for future expansion.
652 general
653 is reserved for future expansion to define per-sequence
654 information.
655
656
657 cpad
658 is the padding count in units defined by cpad_in_chars.
659 pad
660 is reserved for future expansion.
661 len
662 is the length of the string of characters defining this sequence.
663 seq_index
664 is the index of the start of the string in
665 tty_video_table.video_chars.
666
667
668 Many terminals allow a repetition count to be supplied with an
669 operation e.g. to delete multiple lines. Positioning operations
670 require line and column coordinates. These values must be expressed in
671 some encoding. A variety of encodings are supported. Parameters to be
672 transmitted are specified by an encoding character in the video
673 sequence string. An encoding character is a nine-bit byte whose high
674 order bit is set and is defined by the structure tty_numeric_encoding
675 in the include file tty_video_tables.incl.pl1. The encoding scheme is
676 described in the write-up for the video_info table of the Terminal Type
677 file in the Programmer's Reference Manual.
678 dcl 1 tty_numeric_encoding based unaligned,
679 2 flags,
680 3 must_be_on bit 1 unal,
681 3 express_in_decimal bit 1 unal,
682 3 express_in_octal bit 1 unal,
683 3 offset_is_0 bit 1 unal,
684 2 l_c_or_n fixed bin 2 unsigned unaligned,
685 2 num_digits fixed bin 2 unsigned unaligned,
686 2 pad bit 1 unaligned
687 2 offset fixed bin 8 unaligned;
688
689
690 Structure elements:
691 must_be_on
692 is "1"b for an encoding character.
693 express_in_decimal
694 is "1"b if the value should be expressed as decimal digits.
695 express_in_octal
696 is "1"b if the value should be expressed in octal digits. If
697 both flags are off, the value should be sent as a single
698 character.
699 offset_is_0
700 if "0"b, the following byte is a fixed bin8 value to be added
701 to the value before encoding. If "1"b, the offset is 0, and the
702 next byte has no special significance.
703
704
705 l_c_or_n
706 specifies the type of value to be encoded. Its value can be 0,
707 1, or 2, and indicates that this encoding character specifies the
708 line number, column number, or repeat count, respectively.
709 num_digits
710 specifies the number of digits to be sent. A value of 0 causes
711 all significant digits to be sent, with leading zeroes
712 suppressed.
713 pad
714 is reserved for future expansion.
715 offset
716 is present only if offset_is_0 is "0"b. It gives an offset to be
717 added to the value before expressing it in octal or decimal.