1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 #include <stdio.h>
21 #include <ws.h>
22 #include <ws_mcb.h>
23 #include <ws_error.h>
24 #include <ws_func.h>
25 #include <ws_dcls.h>
26
27 extern char local_system;
28
29 execom (p_command, p_ws_system, p_cmd_id, p_mcb_ptr)
30
31 char *p_command;
32 int p_ws_system;
33 unsigned *p_cmd_id;
34 mcb *p_mcb_ptr;
35 {
36 struct execom_struc param;
37
38
39 if ((p_ws_system != WSLOCAL) && (p_ws_system != WSREMOTE))
40 return(WSINVSYS);
41
42 if (p_mcb_ptr == NULL)
43 return(WSINVMCB);
44
45 param.com_len = strlen(p_command);
46 if (param.com_len > WSPAKSIZ)
47 return (WSINVBUF);
48 strcpy(¶m.command[0],p_command);
49
50 if (p_ws_system == WSLOCAL)
51 p_ws_system = local_system;
52 else if (p_ws_system == WSREMOTE)
53 p_ws_system = WSMULTICS;
54
55 param.system = p_ws_system;
56 param.major = p_mcb_ptr->major_capability;
57
58 call_mowse_int(I$EXECOM,¶m,sizeof(param));
59
60
61
62 *p_cmd_id = param.cmd_id;
63 return(param.status);
64 }
65 ^Z