2010-03-13 10:33:04 -05:00
|
|
|
unit mufasabase;
|
|
|
|
|
2010-04-02 11:55:54 -04:00
|
|
|
{$mode objfpc}{$H+}
|
2010-03-13 10:33:04 -05:00
|
|
|
|
|
|
|
interface
|
2010-03-22 10:58:30 -04:00
|
|
|
{$undefine mDebug}
|
2010-03-13 10:33:04 -05:00
|
|
|
|
|
|
|
uses
|
|
|
|
files, Classes, SysUtils{$ifdef MSWindows},windows{$endif};
|
|
|
|
|
|
|
|
procedure mDebugLn( s : string);overload;
|
|
|
|
procedure mDebugLn( s : string; f : array of const);overload;
|
|
|
|
procedure InitmDebug;
|
|
|
|
procedure FreemDebug;
|
|
|
|
implementation
|
|
|
|
|
|
|
|
var
|
|
|
|
CanDebug : boolean = false;
|
|
|
|
|
|
|
|
procedure mDebugLn(s: string);
|
|
|
|
begin
|
|
|
|
if CanDebug then
|
|
|
|
Writeln(s);
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure mDebugLn(s: string; f: array of const); overload;
|
|
|
|
begin
|
|
|
|
mDebugLn(format(s,f));
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure InitmDebug;
|
|
|
|
begin
|
|
|
|
CanDebug := true;
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure FreemDebug;
|
|
|
|
begin
|
|
|
|
CanDebug := false;
|
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|
|
|
|
|