COMPILATION LISTING OF SEGMENT set_tty Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-04-18_1146.78_Tue_mdt Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 15 /****^ HISTORY COMMENTS: 16* 1) change(87-07-09,LJAdams), approve(87-07-09,MCR7742), 17* audit(87-07-23,Gilcrease), install(87-08-04,MR12.1-1055): 18* Added options for DSA. 19* END HISTORY COMMENTS */ 20 21 22 /* format: style4,delnl,insnl,^ifthendo */ 23 set_tty: 24 stty: 25 proc; 26 27 /* This command can be used to set the user's terminal type, terminal i/o modes, or both. 28* * The -print option may be used to ascertain the type and modes. When a type is specified, 29* * the default modes for that type are turned on; when -reset is specified, all default 30* * modes are turned on and all other modes are turned off. The -modes option 31* * is used to turn on or off explicitly specified modes. 32* * 33* * modified by Robert Coren 8/4/76 to add delay and editing characters stuff 34* * modified by J. Stern 6/3/77 for new orders: set_term_type, set_default_modes, send_initial_string 35* * modified by Robert Coren 4/25/78 to add -frame and -print_frame 36* * modified by Robert Coren 8/14/79 to add flow control options 37* * modified by G. Palter 11/12/80 to use a larger mode string 38* * modified by Robert Coren 10/8/84 to set flow-control and framing characters before modes 39* * modified by Roger Negaret 05/20/85 to add some options meaningful on a DSA connection. 40* * modified by Robert Coren 06/16/86 to deal with unimplmented_version errors for editing_chars. 41**/ 42 43 44 /* ENTRIES */ 45 46 dcl cu_$arg_count entry returns (fixed bin); 47 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 48 dcl cv_dec_check_ entry (char (*), fixed bin (35)) returns (fixed bin); 49 dcl com_err_ entry options (variable); 50 dcl ioa_ entry options (variable); 51 dcl iox_$control entry (ptr, char (*), ptr, fixed bin (35)); 52 dcl iox_$modes entry (ptr, char (*), char (*), fixed bin (35)); 53 dcl iox_$look_iocb entry (char (*), ptr, fixed bin (35)); 54 55 56 /* EXTERNAL STATIC */ 57 58 dcl iox_$user_io ptr ext static; 59 60 dcl error_table_$action_not_performed fixed bin(35) ext static; 61 dcl error_table_$bad_mode fixed bin (35) ext static; 62 dcl error_table_$badopt fixed bin (35) ext static; 63 dcl error_table_$bigarg fixed bin (35) ext static; 64 dcl error_table_$inconsistent fixed bin (35) ext static; 65 dcl error_table_$noarg fixed bin (35) ext static; 66 dcl error_table_$smallarg fixed bin (35) ext static; 67 dcl error_table_$undefined_order_request fixed bin(35) ext static; 68 dcl error_table_$unimplemented_version fixed bin (35) ext static; 69 dcl error_table_$unsupported_operation fixed bin (35) ext static; 70 71 72 /* INTERNAL STATIC */ 73 74 dcl printable_ctl_char (0:31) char (2) 75 init ("^@", "^A", "^B", "^C", "^D", "^E", "^F", "^G", "^H", "^I", "^J", "^K", "^L", "^M", "^N", "^O", "^P", 76 "^Q", "^R", "^S", "^T", "^U", "^V", "^W", "^X", "^Y", "^Z", "^[", "^\", "^]", "^^", "^_"); 77 dcl cmd_name char (8) int static options (constant) init ("set_tty"); 78 dcl max_tty_line_type fixed bin int static init (20); 79 dcl NUL char (1) int static options (constant) init (""); /* \000 */ 80 81 dcl 1 delay internal static aligned, 82 2 version fixed bin, 83 2 default fixed bin, 84 2 values like input_delays; 85 86 87 /* AUTOMATIC */ 88 89 dcl network_type fixed bin; 90 dcl editing_chars_version fixed bin; 91 dcl tab_int fixed bin; 92 dcl line_ind char (2) var; 93 dcl page_ind char (4) var; 94 dcl (tab_int_switch, line_ind_switch, page_ind_switch) bit (1); 95 /* flags indicating which args specified */ 96 97 dcl iarg fixed bin; 98 dcl nargs fixed bin; 99 dcl iocbp ptr; 100 dcl code fixed bin (35); 101 dcl input_modes char (512); 102 dcl (reset_switch, type_switch, modes_switch, tabs_switch, initial_string_switch, set_frame_switch, print_frame_switch, 103 all_switch, set_edit_switch, print_edit_switch, set_delay_switch, set_ifc_switch, set_osr_switch, set_oea_switch, 104 set_bsize_switch, print_delay_switch, print_switch, brief_switch) bit (1); 105 /* flags indicating which args specified */ 106 dcl standard_line_type bit (1); /* "1"b -> standard_line_type */ 107 dcl position fixed bin; 108 dcl next_comma fixed bin; 109 dcl unchanged_delays bit (6); 110 dcl typename char (32); 111 dcl i fixed bin; 112 dcl out_modes char (512); /* modes returned by iox_$modes */ 113 114 dcl 1 t_info aligned like terminal_info; /* info structure for terminal_info order */ 115 116 dcl 1 stt_info aligned like set_term_type_info; /* info structure for set_term_type order */ 117 118 119 dcl 1 input_delays aligned, /* supplied values for delay setting */ 120 2 vert_nl fixed bin, 121 2 horz_nl float bin, 122 2 const_tab fixed bin, 123 2 var_tab float bin, 124 2 backspace fixed bin, 125 2 vt_ff fixed bin; 126 127 128 dcl 1 editing_chars aligned, /* if version 2 then length of chars is 2 (MCS) */ 129 /* if version 3 then length of chars is 3 (DSA) */ 130 2 version fixed bin, 131 2 chars char (3) unaligned; 132 133 dcl 1 auto_ifc aligned like input_flow_control_info; 134 dcl 1 auto_ofc aligned like output_flow_control_info; 135 136 dcl framing_chars char (2) aligned; 137 138 139 140 /* BASED */ 141 142 dcl based_float (6) float bin based; 143 dcl based_fixed (6) fixed bin based; 144 145 146 /* ARGUMENT STUFF */ 147 148 dcl argptr ptr; 149 dcl arglen fixed bin; 150 dcl arg char (arglen) based (argptr); 151 152 dcl rank builtin; 153 dcl null builtin; 154 dcl conversion condition; 155 1 1 /* BEGIN INCLUDE FiLE ... terminal_info.incl.pl1 */ 1 2 1 3 /* Created 5/25/77 by J. Stern */ 1 4 1 5 1 6 dcl 1 terminal_info aligned based (terminal_info_ptr), /* info structure for terminal_info order */ 1 7 2 version fixed bin, /* version number of this sturcture */ 1 8 2 id char (4) unaligned, /* terminal id from answerback */ 1 9 2 term_type char (32) unaligned, /* terminal type name */ 1 10 2 line_type fixed bin, /* line type number */ 1 11 2 baud_rate fixed bin, 1 12 2 reserved (4) fixed bin; /* reserved for future use */ 1 13 1 14 1 15 dcl terminal_info_ptr ptr; 1 16 dcl terminal_info_version fixed bin int static options (constant) init (1); /* current version */ 1 17 1 18 1 19 /* END INCLUDE FILE ... terminal_info.incl.pl1 */ 156 2 1 /* BEGIN INCLUDE FILE ... set_term_type_info.incl.pl1 */ 2 2 /* Created 7/18/77 by Robert Coren */ 2 3 /* Defines info structure for set_term_type order */ 2 4 2 5 dcl stti_version_1 fixed bin int static options (constant) init (1); 2 6 dcl sttip ptr; 2 7 2 8 dcl 1 set_term_type_info aligned based (sttip), 2 9 2 version fixed bin, 2 10 2 name char (32) unal, 2 11 2 flags unal, 2 12 3 send_initial_string bit (1), 2 13 3 set_modes bit (1), 2 14 3 ignore_line_type bit (1), 2 15 3 mbz bit (33); 2 16 2 17 /* END INCLUDE FILE ... set_term_type_info.incl.pl1 */ 157 3 1 /* BEGIN INCLUDE FILE ... flow_conrol_info.incl.pl1 */ 3 2 3 3 /* This include file defines the structures used for the "input_flow_control_chars" 3 4* and "output_flow_control_chars" orders to MCS. 3 5**/ 3 6 3 7 /* Created 08/13/79 by Robert S. Coren */ 3 8 3 9 dcl 1 input_flow_control_info aligned based, 3 10 2 suspend_seq unaligned, 3 11 3 count fixed bin (9) unsigned, 3 12 3 chars char (3), 3 13 2 resume_seq unaligned, 3 14 3 count fixed bin (9) unsigned, 3 15 3 chars char (3), 3 16 2 timeout bit (1); 3 17 3 18 3 19 dcl 1 output_flow_control_info aligned based, 3 20 2 flags unaligned, 3 21 3 suspend_resume bit (1), 3 22 3 block_acknowledge bit (1), 3 23 3 mbz bit (16), 3 24 2 buffer_size fixed bin (18) unsigned unaligned, 3 25 2 suspend_or_etb_seq unaligned, 3 26 3 count fixed bin (9) unsigned, 3 27 3 chars char (3), 3 28 2 resume_or_ack_seq unaligned, 3 29 3 count fixed bin (9) unsigned, 3 30 3 chars char (3); 3 31 3 32 3 33 /* END INCLUDE FILE ... flow_control_info.incl.pl1 */ 3 34 158 4 1 /* BEGIN INCLUDE FILE ... net_event_message.incl.pl1 */ 4 2 4 3 /****^ HISTORY COMMENTS: 4 4* 1) change(86-07-30,Kissel), approve(86-07-30,MCR7475), audit(86-08-04,Coren), 4 5* install(86-10-09,MR12.0-1181): 4 6* This include file was formerly tty_event_message.incl.pl1. It has been 4 7* updated with different fields and new constants, and renamed to 4 8* net_event_message.incl.pl1 4 9* 2) change(87-04-20,GDixon), approve(87-07-13,MCR7694), 4 10* audit(87-06-24,Hartogs), install(87-08-04,MR12.1-1056): 4 11* Add NETWORK_TYPE_VALUES array. 4 12* END HISTORY COMMENTS */ 4 13 4 14 /* describes event message passed with wakeups from the tty DIM */ 4 15 /* Created 5/24/76 by Robert S. Coren */ 4 16 4 17 /* format: style3,linecom,ifthenstmt,indthenelse,^indnoniterdo,indnoniterend,initcol3,dclind5,idind32 */ 4 18 4 19 dcl net_event_message_arg fixed bin (71); /* For calling IPC */ 4 20 dcl NET_EVENT_MESSAGE_VERSION_1 bit (2) internal static options (constant) init ("10"b); 4 21 4 22 dcl 1 net_event_message aligned based (addr (net_event_message_arg)), 4 23 2 version bit (2) unaligned, /* Currently version 1 */ 4 24 2 reason bit (16) unaligned, /* Additional info about the event */ 4 25 2 pad bit (6) unaligned, /* Must be zero */ 4 26 2 network_type fixed bin (4) unsigned unaligned, 4 27 /* See below for constants */ 4 28 2 type fixed bin (8) unsigned unaligned, 4 29 /* Type of interrupt, see below */ 4 30 2 handle fixed bin (35) aligned;/* Caller's handle (devx for MCS, handle for DSA) */ 4 31 4 32 /* Network type constants */ 4 33 4 34 dcl MCS_NETWORK_TYPE fixed bin (4) unsigned internal static options (constant) init (0); 4 35 dcl DSA_NETWORK_TYPE fixed bin (4) unsigned internal static options (constant) init (1); 4 36 dcl MOWSE_NETWORK_TYPE fixed bin (4) unsigned internal static options (constant) init (2); 4 37 4 38 dcl NETWORK_TYPE_VALUES (0:2) char(8) varying int static options(constant) init( 4 39 "MCS", 4 40 "DSA", 4 41 "MOWSE"); 4 42 4 43 4 44 /* MCS event message type constants */ 4 45 4 46 dcl MAX_MCS_EVENT_MSG_TYPE fixed bin internal static options (constant) init (8); 4 47 4 48 dcl MCS_UNSPECIFIED_MSG fixed bin internal static options (constant) init (0); 4 49 /* used for "start" order, etc. */ 4 50 dcl MCS_DIALUP_MSG fixed bin internal static options (constant) init (1); 4 51 /* dialup */ 4 52 dcl MCS_HANGUP_MSG fixed bin internal static options (constant) init (2); 4 53 /* hangup */ 4 54 dcl MCS_DIALOUT_MSG fixed bin internal static options (constant) init (3); 4 55 /* dialout status returned */ 4 56 dcl MCS_QUIT_MSG fixed bin internal static options (constant) init (4); 4 57 /* quit */ 4 58 dcl MCS_READ_MSG fixed bin internal static options (constant) init (5); 4 59 /* input arrived */ 4 60 dcl MCS_WRITE_MSG fixed bin internal static options (constant) init (6); 4 61 /* output completed */ 4 62 dcl MCS_LINE_STATUS_MSG fixed bin internal static options (constant) init (7); 4 63 /* control tables sent status */ 4 64 dcl MCS_MASKED_MSG fixed bin internal static options (constant) init (8); 4 65 /* channel masked by FNP */ 4 66 4 67 dcl MCS_MSG_TYPE_TO_PNAME (0:8) char (20) internal static options (constant) init ("unspecified", 4 68 /* 0 */ 4 69 "dialup", /* 1 */ 4 70 "hangup", /* 2 */ 4 71 "dialout status", /* 3 */ 4 72 "quit", /* 4 */ 4 73 "read", /* 5 */ 4 74 "write", /* 6 */ 4 75 "line status", /* 7 */ 4 76 "masked"); /* 8 */ 4 77 4 78 /* DSA event message type constants */ 4 79 4 80 dcl MAX_DSA_EVENT_MSG_TYPE fixed bin internal static options (constant) init (19); 4 81 4 82 dcl DSA_UNSPECIFIED_MSG fixed bin (8) uns internal static options (constant) init (0); 4 83 dcl DSA_ATTENTION_MSG fixed bin (8) uns internal static options (constant) init (1); 4 84 dcl DSA_DATA_ATTENTION_MSG fixed bin (8) uns internal static options (constant) init (2); 4 85 dcl DSA_DEMAND_RELEASE_SRU_MSG fixed bin (8) uns internal static options (constant) init (3); 4 86 dcl DSA_DEMAND_TURN_MSG fixed bin (8) uns internal static options (constant) init (4); 4 87 dcl DSA_DEMAND_TURN_ACK_MSG fixed bin (8) uns internal static options (constant) init (5); 4 88 dcl DSA_PURGE_MSG fixed bin (8) uns internal static options (constant) init (6); 4 89 dcl DSA_RECOVER_MSG fixed bin (8) uns internal static options (constant) init (7); 4 90 dcl DSA_RECOVER_ACK_MSG fixed bin (8) uns internal static options (constant) init (8); 4 91 dcl DSA_RELEASE_SRU_MSG fixed bin (8) uns internal static options (constant) init (9); 4 92 dcl DSA_RESUME_MSG fixed bin (8) uns internal static options (constant) init (10); 4 93 dcl DSA_RESUME_ACK_MSG fixed bin (8) uns internal static options (constant) init (11); 4 94 dcl DSA_SUSPEND_MSG fixed bin (8) uns internal static options (constant) init (12); 4 95 dcl DSA_SUSPEND_ACK_MSG fixed bin (8) uns internal static options (constant) init (13); 4 96 dcl DSA_TERM_ABNORMAL_MSG fixed bin (8) uns internal static options (constant) init (14); 4 97 dcl DSA_ESTABLISHMENT_MSG fixed bin (8) uns internal static options (constant) init (15); 4 98 dcl DSA_TERMINATED_MSG fixed bin (8) uns internal static options (constant) init (16); 4 99 dcl DSA_USER_UNASSIGN_MSG fixed bin (8) uns internal static options (constant) init (17); 4 100 dcl DSA_DATA_INPUT_MSG fixed bin (8) uns internal static options (constant) init (18); 4 101 dcl DSA_DATA_OUTPUT_MSG fixed bin (8) uns internal static options (constant) init (19); 4 102 4 103 dcl DSA_MSG_TYPE_TO_PNAME (0:19) char (20) internal static options (constant) init ("unspecified", 4 104 /* 0 */ 4 105 "attention", /* 1 */ 4 106 "data_attention", /* 2 */ 4 107 "demand_release_sru", /* 3 */ 4 108 "demand_turn", /* 4 */ 4 109 "demand_turn_ack", /* 5 */ 4 110 "purge", /* 6 */ 4 111 "recover", /* 7 */ 4 112 "recover_ack", /* 8 */ 4 113 "release_sru", /* 9 */ 4 114 "resume", /* 10 */ 4 115 "resume_ack", /* 11 */ 4 116 "suspend", /* 12 */ 4 117 "suspend_ack", /* 13 */ 4 118 "terminate_abnormal", /* 14 */ 4 119 "establishment", /* 15 */ 4 120 "terminated", /* 16 */ 4 121 "user_unassign", /* 17 */ 4 122 "data input", /* 18 */ 4 123 "data output"); /* 19 */ 4 124 4 125 /* END INCLUDE FILE ... net_event_message.incl.pl1 */ 159 5 1 /* BEGIN: tty_attach_data_.incl.pl1 * * * * * */ 5 2 5 3 5 4 /****^ HISTORY COMMENTS: 5 5* 1) change(81-01-01,Margulies), approve(), audit(), install(): 5 6* Created from internal declarations. 5 7* 2) change(85-12-01,Negaret), approve(87-07-23,MCR7742), 5 8* audit(87-07-23,GDixon), install(87-08-04,MR12.1-1056): 5 9* Add network_type and tty_handle. 5 10* END HISTORY COMMENTS */ 5 11 5 12 5 13 /* format: style2 */ 5 14 5 15 /* INTERNAL INTERFACE -- SUBJECT TO CHANGE */ 5 16 5 17 dcl attach_data_ptr pointer; 5 18 dcl 1 attach_data aligned based (attach_data_ptr), 5 19 2 attach_descrip character (128) varying, 5 20 2 open_descrip character (64) varying, 5 21 2 device_id character (32) unaligned, 5 22 /* given in atd */ 5 23 2 device_used character (32) unaligned, 5 24 /* aquired by dm_ */ 5 25 2 dial_phone character (64) varying, 5 26 2 dial_id character (32) unaligned, 5 27 2 resource_desc character (256) unaligned, 5 28 2 network_type fixed bin, 5 29 2 tty_index fixed bin, 5 30 2 tty_handle fixed bin (35), 5 31 2 operation_hlock fixed bin, /* if this is nonzero detach may not free this structure */ 5 32 2 flags aligned, 5 33 3 assigned_ev_channel 5 34 bit (1) unaligned, /* we got the channel as fast channel */ 5 35 3 created_ev_channel 5 36 bit (1) unaligned, /* we got it as slow channel */ 5 37 3 have_ev_channel bit (1) unaligned, /* there is a channel to use */ 5 38 3 login_channel bit (1) unaligned, /* we are login channel */ 5 39 3 phone_given bit (1) unaligned, /* dial_out */ 5 40 3 accept_dial bit (1) unaligned, /* wait for terminal to dial */ 5 41 3 must_release bit (1) unaligned, /* we must call release channel */ 5 42 3 no_block bit (1) unaligned, /* never block */ 5 43 3 async_close bit (1) unaligned, /* close with hlock nonzero */ 5 44 3 async_detach bit (1) unaligned, /* detach_iocb with hlock nonzero */ 5 45 3 hangup bit (1) unaligned, 5 46 3 async_hangup bit (1) unaligned, /* channel was hungup (and released) by AS */ 5 47 3 have_user_hangup_proc 5 48 bit (1) unaligned, /* user has supplied a hangup procedure */ 5 49 3 pad bit (23) unaligned, 5 50 2 dial_manager_event aligned like event_wait_channel, 5 51 2 event_wait aligned like event_wait_channel, 5 52 2 user_hangup_proc, /* user supplied hangup procedure */ 5 53 3 procedure entry (pointer) variable, 5 54 3 data_ptr pointer, 5 55 2 mode_string_info aligned, 5 56 3 max_mode_length fixed bin (35), 5 57 3 mode_string char (tty_max_mode_length refer (attach_data.max_mode_length)) unaligned, 5 58 2 temp_mode_string char (tty_max_mode_length refer (attach_data.max_mode_length)) unaligned; 5 59 5 60 declare tty_max_mode_length fixed bin (21); 5 61 6 1 /* BEGIN INCLUDE FILE ... event_wait_channel.incl.pl1 */ 6 2 6 3 /* ipc_$block wait list with one channel 6 4* 6 5* Written 9-May-79 by M. N. Davidoff. 6 6**/ 6 7 6 8 declare 1 event_wait_channel aligned, 6 9 2 n_channels fixed bin initial (1), /* number of channels */ 6 10 2 pad bit (36), 6 11 2 channel_id (1) fixed bin (71); /* event channel to wait on */ 6 12 6 13 /* END INCLUDE FILE ... event_wait_channel.incl.pl1 */ 5 62 5 63 5 64 /* END OF: tty_attach_data_.incl.pl1 * * * * * */ 160 7 1 /* BEGIN INCLUDE FILE ..... iocb.incl.pl1 ..... 13 Feb 1975, M. Asherman */ 7 2 /* Modified 11/29/82 by S. Krupp to add new entries and to change 7 3* version number to IOX2. */ 7 4 /* format: style2 */ 7 5 7 6 dcl 1 iocb aligned based, /* I/O control block. */ 7 7 2 version character (4) aligned, /* IOX2 */ 7 8 2 name char (32), /* I/O name of this block. */ 7 9 2 actual_iocb_ptr ptr, /* IOCB ultimately SYNed to. */ 7 10 2 attach_descrip_ptr ptr, /* Ptr to printable attach description. */ 7 11 2 attach_data_ptr ptr, /* Ptr to attach data structure. */ 7 12 2 open_descrip_ptr ptr, /* Ptr to printable open description. */ 7 13 2 open_data_ptr ptr, /* Ptr to open data structure (old SDB). */ 7 14 2 reserved bit (72), /* Reserved for future use. */ 7 15 2 detach_iocb entry (ptr, fixed (35)),/* detach_iocb(p,s) */ 7 16 2 open entry (ptr, fixed, bit (1) aligned, fixed (35)), 7 17 /* open(p,mode,not_used,s) */ 7 18 2 close entry (ptr, fixed (35)),/* close(p,s) */ 7 19 2 get_line entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 7 20 /* get_line(p,bufptr,buflen,actlen,s) */ 7 21 2 get_chars entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 7 22 /* get_chars(p,bufptr,buflen,actlen,s) */ 7 23 2 put_chars entry (ptr, ptr, fixed (21), fixed (35)), 7 24 /* put_chars(p,bufptr,buflen,s) */ 7 25 2 modes entry (ptr, char (*), char (*), fixed (35)), 7 26 /* modes(p,newmode,oldmode,s) */ 7 27 2 position entry (ptr, fixed, fixed (21), fixed (35)), 7 28 /* position(p,u1,u2,s) */ 7 29 2 control entry (ptr, char (*), ptr, fixed (35)), 7 30 /* control(p,order,infptr,s) */ 7 31 2 read_record entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 7 32 /* read_record(p,bufptr,buflen,actlen,s) */ 7 33 2 write_record entry (ptr, ptr, fixed (21), fixed (35)), 7 34 /* write_record(p,bufptr,buflen,s) */ 7 35 2 rewrite_record entry (ptr, ptr, fixed (21), fixed (35)), 7 36 /* rewrite_record(p,bufptr,buflen,s) */ 7 37 2 delete_record entry (ptr, fixed (35)),/* delete_record(p,s) */ 7 38 2 seek_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 7 39 /* seek_key(p,key,len,s) */ 7 40 2 read_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 7 41 /* read_key(p,key,len,s) */ 7 42 2 read_length entry (ptr, fixed (21), fixed (35)), 7 43 /* read_length(p,len,s) */ 7 44 2 open_file entry (ptr, fixed bin, char (*), bit (1) aligned, fixed bin (35)), 7 45 /* open_file(p,mode,desc,not_used,s) */ 7 46 2 close_file entry (ptr, char (*), fixed bin (35)), 7 47 /* close_file(p,desc,s) */ 7 48 2 detach entry (ptr, char (*), fixed bin (35)); 7 49 /* detach(p,desc,s) */ 7 50 7 51 declare iox_$iocb_version_sentinel 7 52 character (4) aligned external static; 7 53 7 54 /* END INCLUDE FILE ..... iocb.incl.pl1 ..... */ 161 162 163 /* parse arguments */ 164 165 nargs = cu_$arg_count (); 166 if nargs = 0 /* no arguments, tell user what to do */ 167 then do; 168 call com_err_ (error_table_$noarg, cmd_name, "Usage: set_tty -control_args"); 169 return; 170 end; 171 172 tab_int_switch, line_ind_switch, page_ind_switch = "0"b; 173 174 reset_switch, modes_switch, tabs_switch, initial_string_switch, print_switch, set_edit_switch, 175 print_edit_switch, set_delay_switch, print_delay_switch, set_frame_switch, print_frame_switch, all_switch, 176 set_ifc_switch, set_osr_switch, set_oea_switch, set_bsize_switch, type_switch, brief_switch = "0"b; 177 /* initially nothing specified */ 178 editing_chars_version = 0; /* uninitialized, might have to test */ 179 180 standard_line_type = "1"b; 181 iocbp = iox_$user_io; /* default, may be overridden by "-switch" */ 182 183 do iarg = 1 to nargs; 184 call cu_$arg_ptr (iarg, argptr, arglen, code); 185 if substr (arg, 1, 1) = "-" /* must be control argument */ 186 then do; 187 188 /* START DSA */ 189 if arg = "-tab_interval" | arg = "-ti" 190 then do; 191 tab_int_switch = "1"b; 192 call get_next_arg; /* and increment iarg */ 193 if code ^= 0 194 then return; 195 196 tab_int = cv_dec_check_ (arg, code); 197 if code ^= 0 | tab_int > 256 198 then do; 199 call com_err_ (code, cmd_name, "Bad tabulation interval: ^a (max is 256).", arg); 200 return; 201 end; 202 end; 203 204 else if arg = "-no_tab_interval" | arg = "-nti" 205 then do; 206 tab_int_switch = "1"b; 207 tab_int = 0; 208 end; 209 210 else if arg = "-line_indicator" | arg = "-li" 211 then do; 212 line_ind_switch = "1"b; 213 call get_next_arg; /* and increment iarg */ 214 if code ^= 0 215 then return; 216 217 if arglen > 2 218 then do; 219 call com_err_ (error_table_$bigarg, cmd_name, "^a (max length is 2).", arg); 220 return; 221 end; 222 223 line_ind = arg; 224 end; 225 226 else if arg = "-no_line_indicator" | arg = "-nli" 227 then do; 228 line_ind_switch = "1"b; 229 line_ind = ""; 230 end; 231 232 else if arg = "-page_indicator" | arg = "-pi" 233 then do; 234 page_ind_switch = "1"b; 235 call get_next_arg; /* and increment iarg */ 236 if code ^= 0 237 then return; 238 239 if arglen > 4 240 then do; 241 call com_err_ (error_table_$bigarg, cmd_name, "^a (Max length is 4).", arg); 242 return; 243 end; 244 245 page_ind = arg; 246 end; 247 248 else if arg = "-no_page_indicator" | arg = "-npi" 249 then do; 250 page_ind_switch = "1"b; 251 page_ind = ""; 252 end; 253 254 /* END DSA */ 255 256 else if arg = "-reset" | arg = "-rs" 257 then reset_switch = "1"b; 258 259 else if arg = "-terminal_type" | arg = "-ttp" 260 then go to type_arg; 261 262 else if arg = "-type" | arg = "-tp" | arg = "-device" | arg = "-dv" 263 then do; 264 type_arg: 265 type_switch = "1"b; 266 call get_next_arg; /* NOTE: this bumps iarg and gets next argument */ 267 if code ^= 0 268 then return; /* get_next_arg prints error message if required */ 269 270 271 /* make name be upper case */ 272 typename = translate (arg, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz"); 273 274 end; 275 276 else if arg = "-modes" | arg = "-md" 277 then do; 278 modes_switch = "1"b; 279 call get_next_arg; /* thereby bumping iarg */ 280 if code ^= 0 281 then return; 282 input_modes = arg; 283 end; 284 285 else if arg = "-io_switch" | arg = "-is" 286 then do; 287 call get_next_arg; /* which bumps iarg */ 288 if code ^= 0 289 then return; 290 291 call iox_$look_iocb (arg, iocbp, code); 292 /* get iocb for specified switch */ 293 if code ^= 0 /* couldn't get it */ 294 then do; 295 call com_err_ (code, cmd_name, "Could not find iocb for ^a", arg); 296 return; 297 end; 298 end; 299 300 else if arg = "-tabs" 301 then initial_string_switch, tabs_switch = "1"b; 302 303 else if arg = "-initial_string" | arg = "-istr" 304 then initial_string_switch = "1"b; 305 306 else if arg = "-edit" | arg = "-ed" 307 then do; 308 set_edit_switch = "1"b; 309 call get_next_arg; /* and increment iarg */ 310 if code ^= 0 311 then return; 312 313 if arglen > 3 314 then do; 315 call com_err_ (error_table_$bigarg, cmd_name, "^a", arg); 316 return; 317 end; 318 319 editing_chars.chars = ""; 320 editing_chars.chars = arg; 321 end; 322 323 else if arg = "-frame" | arg = "-fr" 324 then do; 325 set_frame_switch = "1"b; 326 call get_next_arg; 327 if code ^= 0 328 then return; 329 call check_two_chars; 330 if code ^= 0 331 then return; 332 333 framing_chars = arg; 334 end; 335 336 else if arg = "-delay" | arg = "-dly" 337 then do; 338 set_delay_switch = "1"b; 339 call get_next_arg; 340 if code ^= 0 341 then return; 342 343 if arg = "default" /* wants tty DIM to decide */ 344 then delay.default = 1; 345 346 else do; 347 unchanged_delays = "111111"b; /* initially not changing any */ 348 position = 1; 349 350 do i = 1 to 6 while (position <= arglen); 351 next_comma = index (substr (arg, position), ","); 352 if next_comma = 0 /* no more commas */ 353 then next_comma = arglen - position + 2; 354 /* use whole thing */ 355 356 if next_comma > 1 /* value is really there */ 357 then do; 358 substr (unchanged_delays, i, 1) = "0"b; 359 /* we're changing this one */ 360 if i = 2 | i = 4 /* this is one of the floating ones */ 361 then do; 362 on conversion go to bad_value; 363 addr (input_delays) -> based_float (i) = 364 float (substr (arg, position, next_comma - 1)); 365 revert conversion; 366 end; 367 368 else do; 369 addr (input_delays) -> based_fixed (i) = 370 cv_dec_check_ (substr (arg, position, next_comma - 1), code); 371 if code ^= 0 372 then go to bad_value; 373 end; 374 end; 375 376 position = position + next_comma; 377 end; 378 379 if i > 6 & position <= arglen + 1 380 then do; 381 call com_err_ (0, cmd_name, "More than 6 delay values specified. ^a", arg); 382 return; 383 end; 384 385 delay.default = 0; 386 end; 387 388 delay.version = 1; 389 end; 390 391 else if arg = "-input_flow_control" | arg = "-ifc" 392 then do; 393 set_ifc_switch = "1"b; 394 call get_next_arg; 395 if code ^= 0 396 then return; 397 if arglen > 2 /* can't be */ 398 then do; 399 call com_err_ (error_table_$bigarg, cmd_name, "^a", arg); 400 return; 401 end; 402 403 else if arglen = 2 404 then do; 405 if substr (arg, 2, 1) = NUL 406 then auto_ifc.suspend_seq.count, auto_ifc.resume_seq.count = 0; 407 else do; 408 auto_ifc.suspend_seq.count = 1; 409 substr (auto_ifc.suspend_seq.chars, 1, 1) = substr (arg, 1, 1); 410 auto_ifc.resume_seq.count = 1; 411 substr (auto_ifc.resume_seq.chars, 1, 1) = substr (arg, 2, 1); 412 end; 413 auto_ifc.timeout = "0"b; 414 end; 415 416 else if arglen = 1 417 then do; 418 auto_ifc.suspend_seq.count = 0; 419 if arg = NUL 420 then do; 421 auto_ifc.resume_seq.count = 0; 422 auto_ifc.timeout = "0"b; 423 end; 424 425 else do; 426 auto_ifc.resume_seq.count = 1; 427 substr (auto_ifc.resume_seq.chars, 1, 1) = arg; 428 auto_ifc.timeout = "1"b; /* this follows from lack of suspend char */ 429 end; 430 end; 431 432 else do; 433 call com_err_ (0, cmd_name, 434 "Null character string specified for input flow control character."); 435 return; 436 end; 437 end; 438 439 else if arg = "-output_suspend_resume" | arg = "-osr" 440 then do; 441 set_osr_switch = "1"b; 442 call get_next_arg; 443 if code ^= 0 444 then return; 445 call check_two_chars; 446 if code ^= 0 447 then return; 448 449 if substr (arg, 1, 1) = NUL /* no characters */ 450 then auto_ofc.suspend_or_etb_seq.count, auto_ofc.resume_or_ack_seq.count = 0; 451 else do; 452 auto_ofc.suspend_or_etb_seq.count = 1; 453 auto_ofc.resume_or_ack_seq.count = 1; 454 substr (auto_ofc.suspend_or_etb_seq.chars, 1, 1) = substr (arg, 1, 1); 455 substr (auto_ofc.resume_or_ack_seq.chars, 1, 1) = substr (arg, 2, 1); 456 end; 457 end; 458 459 else if arg = "-output_etb_ack" | arg = "-oea" 460 then do; 461 set_oea_switch = "1"b; 462 call get_next_arg; 463 if code ^= 0 464 then return; 465 call check_two_chars; 466 if code ^= 0 467 then return; 468 469 if substr (arg, 1, 1) = NUL /* no characters */ 470 then auto_ofc.suspend_or_etb_seq.count, auto_ofc.resume_or_ack_seq.count = 0; 471 else do; 472 auto_ofc.suspend_or_etb_seq.count = 1; 473 auto_ofc.resume_or_ack_seq.count = 1; 474 substr (auto_ofc.suspend_or_etb_seq.chars, 1, 1) = substr (arg, 1, 1); 475 substr (auto_ofc.resume_or_ack_seq.chars, 1, 1) = substr (arg, 2, 1); 476 end; 477 end; 478 479 else if arg = "-buffer_size" | arg = "-bsize" 480 then do; 481 set_bsize_switch = "1"b; 482 call get_next_arg; 483 if code ^= 0 484 then return; 485 486 auto_ofc.buffer_size = cv_dec_check_ (arg, code); 487 if code ^= 0 | auto_ofc.buffer_size <= 0 488 then do; 489 call com_err_ (0, cmd_name, "^a is not a valid buffer size.", arg); 490 return; 491 end; 492 end; 493 494 else if arg = "-print" | arg = "-pr" 495 then print_switch = "1"b; 496 497 else if arg = "-brief" | arg = "-bf" 498 then brief_switch = "1"b; 499 500 else if arg = "-print_edit" | arg = "-pr_ed" 501 then print_edit_switch = "1"b; 502 503 else if arg = "-print_delay" | arg = "-pr_dly" 504 then print_delay_switch = "1"b; 505 506 else if arg = "-print_frame" | arg = "-pr_fr" 507 then print_frame_switch = "1"b; 508 509 else if arg = "-a" | arg = "-all" 510 then print_switch, print_edit_switch, print_delay_switch, print_frame_switch, all_switch = "1"b; 511 512 else go to bad_arg; 513 end; 514 515 else do; /* arg doesn't begin with "-" */ 516 bad_arg: 517 call com_err_ (error_table_$badopt, cmd_name, "^a", arg); 518 return; 519 end; 520 521 end /* end of argument parsing */; 522 523 if brief_switch & ^print_switch 524 then do; 525 call com_err_ (error_table_$inconsistent, cmd_name, "-brief and not -print"); 526 return; 527 end; 528 529 /* Get the network id; */ 530 /* by default we are in MCS NET */ 531 532 call iox_$control (iocbp, "get_network_type", addr (network_type), code); 533 if code = error_table_$undefined_order_request 534 then do; 535 network_type = MCS_NETWORK_TYPE; 536 code = 0; 537 end; 538 else if code = 0 539 then do; 540 if network_type ^= MCS_NETWORK_TYPE & 541 network_type ^= DSA_NETWORK_TYPE & 542 network_type ^= MOWSE_NETWORK_TYPE 543 then do; 544 call com_err_ (error_table_$action_not_performed, cmd_name, "Invalid network type."); 545 return; 546 end; 547 end; 548 else do; 549 call com_err_ (0, cmd_name, "Unable to get network_type."); 550 return; 551 end; 552 553 554 t_info.version = terminal_info_version; 555 call iox_$control (iocbp, "terminal_info", addr (t_info), code); 556 if code ^= 0 557 then go to error; 558 559 if t_info.line_type < 0 | t_info.line_type > max_tty_line_type 560 /* not a recognizable TTY line type */ 561 then standard_line_type = "0"b; /* must not be standard_line_type */ 562 563 if type_switch 564 then do; /* handle type argument */ 565 stt_info.version = stti_version_1; 566 stt_info.name = typename; 567 string (stt_info.flags) = ""b; 568 stt_info.flags.send_initial_string = standard_line_type; 569 stt_info.flags.set_modes = "1"b; 570 call iox_$control (iocbp, "set_term_type", addr (stt_info), code); 571 if code ^= 0 572 then go to error; 573 end; 574 575 else typename = t_info.term_type; /* remember unchanged terminal type name */ 576 577 if reset_switch 578 then do; 579 call iox_$control (iocbp, "set_default_modes", null, code); 580 if code ^= 0 581 then go to error; 582 end; 583 584 if tab_int_switch 585 then do; 586 /*** set the tabulation interval */ 587 /*** Only valid in DSA */ 588 if network_type ^= DSA_NETWORK_TYPE 589 then call com_err_ (error_table_$unsupported_operation, cmd_name); 590 else do; 591 592 call iox_$control (iocbp, "set_tabulation", addr (tab_int), code); 593 594 if code ^= 0 595 then do; 596 call com_err_ (code, cmd_name, "Tabulation interval not set."); 597 tab_int_switch = "0"b; /* so if "print_all" we'll have to get it */ 598 end; 599 end; 600 end; 601 602 if line_ind_switch 603 then do; 604 /*** set the line indicator */ 605 /*** Only valid in DSA */ 606 if network_type ^= DSA_NETWORK_TYPE 607 then call com_err_ (error_table_$unsupported_operation, cmd_name); 608 else do; 609 610 call iox_$control (iocbp, "set_line_indicator", addr (line_ind), code); 611 612 if code ^= 0 613 then do; 614 call com_err_ (code, cmd_name, "Line indicator not set."); 615 line_ind_switch = "0"b; /* so if "print_all" we'll have to get it */ 616 end; 617 end; 618 end; 619 620 if page_ind_switch 621 then do; 622 /*** set the page indicator */ 623 /*** Only valid in DSA */ 624 if network_type ^= DSA_NETWORK_TYPE 625 then call com_err_ (error_table_$unsupported_operation, cmd_name); 626 else do; 627 628 call iox_$control (iocbp, "set_page_indicator", addr (page_ind), code); 629 630 if code ^= 0 631 then do; 632 call com_err_ (code, cmd_name, "Page indicator not set."); 633 page_ind_switch = "0"b; /* so if "print_all" we'll have to get it */ 634 end; 635 end; 636 end; 637 638 /* Set various mode-related characters before the modes themselves */ 639 640 if set_ifc_switch 641 then do; 642 /*** set the input flow control characters */ 643 /*** Only valid in MCS */ 644 if network_type ^= MCS_NETWORK_TYPE 645 then call com_err_ (error_table_$unsupported_operation, cmd_name); 646 else do; 647 648 call iox_$control (iocbp, "input_flow_control_chars", addr (auto_ifc), code); 649 if code ^= 0 650 then do; 651 set_ifc_switch = "0"b; 652 call com_err_ (code, cmd_name, "Input flow control characters not set."); 653 end; 654 end; 655 end; 656 657 if set_oea_switch | set_bsize_switch 658 then do; 659 /*** set the output block control or size */ 660 /*** Only valid in MCS */ 661 if network_type ^= MCS_NETWORK_TYPE 662 then call com_err_ (error_table_$unsupported_operation, cmd_name); 663 else do; 664 665 if set_osr_switch /* this is invalid combination */ 666 then do; 667 call com_err_ (error_table_$inconsistent, cmd_name, "No output flow controls set."); 668 set_osr_switch = "0"b; /* make sure error message is true */ 669 end; 670 671 else do; 672 auto_ofc.block_acknowledge = (auto_ofc.suspend_or_etb_seq.count ^= 0); 673 auto_ofc.suspend_resume = "0"b; 674 auto_ofc.mbz = "0"b; 675 if ^set_bsize_switch /* chars only, buffer size already set (or set later) */ 676 then auto_ofc.buffer_size = 0; 677 else if ^set_oea_switch 678 then do; 679 unspec (auto_ofc.suspend_or_etb_seq) = "0"b; 680 unspec (auto_ofc.resume_or_ack_seq) = "0"b; 681 end; 682 683 call iox_$control (iocbp, "output_flow_control_chars", addr (auto_ofc), code); 684 if code ^= 0 685 then do; 686 set_oea_switch, set_bsize_switch = "0"b; 687 call com_err_ (code, cmd_name, "Output block control and/or size not set."); 688 end; 689 end; 690 end; 691 end; 692 693 if set_osr_switch 694 then do; 695 /*** set output suspend/resume characters */ 696 /*** Only valid in MCS */ 697 if network_type ^= MCS_NETWORK_TYPE 698 then call com_err_ (error_table_$unsupported_operation, cmd_name); 699 else do; 700 701 auto_ofc.suspend_resume = (auto_ofc.suspend_or_etb_seq.count ^= 0); 702 auto_ofc.block_acknowledge = "0"b; 703 auto_ofc.mbz = "0"b; 704 call iox_$control (iocbp, "output_flow_control_chars", addr (auto_ofc), code); 705 if code ^= 0 706 then do; 707 set_osr_switch = "0"b; 708 call com_err_ (code, cmd_name, "Output suspend/resume characters not set."); 709 end; 710 end; 711 end; 712 713 if set_frame_switch & standard_line_type 714 then do; 715 /*** set framing characters */ 716 /*** Only valid in MCS */ 717 if network_type ^= MCS_NETWORK_TYPE 718 then call com_err_ (error_table_$unsupported_operation, cmd_name); 719 else do; 720 721 call iox_$control (iocbp, "set_framing_chars", addr (framing_chars), code); 722 if code ^= 0 723 then do; 724 call com_err_ (code, cmd_name, "Framing characters not set."); 725 set_frame_switch = "0"b; /* so if "print_frame" we'll get them from ring 0 */ 726 end; 727 end; 728 end; 729 730 if modes_switch 731 then do; 732 /*** whether we already set modes or not, we will make */ 733 /*** a call for what the user specified explicitly */ 734 735 call iox_$modes (iocbp, input_modes, out_modes, code); 736 if code ^= 0 737 then if code = error_table_$bad_mode & standard_line_type 738 then do; 739 call com_err_ (code, cmd_name, "^a", out_modes); 740 return; 741 end; 742 else go to error; 743 end; 744 745 if initial_string_switch 746 then do; /* set the tabs if possible */ 747 call iox_$control (iocbp, "send_initial_string", null, code); 748 if code ^= 0 749 then call com_err_ (code, cmd_name, "^[Tabs not set.^;Initial string not sent.^]", tabs_switch); 750 end; 751 752 if set_edit_switch 753 then do; 754 /*** MCS: set erase and kill characters */ 755 /*** DSA: set erase, kill and redisplay characters */ 756 /* Note, however, that even over a DSA network we may have an I/O module 757* that doesn't understand version 3 structure, in which case 758* we will retry with version 2 */ 759 760 if network_type = DSA_NETWORK_TYPE 761 then editing_chars.version, editing_chars_version = 3; 762 else editing_chars.version, editing_chars_version = 2; 763 RETRY_SET_EDIT: 764 call iox_$control (iocbp, "set_editing_chars", addr (editing_chars), code); 765 766 if code ^= 0 767 then do; 768 if code = error_table_$unimplemented_version & editing_chars_version = 3 769 then do; 770 editing_chars.version, editing_chars_version = 2; 771 go to RETRY_SET_EDIT; 772 end; 773 774 call com_err_ (code, cmd_name, "Editing characters not set."); 775 set_edit_switch = "0"b; /* so if "print_edit" we'll call ring 0 to get them */ 776 end; 777 end; 778 779 if set_delay_switch & standard_line_type 780 then do; 781 /*** set delay timings */ 782 /*** Only valid in MCS */ 783 if network_type ^= MCS_NETWORK_TYPE 784 then call com_err_ (error_table_$unsupported_operation, cmd_name); 785 else do; 786 787 if delay.default = 0 /* we're supplying them */ 788 then do; 789 if unchanged_delays /* have to get old ones */ 790 then do; 791 call iox_$control (iocbp, "get_delay", addr (delay), code); 792 if code ^= 0 793 then go to not_set; 794 795 do i = 1 to 6; 796 if ^substr (unchanged_delays, i, 1) 797 then addr (delay.values) -> based_fixed (i) = addr (input_delays) -> based_fixed (i); 798 end; 799 end; 800 801 else delay.values = input_delays; /* we have them all */ 802 end; 803 804 call iox_$control (iocbp, "set_delay", addr (delay), code); 805 806 if code ^= 0 807 then do; 808 not_set: 809 call com_err_ (code, cmd_name, "Delays not set."); 810 set_delay_switch = "0"b; /* in case we're printing them */ 811 end; 812 end; 813 end; 814 815 if print_switch 816 then do; 817 /*** user wants to know what happened */ 818 819 call iox_$modes (iocbp, "", out_modes, code);/* find out what the modes are now */ 820 if brief_switch 821 then /* user wants short modes string */ 822 call print_bf (out_modes); 823 else call ioa_ ("Type: ^a^/Modes: ^a", typename, out_modes); 824 end; 825 826 if print_edit_switch 827 then do; 828 /*** wants to know his editing characters */ 829 830 if set_edit_switch /* we already know them */ 831 & index (editing_chars.chars, " ") = 0 /* didn't default either one */ 832 then code = 0; 833 else do; 834 835 editing_chars.chars = ""; 836 837 if editing_chars_version ^= 0 838 then editing_chars.version = editing_chars_version; 839 /* we've already figured this out, possibly by trial and error */ 840 841 else if network_type = DSA_NETWORK_TYPE 842 then editing_chars.version, editing_chars_version = 3; 843 else /* MCS_NETWORK_TYPE */ 844 editing_chars.version, editing_chars_version = 2; 845 846 RETRY_GET_EDIT: 847 call iox_$control (iocbp, "get_editing_chars", addr (editing_chars), code); 848 end; 849 850 if code = 0 851 then do; 852 if editing_chars_version = 3 & network_type = DSA_NETWORK_TYPE 853 then call ioa_ ("Erase: ^a, Kill: ^a, Redisplay: ^a, Quote (unchangeable): \", 854 cv_edit_char (substr (editing_chars.chars, 1, 1)), 855 cv_edit_char (substr (editing_chars.chars, 2, 1)), 856 cv_edit_char (substr (editing_chars.chars, 3, 1))); 857 else call ioa_ ("Erase: ^a, Kill: ^a", cv_edit_char (substr (editing_chars.chars, 1, 1)), 858 cv_edit_char (substr (editing_chars.chars, 2, 1))); 859 end; 860 861 else do; /* if we hadn't done a set, this might the first time we learned we had the wrong version */ 862 if code = error_table_$unimplemented_version & editing_chars_version = 3 863 then do; 864 editing_chars.version, editing_chars_version = 2; 865 go to RETRY_GET_EDIT; 866 end; 867 868 call com_err_ (code, cmd_name, "Cannot print editing characters."); 869 end; 870 end; 871 872 if all_switch 873 then do; 874 875 /*** DSA specific */ 876 877 if network_type = DSA_NETWORK_TYPE 878 then do; 879 880 if tab_int_switch /* we already know it */ 881 then code = 0; 882 else call iox_$control (iocbp, "get_tabulation", addr (tab_int), code); 883 884 if code = 0 885 then call ioa_ ("Tab interval : ^i", tab_int); 886 else call com_err_ (code, cmd_name, "Cannot print tab interval."); 887 888 if line_ind_switch /* we already know it */ 889 then code = 0; 890 else call iox_$control (iocbp, "get_line_indicator", addr (line_ind), code); 891 892 if code = 0 893 then call ioa_ ("Line indicator: ^a", line_ind); 894 else call com_err_ (code, cmd_name, "Cannot print line indicator."); 895 896 if page_ind_switch /* we already know it */ 897 then code = 0; 898 else call iox_$control (iocbp, "get_page_indicator", addr (page_ind), code); 899 900 if code = 0 901 then call ioa_ ("Page indicator: ^a", page_ind); 902 else call com_err_ (code, cmd_name, "Cannot print page indicator."); 903 904 end; 905 end; 906 907 /*** MCS or MOWSE specific */ 908 if network_type = MCS_NETWORK_TYPE | network_type = MOWSE_NETWORK_TYPE 909 then do; 910 911 if print_frame_switch & standard_line_type 912 then do; 913 if set_frame_switch /* we already know the framing chars */ 914 then code = 0; 915 else call iox_$control (iocbp, "get_framing_chars", addr (framing_chars), code); 916 917 if code = 0 918 then call ioa_ ("Frame_begin: ^a, Frame_end: ^a", substr (framing_chars, 1, 1), 919 substr (framing_chars, 2, 1)); 920 921 else call com_err_ (code, cmd_name, "Cannot print framing characters."); 922 end; 923 924 if print_delay_switch & standard_line_type /* he wants to know delay times */ 925 then do; 926 if set_delay_switch & delay.default = 0 927 then code = 0; /* they're what you said */ 928 else do; 929 delay.version = 1; 930 call iox_$control (iocbp, "get_delay", addr (delay), code); 931 end; 932 933 if code = 0 934 then call ioa_ ( 935 "Delays: vert_nl ^d, horz_nl ^6.3f, const_tab ^d, var_tab ^6.3f, backspace ^d, vt_ff ^d", 936 delay.values.vert_nl, delay.values.horz_nl, delay.values.const_tab, delay.values.var_tab, 937 delay.values.backspace, delay.values.vt_ff); 938 else call com_err_ (code, cmd_name, "Cannot print delay values."); 939 end; 940 941 if all_switch & standard_line_type 942 then do; 943 code = 0; 944 if ^set_ifc_switch 945 then do; 946 call iox_$control (iocbp, "get_ifc_info", addr (auto_ifc), code); 947 if code ^= 0 948 then call com_err_ (code, cmd_name, "Cannot print input flow control information."); 949 end; 950 951 if code = 0 952 then if auto_ifc.resume_seq.count ^= 0 953 then if auto_ifc.suspend_seq.count = 0 954 then call ioa_ ("input resume: ^a, timeout", 955 substr (auto_ifc.resume_seq.chars, 1, auto_ifc.resume_seq.count)); 956 else call ioa_ ("input suspend: ^a; input resume: ^a", 957 substr (auto_ifc.suspend_seq.chars, 1, auto_ifc.suspend_seq.count), 958 substr (auto_ifc.resume_seq.chars, 1, auto_ifc.resume_seq.count)); 959 960 code = 0; 961 if ^(set_osr_switch | (set_oea_switch & set_bsize_switch)) 962 /* some output flow control we didn't set */ 963 then do; 964 call iox_$control (iocbp, "get_ofc_info", addr (auto_ofc), code); 965 if code ^= 0 966 then call com_err_ (code, cmd_name, "Cannot print output flow control information."); 967 end; 968 969 if code = 0 970 then if auto_ofc.suspend_resume 971 then call ioa_ ("output suspend: ^a; output resume: ^a", 972 substr (auto_ofc.suspend_or_etb_seq.chars, 1, auto_ofc.suspend_or_etb_seq.count), 973 substr (auto_ofc.resume_or_ack_seq.chars, 1, auto_ofc.resume_or_ack_seq.count)); 974 975 else if auto_ofc.block_acknowledge 976 then call ioa_ ("output end_of_block: ^a; acknowledge: ^a, buffer size = ^d", 977 substr (auto_ofc.suspend_or_etb_seq.chars, 1, auto_ofc.suspend_or_etb_seq.count), 978 substr (auto_ofc.resume_or_ack_seq.chars, 1, auto_ofc.resume_or_ack_seq.count), 979 auto_ofc.buffer_size); 980 end; 981 end; 982 983 else do; /* DSA_NETWORK_TYPE */ 984 if (print_frame_switch | print_delay_switch) & ^all_switch 985 then call com_err_ (error_table_$unsupported_operation, "-print_frame or print_delay"); 986 end; 987 return; /* all done */ 988 989 990 error: /* here if something went mysteriously wrong */ 991 call com_err_ (code, cmd_name); 992 return; 993 994 bad_value: 995 call com_err_ (0, cmd_name, "^a is not a valid delay value.", substr (arg, position, next_comma - 1)); 996 return; 997 998 cv_edit_char: 999 proc (edit_char) returns (char (2) var); 1000 1001 /* convert an editing character in a form understandable by the user */ 1002 1003 dcl edit_char char (1); 1004 dcl rk fixed bin; 1005 1006 rk = rank (edit_char); 1007 1008 if rk < 32 1009 then return (printable_ctl_char (rk)); 1010 else return (edit_char); 1011 1012 end; 1013 1014 1015 get_next_arg: 1016 proc; 1017 1018 /* This internal procedure is used to get the second argument of a pair */ 1019 1020 iarg = iarg + 1; 1021 call cu_$arg_ptr (iarg, argptr, arglen, code); 1022 if code ^= 0 1023 then call com_err_ (code, cmd_name); 1024 return; 1025 end; 1026 1027 1028 check_two_chars: 1029 proc; 1030 1031 /* This internal procedure checks to make sure that an argument is exactly 2 chars long */ 1032 1033 if arglen ^= 2 1034 then do; 1035 if arglen > 2 1036 then code = error_table_$bigarg; 1037 else code = error_table_$smallarg; 1038 call com_err_ (code, cmd_name, "^a", arg); 1039 end; 1040 end; 1041 1042 print_bf: 1043 proc (sstr); 1044 1045 dcl sstr char (*), 1046 tstr char (256) varying, 1047 sidx fixed bin, 1048 (notidx, comidx) fixed bin; 1049 1050 tstr = ""; 1051 sidx = 1; 1052 comidx = 1; 1053 notidx = index (sstr, "^"); 1054 do while (notidx ^= 0); 1055 if notidx > 1 1056 then do; 1057 tstr = tstr || substr (sstr, sidx, notidx - 1); 1058 sidx = sidx + notidx; 1059 end; 1060 comidx = index (substr (sstr, sidx), ","); 1061 if comidx = 0 1062 then notidx = 0; /* terminate loop */ 1063 else do; 1064 sidx = sidx + comidx; 1065 notidx = index (substr (sstr, sidx), "^"); 1066 end; 1067 end; 1068 if comidx ^= 0 1069 then /* some left, copy it */ 1070 tstr = tstr || substr (sstr, sidx); 1071 else if length (tstr) > 0 1072 then substr (tstr, length (tstr), 1) = "."; 1073 call ioa_ ("Type: ^a^/Modes: ^a", typename, tstr); 1074 return; 1075 end; 1076 1077 1078 1079 end /* set_tty */; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/18/00 1146.7 set_tty.pl1 >udd>sm>ds>w>ml>set_tty.pl1 156 1 06/29/77 1724.0 terminal_info.incl.pl1 >ldd>incl>terminal_info.incl.pl1 157 2 09/01/77 1459.3 set_term_type_info.incl.pl1 >ldd>incl>set_term_type_info.incl.pl1 158 3 11/05/79 1528.9 flow_control_info.incl.pl1 >ldd>incl>flow_control_info.incl.pl1 159 4 08/06/87 1013.5 net_event_message.incl.pl1 >ldd>incl>net_event_message.incl.pl1 160 5 08/06/87 1013.5 tty_attach_data_.incl.pl1 >ldd>incl>tty_attach_data_.incl.pl1 5-62 6 06/29/79 1828.0 event_wait_channel.incl.pl1 >ldd>incl>event_wait_channel.incl.pl1 161 7 05/20/83 1946.4 iocb.incl.pl1 >ldd>incl>iocb.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. DSA_NETWORK_TYPE constant fixed bin(4,0) initial unsigned dcl 4-35 ref 540 588 606 624 760 841 852 877 MCS_NETWORK_TYPE constant fixed bin(4,0) initial unsigned dcl 4-34 ref 535 540 644 661 697 717 783 908 MOWSE_NETWORK_TYPE constant fixed bin(4,0) initial unsigned dcl 4-36 ref 540 908 NUL 010333 constant char(1) initial packed unaligned dcl 79 ref 405 419 449 469 all_switch 000350 automatic bit(1) packed unaligned dcl 102 set ref 174* 509* 872 941 984 arg based char packed unaligned dcl 150 set ref 185 189 189 196* 199* 204 204 210 210 219* 223 226 226 232 232 241* 245 248 248 256 256 259 259 262 262 262 262 272 276 276 282 285 285 291* 295* 300 303 303 306 306 315* 320 323 323 333 336 336 343 351 363 369 369 381* 391 391 399* 405 409 411 419 427 439 439 449 454 455 459 459 469 474 475 479 479 486* 489* 494 494 497 497 500 500 503 503 506 506 509 509 516* 994 994 1038* arglen 000654 automatic fixed bin(17,0) dcl 149 set ref 184* 185 189 189 196 196 199 199 204 204 210 210 217 219 219 223 226 226 232 232 239 241 241 245 248 248 256 256 259 259 262 262 262 262 272 276 276 282 285 285 291 291 295 295 300 303 303 306 306 313 315 315 320 323 323 333 336 336 343 350 351 352 363 369 369 379 381 381 391 391 397 399 399 403 405 409 411 416 419 427 439 439 449 454 455 459 459 469 474 475 479 479 486 486 489 489 494 494 497 497 500 500 503 503 506 506 509 509 516 516 994 994 1021* 1033 1035 1038 1038 argptr 000652 automatic pointer dcl 148 set ref 184* 185 189 189 196 199 204 204 210 210 219 223 226 226 232 232 241 245 248 248 256 256 259 259 262 262 262 262 272 276 276 282 285 285 291 295 300 303 303 306 306 315 320 323 323 333 336 336 343 351 363 369 369 381 391 391 399 405 409 411 419 427 439 439 449 454 455 459 459 469 474 475 479 479 486 489 494 494 497 497 500 500 503 503 506 506 509 509 516 994 994 1021* 1038 auto_ifc 000642 automatic structure level 1 dcl 133 set ref 648 648 946 946 auto_ofc 000645 automatic structure level 1 dcl 134 set ref 683 683 704 704 964 964 backspace 6 000010 internal static fixed bin(17,0) level 3 dcl 81 set ref 933* based_fixed based fixed bin(17,0) array dcl 143 set ref 369* 796* 796 based_float based float bin(27) array dcl 142 set ref 363* block_acknowledge 0(01) 000645 automatic bit(1) level 3 packed packed unaligned dcl 134 set ref 672* 702* 975 brief_switch 000362 automatic bit(1) packed unaligned dcl 102 set ref 174* 497* 523 820 buffer_size 0(18) 000645 automatic fixed bin(18,0) level 2 packed packed unsigned unaligned dcl 134 set ref 486* 487 675* 975* chars 1(09) 000645 automatic char(3) level 3 in structure "auto_ofc" packed packed unaligned dcl 134 in procedure "stty" set ref 454* 474* 969 969 975 975 chars 1 000640 automatic char(3) level 2 in structure "editing_chars" packed packed unaligned dcl 128 in procedure "stty" set ref 319* 320* 830 835* 852 852 852 852 852 852 857 857 857 857 chars 0(09) 000642 automatic char(3) level 3 in structure "auto_ifc" packed packed unaligned dcl 133 in procedure "stty" set ref 409* 956 956 chars 1(09) 000642 automatic char(3) level 3 in structure "auto_ifc" packed packed unaligned dcl 133 in procedure "stty" set ref 411* 427* 951 951 956 956 chars 2(09) 000645 automatic char(3) level 3 in structure "auto_ofc" packed packed unaligned dcl 134 in procedure "stty" set ref 455* 475* 969 969 975 975 cmd_name 000000 constant char(8) initial packed unaligned dcl 77 set ref 168* 199* 219* 241* 295* 315* 381* 399* 433* 489* 516* 525* 544* 549* 588* 596* 606* 614* 624* 632* 644* 652* 661* 667* 687* 697* 708* 717* 724* 739* 748* 774* 783* 808* 868* 886* 894* 902* 921* 938* 947* 965* 990* 994* 1022* 1038* code 000140 automatic fixed bin(35,0) dcl 100 set ref 184* 193 196* 197 199* 214 236 267 280 288 291* 293 295* 310 327 330 340 369* 371 395 443 446 463 466 483 486* 487 532* 533 536* 538 555* 556 570* 571 579* 580 592* 594 596* 610* 612 614* 628* 630 632* 648* 649 652* 683* 684 687* 704* 705 708* 721* 722 724* 735* 736 736 739* 747* 748 748* 763* 766 768 774* 791* 792 804* 806 808* 819* 830* 846* 850 862 868* 880* 882* 884 886* 888* 890* 892 894* 896* 898* 900 902* 913* 915* 917 921* 926* 930* 933 938* 943* 946* 947 947* 951 960* 964* 965 965* 969 990* 1021* 1022 1022* 1035* 1037* 1038* com_err_ 000026 constant entry external dcl 49 ref 168 199 219 241 295 315 381 399 433 489 516 525 544 549 588 596 606 614 624 632 644 652 661 667 687 697 708 717 724 739 748 774 783 808 868 886 894 902 921 938 947 965 984 990 994 1022 1038 comidx 001027 automatic fixed bin(17,0) dcl 1045 set ref 1052* 1060* 1061 1064 1068 const_tab 4 000010 internal static fixed bin(17,0) level 3 dcl 81 set ref 933* conversion 000656 stack reference condition dcl 154 ref 362 365 count 1 000645 automatic fixed bin(9,0) level 3 in structure "auto_ofc" packed packed unsigned unaligned dcl 134 in procedure "stty" set ref 449* 452* 469* 472* 672 701 969 969 975 975 count 2 000645 automatic fixed bin(9,0) level 3 in structure "auto_ofc" packed packed unsigned unaligned dcl 134 in procedure "stty" set ref 449* 453* 469* 473* 969 969 975 975 count 000642 automatic fixed bin(9,0) level 3 in structure "auto_ifc" packed packed unsigned unaligned dcl 133 in procedure "stty" set ref 405* 408* 418* 951 956 956 count 1 000642 automatic fixed bin(9,0) level 3 in structure "auto_ifc" packed packed unsigned unaligned dcl 133 in procedure "stty" set ref 405* 410* 421* 426* 951 951 951 956 956 cu_$arg_count 000020 constant entry external dcl 46 ref 165 cu_$arg_ptr 000022 constant entry external dcl 47 ref 184 1021 cv_dec_check_ 000024 constant entry external dcl 48 ref 196 369 486 default 1 000010 internal static fixed bin(17,0) level 2 dcl 81 set ref 343* 385* 787 926 delay 000010 internal static structure level 1 dcl 81 set ref 791 791 804 804 930 930 edit_char parameter char(1) packed unaligned dcl 1003 ref 998 1006 1010 editing_chars 000640 automatic structure level 1 dcl 128 set ref 763 763 846 846 editing_chars_version 000121 automatic fixed bin(17,0) dcl 90 set ref 178* 760* 762* 768 770* 837 837 841* 843* 852 862 864* error_table_$action_not_performed 000042 external static fixed bin(35,0) dcl 60 set ref 544* error_table_$bad_mode 000044 external static fixed bin(35,0) dcl 61 ref 736 error_table_$badopt 000046 external static fixed bin(35,0) dcl 62 set ref 516* error_table_$bigarg 000050 external static fixed bin(35,0) dcl 63 set ref 219* 241* 315* 399* 1035 error_table_$inconsistent 000052 external static fixed bin(35,0) dcl 64 set ref 525* 667* error_table_$noarg 000054 external static fixed bin(35,0) dcl 65 set ref 168* error_table_$smallarg 000056 external static fixed bin(35,0) dcl 66 ref 1037 error_table_$undefined_order_request 000060 external static fixed bin(35,0) dcl 67 ref 533 error_table_$unimplemented_version 000062 external static fixed bin(35,0) dcl 68 ref 768 862 error_table_$unsupported_operation 000064 external static fixed bin(35,0) dcl 69 set ref 588* 606* 624* 644* 661* 697* 717* 783* 984* event_wait_channel 000664 automatic structure level 1 dcl 6-8 flags 11 000620 automatic structure level 2 in structure "stt_info" packed packed unaligned dcl 116 in procedure "stty" set ref 567* flags 000645 automatic structure level 2 in structure "auto_ofc" packed packed unaligned dcl 134 in procedure "stty" framing_chars 000650 automatic char(2) dcl 136 set ref 333* 721 721 915 915 917 917 917 917 horz_nl 3 000010 internal static float bin(27) level 3 dcl 81 set ref 933* i 000377 automatic fixed bin(17,0) dcl 111 set ref 350* 358 360 360 363 369* 379 795* 796 796 796* iarg 000133 automatic fixed bin(17,0) dcl 97 set ref 183* 184* 1020* 1020 1021* initial_string_switch 000345 automatic bit(1) packed unaligned dcl 102 set ref 174* 300* 303* 745 input_delays 000632 automatic structure level 1 dcl 119 set ref 363 369 796 801 input_flow_control_info based structure level 1 dcl 3-9 input_modes 000141 automatic char(512) packed unaligned dcl 101 set ref 282* 735* ioa_ 000030 constant entry external dcl 50 ref 823 852 857 884 892 900 917 933 951 956 969 975 1073 iocbp 000136 automatic pointer dcl 99 set ref 181* 291* 532* 555* 570* 579* 592* 610* 628* 648* 683* 704* 721* 735* 747* 763* 791* 804* 819* 846* 882* 890* 898* 915* 930* 946* 964* iox_$control 000032 constant entry external dcl 51 ref 532 555 570 579 592 610 628 648 683 704 721 747 763 791 804 846 882 890 898 915 930 946 964 iox_$look_iocb 000036 constant entry external dcl 53 ref 291 iox_$modes 000034 constant entry external dcl 52 ref 735 819 iox_$user_io 000040 external static pointer dcl 58 ref 181 line_ind 000124 automatic varying char(2) dcl 92 set ref 223* 229* 610 610 890 890 892* line_ind_switch 000131 automatic bit(1) packed unaligned dcl 94 set ref 172* 212* 228* 602 615* 888 line_type 12 000600 automatic fixed bin(17,0) level 2 dcl 114 set ref 559 559 max_tty_line_type constant fixed bin(17,0) initial dcl 78 ref 559 mbz 0(02) 000645 automatic bit(16) level 3 packed packed unaligned dcl 134 set ref 674* 703* modes_switch 000343 automatic bit(1) packed unaligned dcl 102 set ref 174* 278* 730 n_channels 000664 automatic fixed bin(17,0) initial level 2 dcl 6-8 set ref 6-8* name 1 000620 automatic char(32) level 2 packed packed unaligned dcl 116 set ref 566* nargs 000134 automatic fixed bin(17,0) dcl 98 set ref 165* 166 183 network_type 000120 automatic fixed bin(17,0) dcl 89 set ref 532 532 535* 540 540 540 588 606 624 644 661 697 717 760 783 841 852 877 908 908 next_comma 000365 automatic fixed bin(17,0) dcl 108 set ref 351* 352 352* 356 363 369 369 376 994 994 notidx 001026 automatic fixed bin(17,0) dcl 1045 set ref 1053* 1054 1055 1057 1058 1061* 1065* null builtin function dcl 153 ref 579 579 747 747 out_modes 000400 automatic char(512) packed unaligned dcl 112 set ref 735* 739* 819* 820* 823* output_flow_control_info based structure level 1 dcl 3-19 page_ind 000126 automatic varying char(4) dcl 93 set ref 245* 251* 628 628 898 898 900* page_ind_switch 000132 automatic bit(1) packed unaligned dcl 94 set ref 172* 234* 250* 620 633* 896 position 000364 automatic fixed bin(17,0) dcl 107 set ref 348* 350 351 352 363 369 369 376* 376 379 994 994 print_delay_switch 000360 automatic bit(1) packed unaligned dcl 102 set ref 174* 503* 509* 924 984 print_edit_switch 000352 automatic bit(1) packed unaligned dcl 102 set ref 174* 500* 509* 826 print_frame_switch 000347 automatic bit(1) packed unaligned dcl 102 set ref 174* 506* 509* 911 984 print_switch 000361 automatic bit(1) packed unaligned dcl 102 set ref 174* 494* 509* 523 815 printable_ctl_char 000100 automatic char(2) initial array packed unaligned dcl 74 set ref 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 74* 1008 rank builtin function dcl 152 ref 1006 reset_switch 000341 automatic bit(1) packed unaligned dcl 102 set ref 174* 256* 577 resume_or_ack_seq 2 000645 automatic structure level 2 packed packed unaligned dcl 134 set ref 680* resume_seq 1 000642 automatic structure level 2 packed packed unaligned dcl 133 rk 000700 automatic fixed bin(17,0) dcl 1004 set ref 1006* 1008 1008 send_initial_string 11 000620 automatic bit(1) level 3 packed packed unaligned dcl 116 set ref 568* set_bsize_switch 000357 automatic bit(1) packed unaligned dcl 102 set ref 174* 481* 657 675 686* 961 set_delay_switch 000353 automatic bit(1) packed unaligned dcl 102 set ref 174* 338* 779 810* 926 set_edit_switch 000351 automatic bit(1) packed unaligned dcl 102 set ref 174* 308* 752 775* 830 set_frame_switch 000346 automatic bit(1) packed unaligned dcl 102 set ref 174* 325* 713 725* 913 set_ifc_switch 000354 automatic bit(1) packed unaligned dcl 102 set ref 174* 393* 640 651* 944 set_modes 11(01) 000620 automatic bit(1) level 3 packed packed unaligned dcl 116 set ref 569* set_oea_switch 000356 automatic bit(1) packed unaligned dcl 102 set ref 174* 461* 657 677 686* 961 set_osr_switch 000355 automatic bit(1) packed unaligned dcl 102 set ref 174* 441* 665 668* 693 707* 961 set_term_type_info based structure level 1 dcl 2-8 sidx 001025 automatic fixed bin(17,0) dcl 1045 set ref 1051* 1057 1058* 1058 1060 1064* 1064 1065 1068 sstr parameter char packed unaligned dcl 1045 ref 1042 1053 1057 1060 1065 1068 standard_line_type 000363 automatic bit(1) packed unaligned dcl 106 set ref 180* 559* 568 713 736 779 911 924 941 stt_info 000620 automatic structure level 1 dcl 116 set ref 570 570 stti_version_1 constant fixed bin(17,0) initial dcl 2-5 ref 565 suspend_or_etb_seq 1 000645 automatic structure level 2 packed packed unaligned dcl 134 set ref 679* suspend_resume 000645 automatic bit(1) level 3 packed packed unaligned dcl 134 set ref 673* 701* 969 suspend_seq 000642 automatic structure level 2 packed packed unaligned dcl 133 t_info 000600 automatic structure level 1 dcl 114 set ref 555 555 tab_int 000122 automatic fixed bin(17,0) dcl 91 set ref 196* 197 207* 592 592 882 882 884* tab_int_switch 000130 automatic bit(1) packed unaligned dcl 94 set ref 172* 191* 206* 584 597* 880 tabs_switch 000344 automatic bit(1) packed unaligned dcl 102 set ref 174* 300* 748* term_type 2 000600 automatic char(32) level 2 packed packed unaligned dcl 114 set ref 575 terminal_info based structure level 1 dcl 1-6 terminal_info_version constant fixed bin(17,0) initial dcl 1-16 ref 554 timeout 2 000642 automatic bit(1) level 2 dcl 133 set ref 413* 422* 428* tstr 000724 automatic varying char(256) dcl 1045 set ref 1050* 1057* 1057 1068* 1068 1071 1071 1071* 1073* type_switch 000342 automatic bit(1) packed unaligned dcl 102 set ref 174* 264* 563 typename 000367 automatic char(32) packed unaligned dcl 110 set ref 272* 566 575* 823* 1073* unchanged_delays 000366 automatic bit(6) packed unaligned dcl 109 set ref 347* 358* 789 796 values 2 000010 internal static structure level 2 dcl 81 set ref 796 801* var_tab 5 000010 internal static float bin(27) level 3 dcl 81 set ref 933* version 000010 internal static fixed bin(17,0) level 2 in structure "delay" dcl 81 in procedure "stty" set ref 388* 929* version 000620 automatic fixed bin(17,0) level 2 in structure "stt_info" dcl 116 in procedure "stty" set ref 565* version 000640 automatic fixed bin(17,0) level 2 in structure "editing_chars" dcl 128 in procedure "stty" set ref 760* 762* 770* 837* 841* 843* 864* version 000600 automatic fixed bin(17,0) level 2 in structure "t_info" dcl 114 in procedure "stty" set ref 554* vert_nl 2 000010 internal static fixed bin(17,0) level 3 dcl 81 set ref 933* vt_ff 7 000010 internal static fixed bin(17,0) level 3 dcl 81 set ref 933* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. DSA_ATTENTION_MSG internal static fixed bin(8,0) initial unsigned dcl 4-83 DSA_DATA_ATTENTION_MSG internal static fixed bin(8,0) initial unsigned dcl 4-84 DSA_DATA_INPUT_MSG internal static fixed bin(8,0) initial unsigned dcl 4-100 DSA_DATA_OUTPUT_MSG internal static fixed bin(8,0) initial unsigned dcl 4-101 DSA_DEMAND_RELEASE_SRU_MSG internal static fixed bin(8,0) initial unsigned dcl 4-85 DSA_DEMAND_TURN_ACK_MSG internal static fixed bin(8,0) initial unsigned dcl 4-87 DSA_DEMAND_TURN_MSG internal static fixed bin(8,0) initial unsigned dcl 4-86 DSA_ESTABLISHMENT_MSG internal static fixed bin(8,0) initial unsigned dcl 4-97 DSA_MSG_TYPE_TO_PNAME internal static char(20) initial array packed unaligned dcl 4-103 DSA_PURGE_MSG internal static fixed bin(8,0) initial unsigned dcl 4-88 DSA_RECOVER_ACK_MSG internal static fixed bin(8,0) initial unsigned dcl 4-90 DSA_RECOVER_MSG internal static fixed bin(8,0) initial unsigned dcl 4-89 DSA_RELEASE_SRU_MSG internal static fixed bin(8,0) initial unsigned dcl 4-91 DSA_RESUME_ACK_MSG internal static fixed bin(8,0) initial unsigned dcl 4-93 DSA_RESUME_MSG internal static fixed bin(8,0) initial unsigned dcl 4-92 DSA_SUSPEND_ACK_MSG internal static fixed bin(8,0) initial unsigned dcl 4-95 DSA_SUSPEND_MSG internal static fixed bin(8,0) initial unsigned dcl 4-94 DSA_TERMINATED_MSG internal static fixed bin(8,0) initial unsigned dcl 4-98 DSA_TERM_ABNORMAL_MSG internal static fixed bin(8,0) initial unsigned dcl 4-96 DSA_UNSPECIFIED_MSG internal static fixed bin(8,0) initial unsigned dcl 4-82 DSA_USER_UNASSIGN_MSG internal static fixed bin(8,0) initial unsigned dcl 4-99 MAX_DSA_EVENT_MSG_TYPE internal static fixed bin(17,0) initial dcl 4-80 MAX_MCS_EVENT_MSG_TYPE internal static fixed bin(17,0) initial dcl 4-46 MCS_DIALOUT_MSG internal static fixed bin(17,0) initial dcl 4-54 MCS_DIALUP_MSG internal static fixed bin(17,0) initial dcl 4-50 MCS_HANGUP_MSG internal static fixed bin(17,0) initial dcl 4-52 MCS_LINE_STATUS_MSG internal static fixed bin(17,0) initial dcl 4-62 MCS_MASKED_MSG internal static fixed bin(17,0) initial dcl 4-64 MCS_MSG_TYPE_TO_PNAME internal static char(20) initial array packed unaligned dcl 4-67 MCS_QUIT_MSG internal static fixed bin(17,0) initial dcl 4-56 MCS_READ_MSG internal static fixed bin(17,0) initial dcl 4-58 MCS_UNSPECIFIED_MSG internal static fixed bin(17,0) initial dcl 4-48 MCS_WRITE_MSG internal static fixed bin(17,0) initial dcl 4-60 NETWORK_TYPE_VALUES internal static varying char(8) initial array dcl 4-38 NET_EVENT_MESSAGE_VERSION_1 internal static bit(2) initial packed unaligned dcl 4-20 attach_data based structure level 1 dcl 5-18 attach_data_ptr automatic pointer dcl 5-17 iocb based structure level 1 dcl 7-6 iox_$iocb_version_sentinel external static char(4) dcl 7-51 net_event_message based structure level 1 dcl 4-22 net_event_message_arg automatic fixed bin(71,0) dcl 4-19 sttip automatic pointer dcl 2-6 terminal_info_ptr automatic pointer dcl 1-15 tty_max_mode_length automatic fixed bin(21,0) dcl 5-60 NAMES DECLARED BY EXPLICIT CONTEXT. RETRY_GET_EDIT 005742 constant label dcl 846 ref 865 RETRY_SET_EDIT 005330 constant label dcl 763 ref 771 bad_arg 003530 constant label dcl 516 ref 509 bad_value 007467 constant label dcl 994 ref 362 371 check_two_chars 007626 constant entry internal dcl 1028 ref 329 445 465 cv_edit_char 007535 constant entry internal dcl 998 ref 852 852 852 857 857 error 007451 constant label dcl 990 ref 556 571 580 736 get_next_arg 007567 constant entry internal dcl 1015 ref 192 213 235 266 279 287 309 326 339 394 442 462 482 not_set 005574 constant label dcl 808 ref 792 print_bf 007674 constant entry internal dcl 1042 ref 820 set_tty 001533 constant entry external dcl 23 stty 001523 constant entry external dcl 23 type_arg 002246 constant label dcl 264 ref 259 NAMES DECLARED BY CONTEXT OR IMPLICATION. addr builtin function ref 363 369 532 532 555 555 570 570 592 592 610 610 628 628 648 648 683 683 704 704 721 721 763 763 791 791 796 796 804 804 846 846 882 882 890 890 898 898 915 915 930 930 946 946 964 964 float builtin function ref 363 index builtin function ref 351 830 1053 1060 1065 length builtin function ref 1071 1071 string builtin function ref 567 substr builtin function set ref 185 351 358* 363 369 369 405 409* 409 411* 411 427* 449 454* 454 455* 455 469 474* 474 475* 475 796 852 852 852 852 852 852 857 857 857 857 917 917 917 917 951 951 956 956 956 956 969 969 969 969 975 975 975 975 994 994 1057 1060 1065 1068 1071* translate builtin function ref 272 unspec builtin function set ref 679 680* STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 10634 10722 10375 10644 Length 11344 10375 66 406 236 10 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME stty 832 external procedure is an external procedure. on unit on line 362 64 on unit cv_edit_char internal procedure shares stack frame of external procedure stty. get_next_arg internal procedure shares stack frame of external procedure stty. check_two_chars internal procedure shares stack frame of external procedure stty. print_bf internal procedure shares stack frame of external procedure stty. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 delay stty STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME stty 000100 printable_ctl_char stty 000120 network_type stty 000121 editing_chars_version stty 000122 tab_int stty 000124 line_ind stty 000126 page_ind stty 000130 tab_int_switch stty 000131 line_ind_switch stty 000132 page_ind_switch stty 000133 iarg stty 000134 nargs stty 000136 iocbp stty 000140 code stty 000141 input_modes stty 000341 reset_switch stty 000342 type_switch stty 000343 modes_switch stty 000344 tabs_switch stty 000345 initial_string_switch stty 000346 set_frame_switch stty 000347 print_frame_switch stty 000350 all_switch stty 000351 set_edit_switch stty 000352 print_edit_switch stty 000353 set_delay_switch stty 000354 set_ifc_switch stty 000355 set_osr_switch stty 000356 set_oea_switch stty 000357 set_bsize_switch stty 000360 print_delay_switch stty 000361 print_switch stty 000362 brief_switch stty 000363 standard_line_type stty 000364 position stty 000365 next_comma stty 000366 unchanged_delays stty 000367 typename stty 000377 i stty 000400 out_modes stty 000600 t_info stty 000620 stt_info stty 000632 input_delays stty 000640 editing_chars stty 000642 auto_ifc stty 000645 auto_ofc stty 000650 framing_chars stty 000652 argptr stty 000654 arglen stty 000664 event_wait_channel stty 000700 rk cv_edit_char 000724 tstr print_bf 001025 sidx print_bf 001026 notidx print_bf 001027 comidx print_bf THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_ne_as alloc_char_temp call_ext_out_desc call_ext_out return_mac tra_ext_1 enable_op shorten_stack ext_entry int_entry real_to_real_round_ any_to_any_round_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr cv_dec_check_ ioa_ iox_$control iox_$look_iocb iox_$modes THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$action_not_performed error_table_$bad_mode error_table_$badopt error_table_$bigarg error_table_$inconsistent error_table_$noarg error_table_$smallarg error_table_$undefined_order_request error_table_$unimplemented_version error_table_$unsupported_operation iox_$user_io LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 74 001214 6 8 001516 23 001522 165 001541 166 001550 168 001552 169 001576 172 001577 174 001602 178 001624 180 001625 181 001627 183 001633 184 001641 185 001656 189 001663 191 001674 192 001676 193 001677 196 001701 197 001725 199 001732 200 001765 202 001766 204 001767 206 001777 207 002001 208 002002 210 002003 212 002013 213 002015 214 002016 217 002020 219 002023 220 002055 223 002056 224 002066 226 002067 228 002077 229 002101 230 002102 232 002103 234 002113 235 002115 236 002116 239 002120 241 002123 242 002155 245 002156 246 002166 248 002167 250 002177 251 002201 252 002202 256 002203 259 002216 262 002226 264 002246 266 002250 267 002251 272 002253 274 002265 276 002267 278 002277 279 002301 280 002302 282 002304 283 002311 285 002312 287 002322 288 002323 291 002325 293 002351 295 002353 296 002406 298 002407 300 002410 303 002421 306 002434 308 002444 309 002446 310 002447 313 002451 315 002454 316 002505 319 002506 320 002510 321 002515 323 002516 325 002526 326 002530 327 002531 329 002533 330 002534 333 002536 334 002544 336 002545 338 002555 339 002557 340 002560 343 002562 347 002574 348 002576 350 002600 351 002610 352 002627 356 002634 358 002636 360 002642 362 002647 363 002666 365 002714 366 002715 369 002716 371 002750 376 002753 377 002755 379 002757 381 002766 382 003022 385 003023 388 003025 389 003027 391 003030 393 003040 394 003042 395 003043 397 003045 399 003050 400 003101 403 003102 405 003103 408 003114 409 003116 410 003121 411 003122 413 003125 414 003126 416 003127 418 003131 419 003133 421 003140 422 003141 423 003142 426 003143 427 003145 428 003150 430 003152 433 003153 435 003200 437 003201 439 003202 441 003212 442 003214 443 003215 445 003217 446 003220 449 003222 452 003235 453 003237 454 003240 455 003243 457 003246 459 003247 461 003257 462 003261 463 003262 465 003264 466 003265 469 003267 472 003302 473 003304 474 003305 475 003310 477 003313 479 003314 481 003324 482 003326 483 003327 486 003331 487 003357 489 003364 490 003420 492 003421 494 003422 497 003435 500 003450 503 003463 506 003476 509 003511 513 003527 516 003530 518 003562 521 003563 523 003565 525 003571 526 003615 532 003616 533 003650 535 003654 536 003656 537 003657 538 003660 540 003662 544 003670 545 003713 547 003714 549 003715 550 003741 554 003742 555 003744 556 003776 559 004000 563 004005 565 004007 566 004011 567 004014 568 004015 569 004021 570 004023 571 004055 573 004057 575 004060 577 004063 579 004065 580 004116 584 004120 588 004122 592 004143 594 004175 596 004177 597 004223 602 004224 606 004226 610 004247 612 004303 614 004305 615 004331 620 004332 624 004334 628 004355 630 004406 632 004410 633 004434 640 004435 644 004437 648 004457 649 004510 651 004512 652 004513 657 004537 661 004543 665 004563 667 004565 668 004611 669 004612 672 004613 673 004622 674 004624 675 004626 677 004633 679 004635 680 004636 683 004637 684 004670 686 004672 687 004674 693 004720 697 004722 701 004742 702 004750 703 004752 704 004754 705 005005 707 005007 708 005010 713 005034 717 005040 721 005060 722 005114 724 005116 725 005142 730 005143 735 005145 736 005171 739 005200 740 005226 745 005227 747 005231 748 005262 752 005314 760 005316 762 005325 763 005330 766 005364 768 005366 770 005374 771 005377 774 005400 775 005423 779 005424 783 005430 787 005450 789 005453 791 005456 792 005510 795 005512 796 005517 798 005527 799 005531 801 005532 804 005540 806 005572 808 005574 810 005621 815 005622 819 005624 820 005651 823 005657 826 005703 830 005705 835 005722 837 005724 841 005730 843 005737 846 005742 850 005776 852 006000 857 006056 859 006117 862 006120 864 006126 865 006131 868 006132 872 006155 877 006157 880 006162 882 006166 884 006220 886 006243 888 006267 890 006273 892 006327 894 006352 896 006376 898 006402 900 006436 902 006461 908 006505 911 006511 913 006515 915 006521 917 006555 921 006612 924 006636 926 006642 929 006651 930 006654 933 006706 938 006751 941 006775 943 007001 944 007002 946 007004 947 007037 951 007065 956 007130 960 007174 961 007176 964 007204 965 007236 969 007264 975 007340 980 007420 981 007421 984 007422 987 007450 990 007451 992 007466 994 007467 996 007533 998 007535 1006 007537 1008 007545 1010 007560 1015 007567 1020 007570 1021 007571 1022 007606 1024 007625 1028 007626 1033 007627 1035 007632 1037 007637 1038 007642 1040 007673 1042 007674 1050 007705 1051 007706 1052 007710 1053 007711 1054 007725 1055 007730 1057 007732 1058 007751 1060 007753 1061 007774 1064 007777 1065 010000 1067 010017 1068 010020 1071 010046 1073 010053 1074 010077 ----------------------------------------------------------- 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