Mac binaries
[jabaws.git] / website / archive / binaries / mac / src / muscle / main.cpp
diff --git a/website/archive/binaries/mac/src/muscle/main.cpp b/website/archive/binaries/mac/src/muscle/main.cpp
new file mode 100644 (file)
index 0000000..7993c7b
--- /dev/null
@@ -0,0 +1,72 @@
+//@@TODO reconcile /muscle with /muscle3.6\r
+\r
+#include "muscle.h"\r
+#include <stdio.h>\r
+#ifdef WIN32\r
+#include <windows.h>   // for SetPriorityClass()\r
+#include <io.h>                        // for isatty()\r
+#else\r
+#include <unistd.h>            // for isatty()\r
+#endif\r
+\r
+const char *MUSCLE_LONG_VERSION        = "MUSCLE v" SHORT_VERSION "."\r
+#include "svnversion.h"\r
+" by Robert C. Edgar";\r
+\r
+int g_argc;\r
+char **g_argv;\r
+\r
+int main(int argc, char **argv)\r
+       {\r
+#if    WIN32\r
+// Multi-tasking does not work well in CPU-bound\r
+// console apps running under Win32.\r
+// Reducing the process priority allows GUI apps\r
+// to run responsively in parallel.\r
+       SetPriorityClass(GetCurrentProcess(), BELOW_NORMAL_PRIORITY_CLASS);\r
+#endif\r
+       g_argc = argc;\r
+       g_argv = argv;\r
+\r
+       SetNewHandler();\r
+       SetStartTime();\r
+       ProcessArgVect(argc - 1, argv + 1);\r
+       SetParams();\r
+       SetLogFile();\r
+\r
+       //extern void TestSubFams(const char *);\r
+       //TestSubFams(g_pstrInFileName);\r
+       //return 0;\r
+\r
+       if (g_bVersion)\r
+               {\r
+               printf("%s\n", MUSCLE_LONG_VERSION);\r
+               exit(EXIT_SUCCESS);\r
+               }\r
+\r
+       if (!g_bQuiet)\r
+               Credits();\r
+\r
+       if (MissingCommand() && isatty(0))\r
+               {\r
+               Usage();\r
+               exit(EXIT_SUCCESS);\r
+               }\r
+\r
+       if (g_bCatchExceptions)\r
+               {\r
+               try\r
+                       {\r
+                       Run();\r
+                       }\r
+               catch (...)\r
+                       {\r
+                       OnException();\r
+                       exit(EXIT_Except);\r
+                       }\r
+               }\r
+       else\r
+               Run();\r
+\r
+       exit(EXIT_Success);\r
+       }\r