Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dtcm / server / programtable.c
1 /* $XConsortium: programtable.c /main/4 1995/11/09 12:47:18 rswiston $ */
2 /*
3  *  (c) Copyright 1993, 1994 Hewlett-Packard Company
4  *  (c) Copyright 1993, 1994 International Business Machines Corp.
5  *  (c) Copyright 1993, 1994 Novell, Inc.
6  *  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
7  */
8
9 /* implements the program table for this program number */
10 /* this module doesn't know anything about the specifics of any */
11 /* rtable except how many rtables are supported */
12 /*  - ie it doesn't include rtable*.h.  */
13 /* The actual program table entries are filled in by the rtable*.c's */
14
15 #include <EUSCompat.h>
16 #include <stdio.h>
17 #include <rpc/rpc.h>
18 #include "rpcextras.h"
19
20 program_table ptable[] = {
21         (struct rpcgen_table *)NULL, 0, /* rtable 0 no longer supported */
22         (struct rpcgen_table *)NULL, 0, /* rtable 1 no longer supported */
23         (struct rpcgen_table *)NULL, 0, /* rtable 2 filled in by rtable2.c */
24         (struct rpcgen_table *)NULL, 0, /* rtable 3 filled in by rtable3.c */
25         (struct rpcgen_table *)NULL, 0, /* rtable 4 filled in by rtable4.c */
26         (struct rpcgen_table *)NULL, 0, /* rtable 5 filled in by cmsfunc.c */
27         }; 
28         
29 /* program_num is filled in from one of the rtable*.c's so that */
30 /* it can be declared from one of the rtable*.h's */
31 program_object po = {
32         &ptable[0], 0, 0,
33         };
34         
35 program_handle program = &po;
36
37 program_handle newph() 
38 {
39         extern void initrtable2();
40         extern void initrtable3();
41         extern void initrtable4();
42         extern void initfunctable();
43         
44         program->nvers = sizeof(ptable)/sizeof(ptable[0]);
45         initrtable2(program);
46         initrtable3(program); 
47         initrtable4(program);
48         initfunctable(program);
49         return(program);
50 }
51
52 program_handle getph() 
53 {
54         return(program);
55 }
56
57