]> sourceware.org Git - glibc.git/blame - sunrpc/rpc_util.h
Update.
[glibc.git] / sunrpc / rpc_util.h
CommitLineData
28f540f4
RM
1/*
2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
3 * unrestricted use provided that this legend is included on all tape
4 * media and as a part of the software program in whole or part. Users
5 * may copy or modify Sun RPC without charge, but are not authorized
6 * to license or distribute it to anyone else except as part of a product or
0d204b0a
UD
7 * program developed by the user or with the express written consent of
8 * Sun Microsystems, Inc.
9 *
28f540f4
RM
10 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
11 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
12 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
0d204b0a 13 *
28f540f4
RM
14 * Sun RPC is provided with no support and without any obligation on the
15 * part of Sun Microsystems, Inc. to assist in its use, correction,
16 * modification or enhancement.
0d204b0a 17 *
28f540f4
RM
18 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
19 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
20 * OR ANY PART THEREOF.
0d204b0a 21 *
28f540f4
RM
22 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
23 * or profits or other special, indirect and consequential damages, even if
24 * Sun has been advised of the possibility of such damages.
0d204b0a 25 *
28f540f4
RM
26 * Sun Microsystems, Inc.
27 * 2550 Garcia Avenue
28 * Mountain View, California 94043
29 */
0d204b0a
UD
30
31/* @(#)rpc_util.h 1.5 90/08/29 (C) 1987 SMI */
28f540f4
RM
32
33/*
34 * rpc_util.h, Useful definitions for the RPC protocol compiler
28f540f4 35 */
0d204b0a
UD
36
37#include <stdlib.h>
28f540f4
RM
38
39#define alloc(size) malloc((unsigned)(size))
40#define ALLOC(object) (object *) malloc(sizeof(object))
41
28f540f4
RM
42#define s_print (void) sprintf
43#define f_print (void) fprintf
44
45struct list {
0d204b0a 46 definition *val;
28f540f4
RM
47 struct list *next;
48};
49typedef struct list list;
50
0d204b0a
UD
51#define PUT 1
52#define GET 2
53
28f540f4
RM
54/*
55 * Global variables
56 */
57#define MAXLINESIZE 1024
58extern char curline[MAXLINESIZE];
0d204b0a 59extern const char *where;
28f540f4
RM
60extern int linenum;
61
0d204b0a 62extern const char *infilename;
28f540f4
RM
63extern FILE *fout;
64extern FILE *fin;
65
66extern list *defined;
67
0d204b0a
UD
68
69extern bas_type *typ_list_h;
70extern bas_type *typ_list_t;
71
28f540f4 72/*
0d204b0a 73 * All the option flags
28f540f4 74 */
0d204b0a
UD
75extern int inetdflag;
76extern int pmflag;
77extern int tblflag;
78extern int logflag;
79extern int newstyle;
80extern int Cflag; /* C++ flag */
81extern int tirpcflag; /* flag for generating tirpc code */
82extern int inlineflag; /* if this is 0, then do not generate inline code */
28f540f4 83
0d204b0a
UD
84/*
85 * Other flags related with inetd jumpstart.
86 */
87extern int indefinitewait;
88extern int exitnow;
89extern int timerflag;
28f540f4 90
0d204b0a 91extern int nonfatalerrors;
28f540f4 92
0d204b0a
UD
93/*
94 * rpc_util routines
95 */
96void storeval(list **lstp, definition *val);
97#define STOREVAL(list,item) storeval(list,item)
98
99definition *findval(list *lst, const char *val,
100 int (*cmp)(const definition *, const char *));
101#define FINDVAL(list,item,finder) findval(list, item, finder)
102
103const char *fixtype(const char *type);
104const char *stringfix(const char *type);
105char *locase(const char *str);
106void pvname_svc(const char *pname, const char *vnum);
107void pvname(const char *pname, const char *vnum);
108void ptype(const char *prefix, const char *type, int follow);
109int isvectordef(const char *type, relation rel);
110int streq(const char *a, const char *b);
111void error(const char *msg);
112void tabify(FILE *f, int tab);
113void record_open(const char *file);
114bas_type *find_type(const char *type);
28f540f4 115
28f540f4
RM
116
117/*
118 * rpc_cout routines
119 */
0d204b0a 120void emit(definition *def);
28f540f4
RM
121
122/*
123 * rpc_hout routines
124 */
0d204b0a
UD
125void print_datadef(definition *def);
126void print_funcdef(definition *def);
28f540f4
RM
127
128/*
129 * rpc_svcout routines
130 */
0d204b0a
UD
131void write_most(const char *infile, int netflag, int nomain);
132void write_register(void);
133void write_rest(void);
134void write_programs(const char *storage);
135void write_svc_aux(int nomain);
136void write_inetd_register(const char *transp);
137void write_netid_register(const char *);
138void write_nettype_register(const char *);
28f540f4
RM
139/*
140 * rpc_clntout routines
141 */
0d204b0a
UD
142void write_stubs(void);
143
144/*
145 * rpc_tblout routines
146 */
147void write_tables(void);
This page took 0.090219 seconds and 5 git commands to generate.