COMPILATION LISTING OF SEGMENT mu_convert_parameter Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 04/18/85 1040.7 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * * 4* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 5* * * 6* * * 7* *********************************************************** */ 8 9 /* ****************************************************** 10* * * 11* * * 12* * Copyright (c) 1972 by Massachusetts Institute of * 13* * Technology and Honeywell Information Systems, Inc. * 14* * * 15* * * 16* ****************************************************** */ 17 18 /* HISTORY: 19* Originally written by Jim Gray - - September 1979 20* Modified by Jim Gray - - Dec. 1979, to change internal routine to call to 21* mu_data_class$scalar so that packed decimal would be accepted. 22* Modified March 25, 1980 by R. Lackey to remove calls to mdbm_util_ */ 23 24 mu_convert_parameter: procedure (); return; /* not valid entry */ 25 26 /* DESCRIPTION: 27* this routine was written to overcome documentation errors in the old MRDS 28* (e.g. dsl_$open specifies mode as fixed bin, but examples use constants = fixed dec ) 29* and to make the input/output parameters acceptable by the various 30* entries declared options(variable) more flexible. 31* there are two entries, $input for converting the users input parameter 32* to the data type needed by the particular dsl_ entry, and 33* $output to assign from the internal dsl_ entry data type into 34* the users given data type when outputting values. 35* NOTE: no conversion or extra work is needed if data types agree 36* with the ones specified in the dsl_ interface write up. 37* NOTE: the internal data type is assumed to be mrds supported(types 1-12, 19-22, and dimension = 0), 38* if the users data type is not mrds supported, mrds_error_$invalid_dm_descriptor is the error code 39**/ 40 41 /* PARAMETERS: 42* user_data_ptr - - (input/output) pointer, for $input entry, points to source of input data parameter, 43* for $output, points to target of output data parameter. 44* 45* actual_data_ptr - - (input/output) pointer, for $input entry, points to data to be used internally by dsl_ entry, 46* for $output entry, points to data used internally by dsl_ entry, 47* and source for any output conversion that may be needed. 48* 49* user_desc_ptr - - (input) pointer, points to bit(36) pl1 descriptor 50* of data pointed to by the user_data_ptr. 51* 52* actual_desc_ptr - - (input) pointer, points to bit(36) pl1 descriptor 53* of data pointed to by actual_data_ptr. 54* 55* work_area_ptr - - (input) pointer, for $input entry only, 56* points to an area where a converted temporary version of the input 57* parameter may be placed if necessary, preferrably a temp segment, 58* overlayed with an area of segment size, that may be released when not needed. 59* 60* error_code - - (output) fixed bin(35), error status encoding, 0 unless an error occured. 61**/ 62 63 input: convert_input_parameter: entry (user_data_ptr, user_desc_ptr, actual_data_ptr, actual_desc_ptr, 64 work_area_ptr, error_code); 65 66 /* this entry converts, if necessary, the user's data type, into that required 67* internally by the dsl_ entry, as specified by the descriptor pointed to 68* bu the actual_desc_ptr, with the data pointed to by actual_data_ptr. 69* no conversion is necessary if the data types agree */ 70 71 error_code = 0; /* initialize */ 72 73 /* use the user's data as is, if descriptors agree */ 74 75 if user_desc_ptr -> desc_ovrly = actual_desc_ptr -> desc_ovrly then do; 76 desc_ptr = user_desc_ptr; 77 if ^mu_data_class$scalar (desc_ptr) then 78 error_code = mrds_error_$invalid_dm_descriptor; 79 else actual_data_ptr = user_data_ptr; 80 end; 81 else do; 82 83 /* conversion will be required, first check for mrds supported data type */ 84 85 desc_ptr = user_desc_ptr; 86 if ^mu_data_class$scalar (desc_ptr) then 87 error_code = mrds_error_$invalid_dm_descriptor; /* not supported mrds data type */ 88 else do; 89 90 /* get some space for the required data type temporary, of length in bits, 91* as specified by it's data type */ 92 93 num_dims = 0; 94 data_bit_length = mu_data_length (actual_desc_ptr -> desc_ovrly); 95 allocate data_space set (actual_data_ptr) in (work_area); 96 97 /* now convert from the user's parameter, into this new space, 98* and with required data type */ 99 100 call mu_convert (user_data_ptr, user_desc_ptr, actual_data_ptr, actual_desc_ptr, error_code); 101 end; 102 end; 103 return; 104 105 output: convert_output_parameter: entry (actual_data_ptr, actual_desc_ptr, user_data_ptr, user_desc_ptr, 106 error_code); 107 108 /* this entry does assignment of output parameters from the data type needed 109* internally by a particular dsl_ entry, using a bit move if data types aggree, 110* or doing a conversion if the data types are different, but mrds supported */ 111 112 113 error_code = 0; /* initialize */ 114 115 /* a bit move will do, if descriptors agree */ 116 117 if actual_desc_ptr -> desc_ovrly = user_desc_ptr -> desc_ovrly then do; 118 desc_ptr = user_desc_ptr; 119 if ^mu_data_class$scalar (desc_ptr) then 120 error_code = mrds_error_$invalid_dm_descriptor; 121 else do; 122 123 /* do the bit move after determining the datas bit length */ 124 125 num_dims = 0; 126 data_bit_length = mu_data_length (desc_ptr -> desc_ovrly); 127 user_data_ptr -> data_space = actual_data_ptr -> data_space; 128 end; 129 end; 130 131 /* descriptors disaree, we will have to use assign_ to output the parameter */ 132 133 else do; 134 desc_ptr = user_desc_ptr; 135 if ^mu_data_class$scalar (desc_ptr) then 136 error_code = mrds_error_$invalid_dm_descriptor; 137 else call mu_convert (actual_data_ptr, actual_desc_ptr, user_data_ptr, user_desc_ptr, error_code); 138 end; 139 140 return; 141 142 declare mu_data_class$scalar entry (ptr) returns (bit (1) aligned); /* decides is data type supported */ 143 declare data_space bit (data_bit_length) unal based; /* overlay for data move or temporary */ 144 declare ON bit (1) init ("1"b); /* true value */ 145 declare OFF bit (1) init ("0"b); /* false value */ 146 declare data_bit_length fixed bin (24); /* bit length of data type */ 147 declare mu_data_length entry (bit (36)) returns (fixed bin (35)); /* bit length from descriptor */ 148 declare mrds_error_$invalid_dm_descriptor fixed bin (35) ext; /* not mrds data type */ 149 declare error_code fixed bin (35); /* error status encoding */ 150 declare desc_ovrly bit (36) based unal; /* overlay for multics pl1 descriptor */ 151 declare work_area_ptr ptr; /* points to area in which converted parameer will reside */ 152 declare work_area area (sys_info$max_seg_size) based (work_area_ptr); /* space for converted parameter */ 153 declare sys_info$max_seg_size fixed bin (35) ext;/* largest segment size */ 154 declare actual_data_ptr ptr; /* points to data used by internal routines */ 155 declare user_data_ptr ptr; /* points to callers data */ 156 declare actual_desc_ptr ptr; /* points to descriptor for internal data */ 157 declare user_desc_ptr ptr; /* points to descriptor for users data */ 158 declare mu_convert entry (ptr, ptr, ptr, ptr, fixed bin (35)); /* does assign_ */ 159 1 1 /* BEGIN mdbm_descriptor.incl.pl1 -- jaw 5/31/78 */ 1 2 /* modified by Jim Gray - - Nov. 1979, to change type from fixed bin(5) to 1 3* unsigned fixed bin(6), so new packed decimal data types could be handled. 1 4* also the duplicate mrds_descriptor.incl.pl1 was eliminated. */ 1 5 1 6 dcl 1 descriptor based (desc_ptr), /* map of Multics descriptor */ 1 7 2 version bit (1) unal, /* DBM handles vers. 1 only */ 1 8 2 type unsigned fixed bin (6) unal, /* data type */ 1 9 2 packed bit (1) unal, /* on if data item is packed */ 1 10 2 number_dims bit (4) unal, /* dimensions */ 1 11 2 size, /* size for string data */ 1 12 3 scale bit (12) unal, /* scale for num. data */ 1 13 3 precision bit (12) unal, /* prec. for num. data */ 1 14 2 array_info (num_dims), 1 15 3 lower_bound fixed bin (35), /* lower bound of dimension */ 1 16 3 upper_bound fixed bin (35), /* upper bound of dimension */ 1 17 3 multiplier fixed bin (35); /* element separation */ 1 18 1 19 dcl desc_ptr ptr; 1 20 dcl num_dims fixed bin init (0) ; /* more useful form of number_dims */ 1 21 1 22 /* END mdbm_descriptor.incl.pl1 */ 1 23 1 24 160 161 162 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/18/85 0908.1 mu_convert_parameter.pl1 >special_ldd>online>mrds.pbf-04/18/85>mu_convert_parameter.pl1 160 1 10/14/83 1608.6 mdbm_descriptor.incl.pl1 >ldd>include>mdbm_descriptor.incl.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. OFF 000101 automatic bit(1) initial unaligned dcl 145 set ref 145* ON 000100 automatic bit(1) initial unaligned dcl 144 set ref 144* actual_data_ptr parameter pointer dcl 154 set ref 63 63 79* 95* 100* 105 105 127 137* actual_desc_ptr parameter pointer dcl 156 set ref 63 63 75 94 100* 105 105 117 137* data_bit_length 000102 automatic fixed bin(24,0) dcl 146 set ref 94* 95 95 126* 127 127 data_space based bit unaligned dcl 143 set ref 95 127* 127 desc_ovrly based bit(36) unaligned dcl 150 set ref 75 75 94* 117 117 126* desc_ptr 000104 automatic pointer dcl 1-19 set ref 76* 77* 85* 86* 118* 119* 126 134* 135* error_code parameter fixed bin(35,0) dcl 149 set ref 63 63 71* 77* 86* 100* 105 105 113* 119* 135* 137* mrds_error_$invalid_dm_descriptor 000014 external static fixed bin(35,0) dcl 148 ref 77 86 119 135 mu_convert 000016 constant entry external dcl 158 ref 100 137 mu_data_class$scalar 000010 constant entry external dcl 142 ref 77 86 119 135 mu_data_length 000012 constant entry external dcl 147 ref 94 126 num_dims 000106 automatic fixed bin(17,0) initial dcl 1-20 set ref 93* 125* 1-20* user_data_ptr parameter pointer dcl 155 set ref 63 63 79 100* 105 105 127 137* user_desc_ptr parameter pointer dcl 157 set ref 63 63 75 76 85 100* 105 105 117 118 134 137* work_area based area dcl 152 ref 95 work_area_ptr parameter pointer dcl 151 ref 63 63 95 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. descriptor based structure level 1 unaligned dcl 1-6 sys_info$max_seg_size external static fixed bin(35,0) dcl 153 NAMES DECLARED BY EXPLICIT CONTEXT. convert_input_parameter 000030 constant entry external dcl 63 convert_output_parameter 000227 constant entry external dcl 105 input 000054 constant entry external dcl 63 mu_convert_parameter 000013 constant entry external dcl 24 output 000253 constant entry external dcl 105 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 542 562 413 552 Length 772 413 20 174 126 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME mu_convert_parameter 102 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME mu_convert_parameter 000100 ON mu_convert_parameter 000101 OFF mu_convert_parameter 000102 data_bit_length mu_convert_parameter 000104 desc_ptr mu_convert_parameter 000106 num_dims mu_convert_parameter THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return ext_entry alloc_based THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. mu_convert mu_data_class$scalar mu_data_length THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. mrds_error_$invalid_dm_descriptor LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 144 000004 145 000006 1 20 000007 24 000012 24 000021 63 000022 71 000075 75 000076 76 000106 77 000107 79 000127 80 000132 85 000133 86 000134 93 000154 94 000155 95 000171 100 000202 103 000221 105 000222 113 000274 117 000275 118 000305 119 000306 125 000326 126 000327 127 000342 129 000351 134 000352 135 000353 137 000373 140 000412 ----------------------------------------------------------- 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