home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / oct93 / develop / yacc.lha / Yacc / src / output.c.diff < prev    next >
Text File  |  1993-07-11  |  1KB  |  41 lines

  1. *** output.c.orig    Fri Jul 09 15:13:56 1993
  2. --- output.c    Sun Jul 11 19:44:28 1993
  3. ***************
  4. *** 812,826 ****
  5.       ++outline;
  6.       fprintf(code_file, "#define YYERRCODE %d\n", symbol_value[1]);
  7.   
  8. !     if (dflag && unionized)
  9.       {
  10.       fclose(union_file);
  11.       union_file = fopen(union_file_name, "r");
  12.       if (union_file == NULL) open_error(union_file_name);
  13.       while ((c = getc(union_file)) != EOF)
  14.           putc(c, defines_file);
  15. !     fprintf(defines_file, " YYSTYPE;\nextern YYSTYPE %slval;\n",
  16. !         symbol_prefix);
  17.       }
  18.   }
  19.   
  20. --- 812,831 ----
  21.       ++outline;
  22.       fprintf(code_file, "#define YYERRCODE %d\n", symbol_value[1]);
  23.   
  24. !     if (dflag)
  25.       {
  26. +         if (unionized)
  27. +         {
  28.               fclose(union_file);
  29.               union_file = fopen(union_file_name, "r");
  30.               if (union_file == NULL) open_error(union_file_name);
  31.               while ((c = getc(union_file)) != EOF)
  32.                   putc(c, defines_file);
  33. !             fprintf(defines_file, " YYSTYPE;\n");
  34. !         }
  35. !         else
  36. !             fprintf(defines_file, "#ifndef YYSTYPE\ntypedef int YYSTYPE;\n#endif\n");
  37. !         fprintf(defines_file, "extern YYSTYPE %slval;\n", symbol_prefix);
  38.       }
  39.   }
  40.   
  41.