home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2001 August
/
PCWorld_2001-08_cd.bin
/
Software
/
Vyzkuste
/
archident
/
IDARC.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
2001-06-24
|
10KB
|
335 lines
(* Beispielprogramm für die Anwendung der Unit IDPACKER.PAS *)
(* Sample program for the use of IDPACKER.PAS *)
{$B-,I-,V-,E-,S-,N-,R-,O-,X-,A+}
{$IFDEF WOLNA}
{$N+,E+}
{$ENDIF}
{$IFNDEF DEBUG}
{$D-,L-}
{$ENDIF}
{$M 5120,0,655360}
USES Umleit,DOS,IDPacker{$IFDEF LONGNAME},LFN{$ENDIF};
CONST Version='1.66.04';
Jahr='2001';
n=176+2;
PackerNames:Array[1..n] of String[22]=
('ARC',
'ZIP',
'ZOO',
'LZH',
'DWC',
'MDCD',
'LBR',
'ARJ',
'HYP',
'UC2',
'HAP',
'HA',
'HPack (HPK)',
'SQZ (Squeeze It)',
'RAR',
'PAK',
'ARC+',
'LIM',
'BSN/BSA (PTS-DOS)',
'PUT',
'SQWEZ',
'Crush/ZIP',
'Crush/ARJ',
'Crush/LZH',
'Crush/ZOO',
'Crush/HA',
'LZExe',
'PKLite',
'Diet',
'TinyProg',
'GIF',
'JPG (JFIF)',
'JPG (HSI)',
'AIN',
'AINEXE',
'SAR',
'BS2/BSArc',
'GZIP/Comp 4.3',
'ACB',
'MAR',
'CPZ (CPShrink)',
'JRC',
'JArcs',
'Quantum',
'ReSOF',
{$IFNDEF ENGLISH}
'Crush/ungepackt',
{$ELSE}
'Crush/uncomp.',
{$ENDIF}
'ARX',
'UCEXE',
'WWPack',
'QuArk',
'YAC',
'X1',
'Codec',
'AMGC',
'NuLIB',
'PAKLeo (PLL)',
'TGZ',
'WWPack-Datendatei',
'ChArc',
'PSA',
'ZAR',
'LHark',
'CrossePAC',
'Freeze',
'KBoom',
'NSQ',
'DPA',
'TTComp',
'WIC (Fake!)',
'RKive',
'JAR',
'ESP',
'ZPack',
'DRY',
'OWS (Fake!)',
'SKY',
'ARI',
'UFA',
'Microsoft CAB',
'FOXSQZ',
'AR7',
'TSComp',
'PPMZ',
'MS Compress',
'MP3 (Marco Czudej)',
'ZET',
'XPack Data',
'XPack Diskimage',
'ARQ',
'ACE',
'Squash',
'Terse',
'XPack Single Data',
'Stuffit (Mac)',
'PUCrunch',
'BZip',
'UHarc',
'ABComp',
'CMP (André Olejko)',
'BZip2',
'LZOP',
'szip',
'Splint',
'TAR',
'InstallShield',
'CARComp',
'LZS',
'BOA',
'InstallShield Z',
'ARG',
'Gather',
'Pack Magic',
'BTS',
'ELI 5750',
'QFC',
'PRO-PACK',
'MSXiE',
'RAX',
'777',
'LZS221',
'HPA',
'Arhangel',
'EXP1',
'IMP',
'BMF',
'NRV',
'oPAQue',
'Squish (Mike Albert)',
'Par',
'HIT (Bogdan Ureche)',
'SBX',
'NSK',
'Disintegrator',
'ASD (Tobias Svensson)',
'InstallShield CAB',
'TOP4',
'BatComp (4DOS)',
'BlakHole',
'BIX (Igor Pavlov)',
'ChiefLZA',
'Blink (D.T.S.)',
'CAR (MylesHi!)',
'SARJ',
'Compack Sfx',
'LogiTech Compress',
'ARS-Sfx',
'Akt',
'Flash',
'PC/3270',
'NPack',
'PFT',
'Xtreme',
'SemOne',
'Akt32',
'InstallIt',
'PPMD',
'Swag',
'FIZ',
'BA (M. Lundqvist)',
'XPA32 (Jauming Tseng)',
'RK (M.Taylor)',
'RPM',
'DeepFreezer',
'ZZip (Damien Debin)',
'DC (Edgar Binder)',
'TPac (Tim Gordon)',
'Ai (E.Ilya)',
'Ybs (Vadim Yoockin)',
'Ai32 (E.Ilya)',
'Sbc (Sami Mäkinen)',
'DitPack',
'DMS',
'EPC',
'VSARC',
'PDZ',
'Package for the Web',
{$IFNDEF ENGLISH}
'unbekannt',
'Datei nicht gefunden');
{$ELSE}
'unknown',
'File not found');
{$ENDIF}
VAR ArcTyp: Byte;
Archiv,s: String;
EL: String[3];
PROCEDURE Hilfe;
BEGIN
WriteLn('──────────────────────────────────────────────────────────────────────────────');
WriteLn('■■■ IDArc V',Version,' ■■■ (C) ',Jahr,' Jürgen Peters ««');
WriteLn('──────────────────────────────────────────────────────────────────────────────'#13#10);
{$IFNDEF ENGLISH}
WriteLn('Syntax: IDArc [Lw:\Pfad\]Archivdateiname'#13#10);
WriteLn('Identifiziert ',n-2,' Archivdateitypen und gibt entsprechenden ERRORLEVEL aus:'#13#10);
{$ELSE}
WriteLn('Syntax: IDArc [Drv:\Path\]Archive_name');
WriteLn('Identifies ',n-2,' types of archive files and returns a corresponding ERRORLEVEL:'#13#10);
{$ENDIF}
WriteLn(' 0. --- 1. ARC 2. ZIP 3. ZOO');
WriteLn(' 4. LZH 5. DWC 6. MDCD 7. LBR');
WriteLn(' 8. ARJ 9. HYP 10. UC2 11. HAP');
WriteLn(' 12. HA 13. HPack (HPK) 14. SQZ (Squeeze It) 15. RAR');
WriteLn(' 16. PAK 17. ARC+ 18. LIM 19. BSN/BSA');
WriteLn(' 20. PUT 21. SQWEZ 22. Crush/ZIP 23. Crush/ARJ');
WriteLn(' 24. Crush/LZH 25. Crush/ZOO 26. Crush/HA 27. LZExe');
WriteLn(' 28. PKLite 29. Diet 30. TinyProg 31. GIF');
WriteLn(' 32. JPG (JFIF) 33. JPG (HSI) 34. AIN 35. AINEXE');
WriteLn(' 36. SAR 37. BS2/BSArc 38. GZIP/Comp 4.3 39. ACB');
WriteLn(' 40. MAR 41. CPShrink 42. JRC 43. JArcs');
{$IFNDEF ENGLISH}
WriteLn(' 44. Quantum 45. ReSOF 46. Crush/ungepackt 47. ARX');
{$ELSE}
WriteLn(' 44. Quantum 45. ReSOF 46. Crush/uncompressed 47. ARX');
{$ENDIF}
WriteLn(' 48. UCEXE 49. WWPack 50. QuArk 51. YAC');
WriteLn(' 52. X1 53. Codec 54. AMGC 55. NuLIB');
If not AusgabeUmgeleitet then
BEGIN
{$IFNDEF ENGLISH}
WriteLn(#13#10'Bitte <Enter> drücken...');
{$ELSE}
WriteLn(#13#10'Please press <Enter>...');
{$ENDIF}
ReadLn;
END;
WriteLn(' 56. PAKLeo 57. TGZ 58. WWPack-Data 59. ChArc');
WriteLn(' 60. PSA 61. ZAR 62. LHark 63. CrossePAC');
WriteLn(' 64. Freeze 65. KBoom 66. NSQ 67. DPA');
WriteLn(' 68. TTComp 69. WIC (Fake!) 70. RKive 71. JAR');
WriteLn(' 72. ESP 73. ZPack 74. DRY 75. OWS (Fake!)');
WriteLn(' 76. SKY 77. ARI 78. UFA 79. Microsoft CAB');
WriteLn(' 80. FOXSQZ 81. AR7 82. TSComp 83. PPMZ');
WriteLn(' 84. MS Compress 85. MP3 (M.Czudej) 86. ZET 87. XPack Data');
WriteLn(' 88. Xpk DiskImg 89. ARQ 90. ACE 91. Squash');
WriteLn(' 92. Terse 93. Xpk SData 94. Stuffit (Mac) 95. PUCrunch');
WriteLn(' 96. BZip 97. UHarc 98. ABComp 99. CMP');
WriteLn('100. BZip2 101. LZOP 102. szip 103. Splint');
WriteLn('104. TAR 105. InstallShield 106. CARComp 107. LZS');
WriteLn('108. BOA 109. InstallSh. Z 110. ARG 111. Gather');
WriteLn('112. Pack Magic 113. BTS 114. ELI 5750 115. QFC');
WriteLn('116. PRO-PACK 117. MSXiE 118. RAX 119. 777');
WriteLn('120. LZS221 121. HPA 122. Arhangel 123. EXP1');
WriteLn('124. IMP 125. BMF 126. NRV 127. oPAQue');
WriteLn('128. Squish 129. Par 130. HIT (B. Ureche) 131. SBX');
WriteLn('132. NaShrinK 133. Disintegrator 134. ASD (T. Svensson) 135. InStallSh. CAB');
WriteLn('136. TOP4 137. BatComp (4DOS)138. BlakHole 139. BIX (I. Pavlov)');
WriteLn('140. ChiefLZA 141. Blink (D.T.S.)142. CAR (MylesHi!) 143. SARJ');
If not AusgabeUmgeleitet then
BEGIN
{$IFNDEF ENGLISH}
WriteLn(#13#10'Bitte <Enter> drücken...');
{$ELSE}
WriteLn(#13#10'Please press <Enter>...');
{$ENDIF}
ReadLn;
END;
WriteLn('144. CompackSfx 145. LGExpand 146. ARS-Sfx 147. Akt');
WriteLn('148. Flash 149. PC/3270 150. NPack 151. PFT');
WriteLn('152. Xtreme 153. SemOne 154. Akt32 155. InstallIt');
WriteLn('156. PPMD 157. Swag 158. FIZ 159. BA');
WriteLn('160. XPA32 161. RK 162. RPM 163. DeepFreezer');
WriteLn('164. ZZip 165. DC (E.Binder) 166. TPac (Tim Gordon) 167. Ai (E.Ilya)');
WriteLn('168. Ybs 169. Ai32 (E.Ilya) 170. SBC (Sami Mäkinen) 171. DitPack');
WriteLn('172. DMS 173. EPC 174. VSARC 175. PDZ');
WriteLn('176. Package for the Web');
{$IFNDEF ENGLISH}
WriteLn('251. unbekannt 255. n.gefunden');
{$ELSE}
WriteLn('251. unknown 255. not found');
{$ENDIF}
END;
PROCEDURE DOSWrite(s: String);
VAR Regs: Registers;
BEGIN
s := s+'$';
With Regs do
BEGIN
ah := 9;
ds := Seg(s);
dx := Ofs(s)+1;
MsDos(Regs);
END;
END;
BEGIN
If ParamCount=0 then Hilfe ELSE
BEGIN
FileMode := $80;
Archiv := ParamStr(1);
ArcTyp := ArchiveType(Archiv);
Str(ArcTyp,EL);
If ArcTyp=255 then ArcTyp := n;
If ArcTyp=251 then ArcTyp := n-1;
s := '';
{$IFNDEF ENGLISH}
If (mv and av) then s := ' (Multiple Volume-Archiv + AV-geschützt/locked)' ELSE
If mv then s := ' (Multiple Volume-Archiv)' ELSE
If av then s := ' (AV-geschützt/locked)';
DOSWrite('Archiv-Typ = '+PackerNames[ArcTyp]+s+' ('+EL+')');
{$ELSE}
If (mv and av) then s := ' (multiple volume archive + AV-secured/locked)' ELSE
If mv then s := ' (multiple volume archive)' ELSE
If av then s := ' (AV-secured/locked)';
DOSWrite('Archive type = '+PackerNames[ArcTyp]+s+' ('+EL+')');
{$ENDIF}
DOSWrite(#13#10);
If ArcTyp=n then Halt(255) ELSE If ArcTyp=n-1 then Halt(251) ELSE Halt(ArcTyp);
END;
END.