Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.18
 
1.19
 
MAIN:ragge:20030103223233
 
pftn.c
_>926926 
 927927                 /* save information on the stack */
 928928 
<>929 -                if( !pstk ) pstk = instack;
 930 -                else ++pstk;
  929+                if (!pstk)
  930+                        pstk = instack;
  931+                else
  932+                        ++pstk;
931933 
 932934                 pstk->in_fl = 0;        /* { flag */
<>933 -                pstk->in_idid ;
 934 -                pstk->in_tt ;
 935 -                pstk->in_dd ;
 936 -                pstk->in_ss ;
  935+                pstk->in_id = id ;
  936+                pstk->in_t = t ;
  937+                pstk->in_d = d ;
  938+                pstk->in_s = s ;
937939                 pstk->in_n = 0/* number seen */
<>938 -                pstk->in_xt==STRTY ?dimtab[s+1] : 0 ;
 939 -                pstk->in_offoff;   /* offset at the beginning of this element */
  940+                pstk->in_xt == STRTY ? dimtab[s+1] : 0 ;
  941+                pstk->in_off = off;/* offset at the beginning of this element */
  942+
940943                 /* if t is an array, DECREF(t) can't be a field */
<>941 -                /* INS_sz has size of array elements, and -size for fields */
 942 -                if( ISARY(t) ){
 943 -                        pstk->in_sz = tsize( DECREF(t), d+1, s );
 944 -                        }
 945 -                else if( stab[id].sclass & FIELD ){
 946 -                        pstk->in_sz = - ( stab[id].sclass & FLDSIZ );
 947 -                        }
 948 -                else {
  944+                /* in_sz has size of array elements, and -size for fields */
  945+                if (ISARY(t)) {
  946+                        pstk->in_sz = tsize(DECREF(t), d+1, s);
  947+                } else if (stab[id].sclass & FIELD){
  948+                        pstk->in_sz = - (stab[id].sclass & FLDSIZ);
  949+                } else {
949950                         pstk->in_sz = 0;
<>950 -                        }
  951+                }
951952 
<>952 -                if( (iclass==AUTO || iclass == REGISTER ) &&
 953 -                        (ISARY(t) || t==STRTY) ) uerror( "no automatic aggregate initialization" );
  953+                if ((iclass==AUTO || iclass == REGISTER) &&
  954+                    (ISARY(t) || t==STRTY))
  955+                        uerror("no automatic aggregate initialization");
954956 
 955957                 /* now, if this is not a scalar, put on another element */
 956958 
<>957 -                if( ISARY(t) ){
  959+                if (ISARY(t)) {
958960                         t = DECREF(t);
 959961                         ++d;
 960962                         continue;
<>961 -                        }
 962 -                else if( t == STRTY ){
 963 -                        if( dimtab[pstk->in_s] == 0 ){
 964 -                                uerror( "can't initialize undefined structure" );
  963+                } else if (t == STRTY) {
  964+                        if (dimtab[pstk->in_s] == 0) {
  965+                                uerror("can't initialize undefined structure");
965966                                 iclass = -1;
 966967                                 return;
<>967 -                                }
  968+                        }
968969                         id = dimtab[pstk->in_x];
 969970                         p = &stab[id];
<>970 -                        if( p->sclass != MOS && !(p->sclass&FIELD) ) cerror( "insane structure member list" );
  971+                        if (p->sclass != MOS && !(p->sclass&FIELD))
  972+                                cerror("insane structure member list");
971973                         t = p->stype;
 972974                         d = p->dimoff;
 973975                         s = p->sizoff;
 974976                         off += p->offset;
 975977                         continue;
<>976 -                        }
 977 -                else return;
 978 -                }
  978+                } else
  979+                        return;
979980         }
<> 981+}
980982 
 981983 NODE *
 982984 getstr(){ /* decide if the string is external or an initializer, and get the contents accordingly */
     
 !
12501252 
 12511253         temp = pstk;
 12521254 
<>1253 -        for( ; pstk > instack; --pstk ){
  1255+        for (; pstk > instack; --pstk) {
12541256 
 12551257                 t = pstk->in_t;
<>1256 -                if( t != STRTY && !ISARY(t) ) continue; /* not an aggregate */
 1257 -                if( pstk->in_fl ){ /* already associated with a { */
 1258 -                        if( pstk->in_n ) uerror( "illegal {");
  1258+                if (t != STRTY && !ISARY(t))
  1259+                        continue; /* not an aggregate */
  1260+                if (pstk->in_fl) { /* already associated with a { */
  1261+                        if (pstk->in_n)
  1262+                                uerror( "illegal {");
12591263                         continue;
<>1260 -                        }
  1264+                }
12611265 
 12621266                 /* we have one ... */
 12631267                 pstk->in_fl = 1;
 12641268                 break;
<>1265 -                }
  1269+        }
12661270 
 12671271         /* cannot find one */
 12681272         /* ignore such right braces */
     
 !
12861290                 return;
 12871291         }
 12881292 
<>1289 -        for( ; pstk > instack; --pstk ){
 1290 -                if( !pstk->in_fl ) continue;
  1293+        for (; pstk > instack; --pstk) {
  1294+                if(!pstk->in_fl)
  1295+                        continue;
12911296 
 12921297                 /* we have one now */
 12931298 
 12941299                 pstk->in_fl = 0/* cancel { */
 12951300                 gotscal();  /* take it away... */
 12961301                 return;
<>1297 -                }
  1302+        }
<_12981303 
 12991304         /* these right braces match ignored left braces: throw out */
 13001305         ifull = 1;
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-21 15:26 +0100