/* *********************************************************** * * * Copyright, (C) Honeywell Information Systems Inc., 1982 * * * *********************************************************** */ dft: default: proc; /* This active function is used to insert the arg1 default value into a command line whenever the optional second argument is not supplied, or is zero length. */ /* Usage: [default {}] */ /* Concept by Mike Grady, this version by Bob May, 9/30/76 */ /* Modified 10/07/83 Charlie Spitzer. let work as a command. */ dcl code fixed bin (35), /* standard return code */ entrypoint_name char (7) init ("default") int static options (constant); dcl error_table_$wrong_no_of_args fixed bin (35) external; dcl error_table_$not_act_fnc fixed bin(35) ext static; dcl active_func bit (1) aligned; dcl error entry variable entry options (variable); dcl af_arg_count fixed bin, /* to process input args */ af_arg_ptr ptr, af_arg_cc fixed bin, af_arg char (af_arg_cc) based (af_arg_ptr); dcl af_return_arg_ptr ptr, /* to return result */ af_return_arg_cc fixed bin, af_return_arg char (af_return_arg_cc) varying based (af_return_arg_ptr); dcl cu_$af_return_arg entry (fixed bin, ptr, fixed bin, fixed bin (35)), cu_$arg_ptr entry (fixed bin, ptr, fixed bin, fixed bin (35)), active_fnc_err_ entry options (variable), com_err_ entry() options(variable), ioa_ entry() options(variable); call cu_$af_return_arg (af_arg_count, af_return_arg_ptr, af_return_arg_cc, code); if code = 0 then active_func = "1"b; else if code = error_table_$not_act_fnc then active_func = "0"b; else do; call active_fnc_err_ (code, entrypoint_name, "Attempting to get calling sequence parameters."); return; /* just in case we ever get back here */ end; if active_func then error = active_fnc_err_; else error = com_err_; if af_arg_count = 0 | af_arg_count > 2 then do; call error (error_table_$wrong_no_of_args, entrypoint_name, "^/Usage: ^[[^]default {}^[]^]", active_func, active_func); return; end; rerun: call cu_$arg_ptr (af_arg_count, af_arg_ptr, af_arg_cc, code); if code ^= 0 then do; call error (code, entrypoint_name, "Getting argument ^d from command line.", af_arg_count); return; end; if af_arg_count = 2 then if af_arg_cc = 0 /* If arg2 is zero length, then return arg1 */ then do; /* If we use arg1 and it is zero length... */ af_arg_count = 1; /* ... then return it anyway */ go to rerun; end; if active_func then af_return_arg = af_arg; else call ioa_ ("^a", af_arg); return; end /* default */ ; */ ----------------------------------------------------------- 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 */