# | Line 35 | Line 35 | |
---|---|---|
35 | * | |
36 | * [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). | |
37 | * [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). | |
38 | < | * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
38 | > | * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). |
39 | * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). | |
40 | * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). | |
41 | */ | |
# | Line 52 | Line 52 | |
52 | #else | |
53 | #include <cstdio> | |
54 | #include <sys/ioctl.h> | |
55 | + | #include <unistd.h> |
56 | #endif | |
57 | ||
58 | #ifdef IS_MPI | |
# | Line 98 | Line 99 | namespace OpenMD { | |
99 | ||
100 | #ifdef _MSC_VER | |
101 | CONSOLE_SCREEN_BUFFER_INFO csbi; | |
102 | < | int ret = GetConsoleScreenBufferInfo(GetStdHandle( STD_OUTPUT_HANDLE ), |
103 | < | &csbi); |
102 | > | HANDLE hConsole = GetStdHandle( STD_OUTPUT_HANDLE ); |
103 | > | int ret = GetConsoleScreenBufferInfo(hConsole, &csbi); |
104 | if(ret) { | |
105 | < | width = csbi.dwSize.X; |
105 | > | width = csbi.dwSize.X - 1; |
106 | } | |
107 | #else | |
108 | struct winsize w; | |
# | Line 134 | Line 135 | namespace OpenMD { | |
135 | struct tm * ender = localtime(&end_); | |
136 | char buffer[22]; | |
137 | strftime(buffer, 22, "%a %b %d @ %I:%M %p", ender); | |
138 | < | |
138 | > | |
139 | > | #ifdef _MSC_VER |
140 | > | csbi.dwCursorPosition.X = 0; |
141 | > | SetConsoleCursorPosition(hConsole, csbi.dwCursorPosition); |
142 | > | #else |
143 | cout << '\r'; | |
144 | + | #endif |
145 | cout.width(3); | |
146 | cout << right << int(percent); | |
147 | cout.width(3); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |