(* Include File of Procedures *************************************) (* System Utility, v. 1030am, sat, 20.Sep.86, Glen Ellis *) (* Procedure ******************************************************) (* UpCase v. 0800pm, thu, 04.Sep.86, Glen Ellis *) procedure pUpCase( var LINE : thestr ); var i : integer; begin FOR i := 1 to length(line) do Line[i] := upcase(Line[i]); end; (* procedure ****************************************************) procedure pALARM; var x : integer; begin for x := 1 to 3 do write(chr(7)); end; (*==============================================================*) (* System Variable Handling Procedures *) (* Procedure ******************************************************) (* System Var Initialize, v. 0500am, sat, 06.Sep.86, Glen Ellis *) procedure pSysInitz; (* uses globals *) begin (* proc *) SysCmdLine := false; SysCmdFile := false; SysCmdUser := false; SysInFilename := ' '; SysInSource[1] := ' '; SysEnableBegin := false; SysLineCnt := false; SysIndentNum := 0; SysIndentPos := 0; SysLenMax := 0; SysComment := true; SysLineCnt := false; SysVertiate := false; SysInSourceCnt := 0; SysInSourceMax := 0; END; (* proc *) (* procedure ******************************************************) (* SysLvlInit, v. 1244pm, sun, 31.Aug.86, Glen Ellis *) procedure pSysLvlInit; begin (* P *) (* required for KEYWORD.INC *) (* fresh for each file being parsed *) (* not all used in any one application *) (* rename these if need be, assign in SYSTEM.VAR *) SysEnableBegin := false; (* flag for first 'begin' *) SEB := false; SysLevelIf := 0; SLI := 0; SysLevelCase := 0; SLC := 0; SysLevelWhile := 0; SLW := 0; SysLevelBegin := 0; SLB := 0; SysLevelRepeat := 0; SLR := 0; end; (* P *) (* procedure ******************************************************) (* Sys Var Updt, v. 0600am, wed, 17.Sep.86, Glen Ellis *) procedure pSysVarUpdt; begin (* P *) (* update short named level from long named level vars *) (* required for KEYWORD.INC *) (* fresh for each file being parsed *) (* not all used in any one application *) (* rename these if need be, assign in SYSTEM.VAR *) SOLL := SysOutLine; SIP := SysIndentPos; SIN := SysIndentNum; SLM := SysLenMax; SMW := SysMarkWrite; SEB := SysEnableBegin; SLI := SysLevelIF; SLC := SysLevelCASE; SLW := SysLevelWHILE; SLB := SysLevelBEGIN; SLR := SysLevelREPEAT; end; (* P *) (* procedure ******************************************************) (* Sys Var Dndt, v. 0600am, wed, 17.Sep.86, Glen Ellis *) procedure pSysVarDndt; begin (* P *) (* Downdate short named level into long named level vars *) (* required for KEYWORD.INC *) (* fresh for each file being parsed *) (* not all used in any one application *) (* rename these if need be, assign in SYSTEM.VAR *) SysOutLine := SOLL; SysIndentPos := SIP; SysIndentNum := SIN; SysLenMax := SLM; SysMarkWrite := SMW; SysEnableBegin := SEB; SysLevelIF := SLI; SysLevelCASE := SLC; SysLevelWHILE := SLW; SysLevelBEGIN := SLB; SysLevelREPEAT := SLR; end; (* P *) (* procedure ****************************************************) (* Say System Variables, v. 0900am, sat, 20.Sep.86, Glen Ellis *) procedure pSaySysVar; var line : Thestr; cmdline, cmdfile, cmduser : string7 ; comment, linecnt, vertiate : string7; indentnum, indentpos, lenmax, insourcecnt, insourcemax : string7; begin (* P *) (* BIG display prior to CORE *) (* pause for preceding display of filename list *) delay(1000); (* operating parameters *) FOR x := 1 to 23 do writeln; (* Apple/CPM clear screen *) begin (* say sys var *) line := 'A:SySutl.inc, pSaySysVar : OPERATING variables'; pSayLineCJ(line,80); line := 'Parameter Source Control variables'; pSayLineCJ(line,80); IF SysCmdLine then cmdline:='true' else cmdline:= 'false'; IF SysCmdFile then cmdfile:='true' else cmdfile:= 'false'; IF SysCmdUser then cmduser:='true' else cmduser:= 'false'; line := 'L='+cmdline+' : F='+cmdfile+' : U='+cmduser ; pSayLineCJ(line,80); line := 'SysInFileName = ' + SysInFileName; pSayLineCJ(line,80); IF SysComment then comment :='true' else comment := 'false'; IF SysLineCnt then linecnt :='true' else linecnt := 'false'; IF SysVertiate then vertiate :='true' else vertiate := 'false'; writeln; line := 'SysComment = ' + comment; pSayLineCJ(line,80); line := 'SysLineCNT = ' + linecnt; pSayLineCJ(line,80); line := 'SysVertiate = ' + vertiate; pSayLineCJ(line,80); str(SysIndentNum,indentnum); str(SysIndentPos,indentpos); str(SysLenMax ,lenmax ); line := 'SysIndentNUM = ' + indentnum + ' : SysIndentPOS = ' + indentpos + ' : SysLineMAX = ' + lenmax; pSayLineCJ(line,80); str(SysInSourceCnt,insourcecnt); str(SysInSourceMax,insourcemax); line := 'SysInSourceCNT = ' + insourcecnt + ' : SysInsourceMAX = ' + insourcemax; pSayLineCJ(line,80); line := ' continue, halt'; pSayLineCJ(line,80); pReadCR; (* takes time to read this display *) end; (* say sys var *) end; (* P *) (* procedure ***********************************************) (* System Filenames, v. 0719am, sun, 31.Aug.86, Glen Ellis *) procedure pSaySysFiles; begin(* P *) writeln('SysPgmMod = ',SysPgmMod); writeln(' file.BAK = ',SysFile0); writeln('SysInFilename = ',SysFile1); writeln(' file.$$$ = ',SysFile2); end; (* P *) (* procedure ***************************************************) (* SYStem LeVeL Write , v. 0734am, sun, 31.Aug.86, Glen Ellis *) procedure pSysLvlWrite; begin (* P *) (* uses system vars *) pSysVarUpdt; IF SysComment then begin IF SysPgmMod = 'DB' then writeln(SysOutFile,SPMSL,':I:',SLI,' :C:',SLC,' :W:',SLW,SPMSR); IF SysPgmMod = 'TP' then writeln(SysOutFile,SPMSL,':B:',SLB,SPMSR); end; end; (* P *) (***********************************************************************) (*:B:0*) (*:B:0*)