1 02/19/85  check_gate_access_
 2 
 3 
 4 This subroutine will allow a caller to determine whether a user has
 5 access to a gate before trying to call it.  It will differentiate
 6 between not finding the gate and not having access.
 7 
 8 
 9 Entry points in check_gate_access_:
10    (List is generated by the help command)
11 
12 
13 :Entry:  check_gate_access_:  02/19/85 check_gate_access_
14 
15 
16 Function:
17 allows a caller to determine whether a user has access to a gate
18 before trying to call it.
19 
20 
21 Syntax:
22 dcl check_gate_access_ entry (char(*), ptr, fixed bin (35));
23 call check_gate_access_ (gate_name, ref_ptr, code);
24 
25 
26 Arguments:
27 gate_name
28    is the name of the gate.  (e.g., "phcs_")
29 ref_ptr
30    is a pointer used to determine the desired referencing directory.
31    (Input) It can be null (), in which case the referencing_dir search
32    rule is not used, or can be a pointer to a procedure, usually the
33    caller of check_gate_access_, whose containing directory will be
34    used as the referencing directory.
35 code
36    is a standard system status code.  (Output) It's value will be zero
37    if the gate is located using the search rules of the current ring
38    and if the access to the gate includes execute access.  If the gate
39    cannot be located, the error code returned is error_table_$noentry.
40    If the gate is located, but execute access is lacking, then
41    error_table_$moderr is returned.
42 
43 
44 Notes:  Programs which can take alternate paths based on the access of
45 lack of access to a gate should use this subroutine rather than trying
46 to reference the gate explicitly and generating an access violation
47 audit message in the process.