Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.177
 
1.178
 
MAIN:ragge:20071006151922
 
pftn.c
_>6969 
 7070 #include <string.h> /* XXX - for strcmp */
 7171 
<> 72+#include "cgram.h"
  73+
7274 struct symtab *spname;
 7375 struct symtab *cftnsp;
 7476 static int strunem;             /* currently parsed member type */
     
 !
761763  * Called after a struct is declared to restore the environment.
 762764  */
 763765 NODE *
<>764 -dclstruct(struct rstack *r)
  766+dclstruct(struct rstack *r, int pa)
765767 {
 766768         NODE *n;
 767769         struct params *l, *m;
 768770         struct suedef *sue;
 769771         struct symtab *p;
<>770 -        int al, sa, sz;
  772+        int al, sa, sz, coff;
771773         TWORD temp;
 772774         int i, high, low;
 773775 
     
 !
800802                 i++;
 801803         sue->suelem = permalloc(sizeof(struct symtab *) * i);
 802804 
<> 805+        coff = 0;
  806+        if (pa == PRAG_PACKED || pa == PRAG_ALIGNED)
  807+                strucoff = 0; /* must recount it */
  808+
803809         for (i = 0; l != NULL; l = l->next) {
 804810                 sue->suelem[i++] = p = l->sym;
 805811 
     
 !
814820                         continue;
 815821                 }
 816822                 sa = talign(p->stype, p->ssue);
<>817 -                if (p->sclass & FIELD) {
  823+                if (p->sclass & FIELD)
818824                         sz = p->sclass&FLDSIZ;
<>819 -                } else {
  825+                else
820826                         sz = tsize(p->stype, p->sdf, p->ssue);
<> 827+
  828+                if (pa == PRAG_PACKED || pa == PRAG_ALIGNED) {
  829+                        p->soffset = coff;
  830+                        if (pa == PRAG_ALIGNED)
  831+                                coff += ALLDOUBLE;
  832+                        else
  833+                                coff += sz;
  834+                        strucoff = coff;
821835                 }
<> 836+
<_822837                 if (sz > strucoff)
 823838                         strucoff = sz/* for use with unions */
 824839                 /*
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-08-21 02:25 +0200