home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / SATAN11.ZIP / SRC / RPCGEN / RPC_UTIL.H < prev   
Encoding:
C/C++ Source or Header  |  1995-04-08  |  2.7 KB  |  111 lines

  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.
  13.  * 
  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.
  17.  * 
  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.
  21.  * 
  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.
  25.  * 
  26.  * Sun Microsystems, Inc.
  27.  * 2550 Garcia Avenue
  28.  * Mountain View, California  94043
  29.  */
  30. /* @(#)rpc_util.h 1.6 87/06/24 (C) 1987 SMI */
  31.  
  32. /*
  33.  * rpc_util.h, Useful definitions for the RPC protocol compiler 
  34.  * Copyright (C) 1987, Sun Microsystems, Inc. 
  35.  */
  36. #define alloc(size)        malloc((unsigned)(size))
  37. #define ALLOC(object)   (object *) malloc(sizeof(object))
  38.  
  39. #define s_print    (void) sprintf
  40. #define f_print (void) fprintf
  41.  
  42. struct list {
  43.     char *val;
  44.     struct list *next;
  45. };
  46. typedef struct list list;
  47.  
  48. /*
  49.  * Global variables 
  50.  */
  51. #define MAXLINESIZE 1024
  52. extern char curline[MAXLINESIZE];
  53. extern char *where;
  54. extern int linenum;
  55.  
  56. extern char *infilename;
  57. extern FILE *fout;
  58. extern FILE *fin;
  59.  
  60. extern list *defined;
  61.  
  62. /*
  63.  * rpc_util routines 
  64.  */
  65. void storeval();
  66.  
  67. #define STOREVAL(list,item)    \
  68.     storeval(list,(char *)item)
  69.  
  70. char *findval();
  71.  
  72. #define FINDVAL(list,item,finder) \
  73.     findval(list, (char *) item, finder)
  74.  
  75. char *fixtype();
  76. char *stringfix();
  77. void pvname();
  78. void ptype();
  79. int isvectordef();
  80. int streq();
  81. void error();
  82. void expected1();
  83. void expected2();
  84. void expected3();
  85. void tabify();
  86. void record_open();
  87.  
  88. /*
  89.  * rpc_cout routines 
  90.  */
  91. void cprint();
  92. void emit();
  93.  
  94. /*
  95.  * rpc_hout routines 
  96.  */
  97. void print_datadef();
  98.  
  99. /*
  100.  * rpc_svcout routines 
  101.  */
  102. void write_most();
  103. void write_register();
  104. void write_rest();
  105. void write_programs();
  106.  
  107. /*
  108.  * rpc_clntout routines
  109.  */
  110. void write_stubs();
  111.