diff --git a/components/htmllite/htmllite.pas b/components/htmllite/htmllite.pas
index ac15e201c2..a0627d3d86 100644
--- a/components/htmllite/htmllite.pas
+++ b/components/htmllite/htmllite.pas
@@ -11,6 +11,7 @@
unit HTMLLite;
interface
+{$DEFINE HL_LAZARUS}
{$IFDEF HL_LAZARUS}
uses
@@ -225,7 +226,11 @@ type
procedure WMGetDlgCode(var Message: TMessage); message WM_GETDLGCODE;
procedure BackgroundChange(Sender: TObject);
procedure SubmitForm(Sender: TObject;
- const Action, TheTarget, EncType, Method: string; Results: TStringList);
+{$IFDEF HL_LAZARUS}
+ const TheAction, TheTarget, EncType, Method: string; Results: TStringList);
+{$ELSE}
+ const Action, TheTarget, EncType, Method: string; Results: TStringList);
+{$ENDIF}
procedure SetImageCacheCount(Value: integer);
procedure WMFormSubmit(var Message: TMessage); message WM_FormSubmit;
procedure WMMouseScroll(var Message: TMessage); message WM_MouseScroll;
@@ -2216,11 +2221,20 @@ else FSectionList.SubmitForm := Nil;
end;
procedure ThtmlLite.SubmitForm(Sender: TObject;
+{$IFDEF HL_LAZARUS}
+ const TheAction, TheTarget, EncType, Method: string; Results: TStringList);
+{$ELSE}
const Action, TheTarget, EncType, Method: string; Results: TStringList);
+{$ENDIF}
+
begin
if Assigned(FOnFormSubmit) then
begin
+{$IFDEF HL_LAZARUS}
+ FAction := TheAction;
+{$ELSE}
FAction := Action;
+{$ENDIF}
FMethod := Method;
FFormTarget := TheTarget;
FEncType:= EncType;
diff --git a/components/htmllite/lazhtmllite.pas b/components/htmllite/lazhtmllite.pas
index 3a2180842f..64c0eee41d 100644
--- a/components/htmllite/lazhtmllite.pas
+++ b/components/htmllite/lazhtmllite.pas
@@ -8,8 +8,8 @@ unit LazHTMLLite;
interface
uses
- HTMLLite, LiteDith, LitePars, LiteReadThd, LiteSbs1, LiteSubs, LiteUn2,
- LiteGIF2, LazarusPackageIntf;
+
+ HTMLLite, LiteDith, LitePars, LiteReadThd, LiteSbs1, LiteSubs, LiteUn2, LiteGIF2, LazarusPackageIntf;
implementation
diff --git a/components/htmllite/litepars.pas b/components/htmllite/litepars.pas
index 6fd685a058..bc57f396fe 100644
--- a/components/htmllite/litepars.pas
+++ b/components/htmllite/litepars.pas
@@ -614,31 +614,36 @@ try
while I <=5 do
begin
if not (Ch in ['0'..'9']) then
- begin
+ begin
if Ch = ';' then NextCh;
if S <> '' then
begin
- N := StrToInt(S);
- if (N > 255) then
- begin
- W := WideChar(N);
- S := WideCharLenToString(@W, 1);
- LCToken.AddChar(S[1], SaveIndex);
- GoTo 2;
- end
- else if (byte(N) in [9, 10, 32..255]) then
+ N := StrToInt(S);
+ if (N > 255) then
begin
- if N = 9 then LCToken.AddChar(' ', SaveIndex)
- else LCToken.AddChar(chr(N), SaveIndex);
- GoTo 2;
+ //don't know what to do about widechar , comment out for now
+ {$IFNDEF HL_LAZARUS}
+ W := WideChar(N);
+ S := WideCharLenToString(@W, 1);
+ LCToken.AddChar(S[1], SaveIndex);
+ {$ELSE}
+ LCToken.AddChar({S[1]}' ', SaveIndex);
+ {$ENDIF}
+ GoTo 2;
+ end
+ else if (byte(N) in [9, 10, 32..255]) then
+ begin
+ if N = 9 then LCToken.AddChar(' ', SaveIndex)
+ else LCToken.AddChar(chr(N), SaveIndex);
+ GoTo 2;
end;
end;
- LCToken.Concat(Collect);
- GoTo 2;
+ LCToken.Concat(Collect);
+ GoTo 2;
end;
- S := S+LCh;
- Inc(I);
- NextCh;
+ S := S+LCh;
+ Inc(I);
+ NextCh;
end;
LCToken.Concat(Collect);
GoTo 2;
@@ -1271,14 +1276,22 @@ procedure ThlParser.GetOptions(Select: TListBoxFormControlObj);
{get the