1 /*****************************************************************************
2
3 ExeUnd()
4
5 This function executes an underscore (_) command.
6
7 *****************************************************************************/
8
9 #include "zport.h" /* define portability identifiers */
10 #include "tecoc.h" /* define general identifiers */
11 #include "defext.h" /* define external global variables */
12 #include "deferr.h" /* define identifiers for error messages */
13
ExeUnd()14 DEFAULT ExeUnd() /* execute a _ (underscore) command */
15 {
16 DBGFEN(1,"ExeUnd",NULL);
17
18 /*
19 * The command m,n_ is illegal: the user should use m,nFB
20 */
21
22 if (CmdMod & MARGIS) { /* if it's m,n_ */
23 ErrStr(ERR_ILL, "m,n_"); /* illegal command "m,n_" */
24 DBGFEX(1,DbgFNm,"FAILURE");
25 return FAILURE;
26 }
27
28 if (CmdMod & DCOLON) { /* if it's ::_ */
29 ErrStr(ERR_ILL, "::_"); /* illegal command "::_" */
30 DBGFEX(1,DbgFNm,"FAILURE");
31 return FAILURE;
32 }
33
34 SrcTyp = U_SEARCH;
35
36 if (Search(FALSE) == FAILURE) {
37 DBGFEX(1,DbgFNm,"FAILURE");
38 return FAILURE;
39 }
40
41 CmdMod = '\0'; /* clear modifiers flags */
42
43 DBGFEX(1,DbgFNm,"SUCCESS");
44 return SUCCESS;
45 }
46