extern int intlen( int *num );
extern char seqcheck( char **seq );
extern void scmx_calc( int icyc, char **aseq, double *effarr, float **scmx );
extern void exitall( char arr[] );
extern void display( char **seq, int nseq );
extern void intergroup_score( char **seq1, char **seq2, double *eff1, double *eff2, int clus1, int clus2, int len, double *value );
extern void intergroup_score_gapnomi( char **seq1, char **seq2, double *eff1, double *eff2, int clus1, int clus2, int len, double *value );
extern void intergroup_score_new( char **seq1, char **seq2, double *eff1, double *eff2, int clus1, int clus2, int len, double *value );
extern double score_calc5( char **seq, int s, double **eff, int ex );
extern double score_calc4( char **seq, int s, double **eff, int ex );
extern void upg2( int nseq, double **eff, int ***topol, double **len );
//extern void veryfastsupg_float_realloc_nobk_halfmtx( int njob, float **mtx, int ***topol, float **len );
//extern void veryfastsupg_float_realloc_nobk( int njob, float **mtx, int ***topol, float **len );
extern void veryfastsupg_int_realloc_nobk( int njob, int **mtx, int ***topol, double **len );
extern void veryfastsupg( int nseq, double **oeff, int ***topol, double **len );
extern void veryfastsupg_double( int nseq, double **oeff, int ***topol, double **len );
extern void veryfastsupg_double_loadtree( int nseq, double **oeff, int ***topol, double **len, char **name );
//extern void veryfastsupg_double_loadtop( int nseq, double **oeff, int ***topol, double **len );
extern void veryfastsupg_int( int nseq, int **oeff, int ***topol, double **len );
extern void fastsupg( int nseq, double **oeff, int ***topol, double **len );
extern void supg( int nseq, double **oeff, int ***topol, double **len );
extern void spg( int nseq, double **oeff, int ***topol, double **len );
extern double ipower( double x, int n );
extern void countnode( int nseq, int ***topol, double **node );
extern void countnode_int( int nseq, int ***topol, int **node );
extern void counteff_simple( int nseq, int ***topol, double **len, double *node );
extern void counteff_simple_float( int nseq, int ***topol, float **len, double *node );
extern void counteff_simple_float_nostatic( int nseq, int ***topol, float **len, double *node );
extern void counteff( int nseq, int ***topol, double **len, double **node );
extern float score_calc1( char *seq1, char *seq2 );
extern float score_calcp( char *seq1, char *seq2, int len );
extern float substitution_nid( char *seq1, char *seq2 );
extern float substitution_score( char *seq1, char *seq2 );
extern float substitution_hosei( char *seq1, char *seq2 );
extern float substitution( char *seq1, char *seq2 );
extern void treeconstruction( char **seq, int nseq, int ***topol, double **len, double **eff );
extern float bscore_calc( char **seq, int s, double **eff );
extern void AllocateTmpSeqs( char ***mseq2pt, char **mseq1pt, int locnlenmax );
extern void FreeTmpSeqs( char **mseq2, char *mseq1 );
extern void gappick_samestring( char *aseq );
extern void gappick0( char *aseq, char *seq );
extern void gappick( int nseq, int s, char **aseq, char **mseq2, 
					 double **eff, double *effarr );
extern void commongappick_record( int nseq, char **seq, int *map );
extern void commongappick( int nseq, char **seq );
extern double score_calc0( char **seq, int s, double **eff, int ex );
extern void strins( char *str1, char *str2 );
extern int isaligned( int nseq, char **seq );
extern double score_calc_for_score( int nseq, char **seq );
extern void floatncpy( float *vec1, float *vec2, int len );
extern float score_calc_a( char **seq, int s, double **eff );
extern float score_calc_s( char **seq, int s, double **eff );
extern double score_calc_for_score_s( int s, char **seq );
extern double SSPscore( int s, char **seq );
extern double DSPscore( int s, char **seq );
extern int searchAnchors( int nseq, char **seq, Segment *seg );
extern char *progName( char *str );
extern void dontcalcimportance( int nseq, double *eff, char **seq, LocalHom **localhom );
extern void dontcalcimportance_lastone( int nseq, double *eff, char **seq, LocalHom **localhom );
extern void dontcalcimportance_firstone( int nseq, double *eff, char **seq, LocalHom **localhom );
extern void calcimportance( int nseq, double *eff, char **seq, LocalHom **localhom );
extern void weightimportance2( int nseq, double *eff, LocalHom **localhom );
extern void weightimportance4( int clus1, int clus2, double *eff1, double *eff2, LocalHom ***localhom );
extern void extendlocalhom( int nseq, LocalHom **localhom );
extern void extendlocalhom2( int nseq, LocalHom **localhom, double **mtx );
extern int makelocal( char *s1, char *s2, int thr );
extern void mdfymtx( char **pair, int s1, double **partialmtx, double **mtx );
extern float score_calc( char **seq, int s );
extern void cpmx_calc( char **seq, float **cpmx, double *eff, int lgth, int clus );
extern void cpmx_calc_new( char **seq, float **cpmx, double *eff, int lgth, int clus );
extern void MScpmx_calc_new( char **seq, float **cpmx, double *eff, int lgth, int clus );
extern void mseqcat( char **seq1, char **seq2, double **eff, double *effarr1, double *effarr2, char name1[M][B], char name2[M][B], int clus1, int clus2 );
extern void strnbcat( char *s1, char *s2, int m );
extern int conjuctionforgaln( int s0, int s1, char **seq, char **aseq, double *peff, double *eff, char **name, char **aname, char *d );
extern int fastconjuction( int *memlist, char **seq, char **aseq, double *peff, double *eff, char name[M][B], char aname[M][B], char *d );
extern int fastconjuction_noname_kozo( int *memlist, char **seq, char **aseq, double *peff, double *eff, double *peff_kozo, double *eff_kozo, char *d );
extern int fastconjuction_noname( int *memlist, char **seq, char **aseq, double *peff, double *eff, char *d );
extern int fastconjuction_noweight( int *memlist, char **seq, char **aseq, double *peff, char *d );
extern int conjuctionfortbfast_old( char **pair, int s, char **seq, char **aseq, double *peff, double *eff, char *d );
extern int conjuction( char **pair, int s, char **seq, char **aseq, double *peff, double *eff, char **name, char **aname, char *d );
extern void floatdelete( float **cpmx, int d, int len );
extern void chardelete( char *seq, int d );
extern int RootBranchNode( int nseq, int ***topol, int step, int branch );
extern void BranchLeafNode( int nseq, int ***topol, int *node, int step, int branch );
extern void RootLeafNode( int nseq, int ***topol, int *node );
extern void nodeFromABranch( int nseq, int *result, int **pairwisenode, int ***topol, double **len, int step, int num );
//extern void OneClusterAndTheOther( int locnjob, char **pair, int *s1, int *s2, int ***topol, int step, int branch );
extern void OneClusterAndTheOther_fast( int locnjob, int *memlist1, int *memlist2, int *s1, int *s2, char *pairbuf, int ***topol, int step, int branch );
extern void makeEffMtx( int nseq, double **mtx, double *vec );
extern void node_eff( int nseq, double *eff, int *node );
extern int shrinklocalhom( char **pair, int s1, int s2, LocalHom **localhom, LocalHom ***localhomshrink );
extern int msshrinklocalhom_fast( int *memlist1, int *memlist2, LocalHom **localhom, LocalHom ***localhomshrink );
extern int fastshrinklocalhom( int *mem1, int *mem2, LocalHom **localhom, LocalHom ***localhomshrink );
extern int fastshrinklocalhom_one( int *mem1, int *mem2, int norg, LocalHom **localhom, LocalHom ***localhomshrink );
extern int msfastshrinklocalhom( int *mem1, int *mem2, LocalHom **localhom, LocalHom ***localhomshrink );
extern int TreeDependentIteration( int locnjob, char **name, int nlen[M], char **aseq, char **bseq, int ***topol, double **len, int **skipthisbranch, int alloclen, LocalHom **localhomtable, RNApair ***single, int nkozo, char *kozoarivec );
extern void checkMinusLength( int nseq, double **len );
extern void negativeMember2( int *mem, int *query, int locnseq );
extern int *negativeMember( int *query, int locnseq );
extern int IntExistsInVec( int query, int *vector );
extern NodeInCub searchParent( int top, int ***topol, int Start, int End );
extern void stopolInit( int n, Node *stopol );
extern void treeCnv( Node *stopol, int locnseq, int ***topol, double **len, double **bw );
extern int isLeaf( Node node );
extern double syntheticLength( Node *ob, Node *oppositeNode );
extern double calcW( Node *ob, Node *op );
extern void calcBranchWeight( double **bw, int locnseq, Node *stopol, int ***topol, double **len );
extern void branchWeightToPairWeight( int locnseq, int ***topol, double **pw, double **bw );
extern void weightFromABranch_rec( double *result, Node *ob, Node *op );
extern void weightFromABranch( int nseq, double *result, Node *stopol, int ***topol, int step, int LorR );
extern void keika( char *str, int current, int all );
extern double maxItch( double *soukan, int size );
extern void calcNaiseki( Fukusosuu *value, Fukusosuu *x, Fukusosuu *y );
extern Fukusosuu *AllocateFukusosuuVec( int l1 );
extern Fukusosuu **AllocateFukusosuuMtx( int l1, int l2 );
extern Fukusosuu ***AllocateFukusosuuCub( int l1, int l2, int l3 );
extern void FreeFukusosuuVec( Fukusosuu *vec );
extern void FreeFukusosuuMtx( Fukusosuu **mtx );
extern int getKouho( int *kouho, int nkouho, double *soukan, int nlen2 );
extern void zurasu2( int lag, int    clus1, int    clus2, char  **seq1, char  **seq2, char **aseq1, char **aseq2 );
extern void zurasu( int lag, int    clus1, int    clus2, char  **seq1, char  **seq2, char **aseq1, char **aseq2 );
extern int alignableReagion( int    clus1, int    clus2, char  **seq1, char  **seq2, double *eff1, double *eff2, Segment *seg );
extern void blockAlign( int *cut1, int *cut2, double **ocrossscore, int *ncut );
extern void blockAlign2( int *cut1, int *cut2, Segment **seg1, Segment **seg2, double **ocrossscore, int *ncut );
extern void blockAlign3( int *cut1, int *cut2, Segment **seg1, Segment **seg2, double **ocrossscore, int *ncut );
extern float A__align11( char **seq1, char **seq2, double *eff1, double *eff2, int icyc, int jcyc, int alloclen, LocalHom ***localhom, float *impmatch );
extern float imp_match_out_scH( int i1, int j1 );
extern void imp_match_init_strictH( float *imp, int clus1, int clus2, int lgth1, int lgth2, char **seq1, char **seq2, double *eff1, double *eff2, LocalHom ***localhom, int forscore );
extern float imp_match_out_scQ( int i1, int j1 );
extern float imp_match_out_scR( int i1, int j1 );
extern void imp_match_init_strictQ( float *imp, int clus1, int clus2, int lgth1, int lgth2, char **seq1, char **seq2, double *eff1, double *eff2, LocalHom ***localhom, int forscore );
extern void imp_match_init_strictR( float *imp, int clus1, int clus2, int lgth1, int lgth2, char **seq1, char **seq2, double *eff1, double *eff2, LocalHom ***localhom, int forscore );
extern void imp_match_init( float *imp, int clus1, int clus2, int lgth1, int lgth2, char **seq1, char **seq2, double *eff1, double *eff2, LocalHom ***localhom );
extern float MSalignmm( char **seq1, char **seq2, double *eff1, double *eff2, int icyc, int jcyc, int alloclen, char *, char *, char *, char *, int *, int, int *, int headgp, int tailgp );
extern float Lalignmm_hmout( char **seq1, char **seq2, double *eff1, double *eff2, int icyc, int jcyc, int alloclen, char *, char *, char *, char *, float **map );
extern float Lalign2m2m_hmout( char **seq1, char **seq2, char **seq1r, char **seq2r, char *dir1, char *dir2, double *eff1, double *eff2, int icyc, int jcyc, int alloclen, char *, char *, char *, char *, float **map );
extern float MSalign11( char **seq1, char **seq2, int alloclen );
//extern float rnalocal( char **seq1, char **seq2, double *eff1, double *eff2, int icyc, int jcyc, int alloclen, RNApair **pair );
extern float A__align( char **seq1, char **seq2, double *eff1, double *eff2, int icyc, int jcyc, int alloclen, LocalHom ***localhom, float *impmatch, char *gs1, char *gs2, char *ge1, char *ge2, int *, int, int *, int headgp, int tailgp );
extern float H__align( char **seq1, char **seq2, double *eff1, double *eff2, int icyc, int jcyc, int alloclen, LocalHom ***localhom, float *impmatch, char *gs1, char *gs2, char *ge1, char *ge2 );
extern float Q__align( char **seq1, char **seq2, double *eff1, double *eff2, int icyc, int jcyc, int alloclen, LocalHom ***localhom, float *impmatch, char *gs1, char *gs2, char *ge1, char *ge2 );
extern float Q__align_gapmap( char **seq1, char **seq2, double *eff1, double *eff2, int icyc, int jcyc, int alloclen, LocalHom ***localhom, float *impmatch, char *gs1, char *gs2, char *ge1, char *ge2, int *gapmap1, int *gapmap2 );
extern float R__align( char **seq1, char **seq2, double *eff1, double *eff2, int icyc, int jcyc, int alloclen, LocalHom ***localhom, float *impmatch, char *gs1, char *gs2, char *ge1, char *ge2 );
extern float R__align( char **seq1, char **seq2, double *eff1, double *eff2, int icyc, int jcyc, int alloclen, LocalHom ***localhom, float *impmatch, char *gs1, char *gs2, char *ge1, char *ge2 );
extern float A__align_gapmap( char **seq1, char **seq2, double *eff1, double *eff2, int icyc, int jcyc, int alloclen, LocalHom ***localhom, float *impmatch, int *gapmap1, int *gapmap2 );
extern float D__align_gapmap( char **seq1, char **seq2, double *eff1, double *eff2, int icyc, int jcyc, int alloclen, LocalHom ***localhom, float *impmatch, int *gapmap1, int *gapmap2 );
extern float translate_and_Calign( char **mseq1, char **mseq2, double *effarr1, double *effarr2, int clus1, int clus2, int alloclen );
extern double Fgetlag( char  **seq1, char  **seq2, double *eff1, double *eff2, int    clus1, int    clus2, int alloclen );
extern float Falign( char  **seq1, char  **seq2, double *eff1, double *eff2, int    clus1, int    clus2, int alloclen, int *fftlog, int *, int, int * );
extern float Falign_udpari_long( char  **seq1, char  **seq2, double *eff1, double *eff2, int    clus1, int    clus2, int alloclen, int *fftlog );
float Falign_localhom( char  **seq1, char  **seq2, double *eff1, double *eff2, int    clus1, int    clus2, int alloclen, LocalHom ***localhom, float *totalimpmatch, int *gapmap1, int *gapmap2, int *chudanpt, int chudanref, int *chudanres );
extern float part_imp_match_out_sc( int i1, int j1 );
extern float part_imp_match_out_scQ( int i1, int j1 );
extern void part_imp_match_init_strict( float *imp, int clus1, int clus2, int lgth1, int lgth2, char **seq1, char **seq2, double *eff1, double *eff2, double *eff1_kozo, double *eff2_kozo, LocalHom ***localhom, int forscore );
extern void part_imp_match_init_strictQ( float *imp, int clus1, int clus2, int lgth1, int lgth2, char **seq1, char **seq2, double *eff1, double *eff2, LocalHom ***localhom, int forscore );
extern void part_imp_match_init( float *imp, int clus1, int clus2, int lgth1, int lgth2, char **seq1, char **seq2, double *eff1, double *eff2, LocalHom ***localhom );
extern float partA__align( char **seq1, char **seq2, double *eff1, double *eff2, int icyc, int jcyc, int alloclen, LocalHom ***localhom, float *impmatch, int start1, int end1, int start2, int end2, int *gapmap1, int *gapmap2, char *, char *, char *, char *, int *, int, int * );
extern float partQ__align( char **seq1, char **seq2, double *eff1, double *eff2, int icyc, int jcyc, int alloclen, LocalHom ***localhom, float *impmatch, int start1, int end1, int start2, int end2, int *gapmap1, int *gapmap2, char *, char *, char *, char *);
extern float G__align11( char **seq1, char **seq2, int alloclen, int headgp, int tailgp  );
extern float G__align11_noalign( int mtx[0x80][0x80], int penal, int penal_ex, char **seq1, char **seq2, int alloclen );
extern float L__align11( char **seq1, char **seq2, int alloclen, int *off1pt, int *off2pt );
extern float L__align11_noalign( char **seq1, char **seq2 );
extern float genL__align11( char **seq1, char **seq2, int alloclen, int *off1pt, int *off2pt );
extern float genG__align11( char **seq1, char **seq2, int alloclen );
extern float VAalign11( char **seq1, char **seq2, int alloclen, int *off1pt, int *off2pt, LocalHom *lhmpt );
extern float suboptalign11( char **seq1, char **seq2, int alloclen, int *off1pt, int *off2pt, LocalHom *lhmpt )
;
extern int fft(int n, Fukusosuu *x, int dum);
extern void topolcpy( int s1[], int s2[], int *mpt1, int *mpt2 );
extern void topolcat( int s1[], int s2[], int *mpt1, int *mpt2 );
extern void topolsort( int m, int s[] );
extern void topolswap( int s1[], int s2[], int *mpt1, int *mpt2 );
extern void reduc( double **mtx, int nseq, int im, int jm );
extern void  nj( int nseq, double **omtx, int ***topol, double **dis );
extern void JTTmtx( double **rsr, double *freq, char locamino[26], char locgrp[26], int isTM );
extern void BLOSUMmtx( int n, double **matrix, double *freq, char *amino, char *amino_grp );
extern void putlocalhom2( char *al1, char *al2, LocalHom *localhompt, int off1, int off2, int opt, int overlapaa );
extern void putlocalhom_str( char *al1, char *al2, double *equiv, double scale, LocalHom *localhompt, int off1, int off2, int opt, int overlapaa );
extern void putlocalhom_ext( char *al1, char *al2, LocalHom *localhompt, int off1, int off2, int opt, int overlapaa );
extern void putlocalhom3( char *al1, char *al2, LocalHom *localhompt, int off1, int off2, int opt, int overlapaa );
extern void putlocalhom( char *al1, char *al2, LocalHom *localhompt, int off1, int off2, int opt, int overlapaa );
extern char *cutal( char *al, int al_display_start, int start, int end );
extern void ErrorExit( char *message );
extern void strncpy_caseC( char *str1, char *str2, int len );
extern void seqUpper( int nseq, char **seq );
extern void seqLower( int nseq, char **seq );
extern int getaline_fp_eof( char *s, int l, FILE *fp );
extern int getaline_fp_eof_new(char s[], int l, FILE *fp);
extern int myfgets(char s[], int l, FILE *fp);
extern float input_new( FILE *fp, int d );
extern void PreRead( FILE *fp, int *locnjob, int *locnlenmax );
extern int allSpace( char *str );
extern void Read( char name[M][B], int nlen[M], char **seq );
extern void FRead( FILE *fp, char name[][B], int nlen[], char **seq );
extern void kake2hiku( char *str );
extern void readDataforgaln( FILE *fp, char **name, int *nlen, char **seq );
extern void readData( FILE *fp, char name[][B], int nlen[], char **seq );
extern void readData_pointer_casepreserve( FILE *fp, char **name, int *nlen, char **seq );
extern void readData_pointer( FILE *fp, char **name, int *nlen, char **seq );
extern void readData_pointer2( FILE *fp, int nseq, char **name, int *nlen, char **seq );
extern void readData_varlen( FILE *fp, char **name, int *nlen, char **seq );
extern int countATGC( char *s, int *total );
extern void getnumlen( FILE *fp );
extern void getnumlen_casepreserve( FILE *fp, int *nlenmin );
extern void getnumlen_nogap( FILE *fp, int *nlenmin );
extern void WriteGapFill( FILE *fp, int locnjob, char name[][B], int nlen[M], char **aseq );
extern void writeDataforgaln( FILE *fp, int locnjob, char **name, int *nlen, char **aseq );
extern void writeData( FILE *fp, int locnjob, char name[][B], int nlen[], char **aseq );
extern void writeData_pointer( FILE *fp, int locnjob, char **name, int *nlen, char **aseq );
extern void readhat2_floathalf( FILE *fp, int nseq, char name[M][B], float **mtx );
extern void readhat2_floathalf_pointer( FILE *fp, int nseq, char **name, float **mtx );
extern void readhat2_floathalf_part_pointer( FILE *fp, int nseq, int nadd, char **name, float **mtx );
extern void readhat2_float( FILE *fp, int nseq, char name[M][B], float **mtx );
extern void readhat2_int( FILE *fp, int nseq, char name[M][B], int **mtx );
extern void readhat2_pointer( FILE *fp, int nseq, char **name, double **mtx );
extern void readhat2( FILE *fp, int nseq, char name[M][B], double **mtx );
extern void WriteFloatHat2_pointer_halfmtx( FILE *hat2p, int locnjob, char **name, float **mtx );
extern void WriteFloatHat2( FILE *hat2p, int locnjob, char name[M][B], float **mtx );
extern void WriteHat2_int( FILE *hat2p, int locnjob, char name[M][B], int **mtx );
extern void WriteHat2( FILE *hat2p, int locnjob, char name[M][B], double **mtx );
extern void WriteHat2_pointer( FILE *hat2p, int locnjob, char **name, double **mtx );
extern void WriteHat2_part_pointer( FILE *hat2p, int locnjob, int nadd, char **name, double **mtx );
extern int ReadFasta_sub( FILE *fp, double *dis, int nseq, char name[M][B] );
extern int ReadSsearch( FILE *fp, double *dis, int nseq, char name[M][B] );
extern int ReadBlastm7( FILE *fp, double *dis, int qmem, char **name, LocalHom *localhomlist );
extern int ReadBlastm7_scoreonly( FILE *fp, double *dis, int nin );
extern int ReadBlastm7_avscore( FILE *fp, double *dis, int nin );
extern int ReadFasta34noalign( FILE *fp, double *dis, int qmem, char **name, LocalHom *localhomlist );
extern int ReadFasta34m10_nuc( FILE *fp, double *dis, int qmem, char **name, LocalHom *localhomlist );
extern int ReadFasta34m10( FILE *fp, double *dis, int qmem, char **name, LocalHom *localhomlist );
extern int ReadFasta34m10_scoreonly_nuc( FILE *fp, double *dis, int nin );
extern int ReadFasta34m10_scoreonly( FILE *fp, double *dis, int nin );
extern int ReadFasta34( FILE *fp, double *dis, int nseq, char name[M][B], LocalHom *localhomlist );
extern int ReadFasta3( FILE *fp, double *dis, int nseq, char name[M][B] );
extern int ReadFasta( FILE *fp, double *dis, int nseq, char name[M][B] );
extern int ReadOpt( FILE *fp, int opt[M], int nseq, char name[M][B] );
extern int ReadOpt2( FILE *fp, int opt[M], int nseq, char name[M][B] );
extern int writePre( int nseq, char **name, int nlen[M], char **aseq, int force );
extern void readOtherOptions( int *ppidptr, int *fftThresholdptr, int *fftWinSizeptr );
extern void initSignalSM( void );
extern void initFiles( void );
extern void WriteForFasta( FILE *fp, int locnjob, char **name, int nlen[M], char **aseq );
extern void readlocalhomtable( FILE*fp, int njob, LocalHom **localhomtable, char *kozoarivec );
extern void readlocalhomtable2( FILE*fp, int njob, LocalHom **localhomtable, char *kozoarivec );
extern void readlocalhomtable_part( FILE*fp, int njob, int nadd, LocalHom **localhomtable, char *kozoarivec );
extern void readlocalhomtable_two( FILE*fp, int njob, int nadd, LocalHom **localhomtable, LocalHom **localhomtablex, char *kozoarivec );
extern void readlocalhomtable_one( FILE*fp, int njob, int nadd, LocalHom **localhomtable, char *kozoarivec );
extern void outlocalhom( LocalHom **localhom, int nseq );
extern void outlocalhom_part( LocalHom **localhom, int norg, int nadd );
extern void outlocalhompt( LocalHom ***localhom, int n1, int n2 );
extern void FreeLocalHomTable( LocalHom **localhomtable, int n ) ;
extern void FreeLocalHomTable_part( LocalHom **localhomtable, int n, int m ) ;
extern void FreeLocalHomTable_two( LocalHom **localhomtable, int n, int m ) ;
extern void FreeLocalHomTable_one( LocalHom **localhomtable, int n, int m ) ;
extern void constants( int nseq, char **seq );
extern void clustalout_pointer( FILE *fp, int nseq, int maxlen, char **seq, char **name, char *mark, char *comment, int *order, int namelen );
extern void phylipout_pointer( FILE *fp, int nseq, int maxlen, char **seq, char **name, int *order, int namelen );
extern void writeData_reorder( FILE *fp, int locnjob, char name[][B], int nlen[], char **aseq, int *order );
extern void writeData_reorder_pointer( FILE *fp, int locnjob, char **name, int *nlen, char **aseq, int *order );

extern void resetlocalhom( int, LocalHom ** );
extern int load1SeqWithoutName_new( FILE *fpp, char *cbuf );
extern char *load1SeqWithoutName_realloc( FILE *fpp );
extern char *load1SeqWithoutName_realloc_casepreserve( FILE *fpp );
extern int disttbfast( char **in, int nlen[M], char name[M][B] );
extern void searchKUorWA( FILE *fp );
extern void gapireru( char *res, char *ori, char *gt );
extern int seqlen( char *seq );
extern void st_FinalGapCount( float *fgcp, int clus, char **seq, double *eff, int len );
extern void st_OpeningGapCount( float *ogcp, int clus, char **seq, double *eff, int len );
extern void st_OpeningGapCount( float *ogcp, int clus, char **seq, double *eff, int len );
extern void st_FinalGapCount_zure( float *fgcp, int clus, char **seq, double *eff, int len );
extern void getdiaminofreq_x( float *freq, int clus, char **seq, double *eff, int len );
extern void new_FinalGapCount_zure( float *fgcp, int clus, char **seq, double *eff, int len, char *s, char *e );
extern void new_FinalGapCount( float *fgcp, int clus, char **seq, double *eff, int len, char *g );
extern void new_OpeningGapCount( float *ogcp, int clus, char **seq, double *eff, int len, char *g );
extern void new_OpeningGapCount_zure( float *ogcp, int clus, char **seq, double *eff, int len, char *s, char *e );
extern void getGapPattern( float *fgcp, int clus, char **seq, double *eff, int len, char *g );
extern void getgapfreq( float *freq, int clus, char **seq, double *eff, int len );
extern void getgapfreq_zure( float *freq, int clus, char **seq, double *eff, int len );
//extern void getgapfreq_zure_part( float *freq, int clus, char **seq, double *eff, int len, char *s );
extern void getgapfreq_zure_part( float *freq, int clus, char **seq, double *eff, int len, char *s );
extern void getdiaminofreq_part( float *freq, int clus, char **seq, double *eff, int len, char *s, char *e );
extern void getdigapfreq_part( float *freq, int clus, char **seq, double *eff, int len, char *s, char *e );
extern void getdiaminofreq_st( float *freq, int clus, char **seq, double *eff, int len );
extern void getdigapfreq_st( float *freq, int clus, char **seq, double *eff, int len );
extern void st_getGapPattern( Gappat **gpat, int clus, char **seq, double *eff, int len );
extern void getkyokaigap( char *g, char **s, int pos, int n );
extern double *loadaamtx( void );
extern float naivepairscore( int nseq1, int nseq2, char **seq1, char **seq2, double *eff1, double *eff2, int penal );
extern float naivepairscore11( char *seq1, char *seq2, int penal );
extern float naiveQpairscore( int nseq1, int nseq2, char **seq1, char **seq2, double *eff1, double *eff2, int penal );
extern float naiveRpairscore( int nseq1, int nseq2, char **seq1, char **seq2, double *eff1, double *eff2, int penal );
extern float naiveHpairscore( int nseq1, int nseq2, char **seq1, char **seq2, double *eff1, double *eff2, int penal );
extern void foldrna( int nseq1, int nseq2, char **seq1, char **seq2, double *eff1, double *eff2, RNApair ***gr1, RNApair ***gr2, float **impmtx, int *gapmap1, int *gapmap2, RNApair *pair );
extern void foldrna_gappick( int nseq1, int nseq2, char **seq1, char **seq2, double *eff1, double *eff2, RNApair ***gr1, RNApair ***gr2, float **impmtx, int *gapmap1, int *gapmap2, RNApair *pair );
extern void imp_rna( int nseq1, int nseq2, char **seq1, char **seq2, double *eff1, double *eff2, RNApair ***gr1, RNApair ***gr2, int *gapmap1, int *gapmap2, RNApair *pair );
extern void imp_rnaQ( int nseq1, int nseq2, char **seq1, char **seq2, double *eff1, double *eff2, RNApair ***gr1, RNApair ***gr2, int *gapmap1, int *gapmap2, RNApair *pair );
extern void part_imp_rnaQ( int nseq1, int nseq2, char **seq1, char **seq2, double *eff1, double *eff2, RNApair ***gr1, RNApair ***gr2, int *gapmap1, int *gapmap2, RNApair *pair );
extern void part_imp_rna( int nseq1, int nseq2, char **seq1, char **seq2, double *eff1, double *eff2, RNApair ***gr1, RNApair ***gr2, int *gapmap1, int *gapmap2, RNApair *pair );
extern void imp_rnaQ_gappick( int nseq1, int nseq2, char **seq1, char **seq2, double *eff1, double *eff2, RNApair ***gr1, RNApair ***gr2, int *gapmap1, int *gapmap2, RNApair *pair );
extern void foldalignedrna( int clus1, int clus2, char **mseq1, char **mseq2, double *effarr1, double *effarr2, RNApair *rnapairboth );
void readmccaskill( FILE *fp, RNApair **pairprob, int length );
void makegrouprna( RNApair ***group, RNApair ***all, int *memlist );
void makegrouprnait( RNApair ***group, RNApair ***all, char *pair, int s );
extern void fixed_musclesupg_float_realloc_nobk_halfmtx( int nseq, float **eff, int ***topol, float **len, Treedep *, int progressout );
extern void loadtree( int nseq, int ***topol, float **len, char **name, int *nlen, Treedep * );
//extern void loadtop( int nseq, float **eff, int ***topol, float **len );
extern void fixed_musclesupg_float_realloc_nobk_halfmtx_treeout( int nseq, float **eff, int ***topol, float **len, char **name, int *nlen, Treedep * );
extern void fixed_supg_float_realloc_nobk_halfmtx_treeout_constrained( int nseq, float **eff, int ***topol, float **len, char **name, int *nlen, Treedep *, int ncons, int **constraints );
extern void fixed_musclesupg_double_treeout( int nseq, double **eff, int ***topol, double **len, char **name );
extern void fixed_supg_double_treeout_constrained( int nseq, double **eff, int ***topol, double **len, char **name, int ncons, int **constraints );
extern void imp_match_init_strict( float *imp, int clus1, int clus2, int lgth1, int lgth2, char **seq1, char **seq2, double *eff1, double *eff2, double *eff1kozo, double*eff2kozo, LocalHom ***localhom, int forscore );
extern void miyataout_reorder_pointer( FILE *fp, int locnjob, int nlenmax, char **name, int *nlen, char **aseq, int *order );
extern void veryfastsupg_double_outtree( int nseq, double **eff, int ***topol, double **len, char **name );
extern void cpmx_ribosum( char **seq, char **seqr, char *dir, float **cpmx, double *eff, int lgth, int clus );
extern void rnaalifoldcall( char **seq, int nseq, RNApair **pairprob );
extern void readpairfoldalign( FILE *fp, char *seq1, char *seq2, char *aln1, char *aln2, int q1, int q2, int *of1, int *of2, int sumlen );
extern void write1seq( FILE *fp, char *aseq );
extern void assignstrweight( int nseq, double *strweight, Node *stopol, int ***topol, int step, int LorR, char *kozoari, double *seqweight );
extern void cutData( FILE *, int **, char **, int * );
extern void cutAlignment( FILE *, int **, char **, int *, char **, char ** );
extern void catData( FILE * );
extern void getnumlen_nogap_outallreg_web( FILE *fp, FILE *ofp, int *nlenminpt, int *isalignedpt );
extern void getnumlen_nogap_outallreg( FILE *fp, int *nlenminpt );
extern double plainscore( int nseq, char **seq );
extern void eq2dash( char *s );
extern void findnewgaps( int n, int rep, char **seq, int *gaplen );
extern void findcommongaps( int, char **, int * );
extern void adjustgapmap( int, int *, char * );
extern void insertnewgaps( int njob, int *alreadyaligned, char **seq, int *ex1, int *ex2, int *gaplen, int *gapmap, int alloclen, char alg, char gapchar );
extern void restorecommongaps( int n, char **seq, int *top0, int *top1, int *gaplen, int alloclen, char gapchar );
extern int samemember( int *mem, int *cand );
extern int includemember( int *mem, int *cand );
extern int overlapmember( int *mem1, int *mem2 );
extern void profilealignment( int n0, int n1, int n2, char **aln0, char **aln1, char **aln2, int alloclen, char alg );
extern void profilealignment2( int n0, int n2, char **aln0, char **aln2, int alloclen, char alg );
extern void sreverse( char *r, char *s );
extern int addonetip( int njobc, int ***topolc, float **lenc, float **iscorec, int ***topol, float **len, Treedep *dep, int treeout, Addtree *addtree, int iadd, char **name );
extern void intcpy( int *s1, int *s2 );
extern void intcat( int *s1, int *s2 );
extern void readsubalignmentstable( int n, int **table, int *preservegaps, int *nsubpt, int *maxmempt );
