1 03/04/85  dl_handler_
 2 
 3 
 4 This subroutine has three entry points that issue queries for each of
 5 three situations involving deletion.  These situations are:
 6 
 7      Deletion of an entry whose safety switch or copy switch is on.
 8      Deletion via a starname that matches all entries, e.g. "**".
 9      Deletion of a directory (delete_dir always queries).
10 
11 This subroutine returns a status code depending on the user's answer.
12 If the user answers "yes", all three entry points turn off the safety
13 and copy switches, and in the case of a directory, set sma to the user
14 before returning.
15 
16 
17 Entry points in dl_handler_:
18    (List is generated by the help command)
19 
20 
21 :Entry: dl_handler_:  03/04/85  dl_handler_
22 
23 
24 Function:
25 The dl_handler_ entry point, called when an entry has its safety switch
26 or copy switch on, issues a query of the form:
27 
28         <caller>:  <path> is protected.  Do you want to delete it?
29 
30 If the user answers yes, dl_handler_ turns off both switches and
31 returns a zero status code.
32 
33 
34 Syntax:
35 dcl dl_handler_ entry (char(*), char(*), char(*), fixed bin(35));
36 call dl_handler_ (caller, dn, en, code);
37 
38 
39 Arguments:
40 caller
41    is the name of the calling program, used to print the query.
42    (Input)
43 dn
44    is the directory name.  (Input)
45 en
46    is the entry name.  (Input)
47 code
48    is a standard status code.  (Output) It can be:
49    0  the user answered yes, switches have been turned off, and the
50       entry can now be deleted.
51    error_table_$action_not_performed
52       the user answered no.
53    other codes
54       the switches could not be turned off.
55 
56 
57 The two other entry points have the same calling sequence as
58 dl_handler_.
59 
60 
61 :Entry:  dblstar:  03/04/85 dl_handler_$dblstar
62 
63 
64 Function:  This entry point issues the query:
65 
66         Do you want to '<caller> <en>' in <dn>?
67 
68 where caller, the name of the calling program, is assumed to be a
69 suitable verb.  This entry point is called, for example, by the delete
70 and unlink commands, which also pass a double starname as the value of
71 en:
72 
73         Do you want to 'delete **' in <dir_path>?
74         Do you want to 'unlink **' in <dir_path>?
75 
76 
77 
78 :Entry:  dirdelete:  03/04/85 dl_handler_$dirdelete
79 
80 
81 Function:  This entry point assumes it is given a directory pathname,
82 and issues the query:
83 
84         <caller>:  Do you want to delete the directory dn>en?
85 
86 This entry point is called, for example, by the delete_dir command.