@@ -200,7 +200,8 @@ HMM& HMM::operator=(HMM& q) {
200200// ///////////////////////////////////////////////////////////////////////////////////
201201int HMM::Read (FILE* dbf, const int maxcol, const int nseqdis, float * pb,
202202 char * path) {
203- char line[LINELEN] = " " ; // input line
203+ std::unique_ptr<char []> line_ptr (new char [LINELEN]);
204+ char * line = line_ptr.get ();
204205 char str3[8 ] = " " , str4[8 ] = " " ; // first 3 and 4 letters of input line
205206 char * ptr; // pointer for string manipulation
206207 int i = 0 ; // index for match state (first=1)
@@ -692,8 +693,9 @@ int HMM::Read(FILE* dbf, const int maxcol, const int nseqdis, float* pb,
692693// // Read an HMM from a HMMer .hmm file; return 0 at end of file
693694// ///////////////////////////////////////////////////////////////////////////////////
694695int HMM::ReadHMMer (FILE* dbf, const char showcons, float * pb, char * filestr) {
695- char line[LINELEN] = " " ; // input line
696- char desc[DESCLEN] = " " ; // description of family
696+ std::unique_ptr<char []> line_ptr (new char [LINELEN]);
697+ char * line = line_ptr.get ();
698+ char desc[DESCLEN] = " " ; // description of family
697699 char str4[5 ] = " " ; // first 4 letters of input line
698700 char * ptr; // pointer for string manipulation
699701 int i = 0 ; // index for match state (first=1)
@@ -1203,7 +1205,8 @@ int HMM::ReadHMMer(FILE* dbf, const char showcons, float* pb, char* filestr) {
12031205// // Read an HMM from a HMMER3 .hmm file; return 0 at end of file
12041206// ///////////////////////////////////////////////////////////////////////////////////
12051207int HMM::ReadHMMer3 (FILE* dbf, const char showcons, float * pb, char * filestr) {
1206- char line[LINELEN] = " " ; // input line
1208+ std::unique_ptr<char []> line_ptr (new char [LINELEN]);
1209+ char * line = line_ptr.get ();
12071210 char desc[DESCLEN] = " " ; // description of family
12081211 char str4[5 ] = " " ; // first 4 letters of input line
12091212 char * ptr; // pointer for string manipulation
@@ -2170,7 +2173,8 @@ void HMM::WriteToFile(std::stringstream& out, const int max_seqid,
21702173 const int coverage, const int qid, const int Ndiff, const float qsc,
21712174 const int argc, const char ** argv, const float * pb) {
21722175 const int SEQLEN = 100 ; // number of residues per line for sequences to be displayed
2173- char line[LINELEN];
2176+ std::unique_ptr<char []> line_ptr (new char [LINELEN]);
2177+ char * line = line_ptr.get ();
21742178
21752179 if (trans_lin == 1 )
21762180 InternalError (
0 commit comments