From 303253aeed2f07bde7ff8a13ee3339fad279584d Mon Sep 17 00:00:00 2001 From: Merlijn Wajer Date: Tue, 26 Jul 2011 21:44:01 +0200 Subject: [PATCH] Simba: Attempt to fix include_once behaviour. --- Projects/Simba/Simba.inc | 2 ++ Units/MMLAddon/mmlpsthread.pas | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Projects/Simba/Simba.inc b/Projects/Simba/Simba.inc index d8ec62b..ee530c9 100644 --- a/Projects/Simba/Simba.inc +++ b/Projects/Simba/Simba.inc @@ -26,6 +26,8 @@ // See Units/Linux/keybinder.pas {$ENDIF} +//{$DEFINE SIMBA_VERBOSE} // For more verbosity. + //{$DEFINE USE_RUTIS} //{$DEFINE USE_CPASCAL} // TODO diff --git a/Units/MMLAddon/mmlpsthread.pas b/Units/MMLAddon/mmlpsthread.pas index 0079dbd..292444c 100644 --- a/Units/MMLAddon/mmlpsthread.pas +++ b/Units/MMLAddon/mmlpsthread.pas @@ -746,11 +746,15 @@ begin if (path <> '') then if Includes.Find(path,i) then begin - psWriteln('Include_Once file already included'); - Result := False; + {$IFDEF SIMBA_VERBOSE} + psWriteln('Include_Once file already included:' + Path); + {$ENDIF} + Result := True; + Exit; end; + Includes.Add(path); - Result := True; + Result := False; end; procedure SIRegister_Mufasa(cl: TPSPascalCompiler);