COMPILATION LISTING OF SEGMENT setup_graphics Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/18/82 1642.4 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * * 6* * * 7* *********************************************************** */ 8 9 /* ****************************************************** 10* * * 11* * * 12* * Copyright (c) 1972 by Massachusetts Institute of * 13* * Technology and Honeywell Information Systems, Inc. * 14* * * 15* * * 16* ****************************************************** */ 17 18 setup_graphics: sg: proc; 19 20 /* This routine sets up the I/O switches for use with any terminal or offline 21* graphics device. */ 22 /* Written July 2, 1973 by C. D. Tavares */ 23 /* Modified 07/13/77 by CDT to include -output_file and use iox_$move_attach */ 24 /* Last modified 01/27/81 by CDT to make -offline work properly */ 25 26 dcl (hcs_$set_ips_mask, hcs_$reset_ips_mask) ext entry (bit (36) aligned, bit (36) aligned), 27 old_mask bit (36) aligned; 28 29 dcl absolute_pathname_$add_suffix ext entry (char (*), char (*), char (*), fixed bin (35)), 30 suffix char (32); 31 32 dcl terminate_process_ ext entry (char (*), pointer); 33 34 dcl iox_$attach_ioname ext entry (char (*), pointer, char (*), fixed bin (35)), 35 iox_$attach_iocb ext entry (pointer, char (*), fixed bin (35)), 36 iox_$find_iocb ext entry (char (*), pointer, fixed bin (35)), 37 iox_$open ext entry (pointer, fixed bin, bit (1) aligned, fixed bin (35)), 38 iox_$look_iocb ext entry (char (*), pointer, fixed bin (35)), 39 iox_$move_attach ext entry (pointer, pointer, fixed bin (35)), 40 (iox_$close, iox_$detach_iocb) ext entry (pointer, fixed bin (35)), 41 iox_$modes ext entry (pointer, char (*), char (*), fixed bin (35)), 42 tty_io pointer, 43 iox_$user_io ext pointer; 44 45 dcl ioa_$rsnnl ext entry options (variable); 46 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 ..... */ 47 48 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 */ 49 50 51 dcl myname char (24); 52 53 dcl attach_description char (168) varying, 54 based_atd based char (64) varying; 55 56 dcl cu_$arg_ptr ext entry (fixed bin, pointer, fixed bin, fixed bin (35)), 57 ap pointer, 58 al fixed bin, 59 arg char (al) based (ap); 60 61 dcl 1 term_info aligned, 62 2 version initial (0), 63 2 code fixed bin (35); 64 65 dcl cu_$arg_count ext entry (fixed bin), 66 nargs fixed bin; 67 68 dcl (com_err_, com_err_$suppress_name) ext entry options (variable); 69 70 dcl gdt_segname char (168), 71 error_table_$badopt ext fixed bin (35), 72 error_table_$inconsistent ext fixed bin (35), 73 error_table_$smallarg ext fixed bin (35), 74 error_table_$noarg ext fixed bin (35); 75 76 dcl initted bit (1) aligned internal static initial (""b), 77 default_error_handler_$add_finish_handler ext entry (entry (), fixed bin (35)); 78 79 dcl (null, substr) builtin; 80 81 dcl (i, j, this_known_switch) fixed bin; 82 83 dcl 1 known_switches (32) static, 84 2 switch_name char (32), 85 2 switch_ptr pointer, 86 2 extra_switch_ptr pointer, 87 2 is_online bit (1) aligned; 88 89 dcl number_known_switches fixed bin static initial (0), 90 prev_number_known_switches fixed bin; 91 92 dcl using_file bit (1) aligned, 93 mode_string char (256), 94 file_name char (168), 95 have_target bit (1) aligned, 96 extra_switch char (32), 97 extra_sw_ptr pointer, 98 extra_attach_description char (168) varying, 99 unique_chars_ ext entry (bit (*)) returns (char (15)); 100 101 dcl 1 switch_arg_structure (10), 102 2 from_name char (32), 103 2 from_mode fixed bin; 104 105 dcl total_switches fixed bin; 106 107 dcl online_switch bit (1) aligned, 108 revert_online_on_err bit (1) aligned initial (""b); 109 110 dcl to_switch char (32); 111 112 myname = "setup_graphics"; 113 114 if ^initted then do; /* set up for automatic "rg" on process end */ 115 initted = "1"b; 116 call default_error_handler_$add_finish_handler (remove_graphics, code); 117 if code ^= 0 then call com_err_ (code, "setup_graphics", 118 "^/ Warning - remove_graphics must be called manually when desired. Continuing..."); 119 end; 120 121 total_switches = 0; /* initialize state variables */ 122 prev_number_known_switches = number_known_switches; /* for graceful unwind of attachments if err */ 123 online_switch = ""b; 124 125 file_name, to_switch, gdt_segname, mode_string = ""; 126 have_target = ""b; 127 using_file = ""b; 128 129 call cu_$arg_count (nargs); /* get number of arguments */ 130 131 if nargs = 0 then do; /* poor soul needs guidance */ 132 call com_err_ (error_table_$noarg, "setup_graphics", "Command syntax is:"); 133 call com_err_$suppress_name (0, "setup_graphics", 134 " setup_graphics -table GDT_name [-from sw_1 [mode_1] ... sw_N [mode_N]] [-to switchname] [-online]"); 135 return; 136 end; 137 138 if nargs = 1 then do; /* the old, upwards-compatible case */ 139 call cu_$arg_ptr (1, ap, al, code); /* get the gdt name */ 140 gdt_segname = arg; 141 from_name (1) = "graphic_output"; /* set defaults for from_names */ 142 from_mode (1) = Stream_output; 143 from_name (2) = "graphic_input"; 144 from_mode (2) = Stream_input; 145 total_switches = 2; /* to_switch and online_switch set by default later */ 146 end; 147 148 else do i = 1 to nargs; /* process new-style args */ 149 150 call cu_$arg_ptr (i, ap, al, code); /* get next arg to process */ 151 152 if arg = "-from" | arg = "-fm" then do; /* from_name arg(s) */ 153 154 total_switches = total_switches + 1; /* add one more switch to array */ 155 156 i = i + 1; /* for getting next arg */ 157 call cu_$arg_ptr (i, ap, al, code); /* which should be switch name */ 158 if code ^= 0 then call err (code, "No switch name after ""-from""."); /* tsk. */ 159 160 from_name (total_switches) = arg; /* remember the switch name */ 161 from_mode (total_switches) = Stream_input_output; /* assume the dafault mode */ 162 163 call cu_$arg_ptr (i+1, ap, al, code); /* peek to see if there is a mode argument */ 164 if code = 0 then if substr (arg, 1, 1) ^= "-" then do; /* yes there is */ 165 do j = lbound (short_iox_modes, 1) to hbound (short_iox_modes, 1) while (short_iox_modes (j) ^= arg); 166 /* try to match it */ 167 end; 168 169 if j > hbound (short_iox_modes, 1) then 170 do j = lbound (iox_modes, 1) to hbound (iox_modes, 1) while (iox_modes (j) ^= arg); 171 end; 172 173 if j > hbound (iox_modes, 1) then call err (0, "Unknown mode: " || arg); 174 /* no match, bad mode */ 175 176 from_mode (total_switches) = j; /* did match, set it */ 177 i = i + 1; /* set to skip that arg */ 178 end; 179 180 181 end; 182 183 else if arg = "-to" | arg = "-switch" | arg = "-stream" then do; /* next arg is target switch */ 184 185 if have_target then call err (0, "Only one ""-output_file"" or ""-to"" control argument allowed."); 186 187 i = i + 1; /* prepare to snarf next arg */ 188 call cu_$arg_ptr (i, ap, al, code); 189 if code ^= 0 then call err (code, "No switch name after ""-to"""); /* tsk! */ 190 191 to_switch = arg; /* save it */ 192 have_target = "1"b; 193 end; 194 195 else if (arg = "-output_file" | arg = "-of" | arg = "-file") then do; /* user wants graphics into a file */ 196 197 if have_target then call err (0, "Only one ""-output_file"" or ""-to"" control argument allowed."); 198 199 i = i + 1; 200 call cu_$arg_ptr (i, ap, al, code); /* get the file name */ 201 if code ^= 0 then call err (code, "No file name after ""-output_file"""); 202 203 file_name = arg; 204 have_target = "1"b; 205 using_file = "1"b; 206 end; 207 208 else if arg = "-table" | arg = "-tb" then do; /* GDT name specification */ 209 210 if gdt_segname ^= "" then call err (0, "The ""-table"" control arg may only be specified once."); 211 212 i = i + 1; /* prepare to get the name */ 213 call cu_$arg_ptr (i, ap, al, code); 214 if code ^= 0 then call err (code, "No GDT name after ""-table"""); /* tsk!! */ 215 216 gdt_segname = arg; /* save it */ 217 end; 218 219 else if arg = "-online" then online_switch = "1"b; 220 221 else if arg = "-offline" /* upwards-compatible, to go away */ 222 then if to_switch = "" /* no "-to" has been given */ 223 then do; 224 to_switch = "offline_graphics_"; 225 have_target = "1"b; 226 end; 227 228 else; /* forget it, "-offline" redundant, not worth the wrist-slap */ 229 230 else if arg = "-modes" then do; /* mode string for GDT or otherwise */ 231 232 if mode_string ^= "" then call err (0, "The ""-modes"" control arg may only be specified once."); 233 234 i = i + 1; /* prepare to get mode string */ 235 call cu_$arg_ptr (i, ap, al, code); 236 if code ^= 0 then call err (code, "No mode string after ""-modes""."); /* Tsk! */ 237 238 mode_string = arg; 239 end; 240 241 else if i = 1 then gdt_segname = arg; /* user used implied "-tb" option */ 242 243 else call err (error_table_$badopt, arg); /* don't want any, charlie. */ 244 245 end; 246 247 if online_switch then do; /* see if anyone else is online */ 248 do i = 1 to number_known_switches while (is_online (i) = ""b); 249 end; 250 251 if i ^> number_known_switches /* too bad, someone else is */ 252 then call err (0, "Only one set of switches may be ""-online"" at a time."); 253 end; 254 255 if gdt_segname = "" then 256 if ^using_file then /* ok to route to a file without a GDT */ 257 call err (0, "No graphic device table was specified."); 258 259 if total_switches = 0 then do; 260 from_name (1) = "graphic_output"; 261 from_name (2) = "graphic_input"; 262 from_mode (1) = Stream_output; 263 from_mode (2) = Stream_input; 264 if using_file then total_switches = 1; /* can't do input and output from same file! */ 265 else total_switches = 2; 266 end; 267 268 if using_file then do; 269 if total_switches > 1 then call err (0, "Cannot use same file for two I/O switches."); 270 else if online_switch then call err (error_table_$inconsistent, "-output_file and -online"); 271 272 if gdt_segname = "" then suffix = "graphics"; /* user putting MSGC into a file */ 273 else suffix = gdt_segname; /* user putting device-dependent code into a file */ 274 call absolute_pathname_$add_suffix ((file_name), suffix, file_name, code); 275 if code ^= 0 then call err (code, rtrim (file_name, " ") || "." || suffix); 276 end; 277 278 if ^have_target then do; 279 call remove_graphics; 280 to_switch = "tty_i/o"; 281 online_switch = "1"b; 282 have_target = "1"b; 283 end; 284 285 extra_switch = ""; 286 extra_sw_ptr = null; 287 288 if using_file then do; 289 call ioa_$rsnnl ("vfile_ ^a", attach_description, 0, file_name); 290 if gdt_segname ^= "" then do; /* has to be an extra switch in the middle */ 291 extra_switch = "sg." || unique_chars_ (""b); 292 extra_attach_description = attach_description; 293 call iox_$find_iocb (extra_switch, extra_sw_ptr, code); 294 if code ^= 0 then call err (code, "Finding iocb of extra switch"); 295 call ioa_$rsnnl ("graphic_dim_ ^a graphic ^a", attach_description, 0, extra_switch, gdt_segname); 296 end; 297 end; 298 else call ioa_$rsnnl ("graphic_dim_ ^a graphic ^a", attach_description, 0, to_switch, gdt_segname); 299 /* set up the master description */ 300 301 do i = 1 to total_switches; /* process each -from switch given */ 302 303 do this_known_switch = 1 to number_known_switches while (switch_name (this_known_switch) ^= from_name (i)); 304 end; 305 306 if this_known_switch ^> number_known_switches then call remove_one_switch (this_known_switch, ""b); 307 /* this switch already known, must be detached */ 308 309 if this_known_switch > number_known_switches then do; 310 /* switch was not known, add it to list */ 311 switch_ptr (number_known_switches+1) = null; /* make sure no window for attach unwinding code */ 312 number_known_switches = number_known_switches + 1; 313 switch_name (number_known_switches) = from_name (i); 314 is_online (number_known_switches) = online_switch; 315 extra_switch_ptr (number_known_switches) = extra_sw_ptr; 316 end; 317 318 call iox_$attach_ioname (from_name (i), switch_ptr (this_known_switch), (attach_description), code); 319 /* attach the switchname */ 320 if code ^= 0 then call err (code, rtrim (from_name (i), " ") || " " || gdt_segname); 321 /* however, we don't open the switch before all switches are attached properly. */ 322 /* This allows GDT open and close entries to specify some chars to be output. */ 323 end; 324 325 if online_switch then do; /* fiddle with user_i/o */ 326 call iox_$find_iocb (to_switch, tty_io, code); 327 if code ^= 0 then call err (code, "Finding iocb of " || to_switch); 328 329 call ioa_$rsnnl ("graphic_dim_ ^a ^graphic", attach_description, 0, to_switch); 330 331 call hcs_$set_ips_mask (""b, old_mask); 332 333 call iox_$move_attach (iox_$user_io, tty_io, code); 334 if code ^= 0 then call terminate_process_ ("fatal_error", addr (term_info)); 335 336 /* now make user_i/o go thru our dim */ 337 call iox_$attach_iocb (iox_$user_io, (attach_description), code); 338 if code ^= 0 then call terminate_process_ ("fatal_error", addr (term_info)); 339 340 call iox_$open (iox_$user_io, Stream_input_output, ""b, code); 341 if code ^= 0 then call terminate_process_ ("fatal_error", addr (term_info)); 342 343 call hcs_$reset_ips_mask (old_mask, ""b); 344 revert_online_on_err = "1"b; /* hedge our bets */ 345 end; /* all done hacking. */ 346 347 else if extra_switch ^= "" then do; 348 call iox_$attach_iocb (extra_sw_ptr, (extra_attach_description), code); 349 if code ^= 0 then call err (code, "Attaching extra switch"); 350 351 call iox_$open (extra_sw_ptr, Stream_output, ""b, code); 352 if code ^= 0 then call err (code, "Opening extra switch"); 353 end; 354 355 do i = 1 to total_switches; /* now that all switches attached, open them */ 356 357 do this_known_switch = 1 to number_known_switches while (switch_name (this_known_switch) ^= from_name (i)); 358 end; 359 360 call iox_$open (switch_ptr (this_known_switch), from_mode (i), ""b, code); 361 /* open the switch */ 362 if code ^= 0 then call err (code, from_name (i)); 363 364 if mode_string ^= "" then 365 call iox_$modes (switch_ptr (this_known_switch), mode_string, "", code); 366 if code ^= 0 then call err (code, rtrim (mode_string, " ") || " for " || from_name (i)); 367 368 end; 369 370 return; 371 372 remove_graphics: rg: entry; 373 374 dcl were_any_online bit (1) aligned; 375 376 myname = "remove_graphics"; 377 prev_number_known_switches = number_known_switches; /* so "err" doesn't try to unwind too much */ 378 379 call cu_$arg_count (nargs); 380 were_any_online = are_any_online (); 381 382 if nargs = 0 then do; 383 rg_all: do i = 1 to number_known_switches; 384 call remove_one_switch (i, "1"b); 385 end; 386 387 number_known_switches = 0; 388 end; 389 390 else do i = 1 to nargs; 391 392 call cu_$arg_ptr (i, ap, al, code); 393 394 if nargs = 1 then do; 395 if arg = "-a" | arg = "-all" then goto rg_all; 396 end; 397 398 do j = 1 to number_known_switches while (arg ^= switch_name (j)); 399 end; 400 401 if j > number_known_switches then call com_err_ (0, "remove_graphics", """^a"" is not a graphic switch.", 402 arg); 403 404 else do; 405 call remove_one_switch (j, "1"b); 406 407 do j = j to number_known_switches - 1; 408 unspec (known_switches (j)) = unspec (known_switches (j+1)); 409 end; 410 411 number_known_switches = number_known_switches - 1; 412 end; 413 414 end; 415 416 if were_any_online ^= are_any_online () then call remove_online_switch; 417 418 remove_online_switch: proc; 419 420 call iox_$look_iocb ("tty_i/o", tty_io, code); 421 if code ^= 0 then call err (code, "tty_i/o"); 422 423 call hcs_$set_ips_mask (""b, old_mask); 424 425 call iox_$close (iox_$user_io, code); 426 if code ^= 0 then call terminate_process_ ("fatal_error", addr (term_info)); 427 428 call iox_$detach_iocb (iox_$user_io, code); 429 if code ^= 0 then call terminate_process_ ("fatal_error", addr (term_info)); 430 431 call iox_$move_attach (tty_io, iox_$user_io, code); 432 if code ^= 0 then call terminate_process_ ("fatal_error", addr (term_info)); 433 434 call hcs_$reset_ips_mask (old_mask, ""b); 435 end remove_online_switch; 436 437 return; 438 439 remove_one_switch: proc (which, essential); 440 441 dcl which fixed bin parameter, 442 essential bit (1) aligned parameter; /* need we complain if it doesn't work? */ 443 444 call iox_$close (switch_ptr (which), code); 445 if essential then if code ^= 0 then call err (code, switch_name (which)); 446 447 call iox_$detach_iocb (switch_ptr (which), code); 448 if essential then if code ^= 0 then call err (code, switch_name (which)); 449 450 if extra_switch_ptr (which) ^= null then do; 451 call iox_$close (extra_switch_ptr (which), code); 452 if essential then if code ^= 0 then call err (code, switch_name (which)); 453 454 call iox_$detach_iocb (extra_switch_ptr (which), code); 455 if essential then if code ^= 0 then call err (code, switch_name (which)); 456 end; 457 return; 458 end remove_one_switch; 459 460 are_any_online: proc returns (bit (1) aligned); 461 462 dcl i fixed bin; 463 464 do i = 1 to number_known_switches; 465 if is_online (i) then return ("1"b); 466 end; 467 468 return (""b); 469 470 end are_any_online; 471 472 473 err: proc (code, reason); 474 475 dcl code fixed bin (35), 476 reason char (*); 477 478 dcl i fixed bin; 479 480 call com_err_ (code, myname, reason); 481 482 /* try to gracefully unwind half-baked attachments */ 483 484 do i = number_known_switches to prev_number_known_switches + 1 by -1; 485 if switch_ptr (i) ^= null then call remove_one_switch (i, ""b); 486 end; 487 488 if revert_online_on_err then call remove_online_switch; 489 490 number_known_switches = prev_number_known_switches; 491 goto returner; 492 end err; 493 494 returner: return; 495 end setup_graphics; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/18/82 1625.8 setup_graphics.pl1 >dumps>old>recomp>setup_graphics.pl1 47 1 07/28/81 1333.4 iocb.incl.pl1 >ldd>include>iocb.incl.pl1 49 2 02/02/78 1229.7 iox_modes.incl.pl1 >ldd>include>iox_modes.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. Stream_input constant fixed bin(17,0) initial dcl 2-15 ref 144 263 Stream_input_output 000000 constant fixed bin(17,0) initial dcl 2-15 set ref 161 340* Stream_output 000177 constant fixed bin(17,0) initial dcl 2-15 set ref 142 262 351* absolute_pathname_$add_suffix 000720 constant entry external dcl 29 ref 274 al 000200 automatic fixed bin(17,0) dcl 56 set ref 139* 140 150* 152 152 157* 160 163* 164 165 169 173 183 183 183 188* 191 195 195 195 200* 203 208 208 213* 216 219 221 230 235* 238 241 243 243 392* 395 395 398 401 401 ap 000176 automatic pointer dcl 56 set ref 139* 140 150* 152 152 157* 160 163* 164 165 169 173 183 183 183 188* 191 195 195 195 200* 203 208 208 213* 216 219 221 230 235* 238 241 243 392* 395 395 398 401 arg based char unaligned dcl 56 set ref 140 152 152 160 164 165 169 173 183 183 183 191 195 195 195 203 208 208 216 219 221 230 238 241 243* 395 395 398 401* attach_description 000122 automatic varying char(168) dcl 53 set ref 289* 292 295* 298* 318 329* 337 code 1 000202 automatic fixed bin(35,0) level 2 in structure "term_info" dcl 61 in procedure "sg" set ref 116* 117 117* 139* 150* 157* 158 158* 163* 164 188* 189 189* 200* 201 201* 213* 214 214* 235* 236 236* 274* 275 275* 293* 294 294* 318* 320 320* 326* 327 327* 333* 334 337* 338 340* 341 348* 349 349* 351* 352 352* 360* 362 362* 364* 366 366* 392* 420* 421 421* 425* 426 428* 429 431* 432 444* 445 445* 447* 448 448* 451* 452 452* 454* 455 455* code parameter fixed bin(35,0) dcl 475 in procedure "err" set ref 473 480* com_err_ 000756 constant entry external dcl 68 ref 117 132 401 480 com_err_$suppress_name 000760 constant entry external dcl 68 ref 133 cu_$arg_count 000754 constant entry external dcl 65 ref 129 379 cu_$arg_ptr 000752 constant entry external dcl 56 ref 139 150 157 163 188 200 213 235 392 default_error_handler_$add_finish_handler 000770 constant entry external dcl 76 ref 116 error_table_$badopt 000762 external static fixed bin(35,0) dcl 70 set ref 243* error_table_$inconsistent 000764 external static fixed bin(35,0) dcl 70 set ref 270* error_table_$noarg 000766 external static fixed bin(35,0) dcl 70 set ref 132* essential parameter bit(1) dcl 441 ref 439 445 448 452 455 extra_attach_description 000452 automatic varying char(168) dcl 92 set ref 292* 348 extra_sw_ptr 000450 automatic pointer dcl 92 set ref 286* 293* 315 348* 351* extra_switch 000437 automatic char(32) unaligned dcl 92 set ref 285* 291* 293* 295* 347 extra_switch_ptr 12 000012 internal static pointer array level 2 dcl 83 set ref 315* 450 451* 454* file_name 000364 automatic char(168) unaligned dcl 92 set ref 125* 203* 274 274* 275 289* from_mode 10 000525 automatic fixed bin(17,0) array level 2 dcl 101 set ref 142* 144* 161* 176* 262* 263* 360* from_name 000525 automatic char(32) array level 2 packed unaligned dcl 101 set ref 141* 143* 160* 260* 261* 303 313 318* 320 357 362* 366 gdt_segname 000205 automatic char(168) unaligned dcl 70 set ref 125* 140* 210 216* 241* 255 272 273 290 295* 298* 320 have_target 000436 automatic bit(1) dcl 92 set ref 126* 185 192* 197 204* 225* 278 282* hcs_$reset_ips_mask 000716 constant entry external dcl 26 ref 343 434 hcs_$set_ips_mask 000714 constant entry external dcl 26 ref 331 423 i 000257 automatic fixed bin(17,0) dcl 81 in procedure "sg" set ref 148* 150* 156* 156 157* 163 177* 177 187* 187 188* 199* 199 200* 212* 212 213* 234* 234 235* 241* 248* 248* 251 301* 303 313 318 320* 355* 357 360 362 366* 383* 384* 390* 392* i 000100 automatic fixed bin(17,0) dcl 478 in procedure "err" set ref 484* 485 485* i 000714 automatic fixed bin(17,0) dcl 462 in procedure "are_any_online" set ref 464* 465* initted 000010 internal static bit(1) initial dcl 76 set ref 114 115* ioa_$rsnnl 000750 constant entry external dcl 45 ref 289 295 298 329 iox_$attach_iocb 000726 constant entry external dcl 34 ref 337 348 iox_$attach_ioname 000724 constant entry external dcl 34 ref 318 iox_$close 000740 constant entry external dcl 34 ref 425 444 451 iox_$detach_iocb 000742 constant entry external dcl 34 ref 428 447 454 iox_$find_iocb 000730 constant entry external dcl 34 ref 293 326 iox_$look_iocb 000734 constant entry external dcl 34 ref 420 iox_$modes 000744 constant entry external dcl 34 ref 364 iox_$move_attach 000736 constant entry external dcl 34 ref 333 431 iox_$open 000732 constant entry external dcl 34 ref 340 351 360 iox_$user_io 000746 external static pointer dcl 34 set ref 333* 337* 340* 425* 428* 431* iox_modes 000016 constant char(24) initial array dcl 2-6 ref 169 169 169 173 is_online 14 000012 internal static bit(1) array level 2 dcl 83 set ref 248 314* 465 j 000260 automatic fixed bin(17,0) dcl 81 set ref 165* 165* 169 169* 169* 173 176 398* 398* 401 405* 407* 407* 408 408* known_switches 000012 internal static structure array level 1 unaligned dcl 83 set ref 408* 408 mode_string 000264 automatic char(256) unaligned dcl 92 set ref 125* 232 238* 364 364* 366 myname 000114 automatic char(24) unaligned dcl 51 set ref 112* 376* 480* nargs 000204 automatic fixed bin(17,0) dcl 65 set ref 129* 131 138 148 379* 382 390 394 null builtin function dcl 79 ref 286 311 450 485 number_known_switches 000712 internal static fixed bin(17,0) initial dcl 89 set ref 122 248 251 303 306 309 311 312* 312 313 314 315 357 377 383 387* 398 401 407 411* 411 464 484 490* old_mask 000100 automatic bit(36) dcl 26 set ref 331* 343* 423* 434* online_switch 000660 automatic bit(1) dcl 107 set ref 123* 219* 247 270 281* 314 325 prev_number_known_switches 000262 automatic fixed bin(17,0) dcl 89 set ref 122* 377* 484 490 reason parameter char unaligned dcl 475 set ref 473 480* revert_online_on_err 000661 automatic bit(1) initial dcl 107 set ref 107* 344* 488 short_iox_modes 000001 constant char(4) initial array dcl 2-12 ref 165 165 165 169 substr builtin function dcl 79 ref 164 suffix 000101 automatic char(32) unaligned dcl 29 set ref 272* 273* 274* 275 switch_arg_structure 000525 automatic structure array level 1 unaligned dcl 101 switch_name 000012 internal static char(32) array level 2 packed unaligned dcl 83 set ref 303 313* 357 398 445* 448* 452* 455* switch_ptr 10 000012 internal static pointer array level 2 dcl 83 set ref 311* 318* 360* 364* 444* 447* 485 term_info 000202 automatic structure level 1 dcl 61 set ref 334 334 338 338 341 341 426 426 429 429 432 432 terminate_process_ 000722 constant entry external dcl 32 ref 334 338 341 426 429 432 this_known_switch 000261 automatic fixed bin(17,0) dcl 81 set ref 303* 303* 306 306* 309 318 357* 357* 360 364 to_switch 000662 automatic char(32) unaligned dcl 110 set ref 125* 191* 221 224* 280* 298* 326* 327 329* total_switches 000657 automatic fixed bin(17,0) dcl 105 set ref 121* 145* 154* 154 160 161 176 259 264* 265* 269 301 355 tty_io 000112 automatic pointer dcl 34 set ref 326* 333* 420* 431* unique_chars_ 000772 constant entry external dcl 92 ref 291 using_file 000263 automatic bit(1) dcl 92 set ref 127* 205* 255 264 268 288 version 000202 automatic fixed bin(17,0) initial level 2 dcl 61 set ref 61* were_any_online 000672 automatic bit(1) dcl 374 set ref 380* 416 which parameter fixed bin(17,0) dcl 441 ref 439 444 445 447 448 450 451 452 454 455 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 Sequential_input internal static fixed bin(17,0) initial dcl 2-15 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 based_atd based varying char(64) dcl 53 error_table_$smallarg external static fixed bin(35,0) dcl 70 iocb based structure level 1 dcl 1-4 iox_$iocb_version_sentinel external static char(4) dcl 1-43 NAMES DECLARED BY EXPLICIT CONTEXT. are_any_online 004747 constant entry internal dcl 460 ref 380 416 err 004777 constant entry internal dcl 473 ref 158 173 185 189 197 201 210 214 232 236 243 251 255 269 270 275 294 320 327 349 352 362 366 421 445 448 452 455 remove_graphics 003757 constant entry external dcl 372 ref 116 116 279 remove_one_switch 004514 constant entry internal dcl 439 ref 306 384 405 485 remove_online_switch 004246 constant entry internal dcl 418 ref 416 488 returner 004244 constant label dcl 494 ref 491 rg 003747 constant entry external dcl 372 rg_all 004005 constant label dcl 383 ref 395 setup_graphics 000643 constant entry external dcl 18 sg 000633 constant entry external dcl 18 NAMES DECLARED BY CONTEXT OR IMPLICATION. addr builtin function ref 334 334 338 338 341 341 426 426 429 429 432 432 hbound builtin function ref 165 169 169 173 lbound builtin function ref 165 169 rtrim builtin function ref 275 320 366 unspec builtin function ref 408 408 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 5472 6466 5130 5502 Length 7006 5130 774 304 341 704 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME sg 583 external procedure is an external procedure. remove_online_switch 92 internal procedure is called by several nonquick procedures. remove_one_switch 83 internal procedure is called by several nonquick procedures. are_any_online internal procedure shares stack frame of external procedure sg. err 82 internal procedure is called during a stack extension. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 initted sg 000012 known_switches sg 000712 number_known_switches sg STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME err 000100 i err sg 000100 old_mask sg 000101 suffix sg 000112 tty_io sg 000114 myname sg 000122 attach_description sg 000176 ap sg 000200 al sg 000202 term_info sg 000204 nargs sg 000205 gdt_segname sg 000257 i sg 000260 j sg 000261 this_known_switch sg 000262 prev_number_known_switches sg 000263 using_file sg 000264 mode_string sg 000364 file_name sg 000436 have_target sg 000437 extra_switch sg 000450 extra_sw_ptr sg 000452 extra_attach_description sg 000525 switch_arg_structure sg 000657 total_switches sg 000660 online_switch sg 000661 revert_online_on_err sg 000662 to_switch sg 000672 were_any_online sg 000714 i are_any_online THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs cat_realloc_cs call_ext_in call_ext_out_desc call_ext_out call_int_this_desc call_int_this call_int_other_desc call_int_other return tra_ext shorten_stack ext_entry int_entry int_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. absolute_pathname_$add_suffix com_err_ com_err_$suppress_name cu_$arg_count cu_$arg_ptr default_error_handler_$add_finish_handler hcs_$reset_ips_mask hcs_$set_ips_mask ioa_$rsnnl iox_$attach_iocb iox_$attach_ioname iox_$close iox_$detach_iocb iox_$find_iocb iox_$look_iocb iox_$modes iox_$move_attach iox_$open terminate_process_ unique_chars_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt error_table_$inconsistent error_table_$noarg iox_$user_io LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 61 000626 107 000627 18 000632 112 000651 114 000654 115 000657 116 000661 117 000675 121 000731 122 000732 123 000735 125 000736 126 000752 127 000753 129 000754 131 000762 132 000764 133 001016 135 001051 138 001052 139 001054 140 001073 141 001100 142 001103 143 001105 144 001110 145 001112 146 001114 148 001115 150 001123 152 001140 154 001152 156 001153 157 001154 158 001171 160 001212 161 001222 163 001225 164 001245 165 001254 167 001270 169 001272 171 001311 173 001313 176 001351 177 001357 181 001360 183 001361 185 001375 187 001417 188 001420 189 001435 191 001456 192 001463 193 001465 195 001466 197 001502 199 001524 200 001525 201 001542 203 001563 204 001570 205 001572 206 001573 208 001574 210 001604 212 001630 213 001631 214 001646 216 001667 217 001674 219 001675 221 001704 224 001714 225 001717 228 001721 230 001722 232 001726 234 001752 235 001753 236 001770 238 002011 239 002016 241 002017 243 002026 245 002046 247 002050 248 002052 249 002066 251 002070 255 002114 259 002142 260 002144 261 002147 262 002152 263 002154 264 002156 265 002163 268 002165 269 002167 270 002212 272 002237 273 002247 274 002252 275 002302 276 002356 278 002357 279 002361 280 002365 281 002370 282 002372 285 002373 286 002376 288 002400 289 002402 290 002435 291 002441 292 002471 293 002477 294 002520 295 002541 297 002576 298 002577 301 002634 303 002643 304 002666 306 002670 309 002706 311 002712 312 002717 313 002720 314 002732 315 002734 318 002736 320 003001 323 003063 325 003066 326 003070 327 003111 329 003135 331 003171 333 003204 334 003217 337 003244 338 003275 340 003323 341 003342 343 003367 344 003402 345 003404 347 003405 348 003411 349 003442 351 003467 352 003506 355 003527 357 003536 358 003561 360 003563 362 003610 364 003627 366 003662 368 003742 370 003745 372 003746 376 003765 377 003770 379 003773 380 004001 382 004003 383 004005 384 004015 385 004027 387 004031 388 004033 390 004034 392 004042 394 004057 395 004062 398 004074 399 004115 401 004117 405 004165 407 004177 408 004210 409 004217 411 004221 414 004224 416 004226 437 004243 494 004244 418 004245 420 004253 421 004276 423 004320 425 004334 426 004346 428 004374 429 004406 431 004434 432 004450 434 004476 435 004512 439 004513 444 004521 445 004535 447 004564 448 004601 450 004630 451 004641 452 004653 454 004702 455 004717 457 004746 460 004747 464 004751 465 004761 466 004771 468 004773 473 004776 480 005012 484 005034 485 005046 486 005067 488 005072 490 005102 491 005106 ----------------------------------------------------------- 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