From b83a27750258298454bbe99097cab47cddd4d6f2 Mon Sep 17 00:00:00 2001 From: "John P (Dgby714)" Date: Thu, 7 Jul 2011 12:22:51 -0400 Subject: [PATCH] TLPThread Update - Init Result to False in OnHandleDirective. - Override lape _writeln, Now adds to Debug memo. --- Units/MMLAddon/mmlpsthread.pas | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Units/MMLAddon/mmlpsthread.pas b/Units/MMLAddon/mmlpsthread.pas index 24b999c..914d9c0 100644 --- a/Units/MMLAddon/mmlpsthread.pas +++ b/Units/MMLAddon/mmlpsthread.pas @@ -1233,6 +1233,11 @@ type PMDTM = ^TMDTM; PMDTMPoint = ^TMDTMPoint; PSDTM = ^TSDTM; + + procedure lp_WriteLn(Params: PParamArray); + begin + psWriteLn(PlpString(Params^[0])^); + end; //Generate these wrappers with a script -Dg //{$I LPInc/Wrappers/other.inc} @@ -1266,6 +1271,8 @@ begin Fonts := Client.MOCR.Fonts; with Compiler do begin + addGlobalFunc('procedure _writeln; override;', @lp_WriteLn); + for I := Fonts.Count - 1 downto 0 do addGlobalVar(Fonts[I].Name, Fonts[I].Name); @@ -1310,6 +1317,7 @@ function TLPThread.OnHandleDirective(Sender: TLapeCompiler; Directive, Argument: var plugin_idx: integer; begin + Result := False; if (Directive = 'loadlib') then begin if (Argument <> '') then