[BACK]Return to rpc_main.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / rpcgen

Diff for /src/usr.bin/rpcgen/rpc_main.c between version 1.5 and 1.6

version 1.5, 2001/01/21 22:02:52 version 1.6, 2001/07/17 02:23:59
Line 44 
Line 44 
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
   #include <ctype.h>
 #include <sys/types.h>  #include <sys/types.h>
 #ifdef __TURBOC__  #ifdef __TURBOC__
 #define MAXPATHLEN      80  #define MAXPATHLEN      80
 #include <process.h>  #include <process.h>
 #include <dir.h>  #include <dir.h>
 #else  #else
   #include <unistd.h>
 #include <sys/param.h>  #include <sys/param.h>
 #include <sys/file.h>  #include <sys/file.h>
 #endif  #endif
Line 127 
Line 129 
 static char *dos_cppfile = NULL;  static char *dos_cppfile = NULL;
 #endif  #endif
   
 static c_output __P((char *, char *, int, char *));  static char *extendfile __P((char *, char *));
 static h_output __P((char *, char *, int, char *));  static void open_output __P((char *, char *));
 static s_output __P((int, char **, char *, char *, int, char *, int, int));  static void add_warning __P((void));
 static l_output __P((char *, char *, int, char *));  static void clear_args __P((void));
 static t_output __P((char *, char *, int, char *));  static void find_cpp __P((void));
 static svc_output __P((char *, char *, int, char *));  static void open_input __P((char *, char *));
 static clnt_output __P((char *, char *, int, char *));  static int check_nettype __P((char *, char *[]));
 static do_registers __P((int, char **));  static void c_output __P((char *, char *, int, char *));
   static void c_initialize __P((void));
   static char *generate_guard __P((char *));
   static void h_output __P((char *, char *, int, char *));
   static void s_output __P((int, char *[], char *, char *, int, char *, int, int));
   static void l_output __P((char *, char *, int, char *));
   static void t_output __P((char *, char *, int, char *));
   static void svc_output __P((char *, char *, int, char *));
   static void clnt_output __P((char *, char *, int, char *));
   static int do_registers __P((int, char *[]));
 static void addarg __P((char *));  static void addarg __P((char *));
 static void putarg __P((int, char *));  static void putarg __P((int, char *));
 static void clear_args __P((void));  
 static void checkfiles __P((char *, char *));  static void checkfiles __P((char *, char *));
 static int parseargs __P((int, char **, struct commandline *));  static int parseargs __P((int, char *[], struct commandline *));
 static usage __P((void));  static void usage __P((void));
 static options_usage __P((void));  static void options_usage __P((void));
   
   int
   
 main(argc, argv)  main(argc, argv)
         int argc;          int argc;
         char *argv[];          char *argv[];
Line 248 
Line 257 
 /*  /*
  * Open output file with given extension   * Open output file with given extension
  */   */
 static  static void
 open_output(infile, outfile)  open_output(infile, outfile)
         char *infile;          char *infile;
         char *outfile;          char *outfile;
Line 274 
Line 283 
   
 }  }
   
 static  static void
 add_warning()  add_warning()
 {  {
         f_print(fout, "/*\n");          f_print(fout, "/*\n");
Line 314 
Line 323 
 /*  /*
  * Open input file with given define for C-preprocessor   * Open input file with given define for C-preprocessor
  */   */
 static  static void
 open_input(infile, define)  open_input(infile, define)
         char *infile;          char *infile;
         char *define;          char *define;
Line 432 
Line 441 
  * Compile into an XDR routine output file   * Compile into an XDR routine output file
  */   */
   
 static  static void
 c_output(infile, define, extend, outfile)  c_output(infile, define, extend, outfile)
         char *infile;          char *infile;
         char *define;          char *define;
Line 465 
Line 474 
 }  }
   
   
   static void
 c_initialize()  c_initialize()
 {  {
   
Line 514 
Line 524 
  * Compile into an XDR header file   * Compile into an XDR header file
  */   */
   
 static  static void
 h_output(infile, define, extend, outfile)  h_output(infile, define, extend, outfile)
         char *infile;          char *infile;
         char *define;          char *define;
Line 562 
Line 572 
 /*  /*
  * Compile into an RPC service   * Compile into an RPC service
  */   */
 static  static void
 s_output(argc, argv, infile, define, extend, outfile, nomain, netflag)  s_output(argc, argv, infile, define, extend, outfile, nomain, netflag)
         int argc;          int argc;
         char *argv[];          char *argv[];
Line 670 
Line 680 
 /*  /*
  * generate client side stubs   * generate client side stubs
  */   */
 static  static void
 l_output(infile, define, extend, outfile)  l_output(infile, define, extend, outfile)
         char *infile;          char *infile;
         char *define;          char *define;
Line 706 
Line 716 
 /*  /*
  * generate the dispatch table   * generate the dispatch table
  */   */
 static  static void
 t_output(infile, define, extend, outfile)  t_output(infile, define, extend, outfile)
         char *infile;          char *infile;
         char *define;          char *define;
Line 732 
Line 742 
 }  }
   
 /* sample routine for the server template */  /* sample routine for the server template */
 static  static void
 svc_output(infile, define, extend, outfile)  svc_output(infile, define, extend, outfile)
      char *infile;       char *infile;
      char *define;       char *define;
Line 768 
Line 778 
   
   
 /* sample main routine for client */  /* sample main routine for client */
 static  static void
 clnt_output(infile, define, extend, outfile)  clnt_output(infile, define, extend, outfile)
      char *infile;       char *infile;
      char *define;       char *define;
Line 810 
Line 820 
  * Perform registrations for service output   * Perform registrations for service output
  * Return 0 if failed; 1 otherwise.   * Return 0 if failed; 1 otherwise.
  */   */
 static  static int
 int do_registers(argc, argv)  do_registers(argc, argv)
         int argc;          int argc;
         char *argv[];          char *argv[];
 {  {
Line 879 
Line 889 
   
 static void  static void
 checkfiles(infile, outfile)  checkfiles(infile, outfile)
 char *infile;          char *infile;
 char *outfile;          char *outfile;
 {  {
   
   struct stat buf;    struct stat buf;
Line 915 
Line 925 
 {  {
         int i;          int i;
         int j;          int j;
         char c;          int c;
         char flag[(1 << 8 * sizeof(char))];          char flag[(1 << 8 * sizeof(char))];
         int nflags;          int nflags;
   
Line 1110 
Line 1120 
         return (1);          return (1);
 }  }
   
 static  static void
 usage()  usage()
 {  {
         f_print(stderr, "usage:  %s infile\n", cmdname);          f_print(stderr, "usage:  %s infile\n", cmdname);
Line 1124 
Line 1134 
         exit(1);          exit(1);
 }  }
   
 static  static void
 options_usage()  options_usage()
 {  {
         f_print(stderr, "options:\n");          f_print(stderr, "options:\n");

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6