COMPILATION LISTING OF SEGMENT backup_name_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1721.9 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 backup_name_: procedure (name) returns (char(32)); 12 13 14 /* 15* 16* This procedure, given a name in the series "name", "name.1", "name.2", 17* etc., will return the next name in the series. 18* 19* P. Bos, May 1972 20* 21**/ 22 23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 24 25 26 dcl name char(*); 27 28 dcl convert_binary_integer_$decimal_string entry (fixed bin) returns (char(12) varying), 29 cv_dec_ entry (char(*)) returns (fixed bin(35)); 30 31 dcl (index, length, substr) builtin; 32 33 dcl (i, j, k, l) fixed bin; 34 35 dcl chr char(1), 36 string char(12) varying; 37 38 /* */ 39 40 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 41 42 43 l = index (name, " ") - 1; /* get length of segment name */ 44 if l = -1 then 45 l = length (name); /* adjust if necessary */ 46 k = 0; /* count of digits found */ 47 do i = l by -1 to 1; /* start at end of name, work backwards */ 48 chr = substr (name, i, 1); /* get char at this position */ 49 if chr = "." then /* looking for ".nnn" suffix */ 50 go to dot; 51 else if (chr >= "0") then if (chr <= "9") then /* char is a digit */ 52 go to skip; /* will try again */ 53 go to first; /* other char; we are done */ 54 skip: k = k + 1; /* count chars, continue scan */ 55 end; 56 go to first; /* all-digit name no good */ 57 58 dot: if k = 0 then /* terminal "." no good either */ 59 go to first; 60 j = cv_dec_(substr (name, i+1, k)); /* convert number part of name to binary */ 61 if j = 0 then /* if number part = 0, also no good */ 62 first: string = "1"; /* fudge up string to avoid call */ 63 else do; /* current name already part of series, */ 64 j = j + 1; /* increment suffix */ 65 l = i - 1; /* adjust length to exclude current suffix */ 66 string = convert_binary_integer_$decimal_string (j); /* convert to ascii */ 67 end; 68 69 rtn: k = length (string); /* compute length of suffix */ 70 if l > 32 - k - 1 then /* see if name too long to add suffix */ 71 l = 32 - k - 1; /* if so, truncate front part */ 72 return (substr (name, 1, l) || "." || string); /* form new name and return */ 73 74 end backup_name_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1513.1 backup_name_.pl1 >dumps>old>recomp>backup_name_.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. chr 000104 automatic char(1) unaligned dcl 35 set ref 48* 49 51 51 convert_binary_integer_$decimal_string 000010 constant entry external dcl 28 ref 66 cv_dec_ 000012 constant entry external dcl 28 ref 60 i 000100 automatic fixed bin(17,0) dcl 33 set ref 47* 48* 60 60 65 index builtin function dcl 31 ref 43 j 000101 automatic fixed bin(17,0) dcl 33 set ref 60* 61 64* 64 66* k 000102 automatic fixed bin(17,0) dcl 33 set ref 46* 54* 54 58 60 60 69* 70 70 l 000103 automatic fixed bin(17,0) dcl 33 set ref 43* 44 44* 47 65* 70 70* 72 length builtin function dcl 31 ref 44 69 name parameter char unaligned dcl 26 ref 11 43 44 48 60 60 72 string 000105 automatic varying char(12) dcl 35 set ref 61* 66* 69 72 substr builtin function dcl 31 ref 48 60 60 72 NAMES DECLARED BY EXPLICIT CONTEXT. backup_name_ 000011 constant entry external dcl 11 dot 000073 constant label dcl 58 ref 49 first 000126 constant label dcl 61 ref 53 56 58 rtn 000150 constant label dcl 69 skip 000066 constant label dcl 54 ref 51 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 270 304 220 300 Length 450 220 14 127 47 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME backup_name_ 88 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME backup_name_ 000100 i backup_name_ 000101 j backup_name_ 000102 k backup_name_ 000103 l backup_name_ 000104 chr backup_name_ 000105 string backup_name_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs cat_realloc_cs call_ext_out_desc call_ext_out return shorten_stack ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. convert_binary_integer_$decimal_string cv_dec_ NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000005 43 000024 44 000036 46 000042 47 000043 48 000047 49 000055 51 000060 53 000065 54 000066 55 000067 56 000072 58 000073 60 000075 61 000123 64 000133 65 000134 66 000137 69 000150 70 000152 72 000163 ----------------------------------------------------------- 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