From e34e13439e2d2a30a31c78c17db010166b8b1c3e Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 6 Oct 2002 20:00:22 +0000 Subject: [PATCH] * Use Widechar in the Windows unit --- rtl/win32/crt.pp | 25 ++++++------------------ rtl/win32/video.pp | 15 +++++++-------- rtl/win32/wininc/base.inc | 37 +++++++++++++++++++----------------- rtl/win32/wininc/defines.inc | 7 +++++-- 4 files changed, 38 insertions(+), 46 deletions(-) diff --git a/rtl/win32/crt.pp b/rtl/win32/crt.pp index 3bb2e10c0f..c280ed868d 100644 --- a/rtl/win32/crt.pp +++ b/rtl/win32/crt.pp @@ -524,15 +524,7 @@ var DestCoor: TCoord; CharInfo: TCharInfo; begin -{$ifdef HASWIDECHAR} - {$ifdef VER1_0} - CharInfo.UnicodeChar := 32; - {$else} - CharInfo.UnicodeChar := #32; - {$endif} -{$else} - CharInfo.UnicodeChar := 32; -{$endif} + CharInfo.UnicodeChar := #32; CharInfo.Attributes := TextAttr; Y := (WindMinY - 1) + (Y - 1) + 1; @@ -569,15 +561,7 @@ var begin GetScreenCursor(X, Y); -{$ifdef HASWIDECHAR} - {$ifdef VER1_0} - CharInfo.UnicodeChar := 32; - {$else} - CharInfo.UnicodeChar := #32; - {$endif} -{$else} - CharInfo.UnicodeChar := 32; -{$endif} + CharInfo.UnicodeChar := #32; CharInfo.Attributes := TextAttr; SrcRect.Top := Y - 1; @@ -851,7 +835,10 @@ end. { unit Crt } { $Log$ - Revision 1.17 2002-09-07 16:01:28 peter + Revision 1.18 2002-10-06 20:00:22 peter + * Use Widechar in the Windows unit + + Revision 1.17 2002/09/07 16:01:28 peter * old logs removed and tabs fixed Revision 1.16 2002/01/19 11:56:34 peter diff --git a/rtl/win32/video.pp b/rtl/win32/video.pp index 8cf429850b..76969e3a31 100644 --- a/rtl/win32/video.pp +++ b/rtl/win32/video.pp @@ -260,14 +260,10 @@ begin if LineCounter>y2 then y2:=LineCounter; end; -{$ifdef HASWIDECHAR} - {$ifdef VER1_0} - LineBuf^[BufCounter].UniCodeChar := WordRec(VideoBuf^[BufCounter]).One; - {$else} - LineBuf^[BufCounter].UniCodeChar := Widechar(WordRec(VideoBuf^[BufCounter]).One); - {$endif} +{$ifdef VER1_0} + Word(LineBuf^[BufCounter].UniCodeChar) := WordRec(VideoBuf^[BufCounter]).One; {$else} - LineBuf^[BufCounter].UniCodeChar := WordRec(VideoBuf^[BufCounter]).One); + LineBuf^[BufCounter].UniCodeChar := Widechar(WordRec(VideoBuf^[BufCounter]).One); {$endif} { If (WordRec(VideoBuf^[BufCounter]).Two and $80)<>0 then LineBuf^[BufCounter].Attributes := $100+WordRec(VideoBuf^[BufCounter]).Two @@ -335,7 +331,10 @@ initialization end. { $Log$ - Revision 1.8 2002-09-07 16:01:29 peter + Revision 1.9 2002-10-06 20:00:22 peter + * Use Widechar in the Windows unit + + Revision 1.8 2002/09/07 16:01:29 peter * old logs removed and tabs fixed } diff --git a/rtl/win32/wininc/base.inc b/rtl/win32/wininc/base.inc index 2d3a874e9b..cd2a509ce5 100644 --- a/rtl/win32/wininc/base.inc +++ b/rtl/win32/wininc/base.inc @@ -138,13 +138,13 @@ LPCSTR = Pchar; {$ifdef UNICODE} - LPCTSTR = ^word; + LPCTSTR = Pwidechar; {$else} LPCTSTR = Pchar; {$endif} - LPCWCH = ^word; - LPCWSTR = ^word; + LPCWCH = Pwidechar; + LPCWSTR = Pwidechar; LPDWORD = ^DWORD; @@ -155,8 +155,8 @@ LPSTR = Pchar; {$ifdef UNICODE} - LPTCH = ^word; - LPTSTR = ^word; + LPTCH = Pwidechar; + LPTSTR = Pwidechar; {$else} LPTCH = Pchar; LPTSTR = Pchar; @@ -167,10 +167,10 @@ LPVOID = pointer; LPCVOID = pointer; - LPWCH = ^word; + LPWCH = Pwidechar; LPWORD = ^word; - LPWSTR = ^word; - NWPSTR = ^word; + LPWSTR = Pwidechar; + NWPSTR = Pwidechar; PWINBOOL = ^WINBOOL; PBOOLEAN = ^BYTE; @@ -182,8 +182,8 @@ PCSTR = Pchar; - PCWCH = ^word; - PCWSTR = ^word; + PCWCH = Pwidechar; + PCWSTR = Pwidechar; PDWORD = ^DWORD; @@ -199,9 +199,9 @@ PSZ = Pchar; {$ifdef UNICODE} PTBYTE = ^word; - PTCH = ^word; - PTCHAR = ^word; - PTSTR = ^word; + PTCH = Pwidechar; + PTCHAR = Pwidechar; + PTSTR = Pwidechar; {$else} PTBYTE = ^byte; PTCH = Pchar; @@ -210,8 +210,8 @@ {$endif} PUCHAR = ^byte; - PWCH = ^word; - PWCHAR = ^word; + PWCH = Pwidechar; + PWCHAR = Pwidechar; PWORD = ^word; PUINT = ^cardinal; @@ -239,7 +239,7 @@ {$endif} UCHAR = byte; - WCHAR = System.wchar; {Now in Systemh} + WCHAR = WideChar; UINT = cardinal; ULONG = cardinal; @@ -940,7 +940,10 @@ type { $Log$ - Revision 1.11 2002-09-15 17:53:45 peter + Revision 1.12 2002-10-06 20:00:22 peter + * Use Widechar in the Windows unit + + Revision 1.11 2002/09/15 17:53:45 peter * Remove Float type, use Single instead Revision 1.10 2002/09/07 16:01:30 peter diff --git a/rtl/win32/wininc/defines.inc b/rtl/win32/wininc/defines.inc index d2a65e5147..580c4c0d07 100644 --- a/rtl/win32/wininc/defines.inc +++ b/rtl/win32/wininc/defines.inc @@ -5151,7 +5151,7 @@ const { was #define dname def_expr } function UNICODE_NULL : WCHAR; begin - UNICODE_NULL:=WCHAR(0); + UNICODE_NULL:=#0; end; { was #define dname def_expr } @@ -5731,7 +5731,10 @@ const { $Log$ - Revision 1.6 2002-09-07 16:01:30 peter + Revision 1.7 2002-10-06 20:00:22 peter + * Use Widechar in the Windows unit + + Revision 1.6 2002/09/07 16:01:30 peter * old logs removed and tabs fixed Revision 1.5 2002/05/09 08:31:43 carl