/* BEGIN INCLUDE FILE ..... ted_support.incl.pl1 ..... 03/16/81 */ /* more information may be found in ted_support.gi.info */ dcl ted_support_p ptr; dcl ted_support_version_2 fixed bin int static init(2); dcl 1 ted_support based(ted_support_p), 2 version fixed bin, /* 1 */ 2 addr_ct fixed bin, /* number of addresses given: 0,1,2 (IN) */ 2 checkpoint entry ( /* routine to update "safe" status (IN) */ fixed bin(21), /* amount of input used up */ fixed bin(21)), /* amount of output used up */ 2 inp, /***** input string parameters */ /* The input data may NOT be modified. */ 3 pt ptr, /* pointer to base of data string (IN) */ 3 sb fixed bin(21), /* index of addressed string begin (IN) */ 3 lno fixed bin(21), /* linenumber in data string of sb (IN) */ 3 se fixed bin(21), /* index of addressed string end (IN/OUT) */ 3 de fixed bin(21), /* index of data end (IN) */ 2 out, /***** output string parameters */ 3 pt ptr, /* pointer to base of output string (IN) */ 3 de fixed bin(21), /* index of data end (already copied) (IN/OUT) */ 3 ml fixed bin(21), /* max length of output string (IN) */ 2 req, /***** request string parameters */ 3 pt ptr, /* pointer to base of request string (IN) */ 3 cc fixed bin(21), /* index of current character (IN) */ 3 nc fixed bin(21), /* index of next character (IN/OUT) */ 3 de fixed bin(21), /* index of data end (IN/OUT) */ 3 ml fixed bin(21), /* max length of requsest buffer (IN) */ /* req.nc is initialized to req.de, i.e. request line used-up. A routine */ /* can set req.nc to 1, put some data into req and set req.de */ /* appropriately. The data will be the next ted requests executed after */ /* the routine returns. */ /* Or if req.nc is set equal to req.cc then the rest of the request line */ /* will be executed after return. */ 2 string_mode bit(1), /* 0- line mode, 1- string mode (IN) */ 2 current fixed bin(21), /* current location (IN/OUT) */ /* current is initialized to "undefined" */ 2 get_req entry (), /* fill the request string with the next line */ /* from ted's input stream. req.de will be */ /* updated to reflect the new length. */ /* req.cc and req.nc are not changed. */ 2 proc_expr entry /* process the expression for global execution */ (ptr, /* -> ted_support structure [IN] */ char (168) var, /* message text [OUT] */ fixed bin (35)), /* completion code [OUT] */ 2 do_global entry /* globally execute some action */ (entry (), /* worker procedure [IN] */ char (1), /* which action, "g" or "v" [IN] */ ptr, /* -> ted_support structure [IN] */ char (168) var, /* message text [OUT] */ fixed bin (35)), /* completion code [OUT] */ 2 reg_exp_p ptr, /* -> the remembered regular expression area */ 2 bcb_p ptr; /* -> buffer control block */ /* _________________________________________________________________________ */ /* ENTRY CONDITIONS */ /* _________________________________________________________________________ */ /* Upon entering, three substructures describe the environment in which the */ /* request is to operate. (Refer to the INPUT diagram) Note that the */ /* "normal" operational steps are: */ /* 1) ted copies the string from 1:inp.sb-1 to the output string */ /* 2) ted_xyz_ takes care of the data from inp.sb:inp.se */ /* 3) ted copies the string from inp.se+1:inp.de to the output string */ /* 4) ted sets "." as (possibly) specified by xyz */ /* The following 3 diagrams represent conditions upon entering ted_xyz_: */ /* _________________________________________________________________________ */ /* req.pt (\ represents NL) */ /* | */ /* [REQUEST] x 2,3|req /farfle/ 1,$P\....................... */ /* | | | */ /* req.cc req.de req.ml */ /* req.nc */ /* _________________________________________________________________________ */ /* inp.pt (\ represents NL) */ /* | */ /* [INPUT] now is\the time\for all\good men\to come.\..... */ /* | | | */ /* inp.sb inp.se inp.de */ /* The request may make no modifications to the input string. It may make no */ /* assumptions about its location, i.e. that it occupies a segment all by */ /* itself. */ /* _________________________________________________________________________ */ /* out.pt (\ represents NL) */ /* | */ /* [OUTPUT] ? now is\........................................ */ /* | | | */ /* current out.de out.ml */ /* _________________________________________________________________________ */ /* _________________________________________________________________________ */ /* EXIT CONDITIONS */ /* _________________________________________________________________________ */ /* Assume a request replaces each addressed line with the string following */ /* it, (in this case "farfle") and leaves "." at the beginning of the range. */ /* out.pt (\ represents NL) */ /* | */ /* [OUTPUT] now is\farfle\farfle\.......................... */ /* | | | */ /* current out.de out.ml */ /* _________________________________________________________________________ */ /* 1) If the data after the string are to be treated as more ted requests, */ /* the request data would be left like this. */ /* req.pt (\ represents NL) */ /* | */ /* [REQUEST] x 2,3|req /farfle/ 1,$P\....................... */ /* | | | */ /* req.nc req.de req.ml */ /* _________________________________________________________________________ */ /* 2) If the request is going to return a string to be executed, the request */ /* data (and buffer) would be left like this: */ /* req.pt (\ represents NL) */ /* | */ /* [REQUEST] -1,.1p w\ /farfle/ 1,$P\....................... */ /* | | | */ /* req.nc req.de req.ml */ /* These are special return codes relating to ted: */ dcl (tederror_table_$Copy_Set,/* copy rest of input to output, and set "." */ /* from current. "rest of input" is the */ /* string which begins at char inp.se+1 and */ /* extends to inp.de. If the input has all */ /* been processed, then inp.se should be set */ /* to inp.de+1. */ tederror_table_$NoChange,/* dont copy, dont set current */ tederror_table_$Set, /* dont copy, set current (in input buffer) */ tederror_table_$Error_Msg,/* msg is being returned. */ /* no copy or set is done */ tederror_table_$No_Delim1,/* missing 1st delimiter */ tederror_table_$No_Delim2,/* missing 2nd delimiter */ tederror_table_$No_Delim3)/* missing 3nd delimiter */ fixed bin(35)ext static; /* Any other codes returned must be standard system codes. */ dcl error_table_$unimplemented_version fixed bin(35) ext static; dcl istr char(inp.de) based(inp.pt); /* the input string */ dcl ichr(inp.de) char(1) based(inp.pt); dcl ostr char(out.ml) based(out.pt); /* the output string */ dcl ochr(out.ml) char(1) based(out.pt); dcl rstr char(req.ml) based(req.pt); /* the request string */ dcl rchr(req.ml) char(1) based(req.pt); /* These declarations are used if the expression search is needed by the */ /* request. There are 2 parts to getting an expression search done: */ /* 1) compiling 2) searching */ /* If a function uses the remembered expression, it does this: */ /* call tedsrch_$search (ted_support.reg_exp_p, */ /* ted_support.bcbp, string_begin, string_end, match_begin, */ /* match_end, search_end, msg, code); */ /* If a function utilizes an expression the user supplies, it must first be */ /* compiled: /* if (expression_length > 0) */ /* then call tedsrch_$compile (addr (ichr (expression_begin)), */ /* expression_length, ted_support.reg_exp_p, */ /* ted_support.string_mode, ""b, msg, code); */ /* This results in the remembered expression being changed to the one just */ /* compiled. */ /* If a function wishes to utilize a function without it being remembered */ /* by ted, it may declare an area of its own and compile into it. It first */ /* must be initialized: */ /* dcl expr_area (200) bit (36); */ /* call tedsrch_$init_exp (addr (expr_area), size (expr_area)); */ %include tedsrch_; /* END INCLUDE FILE ..... ted_support.incl.pl1 ..... */ */ ----------------------------------------------------------- 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 */