home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
TURBOPAS
/
ZINDENT5.LBR
/
SYSSCR.IQC
/
SYSSCR.INC
Wrap
Text File
|
2000-06-30
|
7KB
|
221 lines
(* Include File *****************************************************)
(* SYSSCR.INC, v. 0930am, sat, 20.Sep.86, Glen Ellis *)
(* Procedure ********************************************************)
(* ClearScreen, v. 0701am, sun, 31.Aug.86, Glen Ellis *)
procedure pClearScreen;
var X : nbr;
begin
for x := 1 to 23 do writeln; (* for Apple/CPM Sider system *)
end;
(* Procedure *******************************************************)
(* ReadCR, v. 0730am, sat, 30.Aug.86, Glen Ellis *)
procedure pReadCR;
var CH : char;
begin
While KeyPressed
do Read(Kbd,Ch); (* Flush input buffer *)
Read(Kbd,Ch);
If Ch=^[ Then Halt;
end;
(* Procedure ********************************************************)
(* KeyPressed, v. 0700am, thu, 21.Aug.86, Glen Ellis *)
procedure pKeyPressed;
Var Ch: Char;
begin (* proc *)
While KeyPressed Do Read(Kbd,Ch); (* Flush input buffer *)
Write('<CR> to continue or <ESC> to abort: ');
Read(Kbd,Ch);
WriteLn;
If Ch=^[ Then Halt;
end; (* proc *)
(* Procedure ********************************************************)
(* UserInterrupt, v. 0700pm, sun, 14.Sep.86, Glen Ellis *)
procedure pUserInterrupt;
(* not tested *)
Var Ch: Char;
begin (* proc *)
While KeyPressed Do Read(Kbd,Ch); (* Flush input buffer *)
Read(kbd,ch);
If Ch=^[ Then Halt;
end; (* proc *)
(* Procedure ************************************************************)
(* Write Screen Wait, v. 0701am, sun, 31.Aug.86, Glen Ellis *)
procedure pWriteScreenWait( line : THEstr );
begin
writeln(line);
pKeyPressed;
end;
(* Procedure ********************************************************)
(* Header Draw Box, v. 0700am, thu, 21.Aug.86, Glen Ellis *)
procedure pHEADERDRAWBOX(x1,y1,x2,y2 : nbr) ;
var
i : nbr ;
begin
gotoxy(x1,y1) ;
for i := x1 to x2 do write('-') ;
for i := y1+1 to y2 do
begin
gotoxy(x1,i) ; write('!') ;
gotoxy(x2,i) ; write('!') ;
end ;
gotoxy(x1,y2) ;
for i := x1 to x2 do write('-') ;
end ;
(* Procedure ********************************************************)
(* Say Header, v. 0700am, thu, 21.Aug.86, Glen Ellis *)
procedure pSayHeader;
(* uses system var:( title, version1, version2, credit )
(* display only.
*)
var
x : nbr;
begin (* proc *)
pClearScreen;
(* outline program header *)
for x := 1 to 2 do pHEADERDRAWBOX(1+x,1+x,80-x,12-x) ;
gotoxy(7,5);
writeln(SysTitle);
gotoxy(7,6);
writeln(SysVersion1);
gotoxy(7,7);
writeln(SysVersion2);
gotoxy(7,8);
writeln(SysCredit);
gotoxy(0,12);
end; (* proc *)
(* Procedure ********************************************************)
(* Say System Documentation, v. 0800pm, tue, 12.Sep.86, Glen Ellis *)
procedure pSaySysDoc;
(* purpose: display program documentation
(* output literal text only
*)
var
x : nbr;
begin (* proc *)
pClearScreen;
writeln(' Documentation:');
writeln;
writeln('INDENT.COM is a command line/file/user driven program ');
writeln('written in Borland Turbo Pascal, for CP/M and MSDOS systems');
writeln(SysTitle);
writeln(SysVersion1);
writeln(SysVersion2);
writeln(SysCredit);
writeln;
writeln('provides indenting/formatting function on Source Code files');
writeln('will parse filenames for the .TYP extension. ');
writeln(' and do keyword routines for dBASE or Pascal source. ');
writeln('if command line parameters are present then they are used ');
writeln('else');
writeln(' if filename = "?" then user input or documentation ');
writeln(' else a command data file is loaded for file.typ list ');
writeln;
pKeyPressed;
(*------------------------------------------------------------------------*)
pClearScreen;
writeln('---> Command Line Description <---');
writeln;
writeln('A>INDENT source.cmd Target.PAS 3 1 0 ');
writeln(' results : infile (identified as Pascal type) ');
writeln(' indent = 3, comments included, no line numbers ');
writeln(' Parameters : ');
writeln(' #1 read source file, write target.$$$ ');
writeln(' tested for .TYP in these two groups : ');
writeln(' dBASE(.CMD.PRG) / Pascal(.PAS.INC.PRO.FUN) ');
writeln(' erase/rename according to source.TYP ');
writeln(' source.BAK, rename target.$$$ to Source.TYP ');
writeln(' default .TYP is Pascal ');
writeln(' "?" enables User entry / documentation module ');
writeln(' #2 indent length 0 -> 79 , default = 3 ');
writeln(' #3 comment : 1 = include, 0 = no include , default = 1 ');
writeln(' #4 linecnt : 1 = numbered line listing, 0 = not numbered ');
writeln(' default = no linecount/vertiate ');
writeln(' if missing parameters #2, or #3, or #4 ');
writeln(' then default settings are installed for #2, or #3, or #4.');
writeln(' defaults = indentnum = 3, comment = true, linecnt = false');
writeln;
pKeyPressed;
(*------------------------------------------------------------------------*)
pClearScreen;
writeln;
writeln(
'---> Command File Method <---');
writeln;
writeln(' #0 reads ',SysPgmName,' for filename list of file.typ ');
writeln(' written as file.typ , in standard textfile format. ');
writeln(' #1 reads source file.typ, parse for .TYP ');
writeln(' #2 writes target file.$$$ ');
writeln(' #3 if filename = "?", then User prompted for parameters.');
writeln(' else defaults are installed ');
writeln(' indent = 3, comment = true, linecnt = false ');
writeln('#4 erases backup / renames tempfile to .typ of source file.');
writeln;
pKeyPressed;
end; (* proc *)
(********************************************************************)
(*:B:0*)
(*:B:0*)
(*:B:0*)