COMPILATION LISTING OF SEGMENT remote_input_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1740.3 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 remote_input_: proc; 12 13 /* remote_input_: An I/O module for receiving character records from a remote host. */ 14 15 /* Coded March 1980 by J. C. Whitmore, modeled after the remote_reader_ IO Module */ 16 17 18 /* Parameters */ 19 20 dcl a_iocbp ptr parameter; 21 dcl a_option (*) char (*) var parameter; /* Options for attach */ 22 dcl a_sw bit (1) parameter; /* com_err_ switch for attach */ 23 dcl a_code fixed bin (35) parameter; 24 dcl a_mode fixed bin parameter; /* The open mode */ 25 dcl a_buf_ptr ptr parameter; 26 dcl a_buf_chars fixed bin (21) parameter; 27 dcl a_data_chars fixed bin (21) parameter; 28 dcl a_pos_type fixed bin parameter; 29 dcl a_pos_value fixed bin (21) parameter; 30 dcl a_order char (*) parameter; 31 dcl a_infop ptr parameter; 32 dcl a_old_modes char (*) parameter; 33 dcl a_new_modes char (*) parameter; 34 35 /* AUTOMATIC VARIABLES */ 36 37 dcl com_err_sw bit (1); /* Set if com_err_ sould be called on attach error */ 38 dcl dummy char (32) var; 39 dcl total_chars fixed bin (21); /* number of chars in a record */ 40 dcl code fixed bin (35); 41 dcl iocbp ptr; 42 dcl temp_iocbp ptr; 43 dcl slew_string char (128) var; 44 dcl mask bit (36) aligned; /* For setting ips mask */ 45 dcl device_opt char (32) var; 46 dcl idx fixed bin; 47 dcl record_len fixed bin; 48 dcl max_record_size fixed bin; 49 dcl open_mode fixed bin; 50 dcl order char (32); 51 dcl infop ptr; 52 dcl terminal_switch_name char (32) var; 53 dcl terminal_attach_options char (256) var; 54 dcl my_options char (64) var; 55 dcl terminal_attach_desc char (256) var; 56 57 /* Constants */ 58 59 dcl remote_device_name char (13) int static options (constant) init ("remote_input_"); 60 dcl space char (1) int static options (constant) init (" "); 61 dcl ESC_c char (2) int static options (constant) init ("c"); 62 dcl ETX char (1) int static options (constant) init (""); 63 dcl CR char (1) int static options (constant) init (" "); 64 dcl NL char (1) int static options (constant) init (" 65 "); 66 dcl FF char (1) int static options (constant) init (" "); 67 68 /* Internal Static and Based variables */ 69 70 dcl areap ptr int static init (null); 71 dcl attach_count int static init (0) fixed bin; 72 dcl static_comerr_sw bit (1) int static init ("0"b); 73 74 dcl my_area area (262144) based (areap); 75 dcl char_string char (1024) based; 76 77 /* External stuff */ 78 79 dcl ioa_ entry options (variable); 80 dcl iox_$modes entry (ptr, char (*), char (*), fixed bin (35)); 81 dcl continue_to_signal_ entry (fixed bin (35)); 82 dcl get_temp_segment_ entry (char (*), ptr, fixed bin (35)); 83 dcl hcs_$reset_ips_mask entry (bit (36) aligned, bit (36) aligned); 84 dcl hcs_$set_ips_mask entry (bit (36) aligned, bit (36) aligned); 85 dcl iox_$propagate entry (ptr); 86 dcl com_err_ entry options (variable); 87 dcl iox_$position entry (ptr, fixed bin, fixed bin (21), fixed bin (35)); 88 dcl iox_$attach_ioname entry (char (*), ptr, char (*), fixed bin (35)); 89 dcl iox_$detach_iocb entry (ptr, fixed bin (35)); 90 dcl iox_$close entry (ptr, fixed bin (35)); 91 dcl iox_$open entry (ptr, fixed bin, bit (36), fixed bin (35)); 92 dcl iox_$get_chars entry (ptr, ptr, fixed bin, fixed bin, fixed bin (35)); 93 dcl iox_$read_record entry (ptr, ptr, fixed bin, fixed bin, fixed bin (35)); 94 dcl iox_$control entry (ptr, char (*), ptr, fixed bin (35)); 95 dcl iox_$err_no_operation entry; 96 97 dcl (addr, bin, hbound, min, null, length, substr, rtrim, ltrim, char, size, unspec, copy, empty) builtin; 98 99 dcl error_table_$bad_mode fixed bin (35) ext; 100 dcl error_table_$bad_arg fixed bin (35) ext; 101 dcl error_table_$eof_record ext fixed bin (35); 102 dcl error_table_$not_detached ext fixed bin (35); 103 dcl error_table_$not_attached ext fixed bin (35); 104 dcl error_table_$not_open ext fixed bin (35); 105 dcl error_table_$not_closed ext fixed bin (35); 106 dcl error_table_$wrong_no_of_args ext fixed bin (35); 107 dcl error_table_$noarg ext fixed bin (35); 108 dcl error_table_$bad_conversion ext fixed bin (35); 109 dcl error_table_$unimplemented_version ext fixed bin (35); 110 dcl error_table_$badopt ext fixed bin (35); 111 dcl error_table_$data_loss ext fixed bin (35); 112 113 dcl (any_other, cleanup, conversion) condition; 114 115 116 dcl adp ptr; /* pointer to the attach data structure */ 117 118 dcl 1 ad aligned based (adp), 119 2 fixed, 120 3 device_type fixed bin, /* type code for terminal_io_record */ 121 3 rec_length fixed bin, /* max data length of input record */ 122 3 record_count fixed bin (35), /* total records read since last reset control order */ 123 3 fixed_pad fixed bin, 124 2 ptrs, 125 3 terminal_iocbp ptr, /* pointer to the iocbp of the next dim level */ 126 2 bits, 127 3 record_io bit (1) unal, /* TRUE - if terminal io module uses record interface */ 128 3 bit_pad bit (35) unal, 129 2 chars, 130 3 terminal char (32) var, /* name of the terminal io module */ 131 3 attach_desc char (256) var, /* our attach description */ 132 3 open_description char (24) var; /* our open description */ 133 134 135 dcl 1 count_structure aligned based, /* structure used for the get_count control order */ 136 2 line fixed bin, /* most fields are pads, because this structure */ 137 2 page_len fixed bin, /* is based on the printer defined structure */ 138 2 lmarg fixed bin, /* shown in prt_order_info.incl.pl1 */ 139 2 rmarg fixed bin, 140 2 records fixed bin (35), /* this is the normal line count field */ 141 2 page_count fixed bin; 142 143 1 1 /* BEGIN INCLUDE FILE ..... iocb.incl.pl1 ..... 13 Feb 1975, M. Asherman */ 1 2 /* format: style2 */ 1 3 1 4 dcl 1 iocb aligned based, /* I/O control block. */ 1 5 2 version character (4) aligned, 1 6 2 name char (32), /* I/O name of this block. */ 1 7 2 actual_iocb_ptr ptr, /* IOCB ultimately SYNed to. */ 1 8 2 attach_descrip_ptr ptr, /* Ptr to printable attach description. */ 1 9 2 attach_data_ptr ptr, /* Ptr to attach data structure. */ 1 10 2 open_descrip_ptr ptr, /* Ptr to printable open description. */ 1 11 2 open_data_ptr ptr, /* Ptr to open data structure (old SDB). */ 1 12 2 reserved bit (72), /* Reserved for future use. */ 1 13 2 detach_iocb entry (ptr, fixed (35)),/* detach_iocb(p,s) */ 1 14 2 open entry (ptr, fixed, bit (1) aligned, fixed (35)), 1 15 /* open(p,mode,not_used,s) */ 1 16 2 close entry (ptr, fixed (35)),/* close(p,s) */ 1 17 2 get_line entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 18 /* get_line(p,bufptr,buflen,actlen,s) */ 1 19 2 get_chars entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 20 /* get_chars(p,bufptr,buflen,actlen,s) */ 1 21 2 put_chars entry (ptr, ptr, fixed (21), fixed (35)), 1 22 /* put_chars(p,bufptr,buflen,s) */ 1 23 2 modes entry (ptr, char (*), char (*), fixed (35)), 1 24 /* modes(p,newmode,oldmode,s) */ 1 25 2 position entry (ptr, fixed, fixed (21), fixed (35)), 1 26 /* position(p,u1,u2,s) */ 1 27 2 control entry (ptr, char (*), ptr, fixed (35)), 1 28 /* control(p,order,infptr,s) */ 1 29 2 read_record entry (ptr, ptr, fixed (21), fixed (21), fixed (35)), 1 30 /* read_record(p,bufptr,buflen,actlen,s) */ 1 31 2 write_record entry (ptr, ptr, fixed (21), fixed (35)), 1 32 /* write_record(p,bufptr,buflen,s) */ 1 33 2 rewrite_record entry (ptr, ptr, fixed (21), fixed (35)), 1 34 /* rewrite_record(p,bufptr,buflen,s) */ 1 35 2 delete_record entry (ptr, fixed (35)),/* delete_record(p,s) */ 1 36 2 seek_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 37 /* seek_key(p,key,len,s) */ 1 38 2 read_key entry (ptr, char (256) varying, fixed (21), fixed (35)), 1 39 /* read_key(p,key,len,s) */ 1 40 2 read_length entry (ptr, fixed (21), fixed (35)); 1 41 /* read_length(p,len,s) */ 1 42 1 43 declare iox_$iocb_version_sentinel 1 44 character (4) aligned external static; 1 45 1 46 /* END INCLUDE FILE ..... iocb.incl.pl1 ..... */ 144 145 2 1 /* Begin include file ..... iox_modes.incl.pl1 */ 2 2 2 3 /* Written by C. D. Tavares, 03/17/75 */ 2 4 /* Updated 10/31/77 by CDT to include short iox mode strings */ 2 5 2 6 dcl iox_modes (13) char (24) int static options (constant) aligned initial 2 7 ("stream_input", "stream_output", "stream_input_output", 2 8 "sequential_input", "sequential_output", "sequential_input_output", "sequential_update", 2 9 "keyed_sequential_input", "keyed_sequential_output", "keyed_sequential_update", 2 10 "direct_input", "direct_output", "direct_update"); 2 11 2 12 dcl short_iox_modes (13) char (4) int static options (constant) aligned initial 2 13 ("si", "so", "sio", "sqi", "sqo", "sqio", "squ", "ksqi", "ksqo", "ksqu", "di", "do", "du"); 2 14 2 15 dcl (Stream_input initial (1), 2 16 Stream_output initial (2), 2 17 Stream_input_output initial (3), 2 18 Sequential_input initial (4), 2 19 Sequential_output initial (5), 2 20 Sequential_input_output initial (6), 2 21 Sequential_update initial (7), 2 22 Keyed_sequential_input initial (8), 2 23 Keyed_sequential_output initial (9), 2 24 Keyed_sequential_update initial (10), 2 25 Direct_input initial (11), 2 26 Direct_output initial (12), 2 27 Direct_update initial (13)) fixed bin int static options (constant); 2 28 2 29 /* End include file ..... iox_modes.incl.pl1 */ 146 147 3 1 /* BEGIN INCLUDE FILE ... terminal_io_record.incl.pl1 */ 3 2 /* Created: November 1979 by G. Palter */ 3 3 /* Modified: 26 March 1982 by G. Palter to make the structure more compatible with use of the like attribute */ 3 4 3 5 3 6 /* Record format used by I/O modules designed for communcation with remote I/O daemon stations */ 3 7 3 8 dcl 1 terminal_io_record aligned based (terminal_io_record_ptr), 3 9 2 header, 3 10 3 version fixed binary, 3 11 3 device_type fixed binary, /* type of device sending/receiving this record -- 3 12* reader/printer/punch/teleprinter */ 3 13 3 slew_control, /* slew control data: used for printer and teleprinter only */ 3 14 4 slew_type fixed binary (18) unaligned unsigned, /* type of slewing operation before/after this line -- 3 15* by-count/top-of-form/inside-page/outside-page/to-channel */ 3 16 4 slew_count fixed binary (18) unaligned unsigned,/* # of lines if by count; channel # if to channel */ 3 17 3 flags, 3 18 4 binary bit (1) unaligned, /* ON => data in record should be written in binary mode */ 3 19 4 preslew bit (1) unaligned, /* ON => perform above slew before printing data; 3 20* OFF => perform above slew after printing data */ 3 21 4 pad bit (34) unaligned, 3 22 3 element_size fixed binary, /* # of bits in a data element */ 3 23 3 n_elements fixed binary (24), /* # of elements in the record */ 3 24 2 data, /* force word alignment */ 3 25 3 bits (terminal_io_record_n_elements refer (terminal_io_record.n_elements)) 3 26 bit (terminal_io_record_element_size refer (terminal_io_record.element_size)) unaligned; 3 27 3 28 dcl terminal_io_record_ptr pointer; 3 29 3 30 dcl terminal_io_record_element_size fixed binary; /* used for allocating terminal_io_record structures */ 3 31 dcl terminal_io_record_n_elements fixed binary (24); 3 32 3 33 3 34 /* Manifest constants */ 3 35 3 36 dcl terminal_io_record_version_1 fixed binary static options (constant) initial (1); 3 37 3 38 dcl (TELEPRINTER_DEVICE initial (1), 3 39 READER_DEVICE initial (2), 3 40 PRINTER_DEVICE initial (3), 3 41 PUNCH_DEVICE initial (4)) 3 42 fixed binary static options (constant); 3 43 3 44 dcl (SLEW_BY_COUNT initial (1), 3 45 SLEW_TO_TOP_OF_PAGE initial (2), 3 46 SLEW_TO_INSIDE_PAGE initial (3), /* skip to top of next inside page (head sheet) */ 3 47 SLEW_TO_OUTSIDE_PAGE initial (4), /* skip to top of next outside page (tail sheet) */ 3 48 SLEW_TO_CHANNEL initial (5)) /* skip to specified channel stop */ 3 49 fixed binary static options (constant); 3 50 3 51 3 52 /* Data in record as a character string (terminal_io_record.element_size = 9) */ 3 53 3 54 dcl terminal_io_record_data_chars character (terminal_io_record.n_elements) unaligned 3 55 based (addr (terminal_io_record.bits)); 3 56 3 57 dcl terminal_io_record_data_chars_varying_max_len fixed binary (21); /* Set this before using the varying string. */ 3 58 dcl terminal_io_record_data_chars_varying character (terminal_io_record_data_chars_varying_max_len) varying 3 59 based (addr (terminal_io_record.n_elements)); /* varying string consists of length and data */ 3 60 3 61 3 62 /* Data in record as a bit string (terminal_io_record.element_size = 1) */ 3 63 3 64 dcl terminal_io_record_data_bits bit (terminal_io_record.n_elements) unaligned based (addr (terminal_io_record.bits)); 3 65 3 66 /* END INCLUDE FILE ... terminal_io_record.incl.pl1 */ 148 149 150 remote_reader_attach: /* compatibility */ 151 remote_input_attach: entry (a_iocbp, a_option, a_sw, a_code); 152 153 iocbp = a_iocbp; 154 com_err_sw = a_sw | static_comerr_sw; /* if either one is set ... */ 155 code, a_code = 0; 156 157 adp = null; 158 if iocbp -> iocb.attach_descrip_ptr ^= null then do; 159 code = error_table_$not_detached; 160 call abort_attach (code, "Switch name: ^a", iocbp -> iocb.name); 161 end; 162 163 if hbound (a_option, 1) < 1 then do; /* Must be at least one */ 164 code = error_table_$wrong_no_of_args; 165 call abort_attach (code, "Bad attach description.", ""); 166 end; 167 168 if areap = null then do; 169 call get_temp_segment_ (remote_device_name, areap, code); /* Temp segment for attach data */ 170 if code ^= 0 then call abort_attach (code, "Unable to allocate temp segment.", ""); 171 areap -> my_area = empty (); /* initialize our private area */ 172 end; 173 174 on cleanup call clean_up; 175 176 allocate ad in (my_area) set (adp); 177 178 /* Initialize Attach Data Structure variables */ 179 180 ad.bits = "0"b; 181 ad.ptrs = null; 182 ad.chars = ""; 183 ad.rec_length = -1; /* mark this as not specified */ 184 ad.record_count = 0; 185 186 187 /* Process options */ 188 189 terminal_attach_options = ""; 190 my_options = ""; 191 terminal_attach_desc = ""; 192 device_opt = "reader"; /* default to reader if no -device is given */ 193 194 do idx = 1 to hbound (a_option, 1); 195 if a_option (idx) = "-terminal" then do; 196 ad.terminal = get_arg (idx); 197 my_options = my_options || " -terminal " || ad.terminal; 198 end; 199 else if a_option (idx) = "-device" then device_opt = get_arg (idx); /* we specify this one */ 200 else if a_option (idx) = "-runout_spacing" | a_option (idx) = "-runsp" then do; /* skip this and next arg */ 201 dummy = get_arg (idx); 202 my_options = my_options || " -runsp " || dummy; 203 end; 204 else if a_option (idx) = "-physical_page_length" | a_option (idx) = "-ppl" then do; /* skip this too */ 205 dummy = get_arg (idx); 206 my_options = my_options || " -ppl " || dummy; 207 end; 208 else if a_option (idx) = "-record_len" then do; /* redefine the max record length */ 209 ad.rec_length = cv_dec_arg (idx); 210 my_options = my_options || " -record_len " || a_option (idx); 211 end; 212 else terminal_attach_options = terminal_attach_options || space || a_option (idx); 213 end; 214 215 if ad.terminal = "" then do; 216 code = error_table_$noarg; 217 call abort_attach (code, "No terminal IO module specified.", ""); 218 end; 219 220 if device_opt = "" then do; /* caller didn't specify */ 221 code = error_table_$noarg; 222 call abort_attach (code, "Missing argument to -device option.", ""); 223 end; 224 else if device_opt = "printer_in" then do; 225 ad.device_type = PRINTER_DEVICE; 226 device_opt = "printer"; /* this is for the attachment to the terminal */ 227 end; 228 else if device_opt = "punch_in" then do; 229 ad.device_type = PUNCH_DEVICE; 230 device_opt = "punch"; /* again for the attach description to the terminal */ 231 end; 232 else if device_opt = "reader" then do; 233 ad.device_type = READER_DEVICE; 234 end; 235 else do; /* not recognized */ 236 code = error_table_$badopt; 237 call abort_attach (code, "Invalid -device option: ^a", (device_opt)); 238 end; 239 240 if ad.rec_length = -1 then do; /* not specified - set default max record size */ 241 if ad.device_type = READER_DEVICE then ad.rec_length = 160; 242 else ad.rec_length = 1024; /* lots of room for print lines/files */ 243 end; 244 245 if ad.device_type = READER_DEVICE then do; /* range check the record length */ 246 if ad.rec_length < 80 | ad.rec_length > 160 then do; /* OOPS - not reasonable */ 247 code = error_table_$bad_arg; 248 call abort_attach (code, "Value for -record_len option out of range.", ""); 249 end; 250 end; 251 else do; 252 if ad.rec_length < 10 | ad.rec_length > 1024 then do; 253 code = error_table_$bad_arg; 254 call abort_attach (code, "Value for -record_len option out of range.", ""); 255 end; 256 end; 257 258 /* Attach through terminal dim */ 259 260 attach_count = attach_count + 1; /* new attach name tag number each time */ 261 if attach_count > 999 then attach_count = 1; 262 terminal_switch_name = remote_device_name || ltrim (char (attach_count)); /* make the switch name */ 263 264 terminal_attach_options = ltrim (terminal_attach_options) || " -device " || device_opt; 265 terminal_attach_desc = ad.terminal || space || terminal_attach_options; 266 ad.attach_desc = remote_device_name || my_options || space || terminal_attach_options; 267 268 call iox_$attach_ioname ((terminal_switch_name), temp_iocbp, (terminal_attach_desc), code); 269 if code ^= 0 then call abort_attach (code, "Unable to attach to terminal: ^a", (ad.terminal)); 270 271 ad.terminal_iocbp = temp_iocbp; 272 273 /* Now mask and complete the iocb */ 274 275 mask = "0"b; 276 277 on any_other call handler; 278 279 call hcs_$set_ips_mask ("0"b, mask); 280 281 iocbp -> iocb.attach_descrip_ptr = addr (ad.attach_desc); 282 iocbp -> iocb.attach_data_ptr = adp; 283 iocbp -> iocb.open = remote_input_open; 284 iocbp -> iocb.detach_iocb = remote_input_detach; 285 286 call iox_$propagate (iocbp); 287 288 call hcs_$reset_ips_mask (mask, mask); 289 290 revert any_other; 291 292 attach_return: 293 294 return; 295 296 remote_input_detach: entry (a_iocbp, a_code); 297 298 iocbp = a_iocbp -> iocb.actual_iocb_ptr; 299 a_code = 0; 300 adp = iocbp -> iocb.attach_data_ptr; 301 302 if adp = null then do; 303 a_code = error_table_$not_attached; 304 return; 305 end; 306 307 if iocbp -> iocb.open_descrip_ptr ^= null then do; 308 a_code = error_table_$not_closed; 309 return; 310 end; 311 312 call clean_up; 313 314 mask = "0"b; 315 316 on any_other call handler; 317 318 call hcs_$set_ips_mask ("0"b, mask); 319 320 iocbp -> iocb.attach_descrip_ptr = null; 321 322 call iox_$propagate (iocbp); 323 324 call hcs_$reset_ips_mask (mask, mask); 325 326 revert any_other; 327 328 return; 329 330 remote_input_open: entry (a_iocbp, a_mode, a_sw, a_code); 331 332 iocbp = a_iocbp -> iocb.actual_iocb_ptr; 333 code, a_code = 0; 334 adp = iocbp -> iocb.attach_data_ptr; 335 336 if adp = null then do; 337 a_code = error_table_$not_attached; 338 return; 339 end; 340 341 if iocbp -> iocb.open_descrip_ptr ^= null then do; 342 a_code = error_table_$not_closed; 343 return; 344 end; 345 346 open_mode = a_mode; 347 if ^(open_mode = Stream_input | open_mode = Stream_input_output) then do; 348 a_code = error_table_$bad_mode; 349 return; 350 end; 351 352 ad.open_description = rtrim (iox_modes (open_mode)); 353 354 call iox_$open (ad.terminal_iocbp, Sequential_input, "0"b, a_code); /* try for the record interface */ 355 if a_code = 0 then do; /* well we made it, records approved */ 356 ad.record_io = "1"b; /* record the fact */ 357 end; 358 else do; /* Ok, so we try for the stream interface */ 359 ad.record_io = "0"b; 360 call iox_$open (ad.terminal_iocbp, Stream_input, "0"b, a_code); 361 if a_code ^= 0 then return; /* Oh, well */ 362 end; 363 364 mask = "0"b; 365 366 on any_other call handler; 367 368 call hcs_$set_ips_mask ("0"b, mask); 369 370 iocbp -> iocb.get_chars = remote_input_get_chars; 371 iocbp -> iocb.get_line = remote_input_get_chars; 372 iocbp -> iocb.position = remote_input_position; 373 iocbp -> iocb.control = remote_input_control; 374 iocbp -> iocb.modes = remote_input_modes; 375 iocbp -> iocb.close = remote_input_close; 376 iocbp -> iocb.open_descrip_ptr = addr (ad.open_description); 377 378 call iox_$propagate (iocbp); 379 380 call hcs_$reset_ips_mask (mask, mask); 381 382 revert any_other; 383 384 return; 385 386 remote_input_close: entry (a_iocbp, a_code); 387 388 iocbp = a_iocbp -> iocb.actual_iocb_ptr; 389 code, a_code = 0; 390 adp = iocbp -> iocb.attach_data_ptr; 391 392 if adp = null then do; 393 a_code = error_table_$not_attached; 394 return; 395 end; 396 397 if iocbp -> iocb.open_descrip_ptr = null then do; 398 a_code = error_table_$not_open; 399 return; 400 end; 401 402 call iox_$close (ad.terminal_iocbp, a_code); /* try to close the terminal switch too */ 403 if a_code = error_table_$not_open | a_code = error_table_$not_attached then code = 0; 404 /* make it easy to re-synch attachments */ 405 406 mask = "0"b; 407 408 on any_other call handler; 409 410 call hcs_$set_ips_mask ("0"b, mask); 411 412 iocbp -> iocb.open_descrip_ptr = null; 413 iocbp -> iocb.open = remote_input_open; 414 iocbp -> iocb.detach_iocb = remote_input_detach; 415 iocbp -> iocb.control = iox_$err_no_operation; 416 iocbp -> iocb.modes = iox_$err_no_operation; 417 iocbp -> iocb.position = iox_$err_no_operation; 418 419 call iox_$propagate (iocbp); 420 421 call hcs_$reset_ips_mask (mask, mask); 422 423 revert any_other; 424 425 return; 426 427 remote_input_get_chars: entry (a_iocbp, a_buf_ptr, a_buf_chars, a_data_chars, a_code); 428 429 iocbp = a_iocbp -> iocb.actual_iocb_ptr; 430 adp = iocbp -> iocb.attach_data_ptr; 431 a_data_chars, a_code, code = 0; 432 433 if adp = null then do; 434 a_code = error_table_$not_attached; 435 return; 436 end; 437 438 if iocbp -> iocb.open_descrip_ptr = null then do; 439 a_code = error_table_$not_open; 440 return; 441 end; 442 443 max_record_size = ad.rec_length; /* put into automatic for this call */ 444 445 terminal_io_record_ptr = null; /* for the cleanup handler */ 446 terminal_io_record_element_size = 9; /* always character data */ 447 terminal_io_record_n_elements = max_record_size; /* set the max record size allowed */ 448 449 on cleanup begin; 450 if terminal_io_record_ptr ^= null then 451 free terminal_io_record_ptr -> terminal_io_record in (my_area); 452 end; 453 454 call alloc_tio_rec; /* allocate and initialize terminal_io_record */ 455 456 terminal_io_record.n_elements = max_record_size; /* set to the max size for the read call */ 457 458 /* Read the next record from the terminal IO Module */ 459 460 if ad.record_io then do; 461 call iox_$read_record (ad.terminal_iocbp, terminal_io_record_ptr, 4 * size (terminal_io_record), 462 record_len, code); 463 if code ^= 0 then go to get_chars_ret; /* accept EOF from the terminal as well */ 464 if terminal_io_record.version ^= terminal_io_record_version_1 then do; 465 code = error_table_$unimplemented_version; 466 go to get_chars_ret; 467 end; 468 469 if ad.device_type ^= READER_DEVICE then do; /* no slews for the reader */ 470 if terminal_io_record.slew_type = SLEW_BY_COUNT then do; 471 if terminal_io_record.slew_count = 0 then 472 slew_string = CR; /* this is the overprint case */ 473 else slew_string = copy (NL, terminal_io_record.slew_count); 474 end; 475 else if terminal_io_record.slew_type = SLEW_TO_CHANNEL then do; 476 slew_string = ESC_c || ltrim (char (terminal_io_record.slew_count)) || ETX; 477 end; 478 else do; /* TOIP = TOOP = TOP for seg text */ 479 slew_string = FF; /* so just add one FF char */ 480 end; 481 end; 482 else do; /* for the reader, check for ++EOF cards */ 483 if terminal_io_record_data_chars = "++EOF" | terminal_io_record_data_chars = "++eof" then do; 484 code = error_table_$eof_record; 485 go to get_chars_ret; 486 end; 487 slew_string = ""; /* no additional slew chars will be added */ 488 end; 489 end; 490 else do; 491 call iox_$get_chars (ad.terminal_iocbp, addr (terminal_io_record.data), max_record_size, record_len, code); 492 if code ^= 0 then go to get_chars_ret; /* accept EOF from the terminal as well */ 493 terminal_io_record.n_elements = record_len; /* make a legal varying string */ 494 495 /* For stream input, all slew chars must be in the stream already */ 496 497 if ad.device_type = READER_DEVICE then do; /* look for EOF cards from reader */ 498 if terminal_io_record_data_chars = "++EOF" | terminal_io_record_data_chars = "++eof" then do; 499 code = error_table_$eof_record; 500 go to get_chars_ret; 501 end; 502 end; 503 slew_string = ""; /* all slews must be in the stream */ 504 end; 505 506 /* at this point, we must have a record of the form: */ 507 508 total_chars = terminal_io_record.n_elements + length (slew_string); /* get the updated count */ 509 if total_chars > a_buf_chars then 510 code = error_table_$data_loss; /* tell caller we truncated the record */ 511 512 a_data_chars = min (a_buf_chars, total_chars); 513 if terminal_io_record.preslew then 514 substr (a_buf_ptr -> char_string, 1, a_data_chars) = slew_string || terminal_io_record_data_chars; 515 else substr (a_buf_ptr -> char_string, 1, a_data_chars) = terminal_io_record_data_chars || slew_string; 516 ad.record_count = ad.record_count + 1; /* increment the total read */ 517 518 get_chars_ret: 519 520 free terminal_io_record_ptr -> terminal_io_record in (my_area); 521 revert cleanup; 522 523 a_code = code; 524 525 return; 526 527 remote_input_control: entry (a_iocbp, a_order, a_infop, a_code); 528 529 iocbp = a_iocbp -> iocb.actual_iocb_ptr; 530 adp = iocbp -> iocb.attach_data_ptr; 531 532 if adp = null then do; 533 a_code = error_table_$not_attached; 534 return; 535 end; 536 537 if iocbp -> iocb.open_descrip_ptr = null then do; 538 a_code = error_table_$not_open; 539 return; 540 end; 541 542 infop = a_infop; 543 order = a_order; 544 a_code = 0; 545 546 if order = "reset" then do; /* go to a known clean state */ 547 ad.record_count = 0; /* we just clear the count of records read */ 548 go to pass_on; /* and then give it to the terminal IO Module */ 549 end; 550 else if order = "get_count" then do; /* this is for us alone */ 551 if infop ^= null then infop -> count_structure.records = ad.record_count; /* give back the count */ 552 else a_code = error_table_$bad_arg; 553 end; 554 else do; 555 pass_on: call iox_$control (ad.terminal_iocbp, order, infop, a_code); 556 end; 557 558 return; 559 560 remote_input_modes: entry (a_iocbp, a_new_modes, a_old_modes, a_code); 561 562 iocbp = a_iocbp -> iocb.actual_iocb_ptr; 563 adp = iocbp -> iocb.attach_data_ptr; 564 565 if adp = null then do; 566 a_code = error_table_$not_attached; 567 return; 568 end; 569 570 if iocbp -> iocb.open_descrip_ptr = null then do; 571 a_code = error_table_$not_open; 572 return; 573 end; 574 575 a_code = 0; 576 577 call iox_$modes (ad.terminal_iocbp, a_new_modes, a_old_modes, a_code); 578 579 return; 580 581 remote_input_position: entry (a_iocbp, a_pos_type, a_pos_value, a_code); 582 583 iocbp = a_iocbp -> iocb.actual_iocb_ptr; 584 adp = iocbp -> iocb.attach_data_ptr; 585 586 if adp = null then do; 587 a_code = error_table_$not_attached; 588 return; 589 end; 590 591 if iocbp -> iocb.open_descrip_ptr = null then do; 592 a_code = error_table_$not_open; 593 return; 594 end; 595 596 a_code = 0; 597 598 call iox_$position (ad.terminal_iocbp, a_pos_type, a_pos_value, a_code); 599 600 return; 601 602 603 604 605 flip_com_err_sw: entry; 606 607 static_comerr_sw = ^static_comerr_sw; /* flip the bit */ 608 609 call ioa_ ("The INPUT com err sw is now: ^[on^;off^]", static_comerr_sw); 610 611 return; 612 613 614 get_arg: proc (idx) returns (char (*)); 615 616 dcl idx fixed bin; 617 618 idx = idx + 1; 619 if idx > hbound (a_option, 1) then do; 620 code = error_table_$noarg; 621 call abort_attach (code, "No argument after ^a.", (a_option (idx - 1))); 622 end; 623 624 return (a_option (idx)); 625 626 end get_arg; 627 628 629 630 cv_dec_arg: proc (idx) returns (fixed bin); 631 632 dcl idx fixed bin; 633 634 idx = idx + 1; /* advance the index of the major loop */ 635 if idx > hbound (a_option, 1) then do; 636 code = error_table_$noarg; 637 call abort_attach (code, "No argument after ^a.", (a_option (idx - 1))); 638 end; 639 640 on conversion go to bad_dec_arg; 641 642 return (bin (a_option (idx))); 643 bad_dec_arg: 644 code = error_table_$bad_conversion; 645 call abort_attach (code, "Invalid decimal number. ^a", (a_option (idx))); 646 647 end cv_dec_arg; 648 649 650 abort_attach: proc (code, str1, str2); 651 652 dcl code fixed bin (35); 653 dcl (str1, str2) char (*) aligned; 654 655 /* This proc handles attach errors */ 656 657 if com_err_sw then call com_err_ (code, remote_device_name, str1, str2); 658 659 a_code = code; /* copy back the error, MUST be non-zero */ 660 661 call clean_up; 662 663 go to attach_return; /* finish the abort by non-local return */ 664 665 end abort_attach; 666 667 668 669 670 alloc_tio_rec: proc; 671 672 allocate terminal_io_record in (my_area) set (terminal_io_record_ptr); 673 674 unspec (terminal_io_record) = "0"b; /* clear everything */ 675 676 terminal_io_record.version = terminal_io_record_version_1; /* our view of the record structure */ 677 terminal_io_record.device_type = ad.device_type; 678 terminal_io_record.element_size = terminal_io_record_element_size; /* set by our caller */ 679 680 return; 681 682 end alloc_tio_rec; 683 684 685 clean_up: proc; 686 687 dcl ignore fixed bin (35); 688 689 if adp ^= null then do; 690 if ad.terminal_iocbp ^= null then call iox_$detach_iocb (ad.terminal_iocbp, ignore); 691 free adp -> ad in (my_area); 692 adp = null; 693 end; 694 695 iocbp -> iocb.attach_descrip_ptr = null; /* be sure iox_ knows */ 696 iocbp -> iocb.attach_data_ptr = null; 697 iocbp -> iocb.open = iox_$err_no_operation; 698 699 return; 700 701 end clean_up; 702 703 704 705 706 707 handler: proc; 708 709 dcl ignore fixed bin (35); 710 711 /* This proc handles faults that occur while masked */ 712 713 if mask then 714 call hcs_$reset_ips_mask (mask, mask); 715 716 mask = ""b; 717 718 call continue_to_signal_ (ignore); 719 720 return; 721 722 end handler; 723 724 end remote_input_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1523.6 remote_input_.pl1 >dumps>old>recomp>remote_input_.pl1 144 1 07/28/81 1333.4 iocb.incl.pl1 >ldd>include>iocb.incl.pl1 146 2 02/02/78 1229.7 iox_modes.incl.pl1 >ldd>include>iox_modes.incl.pl1 148 3 11/12/82 1624.8 terminal_io_record.incl.pl1 >ldd>include>terminal_io_record.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. CR constant char(1) initial unaligned dcl 63 ref 471 ESC_c 005100 constant char(2) initial unaligned dcl 61 ref 476 ETX 005077 constant char(1) initial unaligned dcl 62 ref 476 FF constant char(1) initial unaligned dcl 66 ref 479 NL constant char(1) initial unaligned dcl 64 ref 473 PRINTER_DEVICE constant fixed bin(17,0) initial dcl 3-38 ref 225 PUNCH_DEVICE constant fixed bin(17,0) initial dcl 3-38 ref 229 READER_DEVICE constant fixed bin(17,0) initial dcl 3-38 ref 233 241 245 469 497 SLEW_BY_COUNT constant fixed bin(17,0) initial dcl 3-44 ref 470 SLEW_TO_CHANNEL constant fixed bin(17,0) initial dcl 3-44 ref 475 Sequential_input 000141 constant fixed bin(17,0) initial dcl 2-15 set ref 354* Stream_input 000147 constant fixed bin(17,0) initial dcl 2-15 set ref 347 360* Stream_input_output constant fixed bin(17,0) initial dcl 2-15 ref 347 a_buf_chars parameter fixed bin(21,0) dcl 26 ref 427 509 512 a_buf_ptr parameter pointer dcl 25 ref 427 513 515 a_code parameter fixed bin(35,0) dcl 23 set ref 150 150 155* 296 299* 303* 308* 330 333* 337* 342* 348* 354* 355 360* 361 386 389* 393* 398* 402* 403 403 427 431* 434* 439* 523* 527 533* 538* 544* 552* 555* 560 566* 571* 575* 577* 581 587* 592* 596* 598* 659* a_data_chars parameter fixed bin(21,0) dcl 27 set ref 427 431* 512* 513 515 a_infop parameter pointer dcl 31 ref 527 542 a_iocbp parameter pointer dcl 20 ref 150 150 153 296 298 330 332 386 388 427 429 527 529 560 562 581 583 a_mode parameter fixed bin(17,0) dcl 24 ref 330 346 a_new_modes parameter char unaligned dcl 33 set ref 560 577* a_old_modes parameter char unaligned dcl 32 set ref 560 577* a_option parameter varying char array dcl 21 ref 150 150 163 194 195 199 200 200 204 204 208 210 212 619 621 624 635 637 642 645 a_order parameter char unaligned dcl 30 ref 527 543 a_pos_type parameter fixed bin(17,0) dcl 28 set ref 581 598* a_pos_value parameter fixed bin(21,0) dcl 29 set ref 581 598* a_sw parameter bit(1) unaligned dcl 22 ref 150 150 154 330 actual_iocb_ptr 12 based pointer level 2 dcl 1-4 ref 298 332 388 429 529 562 583 ad based structure level 1 dcl 118 set ref 176 691 addr builtin function dcl 97 ref 281 376 483 483 491 491 498 498 513 515 adp 000462 automatic pointer dcl 116 set ref 157* 176* 180 181 182 183 184 196 197 209 215 225 229 233 240 241 241 242 245 246 246 252 252 265 266 269 271 281 282 300* 302 334* 336 352 354 356 359 360 376 390* 392 402 430* 433 443 460 461 469 491 497 516 516 530* 532 547 551 555 563* 565 577 584* 586 598 677 689 690 690 691 692* any_other 000446 stack reference condition dcl 113 ref 277 290 316 326 366 382 408 423 areap 000010 internal static pointer initial dcl 70 set ref 168 169* 171 176 450 518 672 691 attach_count 000012 internal static fixed bin(17,0) initial dcl 71 set ref 260* 260 261 261* 262 attach_data_ptr 16 based pointer level 2 dcl 1-4 set ref 282* 300 334 390 430 530 563 584 696* attach_desc 20 based varying char(256) level 3 dcl 118 set ref 266* 281 attach_descrip_ptr 14 based pointer level 2 dcl 1-4 set ref 158 281* 320* 695* bin builtin function dcl 97 ref 642 bits 6 based structure level 2 in structure "ad" dcl 118 in procedure "remote_input_" set ref 180* bits 6 based bit array level 3 in structure "terminal_io_record" packed unaligned dcl 3-8 in procedure "remote_input_" set ref 483 483 498 498 513 515 char builtin function dcl 97 ref 262 476 char_string based char(1024) unaligned dcl 75 set ref 513* 515* chars 7 based structure level 2 dcl 118 set ref 182* cleanup 000454 stack reference condition dcl 113 ref 174 449 521 close 36 based entry variable level 2 dcl 1-4 set ref 375* code 000113 automatic fixed bin(35,0) dcl 40 in procedure "remote_input_" set ref 155* 159* 160* 164* 165* 169* 170 170* 216* 217* 221* 222* 236* 237* 247* 248* 253* 254* 268* 269 269* 333* 389* 403* 431* 461* 463 465* 484* 491* 492 499* 509* 523 620* 621* 636* 637* 643* 645* code parameter fixed bin(35,0) dcl 652 in procedure "abort_attach" set ref 650 657* 659 com_err_ 000032 constant entry external dcl 86 ref 657 com_err_sw 000100 automatic bit(1) unaligned dcl 37 set ref 154* 657 continue_to_signal_ 000020 constant entry external dcl 81 ref 718 control 66 based entry variable level 2 dcl 1-4 set ref 373* 415* conversion 000000 stack reference condition dcl 113 ref 640 copy builtin function dcl 97 ref 473 count_structure based structure level 1 dcl 135 data 6 based structure level 2 dcl 3-8 set ref 491 491 detach_iocb 26 based entry variable level 2 dcl 1-4 set ref 284* 414* device_opt 000162 automatic varying char(32) dcl 45 set ref 192* 199* 220 224 226* 228 230* 232 237 264 device_type 1 based fixed bin(17,0) level 3 in structure "terminal_io_record" dcl 3-8 in procedure "remote_input_" set ref 677* device_type based fixed bin(17,0) level 3 in structure "ad" dcl 118 in procedure "remote_input_" set ref 225* 229* 233* 241 245 469 497 677 dummy 000101 automatic varying char(32) dcl 38 set ref 201* 202 205* 206 element_size 4 based fixed bin(17,0) level 3 dcl 3-8 set ref 450 483 483 498 498 513 515 518 672* 674 678* empty builtin function dcl 97 ref 171 error_table_$bad_arg 000060 external static fixed bin(35,0) dcl 100 ref 247 253 552 error_table_$bad_conversion 000100 external static fixed bin(35,0) dcl 108 ref 643 error_table_$bad_mode 000056 external static fixed bin(35,0) dcl 99 ref 348 error_table_$badopt 000104 external static fixed bin(35,0) dcl 110 ref 236 error_table_$data_loss 000106 external static fixed bin(35,0) dcl 111 ref 509 error_table_$eof_record 000062 external static fixed bin(35,0) dcl 101 ref 484 499 error_table_$noarg 000076 external static fixed bin(35,0) dcl 107 ref 216 221 620 636 error_table_$not_attached 000066 external static fixed bin(35,0) dcl 103 ref 303 337 393 403 434 533 566 587 error_table_$not_closed 000072 external static fixed bin(35,0) dcl 105 ref 308 342 error_table_$not_detached 000064 external static fixed bin(35,0) dcl 102 ref 159 error_table_$not_open 000070 external static fixed bin(35,0) dcl 104 ref 398 403 439 538 571 592 error_table_$unimplemented_version 000102 external static fixed bin(35,0) dcl 109 ref 465 error_table_$wrong_no_of_args 000074 external static fixed bin(35,0) dcl 106 ref 164 fixed based structure level 2 dcl 118 flags 3 based structure level 3 dcl 3-8 get_chars 46 based entry variable level 2 dcl 1-4 set ref 370* get_line 42 based entry variable level 2 dcl 1-4 set ref 371* get_temp_segment_ 000022 constant entry external dcl 82 ref 169 hbound builtin function dcl 97 ref 163 194 619 635 hcs_$reset_ips_mask 000024 constant entry external dcl 83 ref 288 324 380 421 713 hcs_$set_ips_mask 000026 constant entry external dcl 84 ref 279 318 368 410 header based structure level 2 dcl 3-8 idx parameter fixed bin(17,0) dcl 632 in procedure "cv_dec_arg" set ref 630 634* 634 635 637 642 645 idx parameter fixed bin(17,0) dcl 616 in procedure "get_arg" set ref 614 618* 618 619 621 624 idx 000173 automatic fixed bin(17,0) dcl 46 in procedure "remote_input_" set ref 194* 195 196* 199 199* 200 200 201* 204 204 205* 208 209* 210 212* ignore 000100 automatic fixed bin(35,0) dcl 687 in procedure "clean_up" set ref 690* ignore 000100 automatic fixed bin(35,0) dcl 709 in procedure "handler" set ref 718* infop 000210 automatic pointer dcl 51 set ref 542* 551 551 555* ioa_ 000014 constant entry external dcl 79 ref 609 iocb based structure level 1 dcl 1-4 iocbp 000114 automatic pointer dcl 41 set ref 153* 158 160 281 282 283 284 286* 298* 300 307 320 322* 332* 334 341 370 371 372 373 374 375 376 378* 388* 390 397 412 413 414 415 416 417 419* 429* 430 438 529* 530 537 562* 563 570 583* 584 591 695 696 697 iox_$attach_ioname 000036 constant entry external dcl 88 ref 268 iox_$close 000042 constant entry external dcl 90 ref 402 iox_$control 000052 constant entry external dcl 94 ref 555 iox_$detach_iocb 000040 constant entry external dcl 89 ref 690 iox_$err_no_operation 000054 constant entry external dcl 95 ref 415 416 417 697 iox_$get_chars 000046 constant entry external dcl 92 ref 491 iox_$modes 000016 constant entry external dcl 80 ref 577 iox_$open 000044 constant entry external dcl 91 ref 354 360 iox_$position 000034 constant entry external dcl 87 ref 598 iox_$propagate 000030 constant entry external dcl 85 ref 286 322 378 419 iox_$read_record 000050 constant entry external dcl 93 ref 461 iox_modes 000000 constant char(24) initial array dcl 2-6 ref 352 length builtin function dcl 97 ref 508 ltrim builtin function dcl 97 ref 262 264 476 mask 000161 automatic bit(36) dcl 44 set ref 275* 279* 288* 288* 314* 318* 324* 324* 364* 368* 380* 380* 406* 410* 421* 421* 713 713* 713* 716* max_record_size 000175 automatic fixed bin(17,0) dcl 48 set ref 443* 447 456 491* min builtin function dcl 97 ref 512 modes 56 based entry variable level 2 dcl 1-4 set ref 374* 416* my_area based area(262144) dcl 74 set ref 171* 176 450 518 672 691 my_options 000324 automatic varying char(64) dcl 54 set ref 190* 197* 197 202* 202 206* 206 210* 210 266 n_elements 5 based fixed bin(24,0) level 3 dcl 3-8 set ref 450 456* 483 483 493* 498 498 508 513 515 518 672* 674 name 1 based char(32) level 2 dcl 1-4 set ref 160* null builtin function dcl 97 ref 157 158 168 181 302 307 320 336 341 392 397 412 433 438 445 450 532 537 551 565 570 586 591 689 690 692 695 696 open 32 based entry variable level 2 dcl 1-4 set ref 283* 413* 697* open_descrip_ptr 20 based pointer level 2 dcl 1-4 set ref 307 341 376* 397 412* 438 537 570 591 open_description 121 based varying char(24) level 3 dcl 118 set ref 352* 376 open_mode 000176 automatic fixed bin(17,0) dcl 49 set ref 346* 347 347 352 order 000177 automatic char(32) unaligned dcl 50 set ref 543* 546 550 555* position 62 based entry variable level 2 dcl 1-4 set ref 372* 417* preslew 3(01) based bit(1) level 4 packed unaligned dcl 3-8 set ref 513 ptrs 4 based structure level 2 dcl 118 set ref 181* rec_length 1 based fixed bin(17,0) level 3 dcl 118 set ref 183* 209* 240 241* 242* 246 246 252 252 443 record_count 2 based fixed bin(35,0) level 3 dcl 118 set ref 184* 516* 516 547* 551 record_io 6 based bit(1) level 3 packed unaligned dcl 118 set ref 356* 359* 460 record_len 000174 automatic fixed bin(17,0) dcl 47 set ref 461* 491* 493 records 4 based fixed bin(35,0) level 2 dcl 135 set ref 551* remote_device_name 000116 constant char(13) initial unaligned dcl 59 set ref 169* 262 266 657* rtrim builtin function dcl 97 ref 352 size builtin function dcl 97 ref 461 slew_control 2 based structure level 3 dcl 3-8 slew_count 2(18) based fixed bin(18,0) level 4 packed unsigned unaligned dcl 3-8 set ref 471 473 476 slew_string 000120 automatic varying char(128) dcl 43 set ref 471* 473* 476* 479* 487* 503* 508 513 515 slew_type 2 based fixed bin(18,0) level 4 packed unsigned unaligned dcl 3-8 set ref 470 475 space 005101 constant char(1) initial unaligned dcl 60 ref 212 265 266 static_comerr_sw 000013 internal static bit(1) initial unaligned dcl 72 set ref 154 607* 607 609* str1 parameter char dcl 653 set ref 650 657* str2 parameter char dcl 653 set ref 650 657* substr builtin function dcl 97 set ref 513* 515* temp_iocbp 000116 automatic pointer dcl 42 set ref 268* 271 terminal 7 based varying char(32) level 3 dcl 118 set ref 196* 197 215 265 269 terminal_attach_desc 000345 automatic varying char(256) dcl 55 set ref 191* 265* 268 terminal_attach_options 000223 automatic varying char(256) dcl 53 set ref 189* 212* 212 264* 264 265 266 terminal_io_record based structure level 1 dcl 3-8 set ref 450 461 518 672 674* terminal_io_record_data_chars based char unaligned dcl 3-54 ref 483 483 498 498 513 515 terminal_io_record_element_size 000466 automatic fixed bin(17,0) dcl 3-30 set ref 446* 461 672 672 678 terminal_io_record_n_elements 000467 automatic fixed bin(24,0) dcl 3-31 set ref 447* 461 672 672 terminal_io_record_ptr 000464 automatic pointer dcl 3-28 set ref 445* 450 450 456 461* 461 464 470 471 473 475 476 483 483 483 483 491 491 493 498 498 498 498 508 513 513 513 515 515 518 672* 674 676 677 678 terminal_io_record_version_1 constant fixed bin(17,0) initial dcl 3-36 ref 464 676 terminal_iocbp 4 based pointer level 3 dcl 118 set ref 271* 354* 360* 402* 461* 491* 555* 577* 598* 690 690* terminal_switch_name 000212 automatic varying char(32) dcl 52 set ref 262* 268 total_chars 000112 automatic fixed bin(21,0) dcl 39 set ref 508* 509 512 unspec builtin function dcl 97 set ref 674* version based fixed bin(17,0) level 3 dcl 3-8 set ref 464 676* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. Direct_input internal static fixed bin(17,0) initial dcl 2-15 Direct_output internal static fixed bin(17,0) initial dcl 2-15 Direct_update internal static fixed bin(17,0) initial dcl 2-15 Keyed_sequential_input internal static fixed bin(17,0) initial dcl 2-15 Keyed_sequential_output internal static fixed bin(17,0) initial dcl 2-15 Keyed_sequential_update internal static fixed bin(17,0) initial dcl 2-15 SLEW_TO_INSIDE_PAGE internal static fixed bin(17,0) initial dcl 3-44 SLEW_TO_OUTSIDE_PAGE internal static fixed bin(17,0) initial dcl 3-44 SLEW_TO_TOP_OF_PAGE internal static fixed bin(17,0) initial dcl 3-44 Sequential_input_output internal static fixed bin(17,0) initial dcl 2-15 Sequential_output internal static fixed bin(17,0) initial dcl 2-15 Sequential_update internal static fixed bin(17,0) initial dcl 2-15 Stream_output internal static fixed bin(17,0) initial dcl 2-15 TELEPRINTER_DEVICE internal static fixed bin(17,0) initial dcl 3-38 iox_$iocb_version_sentinel external static char(4) dcl 1-43 short_iox_modes internal static char(4) initial array dcl 2-12 terminal_io_record_data_bits based bit unaligned dcl 3-64 terminal_io_record_data_chars_varying based varying char dcl 3-58 terminal_io_record_data_chars_varying_max_len automatic fixed bin(21,0) dcl 3-57 NAMES DECLARED BY EXPLICIT CONTEXT. abort_attach 004642 constant entry internal dcl 650 ref 160 165 170 217 222 237 248 254 269 621 637 645 alloc_tio_rec 004726 constant entry internal dcl 670 ref 454 attach_return 002367 constant label dcl 292 ref 663 bad_dec_arg 004556 constant label dcl 643 set ref 640 clean_up 004767 constant entry internal dcl 685 ref 174 312 661 cv_dec_arg 004415 constant entry internal dcl 630 ref 209 flip_com_err_sw 004236 constant entry external dcl 605 get_arg 004273 constant entry internal dcl 614 ref 196 199 201 205 get_chars_ret 003667 constant label dcl 518 ref 463 466 485 492 500 handler 005041 constant entry internal dcl 707 ref 277 316 366 408 pass_on 004015 constant label dcl 555 ref 548 remote_input_ 000407 constant entry external dcl 11 remote_input_attach 000422 constant entry external dcl 150 remote_input_close 003012 constant entry external dcl 386 ref 375 remote_input_control 003710 constant entry external dcl 527 ref 373 remote_input_detach 002374 constant entry external dcl 296 ref 284 414 remote_input_get_chars 003200 constant entry external dcl 427 ref 370 371 remote_input_modes 004050 constant entry external dcl 560 ref 374 remote_input_open 002527 constant entry external dcl 330 ref 283 413 remote_input_position 004157 constant entry external dcl 581 ref 372 remote_reader_attach 000443 constant entry external dcl 150 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 5670 6000 5103 5700 Length 6360 5103 110 344 565 4 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME remote_input_ 387 external procedure is an external procedure. on unit on line 174 64 on unit on unit on line 277 64 on unit on unit on line 316 64 on unit on unit on line 366 64 on unit on unit on line 408 64 on unit on unit on line 449 64 on unit get_arg 90 internal procedure uses returns(char(*)) or returns(bit(*)). cv_dec_arg 256 internal procedure enables or reverts conditions. on unit on line 640 64 on unit abort_attach 84 internal procedure is called during a stack extension. alloc_tio_rec internal procedure shares stack frame of external procedure remote_input_. clean_up 72 internal procedure is called by several nonquick procedures. handler 72 internal procedure is called by several nonquick procedures. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 areap remote_input_ 000012 attach_count remote_input_ 000013 static_comerr_sw remote_input_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME clean_up 000100 ignore clean_up handler 000100 ignore handler remote_input_ 000100 com_err_sw remote_input_ 000101 dummy remote_input_ 000112 total_chars remote_input_ 000113 code remote_input_ 000114 iocbp remote_input_ 000116 temp_iocbp remote_input_ 000120 slew_string remote_input_ 000161 mask remote_input_ 000162 device_opt remote_input_ 000173 idx remote_input_ 000174 record_len remote_input_ 000175 max_record_size remote_input_ 000176 open_mode remote_input_ 000177 order remote_input_ 000210 infop remote_input_ 000212 terminal_switch_name remote_input_ 000223 terminal_attach_options remote_input_ 000324 my_options remote_input_ 000345 terminal_attach_desc remote_input_ 000462 adp remote_input_ 000464 terminal_io_record_ptr remote_input_ 000466 terminal_io_record_element_size remote_input_ 000467 terminal_io_record_n_elements remote_input_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs cat_realloc_cs call_ext_out_desc call_ext_out call_int_this_desc call_int_this call_int_other_desc call_int_other return tra_ext signal enable shorten_stack ext_entry ext_entry_desc int_entry int_entry_desc return_chars_eis any_to_any_tr alloc_based free_based empty THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ continue_to_signal_ get_temp_segment_ hcs_$reset_ips_mask hcs_$set_ips_mask ioa_ iox_$attach_ioname iox_$close iox_$control iox_$detach_iocb iox_$err_no_operation iox_$get_chars iox_$modes iox_$open iox_$position iox_$propagate iox_$read_record THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_arg error_table_$bad_conversion error_table_$bad_mode error_table_$badopt error_table_$data_loss error_table_$eof_record error_table_$noarg error_table_$not_attached error_table_$not_closed error_table_$not_detached error_table_$not_open error_table_$unimplemented_version error_table_$wrong_no_of_args LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000406 150 000414 153 000461 154 000465 155 000477 157 000501 158 000503 159 000506 160 000510 163 000534 164 000541 165 000544 168 000572 169 000577 170 000617 171 000644 174 000650 176 000672 180 000700 181 000704 182 000706 183 000711 184 000713 189 000714 190 000715 191 000716 192 000717 194 000724 195 000735 196 000755 197 001006 198 001043 199 001045 200 001103 201 001117 202 001147 203 001204 204 001206 205 001220 206 001250 207 001305 208 001307 209 001314 210 001325 211 001376 212 001400 213 001436 215 001441 216 001447 217 001452 220 001475 221 001502 222 001505 223 001530 224 001531 225 001536 226 001540 227 001545 228 001546 229 001553 230 001555 231 001562 232 001563 233 001570 234 001572 236 001573 237 001576 238 001631 240 001632 241 001636 242 001644 245 001646 246 001651 247 001656 248 001661 250 001704 252 001705 253 001712 254 001715 260 001740 261 001742 262 001747 264 002013 265 002063 266 002121 268 002165 269 002232 271 002271 275 002275 277 002276 279 002320 281 002333 282 002337 283 002340 284 002344 286 002347 288 002356 290 002366 292 002367 296 002370 298 002404 299 002411 300 002412 302 002414 303 002420 304 002423 307 002424 308 002430 309 002433 312 002434 314 002440 316 002441 318 002463 320 002476 322 002501 324 002510 326 002520 328 002521 330 002522 332 002537 333 002544 334 002546 336 002550 337 002554 338 002557 341 002560 342 002564 343 002567 346 002570 347 002572 348 002576 349 002601 352 002602 354 002632 355 002651 356 002653 357 002656 359 002657 360 002662 361 002701 364 002703 366 002704 368 002726 370 002741 371 002746 372 002750 373 002753 374 002756 375 002761 376 002764 378 002767 380 002776 382 003006 384 003007 386 003010 388 003022 389 003027 390 003031 392 003033 393 003037 394 003042 397 003043 398 003047 399 003052 402 003053 403 003064 406 003073 408 003074 410 003116 412 003131 413 003134 414 003140 415 003143 416 003147 417 003151 419 003153 421 003161 423 003171 425 003172 427 003173 429 003210 430 003215 431 003217 433 003222 434 003226 435 003231 438 003232 439 003236 440 003241 443 003242 445 003244 446 003246 447 003250 449 003252 450 003266 452 003303 454 003304 456 003305 460 003310 461 003314 463 003342 464 003344 465 003347 466 003352 469 003353 470 003356 471 003364 473 003375 474 003410 475 003412 476 003414 477 003473 479 003475 481 003501 483 003502 484 003514 485 003517 487 003520 489 003521 491 003522 492 003543 493 003545 497 003550 498 003553 499 003564 500 003567 503 003570 508 003571 509 003574 512 003602 513 003607 515 003637 516 003661 518 003667 521 003677 523 003700 525 003702 527 003703 529 003726 530 003733 532 003735 533 003741 534 003744 537 003745 538 003751 539 003754 542 003755 543 003760 544 003765 546 003766 547 003772 548 003774 550 003775 551 004001 552 004011 553 004014 555 004015 558 004042 560 004043 562 004073 563 004100 565 004102 566 004106 567 004111 570 004112 571 004116 572 004121 575 004122 577 004123 579 004151 581 004152 583 004167 584 004174 586 004176 587 004202 588 004205 591 004206 592 004212 593 004215 596 004216 598 004217 600 004234 605 004235 607 004243 609 004252 611 004271 614 004272 618 004300 619 004302 620 004310 621 004312 622 004365 624 004366 630 004414 634 004422 635 004424 636 004432 637 004434 638 004507 640 004510 642 004527 643 004556 645 004562 647 004634 650 004641 657 004662 659 004712 661 004716 663 004723 670 004726 672 004727 674 004745 676 004757 677 004761 678 004763 680 004765 685 004766 689 004774 690 005001 691 005016 692 005021 695 005024 696 005027 697 005031 699 005037 707 005040 713 005046 716 005060 718 005062 720 005071 ----------------------------------------------------------- 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