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

Diff for /src/usr.bin/rpcgen/rpc_hout.c between version 1.11 and 1.12

version 1.11, 2002/06/01 01:40:38 version 1.12, 2002/07/05 05:39:42
Line 68 
Line 68 
 {  {
   
         if (def->def_kind == DEF_PROGRAM)  /* handle data only */          if (def->def_kind == DEF_PROGRAM)  /* handle data only */
                 return;                  return;
   
         if (def->def_kind != DEF_CONST)          if (def->def_kind != DEF_CONST)
                 fprintf(fout, "\n");                  fprintf(fout, "\n");
Line 93 
Line 93 
                 break;                  break;
         }          }
         if (def->def_kind != DEF_PROGRAM && def->def_kind != DEF_CONST) {          if (def->def_kind != DEF_PROGRAM && def->def_kind != DEF_CONST) {
                 pxdrfuncdecl( def->def_name,                  pxdrfuncdecl(def->def_name,
                     def->def_kind != DEF_TYPEDEF ||                      def->def_kind != DEF_TYPEDEF ||
                     !isvectordef(def->def.ty.old_type, def->def.ty.rel));                      !isvectordef(def->def.ty.old_type, def->def.ty.rel));
         }          }
Line 137 
Line 137 
         pdefine(def->def_name, def->def.co);          pdefine(def->def_name, def->def.co);
 }  }
   
 /* print out the definitions for the arguments of functions in the  /*
    header file   * print out the definitions for the arguments of functions in the
 */   * header file
    */
 static void  static void
 pargdef(def)  pargdef(def)
         definition *def;          definition *def;
Line 150 
Line 151 
         proc_list *plist;          proc_list *plist;
   
         for (vers = def->def.pr.versions; vers != NULL; vers = vers->next) {          for (vers = def->def.pr.versions; vers != NULL; vers = vers->next) {
                 for(plist = vers->procs; plist != NULL;                  for (plist = vers->procs; plist != NULL;
                     plist = plist->next) {                      plist = plist->next) {
                         if (!newstyle || plist->arg_num < 2) {                          if (!newstyle || plist->arg_num < 2) {
                                 continue; /* old style or single args */                                  continue; /* old style or single args */
Line 158 
Line 159 
                         name = plist->args.argname;                          name = plist->args.argname;
                         fprintf(fout, "struct %s {\n", name);                          fprintf(fout, "struct %s {\n", name);
                         for (l = plist->args.decls;                          for (l = plist->args.decls;
                              l != NULL; l = l->next) {                              l != NULL; l = l->next) {
                                 pdeclaration(name, &l->decl, 1, ";\n");                                  pdeclaration(name, &l->decl, 1, ";\n");
                         }                          }
                         fprintf(fout, "};\n");                          fprintf(fout, "};\n");
Line 274 
Line 275 
                  * Print out 3 definitions, one for ANSI-C, another for C++,                   * Print out 3 definitions, one for ANSI-C, another for C++,
                  * a third for old style C                   * a third for old style C
                  */                   */
                 for(i=0; i<3; i++) {                  for (i=0; i<3; i++) {
                         if (i==0) {                          if (i==0) {
                                 fprintf(fout,"\n#ifdef __cplusplus\n");                                  fprintf(fout,"\n#ifdef __cplusplus\n");
                                 ext = "extern \"C\" ";                                  ext = "extern \"C\" ";
Line 431 
Line 432 
         char *name;          char *name;
         declaration *dec;          declaration *dec;
         int tab;          int tab;
         char *separator;          char *separator;
 {  {
         char buf[8];    /* enough to hold "struct ", include NUL */          char buf[8];    /* enough to hold "struct ", include NUL */
         char *prefix;          char *prefix;

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12