Forum > CustomDrawn

[SOLVED] Code cleanup at lcl/interfaces/customdrawn/customdrawnwsforms_x11.inc

(1/1)

lagprogramming:
lcl/interfaces/customdrawn/customdrawnwsforms_x11.inc contains the following lines:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---// redefines:// The version from FreePascal crash except in FPC 2.7.1+ from 10 Dec 2011 +function XmbLookupString(p1: PXIC; ev: PXKeyPressedEvent; str: PChar; len: longword; ks: PKeySym; stat: PStatus): longint; cdecl; external;function Xutf8LookupString(p1: PXIC; ev: PXKeyPressedEvent; str: PChar; len: longword; ks: PKeySym; stat: PStatus): longint; cdecl; external;
The presence of the mentioned redefines has become obsolete since fpc's commit 14e6dcf8
https://gitlab.com/freepascal.org/fpc/source/-/commit/14e6dcf8161e55ace1837ea785ab3961deebb533
The commit modified the file packages/x11/src/xlib.pp in order to fix the routine declarations.
This means that the redefines found in the LCL have become obsolete by 11 years.
The following patch removes them.

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---diff --git a/lcl/interfaces/customdrawn/customdrawnwsforms_x11.inc b/lcl/interfaces/customdrawn/customdrawnwsforms_x11.incindex 3fe8cfff4d..87f7038e85 100644--- a/lcl/interfaces/customdrawn/customdrawnwsforms_x11.inc+++ b/lcl/interfaces/customdrawn/customdrawnwsforms_x11.inc@@ -1,10 +1,5 @@ {%MainUnit customdrawnwsforms.pp} -// redefines:-// The version from FreePascal crash except in FPC 2.7.1+ from 10 Dec 2011 +-function XmbLookupString(p1: PXIC; ev: PXKeyPressedEvent; str: PChar; len: longword; ks: PKeySym; stat: PStatus): longint; cdecl; external;-function Xutf8LookupString(p1: PXIC; ev: PXKeyPressedEvent; str: PChar; len: longword; ks: PKeySym; stat: PStatus): longint; cdecl; external;- { TCDWSCustomForm }  class procedure TCDWSCustomForm.UpdateMotifWMHints(const AWinControl: TWinControl; CanMaximize: Boolean);

zeljko:
Committed, thanks.

Navigation

[0] Message Index

Go to full version