Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.43
 
1.44
 
MAIN:ragge:20030609174257
 
pftn.c
_>2525 };
 2626 
 2727 struct instk {
<>28 -        int in_sz;   /* size of array element */
 29 -        struct symtab **in_xp/* member in structure initializations */
 30 -        int in_n;    /* number of initializations seen */
 31 -        struct suedef *in_sue;
 32 -        int in_d;    /* dimoff */
 33 -        TWORD in_t;    /* type */
 34 -        struct symtab *in_sym;   /* stab index */
 35 -        int in_fl;   /* flag which says if this level is controlled by {} */
 36 -        OFFSZ in_off/* offset of the beginning of this level */
 37 -} instack[10], *pstk;
  28+        struct  instk *in_prev; /* linked list */
  29+        int     in_sz;          /* size of array element */
  30+        struct  symtab **in_xp/* member in structure initializations */
  31+        int     in_n;           /* number of initializations seen */
  32+        struct  suedef *in_sue;
  33+        int     in_d;           /* dimoff */
  34+        TWORD   in_t;           /* type */
  35+        struct  symtab *in_sym; /* stab index */
  36+        int     in_fl;  /* flag which says if this level is controlled by {} */
  37+        OFFSZ   in_off;         /* offset of the beginning of this level */
  38+} *pstk;
3839 
 3940 /* defines used for getting things off of the initialization stack */
 4041 
     
 !
936937 void
 937938 instk(struct symtab *p, TWORD t, int d, struct suedef *sue, OFFSZ off)
 938939 {
<> 940+        struct instk *sp;
939941 
 940942         for (;;) {
 941943 # ifndef BUG1
     
 !
945947 # endif
 946948 
 947949                 /* save information on the stack */
<> 950+                sp = tmpalloc(sizeof(struct instk));
  951+                sp->in_prev = pstk;
  952+                pstk = sp;
948953 
<>949 -                if (!pstk)
 950 -                        pstk = instack;
 951 -                else
 952 -                        ++pstk;
 953 -
954954                 pstk->in_fl = 0;        /* { flag */
 955955                 pstk->in_sym = p;
 956956                 pstk->in_t = t;
     
 !
10211021         i = 0;
 10221022         if ((iclass == EXTDEF || iclass==STATIC) &&
 10231023             (pstk->in_t == CHAR || pstk->in_t == UCHAR) &&
<>1024 -            pstk != instack && ISARY(pstk[-1].in_t)) {
  1024+            pstk->in_prev != NULL && ISARY(pstk->in_prev->in_t)) {
10251025                 /* treat "abc" as { 'a', 'b', 'c', 0 } */
 10261026                 ilbrace();  /* simulate { */
 10271027                 inforce(pstk->in_off);
     
 !
10311031                  * unwanted initializers
 10321032                  */
 10331033 
<>1034 -                lxarg = (pstk-1) != instack ? dimtab[(pstk-1)->in_d] : 0;
  1034+                lxarg = pstk->in_prev->in_prev != NULL ?
  1035+                    dimtab[pstk->in_prev->in_d] : 0;
10351036                 while (*wr != 0) {
 10361037                         if (*wr++ == '\\')
 10371038                                 val = esccon(&wr);
     
 !
11381139                 return;
 11391140                 }
 11401141 
<>1141 -        pstk = instack;
  1142+        while (pstk->in_prev)
  1143+                pstk = pstk->in_prev;
11421144 
 11431145         t = pstk->in_t;
 11441146         d = pstk->in_d;
     
 !
11851187 void
 11861188 fixinit(void)
 11871189 {
<>1188 -        pstk = instack;
  1190+        while (pstk->in_prev)
  1191+                pstk = pstk->in_prev;
11891192         paramno = 0;
 11901193         vfdalign( AL_INIT );
 11911194         inoff = 0;
     
 !
12971300         struct symtab *p;
 12981301         OFFSZ temp;
 12991302 
<>1300 -        for( ; pstk > instack; ) {
  1303+        for( ; pstk->in_prev != NULL; ) {
13011304 
 13021305                 if( pstk->in_fl ) ++ibseen;
 13031306 
<>1304 -                --pstk;
  1307+                pstk = pstk->in_prev;
13051308                 
 13061309                 t = pstk->in_t;
 13071310 
     
 !
13161319                         }
 13171320                 else if( ISARY(t) ){
 13181321                         n = ++pstk->in_n;
<>1319 -                        if( n >= dimtab[pstk->in_d] && pstk > instack ) continue;
  1322+                        if (n >= dimtab[pstk->in_d] && pstk->in_prev != NULL)
  1323+                                continue;
13201324 
 13211325                         /* put the new element onto the stack */
 13221326 
     
 !
13411345 
 13421346         temp = pstk;
 13431347 
<>1344 -        for (; pstk > instack; --pstk) {
  1348+        for (; pstk->in_prev != NULL; pstk = pstk->in_prev) {
13451349 
 13461350                 t = pstk->in_t;
 13471351                 if (t != UNIONTY && t != STRTY && !ISARY(t))
     
 !
13791383                 return;
 13801384         }
 13811385 
<>1382 -        for (; pstk > instack; --pstk) {
  1386+        for (; pstk->in_prev != NULL; pstk = pstk->in_prev) {
<_13831387                 if(!pstk->in_fl)
 13841388                         continue;
 13851389 
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-09-30 15:56 +0200