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 <wsmincap.h>
23 #include <ws_mcb.h>
24 #include <ws_error.h>
25
26 #define BYTE_SHIFT 8
27
28 termcap (cap_num,mcb_ptr)
29
30 int cap_num;
31 mcb *mcb_ptr;
32 {
33 int sysid;
34 int major;
35
36
37
38 sysid = ((cap_num & 0xff00) >> BYTE_SHIFT);
39 major = (cap_num & 0xff);
40
41 if (mcb_ptr == NULL)
42 return (WSINVMCB);
43
44 if ((sysid != WSMULTICS) && (sysid != WSIBMPC))
45 return(WSINVSYS);
46
47 if ((major < WSMAJCAP) && (major > MAX_CAPABILITY_NUMBER))
48 return(WSINVNUM);
49
50 return (execap (cap_num, TERMINATE_APPLICATION, NULL, 0, mcb_ptr));
51 }