testexecmgmt/ucc/BinInternal/rpcgen/rpc_util.h
changeset 0 3da2a79470a7
equal deleted inserted replaced
-1:000000000000 0:3da2a79470a7
       
     1 /*********************************************************************
       
     2  * RPC for the Windows NT Operating System
       
     3  * 1993 by Martin F. Gergeleit
       
     4  * Users may use, copy or modify Sun RPC for the Windows NT Operating 
       
     5  * System according to the Sun copyright below.
       
     6  *
       
     7  * RPC for the Windows NT Operating System COMES WITH ABSOLUTELY NO 
       
     8  * WARRANTY, NOR WILL I BE LIABLE FOR ANY DAMAGES INCURRED FROM THE 
       
     9  * USE OF. USE ENTIRELY AT YOUR OWN RISK!!!
       
    10  *********************************************************************/
       
    11 
       
    12 /* @(#)rpc_util.h	2.1 88/08/01 4.0 RPCSRC */
       
    13 /*
       
    14  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
       
    15  * unrestricted use provided that this legend is included on all tape
       
    16  * media and as a part of the software program in whole or part.  Users
       
    17  * may copy or modify Sun RPC without charge, but are not authorized
       
    18  * to license or distribute it to anyone else except as part of a product or
       
    19  * program developed by the user.
       
    20  * 
       
    21  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
       
    22  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
       
    23  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
       
    24  * 
       
    25  * Sun RPC is provided with no support and without any obligation on the
       
    26  * part of Sun Microsystems, Inc. to assist in its use, correction,
       
    27  * modification or enhancement.
       
    28  * 
       
    29  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
       
    30  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
       
    31  * OR ANY PART THEREOF.
       
    32  * 
       
    33  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
       
    34  * or profits or other special, indirect and consequential damages, even if
       
    35  * Sun has been advised of the possibility of such damages.
       
    36  * 
       
    37  * Sun Microsystems, Inc.
       
    38  * 2550 Garcia Avenue
       
    39  * Mountain View, California  94043
       
    40  */
       
    41 /* @(#)rpc_util.h 1.6 87/06/24 (C) 1987 SMI */
       
    42 
       
    43 /*
       
    44  * rpc_util.h, Useful definitions for the RPC protocol compiler 
       
    45  * Copyright (C) 1987, Sun Microsystems, Inc. 
       
    46  */
       
    47 #ifndef WIN32
       
    48 extern char *malloc();
       
    49 #endif
       
    50 
       
    51 #define alloc(size)		malloc((unsigned)(size))
       
    52 #define ALLOC(object)   (object *) malloc(sizeof(object))
       
    53 
       
    54 #define s_print	(void) sprintf
       
    55 #define f_print (void) fprintf
       
    56 
       
    57 struct list {
       
    58 	char *val;
       
    59 	struct list *next;
       
    60 };
       
    61 typedef struct list list;
       
    62 
       
    63 /*
       
    64  * Global variables 
       
    65  */
       
    66 #define MAXLINESIZE 1024
       
    67 extern char curline[MAXLINESIZE];
       
    68 extern char *where;
       
    69 extern int linenum;
       
    70 
       
    71 extern char *infilename;
       
    72 extern FILE *fout;
       
    73 extern FILE *fin;
       
    74 
       
    75 extern list *defined;
       
    76 
       
    77 /*
       
    78  * rpc_util routines 
       
    79  */
       
    80 void storeval();
       
    81 
       
    82 #define STOREVAL(list,item)	\
       
    83 	storeval(list,(char *)item)
       
    84 
       
    85 char *findval();
       
    86 
       
    87 #define FINDVAL(list,item,finder) \
       
    88 	findval(list, (char *) item, finder)
       
    89 
       
    90 char *fixtype();
       
    91 char *stringfix();
       
    92 void pvname();
       
    93 void ptype();
       
    94 int isvectordef();
       
    95 int streq();
       
    96 void error();
       
    97 void expected1();
       
    98 void expected2();
       
    99 void expected3();
       
   100 void tabify();
       
   101 void record_open();
       
   102 
       
   103 /*
       
   104  * rpc_cout routines 
       
   105  */
       
   106 void cprint();
       
   107 void emit();
       
   108 
       
   109 /*
       
   110  * rpc_hout routines 
       
   111  */
       
   112 void print_datadef();
       
   113 
       
   114 /*
       
   115  * rpc_svcout routines 
       
   116  */
       
   117 void write_most();
       
   118 void write_register();
       
   119 void write_rest();
       
   120 void write_programs();
       
   121 
       
   122 /*
       
   123  * rpc_clntout routines
       
   124  */
       
   125 void write_stubs();
       
   126 
       
   127 // AE: flag that turns on my modifications
       
   128 struct commandline {
       
   129 	int header;
       
   130 	int client_flag;
       
   131 	int server_flag;
       
   132 	int component_base_flag;
       
   133 	int component_mod_service_manager;
       
   134 	int component_mod_component_impl;
       
   135 	int wrapstring_flag;
       
   136 	char *infile;
       
   137 	char outfile[256];
       
   138 };
       
   139 void reinitialize();
       
   140 extern struct commandline command_line;