COMPILATION LISTING OF SEGMENT unspool_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1741.8 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 unspool_: proc (a_sip, code); 12 13 14 /* UNSPOOL_ -- called each time a file is to be taken from spooling tape and formatted 15* for input to the Multics printer DIM -- be printed by a PRT300 or similar printer. 16* 0) Created 1/5/75 by Janice B. Phillipps as part of the Multics spooling facility. 17* 1) Updated by J.Phillipps 7/75 for new printer dim 18* 2 Modified by J. C. Whitmore 1/78 for new printer features and prtdim/spooldim merge 19**/ 20 1 1 /* BEGIN INCLUDE FILE ... spooling_info.incl.pl1 */ 1 2 /* Spooling IO Module control structure. Created 11/4/74 by Janice Phillipps */ 1 3 /* Modified 1/25/78 by J. C. Whitmore during spool driver update */ 1 4 1 5 dcl sip ptr; /* pointer to spooling info structure */ 1 6 1 7 dcl 1 spooling_info based (sip) aligned, /* spooling info structure */ 1 8 2 version fixed bin, /* version of structure */ 1 9 2 pad1 fixed bin, /* space broken for ptr allocation */ 1 10 2 iocbp ptr, /* ptr to io control block used by tape_ansi_ */ 1 11 2 switch_name char (32), /* name of io switch attached to tape_ansi_ */ 1 12 2 nvols fixed bin, /* number of tape volumes requested */ 1 13 2 density char (4), 1 14 2 block_lnth char (4), 1 15 2 volids (3) char (6), /* array of tape volume ids */ 1 16 2 filesetid char (6), /* name of current ansi file set */ 1 17 2 comment char (64), /* comment to operator at mount */ 1 18 2 phys_line_length fixed bin, 1 19 2 phys_page_length fixed bin, 1 20 2 filenumber fixed bin, /* number of current file on tape */ 1 21 2 static_number char (6) aligned, 1 22 2 flgs, 1 23 3 fst_call bit (1) unaligned, /* indicates first time thru attach code */ 1 24 3 lst_call bit (1) unaligned, /* indicates spooling tape will be detached */ 1 25 3 io_sw bit (1) unaligned, /* = "1"b if ring in tape */ 1 26 3 vol_mount bit (1) unaligned, 1 27 3 pad1 bit (32) unaligned, 1 28 2 spooling_limits, 1 29 3 spool_file_limit_sw fixed bin, /* = 1 when reached specified spooling file limit */ 1 30 3 spool_line_limit_sw fixed bin, /* = 1 when reached specifid spooling line limit */ 1 31 3 file_limit fixed bin (35), /* count of files to spool until */ 1 32 3 line_limit fixed bin (35), /* count of lines to spool until */ 1 33 2 spooling_file_count fixed bin (35), /* count of files spooled so far */ 1 34 2 spooling_line_count fixed bin (35); /* count of lines spooled so far */ 1 35 1 36 dcl spooling_info_version_4 fixed bin int static init (4) options (constant); 1 37 1 38 1 39 /* END INCLUDE FILE ... spooling_info.incl.pl1 */ 21 2 1 2 2 /* BEGIN INCLUDE FILE ... status.incl.pl1 */ 2 3 /* Overlay for ios status string. Created 11/4/74 by J. Phillipps */ 2 4 2 5 dcl 1 stat based (addr (status)) aligned, 2 6 2 fbpart fixed bin (35), /* error_table_ entry overlay */ 2 7 2 ios, 2 8 (3 pad1 bit (4), 2 9 3 bit41_trans_term bit (1), /* bit 41 -- transaction terminated */ 2 10 3 pad2 bit (10), 2 11 3 bit52_ion_detached bit (1), /* bit 52 -- ioname detached */ 2 12 2 pad3 bit (20)) unaligned; 2 13 2 14 /* END INCLUDE FILE ... status.incl.pl1 */ 22 23 24 25 26 27 dcl command_question condition; 28 dcl slew_strng char (nelem) based (slewp); 29 30 dcl strng char (plnth + 1) based; 31 32 dcl 1 buffer aligned, /* buffer for reading in lines */ 33 2 cc char (1) unaligned, 34 2 input_record char (165) unaligned, 35 2 output_record char (165) aligned; 36 37 dcl (addr, substr, null) builtin; 38 39 dcl a_sip ptr, 40 bbp ptr, 41 buf_len21 fixed bin (21), 42 code fixed bin (35), 43 init_flg bit (1) unaligned, 44 inp ptr, 45 iocbp ptr, /* ptr to ansi dim control block */ 46 lnth fixed bin, 47 nelem fixed bin, 48 nelemt fixed bin, 49 order char (18) varying, 50 plnth fixed bin, 51 slewp ptr, 52 statp ptr, /* ptr to status string */ 53 status bit (72) aligned, 54 term_flg bit (1) unaligned; 55 56 dcl spool_static_$debug ext; 57 dcl error_table_$end_of_info fixed bin (35) ext; 58 dcl error_table_$fatal_error fixed bin (35) ext; 59 60 61 dcl com_err_ entry options (variable); 62 dcl ioa_ entry options (variable); 63 dcl ios_$write entry (char (*) aligned, ptr, fixed bin, fixed bin, fixed bin, bit (72) aligned); 64 dcl ios_$order entry (char (*) aligned, char (*) aligned, ptr, bit (72) aligned); 65 dcl iox_$read_record entry (ptr, ptr, fixed bin (21), fixed bin, fixed bin (35)); 66 dcl spooling_question_handler_ entry (ptr, fixed bin (35)); 67 68 dcl 1 slew_table aligned internal static, 69 2 space_one_line char (1) aligned, 70 2 space_two_lines char (2) unaligned, 71 2 space_three_lines char (3) unaligned, 72 2 form_feed char (1) unaligned, 73 2 carriage_return char (1) unaligned; 74 75 76 dcl first bit (1) internal static init ("1"b); 77 dcl CR char (1) aligned internal static init (" "); 78 dcl NL char (1) aligned internal static init (" 79 "); 80 dcl PR char (14) aligned internal static init ("printer_output"); 81 dcl FF char (1) aligned internal static init (" "); 82 83 sip = a_sip; 84 statp = addr (status); 85 status = (72)"0"b; 86 code = 0; 87 88 if spooling_info.version ^= spooling_info_version_4 then do; 89 code = error_table_$fatal_error; 90 return; 91 end; 92 93 on command_question call spooling_question_handler_ (sip, code); 94 95 lnth = 0; /* length of each lrec read from spooling tape */ 96 buf_len21 = sip -> spooling_info.phys_line_length + 1; /* should be 137 */ 97 nelemt = 0; /* initial number of elements is zero */ 98 nelem = 0; /* initialize */ 99 100 if first = "1"b then do; 101 slew_table.space_one_line = NL; 102 slew_table.space_two_lines = NL || NL; 103 slew_table.space_three_lines = NL || NL || NL; 104 slew_table.carriage_return = CR; 105 slew_table.form_feed = FF; 106 first = "0"b; 107 end; 108 109 iocbp = sip -> spooling_info.iocbp; /* pick up iocb ptr for reading records from tape */ 110 bbp = addr (buffer); /* pts to place to read in records from tape */ 111 112 113 /* read from the file on the tape, one line at a time, and convert the carriage control characters for 114* correct printing on the printer */ 115 116 init_flg = "1"b; 117 term_flg = "0"b; 118 inp = addr (buffer.output_record); 119 120 read: buffer.cc = ""; 121 buffer.input_record = ""; 122 123 call iox_$read_record (iocbp, bbp, buf_len21, lnth, code); /* read a record from spooling tape */ 124 if code = 0 then do; 125 call convert (code); /* if read ok, do code conversion and write line */ 126 if code ^= 0 then return; /* OOPS! */ 127 go to read; 128 end; 129 130 if code = error_table_$end_of_info then do; /* end of this spooled file */ 131 code = 0; 132 term_flg = "1"b; /* set up to terminate processing this file */ 133 call convert (code); 134 end; 135 else do; 136 if spool_static_$debug = 1 then call ioa_ ("unspool: error reading record -- ^a", bbp -> strng); 137 code = error_table_$fatal_error; /* thats all for this file */ 138 end; 139 140 return; 141 142 convert: proc (ec); 143 144 dcl ec fixed bin (35); 145 146 /* little procedure for mapping ASA printer carriage control characters to "pre-slew" characters */ 147 /* code converts one logical record (printed line) per call */ 148 149 order = ""; /* initialize */ 150 if term_flg = "0"b then do; 151 152 if buffer.cc = " " then do; /* new line */ 153 slewp = addr (slew_table.space_one_line); 154 nelem = 1; 155 end; 156 else if buffer.cc = "0" then do; /* double space */ 157 slewp = addr (slew_table.space_two_lines); 158 nelem = 2; 159 end; 160 else if buffer.cc = "-" then do; /* triple space */ 161 slewp = addr (slew_table.space_three_lines); 162 nelem = 3; 163 end; 164 else if buffer.cc = "1" then do; /* form feed */ 165 slewp = addr (slew_table.form_feed); 166 nelem = 1; 167 end; 168 else if buffer.cc = "+" then do; /* carriage return */ 169 slewp = addr (slew_table.carriage_return); 170 nelem = 1; 171 end; 172 else if buffer.cc = "7" then do; /* space to top inside page */ 173 order = "inside_page"; 174 slewp = addr (slew_table.carriage_return); 175 nelem = 1; 176 end; 177 else if buffer.cc = "8" then do; /* space to top outside page */ 178 order = "outside_page"; 179 slewp = addr (slew_table.carriage_return); 180 nelem = 1; 181 end; 182 if init_flg = "1"b then do; /* 1st time thru just put out slew */ 183 init_flg = "0"b; 184 185 if order ^= "" then 186 call ios_$order (PR, (order), null (), status); 187 188 call ios_$write (PR, slewp, 0, nelem, nelemt, status); 189 if statp -> stat.fbpart ^= 0 then do; 190 ec = statp -> stat.fbpart; 191 call com_err_ (ec, "unspool_", "unspool_$convert: problem writing slew."); 192 end; 193 if lnth = 1 then buffer.output_record = ""; /* only slew one line */ 194 else buffer.output_record = buffer.input_record; 195 plnth = lnth - 1; /* save the length of the print line */ 196 return; 197 end; 198 end; 199 else do; /* this is the last time around for this file */ 200 slewp = addr (slew_table.space_one_line); 201 nelem = 1; 202 end; 203 204 /* add the current slew char to the last print line and write */ 205 206 buffer.output_record = substr (buffer.output_record, 1, plnth) || slew_strng; 207 208 call ios_$write (PR, inp, 0, plnth + nelem, nelemt, status); 209 if statp -> stat.fbpart ^= 0 then do; 210 ec = statp -> stat.fbpart; 211 call com_err_ (ec, "unspool_", "unspool_$convert: Writing: ^a", inp -> strng); 212 return; 213 end; 214 215 plnth = lnth - 1; /* save line length for next output */ 216 buffer.output_record = buffer.input_record; /* copy in the new line, then get the next slew */ 217 if order ^= "" then 218 call ios_$order (PR, (order), null (), status); 219 220 return; 221 222 end convert; 223 224 end unspool_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1524.7 unspool_.pl1 >dumps>old>recomp>unspool_.pl1 21 1 02/23/78 1619.8 spooling_info.incl.pl1 >ldd>include>spooling_info.incl.pl1 22 2 02/05/76 1532.2 status.incl.pl1 >ldd>include>status.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. CR constant char(1) initial dcl 77 ref 104 FF constant char(1) initial dcl 81 ref 105 NL constant char(1) initial dcl 78 ref 101 102 102 103 103 103 PR 000014 internal static char(14) initial dcl 80 set ref 185* 188* 208* 217* a_sip parameter pointer dcl 39 ref 11 83 addr builtin function dcl 37 ref 84 110 118 153 157 161 165 169 174 179 200 bbp 000234 automatic pointer dcl 39 set ref 110* 123* 136 buf_len21 000236 automatic fixed bin(21,0) dcl 39 set ref 96* 123* buffer 000110 automatic structure level 1 dcl 32 set ref 110 carriage_return 2(18) 000010 internal static char(1) level 2 packed unaligned dcl 68 set ref 104* 169 174 179 cc 000110 automatic char(1) level 2 packed unaligned dcl 32 set ref 120* 152 156 160 164 168 172 177 code parameter fixed bin(35,0) dcl 39 set ref 11 86* 89* 93* 123* 124 125* 126 130 131* 133* 137* com_err_ 000026 constant entry external dcl 61 ref 191 211 command_question 000102 stack reference condition dcl 27 ref 93 ec parameter fixed bin(35,0) dcl 144 set ref 142 190* 191* 210* 211* error_table_$end_of_info 000022 external static fixed bin(35,0) dcl 57 ref 130 error_table_$fatal_error 000024 external static fixed bin(35,0) dcl 58 ref 89 137 fbpart based fixed bin(35,0) level 2 dcl 2-5 ref 189 190 209 210 first 000013 internal static bit(1) initial unaligned dcl 76 set ref 100 106* form_feed 2(09) 000010 internal static char(1) level 2 packed unaligned dcl 68 set ref 105* 165 init_flg 000237 automatic bit(1) unaligned dcl 39 set ref 116* 182 183* inp 000240 automatic pointer dcl 39 set ref 118* 208* 211 input_record 0(09) 000110 automatic char(165) level 2 packed unaligned dcl 32 set ref 121* 194 216 ioa_ 000030 constant entry external dcl 62 ref 136 iocbp 2 based pointer level 2 in structure "spooling_info" dcl 1-7 in procedure "unspool_" ref 109 iocbp 000242 automatic pointer dcl 39 in procedure "unspool_" set ref 109* 123* ios_$order 000034 constant entry external dcl 64 ref 185 217 ios_$write 000032 constant entry external dcl 63 ref 188 208 iox_$read_record 000036 constant entry external dcl 65 ref 123 lnth 000244 automatic fixed bin(17,0) dcl 39 set ref 95* 123* 193 195 215 nelem 000245 automatic fixed bin(17,0) dcl 39 set ref 98* 154* 158* 162* 166* 170* 175* 180* 188* 201* 206 208 nelemt 000246 automatic fixed bin(17,0) dcl 39 set ref 97* 188* 208* null builtin function dcl 37 ref 185 185 217 217 order 000247 automatic varying char(18) dcl 39 set ref 149* 173* 178* 185 185 217 217 output_record 52 000110 automatic char(165) level 2 dcl 32 set ref 118 193* 194* 206* 206 216* phys_line_length 47 based fixed bin(17,0) level 2 dcl 1-7 ref 96 plnth 000255 automatic fixed bin(17,0) dcl 39 set ref 136 136 195* 206 208 211 211 215* sip 000100 automatic pointer dcl 1-5 set ref 83* 88 93* 96 109 slew_strng based char unaligned dcl 28 ref 206 slew_table 000010 internal static structure level 1 dcl 68 slewp 000256 automatic pointer dcl 39 set ref 153* 157* 161* 165* 169* 174* 179* 188* 200* 206 space_one_line 000010 internal static char(1) level 2 dcl 68 set ref 101* 153 200 space_three_lines 1(18) 000010 internal static char(3) level 2 packed unaligned dcl 68 set ref 103* 161 space_two_lines 1 000010 internal static char(2) level 2 packed unaligned dcl 68 set ref 102* 157 spool_static_$debug 000020 external static fixed bin(17,0) dcl 56 ref 136 spooling_info based structure level 1 dcl 1-7 spooling_info_version_4 constant fixed bin(17,0) initial dcl 1-36 ref 88 spooling_question_handler_ 000040 constant entry external dcl 66 ref 93 stat based structure level 1 dcl 2-5 statp 000260 automatic pointer dcl 39 set ref 84* 189 190 209 210 status 000262 automatic bit(72) dcl 39 set ref 84 85* 185* 188* 208* 217* strng based char unaligned dcl 30 set ref 136* 211* substr builtin function dcl 37 ref 206 term_flg 000264 automatic bit(1) unaligned dcl 39 set ref 117* 132* 150 version based fixed bin(17,0) level 2 dcl 1-7 ref 88 NAMES DECLARED BY EXPLICIT CONTEXT. convert 000327 constant entry internal dcl 142 ref 125 133 read 000214 constant label dcl 120 ref 127 unspool_ 000073 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 1172 1234 1033 1202 Length 1454 1033 42 204 136 10 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME unspool_ 262 external procedure is an external procedure. on unit on line 93 70 on unit convert internal procedure shares stack frame of external procedure unspool_. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 slew_table unspool_ 000013 first unspool_ 000014 PR unspool_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME unspool_ 000100 sip unspool_ 000110 buffer unspool_ 000234 bbp unspool_ 000236 buf_len21 unspool_ 000237 init_flg unspool_ 000240 inp unspool_ 000242 iocbp unspool_ 000244 lnth unspool_ 000245 nelem unspool_ 000246 nelemt unspool_ 000247 order unspool_ 000255 plnth unspool_ 000256 slewp unspool_ 000260 statp unspool_ 000262 status unspool_ 000264 term_flg unspool_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_ext_out_desc call_ext_out return enable shorten_stack ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ ioa_ ios_$order ios_$write iox_$read_record spooling_question_handler_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$end_of_info error_table_$fatal_error spool_static_$debug LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000067 83 000100 84 000104 85 000106 86 000110 88 000111 89 000114 90 000116 93 000117 95 000146 96 000147 97 000153 98 000154 100 000155 101 000161 102 000163 103 000166 104 000176 105 000200 106 000202 109 000203 110 000205 116 000207 117 000211 118 000212 120 000214 121 000216 123 000221 124 000241 125 000244 126 000252 127 000255 130 000256 131 000261 132 000262 133 000264 134 000272 136 000273 137 000322 140 000326 142 000327 149 000331 150 000332 152 000334 153 000341 154 000344 155 000346 156 000347 157 000351 158 000354 159 000356 160 000357 161 000361 162 000366 163 000370 164 000371 165 000373 166 000400 167 000402 168 000403 169 000405 170 000412 171 000414 172 000415 173 000417 174 000424 175 000431 176 000433 177 000434 178 000436 179 000443 180 000450 182 000452 183 000455 185 000456 188 000522 189 000557 190 000561 191 000563 193 000611 194 000620 195 000623 196 000625 198 000626 200 000627 201 000632 206 000634 208 000653 209 000713 210 000715 211 000717 212 000756 215 000757 216 000762 217 000765 220 001031 ----------------------------------------------------------- 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