home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
turbopas
/
zindent5.lbr
/
SYSFILE.IQC
/
SYSFILE.INC
Wrap
Text File
|
1986-09-24
|
4KB
|
152 lines
(* Include File *****************************************************)
(* SysFile.inc, v. 0544pm, thu, 18.Sep.86, Glen Ellis *)
(* from sysline.inc procedure heading
(* SYSFILE(InFileName,IndentNum,Comment,LineCnt,
(* LenMax,IndentPos,InSourceCnt,InSourceMax);
*)
(* included in the core program SYSTEM.PAS as an auxillary module.
(* as an auxillary module to be modified for each application.
(*
(* function:
(* fetches parameters from text file named SYSFILE.DAT
(*
(* file format:
(* for INDENT.PAS and FIND.PAS applications
(* the format is list of FILE.TYP
(* standard CP/M text file format
(*
(* for future applications built on the Core Program System.Pas
(* the format specs will be different.
*)
(* reads sysfile.dat for list of files, into array *)
(* fill array of filenames for operations at core of SYSTEM.PAS loop *)
(* format of filenames is 'file.typ' , delimiter is <0D><0A) *)
(* this is CP/M and MSDOS text file standard *)
(*-------------------------------*)
BEGIN (* proc *)
(* sent by calling main module *)
(* SysInFilename := SysPgmName; *)
(*$I-*);
ASSIGN( SysInFile, SysInFilename );
RESET( SysInFile );
pIOcheck( SysIOcheck );
(*$I+*);
(* local I/O check to capture the IO flag from pIOcheck *)
(*-------------------------*)
(* NO I/O Err, do the routine *)
If not IOerr then
begin
(* tracer for user *)
IF SysUserTrace then
writeln('-------> SysFile.Inc Reading ',SysInFileName);
IF SysPgmTrace then delay(1000);
SysCmdUser := false; (* disable User entry *)
SysCmdUserFile := false;
SysCmdUserParm := false;
SysInSourceMax := 0;
WHILE not eof(SysInFile) do
begin
(* inc tail-end counter *)
SysInSourceMax := SysInSourceMax + 1;
(* fetch line *)
readln(SysInFile,SysInSource[SysInSourceMax]);
(* filename(1) of "?" will enable user entry of parameters *)
IF SysInSource[SysInSourceMax] = '?' then
begin
SysCmdUserParm := true ; (* enable User entry of parms *)
SysInSourceMax := SysInSourceMax-1; (* repeat the fetch *)
end;
(**)
end; (* while *)
writeln;
CLOSE( SysInFile );
pIOcheck( SysIOcheck );
end; (* not IOerror *)
(* error recovery *)
IF IOerr then
begin
(* lock the CORE *)
SysCmdFile := false;
SysInFileName := '?'; (* enable SysUser module *)
IF SysUserTrace then
begin
writeln;
writeln('-----------------------------------------');
writeln(SysPgmName,' with filename list not found');
writeln('SysCmdFile = ',syscmdfile);
writeln('User Entry / Documentation available');
IF SysPgmTrace then delay(1000);
end;
end;
(* default settings manually inserted
(* required, originally for INDENT.PRO called by KEYWORD.PRO,
(* Indent.pro written into STRING.INC
(* default output is for a running dBASE/Pascal command file
(* with indents and comments, but no line numbering.
(*
(* these defaults are to be modified for each application
(* incorporating the System.Pas CORE module.
*)
(* Array Has Been Loaded, clean the vars *)
SysInFilename := ' ';
SysOutFilename := ' ';
SysInSourceCnt := 0 ;
(* InSourceMax installed above *)
(* from sysFILE method : Default Operation Modes *)
SysIndent := true; (* enable indent procedure *)
SysComment := true; (* enable comment line write *)
SysLineCnt := false; (* disable line number write *)
SysVertiate := false; (* disable vertical markers *)
(* Default Operating Parameters *)
SysIndentNum := 3; (* standard, useful figure *)
SysIndentPos := 0; (* always *)
SysLenMax := 79; (* print page *)
END; (* proc *)
(********************************************************************)
(*:B:0*)
(*:B:0*)
(*:B:0*)
END; (* proc *)
(********************************************************************)
(*:B:0*)
(*:B