COMPILATION LISTING OF SEGMENT teco_backup_file_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1744.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 teco_backup_file_: proc (file); 12 13 /* Recoded by REMullen 8/20/73 to replicate 14* call copy (file, file||.bak) */ 15 16 dcl file char (*); 17 18 dcl (d1, d2) char (168) aligned; /* dirnames */ 19 dcl bdir char (168) aligned based; 20 dcl (dirptr, entptr) ptr; 21 dcl (e1, e2) char (32) aligned; /* entrynames */ 22 dcl bent char (32) aligned based; 23 dcl code fixed bin (35); /* standard system status code */ 24 dcl e1_len fixed bin; /* length of first ename */ 25 dcl dot_len fixed bin; /* length of first component of same */ 26 27 dcl errname char (4) aligned init ("TECO"); /* for nd_handler's question */ 28 29 30 dcl com_err_ ext entry options (variable); 31 dcl expand_path_ ext entry (ptr, fixed bin, ptr, ptr, fixed bin (35)); 32 dcl copy_seg_ ext entry (char (*) aligned, char (*) aligned, char (*) aligned, 33 char (*) aligned, char (*) aligned, bit (1) aligned, fixed bin (35)); 34 35 dcl get_wdir_ ext entry () returns (char (168) aligned); 36 dcl which_bit bit (1) aligned; /* 0 means err in d1>e1, 1 means d2>e2 */ 37 38 39 dcl (min, substr, index, addr, length) builtin; 40 41 /* --------------------------------------------------------- */ 42 43 44 call expand_path_ (addr (file), length (file), addr (d1), addr (e1), code); 45 if code ^= 0 then do; 46 call com_err_ (code, errname, file); 47 return; 48 end; 49 50 e1_len = index (e1, " "); 51 if e1_len = 0 then e1_len = 32; /* were no blanks */ 52 else e1_len = e1_len -1; /* last char was just before blank */ 53 54 dot_len = index (e1, "."); /* only want first component in any case */ 55 if dot_len = 0 then dot_len = 32; 56 else dot_len = dot_len -1; 57 58 e1_len = min (e1_len, dot_len); 59 60 e2 = substr (e1, 1, e1_len) || ".bak"; /* make backup files name */ 61 62 d2 = get_wdir_ (); /* it will go in working directory */ 63 64 call copy_seg_ (d1, e1, d2, e2, errname, which_bit, code); /* try to make copy */ 65 if code ^= 0 then do; 66 if which_bit = "1"b then do; 67 dirptr = addr (d2); 68 entptr = addr (e2); 69 end; 70 else do; 71 dirptr = addr (d1); 72 entptr = addr (e1); 73 end; 74 call com_err_ (code, errname, "^a>^a", dirptr -> bdir, entptr -> bent); /* lose */ 75 end; 76 return; 77 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1526.7 teco_backup_file_.pl1 >dumps>old>recomp>teco_backup_file_.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. addr builtin function dcl 39 ref 44 44 44 44 44 44 67 68 71 72 bdir based char(168) dcl 19 set ref 74* bent based char(32) dcl 22 set ref 74* code 000250 automatic fixed bin(35,0) dcl 23 set ref 44* 45 46* 64* 65 74* com_err_ 000010 constant entry external dcl 30 ref 46 74 copy_seg_ 000014 constant entry external dcl 32 ref 64 d1 000100 automatic char(168) dcl 18 set ref 44 44 64* 71 d2 000152 automatic char(168) dcl 18 set ref 62* 64* 67 dirptr 000224 automatic pointer dcl 20 set ref 67* 71* 74 dot_len 000252 automatic fixed bin(17,0) dcl 25 set ref 54* 55 55* 56* 56 58 e1 000230 automatic char(32) dcl 21 set ref 44 44 50 54 60 64* 72 e1_len 000251 automatic fixed bin(17,0) dcl 24 set ref 50* 51 51* 52* 52 58* 58 60 e2 000240 automatic char(32) dcl 21 set ref 60* 64* 68 entptr 000226 automatic pointer dcl 20 set ref 68* 72* 74 errname 000253 automatic char(4) initial dcl 27 set ref 27* 46* 64* 74* expand_path_ 000012 constant entry external dcl 31 ref 44 file parameter char unaligned dcl 16 set ref 11 44 44 44 44 46* get_wdir_ 000016 constant entry external dcl 35 ref 62 index builtin function dcl 39 ref 50 54 length builtin function dcl 39 ref 44 44 min builtin function dcl 39 ref 58 substr builtin function dcl 39 ref 60 which_bit 000254 automatic bit(1) dcl 36 set ref 64* 66 NAME DECLARED BY EXPLICIT CONTEXT. teco_backup_file_ 000017 constant entry external dcl 11 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 370 410 311 400 Length 560 311 20 134 57 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME teco_backup_file_ 238 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME teco_backup_file_ 000100 d1 teco_backup_file_ 000152 d2 teco_backup_file_ 000224 dirptr teco_backup_file_ 000226 entptr teco_backup_file_ 000230 e1 teco_backup_file_ 000240 e2 teco_backup_file_ 000250 code teco_backup_file_ 000251 e1_len teco_backup_file_ 000252 dot_len teco_backup_file_ 000253 errname teco_backup_file_ 000254 which_bit teco_backup_file_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_ext_out_desc call_ext_out return shorten_stack ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ copy_seg_ expand_path_ get_wdir_ NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000014 27 000032 44 000034 45 000062 46 000064 47 000107 50 000110 51 000121 52 000125 54 000127 55 000140 56 000144 58 000146 60 000153 62 000167 64 000177 65 000236 66 000240 67 000244 68 000246 69 000250 71 000251 72 000253 74 000255 76 000310 ----------------------------------------------------------- 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