COMPILATION LISTING OF SEGMENT date_name_ Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 11/11/89 1012.7 mst Sat Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 date_name_: proc (dir, prename, postname, a_name, a_code); 14 15 /* A subroutine to create a unique name in a directory "dir" of the form 16*/* 17*/* prename.mm/dd/yy.tttt.postname 18*/* 19*/* Created by M A Meer in November 1972 */ 20 /* Updated by J A Falksen in Mar 1984 to call date_time_$format */ 21 22 dcl dir char(*), 23 prename char(*), 24 postname char(*), 25 a_name char(32), 26 a_code fixed bin (35), 27 time fixed bin (71), 28 time_line char(24)var, 29 (p1, p2) char(20)var, 30 name char(32)var, 31 (i, j) fixed bin, 32 pname char(168), 33 ename char(32), 34 code fixed bin(35), 35 type fixed bin (2), 36 btcnt fixed bin (24), 37 error_table_$bigarg fixed bin(35) ext, 38 error_table_$noentry fixed bin(35) ext; 39 40 dcl date_time_$format entry (char(*), fixed bin(71), char(*), char(*), 41 char(*) var, fixed bin, fixed bin(35)), 42 expand_pathname_ entry (char(*), char(*), char(*), fixed bin(35)), 43 hcs_$status_minf entry (char(*), char(*), fixed bin, fixed bin(2), fixed bin(24), fixed bin (35)); 44 45 dcl (clock, length, rtrim) builtin; 46 i, j, code = 0; /* Initialize variables to 0 */ 47 p1 = rtrim (prename); 48 if (p1 ^= "") then p1 = p1 || "."; 49 p2 = "."; 50 p2 = p2 || rtrim (postname); 51 if (p2 = ".") then p2 = ""; 52 if length (p1) + length (p2) > 19 then do; /* Name > 32 characters */ 53 code = error_table_$bigarg; /* Let world know what is wrong */ 54 go to err_ret; /* Now quit */ 55 end; 56 57 time = clock (); /* Get the current time */ 58 convert_time: /* Convert to ascii string */ 59 call date_time_$format("^my/^dm/^yc.^Hd^MH", time, "", "", time_line, 0, code); 60 61 name = p1; 62 name = name || time_line; 63 name = name || p2; 64 65 if dir = "" then do; 66 call expand_pathname_ ((name), pname, ename, code); 67 if code ^= 0 then go to err_ret; 68 end; 69 else do; 70 pname = dir; /* Get a directory name */ 71 ename = name; /* Get the new entry name */ 72 end; 73 call hcs_$status_minf (pname, ename, 0, type, btcnt, code); /* See if seg with this name exists */ 74 if code = error_table_$noentry then do; /* OK none exists */ 75 code = 0; 76 go to ret; 77 end; 78 if code ^= 0 then go to err_ret; /* Trouble */ 79 /* Duplicate so try a new name */ 80 time = time + 60000000; /* add one minut */ 81 go to convert_time; /* and try again */ 82 83 err_ret: name = ""; 84 85 ret: a_name = name; 86 a_code = code; 87 88 return; 89 90 end date_name_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0839.3 date_name_.pl1 >special_ldd>install>MR12.3-1114>date_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. a_code parameter fixed bin(35,0) dcl 22 set ref 13 86* a_name parameter char(32) packed unaligned dcl 22 set ref 13 85* btcnt 000224 automatic fixed bin(24,0) dcl 22 set ref 73* clock builtin function dcl 45 ref 57 code 000222 automatic fixed bin(35,0) dcl 22 set ref 46* 53* 58* 66* 67 73* 74 75* 78 86 date_time_$format 000014 constant entry external dcl 40 ref 58 dir parameter char packed unaligned dcl 22 ref 13 65 70 ename 000212 automatic char(32) packed unaligned dcl 22 set ref 66* 71* 73* error_table_$bigarg 000010 external static fixed bin(35,0) dcl 22 ref 53 error_table_$noentry 000012 external static fixed bin(35,0) dcl 22 ref 74 expand_pathname_ 000016 constant entry external dcl 40 ref 66 hcs_$status_minf 000020 constant entry external dcl 40 ref 73 i 000136 automatic fixed bin(17,0) dcl 22 set ref 46* j 000137 automatic fixed bin(17,0) dcl 22 set ref 46* length builtin function dcl 45 ref 52 52 name 000125 automatic varying char(32) dcl 22 set ref 61* 62* 62 63* 63 66 71 83* 85 p1 000111 automatic varying char(20) dcl 22 set ref 47* 48 48* 48 52 61 p2 000117 automatic varying char(20) dcl 22 set ref 49* 50* 50 51 51* 52 63 pname 000140 automatic char(168) packed unaligned dcl 22 set ref 66* 70* 73* postname parameter char packed unaligned dcl 22 ref 13 50 prename parameter char packed unaligned dcl 22 ref 13 47 rtrim builtin function dcl 45 ref 47 50 time 000100 automatic fixed bin(71,0) dcl 22 set ref 57* 58* 80* 80 time_line 000102 automatic varying char(24) dcl 22 set ref 58* 62 type 000223 automatic fixed bin(2,0) dcl 22 set ref 73* NAMES DECLARED BY EXPLICIT CONTEXT. convert_time 000166 constant label dcl 58 ref 81 date_name_ 000026 constant entry external dcl 13 err_ret 000417 constant label dcl 83 ref 54 67 78 ret 000420 constant label dcl 85 ref 76 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 524 546 432 534 Length 722 432 22 137 72 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME date_name_ 192 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME date_name_ 000100 time date_name_ 000102 time_line date_name_ 000111 p1 date_name_ 000117 p2 date_name_ 000125 name date_name_ 000136 i date_name_ 000137 j date_name_ 000140 pname date_name_ 000212 ename date_name_ 000222 code date_name_ 000223 type date_name_ 000224 btcnt date_name_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_char_temp call_ext_out_desc return_mac shorten_stack ext_entry_desc clock_mac THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. date_time_$format expand_pathname_ hcs_$status_minf THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bigarg error_table_$noentry LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 13 000021 46 000053 47 000056 48 000101 49 000115 50 000121 51 000147 52 000155 53 000161 54 000163 57 000164 58 000166 61 000235 62 000242 63 000254 65 000266 66 000275 67 000332 68 000335 70 000336 71 000341 73 000345 74 000403 75 000407 76 000410 78 000411 80 000413 81 000416 83 000417 85 000420 86 000426 88 000430 ----------------------------------------------------------- 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