COMPILATION LISTING OF SEGMENT cv_ Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-04-17_1922.89_Mon_mdt 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 cv_: proc; 12 13 /* Utility routine for converting numbers & time calculations. 14* THVV 10/69 */ 15 16 hrmin: entry (sec, hf, mf); 17 18 /* Time conversion procedure. 19* call cv_$hrmin (seconds, hf, mf); 20* call ioa_ ("^5d:^2a", hf, mf); 21* */ 22 23 dcl sec fixed bin, /* input: time in seconds */ 24 hf fixed bin, /* output: hours */ 25 mf char (*); /* output: mm */ 26 27 dcl temp char (4) aligned, /* temporary */ 28 cv_bin_$dec entry (fixed bin, char (12)), 29 ans char (12), /* answer from cv_bin */ 30 (t0, t1, t2, t3) fixed bin; /* temporaries */ 31 32 t0 = sec + 59; /* round up. */ 33 t1 = divide (t0, 3600, 17, 0); /* t1 is hours */ 34 t3 = t0 - t1*3600; /* t3 is leftover seconds */ 35 t2 = divide (t3, 60, 17, 0); /* t2 is minutes */ 36 37 hf = t1; /* return hours */ 38 call cv_bin_$dec (t2, ans); /* convert minutes to char */ 39 temp = " "; /* blank out temp */ 40 substr (temp, 1, 2) = substr (ans, 11, 2); /* get minutes */ 41 if temp = " " then temp = "00"; /* if zero, return 00 */ 42 else if substr (temp, 1, 1) = " " then substr (temp, 1, 1) = "0"; 43 mf = temp; /* return minutes */ 44 return; /* Zoom. */ 45 46 /* - - - - - - - - - - - - - - - - */ 47 48 absdat: entry (mm, dd, yy, xabs); 49 50 dcl (mm, dd, yy, xabs) fixed bin; 51 52 dcl datebin_ entry (fixed bin (71), 53 fixed bin, fixed bin, fixed bin, fixed bin, fixed bin, fixed bin, fixed bin, fixed bin, fixed bin); 54 dcl datebin_$revert entry (fixed bin, fixed bin, fixed bin, fixed bin, fixed bin, fixed bin, fixed bin (71)); 55 dcl datebin_$shift entry (fixed bin (71), fixed bin); 56 57 dcl time fixed bin (71); 58 59 call datebin_$revert (mm, dd, yy, 0, 0, 0, time); 60 call datebin_ (time, xabs, t0, t0, t0, t0, t0, t0, t0, t0); 61 return; 62 63 /* - - - - - - - - - - - - - - - - */ 64 65 shift: entry (mm, dd, yy, hh, shno); 66 67 dcl (hh, shno) fixed bin; 68 69 call datebin_$revert (mm, dd, yy, hh, 0, 0, time); 70 call datebin_$shift (time, shno); 71 return; 72 73 /* - - - - - - - - - - - - - - - - */ 74 75 mwvf: entry (flo) returns (char (15)); 76 77 /* entry to do mwvf15.2 conversion */ 78 79 dcl fvl char (15) aligned init (" xxx,xxx,xxx.xx"), /* location of commas & decimal */ 80 flo float bin, /* input arg */ 81 ft1 float bin, /* temp */ 82 i fixed bin, j fixed bin; /* indices */ 83 84 dcl k (11) fixed bin int static init (15, 14, 12, 11, 10, 8, 7, 6, 4, 3, 2); 85 86 if flo = 0.0e0 then return (" "); /* w modifier means blank if all zero */ 87 if abs (flo) > 3.4359735e8 then go to woops; /* determined by experiment.. */ 88 ft1 = flo; /* pick up input arg */ 89 if ft1 < 0 then ft1 = - ft1; /* handle negative */ 90 t0 = (ft1+0.005e0) * 100.0e0; /* round up and convert to pennies */ 91 j = 1; 92 do i = 1 to 11; /* loop on digits */ 93 t1 = mod (t0, 10); /* get remainder */ 94 t0 = divide (t0, 10, 35, 0); /* throw away digit */ 95 substr (fvl, k (i), 1) = substr ("0123456789", t1+1, 1); 96 if t1 ^= 0 then j = i; /* Remember loc of nonzero digit. */ 97 end; 98 if t0 > 0 | (flo < 0 & k (j) = 2) then do; /* oflo? */ 99 woops: fvl = "$***,***,***.**"; /* Overflowed. Put out junk. */ 100 return (fvl); 101 end; 102 j = k (j); 103 if j > 13 then j = 13; /* tiny number is $.00 */ 104 substr (fvl, 1, j-1) = " "; /* blank out j-1unk */ 105 if flo < 0 106 then do; 107 substr (fvl, j-1, 1) = "-"; 108 substr (fvl, j-2, 1) = "$"; 109 end; 110 else substr (fvl, j-1, 1) = "$"; 111 ex: return (fvl); 112 113 114 /* - - - - - - - - - - - - - - - - */ 115 116 cdate: entry (dt) returns (fixed bin (71)); 117 118 /* this program converts a character-string date into a system time */ 119 120 dcl dt char (*); /* argument is a date */ 121 122 dcl chr char (1) aligned, /* single character of date */ 123 wdate (3) fixed bin init (0, 0, 0), /* month, day, yezr */ 124 s2 bit (1) init ("0"b), /* switch, ON if two digits */ 125 clock_ entry returns (fixed bin (71)); /* system clock */ 126 127 t1 = 0; /* accumulator for numbers */ 128 j = 1; /* j is index in "wdate" */ 129 if dt = "*" then return ((clock_)); /* date of "*" is now */ 130 if dt = "P" then return (2169522000000000); /* 10/1/69 - date Multics went public */ 131 132 t3 = index (dt, " "); /* find loc of first blank */ 133 if t3 = 0 then t3 = length (dt)+1; /* .. or length of string. */ 134 if t3 < 4 then return (0); /* if not enough chars, illegal date. */ 135 136 do i = 1 to t3-1; /* look at all chars */ 137 chr = substr (dt, i, 1); /* get one chr */ 138 t0 = index ("0123456789", chr); 139 if t0 > 0 then do; /* digit? */ 140 t1 = 10 * t1 + (t0 - 1); /* yes, add it in */ 141 if s2 then go to store; /* is this the second digit? */ 142 else s2 = "1"b; /* no, wait for another. */ 143 end; 144 else if chr = "/" then do; /* is this a slash? */ 145 if t1 ^= 0 then do; /* yes. is there anything in ac? */ 146 store: wdate (j) = t1; /* yes. save it in date */ 147 t1 = 0; /* reset ac */ 148 j = j + 1; /* index in date */ 149 if j = 4 then j = 3; /* skip "19" on year */ 150 s2 = "0"b; /* reset switch */ 151 end; 152 end; 153 else return (0); /* some garbage character, die */ 154 end; 155 if s2 then wdate (j) = t1; /* do we have any digits leftover? */ 156 if wdate (1) = 0 then return (0); /* check month for legal form. */ 157 if wdate (1) > 12 then return (0); /* .. */ 158 if wdate (2) = 0 then return (0); /* check day. */ 159 if wdate (2) > 31 then return (0); /* .. */ 160 if wdate (3) = 0 then wdate (3) = 70; /* 1970 if not specified */ 161 162 compute: call datebin_$revert (wdate (1), wdate (2), wdate (3), 0, 0, 0, time); 163 return (time); 164 165 end cv_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/17/00 1922.9 cv_.pl1 >udd>sm>ds>w>ml>cv_.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. ans 000101 automatic char(12) packed unaligned dcl 27 set ref 38* 40 chr 000121 automatic char(1) dcl 122 set ref 137* 138 144 clock_ 000020 constant entry external dcl 122 ref 129 cv_bin_$dec 000010 constant entry external dcl 27 ref 38 datebin_ 000012 constant entry external dcl 52 ref 60 datebin_$revert 000014 constant entry external dcl 54 ref 59 69 162 datebin_$shift 000016 constant entry external dcl 55 ref 70 dd parameter fixed bin(17,0) dcl 50 set ref 48 59* 65 69* dt parameter char packed unaligned dcl 120 ref 116 129 130 132 133 137 flo parameter float bin(27) dcl 79 ref 75 86 87 88 98 105 ft1 000116 automatic float bin(27) dcl 79 set ref 88* 89 89* 89 90 fvl 000112 automatic char(15) initial dcl 79 set ref 79* 95* 99* 100 104* 107* 108* 110* 111 hf parameter fixed bin(17,0) dcl 23 set ref 16 37* hh parameter fixed bin(17,0) dcl 67 set ref 65 69* i 000117 automatic fixed bin(17,0) dcl 79 set ref 92* 95 96* 136* 137* j 000120 automatic fixed bin(17,0) dcl 79 set ref 91* 96* 98 102* 102 103 103* 104 107 108 110 128* 146 148* 148 149 149* 155 k 000000 constant fixed bin(17,0) initial array dcl 84 ref 95 98 102 mf parameter char packed unaligned dcl 23 set ref 16 43* mm parameter fixed bin(17,0) dcl 50 set ref 48 59* 65 69* s2 000125 automatic bit(1) initial packed unaligned dcl 122 set ref 122* 141 142* 150* 155 sec parameter fixed bin(17,0) dcl 23 ref 16 32 shno parameter fixed bin(17,0) dcl 67 set ref 65 70* t0 000104 automatic fixed bin(17,0) dcl 27 set ref 32* 33 34 60* 60* 60* 60* 60* 60* 60* 60* 90* 93 94* 94 98 138* 139 140 t1 000105 automatic fixed bin(17,0) dcl 27 set ref 33* 34 37 93* 95 96 127* 140* 140 145 146 147* 155 t2 000106 automatic fixed bin(17,0) dcl 27 set ref 35* 38* t3 000107 automatic fixed bin(17,0) dcl 27 set ref 34* 35 132* 133 133* 134 136 temp 000100 automatic char(4) dcl 27 set ref 39* 40* 41 41* 42 42* 43 time 000110 automatic fixed bin(71,0) dcl 57 set ref 59* 60* 69* 70* 162* 163 wdate 000122 automatic fixed bin(17,0) initial array dcl 122 set ref 122* 122* 122* 146* 155* 156 157 158 159 160 160* 162* 162* 162* xabs parameter fixed bin(17,0) dcl 50 set ref 48 60* yy parameter fixed bin(17,0) dcl 50 set ref 48 59* 65 69* NAMES DECLARED BY EXPLICIT CONTEXT. absdat 000240 constant entry external dcl 48 cdate 000662 constant entry external dcl 116 compute 001243 constant label dcl 162 cv_ 000105 constant entry external dcl 11 ex 000630 constant label dcl 111 hrmin 000122 constant entry external dcl 16 mwvf 000427 constant entry external dcl 75 shift 000341 constant entry external dcl 65 store 001055 constant label dcl 146 ref 141 woops 000541 constant label dcl 99 ref 87 NAMES DECLARED BY CONTEXT OR IMPLICATION. abs builtin function ref 87 divide builtin function ref 33 35 94 index builtin function ref 132 138 length builtin function ref 133 mod builtin function ref 93 substr builtin function set ref 40 40 42 42* 95* 95 104* 107* 108* 110* 137 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1434 1456 1327 1444 Length 1634 1327 22 142 104 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME cv_ 297 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME cv_ 000100 temp cv_ 000101 ans cv_ 000104 t0 cv_ 000105 t1 cv_ 000106 t2 cv_ 000107 t3 cv_ 000110 time cv_ 000112 fvl cv_ 000116 ft1 cv_ 000117 i cv_ 000120 j cv_ 000121 chr cv_ 000122 wdate cv_ 000125 s2 cv_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return_mac fl2_to_fx1 mdfx1 signal_op ext_entry ext_entry_desc any_to_any_truncate_ THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. clock_ cv_bin_$dec datebin_ datebin_$revert datebin_$shift NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 79 000061 122 000067 11 000104 16 000115 32 000140 33 000144 34 000146 35 000153 37 000155 38 000157 39 000170 40 000172 41 000175 42 000205 43 000213 44 000221 48 000233 59 000250 60 000277 61 000322 65 000334 69 000351 70 000377 71 000411 75 000423 86 000437 87 000462 88 000466 89 000470 90 000473 91 000477 92 000501 93 000505 94 000511 95 000514 96 000522 97 000526 98 000530 99 000541 100 000547 102 000577 103 000602 104 000606 105 000612 107 000614 108 000620 109 000623 110 000624 111 000630 116 000656 127 000677 128 000700 129 000702 130 000717 132 000746 133 000757 134 000763 136 001005 137 001015 138 001023 139 001034 140 001035 141 001043 142 001045 143 001047 144 001050 145 001053 146 001055 147 001057 148 001060 149 001061 150 001066 152 001067 153 001070 154 001110 155 001112 156 001117 157 001143 158 001167 159 001213 160 001237 162 001243 163 001271 ----------------------------------------------------------- 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