equal
deleted
inserted
replaced
774 {$IFDEF IPHONEOS} |
774 {$IFDEF IPHONEOS} |
775 Assign(f,'../Documents/debug.txt'); |
775 Assign(f,'../Documents/debug.txt'); |
776 Rewrite(f); |
776 Rewrite(f); |
777 {$ELSE} |
777 {$ELSE} |
778 if (ParamStr(1) <> '') and (ParamStr(2) <> '') then |
778 if (ParamStr(1) <> '') and (ParamStr(2) <> '') then |
|
779 if (ParamCount <> 3) and (ParamCount <> 18) then |
779 begin |
780 begin |
780 for i:= 0 to 7 do |
781 for i:= 0 to 7 do |
|
782 begin |
|
783 assign(f, ExtractFileDir(ParamStr(2)) + '/debug' + inttostr(i) + '.txt'); |
|
784 rewrite(f); |
|
785 if IOResult = 0 then break; |
|
786 end; |
|
787 if IOResult <> 0 then f:= stderr; // if everything fails, write to stderr |
|
788 end |
|
789 else |
781 begin |
790 begin |
782 assign(f, ExtractFileDir(ParamStr(2)) + '/debug' + inttostr(i) + '.txt'); |
791 for i:= 0 to 7 do |
783 rewrite(f); |
792 begin |
784 if IOResult = 0 then break; |
793 assign(f, ParamStr(1) + '/debug' + inttostr(i) + '.txt'); |
785 end; |
794 rewrite(f); |
786 if IOResult <> 0 then f:= stderr; // if everything fails, write to stderr |
795 if IOResult = 0 then break; |
|
796 end; |
|
797 if IOResult <> 0 then f:= stderr; // if everything fails, write to stderr |
787 end |
798 end |
788 else |
799 else |
789 f:= stderr; |
800 f:= stderr; |
790 {$ENDIF} |
801 {$ENDIF} |
791 {$I+} |
802 {$I+} |