1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 #include <dos.h>
25 #include <stdio.h>
26 #include <ws_msg.h>
27 #include <wsmincap.h>
28 #include <cat.h>
29 #include <ws_dcls.h>
30
31 #define INTERNAL 32
32 #define HEADER_LENGTH 5
33
34 extern local_cat l_CAT[];
35
36 i_connect (p_params)
37
38 struct i_connect_request *p_params;
39 {
40 struct null_msg message;
41
42 message.system = p_params -> system;
43 message.major = INTERNAL;
44 message.minor = REQUEST_CONNECT;
45 message.source_system = p_params -> source_system;
46 message.source_major = p_params -> source_major;
47
48 return (send_i_mess (&message,HEADER_LENGTH,p_params->connect_command,strlen(p_params->connect_command)));
49 }
50
51
52
53
54
55
56
57 find_local_capability (p_name)
58
59 char *p_name;
60 {
61 int i,j;
62 char cap_name[CAPABILITY_NAME_LENGTH];
63 int cap_num;
64 int code;
65
66 for (i = 0; i < CAPABILITY_NAME_LENGTH; i++)
67 { code = get_mcb_values (&l_CAT[i],cap_name,&cap_num);
68 if (code == 0)
69 { for (j = 0; (p_name[j] == cap_name[j]) && (j < CAPABILITY_NAME_LENGTH); j++)
70 { if (p_name[j] == NULL)
71 return(cap_num);
72 }
73 }
74 }
75 return(0);
76 }
77 ^Z