dtcm: Resolve CID 87822
[oweals/cde.git] / cde / programs / dtcm / server / programtable.c
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: programtable.c /main/4 1995/11/09 12:47:18 rswiston $ */
24 /*
25  *  (c) Copyright 1993, 1994 Hewlett-Packard Company
26  *  (c) Copyright 1993, 1994 International Business Machines Corp.
27  *  (c) Copyright 1993, 1994 Novell, Inc.
28  *  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
29  */
30
31 /* implements the program table for this program number */
32 /* this module doesn't know anything about the specifics of any */
33 /* rtable except how many rtables are supported */
34 /*  - ie it doesn't include rtable*.h.  */
35 /* The actual program table entries are filled in by the rtable*.c's */
36
37 #include <EUSCompat.h>
38 #include <stdio.h>
39 #include <rpc/rpc.h>
40 #include "rpcextras.h"
41
42 program_table ptable[] = {
43         (struct rpcgen_table *)NULL, 0, /* rtable 0 no longer supported */
44         (struct rpcgen_table *)NULL, 0, /* rtable 1 no longer supported */
45         (struct rpcgen_table *)NULL, 0, /* rtable 2 filled in by rtable2.c */
46         (struct rpcgen_table *)NULL, 0, /* rtable 3 filled in by rtable3.c */
47         (struct rpcgen_table *)NULL, 0, /* rtable 4 filled in by rtable4.c */
48         (struct rpcgen_table *)NULL, 0, /* rtable 5 filled in by cmsfunc.c */
49         }; 
50         
51 /* program_num is filled in from one of the rtable*.c's so that */
52 /* it can be declared from one of the rtable*.h's */
53 program_object po = {
54         &ptable[0], 0, 0,
55         };
56         
57 program_handle program = &po;
58
59 program_handle newph() 
60 {
61         extern void initrtable2();
62         extern void initrtable3();
63         extern void initrtable4();
64         extern void initfunctable();
65         
66         program->nvers = sizeof(ptable)/sizeof(ptable[0]);
67         initrtable2(program);
68         initrtable3(program); 
69         initrtable4(program);
70         initfunctable(program);
71         return(program);
72 }
73
74 program_handle getph() 
75 {
76         return(program);
77 }
78
79