* WChar fix to compile also with 1.0.x

This commit is contained in:
peter 2001-08-01 18:01:20 +00:00
parent f399cef4e1
commit c3da2af2ad
3 changed files with 47 additions and 6 deletions

View File

@ -146,7 +146,15 @@ Type
{$ifdef HASWIDECHAR} {$ifdef HASWIDECHAR}
PWideChar = ^WideChar; PWideChar = ^WideChar;
PPWideChar = ^PWideChar; PPWideChar = ^PWideChar;
wchar = Widechar; { 1.0.x also has HASWIDECHAR defined, but doesn't support it
fully, setting WChar to Word as fallback (PFV) }
{$ifndef VER1_0}
WChar = Widechar;
{$else}
WChar = Word;
{$endif}
{$else}
WChar = Word;
{$endif HASWIDECHAR} {$endif HASWIDECHAR}
{$ifdef HASWIDESTRING} {$ifdef HASWIDESTRING}
PWideString = ^WideString; PWideString = ^WideString;
@ -538,7 +546,10 @@ const
{ {
$Log$ $Log$
Revision 1.33 2001-08-01 15:00:11 jonas Revision 1.34 2001-08-01 18:01:20 peter
* WChar fix to compile also with 1.0.x
Revision 1.33 2001/08/01 15:00:11 jonas
+ "compproc" helpers + "compproc" helpers
* renamed several helpers so that their name is the same as their * renamed several helpers so that their name is the same as their
"public alias", which should facilitate the conversion of processor "public alias", which should facilitate the conversion of processor

View File

@ -524,7 +524,15 @@ var
DestCoor: TCoord; DestCoor: TCoord;
CharInfo: TCharInfo; CharInfo: TCharInfo;
begin begin
{$ifdef HASWIDECHAR}
{$ifdef VER1_0}
CharInfo.UnicodeChar := 32;
{$else}
CharInfo.UnicodeChar := #32; CharInfo.UnicodeChar := #32;
{$endif}
{$else}
CharInfo.UnicodeChar := 32;
{$endif}
CharInfo.Attributes := TextAttr; CharInfo.Attributes := TextAttr;
Y := (WindMinY - 1) + (Y - 1) + 1; Y := (WindMinY - 1) + (Y - 1) + 1;
@ -561,7 +569,15 @@ var
begin begin
GetScreenCursor(X, Y); GetScreenCursor(X, Y);
{$ifdef HASWIDECHAR}
{$ifdef VER1_0}
CharInfo.UnicodeChar := 32;
{$else}
CharInfo.UnicodeChar := #32; CharInfo.UnicodeChar := #32;
{$endif}
{$else}
CharInfo.UnicodeChar := 32;
{$endif}
CharInfo.Attributes := TextAttr; CharInfo.Attributes := TextAttr;
SrcRect.Top := Y - 1; SrcRect.Top := Y - 1;
@ -835,7 +851,10 @@ end. { unit Crt }
{ {
$Log$ $Log$
Revision 1.12 2001-07-30 15:00:54 marco Revision 1.13 2001-08-01 18:01:20 peter
* WChar fix to compile also with 1.0.x
Revision 1.12 2001/07/30 15:00:54 marco
* Fixed unicode reference from word to widechar * Fixed unicode reference from word to widechar
Revision 1.11 2001/07/13 17:43:25 peter Revision 1.11 2001/07/13 17:43:25 peter

View File

@ -297,7 +297,15 @@ begin
if LineCounter>y2 then if LineCounter>y2 then
y2:=LineCounter; y2:=LineCounter;
end; end;
{$ifdef HASWIDECHAR}
{$ifdef VER1_0}
LineBuf^[BufCounter].UniCodeChar := WordRec(VideoBuf^[BufCounter]).One;
{$else}
LineBuf^[BufCounter].UniCodeChar := Widechar(WordRec(VideoBuf^[BufCounter]).One); LineBuf^[BufCounter].UniCodeChar := Widechar(WordRec(VideoBuf^[BufCounter]).One);
{$endif}
{$else}
LineBuf^[BufCounter].UniCodeChar := WordRec(VideoBuf^[BufCounter]).One);
{$endif}
{ If (WordRec(VideoBuf^[BufCounter]).Two and $80)<>0 then { If (WordRec(VideoBuf^[BufCounter]).Two and $80)<>0 then
LineBuf^[BufCounter].Attributes := $100+WordRec(VideoBuf^[BufCounter]).Two LineBuf^[BufCounter].Attributes := $100+WordRec(VideoBuf^[BufCounter]).Two
else } else }
@ -358,7 +366,10 @@ finalization
end. end.
{ {
$Log$ $Log$
Revision 1.4 2001-07-30 15:01:12 marco Revision 1.5 2001-08-01 18:01:20 peter
* WChar fix to compile also with 1.0.x
Revision 1.4 2001/07/30 15:01:12 marco
* Fixed wchar=word to widechar conversion * Fixed wchar=word to widechar conversion
Revision 1.3 2001/06/13 18:32:55 peter Revision 1.3 2001/06/13 18:32:55 peter