View Issue Details

IDProjectCategoryView StatusLast Update
0037990PatchesLCLpublic2020-11-03 14:34
ReporterZaher Dirkey Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Summary0037990: ipHTML: Remove Delphi compatibility {$ifdef IP_LAZARUS}
DescriptionIn the source there is condition used {$ifdef IP_LAZARUS}, It is to keep ipHTML.pas and other files compiled with Delphi, but after I tried to compile it in Delphi, I found it is really broken, can't be fixed, there is many improving by passed it, and not using it.
I think it is better to remove this condition to reduce complexity of ipHTML, and then if we need to support Delphi again, we will report it again.

I can do that, just need permission to do huge modification.
TagsipHTMLPanel
Fixed in Revisionr64097, r64099
LazTarget-
Widgetset
Attached Files

Activities

Bart Broersma

2020-10-26 11:55

developer   ~0126565

@Zaher: posting in "patches" would imply that you actually attached a patch...

Juha Manninen

2020-10-26 14:42

developer   ~0126569

Last edited: 2020-10-26 14:43

View 2 revisions

It is a very good idea. I did the same thing for the Jedi Code Format package. Our forks will not be used for Delphi anyways. There are other forks / versions for Delphi.

> I can do that, just need permission to do huge modification.

Permission granted! :)
A big patch is not a problem. You can compress it if Mantis imposes some size limit.

Zaher Dirkey

2020-11-01 09:15

reporter   ~0126682

This patch removed IP_LAZARUS checking,
I kept some code commented for none implemented method/procedure or unported from Delphi,
ipdefine.inc still as it, it need more review and redesign, some defines like checking version of Delphi I will remove it too in next patch.

like {$IFDEF VERSION4}, {$IFDEF VERSION5}, {$IFNDEF VERSION3ONLY} etc

Please keep the issue open until I finish
removing-ip-lazarus-define.patch (114,936 bytes)   
Index: components/turbopower_ipro/examples/htmfileexp1.pas
===================================================================
--- components/turbopower_ipro/examples/htmfileexp1.pas	(revision 64095)
+++ components/turbopower_ipro/examples/htmfileexp1.pas	(working copy)
@@ -3,23 +3,14 @@
 {$mode objfpc}{$H+}
 
 {.$define UsePreview}
-{$IFDEF LCL}
-{$DEFINE IP_LAZARUS}
-{$ENDIF}
 
 interface
 
 uses
   Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Buttons,
-  {$IFDEF IP_LAZARUS}
-    {$ifdef UsePreview}
-    OsPrinters,
-    {$endif}
-  {$ELSE}
-    GIFImage,
-    JPeg,
-    ImageDLLLoader, PNGLoader, LinarBitmap, //from ImageFileLib of Michael Vinther: http://www.logicnet.dk/lib/
-  {$ENDIF}
+  {$ifdef UsePreview}
+  OsPrinters,
+  {$endif}
   IpUtils, IpHtml, ExtCtrls, StdCtrls, FileUtil;
 
 type
@@ -123,10 +114,6 @@
 var
   PicCreated: Boolean;
   FN, nURL: string;
- {$IFNDEF IP_LAZARUS}
-  Ext: string;
-  BitMap: Graphics.TBitMap;
- {$ENDIF}
 begin
   PicCreated := False;
   try
@@ -139,15 +126,10 @@
     FN := Concat (FN, nURL);
     if FileExistsUTF8(FN) then begin
       if Picture = nil then begin
-        Picture := TPicture.Create;
-        PicCreated := True;
-      end;
-     {$IFNDEF IP_LAZARUS}
-      Ext := LowerCase (Copy (ExtractFileExt (FN), 2, MaxInt));
-      if  (Ext = 'bmp') or (Ext = 'emf') or (Ext = 'wmf') or (Ext = 'gif') or (Ext = 'jpg')  then  begin
-     {$ENDIF}
+          Picture := TPicture.Create;
+          PicCreated := True;
+        end;
         Picture.LoadFromFile(FN);
-     {$IFNDEF IP_LAZARUS}
       end
       else  begin
         PicCreated := False;
Index: components/turbopower_ipro/examples/htmfileexp2.pas
===================================================================
--- components/turbopower_ipro/examples/htmfileexp2.pas	(revision 64095)
+++ components/turbopower_ipro/examples/htmfileexp2.pas	(working copy)
@@ -3,23 +3,14 @@
 {$mode objfpc}{$H+}
 
 {.$define UsePreview}
-{$IFDEF LCL}
-{$DEFINE IP_LAZARUS}
-{$ENDIF}
 
 interface
 
 uses
   Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Buttons,
-  {$IFDEF IP_LAZARUS}
-    {$ifdef UsePreview}
-    OsPrinters,
-    {$endif}
-  {$ELSE}
-    GIFImage,
-    JPeg,
-    ImageDLLLoader, PNGLoader, LinarBitmap, //from ImageFileLib of Michael Vinther: http://www.logicnet.dk/lib/
-  {$ENDIF}
+  {$ifdef UsePreview}
+  OsPrinters,
+  {$endif}
   IpHtml, ExtCtrls, StdCtrls, FileUtil;
 
 type
@@ -119,10 +110,6 @@
 var
   PicCreated: Boolean;
   FN, nURL: string;
- {$IFNDEF IP_LAZARUS}
-  Ext: string;
-  BitMap: Graphics.TBitMap;
- {$ENDIF}
 begin
   PicCreated := False;
   try
@@ -135,17 +122,12 @@
     FN := Concat (FN, nURL);
     if FileExistsUTF8(FN) then begin
       if Picture = nil then begin
-        Picture := TPicture.Create;
-        PicCreated := True;
-      end;
-     {$IFNDEF IP_LAZARUS}
-      Ext := LowerCase (Copy (ExtractFileExt (FN), 2, MaxInt));
-      if  (Ext = 'bmp') or (Ext = 'emf') or (Ext = 'wmf') or (Ext = 'gif') or (Ext = 'jpg')  then  begin
-     {$ENDIF}
+          Picture := TPicture.Create;
+          PicCreated := True;
+        end;
         Picture.LoadFromFile(FN);
-     {$IFNDEF IP_LAZARUS}
       end
-      else  begin
+      else begin
         PicCreated := False;
         BitMap := Graphics.TBitMap.Create;
         with TLinearBitmap.Create do
Index: components/turbopower_ipro/ipanim.pas
===================================================================
--- components/turbopower_ipro/ipanim.pas	(revision 64095)
+++ components/turbopower_ipro/ipanim.pas	(working copy)
@@ -37,14 +37,9 @@
 interface
 
 uses
-  {$IFDEF IP_LAZARUS}
   LCLType,
   GraphType,
   LCLIntf,
-  {$ELSE}
-  Windows,
-  Messages,
-  {$ENDIF}
   SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
   ExtCtrls, IpConst;
 
@@ -607,9 +602,7 @@
   UseTransparentCopy : Boolean;
 
 begin
-  {$IFDEF IP_LAZARUS}
   if (CurrentFrame=nil) then ;
-  {$ENDIF}
   //  Basic clear frame.  This should work for just about anything.
   DefaultDrawing := False;
   UseTransparentCopy := False;
@@ -756,9 +749,7 @@
   image.
 }
 begin
-  {$IFDEF IP_LAZARUS}
   if (Stream=nil) then ;
-  {$ENDIF}
   Width := 50;
   Height := 50;
   Bitmap.Canvas.Brush.Color := clWhite;
Index: components/turbopower_ipro/ipfilebroker.pas
===================================================================
--- components/turbopower_ipro/ipfilebroker.pas	(revision 64095)
+++ components/turbopower_ipro/ipfilebroker.pas	(working copy)
@@ -31,21 +31,13 @@
 
 interface
 
-{$IFDEF IP_LAZARUS}
 uses Classes, SysUtils, LResources, Graphics, LCLProc, LazFileUtils, LazUTF8,
      ipconst, iputils, iphtml, ipmsg;
-{$ELSE}
-uses
-  Windows, SysUtils, Graphics, Classes, Dialogs, ShellApi,
-  IpConst, IpUtils, {IpSock, IpCache,} IpHtml, {IpHttp,} IpMsg, IpStrms{, IpFtp};
-{$ENDIF}
 
 const
   IP_DEFAULT_SCHEME : string = 'HTTP';
 
-{$IFDEF IP_LAZARUS}
 function expandLocalHtmlFileName (URL : string) : string;
-{$ENDIF}
 
 type
 
@@ -124,9 +116,7 @@
   public
     constructor Create(AOwner : TComponent); override;
     function GetHtmlStream(const URL : string; PostData : TIpFormDataEntity) : TStream; override;
-    {$IFDEF IP_LAZARUS}
     function DoGetStream(const URL: string): TStream; override;
-    {$ENDIF}
     function CheckURL(const URL : string; var ContentType : string) : Boolean; override;
     procedure Leave(Html : TIpHtml); override;
     procedure Reference(const URL : string); override;
@@ -138,7 +128,6 @@
 
 implementation
 
-{$IFDEF IP_LAZARUS}
 function expandLocalHtmlFileName (URL : string) : string;
 begin
   if pos ('FILE://', ansiuppercase(URL)) = 0 then
@@ -146,7 +135,6 @@
   else
     result := URL;
 end;
-{$ENDIF}
 
 { TIpCustomHtmlDataProvider }
 constructor TIpCustomHtmlDataProvider.Create(AOwner : TComponent);
@@ -165,9 +153,7 @@
   New : string) : string;
 begin
   Result := IpUtils.BuildURL(Old, New);
-  {$IFDEF IP_LAZARUS}
   //DebugLn('TIpCustomHtmlDataProvider.BuildURL Old="',old,'" new="',New,'"');
-  {$ENDIF}
 end;
 
 function TIpCustomHtmlDataProvider.CanHandle(const URL : string) : Boolean;
@@ -299,15 +285,11 @@
   ContentType, FN : string;
 begin
   Initialize(FileAddrRec);
-  {$IFDEF IP_LAZARUS}
   //DebugLn('TIpFileDataProvider.CanHandle('+URL+')');
-  {$ENDIF}
   FN := BuildURL(FOldURL, URL);
   IpParseURL(FN, FileAddrRec);
   FN := NetToDosPath(FileAddrRec.Path);
-  {$IFDEF IP_LAZARUS}
   //DebugLn('TIpFileDataProvider.CanHandle FN="'+FN+'"');
-  {$ENDIF}
   ContentType := UpperCase(GetLocalContent(FN));
   Result := (FileExistsUTF8(FN)) and ((Pos('TEXT/HTML', ContentType) > 0) or
     (Pos('IMAGE/', ContentType) > 0));
@@ -343,7 +325,6 @@
   Finalize(FileAddrRec);
 end;
 
-{$IFDEF IP_LAZARUS}
 function TIpFileDataProvider.DoGetStream(const URL: string): TStream;
 var
   FileAddrRec : TIpAddrRec;
@@ -361,7 +342,6 @@
   end;
   Finalize(FileAddrRec);
 end;
-{$ENDIF}
 
 procedure TIpFileDataProvider.GetImage(Sender : TIpHtmlNode;
   const URL : string; var Picture : TPicture);
Index: components/turbopower_ipro/iphtml.pas
===================================================================
--- components/turbopower_ipro/iphtml.pas	(revision 64095)
+++ components/turbopower_ipro/iphtml.pas	(working copy)
@@ -50,42 +50,31 @@
 interface
 
 uses
-  {$IFDEF IP_LAZARUS}
   //MemCheck,
   Types, contnrs,
   LCLType, GraphType, LCLProc, LCLIntf, LResources, LMessages, LCLMemManager,
   Translations, FileUtil, LConvEncoding, LazUTF8,
   IpHtmlTabList,
+  Messages, SysUtils, Classes, Graphics,
+  {$IFDEF UseGifImageUnit} //TODO all of this units not exists
+    GifImage,
   {$ELSE}
-  Windows,
-  {$ENDIF}
-  Messages, SysUtils, Classes, Graphics,
-  {$IFDEF IP_LAZARUS}
-    {$IFDEF UseGifImageUnit}
-      GifImage,
-    {$ELSE}
-      IpAnim,
-      {$IFDEF AndersGIFImage }
-        IpAnAGif,
-      {$ENDIF}
-      {$IFDEF ImageLibGIFImage }
-        IpAnImgL,
-      {$ENDIF}
+    IpAnim,
+    {$IFDEF AndersGIFImage }
+      IpAnAGif,
     {$ENDIF}
-    {$IFDEF UsePNGGraphic}
-      IpPNGImg,
+    {$IFDEF ImageLibGIFImage }
+      IpAnImgL,
     {$ENDIF}
-  {$ELSE}
-  GIFImage, JPeg,
   {$ENDIF}
+  {$IFDEF UsePNGGraphic}
+    IpPNGImg,
+  {$ENDIF}
   TypInfo,
   GraphUtil, Controls, StdCtrls, ExtCtrls, Buttons, Forms, ClipBrd, Dialogs,
   IpConst, IpStrms, IpUtils, iphtmlprop, IpMsg;
 
 type
-  {$IFNDEF IP_LAZARUS}
-    PtrInt = Longint;
-  {$ENDIF}
   {Note: Some of the code below relies on the fact that
    the end tag (when present) immediately follows the start tag.}
 
@@ -105,7 +94,6 @@
   ZOOM_TO_FIT_HEIGHT = -2;
 
 type
-  {$IFDEF IP_LAZARUS}
   TIpEnumItemsMethod = TLCLEnumItemsMethod;
   TIpHtmlPoolManager = class(TLCLNonFreeMemManager)
   public
@@ -112,28 +100,9 @@
     constructor Create(TheItemSize, MaxItems : DWord);
     function NewItm : Pointer;
   end;
-  {$ELSE}
-  TIpEnumItemsMethod = procedure(Item: Pointer) of object;
-  TIpHtmlPoolManager = class
-  private
-    Root : Pointer;
-    {Top : Pointer;}
-    NextPage : Pointer;
-    Next : Pointer;
-    InternalSize : DWord;
-    Critical : TRtlCriticalSection;
-    procedure Grow;
-  public
-    constructor Create(ItemSize, MaxItems : DWord);
-    destructor Destroy; override;
-    function NewItm : Pointer;
-    procedure EnumerateItems(Method: TIpEnumItemsMethod);
-  end;
-  {$ENDIF}
 
   TIpHtml = class;
 
-  {$IFDEF IP_LAZARUS}
   TIpAbstractHtmlDataProvider = class;
 
   {.$DEFINE CSS_CASESENSITIVE_CLASSID}
@@ -140,7 +109,6 @@
   {$DEFINE CSS_INTERFACE}
 {$I ipcss.inc}
   {$UNDEF CSS_INTERFACE}
-  {$ENDIF}
 
   TIpHtmlInteger = class(TPersistent)
   { Integer property which can be scaled}
@@ -201,7 +169,7 @@
 
   TIpHtmlMultiLengthList = class(TPersistent)
   private
-    List: {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif};
+    List: TFPList;
     function GetEntries: Integer;
     function GetValues(Index: Integer): TIpHtmlMultiLength;
   public
@@ -303,9 +271,7 @@
     Props : TIpHtmlProps;
     Owner : TIpHtmlNode;
     LFHeight : Integer;  // Height of LineFeed elements
-    {$IFDEF IP_LAZARUS}
     IsSelected: boolean;
-    {$ENDIF}
   end;
   PIpHtmlElement = ^TIpHtmlElement;
 
@@ -320,9 +286,7 @@
     FParentNode : TIpHtmlNode;
     procedure ScreenLine(StartPoint, EndPoint: TPoint; const Width: Integer; const Color: TColor);
     procedure ScreenRect(R : TRect; const Color : TColor);
-    {$IFDEF IP_LAZARUS}
     procedure ScreenFrame(R : TRect; Raised: boolean);
-    {$ENDIF}
     procedure ScreenPolygon(Points : array of TPoint; const Color : TColor);
     function PagePtToScreen(const Pt: TPoint): TPoint;
     procedure Enqueue; virtual;
@@ -372,7 +336,7 @@
   TIpHtmlNodeMulti = class(TIpHtmlNode)
   private
     FProps: TIpHtmlProps;
-    FChildren : {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif};
+    FChildren : TFPList;
     function GetChildNode(Index: Integer): TIpHtmlNode;
     function GetChildCount: Integer;
   protected
@@ -396,24 +360,21 @@
 
   TIpHtmlNodeCore = class(TIpHtmlNodeMulti)
   private
-    {$IFDEF IP_LAZARUS}
     FInlineCSSProps: TCSSProps;  // props from the style attribute
     FCombinedCSSProps: TCSSProps; // props from all matching CSS selectors plus inline CSS combined
     FHoverPropsLookupDone: Boolean;
     FHoverPropsRef: TCSSProps; // props for :hover (this is only a cached reference, we don't own it)
-    {$ENDIF}
     FElementName: String;
     FStyle: string;
     FClassId: string;
     FTitle: string;
     FId: string;
-    FAreaList: {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif};
+    FAreaList: TFPList;
   protected
     procedure AddArea(const R: TRect);
     procedure BuildAreaList; virtual;
     procedure ClearAreaList; virtual;
     procedure ParseBaseProps(aOwner : TIpHtml);
-    {$IFDEF IP_LAZARUS}
     function SelectCSSFont(const aFont: string): string;
     procedure ApplyCSSProps(const ACSSProps: TCSSProps; const props: TIpHtmlProps);
     function ElementName: String;
@@ -421,15 +382,12 @@
     function GetFontSizeFromCSS(CurrentFontSize:Integer; aFontSize: string):Integer;
     procedure SetAlign(const Value: TIpHtmlAlign); virtual;
     procedure SetId(const Value: string); virtual;
-    {$ENDIF}
   public
     constructor Create(ParentNode : TIpHtmlNode);
-    {$IFDEF IP_LAZARUS}
     destructor Destroy; override;
     procedure LoadAndApplyCSSProps; virtual;
     procedure MakeVisible; override;
     property InlineCSS: TCSSProps read FInlineCSSProps write FInlineCSSProps;
-    {$ENDIF}
     property Align: TIpHtmlAlign read GetAlign write SetAlign;
     property ClassId : string read FClassId write FClassId;
     property Id : string read FId write SetId;
@@ -536,9 +494,7 @@
     procedure Layout(RenderProps: TIpHtmlProps; const TargetRect : TRect); virtual;
     procedure Render(RenderProps: TIpHtmlProps); virtual;
     function Level0: Boolean;
-    {$IFDEF IP_LAZARUS}
     procedure LoadAndApplyCSSProps; override;
-    {$ENDIF}
   public
     property Layouter : TIpHtmlBaseLayouter read FLayouter;
     property PageRect : TRect read GetPageRect;
@@ -630,9 +586,7 @@
   private
     FMedia: string;
     FTitle: string;
-    {$IFDEF IP_LAZARUS}
     FType: string;
-    {$ENDIF}
   protected
     procedure EnqueueElement(const Entry: PIpHtmlElement); override;
     function ElementQueueIsEmpty: Boolean; override;
@@ -642,9 +596,7 @@
   {$ENDIF}
     property Media : string read FMedia write FMedia;
     property Title : string read FTitle write FTitle;
-    {$IFDEF IP_LAZARUS}
     property Type_ : string read FType write FType;
-    {$ENDIF}
   end;
 
   TIpHtmlNodeSCRIPT = class(TIpHtmlNodeNv);
@@ -663,9 +615,7 @@
     constructor Create(ParentNode : TIpHtmlNode);
     destructor Destroy; override;
     procedure Enqueue; override;
-    {$IFDEF IP_LAZARUS}
     procedure LoadAndApplyCSSProps; override;
-    {$ENDIF}
     procedure SetProps(const RenderProps: TIpHtmlProps); override;
   {$IFDEF HTML_RTTI}
   published
@@ -686,9 +636,7 @@
     constructor Create(ParentNode : TIpHtmlNode);
     destructor Destroy; override;
     procedure Enqueue; override;
-    {$IFDEF IP_LAZARUS}
     procedure LoadAndApplyCSSProps; override;
-    {$ENDIF}
     procedure SetProps(const RenderProps: TIpHtmlProps); override;
   (*
   {$IFDEF HTML_RTTI}
@@ -843,10 +791,8 @@
     constructor Create(ParentNode : TIpHtmlNode);
     destructor Destroy; override;
     procedure ImageChange(NewPicture : TPicture); override;
-    {$IFDEF IP_LAZARUS}
     procedure LoadAndApplyCSSProps; override;
     procedure Render(RenderProps: TIpHtmlProps); override;
-    {$ENDIF}
   {$IFDEF HTML_RTTI}
   published
   {$ENDIF}
@@ -990,9 +936,7 @@
     constructor Create(ParentNode : TIpHtmlNode);
     destructor Destroy; override;
     procedure Enqueue; override;
-    {$IFDEF IP_LAZARUS}
     procedure LoadAndApplyCSSProps; override;
-    {$ENDIF}
     procedure SetProps(const RenderProps: TIpHtmlProps); override;
     (*
   {$IFDEF HTML_RTTI}
@@ -1013,9 +957,7 @@
     procedure SetAlign(const Value: TIpHtmlAlign); override;
   public
     constructor Create(ParentNode: TIpHtmlNode);
-    {$IFDEF IP_LAZARUS}
     procedure LoadAndApplyCSSProps; override;
-    {$ENDIF}
     (*
   {$IFDEF HTML_RTTI}
   published
@@ -1161,7 +1103,7 @@
   protected
     FHasRef : Boolean;
     FHot: Boolean;
-    MapAreaList : {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif};
+    MapAreaList : TFPList;
     procedure ClearAreaList; override;
     function PtInRects(const P : TPoint) : Boolean;
     function RelMapPoint(const P: TPoint): TPoint;
@@ -1204,9 +1146,7 @@
     FUseMap: string;
     FVSpace: Integer;
     FWidth: TIpHtmlLength;
-    {$IFDEF IP_LAZARUS}
     function GetBorder: Integer;
-    {$ENDIF}
     procedure SetBorder(const Value: Integer);
     procedure SetUseMap(const Value: string);
     procedure SetHSpace(const Value: Integer);
@@ -1235,11 +1175,7 @@
   published
   {$ENDIF}
     property Alt : string read FAlt write FAlt;
-    {$IFDEF IP_LAZARUS}
     property Border : Integer read GetBorder write SetBorder;
-    {$ELSE}
-    property Border : Integer read FBorder write SetBorder;
-    {$ENDIF}
     property Height : TIpHtmlPixels read FHeight write FHeight;
     property HSpace : Integer read FHSpace write SetHSpace;
     property IsMap : Boolean read FIsMap write FIsMap;
@@ -1388,9 +1324,7 @@
     function PtInRects(const P : TPoint) : Boolean;
   public
     destructor Destroy; override;
-    {$IF DEFINED(CBuilder) OR DEFINED(IP_LAZARUS)}
     property Rect : TRect read FRect;
-    {$ENDIF}
 
   {$IFDEF HTML_RTTI}
   published
@@ -1399,9 +1333,6 @@
     property Coords : string read FCoords write FCoords;
     property HRef : string read FHRef write FHRef;
     property NoHRef : Boolean read FNoHRef write FNoHRef;
-    {$IF NOT (DEFINED(CBuilder) OR DEFINED(IP_LAZARUS))}
-    property Rect : TRect read FRect;
-    {$ENDIF}
     property Shape : TIpHtmlMapShape read FShape write FShape;
     property TabIndex : Integer read FTabIndex write FTabIndex;
     property Target: string read FTarget write FTarget;
@@ -1428,9 +1359,7 @@
     FHRef: string;
     FRev: string;
     FRel: string;
-    {$IFDEF IP_LAZARUS}
     FType: string;
-    {$ENDIF}
   public
   {$IFDEF HTML_RTTI}
   published
@@ -1438,9 +1367,7 @@
     property HRef : string read FHRef write FHRef;
     property Rel : string read FRel write FRel;
     property Rev : string read FRev write FRev;
-    {$IFDEF IP_LAZARUS}
     property Type_ : string read FType write FType;
-    {$ENDIF}
   end;
 
   TIpHtmlVAlignment2 = (hva2Top, hva2Bottom, hva2Left, hva2Right);
@@ -1526,9 +1453,6 @@
   protected
     FLayouter : TIpHtmlBaseTableLayouter;
     FWidth: TIpHtmlLength;
-    {$IFnDEF IP_LAZARUS}
-    CS2 : Integer; {cell space div 2}
-    {$ENDIF}
     SizeWidth : TIpHtmlPixels; {last computed width of table}
     procedure SetRect(TargetRect: TRect); override;
     procedure InvalidateSize; override;
@@ -1546,9 +1470,7 @@
     procedure CalcMinMaxWidth(var Min, Max: Integer); override;
     procedure Enqueue; override;
     function GetDim(ParentWidth: Integer): TSize; override;
-    {$IFDEF IP_LAZARUS}
     procedure LoadAndApplyCSSProps; override;
-    {$ENDIF}
   {$IFDEF HTML_RTTI}
   published
   {$ENDIF}
@@ -1575,9 +1497,7 @@
     function GetAlign: TIpHtmlAlign; override;
     procedure SetAlign(const Value: TIpHtmlAlign); override;
   public
-    {$IFDEF IP_LAZARUS}
     procedure LoadAndApplyCSSProps; override;
-    {$ENDIF}
   end;
 
   TIpHtmlNodeTABLEHEADFOOTBODYClass = class of TIpHtmlNodeTHeadFootBody;
@@ -1628,9 +1548,7 @@
     procedure SetAlign(const Value: TIpHtmlAlign); override;
   public
     destructor Destroy; override;
-    {$IFDEF IP_LAZARUS}
     procedure LoadAndApplyCSSProps; override;
-    {$ENDIF}
   {$IFDEF HTML_RTTI}
   published
   {$ENDIF}
@@ -1651,9 +1569,7 @@
     procedure SetAlign(const Value: TIpHtmlAlign); override;
   public
     destructor Destroy; override;
-    {$IFDEF IP_LAZARUS}
     procedure LoadAndApplyCSSProps; override;
-    {$ENDIF}
   {$IFDEF HTML_RTTI}
   published
   {$ENDIF}
@@ -1679,9 +1595,7 @@
     procedure SetAlign(const Value: TIpHtmlAlign); override;
   public
     constructor Create(ParentNode : TIpHtmlNode);
-    {$IFDEF IP_LAZARUS}
     procedure LoadAndApplyCSSProps; override;
-    {$ENDIF}
     procedure SetProps(const RenderProps: TIpHtmlProps); override;
   {$IFDEF HTML_RTTI}
   published
@@ -1717,9 +1631,7 @@
     constructor Create(ParentNode : TIpHtmlNode);
     destructor Destroy; override;
     procedure Layout(RenderProps: TIpHtmlProps; const TargetRect : TRect); override;
-    {$IFDEF IP_LAZARUS}
     procedure LoadAndApplyCSSProps; override;
-    {$ENDIF}
     procedure Render(RenderProps: TIpHtmlProps); override;
     procedure CalcMinMaxPropWidth(RenderProps: TIpHtmlProps; var Min, Max: Integer); override;
   public
@@ -1966,7 +1878,7 @@
     procedure(Sender: TIpHtmlNode; const URL: string; var Picture: TPicture) of object;
 
   TIpHtmlScrollEvent =
-    procedure(Sender: TIpHtml; const R: TRect{$IFDEF IP_LAZARUS}; ShowAtTop: Boolean{$ENDIF}) of object;
+    procedure(Sender: TIpHtml; const R: TRect; ShowAtTop: Boolean) of object;
 
   TGetEvent =
     procedure(Sender: TIpHtml; const URL: string) of object;
@@ -2032,12 +1944,10 @@
     FMarginHeight: Integer;
     FMarginWidth: Integer;
     FRenderDev: TIpHtmlRenderDevice;
-    {$IFDEF IP_LAZARUS}
     FCSS: TCSSGlobalProps;
     FDocCharset: string;
     FHasBOM: boolean;
     FTabList: TIpHtmlTabList;
-    {$ENDIF}
   protected
     CharStream : TStream;
     CurToken : TIpHtmlToken;
@@ -2059,17 +1969,12 @@
     DefaultProps : TIpHtmlProps;
     FBody : TIpHtmlNodeBODY;
     FTitleNode : TIpHtmlNodeTITLE;
-   {$IFDEF IP_LAZARUS}
-      FDataProvider: TIpAbstractHtmlDataProvider;
-      {$IFDEF UseGifImageUnit}
-      GifImages : {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif};
-      {$ELSE}
-      AnimationFrames : {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif};
-      {$ENDIF}
-   {$ELSE}
-    GifImages : {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif};
-    OtherImages: {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif};
-   {$ENDIF}
+    FDataProvider: TIpAbstractHtmlDataProvider;
+    {$IFDEF UseGifImageUnit}
+    GifImages : TFPList;
+    {$ELSE}
+    AnimationFrames : TFPList;
+    {$ENDIF}
     FLIndent, FLOutdent : PIpHtmlElement;
     SoftLF,
     HardLF, HardLFClearLeft, SoftHyphen,
@@ -2076,13 +1981,13 @@
     HardLFClearRight, HardLFClearBoth : PIpHtmlElement;
     NameList : TStringList;
     IdList: TStringList;
-    GifQueue : {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif};
+    GifQueue : TFPList;
     InPre : Integer;
     InBlock : Integer;
-    MapList : {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif};
-    AreaList : {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif};
+    MapList : TFPList;
+    AreaList : TFPList;
     DefaultImage : TPicture;
-    MapImgList : {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif};
+    MapImgList : TFPList;
     GlobalPos, LineNumber, LineOffset : Integer;
     PaintBufferBitmap : TBitmap;
     PaintBuffer : TCanvas;
@@ -2090,11 +1995,11 @@
     TBW : Integer;
     Destroying : Boolean;
     FAllSelected : Boolean;
-    RectList : {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif};
+    RectList : TFPList;
     FStartSel, FEndSel : TPoint;
     ElementPool : TIpHtmlPoolManager;
-    AnchorList : {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif};
-    FControlList : {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif};
+    AnchorList : TFPList;
+    FControlList : TFPList;
     FCurURL : string;
     DoneLoading : Boolean;
     ListLevel : Integer;
@@ -2221,9 +2126,7 @@
     procedure ParseLink(Parent : TIpHtmlNode);
     procedure ParseMeta(Parent : TIpHtmlNode);
     procedure ParseBody(Parent : TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
-    {$IFDEF IP_LAZARUS}
     procedure ParseStyleSheet(Parent: TIpHtmlNode; HRef: String);
-    {$ENDIF}
     procedure ParseBodyText(Parent: TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
     procedure ParseBlock(Parent: TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
     procedure ParseInline(Parent: TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
@@ -2239,7 +2142,7 @@
     procedure InvalidateRect(R : TRect);
     procedure SetDefaultProps;
     function BuildPath(const Ext: string): string;
-    procedure MakeVisible(const R: TRect{$IFDEF IP_LAZARUS}; ShowAtTop: Boolean = True{$ENDIF});
+    procedure MakeVisible(const R: TRect; ShowAtTop: Boolean = True);
     procedure InvalidateSize;
     procedure AddGifQueue(Graphic: TGraphic; const R: TRect);
     procedure ClearGifQueue;
@@ -2264,9 +2167,7 @@
     procedure Home;
     function GetPageRect(TargetCanvas: TCanvas; Width, Height : Integer): TRect; // computes the layout for this Canvas
     procedure MouseMove(Pt : TPoint);
-    {$IFDEF IP_LAZARUS}
     procedure DeselectAllItems(Item: Pointer);
-    {$ENDIF}
     procedure SetSelection(StartPoint, EndPoint: TPoint);
     function HaveSelection: Boolean;
     procedure CopyToClipboard;
@@ -2310,10 +2211,8 @@
     {$IFOPT C+}
     procedure CheckImage(Picture: TPicture);
     {$ENDIF}
-    {$IFDEF IP_LAZARUS}
     function GetSelectionBlocks(out StartSelIndex,EndSelIndex: Integer): boolean;
     property CSS: TCSSGlobalProps read FCSS write FCSS;
-    {$ENDIF}
     function getControlCount:integer;
     function getControl(i:integer):TIpHtmlNode;
   public
@@ -2341,10 +2240,8 @@
     property FontQuality: TFontQuality read FFontQuality write FFontQuality;
     property HtmlNode : TIpHtmlNodeHtml read FHtml;
     property CurUrl: string read FCurUrl;
-    {$IFDEF IP_LAZARUS}
     property TabList: TIpHtmlTabList read FTabList;
     property DocCharset: String read FDocCharset;  // Encoding of html text
-    {$ENDIF}
     property Target: TCanvas read FTarget;
     property TitleNode : TIpHtmlNodeTITLE read FTitleNode;
     property PageHeight : Integer read FPageHeight;
@@ -2360,26 +2257,6 @@
     property RenderDevice: TIpHtmlRenderDevice read FRenderDev;
   end;
 
-  {$IFNDEF IP_LAZARUS}
-  TIpHtmlFocusRect = class(TCustomControl)
-  private
-    FAnchor : TIpHtmlNodeA;
-  protected
-    {HaveFocus : Boolean;}
-    procedure CreateParams(var Params: TCreateParams); override;
-    {$IFDEF IP_LAZARUS}
-    procedure WMSetFocus(var Message: TLMSetFocus); message LM_SETFOCUS;
-    procedure WMKillFocus(var Message: TLMKillFocus); message LM_KILLFOCUS;
-    {$ELSE}
-    procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS;
-    procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS;
-    {$ENDIF}
-  public
-    constructor Create(AOwner: TComponent); override;
-    property Anchor : TIpHtmlNodeA read FAnchor write FAnchor;
-  end;
-  {$ENDIF}
-
   TIpHtmlInternalPanel = class;
 
   TIpHtmlScrollBar = class
@@ -2401,7 +2278,7 @@
     function ControlSize(ControlSB, AssumeSB: Boolean): Integer;
     procedure DoSetRange(Value: Integer);
     function NeedsScrollBarVisible: Boolean;
-    procedure ScrollMessage(var Msg: {$IFDEF IP_LAZARUS}TLMScroll{$ELSE}TWMScroll{$ENDIF});
+    procedure ScrollMessage(var Msg: TLMScroll);
     procedure Update(ControlSB, AssumeSB: Boolean);
   public
     constructor Create(AControl: TIpHtmlInternalPanel; AKind: TScrollBarKind);
@@ -2419,8 +2296,7 @@
 
   { TIpHtmlInternalPanel }
 
-  TIpHtmlInternalPanel = class(
-    {$IFDEF IP_LAZARUS}TCustomControl{$ELSE}TCustomPanel{$ENDIF})
+  TIpHtmlInternalPanel = class(TCustomControl)
   private
     FHyper : TIpHtml;
     FPageRect : TRect;
@@ -2456,16 +2332,9 @@
     procedure ShowHintNow(const NewHint: string);
     procedure CreateParams(var Params: TCreateParams); override;
     procedure Paint; override;
-    {$IFDEF IP_LAZARUS}
     procedure WMHScroll(var Message: TLMHScroll); message LM_HSCROLL;
     procedure WMVScroll(var Message: TLMVScroll); message LM_VSCROLL;
-    {$ELSE}
-    procedure WMHScroll(var Message: TWMHScroll); message WM_HSCROLL;
-    procedure WMVScroll(var Message: TWMVScroll); message WM_VSCROLL;
-    {$ENDIF}
-    {$IFDEF IP_LAZARUS}
     procedure AsyncHotInvoke(data: ptrint);
-    {$ENDIF}
 
     procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
     procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
@@ -2472,10 +2341,8 @@
       X, Y: Integer); override;
     procedure MouseUp(Button: TMouseButton; Shift: TShiftState;
       X, Y: Integer); override;
-    {$IFDEF IP_LAZARUS}
     procedure MouseLeave; override;
     procedure KeyDown(var Key: Word; Shift: TShiftState); override;
-    {$ENDIF}
     function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override;
     procedure DoHotChange;
     procedure DoCurElementChange;
@@ -2515,7 +2382,7 @@
     property OnHotClick : TNotifyEvent read FOnHotClick write FOnHotClick;
     property OnClick : TNotifyEvent read FOnClick write FOnClick;
     destructor Destroy; override;
-    procedure ScrollRequest(Sender: TIpHtml; const R: TRect{$IFDEF IP_LAZARUS}; ShowAtTop: Boolean = True{$ENDIF});
+    procedure ScrollRequest(Sender: TIpHtml; const R: TRect; ShowAtTop: Boolean = True);
     {$IFDEF Html_Print}
     function GetPrintPageCount: Integer;
     procedure PrintPages(FromPage, ToPage: Integer);
@@ -2522,7 +2389,7 @@
     procedure PrintPreview;
     function SelectPrinterDlg: boolean;
     {$ENDIF}
-    procedure EraseBackground(DC: HDC); {$IFDEF IP_LAZARUS} override; {$ENDIF}
+    procedure EraseBackground(DC: HDC); override;
   end;
 
   { TIpAbstractHtmlDataProvider }
@@ -2531,9 +2398,7 @@
   protected
     function DoGetHtmlStream(const URL: string;
       PostData: TIpFormDataEntity) : TStream; virtual; abstract;
-    {$IFDEF IP_LAZARUS}
     function DoGetStream(const URL: string): TStream; virtual; abstract;
-    {$ENDIF}
     {-provider assumes ownership of returned TStream and will free it when
       done using it.}
     function DoCheckURL(const URL: string;
@@ -2543,7 +2408,7 @@
     procedure DoGetImage(Sender: TIpHtmlNode; const URL: string;
       var Picture: TPicture); virtual; abstract;
     function CanHandle(const URL: string): Boolean; virtual; abstract;
-    // renamed New,Old for IP_LAZARUS to NewURL, OldURL
+    // renamed New,Old to NewURL, OldURL
     function BuildURL(const OldURL, NewURL: string): string; virtual; abstract;
   end;
 
@@ -2802,7 +2667,7 @@
     {$ENDIF}
     constructor Create(AOwner: TComponent); override;
     destructor Destroy; override;
-    procedure EraseBackground(DC: HDC); {$IFDEF IP_LAZARUS} override; {$ENDIF}
+    procedure EraseBackground(DC: HDC); override;
 
     procedure CopyToClipboard;
     procedure EnumDocuments(Enumerator: TIpHtmlEnumerator);
@@ -2815,9 +2680,6 @@
     property HotNode : TIpHtmlNode read FHotNode;
     function IsURLHtml(const URL: string): Boolean;
     procedure MakeAnchorVisible(const Name: string);
-    {$IF defined(VERSION4) and not defined(IP_LAZARUS)}
-    procedure MouseWheelHandler(Var Message: TMessage); Override;
-    {$ENDIF}
     procedure OpenURL(const URL: string);
     function Scroll(Action: TIpScrollAction; ADistance: Integer = 100): Boolean;
     procedure SelectAll;
@@ -2910,9 +2772,6 @@
     property Visible;
     property VLinkColor;
     property WantTabs;
-    {$IF defined(VERSION4) and not defined(IP_LAZARUS)}
-    property OnCanResize;
-    {$ENDIF}
     property OnClick;
     {$IFDEF VERSION4}
     property OnConstrainedResize;
@@ -3020,11 +2879,8 @@
 
 {$R *.res}
 
-{$IFDEF IP_LAZARUS}
 {$I ipcss.inc}
 
-{$ENDIF}
-
 var
   FlatSB_GetScrollInfo: function(hWnd: HWND; BarFlag: Integer;
     var ScrollInfo: TScrollInfo): BOOL; stdcall;
@@ -3267,9 +3123,7 @@
 procedure THtmlRadioButton.CreateWnd;
 begin
   inherited CreateWnd;
-  {$IFNDEF IP_LAZARUS}
-  SendMessage(Handle, BM_SETCHECK, Integer(FChecked), 0);
-  {$ENDIF}
+  //SendMessage(Handle, BM_SETCHECK, Integer(FChecked), 0);
 end;
 
 function THtmlRadioButton.GetChecked: Boolean;
@@ -3278,12 +3132,10 @@
 end;
 
 procedure THtmlRadioButton.SetChecked(Value: Boolean);
-{$IFDEF IP_LAZARUS}
 begin
   inherited SetChecked(Value);
 end;
-{$ELSE IP_LAZARUS}
-
+(*
   procedure TurnSiblingsOff;
   var
     I: Integer;
@@ -3315,7 +3167,7 @@
     end;
   end;
 end;
-{$ENDIF IP_LAZARUS}
+*)
 
 {$ENDIF}
 
@@ -3349,11 +3201,7 @@
   ScreenDC := GetDC(0);
   try
     Aspect :=
-      {$IFDEF IP_LAZARUS}
       Printer.XDPI
-      {$ELSE}
-      GetDeviceCaps(PrinterDC, LOGPIXELSX)
-      {$ENDIF}
       / GetDeviceCaps(ScreenDC, LOGPIXELSX);
   finally
     ReleaseDC(0, ScreenDC);
@@ -3361,7 +3209,6 @@
 end;
 {$ENDIF}
 
-{$IFDEF IP_LAZARUS}
 constructor TIpHtmlPoolManager.Create(TheItemSize, MaxItems : DWord);
 begin
   inherited Create(TheItemSize);
@@ -3373,7 +3220,7 @@
   Result:=NewItem;
 end;
 
-{$ELSE IP_LAZARUS}
+(*
 
 constructor TIpHtmlPoolManager.Create(ItemSize, MaxItems : DWord);
 begin
@@ -3436,14 +3283,9 @@
     Inc(DWord(P), InternalSize);
   end;
 end;
-{$ENDIF IP_LAZARUS}
+*)
 
-
-{$IFNDEF IP_LAZARUS}
-// workaround for fpc bug: local string constants
-function ParseConstant(const S: string): AnsiChar;
-{$ENDIF}
-Const
+const
   CodeCount = 126;
   {Sorted by Size where size is Length(Name).
   Make sure you respect this when adding new items}
@@ -3580,9 +3422,7 @@
     (Size: 6; Name: 'yacute'; Value: #253; ValueUtf8: #$C3#$BD),
     (Size: 6; Name: 'xxxxxx'; Value: NAnchorChar; ValueUtf8: NAnchorChar)
     );
-{$IFDEF IP_LAZARUS}
 function ParseConstant(const S: string; onUtf8: boolean=false): string;
-{$ENDIF}
 var
   Error: Integer;
   Index1: Integer;
@@ -3642,9 +3482,7 @@
   i, j : Integer;
   Co : string;
   Ch : AnsiChar;
-{$IFDEF IP_LAZARUS}
   St : string;
-{$ENDIF}
 begin
   i := length(S);
   while i > 0 do begin
@@ -3662,7 +3500,6 @@
           end;
         end;
         Delete(S, i, j - i + 1);
-      {$IFDEF IP_LAZARUS}
         if SystemCharSetIsUTF8 then begin
           St := ParseConstant(Co, true);
           Insert(St, S, i)
@@ -3670,10 +3507,6 @@
           Ch := ParseConstant(Co)[1];
           Insert(Ch, S, i);
         end;
-      {$ELSE}
-        Ch := ParseConstant(Co)[1];
-        Insert(Ch, S, i);
-      {$ENDIF}
       end;
     end;
     Dec(i);
@@ -3747,10 +3580,6 @@
   LF = #10;
   CR = #13;
 
-{$IFNDEF IP_LAZARUS}
-//{$R IpHtml.res}
-{$EndIf}
-
 function StdIndent: Integer;
 begin
   if ScaleBitmaps and (Aspect > 0) then
@@ -3988,7 +3817,7 @@
 constructor TIpHtmlMultiLengthList.Create;
 begin
   inherited Create;
-  List := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
+  List := TFPList.Create;
 end;
 
 destructor TIpHtmlMultiLengthList.Destroy;
@@ -4188,15 +4017,13 @@
 begin
   if PageRectToScreen(R, R) then begin
     with Owner.Target do begin
-      {$IFDEF IP_LAZARUS}
       Brush.Style := bsSolid;
-      {$ENDIF}
       Brush.Color := Color;
       FrameRect(R);
     end;
   end;
 end;
-{$IFDEF IP_LAZARUS}
+
 procedure TIpHtmlNode.ScreenFrame(R : TRect; Raised: boolean);
 var
   SaveWidth: Integer;
@@ -4227,7 +4054,7 @@
     Pen.Width := SaveWidth;
   end;
 end;
-{$ENDIF}
+
 procedure TIpHtmlNode.ScreenPolygon(Points : array of TPoint; const Color : TColor);
 var
   Pt : TPoint;
@@ -4420,7 +4247,7 @@
   begin
     Result := '[';
     W := GetOrdProp(AObject, PI);
-    TypeInfo := GetTypeData(GetPropType)^.CompType{$IFNDEF IP_LAZARUS}^{$ENDIF};
+    TypeInfo := GetTypeData(GetPropType)^.CompType;
     for I := 0 to Pred(sizeof(Cardinal) * 8) do
       if I in TCardinalSet(W) then begin
         if Length(Result) <> 1 then
@@ -4640,7 +4467,7 @@
 constructor TIpHtmlNodeMulti.Create(ParentNode : TIpHtmlNode);
 begin
   inherited Create(ParentNode);
-  FChildren := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
+  FChildren := TFPList.Create;
   //Maybe this will create some unespected behavior (Owner=nil)
   if Owner <> nil then
     FProps := TIpHtmlProps.Create(FOwner.PropACache, FOwner.PropBCache);
@@ -4688,10 +4515,9 @@
 begin
 //DebugLn(ClassName, ':', FParentNode.className, ':', IntToStr(RenderProps.BgColor));
   Props.Assign(RenderProps);
-  {$IFDEF IP_LAZARUS}
   if Self.InheritsFrom(TIpHtmlNodeCore)then
     TIpHtmlNodeCore(Self).LoadAndApplyCSSProps;
-  {$ENDIF}
+
 //DebugLn(ClassName, ':', FParentNode.className, ':', IntToStr(RenderProps.BgColor));
 
   IsMouseOver := Self = Owner.FHotNode;
@@ -4799,7 +4625,6 @@
     Owner.Target.Brush.Color := Owner.BgColor;
     Owner.Target.FillRect(Owner.ClientRect);
   end else begin
-    {$IFDEF IP_LAZARUS}
     if BackGround = '' then begin
       if BGColor <> clNone then begin
         Owner.Target.Brush.Color := BGColor;
@@ -4809,16 +4634,6 @@
         Owner.Target.FillRect(Owner.ClientRect);
       end;
     end;
-    {$ELSE}
-    if BackGround = '' then begin
-      Owner.Target.Brush.Color := clWhite;
-      Owner.Target.FillRect(Owner.ClientRect);
-    end;
-    if BGColor <> clNone then begin
-      Owner.Target.Brush.Color := BGColor;
-      Owner.Target.FillRect(Owner.ClientRect);
-    end;
-    {$ENDIF}
     if Background <> '' then begin
       if BgPicture = nil then
         Owner.DoGetImage(Self, Owner.BuildPath(Background), BgPicture);
@@ -4846,13 +4661,10 @@
     end;
   end;
   inherited Render(RenderProps);
-  {$IFDEF IP_LAZARUS}
   // restore style
   Owner.Target.Brush.Style:=bsSolid;
-  {$ENDIF}
 end;
 
-{$IFDEF IP_LAZARUS}
 procedure TIpHtmlNodeBODY.LoadAndApplyCSSProps;
 var
   LinkProps: TCSSProps;
@@ -4870,7 +4682,6 @@
     ALink := LinkProps.Color;
   Props.DelayCache := True;
 end;
-{$ENDIF}
 
 destructor TIpHtmlNodeBODY.Destroy;
 begin
@@ -4938,10 +4749,8 @@
 var
   P : Integer;
 begin
-  {$IFDEF IP_LAZARUS}
   if FDocCharset<>'' then
     Value := ConvertEncoding(Value, FDocCharset, 'UTF-8');
-  {$ENDIF}
   Value:= EscapeToAnsi(Value);
   P := CharPos(ShyChar, Value);
   if P = 0 then
@@ -4970,21 +4779,15 @@
 var
   i : Integer;
 begin
-  {$IFDEF IP_LAZARUS}
-    {$IFDEF UseGifImageUnit}
-    for i := 0 to Pred(GifImages.Count) do
-      if TIpHtmlNodeIMG(GifImages[i]).FPicture <> nil then
-        TGifImage(TIpHtmlNodeIMG(GifImages[i]).FPicture.Graphic).PaintStop;
-    {$ELSE}
-    for i := 0 to Pred(AnimationFrames.Count) do
-      if TIpHtmlNodeIMG(AnimationFrames[i]).FPicture <> nil then
-        TIpAnimatedGraphic(TIpHtmlNodeIMG(AnimationFrames[i]).FPicture.Graphic).
-          AggressiveDrawing := False;
-    {$ENDIF}
-  {$ELSE}
+  {$IFDEF UseGifImageUnit}
   for i := 0 to Pred(GifImages.Count) do
     if TIpHtmlNodeIMG(GifImages[i]).FPicture <> nil then
       TGifImage(TIpHtmlNodeIMG(GifImages[i]).FPicture.Graphic).PaintStop;
+  {$ELSE}
+  for i := 0 to Pred(AnimationFrames.Count) do
+    if TIpHtmlNodeIMG(AnimationFrames[i]).FPicture <> nil then
+      TIpAnimatedGraphic(TIpHtmlNodeIMG(AnimationFrames[i]).FPicture.Graphic).
+        AggressiveDrawing := False;
   {$ENDIF}
   ClearGifQueue;
   FHotNode := nil;
@@ -4995,9 +4798,7 @@
 
 function TIpHtml.NextChar : AnsiChar;
 begin
-  {$IFDEF IP_LAZARUS}
   Result:=#0;
-  {$ENDIF}
   if CharStream.Read(Result, 1) = 0 then
     Result := #0
   else begin
@@ -5645,17 +5446,13 @@
   with CurStyle do begin
     Media := FindAttribute(htmlAttrMEDIA);
     Title := FindAttribute(htmlAttrTITLE);
-    {$IFDEF IP_LAZARUS}
     Type_ := FindAttribute(htmlAttrTYPE);
-    {$ENDIF}
   end;
   NextToken;
   if CurToken <> IpHtmlTagSTYLEend then begin
-    {$IFDEF IP_LAZARUS}
     if (CurToken=IpHtmlTagText) and
       (AnsiCompareText(CurStyle.Type_ , 'text/css')=0) then
       ParseStyleSheet(CurStyle, GetTokenString);
-    {$ENDIF}
     ParseText([IpHtmlTagSTYLEend], CurStyle);
   end;
   if CurToken = IpHtmlTagSTYLEend then
@@ -5707,16 +5504,13 @@
 end;
 
 procedure TIpHtml.ParseMeta;
-{$IFDEF IP_LAZARUS}
 var
   i,j: Integer;
-{$ENDIF}
 begin
   with TIpHtmlNodeMETA.Create(Parent) do begin
     HttpEquiv := FindAttribute(htmlAttrHTTP_EQUIV);
     Name := FindAttribute(htmlAttrNAME);
     Content := FindAttribute(htmlAttrCONTENT);
-    {$IFDEF IP_LAZARUS}
     if not FHasBOM then begin
       if SameText(HttpEquiv, 'content-type') then begin
         j := pos('charset=', lowercase(Content));
@@ -5736,7 +5530,6 @@
       if pos('windows', Lowercase(fDocCharset)) = 1 then
         fDocCharset := NormalizeEncoding(StringReplace(fDocCharset, 'windows', 'cp', [rfIgnoreCase]));
     end;
-    {$ENDIF}
     Scheme := FindAttribute(htmlAttrSCHEME);
   end;
   NextToken;
@@ -5749,11 +5542,9 @@
     Rel := FindAttribute(htmlAttrREL);
     Rev := FindAttribute(htmlAttrREV);
     Title := FindAttribute(htmlAttrTITLE);
-    {$IFDEF IP_LAZARUS}
     Type_ := LowerCase(FindAttribute(htmlAttrTYPE));
     if (LowerCase(Rel) = 'stylesheet') and (Type_ = 'text/css') then
       ParseStyleSheet(Parent, Href);
-    {$ENDIF}
     ParseBaseProps(Self);
   end;
   NextToken;
@@ -5787,10 +5578,8 @@
 end;
 
 procedure TIpHtml.ParseHead(Parent : TIpHtmlNode);
-{$IFDEF IP_LAZARUS}
 var
   Lst: TStringList;
-{$ENDIF}
 begin
   {lead token is optional}
   if CurToken = IpHtmlTagHEAD then begin
@@ -5799,13 +5588,11 @@
     if CurToken = IpHtmlTagHEADend then
       NextToken;
   end;
-  {$IFDEF IP_LAZARUS}
   Lst := TStringList.Create;
   GetSupportedEncodings(Lst);
   if Lst.IndexOf(FDocCharset) = 0 then  // clear for UTF-8 to avoid conversion
     FDocCharset := '';
   Lst.Free;
-  {$ENDIF}
 end;
 
 procedure TIpHtml.ParseFont(Parent : TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
@@ -6029,9 +5816,7 @@
   CurFieldset : TIpHtmlNodeFIELDSET;
   CurLegend : TIpHtmlNodeLEGEND;
   CurOption : TIpHtmlNodeOPTION;
-  {$IFDEF IP_LAZARUS}
   CurInput : TIpHtmlNodeINPUT;
-  {$ENDIF}
 begin
   while not (CurToken in EndTokens) do begin
     case CurToken of
@@ -6038,9 +5823,7 @@
     IpHtmlTagINPUT :
       begin
         CurInput := TIpHtmlNodeINPUT.Create(Parent);
-        {$IFDEF IP_LAZARUS}
         FTabList.Add(CurInput);
-        {$ENDIF}
         with CurInput do begin
           ParseBaseProps(Self);
           InputType := ParseInputType;
@@ -6061,9 +5844,7 @@
     IpHtmlTagBUTTON :
       begin
         CurButton := TIpHtmlNodeBUTTON.Create(Parent);
-        {$IFDEF IP_LAZARUS}
         FTabList.Add(CurButton);
-        {$ENDIF}
         with CurButton do begin
           ParseBaseProps(Self);
           ButtonType := ParseButtonType;
@@ -6125,9 +5906,7 @@
               NextNonBlankToken;
               while CurToken = IpHtmlTagOPTION do begin
                 CurOption := TIpHtmlNodeOPTION.Create(CurOptGroup);
-                {$IFDEF IP_LAZARUS}
                 FTabList.Add(CurOption);
-                {$ENDIF}
                 with CurOption do begin
                   ParseBaseProps(Self);
                   Selected := ParseBoolean(htmlAttrSELECTED);
@@ -6164,9 +5943,7 @@
     IpHtmlTagTEXTAREA :
       begin
         CurTextArea := TIpHtmlNodeTEXTAREA.Create(Parent);
-        {$IFDEF IP_LAZARUS}
         FTabList.Add(CurTextArea);
-        {$ENDIF}
         with CurTextArea do begin
           Name := FindAttribute(htmlAttrNAME);
           Rows := ParseInteger(htmlAttrROWS, 20);
@@ -6543,9 +6320,7 @@
   CurAnchor : TIpHtmlNodeA;
 begin
   CurAnchor := TIpHtmlNodeA.Create(Parent);
-  {$IFDEF IP_LAZARUS}
   FTabList.Add(CurAnchor);
-  {$ENDIF}
   with CurAnchor do begin
     Name := FindAttribute(htmlAttrNAME);
     HRef := FindAttribute(htmlAttrHREF);
@@ -7097,7 +6872,6 @@
   end;
 end;
 
-{$IFDEF IP_LAZARUS}
 procedure TIpHtml.ParseStyleSheet(Parent: TIpHtmlNode; HRef: String);
 var
   StyleStream: TStream;
@@ -7121,9 +6895,7 @@
       StyleStream.Free;
     end;
 end;
-{$ENDIF}
 
-
 procedure TIpHtml.ParseBodyText(Parent: TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
 begin
   Inc(InBlock);
@@ -7778,9 +7550,7 @@
       ALink := ColorFromString(FindAttribute(htmlAttrALINK));
       Background := FindAttribute(htmlAttrBACKGROUND);
       ParseBaseProps(Self);
-      {$IFDEF IP_LAZARUS}
       LoadAndApplyCSSProps;
-      {$ENDIF}
     end;
     NextToken;
     ParseBodyText(Body, EndTokens + [IpHtmlTagBODYend]);
@@ -7792,9 +7562,7 @@
       { No. Create a body node under FHtml. }
       with TIpHtmlNodeHtml(Parent) do begin
         with TIpHtmlNodeBODY.Create(Parent) do begin
-          {$IFDEF IP_LAZARUS}
           LoadAndApplyCSSProps;
-          {$ENDIF};
         end;
         { Make each of FHtml's current children the children of the Body node. }
         for i := Pred(ChildCount) downto 0 do
@@ -7832,10 +7600,8 @@
 end;
 
 procedure TIpHtml.Parse;
-{$IFDEF IP_LAZARUS}
 var
   ch1,ch2,ch3: AnsiChar;
-{$ENDIF}
 begin
   Getmem(TokenStringBuf, CharStream.Size * 4 + 65536);
   try
@@ -7842,7 +7608,6 @@
     CharSP := 0;
     ListLevel := 0;
     StartPos := CharStream.Position;
-    {$IFDEF IP_LAZARUS}
     FDocCharset := '';
     FHasBOM := false;
     Ch1 := GetChar;
@@ -7869,7 +7634,7 @@
       PutChar(Ch2);
       PutChar(Ch1);
     end;
-    {$ENDIF}
+
     repeat
       NextToken;
     until CurToken in [IpHtmlTagHtml, IpHtmlTagFRAMESET, IpHtmlTagEOF];
@@ -7913,27 +7678,22 @@
   DefaultProps := TIpHtmlProps.Create(PropACache, PropBCache);
   FHtml := TIpHtmlNodeHtml.Create(nil);
   FHtml.FOwner := Self;
-  AnchorList := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
-  MapList := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
-  AreaList := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
-  MapImgList := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
-  RectList := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
-  FControlList := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
+  AnchorList := TFPList.Create;
+  MapList := TFPList.Create;
+  AreaList := TFPList.Create;
+  MapImgList := TFPList.Create;
+  RectList := TFPList.Create;
+  FControlList := TFPList.Create;
   LinkColor := clBlue;
   VLinkColor := clPurple;
   ALinkColor := clRed;
   FLinksUnderlined := DEFAULT_LINKS_UNDERLINED;
-  {$IFDEF IP_LAZARUS}
   FCSS := TCSSGlobalProps.Create;
   FTabList := TIpHtmlTabList.Create;
-    {$IFDEF UseGifImageUnit}
-    GifImages := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
-    {$ELSE}
-    AnimationFrames := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
-    {$ENDIF}
+  {$IFDEF UseGifImageUnit}
+  GifImages := TFPList.Create;
   {$ELSE}
-  GifImages := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
-  OtherImages := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
+  AnimationFrames := TFPList.Create;
   {$ENDIF}
   NameList := TStringList.Create;
   IdList := TStringList.Create;
@@ -7940,24 +7700,15 @@
   DefaultImage := TPicture.Create;
   TmpBitmap := nil;
   try
-    {$IFNDEF IP_LAZARUS}
-    TmpBitmap := TBitmap.Create;
-    TBitmap(TmpBitmap).LoadFromResourceName (HInstance, 'DEFAULTIMAGE');
-    (**
-    TmpBitmap.LoadFromResourceName(FindClassHInstance(
-      TIpHTMLCustomPanel), 'DEFAULTIMAGE');
-    **)
-    {$ELSE}
     if LazarusResources.Find('DEFAULTIMAGE')<>nil then
       TmpBitmap := CreateBitmapFromLazarusResource('DEFAULTIMAGE')
     else
       TmpBitmap := CreateBitmapFromResourceName(HInstance, 'DEFAULTIMAGE');
-    {$ENDIF}
     DefaultImage.Graphic := TmpBitmap;
   finally
     TmpBitmap.Free;
   end;
-  GifQueue := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
+  GifQueue := TFPList.Create;
   FStartSel.x := -1;
   FEndSel.x := -1;
   //FixedTypeface := 'Courier New';
@@ -8000,7 +7751,6 @@
 
 procedure TIpHtml.FinalizeRecs(P: Pointer);
 begin
-  {$IFDEF IP_LAZARUS}
   with PIpHtmlElement(P)^ do begin
     //ElementType : TElementType;
     AnsiWord:='';
@@ -8011,9 +7761,6 @@
     //Props : TIpHtmlProps;
     //Owner : TIpHtmlNode;
   end;
-  {$ELSE}
-  Finalize(PIpHtmlElement(P)^);
-  {$ENDIF}
 end;
 
 destructor TIpHtml.Destroy;
@@ -8020,7 +7767,6 @@
 var
   i : Integer;
 begin
- {$IFDEF IP_LAZARUS}
  FCSS.Free;
     {$IFDEF UseGifImageUnit}
     for i := 0 to Pred(GifImages.Count) do
@@ -8032,14 +7778,6 @@
         TIpAnimatedGraphic(TIpHtmlNodeIMG(AnimationFrames[i]).FPicture.Graphic).
           AggressiveDrawing := False;
     {$ENDIF}
- {$ELSE}
-  for i := 0 to Pred(GifImages.Count) do
-    if TIpHtmlNodeIMG(GifImages[i]).FPicture <> nil then
-      TGifImage(TIpHtmlNodeIMG(GifImages[i]).FPicture.Graphic).PaintStop;
-  for i := 0 to Pred(OtherImages.Count) do
-    if TIpHtmlNodeIMG(OtherImages[i]).FPicture <> nil then
-      TIpHtmlNodeIMG(OtherImages[i]).FPicture.Graphic := nil;
- {$ENDIF}
   Destroying := True;
   PaintBufferBitmap.Free;
   ClearGifQueue;
@@ -8057,7 +7795,6 @@
   MapImgList.Free;
   FControlList.Free;
   DefaultProps.Free;
- {$IFDEF IP_LAZARUS}
   FTabList.Free;
   {$IFDEF UseGifImageUnit}
   GifImages.Free;
@@ -8064,10 +7801,6 @@
   {$ELSE}
   AnimationFrames.Free;
   {$ENDIF}
- {$ELSE}
-  GifImages.Free;
-  OtherImages.Free;
- {$ENDIF}
   ElementPool.EnumerateItems(FinalizeRecs);
   ElementPool.Free;
   PropACache.Free;
@@ -8250,7 +7983,6 @@
   Result := True;
 end;
 
-{$IFDEF IP_LAZARUS}
 function TIpHtml.GetSelectionBlocks(out StartSelIndex,EndSelIndex: Integer): boolean;
 var
   R : TRect;
@@ -8322,7 +8054,6 @@
   end;
   Result := True;
 end;
-{$ENDIF}
 
 function TIpHtml.getControlCount:integer;
 begin
@@ -8400,12 +8131,11 @@
   for i := StartSelIndex to EndSelIndex do begin
     R := PIpHtmlRectListEntry(RectList[i]).Rect;
     if PageRectToScreen(R, R) then begin
-      {$IFDEF IP_LAZARUS}
       DebugLn('TIpHtml.PaintSelection  PatBlt not implemented');
-      {$ELSE}
+      (*
       PatBlt(PaintBuffer.Handle, R.Left, R.Top,
         R.Right - R.Left, R.Bottom - R.Top, DSTINVERT);
-      {$ENDIF}
+      *)
     end;
   end;
 end;
@@ -8496,7 +8226,6 @@
     TargetCanvas.FillRect(FClientRect);
     Exit;
   end;
- {$IFDEF IP_LAZARUS}
     {$IFDEF UseGifImageUnit}
     for i := 0 to Pred(GifImages.Count) do
       if TIpHtmlNodeIMG(GifImages[i]).FPicture <> nil then
@@ -8509,13 +8238,6 @@
         with TIpAnimatedGraphic(TIpHtmlNodeIMG(AnimationFrames[i]).FPicture.Graphic) do
           AggressiveDrawing := False;
     {$ENDIF}
- {$ELSE}
-  for i := 0 to Pred(GifImages.Count) do
-    if TIpHtmlNodeIMG(GifImages[i]).FPicture <> nil then
-      with TGifImage(TIpHtmlNodeIMG(GifImages[i]).FPicture.Graphic) do
-        if Painters <> nil then
-          PaintStop;
- {$ENDIF}
 
  for i := 0 to Pred(FControlList.Count) do
     TIpHtmlNode(FControlList[i]).UnmarkControl;
@@ -8548,9 +8270,6 @@
 
   for i := 0 to Pred(FControlList.Count) do
     TIpHtmlNode(FControlList[i]).HideUnmarkedControl;
-  {$IFNDEF IP_LAZARUS}
-  PaintSelection;
-  {$ENDIF}
   if UsePaintBuffer then
     TargetCanvas.CopyRect(FClientRect, PaintBuffer, FClientRect)
   else
@@ -8624,10 +8343,8 @@
 begin
   //debugln(['TIpHtml.GetPageRect START DoneLoading=',DoneLoading,' FHtml=',FHtml<>nil]);
   if not DoneLoading then begin
-    {$IFDEF IP_LAZARUS}
     // always set Result
     SetRectEmpty(Result);
-    {$ENDIF}
     Exit;
   end;
   DoneLoading := False;
@@ -8775,11 +8492,7 @@
     Inc(Count);
   end;
   Result := CreatePolygonRgn(
-    {$IFDEF IP_LAZARUS}
     PPoint(@Points[0]),
-    {$ELSE}
-    (@Points[0])^,
-    {$ENDIF}
     Count,
     ALTERNATE); {fill mode is irrelevant here}
 end;
@@ -8868,11 +8581,9 @@
 
 function TIpHtml.BuildPath(const Ext: string): string;
 begin
-  {$IFDEF IP_LAZARUS}
   if FDataProvider <> nil then
     Result := FDataProvider.BuildURL(FCurURL,Ext)
   else
-  {$ENDIF}
   Result :=  BuildURL(FCurURL, Ext);
 end;
 
@@ -8881,9 +8592,7 @@
   Result := ElementPool.NewItm;
   Result.ElementType := EType;
   Result.Owner := Own;
-  {$IFDEF IP_LAZARUS}
   Result.IsSelected := False;
-  {$ENDIF}
 end;
 
 function TIpHtml.BuildStandardEntry(EType: TElementType): PIpHtmlElement;
@@ -8901,10 +8610,10 @@
   Result := BuildStandardEntry(EType);
   Result.LFHeight := AHeight;
 end;
-procedure TIpHtml.MakeVisible(const R: TRect{$IFDEF IP_LAZARUS}; ShowAtTop: Boolean = True{$ENDIF});
+procedure TIpHtml.MakeVisible(const R: TRect; ShowAtTop: Boolean = True);
 begin
   if Assigned(FOnScroll) then
-    FOnScroll(Self, R{$IFDEF IP_LAZARUS}, ShowAtTop{$ENDIF});
+    FOnScroll(Self, R, ShowAtTop);
 end;
 
 function TIpHtml.FindElement(const Name: string): TIpHtmlNode;
@@ -8991,15 +8700,12 @@
   RectList.Clear;
 end;
 
-{$IFDEF IP_LAZARUS}
 procedure TIpHtml.DeselectAllItems(Item: Pointer);
 begin
   PIpHtmlElement(item)^.IsSelected := False;
 end;
-{$ENDIF}
 
 procedure TIpHtml.SetSelection(StartPoint, EndPoint: TPoint);
-{$IFDEF IP_LAZARUS}
 var
   StartSelIndex,EndSelindex: Integer;
   i: Integer;
@@ -9007,12 +8713,9 @@
   Selected: boolean;
   DeselectAll: boolean;
   item: PIpHtmlRectListEntry;
-{$ENDIF}
 begin
-  {$IFDEF IP_LAZARUS}
   if FAllSelected then
     InvalidateRect(Body.PageRect);
-  {$ENDIF}
   FAllSelected := False;
   if EndPoint.y > StartPoint.y then begin
     FStartSel := StartPoint;
@@ -9031,7 +8734,6 @@
     FStartSel := EndPoint;
     FEndSel := StartPoint;
   end;
-  {$IFDEF IP_LAZARUS}
   if Body <> nil then begin
     // Invalidate only those blocks that need it
     DeselectAll := (EndPoint.x<0)and(EndPoint.y<0);
@@ -9056,10 +8758,6 @@
     if DeselectAll then
       ElementPool.EnumerateItems(DeselectAllItems);
   end;
-  {$ELSE}
-  if Body <> nil then
-    InvalidateRect(Body.PageRect);
-  {$ENDIF}
 end;
 
 procedure TIpHtml.SelectAll;
@@ -9117,9 +8815,7 @@
     P := CharPos('#', URL);
     if P <> 0 then
       SetLength(URL, P - 1);
-    {$IFDEF IP_LAZARUS}
     Result:=true;
-    {$ENDIF}
     FOnURLCheck(Self, URL, Result);
   end;
 end;
@@ -9862,7 +9558,6 @@
   Result := FAlign;
 end;
 
-{$IFDEF IP_LAZARUS}
 procedure TIpHtmlNodeP.LoadAndApplyCSSProps;
 begin
   inherited;
@@ -9869,7 +9564,6 @@
   if not (FCombinedCSSProps.Alignment in [haDefault, haUnknown]) then
     Align := FCombinedCSSProps.Alignment;
 end;
-{$ENDIF}
 
 procedure TIpHtmlNodeP.SetAlign(const Value: TIpHtmlAlign);
 begin
@@ -10012,7 +9706,6 @@
   Result := FAlign;
 end;
 
-{$IFDEF IP_LAZARUS}
 procedure TIpHtmlNodeHeader.LoadAndApplyCSSProps;
 begin
   inherited;
@@ -10019,7 +9712,6 @@
   if not (FCombinedCSSProps.Alignment in [haDefault, haUnknown]) then
     Align := FCombinedCSSProps.Alignment;
 end;
-{$ENDIF}
 
 procedure TIpHtmlNodeHeader.SetAlign(const Value: TIpHtmlAlign);
 begin
@@ -10378,7 +10070,7 @@
 begin
   inherited Create(ParentNode);
   FElementName := 'a';
-  MapAreaList := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
+  MapAreaList := TFPList.Create;
 end;
 
 destructor TIpHtmlNodeA.Destroy;
@@ -10496,8 +10188,8 @@
   for i := 0 to Pred(AreaList.Count) do
     UnionRect(R, R, PRect(AreaList[i])^);
 
-  Owner.MakeVisible(R{$IFDEF IP_LAZARUS}, true {$ENDIF});
-  //Owner.MakeVisible(R{$IFDEF IP_LAZARUS}, False {$ENDIF});  // original
+  Owner.MakeVisible(R, true );
+  //Owner.MakeVisible(R, False);  // original
 end;
     *)
 procedure TIpHtmlNodeA.SetProps(const RenderProps: TIpHtmlProps);
@@ -10548,7 +10240,6 @@
   Result := FAlign;
 end;
 
-{$IFDEF IP_LAZARUS}
 procedure TIpHtmlNodeDIV.LoadAndApplyCSSProps;
 begin
   inherited;
@@ -10555,7 +10246,6 @@
   if not (FCombinedCSSProps.Alignment in [haDefault, haUnknown]) then
     Align := FCombinedCSSProps.Alignment;
 end;
-{$ENDIF}
 
 procedure TIpHtmlNodeDIV.SetAlign(const Value: TIpHtmlAlign);
 begin
@@ -10566,9 +10256,7 @@
 begin
   Props.Assign(RenderProps);
   Props.Alignment := Align;
-  {$IFDEF IP_LAZARUS}
   LoadAndApplyCSSProps;
-  {$ENDIF}
   inherited SetProps(Props);
 end;
 
@@ -10625,9 +10313,7 @@
   Props.Assign(RenderProps);
   Props.DelayCache:=True;
   Props.Alignment := Align;
-  {$IFDEF IP_LAZARUS}
   LoadAndApplyCSSProps;
-  {$ENDIF}
   Props.DelayCache:=False;
 end;
 
@@ -10788,11 +10474,7 @@
                         if not IsRectEmpty(PadRect) then begin
                           R := PadRect;
                           Inflaterect(R, 1, 1);
-                          {$IFDEF IP_LAZARUS}
                           ScreenFrame(R, False);
-                          {$ELSE}
-                          ScreenRect(R, RGB(192,192,192));
-                          {$ENDIF}
                         end;
                       end;
                     end;
@@ -11022,7 +10704,6 @@
   end;
 end;
 
-{$IFDEF IP_LAZARUS}
 procedure TIpHtmlNodeTABLE.LoadAndApplyCSSProps;
 begin
   inherited LoadAndApplyCSSProps;
@@ -11047,9 +10728,7 @@
     FWidth.OnChange := WidthChanged;
   end;
 end;
-{$ENDIF}
 
-
 { TIpNodeTR }
 
 constructor TIpHtmlNodeTR.Create(ParentNode: TIpHtmlNode);
@@ -11067,7 +10746,6 @@
   Result := FAlign;
 end;
 
-{$IFDEF IP_LAZARUS}
 procedure TIpHtmlNodeTR.LoadAndApplyCSSProps;
 begin
   inherited;
@@ -11079,7 +10757,6 @@
     // wp: what about VAlign?
   end;
 end;
-{$ENDIF}
 
 procedure TIpHtmlNodeTR.SetAlign(const Value: TIpHtmlAlign);
 begin
@@ -11186,54 +10863,36 @@
     if FPicture = nil
       then FPicture := Owner.DefaultImage;
 
-   {$IFDEF IP_LAZARUS}
-      {$IFDEF UseGifImageUnit}
-      if (FPicture <> nil)
-      and (FPicture.Graphic <> nil)
-      and (FPicture.Graphic is TGifImage)
-      then
-        Owner.GifImages.Add(Self);
-      {$ELSE}
-      if (FPicture <> nil)
-      and (FPicture.Graphic <> nil)
-      and (FPicture.Graphic is TIpAnimatedGraphic)
-      then
-        Owner.AnimationFrames.Add(Self);
-      {$ENDIF}
-    {$ELSE}
-    if (FPicture <> nil)
-    and (FPicture.Graphic <> nil) then  begin
-      if  FPicture.Graphic is TGifImage
-      then  Owner.GifImages.Add(Self)
-      else  Owner.OtherImages.Add(Self);
-    end;
-    {$ENDIF}
-  end;
-end;
-
-procedure TIpHtmlNodeIMG.UnloadImage;
-begin
-  {$IFDEF IP_LAZARUS}
     {$IFDEF UseGifImageUnit}
     if (FPicture <> nil)
     and (FPicture.Graphic <> nil)
     and (FPicture.Graphic is TGifImage)
     then
-      Owner.GifImages.Remove(Self);
+      Owner.GifImages.Add(Self);
     {$ELSE}
     if (FPicture <> nil)
     and (FPicture.Graphic <> nil)
     and (FPicture.Graphic is TIpAnimatedGraphic)
     then
-      Owner.AnimationFrames.Remove(Self);
+      Owner.AnimationFrames.Add(Self);
     {$ENDIF}
+  end;
+end;
+
+procedure TIpHtmlNodeIMG.UnloadImage;
+begin
+  {$IFDEF UseGifImageUnit}
+  if (FPicture <> nil)
+  and (FPicture.Graphic <> nil)
+  and (FPicture.Graphic is TGifImage)
+  then
+    Owner.GifImages.Remove(Self);
   {$ELSE}
   if (FPicture <> nil)
-  and (FPicture.Graphic <> nil)  then  begin
-    if  FPicture.Graphic is TGifImage
-    then  Owner.GifImages.Remove(Self)
-    else  Owner.OtherImages.Remove(Self);
-  end;
+  and (FPicture.Graphic <> nil)
+  and (FPicture.Graphic is TIpAnimatedGraphic)
+  then
+    Owner.AnimationFrames.Remove(Self);
   {$ENDIF}
   if FPicture <> Owner.DefaultImage then begin
     FPicture.Free;
@@ -11251,7 +10910,6 @@
   FHeight.Free;
 end;
 
-{$IFDEF IP_LAZARUS}
 function TIpHtmlNodeIMG.GetBorder: Integer;
 begin
   if (FPicture<>nil)and(FPicture.Graphic=nil) then
@@ -11259,7 +10917,7 @@
   else
     Result := fBorder;
 end;
-{$ENDIF}
+
 procedure TIpHtmlNodeIMG.Draw;
 var
   R : TRect;
@@ -11334,17 +10992,14 @@
   InflateRect(R, -HSpace, -VSpace);
 
   if FPicture <> nil then begin
-  {$IFDEF IP_LAZARUS}
     if FPicture.Graphic=nil then begin
       if PageRectToScreen(R,R) then
         Owner.Target.TextRect(R, R.Left, R.Top, GetHint);
       Exit;
     end;
-  {$ENDIF}
     FPicture.Graphic.Transparent := True;
     NetDrawRect := R;
     if PageRectToScreen(R, R) then begin
-      {$IFDEF IP_LAZARUS}
         {$IFDEF UseGifImageUnit}
         if (FPicture.Graphic is TGifImage)
         and (TGifImage(FPicture.Graphic).Images.Count > 1) then begin
@@ -11360,7 +11015,6 @@
         end else
       begin
         {$ENDIF}
-      {$ENDIF}
         if FPicture = Owner.DefaultImage then begin
           if ((NetDrawRect.Right - NetDrawRect.Left) > FPicture.Graphic.Width)
           and ((NetDrawRect.Bottom - NetDrawRect.Top) > FPicture.Graphic.Height) then begin
@@ -11371,9 +11025,7 @@
             Owner.Target.StretchDraw(R, FPicture.Graphic);
         end else
           Owner.Target.StretchDraw(R, FPicture.Graphic);
-      {$IFDEF IP_LAZARUS}
       end;
-      {$ENDIF}
     end;
   end
 end;
@@ -11403,53 +11055,35 @@
   Owner.CheckImage(NewPicture);
   {$ENDIF}
   OldDim := GetDim(-1);
-  {$IFDEF IP_LAZARUS}
-    {$IFDEF UseGifImageUnit}
-    if (FPicture <> nil)
-    and (FPicture.Graphic <> nil)
-    and (FPicture.Graphic is TGifImage)
-    then
-      Owner.GifImages.Remove(Self);
-    {$ELSE}
-    if (FPicture <> nil)
-    and (FPicture.Graphic <> nil)
-    and (FPicture.Graphic is TIpAnimatedGraphic)
-    then
-      Owner.AnimationFrames.Remove(Self);
-    {$ENDIF}
- {$ELSE}
+  {$IFDEF UseGifImageUnit}
   if (FPicture <> nil)
-  and (FPicture.Graphic <> nil) then  begin
-    if  FPicture.Graphic is TGifImage
-    then  Owner.GifImages.Remove(Self)
-    else  Owner.OtherImages.Remove(Self);
-  end;
- {$ENDIF}
+  and (FPicture.Graphic <> nil)
+  and (FPicture.Graphic is TGifImage)
+  then
+    Owner.GifImages.Remove(Self);
+  {$ELSE}
+  if (FPicture <> nil)
+  and (FPicture.Graphic <> nil)
+  and (FPicture.Graphic is TIpAnimatedGraphic)
+  then
+    Owner.AnimationFrames.Remove(Self);
+  {$ENDIF}
   if FPicture <> Owner.DefaultImage then
     FPicture.Free;
   FPicture := NewPicture;
-  {$IFDEF IP_LAZARUS}
-    {$IFDEF UseGifImageUnit}
-    if (FPicture <> nil)
-    and (FPicture.Graphic <> nil)
-    and (FPicture.Graphic is TGifImage)
-    then
-      Owner.GifImages.Add(Self);
-    {$ELSE}
-    if (FPicture <> nil)
-    and (FPicture.Graphic <> nil)
-    and (FPicture.Graphic is TIpAnimatedGraphic)
-    then
-      Owner.AnimationFrames.Add(Self);
-    {$ENDIF}
- {$ELSE}
+  {$IFDEF UseGifImageUnit}
   if (FPicture <> nil)
-  and (FPicture.Graphic <> nil) then  begin
-    if  FPicture.Graphic is TGifImage
-    then  Owner.GifImages.Add(Self)
-    else  Owner.OtherImages.Add(Self);
-  end;
- {$ENDIF}
+  and (FPicture.Graphic <> nil)
+  and (FPicture.Graphic is TGifImage)
+  then
+    Owner.GifImages.Add(Self);
+  {$ELSE}
+  if (FPicture <> nil)
+  and (FPicture.Graphic <> nil)
+  and (FPicture.Graphic is TIpAnimatedGraphic)
+  then
+    Owner.AnimationFrames.Add(Self);
+  {$ENDIF}
   SizeWidth.PixelsType := hpUndefined;
   Dim := GetDim(0);
   if (Dim.cx <> OldDim.cx)
@@ -11496,12 +11130,10 @@
       DimKnown := False;
     if not DimKnown then begin
       if (FPicture <> nil) then begin
-        {$IFDEF IP_LAZARUS}
         if FPicture.Graphic=nil then
           // todo: needs to return the "text size" of GetHint
           FSize := SizeRec(100,20)
         else
-        {$ENDIF}
         if ScaleBitmaps then
           FSize := SizeRec(round(FPicture.Width * Aspect), round(FPicture.Height * Aspect))
         else
@@ -11515,12 +11147,10 @@
             if ScaleBitmaps then
               FSize := SizeRec(round(FPicture.Width * Aspect), round(FPicture.Height * Aspect))
             else
-              {$IFDEF IP_LAZARUS}
               if FPicture.Graphic=nil then
                 // todo: needs to return the "text size" of GetHint
                 FSize := SizeRec(100,20)
               else
-              {$ENDIF}
               FSize := SizeRec(FPicture.Width, FPicture.Height);
           end else
             FSize := SizeRec(0, 0);
@@ -11631,13 +11261,13 @@
 begin
   if Node is TIpHtmlNodeControl then
     if TIpHtmlNodeControl(Node).SuccessFul then
-      {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}(UserData).Add(Node);
+      TFPList(UserData).Add(Node);
 end;
 
 {$IFNDEF HtmlWithoutHttp}
 procedure TIpHtmlNodeFORM.SubmitForm;
 var
-  CList : {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif};
+  CList : TFPList;
   FList,
   VList : TStringList;
   URLData: string;
@@ -11725,7 +11355,7 @@
   FList := nil;
   VList := nil;
   try
-    CList := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
+    CList := TFPList.Create;
     FList := TStringList.Create;
     VList := TStringList.Create;
     IndentifySuccessfulControls;
@@ -12764,10 +12394,8 @@
 end;
 
 procedure TIpHtmlNodeCore.ParseBaseProps(aOwner : TIpHtml);
-{$IFDEF IP_LAZARUS}
 var
   Commands: TStringList;
-{$ENDIF}
 begin
   with aOwner do begin
     Id := FindAttribute(htmlAttrID);
@@ -12775,7 +12403,6 @@
     Title := FindAttribute(htmlAttrTITLE);
     Style := FindAttribute(htmlAttrSTYLE);
   end;
-  {$IFDEF IP_LAZARUS}
   if Style <> '' then
   begin
     if InlineCSS = nil then
@@ -12784,10 +12411,8 @@
     InlineCSS.ReadCommands(Commands);
     Commands.Free;
   end;
-  {$ENDIF}
 end;
 
-{$IFDEF IP_LAZARUS}
 (* look up the props for all CSS selectors that directly match this node, merge
    them all into one object (FCombinedCSSProps) and then apply them to Props.
    When FCombinedCSSProps already exists then the expensive lookup is skipped
@@ -12866,8 +12491,8 @@
   for i := 0 to Pred(FAreaList.Count) do
     UnionRect(R, R, PRect(FAreaList[i])^);
 
-  Owner.MakeVisible(R{$IFDEF IP_LAZARUS}, true {$ENDIF});
-  //Owner.MakeVisible(R{$IFDEF IP_LAZARUS}, False {$ENDIF});  // original
+  Owner.MakeVisible(R, true);
+  //Owner.MakeVisible(R, False);  // original
 end;
 
 function TIpHtmlNodeCore.SelectCSSFont(const aFont: string): string;
@@ -13066,7 +12691,7 @@
 constructor TIpHtmlNodeCore.Create(ParentNode: TIpHtmlNode);
 begin
   inherited;
-  FAreaList := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
+  FAreaList := TFPList.Create;
 end;
 
 destructor TIpHtmlNodeCore.Destroy;
@@ -13079,7 +12704,6 @@
   FAreaList.Free;
   inherited Destroy;
 end;
-{$ENDIF}
 
 { TIpHtmlNodeINS }
 
@@ -13105,7 +12729,6 @@
   Result := FAlign;
 end;
 
-{$IFDEF IP_LAZARUS}
 procedure TIpHtmlNodeTHeadFootBody.LoadAndApplyCSSProps;
 begin
   inherited;
@@ -13113,7 +12736,6 @@
     Align := FCombinedCSSProps.Alignment;
   // wp: what about VAlign?
 end;
-{$ENDIF}
 
 procedure TIpHtmlNodeTHeadFootBody.SetAlign(const Value: TIpHtmlAlign);
 begin
@@ -13356,7 +12978,6 @@
   FWidth.Free;
 end;
 
-{$IFDEF IP_LAZARUS}
 procedure TIpHtmlNodeCOL.LoadAndApplyCSSProps;
 begin
   inherited;
@@ -13364,7 +12985,6 @@
     Align := FCombinedCSSProps.Alignment;
   // wp: what about VAlign?
 end;
-{$ENDIF}
 
 function TIpHtmlNodeCOL.GetAlign: TIpHtmlAlign;
 begin
@@ -13385,7 +13005,6 @@
   FWidth.Free;
 end;
 
-{$IFDEF IP_LAZARUS}
 procedure TIpHtmlNodeCOLGROUP.LoadAndApplyCSSProps;
 begin
   inherited;
@@ -13393,7 +13012,6 @@
     Align := FCombinedCSSProps.Alignment;
   // wp: what about VAlign?
 end;
-{$ENDIF}
 
 function TIpHtmlNodeCOLGROUP.GetAlign: TIpHtmlAlign;
 begin
@@ -13485,7 +13103,6 @@
   FLayouter.Layout(Props, TargetRect);
 end;
 
-{$IFDEF IP_LAZARUS}
 procedure TIpHtmlNodeTableHeaderOrCell.LoadAndApplyCSSProps;
 begin
   inherited;
@@ -13493,7 +13110,6 @@
     Align := FCombinedCSSProps.Alignment;
   // wp: what about VAlign?
 end;
-{$ENDIF}
 
 procedure TIpHtmlNodeTableHeaderOrCell.DimChanged(Sender: TObject);
 begin
@@ -13596,7 +13212,6 @@
 function TIpHtmlNodeControl.adjustFromCss: boolean;
 begin
    result := false;
-   {$IFDEF IP_LAZARUS}
    LoadAndApplyCSSProps;
    if (props.FontSize <> -1) then
      FControl.Font.Size:= Props.FontSize;
@@ -13605,7 +13220,6 @@
      if Props.BGColor <> clNone then
        FControl.Brush.Color:= Props.BGColor;
    result := True;
-   {$ENDIF}
 end;
 
 procedure TIpHtmlNodeControl.SetDisabled(const AValue: Boolean);
@@ -13618,9 +13232,7 @@
 procedure TIpHtmlNodeControl.SetProps(const RenderProps: TIpHtmlProps);
 begin
   Props.Assign(RenderProps);
-  {$IFDEF IP_LAZARUS}
   LoadAndApplyCSSProps;
-  {$ENDIF}
 end;
 
 function TIpHtmlNodeControl.GetDim(ParentWidth: Integer): TSize;
@@ -13794,17 +13406,8 @@
 var
   Tw,Th : Integer;
   Sc : TPoint;
-  {$IFNDEF IP_LAZARUS}
-  IPHC: TIpHtmlCustomPanel;
-  {$ENDIF}
 begin
-  {$IFDEF IP_LAZARUS}
   if HtmlPanel.ShowHints then begin
-  {$ELSE}
-  IPHC := HtmlPanel;
-  if Assigned (IPHC) and IPHC.ShowHints and (NewHint <> CurHint) then begin
-  {$ENDIF}
-    {$IFDEF IP_LAZARUS}
     if (NewHint<>'') then begin
       Tw := HintWindow.Canvas.TextWidth(NewHint);
       Th := HintWindow.Canvas.TextHeight(NewHint);
@@ -13814,17 +13417,6 @@
                                     NewHint);
     end else
       HideHint;
-    {$ELSE}
-    if (NewHint <> '') and not IsWindowVisible(HintWindow.Handle) then begin
-      Tw := HintWindow.Canvas.TextWidth(NewHint);
-      Th := HintWindow.Canvas.TextHeight(NewHint);
-      Sc := ClientToScreen(Point(HintX,HintY));
-      HintWindow.ActivateWithBounds(Rect(Sc.X + 4, Sc.Y + 16,
-                                         Sc.X + Tw + 12, Sc.Y + Th + 16),
-                                    NewHint);
-    end else
-      HideHint;
-    {$ENDIF}
     CurHint := NewHint;
     HintShownHere := True;
   end;
@@ -13834,9 +13426,6 @@
 var
   OldHot : TIpHtmlNode;
   OldCurElement : PIpHtmlElement;
-  {$IFNDEF IP_LAZARUS}
-  IPHC: TIpHtmlCustomPanel;
-  {$ENDIF}
   TmpOwnerNode: TIpHtmlNode;
 begin
   if MouseIsDown and HaveSelection then begin
@@ -13857,12 +13446,7 @@
           DoCurElementChange;
       end;
     end else begin
-      {$IFDEF IP_LAZARUS}
       if HtmlPanel.AllowTextSelect then begin
-      {$ELSE}
-      IPHC := HtmlPanel;
-      if Assigned (IPHC) and IPHC.AllowTextSelect then begin
-      {$ENDIF}
         if Hyper.CurElement <> nil then begin
           if Hyper.CurElement.ElementType = etWord then
             Cursor := crIBeam
@@ -13884,14 +13468,6 @@
     Hint := Hyper.CurElement.Owner.GetHint
   else
     Hint := '';
-  {$IFNDEF IP_LAZARUS}
-  if NewSelection then begin
-    ClearSelection;
-    SelStart := Point(X + ViewLeft, Y + ViewTop);
-    NewSelection := False;
-    HaveSelection := True;
-  end;
-  {$ENDIF}
   inherited;
 
   // show hints for IpHtmlTagABBR and IpHtmlTagACRONYM
@@ -13925,24 +13501,15 @@
 
 procedure TIpHtmlInternalPanel.HideHint;
 begin
-  {$IFDEF IP_LAZARUS}
   HintWindow.Visible := False;
-  {$ELSE}
-  HintWindow.ReleaseHandle;
-  {$ENDIF}
 end;
 
 procedure TIpHtmlInternalPanel.MouseDown(Button: TMouseButton; Shift: TShiftState;
   X, Y: Integer);
-{$IFNDEF IP_LAZARUS}
-var
-  IPHC: TIpHtmlCustomPanel;
-{$ENDIF}
 begin
   MouseDownX := X;
   MouseDownY := Y;
   MouseIsDown := True;
-  {$IFDEF IP_LAZARUS}
   Self.SetFocus;
   if (Button=mbLeft) and HtmlPanel.AllowTextSelect then begin
     if Shift * [ssShift] = [] then begin
@@ -13957,11 +13524,6 @@
       ScrollPtInView(SelEnd);
     end;
   end;
-  {$ELSE}
-  IPHC := HtmlPanel;
-  if  Assigned (IPHC)
-  then  NewSelection := IPHC.AllowTextSelect and (Button = mbLeft);
-  {$ENDIF}
   inherited;
 end;
 
@@ -13972,17 +13534,12 @@
   MouseIsDown := False;
   if (abs(MouseDownX - X) < 4) and (abs(MouseDownY - Y) < 4) then
     if (Button = mbLeft) and (Shift = []) and (Hyper.HotNode <> nil) then
-      {$IFDEF IP_LAZARUS}
       // to avoid references to invalid objects do it asynchronously
       Application.QueueAsyncCall(AsyncHotInvoke, 0)
-      {$ELSE}
-      DoHotInvoke
-      {$ENDIF}
     else
       DoClick;
 end;
 
-{$IFDEF IP_LAZARUS}
 procedure TIpHtmlInternalPanel.MouseLeave;
 begin
   HideHint;
@@ -14112,8 +13669,6 @@
     inherited KeyDown(Key, Shift);
 end;
 
-{$ENDIF}
-
 function TIpHtmlInternalPanel.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean;
 var
   i: Integer;
@@ -14121,9 +13676,9 @@
   Result:=inherited DoMouseWheel(Shift, WheelDelta, MousePos);
   for i := 0 to Mouse.WheelScrollLines-1 do
     if WheelDelta < 0 then
-      Perform({$IFDEF IP_LAZARUS}LM_VSCROLL{$ELSE}WM_VSCROLL{$ENDIF}, MAKELONG(SB_LINEDOWN, 0), 0)
+      Perform(LM_VSCROLL, MAKELONG(SB_LINEDOWN, 0), 0)
     else
-      Perform({$IFDEF IP_LAZARUS}LM_VSCROLL{$ELSE}WM_VSCROLL{$ENDIF}, MAKELONG(SB_LINEUP, 0), 0);
+      Perform(LM_VSCROLL, MAKELONG(SB_LINEUP, 0), 0);
 end;
 
 procedure TIpHtmlInternalPanel.Paint;
@@ -14197,7 +13752,7 @@
       Printer.Title := 'HTML Document';
     Printer.BeginDoc;
     GetRelativeAspect(Printer.Canvas.Handle);
-    {$IF DEFINED(IP_LAZARUS) AND NOT DEFINED(WINDOWS)}
+    {$IF NOT DEFINED(WINDOWS)}
     // this test looks weird, according to most references consulted, the number
     // of colors in a display is NColors = 1 shl (bitsPerPixel * Planes). A mono
     // printer should have 2 colors, somebody else needs to clarify.
@@ -14205,19 +13760,11 @@
     {$ELSE}
     BWPrinter := GetDeviceCaps(Printer.Canvas.Handle, NUMCOLORS) = 2;
     {$ENDIF}
-    {$IFDEF IP_LAZARUS}
     LogPixX := Printer.XDPI;
-    {$ELSE}
-    LogPixX := GetDeviceCaps(Printer.Canvas.Handle, LOGPIXELSX);
-    {$ENDIF}
     LMarginPix := round(HtmlPanel.PrintSettings.MarginLeft * LogPixX);
     RMarginPix := round(HtmlPanel.PrintSettings.MarginRight * LogPixX);
     PrintWidth := Printer.PageWidth - LMarginPix - RMarginPix;
-    {$IFDEF IP_LAZARUS}
     LogPixY := Printer.YDPI;
-    {$ELSE}
-    LogPixY := GetDeviceCaps(Printer.Canvas.Handle, LOGPIXELSY);
-    {$ENDIF}
     TMarginPix := round(HtmlPanel.PrintSettings.MarginTop * LogPixY);
     BMarginPix := round(HtmlPanel.PrintSettings.MarginBottom * LogPixY);
     if Printer.Printers.Count = 0 then begin
@@ -14433,13 +13980,11 @@
   end;
 end;
 
-procedure TIpHtmlInternalPanel.ScrollRequest(Sender: TIpHtml; const R: TRect{$IFDEF IP_LAZARUS}; ShowAtTop: Boolean = True{$ENDIF});
+procedure TIpHtmlInternalPanel.ScrollRequest(Sender: TIpHtml; const R: TRect; ShowAtTop: Boolean = True);
 begin
-  {$IFDEF IP_LAZARUS}
   if not ShowAtTop then
     ScrollInViewRaw(R)
   else
-  {$ENDIF}
   ScrollInView(R);
 end;
 
@@ -14498,36 +14043,22 @@
     end;
 end;
 
-procedure TIpHtmlInternalPanel.WMHScroll(var Message: {$IFDEF IP_LAZARUS}TLMHScroll{$ELSE}TWMHScroll{$ENDIF});
+procedure TIpHtmlInternalPanel.WMHScroll(var Message: TLMHScroll);
 begin
-  {$IFDEF IP_LAZARUS}
   if HScroll.Visible then
     HScroll.ScrollMessage(Message);
-  {$ELSE}
-  if (Message.ScrollBar = 0) and HScroll.Visible then
-    HScroll.ScrollMessage(Message) else
-    inherited;
-  {$ENDIF}
 end;
 
-procedure TIpHtmlInternalPanel.WMVScroll(var Message: {$IFDEF IP_LAZARUS}TLMVScroll{$ELSE}TWMVScroll{$ENDIF});
+procedure TIpHtmlInternalPanel.WMVScroll(var Message: TLMVScroll);
 begin
-  {$IFDEF IP_LAZARUS}
   if VScroll.Visible then
     VScroll.ScrollMessage(Message);
-  {$ELSE}
-  if (Message.ScrollBar = 0) and VScroll.Visible then
-    VScroll.ScrollMessage(Message) else
-    inherited;
-  {$ENDIF}
 end;
 
-{$IFDEF IP_LAZARUS}
 procedure TIpHtmlInternalPanel.AsyncHotInvoke(data: ptrint);
 begin
   DoHotInvoke;
 end;
-{$ENDIF}
 
 procedure TIpHtmlInternalPanel.WMEraseBkgnd(var Message: TWmEraseBkgnd);
 begin
@@ -14549,11 +14080,7 @@
 function TIpHtmlInternalPanel.HtmlPanel: TIpHtmlCustomPanel;
 begin
   Result := TIpHtmlPanel(Parent);
-  {$IFDEF IP_LAZARUS}
   while not (Result is TIpHtmlPanel) do
-  {$ELSE}
-  while  Assigned(Result) and (Result.ClassType <> TIpHtmlPanel)  do
-  {$ENDIF}
     Result := TIpHtmlPanel(Result.Parent);
 end;
 
@@ -14615,7 +14142,7 @@
   Result := FRange > ControlSize(False, False);
 end;
 
-procedure TIpHtmlScrollBar.ScrollMessage(var Msg: {$IFDEF IP_LAZARUS}TLMScroll{$ELSE}TWMScroll{$ENDIF});
+procedure TIpHtmlScrollBar.ScrollMessage(var Msg: TLMScroll);
 
   function GetRealScrollPosition: Integer;
   var
@@ -14755,61 +14282,6 @@
   FPageIncrement := iPi;
 end;
 
-
-{$IFNDEF IP_LAZARUS}
-{ TIpHtmlFocusRect }
-
-constructor TIpHtmlFocusRect.Create(AOwner: TComponent);
-begin
-  inherited Create(AOwner);
-  ControlStyle := [csCaptureMouse, csClickEvents, csSetCaption,
-    csOpaque, csReplicatable, csDoubleClicks];
-  Width := 65;
-  Height := 17;
-end;
-
-procedure TIpHtmlFocusRect.CreateParams(var Params: TCreateParams);
-begin
-  inherited CreateParams(Params);
-  CreateSubClass(Params, 'STATIC');
-  with Params do begin
-    {$IFNDEF IP_LAZARUS}
-    Style := Style or SS_NOTIFY;
-    {$ENDIF}
-    WindowClass.style := WindowClass.style and not (CS_HREDRAW or CS_VREDRAW);
-  end;
-end;
-
-{$IFDEF IP_LAZARUS}
-procedure TIpHtmlFocusRect.WMSetFocus(var Message: TLMSetFocus);
-begin
-  inherited WMSetFocus(Message);
-  Anchor.DoOnFocus;
-end;
-
-procedure TIpHtmlFocusRect.WMKillFocus(var Message: TLMKillFocus);
-begin
-  inherited WMKillFocus(Message);
-  Anchor.DoOnBlur;
-  {HaveFocus := False;}
-end;
-
-{$ELSE}
-procedure TIpHtmlFocusRect.WMSetFocus(var Message: TWMSetFocus);
-begin
-  inherited;
-  Anchor.DoOnFocus;
-end;
-
-procedure TIpHtmlFocusRect.WMKillFocus(var Message: TWMKillFocus);
-begin
-  inherited;
-  Anchor.DoOnBlur;
-  {HaveFocus := False;}
-end;
-
-{$ENDIF}
-{$ENDIF}
 { TIpHtmlFrame }
 
 procedure TIpHtmlFrame.InitHtml;
@@ -14835,10 +14307,8 @@
   FHtml.FlagErrors := FFlagErrors;
   FHtml.MarginWidth := FMarginWidth;
   FHtml.MarginHeight := FMarginHeight;
-  {$IFDEF IP_LAZARUS}
   if FDataProvider <> nil then
     FHtml.FDataProvider := FDataProvider;
-  {$ENDIF}
   FHtml.FactBAParag := FViewer.FactBAParag;
 end;
 
@@ -14881,11 +14351,7 @@
 procedure TIpHtmlFrame.InvalidateRect(Sender: TIpHtml; const R: TRect);
 begin
   if HyperPanel <> nil then
-    {$IFDEF IP_LAZARUS}
     LCLIntf.InvalidateRect(HyperPanel.Handle, @R, False);
-    {$ELSE}
-    Windows.InvalidateRect(HyperPanel.Handle, @R, False);
-    {$ENDIF}
 end;
 
 procedure TIpHtmlFrame.InvalidateSize(Sender: TObject);
@@ -15118,15 +14584,6 @@
     FHtml.OnControlChange := ControlOnChange;
     FHtml.OnControlEditingdone := ControlOnEditingDone;
     FHtml.OnControlCreate := ControlCreate;
-    {$IFNDEF IP_LAZARUS}
-    for i := 0 to Pred(FHtml.AnchorList.Count) do
-      with TIpHtmlFocusRect.Create(HyperPanel) do begin
-        SetBounds(-100, -100, 10, 10);
-        TabStop := True;
-        Parent := HyperPanel;
-        Anchor := FHtml.AnchorList[i];
-      end;
-    {$ENDIF}
     for i := 0 to Pred(FHtml.FControlList.Count) do
       TIpHtmlNode(FHtml.FControlList[i]).CreateControl(HyperPanel);
     HyperPanel.Hyper := FHtml;
@@ -15958,16 +15415,11 @@
 procedure TIpHtmlCustomPanel.GoBack;
 begin
   if (URLStack.Count > 0) then begin
-    {$IFDEF IP_LAZARUS}
     if URLStack.Count >= URLStack.count then Stp := URLStack.Count - 1;
     if URLStack.Count > 0 then begin
       InternalOpenURL(TargetStack[Stp], URLStack[Stp]);
       Dec(Stp);
     end;
-    {$ELSE}
-    InternalOpenURL(TargetStack[Stp], URLStack[Stp]);
-    Dec(Stp);
-    {$ENDIF}
   end;
 end;
 
@@ -16233,15 +15685,6 @@
     FMasterFrame.Stop;
 end;
 
-{$IF defined(VERSION4) and not defined(IP_LAZARUS)}
-procedure TIpHtmlCustomPanel.MouseWheelHandler(var Message: TMessage);
-begin
-  inherited MouseWheelHandler(Message);
-  with Message do
-    DoOnMouseWheel(KeysToShiftState(LOWORD(wParam)), HIWORD(wParam), LOWORD(lParam), HIWORD(lParam));
-end;
-{$ENDIF}
-
 {$IFDEF Html_Print}
 function TIpHtmlCustomPanel.GetPrintPageCount: Integer;
 begin
@@ -16259,7 +15702,6 @@
 
 procedure TIpHtmlCustomPanel.PrintPreview;
 begin
-  {$IFDEF IP_LAZARUS}
   if not assigned(printer) then begin
     raise exception.create(
       'Printer has not been assigned, checkout that package'#13+
@@ -16266,7 +15708,6 @@
       'Printer4lazarus.lpk has been installed and OSPrinters'#13+
       'or PrintDialog is in uses clause of main unit');
   end;
-  {$ENDIF}
   if Assigned(FMasterFrame) then
     FMasterFrame.HyperPanel.PrintPreview;
 end;
@@ -16299,9 +15740,6 @@
   Msg.Result := DLGC_WANTALLKEYS +
                 DLGC_WANTARROWS +
                 DLGC_WANTCHARS +
-                {$IFNDEF IP_LAZARUS}
-                DLGC_WANTMESSAGE +
-                {$ENDIF}
                 DLGC_WANTTAB
 end;
 
@@ -16549,7 +15987,6 @@
   { Intentionally empty }
 end;
 
-{$IFDEF IP_LAZARUS}
 function LazFlatSB_GetScrollInfo(hWnd: HWND; BarFlag: Integer;
   var ScrollInfo: TScrollInfo): BOOL; stdcall;
 begin
@@ -16579,32 +16016,16 @@
 begin
   Result:=LCLIntf.SetScrollInfo(HWnd,BarFlag,ScrollInfo,Redraw);
 end;
-{$ENDIF}
 
-
 procedure InitScrollProcs;
-{$IFNDEF IP_LAZARUS}
-var
-  ComCtl32: THandle;
-{$ENDIF}
 begin
-  {$IFDEF IP_LAZARUS}
   @FlatSB_GetScrollInfo := @LazFlatSB_GetScrollInfo;
   @FlatSB_GetScrollPos :=  @LazFlatSB_GetScrollPos;
   @FlatSB_SetScrollPos :=  @LazFlatSB_SetScrollPos;
   @FlatSB_SetScrollProp := @LazFlatSB_SetScrollProp;
   @FlatSB_SetScrollInfo := @LazFlatSB_SetScrollInfo;
-  {$ELSE}
-  ComCtl32 := GetModuleHandle('comctl32.dll');
-  @FlatSB_GetScrollInfo := GetProcAddress(ComCtl32, 'FlatSB_GetScrollInfo');
-  @FlatSB_GetScrollPos := GetProcAddress(ComCtl32, 'FlatSB_GetScrollPos');
-  @FlatSB_SetScrollPos := GetProcAddress(ComCtl32, 'FlatSB_SetScrollPos');
-  @FlatSB_SetScrollProp := GetProcAddress(ComCtl32, 'FlatSB_SetScrollProp');
-  @FlatSB_SetScrollInfo := GetProcAddress(ComCtl32, 'FlatSB_SetScrollInfo');
-  {$ENDIF}
 end;
 
-
 { TIntArr }
 
 destructor TIntArr.Destroy;
@@ -16623,11 +16044,7 @@
 
 procedure TIntArr.SetValue(Index, Value: Integer);
 var
-  {$IFDEF IP_LAZARUS}
   p: ^Integer;
-  {$ELSE}
-  Tmp: PInternalIntArr;
-  {$ENDIF}
   NewSize: Integer;
 begin
   if Index >= 0 then begin
@@ -16636,20 +16053,12 @@
       repeat
         Inc(NewSize, TINTARRGROWFACTOR);
       until Index < NewSize;
-      {$IFDEF IP_LAZARUS code below does not check if InternalIntArr<>nil}
+      {code below does not check if InternalIntArr<>nil}
       ReallocMem(InternalIntArr,NewSize * sizeof(PtrInt));
       p := pointer(InternalIntArr);
       Inc(p, IntArrSize);
       fillchar(p^, (NewSize - IntArrSize)*sizeOf(PtrInt), 0);
       IntArrSize := NewSize;
-      {$ELSE}
-      Tmp := AllocMem(NewSize * sizeof(Integer));
-      move(InternalIntArr^, Tmp^, IntArrSize * sizeof(Integer));
-      IntArrSize := NewSize;
-      {Inc(IntArrSize, NewSize);}
-      Freemem(InternalIntArr);
-      InternalIntArr := Tmp;
-      {$ENDIF}
     end;
     InternalIntArr^[Index] := Value;
   end;
@@ -16674,11 +16083,7 @@
 
 procedure TRectArr.SetValue(Index: Integer; Value: PRect);
 var
-  {$IFDEF IP_LAZARUS}
   P: Pointer;
-  {$ELSE}
-  Tmp: PInternalRectArr;
-  {$ENDIF}
   NewSize: Integer;
 begin
   Assert(Self <> nil);
@@ -16688,19 +16093,12 @@
       repeat
         Inc(NewSize, TINTARRGROWFACTOR);
       until Index < NewSize;
-      {$IFDEF IP_LAZARUS code below does not check if InternalIntArr<>nil and set buggy IntArrSize}
+      {code below does not check if InternalIntArr<>nil and set buggy IntArrSize}
       ReallocMem(InternalRectArr,NewSize * sizeof(PtrInt));
       P := pointer(InternalRectArr);
       Inc(P, IntArrSize);
       fillchar(p^, (NewSize - IntArrSize)*sizeOf(PtrInt), 0);
       IntArrSize:=NewSize;
-      {$ELSE}
-      Tmp := AllocMem(NewSize * sizeof(Integer));
-      move(InternalRectArr^, Tmp^, IntArrSize * sizeof(Integer));
-      Inc(IntArrSize, NewSize);
-      Freemem(InternalRectArr);
-      InternalRectArr := Tmp;
-      {$ENDIF}
     end;
     InternalRectArr^[Index] := Value;
   end;
@@ -16733,11 +16131,7 @@
 
 function TRectRectArr.GetValue(Index: Integer): TRectArr;
 var
-  {$IFDEF IP_LAZARUS}
   P: ^Pointer;
-  {$ELSE}
-  Tmp: PInternalRectRectArr;
-  {$ENDIF}
   NewSize: Integer;
 begin
   if Index >= 0 then begin
@@ -16746,19 +16140,12 @@
       repeat
         Inc(NewSize, TINTARRGROWFACTOR);
       until Index < NewSize;
-      {$IFDEF IP_LAZARUS code below does not check if InternalIntArr<>nil and set buggy IntArrSize}
+      {code below does not check if InternalIntArr<>nil and set buggy IntArrSize}
       ReallocMem(InternalRectRectArr,NewSize * sizeof(PtrInt));
       p := pointer(InternalRectRectArr);
       Inc(p, IntArrSize);
       fillchar(p^, (NewSize - IntArrSize)*sizeOf(PtrInt), 0);
       IntArrSize:=NewSize;
-      {$ELSE}
-      Tmp := AllocMem(NewSize * sizeof(Integer));
-      move(InternalRectRectArr^, Tmp^, IntArrSize * sizeof(Integer));
-      Inc(IntArrSize, NewSize);
-      Freemem(InternalRectRectArr);
-      InternalRectRectArr := Tmp;
-      {$ENDIF}
     end;
     Result := InternalRectRectArr^[Index];
     if Result = nil then begin
Index: components/turbopower_ipro/iphtmlblocklayout.pas
===================================================================
--- components/turbopower_ipro/iphtmlblocklayout.pas	(revision 64095)
+++ components/turbopower_ipro/iphtmlblocklayout.pas	(working copy)
@@ -129,7 +129,7 @@
   inherited Create(AOwner);
   FIpHtml := FOwner.Owner;
   FBlockOwner := TIpHtmlNodeBlock(FOwner);
-  FElementQueue := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
+  FElementQueue := TFPList.Create;
 end;
 
 destructor TIpNodeBlockLayouter.Destroy;
@@ -169,17 +169,10 @@
   Assert(FCanvas.Font.Name = aProps.FontName, 'UpdPropMetrics: FCanvas.Font.Name <> aProps.FontName');
   Assert(FCanvas.Font.Size = aProps.FontSize, 'UpdPropMetrics: FCanvas.Font.Size <> aProps.FontSize');
   Assert(FCanvas.Font.Style = aProps.FontStyle, 'UpdPropMetrics: FCanvas.Font.Style <> aProps.FontStyle');
-  {$IFDEF IP_LAZARUS}
   FCanvas.GetTextMetrics(TextMetrics);
   aProps.PropA.tmAscent := TextMetrics.Ascender;
   aProps.PropA.tmDescent := TextMetrics.Descender;
   aProps.PropA.tmHeight := TextMetrics.Height;
-  {$ELSE}
-  GetTextMetrics(FCanvas.Handle, TextMetrics);
-  aProps.PropA.tmAscent := TextMetrics.tmAscent;
-  aProps.PropA.tmDescent := TextMetrics.tmDescent;
-  aProps.PropA.tmHeight := TextMetrics.tmHeight;
-  {$ENDIF}
 end;
 
 procedure TIpNodeBlockLayouter.Layout(RenderProps: TIpHtmlProps; TargetRect: TRect);
@@ -256,7 +249,6 @@
 end;
 
 procedure TIpNodeBlockLayouter.InitMetrics;
-{$IFDEF IP_LAZARUS}
 var
   TextMetrics : TLCLTextMetric;
 begin
@@ -265,16 +257,6 @@
   FBlockDescent := TextMetrics.Descender;
   FBlockHeight := TextMetrics.Height;
 end;
-{$ELSE}
-var
-  TextMetrics : TTextMetric;
-begin
-  GetTextMetrics(aCanvas.Handle, TextMetrics);
-  BlockAscent := TextMetrics.tmAscent;
-  BlockDescent := TextMetrics.tmDescent;
-  BlockHeight := TextMetrics.tmHeight;
-end;
-{$ENDIF}
 
 function TIpNodeBlockLayouter.QueueLeadingObjects: Integer;
 // Returns the first element index.
@@ -756,20 +738,17 @@
 procedure TIpNodeBlockLayouter.SetWordInfoLength(NewLength : Integer);
 var
   NewWordInfoSize: Integer;
-  {$IFNDEF IP_LAZARUS}
-  NewWordInfo: PWordList;
-  {$ENDIF}
 begin
   if (FWordInfo = nil) or (NewLength > FWordInfoSize) then begin
     NewWordInfoSize := ((NewLength div 256) + 1) * 256;
-    {$IFDEF IP_LAZARUS code below does not check if FWordInfo<>nil}
+    //code below does not check if FWordInfo<>nil
     ReallocMem(FWordInfo,NewWordInfoSize * sizeof(TWordInfo));
-    {$ELSE}
+    (*
     NewWordInfo := AllocMem(NewWordInfoSize * sizeof(TWordInfo));
     move(WordInfo^, NewWordInfo^, WordInfoSize);
     Freemem(WordInfo);
     WordInfo := NewWordInfo;
-    {$ENDIF}
+    *)
     FWordInfoSize := NewWordInfoSize;
   end;
 end;
@@ -1237,9 +1216,7 @@
 
 procedure TIpNodeBlockLayouter.DoRenderFont(var aCurWord: PIpHtmlElement);
 begin
-  {$IFDEF IP_LAZARUS}
   FCanvas.Font.BeginUpdate; // for speedup
-  {$ENDIF}
   if (FCurProps = nil) or not FCurProps.AIsEqualTo(aCurWord.Props) then
     with aCurWord.Props do begin
       FCanvas.Font.Name := FontName;
@@ -1255,9 +1232,7 @@
     if (FCurProps = nil) or not FCurProps.BIsEqualTo(aCurWord.Props) then
       FCanvas.Font.Color := aCurWord.Props.FontColor;
   FIpHtml.Target.Font.Quality := FIpHtml.FontQuality;
-  {$IFDEF IP_LAZARUS}
   FIpHtml.Target.Font.EndUpdate;
-  {$ENDIF}
   FCurProps := aCurWord.Props;
 end;
 
@@ -1266,7 +1241,6 @@
 var
   P : TPoint;
   R : TRect;
-  {$IFDEF IP_LAZARUS}
   TextStyle: TTextStyle;
   OldBrushcolor: TColor;
   OldFontColor: TColor;
@@ -1291,7 +1265,6 @@
     FCanvas.Font.Style := OldFontStyle;
     FCanvas.Font.Quality := OldFontQuality;
   end;
-  {$ENDIF}
 
 begin
   P := FIpHtml.PagePtToScreen(aCurWord.WordRect2.TopLeft);
@@ -1302,7 +1275,6 @@
   then
     exit;
 
-  {$IFDEF IP_LAZARUS}
   //if (LastOwner <> aCurWord.Owner) then LastPoint := P;
   saveCanvasProperties;
   TextStyle := FCanvas.TextStyle;
@@ -1323,10 +1295,7 @@
   else
   begin
     TextStyle.Opaque := True;
-  {$ENDIF}
     FCanvas.Brush.Style := bsClear;
-
-  {$IFDEF IP_LAZARUS}
   end;
 
   if aCurWord.Owner.ParentNode = aCurTabFocus then
@@ -1334,16 +1303,9 @@
   if FCanvas.Font.Color = clNone then
     FCanvas.Font.Color := clBlack;
   FCanvas.Font.Quality := FOwner.Owner.FontQuality;
-  {$ENDIF}
   if aCurWord.AnsiWord <> NAnchorChar then
-  {$IFDEF IP_LAZARUS}
     FCanvas.TextRect(R, P.x, P.y, NoBreakToSpace(aCurWord.AnsiWord), TextStyle);
-  {$ELSE}
-  FCanvas.TextRect(R, P.x, P.y, NoBreakToSpace(aCurWord.AnsiWord));
-  {$ENDIF}
-  {$IFDEF IP_LAZARUS}
   RestoreCanvasProperties;
-  {$ENDIF}
 
   FIpHtml.AddRect(aCurWord.WordRect2, aCurWord, FBlockOwner);
 end;
@@ -1361,7 +1323,6 @@
   L0 := FBlockOwner.Level0;
   FCurProps := nil;
   FCanvas := FIpHtml.Target;
-  {$IFDEF IP_LAZARUS}
   // to draw focus rect
   i := FIpHtml.TabList.Index;
   if (FIpHtml.TabList.Count > 0) and (i <> -1) then
@@ -1368,7 +1329,6 @@
     CurTabFocus := TIpHtmlNode(FIpHtml.TabList[i])
   else
     CurTabFocus := nil;
-  {$ENDIF}
 
   for i := 0 to pred(FElementQueue.Count) do begin
     CurWord := PIpHtmlElement(FElementQueue[i]);
@@ -1533,9 +1493,7 @@
 begin
   Props.Assign(RenderProps);
   Props.DelayCache:=True;
-  {$IFDEF IP_LAZARUS}
   FOwner.LoadAndApplyCSSProps;
-  {$ENDIF}
 //DebugLn('td :', IntToStr(Integer(Props.Alignment)));
   if FTableElemOwner.BgColor <> clNone then
     Props.BgColor := FTableElemOwner.BgColor;
Index: components/turbopower_ipro/iphtmlpv.pas
===================================================================
--- components/turbopower_ipro/iphtmlpv.pas	(revision 64095)
+++ components/turbopower_ipro/iphtmlpv.pas	(working copy)
@@ -39,14 +39,10 @@
 interface
 
 uses
-  {$IFDEF IP_LAZARUS}
   LCLType,
   GraphType,
   LCLIntf,
   Buttons,
-  {$ELSE}
-  Windows,
-  {$ENDIF}
   Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
   StdCtrls, ExtCtrls, Spin, IpHtml, IpConst;
 
@@ -123,11 +119,7 @@
 uses
   Printers;
 
-{$IFNDEF IP_LAZARUS}
-{$R *.DFM}
-{$ELSE}
 {$R *.lfm}
-{$ENDIF}
 
 const
   SCRATCH_WIDTH = 800; //640;
@@ -368,7 +360,6 @@
 begin
   ScrollBox1.HorzScrollBar.Position := 0;
   ScrollBox1.VertScrollBar.Position := 0;
-  {$IFDEF IP_LAZARUS}
   if Printer.PageHeight > 0 then
     PaperPanel.Height := round(Printer.PageHeight * Scale)
   else
@@ -377,10 +368,6 @@
     PaperPanel.Width := round(Printer.PageWidth * Scale)
   else
     PaperPanel.Width := round(500 * Scale);
-  {$ELSE}
-  PaperPanel.Width := round(Printer.PageWidth * Scale);
-  PaperPanel.Height := round(Printer.PageHeight * Scale);
-  {$ENDIF}
 
   PaintBox1.Left := round(OwnerPanel.PrintTopLeft.x * Scale);
   PaintBox1.Top := round(OwnerPanel.PrintTopLeft.y * Scale);
Index: components/turbopower_ipro/iphtmltablelayout.pas
===================================================================
--- components/turbopower_ipro/iphtmltablelayout.pas	(revision 64095)
+++ components/turbopower_ipro/iphtmltablelayout.pas	(working copy)
@@ -278,11 +278,7 @@
                   begin
                     if CellNode.Width.LengthValue <= CellNode.ExpParentWidth then
                       Min0 := MaxI2(Min0, CellNode.Width.LengthValue - 2*FCellPadding
-                      {$IFDEF IP_LAZARUS}
                         - FCellSpacing - RUH);
-                      {$ELSE}
-                        - 2*CS2 - RUH);
-                      {$ENDIF}
                     Max0 := Min0;
                   end;
                 end;
@@ -318,19 +314,11 @@
 
   TWMin := 0;
   TWMax := 0;
-  {$IFDEF IP_LAZARUS}
   CellOverhead := BL + FCellSpacing + BR;
-  {$ELSE}
-  CellOverhead := BL + 2*CS2 + RUH + BR;
-  {$ENDIF}
   for i := 0 to Pred(ColCount) do begin
     Inc(TWMin, ColTextWidthMin[i]);
     Inc(TWMax, ColTextWidthMax[i]);
-    {$IFDEF IP_LAZARUS}
     Inc(CellOverhead, RUH + 2*FCellPadding + FCellSpacing + RUH);
-    {$ELSE}
-    Inc(CellOverhead, 2*FCellPadding + 2*CS2 + RUH);
-    {$ENDIF}
     FRowSp[i] := 0;
   end;
 
@@ -466,36 +454,17 @@
                   CellRect1 := TargetRect;
                   Inc(CellRect1.Left, ColStart[CurCol]);
 
-                  {$IFDEF IP_LAZARUS}
                   Inc(CellRect1.Top, FCellSpacing + RUV);
-                  {$ELSE}
-                  Inc(CellRect1.Top, CS2 + RUV);
-                  {$ENDIF}
 
-                  CellRect1.Right := CellRect1.Left + 2*FCellPadding + ColTextWidth[CurCol]
-                    {$IFnDEF IP_LAZARUS}
-                    + 2*CS2
-                    {$ENDIF}
-                    ;
+                  CellRect1.Right := CellRect1.Left + 2*FCellPadding + ColTextWidth[CurCol];
                   for k := 1 to CellNode.ColSpan - 1 do
                     Inc(CellRect1.Right, ColTextWidth[CurCol + k] + 2*FCellPadding +
-                      {$IFDEF IP_LAZARUS}
                       2*RUH + FCellSpacing);
-                      {$ELSE}
-                      2*CS2 + RUH);
-                      {$ENDIF}
-                  {$IFDEF IP_LAZARUS}
                   // PadRect area of cell excluding rules
                   // CellRect area of text contained in cell
                   CellNode.PadRect := CellRect1;
                   Inc(CellRect1.Top, FCellPadding);
                   inflateRect(CellRect1, -FCellPadding, 0);
-                  {$ELSE}
-                  FPadRect := CellRect1;
-                  InflateRect(FPadRect, -CS2, 0);
-                  Inc(CellRect1.Top, FCellPadding);
-                  InflateRect(CellRect1, -(FCellPadding + CS2), 0);
-                  {$ENDIF}
 
                   VA := CellNode.VAlign;
                   if VA = hva3Default then
@@ -563,11 +532,7 @@
 
                   AL := AL0;
 
-                  {$IFDEF IP_LAZARUS}
                   HA := maxYY - (TargetRect.Top + FCellSpacing + RUV);
-                  {$ELSE}
-                  HA := maxYY - TargetRect.Top;
-                  {$ENDIF}
                   HB := CellNode.PageRect.Bottom - CellNode.PageRect.Top;
 
                   VA := CellNode.VAlign;
@@ -586,30 +551,14 @@
                   if Y0 > 0 then begin
                     CellRect1 := TargetRect;
                     Inc(CellRect1.Left, ColStart[CurCol]);
-                    {$IFDEF IP_LAZARUS}
                     Inc(CellRect1.Top, FCellSpacing + RUV + Y0);
-                    {$ELSE}
-                    Inc(CellRect1.Top, CS2 + RUV + Y0);
-                    {$ENDIF}
-                    CellRect1.Right := CellRect1.Left + 2*FCellPadding + ColTextWidth[CurCol]
-                      {$IFnDEF IP_LAZARUS}
-                      + 2*CS2
-                      {$ENDIF}
-                      ;
+                    CellRect1.Right := CellRect1.Left + 2*FCellPadding + ColTextWidth[CurCol];
                     for k := 1 to CellNode.ColSpan - 1 do
                       Inc(CellRect1.Right, ColTextWidth[CurCol + k] + 2*FCellPadding +
-                        {$IFDEF IP_LAZARUS}
                         2*RUH + FCellSpacing);
-                        {$ELSE}
-                        2*CS2 + RUH);
-                        {$ENDIF}
 
                     Inc(CellRect1.Top, FCellPadding);
-                    {$IFDEF IP_LAZARUS}
                     inflateRect(CellRect1, -FCellPadding, 0);
-                    {$ELSE}
-                    InflateRect(CellRect1, -(FCellPadding + CS2), 0);
-                    {$ENDIF}
 
                     case CellNode.Align of
                     haDefault : ;
@@ -656,11 +605,7 @@
                 if FRowSp[j] > 0 then
                   FRowSp[j] := FRowSp[j] - 1;
 
-              {$IFDEF IP_LAZARUS}
               TargetRect.Top := MaxI2(maxYY, TargetRect.Top) + RUV;
-              {$ELSE}
-              TargetRect.Top := MaxI2(maxYY, TargetRect.Top);
-              {$ENDIF}
               DeleteFirstSpanRow;
             end;
           end;
@@ -763,11 +708,7 @@
                 case CellNode.Width.LengthType of
                 hlAbsolute :
                   AdjustCol(CellNode.ColSpan, CellNode.Width.LengthValue - 2*FCellPadding
-                  {$IFDEF IP_LAZARUS}
                     - FCellSpacing - RUH);
-                  {$ELSE}
-                    - 2*CS2 - RUH);
-                  {$ENDIF}
                 hlPercent :
                   AdjustCol(CellNode.Colspan,
                             round((FTableWidth - CellOverhead) *
@@ -878,19 +819,11 @@
     R := BorderRect;
   end;
 
-  {$IFDEF IP_LAZARUS}
   ColStart[0] := BL + FCellSpacing + RUH;
-  {$ELSE}
-  ColStart[0] := BL + CS2 + RUH;
-  {$ENDIF}
   FRowSp[0] := 0;
   for i := 1 to Pred(ColCount) do begin
     ColStart[i] := ColStart[i-1] + 2*FCellPadding + ColTextWidth[i-1]
-      {$IFDEF IP_LAZARUS}
       + FCellSpacing + 2*RUH;
-      {$ELSE}
-      + 2*CS2 + RUH;
-      {$ENDIF}
     FRowSp[i] := 0;
   end;
 
@@ -908,11 +841,7 @@
     RowFixup.Free;
   end;
 
-  {$IFDEF IP_LAZARUS}
   Inc(TargetRect.Top, FCellSpacing + RUV + BB);
-  {$ELSE}
-  Inc(TargetRect.Top, CS2 + RUV + BB);
-  {$ENDIF}
 
   R.Right := R.Left + FTableWidth;
   R.Bottom := TargetRect.Top;
@@ -964,11 +893,6 @@
             FColCount := c;
         end;
       end;
-    {$IFnDEF IP_LAZARUS}
-    CS2 := FCellSpacing div 2;
-    if (FCellSpacing > 0) and (CS2 = 0) then
-      CS2 := 1;
-    {$ENDIF}
     RUH := 0;
     RUV := 0;
     case FTableOwner.Rules of
Index: components/turbopower_ipro/iphttpbroker.pas
===================================================================
--- components/turbopower_ipro/iphttpbroker.pas	(revision 64095)
+++ components/turbopower_ipro/iphttpbroker.pas	(working copy)
@@ -58,9 +58,7 @@
     destructor Destroy; override;
     function GetHtmlStream(const AUrl: string;
       APostData: TIpFormDataEntity): TStream; override;
-  {$IFDEF IP_LAZARUS}
     function DoGetStream(const AUrl: string): TStream; override;
-  {$ENDIF}
     function CheckURL(const AUrl: string;
       var AContentType: string): Boolean; override;
     procedure Leave(AHtml: TIpHtml); override;
@@ -104,7 +102,6 @@
   Result.Seek(0, soFromBeginning);
 end;
 
-{$IFDEF IP_LAZARUS}
 function TIpHttpDataProvider.DoGetStream(const AUrl: string): TStream;
 begin
   Result := TMemoryStream.Create;
@@ -111,7 +108,6 @@
   Result.CopyFrom(FDocumment, 0);
   Result.Seek(0, soFromBeginning);
 end;
-{$ENDIF}
 
 function TIpHttpDataProvider.CheckURL(const AUrl: string;
   var AContentType: string): Boolean;
Index: components/turbopower_ipro/ipmsg.pas
===================================================================
--- components/turbopower_ipro/ipmsg.pas	(revision 64095)
+++ components/turbopower_ipro/ipmsg.pas	(working copy)
@@ -40,19 +40,12 @@
 interface
 
 uses
-  {$IFDEF IP_LAZARUS}
   LCLType,
   LCLIntf,
   LazFileUtils, LazUTF8Classes,
-  {$ELSE}
-  Windows,
-  {$ENDIF}
   Classes,
   SysUtils,
   IpStrms,
-  {$IFNDEF IP_LAZARUS}
-  //IpSock, //JMN
-  {$ENDIF}
   IpUtils,
   IpConst;
 
@@ -568,15 +561,6 @@
     procedure SaveToStream(aStream : TStream);
   end;
 
- {$IFNDEF IP_LAZARUS}
- { dummy class so this unit will be added to the uses clause when an }
- { IpPop3Client, IpSmtpClient or IpNntpClient component is dropped on the form }
- (*** //JMN
- TIpCustomEmailClass = class(TIpCustomClient)
- end;
- **)
- {$ENDIF}
-
 function IpBase64EncodeString(const InStr: string): string;       {!!.02}{!!.03}
 
 {Begin !!.12}
Index: components/turbopower_ipro/ipstrms.pas
===================================================================
--- components/turbopower_ipro/ipstrms.pas	(revision 64095)
+++ components/turbopower_ipro/ipstrms.pas	(working copy)
@@ -42,14 +42,10 @@
 
 uses
   SysUtils, Classes,
-  {$IFDEF IP_LAZARUS}
   // LCL
   LCLType,
   // LazUtils
   FPCAdds, LazFileUtils, IntegerList,
-  {$ELSE}
-  Windows, // put Windows behind Classes because of THandle
-  {$ENDIF}
   IpUtils,
   IpConst;
 
@@ -147,7 +143,7 @@
       FBufPos  : Longint;
       FBufSize : Longint;
       FDirty   : Boolean;
-      FSize    : {$IFDEF IP_LAZARUS}TStreamSeekType{$ELSE}longint{$ENDIF};
+      FSize    : TStreamSeekType;
       FStream  : TStream;
 
     protected {- methods }
@@ -170,7 +166,7 @@
       function Write(const Buffer; Count : Longint) : Longint; override;
 
     public {-properties }
-      property FastSize: {$IFDEF IP_LAZARUS}TStreamSeekType{$ELSE}longint{$ENDIF}
+      property FastSize: TStreamSeekType
         read FSize;
       property Stream : TStream
         read FStream write bsSetStream;
@@ -350,12 +346,9 @@
 
 procedure TIpMemMapStream.CloseFile;
 begin
-  {$IFDEF IP_LAZARUS}
   writeln('TIpMemMapStream.CloseFile ToDo');
-  {$ELSE}
-  if mmFileHandle <> 0 then
-    CloseHandle(mmFileHandle);
-  {$ENDIF}
+{  if mmFileHandle <> 0 then
+    CloseHandle(mmFileHandle);}
 end;
 
 {-----------------------------------------------------------------------------}
@@ -362,14 +355,12 @@
 
 procedure TIpMemMapStream.CloseMap;
 begin
-  {$IFDEF IP_LAZARUS}
   writeln('TIpMemMapStream.CloseMap ToDo');
-  {$ELSE}
-  FlushViewOfFile(mmPointer, 0);
+{  FlushViewOfFile(mmPointer, 0);
   UnMapViewOfFile(mmPointer);
   if mmMapHandle <> 0 then
     CloseHandle(mmMapHandle);
-  {$ENDIF}
+}
 end;
 
 {-----------------------------------------------------------------------------}
@@ -383,11 +374,10 @@
 {-----------------------------------------------------------------------------}
 
 procedure TIpMemMapStream.OpenFile;
-{$IFDEF IP_LAZARUS}
 begin
   writeln('TIpMemMapStream.OpenFile ToDo');
 end;
-{$ELSE}
+(*
 var
   CreateMode,
   Flags,
@@ -427,16 +417,15 @@
     raise EIpBaseException.Create(SysErrorMessage(GetLastError) + SFilename +
                                   mmFileName);
 end;
-{$ENDIF}
+*)
 
 {-----------------------------------------------------------------------------}
 
 procedure TIpMemMapStream.OpenMap;
-{$IFDEF IP_LAZARUS}
 begin
   writeln('TIpMemMapStream.OpenMap ToDo');
 end;
-{$ELSE}
+(*
 var
   AccessMode,
   ProtectMode,
@@ -480,7 +469,7 @@
                                   mmFileName);
   mmPos := 0;
 end;
-{$ENDIF}
+*)
 
 {-----------------------------------------------------------------------------}
 
@@ -495,9 +484,8 @@
     SavPos := mmPos;
   CloseMap;
 
-  {$IFDEF IP_LAZARUS}
   writeln('TIpMemMapStream.Resize ToDo');
-  {$ELSE}
+(*
   { Update the size of the file. }
   if SetFilePointer(mmFileHandle, NewSize, nil, FILE_BEGIN) <> $FFFFFFFF then begin
     if SetEndOfFile(mmFileHandle) = false then
@@ -507,7 +495,7 @@
   else
     raise EIpBaseException.Create(SysErrorMessage(GetLastError) + SFilename +
                                   mmFileName);
-  {$ENDIF}
+*)
 
   { Update internal size information. }
   FSize := NewSize;
@@ -1151,32 +1139,12 @@
      be less than it because we read the last line of all and it was
      short}
     StLen := FixedLineLength;
-    {$IFDEF MSWindows}
     SetLength(Result, StLen);
-    {$ELSE}
-    {$IFDEF IP_LAZARUS}
-    SetLength(Result, StLen);
-    {$ELSE}
-    if (StLen > 255) then
-      StLen := 255;
-    Result[0] := char(StLen);
-    {$ENDIF}
-    {$ENDIF}
     if (Len < StLen) then
       FillChar(Result[Len+1], StLen-Len, ' ');
   end
   else {LineTerminator is not ltNone} begin
-    {$IFDEF MSWindows}
     SetLength(Result, Len);
-    {$ELSE}
-    {$IFDEF IP_LAZARUS}
-    SetLength(Result, Len);
-    {$ELSE}
-    if (Len > 255) then
-      Len := 255;
-    Result[0] := char(Len);
-    {$ENDIF}
-    {$ENDIF}
   end;
   {read the line}
   Seek(CurPos, soFromBeginning);
@@ -1596,13 +1564,11 @@
 
 destructor TIpDownloadFileStream.Destroy;
 begin
-  {$IFDEF IP_LAZARUS}
   writeln('ToDo: TIpDownloadFileStream.Destroy ');
-  {$ELSE}
-  FlushFileBuffers(FHandle);
+{  FlushFileBuffers(FHandle);
   if (Handle <> INVALID_HANDLE_VALUE) then
     CloseHandle(Handle);
-  {$ENDIF}
+}
   inherited Destroy;
 end;
 
@@ -1623,12 +1589,11 @@
 end;
 
 function TIpDownloadFileStream.Read(var Buffer; Count : Longint) : Longint;
-{$IFDEF IP_LAZARUS}
 begin
   writeln('ToDo: TIpDownloadFileStream.Read ');
   Result:=0;
 end;
-{$ELSE}
+{
 var
   ReadOK : Bool;
 begin
@@ -1639,25 +1604,22 @@
     Result := 0;
   end;
 end;
-{$ENDIF}
+}
 
 procedure TIpDownloadFileStream.Rename(aNewName : string);
 var
   NewFullName : string;
 begin
-  {$IFDEF IP_LAZARUS}
   writeln('ToDo: TIpDownloadFileStream.Rename ');
-  {$ENDIF}
   {close the current handle}
-  {$IFNDEF IP_LAZARUS}
-  CloseHandle(Handle);
-  {$ENDIF}
+
+//  CloseHandle(Handle);
   FHandle := IpFileOpenFailed;
   {calculate the full new name}
   NewFullName := FPath + '\' + aNewName;
   {rename the file}
 {$IFDEF Version6OrHigher}
-  {$IFNDEF IP_LAZARUS}
+  {$IFNDEF IP_LAZARUS} //TODO need review
   if not MoveFile(PAnsiChar(FFileName), PAnsiChar(NewFullName)) then
     RaiseLastOSError;
   {$ENDIF}
@@ -1684,17 +1646,13 @@
 
 procedure TIpDownloadFileStream.Move(aNewName : string);
 begin
-  {$IFDEF IP_LAZARUS}
   writeln('ToDo: TIpDownloadFileStream.Move ');
-  {$ENDIF}
   {close the current handle}
-  {$IFNDEF IP_LAZARUS}
-  CloseHandle(Handle);
-  {$ENDIF}
+  //CloseHandle(Handle);
   FHandle := IpFileOpenFailed;
   {copy the file}                                                      {!!.01}
 {$IFDEF Version6OrHigher}
-  {$IFNDEF IP_LAZARUS}
+  {$IFNDEF IP_LAZARUS} //TODO Need review
   if not CopyFile(PAnsiChar(FFileName), PAnsiChar(aNewName), False) then
     RaiseLastOSError;
   {$ENDIF}
@@ -1723,21 +1681,17 @@
 
 function TIpDownloadFileStream.Seek(Offset : Longint; Origin : Word) : Longint;
 begin
-  {$IFDEF IP_LAZARUS}
   writeln('ToDo: TIpDownloadFileStream.Seek');
   Result := 0;
-  {$ELSE}
-  Result := SetFilePointer(Handle, Offset, nil, Origin);
-  {$ENDIF}
+  //Result := SetFilePointer(Handle, Offset, nil, Origin);
 end;
 
 function TIpDownloadFileStream.Write(const Buffer; Count : Longint) : Longint;
-{$IFDEF IP_LAZARUS}
 begin
   writeln('ToDo: TIpDownloadFileStream.Write');
   Result:=Count;
 end;
-{$ELSE}
+{
 var
   WriteOK : Bool;
 begin
@@ -1748,7 +1702,7 @@
     Result := 0
   end;
 end;
-{$ENDIF}
+}
 
 
 { TIpByteStream }
Index: components/turbopower_ipro/iputils.pas
===================================================================
--- components/turbopower_ipro/iputils.pas	(revision 64095)
+++ components/turbopower_ipro/iputils.pas	(working copy)
@@ -36,13 +36,8 @@
 
 uses
   SysUtils, Classes, Controls, Registry, ComCtrls,
-  {$IFDEF IP_LAZARUS}
   LCLType, GraphType, LCLIntf, LMessages, LazFileUtils, lazutf8classes, LCLProc;
-  {$ELSE}
-  Messages, Windows, ExtCtrls, SyncObjs;
-  {$ENDIF}
 
-
 const
   InternetProfessionalVersion = 1.15;
   sShortVersion = 'v%.2f';
@@ -73,9 +68,7 @@
   CM_IPSMTPEVENT        = IpMsgBase + 21;
   CM_IPPOP3EVENT        = IpMsgBase + 22;
   CM_IPNNTPEVENT        = IpMsgBase + 23;
-  {$IFDEF IP_LAZARUS}
   CM_IPHOTINVOKE        = IpMsgBase + 24;
-  {$ENDIF}
 
 type
   TIpLineTerminator = (ltNone, ltCR, ltLF, ltCRLF, ltOther);
@@ -107,11 +100,7 @@
 
   TIpBaseAccess = class
   private
-   {$IFDEF IP_LAZARUS}
     baPropCS : TCriticalSection;
-   {$ELSE}
-    baPropCS : TRTLCriticalSection;
-   {$ENDIF}
   public
     constructor Create; virtual;
     destructor Destroy; override;
@@ -121,11 +110,7 @@
 
   TIpBasePersistent = class(TPersistent)
   private
-   {$IFDEF IP_LAZARUS}
     bpPropCS : TCriticalSection;
-   {$ELSE}
-    bpPropCS : TRTLCriticalSection;
-   {$ENDIF}
   public
     constructor Create; virtual;
     destructor Destroy; override;
@@ -210,10 +195,8 @@
     QueryDelim : AnsiChar;
   end;
   
-  {$IFDEF IP_LAZARUS}
   procedure Initialize(var AddrRec: TIpAddrRec);
   procedure Finalize(var AddrRec: TIpAddrRec);
-  {$ENDIF}
 
   function ExtractEntityName(const NamePath: string): string;
   function ExtractEntityPath(const NamePath: string): string;
@@ -254,16 +237,12 @@
 
 { Allow other processes a chance to run }
 function SafeYield : LongInt;
-{$IFNDEF IP_LAZARUS}
-var
-  Msg : TMsg;
-{$ENDIF}
 begin
   SafeYield := 0;
-  {$IFDEF IP_LAZARUS}
   writeln('ToDo: IpUtils.SafeYield');
-  exit;
-  {$ELSE}
+(*
+  var
+    Msg : TMsg;
   if PeekMessage(Msg, 0, 0, 0, PM_REMOVE) then begin
     if Msg.Message = wm_Quit then
       {Re-post quit message so main message loop will terminate}
@@ -274,8 +253,7 @@
     end;
     {Return message so caller can act on message if necessary}
     SafeYield := MAKELONG(Msg.Message, Msg.hwnd);
-  end;
-  {$ENDIF}
+*)
 end;
 
 { Trim leading and trailing spaces from a string }
@@ -457,7 +435,6 @@
     Result := Result + (Idx - 1);
 end;
 
-{$IFDEF IP_LAZARUS}
 procedure Initialize(var AddrRec: TIpAddrRec);
 begin
   AddrRec.QueryDelim:=#0;
@@ -476,7 +453,6 @@
     Query      :='';
   end;
 end;
-{$ENDIF}
 
 const
   CrcBufSize = 2048;
@@ -861,7 +837,6 @@
 
 { Compares two fixed size structures }
 function IpCompStruct(const S1, S2; Size : Cardinal) : Integer;
-{$IFDEF IP_LAZARUS}
 {$IFDEF CPUI386}
 asm
   push   edi
@@ -888,35 +863,7 @@
   Result := CompareMemRange(@S1, @S2, Size);
 end;
 {$ENDIF}
-{$ELSE}
-{$IFDEF CPU386}
-asm
-  push   edi
-  push   esi
-  mov    esi, eax
-  mov    edi, edx
-  xor    eax, eax
-  or     ecx, ecx
-  jz     @@CSDone
 
-  repe   cmpsb
-  je     @@CSDone
-
-  inc    eax
-  ja     @@CSDone
-  or     eax, -1
-
-@@CSDone:
-  pop    esi
-  pop    edi
-end;
-{$ELSE}
-begin
-  Result := CompareMemRange(@S1, @S2, Size);
-end;
-{$ENDIF}
-{$ENDIF}
-
 function IpCharCount(const Buffer; BufSize : DWORD; C : AnsiChar) : DWORD;
   register;
 {$IFDEF CPUI386}
@@ -1086,17 +1033,13 @@
 { Returns an appropriate string for the given parameters }
 class function TIpBaseComponent.GetLogString(const S, D1, D2, D3: DWORD): string;
 begin
-  {$IFDEF IP_LAZARUS}
   if (S=0) or (D1=0) or (D2=0) or (D3=0) then ; // avoid hints
-  {$ENDIF}
-  Result := '!!!! Unhandled log entry'#10#13;
+    Result := '!!!! Unhandled log entry'#10#13;
 end;
 
 procedure TIpBaseComponent.SetVersion(const Value: string);
 begin
-  {$IFDEF IP_LAZARUS}
   if (Value='') then ; // avoid hints
-  {$ENDIF}
   { Intentionally empty }
 end;
 
@@ -1109,9 +1052,7 @@
 
 procedure TIpBaseWinControl.SetVersion(const Value : string);
 begin
-  {$IFDEF IP_LAZARUS}
   if (Value='') then ; // avoid hints
-  {$ENDIF}
   { Intentionally empty }
 end;
 
@@ -1183,11 +1124,7 @@
   for i := 1 to Length(Result) do begin
     case Result[i] of
       '|': Result[i] := ':';
-      {$IFDEF IP_LAZARUS}
       '/': Result[i] := DirectorySeparator;
-      {$ELSE}
-      '/': Result[i] := '\';
-      {$ENDIF}
     else
       { leave it alone };
     end;
@@ -1208,11 +1145,7 @@
   for i := 1 to Length(Result) do begin
     case Result[i] of
       ':': Result[i] := '|';
-      {$IFDEF IP_LAZARUS}
       DirectorySeparator: Result[i] := '/';
-      {$ELSE}
-      '\': Result[i] := '/';
-      {$ENDIF}
     else
       { leave it alone };
     end;
@@ -1317,9 +1250,7 @@
   State : TUrlParseState;
   PotAuth, PotPath : string;
   SchemeSeen: Boolean;
-  {$IFDEF IP_LAZARUS}
   SlashCount: integer;
-  {$ENDIF}
 
 procedure ProcessChar;
 begin
@@ -1398,9 +1329,7 @@
               SchemeSeen := True;
               PotAuth := '';
               State := psSchemeSlashes;
-              {$IFDEF IP_LAZARUS}
               SlashCount := 0;
-              {$ENDIF}
             end
             else begin
 
@@ -1454,9 +1383,7 @@
           SchemeSeen := True;
           PotAuth := '';
           State := psSchemeSlashes;
-          {$IFDEF IP_LAZARUS}
           SlashCount := 0;
-          {$ENDIF}
         end;
 
         'A'..'Z', 'a'..'z': begin
@@ -1483,30 +1410,25 @@
     end;
 
     psSchemeSlashes: begin
-      {$IFDEF IP_LAZARUS}
       inc(SlashCount);
       if (p^ <> '/') or (SlashCount > 2) then
-      {$ENDIF}
-      case P^ of
-        {$IFNDEF IP_LAZARUS}
-        '/': { ignore };
-        {$ENDIF}
-        '.', '\'{$IFDEF IP_LAZARUS},'/'{$ENDIF}: begin { start of a local path }
-          PotPath := PotPath + P^;
-          State := psLocalPath;
-        end;
+        case P^ of
+          '.', '\','/': begin { start of a local path }
+            PotPath := PotPath + P^;
+            State := psLocalPath;
+          end;
 
-        else begin
-          if CharPos('@', URL) > 0 then begin
-            PotAuth := P^;
-            State := psUserName;
-          end
           else begin
-            PotAuth := P^;
-            State := psPotAuth;
+            if CharPos('@', URL) > 0 then begin
+              PotAuth := P^;
+              State := psUserName;
+            end
+            else begin
+              PotAuth := P^;
+              State := psPotAuth;
+            end;
           end;
         end;
-      end;
     end;
 
 
@@ -2655,13 +2577,12 @@
 
 { returns the current local TimeZone "bias" in minutes from UTC (GMT) }
 function TimeZoneBias : Integer;
-{$IFDEF IP_LAZARUS}
 begin
   Result:=0;
   writeln('TimeZoneBias ToDo');
 end;
-{$ELSE}
-{$IFDEF VERSION3}
+
+(*
 const
   TIME_ZONE_ID_UNKNOWN  = 0;
   TIME_ZONE_ID_STANDARD = 1;
@@ -2677,7 +2598,7 @@
     TIME_ZONE_ID_DAYLIGHT : Result := TZI.Bias + TZI.DaylightBias;
   end;
 end;
-{$ENDIF}
+*)
 
 { Format TDateTime to standard HTTP date string }
 function DateTimeToINetDateTimeStr(DateTime: TDateTime): string;
@@ -2699,7 +2620,6 @@
 { File/Directory Stuff }
 
 { Retreive Windows "MIME" type for a particular file extension }
-{$IFDEF IP_LAZARUS}
 {$ifndef MSWindows}
 {define some basic mime types}
 const MimeTypeExt : Array[0..4] of String = ('.htm','.html','.txt','.jpg','.png');
@@ -2742,105 +2662,39 @@
   //DebugLn('IpUtils.GetLocalContent File:'+TheFileName+' Result:'+result);
 end;
 
-{$ELSE}
-{ Retreive Windows "MIME" type for a particular file extension }
-function GetLocalContent(const TheFileName: string): string;
-var
-  Reg : TRegistry;
-  Ext : string;
-begin
-  Result := '';
-  Ext := ExtractFileExt(TheFileName);
-
-  Reg := nil;
-  try
-    Reg := TRegistry.Create;
-    Reg.RootKey := HKEY_CLASSES_ROOT;
-    if Reg.OpenKey(Ext, True) then
-      Result := Reg.ReadString('Content Type');
-  finally
-    Reg.CloseKey;
-    Reg.Free;
-  end;
-end;
-{$ENDIF}
-
 { Determine if a directory exists }
 function DirExists(Dir : string): Boolean;
-{$IFDEF IP_LAZARUS}
 begin
   Result:=DirPathExists(Dir);
 end;
-{$ELSE}
-var
-  Attributes : Integer;
-begin
-  Attributes := GetFileAttributes(PAnsiChar(Dir));
-  Result := (Attributes <> -1) and
-    (Attributes and FILE_ATTRIBUTE_DIRECTORY <> 0);
-end;
-{$ENDIF}
 
 {Begin !!.12}
 { Get temporary filename as string }
 function GetTemporaryFile(const Path : string) : string;
-{$IFDEF IP_LAZARUS}
 begin
   Result:=GetTempFileNameUTF8(Path,'IP_');
 end;
-{$ELSE}
-var
-  TempFileName : array [0..MAX_PATH] of AnsiChar;
-begin
-  { Create a new uniquely named file in that folder. }
-  GetTempFileName(PAnsiChar(Path), 'IP_', 0, TempFileName);
-  Result := TempFileName;
-end;
-{$ENDIF}
 {End !!.12}
 
 { Get Windows system TEMP path in a string }
 function GetTemporaryPath: string;
-{$IFDEF IP_LAZARUS}
 begin
   writeln('ToDo: IpUtils.GetTemporaryPath');
   Result:='';
 end;
-{$ELSE}
-var
-  PathBuf : array [0..MAX_PATH] of char;
-begin
-  GetTempPath(MAX_PATH + 1, PathBuf);
-  Result := StrPas(PathBuf);
-end;
-{$ENDIF}
 
 { Append backslash to DOS path if needed }
 function AppendBackSlash(APath : string) : string;
 begin
-{$IFDEF IP_LAZARUS}
   Result := AppendPathDelim(APath);
-{$ELSE}
-  Result := APath;
-  if (Result <> '') and (Result[Length(APath)] <> '\') then
-    Result := Result + '\';
-{$ENDIF}
 end;
 
 { Remove trailing backslash from a DOS path if needed }
 function RemoveBackSlash(APath: string) : string;
 begin
-{$IFDEF IP_LAZARUS}
   Result := ChompPathDelim(APath);
-{$ELSE}
-  Result := APath;
-  if Result[Length(Result)] = '\' then
-    Delete(Result, Length(Result), 1);
-{$ENDIF}
 end;
 
-
-
 {***********************************************}
 
 {cookie support}
removing-ip-lazarus-define.patch (114,936 bytes)   

Juha Manninen

2020-11-01 11:38

developer   ~0126683

The first patch looks good. I applied it in r64097. Thanks.

Zaher Dirkey

2020-11-01 21:03

reporter   ~0126690

Next patch, I removed VERSION3..7 and similar unused defines, I keep some maybe in future will be used

I wonder what is
{!!.02}
can I remove it? if not, you can resolve this issue, and thanks :)
removing-ip-lazarus-define02.patch (14,367 bytes)   
Index: ipdefine.inc
===================================================================
--- ipdefine.inc	(revision 64098)
+++ ipdefine.inc	(working copy)
@@ -33,181 +33,27 @@
        so options specified here could be overridden by hardcoded
        options in the unit source file.}
 
-{$IFDEF LCL}
-{$DEFINE IP_LAZARUS}
-{$ENDIF}
+{$MODE DELPHI}{$H+}
 
+// Activate several features of the package by enabling the following DEFINEs.
+// Best flexibility is achieved by doing this in the "Additions and Overrides"
+// of the Project options.
 
-{$IFDEF IP_LAZARUS}
+// Uncomment if you want to enable printing functionality
 
-  {$MODE DELPHI}{$H+}
+//{$DEFINECSS_CASESENSITIVE_CLASSID}
 
-  {$DEFINE VERSION7}          { Delphi 7.0 or higher }
-  {$DEFINE VERSION4}
-  {$DEFINE VERSION5}
-  {$DEFINE Version6OrHigher}
-  {$DEFINE Version7OrHigher}
+//{$DEFINE IP_LAZARUS_DBG}
 
-  // Activate several features of the package by enabling the following DEFINEs.
-  // Best flexibility is achieved by doing this in the "Additions and Overrides"
-  // of the Project options.
-
-  // Uncomment if you want to enable printing functionality
-  // (requires extra build/runtime dependencies for Linux like cairo,etc)
-  //{$DEFINE Html_print}
-
-  // Uncomment if you want to disable RTTI access to properties of the HTML nodes
-  //{$DEFINE Html_RTTI}
-
-{$ELSE}
-
-{====Compiler options that can be changed====}
-{$A+ Force alignment on word/dword boundaries}
-{$S- No stack checking}
-
-{====Global fixed compiler options (do NOT change)====}
-
-{$B- Incomplete boolean evaluation}
-{$H+ Long string support}
-{$J+ Writeable typed constants}
-{$P- No open string parameters}
-{$Q- No arithmetic overflow checking}
-{$R- No range checking}
-{$T- No type-checked pointers}
-{$V- No var string checking}
-{$X+ Extended syntax}
-{$Z1 Enumerations are byte sized}
-
-{====General defines=================================================}
-
-{.$DEFINE UseGifImageUnit}
-
-{$IFDEF VER110}
-  {.$DEFINE UseJPegUnit}  {BCB3 does not include the JPeg unit by default}
-{$ELSE}
-  {$DEFINE UseJPegUnit}
-{$ENDIF}
-
-// Define the following symbol to use the TIpAnimatedGIFImage class.  To use
-// this class, you must have Ander's TGIFImage.
-{.$DEFINE AndersGIFImage }
-
-// Define the following symbol to use the TIpAnimatedImageLibImage.  To use
-// this class, you must have the ImageLib ILWebImage component.
-{.$DEFINE ImageLibGIFImage }
-
-// Define this symbol to use the TIpPNGImage class.  TIpPNGImage requires the
-// ZLib library.
-{$DEFINE UsePNGGraphic }
-
-// !!.12 Define this symbol to exclude all support for HTTP and sockets in
-// an application using the HTML panels, e.g. for HTML based wizards
-{.$DEFINE HtmlWithoutHttp}
-
-// Uncomment if you want to enable printing functionality
 // (requires extra build/runtime dependencies for Linux like cairo,etc)
-{$DEFINE Html_print}
+//{$DEFINE Html_print}
 
-// we do not want to include PNG support when building the design-time package
-// (that would cause problems if another package also included ZLib).  We also
-// do not want to include units that aren't ours, so we'll undefine the other
-// graphics stuff too. When rebuilding the design-time package, the
-// 'BuildingDesignTime' define must be defined
-{$IFDEF BuildingDesignTime}
-  {$UNDEF UseGifImageUnit}
-  {$UNDEF AndersGIFImage}
-  {$UNDEF ImageLibGIFImage}
-  {$UNDEF UsePNGGraphic}
-  {$DEFINE HtmlWithoutHttp}
-{$ENDIF}
+// Uncomment if you want to disable RTTI access to properties of the HTML nodes
+//{$DEFINE Html_RTTI}
 
-{-------- !! DO NOT CHANGE DEFINES BELOW THIS LINE !! --------}
-
-{ Compiler stoppers for unsupported compilers }
-
-{$IFDEF VER80}
-  !!! Internet Professional does not support Delphi 1
-{$ENDIF}
-
-{$IFDEF VER90}
-  !!! Internet Professional does not support Delphi 2
-{$ENDIF}
-
-{$IFDEF VER93}
-  !!! Internet Professional does not support C++Builder 1
-{$ENDIF}
-
-{$DEFINE VERSION3}            { Delphi 3.0 or BCB 3.0 or higher }
-
-{ General define indicating use under C++ Builder }
-
-{$IFDEF VER110}               { C++ Builder 3 }
- {$DEFINE CBuilder}
- {$ObjExportAll On}
-{$ENDIF}
-
-{$IFDEF VER125}               { C++ Builder 4 }
- {$DEFINE CBuilder}
- {$ObjExportAll On}
-{$ENDIF}
-
-{$IFDEF VER130}               { Delphi 5 & C++ Builder 5 }
- {$IFDEF BCB}                 { C++ Builder 5 }
-  {$DEFINE CBuilder}
-  {$ObjExportAll On}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VER140}               { Delphi 6 & C++Builder 6 }
-  {$IFDEF BCB}                { C++ Builder 6}
-    {$DEFINE CBuilder}
-    {$ObjExportAll On}
-  {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION3}
- {$IFNDEF VER100}             { Delphi 3 }
-  {$IFNDEF VER110}            { BCB 3 }
-   {$DEFINE VERSION4}         { Delphi 4.0 or higher }
-  {$ENDIF}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION4}
- {$IFNDEF VER120}             { Delphi 4 }
-  {$IFNDEF VER125}            { BCB 4 }
-   {$DEFINE VERSION5}         { Delphi 5.0 or higher }
-  {$ENDIF}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION3}
- {$IFNDEF VERSION4}
-  {$DEFINE VERSION3ONLY}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION3}
-  {$IFDEF VER140}
-     {$DEFINE VERSION6}         { Delphi 6.0 or higher }
-     {$DEFINE Version6OrHigher}
-  {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION3}
-  {$IFDEF VER150}
-    {$DEFINE VERSION7}          { Delphi 7.0 or higher }
-    {$DEFINE Version6OrHigher}
-    {$DEFINE Version7OrHigher}
-  {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION7}
-  {$WARN UNIT_PLATFORM OFF}
-  {$WARN UNSAFE_CODE OFF}
-  {$WARN UNSAFE_TYPE OFF}
-  {$WARN UNSAFE_CAST OFF}
-  {$WARN UNIT_DEPRECATED OFF}
-{$ENDIF}
-
-{$ENDIF}
+// TODO removing it from source code or enable it
+//{$UNDEF UseGifImageUnit}
+//{$UNDEF AndersGIFImage}
+//{$UNDEF ImageLibGIFImage}
+//{$UNDEF UsePNGGraphic}
+//{$DEFINE HtmlWithoutHttp}
Index: iphtml.pas
===================================================================
--- iphtml.pas	(revision 64098)
+++ iphtml.pas	(working copy)
@@ -105,7 +105,6 @@
 
   TIpAbstractHtmlDataProvider = class;
 
-  {.$DEFINE CSS_CASESENSITIVE_CLASSID}
   {$DEFINE CSS_INTERFACE}
 {$I ipcss.inc}
   {$UNDEF CSS_INTERFACE}
@@ -2740,16 +2739,12 @@
     property Align;
     property ALinkColor;
     property AllowTextSelect;
-    {$IFDEF VERSION4}
     property Anchors;
-    {$ENDIF}
     property BgColor;
     property BorderSpacing;
     property BorderWidth;
     property BorderStyle;
-    {$IFDEF VERSION4}
     property Constraints;
-    {$ENDIF}
     property DataProvider;
     property Enabled;
     property FixedTypeface;
@@ -2773,12 +2768,8 @@
     property VLinkColor;
     property WantTabs;
     property OnClick;
-    {$IFDEF VERSION4}
     property OnConstrainedResize;
-    {$ENDIF}
-    {$IFDEF VERSION5}
     property OnContextPopup;
-    {$ENDIF}
     property OnControlClick;
     property OnControlClick2;
     property OnControlChange;
@@ -3110,7 +3101,6 @@
   RegisterComponents('IPro', [TIpHtmlPanel]);
 end;
 
-{$IFNDEF VERSION3ONLY}
 type
   THtmlRadioButton = class(TRadioButton)
   protected
@@ -3169,8 +3159,6 @@
 end;
 *)
 
-{$ENDIF}
-
 function GetAlignmentForStr(str: string;
          pDefault: TIpHtmlAlign = haDefault) : TIpHtmlAlign;
 var
@@ -3938,7 +3926,6 @@
   FMax := -1;
 end;
 
-
 { TIpHtmlNode }
 
 function TIpHtmlNode.GetHint: string;
@@ -4186,7 +4173,7 @@
 
   function GetPropType : PTypeInfo;
   begin
-    Result := PI.PropType{$IFDEF VERSION3}^{$ENDIF};
+    Result := PI.PropType;
   end;
 
   function GetIntegerProperty : string;
@@ -4224,11 +4211,7 @@
 
   function GetVariantProperty : string;
   begin
-    {$IFDEF FPC}
     Result := AnsiString(GetVariantProp(AObject, PI));
-    {$ELSE}
-    Result := GetVariantProp(AObject, PI);
-    {$ENDIF}
   end;
 
   function GetStringProperty : string;
@@ -4281,7 +4264,7 @@
 
   function GetPropType : PTypeInfo;
   begin
-    Result := PI.PropType{$IFDEF VERSION3}^{$ENDIF};
+    Result := PI.PropType;
   end;
 
   procedure SetIntegerProperty;
@@ -4296,9 +4279,7 @@
 
   procedure SetEnumProperty;
   begin
-    {$IFDEF VERSION5}
     SetEnumProp(AObject, PI, NewValue);
-    {$ENDIF}
   end;
 
   procedure SetFloatProperty;
@@ -4316,9 +4297,7 @@
 
   procedure SetSetProperty;
   begin
-    {$IFDEF VERSION5}
     SetSetProp(AObject, PI, NewValue);
-    {$ENDIF}
   end;
 
 begin
@@ -11616,11 +11595,7 @@
     end;
   hitRadio :
     begin
-{$IFDEF VERSION3ONLY}
-      with FControl do
-{$ELSE}
       with THtmlRadioButton(FControl) do
-{$ENDIF}
         Checked := Self.Checked;
     end;
   end;
@@ -11708,18 +11683,10 @@
     end;
   hitRadio :
     begin
-{$IFDEF VERSION3ONLY}
-      FControl := TRadioButton.Create(Parent);
-{$ELSE}
       FControl := THtmlRadioButton.Create(Parent);
-{$ENDIF}
       FControl.Tag := PtrInt(OwnerForm);
       setCommonProperties;
-{$IFDEF VERSION3ONLY}
-      with TRadioButton(FControl) do begin
-{$ELSE}
       with THtmlRadioButton(FControl) do begin
-{$ENDIF}
         Color := Brush.Color;
         SetWidthHeight(1, 8, 0);
         Checked := Self.Checked;
@@ -11841,7 +11808,7 @@
 }
   inherited;
   if (Props.BgColor <> clNone) and (
-    (FControl is {$IFDEF VERSION3ONLY}TRadioButton{$ELSE}THtmlRadioButton{$ENDIF}) or
+    (FControl is THtmlRadioButton) or
     (FControl is TCustomEdit)) then
     FControl.Color := Props.BgColor;
 end;
@@ -11899,11 +11866,7 @@
     hitCheckbox :
       Result := TCheckBox(FControl).Checked;
     hitRadio :
-{$IFDEF VERSION3ONLY}
-      Result := TRadioButton(FControl).Checked;
-{$ELSE}
       Result := THtmlRadioButton(FControl).Checked;
-{$ENDIF}
     hitFile :
       Result := FFileEdit.Text <> '';
     hitHidden :
@@ -11935,11 +11898,7 @@
   hitCheckbox :
     Checked := TCheckBox(FControl).Checked;
   hitRadio :
-{$IFDEF VERSION3ONLY}
-    Checked := TRadioButton(FControl).Checked;
-{$ELSE}
     Checked := THtmlRadioButton(FControl).Checked;
-{$ENDIF}
   end;
 end;
 
Index: iphttpbroker.pas
===================================================================
--- iphttpbroker.pas	(revision 64098)
+++ iphttpbroker.pas	(working copy)
@@ -114,11 +114,7 @@
 var
   VAddrRec: TIpAddrRec;
 begin
-{$IFDEF VER2_6}
-  FillChar(VAddrRec, SizeOf(TIpAddrRec), 0);
-{$ELSE}
   VAddrRec := Default(TIpAddrRec);
-{$ENDIF}
   Initialize(VAddrRec);
   try
     IpParseURL(AUrl, VAddrRec);
@@ -125,7 +121,7 @@
     FDocumment.Clear;
     FClient.Get(AUrl, FDocumment);
     Result := (FClient.ResponseStatusCode = 200)
-{$IF FPC_FULLVERSION > 30000}or FClient.IsRedirect(FClient.ResponseStatusCode){$ENDIF};
+      or FClient.IsRedirect(FClient.ResponseStatusCode);
     if Result then
     begin
       FContentType := AllTrimSpaces(FClient.ResponseHeaders.Values['Content-Type']);
Index: ipmsg.pas
===================================================================
--- ipmsg.pas	(revision 64098)
+++ ipmsg.pas	(working copy)
@@ -140,11 +140,8 @@
       procedure SetItem (Index : Integer; Value : TIpHeaderItem);        
 
     public                                                               
-      constructor Create (AOwner : TPersistent);                         
+      constructor Create (AOwner : TPersistent);
 
-      {$IFNDEF VERSION5}                                                 
-      procedure Delete (Item : integer);                                 
-      {$ENDIF}
       function HasHeader (AName : string) : Integer;
       procedure HeaderByName (AName   : string;
                               Headers : TStringList);
@@ -1084,13 +1081,6 @@
   FOwner := AOwner;                                                      
 end;                                                                     
 
-{$IFNDEF VERSION5}                                                       
-procedure TIpHeaderCollection.Delete(Item: integer);                     
-begin                                                                    
-  GetItem(Item).Free;                                                    
-end;                                                                     
-{$ENDIF}                                                                 
-
 function TIpHeaderCollection.GetItem (Index : Integer) : TIpHeaderItem;  
 begin                                                                    
   Result := TIpHeaderItem (inherited GetItem (Index));                   
Index: ipstrms.pas
===================================================================
--- ipstrms.pas	(revision 64098)
+++ ipstrms.pas	(working copy)
@@ -1555,11 +1555,7 @@
 
   FHandle := THandle(FileOpen(FFileName, fmShareDenyNone + fmOpenReadWrite));
   if (Handle = IpFileOpenFailed) then
-{$IFDEF Version6OrHigher}
-    RaiseLastOSError; 
-{$ELSE}
-    RaiseLastWin32Error;
-{$ENDIF}
+    RaiseLastOSError;
 end;
 
 destructor TIpDownloadFileStream.Destroy;
@@ -1618,14 +1614,8 @@
   {calculate the full new name}
   NewFullName := FPath + '\' + aNewName;
   {rename the file}
-{$IFDEF Version6OrHigher}
-  {$IFNDEF IP_LAZARUS} //TODO need review
-  if not MoveFile(PAnsiChar(FFileName), PAnsiChar(NewFullName)) then
+  if not RenameFile(FFileName, NewFullName) then
     RaiseLastOSError;
-  {$ENDIF}
-{$ELSE}
-  Win32Check(MoveFile(PAnsiChar(FFileName), PAnsiChar(NewFullName)));
-{$ENDIF}
   {open up the same file, but with its new name}
   FFileName := NewFullName;
   try
@@ -1635,11 +1625,7 @@
   end;
 
   if (Handle = IpFileOpenFailed) then
-{$IFDEF Version6OrHigher}
     RaiseLastOSError;
-{$ELSE}
-    RaiseLastWin32Error;
-{$ENDIF}
 
   FRenamed  := true;
 end;
@@ -1651,15 +1637,8 @@
   //CloseHandle(Handle);
   FHandle := IpFileOpenFailed;
   {copy the file}                                                      {!!.01}
-{$IFDEF Version6OrHigher}
-  {$IFNDEF IP_LAZARUS} //TODO Need review
-  if not CopyFile(PAnsiChar(FFileName), PAnsiChar(aNewName), False) then
+  if not RenameFile(FFileName, aNewName) then
     RaiseLastOSError;
-  {$ENDIF}
-{$ELSE}
-  Win32Check(CopyFile(PAnsiChar(FFileName),                            {!!.01}
-    PAnsiChar(aNewName), False));                                      {!!.01}
-{$ENDIF}
 
   {open up the same file, but with its new name}
   FFileName := aNewName;
@@ -1670,11 +1649,7 @@
   end;
 
   if (Handle = IpFileOpenFailed) then
-{$IFDEF Version6OrHigher}
     RaiseLastOSError;
-{$ELSE}
-    RaiseLastWin32Error;
-{$ENDIF}
 
   FRenamed  := true;
 end;

wp

2020-11-02 01:11

developer   ~0126692

> I wonder what is {!!.02}

I've seen similar things in other TurboPower components and think this is some kind of version tag. From my point of view there is no need to keep it.

Zaher Dirkey

2020-11-02 09:12

reporter   ~0126693

This patch remove !! and include previous patch
removing-ip-lazarus-define02-repatch.patch (72,556 bytes)   
Index: ipdefct.inc
===================================================================
--- ipdefct.inc	(revision 64098)
+++ ipdefct.inc	(working copy)
@@ -29,7 +29,7 @@
   TIpDefContentInfo = record
     Typ : string;                { content type, e.g. 'application' }
     Sub : string;                { content subtype, e.g. 'octet-stream' }
-    Enc : TIpMimeEncodingMethod; { encoding method, e.g. 'base64' }     {!!.02}
+    Enc : TIpMimeEncodingMethod; { encoding method, e.g. 'base64' }
   end;
 
 const
Index: ipdefine.inc
===================================================================
--- ipdefine.inc	(revision 64098)
+++ ipdefine.inc	(working copy)
@@ -33,181 +33,27 @@
        so options specified here could be overridden by hardcoded
        options in the unit source file.}
 
-{$IFDEF LCL}
-{$DEFINE IP_LAZARUS}
-{$ENDIF}
+{$MODE DELPHI}{$H+}
 
+// Activate several features of the package by enabling the following DEFINEs.
+// Best flexibility is achieved by doing this in the "Additions and Overrides"
+// of the Project options.
 
-{$IFDEF IP_LAZARUS}
+// Uncomment if you want to enable printing functionality
 
-  {$MODE DELPHI}{$H+}
+//{$DEFINECSS_CASESENSITIVE_CLASSID}
 
-  {$DEFINE VERSION7}          { Delphi 7.0 or higher }
-  {$DEFINE VERSION4}
-  {$DEFINE VERSION5}
-  {$DEFINE Version6OrHigher}
-  {$DEFINE Version7OrHigher}
+//{$DEFINE IP_LAZARUS_DBG}
 
-  // Activate several features of the package by enabling the following DEFINEs.
-  // Best flexibility is achieved by doing this in the "Additions and Overrides"
-  // of the Project options.
-
-  // Uncomment if you want to enable printing functionality
-  // (requires extra build/runtime dependencies for Linux like cairo,etc)
-  //{$DEFINE Html_print}
-
-  // Uncomment if you want to disable RTTI access to properties of the HTML nodes
-  //{$DEFINE Html_RTTI}
-
-{$ELSE}
-
-{====Compiler options that can be changed====}
-{$A+ Force alignment on word/dword boundaries}
-{$S- No stack checking}
-
-{====Global fixed compiler options (do NOT change)====}
-
-{$B- Incomplete boolean evaluation}
-{$H+ Long string support}
-{$J+ Writeable typed constants}
-{$P- No open string parameters}
-{$Q- No arithmetic overflow checking}
-{$R- No range checking}
-{$T- No type-checked pointers}
-{$V- No var string checking}
-{$X+ Extended syntax}
-{$Z1 Enumerations are byte sized}
-
-{====General defines=================================================}
-
-{.$DEFINE UseGifImageUnit}
-
-{$IFDEF VER110}
-  {.$DEFINE UseJPegUnit}  {BCB3 does not include the JPeg unit by default}
-{$ELSE}
-  {$DEFINE UseJPegUnit}
-{$ENDIF}
-
-// Define the following symbol to use the TIpAnimatedGIFImage class.  To use
-// this class, you must have Ander's TGIFImage.
-{.$DEFINE AndersGIFImage }
-
-// Define the following symbol to use the TIpAnimatedImageLibImage.  To use
-// this class, you must have the ImageLib ILWebImage component.
-{.$DEFINE ImageLibGIFImage }
-
-// Define this symbol to use the TIpPNGImage class.  TIpPNGImage requires the
-// ZLib library.
-{$DEFINE UsePNGGraphic }
-
-// !!.12 Define this symbol to exclude all support for HTTP and sockets in
-// an application using the HTML panels, e.g. for HTML based wizards
-{.$DEFINE HtmlWithoutHttp}
-
-// Uncomment if you want to enable printing functionality
 // (requires extra build/runtime dependencies for Linux like cairo,etc)
-{$DEFINE Html_print}
+//{$DEFINE Html_print}
 
-// we do not want to include PNG support when building the design-time package
-// (that would cause problems if another package also included ZLib).  We also
-// do not want to include units that aren't ours, so we'll undefine the other
-// graphics stuff too. When rebuilding the design-time package, the
-// 'BuildingDesignTime' define must be defined
-{$IFDEF BuildingDesignTime}
-  {$UNDEF UseGifImageUnit}
-  {$UNDEF AndersGIFImage}
-  {$UNDEF ImageLibGIFImage}
-  {$UNDEF UsePNGGraphic}
-  {$DEFINE HtmlWithoutHttp}
-{$ENDIF}
+// Uncomment if you want to disable RTTI access to properties of the HTML nodes
+//{$DEFINE Html_RTTI}
 
-{-------- !! DO NOT CHANGE DEFINES BELOW THIS LINE !! --------}
-
-{ Compiler stoppers for unsupported compilers }
-
-{$IFDEF VER80}
-  !!! Internet Professional does not support Delphi 1
-{$ENDIF}
-
-{$IFDEF VER90}
-  !!! Internet Professional does not support Delphi 2
-{$ENDIF}
-
-{$IFDEF VER93}
-  !!! Internet Professional does not support C++Builder 1
-{$ENDIF}
-
-{$DEFINE VERSION3}            { Delphi 3.0 or BCB 3.0 or higher }
-
-{ General define indicating use under C++ Builder }
-
-{$IFDEF VER110}               { C++ Builder 3 }
- {$DEFINE CBuilder}
- {$ObjExportAll On}
-{$ENDIF}
-
-{$IFDEF VER125}               { C++ Builder 4 }
- {$DEFINE CBuilder}
- {$ObjExportAll On}
-{$ENDIF}
-
-{$IFDEF VER130}               { Delphi 5 & C++ Builder 5 }
- {$IFDEF BCB}                 { C++ Builder 5 }
-  {$DEFINE CBuilder}
-  {$ObjExportAll On}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VER140}               { Delphi 6 & C++Builder 6 }
-  {$IFDEF BCB}                { C++ Builder 6}
-    {$DEFINE CBuilder}
-    {$ObjExportAll On}
-  {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION3}
- {$IFNDEF VER100}             { Delphi 3 }
-  {$IFNDEF VER110}            { BCB 3 }
-   {$DEFINE VERSION4}         { Delphi 4.0 or higher }
-  {$ENDIF}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION4}
- {$IFNDEF VER120}             { Delphi 4 }
-  {$IFNDEF VER125}            { BCB 4 }
-   {$DEFINE VERSION5}         { Delphi 5.0 or higher }
-  {$ENDIF}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION3}
- {$IFNDEF VERSION4}
-  {$DEFINE VERSION3ONLY}
- {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION3}
-  {$IFDEF VER140}
-     {$DEFINE VERSION6}         { Delphi 6.0 or higher }
-     {$DEFINE Version6OrHigher}
-  {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION3}
-  {$IFDEF VER150}
-    {$DEFINE VERSION7}          { Delphi 7.0 or higher }
-    {$DEFINE Version6OrHigher}
-    {$DEFINE Version7OrHigher}
-  {$ENDIF}
-{$ENDIF}
-
-{$IFDEF VERSION7}
-  {$WARN UNIT_PLATFORM OFF}
-  {$WARN UNSAFE_CODE OFF}
-  {$WARN UNSAFE_TYPE OFF}
-  {$WARN UNSAFE_CAST OFF}
-  {$WARN UNIT_DEPRECATED OFF}
-{$ENDIF}
-
-{$ENDIF}
+// TODO removing it from source code or enable it
+//{$UNDEF UseGifImageUnit}
+//{$UNDEF AndersGIFImage}
+//{$UNDEF ImageLibGIFImage}
+//{$UNDEF UsePNGGraphic}
+//{$DEFINE HtmlWithoutHttp}
Index: iphtml.pas
===================================================================
--- iphtml.pas	(revision 64098)
+++ iphtml.pas	(working copy)
@@ -105,7 +105,6 @@
 
   TIpAbstractHtmlDataProvider = class;
 
-  {.$DEFINE CSS_CASESENSITIVE_CLASSID}
   {$DEFINE CSS_INTERFACE}
 {$I ipcss.inc}
   {$UNDEF CSS_INTERFACE}
@@ -2740,16 +2739,12 @@
     property Align;
     property ALinkColor;
     property AllowTextSelect;
-    {$IFDEF VERSION4}
     property Anchors;
-    {$ENDIF}
     property BgColor;
     property BorderSpacing;
     property BorderWidth;
     property BorderStyle;
-    {$IFDEF VERSION4}
     property Constraints;
-    {$ENDIF}
     property DataProvider;
     property Enabled;
     property FixedTypeface;
@@ -2773,12 +2768,8 @@
     property VLinkColor;
     property WantTabs;
     property OnClick;
-    {$IFDEF VERSION4}
     property OnConstrainedResize;
-    {$ENDIF}
-    {$IFDEF VERSION5}
     property OnContextPopup;
-    {$ENDIF}
     property OnControlClick;
     property OnControlClick2;
     property OnControlChange;
@@ -3110,7 +3101,6 @@
   RegisterComponents('IPro', [TIpHtmlPanel]);
 end;
 
-{$IFNDEF VERSION3ONLY}
 type
   THtmlRadioButton = class(TRadioButton)
   protected
@@ -3169,8 +3159,6 @@
 end;
 *)
 
-{$ENDIF}
-
 function GetAlignmentForStr(str: string;
          pDefault: TIpHtmlAlign = haDefault) : TIpHtmlAlign;
 var
@@ -3938,7 +3926,6 @@
   FMax := -1;
 end;
 
-
 { TIpHtmlNode }
 
 function TIpHtmlNode.GetHint: string;
@@ -4186,7 +4173,7 @@
 
   function GetPropType : PTypeInfo;
   begin
-    Result := PI.PropType{$IFDEF VERSION3}^{$ENDIF};
+    Result := PI.PropType;
   end;
 
   function GetIntegerProperty : string;
@@ -4224,11 +4211,7 @@
 
   function GetVariantProperty : string;
   begin
-    {$IFDEF FPC}
     Result := AnsiString(GetVariantProp(AObject, PI));
-    {$ELSE}
-    Result := GetVariantProp(AObject, PI);
-    {$ENDIF}
   end;
 
   function GetStringProperty : string;
@@ -4281,7 +4264,7 @@
 
   function GetPropType : PTypeInfo;
   begin
-    Result := PI.PropType{$IFDEF VERSION3}^{$ENDIF};
+    Result := PI.PropType;
   end;
 
   procedure SetIntegerProperty;
@@ -4296,9 +4279,7 @@
 
   procedure SetEnumProperty;
   begin
-    {$IFDEF VERSION5}
     SetEnumProp(AObject, PI, NewValue);
-    {$ENDIF}
   end;
 
   procedure SetFloatProperty;
@@ -4316,9 +4297,7 @@
 
   procedure SetSetProperty;
   begin
-    {$IFDEF VERSION5}
     SetSetProp(AObject, PI, NewValue);
-    {$ENDIF}
   end;
 
 begin
@@ -11616,11 +11595,7 @@
     end;
   hitRadio :
     begin
-{$IFDEF VERSION3ONLY}
-      with FControl do
-{$ELSE}
       with THtmlRadioButton(FControl) do
-{$ENDIF}
         Checked := Self.Checked;
     end;
   end;
@@ -11708,18 +11683,10 @@
     end;
   hitRadio :
     begin
-{$IFDEF VERSION3ONLY}
-      FControl := TRadioButton.Create(Parent);
-{$ELSE}
       FControl := THtmlRadioButton.Create(Parent);
-{$ENDIF}
       FControl.Tag := PtrInt(OwnerForm);
       setCommonProperties;
-{$IFDEF VERSION3ONLY}
-      with TRadioButton(FControl) do begin
-{$ELSE}
       with THtmlRadioButton(FControl) do begin
-{$ENDIF}
         Color := Brush.Color;
         SetWidthHeight(1, 8, 0);
         Checked := Self.Checked;
@@ -11841,7 +11808,7 @@
 }
   inherited;
   if (Props.BgColor <> clNone) and (
-    (FControl is {$IFDEF VERSION3ONLY}TRadioButton{$ELSE}THtmlRadioButton{$ENDIF}) or
+    (FControl is THtmlRadioButton) or
     (FControl is TCustomEdit)) then
     FControl.Color := Props.BgColor;
 end;
@@ -11899,11 +11866,7 @@
     hitCheckbox :
       Result := TCheckBox(FControl).Checked;
     hitRadio :
-{$IFDEF VERSION3ONLY}
-      Result := TRadioButton(FControl).Checked;
-{$ELSE}
       Result := THtmlRadioButton(FControl).Checked;
-{$ENDIF}
     hitFile :
       Result := FFileEdit.Text <> '';
     hitHidden :
@@ -11935,11 +11898,7 @@
   hitCheckbox :
     Checked := TCheckBox(FControl).Checked;
   hitRadio :
-{$IFDEF VERSION3ONLY}
-    Checked := TRadioButton(FControl).Checked;
-{$ELSE}
     Checked := THtmlRadioButton(FControl).Checked;
-{$ENDIF}
   end;
 end;
 
Index: iphttpbroker.pas
===================================================================
--- iphttpbroker.pas	(revision 64098)
+++ iphttpbroker.pas	(working copy)
@@ -114,11 +114,7 @@
 var
   VAddrRec: TIpAddrRec;
 begin
-{$IFDEF VER2_6}
-  FillChar(VAddrRec, SizeOf(TIpAddrRec), 0);
-{$ELSE}
   VAddrRec := Default(TIpAddrRec);
-{$ENDIF}
   Initialize(VAddrRec);
   try
     IpParseURL(AUrl, VAddrRec);
@@ -125,7 +121,7 @@
     FDocumment.Clear;
     FClient.Get(AUrl, FDocumment);
     Result := (FClient.ResponseStatusCode = 200)
-{$IF FPC_FULLVERSION > 30000}or FClient.IsRedirect(FClient.ResponseStatusCode){$ENDIF};
+      or FClient.IsRedirect(FClient.ResponseStatusCode);
     if Result then
     begin
       FContentType := AllTrimSpaces(FClient.ResponseHeaders.Values['Content-Type']);
Index: ipmsg.pas
===================================================================
--- ipmsg.pas	(revision 64098)
+++ ipmsg.pas	(working copy)
@@ -58,8 +58,6 @@
 type
   TIpCodingProgressEvent = procedure(Sender : TObject; Progress : Byte;
                                      var Abort : Boolean) of object;
-
-{Begin !!.12}
 type
   TIpHeaderTypes = (htBCC, htCC, htControl, htDate, htDispositionNotify,
                     htFollowUp, htFrom, htInReplyTo, htKeywords,
@@ -111,7 +109,7 @@
       FName        : string;
       FNameL       : string;
         { Lower case version of FName. Used to speed up header searches. }
-      FProperty    : Boolean;                                          {!!.13}
+      FProperty    : Boolean;
       FValue       : TStringList;
     protected
       procedure SetName(const Name : string);
@@ -125,8 +123,8 @@
       property Name : string read FName write SetName;
       property NameL : string read FNameL;
         { Lower case version of Name property. }
-      property IsProperty : Boolean read FProperty write FProperty;    {!!.13}
-        { Set to True if this header is exposed via an iPRO property. }{!!.13}
+      property IsProperty : Boolean read FProperty write FProperty;
+        { Set to True if this header is exposed via an iPRO property. }
       property Value : TStringList read FValue write SetValue;
   end;
 
@@ -140,11 +138,8 @@
       procedure SetItem (Index : Integer; Value : TIpHeaderItem);        
 
     public                                                               
-      constructor Create (AOwner : TPersistent);                         
+      constructor Create (AOwner : TPersistent);
 
-      {$IFNDEF VERSION5}                                                 
-      procedure Delete (Item : integer);                                 
-      {$ENDIF}
       function HasHeader (AName : string) : Integer;
       procedure HeaderByName (AName   : string;
                               Headers : TStringList);
@@ -154,7 +149,6 @@
       property Items[Index : Integer] : TIpHeaderItem                    
                read GetItem write SetItem;                               
   end;                                                                   
-{End !!.12}
 
   TIpMimeParts = class; { Forwards }
 
@@ -184,16 +178,16 @@
     FOriginalSize            : Longint;
     FParent                  : TIpMimeEntity;
     FReadDate                : string;
-    FRelatedType             : string;                                 {!!.02}
-    FRelatedSubtype          : string;                                 {!!.02}
-    FRelatedStart            : string;                                 {!!.02}
-    FRelatedStartInfo        : string;                                 {!!.02}
-    FAttachmentCount         : Integer;                                {!!.12}
+    FRelatedType             : string;
+    FRelatedSubtype          : string;
+    FRelatedStart            : string;
+    FRelatedStartInfo        : string;
+    FAttachmentCount         : Integer;
 
   protected {methods}
     procedure Clear; virtual;
-    procedure ClearBodyLargeAttach(const AttachmentSize : Longint); virtual;  {!!.12}
-    function  ContainsSpecialChars(const Value : string) : Boolean;    {!!.14}
+    procedure ClearBodyLargeAttach(const AttachmentSize : Longint); virtual;
+    function  ContainsSpecialChars(const Value : string) : Boolean;
     procedure DecodeContentDisposition(const aDisp : string);
     procedure DecodeContentType(const aType : string);
     function  DecodeContentTransferEncoding(const aEncoding : string) :
@@ -217,9 +211,9 @@
     procedure EncodeQuoted(InStream : TStream);
     procedure EncodeUUEncode(InStream : TStream; const aFileName : string);
     function DecodeEntity(InStream : TIpAnsiTextStream) : string;
-    function DecodeEntityAsAttachment(InStream : TIpAnsiTextStream) : string;  {!!.01}
+    function DecodeEntityAsAttachment(InStream : TIpAnsiTextStream) : string;
     function EncodeEntity(OutStream : TIpAnsiTextStream) : string;
-    procedure ReadBody(InStream : TIpAnsiTextStream; const StartLine : string); {!!.12}
+    procedure ReadBody(InStream : TIpAnsiTextStream; const StartLine : string);
 
   protected {properties}
     property OnCodingProgress : TIpCodingProgressEvent
@@ -235,12 +229,12 @@
     procedure ExtractBodyFile(const OutFile : string);
     procedure ExtractBodyStream(OutStream : TStream);
     procedure ExtractBodyStrings(OutStrings : TStrings);
-    function FindNestedMimePart(const aType, aSubType, aContentID : string) : TIpMimeEntity; {!!.02}
+    function FindNestedMimePart(const aType, aSubType, aContentID : string) : TIpMimeEntity;
     function  GetMimePart(const aType, aSubType, aContentID : string;
                               CanCreate : Boolean) : TIpMimeEntity;
     function  NewMimePart : TIpMimeEntity;
 
-    property AttachmentCount : Integer read FAttachmentCount;          {!!.12}
+    property AttachmentCount : Integer read FAttachmentCount;
 
   public {properties}
     property Body : TIpAnsiTextStream
@@ -303,16 +297,16 @@
     property ReadDate : string
       read FReadDate write FReadDate;
 
-    property RelatedStart : string                                   {!!.02}
+    property RelatedStart : string
       read FRelatedStart write FRelatedStart;
 
-    property RelatedStartInfo : string                               {!!.02}
+    property RelatedStartInfo : string
       read FRelatedStartInfo write FRelatedStartInfo;
 
-    property RelatedSubtype : string                                 {!!.02}
+    property RelatedSubtype : string
       read FRelatedSubtype write FRelatedSubtype;
 
-    property RelatedType : string                                    {!!.02}
+    property RelatedType : string
       read FRelatedType write FRelatedType;
 
   end;
@@ -353,8 +347,8 @@
     FFrom            : string;
     FInReplyTo       : string;
     FKeywords        : string;
-    FFollowupTo      : string;                                           {!!.12}
-    FControl         : string;                                           {!!.12}
+    FFollowupTo      : string;
+    FControl         : string;
     FMessageID       : string;
     FMessageTag      : Integer;
     FNewsgroups      : TStringList;
@@ -370,13 +364,13 @@
     FSender          : string;
     FSubject         : string;
     FUserFields      : TStringList;
-    FHeaders         : TIpHeaderCollection;                              {!!.12}
+    FHeaders         : TIpHeaderCollection;
     FDispositionNotify: string;
 
   protected {methods}
-    procedure CheckAllHeaders;                                           {!!.12}
-    procedure CheckHeaderType (HeaderInfo : TIpHeaderItem;               {!!.12}
-                               HeaderType : TIpHeaderTypes);             {!!.12}
+    procedure CheckAllHeaders;
+    procedure CheckHeaderType (HeaderInfo : TIpHeaderItem;
+                               HeaderType : TIpHeaderTypes);
     procedure Clear; override;
     procedure NewMessageStream;
     function  GetPosition : Longint;
@@ -395,9 +389,9 @@
     constructor CreateMessage; virtual;
     destructor  Destroy; override;
 
-    procedure AddDefaultAttachment(const aFileName : string);          {!!.02}
-    procedure AddDefaultAttachmentAs (const aFileName      : string;   {!!.12}
-                                      const AttachmentName : string);  {!!.12}
+    procedure AddDefaultAttachment(const aFileName : string);
+    procedure AddDefaultAttachmentAs (const aFileName      : string;
+                                      const AttachmentName : string);
     procedure Assign(Source : TPersistent); override;
     function  AtEndOfStream : Boolean;
     procedure DecodeMessage; virtual;
@@ -405,39 +399,39 @@
     function  GetBodyHtml(CanCreate : Boolean) : TIpMimeEntity;
     function  GetBodyPlain(CanCreate : Boolean) : TIpMimeEntity;
     procedure LoadFromFile(const aFileName : string);
-    procedure LoadFromStream(aStream : TStream);                       {!!.12}
+    procedure LoadFromStream(aStream : TStream);
     procedure NewMessage;
     function  ReadLine : string;
     function  ReadLineCRLF : string;
     procedure SaveToFile(const aFileName : string);
-    procedure SaveToStream(Stream: TStream);                           {!!.12}
-    procedure SetHeaders(Headers : TIpHeaderCollection);               {!!.12}
+    procedure SaveToStream(Stream: TStream);
+    procedure SetHeaders(Headers : TIpHeaderCollection);
     procedure WriteLine(const aSt : string);
 
   public {properties}
     property BCC : TStringList
-      read FBCC write SetBCC;                                          {!!.01}
+      read FBCC write SetBCC;
 
     property CC : TStringList
-      read FCC write SetCC;                                            {!!.01}
+      read FCC write SetCC;
 
-    property Control : string                                          {!!.12}
-      read FControl write FControl;                                    {!!.12}
+    property Control : string
+      read FControl write FControl;
 
     property Date : string
       read FDate write FDate;
 
-    property DispositionNotification : string                          {!!.12}
-      read FDispositionNotify write FDispositionNotify;                {!!.12}
+    property DispositionNotification : string
+      read FDispositionNotify write FDispositionNotify;
 
-    property FollowupTo : String                                       {!!.12}
-      read FFollowupTo Write FFollowupTo;                              {!!.12}
+    property FollowupTo : String
+      read FFollowupTo Write FFollowupTo;
 
     property From : string
       read FFrom write FFrom;
 
-    property Headers : TIpHeaderCollection                             {!!.12}
-             read FHeaders write SetHeaders;                           {!!.12}
+    property Headers : TIpHeaderCollection
+             read FHeaders write SetHeaders;
 
     property InReplyTo : string
       read FInReplyTo write FInReplyTo;
@@ -448,14 +442,14 @@
     property MessageID : string
       read FMessageID write FMessageID;
 
-    property MessageStream : TIpAnsiTextStream                         {!!.03}
-      read MsgStream;                                                  {!!.03}
+    property MessageStream : TIpAnsiTextStream
+      read MsgStream;
 
     property MessageTag : Integer
       read FMessageTag write FMessageTag;
 
     property Newsgroups : TStringList
-      read FNewsgroups write SetNewsgroups;                            {!!.01}
+      read FNewsgroups write SetNewsgroups;
 
     property NNTPPostingHost : string
       read FNNTPPostingHost write FNNTPPostingHost;
@@ -464,7 +458,7 @@
       read FOrganization write FOrganization;
 
     property Path : TStringList
-      read FPath write SetPath;                                        {!!.01}
+      read FPath write SetPath;
 
     property Position : Longint
       read GetPosition write SetPosition;
@@ -473,13 +467,13 @@
       read FPostingHost write FPostingHost;
 
     property Received : TStringList
-      read FReceived write SetReceived;                                {!!.01}
+      read FReceived write SetReceived;
 
     property Recipients : TStringList
-      read FRecipients write SetRecipients;                            {!!.01}
+      read FRecipients write SetRecipients;
 
     property References : TStringlist
-      read FReferences write SetReferences;                            {!!.01}
+      read FReferences write SetReferences;
 
     property ReplyTo : string
       read FReplyTo write FReplyTo;
@@ -497,7 +491,7 @@
       read FSubject write FSubject;
 
     property UserFields : TStringList
-      read FUserFields write SetUserFields;                            {!!.01}
+      read FUserFields write SetUserFields;
 
   end;
 
@@ -515,7 +509,7 @@
     property From;
     property Keywords;
     property MailTo : TStringList
-      read FRecipients write SetRecipients;                            {!!.01}
+      read FRecipients write SetRecipients;
     property OnCodingProgress;
     property References;
     property ReplyTo;
@@ -561,9 +555,8 @@
     procedure SaveToStream(aStream : TStream);
   end;
 
-function IpBase64EncodeString(const InStr: string): string;       {!!.02}{!!.03}
+function IpBase64EncodeString(const InStr: string): string;
 
-{Begin !!.12}
 const
   IpLgAttachSizeBoundry = 5 * 1024 * 1024;
     { Attachments over this size will be encoded using a TIpMemMapStream for
@@ -596,10 +589,9 @@
   strTo                = 'To: ';
   strUserFields        = 'X-';
   strXIpro             = 'X-Ipro: ';
-  strFollowUp          = 'Followup-To: ';                               {!!.12}
-  strControl           = 'Control: ';                                   {!!.12}
+  strFollowUp          = 'Followup-To: ';
+  strControl           = 'Control: ';
 
-{Begin !!.13}
   IpMimeHeaders : array [0..5] of string =
     { List of MIME headers that must be marked as public properties in
       the message's Headers collection. Marking them as a public property
@@ -613,7 +605,6 @@
       'Content-ID',
       'Content-Disposition'
     );
-{End !!.13}
 
   { MIME headers }
   strMimeVersion             = 'MIME-Version: ';
@@ -647,7 +638,7 @@
   strHTML        = 'html';
   strOctetStream = 'octet-stream';
   strAlternative = 'alternative';
-  strRelated     = 'related';                                        {!!.02}
+  strRelated     = 'related';
 
   { MIME content disposition parameters }
   strAttachment       = 'attachment';
@@ -656,10 +647,10 @@
   strFilename         = 'filename=';
   strModificationDate = 'modification-date=';
   strReadDate         = 'read-date=';
-  strStart            = 'start=';                                    {!!.02}
-  strStartInfo        = 'start-info=';                               {!!.02}
+  strStart            = 'start=';
+  strStartInfo        = 'start-info=';
   strSize             = 'size=';
-  strType             = 'type=';                                     {!!.02}
+  strType             = 'type=';
 
 
   { MIME encoding methods }
@@ -715,7 +706,7 @@
     #052, #053, #054, #055, #056, #057, #043, #047);
 
 const { Base64 decoding table }
-  IpD64Table : array[#43..#122] of Byte = (                          {!!.12}
+  IpD64Table : array[#43..#122] of Byte = (
     $3E, $7F, $7F, $7F, $3F, $34, $35, $36,
     $37, $38, $39, $3A, $3B, $3C, $3D, $7F,
     $7F, $7F, $7F, $7F, $7F, $7F, $00, $01,
@@ -743,9 +734,9 @@
   RLEChar : Byte = $90;
   BinHexFileType : array[0..3] of Byte = ($49, $42, $4D, $3F);  { "IBM?" }
   CRLF = #13#10;
-  MaxLine = 1000;                                                       {!!.12}
-  MaxLineEncode = 77;                                                   {!!.13}
-    { Maximum line length for QuotablePrintable & Base64 encoding. }    {!!.13}
+  MaxLine = 1000;
+  MaxLineEncode = 77;
+    { Maximum line length for QuotablePrintable & Base64 encoding. }
 
 type
   BinHexHeader = packed record
@@ -757,15 +748,15 @@
     RFLong   : Longint;
   end;
 
-function IsSameString (Str1          : string;                           {!!.12}
-                       Str2          : string;                           {!!.12}
-                       CaseSensitive : Boolean) : Boolean;               {!!.12}
-begin                                                                    {!!.12}
-  if CaseSensitive then                                                  {!!.12}
-    Result := (Str1 = Str2)                                              {!!.12}
-  else                                                                   {!!.12}
-    Result := StrIComp (PChar (Str1), PChar (Str2)) = 0;                 {!!.12}
-end;                                                                     {!!.12}
+function IsSameString (Str1          : string;
+                       Str2          : string;
+                       CaseSensitive : Boolean) : Boolean;
+begin
+  if CaseSensitive then
+    Result := (Str1 = Str2)
+  else
+    Result := StrIComp (PChar (Str1), PChar (Str2)) = 0;
+end;
 
 { Parse string into string list }
 procedure Parse(const Line : string; Delim : AnsiChar; var List : TStringList);
@@ -776,7 +767,7 @@
   iPos := 1;
   jPos := IpUtils.CharPos(Delim, Line);
   while (jPos > 0) do begin
-    Term := Copy(Line, iPos, jPos - iPos);                           {!!.02}
+    Term := Copy(Line, iPos, jPos - iPos);
     if (Term <> '') then
       List.Add(Trim(Term));
     iPos := jPos + 1;
@@ -880,7 +871,7 @@
   for i := 1 to RawHeaders.Count do begin
     S := RawHeaders[i-1];
     if StrLIComp(PChar(HeaderName), PChar(S), Length(HeaderName)) = 0 then begin
-      if HeaderName <> strUserFields then begin                         {!!.11}
+      if HeaderName <> strUserFields then begin
         {strip off the header field name}
         S := Copy(S, Length(HeaderName) + 1, Length(S));
         {unfold the header if continued on more than one line}
@@ -892,7 +883,7 @@
             else
               S := S + S2;
           end;
-      end;                                                              {!!.11}
+      end;
       HeaderFieldList.Add(S);
     end;
   end;
@@ -925,7 +916,7 @@
       end;
       S := S + HeaderFieldList[i];
       if (i < HeaderFieldList.Count - 1) and (S <> '') then begin
-        S := S + Delim;                                                {!!.14}
+        S := S + Delim;
         if Fold then begin
           RawHeaders.Add(S);
           S := #09;
@@ -958,10 +949,8 @@
           for i := 1 to SL.Count do begin
             S := S + SL[i-1];
             if (i < SL.Count) and (S <> '') then begin
-{Begin !!.13}
               RawHeaders.Add(S);
               S := Delim;
-{End !!.13}
             end;
           end;
         finally
@@ -1040,7 +1029,6 @@
   Result := dw;
 end;
 
-{Begin !!.12}
 { TIpHeaderItem ****************************************************** }
 
 constructor TIpHeaderItem.Create (Collection : TCollection);
@@ -1051,7 +1039,7 @@
 
   FValue := TStringList.Create;
   FName  := '';
-  FProperty := False;                                                  {!!.13}
+  FProperty := False;
 end;                                                                     
 
 destructor TIpHeaderItem.Destroy;                                        
@@ -1084,13 +1072,6 @@
   FOwner := AOwner;                                                      
 end;                                                                     
 
-{$IFNDEF VERSION5}                                                       
-procedure TIpHeaderCollection.Delete(Item: integer);                     
-begin                                                                    
-  GetItem(Item).Free;                                                    
-end;                                                                     
-{$ENDIF}                                                                 
-
 function TIpHeaderCollection.GetItem (Index : Integer) : TIpHeaderItem;  
 begin                                                                    
   Result := TIpHeaderItem (inherited GetItem (Index));                   
@@ -1131,7 +1112,7 @@
   CurPos : Integer;
 
   function ExtractHeaderName (const AName : string) : string;
-  {!!.15 - replaced local variable i with inx in order to avoid confusion with
+  {replaced local variable i with inx in order to avoid confusion with
     variable i in parent routine. }
   var
     inx     : Integer;
@@ -1183,7 +1164,6 @@
       Inc (CurPos);
     WorkLine := Copy (AHeaderList[CurLine],
                       CurPos, LineLen - CurPos + 1);
-{Begin !!.13}
     Inc(CurLine);
 
     while IsWrappedLine (AHeaderList, CurLine) do begin
@@ -1191,7 +1171,6 @@
       Inc(CurLine);
     end;
     NewField.Value.Add (Trim (WorkLine));
-{End !!.13}
   end;
 
 var                                                                      
@@ -1209,11 +1188,9 @@
       NewHeader := TIpHeaderItem (Add);                                  
       NewHeader.Name := HeaderName;                                      
       GetFieldValue (AHeaderList, i, NewHeader);
-{Begin !!.15}
     end
     else
       Inc(i);
-{End !!.15}
   end;
 end;                                                                     
 
@@ -1222,7 +1199,6 @@
 begin                                                                    
   inherited SetItem (Index, Value);                                      
 end;
-{End !!.12}
 
 { TIpMimeParts }
 constructor TIpMimeParts.Create;
@@ -1318,7 +1294,6 @@
   FBody.Stream := TMemoryStream.Create;
 end;
 
-{Begin !!.12}
 { Clear Body property in preparation for large attachment }
 procedure TIpMimeEntity.ClearBodyLargeAttach(const AttachmentSize : Longint);
 var
@@ -1334,7 +1309,6 @@
   Strm.Open;
   FBody.Stream := Strm;
 end;
-{End !!.12}
 
 { Clear all properties }
 procedure TIpMimeEntity.Clear;
@@ -1354,10 +1328,10 @@
   FIsMultipart := False;
   FMimeVersion := '';
   FEntityName := '';
-  FRelatedType := '';                                                {!!.02}
-  FRelatedSubtype := '';                                             {!!.02}
-  FRelatedStart := '';                                               {!!.02}
-  FRelatedStartInfo := '';                                           {!!.02}
+  FRelatedType := '';
+  FRelatedSubtype := '';
+  FRelatedStart := '';
+  FRelatedStartInfo := '';
 end;
 
 { Build Mime (and nested Mime) block(s) from incoming text stream }
@@ -1365,12 +1339,12 @@
 var
   Blk : TIpMimeEntity;
   RawHeaders : TStringList;
-  Decoded : Boolean;                                                   {!!.12}
-  i,                                                                   {!!.13}
-  LeadingBlankLines : Integer;                                         {!!.13}
+  Decoded : Boolean;
+  i,
+  LeadingBlankLines : Integer;
 begin
-  Decoded := False;                                                    {!!.12}
-  LeadingBlankLines := 0;                                              {!!.13}
+  Decoded := False;
+  LeadingBlankLines := 0;
   { skip blank lines in front of mime headers or body }
   Result := InStream.ReadLine;
   while (Result = '') and not InStream.AtEndOfStream do begin
@@ -1379,11 +1353,9 @@
   end;
 
   { decode mime headers if any }
-{Begin !!.15}
   if (StrLIComp(PChar(strContent), PChar(Result), Length(strContent)) = 0) or
      (StrLIComp(PChar(strMimeVersion), PChar(Result),
                 Length(strMimeVersion)) = 0) then begin
-{End !!.15}
     RawHeaders := TStringList.Create;
     try
       repeat
@@ -1401,7 +1373,6 @@
   end;
 
   { decode body - main loop }
-{Begin !!.15}
   if (FParentBoundary <> '') and
      (Result = '--' + FParentBoundary) then
     { The body of this entity is empty & we are now positioned at the boundary
@@ -1408,10 +1379,9 @@
       marker for the next entity. }
     Decoded := True
   else
-{End !!.15}
-  while not (((FParentBoundary <> '') and                              {!!.12}
-              (Result = '--' + FParentBoundary)                        {!!.12}
-             ) or InStream.AtEndOfStream) do begin                     {!!.12}
+  while not (((FParentBoundary <> '') and
+              (Result = '--' + FParentBoundary)
+             ) or InStream.AtEndOfStream) do begin
     Decoded := True;
     { check for ending boundary - in which case were done }
     if (FParentBoundary <> '') then
@@ -1421,7 +1391,7 @@
       end;
 
     { decode any nested mime parts - recursively }
-    if IsMultiPart and (Boundary <> '') and                            {!!.03}
+    if IsMultiPart and (Boundary <> '') and
       (Pos('--' + Boundary, Result) = 1)  then begin
       Blk := TIpMimeEntity.Create(Self);
       Result := Blk.DecodeEntity(Instream);
@@ -1428,15 +1398,14 @@
       FMimeParts.Add(Blk);
     end else begin
       { read raw text line into body }
-      for i := 1 to LeadingBlankLines do                               {!!.13}
-        Body.WriteLine('');                                            {!!.13}
+      for i := 1 to LeadingBlankLines do
+        Body.WriteLine('');
       Body.WriteLine(Result);
       Result := InStream.ReadLine;
     end;
-    if InStream.AtEndOfStream then break;                              {!!.12}
-    LeadingBlankLines := 0;                                            {!!.13}
+    if InStream.AtEndOfStream then break;
+    LeadingBlankLines := 0;
   end;
-{Begin !!.12}
   { If did not find a MIME entity then assume the body is text &
     read it into the Body property. }
   if not Decoded then
@@ -1445,10 +1414,9 @@
     { If the last line is not a MIME separator then add the last line
       to the Body. }
     Body.WriteLine(Result);
-{End !!.12}
 end;
 
-{!!.01}
+
 { Build Mime block as subpart from incoming text stream }
 function TIpMimeEntity.DecodeEntityAsAttachment(InStream : TIpAnsiTextStream) : string;
 var
@@ -1536,7 +1504,7 @@
     DecodeSingleParameter(strBoundary, RawParams, FBoundary);
     DecodeSingleParameter(strCharSet, RawParams, FCharacterSet);
 
-    {!!.02}
+
     { decode multipart/related parameters }
     DecodeSingleParameter(strType, RawParams, S);
     if (S <> '') then begin
@@ -1549,8 +1517,8 @@
       DecodeSingleParameter(strStart, RawParams, FRelatedStart);
       DecodeSingleParameter(strStartInfo, RawParams, FRelatedStartInfo);
     end;
-    {!!.02}
 
+
   finally
     RawParams.Free;
   end;
@@ -1605,8 +1573,8 @@
   DecodeSingleHeader(strContentDisposition, RawHeaders, S);
   if (S <> '') then
     DecodeContentDisposition(S);
-  if (FContentDispositionType = strAttachment) then                    {!!.12}
-    Inc (FParent.FAttachmentCount);                                    {!!.12}{!!.15}
+  if (FContentDispositionType = strAttachment) then
+    Inc (FParent.FAttachmentCount);
 end;
 
 { Compute attachment coding progress and fire OnCodingProgress event }
@@ -1673,11 +1641,11 @@
       else 
         OutStream.CopyFrom(Body, 0); // copy the entire stream from the beginning
 
-    { make sure the body is properly terminated }                    {!!.01}
-    OutStream.Position := OutStream.Size - 1;                        {!!.01}
-    TIpBufferedStream(OutStream).ReadChar(Ch);                       {!!.01}
-    if ((Ch <> #13) and (Ch <> #10)) then                            {!!.01}
-      OutStream.WriteLine('');                                       {!!.01}
+    { make sure the body is properly terminated }
+    OutStream.Position := OutStream.Size - 1;
+    TIpBufferedStream(OutStream).ReadChar(Ch);
+    if ((Ch <> #13) and (Ch <> #10)) then
+      OutStream.WriteLine('');
   end;
 
   { encode nested mime parts - recursively }
@@ -1688,7 +1656,6 @@
   end;
 end;
 
-{Begin !!.14}
 function TIpMimeEntity.ContainsSpecialChars(const Value : string) : Boolean;
 var
   Inx : Integer;
@@ -1703,7 +1670,6 @@
       Break;
     end; { if }
 end;
-{End !!.14}
 
 { Generate Content-Disposition header into raw header list }
 procedure TIpMimeEntity.EncodeContentDisposition(RawHeaders : TStringList);
@@ -1716,7 +1682,6 @@
   Params := TStringList.Create;
   try
     Params.Add(FContentDispositionType);
-{Begin !!.14}
     if (FFileName <> '') then begin
       { If the filename contains spaces, control characters, or any of the
         special characters identified in RFC 1521 then wrap the filename in
@@ -1729,7 +1694,6 @@
       else
         Params.Add(strFileName + FFileName);
     end;  { if }
-{End !!.14}
     if (FCreationDate <> '') then
       Params.Add(strCreationDate + FCreationDate);
     if (FModificationDate <> '') then
@@ -1766,7 +1730,7 @@
     if (FCharacterSet <> '') then
       Params.Add(strCharSet + FCharacterSet); {no quotes}
 
-    {!!.02}
+
     { encode multipart/related parameters }
     if (FRelatedType <> '') then begin
       if (FRelatedSubtype <> '') then
@@ -1778,8 +1742,8 @@
       if (FRelatedStartInfo <> '') then
         Params.Add(strStartInfo + '"' + FRelatedStartInfo + '"');
     end;
-    {!!.02}
 
+
     EncodeListHeader(strContentType, RawHeaders, Params, ';', False);
   finally
     Params.Free;
@@ -1815,7 +1779,6 @@
 
 { Encode Mime body from TStream - file name is optional }
 procedure TIpMimeEntity.EncodeBodyStream(InStream : TStream; const aFileName : string);
-{Begin !!.12}
 var
   LargeAttachment : Boolean;
     { Large attachments are handled with memory map streams in order to avoid
@@ -1831,7 +1794,6 @@
       // presize stream for more speed
       FBody.Stream.Size := Trunc(InStream.Size * 1.3695);
     end;
-{End !!.12}
     case FContentTransferEncoding of
       em7Bit     : Encode8Bit(InStream);
       em8Bit     : Encode8Bit(InStream);
@@ -1842,7 +1804,6 @@
       emUUEncode : EncodeUUEncode(InStream, aFileName);
       emUnknown  : Encode8Bit(InStream);
     end;
-  {Begin !!.12}
     FBody.Flush;
     if LargeAttachment then
       { This is a large attachment that was written to a memory map stream.
@@ -1849,7 +1810,6 @@
         Memory map streams are usually created larger than necessary so shrink
         it down to the correct size. }
       TIpMemMapStream(FBody.Stream).Size := TIpMemMapStream(FBody.Stream).DataSize;
-  {End !!.12}
   end;
   FOriginalSize := InStream.Size;
   FFileName := ExtractFileName(aFileName);
@@ -1864,7 +1824,7 @@
     MS := TMemoryStream.Create;
     try
       InStrings.SaveToStream(MS);
-      MS.Position := 0;                                              {!!.03}
+      MS.Position := 0;
       FOriginalSize := MS.Size;
       FFileName := ExtractFileName(aFileName);
       EncodeBodyStream(MS, aFileName);
@@ -1877,7 +1837,7 @@
 { Encode Mime body from file }
 procedure TIpMimeEntity.EncodeBodyFile(const InFile : string);
 var
-  FS : TIpMemMapStream;                                                {!!.12}
+  FS : TIpMemMapStream;
   i : Integer;
   aExt, aTyp, aSub : string;
   aEnc : TIpMimeEncodingMethod;
@@ -1904,9 +1864,9 @@
   if (FContentTransferEncoding = emUnknown) then
     FContentTransferEncoding := aEnc;
 
-  FS := TIpMemMapStream.Create(InFile, True, False);                   {!!.12}
+  FS := TIpMemMapStream.Create(InFile, True, False);
   try
-    FS.Open;                                                           {!!.12}
+    FS.Open;
     FOriginalSize := FS.Size;
     FFileName := ExtractFileName(InFile);
     EncodeBodyStream(FS, FFileName);
@@ -1931,7 +1891,7 @@
         em7Bit     : Decode8Bit(MS);
         em8Bit     : Decode8Bit(MS);
         emBase64   : DecodeBase64(MS);
-        emBinary   : OutStream.CopyFrom(FBody, FBody.Size);            {!!.14}
+        emBinary   : OutStream.CopyFrom(FBody, FBody.Size);
         emBinHex   : DecodeBinHex(MS);
         emQuoted   : DecodeQuoted(MS);
         emUUEncode : DecodeUUEncode(MS);
@@ -2009,7 +1969,7 @@
   end;
 end;
 
-{!!.02}
+
 { Search all nested levels for specified MIME part }
 function TIpMimeEntity.FindNestedMimePart(const aType, aSubType, aContentID : string) : TIpMimeEntity;
 var
@@ -2020,15 +1980,15 @@
   if (MimeParts.Count > 0) then
     for i := 0 to Pred(MimeParts.Count) do begin
       { ContentID is primary search key }
-      if (aContentID <> '') and                                          {!!.12}
-         (IsSameString (MimeParts[i].ContentID,                          {!!.12}
-                        aContentID, False)) then begin                   {!!.12}
+      if (aContentID <> '') and
+         (IsSameString (MimeParts[i].ContentID,
+                        aContentID, False)) then begin
         Result := MimeParts[i];
         Break;
-      end else if (IsSameString (MimeParts[i].ContentType,               {!!.12}
-                                 aType, False)) and                      {!!.12}
-                  (IsSameString (MimeParts[i].ContentSubtype,            {!!.12}
-                                 aSubType, False)) then begin            {!!.12}
+      end else if (IsSameString (MimeParts[i].ContentType,
+                                 aType, False)) and
+                  (IsSameString (MimeParts[i].ContentSubtype,
+                                 aSubType, False)) then begin
         Result := MimeParts[i];
         Break;
       end else begin
@@ -2077,9 +2037,9 @@
 
 { Decode InStream to OutStream - Base64 }
 procedure TIpMimeEntity.DecodeBase64(OutStream : TStream);
-  { rewritten }                                                      {!!.12}
+  { rewritten }
 var
-  I : Integer;                                                         {!!.16}
+  I : Integer;
   C : Char;
   InBuf  : array[0..3] of Char;
   OutBuf : array[0..2] of Byte;
@@ -2095,7 +2055,7 @@
   while not (Done or Abort) do begin
     { read in the next 4 valid Base64 characters }
     I := 0;
-    InBuf := '====';                                                   {!!.15}
+    InBuf := '====';
     while (I < 4) do begin
       if not BufStream.ReadChar(C) then begin
         Done := True;
@@ -2125,7 +2085,7 @@
     end else
         Done := True;
     OutStream.Write(OutBuf, I);
-    DoOnCodingProgress(OutStream.Position, BufStream.FastSize, Abort); {!!.16}
+    DoOnCodingProgress(OutStream.Position, BufStream.FastSize, Abort);
   end;
 end;
 
@@ -2138,8 +2098,8 @@
   btThis, btLast, btNext : Byte;
   ch : AnsiChar;
   // headerlength is encoded as byte, HeaderFileName can only 256 bytes long
-  HeaderFileName : Array [0..MaxByte] of Byte;                   {!!.12}{!!.16}
-  HeaderLength : byte;                                                  {!!.12}
+  HeaderFileName : Array [0..MaxByte] of Byte;
+  HeaderLength : byte;
   CRC : Word;
   DataOffset, DataEnd, HeaderEnd : Longint;
   WS1, WS2 : TMemoryStream;
@@ -2250,11 +2210,11 @@
         WS2.Free;
 
       { strip off header }
-      FillChar (HeaderFileName, SizeOf (HeaderFileName), $00);           {!!.12}
+      FillChar (HeaderFileName, SizeOf (HeaderFileName), $00);
       FillChar(Header, SizeOf(Header), #0);
       WS2.Position := 0;
-      WS2.Read(HeaderLength, SizeOf (Byte));                             {!!.12}
-      WS2.Read(HeaderFileName, HeaderLength);                            {!!.12}
+      WS2.Read(HeaderLength, SizeOf (Byte));
+      WS2.Read(HeaderFileName, HeaderLength);
       WS2.Read(Header, SizeOf(Header));
 
       { check header CRC }
@@ -2289,10 +2249,10 @@
 { Decode InStream to OutStream - QuotedPrintable }
 procedure TIpMimeEntity.DecodeQuoted(OutStream : TStream);
 var
-  O, Count, WS : Byte;                                                   {!!.12}
-  I : integer;                                                           {!!.12}
-  InBuf  : array[0..pred (MaxLine)] of Byte;                             {!!.15}
-  OutBuf : array[0..pred (MaxLine)] of Byte;                             {!!.15}
+  O, Count, WS : Byte;
+  I : integer;
+  InBuf  : array[0..pred (MaxLine)] of Byte;
+  OutBuf : array[0..pred (MaxLine)] of Byte;
   Decoding : Boolean;
   Keeper : Boolean;
   Abort : Boolean;
@@ -2328,8 +2288,8 @@
 
     { Read in one line at a time - skipping over bad characters }
     while True do begin
-      if (I > High(InBuf)) then                                        {!!.01}
-        raise EIpBaseException.Create(SLineLengthErr);                 {!!.01}
+      if (I > High(InBuf)) then
+        raise EIpBaseException.Create(SLineLengthErr);
       if not BufStream.ReadChar(Char(InBuf[I])) then
         Break;
       case InBuf[I] of
@@ -2340,7 +2300,7 @@
               end;
        { Test for potential end of data }
        { '--' is probably the next Mime boundary }
-       { $2D : if (I = 1) and (InBuf[0] = $2D) then Exit;}             {!!.03}
+       { $2D : if (I = 1) and (InBuf[0] = $2D) then Exit;}
       end;
       Inc(I);
     end;
@@ -2560,7 +2520,7 @@
 procedure TIpMimeEntity.EncodeBinHex(InStream : TStream;
                                      const aFileName : string);
 var
-  HeaderFileName : string;                                              {!!.12}
+  HeaderFileName : string;
   CRC : Word;
   DataOffset : DWord;
   PrevByte, CurrByte, i : Byte;
@@ -2797,16 +2757,16 @@
                                                   const Table;
                                                   PadChar, Delim : AnsiChar);
 var
-  OutBuf: array[0..MaxLineEncode-1] of Char;                           {!!.12}{!!.13}
-  OutBufLen: Integer;                                                  {!!.12}
+  OutBuf: array[0..MaxLineEncode-1] of Char;
+  OutBufLen: Integer;
   Abort : Boolean;
 
   procedure FlushOutBuf;
     {- write out encoded buffer to message stream }
   begin
-    if OutBufLen > 0 then begin                                        {!!.12}
+    if OutBufLen > 0 then begin
       OutStream.WriteLineArray(OutBuf, OutBufLen);
-      OutBufLen := 0;                                                  {!!.12}
+      OutBufLen := 0;
     end;
   end;
 
@@ -2813,10 +2773,10 @@
   procedure OutChar(ch : AnsiChar);
     {- buffer the character to go out }
   begin
-    if OutBufLen >= MaxLineEncode - 1 then                             {!!.12}{!!.13}
+    if OutBufLen >= MaxLineEncode - 1 then
       FlushOutBuf;
-    OutBuf[OutBufLen] := Ch;                                           {!!.12}
-    inc(OutBufLen);                                                    {!!.12}
+    OutBuf[OutBufLen] := Ch;
+    inc(OutBufLen);
   end;
 
 type
@@ -2834,7 +2794,7 @@
       raise EIpBaseException.Create(SNoMemoryStreamErr);
 
   Abort := False;
-  OutBufLen := 0;                                                      {!!.12}
+  OutBufLen := 0;
   if (Delim <> #0) then
     OutChar(Delim);
 
@@ -2856,7 +2816,7 @@
     OutBuf[OutBufLen+3] := Char(TIp6BitTable(Table)[Buffer[I+2] and $3F]);
 
     Inc(OutBufLen, 4);
-    if OutBufLen >= MaxLineEncode - 1 then                             {!!.12}{!!.13}
+    if OutBufLen >= MaxLineEncode - 1 then
     begin
       FlushOutBuf;
       if i mod 100 = 0 then
@@ -2893,7 +2853,6 @@
   FlushOutBuf;
 end;
 
-{Begin !!.12}
 procedure TIpMIMEEntity.ReadBody(InStream : TIpAnsiTextStream; const StartLine : string);
 var
   S : string;
@@ -2908,9 +2867,7 @@
   { write final line }
   Body.WriteLine(S);
 end;
-{End !!.12}
 
-
 { TIpMessage }
 constructor TIpMessage.CreateMessage;
 begin
@@ -2923,7 +2880,7 @@
   FRecipients := TStringList.Create;
   FReferences := TStringList.Create;
   FUserFields := TStringList.Create;
-  FHeaders    := TIpHeaderCollection.Create (Self);                    {!!.12}
+  FHeaders    := TIpHeaderCollection.Create (Self);
   MsgStream := TIpAnsiTextStream.CreateEmpty;
   NewMessageStream;
 end;
@@ -2939,13 +2896,12 @@
   FRecipients.Free;
   FReferences.Free;
   FUserFields.Free;
-  FHeaders.Free;                                                         {!!.12}
+  FHeaders.Free;
   MsgStream.FreeStream;
   MsgStream.Free;
   inherited Destroy;
 end;
 
-{Begin !!.13}
 procedure TIpMessage.CheckAllHeaders;
 var
   i         : Integer;
@@ -2983,7 +2939,7 @@
   function ExtractSingleHeader(HeaderInfo : TIpHeaderItem) : string;
   begin
     Result := Trim(HeaderInfo.Value.Text);
-    HeaderInfo.IsProperty := True;                                     {!!.13}
+    HeaderInfo.IsProperty := True;
   end;
 
   procedure ExtractCSVHeader(HeaderInfo : TIpHeaderItem;
@@ -2993,7 +2949,7 @@
   begin
     WorkString := ExtractSingleHeader(HeaderInfo);
     Parse (WorkString, ',', AList);
-    HeaderInfo.IsProperty := True;                                     {!!.13}
+    HeaderInfo.IsProperty := True;
   end;
 
   procedure ExtractListHeader(HeaderInfo : TIpHeaderItem;
@@ -3000,23 +2956,21 @@
                            var AList      : TStringList);
   begin
     AList.Assign (HeaderInfo.Value);
-    HeaderInfo.IsProperty := True;                                     {!!.13}
+    HeaderInfo.IsProperty := True;
   end;
 
   procedure ExtractAppendListHeader(HeaderInfo : TIpHeaderItem;
-                              const IncludeName : Boolean;             {!!.13}
+                              const IncludeName : Boolean;
                                 var AList      : TStringList);
   var
     i : Integer;
   begin
     for i := 0 to HeaderInfo.Value.Count - 1 do
-{Begin !!.13}
       if IncludeName then
         AList.Add (HeaderInfo.Name + ': ' + HeaderInfo.Value[i])
       else
         AList.Add (HeaderInfo.Value[i]);
     HeaderInfo.IsProperty := True;
-{End !!.13}
   end;
 
 begin
@@ -3052,7 +3006,7 @@
     htPostingHost     :
       FPostingHost := ExtractSingleHeader(HeaderInfo);
     htReceived        :
-      ExtractAppendListHeader(HeaderInfo, False, FReceived);           {!!.13}
+      ExtractAppendListHeader(HeaderInfo, False, FReceived);
     htReferences      :
       ExtractListHeader(HeaderInfo, FReferences);
     htReplyTo         :
@@ -3066,12 +3020,11 @@
     htTo              :
       ExtractCSVHeader(HeaderInfo, FRecipients);
     htUserFields      :
-      ExtractAppendListHeader(HeaderInfo, True, FUserFields);          {!!.13}
+      ExtractAppendListHeader(HeaderInfo, True, FUserFields);
     htXIpro           : begin
     end;
   end;
 end;
-{End !!.12}
 
 { Clear properties and free message stream }
 procedure TIpMessage.Clear;
@@ -3078,18 +3031,18 @@
 begin
   inherited Clear;
 
-  FAttachmentCount := 0;                                               {!!.12}
-  FMessageTag := 0;                                                    {!!.15}
+  FAttachmentCount := 0;
+  FMessageTag := 0;
 
   FBCC.Clear;
   FCC.Clear;
   FDate := '';
-  FDispositionNotify := '';                                            {!!.12}
+  FDispositionNotify := '';
   FFrom := '';
   FInReplyTo := '';
   FKeywords := '';
-  FFollowupTo := '';                                                   {!!.15}
-  FControl := '';                                                      {!!.15}
+  FFollowupTo := '';
+  FControl := '';
   FMessageID := '';
   FNewsgroups.Clear;
   FNNTPPostingHost := '';
@@ -3104,11 +3057,10 @@
   FSender := '';
   FSubject := '';
   FUserFields.Clear;
-  FHeaders.Clear;                                                      {!!.15}
+  FHeaders.Clear;
   MsgStream.FreeStream;
 end;
 
-{Begin !!.12}
 { Get headers, body, and MIME parts (if any) }
 procedure TIpMessage.DecodeMessage;
 
@@ -3280,11 +3232,10 @@
                 (FAttachmentCount > 0) then
       Dec (AttDepth);
   end;
-{End !!.12}
 var
   RawHeaders : TStringList;
   S : string;
-  i, j : Integer;                                                      {!!.13}
+  i, j : Integer;
 begin
   { get message headers}
   Position := 0;
@@ -3292,19 +3243,18 @@
   try
     S := ReadLine;
     repeat
-      if S <> '' then                                                  {!!.15}
+      if S <> '' then
         RawHeaders.Add(S);
       S := ReadLine;
     until (S = '');
 
-    FHeaders.Clear;                                                    {!!.12}
-    FHeaders.LoadHeaders (RawHeaders, False);                          {!!.12}
-    CheckAllHeaders;                                                   {!!.12}
+    FHeaders.Clear;
+    FHeaders.LoadHeaders (RawHeaders, False);
+    CheckAllHeaders;
 
     { decode MIME headers }
     DecodeMimeHeaders(RawHeaders);
 
-{Begin !!.13}
     { If this is a MIME message, mark the MIME headers as being exposed via an
       iPRO property. }
     if FIsMime then
@@ -3313,17 +3263,16 @@
         if j > -1 then
           FHeaders.Items[j].IsProperty := True;
       end;
-{End !!.13}
   finally
     RawHeaders.Free;
   end;
 
   { if message is mime, then decode mime parts }
-  if IsMime then begin                                                 {!!.01}
-    if (FContentDispositionType = strAttachment) then begin            {!!.12}
-      Inc (FParent.FAttachmentCount);                                  {!!.12}{!!.15}
-      DecodeEntityAsAttachment(MsgStream)                              {!!.01}
-    end else                                                           {!!.12}
+  if IsMime then begin
+    if (FContentDispositionType = strAttachment) then begin
+      Inc (FParent.FAttachmentCount);
+      DecodeEntityAsAttachment(MsgStream)
+    end else
       DecodeEntity(MsgStream);
   end else begin
     { otherwise, just read in the message body. }
@@ -3332,21 +3281,19 @@
     until (S <> '') or AtEndOfStream;
 
     { read in message body up to message terminator '.' }
-    {while not ((S = '.') or AtEndOfStream) do begin}                  {!!.10}
-    while not AtEndOfStream do begin                                   {!!.10}
+    {while not ((S = '.') or AtEndOfStream) do begin}
+    while not AtEndOfStream do begin
       Body.WriteLine(S);
-      AttDepth := 0;                                                   {!!.12}
-      CheckForAttachment (S);                                          {!!.12}
+      AttDepth := 0;
+      CheckForAttachment (S);
       S := ReadLine;
     end;
-    { write final line }                                               {!!.10}
-    if S <> '' then                                                    {!!.13}
-      Body.WriteLine(S);                                               {!!.10}
+    { write final line }
+    if S <> '' then
+      Body.WriteLine(S);
 
-{Begin !!.12}
     { Read the message body. }
     {ReadBody(MsgStream, S); }
-{End !!.12}
   end;
   Body.Position := 0;
 end;
@@ -3355,13 +3302,12 @@
 procedure TIpMessage.EncodeMessage;
 var
   i : Integer;
-  Size : Longint;                                                      {!!.12}
-  FileName : string;                                                   {!!.12}
-  Strm : TIpMemMapStream;                                              {!!.12}
+  Size : Longint;
+  FileName : string;
+  Strm : TIpMemMapStream;
   RawHeaders : TStringList;
 begin
   NewMessageStream;
-{Begin !!.12}
   { If we have some very large attachments then we need to use a memory mapped
     file stream instead of TMemory, in order to improve performance. }
   Size := 0;
@@ -3377,7 +3323,6 @@
     Strm.Open;
     MsgStream.Stream := Strm;
   end;
-{End !!.12}
   if (FContentType <> '') then begin
     FIsMime := True;
     FMimeVersion := '1.0';
@@ -3387,10 +3332,10 @@
     EncodeSingleHeader(strReturnPath, RawHeaders, FReturnPath);
     EncodeMultiHeader(strReceived, RawHeaders, FReceived, #09, True);
     EncodeListHeader(strPath, RawHeaders, FPath, ',', True);
-    EncodeListHeader(strNewsgroups, RawHeaders, FNewsgroups, ',', False); {!!.14}
+    EncodeListHeader(strNewsgroups, RawHeaders, FNewsgroups, ',', False);
     EncodeSingleHeader(strMessageID, RawHeaders, FMessageID);
-    EncodeSingleHeader (strDispositionNotify, RawHeaders,                {!!.12}
-                        FDispositionNotify);                             {!!.12}
+    EncodeSingleHeader (strDispositionNotify, RawHeaders,
+                        FDispositionNotify);
     EncodeSingleHeader(strReplyTo, RawHeaders, FReplyTo);
     EncodeSingleHeader(strFrom, RawHeaders, FFrom);
     EncodeListHeader(strTo, RawHeaders, FRecipients, ',', True);
@@ -3404,9 +3349,8 @@
     EncodeSingleHeader(strSender, RawHeaders, FSender);
     EncodeSingleHeader(strKeywords, RawHeaders, FKeywords);
     EncodeMultiHeader('', RawHeaders, FUserFields, Char(0), False);
-    EncodeSingleHeader(strControl, RawHeaders, FControl);               {!!.12}
-    EncodeSingleHeader(strFollowUp, RawHeaders, FFollowupTo);           {!!.12}
-{Begin !!.13}
+    EncodeSingleHeader(strControl, RawHeaders, FControl);
+    EncodeSingleHeader(strFollowUp, RawHeaders, FFollowupTo);
     for i := 0 to Pred(Headers.Count) do
       { Write the header out only if it is not a header exposed via an iPRO
         property. }
@@ -3418,7 +3362,6 @@
           EncodeMultiheader(Headers.Items[i].Name + ': ', RawHeaders,
                             Headers.Items[i].Value, #09, True);
       end;
-{End !!.13}
     if IsMime then
       EncodeMimeHeaders(RawHeaders);
     if (RawHeaders.Count = 0) then
@@ -3429,7 +3372,6 @@
     RawHeaders.Free;
   end;
 
-{Begin !!.13}
   WriteLine('');
   if IsMime then
     EncodeEntity(MsgStream)
@@ -3439,23 +3381,18 @@
       WriteLine(Body.ReadLine);
     until FBody.AtEndOfStream;
   end;  { if }
-{End !!.13}
 end;
 
 { Load message from file stream and decode }
 procedure TIpMessage.LoadFromFile(const aFileName : string);
-{Begin !!.12}
 var
   SourceStream : TIpMemMapStream;
-{End !!.12}
 begin
   Clear;
-  NewMessageStream;                                                    {!!.03}
-{Begin !!.12}
+  NewMessageStream;
   SourceStream := TIpMemMapStream.Create(aFileName, True, False);
   try
     SourceStream.Open;
-{Begin !!.15}
     if SourceStream.Size > IpLgAttachSizeBoundry then begin
       MsgStream.FreeStream;
       MsgStream.Stream := SourceStream;
@@ -3465,19 +3402,16 @@
   finally
     if MsgStream.Stream <> SourceStream then
       SourceStream.Free;
-{End !!.15}
   end;
-{End !!.12}
 
-  try                                                                  {!!.03}
+  try
     DecodeMessage;
-  except                                                               {!!.03}
+  except
     { just eat the exception, the messge might be corrupt, but the }
     { raw text (MessageStream property) will still be available    }
-  end;                                                                 {!!.03}
+  end;
 end;
 
-{Begin !!.12}
 procedure TIpMessage.LoadFromStream(aStream : TStream);
 var
   FileName : string;
@@ -3511,7 +3445,7 @@
 begin
   MsgStream.FreeStream;
   MsgStream.Stream := TMemoryStream.Create;
-  MsgStream.bsInitForNewStream;                                        {!!.02}
+  MsgStream.bsInitForNewStream;
 end;
 
 { Clear all and create new empty message stream }
@@ -3572,7 +3506,6 @@
   end;
 end;
 
-{Begin !!.12}
 {- Save raw message stream }
 procedure TIpMessage.SaveToStream(Stream: TStream);
 begin
@@ -3584,7 +3517,6 @@
 begin
   FHeaders.Assign(Headers);
 end;
-{End !!.12}
 
 { Position property write access method }
 procedure TIpMessage.SetPosition(Value : Longint);
@@ -3614,10 +3546,9 @@
 var
   aParent : TIpMimeEntity;
 begin
-  aParent := FindNestedMimePart(strMultipart, strAlternative, '');   {!!.02}
+  aParent := FindNestedMimePart(strMultipart, strAlternative, '');
   if not Assigned(aParent) then
     aParent := Self;
-{Begin !!.15}
   Result := aParent.FindNestedMimePart(strText, strPlain, '');
   if (Result = nil) and CanCreate then begin
     Result := NewMimePart;
@@ -3624,7 +3555,6 @@
     Result.ContentType := strText;
     Result.ContentSubtype := strPlain;
   end;
-{End !!.15}
 end;
 
 { Return 'alternative' text/html mime part }
@@ -3632,10 +3562,9 @@
 var
   aParent : TIpMimeEntity;
 begin
-  aParent := FindNestedMimePart(strMultipart, strAlternative, '');   {!!.02}
+  aParent := FindNestedMimePart(strMultipart, strAlternative, '');
   if not Assigned(aParent) then
     aParent := Self;
-{Begin !!.15}
   Result := aParent.FindNestedMimePart(strText, strHtml, '');
   if (Result = nil) and CanCreate then begin
     Result := NewMimePart;
@@ -3642,11 +3571,10 @@
     Result.ContentType := strText;
     Result.ContentSubtype := strHTML;
   end;
-{End !!.15}
 end;
 
 { Add a file attachment using default types }
-procedure TIpMessage.AddDefaultAttachment(const aFileName: string);     {!!.02}
+procedure TIpMessage.AddDefaultAttachment(const aFileName: string);
 begin
   with NewMimePart do begin
     EntityName := ExtractFileName(aFileName);
@@ -3655,15 +3583,15 @@
   end;
 end;
 
-procedure TIpMessage.AddDefaultAttachmentAs (const aFileName      : string;  {!!.12}
-                                             const AttachmentName : string); {!!.12}
-begin                                                                    {!!.12}
-  with NewMimePart do begin                                              {!!.12}
-    EntityName := ExtractFileName (AttachmentName);                      {!!.12}
-    ContentDispositionType := 'attachment';                              {!!.12}
-    EncodeBodyFile (aFileName);                                          {!!.12}
-  end;                                                                   {!!.12}
-end;                                                                     {!!.12}
+procedure TIpMessage.AddDefaultAttachmentAs (const aFileName      : string;
+                                             const AttachmentName : string);
+begin
+  with NewMimePart do begin
+    EntityName := ExtractFileName (AttachmentName);
+    ContentDispositionType := 'attachment';
+    EncodeBodyFile (aFileName);
+  end;
+end;
 
 { Set message properties from another TIpMessage }
 procedure TIpMessage.Assign(Source: TPersistent);
@@ -3682,52 +3610,52 @@
     MsgStream.CopyFrom(SourceMsg.MsgStream, 0);
     Position := 0;
     SourceMsg.Position := SourcePos;
-    try                                                                {!!.03}
+    try
       DecodeMessage;
-    except                                                             {!!.03}
+    except
       { just eat the exception, the messge might be corrupt, but the }
       { raw text (MessageStream property) will still be available    }
-    end;                                                               {!!.03}
+    end;
   end else
     inherited Assign(Source);
 end;
 
-procedure TIpMessage.SetBCC(const Value: TStringList);                 {!!.01}
+procedure TIpMessage.SetBCC(const Value: TStringList);
 begin
   FBCC.Assign(Value);
 end;
 
-procedure TIpMessage.SetCC(const Value: TStringList);                  {!!.01}
+procedure TIpMessage.SetCC(const Value: TStringList);
 begin
   FCC.Assign(Value);
 end;
 
-procedure TIpMessage.SetNewsgroups(const Value: TStringList);          {!!.01}
+procedure TIpMessage.SetNewsgroups(const Value: TStringList);
 begin
   FNewsgroups.Assign(Value);
 end;
 
-procedure TIpMessage.SetPath(const Value: TStringList);                {!!.01}
+procedure TIpMessage.SetPath(const Value: TStringList);
 begin
   FPath.Assign(Value);
 end;
 
-procedure TIpMessage.SetReceived(const Value: TStringList);            {!!.01}
+procedure TIpMessage.SetReceived(const Value: TStringList);
 begin
   FReceived.Assign(Value);
 end;
 
-procedure TIpMessage.SetRecipients(const Value: TStringList);          {!!.01}
+procedure TIpMessage.SetRecipients(const Value: TStringList);
 begin
   FRecipients.Assign(Value);
 end;
 
-procedure TIpMessage.SetReferences(const Value: TStringlist);          {!!.01}
+procedure TIpMessage.SetReferences(const Value: TStringlist);
 begin
   FReferences.Assign(Value);
 end;
 
-procedure TIpMessage.SetUserFields(const Value: TStringList);          {!!.01}
+procedure TIpMessage.SetUserFields(const Value: TStringList);
 begin
   FUserFields.Assign(Value);
 end;
@@ -3813,7 +3741,7 @@
 end;
 
 {HTTP Authentication Support -- .02}
-function IpBase64EncodeString(const InStr: string): string;              {!!.03}
+function IpBase64EncodeString(const InStr: string): string;
 {
 encode a string into Base64, intended for producing short ( < 100 chars or so)
 coded strings to be passed as part of HTTP authentications via HTTP headers.
@@ -3834,15 +3762,15 @@
 begin
   Result := '';
   Count := Length(InStr);
-  if Count = 0 then // empty input string nothing to encode              {!!.03}
-    Exit;                                                                {!!.03}
-  OutLen := Count * 2; // leave plenty of room for encoded string        {!!.03}
+  if Count = 0 then // empty input string nothing to encode
+    Exit;
+  OutLen := Count * 2; // leave plenty of room for encoded string
   GetMem(CvtBuff, OutLen + 1);
 
   Ct := 0;
   I := 1;
 
-  if Count >= 3 then begin                                               {!!.03}
+  if Count >= 3 then begin
     while I <= (Count - 2) do begin
       { Encode 1st byte }
       CvtBuff[Ct] := CodeByte(Ord(InStr[I]) shr 2);
@@ -3862,7 +3790,7 @@
 
       Inc(I, 3);
     end;
-  end;                                                                   {!!.03}
+  end;
 
   { Are there odd bytes to add? }
   if (I <= Count) then begin
Index: ipstrms.pas
===================================================================
--- ipstrms.pas	(revision 64098)
+++ ipstrms.pas	(working copy)
@@ -157,7 +157,7 @@
       constructor CreateEmpty;
       destructor  Destroy; override;
 
-      procedure Flush;                                                 {!!.12}
+      procedure Flush;
         { Flush any unwritten changes to the stream. }
       procedure FreeStream;
       function ReadChar(var aCh : AnsiChar) : Boolean;
@@ -211,7 +211,7 @@
       destructor Destroy; override;
 
       function  AtEndOfStream : Boolean;
-      procedure bsInitForNewStream; override;                        {!!.01}
+      procedure bsInitForNewStream; override;
       function  ReadLine : string;
       function  ReadLineArray(aCharArray : PAnsiChar; aLen : Longint) : Longint;
       function  ReadLineZ(aSt : PAnsiChar; aMaxLen : Longint) : PAnsiChar;
@@ -725,7 +725,6 @@
     raise EIpBaseException.Create(SCannotWriteToStream);
   FDirty := false;
 end;
-{Begin !!.12}
 
 {-----------------------------------------------------------------------------}
 
@@ -734,7 +733,6 @@
   if FDirty then
     bsWriteToStream;
 end;
-{End !!.12}
 
 {-----------------------------------------------------------------------------}
 
@@ -1482,7 +1480,6 @@
 {-----------------------------------------------------------------------------}
 
 procedure TIpAnsiTextStream.WriteLine(const aSt : string);
-{Rewritten !!.15}
 begin
   if Length(aSt) > 0 then
     WriteLineArray(@aSt[1], length(aSt))
@@ -1555,11 +1552,7 @@
 
   FHandle := THandle(FileOpen(FFileName, fmShareDenyNone + fmOpenReadWrite));
   if (Handle = IpFileOpenFailed) then
-{$IFDEF Version6OrHigher}
-    RaiseLastOSError; 
-{$ELSE}
-    RaiseLastWin32Error;
-{$ENDIF}
+    RaiseLastOSError;
 end;
 
 destructor TIpDownloadFileStream.Destroy;
@@ -1585,7 +1578,7 @@
     raise EIpBaseException.Create(SBadPath);
 
   { Create a new uniquely named file in that folder. }
-  FFileName := GetTemporaryFile(FPath);                                {!!.12}
+  FFileName := GetTemporaryFile(FPath);
 end;
 
 function TIpDownloadFileStream.Read(var Buffer; Count : Longint) : Longint;
@@ -1618,14 +1611,8 @@
   {calculate the full new name}
   NewFullName := FPath + '\' + aNewName;
   {rename the file}
-{$IFDEF Version6OrHigher}
-  {$IFNDEF IP_LAZARUS} //TODO need review
-  if not MoveFile(PAnsiChar(FFileName), PAnsiChar(NewFullName)) then
+  if not RenameFile(FFileName, NewFullName) then
     RaiseLastOSError;
-  {$ENDIF}
-{$ELSE}
-  Win32Check(MoveFile(PAnsiChar(FFileName), PAnsiChar(NewFullName)));
-{$ENDIF}
   {open up the same file, but with its new name}
   FFileName := NewFullName;
   try
@@ -1635,11 +1622,7 @@
   end;
 
   if (Handle = IpFileOpenFailed) then
-{$IFDEF Version6OrHigher}
     RaiseLastOSError;
-{$ELSE}
-    RaiseLastWin32Error;
-{$ENDIF}
 
   FRenamed  := true;
 end;
@@ -1650,16 +1633,9 @@
   {close the current handle}
   //CloseHandle(Handle);
   FHandle := IpFileOpenFailed;
-  {copy the file}                                                      {!!.01}
-{$IFDEF Version6OrHigher}
-  {$IFNDEF IP_LAZARUS} //TODO Need review
-  if not CopyFile(PAnsiChar(FFileName), PAnsiChar(aNewName), False) then
+  {copy the file}
+  if not RenameFile(FFileName, aNewName) then
     RaiseLastOSError;
-  {$ENDIF}
-{$ELSE}
-  Win32Check(CopyFile(PAnsiChar(FFileName),                            {!!.01}
-    PAnsiChar(aNewName), False));                                      {!!.01}
-{$ENDIF}
 
   {open up the same file, but with its new name}
   FFileName := aNewName;
@@ -1670,11 +1646,7 @@
   end;
 
   if (Handle = IpFileOpenFailed) then
-{$IFDEF Version6OrHigher}
     RaiseLastOSError;
-{$ELSE}
-    RaiseLastWin32Error;
-{$ENDIF}
 
   FRenamed  := true;
 end;
Index: iputils.pas
===================================================================
--- iputils.pas	(revision 64098)
+++ iputils.pas	(working copy)
@@ -1156,7 +1156,7 @@
 function IpParseURL(const URL : string; var Rslt : TIpAddrRec) : Boolean;
 { Splits URL into components }
 
-{!!.03 -- rewritten
+{ -- rewritten
   - Parsing UserName and Password fields out of Mailto: urls of the form:
       mailto:user:pass@myserver.net
   - Username and Password fields added to TIpAddrRec in support of
@@ -2020,7 +2020,7 @@
   Sun Nov  6 08:49:37 1994        ; ANSI C's asctime() format
 }
 
-{!!.03 -- rewritten to handle common variants such as the Day or Month name
+{-- rewritten to handle common variants such as the Day or Month name
 to be fully spelled out where they are not in the canonical form, or to have
 a 4 digit year in the RFC 850 style
 }
@@ -2668,13 +2668,11 @@
   Result:=DirPathExists(Dir);
 end;
 
-{Begin !!.12}
 { Get temporary filename as string }
 function GetTemporaryFile(const Path : string) : string;
 begin
   Result:=GetTempFileNameUTF8(Path,'IP_');
 end;
-{End !!.12}
 
 { Get Windows system TEMP path in a string }
 function GetTemporaryPath: string;

Juha Manninen

2020-11-02 11:07

developer   ~0126694

Looks good. I applied it and resolving now.

Issue History

Date Modified Username Field Change
2020-10-26 11:46 Zaher Dirkey New Issue
2020-10-26 11:46 Zaher Dirkey Tag Attached: ipHTMLPanel
2020-10-26 11:55 Bart Broersma Status new => feedback
2020-10-26 11:55 Bart Broersma LazTarget => -
2020-10-26 11:55 Bart Broersma Note Added: 0126565
2020-10-26 14:42 Juha Manninen Note Added: 0126569
2020-10-26 14:43 Juha Manninen Note Edited: 0126569 View Revisions
2020-11-01 09:15 Zaher Dirkey Note Added: 0126682
2020-11-01 09:15 Zaher Dirkey File Added: removing-ip-lazarus-define.patch
2020-11-01 09:15 Zaher Dirkey Status feedback => new
2020-11-01 11:37 Juha Manninen Assigned To => Juha Manninen
2020-11-01 11:37 Juha Manninen Status new => assigned
2020-11-01 11:38 Juha Manninen Note Added: 0126683
2020-11-01 11:39 Juha Manninen Fixed in Revision => r64097
2020-11-01 21:03 Zaher Dirkey Note Added: 0126690
2020-11-01 21:03 Zaher Dirkey File Added: removing-ip-lazarus-define02.patch
2020-11-02 01:11 wp Note Added: 0126692
2020-11-02 09:12 Zaher Dirkey Note Added: 0126693
2020-11-02 09:12 Zaher Dirkey File Added: removing-ip-lazarus-define02-repatch.patch
2020-11-02 11:07 Juha Manninen Status assigned => resolved
2020-11-02 11:07 Juha Manninen Resolution open => fixed
2020-11-02 11:07 Juha Manninen Fixed in Revision r64097 => r64097, r64099
2020-11-02 11:07 Juha Manninen Note Added: 0126694
2020-11-03 14:34 Zaher Dirkey Status resolved => closed