/* ****************************************************** * * * * * Copyright (c) 1972 by Massachusetts Institute of * * Technology and Honeywell Information Systems, Inc. * * * * * ****************************************************** */ set_search_dirs: ssd: procedure options (variable); /* Created 770322 by PG from old version that was combined with set_search_rules. This command is obsolete. */ /* automatic */ dcl dname char (168), /* directory path name */ ename char (32), /* entry name */ arg char (len) based (p), /* an argument string */ p ptr; dcl (i, junk, type, /* type of segment */ nargs) fixed bin, /* number of arguments */ code fixed bin (35), len fixed bin (21); dcl 1 search_rules, /* the search rule structure */ 2 num fixed bin, /* the number of search rules */ 2 names (21) char (168) aligned; /* the search rules */ /* builtins */ dcl (addr, rtrim) builtin; /* entries */ dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin (21), fixed bin (35)), cu_$arg_count entry (fixed bin), expand_pathname_ entry (char (*), char (*), char (*), fixed bin (35)), hcs_$initiate_search_rules entry (ptr, fixed bin (35)), hcs_$status_minf entry (char (*), char (*), fixed bin, fixed bin, fixed bin, fixed bin (35)), com_err_ entry options (variable); /* external static */ dcl error_table_$notadir fixed bin (35) external static; /* internal static options (constant) */ dcl caller char (15) internal static options (constant) initial ("set_search_dirs"); /* program */ call cu_$arg_count (nargs); /* how many arguments are there */ if nargs = 0 then do; search_rules.num = 1; /* only one necessary */ search_rules.names (1) = "default"; /* and this is it */ end; else do; search_rules.num = nargs + 1; /* make room for ssd key word */ search_rules.names (1) = "set_search_directories"; do i = 1 to nargs; /* start with second name */ call cu_$arg_ptr (i, p, len, code); /* get an argument */ call expand_pathname_ (arg, dname, ename, code); /* if not a key word then a sub-directory */ if code ^= 0 then go to print_error; /* something went wrong */ if dname = ">" then search_rules.names (i+1) = ">" || ename; /* for the root */ else search_rules.names (i+1) = rtrim (dname) || ">" || ename; call hcs_$status_minf (dname, ename, 1, type, junk, code); /* is it a directory */ if code ^= 0 then go to print_error; /* what's wrong now */ if type ^= 2 then do; /* is it a directory */ code = error_table_$notadir; go to print_error; /* print the error and return */ end; end; /* end of argument loop */ end; call hcs_$initiate_search_rules (addr (search_rules), code); if code ^= 0 then do; call com_err_ (code, caller, ""); return; end; return; print_error: call com_err_ (code, caller, "^a", arg); /* print the error and the arg */ return; end; */ ----------------------------------------------------------- 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 */