Sun Feb 18 12:13:07 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
[glibc/history.git] / sunrpc / rpc_util.h
blob0dd188234a6f5368b1b2e5251c08ca758f0d8819
1 /* @(#)rpc_util.h 2.1 88/08/01 4.0 RPCSRC */
2 /*
3 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
4 * unrestricted use provided that this legend is included on all tape
5 * media and as a part of the software program in whole or part. Users
6 * may copy or modify Sun RPC without charge, but are not authorized
7 * to license or distribute it to anyone else except as part of a product or
8 * program developed by the user.
9 *
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.
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.
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.
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.
26 * Sun Microsystems, Inc.
27 * 2550 Garcia Avenue
28 * Mountain View, California 94043
30 /* @(#)rpc_util.h 1.6 87/06/24 (C) 1987 SMI */
33 * rpc_util.h, Useful definitions for the RPC protocol compiler
34 * Copyright (C) 1987, Sun Microsystems, Inc.
36 extern char *malloc();
38 #define alloc(size) malloc((unsigned)(size))
39 #define ALLOC(object) (object *) malloc(sizeof(object))
41 /* extern char *sprintf(); --roland@gnu */
43 #define s_print (void) sprintf
44 #define f_print (void) fprintf
46 struct list {
47 char *val;
48 struct list *next;
50 typedef struct list list;
53 * Global variables
55 #define MAXLINESIZE 1024
56 extern char curline[MAXLINESIZE];
57 extern char *where;
58 extern int linenum;
60 extern char *infilename;
61 extern FILE *fout;
62 extern FILE *fin;
64 extern list *defined;
67 * rpc_util routines
69 void storeval();
71 #define STOREVAL(list,item) \
72 storeval(list,(char *)item)
74 char *findval();
76 #define FINDVAL(list,item,finder) \
77 findval(list, (char *) item, finder)
79 char *fixtype();
80 char *stringfix();
81 void pvname();
82 void ptype();
83 int isvectordef();
84 int streq();
85 void error();
86 void expected1();
87 void expected2();
88 void expected3();
89 void tabify();
90 void record_open();
93 * rpc_cout routines
95 void cprint();
96 void emit();
99 * rpc_hout routines
101 void print_datadef();
104 * rpc_svcout routines
106 void write_most();
107 void write_register();
108 void write_rest();
109 void write_programs();
112 * rpc_clntout routines
114 void write_stubs();