JWS-112 Bumping version of Mafft to version 7.310.
[jabaws.git] / binaries / src / mafft / core / sextet5.c
index 1354b2c..0a734f8 100644 (file)
@@ -6,8 +6,6 @@
 
 #define END_OF_VEC -1
 
-static int maxl;
-static int tsize;
 
 void arguments( int argc, char *argv[] )
 {
@@ -91,7 +89,7 @@ void makecompositiontable_p( short *table, int *pointt )
                table[point]++;
 }
 
-int commonsextet_p( short *table, int *pointt )
+static int localcommonsextet_p( short *table, int *pointt )
 {
        int value = 0;
        short tmp;
@@ -182,7 +180,7 @@ int main( int argc, char **argv )
        int *grpseq;
        char *tmpseq;
        int  **pointt;
-       static char name[M][B];
+       static char **name;
        static int nlen[M];
        double **mtx;
        double **mtx2;
@@ -217,6 +215,7 @@ int main( int argc, char **argv )
                exit( 1 );
        }
 
+       name = AllocateCharMtx( njob, B+1 );
        tmpseq = AllocateCharVec( nlenmax+1 );
        seq = AllocateCharMtx( njob, nlenmax+1 );
        grpseq = AllocateIntVec( nlenmax+1 );
@@ -228,7 +227,7 @@ int main( int argc, char **argv )
 #if 0
        FRead( infp, name, nlen, seq );
 #else
-       readData( infp, name, nlen, seq );
+       readData_pointer( infp, name, nlen, seq );
 #endif
 
        fclose( infp );
@@ -272,7 +271,7 @@ int main( int argc, char **argv )
 
                for( j=i; j<njob; j++ ) 
                {
-                       score = (double)commonsextet_p( table1, pointt[j] );
+                       score = (double)localcommonsextet_p( table1, pointt[j] );
                        mtx[i][j] = score;
                } 
                free( table1 );
@@ -309,7 +308,7 @@ int main( int argc, char **argv )
                
        fp = fopen( "hat2", "w" );
        if( !fp ) ErrorExit( "Cannot open hat2." );
-       WriteHat2( fp, njob, name, mtx2 );
+       WriteHat2_pointer( fp, njob, name, mtx2 );
        fclose( fp );
 
        fprintf( stderr, "\n" );