Line | |
---|
1 | //@@TODO reconcile /muscle with /muscle3.6 |
---|
2 | |
---|
3 | #include "muscle.h" |
---|
4 | #include <stdio.h> |
---|
5 | #ifdef WIN32 |
---|
6 | #include <windows.h> // for SetPriorityClass() |
---|
7 | #include <io.h> // for isatty() |
---|
8 | #else |
---|
9 | #include <unistd.h> // for isatty() |
---|
10 | #endif |
---|
11 | |
---|
12 | const char *MUSCLE_LONG_VERSION = "MUSCLE v" SHORT_VERSION "." |
---|
13 | #include "svnversion.h" |
---|
14 | " by Robert C. Edgar"; |
---|
15 | |
---|
16 | int g_argc; |
---|
17 | char **g_argv; |
---|
18 | |
---|
19 | int main(int argc, char **argv) |
---|
20 | { |
---|
21 | #if WIN32 |
---|
22 | // Multi-tasking does not work well in CPU-bound |
---|
23 | // console apps running under Win32. |
---|
24 | // Reducing the process priority allows GUI apps |
---|
25 | // to run responsively in parallel. |
---|
26 | SetPriorityClass(GetCurrentProcess(), BELOW_NORMAL_PRIORITY_CLASS); |
---|
27 | #endif |
---|
28 | g_argc = argc; |
---|
29 | g_argv = argv; |
---|
30 | |
---|
31 | SetNewHandler(); |
---|
32 | SetStartTime(); |
---|
33 | ProcessArgVect(argc - 1, argv + 1); |
---|
34 | SetParams(); |
---|
35 | SetLogFile(); |
---|
36 | |
---|
37 | //extern void TestSubFams(const char *); |
---|
38 | //TestSubFams(g_pstrInFileName); |
---|
39 | //return 0; |
---|
40 | |
---|
41 | if (g_bVersion) |
---|
42 | { |
---|
43 | printf("%s\n", MUSCLE_LONG_VERSION); |
---|
44 | exit(EXIT_SUCCESS); |
---|
45 | } |
---|
46 | |
---|
47 | if (!g_bQuiet) |
---|
48 | Credits(); |
---|
49 | |
---|
50 | if (MissingCommand() && isatty(0)) |
---|
51 | { |
---|
52 | Usage(); |
---|
53 | exit(EXIT_SUCCESS); |
---|
54 | } |
---|
55 | |
---|
56 | if (g_bCatchExceptions) |
---|
57 | { |
---|
58 | try |
---|
59 | { |
---|
60 | Run(); |
---|
61 | } |
---|
62 | catch (...) |
---|
63 | { |
---|
64 | OnException(); |
---|
65 | exit(EXIT_Except); |
---|
66 | } |
---|
67 | } |
---|
68 | else |
---|
69 | Run(); |
---|
70 | |
---|
71 | exit(EXIT_Success); |
---|
72 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.