COMPILATION LISTING OF SEGMENT gcos_convert_time_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/19/82 0959.8 mst Fri 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 gcos_convert_time_: proc (a_gcos_time, a_deferral, a_code); 12 13 14 /* DECLARATIONS */ 15 /* ------------ */ 16 17 18 /* fixed bin */ 19 /* ----- --- */ 20 21 dcl ( 22 hundredth_length, /* length of string representing converted hundredths */ 23 minutes, 24 seconds 25 ) fixed bin aligned; 26 27 dcl ( 28 a_code, /* error code (argument) */ 29 code, /* error code (internal) */ 30 fixed_bin_hundredths /* converted hundredths of a second */ 31 ) fixed bin (35) aligned; 32 33 dcl ( 34 a_deferral, /* multics deferral time (argument) */ 35 deferral /* multics deferral time (internal) */ 36 ) fixed bin (71) aligned; 37 38 39 /* character strings */ 40 /* --------- ------- */ 41 42 dcl ( 43 ascii_hundredths /* 100ths of an hr in ascii */ 44 ) char (4) aligned; 45 46 dcl ( 47 converted_hundredths /* ascii 100ths converted to hh:mm */ 48 ) char (8) aligned; 49 50 dcl ( 51 a_gcos_time, /* gcos date-time to be converted (argument) */ 52 gcos_time /* gcos date-time to be converted (internal) */ 53 ) char (16) aligned; 54 55 dcl ( 56 multics_time /* ascii multics time */ 57 ) char (32) aligned; 58 59 60 /* built in */ 61 /* ----- -- */ 62 63 dcl ( 64 divide, 65 fixed, 66 substr 67 ) builtin; 68 69 70 /* external entries */ 71 /* -------- ------- */ 72 73 dcl convert_date_to_binary_ ext entry 74 (char (*) aligned, fixed bin (71) aligned, fixed bin (35) aligned); 75 76 dcl cv_dec_check_ ext entry 77 (char (*) aligned, fixed bin (35) aligned) returns (fixed bin (35) aligned); 78 79 dcl ioa_$rsnnl ext entry 80 options (variable); 81 82 83 /* */ 84 85 gcos_time = a_gcos_time; /* copy in argument */ 86 code = 0; /* initialize error code */ 87 deferral = 0; /* initialize deferral field */ 88 89 90 /* convert MMDDYY to MM/DD/YY */ 91 92 multics_time = ""; /* blank out time field */ 93 substr (multics_time, 1, 2) = substr (gcos_time, 1, 2); /* month */ 94 substr (multics_time, 4, 2) = substr (gcos_time, 3, 2); /* day */ 95 substr (multics_time, 7, 2) = substr (gcos_time, 5, 2); /* year */ 96 substr (multics_time, 3, 1), 97 substr (multics_time, 6, 1) = "/"; /* put slashes between fields */ 98 99 /* pick up HH */ 100 101 substr (multics_time, 10, 2) = substr (gcos_time, 8, 2); 102 substr (multics_time, 12, 1) = ":"; 103 104 /* pick up MM or convert XX to MM */ 105 106 if substr (gcos_time, 10, 1) = ":" /* gcos time given in minutes */ 107 then do; 108 substr (multics_time, 13, 2) = substr (gcos_time, 11, 2); /* just copy */ 109 substr (multics_time, 15, 3) = ":00"; /* no seconds */ 110 end; 111 112 else /* gcos time in 100ths of an hour */ 113 do; 114 115 if substr (gcos_time, 10, 1) = "." /* field is HH.XX */ 116 then ascii_hundredths = substr (gcos_time, 11, 2); 117 else /* field is HHXX */ 118 ascii_hundredths = substr (gcos_time, 10, 2); 119 120 call convert_hundredths; /* convert hundredths to ascii MM:SS */ 121 if code ^= 0 /* error converting */ 122 then go to RETURN; 123 124 substr (multics_time, 13, hundredth_length) = substr (converted_hundredths, 1, hundredth_length); 125 126 end; 127 128 call convert_date_to_binary_ (multics_time, deferral, code); /* convert date */ 129 130 RETURN: 131 132 if code ^= 0 /* an error occurred */ 133 then code = 1 ; /* return non-fatal error */ 134 135 a_deferral = deferral; /* return deferred time */ 136 137 a_code = code; /* return error code */ 138 139 return; 140 141 /* */ 142 143 convert_hundredths: proc; /* internal procedure */ 144 145 fixed_bin_hundredths = cv_dec_check_ (ascii_hundredths, code); /* convert to fixed bin */ 146 if code ^= 0 /* error converting */ 147 then return; 148 149 seconds = fixed (fixed_bin_hundredths*36, 17); /* convert to seconds */ 150 151 minutes = divide (seconds, 60, 17, 0); /* convert to minutes and seconds */ 152 seconds = seconds - minutes*60; 153 call ioa_$rsnnl ("^d:^d", converted_hundredths, hundredth_length, minutes, seconds); 154 155 return; 156 157 end convert_hundredths; 158 159 end gcos_convert_time_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/19/82 0929.3 gcos_convert_time_.pl1 >spec>on>11/19/82>gcos_convert_time_.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 27 set ref 11 137* a_deferral parameter fixed bin(71,0) dcl 33 set ref 11 135* a_gcos_time parameter char(16) dcl 50 ref 11 85 ascii_hundredths 000110 automatic char(4) dcl 42 set ref 115* 117* 145* code 000103 automatic fixed bin(35,0) dcl 27 set ref 86* 121 128* 130 130* 137 145* 146 convert_date_to_binary_ 000010 constant entry external dcl 73 ref 128 converted_hundredths 000112 automatic char(8) dcl 46 set ref 124 153* cv_dec_check_ 000012 constant entry external dcl 76 ref 145 deferral 000106 automatic fixed bin(71,0) dcl 33 set ref 87* 128* 135 divide builtin function dcl 63 ref 151 fixed builtin function dcl 63 ref 149 fixed_bin_hundredths 000104 automatic fixed bin(35,0) dcl 27 set ref 145* 149 gcos_time 000114 automatic char(16) dcl 50 set ref 85* 93 94 95 101 106 108 115 115 117 hundredth_length 000100 automatic fixed bin(17,0) dcl 21 set ref 124 124 153* ioa_$rsnnl 000014 constant entry external dcl 79 ref 153 minutes 000101 automatic fixed bin(17,0) dcl 21 set ref 151* 152 153* multics_time 000120 automatic char(32) dcl 55 set ref 92* 93* 94* 95* 96* 96* 101* 102* 108* 109* 124* 128* seconds 000102 automatic fixed bin(17,0) dcl 21 set ref 149* 151 152* 152 153* substr builtin function dcl 63 set ref 93* 93 94* 94 95* 95 96* 96* 101* 101 102* 106 108* 108 109* 115 115 117 124* 124 NAMES DECLARED BY EXPLICIT CONTEXT. RETURN 000154 constant label dcl 130 ref 121 convert_hundredths 000166 constant entry internal dcl 143 ref 120 gcos_convert_time_ 000022 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 336 354 260 346 Length 524 260 16 134 55 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME gcos_convert_time_ 150 external procedure is an external procedure. convert_hundredths internal procedure shares stack frame of external procedure gcos_convert_time_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME gcos_convert_time_ 000100 hundredth_length gcos_convert_time_ 000101 minutes gcos_convert_time_ 000102 seconds gcos_convert_time_ 000103 code gcos_convert_time_ 000104 fixed_bin_hundredths gcos_convert_time_ 000106 deferral gcos_convert_time_ 000110 ascii_hundredths gcos_convert_time_ 000112 converted_hundredths gcos_convert_time_ 000114 gcos_time gcos_convert_time_ 000120 multics_time gcos_convert_time_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. convert_date_to_binary_ cv_dec_check_ ioa_$rsnnl NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000016 85 000027 86 000037 87 000040 92 000042 93 000045 94 000047 95 000053 96 000056 101 000062 102 000066 106 000070 108 000076 109 000101 110 000104 115 000105 117 000116 120 000124 121 000125 124 000127 128 000133 130 000154 135 000160 137 000163 139 000165 143 000166 145 000167 146 000207 149 000212 151 000215 152 000217 153 000223 155 000254 ----------------------------------------------------------- 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