COMPILATION LISTING OF SEGMENT put_copy_ Compiled by: Multics PL/I Compiler, Release 28d, of September 14, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 10/03/83 1425.3 mst Mon Options: optimize map 1 2 /* ****************************************************** 3* * * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* * * 9* ****************************************************** */ 10 11 put_copy_:proc(pspp,nn) options(support); 12 13 14 dcl pspp ptr; 15 dcl nn fixed bin(21); 16 17 dcl ( psp , cp , cpfp ) ptr; 18 dcl ( n1 , n2 , i ) fixed bin(15); 19 dcl (addr,null,substr) builtin; 20 dcl copy_file file based; 21 dcl ( pspstatsaved,fsbpstatsaved ) ptr; 22 dcl NL char(1) aligned static internal init(" 23 "); 24 25 26 1 1 /* BEGIN INCLUDE FILE ... plio2_fsb.incl.pl1 */ 1 2 /* format: style3,idind30 */ 1 3 1 4 declare 1 fsb aligned based (fsbp), 1 5 2 switch aligned, 1 6 3 zot (2) bit (1) unaligned, 1 7 3 version_2 bit (1) unaligned, 1 8 3 open bit (1) unaligned, 1 9 3 print bit (1) unaligned, 1 10 3 input bit (1) unaligned, 1 11 3 output bit (1) unaligned, 1 12 3 update bit (1) unaligned, 1 13 3 stream bit (1) unaligned, 1 14 3 notkeyed bit (1) unaligned, 1 15 3 record bit (1) unaligned, 1 16 3 sequential bit (1) unaligned, 1 17 3 direct bit (1) unaligned, 1 18 3 interactive bit (1) unaligned, 1 19 3 not_used_1 bit (1) unaligned, 1 20 3 not_used_2 bit (1) unaligned, 1 21 3 stringvalue bit (1) unaligned, 1 22 3 keyed bit (1) unaligned, 1 23 3 namelist bit (1) unaligned, 1 24 3 implementation bit (1) unaligned, 1 25 3 not_used_4 bit (1) unaligned, /* old get-input eof flag */ 1 26 3 transmit_error bit (1) unaligned, 1 27 3 buffer_in_use bit (1) unaligned, 1 28 3 copy bit (1) unaligned, 1 29 3 detach bit (1) unaligned, 1 30 3 te_hold bit (1) unaligned, 1 31 3 not_used_5 bit (1) unaligned, 1 32 3 internal bit (1) unaligned, 1 33 3 threaded bit (1) unaligned, 1 34 3 fsb_in_use bit (1) unaligned, 1 35 3 console bit (1) unaligned, 1 36 3 emptyline bit (1) unaligned, 1 37 3 iox_close bit (1) unaligned, 1 38 3 xxx4 bit (1) unaligned, 1 39 3 xxx5 bit (1) unaligned, 1 40 3 xxx6 bit (1) unaligned, 1 41 2 nono aligned, 1 42 3 bit_string bit (1) unaligned, 1 43 3 not_used_3 bit (1) unaligned, 1 44 3 read bit (1) unaligned, 1 45 3 write bit (1) unaligned, 1 46 3 rewrite bit (1) unaligned, 1 47 3 delete bit (1) unaligned, 1 48 3 locate bit (1) unaligned, 1 49 3 key bit (1) unaligned, 1 50 3 keyto bit (1) unaligned, 1 51 3 keyfrom bit (1) unaligned, 1 52 3 set bit (1) unaligned, 1 53 3 into bit (1) unaligned, 1 54 3 ignore bit (1) unaligned, 1 55 3 from bit (1) unaligned, 1 56 3 nofrom bit (1) unaligned, 1 57 3 nokey bit (1) unaligned, 1 58 3 nokeyfrom bit (1) unaligned, 1 59 3 nolock bit (1) unaligned, 1 60 2 lsep fixed bin (15), /* (1,COMMA)(2,BL)(3,TAB)(4,NL)(5,SEMI) */ 1 61 2 iocb_p ptr unaligned, /* identifies data_set to iox_ */ 1 62 2 blc fixed bin (21), /* buffer's last character (input) */ 1 63 2 bsize fixed bin (21), /* size of buffer */ 1 64 2 bptr ptr, /* address of buffer */ 1 65 2 bnc fixed bin (15), /* next character in buffer */ 1 66 2 kol fixed bin (15), /* last column read from or written into */ 1 67 2 lsize fixed bin (15), /* line size (output) */ 1 68 2 lineno fixed bin (15), /* current line (output) - starts at 1 on each new page */ 1 69 2 psize fixed bin (35), /* page size (output) */ 1 70 2 pageno fixed bin (15), /* current page number, starts at 1 */ 1 71 2 limit fixed bin (15), 1 72 2 lnzc fixed bin (35), 1 73 2 filename char (32) aligned, /* declared file name */ 1 74 2 title char (32) unaligned,/* Multics I/O switch */ 1 75 2 fsb_thread ptr, 1 76 2 buffer (212) fixed bin (15), 1 77 2 path_name char (168) unal, /* title option */ 1 78 2 declared_attributes (2) bit (36) aligned; 1 79 1 80 declare xbuf char (1000) unaligned based (fsb.bptr); 1 81 1 82 /* END INCLUDE FILE ... plio2_fsb.incl.pl1 */ 27 2 1 /* BEGIN INCLUDE FILE ... plio2_ps.incl.pl1 */ 2 2 /* Stream I/O data block used by PL/I I/O runtime routines. 2 3* 2 4* Modified: 31 January 1978 by RAB to change plio2_data_$fsb_thread to plio2_data_fsb_thread_ 2 5**/ 2 6 /* format: style3,idind30 */ 2 7 2 8 /* based */ 2 9 2 10 declare 1 ps aligned based (psp),/* items set NORMALLY by compiled procedures */ 2 11 2 stack_frame_p ptr, /* items set in block prologue */ 2 12 2 ST_top_p ptr, 2 13 2 ST_block_p ptr, 2 14 2 format_area_p ptr, 2 15 2 ss_list_p ptr, 2 16 2 ab_return, /* items set in prep call */ 2 17 3 abret (3) ptr, 2 18 2 source_p ptr, /* addr(fakefsb) for string option, 2 19* addr(file) for explicit file option */ 2 20 2 special_list_p ptr, /* addr(OKlist) for get data, addr(format_list) for edit */ 2 21 2 copy_file_p ptr, 2 22 2 job aligned, 2 23 3 explicit_file bit (1) unal, 2 24 3 string bit (1) unal, 2 25 3 varying_string bit (1) unal, 2 26 3 data bit (1) unal, 2 27 3 edit bit (1) unal, 2 28 3 list bit (1) unal, 2 29 3 get bit (1) unal, 2 30 3 put bit (1) unal, 2 31 3 page bit (1) unal, 2 32 3 line bit (1) unal, 2 33 3 skip bit (1) unal, 2 34 3 copy bit (1) unal, 2 35 3 p1p2 bit (1) unal, 2 36 3 bit_string bit (1) unal, /* for environment(stringvalue) */ 2 37 3 char_string bit (1) unal, 2 38 3 read bit (1) unal, 2 39 3 write bit (1) unal, 2 40 3 rewrite bit (1) unal, 2 41 3 delete bit (1) unal, 2 42 3 locate bit (1) unal, 2 43 3 key bit (1) unal, 2 44 3 keyto bit (1) unal, 2 45 3 keyfrom bit (1) unal, 2 46 3 set bit (1) unal, 2 47 3 into bit (1) unal, 2 48 3 ignore bit (1) unal, 2 49 3 from bit (1) unal, 2 50 3 version bit (6) unal, 2 51 3 not_byte_buffer bit (1) unal, 2 52 3 pad1 bit (1) unal, 2 53 3 packed_ptr bit (1) unal, 2 54 2 number fixed bin (15), 2 55 2 value_p ptr, /* items set NORMALLY by compiled procedures per transmission */ 2 56 2 descriptor bit (36) aligned, 2 57 2 length fixed bin (15), /* may be swallowed into descriptor */ 2 58 2 top_half bit (18) unal, 2 59 2 offset bit (18) unal, 2 60 2 prep fixed bin (15), /* items treated ABNORMALLY, written by user and PLIO */ 2 61 2 new_format fixed bin (15), 2 62 2 switch aligned, /* items used by PLIO and not touched by compiled procedures */ 2 63 3 first_field bit (1) unal, 2 64 3 file bit (1) unal, 2 65 3 transmit_error bit (1) unal, 2 66 3 semi_sep bit (1) unal, 2 67 3 pad2 bit (32) unal, 2 68 2 file_p ptr, 2 69 2 fsbp ptr, 2 70 2 auxp ptr, /* used as addr(ldidata) for GETs */ 2 71 2 fabp ptr, 2 72 2 fab2p ptr, 2 73 2 vp ptr, 2 74 2 descr bit (36) aligned, 2 75 2 start_copy fixed bin (15), 2 76 2 quick_stream_storage, 2 77 3 a_stored fixed bin (35), 2 78 3 q_stored fixed bin (35); 2 79 2 80 /* external static */ 2 81 2 82 declare ( 2 83 plio2_data_$pspstat, 2 84 plio2_data_$fsbpstat, 2 85 plio2_data_$badfsbp, 2 86 plio2_data_$fabpstat, 2 87 plio2_data_$fab2pstat, 2 88 plio2_data_$pliostringfsbp 2 89 ) ptr external static; 2 90 2 91 dcl plio2_data_fsb_thread_ ptr ext static initial (null); 2 92 /* *system var */ 2 93 2 94 declare ( 2 95 plio2_data_$badjob bit (36) aligned, 2 96 plio2_data_$undef_file_sw bit (1) aligned 2 97 ) external static; 2 98 2 99 /* END INCLUDE FILE ... plio2_ps.incl.pl1 */ 28 29 30 31 psp=pspp; 32 n1=psp->ps.start_copy; 33 n2=nn; 34 cp=psp->ps.fsbp->fsb.bptr; 35 36 if psp->ps.copy_file_p=null then cpfp=addr_sysprint(); 37 else cpfp=psp->ps.copy_file_p; 38 /* 39* dcl ioa_ entry ext implementation(variable); 40* call ioa_("cpfp=^p,cp=^p,n1=^d,n2=^d,stuff=^a",cpfp,cp,n1,n2,substr(cp->xbuf,n1,n2+1-n1)); 41* call ioa_("filename(get)=^a",psp->ps.fsbp->fsb.filename); 42* call ioa_("filename(copy)=^a",psp->ps.copy_file_p->p_vector(2)->fsb.filename); 43**/ 44 45 pspstatsaved=plio2_data_$pspstat; 46 fsbpstatsaved=plio2_data_$fsbpstat; 47 48 /* TO OPEN THE COPY FILE PRIOR TO FIRST GET . . . */ 49 if n2=-1 then 50 do; 51 put file(cpfp->copy_file) edit("")(a); 52 goto exit; 53 end; 54 55 56 copy_loop: 57 if n1 > n2 then 58 do; 59 exit: 60 plio2_data_$pspstat=pspstatsaved; 61 plio2_data_$fsbpstat=fsbpstatsaved; 62 return; 63 end; 64 65 do i=n1 to n2; 66 if substr(cp->xbuf,i,1)=NL then goto copy; 67 end; 68 69 i=n2+1; 70 copy: 71 if n1copy_file) edit(substr(cp->xbuf,n1,i-n1)) (a); 72 n1=i+1; 73 74 if i<=n2 then put file(cpfp->copy_file) skip; 75 76 goto copy_loop; 77 78 addr_sysprint:proc returns(ptr); 79 dcl sysprint file output print stream; 80 return(addr(sysprint)); 81 end addr_sysprint; 82 83 end put_copy_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/03/83 1005.6 put_copy_.pl1 >spec>on>pl128d>put_copy_.pl1 27 1 08/13/81 2043.5 plio2_fsb.incl.pl1 >ldd>include>plio2_fsb.incl.pl1 28 2 08/13/81 2043.5 plio2_ps.incl.pl1 >ldd>include>plio2_ps.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. NL 000254 constant char(1) initial dcl 22 ref 66 addr builtin function dcl 19 ref 80 bptr 6 based pointer level 2 dcl 1-4 ref 34 copy_file based file variable dcl 20 ref 51 70 74 copy_file_p 24 based pointer level 2 dcl 2-10 ref 36 37 cp 000102 automatic pointer dcl 17 set ref 34* 66 70 cpfp 000104 automatic pointer dcl 17 set ref 36* 37* 51 70 74 fsb based structure level 1 dcl 1-4 fsbp 42 based pointer level 2 dcl 2-10 ref 34 fsbpstatsaved 000114 automatic pointer dcl 21 set ref 46* 61 i 000110 automatic fixed bin(15,0) dcl 18 set ref 65* 66* 69* 70 70 72 74 n1 000106 automatic fixed bin(15,0) dcl 18 set ref 32* 56 65 70 70 70 72* n2 000107 automatic fixed bin(15,0) dcl 18 set ref 33* 49 56 65 69 74 nn parameter fixed bin(21,0) dcl 15 ref 11 33 null builtin function dcl 19 ref 36 plio2_data_$fsbpstat 000014 external static pointer dcl 2-82 set ref 46 61* plio2_data_$pspstat 000012 external static pointer dcl 2-82 set ref 45 59* ps based structure level 1 dcl 2-10 psp 000100 automatic pointer dcl 17 set ref 31* 32 34 36 37 pspp parameter pointer dcl 14 ref 11 31 pspstatsaved 000112 automatic pointer dcl 21 set ref 45* 59 start_copy 55 based fixed bin(15,0) level 2 dcl 2-10 ref 32 substr builtin function dcl 19 ref 66 70 sysprint 000016 constant file print output stream dcl 79 set ref 80* xbuf based char(1000) unaligned dcl 1-80 ref 66 70 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. plio2_data_$badfsbp external static pointer dcl 2-82 plio2_data_$badjob external static bit(36) dcl 2-94 plio2_data_$fab2pstat external static pointer dcl 2-82 plio2_data_$fabpstat external static pointer dcl 2-82 plio2_data_$pliostringfsbp external static pointer dcl 2-82 plio2_data_$undef_file_sw external static bit(1) dcl 2-94 plio2_data_fsb_thread_ external static pointer initial dcl 2-91 NAMES DECLARED BY EXPLICIT CONTEXT. addr_sysprint 000225 constant entry internal dcl 78 ref 36 copy 000157 constant label dcl 70 ref 66 copy_loop 000124 constant label dcl 56 ref 76 exit 000127 constant label dcl 59 ref 52 put_copy_ 000033 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 342 364 256 352 Length 564 256 22 164 63 2 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME put_copy_ 270 external procedure is an external procedure. addr_sysprint internal procedure shares stack frame of external procedure put_copy_. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME put_copy_ 000100 psp put_copy_ 000102 cp put_copy_ 000104 cpfp put_copy_ 000106 n1 put_copy_ 000107 n2 put_copy_ 000110 i put_copy_ 000112 pspstatsaved put_copy_ 000114 fsbpstatsaved put_copy_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. return ext_entry put_end stream_io set_support put_field NO EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. plio2_data_$fsbpstat plio2_data_$pspstat sysprint sysprint.fsb LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000027 31 000046 32 000052 33 000054 34 000056 36 000061 37 000070 45 000072 46 000076 49 000101 51 000104 52 000123 56 000124 59 000127 61 000132 62 000134 65 000135 66 000145 67 000152 69 000154 70 000157 72 000205 74 000210 76 000224 78 000225 79 000227 80 000244 ----------------------------------------------------------- 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