correct errors on delta 1.4
authorPeter B. Kessler <peter@ucbvax.Berkeley.EDU>
Thu, 26 Mar 1981 10:37:47 +0000 (02:37 -0800)
committerPeter B. Kessler <peter@ucbvax.Berkeley.EDU>
Thu, 26 Mar 1981 10:37:47 +0000 (02:37 -0800)
SCCS-vsn: usr.bin/pascal/src/fend.c 1.5

usr/src/usr.bin/pascal/src/fend.c

index c416254..65407b3 100644 (file)
@@ -134,7 +134,7 @@ funcend(fp, bundle, endline)
            ftnno = fp -> entloc;
            putprintf( "        .text" , 0 );
            putprintf( "        .align  1" , 0 );
            ftnno = fp -> entloc;
            putprintf( "        .text" , 0 );
            putprintf( "        .align  1" , 0 );
-           sextname( extname , fp -> symbol , cbn );
+           sextname( extname , fp -> symbol , cbn - 1 );
            putprintf( "        .globl  %s" , 0 , extname );
            putprintf( "%s:" , 0 , extname );
            stabfunc( fp -> symbol , fp -> class , bundle[1] , cbn - 1 );
            putprintf( "        .globl  %s" , 0 , extname );
            putprintf( "%s:" , 0 , extname );
            stabfunc( fp -> symbol , fp -> class , bundle[1] , cbn - 1 );
@@ -594,8 +594,8 @@ sextname( buffer , name , level )
        sprintf( starthere , EXTFORMAT , enclosing[ i ] );
        starthere += strlen( enclosing[ i ] ) + 1;
     }
        sprintf( starthere , EXTFORMAT , enclosing[ i ] );
        starthere += strlen( enclosing[ i ] ) + 1;
     }
-    sprintf( starthere , EXTFORMAT , p -> symbol );
-    starthere += strlen( p -> symbol ) + 1;
+    sprintf( starthere , EXTFORMAT , name );
+    starthere += strlen( name ) + 1;
     if ( starthere >= &buffer[ BUFSIZ ] ) {
        panic( "sextname" );
     }
     if ( starthere >= &buffer[ BUFSIZ ] ) {
        panic( "sextname" );
     }