testexecmgmt/ucc/BinInternal/rpcgen/rpc_pars.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 /*
       
    13  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
       
    14  * unrestricted use provided that this legend is included on all tape
       
    15  * media and as a part of the software program in whole or part.  Users
       
    16  * may copy or modify Sun RPC without charge, but are not authorized
       
    17  * to license or distribute it to anyone else except as part of a product or
       
    18  * program developed by the user.
       
    19  * 
       
    20  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
       
    21  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
       
    22  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
       
    23  * 
       
    24  * Sun RPC is provided with no support and without any obligation on the
       
    25  * part of Sun Microsystems, Inc. to assist in its use, correction,
       
    26  * modification or enhancement.
       
    27  * 
       
    28  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
       
    29  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
       
    30  * OR ANY PART THEREOF.
       
    31  * 
       
    32  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
       
    33  * or profits or other special, indirect and consequential damages, even if
       
    34  * Sun has been advised of the possibility of such damages.
       
    35  * 
       
    36  * Sun Microsystems, Inc.
       
    37  * 2550 Garcia Avenue
       
    38  * Mountain View, California  94043
       
    39  */
       
    40 /* @(#)rpc_parse.h 1.3 87/03/09 (C) 1987 SMI */
       
    41 
       
    42 /*
       
    43  * rpc_parse.h, Definitions for the RPCL parser 
       
    44  * Copyright (C) 1987, Sun Microsystems, Inc. 
       
    45  */
       
    46 
       
    47 enum defkind {
       
    48 	DEF_CONST,
       
    49 	DEF_STRUCT,
       
    50 	DEF_UNION,
       
    51 	DEF_ENUM,
       
    52 	DEF_TYPEDEF,
       
    53 	DEF_PROGRAM
       
    54 };
       
    55 typedef enum defkind defkind;
       
    56 
       
    57 typedef char *const_def;
       
    58 
       
    59 enum relation {
       
    60 	REL_VECTOR,		/* fixed length array */
       
    61 	REL_ARRAY,		/* variable length array */
       
    62 	REL_POINTER,	/* pointer */
       
    63 	REL_ALIAS,		/* simple */
       
    64 };
       
    65 typedef enum relation relation;
       
    66 
       
    67 struct typedef_def {
       
    68 	char *old_prefix;
       
    69 	char *old_type;
       
    70 	relation rel;
       
    71 	char *array_max;
       
    72 };
       
    73 typedef struct typedef_def typedef_def;
       
    74 
       
    75 
       
    76 struct enumval_list {
       
    77 	char *name;
       
    78 	char *assignment;
       
    79 	struct enumval_list *next;
       
    80 };
       
    81 typedef struct enumval_list enumval_list;
       
    82 
       
    83 struct enum_def {
       
    84 	enumval_list *vals;
       
    85 };
       
    86 typedef struct enum_def enum_def;
       
    87 
       
    88 
       
    89 struct declaration {
       
    90 	char *prefix;
       
    91 	char *type;
       
    92 	char *name;
       
    93 	relation rel;
       
    94 	char *array_max;
       
    95 };
       
    96 typedef struct declaration declaration;
       
    97 
       
    98 
       
    99 struct decl_list {
       
   100 	declaration decl;
       
   101 	struct decl_list *next;
       
   102 };
       
   103 typedef struct decl_list decl_list;
       
   104 
       
   105 struct struct_def {
       
   106 	decl_list *decls;
       
   107 };
       
   108 typedef struct struct_def struct_def;
       
   109 
       
   110 
       
   111 struct case_list {
       
   112 	char *case_name;
       
   113 	declaration case_decl;
       
   114 	struct case_list *next;
       
   115 };
       
   116 typedef struct case_list case_list;
       
   117 
       
   118 struct union_def {
       
   119 	declaration enum_decl;
       
   120 	case_list *cases;
       
   121 	declaration *default_decl;
       
   122 };
       
   123 typedef struct union_def union_def;
       
   124 
       
   125 
       
   126 
       
   127 struct proc_list {
       
   128 	char *proc_name;
       
   129 	char *proc_num;
       
   130 	char *arg_type;
       
   131 	char *arg_prefix;
       
   132 	char *res_type;
       
   133 	char *res_prefix;
       
   134 	struct proc_list *next;
       
   135 };
       
   136 typedef struct proc_list proc_list;
       
   137 
       
   138 
       
   139 struct version_list {
       
   140 	char *vers_name;
       
   141 	char *vers_num;
       
   142 	proc_list *procs;
       
   143 	struct version_list *next;
       
   144 };
       
   145 typedef struct version_list version_list;
       
   146 
       
   147 struct program_def {
       
   148 	char *prog_num;
       
   149 	version_list *versions;
       
   150 };
       
   151 typedef struct program_def program_def;
       
   152 
       
   153 struct definition {
       
   154 	char *def_name;
       
   155 	defkind def_kind;
       
   156 	union {
       
   157 		const_def co;
       
   158 		struct_def st;
       
   159 		union_def un;
       
   160 		enum_def en;
       
   161 		typedef_def ty;
       
   162 		program_def pr;
       
   163 	} def;
       
   164 };
       
   165 typedef struct definition definition;
       
   166 
       
   167 /* @(#)rpc_parse.h	2.1 88/08/01 4.0 RPCSRC */
       
   168 definition *get_definition();