COMPILATION LISTING OF SEGMENT extract Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 11/21/84 1042.7 mst Wed 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 /* format: style1,ind2,^inddcls,ifthenstmt,dclind2,declareind2,ifthendo,ifthen*/ 11 12 extract: ext: proc; 13 14 /* Modified 2/24/81 by J. A. Bush for larger fdump header size */ 15 /* Modified 10/15/81 by J. A. Bush to add the "-pathname" control arg */ 16 /* Modified: October 1984 by Greg Texada to use copy_erf_seg_ to get the data. */ 17 18 dcl seg_no fixed bin (15) uns; 19 dcl delete_seg bit (1) init ("0"b); 20 dcl tc fixed bin; 21 dcl code fixed bin (35); 22 dcl arg char (tc) based (tp); 23 dcl (dump_name, ename, segname) char (32); 24 dcl (dirname, dump_dir) char (168); 25 dcl p_length fixed bin (19) uns; 26 dcl (addrel, baseno, divide, fixed, mod, null, ptr, rel, size) builtin; 27 dcl (p, tp) ptr; 28 29 dcl (error_table_$namedup, 30 error_table_$segknown) fixed bin (35) ext static; 31 32 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 33 dcl copy_erf_seg_ entry (char (*), uns fixed bin (15), ptr, uns fixed bin (19), 34 fixed bin (35)); 35 dcl copy_erf_seg_$name entry (char (*), char (*), ptr, uns fixed bin (19), fixed bin (35)); 36 dcl delete_$ptr entry (ptr, bit (36) aligned, char (*), fixed bin (35)); 37 dcl get_dump_ptrs_$dump_dir entry (char (*), char (*), (0:31) ptr, 38 (0:31) fixed bin, fixed bin, char (32)); 39 dcl (ioa_, com_err_) entry options (variable); 40 dcl ring0_get_$segptr_given_slt entry (char (*), char (*), ptr, fixed bin (35), ptr, ptr); 41 dcl cv_oct_check_ entry (char (*), fixed bin (35)) returns (fixed bin (35)); 42 dcl absolute_pathname_ entry (char (*), char (*), fixed bin (35)); 43 dcl get_wdir_ entry returns (char (168)); 44 dcl hcs_$make_seg entry (char (*), char (*), char (*), fixed bin (5), ptr, fixed bin (35)); 45 dcl hcs_$get_max_length_seg entry (ptr, fixed bin, fixed bin (35)); 46 dcl hcs_$set_bc entry (char (*), char (*), fixed bin (24), fixed bin (35)); 47 dcl terminate_file_ entry (ptr, fixed bin (24), bit (*), fixed bin (35)); 48 49 segname = ""; 50 call cu_$arg_ptr (1, tp, tc, code); /* pick up erf number */ 51 if code ^= 0 then do; 52 tell: call ioa_ ("Usage: extract erfno seg_name/number {-pathname (-pn) path}"); 53 return; 54 end; 55 56 dump_name = arg; /* get name of dump from which to extract the segment */ 57 call cu_$arg_ptr (3, tp, tc, code); /* get possible pathname arg */ 58 if code = 0 then do; /* if present, check for -pathname arg */ 59 if arg = "-pathname" | arg = "-pn" then do; 60 call cu_$arg_ptr (4, tp, tc, code); /* get path */ 61 if code ^= 0 then go to tell; /* give user usage message */ 62 call absolute_pathname_ (arg, dump_dir, code); /* expand it */ 63 if code ^= 0 then do; 64 call com_err_ (code, "extract", "expanding pathname ""^a""", arg); 65 return; 66 end; 67 end; 68 else go to tell; /* give user usage message */ 69 end; 70 call cu_$arg_ptr (2, tp, tc, code); /* get name/number of segment to extract */ 71 if tc = 0 | code ^= 0 then goto tell; 72 seg_no = cv_oct_check_ (arg, code); /* assume octal arg was given */ 73 if code ^= 0 then segname = arg; 74 dirname = get_wdir_ (); 75 ename = arg || "." || dump_name; 76 call hcs_$make_seg (dirname, ename, "", 01011b, p, code); /* make the segment to contain the data */ 77 if p = null then do; 78 call com_err_ (code, "extract", "Creating ^a>^a", dirname, ename); 79 return; 80 end; 81 delete_seg = ^(code = error_table_$namedup | code = error_table_$segknown); 82 /* delete it if we can't do the work */ 83 if segname = "" then call copy_erf_seg_ (dump_name, seg_no, p, p_length, code); 84 else call copy_erf_seg_$name (dump_name, segname, p, p_length, code); 85 if code ^= 0 then do; 86 call com_err_ (code, "extract", "Could not find ERF ^a using the dumps search list.", dump_name); 87 if delete_seg then call delete_$ptr (p, "010111"b, "extract", code); 88 end; 89 else call terminate_file_ (p, 0, TERM_FILE_TERM, (0)); 90 1 1 /* BEGIN INCLUDE FILE ... terminate_file.incl.pl1 */ 1 2 /* format: style2,^inddcls,idind32 */ 1 3 1 4 declare 1 terminate_file_switches based, 1 5 2 truncate bit (1) unaligned, 1 6 2 set_bc bit (1) unaligned, 1 7 2 terminate bit (1) unaligned, 1 8 2 force_write bit (1) unaligned, 1 9 2 delete bit (1) unaligned; 1 10 1 11 declare TERM_FILE_TRUNC bit (1) internal static options (constant) initial ("1"b); 1 12 declare TERM_FILE_BC bit (2) internal static options (constant) initial ("01"b); 1 13 declare TERM_FILE_TRUNC_BC bit (2) internal static options (constant) initial ("11"b); 1 14 declare TERM_FILE_TERM bit (3) internal static options (constant) initial ("001"b); 1 15 declare TERM_FILE_TRUNC_BC_TERM bit (3) internal static options (constant) initial ("111"b); 1 16 declare TERM_FILE_FORCE_WRITE bit (4) internal static options (constant) initial ("0001"b); 1 17 declare TERM_FILE_DELETE bit (5) internal static options (constant) initial ("00001"b); 1 18 1 19 /* END INCLUDE FILE ... terminate_file.incl.pl1 */ 91 92 93 end extract; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/21/84 1034.8 extract.pl1 >spec>on>7046-11/21/84>extract.pl1 91 1 04/06/83 1239.4 terminate_file.incl.pl1 >ldd>include>terminate_file.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. TERM_FILE_TERM 000000 constant bit(3) initial unaligned dcl 1-14 set ref 89* absolute_pathname_ 000032 constant entry external dcl 42 ref 62 arg based char unaligned dcl 22 set ref 56 59 59 62* 64* 72* 73 75 code 000103 automatic fixed bin(35,0) dcl 21 set ref 50* 51 57* 58 60* 61 62* 63 64* 70* 71 72* 73 76* 78* 81 81 83* 84* 85 86* 87* com_err_ 000026 constant entry external dcl 39 ref 64 78 86 copy_erf_seg_ 000016 constant entry external dcl 33 ref 83 copy_erf_seg_$name 000020 constant entry external dcl 35 ref 84 cu_$arg_ptr 000014 constant entry external dcl 32 ref 50 57 60 70 cv_oct_check_ 000030 constant entry external dcl 41 ref 72 delete_$ptr 000022 constant entry external dcl 36 ref 87 delete_seg 000101 automatic bit(1) initial unaligned dcl 19 set ref 19* 81* 87 dirname 000134 automatic char(168) unaligned dcl 24 set ref 74* 76* 78* dump_dir 000206 automatic char(168) unaligned dcl 24 set ref 62* dump_name 000104 automatic char(32) unaligned dcl 23 set ref 56* 75 83* 84* 86* ename 000114 automatic char(32) unaligned dcl 23 set ref 75* 76* 78* error_table_$namedup 000010 external static fixed bin(35,0) dcl 29 ref 81 error_table_$segknown 000012 external static fixed bin(35,0) dcl 29 ref 81 get_wdir_ 000034 constant entry external dcl 43 ref 74 hcs_$make_seg 000036 constant entry external dcl 44 ref 76 ioa_ 000024 constant entry external dcl 39 ref 52 null builtin function dcl 26 ref 77 p 000262 automatic pointer dcl 27 set ref 76* 77 83* 84* 87* 89* p_length 000260 automatic fixed bin(19,0) unsigned dcl 25 set ref 83* 84* seg_no 000100 automatic fixed bin(15,0) unsigned dcl 18 set ref 72* 83* segname 000124 automatic char(32) unaligned dcl 23 set ref 49* 73* 83 84* tc 000102 automatic fixed bin(17,0) dcl 20 set ref 50* 56 57* 59 59 60* 62 62 64 64 70* 71 72 72 73 75 terminate_file_ 000040 constant entry external dcl 47 ref 89 tp 000264 automatic pointer dcl 27 set ref 50* 56 57* 59 59 60* 62 64 70* 72 73 75 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. TERM_FILE_BC internal static bit(2) initial unaligned dcl 1-12 TERM_FILE_DELETE internal static bit(5) initial unaligned dcl 1-17 TERM_FILE_FORCE_WRITE internal static bit(4) initial unaligned dcl 1-16 TERM_FILE_TRUNC internal static bit(1) initial unaligned dcl 1-11 TERM_FILE_TRUNC_BC internal static bit(2) initial unaligned dcl 1-13 TERM_FILE_TRUNC_BC_TERM internal static bit(3) initial unaligned dcl 1-15 addrel builtin function dcl 26 baseno builtin function dcl 26 divide builtin function dcl 26 fixed builtin function dcl 26 get_dump_ptrs_$dump_dir 000000 constant entry external dcl 37 hcs_$get_max_length_seg 000000 constant entry external dcl 45 hcs_$set_bc 000000 constant entry external dcl 46 mod builtin function dcl 26 ptr builtin function dcl 26 rel builtin function dcl 26 ring0_get_$segptr_given_slt 000000 constant entry external dcl 40 size builtin function dcl 26 terminate_file_switches based structure level 1 packed unaligned dcl 1-4 NAMES DECLARED BY EXPLICIT CONTEXT. ext 000106 constant entry external dcl 12 extract 000116 constant entry external dcl 12 tell 000150 constant label dcl 52 ref 59 61 71 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1152 1214 774 1162 Length 1416 774 42 166 155 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME ext 256 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME ext 000100 seg_no ext 000101 delete_seg ext 000102 tc ext 000103 code ext 000104 dump_name ext 000114 ename ext 000124 segname ext 000134 dirname ext 000206 dump_dir ext 000260 p_length ext 000262 p ext 000264 tp ext THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as alloc_cs cat_realloc_cs call_ext_out_desc call_ext_out return shorten_stack ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. absolute_pathname_ com_err_ copy_erf_seg_ copy_erf_seg_$name cu_$arg_ptr cv_oct_check_ delete_$ptr get_wdir_ hcs_$make_seg ioa_ terminate_file_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$namedup error_table_$segknown LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 19 000102 12 000105 49 000124 50 000127 51 000146 52 000150 53 000164 56 000165 57 000172 58 000211 59 000213 60 000225 61 000244 62 000246 63 000272 64 000274 65 000331 70 000332 71 000351 72 000355 73 000402 74 000411 75 000420 76 000447 77 000507 78 000513 79 000554 81 000555 83 000567 84 000624 85 000653 86 000655 87 000707 88 000742 89 000743 93 000772 ----------------------------------------------------------- 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