]> git.donarmstrong.com Git - mothur.git/blobdiff - myutils.cpp
added paralellization for windows to dist.seqs and summary.seqs
[mothur.git] / myutils.cpp
index b9c01470f75a9f26baae58a174765fc154ce20d3..78bf5439091ade28ce3337094deda7fc91779c3b 100755 (executable)
@@ -143,22 +143,22 @@ bool myisatty(int fd)
 \r
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)\r
 #else\r
-#ifdef BIT_VERSION\r
-#include <io.h>\r
-int fseeko(FILE *stream, off_t offset, int whence)\r
-       {\r
-       off_t FilePos = _fseeki64(stream, offset, whence);\r
-       return (FilePos == -1L) ? -1 : 0;\r
-       }\r
-#define ftello(fm) (off_t) _ftelli64(fm)\r
-#else \r
+//#ifdef BIT_VERSION\r
+//#include <io.h>\r
+//int fseeko(FILE *stream, off_t offset, int whence)\r
+////   {\r
+//     off_t FilePos = _fseeki64(stream, offset, whence);\r
+//     return (FilePos == -1L) ? -1 : 0;\r
+//     }\r
+//#define ftello(fm) (off_t) _ftelli64(fm)\r
+//#else \r
 int fseeko(FILE *stream, off_t offset, int whence)\r
 {\r
        off_t FilePos = fseek(stream, offset, whence);\r
        return (FilePos == -1L) ? -1 : 0;\r
 }\r
 #define ftello(fm) (off_t) ftell(fm)\r
-#endif\r
+//#endif\r
 #endif\r
 \r
 void LogStdioFileState(FILE *f)\r
@@ -513,7 +513,8 @@ off_t GetStdioFilePos(FILE *f)
 off_t GetStdioFileSize(FILE *f)\r
        {\r
        off_t CurrentPos = GetStdioFilePos(f);\r
-       int Ok = fseeko(f, 0, SEEK_END);\r
+       off_t zeroPos = 0;\r
+       int Ok = fseeko(f, zeroPos, SEEK_END);\r
        if (Ok < 0)\r
                Die("fseek in GetFileSize");\r
 \r
@@ -954,7 +955,7 @@ void ProgressExit()
 // Skip exit(), which can be very slow in DEBUG build\r
 // VERY DANGEROUS practice, because it skips global destructors.\r
 // But if you know the rules, you can break 'em, right?\r
-       ExitProcess(0);\r
+       //ExitProcess(0);\r
 #endif\r
        }\r
 \r
@@ -1531,6 +1532,7 @@ static void GetArgsFromFile(const string &FileName, vector<string> &Args)
 \r
 void MyCmdLine(int argc, char **argv)\r
        {\r
+       g_Opts.clear(); g_Argv.clear();\r
        static unsigned RecurseDepth = 0;\r
        ++RecurseDepth;\r
 \r