home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume22 / p2cpatches / part02 < prev    next >
Encoding:
Internet Message Format  |  1990-06-07  |  21.1 KB

  1. Subject:  v22i035:  Update kit for p2c Pascal to C translator, Part02/02
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4. X-Checksum-Snefru: e1acef03 5743dae4 f13a77d6 22188d02
  5.  
  6. Submitted-by: David Gillespie <daveg@csvax.caltech.edu>
  7. Posting-number: Volume 22, Issue 35
  8. Archive-name: p2cpatches/part02
  9.  
  10. The following patches convert p2c version 1.15 into p2c version 1.16.  To
  11. apply them automatically with Patch v2.0, first cd into your p2c
  12. distribution directory (with subdirectories src, examples, etc.), then
  13. execute "patch -p0 <p2c.patch", where "p2c.patch" is name of this file,
  14. then "cd src" and execute "make install".
  15.  
  16. These patches do not cover the example files, nor reproducible files
  17. such as "p2c.hdrs" and "p2c.cat".  Those files will be rebuilt by
  18. "make install".
  19.  
  20. Enjoy!
  21.                             -- Dave
  22.  
  23. Dave Gillespie
  24. 256-80 Caltech, Pasadena CA 91125
  25. daveg@csvax.caltech.edu, ...!cit-vax!daveg
  26.  
  27.  
  28.  
  29. *** README    Fri Apr 13 21:05:13 1990
  30. --- ../dist/README    Tue May  1 00:10:04 1990
  31. ***************
  32. *** 1,5 ****
  33.   
  34. ! This directory contains "p2c" version 1.15, a Pascal to C translator.
  35.   
  36.   "p2c"  Copyright 1989  Dave Gillespie
  37.                          256-80 Caltech
  38. --- 1,5 ----
  39.   
  40. ! This directory contains "p2c" version 1.16, a Pascal to C translator.
  41.   
  42.   "p2c"  Copyright 1989  Dave Gillespie
  43.                          256-80 Caltech
  44. Files Makefile and ../dist/Makefile are identical
  45. Files src/COPYING and ../dist/src/COPYING are identical
  46. diff -c -N -r -s src/HISTORY ../dist/src/HISTORY
  47. *** src/HISTORY    Fri Apr 13 21:04:41 1990
  48. --- ../dist/src/HISTORY    Tue May  1 00:09:28 1990
  49. ***************
  50. *** 4,9 ****
  51. --- 4,28 ----
  52.   ------- -- ------- --  ---
  53.   
  54.   
  55. + Version 1.16:
  56. +  * Reduced wasteful proliferation of identical-looking temporary variables.
  57. +  * Improved heuristic for determining allocation size for set constructors.
  58. +  * Corrected handling for EOF applied to buffered binary files.
  59. +  * Bug fix in decl.c: Handled a rare case involving forward-declared pointers.
  60. +  * Bug fix in p2clib.c:P_remset: Forgot to fix s[0] if highest bit was cleared.
  61. +  * Bug fix in p2clib.c:P_setxor: Forgot to fix s[0] if highest bits cancelled.
  62. +  * Added to sys.p2crc/trans.h the following configuration parameters:
  63. +     EofBufName      Macro to use for EOF of a bufffered file.
  64. +     FilePosBufName  Macro to use for FILEPOS or POSITION of a buffered file.
  65.   Version 1.15:
  66.   
  67.    * Taught the line breaker to handle logical/relational operators specially.
  68. Files src/Makefile and ../dist/src/Makefile are identical
  69. Files src/NOTES and ../dist/src/NOTES are identical
  70. Files src/README and ../dist/src/README are identical
  71. Files src/citmods.c and ../dist/src/citmods.c are identical
  72. Files src/comment.c and ../dist/src/comment.c are identical
  73. diff -c -N -r -s src/decl.c ../dist/src/decl.c
  74. *** src/decl.c    Fri Apr 13 21:04:49 1990
  75. --- ../dist/src/decl.c    Tue May  1 00:09:41 1990
  76. ***************
  77. *** 1250,1255 ****
  78. --- 1250,1257 ----
  79.           switch (type->kind) {
  80.   
  81.               case TK_POINTER:
  82. +             if (type->smin)    /* unresolved forward */
  83. +             return type;
  84.                   if (type->basetype == tp_void) {     /* ANYPTR */
  85.                       if (tp_special_anyptr)
  86.                           return tp_special_anyptr;   /* write "Anyptr" */
  87. ***************
  88. *** 1774,1782 ****
  89.       if (type == tp_char)
  90.           return tp_ubyte;
  91.       if (type->kind == TK_POINTER) {
  92. !         if (type->basetype->kind == TK_ARRAY ||
  93. !             type->basetype->kind == TK_STRING ||
  94. !             type->basetype->kind == TK_SET)
  95.               return makepointertype(canonicaltype(type->basetype->basetype));
  96.           else if (type->basetype == tp_void)
  97.               return (voidstar) ? tp_anyptr : makepointertype(tp_abyte);
  98. --- 1776,1786 ----
  99.       if (type == tp_char)
  100.           return tp_ubyte;
  101.       if (type->kind == TK_POINTER) {
  102. !     if (type->smin)
  103. !         return type;
  104. !         else if (type->basetype->kind == TK_ARRAY ||
  105. !          type->basetype->kind == TK_STRING ||
  106. !          type->basetype->kind == TK_SET)
  107.               return makepointertype(canonicaltype(type->basetype->basetype));
  108.           else if (type->basetype == tp_void)
  109.               return (voidstar) ? tp_anyptr : makepointertype(tp_abyte);
  110. ***************
  111. *** 1789,1797 ****
  112. --- 1793,1837 ----
  113.   }
  114.   
  115.   
  116. + int identicaltypes(t1, t2)
  117. + Type *t1, *t2;
  118. + {
  119. +     if (t1 == t2)
  120. +     return 1;
  121. +     if (t1->kind == t2->kind) {
  122. +     if (t1->kind == TK_SUBR)
  123. +         return (identicaltypes(t1->basetype, t2->basetype) &&
  124. +             exprsame(t1->smin, t2->smin, 2) &&
  125. +             exprsame(t1->smax, t2->smax, 2));
  126. +     if (t1->kind == TK_SET ||
  127. +         t1->kind == TK_SMALLSET)
  128. +         return (exprsame(t1->indextype->smax,
  129. +                  t2->indextype->smax, 2));
  130. +     if (t1->kind == TK_ARRAY ||
  131. +         t1->kind == TK_STRING ||
  132. +         t1->kind == TK_SMALLARRAY)
  133. +         return (identicaltypes(t1->basetype, t2->basetype) &&
  134. +             identicaltypes(t1->indextype, t2->indextype) &&
  135. +             t1->structdefd == t2->structdefd &&
  136. +             ((!t1->smin && !t2->smin) ||
  137. +              (t1->smin && t2->smin &&
  138. +               exprsame(t1->smin, t2->smin, 2))) &&
  139. +             ((!t1->smax && !t2->smax) ||
  140. +              (t1->smax && t2->smax &&
  141. +               exprsame(t1->smax, t2->smax, 2) &&
  142. +               t1->escale == t2->escale &&
  143. +               t1->issigned == t2->issigned)));
  144. +     }
  145. +     return 0;
  146. + }
  147.   int similartypes(t1, t2)
  148.   Type *t1, *t2;
  149.   {
  150. +     if (debug > 3) { fprintf(outf, "identicaltypes("); dumptypename(t1,1); fprintf(outf, ","); dumptypename(t2,1); fprintf(outf, ") = %d\n", identicaltypes(t1, t2)); }
  151. +     if (identicaltypes(t1, t2))
  152. +     return 1;
  153.       t1 = canonicaltype(t1);
  154.       t2 = canonicaltype(t2);
  155.       return (t1 == t2);
  156. ***************
  157. *** 1857,1865 ****
  158.           default:
  159.               if (findbasetype(tp1, flags) != findbasetype(tp2, flags))
  160.           return 0;
  161. !             while (tp1->kind == TK_POINTER && tp1->basetype)
  162.                   tp1 = tp1->basetype;
  163. !             while (tp2->kind == TK_POINTER && tp2->basetype)
  164.                   tp2 = tp2->basetype;
  165.               return (tp1 == tp2);
  166.       }
  167. --- 1897,1905 ----
  168.           default:
  169.               if (findbasetype(tp1, flags) != findbasetype(tp2, flags))
  170.           return 0;
  171. !             while (tp1->kind == TK_POINTER && !tp1->smin && tp1->basetype)
  172.                   tp1 = tp1->basetype;
  173. !             while (tp2->kind == TK_POINTER && !tp2->smin && tp2->basetype)
  174.                   tp2 = tp2->basetype;
  175.               return (tp1 == tp2);
  176.       }
  177. ***************
  178. *** 2103,2109 ****
  179.           break;
  180.   
  181.           default:
  182. !             if (type->meaning && type->meaning->kind == MK_TYPE &&
  183.                   type->meaning->wasdeclared) {
  184.                   output(type->meaning->name);
  185.               } else {
  186. --- 2143,2153 ----
  187.           break;
  188.   
  189.           default:
  190. !         if (type->kind == TK_POINTER && type->smin) {
  191. !         note("Forward pointer reference assumes struct type [323]");
  192. !         output("struct ");
  193. !         output(format_s(name_STRUCT, type->smin->val.s));
  194. !         } else if (type->meaning && type->meaning->kind == MK_TYPE &&
  195.                   type->meaning->wasdeclared) {
  196.                   output(type->meaning->name);
  197.               } else {
  198. ***************
  199. *** 3582,3587 ****
  200. --- 3626,3632 ----
  201.                   pd->next = ptrbase;
  202.                   ptrbase = pd;
  203.                   tp->basetype = tp_abyte;
  204. +         tp->smin = makeexpr_name(curtokcase, tp_integer);
  205.           anydeferredptrs = 1;
  206.                   gettok();
  207.               } else {
  208. ***************
  209. *** 4331,4337 ****
  210.         case TK_SMALLSET:
  211.         case TK_SET:
  212.       if (curtok == TOK_LBR)
  213. !         return p_setfactor(type);
  214.       break;
  215.       
  216.         default:
  217. --- 4376,4382 ----
  218.         case TK_SMALLSET:
  219.         case TK_SET:
  220.       if (curtok == TOK_LBR)
  221. !         return p_setfactor(type, 1);
  222.       break;
  223.       
  224.         default:
  225. ***************
  226. *** 4548,4554 ****
  227.           tp->meaning->ctx && tp->meaning->ctx != nullctx) {
  228.           pd = ptrbase;   /* Do this now, just in case */
  229.           while (pd) {
  230. !             if (pd->tp->basetype == tp_abyte) {
  231.               mp2 = pd->sym->mbase;
  232.               while (mp2 && !mp2->isactive)
  233.                   mp2 = mp2->snext;
  234. --- 4593,4600 ----
  235.           tp->meaning->ctx && tp->meaning->ctx != nullctx) {
  236.           pd = ptrbase;   /* Do this now, just in case */
  237.           while (pd) {
  238. !             if (pd->tp->smin && pd->tp->basetype == tp_abyte) {
  239. !             pd->tp->smin = NULL;
  240.               mp2 = pd->sym->mbase;
  241.               while (mp2 && !mp2->isactive)
  242.                   mp2 = mp2->snext;
  243. ***************
  244. *** 4701,4707 ****
  245.       deferallptrs = 0;
  246.       while (ptrbase) {
  247.           pd = ptrbase;
  248. !     if (pd->tp->basetype == tp_abyte) {
  249.           mp = pd->sym->mbase;
  250.           while (mp && !mp->isactive)
  251.           mp = mp->snext;
  252. --- 4747,4754 ----
  253.       deferallptrs = 0;
  254.       while (ptrbase) {
  255.           pd = ptrbase;
  256. !     if (pd->tp->smin && pd->tp->basetype == tp_abyte) {
  257. !         pd->tp->smin = NULL;
  258.           mp = pd->sym->mbase;
  259.           while (mp && !mp->isactive)
  260.           mp = mp->snext;
  261. Files src/dir.c and ../dist/src/dir.c are identical
  262. Files src/expr.c and ../dist/src/expr.c are identical
  263. diff -c -N -r -s src/funcs.c ../dist/src/funcs.c
  264. *** src/funcs.c    Fri Apr 13 21:04:53 1990
  265. --- ../dist/src/funcs.c    Tue May  1 00:09:45 1990
  266. ***************
  267. *** 1635,1641 ****
  268.   int code;
  269.   {
  270.       Expr *ex2 = NULL, *ex3 = NULL;
  271. !     Meaning *tvar = NULL;
  272.   
  273.       if (FCheck(checkfileisopen) && !is_std_file(ex)) {
  274.           if (exprspeed(ex) < 5 && nosideeffects(ex, 0)) {
  275. --- 1635,1641 ----
  276.   int code;
  277.   {
  278.       Expr *ex2 = NULL, *ex3 = NULL;
  279. !     Meaning *tvar = NULL, *mp;
  280.   
  281.       if (FCheck(checkfileisopen) && !is_std_file(ex)) {
  282.           if (exprspeed(ex) < 5 && nosideeffects(ex, 0)) {
  283. ***************
  284. *** 1650,1656 ****
  285.       switch (code) {
  286.   
  287.           case 0:  /* eof */
  288. !         if (*eofname)
  289.           ex = makeexpr_bicall_1(eofname, tp_boolean, ex);
  290.           else
  291.           ex = makeexpr_rel(EK_NE, makeexpr_bicall_1("feof", tp_int, ex),
  292. --- 1650,1660 ----
  293.       switch (code) {
  294.   
  295.           case 0:  /* eof */
  296. !             if ((mp = isfilevar(ex)) != NULL &&
  297. !         mp->bufferedfile &&
  298. !         *eofbufname)
  299. !         ex = makeexpr_bicall_1(eofbufname, tp_boolean, ex);
  300. !         else if (*eofname)
  301.           ex = makeexpr_bicall_1(eofname, tp_boolean, ex);
  302.           else
  303.           ex = makeexpr_rel(EK_NE, makeexpr_bicall_1("feof", tp_int, ex),
  304. ***************
  305. *** 1662,1668 ****
  306.               break;
  307.   
  308.           case 2:  /* position or filepos */
  309. !             ex = makeexpr_bicall_1(fileposname, tp_integer, ex);
  310.               break;
  311.   
  312.           case 3:  /* maxpos or filesize */
  313. --- 1666,1677 ----
  314.               break;
  315.   
  316.           case 2:  /* position or filepos */
  317. !             if ((mp = isfilevar(ex)) != NULL &&
  318. !         mp->bufferedfile &&
  319. !         *fileposbufname)
  320. !         ex = makeexpr_bicall_1(fileposbufname, tp_boolean, ex);
  321. !         else
  322. !         ex = makeexpr_bicall_1(fileposname, tp_integer, ex);
  323.               break;
  324.   
  325.           case 3:  /* maxpos or filesize */
  326. Files src/hpmods.c and ../dist/src/hpmods.c are identical
  327. Files src/lex.c and ../dist/src/lex.c are identical
  328. Files src/loc.p2clib.c and ../dist/src/loc.p2clib.c are identical
  329. Files src/loc.p2crc and ../dist/src/loc.p2crc are identical
  330. Files src/makeproto.c and ../dist/src/makeproto.c are identical
  331. Files src/out.c and ../dist/src/out.c are identical
  332. diff -c -N -r -s src/p2c.h ../dist/src/p2c.h
  333. *** src/p2c.h    Fri Apr 13 21:04:56 1990
  334. --- ../dist/src/p2c.h    Tue May  1 00:09:51 1990
  335. ***************
  336. *** 4,10 ****
  337.   
  338.   /* Header file for code generated by "p2c", the Pascal-to-C translator */
  339.   
  340. ! /* "p2c"  Copyright (C) 1989 Dave Gillespie, version 1.15.
  341.    * This file may be copied, modified, etc. in any way.  It is not restricted
  342.    * by the licence agreement accompanying p2c itself.
  343.    */
  344. --- 4,10 ----
  345.   
  346.   /* Header file for code generated by "p2c", the Pascal-to-C translator */
  347.   
  348. ! /* "p2c"  Copyright (C) 1989 Dave Gillespie, version 1.16.
  349.    * This file may be copied, modified, etc. in any way.  It is not restricted
  350.    * by the licence agreement accompanying p2c itself.
  351.    */
  352. ***************
  353. *** 317,322 ****
  354. --- 317,325 ----
  355.   #define PUT(f,type)        (fwrite(&__CAT__(f,_BUFFER),sizeof(type),1,(f)),  \
  356.                   (__CAT__(f,_BFLAGS) = 0))
  357.   #define CPUT(f)            (PUT(f,char))
  358. + #define BUFEOF(f)       (__CAT__(f,_BFLAGS) != 2 && P_eof(f))
  359. + #define BUFFPOS(f)       (ftell(f) - (__CAT__(f,_BFLAGS) == 2))
  360.   
  361.   /* Memory allocation */
  362.   #ifdef __GCC__
  363. diff -c -N -r -s src/p2c.man ../dist/src/p2c.man
  364. *** src/p2c.man    Fri Apr 13 21:04:42 1990
  365. --- ../dist/src/p2c.man    Tue May  1 00:09:31 1990
  366. ***************
  367. *** 1,7 ****
  368.   .\" p2c  Copyright 1989 Dave Gillespie
  369.   .TH P2C 1 "local"
  370.   .SH NAME
  371. ! p2c \- Pascal to C translator, version 1.15
  372.   .SH SYNOPSIS
  373.   .B p2c
  374.   [ options ] [ file [ module ] ]
  375. --- 1,7 ----
  376.   .\" p2c  Copyright 1989 Dave Gillespie
  377.   .TH P2C 1 "local"
  378.   .SH NAME
  379. ! p2c \- Pascal to C translator, version 1.16
  380.   .SH SYNOPSIS
  381.   .B p2c
  382.   [ options ] [ file [ module ] ]
  383. ***************
  384. *** 1493,1500 ****
  385.   .SH AUTHOR
  386.   Dave Gillespie, daveg@csvax.caltech.edu.
  387.   .PP
  388. ! Many thanks to William Bader, Rick Koshi, Eric Raymond, Magne Haveraaen,
  389. ! Dirk Grunwald, David Barto, Paul Fisher, and others whose suggestions and
  390. ! bug reports have helped improve
  391.   .I p2c
  392.   in countless ways.
  393. --- 1493,1500 ----
  394.   .SH AUTHOR
  395.   Dave Gillespie, daveg@csvax.caltech.edu.
  396.   .PP
  397. ! Many thanks to William Bader, Steven Levi, Rick Koshi, Eric Raymond,
  398. ! Magne Haveraaen, Dirk Grunwald, David Barto, Paul Fisher, and others whose
  399. ! suggestions and bug reports have helped improve
  400.   .I p2c
  401.   in countless ways.
  402. diff -c -N -r -s src/p2clib.c ../dist/src/p2clib.c
  403. *** src/p2clib.c    Fri Apr 13 21:04:55 1990
  404. --- ../dist/src/p2clib.c    Tue May  1 00:09:47 1990
  405. ***************
  406. *** 577,583 ****
  407.       *d++ = *s1++;
  408.       while (--sz2 >= 0)
  409.       *d++ = *s2++;
  410. !     *dbase = d - dbase - 1;
  411.       return dbase;
  412.   }
  413.   
  414. --- 577,584 ----
  415.       *d++ = *s1++;
  416.       while (--sz2 >= 0)
  417.       *d++ = *s2++;
  418. !     while (--d > dbase && !*d) ;
  419. !     *dbase = d - dbase;
  420.       return dbase;
  421.   }
  422.   
  423. ***************
  424. *** 656,663 ****
  425.       register int bit;
  426.       bit = val % SETBITS;
  427.       val /= SETBITS;
  428. !     if (++val <= *s)
  429. !     s[val] &= ~(1<<bit);
  430.       return s;
  431.   }
  432.   
  433. --- 657,667 ----
  434.       register int bit;
  435.       bit = val % SETBITS;
  436.       val /= SETBITS;
  437. !     if (++val <= *s) {
  438. !     if (!(s[val] &= ~(1<<bit)))
  439. !         while (*s && !s[*s])
  440. !         (*s)--;
  441. !     }
  442.       return s;
  443.   }
  444.   
  445. Files src/parse.c and ../dist/src/parse.c are identical
  446. diff -c -N -r -s src/pexpr.c ../dist/src/pexpr.c
  447. *** src/pexpr.c    Fri Apr 13 21:04:52 1990
  448. --- ../dist/src/pexpr.c    Tue May  1 00:09:44 1990
  449. ***************
  450. *** 469,485 ****
  451.   
  452.   #define MAXSETLIT 400
  453.   
  454. ! Expr *p_setfactor(type)
  455. ! Type *type;
  456.   {
  457.       Expr *ex, *exmax = NULL, *ex2;
  458.       Expr *first[MAXSETLIT], *last[MAXSETLIT];
  459.       char doneflag[MAXSETLIT];
  460.       int i, j, num, donecount;
  461. !     int isconst, guesstype = 0;
  462.       long maxv, max2;
  463.       Value val;
  464. !     Type *tp;
  465.       Meaning *tvar;
  466.   
  467.       if (curtok == TOK_LBRACE)
  468. --- 469,486 ----
  469.   
  470.   #define MAXSETLIT 400
  471.   
  472. ! Expr *p_setfactor(target, sure)
  473. ! Type *target;
  474. ! int sure;
  475.   {
  476.       Expr *ex, *exmax = NULL, *ex2;
  477.       Expr *first[MAXSETLIT], *last[MAXSETLIT];
  478.       char doneflag[MAXSETLIT];
  479.       int i, j, num, donecount;
  480. !     int isconst, guesstype;
  481.       long maxv, max2;
  482.       Value val;
  483. !     Type *tp, *type;
  484.       Meaning *tvar;
  485.   
  486.       if (curtok == TOK_LBRACE)
  487. ***************
  488. *** 493,500 ****
  489.           val.s = NULL;
  490.           return makeexpr_val(val);
  491.       }
  492. !     if (!type)
  493. !         guesstype = 1;
  494.       maxv = -1;
  495.       isconst = 1;
  496.       num = 0;
  497. --- 494,501 ----
  498.           val.s = NULL;
  499.           return makeexpr_val(val);
  500.       }
  501. !     type = target;
  502. !     guesstype = !sure;
  503.       maxv = -1;
  504.       isconst = 1;
  505.       num = 0;
  506. ***************
  507. *** 510,516 ****
  508.           }
  509.           if (guesstype && num == 0) {
  510.               ex = p_ord_expr();
  511. !             type = ord_type(ex->val.type);
  512.           } else {
  513.               ex = p_expr(type);
  514.           }
  515. --- 511,517 ----
  516.           }
  517.           if (guesstype && num == 0) {
  518.               ex = p_ord_expr();
  519. !         type = ex->val.type;
  520.           } else {
  521.               ex = p_expr(type);
  522.           }
  523. ***************
  524. *** 550,561 ****
  525.       gettok();
  526.       else if (!wneedtok(TOK_RBR))
  527.       skippasttotoken(TOK_RBR, TOK_SEMI);
  528. !     tp = ord_type(first[0]->val.type);
  529.       if (guesstype) {      /* must determine type */
  530. !         if (!exmax || maxv == LONG_MAX) {
  531. !             maxv = defaultsetsize-1;
  532. !             if (ord_range(tp, NULL, &max2) && maxv > max2)
  533.                   maxv = max2;
  534.               exmax = makeexpr_long(maxv);
  535.           } else
  536.               exmax = copyexpr(exmax);
  537. --- 551,566 ----
  538.       gettok();
  539.       else if (!wneedtok(TOK_RBR))
  540.       skippasttotoken(TOK_RBR, TOK_SEMI);
  541. !     tp = first[0]->val.type;
  542.       if (guesstype) {      /* must determine type */
  543. !         if (maxv == LONG_MAX) {
  544. !         if (target && ord_range(target, NULL, &max2))
  545. !         maxv = max2;
  546. !             else if (ord_range(tp, NULL, &max2) && max2 < 1000000 &&
  547. !              (max2 >= defaultsetsize || num == 1))
  548.                   maxv = max2;
  549. +         else
  550. +         maxv = defaultsetsize-1;
  551.               exmax = makeexpr_long(maxv);
  552.           } else
  553.               exmax = copyexpr(exmax);
  554. ***************
  555. *** 1122,1128 ****
  556.   
  557.           case TOK_LBR:
  558.       case TOK_LBRACE:
  559. !             return p_setfactor(NULL);
  560.   
  561.           case TOK_NIL:
  562.               gettok();
  563. --- 1127,1134 ----
  564.   
  565.           case TOK_LBR:
  566.       case TOK_LBRACE:
  567. !             return p_setfactor(target && target->kind == TK_SET
  568. !                    ? target->indextype : NULL, 0);
  569.   
  570.           case TOK_NIL:
  571.               gettok();
  572. ***************
  573. *** 1160,1166 ****
  574.   
  575.                                   case TK_SET:
  576.                                   case TK_SMALLSET:
  577. !                                     return p_setfactor(type->indextype);
  578.   
  579.                                   case TK_RECORD:
  580.                                       return p_constrecord(type, 0);
  581. --- 1166,1172 ----
  582.   
  583.                                   case TK_SET:
  584.                                   case TK_SMALLSET:
  585. !                                     return p_setfactor(type->indextype, 1);
  586.   
  587.                                   case TK_RECORD:
  588.                                       return p_constrecord(type, 0);
  589. Files src/string.pas and ../dist/src/string.pas are identical
  590. Files src/stuff.c and ../dist/src/stuff.c are identical
  591. diff -c -N -r -s src/sys.p2crc ../dist/src/sys.p2crc
  592. *** src/sys.p2crc    Fri Apr 13 21:04:44 1990
  593. --- ../dist/src/sys.p2crc    Tue May  1 00:09:36 1990
  594. ***************
  595. *** 1,4 ****
  596. ! # Standard configuration file for "p2c" 1.15, the Pascal to C translator
  597.   #  Copyright (C) 1989 David Gillespie.
  598.   #  Author's address: daveg@csvax.caltech.edu; 256-80 Caltech/Pasadena CA 91125.
  599.   
  600. --- 1,4 ----
  601. ! # Standard configuration file for "p2c" 1.16, the Pascal to C translator
  602.   #  Copyright (C) 1989 David Gillespie.
  603.   #  Author's address: daveg@csvax.caltech.edu; 256-80 Caltech/Pasadena CA 91125.
  604.   
  605. ***************
  606. *** 1518,1523 ****
  607. --- 1518,1527 ----
  608.   ArrayPutFBufName   APUTFBUF    # A special PutFBuf for files of arrays.
  609.   
  610.   ArrayPutName            # A special Put for files of arrays.
  611. + EofBufName       BUFEOF       # Name of a macro for "eof" of a buffered file.
  612. + FilePosBufName     BUFFPOS    # Name of a macro for buffered "filepos".
  613.   
  614.   
  615.   
  616. Files src/system.imp and ../dist/src/system.imp are identical
  617. Files src/system.m2 and ../dist/src/system.m2 are identical
  618. Files src/trans.c and ../dist/src/trans.c are identical
  619. diff -c -N -r -s src/trans.h ../dist/src/trans.h
  620. *** src/trans.h    Fri Apr 13 21:04:57 1990
  621. --- ../dist/src/trans.h    Tue May  1 00:09:54 1990
  622. ***************
  623. *** 1,4 ****
  624. ! /* "p2c", a Pascal to C translator, version 1.15.
  625.      Copyright (C) 1989 David Gillespie.
  626.      Author's address: daveg@csvax.caltech.edu; 256-80 Caltech/Pasadena CA 91125.
  627.   
  628. --- 1,4 ----
  629. ! /* "p2c", a Pascal to C translator, version 1.16.
  630.      Copyright (C) 1989 David Gillespie.
  631.      Author's address: daveg@csvax.caltech.edu; 256-80 Caltech/Pasadena CA 91125.
  632.   
  633. ***************
  634. *** 134,140 ****
  635.   extern char *p2c_home;
  636.   #endif
  637.   
  638. ! #define P2C_VERSION  "1.15"
  639.   
  640.   
  641.   
  642. --- 134,140 ----
  643.   extern char *p2c_home;
  644.   #endif
  645.   
  646. ! #define P2C_VERSION  "1.16"
  647.   
  648.   
  649.   
  650. ***************
  651. *** 530,535 ****
  652. --- 530,536 ----
  653.    *
  654.    * TK_POINTER:  Pointer type.
  655.    *    tp->basetype => Base type of pointer.
  656. +  *    tp->smin => EK_NAME for type if not-yet-resolved forward; else NULL.
  657.    *    Only one pointer type is ever generated for a given other type;
  658.    *    each tp->pointertype points back to that type if it has been generated.
  659.    *
  660. ***************
  661. *** 1030,1035 ****
  662. --- 1031,1037 ----
  663.   extern char putfbufname[40], charputfbufname[40], arrayputfbufname[40];
  664.   extern char getname[40], chargetname[40], arraygetname[40];
  665.   extern char putname[40], charputname[40], arrayputname[40];
  666. + extern char eofbufname[40], fileposbufname[40];
  667.   extern char storebitsname[40], signextname[40];
  668.   extern char filenotfoundname[40], filenotopenname[40];
  669.   extern char filewriteerrorname[40], badinputformatname[40], endoffilename[40];
  670. ***************
  671. *** 1592,1597 ****
  672. --- 1594,1601 ----
  673.       'C', 'V', "PUTNAME",         (anyptr)  putname,          40,
  674.       'C', 'V', "CHARPUTNAME",     (anyptr)  charputname,      40,
  675.       'C', 'V', "ARRAYPUTNAME",    (anyptr)  arrayputname,     40,
  676. +     'C', 'V', "EOFBUFNAME",      (anyptr)  eofbufname,       40,
  677. +     'C', 'V', "FILEPOSBUFNAME",  (anyptr)  fileposbufname,   40,
  678.   
  679.   /* RANGE CHECKING */
  680.       'S', 'V', "CASECHECK",       (anyptr) &casecheck,         0,
  681. Files src/turbo.imp and ../dist/src/turbo.imp are identical
  682.  
  683. exit 0 # Just in case...
  684.