COMPILATION LISTING OF SEGMENT ted_ax_ Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/23/82 1458.6 mst Tue Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* *********************************************************** */ 6 /**** format: ind3,ll80,initcol6,indattr,^inddcls,dclind4,idind16 */ 7 /**** format: struclvlind2,^ifthenstmt,^ifthendo,^ifthen,^indnoniterdo */ 8 /**** format: ^inditerdo,^indnoniterend,^indthenelse,case,^indproc,^indend */ 9 /**** format: ^delnl,^insnl,comcol41,^indcom,^indblkcom,linecom,^indcomtxt */ 10 11 ted_ax_: /* append w/speedtype expansion */ 12 proc (ted_support_p, msg, code); 13 14 dcl msg char (168) var, 15 code fixed bin (35); 16 17 if (inp.de > 0) 18 then do; /* something already in buffer */ 19 i = inp.se - inp.sb + 1; 20 substr (ostr, out.de + 1, i) = substr (istr, inp.sb, i); 21 inp.sb = inp.sb + i; /* adjust for doing append */ 22 out.de = out.de + i; 23 call checkpoint (inp.sb, out.de); 24 end; 25 goto start; 26 27 ted_ix_: /* insert w/speedtype expansion */ 28 entry (ted_support_p, msg, code); 29 30 if (inp.de = 0) 31 then do; 32 empty: 33 msg = "Abe) Buffer empty."; 34 code = tederror_table_$Error_Msg; 35 return; 36 end; 37 inp.se = inp.sb; 38 goto start; 39 40 ted_cx_: /* change w/speedtype expansion */ 41 entry (ted_support_p, msg, code); 42 43 if (inp.de = 0) 44 then goto empty; 45 inp.sb = inp.se + 1; /* delete range specified */ 46 call checkpoint (inp.sb, out.de); 47 48 start: 49 if (ted_support_version_2 ^= ted_support.version) 50 then do; 51 code = error_table_$unimplemented_version; 52 return; 53 end; 54 loop: 55 call iox_$get_line (iox_$user_input, /* get a line of input */ 56 addr (buffer), length (buffer), i, code); 57 if (i = 1) 58 then do; /* if empty, can't do much to it */ 59 substr (ostr, out.de + 1, 1) = substr (buffer, 1, 1); 60 out.de = out.de + 1; 61 end; 62 else do; /* look for trailing controls */ 63 if (substr (buffer, 1, i - 1) = "\F") 64 | (substr (buffer, 1, i - 1) = "\f") 65 then goto finish; 66 67 if (substr (buffer, 1, i - 1) = "\?") 68 then do; 69 call ioa_ ("*INPUT MODE - speedtype"); 70 goto loop; 71 end; 72 73 call speedtype_expand_ (addr (buffer), i, addr (ochr (out.de + 1)), 74 out.ml - out.de, j, code); 75 out.de = out.de + j; 76 end; 77 call checkpoint (inp.sb, out.de); 78 goto loop; 79 80 finish: 81 current = out.de; /* tell ted where "." is */ 82 if (inp.de > 0) 83 then do; /* there is more data in buffer */ 84 i = inp.de - inp.sb + 1; /* ..copy it to output */ 85 substr (ostr, out.de + 1, i) = substr (istr, inp.sb, i); 86 out.de = out.de + i; 87 inp.se = inp.de + 1; /* we have already copied */ 88 end; 89 req.nc = req.cc; /* let rest of req line be used */ 90 code = tederror_table_$Copy_Set; 1 1 /* BEGIN INCLUDE FILE ..... ted_support.incl.pl1 ..... 03/16/81 */ 1 2 1 3 /* more information may be found in ted_support.gi.info */ 1 4 1 5 dcl ted_support_p ptr; 1 6 dcl ted_support_version_2 fixed bin int static init(2); 1 7 dcl 1 ted_support based(ted_support_p), 1 8 2 version fixed bin, /* 1 */ 1 9 2 addr_ct fixed bin, /* number of addresses given: 0,1,2 (IN) */ 1 10 2 checkpoint entry ( /* routine to update "safe" status (IN) */ 1 11 fixed bin(21), /* amount of input used up */ 1 12 fixed bin(21)), /* amount of output used up */ 1 13 1 14 2 inp, /***** input string parameters */ 1 15 /* The input data may NOT be modified. */ 1 16 3 pt ptr, /* pointer to base of data string (IN) */ 1 17 3 sb fixed bin(21), /* index of addressed string begin (IN) */ 1 18 3 lno fixed bin(21), /* linenumber in data string of sb (IN) */ 1 19 3 se fixed bin(21), /* index of addressed string end (IN/OUT) */ 1 20 3 de fixed bin(21), /* index of data end (IN) */ 1 21 1 22 2 out, /***** output string parameters */ 1 23 3 pt ptr, /* pointer to base of output string (IN) */ 1 24 3 de fixed bin(21), /* index of data end (already copied) (IN/OUT) */ 1 25 3 ml fixed bin(21), /* max length of output string (IN) */ 1 26 1 27 2 req, /***** request string parameters */ 1 28 3 pt ptr, /* pointer to base of request string (IN) */ 1 29 3 cc fixed bin(21), /* index of current character (IN) */ 1 30 3 nc fixed bin(21), /* index of next character (IN/OUT) */ 1 31 3 de fixed bin(21), /* index of data end (IN/OUT) */ 1 32 3 ml fixed bin(21), /* max length of requsest buffer (IN) */ 1 33 1 34 /* req.nc is initialized to req.de, i.e. request line used-up. A routine */ 1 35 /* can set req.nc to 1, put some data into req and set req.de */ 1 36 /* appropriately. The data will be the next ted requests executed after */ 1 37 /* the routine returns. */ 1 38 1 39 /* Or if req.nc is set equal to req.cc then the rest of the request line */ 1 40 /* will be executed after return. */ 1 41 1 42 2 string_mode bit(1), /* 0- line mode, 1- string mode (IN) */ 1 43 2 current fixed bin(21), /* current location (IN/OUT) */ 1 44 /* current is initialized to "undefined" */ 1 45 2 get_req entry (), /* fill the request string with the next line */ 1 46 /* from ted's input stream. req.de will be */ 1 47 /* updated to reflect the new length. */ 1 48 /* req.cc and req.nc are not changed. */ 1 49 2 proc_expr entry /* process the expression for global execution */ 1 50 (ptr, /* -> ted_support structure [IN] */ 1 51 char (168) var, /* message text [OUT] */ 1 52 fixed bin (35)), /* completion code [OUT] */ 1 53 2 do_global entry /* globally execute some action */ 1 54 (entry (), /* worker procedure [IN] */ 1 55 char (1), /* which action, "g" or "v" [IN] */ 1 56 ptr, /* -> ted_support structure [IN] */ 1 57 char (168) var, /* message text [OUT] */ 1 58 fixed bin (35)), /* completion code [OUT] */ 1 59 2 reg_exp_p ptr, /* -> the remembered regular expression area */ 1 60 2 bcb_p ptr; /* -> buffer control block */ 1 61 /* _________________________________________________________________________ */ 1 62 /* ENTRY CONDITIONS */ 1 63 /* _________________________________________________________________________ */ 1 64 /* Upon entering, three substructures describe the environment in which the */ 1 65 /* request is to operate. (Refer to the INPUT diagram) Note that the */ 1 66 /* "normal" operational steps are: */ 1 67 /* 1) ted copies the string from 1:inp.sb-1 to the output string */ 1 68 /* 2) ted_xyz_ takes care of the data from inp.sb:inp.se */ 1 69 /* 3) ted copies the string from inp.se+1:inp.de to the output string */ 1 70 /* The following 3 diagrams represent conditions upon entering ted_xyz_: */ 1 71 /* _________________________________________________________________________ */ 1 72 /* inp.pt (\ represents NL) */ 1 73 /* | */ 1 74 /* [INPUT] now is\the time\for all\good men\to come.\..... */ 1 75 /* | | | */ 1 76 /* inp.sb inp.se inp.de */ 1 77 /* _________________________________________________________________________ */ 1 78 /* out.pt (\ represents NL) */ 1 79 /* | */ 1 80 /* [OUTPUT] ? now is\........................................ */ 1 81 /* | | | */ 1 82 /* current out.de out.ml */ 1 83 /* _________________________________________________________________________ */ 1 84 /* req.pt (\ represents NL) */ 1 85 /* | */ 1 86 /* [REQUEST] x 2,3|req /farfle/ 1,$P\....................... */ 1 87 /* | | | */ 1 88 /* req.cc req.de req.ml */ 1 89 /* req.nc */ 1 90 1 91 /* _________________________________________________________________________ */ 1 92 /* EXIT CONDITIONS */ 1 93 /* _________________________________________________________________________ */ 1 94 /* Assume a request replaces the addressed lines with the string following */ 1 95 /* it, (in this case "farfle") and leaves "." at the beginning of the range. */ 1 96 /* out.pt (\ represents NL) */ 1 97 /* | */ 1 98 /* [OUTPUT] now is\farfle\farfle\.......................... */ 1 99 /* | | | */ 1 100 /* current out.de out.ml */ 1 101 /* _________________________________________________________________________ */ 1 102 /* 1) If the data after the string are to be treated as more ted requests, */ 1 103 /* the request data would be left like this. */ 1 104 /* req.pt (\ represents NL) */ 1 105 /* | */ 1 106 /* [REQUEST] x 2,3|req /farfle/ 1,$P\....................... */ 1 107 /* | | | */ 1 108 /* req.nc req.de req.ml */ 1 109 /* _________________________________________________________________________ */ 1 110 /* 2) If the request is going to return a string to be executed, the request */ 1 111 /* data (and buffer) would be left like this: */ 1 112 /* req.pt (\ represents NL) */ 1 113 /* | */ 1 114 /* [REQUEST] -1,.1p w\ /farfle/ 1,$P\....................... */ 1 115 /* | | | */ 1 116 /* req.nc req.de req.ml */ 1 117 1 118 /* These return codes are expected */ 1 119 dcl (tederror_table_$Copy_Set,/* copy rest of input to output, */ 1 120 /* and set "." from current */ 1 121 /* "rest of input" is the string which begins */ 1 122 /* at char inp.se+1 and extends to inp.de. */ 1 123 /* If the input has all been processed, then */ 1 124 /* inp.se should be set to inp.de+1. */ 1 125 tederror_table_$NoChange,/* dont copy, dont set current */ 1 126 tederror_table_$Set, /* dont copy, just set current */ 1 127 /* (in input buffer) */ 1 128 tederror_table_$Error_Msg,/* msg is being returned. */ 1 129 /* no copy or set is done */ 1 130 tederror_table_$No_Delim1,/* missing 1st delimiter */ 1 131 tederror_table_$No_Delim2,/* missing 2nd delimiter */ 1 132 tederror_table_$No_Delim3)/* missing 3nd delimiter */ 1 133 fixed bin(35)ext static; 1 134 dcl error_table_$unimplemented_version fixed bin(35) ext static; 1 135 1 136 dcl istr char(inp.de) based(inp.pt); /* the input string */ 1 137 dcl ichr(inp.de) char(1) based(inp.pt); 1 138 dcl ostr char(out.ml) based(out.pt); /* the output string */ 1 139 dcl ochr(out.ml) char(1) based(out.pt); 1 140 dcl rstr char(req.ml) based(req.pt); /* the request string */ 1 141 dcl rchr(req.ml) char(1) based(req.pt); 1 142 1 143 /* These declarations are used if the expression search is needed by the */ 1 144 /* request. There are 2 parts to getting an expression search done: */ 1 145 /* 1) compiling 2) searching */ 1 146 /* If a function uses the remembered expression, it does this: */ 1 147 /* call tedsrch_$search (ted_support.reg_exp_p, */ 1 148 /* ted_support.bcbp, string_begin, string_end, match_begin, */ 1 149 /* match_end, search_end, msg, code); */ 1 150 1 151 /* If a function utilizes an expression the user supplies, it must first be */ 1 152 /* compiled: 1 153*/* if (expression_length > 0) */ 1 154 /* then call tedsrch_$compile (addr (ichr (expression_begin)), */ 1 155 /* expression_length, ted_support.reg_exp_p, */ 1 156 /* ted_support.string_mode, ""b, msg, code); */ 1 157 /* This results in the remembered expression being changed to the one just */ 1 158 /* compiled. */ 1 159 1 160 /* If a function wishes to utilize a function without it being remembered */ 1 161 /* by ted, it may declare an area of its own and compile into it. It first */ 1 162 /* must be initialized: */ 1 163 /* dcl expr_area (200) bit (36); */ 1 164 /* call tedsrch_$init_exp (addr (expr_area), size (expr_area)); */ 2 1 /* BEGIN INCLUDE FILE ..... tedsrch_.incl.pl1 ..... 10/21/82 J Falksen */ 2 2 2 3 dcl tedsrch_$init_exp entry ( /* initialize an expression area */ 2 4 ptr, /* -> compiled expression area [IN] */ 2 5 fixed bin (21)); /* length of area in words */ 2 6 2 7 dcl tedsrch_$compile entry ( /* compile a regular expression */ 2 8 ptr, /* -> regular expression to search */ 2 9 fixed bin (21), /* length thereof */ 2 10 ptr, /* -> compiled expression area [IN] */ 2 11 bit (1)aligned, /* 0- line mode 1- string mode */ 2 12 bit (1)aligned, /* 0- reg expr 1- literal expr */ 2 13 char (168) var, /* error message [OUT] */ 2 14 fixed bin (35) /* error status code [OUT] */ 2 15 ); 2 16 2 17 dcl tedsrch_$search entry ( /* search for expression */ 2 18 ptr, /* -> compiled expression */ 2 19 ptr, /* -> buffer ctl block for file */ 2 20 fixed bin (21), /* beginning of string to search */ 2 21 fixed bin (21), /* end of string to search */ 2 22 fixed bin (21), /* beginning of match */ 2 23 fixed bin (21), /* end of match */ 2 24 fixed bin (21), /* end of string used for match */ 2 25 char (168)var, /* error message return [OUT] */ 2 26 fixed bin (35) /* error status code [OUT] */ 2 27 ); 2 28 2 29 2 30 /* END INCLUDE FILE ..... tedsrch_.incl.pl1 ..... */ 1 165 1 166 1 167 /* END INCLUDE FILE ..... ted_support.incl.pl1 ..... */ 91 92 dcl (i, j) fixed bin (21); 93 dcl iox_$user_input ptr ext static; 94 dcl iox_$get_line entry (ptr, ptr, fixed bin (21), fixed bin (21), 95 fixed bin (35)); 96 dcl ioa_ entry options (variable); 97 dcl speedtype_expand_ entry (ptr, fixed bin (21), ptr, fixed bin (21), 98 fixed bin (21), fixed bin (35)); 99 dcl buffer char (500); 100 101 end ted_ax_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/23/82 1458.1 ted_ax_.pl1 >spec>on>ted_fix>ted_ax_.pl1 91 1 11/23/82 1324.6 ted_support.incl.pl1 >ldd>include>ted_support.incl.pl1 1-165 2 11/23/82 1324.7 tedsrch_.incl.pl1 >ldd>include>tedsrch_.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. buffer 000102 automatic char(500) unaligned dcl 99 set ref 54 54 54 54 59 63 63 67 73 73 cc 22 based fixed bin(21,0) level 3 dcl 1-7 ref 89 checkpoint 2 based entry variable level 2 dcl 1-7 ref 23 46 77 code parameter fixed bin(35,0) dcl 14 set ref 11 27 34* 40 51* 54* 73* 90* current 27 based fixed bin(21,0) level 2 dcl 1-7 set ref 80* de 13 based fixed bin(21,0) level 3 in structure "ted_support" dcl 1-7 in procedure "ted_ax_" ref 17 20 30 43 82 84 85 87 de 16 based fixed bin(21,0) level 3 in structure "ted_support" dcl 1-7 in procedure "ted_ax_" set ref 20 22* 22 23* 46* 59 60* 60 73 73 73 75* 75 77* 80 85 86* 86 error_table_$unimplemented_version 000014 external static fixed bin(35,0) dcl 1-134 ref 51 i 000100 automatic fixed bin(21,0) dcl 92 set ref 19* 20 20 21 22 54* 57 63 63 67 73* 84* 85 85 86 inp 6 based structure level 2 unaligned dcl 1-7 ioa_ 000022 constant entry external dcl 96 ref 69 iox_$get_line 000020 constant entry external dcl 94 ref 54 iox_$user_input 000016 external static pointer dcl 93 set ref 54* istr based char unaligned dcl 1-136 ref 20 85 j 000101 automatic fixed bin(21,0) dcl 92 set ref 73* 75 ml 17 based fixed bin(21,0) level 3 dcl 1-7 ref 20 59 73 85 msg parameter varying char(168) dcl 14 set ref 11 27 32* 40 nc 23 based fixed bin(21,0) level 3 dcl 1-7 set ref 89* ochr based char(1) array unaligned dcl 1-139 set ref 73 73 ostr based char unaligned dcl 1-138 set ref 20* 59* 85* out 14 based structure level 2 unaligned dcl 1-7 pt 14 based pointer level 3 in structure "ted_support" dcl 1-7 in procedure "ted_ax_" ref 20 59 73 73 85 pt 6 based pointer level 3 in structure "ted_support" dcl 1-7 in procedure "ted_ax_" ref 20 85 req 20 based structure level 2 unaligned dcl 1-7 sb 10 based fixed bin(21,0) level 3 dcl 1-7 set ref 19 20 21* 21 23* 37 45* 46* 77* 84 85 se 12 based fixed bin(21,0) level 3 dcl 1-7 set ref 19 37* 45 87* speedtype_expand_ 000024 constant entry external dcl 97 ref 73 ted_support based structure level 1 unaligned dcl 1-7 ted_support_p parameter pointer dcl 1-5 ref 11 17 19 19 20 20 20 20 20 20 21 21 22 22 23 23 23 27 30 37 37 40 43 45 45 46 46 46 48 59 59 59 60 60 73 73 73 73 73 73 75 75 77 77 77 80 80 82 84 84 85 85 85 85 85 85 86 86 87 87 89 89 ted_support_version_2 constant fixed bin(17,0) initial dcl 1-6 ref 48 tederror_table_$Copy_Set 000010 external static fixed bin(35,0) dcl 1-119 ref 90 tederror_table_$Error_Msg 000012 external static fixed bin(35,0) dcl 1-119 ref 34 version based fixed bin(17,0) level 2 dcl 1-7 ref 48 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. ichr based char(1) array unaligned dcl 1-137 rchr based char(1) array unaligned dcl 1-141 rstr based char unaligned dcl 1-140 tederror_table_$NoChange external static fixed bin(35,0) dcl 1-119 tederror_table_$No_Delim1 external static fixed bin(35,0) dcl 1-119 tederror_table_$No_Delim2 external static fixed bin(35,0) dcl 1-119 tederror_table_$No_Delim3 external static fixed bin(35,0) dcl 1-119 tederror_table_$Set external static fixed bin(35,0) dcl 1-119 tedsrch_$compile 000000 constant entry external dcl 2-7 tedsrch_$init_exp 000000 constant entry external dcl 2-3 tedsrch_$search 000000 constant entry external dcl 2-17 NAMES DECLARED BY EXPLICIT CONTEXT. empty 000103 constant label dcl 32 set ref 43 finish 000332 constant label dcl 80 ref 63 loop 000161 constant label dcl 54 ref 70 78 start 000150 constant label dcl 48 ref 25 38 ted_ax_ 000023 constant entry external dcl 11 ted_cx_ 000123 constant entry external dcl 40 ted_ix_ 000071 constant entry external dcl 27 NAMES DECLARED BY CONTEXT OR IMPLICATION. addr builtin function ref 54 54 73 73 73 73 length builtin function ref 54 54 substr builtin function set ref 20 20 59* 59 63 63 67 85* 85 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 522 550 375 532 Length 754 375 26 167 125 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME ted_ax_ 230 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME ted_ax_ 000100 i ted_ax_ 000101 j ted_ax_ 000102 buffer ted_ax_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_var call_ext_out_desc call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. ioa_ iox_$get_line speedtype_expand_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$unimplemented_version iox_$user_input tederror_table_$Copy_Set tederror_table_$Error_Msg LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000017 17 000030 19 000035 20 000041 21 000053 22 000055 23 000056 25 000066 27 000067 30 000076 32 000103 34 000112 35 000115 37 000116 38 000120 40 000121 43 000130 45 000135 46 000140 48 000150 51 000155 52 000160 54 000161 57 000205 59 000210 60 000220 61 000221 63 000222 67 000234 69 000240 70 000254 73 000255 75 000312 77 000317 78 000331 80 000332 82 000337 84 000341 85 000344 86 000356 87 000360 89 000363 90 000365 101 000371 ----------------------------------------------------------- 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