home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume6 / rpc2 / part11 / rpc / rpcgen / rpc_util.h < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-30  |  1.2 KB  |  76 lines

  1. /* @(#)rpc_util.h 1.1 86/03/26 (C) 1986 SMI */
  2.  
  3. /*
  4.  * rpc_util.h, Useful definitions for the RPC protocol compiler
  5.  * Copyright (C) 1986, Sun Microsystems, Inc.
  6.  */
  7.  
  8. extern char *malloc();
  9. extern char *sprintf();
  10. #define alloc(size)        malloc((unsigned)(size))
  11. #define ALLOC(object)   (object *) malloc(sizeof(object)) 
  12.  
  13. #define OFF 0
  14. #define ON 1
  15.  
  16. struct list {
  17.     char *val;
  18.     struct list *next;
  19. };
  20. typedef struct list list;
  21.  
  22. /*
  23.  * Global variables
  24.  */
  25. #define MAXLINESIZE 1024
  26. extern char curline[MAXLINESIZE];
  27. extern char *where;
  28. extern int linenum;
  29.  
  30. extern char *outfile;
  31. extern char *outfile2;
  32. extern char *infile;
  33. extern FILE *fout;
  34. extern FILE *fin;
  35.  
  36. extern list *printed;
  37. extern list *defined;
  38.  
  39.  
  40. /*
  41.  * rpc_util routines
  42.  */
  43. void storeval();
  44. #define STOREVAL(list,item)    \
  45.     storeval(list,(char *)item)
  46.  
  47. char *findval();
  48. #define FINDVAL(list,item,finder) \
  49.     findval(list, (char *) item, finder)
  50.  
  51. int streq();
  52. void error();
  53. void expected1();
  54. void expected2();
  55. void expected3();
  56.  
  57. /*
  58.  * rpc_cout routines
  59.  */
  60. void cprint();
  61. void emit();
  62.  
  63. /*
  64.  * rpc_hout routines
  65.  */
  66. void print_datadef();
  67. void print_funcdefs();
  68.  
  69. /*
  70.  * rpc_svcout routines
  71.  */
  72. void write_most();
  73. void write_register();
  74. void write_rest();
  75.  
  76.