AW>> ok... Go to http://vvv.com/~weirdal/others.htm ... I have put
AW>> it there in all it's glory... No UUDecoding... no nothing... (well,
AW>> no docs either; just type "patch {path}" or "unpatch {path}" where
AW>> path is the directory you want to check (be sure it's on the same
AW>> drive though))
KF> This ain't right! When I had a look at it, I was definitely NOT in the
KF> root directory, yet that's where it started processing from.
Then try "patch ." ... "." is the current path...
KF> I deleted your program because it doesn't allow the user to know or
KF> interact with what's going on. Sorry but without *at least* some
KF> documentation explaining the process and what it does, I don't feel
KF> safe with it. I would have kept it if I could have at least isolated
KF> the processing to one directory tree rather than have it scan the entire
KF> drive non-stop as it appeared to do. Even an output file of all files
KF> that were changed would make me feel a little more comfortable about
KF> using it, but not unless...
It does nothing without asking first. *IF* it finds a program that needs the
patch, it asks you if you want to patch it. If you say no, it goes on
searching. Do you think *I* would feel safe testing it on my own system if
it didn't ask?
KF> Let us know when/if this is fixed.
If you don't like it, make one yourself. I just was *nice* enough to try to
make others lives easier. If you like, I will make one that you type "patch
{filename}", and then you can go through all your files and patch them one by
one, if you like... In fact, here you go... Hot off the compiler... If you
want to make it into an un-patcher, swap SearchPattern and ReplacePattern.
Const
SearchPattern : Array[0..8] of Byte =(247,208,247,210,185,55,00,247,240);
ReplacePattern : Array[0..8] of Byte =(247,208,247,210,184,255,255,144,143);
Procedure ProcessFile(S:String);
Var F : File of Byte;
F2 : File;
B : Byte;
NumRead,Count : Integer;
Found : Boolean;
W,Where : LongInt;
begin
Assign(F,S); {$I-} Reset(F); {$I+}
If IOResult0 then
begin
Writeln('Unable to open "'+S+'"...'); Exit;
end;
Found:=False; Count:=0; W:=0;
{$I-}
Repeat
Read(F,B); Inc(W);
If B=SearchPattern[Count] then begin Inc(Count); end else Count:=0;
If Count=9 then Found:=True;
until (EOF(F)) or (Found); Close(F);
{$I+}
If Not(Found) then begin Writeln('Patch not needed...'); Exit; End;
Assign(F2,S); Reset(F2,1); Seek(F2,W-9); BlockWrite(F2,ReplacePattern,9);
Close(F2); Writeln('Patch Applied...');
end;
begin
Writeln(' Turbo Pascal CRT/FastCPU Bug Mini-Patcher by Weird Al Walker');
Writeln(' (http://vvv.com/~weirdal)'); Writeln;
Inc(SearchPattern[8]); Inc(ReplacePattern[8]); ProcessFile(ParamStr(1));
end.
--- GoldED 2.40
(1:340/88)
---------------
* Origin: Crazy Train BBS (250)383-2201 VGA Planets/Local Doorgames
|