COMPILATION LISTING OF SEGMENT search_paths_ Compiled by: Multics PL/I Compiler, Release 33e, of October 6, 1992 Compiled at: CGI Compiled on: 2000-04-18_1144.33_Tue_mdt Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1988 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 15 /****^ HISTORY COMMENTS: 16* 1) change(87-11-12,Lippard), approve(87-12-21,MCR7822), 17* audit(88-02-11,Blair), install(88-02-16,MR12.2-1023): 18* Modified to understand linker search paths. 19* 2) change(88-06-16,Blair), approve(88-06-16,MCR7842), 20* audit(88-06-28,Lippard), install(88-07-26,MR12.2-1069): 21* Replace the calls to hcs_$status_minf in find_dir and find_all 22* entry-pts with a call to fs_util_$get_type so we don't run into trouble 23* when looking for extended entry types such as mailboxes that are in 24* directories for which the user has no 's' access. 25* END HISTORY COMMENTS */ 26 27 28 /* Implement the command search facility 29* 30*NOTE: The current implementation will not work if more than one process 31* has access to the search segment. Some locking mechanism must be 32* used to prevent two processes from simultaneously changing the 33* search segment. The mark bits in search_list should probably be 34* removed. 35* 36* Rewritten 16-Aug-78 by Monte Davidoff. 37* 38* Modified 07/21/80 by C. D. Tavares to implement extensible default 39* search paths, to make the process search segment per-ring, to use 40* the search segment for the process' validation level, and to keep 41* from re-initializing the segment if search_paths_ is terminated. */ 42 /* format: style2 */ 43 44 /* 45*N__a_m_e: search_paths_$find_dir 46* 47* The search_paths_$find_dir entry point, given a search list and an 48*entryname, returns the absolute pathname of a directory in which the 49*entryname can be found. The directories in the search list are searched in 50*order for the entryname. 51* 52* 53*U__s_a_g_e: 54* 55* 56* declare search_paths_$find_dir entry (char (*), pointer, char (*), char (*), char (*), fixed binary (35)); 57* 58* call search_paths_$find_dir (sl_name, search_seg_ptr, entryname, ref_path, dir_name, code); 59* 60* 61*where: 62* 63*1. sl_name (Input) 64* is the search list name. 65* 66*2. search_seg_ptr (Input) 67* is a pointer to the search segment. If this pointer is null, then 68* the process search segment is used. 69* 70*3. entryname (Input) 71* is the entryname to search for. 72* 73*4. ref_path (Input) 74* is the directory name used for the "-referencing_dir" search path. 75* If ref_path is null, then the "-referencing_dir" search path is 76* skipped. 77* 78*5. dir_name (Output) 79* is the directory the entryname was found in. 80* 81*6. code (Output) 82* is a standard status code. It may be one of the following: 83* error_table_$no_search_list 84* the search list was not in the search segment. 85* error_table_$noentry 86* the entryname was not found in a directory in the search list. 87**/ 88 89 /* 90*N__a_m_e: search_paths_$find_all 91* 92* The search_paths_$find_all entry point, given a search list and an 93*entryname, returns the absolute pathnames of directories in which the 94*entryname can be found. The directories in the search list are searched in 95*order for the entryname. 96* 97* 98*U__s_a_g_e: 99* 100* 101* declare search_paths_$find_all entry (char (*), pointer, char (*), char (*), pointer, fixed binary, pointer, 102* fixed binary (35)); 103* 104* call search_paths_$find_all (sl_name, search_seg_ptr, entryname, ref_path, sl_info_area_ptr, sl_info_version, 105* sl_info_ptr, code); 106* 107* 108*where: 109* 110*1. sl_name (Input) 111* is the search list name. 112* 113*2. search_seg_ptr (Input) 114* is a pointer to the search segment. If this pointer is null, then 115* the process search segment is used. 116* 117*3. entryname (Input) 118* is the entryname to search for. 119* 120*4. ref_path (Input) 121* is the directory name used for the "-referencing_dir" search path. 122* If ref_path is null, then the "-referencing_dir" search path is 123* skipped. 124* 125*5. sl_info_area_ptr (Input) 126* is a pointer to an area in which sl_info can be allocated. 127* 128*6. sl_info_version (Input) 129* is the version of the sl_info structure required. 130* 131*7. sl_info_ptr (Output) 132* is a pointer to the sl_info structure containing the directories 133* which contain the entryname. (See search_paths_$get). 134* 135*8. code (Output) 136* is a standard status code. It may be one of the following: 137* error_table_$no_search_list 138* the search list was not in the search segment. 139* error_table_$noentry 140* the entryname was not found in a directory in the search list. 141**/ 142 143 /* 144*N__a_m_e: search_paths_$get 145* 146* The search_paths_$get entry point returns the search paths in a search 147*list. 148* 149* 150*U__s_a_g_e: 151* 152* 153* declare search_paths_$get entry (char (*), bit (36), char (*), pointer, pointer, fixed binary, pointer, 154* fixed binary (35)); 155* 156* call search_paths_$get (sl_name, sl_control, ref_path, search_seg_ptr, sl_info_area_ptr, sl_info_version, 157* sl_info_ptr, code); 158* 159* 160*where: 161* 162*1. sl_name (Input) 163* is the search list name. 164* 165*2. sl_control (Input) 166* is an expansion control mask. See the sl_control_s structure in 167* "Notes" below. 168* 169*3. ref_path (Input) 170* is the directory name used for the "-referencing_dir" search path. 171* If ref_path is null, then the "-referencing_dir" search path is 172* skipped. 173* 174*4. search_seg_ptr (Input) 175* is a pointer to the search segment. If this pointer is null, then 176* the process search segment is used. 177* 178*5. sl_info_area_ptr (Input) 179* is a pointer to an area in which sl_info can be allocated. 180* 181*6. sl_info_version (Input) 182* is the version of the sl_info structure required. 183* 184*7. sl_info_ptr (Output) 185* is a pointer to the sl_info structure containing the search paths in 186* the search list. (See "Notes" below). 187* 188*8. code (Output) 189* is a standard status code. It may be the following: 190* error_table_$no_search_list 191* the search list was not in the search segment. 192* 193* 194*N__o_t_e_s 195* 196* The sl_control argument is defined by the sl_control_s structure contained 197*in sl_control_s.incl.pl1. Expanding the "-referencing_dir" keyword substitutes 198*the ref_path argument for the keyword. 199* 200* The sl_info structure is contained in sl_info.incl.pl1. 201* 202*where: 203* 204*1. version 205* is the version of the sl_info structure. 206* 207*2. num_paths 208* is the number of search paths in this structure. 209* 210*3. change_index_p 211* is a pointer to the search lists' update count. The update count 212* is a fixed binary (71) integer, and is incremented each time the 213* search list is modified. The caller can determine if the search 214* list has been modified by comparing change_index in this structure 215* with the value pointed to by change_index_p. 216* 217*4. change_index 218* is the current value of the search lists' update count. 219* 220*5. type 221* specifies the type of the search path. Keywords in sl_info.incl.pl1 222* define the possible values. 223* 224*6. code 225* is a standard status code for this search path. 226* 227*7. pathname 228* is the search path. 229**/ 230 231 /* 232*N__a_m_e: search_paths_$set 233* 234* The search_paths_$set entry point sets the search paths of a search list. 235* 236* 237*U__s_a_g_e: 238* 239* 240* declare search_paths_$set entry (char (*), pointer, pointer, fixed binary (35)); 241* 242* call search_paths_$set (sl_name, search_seg_ptr, sl_info_ptr, code); 243* 244* 245*where: 246* 247*1. sl_name (Input) 248* is the search list name. 249* 250*2. search_seg_ptr (Input) 251* is a pointer to the search segment. If this pointer is null, then 252* the process search segment is used. 253* 254*3. sl_info_ptr (Input) 255* is a pointer to an sl_info structure (see search_paths_$get) 256* containing the search paths for the search list. If null, then the 257* search list is set to its default. 258* 259*4. code (Output) 260* is a standard status code. It may be one of the following: 261* error_table_$action_not_performed 262* the search list was not changed. (See "Notes" below). 263* error_table_$new_search_list 264* a new search list was created. This is only a warning. 265* error_table_$no_search_list_default 266* the search list has no default. 267* error_table_$too_many_sr 268* too many search paths were supplied for the linker search 269* list. 270* 271*N__o_t_e_s 272* 273* If the error_table_$action_not_performed status code is returned, then 274*some search path may be invalid. A non-zero code for a search path in the 275*sl_info structure indicates that the search path was invalid. 276**/ 277 278 /* 279*N__a_m_e: search_paths_$list 280* 281* The search_paths_$list entry point returns a linked list of the search 282*list names that are in a search segment. 283* 284* 285*U__s_a_g_e: 286* 287* 288* declare search_paths_$list entry (pointer, pointer, fixed binary, pointer, fixed binary (35)); 289* 290* call search_paths_$list (search_seg_ptr, sl_list_area_ptr, sl_list_version, sl_list_ptr, code); 291* 292* 293*where: 294* 295*1. search_seg_ptr (Input) 296* is a pointer to the search segment. If this pointer is null, then 297* the process search segment is used. 298* 299*2. sl_list_area_ptr (Input) 300* is a pointer to an area in which a linked list of sl_list structures 301* can be allocated. 302* 303*3. sl_list_version (Input) 304* is the version of the sl_list structure required. 305* 306*4. sl_list_ptr (Output) 307* is a pointer to a linked list of sl_list structures containing the 308* names of the search lists in the search segment. (See "Notes" below). 309* 310*5. code (Output) 311* is a standard status code. 312* 313* 314*N__o_t_e_s 315* 316* The sl_list structure is contained in sl_list.incl.pl1. 317* 318*where: 319* 320*1. version 321* is the version of the sl_list structure. 322* 323*2. link 324* is a pointer to the next sl_list structure in the linked list, or 325* null if this is the last structure in the linked list. 326* 327*3. name_count 328* is the number of synonyms this search list has. 329* 330*4. names 331* is an array of the names of this search list. 332**/ 333 334 /* 335*N__a_m_e: search_paths_$delete_list 336* 337* The search_paths_$delete_list entry point deletes a search list from a 338*search segment. 339* 340* 341*U__s_a_g_e: 342* 343* 344* declare search_paths_$delete_list entry (char (*), pointer, fixed binary (35)); 345* 346* call search_paths_$delete_list (sl_name, search_seg_ptr, code); 347* 348* 349*where: 350* 351*1. sl_name (Input) 352* is the search list name. 353* 354*2. search_seg_ptr (Input) 355* is a pointer to the search segment. If this pointer is null, then 356* the process search segment is used. 357* 358*3. code (Output) 359* is a standard status code. It may be the following: 360* error_table_$no_search_list 361* the search list was not in the search segment. 362* error_table_$action_not_performed 363* the linker search list may not be deleted. 364**/ 365 366 /* 367*N__a_m_e: search_paths_$init_search_seg 368* 369* The search_paths_$init_search_seg entry point initializes a search 370*segment. 371* 372* 373*U__s_a_g_e: 374* 375* 376* declare search_paths_$init_search_seg entry (pointer, fixed binary (35)); 377* 378* call search_paths_$init_search_seg (search_seg_ptr, code); 379* 380* 381*where: 382* 383*1. search_seg_ptr (Input) 384* is a pointer to the search segment. If this pointer is null, then 385* the process search segment is used. 386* 387*2. code (Output) 388* is a standard status code. 389**/ 390 391 search_paths_: 392 procedure; 393 394 declare P_code fixed binary (35); 395 declare P_dir_name char (*); 396 declare P_entryname char (*); 397 declare P_ref_path char (*); 398 declare P_search_seg_ptr pointer; 399 declare P_sl_control bit (36); 400 declare P_sl_info_area_ptr pointer; 401 declare P_sl_info_ptr pointer; 402 declare P_sl_info_version fixed binary; 403 declare P_sl_list_area_ptr pointer; 404 declare P_sl_list_ptr pointer; 405 declare P_sl_list_version fixed binary; 406 declare P_sl_name char (*); 407 408 /* automatic */ 409 410 declare cleanup_action fixed binary; /* what action to take on cleanup */ 411 declare cleanup_new_list_header_ptr 412 pointer; /* pointers to figure out what to do on cleanup */ 413 declare cleanup_new_list_name_ptr 414 pointer; 415 declare cleanup_new_search_list_ptr 416 pointer; 417 declare cleanup_old_last_list_header_ptr 418 pointer; 419 declare cleanup_old_list_header_ptr 420 pointer; 421 declare cleanup_old_list_name_ptr 422 pointer; 423 declare cleanup_old_search_list_ptr 424 pointer; 425 declare cleanup_sl_list_ptr pointer; 426 declare list_name_name_count fixed binary; 427 declare search_list_path_count fixed binary; 428 declare search_seg_ptr pointer; /* pointer to the search segment */ 429 430 /* based */ 431 432 /* search segment data structures 433* 434* The list_header must remain in the same generation of storage because 435* users are given pointers to list_header.update_count */ 436 437 declare 1 search_seg based (search_seg_ptr), 438 2 header, 439 3 version fixed binary, /* search segment version */ 440 3 first_list_header_off 441 offset (search_seg.area), 442 /* offset of first list's list_header */ 443 3 last_list_header_off 444 offset (search_seg.area), 445 /* offset of last list's list_header */ 446 2 area area (sys_info$max_seg_size - divide (length (unspec (search_seg.header)), 36, 19)); 447 448 declare 1 list_header based, 449 2 link offset (search_seg.area), 450 /* offset of next list's list_header */ 451 2 back_link offset (search_seg.area), 452 /* offset of last list's list_header */ 453 2 list_name_off offset (search_seg.area), 454 /* offset of list_name */ 455 2 search_list_off offset (search_seg.area), 456 /* offset of search_list */ 457 2 update_count fixed binary (71); /* number of times search list has been changed */ 458 459 declare 1 list_name based, 460 2 name_count fixed binary, /* number of synonyms */ 461 2 names (list_name_name_count refer (list_name.name_count)) char (32); 462 /* search list names */ 463 464 declare 1 search_list based, 465 2 path_count fixed binary, /* number of search paths */ 466 2 paths (search_list_path_count refer (search_list.path_count)), 467 3 type fixed binary, /* search path type */ 468 3 pathname char (168), /* search pathname */ 469 3 mark bit (1); /* temporary */ 470 471 declare 1 default_search_list based, 472 2 name_count fixed binary, /* number of synonyms */ 473 2 path_count fixed binary, /* number of search paths */ 474 2 names (0 refer (default_search_list.name_count)) char (32), 475 /* search list names */ 476 2 paths (0 refer (default_search_list.path_count)), 477 3 type fixed binary, /* search path type */ 478 3 pathname char (168); /* search pathname */ 479 480 /* builtin */ 481 482 declare addr builtin; 483 declare divide builtin; 484 declare empty builtin; 485 declare hbound builtin; 486 declare index builtin; 487 declare length builtin; 488 declare ltrim builtin; 489 declare maxlength builtin; 490 declare null builtin; 491 declare nullo builtin; 492 declare rtrim builtin; 493 declare search builtin; 494 declare substr builtin; 495 declare unspec builtin; 496 497 /* condition */ 498 499 declare cleanup condition; 500 501 /* internal static */ 502 503 declare this_ring fixed binary internal static initial (-1); 504 declare default_search_seg_ptr pointer internal static initial (null); 505 declare NONE fixed binary internal static options (constant) initial (0); 506 declare FREE_sl_info fixed binary internal static options (constant) initial (1); 507 declare FREE_sl_list fixed binary internal static options (constant) initial (2); 508 declare RESTORE fixed binary internal static options (constant) initial (3); 509 declare FREE_old_search_list fixed binary internal static options (constant) initial (4); 510 declare FREE_ALL_OLD fixed binary internal static options (constant) initial (5); 511 512 declare search_seg_version_2 fixed binary internal static options (constant) initial (2); 513 514 /* external static */ 515 516 declare error_table_$action_not_performed 517 fixed binary (35) external static; 518 declare error_table_$badpath fixed binary (35) external static; 519 declare error_table_$empty_search_list 520 fixed binary (35) external static; 521 declare error_table_$invalid_ring_brackets 522 fixed bin (35) ext static; 523 declare error_table_$new_search_list 524 fixed binary (35) external static; 525 declare error_table_$no_search_list 526 fixed binary (35) external static; 527 declare error_table_$no_search_list_default 528 fixed binary (35) external static; 529 declare error_table_$noentry fixed binary (35) external static; 530 declare error_table_$notadir fixed binary (35) external static; 531 declare error_table_$pathlong fixed binary (35) external static; 532 declare error_table_$too_many_sr 533 fixed binary (35) external static; 534 declare error_table_$unbalanced_brackets 535 fixed binary (35) external static; 536 declare error_table_$unimplemented_version 537 fixed binary (35) external static; 538 declare sys_info$max_seg_size fixed binary (19) external static; 539 540 /* external entry */ 541 542 declare expand_pathname_ entry (char (*), char (*), char (*), fixed bin (35)); 543 declare fs_util_$get_type entry (char(*), char(*), char(*), fixed bin(35)); 544 declare get_pdir_ entry () returns (char (168)); 545 declare get_wdir_ entry () returns (char (168)); 546 declare get_ring_ entry () returns (fixed bin (3)); 547 declare ioa_$rsnnl ext entry options (variable); 548 declare cu_$level_get ext entry (fixed bin); 549 declare hcs_$get_ring_brackets entry (char (*), char (*), (3) fixed bin (3), fixed bin (35)); 550 declare hcs_$get_search_rules entry (pointer); 551 declare hcs_$get_uid_file entry (char (*), char (*), bit (36) aligned, fixed bin (35)); 552 declare hcs_$initiate_search_rules 553 entry (pointer, fixed binary (35)); 554 declare hcs_$make_ptr entry (pointer, char (*), char (*), pointer, fixed binary (35)); 555 declare hcs_$make_seg entry (char (*), char (*), char (*), fixed binary (5), pointer, fixed binary (35)); 556 declare hcs_$status_minf entry (char (*), char (*), fixed binary (1), fixed binary (2), fixed binary (24), 557 fixed binary (35)); 558 declare user_info_ entry (char (*), char (*), char (*)); 559 declare user_info_$homedir entry (char (*)); 560 1 1 /* BEGIN INCLUDE FILE . . . sl_info.incl.pl1 */ 1 2 1 3 1 4 1 5 /****^ HISTORY COMMENTS: 1 6* 1) change(87-11-16,Lippard), approve(87-12-21,MCR7822), 1 7* audit(88-02-09,Blair), install(88-02-16,MR12.2-1023): 1 8* Modified to add INITIATED_SEGS type. 1 9* 2) change(87-11-19,Lippard), approve(87-12-21,MCR7822), 1 10* audit(88-02-09,Blair), install(88-02-16,MR12.2-1023): 1 11* Added uid to sl_info structure. 1 12* END HISTORY COMMENTS */ 1 13 1 14 1 15 declare 1 sl_info aligned based (sl_info_p), 1 16 2 version fixed binary, /* Must be 1 */ 1 17 2 num_paths fixed binary, /* Number of search paths */ 1 18 2 change_index_p pointer, /* Pointer to search list's update count */ 1 19 2 change_index fixed binary (71), /* This search list's update count */ 1 20 2 pad1 (6) bit (36), /* Must be zero */ 1 21 2 paths (sl_info_num_paths refer (sl_info.num_paths)), 1 22 3 type fixed binary, /* Type of search path */ 1 23 3 code fixed binary (35), /* Standard status code of search path */ 1 24 3 uid bit (36), /* Unique ID */ 1 25 3 pathname char (168) unaligned; /* Search pathname */ 1 26 1 27 declare sl_info_num_paths fixed binary; 1 28 declare sl_info_p pointer; 1 29 declare sl_info_version_1 fixed binary internal static options (constant) initial (1); 1 30 1 31 /* Keyword Types */ 1 32 1 33 declare ABSOLUTE_PATH fixed binary internal static options (constant) initial (0); 1 34 declare UNEXPANDED_PATH fixed binary internal static options (constant) initial (1); 1 35 declare REFERENCING_DIR fixed binary internal static options (constant) initial (3); 1 36 declare WORKING_DIR fixed binary internal static options (constant) initial (4); 1 37 declare PROCESS_DIR fixed binary internal static options (constant) initial (5); 1 38 declare HOME_DIR fixed binary internal static options (constant) initial (6); 1 39 declare INITIATED_SEGS fixed binary internal static options (constant) initial (7); 1 40 1 41 /* END INCLUDE FILE . . . sl_info.incl.pl1 */ 561 2 1 /* BEGIN INCLUDE FILE . . . sl_control_s.incl.pl1 */ 2 2 2 3 declare 1 sl_control_s unaligned based (addr (sl_control)), 2 4 2 af_pathname bit (1), /* "1"b => expand active functions */ 2 5 2 pad1 bit (1), /* Must be zero */ 2 6 2 key_ref_dir bit (1), /* "1"b => expand -referencing_dir keyword */ 2 7 2 key_work_dir bit (1), /* "1"b => expand -working_dir keyword */ 2 8 2 key_proc_dir bit (1), /* "1"b => expand -process_dir keyword */ 2 9 2 key_home_dir bit (1), /* "1"b => expand -home_dir keyword */ 2 10 2 pad2 bit (30); /* Must be zero */ 2 11 2 12 declare sl_control bit (36); 2 13 declare sl_control_default bit (36) internal static options (constant) initial ("101111"b); 2 14 2 15 /* END INCLUDE FILE . . . sl_control_s.incl.pl1 */ 562 3 1 /* BEGIN INCLUDE FILE . . . sl_list.incl.pl1 */ 3 2 3 3 declare 1 sl_list based, 3 4 2 version fixed binary, /* Must be 2 */ 3 5 2 link pointer, /* Pointer to structure for next list */ 3 6 2 name_count fixed binary, /* Number of synonyms of this search list */ 3 7 2 pad (3) bit (36), /* Must be zero */ 3 8 2 names (sl_list_name_count refer (sl_list.name_count)) char (32); 3 9 /* Synonyms of this search list */ 3 10 3 11 declare sl_list_name_count fixed binary; 3 12 declare sl_list_version_2 fixed binary internal static options (constant) initial (2); 3 13 3 14 /* END INCLUDE FILE . . . sl_list.incl.pl1 */ 563 564 565 /* Search a search list for an entryname */ 566 567 find_dir: 568 entry (P_sl_name, P_search_seg_ptr, P_entryname, P_ref_path, P_dir_name, P_code); 569 570 /* P_sl_name (Input) search list name 571* P_search_seg_ptr (Input) pointer to the search segment 572* P_entryname (Input) entryname to look for 573* P_ref_path (Input) pathname used for "-referencing_dir" keyword 574* P_dir_name (Output) directory the entryname was found in 575* P_code (Output) standard status code */ 576 577 cleanup_action = NONE; 578 on cleanup call cleanup_; 579 begin; 580 declare code fixed binary (35); 581 declare dir_name char (168); 582 declare entry_type char (32); 583 declare pathx fixed binary; 584 declare search_list_header_ptr pointer; 585 declare search_list_ptr pointer; 586 587 P_dir_name = ""; 588 P_code = 0; 589 call get_search_segment (P_search_seg_ptr, P_code); 590 if P_code ^= 0 591 then return; 592 if P_sl_name = "linker" then call get_linker_search_list; 593 call get_search_list (P_sl_name, "1"b, search_list_header_ptr, P_code); 594 if P_code ^= 0 595 then return; 596 597 search_list_ptr = search_list_header_ptr -> list_header.search_list_off; 598 code = -1; 599 do pathx = 1 to search_list_ptr -> search_list.path_count while (code ^= 0); 600 call expand_search_path (search_list_ptr -> search_list.paths (pathx).type, 601 search_list_ptr -> search_list.paths (pathx).pathname, P_ref_path, (36)"1"b, dir_name, (""b), code); 602 if code = 0 & dir_name = "" 603 then code = -1; 604 605 if code = 0 606 then call fs_util_$get_type (dir_name, P_entryname, entry_type, code); 607 end; 608 609 if code = 0 610 then P_dir_name = dir_name; 611 else P_code = error_table_$noentry; 612 end; 613 return; 614 615 /* Find all the paths on a search list which contain an entryname */ 616 617 find_all: 618 entry (P_sl_name, P_search_seg_ptr, P_entryname, P_ref_path, P_sl_info_area_ptr, P_sl_info_version, P_sl_info_ptr, 619 P_code); 620 621 /* P_sl_name (Input) search list name 622* P_search_seg_ptr (Input) pointer to the search segment 623* P_entryname (Input) entryname to look for 624* P_ref_path (Input) pathname used for "-referencing_dir" keyword 625* P_sl_info_area_ptr (Input) pointer to an area to allocate sl_info in 626* P_sl_info_version (Input) version of the sl_info structure required 627* P_sl_info_ptr (Output) pointer to sl_info structure containing paths which contain the entryname 628* P_code (Output) standard status code */ 629 630 cleanup_action = NONE; 631 on cleanup call cleanup_; 632 begin; 633 declare code fixed binary (35); 634 declare dir_name char (168); 635 declare entry_type char (32); 636 declare found_count fixed binary; 637 declare pathx fixed binary; 638 declare search_list_header_ptr pointer; 639 declare search_list_ptr pointer; 640 641 P_sl_info_ptr = null; 642 P_code = 0; 643 if P_sl_info_version ^= sl_info_version_1 644 then do; 645 P_code = error_table_$unimplemented_version; 646 return; 647 end; 648 649 call get_search_segment (P_search_seg_ptr, P_code); 650 if P_code ^= 0 651 then return; 652 if P_sl_name = "linker" then call get_linker_search_list; 653 call get_search_list (P_sl_name, "1"b, search_list_header_ptr, P_code); 654 if P_code ^= 0 655 then return; 656 657 search_list_ptr = search_list_header_ptr -> list_header.search_list_off; 658 search_list_ptr -> search_list.paths (*).mark = "0"b; 659 found_count = 0; 660 do pathx = 1 to search_list_ptr -> search_list.path_count; 661 call expand_search_path (search_list_ptr -> search_list.paths (pathx).type, 662 search_list_ptr -> search_list.paths (pathx).pathname, P_ref_path, (36)"1"b, dir_name, (""b), code); 663 if code = 0 & dir_name ^= "" 664 then do; 665 call fs_util_$get_type (dir_name, P_entryname, entry_type, code); 666 if code = 0 667 then do; 668 search_list_ptr -> search_list.paths (pathx).mark = "1"b; 669 found_count = found_count + 1; 670 end; 671 end; 672 end; 673 674 if found_count = 0 675 then P_code = error_table_$noentry; 676 else begin; 677 declare found_pathx fixed binary; 678 679 cleanup_action = FREE_sl_info; 680 681 call create_sl_info (P_sl_info_area_ptr, search_list_header_ptr, found_count, P_sl_info_ptr); 682 found_pathx = 1; 683 do pathx = 1 to search_list_ptr -> search_list.path_count while (found_pathx <= found_count); 684 if search_list_ptr -> search_list.paths (pathx).mark 685 then do; 686 P_sl_info_ptr -> sl_info.paths (found_pathx).type = 687 search_list_ptr -> search_list.paths (pathx).type; 688 call expand_search_path (search_list_ptr -> search_list.paths (pathx).type, 689 search_list_ptr -> search_list.paths (pathx).pathname, P_ref_path, (36)"1"b, 690 P_sl_info_ptr -> sl_info.paths (found_pathx).pathname, 691 P_sl_info_ptr -> sl_info.paths (found_pathx).uid, code); 692 found_pathx = found_pathx + 1; 693 end; 694 end; 695 end; 696 end; 697 return; 698 699 /* Return the search paths in a search list */ 700 701 get: 702 entry (P_sl_name, P_sl_control, P_ref_path, P_search_seg_ptr, P_sl_info_area_ptr, P_sl_info_version, P_sl_info_ptr, 703 P_code); 704 705 /* P_sl_name (Input) search list name 706* P_sl_control (Input) expansion control mask 707* P_ref_path (Input) pathname used for "-referencing_dir" rule 708* P_search_seg_ptr (Input) pointer to the search segment 709* P_sl_info_area_ptr (Input) pointer to an area to allocate sl_info in 710* P_sl_info_version (Input) version of the sl_info structure required 711* P_sl_info_ptr (Output) pointer to sl_info structure containing the search list 712* P_code (Output) standard status code */ 713 714 cleanup_action = NONE; 715 on cleanup call cleanup_; 716 begin; 717 declare code fixed binary (35); 718 declare pathx fixed binary; 719 declare search_list_header_ptr pointer; 720 declare search_list_ptr pointer; 721 declare sl_info_pathx fixed binary; 722 723 P_sl_info_ptr = null; 724 P_code = 0; 725 if P_sl_info_version ^= sl_info_version_1 726 then do; 727 P_code = error_table_$unimplemented_version; 728 return; 729 end; 730 731 call get_search_segment (P_search_seg_ptr, P_code); 732 if P_code ^= 0 733 then return; 734 if P_sl_name = "linker" then call get_linker_search_list; 735 call get_search_list (P_sl_name, "1"b, search_list_header_ptr, P_code); 736 if P_code ^= 0 737 then return; 738 739 cleanup_action = FREE_sl_info; 740 741 search_list_ptr = search_list_header_ptr -> list_header.search_list_off; 742 call create_sl_info (P_sl_info_area_ptr, search_list_header_ptr, 743 search_list_ptr -> search_list.path_count 744 - null_referencing_dirs (P_sl_control, P_ref_path, search_list_ptr), P_sl_info_ptr); 745 746 sl_info_pathx = 1; 747 do pathx = 1 to search_list_ptr -> search_list.path_count 748 while (sl_info_pathx <= P_sl_info_ptr -> sl_info.num_paths); 749 P_sl_info_ptr -> sl_info.paths (sl_info_pathx).type = search_list_ptr -> search_list.paths (pathx).type; 750 751 call expand_search_path (search_list_ptr -> search_list.paths (pathx).type, 752 search_list_ptr -> search_list.paths (pathx).pathname, P_ref_path, P_sl_control, 753 P_sl_info_ptr -> sl_info.paths (sl_info_pathx).pathname, 754 P_sl_info_ptr -> sl_info.paths (sl_info_pathx).uid, code); 755 if code ^= 0 & P_code = 0 756 then P_code = code; 757 758 if P_sl_info_ptr -> sl_info.paths (sl_info_pathx).pathname ^= "" 759 then sl_info_pathx = sl_info_pathx + 1; 760 end; 761 end; 762 return; 763 764 /* Set a search list to specified search paths */ 765 766 set: 767 entry (P_sl_name, P_search_seg_ptr, P_sl_info_ptr, P_code); 768 769 /* P_sl_name (Input) search list name 770* P_search_seg_ptr (Input) pointer to the search segment 771* P_sl_info_ptr (Input) pointer to sl_info structure containing the new search list 772* or null to reinitialize the search list 773* P_code (Output) standard status code */ 774 775 cleanup_action = NONE; 776 on cleanup call cleanup_; 777 begin; 778 declare search_list_header_ptr pointer; 779 780 P_code = 0; 781 if P_sl_info_ptr = null 782 then begin; 783 declare code fixed binary (35); 784 785 call get_search_segment (P_search_seg_ptr, P_code); 786 if P_code ^= 0 787 then return; 788 if P_sl_name = "linker" then call get_linker_search_list; 789 call get_search_list (P_sl_name, "0"b, search_list_header_ptr, code); 790 call set_up_to_restore_on_cleanup (search_list_header_ptr); 791 call initialize_search_list_with_default (P_sl_name, search_list_header_ptr, code); 792 if code ^= 0 793 then do; 794 P_code = error_table_$no_search_list_default; 795 return; 796 end; 797 end; 798 else begin; 799 declare code fixed binary (35); 800 declare dir_name char (168); 801 declare pathx fixed binary; 802 803 if P_sl_info_ptr -> sl_info.version ^= sl_info_version_1 804 then do; 805 P_code = error_table_$unimplemented_version; 806 return; 807 end; 808 809 call get_search_segment (P_search_seg_ptr, P_code); 810 if P_code ^= 0 811 then return; 812 813 if P_sl_name = "linker" then call get_linker_search_list; 814 815 do pathx = 1 to P_sl_info_ptr -> sl_info.num_paths; 816 call expand_search_path (P_sl_info_ptr -> sl_info.paths (pathx).type, 817 P_sl_info_ptr -> sl_info.paths (pathx).pathname, "", (36)"1"b, dir_name, 818 P_sl_info_ptr -> sl_info.paths (pathx).uid, code); 819 P_sl_info_ptr -> sl_info.paths (pathx).code = code; 820 if code ^= 0 821 then P_code = error_table_$action_not_performed; 822 end; 823 if P_code ^= 0 824 then return; 825 826 call get_search_list (P_sl_name, "1"b, search_list_header_ptr, code); 827 call set_up_to_restore_on_cleanup (search_list_header_ptr); 828 if code ^= 0 & code ^= error_table_$empty_search_list 829 then do; 830 P_code = error_table_$new_search_list; 831 call create_search_list_header (cleanup_new_list_header_ptr); 832 search_list_header_ptr = cleanup_new_list_header_ptr; 833 834 list_name_name_count = 1; 835 allocate list_name in (search_seg.area) set (cleanup_new_list_name_ptr); 836 search_list_header_ptr -> list_header.list_name_off = cleanup_new_list_name_ptr; 837 cleanup_new_list_name_ptr -> list_name.names (1) = P_sl_name; 838 end; 839 840 search_list_path_count = P_sl_info_ptr -> sl_info.num_paths; 841 allocate search_list in (search_seg.area) set (cleanup_new_search_list_ptr); 842 search_list_header_ptr -> list_header.search_list_off = cleanup_new_search_list_ptr; 843 844 cleanup_new_search_list_ptr -> search_list.paths (*).type = P_sl_info_ptr -> sl_info.paths (*).type; 845 cleanup_new_search_list_ptr -> search_list.paths (*).pathname = 846 P_sl_info_ptr -> sl_info.paths (*).pathname; 847 end; 848 search_list_header_ptr -> list_header.update_count = search_list_header_ptr -> list_header.update_count + 1; 849 850 cleanup_action = FREE_old_search_list; 851 call cleanup_; 852 853 if P_sl_name = "linker" then call set_linker_search_list; 854 end; 855 return; 856 857 /* Return the search lists in a search segment */ 858 859 list: 860 entry (P_search_seg_ptr, P_sl_list_area_ptr, P_sl_list_version, P_sl_list_ptr, P_code); 861 862 /* P_search_seg_ptr (Input) pointer to the search segment 863* P_sl_list_area_ptr (Input) pointer to an area to allocate a linked list of sl_list structures in 864* P_sl_list_version (Input) version of the sl_list structure required 865* P_sl_list_ptr (Output) pointer to a linked list of sl_list structures containing the names 866* and synonyms of the search lists in the search segment 867* P_code (Output) standard status code */ 868 869 cleanup_action = NONE; 870 on cleanup call cleanup_; 871 begin; 872 declare list_name_ptr pointer; 873 declare search_list_header_ptr pointer; 874 declare sl_list_area area based; 875 876 P_sl_list_ptr = null; 877 P_code = 0; 878 if P_sl_list_version ^= sl_list_version_2 879 then do; 880 P_code = error_table_$unimplemented_version; 881 return; 882 end; 883 884 call get_search_segment (P_search_seg_ptr, P_code); 885 if P_code ^= 0 886 then return; 887 888 call get_linker_search_list; 889 890 cleanup_sl_list_ptr = null; 891 cleanup_action = FREE_sl_list; 892 893 do search_list_header_ptr = search_seg.header.first_list_header_off 894 repeat search_list_header_ptr -> list_header.link while (search_list_header_ptr ^= null); 895 896 list_name_ptr = search_list_header_ptr -> list_header.list_name_off; 897 898 sl_list_name_count = list_name_ptr -> list_name.name_count; 899 allocate sl_list in (P_sl_list_area_ptr -> sl_list_area) set (P_sl_list_ptr); 900 901 P_sl_list_ptr -> sl_list.version = sl_list_version_2; 902 P_sl_list_ptr -> sl_list.link = cleanup_sl_list_ptr; 903 P_sl_list_ptr -> sl_list.pad (*) = ""b; 904 P_sl_list_ptr -> sl_list.names (*) = list_name_ptr -> list_name.names (*); 905 906 cleanup_sl_list_ptr = P_sl_list_ptr; 907 end; 908 end; 909 return; 910 911 /* Delete a search list */ 912 913 delete_list: 914 entry (P_sl_name, P_search_seg_ptr, P_code); 915 916 /* P_sl_name (Input) search list to be deleted 917* P_search_seg_ptr (Input) pointer to the search segment 918* P_code (Output) standard status code */ 919 920 if P_sl_name = "linker" 921 then do; 922 P_code = error_table_$action_not_performed; 923 return; 924 end; 925 926 cleanup_action = NONE; 927 on cleanup call cleanup_; 928 begin; 929 declare search_list_header_ptr pointer; 930 931 P_code = 0; 932 call get_search_segment (P_search_seg_ptr, P_code); 933 if P_code ^= 0 934 then return; 935 call get_search_list (P_sl_name, "1"b, search_list_header_ptr, P_code); 936 if P_code = error_table_$empty_search_list 937 then P_code = 0; 938 if P_code ^= 0 939 then return; 940 941 call set_up_to_restore_on_cleanup (search_list_header_ptr); 942 943 if search_list_header_ptr -> list_header.link = nullo 944 then search_seg.header.last_list_header_off = search_list_header_ptr -> list_header.back_link; 945 else search_list_header_ptr -> list_header.link -> list_header.back_link = 946 search_list_header_ptr -> list_header.back_link; 947 948 if search_list_header_ptr -> list_header.back_link = nullo 949 then search_seg.header.first_list_header_off = search_list_header_ptr -> list_header.link; 950 else search_list_header_ptr -> list_header.back_link -> list_header.link = 951 search_list_header_ptr -> list_header.link; 952 953 cleanup_action = FREE_ALL_OLD; 954 call cleanup_; 955 end; 956 return; 957 958 /* Initialize a search segment */ 959 960 init_search_seg: 961 entry (P_search_seg_ptr, P_code); 962 963 /* P_search_seg_ptr (Input) pointer to the search segment to be initialized 964* P_code (Output) standard status code */ 965 966 cleanup_action = NONE; 967 on cleanup call cleanup_; 968 969 P_code = 0; 970 call get_search_segment (P_search_seg_ptr, P_code); 971 if P_code ^= 0 972 then return; 973 call initialize_search_segment; 974 return; 975 976 /* Set up search_seg_ptr, the global pointer to the search segment, 977* using the user-supplied search segment pointer. 978* 979* Initialize the process search segment if needed. 980**/ 981 get_search_segment: 982 procedure (given_search_seg_ptr, code); 983 984 declare given_search_seg_ptr pointer; /* (Input) user supplied search segment pointer */ 985 declare code fixed binary (35); /* (Output) standard status code */ 986 987 declare ps_segname char (32); 988 declare pdir char (168); 989 declare ring_bracks (3) fixed bin (3); 990 declare level fixed bin; 991 992 993 994 code = 0; 995 996 if given_search_seg_ptr ^= null 997 then search_seg_ptr = given_search_seg_ptr; 998 999 else do; 1000 if this_ring < 0 1001 then this_ring = get_ring_ (); 1002 call cu_$level_get (level); 1003 if (this_ring = level) & (default_search_seg_ptr ^= null) 1004 then search_seg_ptr = default_search_seg_ptr; 1005 1006 else do; 1007 pdir = get_pdir_ (); 1008 call ioa_$rsnnl ("process_search_segment_.^d", ps_segname, 0, level); 1009 call hcs_$make_seg (pdir, ps_segname, "", 01010b, search_seg_ptr, code); 1010 if search_seg_ptr = null 1011 then return; 1012 code = 0; 1013 1014 call hcs_$get_ring_brackets (pdir, ps_segname, ring_bracks, code); 1015 if code ^= 0 1016 then return; 1017 if ring_bracks (1) > level 1018 then do; 1019 code = error_table_$invalid_ring_brackets; 1020 return; 1021 end; 1022 1023 if search_seg.header.version ^= search_seg_version_2 1024 then call initialize_search_segment; 1025 1026 if (this_ring = level) 1027 then default_search_seg_ptr = search_seg_ptr; 1028 end; 1029 end; 1030 1031 if search_seg.header.version ^= search_seg_version_2 1032 then code = error_table_$unimplemented_version; 1033 end get_search_segment; 1034 1035 /* Initialize the global search segment */ 1036 1037 initialize_search_segment: 1038 procedure; 1039 1040 search_seg.header.first_list_header_off = nullo; 1041 search_seg.header.last_list_header_off = nullo; 1042 search_seg.area = empty (); 1043 search_seg.header.version = search_seg_version_2; 1044 end initialize_search_segment; 1045 1046 /* Find a search list in the search segment. 1047* 1048* If the search list is not in the search segment, init_sl_sw 1049* determines if the search list should be initialized. 1050**/ 1051 get_search_list: 1052 procedure (sl_name, init_sl_sw, search_list_header_ptr, code); 1053 1054 declare sl_name char (*); /* (Input) search list name */ 1055 declare init_sl_sw bit (1); /* (Input) on to initialize the search list if it's not 1056* in the search segment */ 1057 declare search_list_header_ptr pointer; /* (Output) pointer to the list_header */ 1058 declare code fixed binary (35); /* (Output) standard status code */ 1059 1060 declare found bit (1); 1061 declare list_name_ptr pointer; 1062 declare namex fixed binary; 1063 1064 code = 0; 1065 found = "0"b; 1066 search_list_header_ptr = search_seg.header.first_list_header_off; 1067 do while (search_list_header_ptr ^= null & ^found); 1068 list_name_ptr = search_list_header_ptr -> list_header.list_name_off; 1069 do namex = 1 to list_name_ptr -> list_name.name_count while (^found); 1070 found = sl_name = list_name_ptr -> list_name.names (namex); 1071 end; 1072 1073 if ^found 1074 then search_list_header_ptr = search_list_header_ptr -> list_header.link; 1075 end; 1076 1077 if found 1078 then if search_list_header_ptr -> list_header.search_list_off = nullo 1079 then code = error_table_$empty_search_list; 1080 else ; 1081 else if init_sl_sw 1082 then do; 1083 call set_up_to_restore_on_cleanup (null); 1084 call initialize_search_list_with_default (sl_name, search_list_header_ptr, code); 1085 cleanup_action = NONE; 1086 end; 1087 else code = error_table_$no_search_list; 1088 end get_search_list; 1089 1090 /* Set a search list to its default. 1091* 1092* If search_list_header_ptr is null, a search list header will be created, 1093* otherwise, the one it points to will be used. 1094**/ 1095 initialize_search_list_with_default: 1096 procedure (sl_name, search_list_header_ptr, code); 1097 1098 declare sl_name char (*); /* (Input) search list name */ 1099 declare search_list_header_ptr pointer; /* (Input) if null, create a list_header, 1100* otherwise, this is the pointer to it. 1101* (Output) pointer to the list_header */ 1102 declare code fixed binary (35); /* (Output) standard status code */ 1103 1104 declare default_segname char (32); 1105 declare default_search_list_ptr 1106 pointer; 1107 1108 code = 0; 1109 default_segname = rtrim (sl_name) || ".search"; 1110 1111 /* When searching for the segment with the default search paths in it, we use 1112* NO referencing_dir rule. If we use our own dir (>sss) we would be forcing 1113* the >sss copy of the defaults on a subsystem (e.g. in >exl) that might 1114* well have its own modified version of the defaults in its own dir. If we 1115* use our caller's dir (via cu_$caller_ptr) we introduce the same problem, 1116* since for all we know the caller is probably >sss>add_search_paths! So we 1117* let the linker's chips fall where they may and presume the user has his 1118* linker search rule preferences the way he wants them. */ 1119 1120 call hcs_$make_ptr (null, default_segname, sl_name, default_search_list_ptr, code); 1121 if code ^= 0 1122 then do; 1123 search_list_header_ptr = null; 1124 code = error_table_$no_search_list; 1125 return; 1126 end; 1127 1128 if search_list_header_ptr = null 1129 then do; 1130 call create_search_list_header (cleanup_new_list_header_ptr); 1131 search_list_header_ptr = cleanup_new_list_header_ptr; 1132 1133 list_name_name_count = default_search_list_ptr -> default_search_list.name_count; 1134 allocate list_name in (search_seg.area) set (cleanup_new_list_name_ptr); 1135 search_list_header_ptr -> list_header.list_name_off = cleanup_new_list_name_ptr; 1136 cleanup_new_list_name_ptr -> list_name.names (*) = 1137 default_search_list_ptr -> default_search_list.names (*); 1138 end; 1139 1140 search_list_path_count = default_search_list_ptr -> default_search_list.path_count; 1141 allocate search_list in (search_seg.area) set (cleanup_new_search_list_ptr); 1142 search_list_header_ptr -> list_header.search_list_off = cleanup_new_search_list_ptr; 1143 1144 cleanup_new_search_list_ptr -> search_list.paths (*).type = 1145 default_search_list_ptr -> default_search_list.paths (*).type; 1146 cleanup_new_search_list_ptr -> search_list.paths (*).pathname = 1147 default_search_list_ptr -> default_search_list.paths (*).pathname; 1148 end initialize_search_list_with_default; 1149 1150 /* Copy hardcore search rules into linker search list. */ 1151 get_linker_search_list: 1152 procedure; 1153 1154 declare code fixed binary (35); 1155 1156 declare dname char (168); 1157 declare ename char (32); 1158 1159 declare idx fixed binary; 1160 1161 declare search_list_header_ptr pointer; 1162 1163 declare 1 search_rules aligned, 1164 2 number fixed binary, 1165 2 name (21) character (168) unaligned; 1166 1167 declare uid bit (36) aligned; 1168 1169 call hcs_$get_search_rules (addr (search_rules)); 1170 call get_search_list ("linker", "1"b, search_list_header_ptr, code); 1171 call set_up_to_restore_on_cleanup (search_list_header_ptr); 1172 if code ^= 0 & code ^= error_table_$empty_search_list 1173 then do; 1174 call create_search_list_header (cleanup_new_list_header_ptr); 1175 search_list_header_ptr = cleanup_new_list_header_ptr; 1176 1177 list_name_name_count = 1; 1178 allocate list_name in (search_seg.area) set (cleanup_new_list_name_ptr); 1179 search_list_header_ptr -> list_header.list_name_off = cleanup_new_list_name_ptr; 1180 cleanup_new_list_name_ptr -> list_name.names (1) = "linker"; 1181 end; 1182 1183 search_list_path_count = search_rules.number; 1184 allocate search_list in (search_seg.area) set (cleanup_new_search_list_ptr); 1185 search_list_header_ptr -> list_header.search_list_off = cleanup_new_search_list_ptr; 1186 1187 do idx = 1 to search_rules.number; 1188 if search_rules.name (idx) = "referencing_dir" 1189 then do; 1190 cleanup_new_search_list_ptr -> search_list.paths (idx).type = REFERENCING_DIR; 1191 cleanup_new_search_list_ptr -> search_list.paths (idx).pathname = 1192 "-referencing_dir"; 1193 end; 1194 else if search_rules.name (idx) = "working_dir" 1195 then do; 1196 cleanup_new_search_list_ptr -> search_list.paths (idx).type = WORKING_DIR; 1197 cleanup_new_search_list_ptr -> search_list.paths (idx).pathname = 1198 "-working_dir"; 1199 end; 1200 else if search_rules.name (idx) = "initiated_segments" 1201 then do; 1202 cleanup_new_search_list_ptr -> search_list.paths (idx).type = INITIATED_SEGS; 1203 cleanup_new_search_list_ptr -> search_list.paths (idx).pathname = 1204 "-initiated_segments"; 1205 end; 1206 else do; 1207 call expand_pathname_ (search_rules.name (idx), dname, ename, code); 1208 if code ^= 0 1209 then return; 1210 1211 call hcs_$get_uid_file (dname, ename, uid, code); 1212 if code ^= 0 1213 then return; 1214 1215 if uid_matches_home_dir (uid) 1216 then do; 1217 cleanup_new_search_list_ptr -> search_list.paths (idx).type = HOME_DIR; 1218 cleanup_new_search_list_ptr -> search_list.paths (idx).pathname = 1219 "-home_dir"; 1220 end; 1221 else if uid_matches_process_dir (uid) 1222 then do; 1223 cleanup_new_search_list_ptr -> search_list.paths (idx).type = PROCESS_DIR; 1224 cleanup_new_search_list_ptr -> search_list.paths (idx).pathname = 1225 "-process_dir"; 1226 end; 1227 else do; 1228 cleanup_new_search_list_ptr -> search_list.paths (idx).type = ABSOLUTE_PATH; 1229 cleanup_new_search_list_ptr -> search_list.paths (idx).pathname = 1230 search_rules.name (idx); 1231 end; 1232 end; 1233 end; 1234 1235 search_list_header_ptr -> list_header.update_count = search_list_header_ptr -> list_header.update_count + 1; 1236 1237 cleanup_action = FREE_old_search_list; 1238 call cleanup_; 1239 return; 1240 1241 uid_matches_home_dir: 1242 procedure (unique_id) returns (bit (1) aligned); 1243 declare unique_id bit (36) aligned parameter; 1244 declare home_dir_pathname char (168); 1245 declare dname char (168); 1246 declare ename char (32); 1247 declare uid bit (36) aligned; 1248 declare code fixed bin (35); 1249 1250 call user_info_$homedir (home_dir_pathname); 1251 call expand_pathname_ (home_dir_pathname, dname, ename, code); 1252 if code ^= 0 1253 then return ("0"b); 1254 call hcs_$get_uid_file (dname, ename, uid, code); 1255 if code ^= 0 1256 then return ("0"b); 1257 if unique_id = uid then return ("1"b); 1258 else return ("0"b); 1259 1260 end uid_matches_home_dir; 1261 1262 uid_matches_process_dir: 1263 procedure (unique_id) returns (bit (1) aligned); 1264 declare unique_id bit (36) aligned parameter; 1265 declare dname char (168); 1266 declare ename char (32); 1267 declare uid bit (36) aligned; 1268 declare code fixed bin (35); 1269 1270 call expand_pathname_ (get_pdir_ (), dname, ename, code); 1271 if code ^= 0 1272 then return ("0"b); 1273 call hcs_$get_uid_file (dname, ename, uid, code); 1274 if code ^= 0 1275 then return ("0"b); 1276 if unique_id = uid then return ("1"b); 1277 else return ("0"b); 1278 end uid_matches_process_dir; 1279 1280 end get_linker_search_list; 1281 1282 /* Set hardcore search rules from linker search list. */ 1283 set_linker_search_list: 1284 procedure; 1285 1286 declare code fixed binary (35); 1287 1288 declare dname character (168); 1289 declare ename character (32); 1290 1291 declare entry_type fixed binary (2); 1292 1293 declare idx fixed binary; 1294 1295 declare 1 search_rules aligned, 1296 2 number fixed binary, 1297 2 name (21) character (168) unaligned; 1298 1299 declare sp_type fixed binary; 1300 1301 declare uid bit (36) aligned; 1302 1303 declare DIRECTORY_TYPE fixed binary (2) internal static options (constant) initial (2); 1304 1305 search_rules.number = P_sl_info_ptr -> sl_info.num_paths; 1306 if search_rules.number > hbound (search_rules.name, 1) 1307 then do; 1308 P_code = error_table_$too_many_sr; 1309 return; 1310 end; 1311 1312 do idx = 1 to search_rules.number; 1313 sp_type = P_sl_info_ptr -> sl_info.paths (idx).type; 1314 if sp_type = REFERENCING_DIR 1315 then search_rules.name (idx) = "referencing_dir"; 1316 else if sp_type = WORKING_DIR 1317 then search_rules.name (idx) = "working_dir"; 1318 else if sp_type = INITIATED_SEGS 1319 then search_rules.name (idx) = "initiated_segments"; 1320 else if sp_type = UNEXPANDED_PATH | sp_type = HOME_DIR | sp_type = PROCESS_DIR 1321 then do; 1322 call expand_search_path (sp_type, 1323 P_sl_info_ptr -> sl_info.paths (idx).pathname, "", (36)"1"b, search_rules.name (idx), uid, code); 1324 if code ^= 0 1325 then do; 1326 P_sl_info_ptr -> sl_info.paths (idx).code = code; 1327 P_code = error_table_$action_not_performed; 1328 return; 1329 end; 1330 end; 1331 else search_rules.name (idx) = P_sl_info_ptr -> sl_info.paths (idx).pathname; 1332 end; 1333 1334 call hcs_$initiate_search_rules (addr (search_rules), code); 1335 if code ^= 0 1336 then do; 1337 P_code = error_table_$action_not_performed; 1338 do idx = 1 to search_rules.number; 1339 if P_sl_info_ptr -> sl_info.paths (idx).type = UNEXPANDED_PATH | P_sl_info_ptr -> sl_info.paths (idx).type = ABSOLUTE_PATH 1340 then do; 1341 call expand_pathname_ (search_rules.name (idx), dname, ename, code); 1342 if code ^= 0 1343 then P_sl_info_ptr -> sl_info.paths (idx).code = code; 1344 call hcs_$status_minf (dname, ename, (1), entry_type, (0), code); 1345 if code ^= 0 1346 then P_sl_info_ptr -> sl_info.paths (idx).code = code; 1347 else if entry_type ^= DIRECTORY_TYPE 1348 then P_sl_info_ptr -> sl_info.paths (idx).code = error_table_$notadir; 1349 end; 1350 end; 1351 end; 1352 end set_linker_search_list; 1353 1354 /* Allocate and initialize a new search list header. */ 1355 1356 create_search_list_header: 1357 procedure (search_list_header_ptr); 1358 1359 declare search_list_header_ptr pointer; /* (Output) pointer to the new list_header */ 1360 1361 search_list_header_ptr = null; 1362 allocate list_header in (search_seg.area) set (search_list_header_ptr); 1363 1364 search_list_header_ptr -> list_header.link = nullo; 1365 search_list_header_ptr -> list_header.back_link = search_seg.header.last_list_header_off; 1366 search_list_header_ptr -> list_header.list_name_off = nullo; 1367 search_list_header_ptr -> list_header.search_list_off = nullo; 1368 search_list_header_ptr -> list_header.update_count = 0; 1369 1370 if search_seg.header.first_list_header_off = nullo 1371 then search_seg.header.first_list_header_off = search_list_header_ptr; 1372 1373 if search_seg.header.last_list_header_off ^= null 1374 then search_seg.header.last_list_header_off -> list_header.link = search_list_header_ptr; 1375 search_seg.header.last_list_header_off = search_list_header_ptr; 1376 end create_search_list_header; 1377 1378 /* Allocate and initialize an sl_info structure. */ 1379 1380 create_sl_info: 1381 procedure (sl_info_area_ptr, search_list_header_ptr, path_count, sl_info_ptr); 1382 1383 declare sl_info_area_ptr pointer; /* (Input) pointer to an area to allocate sl_info in */ 1384 declare search_list_header_ptr pointer; /* (Input) pointer to list_header */ 1385 declare path_count fixed binary; /* (Input) number of search paths in sl_info */ 1386 declare sl_info_ptr pointer; /* (Output) pointer to sl_info */ 1387 1388 declare sl_info_area area based; 1389 1390 sl_info_ptr = null; 1391 sl_info_num_paths = path_count; 1392 allocate sl_info in (sl_info_area_ptr -> sl_info_area) set (sl_info_ptr); 1393 1394 sl_info_ptr -> sl_info.version = sl_info_version_1; 1395 sl_info_ptr -> sl_info.change_index_p = addr (search_list_header_ptr -> list_header.update_count); 1396 sl_info_ptr -> sl_info.change_index = search_list_header_ptr -> list_header.update_count; 1397 sl_info_ptr -> sl_info.pad1 (*) = ""b; 1398 sl_info_ptr -> sl_info.paths (*).code = 0; 1399 sl_info_ptr -> sl_info.paths (*).uid = ""b; 1400 end create_sl_info; 1401 1402 /* Count how many "-referencing_dir" search paths are ignored because ref_path is null. */ 1403 1404 null_referencing_dirs: 1405 procedure (expansion_control, ref_path, search_list_ptr) returns (fixed binary); 1406 1407 declare expansion_control bit (36); /* (Input) keyword expansion control mask */ 1408 declare ref_path char (*); /* (Input) pathname used for "-referencing_dir" rule */ 1409 declare search_list_ptr pointer; /* (Input) pointer to the search_list */ 1410 1411 declare pathx fixed binary; 1412 declare ref_path_count fixed binary; 1413 1414 sl_control = expansion_control; 1415 if ^sl_control_s.key_ref_dir | ref_path ^= "" 1416 then return (0); 1417 1418 ref_path_count = 0; 1419 do pathx = 1 to search_list_ptr -> search_list.path_count; 1420 if search_list_ptr -> search_list.paths (pathx).type = REFERENCING_DIR 1421 then ref_path_count = ref_path_count + 1; 1422 end; 1423 1424 return (ref_path_count); 1425 end null_referencing_dirs; 1426 1427 /* Expand active functions and keywords in a search path according to expansion_control. */ 1428 1429 expand_search_path: 1430 procedure (type, unexpanded_path, ref_path, expansion_control, expanded_path, unique_id, code); 1431 1432 declare type fixed binary; /* (Input) type of the unexpanded path */ 1433 declare unexpanded_path char (*); /* (Input) pathname to expand */ 1434 declare ref_path char (*); /* (Input) pathname used for "-referencing_dir" rule */ 1435 declare expansion_control bit (36); /* (Input) keyword expansion control mask */ 1436 declare expanded_path char (*); /* (Output) expanded pathname */ 1437 declare unique_id bit (36) aligned; /* (Output) UID of entry */ 1438 declare code fixed binary (35); /* (Output) standard status code */ 1439 1440 1441 declare dname char (168); 1442 declare ename char (32); 1443 declare uid_path char (168); 1444 1445 expanded_path = ""; 1446 unique_id = ""b; 1447 code = 0; 1448 sl_control = expansion_control; 1449 1450 if type = UNEXPANDED_PATH & sl_control_s.af_pathname 1451 then call expand_af_path (unexpanded_path, expanded_path, code); 1452 1453 else if type = REFERENCING_DIR & sl_control_s.key_ref_dir 1454 then expanded_path = ref_path; 1455 1456 else if type = WORKING_DIR & sl_control_s.key_work_dir 1457 then expanded_path = get_wdir_ (); 1458 1459 else if type = PROCESS_DIR & sl_control_s.key_proc_dir 1460 then expanded_path = get_pdir_ (); 1461 1462 else if type = HOME_DIR & sl_control_s.key_home_dir 1463 then call user_info_$homedir (expanded_path); 1464 1465 else expanded_path = unexpanded_path; 1466 1467 /* Get UIDs for process dir, home dir, or absolute path. */ 1468 if type = ABSOLUTE_PATH | type = PROCESS_DIR | type = HOME_DIR 1469 then do; 1470 if type = PROCESS_DIR & ^sl_control_s.key_proc_dir 1471 then uid_path = get_pdir_ (); 1472 1473 else if type = HOME_DIR & ^sl_control_s.key_home_dir 1474 then call user_info_$homedir (uid_path); 1475 1476 else uid_path = expanded_path; 1477 1478 call expand_pathname_ (uid_path, dname, ename, code); 1479 if code ^= 0 1480 then return; 1481 1482 call hcs_$get_uid_file (dname, ename, unique_id, (0)); 1483 end; 1484 return; 1485 1486 /* Expand active functions embedded in pathnames. */ 1487 1488 expand_af_path: 1489 procedure (unexpanded_path, expanded_path, code); 1490 1491 declare unexpanded_path char (*); /* (Input) path to expand */ 1492 declare expanded_path char (*); /* (Output) expanded path */ 1493 declare code fixed binary (35); /* (Output) standard status code */ 1494 1495 declare af_bracket_start_pos fixed binary; 1496 declare af_nesting_depth fixed binary; 1497 declare delta_pos fixed binary; 1498 declare path char (168) varying; 1499 declare pos fixed binary; 1500 1501 expanded_path = ""; 1502 code = 0; 1503 1504 path = ltrim (rtrim (unexpanded_path)); 1505 af_nesting_depth = 0; 1506 pos = 1; 1507 do while (pos <= length (path)); 1508 delta_pos = search (substr (path, pos), "[]"); 1509 if delta_pos = 0 1510 then do; 1511 if af_nesting_depth ^= 0 1512 then code = error_table_$unbalanced_brackets; 1513 pos = length (path) + 1; 1514 end; 1515 else do; 1516 pos = pos + delta_pos; 1517 if substr (path, pos - 1, 1) = "[" 1518 then do; 1519 af_nesting_depth = af_nesting_depth + 1; 1520 if af_nesting_depth = 1 1521 then af_bracket_start_pos = pos - 1; 1522 end; 1523 1524 else do; 1525 af_nesting_depth = af_nesting_depth - 1; 1526 if af_nesting_depth < 0 1527 then do; 1528 code = error_table_$unbalanced_brackets; 1529 return; 1530 end; 1531 else if af_nesting_depth = 0 1532 then do; /* change to "begin;" when compiler bug 1789 is fixed in MR7.0 */ 1533 declare af_bracket_length fixed binary; 1534 declare af_text_length fixed binary; 1535 declare af_text_start_pos fixed binary; 1536 declare expanded_af char (168) varying; 1537 declare rescan_sw bit (1); 1538 declare unexpanded_af char (168); 1539 1540 af_text_start_pos = af_bracket_start_pos + 1; 1541 af_text_length = pos - af_text_start_pos - 1; 1542 1543 if af_bracket_start_pos = 1 1544 then rescan_sw = "1"b; 1545 else do; 1546 rescan_sw = substr (path, af_bracket_start_pos - 1, 1) ^= "|"; 1547 if ^rescan_sw 1548 then af_bracket_start_pos = af_bracket_start_pos - 1; 1549 end; 1550 af_bracket_length = pos - af_bracket_start_pos; 1551 1552 unexpanded_af = substr (path, af_text_start_pos, af_text_length); 1553 call expand_af (unexpanded_af, rescan_sw, expanded_af, code); 1554 if code ^= 0 1555 then return; 1556 1557 if length (path) - af_bracket_length + length (expanded_af) > maxlength (path) 1558 then do; 1559 code = error_table_$pathlong; 1560 return; 1561 end; 1562 path = substr (path, 1, af_bracket_start_pos - 1) || expanded_af 1563 || substr (path, pos); 1564 pos = af_bracket_start_pos + length (expanded_af); 1565 end; 1566 end; 1567 end; 1568 end; 1569 expanded_path = path; 1570 return; 1571 1572 /* Expand the active strings allowed in search paths. 1573* 1574* This procedure has the same calling sequence as cu_$af and can be replaced by that entry. 1575**/ 1576 expand_af: 1577 procedure (line, rescan_sw, return_value, code); 1578 1579 declare line char (*); /* (Input) input line */ 1580 declare rescan_sw bit (1); /* (Input) on to rescan result for active strings */ 1581 declare return_value char (*) varying; /* (Output) expanded af */ 1582 declare code fixed binary (35); /* (Output) standard status code */ 1583 1584 declare HT char (1) internal static options (constant) initial (" "); 1585 declare Person_id char (22); 1586 declare Project_id char (9); 1587 declare SP char (1) internal static options (constant) initial (" "); 1588 declare acct char (32); 1589 declare pos fixed binary; 1590 1591 code = 0; 1592 return_value = ltrim (rtrim (line, SP || HT), SP || HT); 1593 1594 /* change tabs to spaces */ 1595 1596 pos = index (return_value, HT); 1597 do while (pos ^= 0); 1598 substr (return_value, pos, 1) = SP; 1599 pos = index (return_value, HT); 1600 end; 1601 1602 /* delete multiple spaces */ 1603 1604 pos = index (return_value, SP || SP); 1605 do while (pos ^= 0); 1606 return_value = substr (return_value, 1, pos) || substr (return_value, pos + 2); 1607 pos = index (return_value, SP || SP); 1608 end; 1609 1610 /* expand the active strings, now that they are in a canonical form */ 1611 1612 call user_info_ (Person_id, Project_id, acct); 1613 if return_value = "user name" 1614 then return_value = rtrim (Person_id); 1615 else if return_value = "user project" 1616 then return_value = rtrim (Project_id); 1617 else do; 1618 return_value = ""; 1619 code = error_table_$badpath; 1620 end; 1621 end expand_af; 1622 1623 end expand_af_path; 1624 1625 end expand_search_path; 1626 1627 /* Prepare to restore the search segment back to its original state if the 1628* cleanup condition is raised. 1629* 1630* If the search list does not exist yet, old_list_header_ptr is null. 1631**/ 1632 set_up_to_restore_on_cleanup: 1633 procedure (old_list_header_ptr); 1634 1635 declare old_list_header_ptr pointer; /* (Input) pointer to current list_header */ 1636 1637 cleanup_old_last_list_header_ptr = search_seg.header.last_list_header_off; 1638 cleanup_old_list_header_ptr = old_list_header_ptr; 1639 if old_list_header_ptr = null 1640 then do; 1641 cleanup_old_list_name_ptr = null; 1642 cleanup_old_search_list_ptr = null; 1643 end; 1644 else do; 1645 cleanup_old_list_name_ptr = old_list_header_ptr -> list_header.list_name_off; 1646 cleanup_old_search_list_ptr = old_list_header_ptr -> list_header.search_list_off; 1647 end; 1648 1649 cleanup_new_list_header_ptr = null; 1650 cleanup_new_list_name_ptr = null; 1651 cleanup_new_search_list_ptr = null; 1652 1653 cleanup_action = RESTORE; 1654 end set_up_to_restore_on_cleanup; 1655 1656 cleanup_: 1657 procedure; 1658 1659 goto action (cleanup_action); 1660 1661 /* FREE_sl_info */ 1662 1663 action (1): 1664 if P_sl_info_ptr ^= null 1665 then do; 1666 free P_sl_info_ptr -> sl_info; 1667 P_sl_info_ptr = null; 1668 end; 1669 goto action (NONE); 1670 1671 /* FREE_sl_list */ 1672 1673 action (2): 1674 if P_sl_list_ptr ^= null 1675 then begin; 1676 declare next_sl_list_ptr pointer; 1677 1678 if P_sl_list_ptr ^= cleanup_sl_list_ptr 1679 then P_sl_list_ptr -> sl_list.link = cleanup_sl_list_ptr; 1680 1681 do P_sl_list_ptr = P_sl_list_ptr repeat next_sl_list_ptr while (P_sl_list_ptr ^= null); 1682 next_sl_list_ptr = P_sl_list_ptr -> sl_list.link; 1683 free P_sl_list_ptr -> sl_list; 1684 end; 1685 end; 1686 goto action (NONE); 1687 1688 /* RESTORE */ 1689 1690 action (3): 1691 if cleanup_old_list_header_ptr = null 1692 then do; 1693 if search_seg.header.first_list_header_off = cleanup_new_list_header_ptr 1694 then search_seg.header.first_list_header_off = nullo; 1695 1696 search_seg.header.last_list_header_off = cleanup_old_last_list_header_ptr; 1697 1698 if cleanup_old_last_list_header_ptr ^= null 1699 then cleanup_old_last_list_header_ptr -> list_header.link = nullo; 1700 end; 1701 else do; 1702 if cleanup_old_last_list_header_ptr -> list_header.back_link = nullo 1703 then search_seg.header.first_list_header_off = cleanup_old_list_header_ptr; 1704 else cleanup_old_list_header_ptr -> list_header.back_link -> list_header.link = 1705 cleanup_old_list_header_ptr; 1706 1707 if cleanup_old_list_header_ptr -> list_header.link = nullo 1708 then search_seg.header.last_list_header_off = cleanup_old_list_header_ptr; 1709 else cleanup_old_list_header_ptr -> list_header.link -> list_header.back_link = 1710 cleanup_old_list_header_ptr; 1711 1712 cleanup_old_list_header_ptr -> list_header.list_name_off = cleanup_old_list_name_ptr; 1713 cleanup_old_list_header_ptr -> list_header.search_list_off = cleanup_old_search_list_ptr; 1714 end; 1715 1716 if cleanup_new_list_header_ptr ^= null & cleanup_new_list_header_ptr ^= cleanup_old_list_header_ptr 1717 then do; 1718 free cleanup_new_list_header_ptr -> list_header; 1719 cleanup_new_list_header_ptr = null; 1720 end; 1721 if cleanup_new_list_name_ptr ^= null & cleanup_new_list_name_ptr ^= cleanup_old_list_name_ptr 1722 then do; 1723 free cleanup_new_list_name_ptr -> list_name; 1724 cleanup_new_list_name_ptr = null; 1725 end; 1726 if cleanup_new_search_list_ptr ^= null & cleanup_new_search_list_ptr ^= cleanup_old_search_list_ptr 1727 then do; 1728 free cleanup_new_search_list_ptr -> search_list; 1729 cleanup_new_search_list_ptr = null; 1730 end; 1731 goto action (NONE); 1732 1733 /* FREE_old_search_list */ 1734 1735 action (4): 1736 if cleanup_old_search_list_ptr ^= null 1737 then do; 1738 free cleanup_old_search_list_ptr -> search_list; 1739 cleanup_old_search_list_ptr = null; 1740 end; 1741 goto action (NONE); 1742 1743 /* FREE_ALL_OLD */ 1744 1745 action (5): 1746 if cleanup_old_search_list_ptr ^= null 1747 then do; 1748 free cleanup_old_search_list_ptr -> search_list; 1749 cleanup_old_search_list_ptr = null; 1750 end; 1751 if cleanup_old_list_name_ptr ^= null 1752 then do; 1753 free cleanup_old_list_name_ptr -> list_name; 1754 cleanup_old_list_name_ptr = null; 1755 end; 1756 if cleanup_old_list_header_ptr ^= null 1757 then do; 1758 free cleanup_old_list_header_ptr -> list_header; 1759 cleanup_old_list_header_ptr = null; 1760 end; 1761 goto action (NONE); 1762 1763 /* NONE */ 1764 1765 action (0): 1766 end cleanup_; 1767 1768 end search_paths_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 04/18/00 1144.3 search_paths_.pl1 >udd>sm>ds>w>ml>search_paths_.pl1 561 1 02/18/88 2123.8 sl_info.incl.pl1 >ldd>incl>sl_info.incl.pl1 562 2 01/09/79 1717.9 sl_control_s.incl.pl1 >ldd>incl>sl_control_s.incl.pl1 563 3 01/09/79 1717.9 sl_list.incl.pl1 >ldd>incl>sl_list.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. ABSOLUTE_PATH constant fixed bin(17,0) initial dcl 1-33 ref 1228 1339 1468 DIRECTORY_TYPE constant fixed bin(2,0) initial dcl 1303 ref 1347 FREE_ALL_OLD constant fixed bin(17,0) initial dcl 510 ref 953 FREE_old_search_list constant fixed bin(17,0) initial dcl 509 ref 850 1237 FREE_sl_info constant fixed bin(17,0) initial dcl 506 ref 679 739 FREE_sl_list constant fixed bin(17,0) initial dcl 507 ref 891 HOME_DIR constant fixed bin(17,0) initial dcl 1-38 ref 1217 1320 1462 1468 1473 HT constant char(1) initial packed unaligned dcl 1584 ref 1592 1592 1596 1599 INITIATED_SEGS constant fixed bin(17,0) initial dcl 1-39 ref 1202 1318 NONE constant fixed bin(17,0) initial dcl 505 ref 577 630 714 775 869 926 966 1085 1669 1686 1731 1741 1761 PROCESS_DIR constant fixed bin(17,0) initial dcl 1-37 ref 1223 1320 1459 1468 1470 P_code parameter fixed bin(35,0) dcl 394 set ref 567 588* 589* 590 593* 594 611* 617 642* 645* 649* 650 653* 654 674* 701 724* 727* 731* 732 735* 736 755 755* 766 780* 785* 786 794* 805* 809* 810 820* 823 830* 859 877* 880* 884* 885 913 922* 931* 932* 933 935* 936 936* 938 960 969* 970* 971 1308* 1327* 1337* P_dir_name parameter char packed unaligned dcl 395 set ref 567 587* 609* P_entryname parameter char packed unaligned dcl 396 set ref 567 605* 617 665* P_ref_path parameter char packed unaligned dcl 397 set ref 567 600* 617 661* 688* 701 742* 751* P_search_seg_ptr parameter pointer dcl 398 set ref 567 589* 617 649* 701 731* 766 785* 809* 859 884* 913 932* 960 970* P_sl_control parameter bit(36) packed unaligned dcl 399 set ref 701 742* 751* P_sl_info_area_ptr parameter pointer dcl 400 set ref 617 681* 701 742* P_sl_info_ptr parameter pointer dcl 401 set ref 617 641* 681* 686 688 688 701 723* 742* 747 749 751 751 758 766 781 803 815 816 816 816 819 840 844 845 1305 1313 1322 1326 1331 1339 1339 1342 1345 1347 1663 1666 1667* P_sl_info_version parameter fixed bin(17,0) dcl 402 ref 617 643 701 725 P_sl_list_area_ptr parameter pointer dcl 403 ref 859 899 P_sl_list_ptr parameter pointer dcl 404 set ref 859 876* 899* 901 902 903 904 906 1673 1678 1678 1681* 1681 1681* 1682 1683* P_sl_list_version parameter fixed bin(17,0) dcl 405 ref 859 878 P_sl_name parameter char packed unaligned dcl 406 set ref 567 592 593* 617 652 653* 701 734 735* 766 788 789* 791* 813 826* 837 853 913 920 935* Person_id 005222 automatic char(22) packed unaligned dcl 1585 set ref 1612* 1613 Project_id 005230 automatic char(9) packed unaligned dcl 1586 set ref 1612* 1615 REFERENCING_DIR constant fixed bin(17,0) initial dcl 1-35 ref 1190 1314 1420 1453 RESTORE constant fixed bin(17,0) initial dcl 508 ref 1653 SP constant char(1) initial packed unaligned dcl 1587 ref 1592 1592 1598 1604 1604 1607 1607 UNEXPANDED_PATH constant fixed bin(17,0) initial dcl 1-34 ref 1320 1339 1450 WORKING_DIR constant fixed bin(17,0) initial dcl 1-36 ref 1196 1316 1456 acct 005233 automatic char(32) packed unaligned dcl 1588 set ref 1612* addr builtin function dcl 482 ref 1169 1169 1334 1334 1395 1415 1450 1453 1456 1459 1462 1470 1473 af_bracket_length 005063 automatic fixed bin(17,0) dcl 1533 set ref 1550* 1557 af_bracket_start_pos 005004 automatic fixed bin(17,0) dcl 1495 set ref 1520* 1540 1543 1546 1547* 1547 1550 1562 1564 af_nesting_depth 005005 automatic fixed bin(17,0) dcl 1496 set ref 1505* 1511 1519* 1519 1520 1525* 1525 1526 1531 af_pathname based bit(1) level 2 packed packed unaligned dcl 2-3 ref 1450 af_text_length 005064 automatic fixed bin(17,0) dcl 1534 set ref 1541* 1552 af_text_start_pos 005065 automatic fixed bin(17,0) dcl 1535 set ref 1540* 1541 1552 area 4 based area level 2 dcl 437 set ref 597 657 741 835 836 841 842 893 896 907 945 950 1042* 1066 1068 1073 1134 1135 1141 1142 1178 1179 1184 1185 1362 1370 1373 1373 1375 1637 1645 1646 1693 1696 1702 1704 1704 1707 1709 1709 1712 1713 back_link 1 based offset level 2 dcl 448 set ref 943 945* 945 948 950 1365* 1702 1704 1709* change_index 4 based fixed bin(71,0) level 2 dcl 1-15 set ref 1396* change_index_p 2 based pointer level 2 dcl 1-15 set ref 1395* cleanup 000126 stack reference condition dcl 499 ref 578 631 715 776 870 927 967 cleanup_action 000100 automatic fixed bin(17,0) dcl 410 set ref 577* 630* 679* 714* 739* 775* 850* 869* 891* 926* 953* 966* 1085* 1237* 1653* 1659 cleanup_new_list_header_ptr 000102 automatic pointer dcl 411 set ref 831* 832 1130* 1131 1174* 1175 1649* 1693 1716 1716 1718 1719* cleanup_new_list_name_ptr 000104 automatic pointer dcl 413 set ref 835* 836 837 1134* 1135 1136 1178* 1179 1180 1650* 1721 1721 1723 1724* cleanup_new_search_list_ptr 000106 automatic pointer dcl 415 set ref 841* 842 844 845 1141* 1142 1144 1146 1184* 1185 1190 1191 1196 1197 1202 1203 1217 1218 1223 1224 1228 1229 1651* 1726 1726 1728 1729* cleanup_old_last_list_header_ptr 000110 automatic pointer dcl 417 set ref 1637* 1696 1698 1698 1702 cleanup_old_list_header_ptr 000112 automatic pointer dcl 419 set ref 1638* 1690 1702 1704 1704 1707 1707 1709 1709 1712 1713 1716 1756 1758 1759* cleanup_old_list_name_ptr 000114 automatic pointer dcl 421 set ref 1641* 1645* 1712 1721 1751 1753 1754* cleanup_old_search_list_ptr 000116 automatic pointer dcl 423 set ref 1642* 1646* 1713 1726 1735 1738 1739* 1745 1748 1749* cleanup_sl_list_ptr 000120 automatic pointer dcl 425 set ref 890* 902 906* 1678 1678 code 000353 automatic fixed bin(35,0) dcl 799 in begin block on line 798 set ref 816* 819 820 826* 828 828 code 15 based fixed bin(35,0) array level 3 in structure "sl_info" dcl 1-15 in procedure "search_paths_" set ref 819* 1326* 1342* 1345* 1347* 1398* code parameter fixed bin(35,0) dcl 1102 in procedure "initialize_search_list_with_default" set ref 1095 1108* 1120* 1121 1124* code parameter fixed bin(35,0) dcl 985 in procedure "get_search_segment" set ref 981 994* 1009* 1012* 1014* 1015 1019* 1031* code parameter fixed bin(35,0) dcl 1582 in procedure "expand_af" set ref 1576 1591* 1619* code parameter fixed bin(35,0) dcl 1058 in procedure "get_search_list" set ref 1051 1064* 1077* 1084* 1087* code 002721 automatic fixed bin(35,0) dcl 1268 in procedure "uid_matches_process_dir" set ref 1270* 1271 1273* 1274 code 002730 automatic fixed bin(35,0) dcl 1286 in procedure "set_linker_search_list" set ref 1322* 1324 1326 1334* 1335 1341* 1342 1342 1344* 1345 1345 code 000152 automatic fixed bin(35,0) dcl 580 in begin block on line 579 set ref 598* 599 600* 602 602* 605 605* 609 code 000610 automatic fixed bin(35,0) dcl 1154 in procedure "get_linker_search_list" set ref 1170* 1172 1172 1207* 1208 1211* 1212 code 000340 automatic fixed bin(35,0) dcl 717 in begin block on line 716 set ref 751* 755 755 code parameter fixed bin(35,0) dcl 1493 in procedure "expand_af_path" set ref 1488 1502* 1511* 1528* 1553* 1554 1559* code 000352 automatic fixed bin(35,0) dcl 783 in begin block on line 781 set ref 789* 791* 792 code parameter fixed bin(35,0) dcl 1438 in procedure "expand_search_path" set ref 1429 1447* 1450* 1478* 1479 code 002627 automatic fixed bin(35,0) dcl 1248 in procedure "uid_matches_home_dir" set ref 1251* 1252 1254* 1255 code 000243 automatic fixed bin(35,0) dcl 633 in begin block on line 632 set ref 661* 663 665* 666 688* cu_$level_get 000064 constant entry external dcl 548 ref 1002 default_search_list based structure level 1 unaligned dcl 471 default_search_list_ptr 000576 automatic pointer dcl 1105 set ref 1120* 1133 1136 1140 1144 1146 default_search_seg_ptr 000012 internal static pointer initial dcl 504 set ref 1003 1003 1026* default_segname 000566 automatic char(32) packed unaligned dcl 1104 set ref 1109* 1120* delta_pos 005006 automatic fixed bin(17,0) dcl 1497 set ref 1508* 1509 1516 dir_name 000153 automatic char(168) packed unaligned dcl 581 in begin block on line 579 set ref 600* 602 605* 609 dir_name 000244 automatic char(168) packed unaligned dcl 634 in begin block on line 632 set ref 661* 663 665* dir_name 000354 automatic char(168) packed unaligned dcl 800 in begin block on line 798 set ref 816* divide builtin function dcl 483 ref 1042 dname 002636 automatic char(168) packed unaligned dcl 1265 in procedure "uid_matches_process_dir" set ref 1270* 1273* dname 004642 automatic char(168) packed unaligned dcl 1441 in procedure "expand_search_path" set ref 1478* 1482* dname 000611 automatic char(168) packed unaligned dcl 1156 in procedure "get_linker_search_list" set ref 1207* 1211* dname 002544 automatic char(168) packed unaligned dcl 1245 in procedure "uid_matches_home_dir" set ref 1251* 1254* dname 002731 automatic char(168) packed unaligned dcl 1288 in procedure "set_linker_search_list" set ref 1341* 1344* empty builtin function dcl 484 ref 1042 ename 002710 automatic char(32) packed unaligned dcl 1266 in procedure "uid_matches_process_dir" set ref 1270* 1273* ename 003003 automatic char(32) packed unaligned dcl 1289 in procedure "set_linker_search_list" set ref 1341* 1344* ename 004714 automatic char(32) packed unaligned dcl 1442 in procedure "expand_search_path" set ref 1478* 1482* ename 000663 automatic char(32) packed unaligned dcl 1157 in procedure "get_linker_search_list" set ref 1207* 1211* ename 002616 automatic char(32) packed unaligned dcl 1246 in procedure "uid_matches_home_dir" set ref 1251* 1254* entry_type 000316 automatic char(32) packed unaligned dcl 635 in begin block on line 632 set ref 665* entry_type 000225 automatic char(32) packed unaligned dcl 582 in begin block on line 579 set ref 605* entry_type 003013 automatic fixed bin(2,0) dcl 1291 in procedure "set_linker_search_list" set ref 1344* 1347 error_table_$action_not_performed 000014 external static fixed bin(35,0) dcl 516 ref 820 922 1327 1337 error_table_$badpath 000016 external static fixed bin(35,0) dcl 518 ref 1619 error_table_$empty_search_list 000020 external static fixed bin(35,0) dcl 519 ref 828 936 1077 1172 error_table_$invalid_ring_brackets 000022 external static fixed bin(35,0) dcl 521 ref 1019 error_table_$new_search_list 000024 external static fixed bin(35,0) dcl 523 ref 830 error_table_$no_search_list 000026 external static fixed bin(35,0) dcl 525 ref 1087 1124 error_table_$no_search_list_default 000030 external static fixed bin(35,0) dcl 527 ref 794 error_table_$noentry 000032 external static fixed bin(35,0) dcl 529 ref 611 674 error_table_$notadir 000034 external static fixed bin(35,0) dcl 530 ref 1347 error_table_$pathlong 000036 external static fixed bin(35,0) dcl 531 ref 1559 error_table_$too_many_sr 000040 external static fixed bin(35,0) dcl 532 ref 1308 error_table_$unbalanced_brackets 000042 external static fixed bin(35,0) dcl 534 ref 1511 1528 error_table_$unimplemented_version 000044 external static fixed bin(35,0) dcl 536 ref 645 727 805 880 1031 expand_pathname_ 000050 constant entry external dcl 542 ref 1207 1251 1270 1341 1478 expanded_af 005066 automatic varying char(168) dcl 1536 set ref 1553* 1557 1562 1564 expanded_path parameter char packed unaligned dcl 1436 in procedure "expand_search_path" set ref 1429 1445* 1450* 1453* 1456* 1459* 1462* 1465* 1476 expanded_path parameter char packed unaligned dcl 1492 in procedure "expand_af_path" set ref 1488 1501* 1569* expansion_control parameter bit(36) packed unaligned dcl 1407 in procedure "null_referencing_dirs" ref 1404 1414 expansion_control parameter bit(36) packed unaligned dcl 1435 in procedure "expand_search_path" ref 1429 1448 first_list_header_off 1 based offset level 3 dcl 437 set ref 893 948* 1040* 1066 1370 1370* 1693 1693* 1702* found 000552 automatic bit(1) packed unaligned dcl 1060 set ref 1065* 1067 1069 1070* 1073 1077 found_count 000326 automatic fixed bin(17,0) dcl 636 set ref 659* 669* 669 674 681* 683 found_pathx 000336 automatic fixed bin(17,0) dcl 677 set ref 682* 683 686 688 688 692* 692 fs_util_$get_type 000052 constant entry external dcl 543 ref 605 665 get_pdir_ 000054 constant entry external dcl 544 ref 1007 1270 1270 1459 1470 get_ring_ 000060 constant entry external dcl 546 ref 1000 get_wdir_ 000056 constant entry external dcl 545 ref 1456 given_search_seg_ptr parameter pointer dcl 984 ref 981 996 996 hbound builtin function dcl 485 ref 1306 hcs_$get_ring_brackets 000066 constant entry external dcl 549 ref 1014 hcs_$get_search_rules 000070 constant entry external dcl 550 ref 1169 hcs_$get_uid_file 000072 constant entry external dcl 551 ref 1211 1254 1273 1482 hcs_$initiate_search_rules 000074 constant entry external dcl 552 ref 1334 hcs_$make_ptr 000076 constant entry external dcl 554 ref 1120 hcs_$make_seg 000100 constant entry external dcl 555 ref 1009 hcs_$status_minf 000102 constant entry external dcl 556 ref 1344 header based structure level 2 unaligned dcl 437 set ref 1042 home_dir_pathname 002472 automatic char(168) packed unaligned dcl 1244 set ref 1250* 1251* idx 000673 automatic fixed bin(17,0) dcl 1159 in procedure "get_linker_search_list" set ref 1187* 1188 1190 1191 1194 1196 1197 1200 1202 1203 1207 1217 1218 1223 1224 1228 1229 1229* idx 003014 automatic fixed bin(17,0) dcl 1293 in procedure "set_linker_search_list" set ref 1312* 1313 1314 1316 1318 1322 1322 1326 1331 1331* 1338* 1339 1339 1341 1342 1345 1347* index builtin function dcl 486 ref 1596 1599 1604 1607 init_sl_sw parameter bit(1) packed unaligned dcl 1055 ref 1051 1081 ioa_$rsnnl 000062 constant entry external dcl 547 ref 1008 key_home_dir 0(05) based bit(1) level 2 packed packed unaligned dcl 2-3 ref 1462 1473 key_proc_dir 0(04) based bit(1) level 2 packed packed unaligned dcl 2-3 ref 1459 1470 key_ref_dir 0(02) based bit(1) level 2 packed packed unaligned dcl 2-3 ref 1415 1453 key_work_dir 0(03) based bit(1) level 2 packed packed unaligned dcl 2-3 ref 1456 last_list_header_off 2 based offset level 3 dcl 437 set ref 943* 1041* 1365 1373 1373 1375* 1637 1696* 1707* length builtin function dcl 487 ref 1042 1507 1513 1557 1557 1564 level 000535 automatic fixed bin(17,0) dcl 990 set ref 1002* 1003 1008* 1017 1026 line parameter char packed unaligned dcl 1579 ref 1576 1592 link based offset level 2 in structure "list_header" dcl 448 in procedure "search_paths_" set ref 907 943 945 948 950* 950 1073 1364* 1373* 1698* 1704* 1707 1709 link 2 based pointer level 2 in structure "sl_list" dcl 3-3 in procedure "search_paths_" set ref 902* 1678* 1682 list_header based structure level 1 unaligned dcl 448 set ref 1362 1718 1758 list_name based structure level 1 unaligned dcl 459 set ref 835 1134 1178 1723 1753 list_name_name_count 000122 automatic fixed bin(17,0) dcl 426 set ref 834* 835 835 1133* 1134 1134 1177* 1178 1178 list_name_off 2 based offset level 2 dcl 448 set ref 836* 896 1068 1135* 1179* 1366* 1645 1712* list_name_ptr 000432 automatic pointer dcl 872 in begin block on line 871 set ref 896* 898 904 list_name_ptr 000554 automatic pointer dcl 1061 in procedure "get_search_list" set ref 1068* 1069 1070 ltrim builtin function dcl 488 ref 1504 1592 mark 54 based bit(1) array level 3 packed packed unaligned dcl 464 set ref 658* 668* 684 maxlength builtin function dcl 489 ref 1557 name 1 003015 automatic char(168) array level 2 in structure "search_rules" packed packed unaligned dcl 1295 in procedure "set_linker_search_list" set ref 1306 1314* 1316* 1318* 1322* 1331* 1341* name 1 000676 automatic char(168) array level 2 in structure "search_rules" packed packed unaligned dcl 1163 in procedure "get_linker_search_list" set ref 1188 1194 1200 1207* 1229 name_count based fixed bin(17,0) level 2 in structure "list_name" dcl 459 in procedure "search_paths_" set ref 835* 898 904 904 904 904 1069 1134* 1136 1178* 1723 1753 name_count 4 based fixed bin(17,0) level 2 in structure "sl_list" dcl 3-3 in procedure "search_paths_" set ref 899* 904 1683 name_count based fixed bin(17,0) level 2 in structure "default_search_list" dcl 471 in procedure "search_paths_" ref 1133 1136 1136 1136 1136 1144 1146 names 1 based char(32) array level 2 in structure "list_name" packed packed unaligned dcl 459 in procedure "search_paths_" set ref 837* 904 1070 1136* 1180* names 2 based char(32) array level 2 in structure "default_search_list" packed packed unaligned dcl 471 in procedure "search_paths_" ref 1136 names 10 based char(32) array level 2 in structure "sl_list" packed packed unaligned dcl 3-3 in procedure "search_paths_" set ref 904* namex 000556 automatic fixed bin(17,0) dcl 1062 set ref 1069* 1070* next_sl_list_ptr 000100 automatic pointer dcl 1676 set ref 1682* 1684 null builtin function dcl 490 ref 641 723 781 876 890 893 996 1003 1010 1067 1083 1083 1120 1120 1123 1128 1361 1373 1390 1639 1641 1642 1649 1650 1651 1663 1667 1673 1681 1690 1698 1716 1719 1721 1724 1726 1729 1735 1739 1745 1749 1751 1754 1756 1759 nullo builtin function dcl 491 ref 943 948 1040 1041 1077 1364 1366 1367 1370 1693 1698 1702 1707 num_paths 1 based fixed bin(17,0) level 2 dcl 1-15 set ref 747 815 840 844 845 845 845 845 1305 1392* 1398 1399 1666 number 003015 automatic fixed bin(17,0) level 2 in structure "search_rules" dcl 1295 in procedure "set_linker_search_list" set ref 1305* 1306 1312 1338 number 000676 automatic fixed bin(17,0) level 2 in structure "search_rules" dcl 1163 in procedure "get_linker_search_list" set ref 1183 1187 old_list_header_ptr parameter pointer dcl 1635 ref 1632 1638 1639 1645 1646 pad 5 based bit(36) array level 2 packed packed unaligned dcl 3-3 set ref 903* pad1 6 based bit(36) array level 2 dcl 1-15 set ref 1397* path 005007 automatic varying char(168) dcl 1498 set ref 1504* 1507 1508 1513 1517 1546 1552 1557 1557 1562* 1562 1562 1569 path_count parameter fixed bin(17,0) dcl 1385 in procedure "create_sl_info" ref 1380 1391 path_count 1 based fixed bin(17,0) level 2 in structure "default_search_list" dcl 471 in procedure "search_paths_" ref 1140 1144 1146 1146 1146 1146 path_count based fixed bin(17,0) level 2 in structure "search_list" dcl 464 in procedure "search_paths_" set ref 599 658 660 683 742 747 841* 844 845 1141* 1144 1146 1184* 1419 1728 1738 1748 pathname 17 based char(168) array level 3 in structure "sl_info" packed packed unaligned dcl 1-15 in procedure "search_paths_" set ref 688* 751* 758 816* 845 1322* 1331 pathname 2 based char(168) array level 3 in structure "search_list" packed packed unaligned dcl 464 in procedure "search_paths_" set ref 600* 661* 688* 751* 845* 1146* 1191* 1197* 1203* 1218* 1224* 1229* pathname based char(168) array level 3 in structure "default_search_list" packed packed unaligned dcl 471 in procedure "search_paths_" ref 1146 paths based structure array level 2 in structure "default_search_list" unaligned dcl 471 in procedure "search_paths_" paths 14 based structure array level 2 in structure "sl_info" dcl 1-15 in procedure "search_paths_" paths 1 based structure array level 2 in structure "search_list" unaligned dcl 464 in procedure "search_paths_" pathx 000426 automatic fixed bin(17,0) dcl 801 in begin block on line 798 set ref 815* 816 816 816 819* pathx 004630 automatic fixed bin(17,0) dcl 1411 in procedure "null_referencing_dirs" set ref 1419* 1420* pathx 000341 automatic fixed bin(17,0) dcl 718 in begin block on line 716 set ref 747* 749 751 751* pathx 000327 automatic fixed bin(17,0) dcl 637 in begin block on line 632 set ref 660* 661 661 668* 683* 684 686 688 688* pathx 000235 automatic fixed bin(17,0) dcl 583 in begin block on line 579 set ref 599* 600 600* pdir 000460 automatic char(168) packed unaligned dcl 988 set ref 1007* 1009* 1014* pos 005243 automatic fixed bin(17,0) dcl 1589 in procedure "expand_af" set ref 1596* 1597 1598 1599* 1604* 1605 1606 1606 1607* pos 005062 automatic fixed bin(17,0) dcl 1499 in procedure "expand_af_path" set ref 1506* 1507 1508 1513* 1516* 1516 1517 1520 1541 1550 1562 1564* ps_segname 000450 automatic char(32) packed unaligned dcl 987 set ref 1008* 1009* 1014* ref_path parameter char packed unaligned dcl 1434 in procedure "expand_search_path" ref 1429 1453 ref_path parameter char packed unaligned dcl 1408 in procedure "null_referencing_dirs" ref 1404 1415 ref_path_count 004631 automatic fixed bin(17,0) dcl 1412 set ref 1418* 1420* 1420 1424 rescan_sw 005141 automatic bit(1) packed unaligned dcl 1537 in procedure "expand_af_path" set ref 1543* 1546* 1547 1553* rescan_sw parameter bit(1) packed unaligned dcl 1580 in procedure "expand_af" ref 1576 return_value parameter varying char dcl 1581 set ref 1576 1592* 1596 1598* 1599 1604 1606* 1606 1606 1607 1613 1613* 1615 1615* 1618* ring_bracks 000532 automatic fixed bin(3,0) array dcl 989 set ref 1014* 1017 rtrim builtin function dcl 492 ref 1109 1504 1592 1613 1615 search builtin function dcl 493 ref 1508 search_list based structure level 1 unaligned dcl 464 set ref 841 1141 1184 1728 1738 1748 search_list_header_ptr parameter pointer dcl 1359 in procedure "create_search_list_header" set ref 1356 1361* 1362* 1364 1365 1366 1367 1368 1370 1373 1375 search_list_header_ptr parameter pointer dcl 1057 in procedure "get_search_list" set ref 1051 1066* 1067 1068 1073* 1073 1077 1084* search_list_header_ptr 000330 automatic pointer dcl 638 in begin block on line 632 set ref 653* 657 681* search_list_header_ptr parameter pointer dcl 1099 in procedure "initialize_search_list_with_default" set ref 1095 1123* 1128 1131* 1135 1142 search_list_header_ptr 000440 automatic pointer dcl 929 in begin block on line 928 set ref 935* 941* 943 943 945 945 948 948 950 950 search_list_header_ptr parameter pointer dcl 1384 in procedure "create_sl_info" ref 1380 1395 1396 search_list_header_ptr 000342 automatic pointer dcl 719 in begin block on line 716 set ref 735* 741 742* search_list_header_ptr 000674 automatic pointer dcl 1161 in procedure "get_linker_search_list" set ref 1170* 1171* 1175* 1179 1185 1235 1235 search_list_header_ptr 000236 automatic pointer dcl 584 in begin block on line 579 set ref 593* 597 search_list_header_ptr 000350 automatic pointer dcl 778 in begin block on line 777 set ref 789* 790* 791* 826* 827* 832* 836 842 848 848 search_list_header_ptr 000434 automatic pointer dcl 873 in begin block on line 871 set ref 893* 893* 896* 907 search_list_off 3 based offset level 2 dcl 448 set ref 597 657 741 842* 1077 1142* 1185* 1367* 1646 1713* search_list_path_count 000123 automatic fixed bin(17,0) dcl 427 set ref 840* 841 841 1140* 1141 1141 1183* 1184 1184 search_list_ptr parameter pointer dcl 1409 in procedure "null_referencing_dirs" ref 1404 1419 1420 search_list_ptr 000240 automatic pointer dcl 585 in begin block on line 579 set ref 597* 599 600 600 search_list_ptr 000344 automatic pointer dcl 720 in begin block on line 716 set ref 741* 742 742* 747 749 751 751 search_list_ptr 000332 automatic pointer dcl 639 in begin block on line 632 set ref 657* 658 660 661 661 668 683 684 686 688 688 search_rules 003015 automatic structure level 1 dcl 1295 in procedure "set_linker_search_list" set ref 1334 1334 search_rules 000676 automatic structure level 1 dcl 1163 in procedure "get_linker_search_list" set ref 1169 1169 search_seg based structure level 1 unaligned dcl 437 search_seg_ptr 000124 automatic pointer dcl 428 set ref 597 657 741 835 836 841 842 893 893 896 907 943 945 948 950 996* 1003* 1009* 1010 1023 1026 1031 1040 1041 1042 1042 1043 1066 1066 1068 1073 1134 1135 1141 1142 1178 1179 1184 1185 1362 1365 1370 1370 1370 1373 1373 1373 1373 1375 1375 1637 1637 1645 1646 1693 1693 1693 1696 1696 1702 1702 1704 1704 1707 1707 1709 1709 1712 1713 search_seg_version_2 constant fixed bin(17,0) initial dcl 512 ref 1023 1031 1043 sl_control 000135 automatic bit(36) packed unaligned dcl 2-12 set ref 1414* 1415 1448* 1450 1453 1456 1459 1462 1470 1473 sl_control_s based structure level 1 packed packed unaligned dcl 2-3 sl_info based structure level 1 dcl 1-15 set ref 1392 1666 sl_info_area based area(1024) dcl 1388 ref 1392 sl_info_area_ptr parameter pointer dcl 1383 ref 1380 1392 sl_info_num_paths 000134 automatic fixed bin(17,0) dcl 1-27 set ref 1391* 1392 1392 sl_info_pathx 000346 automatic fixed bin(17,0) dcl 721 set ref 746* 747 749 751 751 758 758* 758 sl_info_ptr parameter pointer dcl 1386 set ref 1380 1390* 1392* 1394 1395 1396 1397 1398 1399 sl_info_version_1 constant fixed bin(17,0) initial dcl 1-29 ref 643 725 803 1394 sl_list based structure level 1 unaligned dcl 3-3 set ref 899 1683 sl_list_area based area(1024) dcl 874 ref 899 sl_list_name_count 000136 automatic fixed bin(17,0) dcl 3-11 set ref 898* 899 899 sl_list_version_2 constant fixed bin(17,0) initial dcl 3-12 ref 878 901 sl_name parameter char packed unaligned dcl 1054 in procedure "get_search_list" set ref 1051 1070 1084* sl_name parameter char packed unaligned dcl 1098 in procedure "initialize_search_list_with_default" set ref 1095 1109 1120* sp_type 004600 automatic fixed bin(17,0) dcl 1299 set ref 1313* 1314 1316 1318 1320 1320 1320 1322* substr builtin function dcl 494 set ref 1508 1517 1546 1552 1562 1562 1598* 1606 1606 sys_info$max_seg_size 000046 external static fixed bin(19,0) dcl 538 ref 1042 this_ring 000010 internal static fixed bin(17,0) initial dcl 503 set ref 1000 1000* 1003 1026 type based fixed bin(17,0) array level 3 in structure "default_search_list" dcl 471 in procedure "search_paths_" ref 1144 type 1 based fixed bin(17,0) array level 3 in structure "search_list" dcl 464 in procedure "search_paths_" set ref 600* 661* 686 688* 749 751* 844* 1144* 1190* 1196* 1202* 1217* 1223* 1228* 1420 type 14 based fixed bin(17,0) array level 3 in structure "sl_info" dcl 1-15 in procedure "search_paths_" set ref 686* 749* 816* 844 1313 1339 1339 type parameter fixed bin(17,0) dcl 1432 in procedure "expand_search_path" ref 1429 1450 1453 1456 1459 1462 1468 1468 1468 1470 1473 uid 002626 automatic bit(36) dcl 1247 in procedure "uid_matches_home_dir" set ref 1254* 1257 uid 16 based bit(36) array level 3 in structure "sl_info" dcl 1-15 in procedure "search_paths_" set ref 688* 751* 816* 1399* uid 002720 automatic bit(36) dcl 1267 in procedure "uid_matches_process_dir" set ref 1273* 1276 uid 002461 automatic bit(36) dcl 1167 in procedure "get_linker_search_list" set ref 1211* 1215* 1221* uid 004601 automatic bit(36) dcl 1301 in procedure "set_linker_search_list" set ref 1322* uid_path 004724 automatic char(168) packed unaligned dcl 1443 set ref 1470* 1473* 1476* 1478* unexpanded_af 005142 automatic char(168) packed unaligned dcl 1538 set ref 1552* 1553* unexpanded_path parameter char packed unaligned dcl 1433 in procedure "expand_search_path" set ref 1429 1450* 1465 unexpanded_path parameter char packed unaligned dcl 1491 in procedure "expand_af_path" ref 1488 1504 unique_id parameter bit(36) dcl 1264 in procedure "uid_matches_process_dir" ref 1262 1276 unique_id parameter bit(36) dcl 1437 in procedure "expand_search_path" set ref 1429 1446* 1482* unique_id parameter bit(36) dcl 1243 in procedure "uid_matches_home_dir" ref 1241 1257 unspec builtin function dcl 495 ref 1042 update_count 4 based fixed bin(71,0) level 2 dcl 448 set ref 848* 848 1235* 1235 1368* 1395 1396 user_info_ 000104 constant entry external dcl 558 ref 1612 user_info_$homedir 000106 constant entry external dcl 559 ref 1250 1462 1473 version based fixed bin(17,0) level 3 in structure "search_seg" dcl 437 in procedure "search_paths_" set ref 1023 1031 1043* version based fixed bin(17,0) level 2 in structure "sl_list" dcl 3-3 in procedure "search_paths_" set ref 901* version based fixed bin(17,0) level 2 in structure "sl_info" dcl 1-15 in procedure "search_paths_" set ref 803 1394* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. sl_control_default internal static bit(36) initial packed unaligned dcl 2-13 sl_info_p automatic pointer dcl 1-28 NAMES DECLARED BY EXPLICIT CONTEXT. action 000000 constant label array(0:5) dcl 1663 ref 1659 1669 1686 1731 1741 1761 cleanup_ 007001 constant entry internal dcl 1656 ref 578 631 715 776 851 870 927 954 967 1238 create_search_list_header 005267 constant entry internal dcl 1356 ref 831 1130 1174 create_sl_info 005342 constant entry internal dcl 1380 ref 681 742 delete_list 002626 constant entry external dcl 913 expand_af 006427 constant entry internal dcl 1576 ref 1553 expand_af_path 006072 constant entry internal dcl 1488 ref 1450 expand_search_path 005532 constant entry internal dcl 1429 ref 600 661 688 751 816 1322 find_all 000500 constant entry external dcl 617 find_dir 000144 constant entry external dcl 567 get 001170 constant entry external dcl 701 get_linker_search_list 004136 constant entry internal dcl 1151 ref 592 652 734 788 813 888 get_search_list 003366 constant entry internal dcl 1051 ref 593 653 735 789 826 935 1170 get_search_segment 003106 constant entry internal dcl 981 ref 589 649 731 785 809 884 932 970 init_search_seg 003033 constant entry external dcl 960 initialize_search_list_with_default 003543 constant entry internal dcl 1095 ref 791 1084 initialize_search_segment 003346 constant entry internal dcl 1037 ref 973 1023 list 002361 constant entry external dcl 859 null_referencing_dirs 005451 constant entry internal dcl 1404 ref 742 search_paths_ 000130 constant entry external dcl 391 set 001542 constant entry external dcl 766 set_linker_search_list 004717 constant entry internal dcl 1283 ref 853 set_up_to_restore_on_cleanup 006736 constant entry internal dcl 1632 ref 790 827 941 1083 1171 uid_matches_home_dir 004502 constant entry internal dcl 1241 ref 1215 uid_matches_process_dir 004611 constant entry internal dcl 1262 ref 1221 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 10346 10456 7640 10356 Length 11020 7640 110 326 506 4 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME search_paths_ 3474 external procedure is an external procedure. on unit on line 578 64 on unit begin block on line 579 begin block shares stack frame of external procedure search_paths_. on unit on line 631 64 on unit begin block on line 632 begin block shares stack frame of external procedure search_paths_. begin block on line 676 begin block shares stack frame of external procedure search_paths_. on unit on line 715 64 on unit begin block on line 716 begin block shares stack frame of external procedure search_paths_. on unit on line 776 64 on unit begin block on line 777 begin block shares stack frame of external procedure search_paths_. begin block on line 781 begin block shares stack frame of external procedure search_paths_. begin block on line 798 begin block shares stack frame of external procedure search_paths_. on unit on line 870 64 on unit begin block on line 871 begin block shares stack frame of external procedure search_paths_. on unit on line 927 64 on unit begin block on line 928 begin block shares stack frame of external procedure search_paths_. on unit on line 967 64 on unit get_search_segment internal procedure shares stack frame of external procedure search_paths_. initialize_search_segment internal procedure shares stack frame of external procedure search_paths_. get_search_list internal procedure shares stack frame of external procedure search_paths_. initialize_search_list_with_default internal procedure shares stack frame of external procedure search_paths_. get_linker_search_list internal procedure shares stack frame of external procedure search_paths_. uid_matches_home_dir internal procedure shares stack frame of external procedure search_paths_. uid_matches_process_dir internal procedure shares stack frame of external procedure search_paths_. set_linker_search_list internal procedure shares stack frame of external procedure search_paths_. create_search_list_header internal procedure shares stack frame of external procedure search_paths_. create_sl_info internal procedure shares stack frame of external procedure search_paths_. null_referencing_dirs internal procedure shares stack frame of external procedure search_paths_. expand_search_path internal procedure shares stack frame of external procedure search_paths_. expand_af_path internal procedure shares stack frame of external procedure search_paths_. expand_af internal procedure shares stack frame of external procedure search_paths_. set_up_to_restore_on_cleanup internal procedure shares stack frame of external procedure search_paths_. cleanup_ 70 internal procedure is called by several nonquick procedures. begin block on line 1673 begin block shares stack frame of internal procedure cleanup_. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 this_ring search_paths_ 000012 default_search_seg_ptr search_paths_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME cleanup_ 000100 next_sl_list_ptr begin block on line 1673 search_paths_ 000100 cleanup_action search_paths_ 000102 cleanup_new_list_header_ptr search_paths_ 000104 cleanup_new_list_name_ptr search_paths_ 000106 cleanup_new_search_list_ptr search_paths_ 000110 cleanup_old_last_list_header_ptr search_paths_ 000112 cleanup_old_list_header_ptr search_paths_ 000114 cleanup_old_list_name_ptr search_paths_ 000116 cleanup_old_search_list_ptr search_paths_ 000120 cleanup_sl_list_ptr search_paths_ 000122 list_name_name_count search_paths_ 000123 search_list_path_count search_paths_ 000124 search_seg_ptr search_paths_ 000134 sl_info_num_paths search_paths_ 000135 sl_control search_paths_ 000136 sl_list_name_count search_paths_ 000152 code begin block on line 579 000153 dir_name begin block on line 579 000225 entry_type begin block on line 579 000235 pathx begin block on line 579 000236 search_list_header_ptr begin block on line 579 000240 search_list_ptr begin block on line 579 000243 code begin block on line 632 000244 dir_name begin block on line 632 000316 entry_type begin block on line 632 000326 found_count begin block on line 632 000327 pathx begin block on line 632 000330 search_list_header_ptr begin block on line 632 000332 search_list_ptr begin block on line 632 000336 found_pathx begin block on line 676 000340 code begin block on line 716 000341 pathx begin block on line 716 000342 search_list_header_ptr begin block on line 716 000344 search_list_ptr begin block on line 716 000346 sl_info_pathx begin block on line 716 000350 search_list_header_ptr begin block on line 777 000352 code begin block on line 781 000353 code begin block on line 798 000354 dir_name begin block on line 798 000426 pathx begin block on line 798 000432 list_name_ptr begin block on line 871 000434 search_list_header_ptr begin block on line 871 000440 search_list_header_ptr begin block on line 928 000450 ps_segname get_search_segment 000460 pdir get_search_segment 000532 ring_bracks get_search_segment 000535 level get_search_segment 000552 found get_search_list 000554 list_name_ptr get_search_list 000556 namex get_search_list 000566 default_segname initialize_search_list_with_default 000576 default_search_list_ptr initialize_search_list_with_default 000610 code get_linker_search_list 000611 dname get_linker_search_list 000663 ename get_linker_search_list 000673 idx get_linker_search_list 000674 search_list_header_ptr get_linker_search_list 000676 search_rules get_linker_search_list 002461 uid get_linker_search_list 002472 home_dir_pathname uid_matches_home_dir 002544 dname uid_matches_home_dir 002616 ename uid_matches_home_dir 002626 uid uid_matches_home_dir 002627 code uid_matches_home_dir 002636 dname uid_matches_process_dir 002710 ename uid_matches_process_dir 002720 uid uid_matches_process_dir 002721 code uid_matches_process_dir 002730 code set_linker_search_list 002731 dname set_linker_search_list 003003 ename set_linker_search_list 003013 entry_type set_linker_search_list 003014 idx set_linker_search_list 003015 search_rules set_linker_search_list 004600 sp_type set_linker_search_list 004601 uid set_linker_search_list 004630 pathx null_referencing_dirs 004631 ref_path_count null_referencing_dirs 004642 dname expand_search_path 004714 ename expand_search_path 004724 uid_path expand_search_path 005004 af_bracket_start_pos expand_af_path 005005 af_nesting_depth expand_af_path 005006 delta_pos expand_af_path 005007 path expand_af_path 005062 pos expand_af_path 005063 af_bracket_length expand_af_path 005064 af_text_length expand_af_path 005065 af_text_start_pos expand_af_path 005066 expanded_af expand_af_path 005141 rescan_sw expand_af_path 005142 unexpanded_af expand_af_path 005222 Person_id expand_af 005230 Project_id expand_af 005233 acct expand_af 005243 pos expand_af THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as r_ne_as alloc_char_temp alloc_temp cat_realloc_chars call_ext_out_desc call_ext_out call_int_this call_int_other begin_return_mac return_mac bound_ck_signal enable_op shorten_stack ext_entry ext_entry_desc int_entry pointer_hard offset_hard op_alloc_ op_freen_ op_empty_ verify_for_ltrim verify_for_rtrim THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. cu_$level_get expand_pathname_ fs_util_$get_type get_pdir_ get_ring_ get_wdir_ hcs_$get_ring_brackets hcs_$get_search_rules hcs_$get_uid_file hcs_$initiate_search_rules hcs_$make_ptr hcs_$make_seg hcs_$status_minf ioa_$rsnnl user_info_ user_info_$homedir THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$action_not_performed error_table_$badpath error_table_$empty_search_list error_table_$invalid_ring_brackets error_table_$new_search_list error_table_$no_search_list error_table_$no_search_list_default error_table_$noentry error_table_$notadir error_table_$pathlong error_table_$too_many_sr error_table_$unbalanced_brackets error_table_$unimplemented_version sys_info$max_seg_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 391 000127 567 000135 577 000202 578 000204 587 000226 588 000234 589 000235 590 000245 592 000251 593 000261 594 000311 597 000315 598 000323 599 000325 600 000337 602 000411 605 000421 607 000452 609 000454 611 000465 613 000470 617 000471 630 000533 631 000535 641 000557 642 000561 643 000562 645 000566 646 000571 649 000573 650 000603 652 000607 653 000617 654 000647 657 000653 658 000661 659 000674 660 000675 661 000705 663 000757 665 000765 666 001014 668 001016 669 001022 672 001023 674 001025 679 001033 681 001035 682 001052 683 001054 684 001066 686 001073 688 001104 692 001155 694 001156 697 001160 701 001161 714 001216 715 001220 723 001242 724 001244 725 001245 727 001251 728 001254 731 001256 732 001266 734 001272 735 001302 736 001332 739 001336 741 001340 742 001346 746 001413 747 001415 749 001432 751 001442 755 001512 758 001520 760 001532 762 001534 766 001535 775 001564 776 001566 780 001610 781 001611 785 001615 786 001625 788 001631 789 001641 790 001671 791 001673 792 001715 794 001717 795 001722 781 001724 803 001725 805 001731 806 001734 809 001736 810 001746 813 001752 815 001762 816 001773 819 002047 820 002056 822 002062 823 002064 826 002070 827 002120 828 002122 830 002127 831 002131 832 002133 834 002135 835 002137 836 002151 837 002157 840 002166 841 002172 842 002204 844 002212 845 002244 847 002330 848 002331 850 002335 851 002337 853 002343 855 002353 859 002354 869 002373 870 002375 876 002417 877 002422 878 002423 880 002426 881 002431 884 002433 885 002443 888 002447 890 002450 891 002452 893 002454 896 002466 898 002474 899 002476 901 002512 902 002514 903 002516 904 002531 906 002610 907 002613 909 002621 913 002622 920 002646 922 002655 923 002660 926 002661 927 002663 931 002705 932 002706 933 002716 935 002722 936 002752 938 002757 941 002763 943 002765 945 002775 948 003003 950 003013 953 003020 954 003022 956 003026 960 003027 966 003045 967 003047 969 003071 970 003072 971 003102 973 003104 974 003105 981 003106 994 003110 996 003111 1000 003121 1002 003135 1003 003143 1007 003156 1008 003164 1009 003215 1010 003255 1012 003262 1014 003264 1015 003311 1017 003315 1019 003320 1020 003323 1023 003324 1026 003330 1031 003336 1033 003345 1037 003346 1040 003347 1041 003352 1042 003353 1043 003363 1044 003365 1051 003366 1064 003377 1065 003401 1066 003402 1067 003407 1068 003417 1069 003426 1070 003437 1071 003452 1073 003454 1075 003465 1077 003466 1080 003500 1081 003501 1083 003506 1084 003512 1085 003534 1086 003536 1087 003537 1088 003542 1095 003543 1108 003554 1109 003556 1120 003605 1121 003641 1123 003644 1124 003646 1125 003651 1128 003652 1130 003656 1131 003660 1133 003663 1134 003665 1135 003677 1136 003707 1138 003761 1140 003762 1141 003765 1142 003777 1144 004007 1146 004044 1148 004134 1151 004136 1169 004137 1170 004150 1171 004157 1172 004161 1174 004166 1175 004170 1177 004172 1178 004174 1179 004206 1180 004214 1183 004220 1184 004222 1185 004234 1187 004242 1188 004251 1190 004260 1191 004266 1193 004272 1194 004273 1196 004277 1197 004305 1199 004311 1200 004312 1202 004316 1203 004324 1205 004330 1207 004331 1208 004355 1211 004360 1212 004405 1215 004410 1217 004415 1218 004423 1220 004427 1221 004430 1223 004435 1224 004443 1226 004447 1228 004450 1229 004456 1233 004465 1235 004467 1237 004473 1238 004475 1239 004501 1241 004502 1250 004504 1251 004515 1252 004541 1254 004546 1255 004573 1257 004600 1258 004607 1262 004611 1270 004613 1271 004647 1273 004654 1274 004701 1276 004706 1277 004715 1283 004717 1305 004720 1306 004724 1308 004726 1309 004731 1312 004732 1313 004741 1314 004747 1316 004760 1318 004771 1320 005002 1322 005010 1324 005056 1326 005060 1327 005067 1328 005072 1330 005073 1331 005074 1332 005104 1334 005106 1335 005121 1337 005123 1338 005126 1339 005135 1341 005147 1342 005176 1344 005204 1345 005244 1347 005253 1350 005264 1352 005266 1356 005267 1361 005271 1362 005273 1364 005302 1365 005304 1366 005307 1367 005311 1368 005312 1370 005314 1373 005323 1375 005335 1376 005341 1380 005342 1390 005344 1391 005346 1392 005350 1394 005364 1395 005366 1396 005372 1397 005400 1398 005413 1399 005432 1400 005450 1404 005451 1414 005462 1415 005467 1418 005501 1419 005502 1420 005513 1422 005524 1424 005526 1429 005532 1445 005555 1446 005562 1447 005563 1448 005564 1450 005570 1453 005622 1456 005636 1459 005661 1462 005704 1465 005724 1468 005732 1470 005747 1473 005766 1476 006005 1478 006012 1479 006037 1482 006043 1484 006071 1488 006072 1501 006110 1502 006115 1504 006116 1505 006153 1506 006154 1507 006156 1508 006161 1509 006200 1511 006201 1513 006207 1514 006212 1516 006213 1517 006214 1519 006221 1520 006222 1522 006230 1525 006231 1526 006233 1528 006235 1529 006241 1531 006242 1540 006243 1541 006246 1543 006252 1546 006260 1547 006267 1550 006274 1552 006277 1553 006304 1554 006331 1557 006335 1559 006342 1560 006345 1562 006346 1564 006412 1568 006416 1569 006417 1570 006426 1576 006427 1591 006445 1592 006447 1596 006502 1597 006514 1598 006516 1599 006523 1600 006535 1604 006536 1605 006555 1606 006560 1607 006613 1608 006631 1612 006632 1613 006653 1615 006703 1618 006731 1619 006732 1621 006735 1632 006736 1637 006740 1638 006745 1639 006751 1641 006755 1642 006757 1643 006760 1645 006761 1646 006765 1649 006771 1650 006773 1651 006774 1653 006775 1654 006777 1656 007000 1659 007006 1663 007011 1666 007016 1667 007025 1669 007030 1673 007032 1678 007040 1681 007052 1682 007064 1683 007070 1684 007075 1686 007102 1690 007104 1693 007111 1696 007122 1698 007127 1700 007135 1702 007136 1704 007150 1707 007162 1709 007173 1712 007204 1713 007211 1716 007214 1718 007224 1719 007226 1721 007231 1723 007241 1724 007246 1726 007251 1728 007261 1729 007266 1731 007271 1735 007273 1738 007300 1739 007305 1741 007310 1745 007312 1748 007317 1749 007324 1751 007327 1753 007333 1754 007340 1756 007343 1758 007347 1759 007351 1761 007354 1765 007356 ----------------------------------------------------------- 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