This commit is contained in:
miks1965 2015-10-10 20:37:41 +03:00
commit 4d22afd2aa
9 changed files with 33 additions and 14 deletions

View file

@ -19,7 +19,7 @@ begin
while not eof(f) do
begin
readln(f,s);
sb.append(s);
sb.AppendLine(s);
end;
ReadFileToEnd:=sb.ToString();
CloseFile(f);{}

View file

@ -17,7 +17,7 @@ begin
while not eof(f) do
begin
readln(f,s);
sb.append(s);
sb.AppendLine(s);
end;
ReadFileToEnd:=sb.ToString();
CloseFile(f);{}

View file

@ -21,11 +21,14 @@ begin
while not eof(f) do begin
readln(f,s);
i := s.IndexOf('=');
name := s.Substring(0,i);
if name = IncrementDef then
defs.Add(name, System.Convert.ToInt32(s.Substring(i+1))+IncrementValue)
else
defs.Add(name, s.Substring(i+1));
if i > 0 then
begin
name := s.Substring(0,i);
if name = IncrementDef then
defs.Add(name, System.Convert.ToInt32(s.Substring(i+1))+IncrementValue)
else
defs.Add(name, s.Substring(i+1));
end;
end;
CloseFile(f);
AssignFile(f, DefsFile);

View file

@ -19,7 +19,7 @@ begin
while not eof(f) do
begin
readln(f,s);
sb.append(s);
sb.AppendLine(s);
end;
ReadFileToEnd:=sb.ToString();
CloseFile(f);{}

View file

@ -5700,7 +5700,7 @@ end;
procedure Assert(cond: boolean);
begin
if (Environment.OSVersion.Platform = PlatformID.Unix) or (Environment.OSVersion.Platform = PlatformID.MacOSX) then
if (Environment.OSVersion.Platform = PlatformID.Unix) or (Environment.OSVersion.Platform = PlatformID.MacOSX) or IsWDE then
begin
var stackTrace := new System.Diagnostics.StackTrace(true);
var ind := 1;
@ -5708,7 +5708,15 @@ begin
ind := 0;
var currentLine := stackTrace.GetFrame(ind).GetFileLineNumber();
var currentFile := stackTrace.GetFrame(ind).GetFileName();
System.Diagnostics.Debug.Assert(cond,'Ôàéë '+currentFile+', ñòðîêà '+currentLine.ToString());
if not IsWDE then
System.Diagnostics.Debug.Assert(cond,'Ôàéë '+currentFile+', ñòðîêà '+currentLine.ToString())
else if not cond then
begin
var err := 'Ñáîé ïîäòâåðæäåíèÿ: '+Environment.NewLine+'Ôàéë '+currentFile+', ñòðîêà '+currentLine.ToString();
writeln(err);
System.Threading.Thread.Sleep(500);
raise new Exception();
end;
end
else
System.Diagnostics.Debug.Assert(cond);
@ -5716,7 +5724,7 @@ end;
procedure Assert(cond: boolean; mes: string);
begin
if (Environment.OSVersion.Platform = PlatformID.Unix) or (Environment.OSVersion.Platform = PlatformID.MacOSX) then
if (Environment.OSVersion.Platform = PlatformID.Unix) or (Environment.OSVersion.Platform = PlatformID.MacOSX) or IsWDE then
begin
var stackTrace := new System.Diagnostics.StackTrace(true);
var ind := 1;
@ -5724,7 +5732,15 @@ begin
ind := 0;
var currentLine := stackTrace.GetFrame(ind).GetFileLineNumber();
var currentFile := stackTrace.GetFrame(ind).GetFileName();
System.Diagnostics.Debug.Assert(cond,'Ôàéë '+currentFile+', ñòðîêà '+currentLine.ToString()+': '+mes);
if not IsWDE then
System.Diagnostics.Debug.Assert(cond,'Ôàéë '+currentFile+', ñòðîêà '+currentLine.ToString()+': '+mes)
else if not cond then
begin
var err := 'Ñáîé ïîäòâåðæäåíèÿ: '+mes+Environment.NewLine+'Ôàéë '+currentFile+', ñòðîêà '+currentLine.ToString();
writeln(err);
System.Threading.Thread.Sleep(500);
raise new Exception();
end;
end
else
System.Diagnostics.Debug.Assert(cond, mes);

View file

@ -33,7 +33,7 @@ namespace PascalABCCompiler
public static bool DetailOut = false;
public static bool Rebuild=false;
public static CompilerOptions.OutputType outputType;
public static bool Debug = false;
public static bool Debug = true;
public static bool UseDll = false;
public static List<Error> GlobalErrorsList = new List<Error>();
public static DateTime StartTime;

View file

@ -69,7 +69,7 @@ namespace PascalABCCompiler
co.OutputDirectory = "";
else co.OutputDirectory = args[1];
co.Rebuild = false;
co.Debug = false;
co.Debug = true;
co.UseDllForSystemUnits = false;
bool success = true;