Menu

#3 patch for 918156

closed
nobody
None
5
2014-08-17
2004-04-27
No

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.

Index: ImportMSVCFm.pas

==
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);

Discussion

  • Colin Laplace

    Colin Laplace - 2004-04-28

    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

     
  • Oliver Stöneberg

    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.

     
  • Marek Januszewski

    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.

     
  • Oliver Stöneberg

    Logged In: YES
    user_id=591019

    I know. But I had no proper "source" file to diff my
    modified version against.

     
  • Oliver Stöneberg

    Logged In: YES
    user_id=591019

    Forgot to mention, that I attached the patch. It's against
    rev1.12 (latest CVS).

     
  • Oliver Stöneberg

     
  • Oliver Stöneberg

    Logged In: YES
    user_id=591019

    I updated the diff to rev1.13.

     
  • Marek Januszewski

    Logged In: YES
    user_id=609236

    Colin did you test this patch? is it ok to apply?

     
  • Colin Laplace

    Colin Laplace - 2004-09-21

    Logged In: YES
    user_id=25510

    finally applied, thank you

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.