]> git.donarmstrong.com Git - mothur.git/blobdiff - mothur.h
chimera.seqs pintail is working.
[mothur.git] / mothur.h
index 29124330420f1af5e8a7b5f54fb8f86689e20ee9..ed206af809e4f369b12015ed0406966d12992a72 100644 (file)
--- a/mothur.h
+++ b/mothur.h
 #include <ctime>
 #include <limits>
 
-using namespace std;
 
-#ifdef _WIN32
-       #define exp(x) (exp((double) x))
-       #define sqrt(x) (sqrt((double) x))
-       #define log10(x) (log10((double) x))
-       #define log2(x) (log10(x)/log10(2))
-       #define isnan(x) ((x) != (x))
-       #define isinf(x) (fabs(x) == std::numeric_limits<double>::infinity())
-#else
+#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
        #include <sys/wait.h>
        #include <unistd.h>
 #endif
 
+using namespace std;
+
+#define exp(x) (exp((double) x))
+#define sqrt(x) (sqrt((double) x))
+#define log10(x) (log10((double) x))
+#define log2(x) (log10(x)/log10(2))
+#define isnan(x) ((x) != (x))
+#define isinf(x) (fabs(x) == std::numeric_limits<double>::infinity())
+
 
 typedef unsigned long ull;
 
@@ -96,6 +97,7 @@ inline void convert(const string& s, T& x, bool failIfLeftoverChars = true){
        if (!(i >> x) || (failIfLeftoverChars && i.get(c)))
                throw BadConversion(s);
 }
+
 //**********************************************************************************************************************
 
 template<typename T>
@@ -179,7 +181,7 @@ inline string getline(ifstream& fileHandle) {
                        char c = fileHandle.get(); 
                        
                        //are you at the end of the line
-                       if (c == 10 || c == 13){   break;       }       
+                       if ((c == '\n') || (c == '\r') || (c == '\f')){   break;        }       
                        else {          line += c;              }
                }