equal
deleted
inserted
replaced
336 Rewrite(f); |
336 Rewrite(f); |
337 {$ELSE} |
337 {$ELSE} |
338 if (ParamStr(1) <> '') and (ParamStr(2) <> '') then |
338 if (ParamStr(1) <> '') and (ParamStr(2) <> '') then |
339 if (ParamCount <> 3) and (ParamCount <> cDefaultParamNum) then |
339 if (ParamCount <> 3) and (ParamCount <> cDefaultParamNum) then |
340 begin |
340 begin |
341 for i:= 0 to 7 do |
341 i:= 0; |
|
342 while(i < 7) do |
342 begin |
343 begin |
343 assign(f, ExtractFileDir(ParamStr(2)) + '/' + cLogfileBase + inttostr(i) + '.log'); |
344 assign(f, ExtractFileDir(ParamStr(2)) + '/' + cLogfileBase + inttostr(i) + '.log'); |
344 rewrite(f); |
345 rewrite(f); |
345 if IOResult = 0 then break; |
346 if IOResult = 0 then break; |
|
347 inc(i) |
346 end; |
348 end; |
347 if IOResult <> 0 then f:= stderr; // if everything fails, write to stderr |
349 if i = 7 then f:= stderr; // if everything fails, write to stderr |
348 end |
350 end |
349 else |
351 else |
350 begin |
352 begin |
351 for i:= 0 to 7 do |
353 i:= 0; |
|
354 while(i < 7) do |
352 begin |
355 begin |
353 assign(f, ParamStr(1) + '/Logs/' + cLogfileBase + inttostr(i) + '.log'); |
356 assign(f, ParamStr(1) + '/Logs/' + cLogfileBase + inttostr(i) + '.log'); |
354 rewrite(f); |
357 rewrite(f); |
355 if IOResult = 0 then break; |
358 if IOResult = 0 then break; |
|
359 inc(i) |
356 end; |
360 end; |
357 if IOResult <> 0 then f:= stderr; // if everything fails, write to stderr |
361 if i = 7 then f:= stderr; // if everything fails, write to stderr |
358 end |
362 end |
359 else |
363 else |
360 f:= stderr; |
364 f:= stderr; |
361 {$ENDIF} |
365 {$ENDIF} |
362 {$I+} |
366 {$I+} |