Commit f818d42f authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed COORD structure definition.

Fixed GetLargestConsoleWindowSize to not return a structure when called from the Window binary.
parent ba3e2abc
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <string.h> #include <string.h>
#include "windef.h" #include "windef.h"
#include "wincon.h"
#include "debugger.h" #include "debugger.h"
/* /*
...@@ -247,8 +248,8 @@ static void ...@@ -247,8 +248,8 @@ static void
TTYinfo(void) TTYinfo(void)
{ {
COORD c = GetLargestConsoleWindowSize(GetStdHandle(STD_INPUT_HANDLE)); COORD c = GetLargestConsoleWindowSize(GetStdHandle(STD_INPUT_HANDLE));
TTYwidth = c.x; TTYwidth = c.X;
TTYrows = c.y; TTYrows = c.Y;
} }
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "thread.h" #include "thread.h"
#include "process.h" #include "process.h"
#include "wincon.h"
#include "wingdi.h" #include "wingdi.h"
#include "winuser.h" #include "winuser.h"
...@@ -575,7 +576,7 @@ int DEBUG_main(int argc, char** argv) ...@@ -575,7 +576,7 @@ int DEBUG_main(int argc, char** argv)
COORD pos; COORD pos;
/* This is a hack: it forces creation of an xterm, not done by default */ /* This is a hack: it forces creation of an xterm, not done by default */
pos.x = 0; pos.y = 1; pos.X = 0; pos.Y = 1;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos); SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
} }
......
...@@ -162,8 +162,8 @@ int VGA_SetAlphaMode(unsigned Xres,unsigned Yres) ...@@ -162,8 +162,8 @@ int VGA_SetAlphaMode(unsigned Xres,unsigned Yres)
/* the xterm is slow, so refresh only every 200ms (5fps) */ /* the xterm is slow, so refresh only every 200ms (5fps) */
VGA_InstallTimer(200000); VGA_InstallTimer(200000);
siz.x = Xres; siz.X = Xres;
siz.y = Yres; siz.Y = Yres;
SetConsoleScreenBufferSize(VGA_AlphaConsole(),siz); SetConsoleScreenBufferSize(VGA_AlphaConsole(),siz);
return 0; return 0;
} }
...@@ -172,16 +172,16 @@ void VGA_GetAlphaMode(unsigned*Xres,unsigned*Yres) ...@@ -172,16 +172,16 @@ void VGA_GetAlphaMode(unsigned*Xres,unsigned*Yres)
{ {
CONSOLE_SCREEN_BUFFER_INFO info; CONSOLE_SCREEN_BUFFER_INFO info;
GetConsoleScreenBufferInfo(VGA_AlphaConsole(),&info); GetConsoleScreenBufferInfo(VGA_AlphaConsole(),&info);
if (Xres) *Xres=info.dwSize.x; if (Xres) *Xres=info.dwSize.X;
if (Yres) *Yres=info.dwSize.y; if (Yres) *Yres=info.dwSize.Y;
} }
void VGA_SetCursorPos(unsigned X,unsigned Y) void VGA_SetCursorPos(unsigned X,unsigned Y)
{ {
COORD pos; COORD pos;
pos.x = X; pos.X = X;
pos.y = Y; pos.Y = Y;
SetConsoleCursorPosition(VGA_AlphaConsole(),pos); SetConsoleCursorPosition(VGA_AlphaConsole(),pos);
} }
...@@ -189,8 +189,8 @@ void VGA_GetCursorPos(unsigned*X,unsigned*Y) ...@@ -189,8 +189,8 @@ void VGA_GetCursorPos(unsigned*X,unsigned*Y)
{ {
CONSOLE_SCREEN_BUFFER_INFO info; CONSOLE_SCREEN_BUFFER_INFO info;
GetConsoleScreenBufferInfo(VGA_AlphaConsole(),&info); GetConsoleScreenBufferInfo(VGA_AlphaConsole(),&info);
if (X) *X=info.dwCursorPosition.x; if (X) *X=info.dwCursorPosition.X;
if (Y) *Y=info.dwCursorPosition.y; if (Y) *Y=info.dwCursorPosition.Y;
} }
/*** CONTROL ***/ /*** CONTROL ***/
...@@ -225,8 +225,8 @@ void CALLBACK VGA_Poll( ULONG_PTR arg ) ...@@ -225,8 +225,8 @@ void CALLBACK VGA_Poll( ULONG_PTR arg )
VGA_GetAlphaMode(&Width,&Height); VGA_GetAlphaMode(&Width,&Height);
dat = DOSMEM_MapDosToLinear(0xb8000); dat = DOSMEM_MapDosToLinear(0xb8000);
siz.x = 80; siz.y = 1; siz.X = 80; siz.Y = 1;
off.x = 0; off.y = 0; off.X = 0; off.Y = 0;
/* copy from virtual VGA frame buffer to console */ /* copy from virtual VGA frame buffer to console */
for (Y=0; Y<Height; Y++) { for (Y=0; Y<Height; Y++) {
dest.Top=Y; dest.Bottom=Y; dest.Top=Y; dest.Bottom=Y;
......
...@@ -11,12 +11,6 @@ ...@@ -11,12 +11,6 @@
extern "C" { extern "C" {
#endif #endif
typedef struct tagCOORD {
INT16 x;
INT16 y;
} COORD, *LPCOORD;
/* Windows Exit Procedure flag values */ /* Windows Exit Procedure flag values */
#define WEP_FREE_DLL 0 #define WEP_FREE_DLL 0
#define WEP_SYSTEM_EXIT 1 #define WEP_SYSTEM_EXIT 1
...@@ -1301,7 +1295,6 @@ DWORD WINAPI GetFullPathNameA(LPCSTR,DWORD,LPSTR,LPSTR*); ...@@ -1301,7 +1295,6 @@ DWORD WINAPI GetFullPathNameA(LPCSTR,DWORD,LPSTR,LPSTR*);
DWORD WINAPI GetFullPathNameW(LPCWSTR,DWORD,LPWSTR,LPWSTR*); DWORD WINAPI GetFullPathNameW(LPCWSTR,DWORD,LPWSTR,LPWSTR*);
#define GetFullPathName WINELIB_NAME_AW(GetFullPathName) #define GetFullPathName WINELIB_NAME_AW(GetFullPathName)
BOOL WINAPI GetHandleInformation(HANDLE,LPDWORD); BOOL WINAPI GetHandleInformation(HANDLE,LPDWORD);
COORD WINAPI GetLargestConsoleWindowSize(HANDLE);
DWORD WINAPI GetLengthSid(PSID); DWORD WINAPI GetLengthSid(PSID);
VOID WINAPI GetLocalTime(LPSYSTEMTIME); VOID WINAPI GetLocalTime(LPSYSTEMTIME);
DWORD WINAPI GetLogicalDrives(void); DWORD WINAPI GetLogicalDrives(void);
...@@ -1425,9 +1418,6 @@ BOOL WINAPI QueryPerformanceCounter(PLARGE_INTEGER); ...@@ -1425,9 +1418,6 @@ BOOL WINAPI QueryPerformanceCounter(PLARGE_INTEGER);
BOOL WINAPI ReadConsoleA(HANDLE,LPVOID,DWORD,LPDWORD,LPVOID); BOOL WINAPI ReadConsoleA(HANDLE,LPVOID,DWORD,LPDWORD,LPVOID);
BOOL WINAPI ReadConsoleW(HANDLE,LPVOID,DWORD,LPDWORD,LPVOID); BOOL WINAPI ReadConsoleW(HANDLE,LPVOID,DWORD,LPDWORD,LPVOID);
#define ReadConsole WINELIB_NAME_AW(ReadConsole) #define ReadConsole WINELIB_NAME_AW(ReadConsole)
BOOL WINAPI ReadConsoleOutputCharacterA(HANDLE,LPSTR,DWORD,
COORD,LPDWORD);
#define ReadConsoleOutputCharacter WINELIB_NAME_AW(ReadConsoleOutputCharacter)
BOOL WINAPI ReadEventLogA(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWORD *,DWORD *); BOOL WINAPI ReadEventLogA(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWORD *,DWORD *);
BOOL WINAPI ReadEventLogW(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWORD *,DWORD *); BOOL WINAPI ReadEventLogW(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWORD *,DWORD *);
#define ReadEventLog WINELIB_NAME_AW(ReadEventLog) #define ReadEventLog WINELIB_NAME_AW(ReadEventLog)
...@@ -1450,7 +1440,6 @@ BOOL WINAPI SetCommMask(INT,DWORD); ...@@ -1450,7 +1440,6 @@ BOOL WINAPI SetCommMask(INT,DWORD);
BOOL WINAPI SetComputerNameA(LPCSTR); BOOL WINAPI SetComputerNameA(LPCSTR);
BOOL WINAPI SetComputerNameW(LPCWSTR); BOOL WINAPI SetComputerNameW(LPCWSTR);
#define SetComputerName WINELIB_NAME_AW(SetComputerName) #define SetComputerName WINELIB_NAME_AW(SetComputerName)
BOOL WINAPI SetConsoleCursorPosition(HANDLE,COORD);
BOOL WINAPI SetConsoleMode(HANDLE,DWORD); BOOL WINAPI SetConsoleMode(HANDLE,DWORD);
BOOL WINAPI SetConsoleTitleA(LPCSTR); BOOL WINAPI SetConsoleTitleA(LPCSTR);
BOOL WINAPI SetConsoleTitleW(LPCWSTR); BOOL WINAPI SetConsoleTitleW(LPCWSTR);
......
#ifndef __WINE_WINCON_H #ifndef __WINE_WINCON_H
#define __WINE_WINCON_H #define __WINE_WINCON_H
#include "winbase.h" /* for COORD */
#define CTRL_C_EVENT 0 #define CTRL_C_EVENT 0
#define CTRL_BREAK_EVENT 1 #define CTRL_BREAK_EVENT 1
#define CTRL_CLOSE_EVENT 2 #define CTRL_CLOSE_EVENT 2
...@@ -38,20 +36,18 @@ typedef struct _CONSOLE_CURSOR_INFO { ...@@ -38,20 +36,18 @@ typedef struct _CONSOLE_CURSOR_INFO {
BOOL bVisible; /* Visibility of cursor */ BOOL bVisible; /* Visibility of cursor */
} CONSOLE_CURSOR_INFO, *LPCONSOLE_CURSOR_INFO; } CONSOLE_CURSOR_INFO, *LPCONSOLE_CURSOR_INFO;
/*
typedef struct tagCOORD typedef struct tagCOORD
{ {
INT16 x; SHORT X;
INT16 y; SHORT Y;
} COORD,*LPCOORD; } COORD, *LPCOORD;
*/
typedef struct tagSMALL_RECT typedef struct tagSMALL_RECT
{ {
INT16 Left; SHORT Left;
INT16 Top; SHORT Top;
INT16 Right; SHORT Right;
INT16 Bottom; SHORT Bottom;
} SMALL_RECT,*LPSMALL_RECT; } SMALL_RECT,*LPSMALL_RECT;
typedef struct tagCONSOLE_SCREEN_BUFFER_INFO typedef struct tagCONSOLE_SCREEN_BUFFER_INFO
...@@ -141,6 +137,12 @@ typedef struct tagINPUT_RECORD ...@@ -141,6 +137,12 @@ typedef struct tagINPUT_RECORD
#define MENU_EVENT 0x08 #define MENU_EVENT 0x08
#define FOCUS_EVENT 0x10 #define FOCUS_EVENT 0x10
COORD WINAPI GetLargestConsoleWindowSize(HANDLE);
BOOL WINAPI ReadConsoleOutputCharacterA(HANDLE,LPSTR,DWORD,COORD,LPDWORD);
BOOL WINAPI ReadConsoleOutputCharacterW(HANDLE,LPWSTR,DWORD,COORD,LPDWORD);
#define ReadConsoleOutputCharacter WINELIB_NAME_AW(ReadConsoleOutputCharacter)
BOOL WINAPI SetConsoleCursorPosition(HANDLE,COORD);
BOOL WINAPI WriteConsoleOutputA( HANDLE hConsoleOutput, LPCHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, LPSMALL_RECT lpWriteRegion); BOOL WINAPI WriteConsoleOutputA( HANDLE hConsoleOutput, LPCHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, LPSMALL_RECT lpWriteRegion);
BOOL WINAPI WriteConsoleOutputW( HANDLE hConsoleOutput, LPCHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, LPSMALL_RECT lpWriteRegion); BOOL WINAPI WriteConsoleOutputW( HANDLE hConsoleOutput, LPCHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, LPSMALL_RECT lpWriteRegion);
#define WriteConsoleOutput WINELIB_NAME_AW(WriteConsoleOutput) #define WriteConsoleOutput WINELIB_NAME_AW(WriteConsoleOutput)
...@@ -171,7 +173,6 @@ BOOL WINAPI ReadConsoleInputW(HANDLE hConsoleInput, ...@@ -171,7 +173,6 @@ BOOL WINAPI ReadConsoleInputW(HANDLE hConsoleInput,
BOOL WINAPI GetConsoleScreenBufferInfo(HANDLE hConsoleOutput, BOOL WINAPI GetConsoleScreenBufferInfo(HANDLE hConsoleOutput,
LPCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo); LPCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo);
BOOL WINAPI SetConsoleCursorPosition(HANDLE hConsoleOutput, COORD dwCursorPosition);
BOOL WINAPI SetConsoleScreenBufferSize(HANDLE hConsoleOutput, BOOL WINAPI SetConsoleScreenBufferSize(HANDLE hConsoleOutput,
COORD dwSize); COORD dwSize);
......
...@@ -354,7 +354,7 @@ import ntdll.dll ...@@ -354,7 +354,7 @@ import ntdll.dll
336 stdcall GetHandleInformation(long ptr) GetHandleInformation 336 stdcall GetHandleInformation(long ptr) GetHandleInformation
337 stub GetLSCallbackTarget 337 stub GetLSCallbackTarget
338 stub GetLSCallbackTemplate 338 stub GetLSCallbackTemplate
339 stdcall GetLargestConsoleWindowSize(long) GetLargestConsoleWindowSize 339 stdcall GetLargestConsoleWindowSize(long) WIN32_GetLargestConsoleWindowSize
340 stdcall GetLastError() GetLastError 340 stdcall GetLastError() GetLastError
341 stdcall GetLocalTime(ptr) GetLocalTime 341 stdcall GetLocalTime(ptr) GetLocalTime
342 stdcall GetLocaleInfoA(long long ptr long) GetLocaleInfoA 342 stdcall GetLocaleInfoA(long long ptr long) GetLocaleInfoA
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <unistd.h> #include <unistd.h>
#include "winnt.h" #include "winnt.h"
#include "winbase.h"
#include "wincon.h" #include "wincon.h"
#include "handle.h" #include "handle.h"
......
...@@ -208,8 +208,8 @@ CONSOLE_string_to_IR( HANDLE hConsoleInput,unsigned char *buf,int len) { ...@@ -208,8 +208,8 @@ CONSOLE_string_to_IR( HANDLE hConsoleInput,unsigned char *buf,int len) {
*/ */
if (k<len-3) { if (k<len-3) {
ir.EventType = MOUSE_EVENT; ir.EventType = MOUSE_EVENT;
ir.Event.MouseEvent.dwMousePosition.x = buf[k+2]-'!'; ir.Event.MouseEvent.dwMousePosition.X = buf[k+2]-'!';
ir.Event.MouseEvent.dwMousePosition.y = buf[k+3]-'!'; ir.Event.MouseEvent.dwMousePosition.Y = buf[k+3]-'!';
if (buf[k+1]=='#') if (buf[k+1]=='#')
ir.Event.MouseEvent.dwButtonState = 0; ir.Event.MouseEvent.dwButtonState = 0;
else else
...@@ -408,17 +408,17 @@ HANDLE WINAPI CreateConsoleScreenBuffer( DWORD dwDesiredAccess, ...@@ -408,17 +408,17 @@ HANDLE WINAPI CreateConsoleScreenBuffer( DWORD dwDesiredAccess,
BOOL WINAPI GetConsoleScreenBufferInfo( HANDLE hConsoleOutput, BOOL WINAPI GetConsoleScreenBufferInfo( HANDLE hConsoleOutput,
LPCONSOLE_SCREEN_BUFFER_INFO csbi ) LPCONSOLE_SCREEN_BUFFER_INFO csbi )
{ {
csbi->dwSize.x = 80; csbi->dwSize.X = 80;
csbi->dwSize.y = 24; csbi->dwSize.Y = 24;
csbi->dwCursorPosition.x = 0; csbi->dwCursorPosition.X = 0;
csbi->dwCursorPosition.y = 0; csbi->dwCursorPosition.Y = 0;
csbi->wAttributes = 0; csbi->wAttributes = 0;
csbi->srWindow.Left = 0; csbi->srWindow.Left = 0;
csbi->srWindow.Right = 79; csbi->srWindow.Right = 79;
csbi->srWindow.Top = 0; csbi->srWindow.Top = 0;
csbi->srWindow.Bottom = 23; csbi->srWindow.Bottom = 23;
csbi->dwMaximumWindowSize.x = 80; csbi->dwMaximumWindowSize.X = 80;
csbi->dwMaximumWindowSize.y = 24; csbi->dwMaximumWindowSize.Y = 24;
return TRUE; return TRUE;
} }
...@@ -444,11 +444,18 @@ BOOL WINAPI SetConsoleActiveScreenBuffer( ...@@ -444,11 +444,18 @@ BOOL WINAPI SetConsoleActiveScreenBuffer(
COORD WINAPI GetLargestConsoleWindowSize( HANDLE hConsoleOutput ) COORD WINAPI GetLargestConsoleWindowSize( HANDLE hConsoleOutput )
{ {
COORD c; COORD c;
c.x = 80; c.X = 80;
c.y = 24; c.Y = 24;
return c; return c;
} }
/* gcc doesn't return structures the same way as dwords */
DWORD WINAPI WIN32_GetLargestConsoleWindowSize( HANDLE hConsoleOutput )
{
COORD c = GetLargestConsoleWindowSize( hConsoleOutput );
return *(DWORD *)&c;
}
/*********************************************************************** /***********************************************************************
* FreeConsole (KERNEL32.267) * FreeConsole (KERNEL32.267)
*/ */
...@@ -747,8 +754,8 @@ BOOL WINAPI WriteConsoleOutputA( HANDLE hConsoleOutput, ...@@ -747,8 +754,8 @@ BOOL WINAPI WriteConsoleOutputA( HANDLE hConsoleOutput,
}; };
CONSOLE_make_complex(hConsoleOutput); CONSOLE_make_complex(hConsoleOutput);
buffer = HeapAlloc(GetProcessHeap(),0,curbufsize); buffer = HeapAlloc(GetProcessHeap(),0,curbufsize);
offbase = (dwBufferCoord.y - 1) * dwBufferSize.x + offbase = (dwBufferCoord.Y - 1) * dwBufferSize.X +
(dwBufferCoord.x - lpWriteRegion->Left); (dwBufferCoord.X - lpWriteRegion->Left);
TRACE("orig rect top = %d, bottom=%d, left=%d, right=%d\n", TRACE("orig rect top = %d, bottom=%d, left=%d, right=%d\n",
lpWriteRegion->Top, lpWriteRegion->Top,
...@@ -762,9 +769,9 @@ BOOL WINAPI WriteConsoleOutputA( HANDLE hConsoleOutput, ...@@ -762,9 +769,9 @@ BOOL WINAPI WriteConsoleOutputA( HANDLE hConsoleOutput,
/* Step 1. Make (Bottom,Right) offset of intersection with /* Step 1. Make (Bottom,Right) offset of intersection with
Screen Buffer */ Screen Buffer */
lpWriteRegion->Bottom = min(lpWriteRegion->Bottom, csbi.dwSize.y-1) - lpWriteRegion->Bottom = min(lpWriteRegion->Bottom, csbi.dwSize.Y-1) -
lpWriteRegion->Top; lpWriteRegion->Top;
lpWriteRegion->Right = min(lpWriteRegion->Right, csbi.dwSize.x-1) - lpWriteRegion->Right = min(lpWriteRegion->Right, csbi.dwSize.X-1) -
lpWriteRegion->Left; lpWriteRegion->Left;
/* Step 2. If either offset is negative, then no action /* Step 2. If either offset is negative, then no action
...@@ -788,10 +795,10 @@ BOOL WINAPI WriteConsoleOutputA( HANDLE hConsoleOutput, ...@@ -788,10 +795,10 @@ BOOL WINAPI WriteConsoleOutputA( HANDLE hConsoleOutput,
} }
/* Step 3. Intersect with source rectangle */ /* Step 3. Intersect with source rectangle */
lpWriteRegion->Bottom = lpWriteRegion->Top - dwBufferCoord.y + lpWriteRegion->Bottom = lpWriteRegion->Top - dwBufferCoord.Y +
min(lpWriteRegion->Bottom + dwBufferCoord.y, dwBufferSize.y-1); min(lpWriteRegion->Bottom + dwBufferCoord.Y, dwBufferSize.Y-1);
lpWriteRegion->Right = lpWriteRegion->Left - dwBufferCoord.x + lpWriteRegion->Right = lpWriteRegion->Left - dwBufferCoord.X +
min(lpWriteRegion->Right + dwBufferCoord.x, dwBufferSize.x-1); min(lpWriteRegion->Right + dwBufferCoord.X, dwBufferSize.X-1);
TRACE("clipped rect top = %d, bottom=%d, left=%d,right=%d\n", TRACE("clipped rect top = %d, bottom=%d, left=%d,right=%d\n",
lpWriteRegion->Top, lpWriteRegion->Top,
...@@ -816,7 +823,7 @@ BOOL WINAPI WriteConsoleOutputA( HANDLE hConsoleOutput, ...@@ -816,7 +823,7 @@ BOOL WINAPI WriteConsoleOutputA( HANDLE hConsoleOutput,
/* Now do the real processing and move the characters */ /* Now do the real processing and move the characters */
for (i=lpWriteRegion->Top;i<=lpWriteRegion->Bottom;i++) { for (i=lpWriteRegion->Top;i<=lpWriteRegion->Bottom;i++) {
offbase += dwBufferSize.x; offbase += dwBufferSize.X;
sprintf(sbuf,"%c[%d;%dH",27,i+1,lpWriteRegion->Left+1); sprintf(sbuf,"%c[%d;%dH",27,i+1,lpWriteRegion->Left+1);
SADD(sbuf); SADD(sbuf);
for (j=lpWriteRegion->Left;j<=lpWriteRegion->Right;j++) { for (j=lpWriteRegion->Left;j<=lpWriteRegion->Right;j++) {
...@@ -1136,17 +1143,17 @@ BOOL WINAPI SetConsoleCursorPosition( HANDLE hcon, COORD pos ) ...@@ -1136,17 +1143,17 @@ BOOL WINAPI SetConsoleCursorPosition( HANDLE hcon, COORD pos )
DWORD xlen; DWORD xlen;
/* make console complex only if we change lines, not just in the line */ /* make console complex only if we change lines, not just in the line */
if (pos.y) if (pos.Y)
CONSOLE_make_complex(hcon); CONSOLE_make_complex(hcon);
TRACE("%d (%dx%d)\n", hcon, pos.x , pos.y ); TRACE("%d (%dx%d)\n", hcon, pos.X , pos.Y );
/* x are columns, y rows */ /* x are columns, y rows */
if (pos.y) if (pos.Y)
/* full screen cursor absolute positioning */ /* full screen cursor absolute positioning */
sprintf(xbuf,"%c[%d;%dH", 0x1B, pos.y+1, pos.x+1); sprintf(xbuf,"%c[%d;%dH", 0x1B, pos.Y+1, pos.X+1);
else else
/* relative cursor positioning in line (\r to go to 0) */ /* relative cursor positioning in line (\r to go to 0) */
sprintf(xbuf,"\r%c[%dC", 0x1B, pos.x); sprintf(xbuf,"\r%c[%dC", 0x1B, pos.X);
/* FIXME: store internal if we start using own console buffers */ /* FIXME: store internal if we start using own console buffers */
WriteFile(hcon,xbuf,strlen(xbuf),&xlen,NULL); WriteFile(hcon,xbuf,strlen(xbuf),&xlen,NULL);
return TRUE; return TRUE;
...@@ -1293,7 +1300,7 @@ BOOL WINAPI SetConsoleTextAttribute(HANDLE hConsoleOutput,WORD wAttr) ...@@ -1293,7 +1300,7 @@ BOOL WINAPI SetConsoleTextAttribute(HANDLE hConsoleOutput,WORD wAttr)
BOOL WINAPI SetConsoleScreenBufferSize( HANDLE hConsoleOutput, BOOL WINAPI SetConsoleScreenBufferSize( HANDLE hConsoleOutput,
COORD dwSize ) COORD dwSize )
{ {
FIXME("(%d,%dx%d): stub\n",hConsoleOutput,dwSize.x,dwSize.y); FIXME("(%d,%dx%d): stub\n",hConsoleOutput,dwSize.X,dwSize.Y);
return TRUE; return TRUE;
} }
...@@ -1383,7 +1390,7 @@ BOOL WINAPI FillConsoleOutputAttribute( HANDLE hConsoleOutput, ...@@ -1383,7 +1390,7 @@ BOOL WINAPI FillConsoleOutputAttribute( HANDLE hConsoleOutput,
LPDWORD lpNumAttrsWritten) LPDWORD lpNumAttrsWritten)
{ {
FIXME("(%d,%d,%ld,%dx%d,%p): stub\n", hConsoleOutput, FIXME("(%d,%d,%ld,%dx%d,%p): stub\n", hConsoleOutput,
wAttribute,nLength,dwCoord.x,dwCoord.y,lpNumAttrsWritten); wAttribute,nLength,dwCoord.X,dwCoord.Y,lpNumAttrsWritten);
*lpNumAttrsWritten = nLength; *lpNumAttrsWritten = nLength;
return TRUE; return TRUE;
} }
...@@ -1398,7 +1405,7 @@ BOOL WINAPI ReadConsoleOutputCharacterA(HANDLE hConsoleOutput, ...@@ -1398,7 +1405,7 @@ BOOL WINAPI ReadConsoleOutputCharacterA(HANDLE hConsoleOutput,
LPSTR lpstr, DWORD dword, COORD coord, LPDWORD lpdword) LPSTR lpstr, DWORD dword, COORD coord, LPDWORD lpdword)
{ {
FIXME("(%d,%p,%ld,%dx%d,%p): stub\n", hConsoleOutput,lpstr, FIXME("(%d,%p,%ld,%dx%d,%p): stub\n", hConsoleOutput,lpstr,
dword,coord.x,coord.y,lpdword); dword,coord.X,coord.Y,lpdword);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
...@@ -1415,7 +1422,7 @@ BOOL WINAPI ScrollConsoleScreenBufferA( HANDLE hConsoleOutput, ...@@ -1415,7 +1422,7 @@ BOOL WINAPI ScrollConsoleScreenBufferA( HANDLE hConsoleOutput,
COORD dwDestOrigin, LPCHAR_INFO lpFill) COORD dwDestOrigin, LPCHAR_INFO lpFill)
{ {
FIXME("(%d,%p,%p,%dx%d,%p): stub\n", hConsoleOutput,lpScrollRect, FIXME("(%d,%p,%p,%dx%d,%p): stub\n", hConsoleOutput,lpScrollRect,
lpClipRect,dwDestOrigin.x,dwDestOrigin.y,lpFill); lpClipRect,dwDestOrigin.X,dwDestOrigin.Y,lpFill);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment