COMPILATION LISTING OF SEGMENT set_system_search_rules Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1732.9 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 set_system_search_rules: proc; 12 13 /* set_system_search_rules - set default search rules and define search rule keywords. 14* 15* Usage: set_system_search_rules path 16* 17* The file path contains lines defining search rules. 18* Each line has a search spec followed by one or more tags separated by commas. 19* 20* The search spec may be: 21* . an absolute pathname 22* . initiated_segments 23* . referencing_dir 24* . working_dir 25* . process_dir 26* . home_dir 27* 28* The tags are up to 32 characters long. They define keywords which user processes specify to refer to 29* groups of directories. Thus if the user process specifies the single rule "default", 30* all rules tagged with "default" will be inserted in the search spec. 31* Recursion is forbidden. 32* 33* To duplicate the system default default rules use a file like this: 34* 35* initiated_segments, default 36* referencing_dir, default 37* working_dir, default 38* >system_library_standard, default, system_libraries 39* >system_library_unbundled, default, system_libraries 40* >system_library_1, default, system_libraries 41* >system_library_tools, default, system_libraries 42* 43* Written by THVV 7/76 */ 44 /* Modified by S.E. Barr 1/77 to correct search rule structure; allow blank lines and comments without commas. */ 45 46 xsp = addr (temp); /* Initialization. Find input structure for hardcore */ 47 unspec (temp) = "0"b; 48 dft_sr_arg.ntags = 0; 49 dft_sr_arg.nrules = 0; 50 call cu_$arg_ptr (1, ap, al, ec); /* Argument is path name */ 51 if ec ^= 0 then do; 52 call com_err_ (ec, "set_system_search_rules", "Usage: set_system_search_rules path"); 53 return; 54 end; 55 call expand_path_ (ap, al, addr (dn), addr (en), ec); 56 if ec ^= 0 then do; 57 call com_err_ (ec, "set_system_search_rules", "^a", bchr); 58 return; 59 end; 60 call hcs_$initiate_count (dn, en, "", bitc, 1, segp, ec); 61 if segp = null then do; 62 call com_err_ (ec, "set_system_search_rules", "^a>^a", dn, en); 63 return; 64 end; 65 66 k = 1; /* K points at beginning of current line */ 67 N = divide (bitc, 9, 24, 0); 68 do while (k <= N); /* Do one line at a time */ 69 j = index (substr (bcs, k), NL); /* Find end of line */ 70 if j = 0 then k = N+1; /* Force end of loop */ 71 else do; 72 if substr (bcs, k, 1) = "*" then; /* Comment if star in col 1 */ 73 else do; 74 m = index (substr (bcs, k, j), ","); /* Separate dir name from tags */ 75 if m = 0 then call com_err_ (0, "set_system_search_rules", "No comma, line ignored: ^a", substr (bcs, k, j)); 76 else do; 77 mm = verify (substr (bcs, k, m-1), WHITE_SPACE) -1; /* Press off leading blanks */ 78 rule = substr (bcs, k+mm, m-1-mm); 79 if rule = "" then; /* Skip blank lines */ 80 else if substr (rule, 1, 1) = ">" /* Check rule validity */ 81 | rule = "initiated_segments" 82 | rule = "referencing_dir" 83 | rule = "process_dir" 84 | rule = "home_dir" 85 | rule = "working_dir" then do; 86 dft_sr_arg.nrules = dft_sr_arg.nrules + 1; /* Make room for rule */ 87 if dft_sr_arg.nrules > hbound (dft_sr_arg.rules, 1) then do; 88 call com_err_ (0, "set_system_search_rules", "too many rules: ^a", rule); 89 return; 90 end; 91 dft_sr_arg.rules (dft_sr_arg.nrules).name = rule; /* Store it */ 92 do while (substr (bcs, k+m, j-m) ^= ""); 93 kk = index (substr (bcs, k+m, j-m), ","); /* Find end of tag */ 94 if kk = 0 then kk = j-m; 95 mm = verify (substr (bcs, k+m, kk-1), " ") - 1; 96 tag = substr (bcs, k+m+mm, kk-1-mm); 97 do bitx = 1 to dft_sr_arg.ntags while (dft_sr_arg.tags (bitx).name ^= tag); end; 98 if bitx > dft_sr_arg.ntags then do; /* New tag */ 99 dft_sr_arg.ntags = bitx; 100 if dft_sr_arg.ntags > hbound (dft_sr_arg.tags, 1) then do; 101 call com_err_ (0, "set_system_search_rules", 102 "Too many tags: ^a in rule ^a", tag, rule); 103 return; 104 end; 105 dft_sr_arg.tags (bitx).name = tag; 106 substr (dft_sr_arg.tags (bitx).flag, bitx, 1) = "1"b; 107 if tag = "default" then default_found = "1"b; 108 end; 109 substr (dft_sr_arg.rules (dft_sr_arg.nrules).flag, bitx, 1) = "1"b; 110 m = m+kk; /* Step over tag and comma */ 111 end; 112 end; 113 else do; /* Bad rule */ 114 call com_err_ (0, "set_system_search_rules", "Illegal rule ^a", rule); 115 return; 116 end; 117 end; 118 end; 119 end; 120 k = k + j; /* Step over line and NL */ 121 end; 122 123 call hcs_$terminate_noname (segp, ec); /* Done with input */ 124 125 if ^default_found then do; /* System dont work right without a default */ 126 call com_err_ (0, "set_system_search_rules", "No rules tagged ""default"" found in ^a>^a", 127 dn, en); 128 return; 129 end; 130 131 call initializer_gate_$set_sr (addr (temp), ec); /* Crunch */ 132 if ec ^= 0 then call com_err_ (ec, "set_system_search_rules", ""); 133 return; /* All done */ 134 135 dcl ec fixed bin (35); 136 dcl (i, j, k, N, kk, mm, m) fixed bin; 137 dcl segp ptr; 138 dcl bcs char (N) aligned based (segp); 139 dcl rule char (168); 140 dcl tag char (32); 141 dcl ap ptr, al fixed bin, bchr char (al) based (ap); 142 dcl default_found bit (1) init ("0"b); 143 dcl NL char (1) static options (constant) init (" 144 "); 145 dcl WHITE_SPACE char (2) int static options (constant) init (" "); /* tab blank */ 146 dcl bitx fixed bin; 147 dcl bitc fixed bin (24); 148 dcl dn char (168); 149 dcl en char (32); 150 151 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)); 152 dcl hcs_$initiate_count entry (char (*), char (*), char (*), fixed bin (24), fixed bin (2), 153 ptr, fixed bin (35)); 154 dcl expand_path_ entry (ptr, fixed bin, ptr, ptr, fixed bin (35)); 155 dcl hcs_$terminate_noname entry (ptr, fixed bin (35)); 156 dcl com_err_ entry options (variable); 157 dcl initializer_gate_$set_sr entry (ptr, fixed bin (35)); 158 159 dcl null builtin; 160 161 dcl 1 temp aligned like dft_sr_arg; 162 1 1 /* BEGIN INCLUDE FILE ... system_dft_sr.incl.pl1 */ 1 2 1 3 dcl xsp ptr; 1 4 dcl 1 dft_sr_arg based (xsp) aligned, 1 5 2 ntags fixed bin, 1 6 2 nrules fixed bin, 1 7 2 tags (10), 1 8 3 name char (32), 1 9 3 flag bit (36), 1 10 2 rules (50), 1 11 3 name char (168), 1 12 3 flag bit (36); 1 13 1 14 /* END INCLUDE FILE ... system_dft_sr.incl.pl1 */ 163 164 165 end set_system_search_rules; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1518.5 set_system_search_rules.pl1 >dumps>old>recomp>set_system_search_rules.pl1 163 1 03/10/77 1345.4 system_dft_sr.incl.pl1 >ldd>include>system_dft_sr.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. N 000103 automatic fixed bin(17,0) dcl 136 set ref 67* 68 69 70 72 74 75 75 77 78 92 93 95 96 NL constant char(1) initial unaligned dcl 143 ref 69 WHITE_SPACE constant char(2) initial unaligned dcl 145 ref 77 al 000176 automatic fixed bin(17,0) dcl 141 set ref 50* 55* 57 57 ap 000174 automatic pointer dcl 141 set ref 50* 55* 57 bchr based char unaligned dcl 141 set ref 57* bcs based char dcl 138 ref 69 72 74 75 75 77 78 92 93 95 96 bitc 000201 automatic fixed bin(24,0) dcl 147 set ref 60* 67 bitx 000200 automatic fixed bin(17,0) dcl 146 set ref 97* 97* 98 99 105 106 106 109 com_err_ 000020 constant entry external dcl 156 ref 52 57 62 75 88 101 114 126 132 cu_$arg_ptr 000010 constant entry external dcl 151 ref 50 default_found 000177 automatic bit(1) initial unaligned dcl 142 set ref 107* 125 142* dft_sr_arg based structure level 1 dcl 1-4 dn 000202 automatic char(168) unaligned dcl 148 set ref 55 55 60* 62* 126* ec 000100 automatic fixed bin(35,0) dcl 135 set ref 50* 51 52* 55* 56 57* 60* 62* 123* 131* 132 132* en 000254 automatic char(32) unaligned dcl 149 set ref 55 55 60* 62* 126* expand_path_ 000014 constant entry external dcl 154 ref 55 flag 12 based bit(36) array level 3 in structure "dft_sr_arg" dcl 1-4 in procedure "set_system_search_rules" set ref 106* flag 206 based bit(36) array level 3 in structure "dft_sr_arg" dcl 1-4 in procedure "set_system_search_rules" set ref 109* hcs_$initiate_count 000012 constant entry external dcl 152 ref 60 hcs_$terminate_noname 000016 constant entry external dcl 155 ref 123 initializer_gate_$set_sr 000022 constant entry external dcl 157 ref 131 j 000101 automatic fixed bin(17,0) dcl 136 set ref 69* 70 74 75 75 92 93 94 120 k 000102 automatic fixed bin(17,0) dcl 136 set ref 66* 68 69 70* 72 74 75 75 77 78 92 93 95 96 120* 120 kk 000104 automatic fixed bin(17,0) dcl 136 set ref 93* 94 94* 95 96 110 m 000106 automatic fixed bin(17,0) dcl 136 set ref 74* 75 77 78 92 92 93 93 94 95 96 110* 110 mm 000105 automatic fixed bin(17,0) dcl 136 set ref 77* 78 78 95* 96 96 name 2 based char(32) array level 3 in structure "dft_sr_arg" dcl 1-4 in procedure "set_system_search_rules" set ref 97 105* name 134 based char(168) array level 3 in structure "dft_sr_arg" dcl 1-4 in procedure "set_system_search_rules" set ref 91* nrules 1 based fixed bin(17,0) level 2 dcl 1-4 set ref 49* 86* 86 87 91 109 ntags based fixed bin(17,0) level 2 dcl 1-4 set ref 48* 97 98 99* 100 null builtin function dcl 159 ref 61 rule 000112 automatic char(168) unaligned dcl 139 set ref 78* 79 80 80 80 80 80 80 88* 91 101* 114* rules 134 based structure array level 2 dcl 1-4 set ref 87 segp 000110 automatic pointer dcl 137 set ref 60* 61 69 72 74 75 75 77 78 92 93 95 96 123* tag 000164 automatic char(32) unaligned dcl 140 set ref 96* 97 101* 105 107 tags 2 based structure array level 2 dcl 1-4 set ref 100 temp 000264 automatic structure level 1 dcl 161 set ref 46 47* 131 131 xsp 004566 automatic pointer dcl 1-3 set ref 46* 48 49 86 86 87 87 91 91 97 97 98 99 100 100 105 106 109 109 NAME DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. i automatic fixed bin(17,0) dcl 136 NAME DECLARED BY EXPLICIT CONTEXT. set_system_search_rules 000132 constant entry external dcl 11 NAMES DECLARED BY CONTEXT OR IMPLICATION. addr builtin function ref 46 55 55 55 55 131 131 divide builtin function ref 67 hbound builtin function ref 87 100 index builtin function ref 69 74 93 substr builtin function set ref 69 72 74 75 75 77 78 80 92 93 95 96 106* 109* unspec builtin function ref 47 verify builtin function ref 77 95 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1620 1644 1512 1630 Length 2044 1512 24 164 105 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME set_system_search_rules 2512 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME set_system_search_rules 000100 ec set_system_search_rules 000101 j set_system_search_rules 000102 k set_system_search_rules 000103 N set_system_search_rules 000104 kk set_system_search_rules 000105 mm set_system_search_rules 000106 m set_system_search_rules 000110 segp set_system_search_rules 000112 rule set_system_search_rules 000164 tag set_system_search_rules 000174 ap set_system_search_rules 000176 al set_system_search_rules 000177 default_found set_system_search_rules 000200 bitx set_system_search_rules 000201 bitc set_system_search_rules 000202 dn set_system_search_rules 000254 en set_system_search_rules 000264 temp set_system_search_rules 004566 xsp set_system_search_rules THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs call_ext_out_desc call_ext_out return shorten_stack ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_ptr expand_path_ hcs_$initiate_count hcs_$terminate_noname initializer_gate_$set_sr NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000131 142 000137 46 000140 47 000142 48 000146 49 000147 50 000150 51 000166 52 000170 53 000222 55 000223 56 000246 57 000250 58 000310 60 000311 61 000354 62 000360 63 000421 66 000422 67 000424 68 000427 69 000432 70 000451 72 000456 74 000463 75 000474 76 000544 77 000545 78 000560 79 000571 80 000576 86 000626 87 000630 88 000633 89 000675 91 000676 92 000703 93 000717 94 000730 95 000734 96 000750 97 000761 97 000777 98 001001 99 001004 100 001005 101 001007 103 001052 105 001053 106 001061 107 001074 109 001102 110 001115 111 001117 112 001120 114 001121 115 001161 120 001162 121 001164 123 001165 125 001176 126 001200 128 001243 131 001244 132 001257 133 001310 ----------------------------------------------------------- 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