home *** CD-ROM | disk | FTP | other *** search
- (*
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓·── ──·▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓│ │░░▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ ECO_ATV was conceived, designed and written ░░▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ by Floor Naaijkens for ░░▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ UltiHouse Software / The ECO Group. ░░▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ ░░▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ (C) 1992 by EUROCON PANATIONAL CORPORATION ░░▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ All Rights Reserved by The ECO Group. ░░▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ ░░▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ ECO_ATV is a unit that makes using archives ░░▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ entirely transparant to the application. ░░▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ viewing, deleting, moving and adding included! ░░▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓│ │░░▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓·── ──·░░▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- *)
- {$M 65520, 0, 655360}
- {$A-,B-,D-,E-,F-,I-,L-,N-,O-,R-,S-,V-}
- unit eco_atv;
-
- interface
-
- uses
- dos, eco_lib, eco_cfi,
- eco_swap
-
- ;
-
-
- const
- viewer : string[12] = 'FCV.COM';
-
-
- type
- cfgtype = record
- applic_f, applic_b,
- applic_h,
- x1, y1, x2, y2 : byte;
- end;
-
- optiontype = (o_unpak, o_delete, o_nothing);
-
- arcpanelobj = object
- ful, quit,
- showmem,
- showreads,
- complete_error : boolean;
- treewidth,
- status,
- error : word;
- cfg : cfgtype;
- mfree : longint;
- nulstr, archer,
- olddir : pathstr;
- wst : string;
- {=Internal===============================================================}
- function __pak_tv(arc: pathstr; var opt: optiontype): boolean;
- {=External===============================================================}
- function __atv(arcname: pathstr): boolean;
- end; { arcpanelobj }
-
-
-
- implementation
-
-
-
-
-
- function arcpanelobj.__pak_tv(arc: pathstr; var opt: optiontype): boolean;
- type
- str80 = string[80];
- tvrec = record
- st : string[69];
- pad : pathstr;
- so,
- sp : longint;
- end;
-
- var
- fname : str79;
- arc_content : array[1..5120] of ^tvrec;
- pak_tv_arc : text;
- nam, ext,
- s, ss, fpad,
- fnam, fext,
- pak_entry,
- pak_entry2 : string;
- cur, off,
- key, i,
- tagged,
- nrtags,
- count : word;
- numm, numl : byte;
- ifnext : boolean;
- taglen,
- tagsiz : longint;
- strt : char;
- oldscn : _scnimageptr;
-
-
-
- function convertdate(long : longint) : string;
- var
- temp,temp2 : string[9];
- date : datetime;
-
- begin
- with date do begin
- temp := '';
- unpacktime(long,date);
- str(day,temp2);
- if day < 10 then temp2 := '0'+temp2;
- temp := temp + temp2 + '-';
- temp2 := copy(_strmonths[month], 1, 3);
- temp := temp + temp2 + '-';
- year := year - 1900;
- str(year,temp2);
- if year < 10 then temp2 := '0'+temp2;
- temp := temp + temp2;
- end;
- convertdate := temp;
- end;
-
-
- function converttime(long : longint) : string;
- var
- temp,temp2 : string[8];
- time : datetime;
-
- begin
- with time do begin
- temp := '';
- unpacktime(long,time);
- str(hour,temp2);
- if hour < 10 then temp2 := '0' + temp2;
- temp := temp + temp2 + ':';
- str(min,temp2);
- if min < 10 then temp2 := '0' + temp2;
- temp := temp + temp2;
- end;
- converttime := temp;
- end;
-
-
- function compressed_type(attrib : byte) : string;
- begin
- case attrib of
- 1..2: compressed_type := 'SEA stored';
- 3 : compressed_type := 'SEA packed';
- 4 : compressed_type := 'SEA Squeezed';
- 5..8: compressed_type := 'SEA Crunched';
- 9 : compressed_type := 'PKWare (old) Squashed';
- 10 : compressed_type := 'NoGate Crushed';
- 11 : compressed_type := 'NoGate Destilled';
- 45 : compressed_type := 'Nogate archive-comment';
- 46 : compressed_type := 'Nogate file-comment';
- 47 : compressed_type := 'Nogate file path';
- 48 : compressed_type := 'Nogate Security enveloppe';
- 49 : compressed_type := 'Nogate Error correction';
-
- 50 : compressed_type := 'ZIP (local header) Stored';
- 51 : compressed_type := 'ZIP (local header) Shrunk';
- 52 : compressed_type := 'ZIP (local header) Reduced-1';
- 53 : compressed_type := 'ZIP (local header) Reduced-2';
- 54 : compressed_type := 'ZIP (local header) Reduced-3';
- 55 : compressed_type := 'ZIP (local header) Reduced-4';
- 56 : compressed_type := 'ZIP (local header) Imploded';
- 80 : compressed_type := 'ZIP (central header) Stored';
- 81 : compressed_type := 'ZIP (central header) Shrunk';
- 82 : compressed_type := 'ZIP (central header) Reduced-1';
- 83 : compressed_type := 'ZIP (central header) Reduced-2';
- 84 : compressed_type := 'ZIP (central header) Reduced-3';
- 85 : compressed_type := 'ZIP (central header) Reduced-4';
- 86 : compressed_type := 'ZIP (central header) Imploded';
- 99 : compressed_type := 'ZIP End_of_central directory';
-
- 100 : compressed_type := 'ZOO Stored';
- 101 : compressed_type := 'ZOO LWZ compression';
- 150 : compressed_type := 'ZOO (deleted) Stored';
- 151 : compressed_type := 'ZOO (deleted) LWZ compression';
-
- 170 : compressed_type := 'MD Stored';
- 171 : compressed_type := 'MD LZH13';
- 179 : compressed_type := 'MD Unknown';
-
- 180 : compressed_type := 'LBR Header';
- 181 : compressed_type := 'LBR stored';
-
- 190 : compressed_type := 'ARJ Stored';
- 191 : compressed_type := 'ARJ Method 1';
- 192 : compressed_type := 'ARJ Method 2';
- 193 : compressed_type := 'ARJ Method 3';
- 194 : compressed_type := 'ARJ Method 4';
-
- 200 : compressed_type := 'LZH stored';
- 201 : compressed_type := 'LZH LZHufman';
- 205 : compressed_type := 'LZH -lzh5-';
-
- 230 : compressed_type := 'LZH/LZS -lz0-';
- 231 : compressed_type := 'LZH/LZS -lz1-';
- 232 : compressed_type := 'LZH/LZS -lz2-';
- 233 : compressed_type := 'LZH/LZS -lz3-';
- 234 : compressed_type := 'LZH/LZS -lz4-';
- 235 : compressed_type := 'LZH/LZS -lz5-';
-
- 249 : compressed_type := 'LZH/LZS -lz?-';
- 250 : compressed_type := 'DWC stored';
- 251 : compressed_type := 'DWC crunched';
- else compressed_type := 'Unknown';
- end;
- end;
-
-
- procedure write_items;
- var
- i, j : word;
-
- begin
- with cfg do begin
- if y2-y1-4<count then j := y2-y1-4 else j := count;
- for i := 1 to j do with cfg do begin
- wst := __packfil(arc_content[i+off]^.pad, 6);
- wst := copy(wst, 3, length(wst)-2); wst := ' ' + copy(wst, 1, 6);
- __write(x1+1, y1+2+i, applic_f, applic_b,
- copy(arc_content[i+off]^.st, 1, x2-x1-1) +
- __juststr(wst, ' ', 6, _left_just_str)
- )
- end;
- end;
- end;
-
-
-
- function __chkkey: word;
- begin
- if keypressed then __chkkey := __retkey else __chkkey := $0000;
- end;
-
-
-
- begin
- ful := true; quit := false; complete_error := false;
- with cfg do begin
- ext := __extractext(arc); ext := __cvtstr(ext, _to_upcase_str);
- archer := 'ARJ.EXE';
- if ext = 'ARC' then archer := 'ARC.EXE';
- if ext = 'LZH' then archer := 'LHA.EXE';
- if ext = 'ZOO' then archer := 'ZOO.EXE';
- if ext = 'ZIP' then archer := 'ZIP.EXE'; { this doesn't work }
- new(oldscn); __savscn(oldscn); tagged := 0;
- taglen := 0; tagsiz := 0;
- with cfg do begin
- __bandwin(true, x1, y1, x2, y2, applic_f, applic_b, sh_default, 15);
- __clrscn(x1+1, y1+1, x2-1, y2-1, applic_f, applic_b, ' ');
- __betwscn(x1+1, x2-1, y1 + (y2-y1) div 2, applic_h, applic_b,
- 'Searching archive: '+ arc);
- {__parsefil(arc, nam, ext); ext := __cvtstr(ext, _to_upcase_str);}
- __betwscn(x1, x2, y1-1, applic_f, applic_b,
- '[ ' + __cvtstr(ext, _to_upcase_str) + '-TV ]');
- end;
- if mfree < 20480 then with cfg do begin
- __betwscn(x1+1, x2-1, y1 + (y2-y1) div 2 - 1, applic_f, applic_b,
- 'NOT ENOUGH MEMORY TO VIEW ARCHIVE');
- __betwscn(x1+1, x2-1, y1 + (y2-y1) div 2 + 1, applic_f, applic_b,
- 'AT LEAST 4,096 BYTES MUST BE FREE');
- __delaykey(5000);
- __pak_tv := false;
- end else begin
- count := 0; pak_entry := ''; off := 0; cur := 1;
- cfismartmode := true;
- {readcentralheader := true;} fname := arc;
- if not opencfifile(fname) then with cfg do begin
- __betwscn(x1,x2,y1 , applic_f,applic_b,'[ Information Error ]');
- __betwscn(x1,x2,y1+2, applic_f,applic_b,'This archive appears');
- __betwscn(x1,x2,y1+3, applic_f,applic_b,'to contain no real');
- __betwscn(x1,x2,y1+4, applic_f,applic_b,'files. Function denied.');
- __delaykey(3000); complete_error := true;
- end else begin
- cfierror := false; count := 0;
- __betwscn(1, 80, 17, applic_f, applic_b,
- 'Size of archive: ' + __pntstr(__sizefil(arc))
- );
- __betwscn(1, 80, 04, applic_f, applic_b, 'Items');
- __betwscn(1, 80, 06, applic_f, applic_b, '▄▄▄▄▄▄▄▄▄▄▄▄▄');
- __betwscn(1, 80, 07, applic_f, applic_b, '█ █');
- __betwscn(1, 80, 08, applic_f, applic_b, '█ █');
- __betwscn(1, 80, 09, applic_f, applic_b, '█ █');
- __betwscn(1, 80, 10, applic_f, applic_b, '▀▀▀▀▀▀▀▀▀▀▀▀▀');
- repeat
- ifnext := cfinext;
- s := ''; ss := '';
- if not(cfierror) and ifnext then with cfitype do begin
- if (cfiosize <> 0) then begin
- if (cfipsize / cfiosize)=1 then ss := ' 100' else
- ss := __formstr('@@.@', (cfipsize / cfiosize) * 100)
- end else ss := ' 100';
- __splitfil(__normfil(__backapp(cfipath)+cfiname), fpad, fnam, fext);
- s := ' ' + __juststr(fnam+fext, ' ', 14, _left_just_str) +
- __juststr(__pntstr(cfiosize), ' ', 9, _right_just_str) + ' ' +
- ss + '% ' +
- __juststr(__pntstr(cfipsize), ' ', 9, _right_just_str) + ' ' +
- __juststr(convertdate(cfitime), ' ', 9, _right_just_str) + ' ' +
- __juststr(converttime(cfitime), ' ', 5, _right_just_str) + ' ' +
- compressed_type(cfimethod);
- inc(count); new(arc_content[count]);
- if showreads then
- __betwscn(1, 80, 8, applic_h, applic_b, __pntstr(count));
- with arc_content[count]^ do begin
- st := s; so := cfiosize; sp := cfipsize; pad := fpad;
- end;
- end;
- until (cfierror) or (maxavail <= 4096) or (__chkkey=_esc);
- closecfi;
- __clrscn(x1+1, y1+1, x2-1, y2-1, applic_f, applic_b, ' ');
-
- numl := length(__num(count));
- with cfg do begin
- __betwscn(x1+1, x2-1, y1+(y2-y1) div 2, applic_h,applic_b,
- __rep(19+length(arc), ' ')); write_items;
- __write(x1+1, y1+1, applic_h, applic_b,
- ' Filename Original FS Packed' +
- ' Date Time Method Path'
- );
- end;
-
- __write(x1+4, y1-1, applic_f, applic_b, '[ ' + __num(count) + ':' +
- __juststr(__num(off+cur), '0', numl, _right_just_str) + ' ]'
- );
- numm := length(__num(maxavail div 1024));
- if showmem then __write(x2-10, y1-1, applic_f, applic_b,
- '[ ' + __juststr(
- __num(maxavail div 1024), '0', numm, _right_just_str
- ) + 'K ]'
- );
-
- if complete_error then key := _esc;
-
- if not complete_error then repeat
- __write(x1+4+2+numl+1, y1-1, applic_f, applic_b,
- __juststr(__num(off+cur), '0', numl, _right_just_str)
- );
- __attrib(x1+1, y1+cur+2, x2-1, y1+cur+2, applic_b, applic_f);
- key := __retkey;
- __attrib(x1+1, y1+cur+2, x2-1, y1+cur+2, applic_f, applic_b);
-
- case key of
-
- _up, _padup: begin
- if cur>1 then dec(cur) else if off>0 then begin
- wst := __packfil(arc_content[off+cur]^.pad, 6);
- wst := copy(wst, 3, length(wst)-2);
- wst := ' ' + copy(wst, 1, 6);
- dec(off); __copyscn(x1+1, y1+3, x2-1, y2-3, x1+1, y1+4);
- __write(x1+1, y1+3, cfg.applic_f, cfg.applic_b,
- arc_content[off+cur]^.st +
- __juststr(wst, ' ', 6, _left_just_str)
- );
- end;
- end;
-
- _c_v, _ins, _padins, _down, _paddown, _space: begin
- wst := __packfil(arc_content[off+cur]^.pad, 6);
- wst := copy(wst, 3, length(wst)-2);
- wst := ' ' + copy(wst, 1, 6);
- if (
- (key=_c_v) or (key=_ins) or (key=_padins) or (key=_space)
- ) then begin
- if not(
- (arc_content[off+cur]^.st[2]='√') and (key=_space)
- ) then begin
- if arc_content[off+cur]^.st[2] = ' ' then
- arc_content[off+cur]^.st[2] := '√' else
- arc_content[off+cur]^.st[2] := ' ';
- if (key=_space) then arc_content[off+cur]^.st[2] := '√';
- with cfg do __write(x1+1,y1+cur+2,applic_f,applic_b,
- arc_content[off+cur]^.st +
- __juststr(wst, ' ', 6, _left_just_str)
- );
- if arc_content[off+cur]^.st[2] = ' ' then begin
- dec(tagged);
- dec(tagsiz, arc_content[off+cur]^.so);
- dec(taglen, arc_content[off+cur]^.sp);
- end else begin
- inc(tagged);
- inc(tagsiz, arc_content[off+cur]^.so);
- inc(taglen, arc_content[off+cur]^.sp);
- end;
- with cfg do begin
- __betwscn(x1,x2, y2+1, applic_f, applic_b,
- __rep(x2-x1-2, '═'));
- __betwscn(x1,x2, y2+1, applic_h, applic_b,
- '[ Tags: ' + __pntstr(tagged) +
- ' Amount: ' + __pntstr(taglen) +
- ' Real size: ' + __pntstr(tagsiz) +
- ' ]');
- end;
- end;
- end;
- if ((cur<count) and (count<=y2-y1-4)) or
- ((count>y2-y1-4) and (cur<y2-y1-4)) then inc(cur) else
- if (off<(count-y2+y1+4)) and (count>y2-y1-4) then begin
- inc(off); __copyscn(x1+1, y1+4, x2-1, y2-2, x1+1, y1+3);
- __write(x1+1, y2-2, cfg.applic_f,
- cfg.applic_b, arc_content[off+cur]^.st +
- __juststr(wst, ' ', 6, _left_just_str)
- );
- end;
- end;
-
- _home, _padhome: begin off := 0; cur := 1; write_items end;
-
- _end, _padend: begin
- if count>y2-y1-4 then off := count - y2 + y1 + 4 else off := 0;
- cur := __min(y2-y1-4, count); write_items
- end;
-
- _pgdn, _padpgdn: begin
- if (count > 2*(y2-y1-4)) and (off <= count-(y2-y1-4)*2) then
- inc(off, y2-y1-4) else
- begin off := count-(y2-y1-4); cur := __min(count, y2-y1-4) end;
- write_items;
- end;
-
- _pgup, _padpgup: begin
- if (count > y2-y1-4) and (off >= (y2-y1-4)) then
- dec(off, y2-y1-4) else begin off := 0; cur := 1 end;
- write_items;
- end;
-
- _i, _f4: begin
- __savscn(scn2);
- __bandwin(true, x1+12, y1+4, x2-12, y2-6, applic_b, applic_f, sh_default, 0);
- __betwscn(x1, x2, y1+3, applic_b, applic_h, '[ ' + arc + ' ]');
- __write(x1 + 15, y1+ 8, applic_b, applic_f, 'Archive size: ' +
- __pntstr(__sizefil(arc))
- );
- __write(x1 + 15, y1+ 10, applic_b, applic_f, 'Current file: ');
- __write(x1 + 15, y1+ 11, applic_b, applic_f, ' ' +
- __packfil(arc_content[off+cur]^.pad, x2-x1-12-12-12) +
- copy(arc_content[off+cur]^.st, 4, 12)
- );
- __write(x1 + 15, y1+ 12, applic_b, applic_f, + ' ' +
- __cvtstr(
- copy(arc_content[off+cur]^.st, 16, 11), _rem_lead_white_str
- ) + ' bytes'
- );
- __delaykey(10000);
- __resscn(scn2);
- end;
-
- _v, _f3: begin
- __savscn(scn2);
- __write(3, y2+1, 0, 7, '[ Viewing ' + __cvtstr(
- copy(arc_content[off+cur]^.st, 4, 16),
- _to_upcase_str + _rem_white_str
- ) + ' in ' + __normfil(arc) +' ]'
- ); { was spawn }
-
- {SAVE & CREATE DIR}
- getdir(0, olddir); mkdir('\TEMPVIEW.$$$'); chdir('\TEMPVIEW.$$$');
- useemsifavailable := true;
-
- {UNPACK}
- if not initexecswap(heapptr, '\SWAP.$$$') then begin
- writeln('Shell not possible!'); __delaykey(5000);
- {exec(archer + ' E ' + arc + ' ' +
- copy(arc_content[off+cur]^.st, 4, 16) + ' >nul', error
- );}
- end else begin
- swapvectors;
-
- numm := length(__num(bytesswapped div 1024));
- __write(x2-16, y2+1, 0, 15,
- '[ ' + __juststr(
- __num(bytesswapped div 1024), '0', numm, _right_just_str
- ) + 'K ' + swaploc[emsallocated] + ' ]'
- );
- status := execwithswap(getenv('COMSPEC'), ' /C ' + archer + ' E ' +
- arc + ' ' + copy(arc_content[off+cur]^.st, 4, 16) + ' >nul'
- );
- swapvectors;
- {@}
- __renamfil(copy(arc_content[off+cur]^.st, 4, 16),
- '\TEMPVIEW.$$$\'+copy(arc_content[off+cur]^.st, 4, 16),
- error
- );
- end;
- shutdownexecswap;
-
- {VIEW}
- if not initexecswap(heapptr, 'SWAP.$$$') then begin
- writeln('Shell not possible!'); __delaykey(5000);
- {__dosexpgm(
- viewer + ' \TEMPVIEW.$$$\' +
- copy(arc_content[off+cur]^.st, 4, 16), error
- )}
- end else begin
- swapvectors;
- status := execwithswap(getenv('COMSPEC'),
- ' /C ' + viewer + ' \TEMPVIEW.$$$\' +
- copy(arc_content[off+cur]^.st, 4, 16)
- );
- swapvectors;
- end;
- shutdownexecswap;
-
- {REMOVE TEMP FILES & DIR}
- __erasefil('\TEMPVIEW.$$$\'+copy(arc_content[off+cur]^.st,4,12),error);
- chdir(olddir); rmdir('\TEMPVIEW.$$$');
- __resscn(scn2);
- end;
-
- _star, _padstar: begin
- for i := 1 to count do if arc_content[i]^.st[2] = '√' then begin
- arc_content[i]^.st[2] := ' ';
- dec(tagged); dec(tagsiz, arc_content[i]^.so);
- dec(taglen, arc_content[i]^.sp);
- end else begin
- arc_content[i]^.st[2] := '√';
- inc(tagged); inc(tagsiz, arc_content[i]^.so);
- inc(taglen, arc_content[i]^.sp);
- end; write_items;
- with cfg do begin
- __betwscn(x1,x2, y2+1, applic_f, applic_b, __rep(x2-x1-2, '═'));
- __betwscn(x1,x2, y2+1, applic_h, applic_b,
- '[ Tags: ' + __pntstr(tagged) +
- ' Amount: ' + __pntstr(taglen) +
- ' Real size: ' + __pntstr(tagsiz) +
- ' ]');
- end; { with }
- end; { star }
-
- end; { case }
-
- until (key=_enter) or (key=_esc) or (key=_del) or (key=_paddel);
-
- quit := key = _esc; if key = _paddel then key := _del;
- if (key = _enter) or (key = _del) then begin
- nrtags := 0;
- assign(pak_tv_arc, '\FC_FILS.DAT'); rewrite(pak_tv_arc);
- for i := 1 to count do begin
- if arc_content[i]^.st[2]<>' ' then begin
- inc(nrtags);
- writeln(pak_tv_arc,
- __backapp(fexpand(arc_content[i]^.pad)) +
- __cvtstr(copy(arc_content[i]^.st, 4, 12), _rem_white_str)
- );
- end;
- end;
- close(pak_tv_arc);
- end;
-
- for i := 1 to count do release(arc_content[i]);
- if key = _enter then opt := o_unpak else if key = _del then
- opt := o_delete else opt := o_nothing;
- __pak_tv := ((key = _enter) or (key = _del)) and (nrtags>0);
- end; { is archive }
- end; { with }
- end; { enough memory }
- __resscn(oldscn); release(oldscn);
- end; { arcpanelobj }
-
-
-
-
- {██████████████████████████████████████████}
- function arcpanelobj.__atv(arcname: pathstr): boolean;
- var
- option : optiontype;
-
-
- begin
- ful := true; quit := false; complete_error := false;
- option := o_nothing; mfree := maxavail;
- with cfg do begin
- applic_f := lightgray;
- applic_h := white;
- applic_b := lightblue;
- x1 := 03;
- y1 := 03;
- x2 := 78;
- y2 := _currows-2;
- end;
-
- repeat
- if __pak_tv(arcname, option) then begin
- __cls;
- {
- if option = o_unpak then write('Files tagged, unpacking them...') else
- write('Files tagged, deleting them...');
- }
- useemsifavailable := true; nulstr := ' >nul';
-
- if nulstr = '' then begin
- writeln;
- if option = o_unpak then
- writeln(archer + ' E ' + arcname + ' !\FC_FILS.DAT' + nulstr) else
- writeln(archer + ' D ' + arcname + ' !\FC_FILS.DAT' + nulstr);
- end;
- if not initexecswap(heapptr, '\SWAP.$$$') then begin
- writeln('Shell not possible!'); __delaykey(5000);
- {
- if option = o_unpak then __dosexpgm(
- archer + ' E ' + arcname + ' !\FC_FILS.DAT' + nulstr, error
- ) else __dosexpgm(
- archer + ' D ' + arcname + ' !\FC_FILS.DAT' + nulstr, error
- )}
- end else begin
- swapvectors;
- if option = o_unpak then status := execwithswap(getenv('COMSPEC'),
- ' /C ' + archer + ' E ' + arcname + ' !\FC_FILS.DAT' + nulstr
- ) else status := execwithswap(getenv('COMSPEC'),
- ' /C ' + archer + ' D ' + arcname + ' !\FC_FILS.DAT' + nulstr
- );
- swapvectors;
- end;
- shutdownexecswap;
-
- __resscn(scn2);
- end;
- {writeln('Leave file alone');}
- until quit or complete_error;
- if __existfil('\FC_FILS.DAT') then __erasefil('\FC_FILS.DAT', error);
- __atv := complete_error;
- end; { arcpanelobj.__atv }
-
-
-
- end. { unit eco_atv The ECO Library Archive Television }
-