--- branches/development/src/utils/ProgressBar.cpp 2012/09/06 19:44:06 1794 +++ branches/development/src/utils/ProgressBar.cpp 2013/02/20 15:39:39 1850 @@ -35,7 +35,7 @@ * * [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). * [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). - * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). + * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). */ @@ -52,6 +52,7 @@ #else #include #include +#include #endif #ifdef IS_MPI @@ -98,10 +99,10 @@ namespace OpenMD { #ifdef _MSC_VER CONSOLE_SCREEN_BUFFER_INFO csbi; - int ret = GetConsoleScreenBufferInfo(GetStdHandle( STD_OUTPUT_HANDLE ), - &csbi); + HANDLE hConsole = GetStdHandle( STD_OUTPUT_HANDLE ); + int ret = GetConsoleScreenBufferInfo(hConsole, &csbi); if(ret) { - width = csbi.dwSize.X; + width = csbi.dwSize.X - 1; } #else struct winsize w;