Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.2
 
1.3
 
MAIN:ragge:20020326192151
 
pftn.c
_>6262 
 6363 # ifndef BUG1
 6464         if( ddebug ){
<>65 -#ifndef FLEXNAMES
 66 -                printf( "defid( %.8s (%d), ", p->sname, idp );
 67 -#else
6865                 printf( "defid( %s (%d), ", p->sname, idp );
<>69 -#endif
7066                 tprint( q->in.type );
 7167                 printf( ", %s, (%d,%d) ), level %d\n", scnames(class), q->fn.cdim, q->fn.csiz, blevel );
 7268                 }
     
 !
9591         if( blevel==1 && stp!=FARG ) switch( class ){
 9692 
 9793                 default:
<>98 -#ifndef FLEXNAMES
 99 -                        if(!(class&FIELD)) uerror( "declared argument %.8s is missing", p->sname );
 100 -#else
10194                         if(!(class&FIELD)) uerror( "declared argument %s is missing", p->sname );
<>102 -#endif
10395                 case MOS:
 10496                 case STNAME:
 10597                 case MOU:
     
 !
265257                         if( stab[*memp].sflags & SNONUNIQ ){
 266258                                 cname=p->sname;
 267259                                 oname=stab[*memp].sname;
<>268 -#ifndef FLEXNAMES
 269 -                                for(temp=1; temp<=NCHNAM; ++temp){
 270 -                                        if(*cname++ != *oname)goto diff;
 271 -                                        if(!*oname++)break;
 272 -                                        }
 273 -#else
274260                                 if (cname != oname) goto diff;
<>275 -#endif
276261                                 uerror("redeclaration of: %s",p->sname);
 277262                                 break;
 278263                                 diff: continue;
     
 !
287272                 p = &stab[idp];
 288273                 goto enter;
 289274                 }
<>290 -#ifndef FLEXNAMES
 291 -        uerror( "redeclaration of %.8s", p->sname );
 292 -#else
293275         uerror( "redeclaration of %s", p->sname );
<>294 -#endif
295276         if( class==EXTDEF && ISFTN(type) ) curftn = idp;
 296277         return;
 297278 
     
 !
585566 
 586567 # ifndef BUG1
 587568         if( ddebug ){
<>588 -#ifndef FLEXNAMES
 589 -                printf( "dclstruct( %.8s ), szindex = %d\n", (i>=0)? stab[i].sname : "??", szindex );
 590 -#else
591569                 printf( "dclstruct( %s ), szindex = %d\n", (i>=0)? stab[i].sname : "??", szindex );
<>592 -#endif
593570                 }
 594571 # endif
 595572         temp = (instruct&INSTRUCT)?STRTY:((instruct&INUNION)?UNIONTY:ENUMTY);
     
 !
618595                         sz = tsize( p->stype, p->dimoff, p->sizoff );
 619596                         }
 620597                 if( sz == 0 ){
<>621 -#ifndef FLEXNAMES
 622 -                        werror( "illegal zero sized structure member: %.8s", p->sname );
 623 -#else
624598                         werror( "illegal zero sized structure member: %s", p->sname );
<>625 -#endif
626599                         }
 627600                 if( sz > strucoff ) strucoff = sz/* for use with unions */
 628601                 SETOFF( al, sa );
     
 !
656629                 printf( "\tdimtab[%d,%d,%d] = %d,%d,%d\n", szindex,szindex+1,szindex+2,
 657630                                 dimtab[szindex],dimtab[szindex+1],dimtab[szindex+2] );
 658631                 for( i = dimtab[szindex+1]; dimtab[i] >= 0; ++i ){
<>659 -#ifndef FLEXNAMES
 660 -                        printf( "\tmember %.8s(%d)\n", stab[dimtab[i]].sname, dimtab[i] );
 661 -#else
662632                         printf( "\tmember %s(%d)\n", stab[dimtab[i]].sname, dimtab[i] );
<>663 -#endif
664633                         }
 665634                 }
 666635 # endif
     
 !
697666                 /* this parameter, entered at scan */
 698667                 break;
 699668         case FARG:
<>700 -#ifndef FLEXNAMES
 701 -                uerror("redeclaration of formal parameter, %.8s",
 702 -#else
703669                 uerror("redeclaration of formal parameter, %s",
<>704 -#endif
705670                         stab[idn].sname);
 706671                 /* fall thru */
 707672         case FTN:
     
 !
18531818                 }
 18541819         sp->sflags = SNONUNIQ | SMOS;
 18551820         q = stab[*idindex].sname; /* old entry name */
<>1856 -#ifdef FLEXNAMES
18571821         sp->sname = stab[*idindex].sname;
<>1858 -#endif
18591822 # ifndef BUG1
 18601823         if( ddebug ){
 18611824                 printf("\tnonunique entry for %s from %d to %d\n",
 18621825                         q, *idindex, i );
 18631826                 }
 18641827 # endif
 18651828         *idindex = i;
<>1866 -#ifndef FLEXNAMES
 1867 -        {
 1868 -                char *p = sp->sname;
 1869 -                for( i=1; i<=NCHNAM; ++i ) /* copy name */
 1870 -                        if( *p++ = *q /* assign */ ) ++q;
 1871 -                }
 1872 -#endif
18731829         return ( sp );
 18741830 }
 18751831 
     
 !
18811837 {
 18821838         char *p, *q;
 18831839         int i, ii;
<>1884 -#ifndef FLEXNAMES
 1885 -        int j;
 1886 -#endif
18871840         struct symtab *sp;
 18881841 
 18891842         /* compute initial hash index */
     
 !
18941847 # endif
 18951848 
 18961849         i = 0;
<>1897 -#ifndef FLEXNAMES
 1898 -        for( p=name, j=0; *p != '\0'; ++p ){
 1899 -                i += *p;
 1900 -                if( ++j >= NCHNAM ) break;
 1901 -                }
 1902 -#else
19031850         i = (int)name;
<>1904 -#endif
19051851         i = i%SYMTSZ;
 19061852         sp = &stab[ii=i];
 19071853 
 19081854         for(;;){ /* look for name */
 19091855 
 19101856                 if( sp->stype == TNULL ){ /* empty slot */
 19111857                         sp->sflags = s/* set STAG, SMOS if needed, turn off all others */
<>1912 -#ifndef FLEXNAMES
 1913 -                        p = sp->sname;
 1914 -                        for( j=0; j<NCHNAM; ++j ) if( *p++ = *name ) ++name;
 1915 -#else
19161858                         sp->sname = name;
<>1917 -#endif
19181859                         sp->stype = UNDEF;
 19191860                         sp->sclass = SNULL;
 19201861                         return( i );
 19211862                         }
 19221863                 if( (sp->sflags & (STAG|SMOS|SHIDDEN)) != s ) goto next;
 19231864                 p = sp->sname;
 19241865                 q = name;
<>1925 -#ifndef FLEXNAMES
 1926 -                for( j=0; j<NCHNAM;++j ){
 1927 -                        if( *p++ != *q ) goto next;
 1928 -                        if( !*q++ ) break;
 1929 -                        }
 1930 -                return( i );
 1931 -#else
19321866                 if (p == q)
 19331867                         return ( i );
<>1934 -#endif
19351868         next:
 19361869                 if( ++i >= SYMTSZ ){
 19371870                         i = 0;
     
 !
19551888                         q = &stab[j];
 19561889                         if( q->stype == UNDEF ||
 19571890                             q->slevel <= p->slevel ){
<>1958 -#ifndef FLEXNAMES
 1959 -                                cerror( "check error: %.8s", q->sname );
 1960 -#else
19611891                                 cerror( "check error: %s", q->sname );
<>1962 -#endif
19631892                                 }
 19641893                         }
<>1965 -#ifndef FLEXNAMES
 1966 -                else if( p->slevel > lev ) cerror( "%.8s check at level %d", p->sname, lev );
 1967 -#else
19681894                 else if( p->slevel > lev ) cerror( "%s check at level %d", p->sname, lev );
<>1969 -#endif
19701895                 }
 19711896         }
 19721897 #endif
     
 !
20141939                         lineno = p->suse < 0 ? -p->suse : p->suse;
 20151940                         if( p->stype==UNDEF || ( p->sclass==ULABEL && lev<2 ) ){
 20161941                                 lineno = temp;
<>2017 -#ifndef FLEXNAMES
 2018 -                                uerror( "%.8s undefined", p->sname );
 2019 -#else
20201942                                 uerror( "%s undefined", p->sname );
<>2021 -#endif
20221943                                 }
 20231944                         else aocode(p);
 20241945 # ifndef BUG1
 20251946                         if( ddebug ){
<>2026 -#ifndef FLEXNAMES
 2027 -                                printf( "removing %.8s", p->sname );
 2028 -#else
20291947                                 printf( "removing %s", p->sname );
<>2030 -#endif
20311948                                 printf( " from stab[%d], flags %o level %d\n",
 20321949                                         p-stab, p->sflags, p->slevel);
 20331950                                 }
     
 !
20811998         *q = *p;
 20821999         p->sflags |= SHIDDEN;
 20832000         q->sflags = (p->sflags&(SMOS|STAG)) | SHIDES;
<>2084 -#ifndef FLEXNAMES
 2085 -        if( hflag ) werror( "%.8s redefinition hides earlier one", p->sname );
 2086 -#else
20872001         if( hflag ) werror( "%s redefinition hides earlier one", p->sname );
<>2088 -#endif
20892002 # ifndef BUG1
 20902003         if( ddebug ) printf( "  %d hidden in %d\n", p-stab, q-stab );
 20912004 # endif
     
 !
21092022                 if( q == p ) break;
 21102023 
 21112024                 if( (q->sflags&(SMOS|STAG)) == s ){
<>2112 -#ifndef FLEXNAMES
 2113 -                        int j;
 2114 -                        for( j =0; j<NCHNAM; ++j ) if( p->sname[j] != q->sname[j] ) break;
 2115 -                        if( j == NCHNAM ){ /* found the name */
 2116 -#else
21172025                         if (p->sname == q->sname) {
<>2118 -#endif
<_21192026                                 q->sflags &= ~SHIDDEN;
 21202027 # ifndef BUG1
 21212028                                 if( ddebug ) printf( "unhide uncovered %d from %d\n", q-stab,p-stab);
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-10-02 10:28 +0200