{$A+,B-,D-,E-,F-,I-,L-,N-,O-,R-,S+,V-}
{╔══════════════════════════════════════════════════════════════════════════╗}
{║ -- THIS FILE IS PART OF THE LIVESYSTEMS COMPRESSOR TOOLBOX. -- ║}
{║ ALL RIGHTS RESERVED (C) COPYRIGHTED G. HOOGTERP 1994 ║}
{║ ║}
{║ See the documentation for details on the license. ║}
{║ ║}
{╚══════════════════════════════════════════════════════════════════════════╝}
{$M 10000,0,60000}
Program DemoComp_OBJ;
Uses Dos,
Crt,
CompSys; { The compression system unit }
{$I struct.pas}
Var CO : CompressorType; { The "Work" object }
Search : SearchRec; { For handeling Filespecs. }
Path : PathStr; { The path to use }
Dum : String[10]; { A Dummy }
IBMRec : IBM; { IBM info record }
MACRec : MAC; { MAC info record }
Begin
{ClrScr;}
WriteLn('DemoComp/OOPS for COMPSYS 1.4 (C) Copyright G. Hoogterp 1994');
WriteLn('FidoNet 2:283/7.33 or 2:282/10.5 Internet GERHARD@LOIPON.WLINK.NL');
WriteLn;
If ParamCount=0
Then Begin
WriteLn('Usage: DEMOCOMP <FileSpec>');
WriteLn;
Halt;
End;
Assign(output,'');
Rewrite(Output);
FSplit(ParamStr(1),Path,Dum,Dum);
FindFirst(ParamStr(1),AnyFile,Search);
While DosError=0 Do
Begin
If DetectCompressor(Path+Search.Name,CO) { Find the compressor used }
Then Begin;
WriteLn;
CO^.CheckProtection; { Grab the info about }
{ Security, version etc }
CO^.WriteHeader; { Write the header for the }
{ found platform. }
CO^.FindFirstEntry; { Find the first file inside }
While Not CO^.LastEntry Do { The compressed file }
Begin
CO^.PrintEntry; { Show the entry }
{*****************************************************************}
{** I don't understand why the typecase is needed, but without **}
{** TP complains about incompatible types. Beats me for the **}
{** moment since they are the same type. **}
{** With The IBMrec or MACrec you can do something yourself **}
{*****************************************************************}
Case PlatformID(CO^.WhichPlatform) Of
ID_IBM : CO^.ReturnEntry(IBMRec);
ID_MAC : CO^.ReturnEntry(MACRec);
End; {Mac}
CO^.FindNextEntry; { Find the next entry }
End;
End;
FindNext(Search);
End;
End.