mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-01 16:11:18 +02:00
Support compiling some Lazarus code with -Sy option. Issue #40263, patch by Arioch The.
This commit is contained in:
parent
10da471513
commit
21ea45d415
@ -204,11 +204,11 @@ const
|
|||||||
np := source.n_points;
|
np := source.n_points;
|
||||||
nc := source.n_contours;
|
nc := source.n_contours;
|
||||||
|
|
||||||
target.org := @source.org^[np];
|
target.org := pointer(@source.org^[np]);
|
||||||
target.cur := @source.cur^[np];
|
target.cur := pointer(@source.cur^[np]);
|
||||||
target.flags := @source.flags^[np];
|
target.flags := pointer(@source.flags^[np]);
|
||||||
|
|
||||||
target.conEnds := @source.conEnds^[nc];
|
target.conEnds := pointer(@source.conEnds^[nc]);
|
||||||
|
|
||||||
target.n_points := 0;
|
target.n_points := 0;
|
||||||
target.n_contours := 0;
|
target.n_contours := 0;
|
||||||
|
@ -362,7 +362,7 @@ var
|
|||||||
Points[2].X := ARect.Left + 2;
|
Points[2].X := ARect.Left + 2;
|
||||||
Points[2].y := y;
|
Points[2].y := y;
|
||||||
Points[3] := Points[0];
|
Points[3] := Points[0];
|
||||||
Polygon(DC, @Points, 4, False);
|
Polygon(DC, @Points[Low(Points)], 4, False);
|
||||||
end;
|
end;
|
||||||
procedure DrawRightArrow(ARect: TRect);
|
procedure DrawRightArrow(ARect: TRect);
|
||||||
var y, h: Integer;
|
var y, h: Integer;
|
||||||
@ -377,7 +377,7 @@ var
|
|||||||
Points[2].X := ARect.Right - 2;
|
Points[2].X := ARect.Right - 2;
|
||||||
Points[2].y := y;
|
Points[2].y := y;
|
||||||
Points[3] := Points[0];
|
Points[3] := Points[0];
|
||||||
Polygon(DC, @Points, 4, False);
|
Polygon(DC, @Points[Low(Points)], 4, False);
|
||||||
end;
|
end;
|
||||||
procedure DrawTopArrow(ARect: TRect);
|
procedure DrawTopArrow(ARect: TRect);
|
||||||
var x, h: Integer;
|
var x, h: Integer;
|
||||||
@ -392,7 +392,7 @@ var
|
|||||||
Points[2].Y := ARect.Top + 2;
|
Points[2].Y := ARect.Top + 2;
|
||||||
Points[2].X := x;
|
Points[2].X := x;
|
||||||
Points[3] := Points[0];
|
Points[3] := Points[0];
|
||||||
Polygon(DC, @Points, 4, False);
|
Polygon(DC, @Points[Low(Points)], 4, False);
|
||||||
end;
|
end;
|
||||||
procedure DrawBottomArrow(ARect: TRect);
|
procedure DrawBottomArrow(ARect: TRect);
|
||||||
var x, h: Integer;
|
var x, h: Integer;
|
||||||
@ -407,7 +407,7 @@ var
|
|||||||
Points[2].Y := ARect.Bottom - 2;
|
Points[2].Y := ARect.Bottom - 2;
|
||||||
Points[2].X := X;
|
Points[2].X := X;
|
||||||
Points[3] := Points[0];
|
Points[3] := Points[0];
|
||||||
Polygon(DC, @Points, 4, False);
|
Polygon(DC, @Points[Low(Points)], 4, False);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -218,7 +218,7 @@ begin
|
|||||||
if Xml11 then
|
if Xml11 then
|
||||||
Pages := Xml11NamePages
|
Pages := Xml11NamePages
|
||||||
else
|
else
|
||||||
Pages := @NamePages;
|
Pages := pointer(@NamePages);
|
||||||
|
|
||||||
I := 0;
|
I := 0;
|
||||||
if (Len = 0) or not ((Byte(Value[I]) in NamingBitmap[Pages^[hi(Word(Value[I]))]]) or
|
if (Len = 0) or not ((Byte(Value[I]) in NamingBitmap[Pages^[hi(Word(Value[I]))]]) or
|
||||||
@ -246,7 +246,7 @@ begin
|
|||||||
if Xml11 then
|
if Xml11 then
|
||||||
Pages := Xml11NamePages
|
Pages := Xml11NamePages
|
||||||
else
|
else
|
||||||
Pages := @NamePages;
|
Pages := pointer(@NamePages);
|
||||||
Result := False;
|
Result := False;
|
||||||
if Value = '' then
|
if Value = '' then
|
||||||
Exit;
|
Exit;
|
||||||
@ -278,7 +278,7 @@ begin
|
|||||||
if Xml11 then
|
if Xml11 then
|
||||||
Pages := Xml11NamePages
|
Pages := Xml11NamePages
|
||||||
else
|
else
|
||||||
Pages := @NamePages;
|
Pages := pointer(@NamePages);
|
||||||
Result := False;
|
Result := False;
|
||||||
if Value = '' then
|
if Value = '' then
|
||||||
Exit;
|
Exit;
|
||||||
@ -302,7 +302,7 @@ begin
|
|||||||
if Xml11 then
|
if Xml11 then
|
||||||
Pages := Xml11NamePages
|
Pages := Xml11NamePages
|
||||||
else
|
else
|
||||||
Pages := @NamePages;
|
Pages := pointer(@NamePages);
|
||||||
I := 1;
|
I := 1;
|
||||||
Result := False;
|
Result := False;
|
||||||
if Value = '' then
|
if Value = '' then
|
||||||
|
@ -599,7 +599,7 @@ begin
|
|||||||
if Index >= 0 then
|
if Index >= 0 then
|
||||||
begin
|
begin
|
||||||
Image.DataSize := FWidth * FHeight * SizeOf(FData[0]);
|
Image.DataSize := FWidth * FHeight * SizeOf(FData[0]);
|
||||||
Image.Data := @FData[Index * FWidth * FHeight];
|
Image.Data := pointer(@FData[Index * FWidth * FHeight]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -1384,7 +1384,7 @@ begin
|
|||||||
tmp := nil;
|
tmp := nil;
|
||||||
r := Windows.FormatMessage(
|
r := Windows.FormatMessage(
|
||||||
FORMAT_MESSAGE_ALLOCATE_BUFFER or FORMAT_MESSAGE_FROM_SYSTEM or FORMAT_MESSAGE_ARGUMENT_ARRAY,
|
FORMAT_MESSAGE_ALLOCATE_BUFFER or FORMAT_MESSAGE_FROM_SYSTEM or FORMAT_MESSAGE_ARGUMENT_ARRAY,
|
||||||
nil, AErrorCode, LANG_NEUTRAL, @tmp, 0, nil);
|
nil, AErrorCode, LANG_NEUTRAL, pointer(@tmp), 0, nil);
|
||||||
|
|
||||||
if r = 0 then Exit('');
|
if r = 0 then Exit('');
|
||||||
|
|
||||||
@ -1610,7 +1610,7 @@ function WndClassName(Wnd: HWND): String; inline;
|
|||||||
var
|
var
|
||||||
winClassName: array[0..19] of char;
|
winClassName: array[0..19] of char;
|
||||||
begin
|
begin
|
||||||
GetClassName(Wnd, @winClassName, 20);
|
GetClassName(Wnd, @winClassName[low(winClassName)], Length(winClassName));
|
||||||
Result := winClassName;
|
Result := winClassName;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1618,7 +1618,7 @@ function WndText(Wnd: HWND): String; inline;
|
|||||||
var
|
var
|
||||||
winText: array[0..255] of char;
|
winText: array[0..255] of char;
|
||||||
begin
|
begin
|
||||||
GetWindowText(Wnd, @winText, 256);
|
GetWindowText(Wnd, @winText[low(winText)], Length(winText));
|
||||||
Result := winText;
|
Result := winText;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user