//if you are not a nexus file
if ((c = filehandle.peek()) != '#') {
- while((c = filehandle.peek()) != EOF) {
+ while((c = filehandle.peek()) != EOF) {
+ if (m->control_pressed) { filehandle.close(); return 0; }
while ((c = filehandle.peek()) != EOF) {
+ if (m->control_pressed) { filehandle.close(); return 0; }
// get past comments
if(c == '[') {
comment = 1;
Tree* temp = new Tree(ct); delete temp;
nexusTranslation(ct); //reads file through the translation and updates treemap
- while((c = filehandle.peek()) != EOF) {
+ while((c = filehandle.peek()) != EOF) {
+ if (m->control_pressed) { filehandle.close(); return 0; }
// get past comments
- while ((c = filehandle.peek()) != EOF) {
+ while ((c = filehandle.peek()) != EOF) {
+ if (m->control_pressed) { filehandle.close(); return 0; }
if(holder == "[" || holder == "[!"){
comment = 1;
}
n = numLeaves; //number of leaves / sequences, we want node 1 to start where the leaves left off
lc = readNewickInt(filehandle, n, T, ct);
- if (lc == -1) { m->mothurOut("error with lc"); m->mothurOutEndLine(); return -1; } //reports an error in reading
+ if (lc == -1) { m->mothurOut("error with lc"); m->mothurOutEndLine(); m->control_pressed = true; return -1; } //reports an error in reading
if(filehandle.peek()==','){
readSpecialChar(filehandle,',',"comma");
if(rooted != 1){
rc = readNewickInt(filehandle, n, T, ct);
- if (rc == -1) { m->mothurOut("error with rc"); m->mothurOutEndLine(); return -1; } //reports an error in reading
+ if (rc == -1) { m->mothurOut("error with rc"); m->mothurOutEndLine(); m->control_pressed = true; return -1; } //reports an error in reading
if(filehandle.peek() == ')'){
readSpecialChar(filehandle,')',"right parenthesis");
}
//set group info
vector<string> group = ct->getGroups(name);
-
+ //cout << name << endl;
//find index in tree of name
int n1 = T->getIndex(name);