home *** CD-ROM | disk | FTP | other *** search
- unit FD; { File Dump }
-
- interface
- uses Crt, CPaU, Def, SetBU, Printer,
- GetKeU, ColorDef, PG, FastWr, ShadoU;
- procedure FileDump;
-
- implementation
-
- procedure FileDump;
- var Temp: s40;
- Count,
- RecordNum,
- X,
- I: integer;
- Continue,
- FunctionKey,
- CompressTest: boolean;
- Ch: char;
- TempStr: s10;
-
- begin
- SetBG;
- clrscr;
- Shadow( 15, 2, 65, 4, Inputs.Attr, true);
- FastWrite( CPad('Dump file to printer ? (Y/N)',40), 3, 20, Inputs.Attr );
- GetKey(Ch,FunctionKey);
- Ch := upcase(Ch);
- if Ch = 'Y' then
- begin
- clrscr;
- PrintDevice;
- assign(OutPutDevice,Device);
- rewrite(OutPutDevice);
- clrscr;
- Shadow( 15, 8, 65, 15, Headings.Attr, true);
- FastWrite( CPad('Hit [ESC] to exit.',20), 10, 30, Headings.Attr);
- FastWrite( CPad('Writing',20), 12, 30, Headings.Attr);
- Continue := true;
- RecordNum := 1;
- while Continue do
- begin
- if (RecordNum mod 10) = 0 then
- begin
- str(RecordNum,TempStr);
- FastWrite( CPad(TempStr,10), 13, 35, msgs.Attr);
- end;
- PrintRecord(1,RecordNum);
- if keypressed then
- begin
- GetKey(Ch,FunctionKey);
- if (not FunctionKey) and (Ch = #27) then Continue := false;
- end
- else
- begin
- inc(RecordNum);
- if RecordNum > FileTop then Continue := false;
- end;
- end;
- writeln(OutPutDevice,#12);
- close(OutPutDevice);
- end;
- end;
-
- end.
-