I made a small patch to fix this problem (this is my first
time ever I did Delphi programming). The only thing left is
an error message, if LocateSourceTarget returns false.
==
RCS file: /cvsroot/dev-cpp/V5/source/ImportMSVCFm.pas,v
retrieving revision 1.12
diff -r1.12 ImportMSVCFm.pas
64a65
function LocateSourceTarget(var StartAt, EndAt:
integer): boolean;
67c68
< procedure ReadSourceFiles;
procedure ReadSourceFiles(StartAt, EndAt: integer);
179a181,201
function TImportMSVCForm.LocateSourceTarget(var StartAt,
EndAt: integer): boolean;
var
I: integer;
begin
Result := False;
I := 0;
while I < fSL.Count do begin
if (AnsiStartsStr('# Begin Target', fSL[I])) then
begin
Inc(I);
StartAt := I;
while not (AnsiStartsStr('# End Target',
fSL[I])) do
Inc(I);
EndAt := I - 1;
Result := True;
Break;
end;
Inc(I);
end;
end;344c366,367
< procedure TImportMSVCForm.ReadSourceFiles;
procedure TImportMSVCForm.ReadSourceFiles(StartAt,
EndAt: integer);
358c381
< for I := 0 to fSL.Count - 1 do
for I := StartAt to EndAt do
479a503
SrcStartAt, SrcEndAt: integer;
502c526,527
< ReadSourceFiles;
LocateSourceTarget(SrcStartAt, SrcEndAt)
ReadSourceFiles(SrcStartAt, SrcEndAt);
Logged In: YES
user_id=25510
Thanks for the patch, but can you provide it in a file suitable
for the patch program please ?
Colin
Logged In: YES
user_id=591019
It's a diff from CVS. Done with the CVS tool within Dev-C++.
Putting the code into a .diff file and running patch, should
be okay. But formatting again...dang...I will attach a diff
soon. Gimme a few minutes.
Logged In: YES
user_id=609236
kidkat:
try "unified" option
or
diff -urN oldfile.pas newfile.pas
then it's easy to patch it with patch util.
Logged In: YES
user_id=591019
I know. But I had no proper "source" file to diff my
modified version against.
Logged In: YES
user_id=591019
Forgot to mention, that I attached the patch. It's against
rev1.12 (latest CVS).
Logged In: YES
user_id=591019
I updated the diff to rev1.13.
Logged In: YES
user_id=609236
Colin did you test this patch? is it ok to apply?
Logged In: YES
user_id=25510
finally applied, thank you