Index: base/applications/network/telnet/src/tconsole.cpp =================================================================== --- base/applications/network/telnet/src/tconsole.cpp (revision 58643) +++ base/applications/network/telnet/src/tconsole.cpp (working copy) @@ -94,8 +94,8 @@ SMALL_RECT sr = { CON_LEFT, CON_TOP, - (width == -1) ? CON_RIGHT : CON_LEFT + width - 1, - (height == -1) ? CON_BOTTOM : CON_TOP + height - 1 + (SHORT)((width == -1) ? CON_RIGHT : CON_LEFT + width - 1), + (SHORT)((height == -1) ? CON_BOTTOM : CON_TOP + height - 1) }; ConsoleInfo.dwSize.X = width; if(ConsoleInfo.dwSize.Y < height) ConsoleInfo.dwSize.Y = height; @@ -263,7 +263,7 @@ // Correction: processing more than one line at a time causes a segfault // if the screen width != 80 for(int i = CON_TOP; i <= CON_BOTTOM; i++) { - COORD Coord = {CON_LEFT, i}; + COORD Coord = {(SHORT)CON_LEFT, (SHORT)i}; ReadConsoleOutputAttribute(hConsole, pAttributes, (DWORD)(CON_COLS), Coord, &Result); @@ -289,7 +289,7 @@ // Correction: processing more than one line at a time causes a segfault // if the screen width != 80 for(int i = CON_TOP; i <= CON_BOTTOM; i++) { - COORD Coord = {CON_LEFT, i}; + COORD Coord = {(SHORT)CON_LEFT, (SHORT)i}; ReadConsoleOutputAttribute(hConsole, pAttributes, (DWORD)(CON_COLS), Coord, &Result); @@ -655,7 +655,7 @@ ciChar.Attributes = wAttributes; // fill with current attrib // This should speed things up (Paul Brannan 9/2/98) - COORD dwDestOrg = {srScrollWindow.Left, srScrollWindow.Top + bUp}; + COORD dwDestOrg = {(SHORT)srScrollWindow.Left, (SHORT)(srScrollWindow.Top + bUp)}; // Note that iEndRow and iStartRow had better not be equal to -1 at this // point. There are four cases to consider for out of bounds. Two of @@ -698,7 +698,7 @@ // Same as clear screen, but only affects the scroll region void TConsole::ClearWindow(int iStartRow, int iEndRow, char c) { DWORD dwWritten; - COORD Coord = {CON_LEFT, CON_TOP + iStartRow}; + COORD Coord = {(SHORT)CON_LEFT, (SHORT)(CON_TOP + iStartRow)}; FillConsoleOutputCharacter(hConsole, c, (DWORD)(CON_COLS)* (DWORD)(iEndRow-iStartRow+1), Coord, &dwWritten); FillConsoleOutputAttribute(hConsole, wAttributes, (DWORD)(CON_COLS)* @@ -709,7 +709,7 @@ void TConsole::ClearEOScreen(char c) { DWORD dwWritten; - COORD Coord = {CON_LEFT, CON_TOP + CON_CUR_Y + 1}; + COORD Coord = {(SHORT)CON_LEFT, (SHORT)(CON_TOP + CON_CUR_Y + 1)}; FillConsoleOutputCharacter(hConsole, c, (DWORD)(CON_COLS)* (DWORD)(CON_HEIGHT - CON_CUR_Y), Coord, &dwWritten); FillConsoleOutputAttribute(hConsole, wAttributes, (DWORD)(CON_COLS)* @@ -732,7 +732,7 @@ void TConsole::ClearLine(char c) { DWORD dwWritten; - COORD Coord = {CON_LEFT, CON_TOP + CON_CUR_Y}; + COORD Coord = {(SHORT)CON_LEFT, (SHORT)(CON_TOP + CON_CUR_Y)}; FillConsoleOutputCharacter(hConsole, c, (DWORD)(CON_COLS), Coord, &dwWritten); FillConsoleOutputAttribute(hConsole, wAttributes, (DWORD)(CON_COLS), @@ -743,7 +743,7 @@ void TConsole::ClearEOLine(char c) { DWORD dwWritten; - COORD Coord = {CON_LEFT + CON_CUR_X, CON_TOP + CON_CUR_Y}; + COORD Coord = {(SHORT)(CON_LEFT + CON_CUR_X), (SHORT)(CON_TOP + CON_CUR_Y)}; FillConsoleOutputAttribute(hConsole, wAttributes, (DWORD)(CON_RIGHT - CON_CUR_X) +1, Coord, &dwWritten); FillConsoleOutputCharacter(hConsole, c, (DWORD)(CON_RIGHT - CON_CUR_X) +1, @@ -754,7 +754,7 @@ void TConsole::ClearBOLine(char c) { DWORD dwWritten; - COORD Coord = {CON_LEFT, CON_TOP + CON_CUR_Y}; + COORD Coord = {(SHORT)CON_LEFT, (SHORT)(CON_TOP + CON_CUR_Y)}; FillConsoleOutputCharacter(hConsole, c, (DWORD)(CON_CUR_X) + 1, Coord, &dwWritten); FillConsoleOutputAttribute(hConsole, wAttributes, (DWORD)(CON_CUR_X) + 1, @@ -927,7 +927,7 @@ } void TConsole::SetCursorSize(int pct) { - CONSOLE_CURSOR_INFO ci = {(pct != 0)?pct:1, pct != 0}; + CONSOLE_CURSOR_INFO ci = {(pct != 0) ? (DWORD)pct : 1, pct != 0}; SetConsoleCursorInfo(hConsole, &ci); }