, kode viser, at indholdet af en lzh fil., bidragyder: swag støttegruppe, program lzhview;, anvendelse, dos, crt, konstant, bsize = 40; (i /o stødpudestørrelse}, type lzhhead = record, hsize: byte;, fill1: byte og, metode: array - [1 - 5] af char, compsize: longint;, ucompsize: longint;, dos_dt: longint;, fill2: ord;, filenamelen: byte;, filnavn: array [1 - 12] af char, ophør, var lzh1: lzhhead;, dt: datetime;, fsize, l, c: longint;, f: fil, buff: system [1]. bsize byte;, dato: string [8]; (formaterede dato som åå /mm /dd), tid: string [6] {" tid som tt: mm}, res: ord;, dir: dirstr;, fname: namestr;, ext: extstr;, lzhstring,, sname: string, ; stop: boolean, sv: pointer, funktion, øvre (st: string): string;, var jeg: heltal, begynder, for jeg : = 1 - længde (st) gøre st [i]: = upcase (st [i]), øvre: = st.end;, Function ord_to_str(i:LongInt;j:Byte):String;, Var c:String;, begin, str(i,c);, While length(c) 0 then, begin, Move (FileNameLen,SNAME,FileNameLen+1);, UnPackTime (Dos_DT,DT);, FSize := CompSize, end, else QUIT := True, end; { GET_LZH_ENTRY }, Procedure DO_LZH (FN : String);, Var fnstr, LZHMeth : String;, fls,totu,totc : LongInt;, begin , , totu:=0; totc:=0; fls:=0;, Assign (F,FN);, {$I-} Reset (F,1); {$I+}, if Ioresult<>0 then, begin, Writeln(upper(FN)+' not found');, Exit;, end;, FSize := FileSize(F);, C := 0;, QUIT := False;, Writeln('LZH File : '+upper(FN));, Writeln;, Writeln(' Filename OrigSize CompSize Method Date ', +' Time');, Writeln('------------ -------- -------- -------- --------', +' ------');, Repeat, GET_LZH_ENTRY;, if not QUIT then, begin, FSplit (SNAME,DIR,FNAME,EXT);, fnstr:=FNAME+EXT;, While length(fnstr)<12 do insert(' ',fnstr,length(fnstr)+1);, FDT(LZH1.Dos_DT);, inc(totu,lzh1.ucompsize);, inc(totc,lzh1.compsize);, inc(fls,1);, Case LZH1.Method[4] of {normally only 0,1 or 5}, '0' : LZHMeth:='Stored ';, '1' : LZHMeth:='Frozen 1';, '2' : LZHMeth:='Frozen 2';, '3' : LZHMeth:='Frozen 3';, '4' : LZHMeth:='Frozen 4';, '5' : LZHMeth:='Frozen 5';, else LZHMeth:=' Unknown';, end;, LZHString:=Fnstr+' '+ord_to_str(LZH1.UCompsize,8)+' '+, ord_to_str(LZH1.Compsize,8)+' '+lzhmeth+' ', +DATE+' '+TIME;, Writeln(LZHString);, ;, inc (c, fsize + lzh1. hsize + 2), indtil op, tæt (f), writeln (' af -------- -------- -------- -------- ', + ') '), writeln (ord_to_str (fls, 5) + ', filer og' + ord_to_str (i alt 8) + ' ', + ord_to_str (totc, 8);,; (do_lzh}, begynder, clrscr;, do_lzh (' hvad. lzh '); (< - sted filnavn her},.,
lzw skærm
Previous:Day of week etc
Next Page:kopi adresseregister