]> git.donarmstrong.com Git - mothur.git/commitdiff
bugs fixes while testing for 1.5 release
authorwestcott <westcott>
Sun, 2 Aug 2009 20:55:29 +0000 (20:55 +0000)
committerwestcott <westcott>
Sun, 2 Aug 2009 20:55:29 +0000 (20:55 +0000)
collectsharedcommand.cpp
engine.cpp
fileoutput.cpp
mothur.h

index 3fed1674f25c0d808060542a83803ce44167b255..e158dbb7395b5b7ce643524e24d3ec2f01d58bcc 100644 (file)
@@ -255,10 +255,9 @@ int CollectSharedCommand::execute(){
                                processedLabels.insert(order->getLabel());
                                userLabels.erase(order->getLabel());
                                userLines.erase(count);
-
-                       //you have a label the user want that is smaller than this line and the last line has not already been processed 
                        }
                        
+                       //you have a label the user want that is smaller than this line and the last line has not already been processed
                        if ((anyLabelsToProcess(order->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) {
                                delete order;
                                order = input->getSharedOrderVector(lastLabel);
index 95c0ff03f0f05145a9435b8deb06e20bd72fdc8f..e5898036e2e4ebd5ddea0af89735ed7efacdf924 100644 (file)
@@ -119,9 +119,10 @@ bool BatchEngine::getInput(){
                while(quitCommandCalled == 0){
        
                        if (inputBatchFile.eof()) { input = "quit()"; }
-                       else { input = getline(inputBatchFile); }
-                       
-                       
+                       else { getline(inputBatchFile, input); }
+       //cout << "input = ";           
+       //for (int i = 0; i < input.size();  i++) {  cout << input[i];  if ((input[i] == '\n') || (input[i] == '\r')) {  char c = input[i]; cout << "line feed = " << c << endl; } }
+       //cout << endl;         
                        
                        if (input[0] != '#') {
                                
index 597a05a6ad9a892caff5f0b6f69269ae6af4013d..df1bfecfc0de7e3183ace1e826ef9d536f9dc5c3 100644 (file)
@@ -27,7 +27,7 @@ void ThreeColumnFile::initFile(string label){
                        openInputFile(inName, inFile);
 
                        string inputBuffer;
-                       inputBuffer = getline(inFile);
+                       getline(inFile, inputBuffer);
                
                        outFile <<  inputBuffer << '\t' << label << "\tlci\thci" << endl;
                }
@@ -51,7 +51,7 @@ void ThreeColumnFile::output(int nSeqs, vector<double> data){
        try {
                if(counter != 0){               
                        string inputBuffer;
-                       inputBuffer = getline(inFile);
+                       getline(inFile, inputBuffer);
                
                        outFile <<  inputBuffer << setprecision(4) << '\t' << data[0] << '\t' << data[1] << '\t' << data[2] << endl;
                }
@@ -110,7 +110,7 @@ void ColumnFile::initFile(string label, vector<string> tags){
                        openInputFile(inName, inFile);
 
                        string inputBuffer;
-                       inputBuffer = getline(inFile);
+                       getline(inFile, inputBuffer);
                
                        outFile <<  inputBuffer << '\t'; 
                        for(int i = 0; i < tags.size(); i++) {
@@ -142,7 +142,7 @@ void ColumnFile::output(vector<double> data){
        
                if(counter != 0){               
                        string inputBuffer;
-                       inputBuffer = getline(inFile);
+                       getline(inFile, inputBuffer);
 
                        outFile << inputBuffer << '\t' << setprecision(6) << data[0] << setprecision(iters.length());
                        for (int i = 1; i< data.size(); i++) {
@@ -210,7 +210,7 @@ void SharedThreeColumnFile::initFile(string label){
                        openInputFile(inName, inFile);
 
                        string inputBuffer;
-                       inputBuffer = getline(inFile);
+                       getline(inFile, inputBuffer);
                
                        outFile <<  inputBuffer << '\t' << label << "\tlci\thci" << endl;
                }
@@ -234,7 +234,7 @@ void SharedThreeColumnFile::output(int nSeqs, vector<double> data){
        try {
                if(counter != 0){               
                        string inputBuffer;
-                       inputBuffer = getline(inFile);
+                       getline(inFile, inputBuffer);
                
                        outFile <<  inputBuffer << setprecision(4) << '\t' << data[0] << '\t' << data[1] << '\t' << data[2] << endl;
                }
@@ -294,7 +294,7 @@ void OneColumnFile::initFile(string label){
                        openInputFile(inName, inFile);
                
                        string inputBuffer;
-                       inputBuffer = getline(inFile);
+                       getline(inFile, inputBuffer);
                
                        outFile <<  inputBuffer << '\t' << label << endl;
                }
@@ -318,7 +318,7 @@ void OneColumnFile::output(int nSeqs, vector<double> data){
        try {   
                if(counter != 0){               
                        string inputBuffer;
-                       inputBuffer = getline(inFile);
+                       getline(inFile, inputBuffer);
                
                        outFile <<  inputBuffer << setprecision(4) << '\t'  << data[0] << endl;
                }
@@ -376,7 +376,7 @@ void SharedOneColumnFile::initFile(string label){
                        openInputFile(inName, inFile);
                
                        string inputBuffer;
-                       inputBuffer = getline(inFile);
+                       getline(inFile, inputBuffer);
                
                        outFile <<  inputBuffer << '\t' << label  << endl;
 
index b27c5ada91ff59289856373122b3c4219ee1b965..7d6b1d88f7c74af97bf245056c8a5c74c1774050 100644 (file)
--- a/mothur.h
+++ b/mothur.h
 #include <cerrno>
 #include <ctime>
 #include <limits>
-#include <sys/wait.h>
 #include <unistd.h>
 
+#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+       #include <sys/wait.h>
+#endif
+
 using namespace std;
 
 #define exp(x) (exp((double) x))