home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / updates / update21.zoo / bison / atari.diffs next >
Encoding:
Text File  |  1992-05-13  |  8.3 KB  |  310 lines

  1. *** bison.simple.orig    Wed May 13 19:46:10 1992
  2. --- bison.simple    Wed May 13 19:46:08 1992
  3. ***************
  4. *** 38,43 ****
  5. --- 38,50 ----
  6.   #endif /* not GNU C.  */
  7.   #endif /* alloca not defined.  */
  8.   
  9. + #ifdef atarist
  10. + #include <stdlib.h>
  11. + #include <string.h>
  12. + #include <unistd.h>
  13. + #include <memory.h>
  14. + #endif /* atarist */
  15.   /* This is the parser code that is written into each bison parser
  16.     when the %semantic_parser declaration is not specified in the grammar.
  17.     It was written by Richard Stallman by simplifying the hairy parser
  18. *** files.c.orig    Wed May 13 19:46:29 1992
  19. --- files.c    Wed May 13 19:46:26 1992
  20. ***************
  21. *** 68,73 ****
  22. --- 68,76 ----
  23.   extern int verboseflag;
  24.   extern int definesflag;
  25.   int fixed_outfiles = 0;
  26. + #ifdef atarist
  27. + long _stksize = -1L;
  28. + #endif
  29.   
  30.   
  31.   char*
  32. ***************
  33. *** 115,126 ****
  34.   #endif
  35.     int tmp_len;
  36.   
  37. ! #ifdef MSDOS
  38. !   tmp_base = getenv ("TMP");
  39.     if (tmp_base == 0)
  40.       tmp_base = "";
  41.     strlwr (infile);
  42. ! #endif /* MSDOS */
  43.   
  44.     tmp_len = strlen (tmp_base);
  45.   
  46. --- 118,130 ----
  47.   #endif
  48.     int tmp_len;
  49.   
  50. ! #if defined(MSDOS) || defined(atarist)
  51. !   tmp_base = getenv ("TEMP");
  52. !   if(tmp_base == 0) tmp_base = getenv("TMP");
  53.     if (tmp_base == 0)
  54.       tmp_base = "";
  55.     strlwr (infile);
  56. ! #endif /* MSDOS || atarist */
  57.   
  58.     tmp_len = strlen (tmp_base);
  59.   
  60. ***************
  61. *** 129,137 ****
  62.         /* -o was specified.  The precise -o name will be used for ftable.
  63.        For other output files, remove the ".c" or ".tab.c" suffix.  */
  64.         name_base = spec_outfile;
  65. ! #ifdef MSDOS
  66.         strlwr (name_base);
  67. ! #endif /* MSDOS */
  68.         /* BASE_LENGTH includes ".tab" but not ".c".  */
  69.         base_length = strlen (name_base);
  70.         if (!strcmp (name_base + base_length - 2, ".c"))
  71. --- 133,141 ----
  72.         /* -o was specified.  The precise -o name will be used for ftable.
  73.        For other output files, remove the ".c" or ".tab.c" suffix.  */
  74.         name_base = spec_outfile;
  75. ! #if defined(MSDOS) || defined(atarist)
  76.         strlwr (name_base);
  77. ! #endif /* MSDOS || atarist */
  78.         /* BASE_LENGTH includes ".tab" but not ".c".  */
  79.         base_length = strlen (name_base);
  80.         if (!strcmp (name_base + base_length - 2, ".c"))
  81. ***************
  82. *** 154,160 ****
  83.         /* Append `.tab'.  */
  84.         strcpy (name_base, spec_file_prefix);
  85.         strcat (name_base, ".tab");
  86. ! #ifdef MSDOS
  87.         strlwr (name_base);
  88.   #endif /* MSDOS */
  89.       }
  90. --- 158,164 ----
  91.         /* Append `.tab'.  */
  92.         strcpy (name_base, spec_file_prefix);
  93.         strcat (name_base, ".tab");
  94. ! #if defined(MSDOS) || defined(atarist)
  95.         strlwr (name_base);
  96.   #endif /* MSDOS */
  97.       }
  98. ***************
  99. *** 175,185 ****
  100.   #ifdef VMS
  101.         name_base = stringappend(name_base, short_base_length, "_tab");
  102.   #else
  103. ! #ifdef MSDOS
  104.         name_base = stringappend(name_base, short_base_length, "_tab");
  105.   #else
  106.         name_base = stringappend(name_base, short_base_length, ".tab");
  107. ! #endif /* not MSDOS */
  108.   #endif
  109.         base_length = short_base_length + 4;
  110.       }
  111. --- 179,189 ----
  112.   #ifdef VMS
  113.         name_base = stringappend(name_base, short_base_length, "_tab");
  114.   #else
  115. ! #if defined(MSDOS) || defined(atarist)
  116.         name_base = stringappend(name_base, short_base_length, "_tab");
  117.   #else
  118.         name_base = stringappend(name_base, short_base_length, ".tab");
  119. ! #endif /* not MSDOS || atarist */
  120.   #endif
  121.         base_length = short_base_length + 4;
  122.       }
  123. ***************
  124. *** 187,195 ****
  125.     finput = tryopen(infile, "r");
  126.   
  127.     filename = getenv("BISON_SIMPLE");
  128. ! #ifdef MSDOS
  129.     /* File doesn't exist in current directory; try in INIT directory.  */
  130.     cp = getenv("INIT");
  131.     if (filename == 0 && cp != 0)
  132.       {
  133.         filename = malloc(strlen(cp) + strlen(PFILE) + 2);
  134. --- 191,203 ----
  135.     finput = tryopen(infile, "r");
  136.   
  137.     filename = getenv("BISON_SIMPLE");
  138. ! #if defined(MSDOS) || defined(atarist)
  139.     /* File doesn't exist in current directory; try in INIT directory.  */
  140. + #ifdef atarist
  141. +   cp = getenv("GNULIB");
  142. + #else
  143.     cp = getenv("INIT");
  144. + #endif
  145.     if (filename == 0 && cp != 0)
  146.       {
  147.         filename = malloc(strlen(cp) + strlen(PFILE) + 2);
  148. ***************
  149. *** 203,209 ****
  150.   
  151.     if (verboseflag)
  152.       {
  153. ! #ifdef MSDOS
  154.         outfile = stringappend(name_base, short_base_length, ".out");
  155.   #else
  156.         if (spec_name_prefix)
  157. --- 211,217 ----
  158.   
  159.     if (verboseflag)
  160.       {
  161. ! #if defined(MSDOS) || defined(atarist)
  162.         outfile = stringappend(name_base, short_base_length, ".out");
  163.   #else
  164.         if (spec_name_prefix)
  165. ***************
  166. *** 220,226 ****
  167.         fdefines = tryopen(defsfile, "w");
  168.       }
  169.   
  170. ! #ifdef MSDOS
  171.     actfile = mktemp(stringappend(tmp_base, tmp_len, "acXXXXXX"));
  172.     tmpattrsfile = mktemp(stringappend(tmp_base, tmp_len, "atXXXXXX"));
  173.     tmptabfile = mktemp(stringappend(tmp_base, tmp_len, "taXXXXXX"));
  174. --- 228,234 ----
  175.         fdefines = tryopen(defsfile, "w");
  176.       }
  177.   
  178. ! #if defined(MSDOS) || defined(atarist)
  179.     actfile = mktemp(stringappend(tmp_base, tmp_len, "acXXXXXX"));
  180.     tmpattrsfile = mktemp(stringappend(tmp_base, tmp_len, "atXXXXXX"));
  181.     tmptabfile = mktemp(stringappend(tmp_base, tmp_len, "taXXXXXX"));
  182. ***************
  183. *** 234,240 ****
  184.     fattrs = tryopen(tmpattrsfile,"w+");
  185.     ftable = tryopen(tmptabfile, "w+");
  186.   
  187. ! #ifndef MSDOS
  188.     unlink(actfile);
  189.     unlink(tmpattrsfile);
  190.     unlink(tmptabfile);
  191. --- 242,248 ----
  192.     fattrs = tryopen(tmpattrsfile,"w+");
  193.     ftable = tryopen(tmptabfile, "w+");
  194.   
  195. ! #if !(defined(MSDOS) || defined(atarist))
  196.     unlink(actfile);
  197.     unlink(tmpattrsfile);
  198.     unlink(tmptabfile);
  199. ***************
  200. *** 250,256 ****
  201.     attrsfile = stringappend(name_base, short_base_length, "_stype.h");
  202.     guardfile = stringappend(name_base, short_base_length, "_guard.c");
  203.   #else
  204. ! #ifdef MSDOS
  205.     attrsfile = stringappend(name_base, short_base_length, ".sth");
  206.     guardfile = stringappend(name_base, short_base_length, ".guc");
  207.   #else
  208. --- 258,264 ----
  209.     attrsfile = stringappend(name_base, short_base_length, "_stype.h");
  210.     guardfile = stringappend(name_base, short_base_length, "_guard.c");
  211.   #else
  212. ! #if defined(MSDOS) || defined(atarist)
  213.     attrsfile = stringappend(name_base, short_base_length, ".sth");
  214.     guardfile = stringappend(name_base, short_base_length, ".guc");
  215.   #else
  216. ***************
  217. *** 275,283 ****
  218.     fclose(fparser);
  219.   
  220.     filename = (char *) getenv ("BISON_HAIRY");
  221. ! #ifdef MSDOS
  222.     /* File doesn't exist in current directory; try in INIT directory.  */
  223.     cp = getenv("INIT");
  224.     if (filename == 0 && cp != 0)
  225.       {
  226.         filename = malloc(strlen(cp) + strlen(PFILE1) + 2);
  227. --- 283,295 ----
  228.     fclose(fparser);
  229.   
  230.     filename = (char *) getenv ("BISON_HAIRY");
  231. ! #if defined(MSDOS) || defined(atarist)
  232.     /* File doesn't exist in current directory; try in INIT directory.  */
  233. + #ifdef atarist
  234. +   cp = getenv("GNULIB");
  235. + #else
  236.     cp = getenv("INIT");
  237. + #endif
  238.     if (filename == 0 && cp != 0)
  239.       {
  240.         filename = malloc(strlen(cp) + strlen(PFILE1) + 2);
  241. ***************
  242. *** 366,372 ****
  243.     if (k==0) sys$exit(SS$_NORMAL);
  244.     sys$exit(SS$_ABORT);
  245.   #else
  246. ! #ifdef MSDOS
  247.     if (actfile) unlink(actfile);
  248.     if (tmpattrsfile) unlink(tmpattrsfile);
  249.     if (tmptabfile) unlink(tmptabfile);
  250. --- 378,384 ----
  251.     if (k==0) sys$exit(SS$_NORMAL);
  252.     sys$exit(SS$_ABORT);
  253.   #else
  254. ! #if defined(MSDOS) || defined(atarist)
  255.     if (actfile) unlink(actfile);
  256.     if (tmpattrsfile) unlink(tmpattrsfile);
  257.     if (tmptabfile) unlink(tmptabfile);
  258. *** reader.c.orig    Wed May 13 19:47:03 1992
  259. --- reader.c    Wed May 13 23:11:14 1992
  260. ***************
  261. *** 52,58 ****
  262.   extern int expected_conflicts;
  263.   extern char *token_buffer;
  264.   
  265. ! #ifndef MSDOS
  266.   extern char *realloc ();
  267.   #endif
  268.   
  269. --- 52,58 ----
  270.   extern int expected_conflicts;
  271.   extern char *token_buffer;
  272.   
  273. ! #if !(defined(MSDOS) || defined(atarist))
  274.   extern char *realloc ();
  275.   #endif
  276.   
  277. ***************
  278. *** 901,907 ****
  279.       case '/':
  280.         putc(c, fguard);
  281.         c = getc(finput);
  282. !       if (c != '*' && c != '/');
  283.           continue;
  284.   
  285.         cplus_comment = (c == '/');
  286. --- 901,907 ----
  287.       case '/':
  288.         putc(c, fguard);
  289.         c = getc(finput);
  290. !       if (c != '*' && c != '/')
  291.           continue;
  292.   
  293.         cplus_comment = (c == '/');
  294. *** system.h.orig    Wed May 13 19:47:12 1992
  295. --- system.h    Wed May 13 18:44:37 1992
  296. ***************
  297. *** 1,3 ****
  298. --- 1,10 ----
  299. + #ifdef atarist
  300. + #include <stdlib.h>
  301. + #include <unistd.h>
  302. + #include <memory.h>
  303. + #include <string.h>
  304. + #endif
  305.   #ifdef MSDOS
  306.   #include <stdlib.h>
  307.   #include <io.h>
  308.