X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=binaries%2Fsrc%2Fmafft%2Fcore%2FSalignmm.c;h=06e402eb9b07d91a210180f514d0eb97ad3bd952;hb=063b30bb5e8161134ae764742636ab538e10eea7;hp=11700400a0174a6ea320d831e86a3e9a60203db9;hpb=535359a3d592ee41bda72e7356f0181f6cee9d07;p=jabaws.git diff --git a/binaries/src/mafft/core/Salignmm.c b/binaries/src/mafft/core/Salignmm.c index 1170040..06e402e 100644 --- a/binaries/src/mafft/core/Salignmm.c +++ b/binaries/src/mafft/core/Salignmm.c @@ -2,15 +2,15 @@ #include "dp.h" #define MACHIGAI 0 -#define OUTGAP0TRY 1 +#define OUTGAP0TRY 0 #define DEBUG 0 #define XXXXXXX 0 #define USE_PENALTY_EX 0 #define FASTMATCHCALC 1 -static float **impmtx = NULL; -static int impalloclen = 0; +static TLS float **impmtx = NULL; +static TLS int impalloclen = 0; float imp_match_out_sc( int i1, int j1 ) { // fprintf( stderr, "imp+match = %f\n", impmtx[i1][j1] * fastathreshold ); @@ -79,10 +79,22 @@ void imp_match_init_strict( float *imp, int clus1, int clus2, int lgth1, int lgt float effij_kozo; double effijx; char *pt, *pt1, *pt2; - static char *nocount1 = NULL; - static char *nocount2 = NULL; + static TLS char *nocount1 = NULL; + static TLS char *nocount2 = NULL; LocalHom *tmpptr; + if( seq1 == NULL ) + { + if( impmtx ) FreeFloatMtx( impmtx ); + impmtx = NULL; + if( nocount1 ) free( nocount1 ); + nocount1 = NULL; + if( nocount2 ) free( nocount2 ); + nocount2 = NULL; + + return; + } + if( impalloclen < lgth1 + 2 || impalloclen < lgth2 + 2 ) { if( impmtx ) FreeFloatMtx( impmtx ); @@ -295,11 +307,11 @@ for( i = 0; i orlgth1 || lgth2 > orlgth2 ) { @@ -1105,7 +1191,7 @@ float A__align( char **seq1, char **seq2, double *eff1, double *eff2, int icyc, #endif - if( outgap == 1 ) + if( headgp == 1 ) { for( i=1; i N ) - { - fprintf( stderr, "alloclen=%d, resultlen=%d, N=%d\n", alloclen, resultlen, N ); - ErrorExit( "LENGTH OVER!\n" ); - } - for( i=0; i