1$! Name: CHECK.COM 2$! Author: Bob Wells (wells@atm.ox.ac.uk) 3$! Date: 14-Mar-00 4$! $Id: check.com,v 1.11 2001/06/02 00:35:54 moniot Rel $ 5$! Purpose: To provide some checking of the VMS FTNCHEK distribution 6$! as in the unix distribution make check. 7$! Most of the prolems arise from the different way in which 8$! files are named and some effort is needed to to produce output 9$! identical to that of unix systems. 10$! MAKEDCL2INC involves the use of AWK which is not provided in the 11$! standard VMS distribution. It can be obtained from the Freeware CD 12$! or downloaded from http://www.openvms.digital.com/freeware 13$! Usage: @CHECK 14$! 15$ Noadwrite: Subroutine ! P1= Text to be output 16$! Purpose: perform non-advancing write to screen 17$! Special case: terminates with newline if P1 = "done" 18$ If P1 .NES. "done" 19$ Then 20$ Read/Time=0/Error=Next SYS$COMMAND Line/Prompt="''P1'" 21$ Else 22$ Read/Time=0/Error=Next SYS$COMMAND Line/Prompt="''F$FAO("!AS!/","done")'" 23$ Endif 24$ Next: 25$ EndSubroutine 26$! 27$ Doedit: Subroutine ! P1=Filename P2=string P3=substitute string 28$! Purpose: replace all occurrences of a string in a file 29$ Open/Write TMP REPLACE.EDT 30$ Write TMP "substitute\" + P2 + "\" + F$Edit(P3,"LOWERCASE") + "\ 1:999999 /notype" 31$ Write TMP "ex" 32$ Close TMP 33$ Assign NLA0: SYS$OUTPUT 34$ Edit/EDT/NOJOURNAL/Command=REPLACE.EDT 'P1' 35$ Deassign SYS$OUTPUT 36$ Delete/Noconfirm REPLACE.EDT; 37$ EndSubroutine 38$! 39$ Doftnchek: Subroutine ! P1=FTNCHEK argument list P2=Output file 40$! Purpose: run FTNCHEK with specified arguments and redirect output to a file 41$ Open/Write TMP 'P2' 42$ Set Noon 43$ Assign/User TMP SYS$OUTPUT 44$ Assign/User TMP SYS$ERROR 45$ Ftnchek 'P1' 46$ Close TMP 47$ Set On 48$ EndSubroutine 49$! 50$ Compare: Subroutine ! P1=filename P2=Unix extension 51$! Purpose: compare two FTNCHEK output files for differences 52$ Char = F$Extract ( F$Locate(".",P1)-1, 1, P1 ) + P2 53$ Vary = "[.VARY]" + P1 54$ Okay = "[.OKAY]" + P1 55$ Call Doedit 'Vary' .;9 'Char' 56$ Differences/Ignore=(Spacing,Blank)/Output=F1.TMP 'Vary' 'Okay' 57$ Open/Read TMP F1.TMP 58$ Read TMP Line 59$ Close TMP 60$ Delete/Noconfirm F1.TMP; 61$ If Line .EQS. "Number of difference sections found: 0" 62$ Then 63$ Call Noadwrite "." 64$ Delete/Noconfirm 'Vary';* 65$ Else 66$ Write SYS$OUTPUT "====> Differences found in " + P1 + " test <====" 67$ Write SYS$OUTPUT "Master: " + F$Search(Okay) 68$ Write SYS$OUTPUT "Test: " + F$Search(Vary) 69$ Write SYS$OUTPUT "---------------------------------------------------------" 70$ Purge 'Vary' 71$ EndIf 72$ EndSubroutine 73$! 74$ Check: Subroutine ! P1=file P2=.ext of output P3=options 75$! Purpose: run FTNCHEK with specified options and compare output with master 76$ Tmpfil = F$Extract ( 0, F$Length(P1)-1, P1 ) + ".;9" 77$ Cffil = P1 + "." + P2 78$ Params = P3 + " " + Tmpfil 79$ IF F$Search ("''P1'.F") .NES. "" Then Rename 'P1'.F 'Tmpfil' 80$ Call Doftnchek "''Params'" [.VARY]'Cffil' 81$ IF F$Search (Tmpfil) .NES. "" Then Rename 'Tmpfil' 'P1'.F 82$ Call Compare 'Cffil' ".f" 83$ EndSubroutine 84$ 85$ Checklist: Subroutine ! P1=file 86$! Purpose: run FTNCHEK with list checks using the .OPT files 87$ Optfil = "''P1'.OPT" 88$ If F$Search(Optfil) .NES. "" 89$ Then 90$ Copy 'Optfil' F1.TMP 91$ Call Doedit F1.TMP "''P1'.f" " " 92$ Open/Read TMP F1.TMP 93$ Read TMP Params 94$ Close TMP 95$ Delete/Noconfirm F1.TMP;* 96$ Else 97$ Params = "-list -symt -port" 98$ Endif 99$ Call Check 'P1' FCL "''Params'" 100$ EndSubroutine 101$!------------------------------------------------------------------------------ 102$ CheckF90: Subroutine ! P1=file P2=.ext of output P3=options 103$! Purpose: like Check but for .F90 file extension 104$ Tmpfil = F$Extract ( 0, F$Length(P1)-1, P1 ) + ".;9" 105$ Cffil = P1 + "." + P2 106$ Params = P3 + " " + Tmpfil 107$ IF F$Search ("''P1'.F90") .NES. "" Then Rename 'P1'.F90 'Tmpfil' 108$ Call Doftnchek "''Params'" [.VARY]'Cffil' 109$ IF F$Search (Tmpfil) .NES. "" Then Rename 'Tmpfil' 'P1'.F90 110$ Call Compare 'Cffil' ".f90" 111$ EndSubroutine 112$ 113$ Checkfreeform: Subroutine ! P1=file 114$! Purpose: run FTNCHEK with freeform checks using the .OPT files 115$ Optfil = "''P1'.OPT" 116$ If F$Search(Optfil) .NES. "" 117$ Then 118$ Copy 'Optfil' F1.TMP 119$ Call Doedit F1.TMP "''P1'.f90" " " 120$ Open/Read TMP F1.TMP 121$ Read TMP Params 122$ Close TMP 123$ Delete/Noconfirm F1.TMP;* 124$ Else 125$ Params = "-list -symt -port" 126$ Endif 127$ Call CheckF90 'P1' FCL "''Params'" 128$ EndSubroutine 129$!------------------------------------------------------------------------------ 130$ Checkexpert: Subroutine ! P1=file 131$! Purpose: run FTNCHEK with list checks using the .OPT files and -nonovice 132$! Adapted from Checklist by R. Moniot. 133$ Optfil = "''P1'.OPT" 134$ If F$Search(Optfil) .NES. "" 135$ Then 136$ Copy 'Optfil' F1.TMP 137$ Call Doedit F1.TMP "''P1'.f" " " 138$ Open/Read TMP F1.TMP 139$ Read TMP Params 140$ Close TMP 141$ Delete/Noconfirm F1.TMP;* 142$ Else 143$ Params = "-list -symt -port" 144$ Endif 145$ Params = "-nonovice " + Params 146$ Call Check 'P1' FCX "''Params'" 147$ EndSubroutine 148$! 149$!------------------------------------------------------------------------------ 150$ On Control_Y Then GoTo Finish 151$ On Warning Then GoTo Finish 152$ On Error Then GoTo Finish 153$ Setverify = 'F$Verify(0)' 154$ Startdir = F$Environment("DEFAULT") 155$ Comma = "," ! For use as a list separator 156$! 157$! Set up FTNCHEK command 158$ File = F$Search("FTNCHEK.EXE") 159$ If File .EQS. "" 160$ Then 161$ Write SYS$OUTPUT "ERROR ===> Cannot run checks: no FTNCHEK found <===" 162$ GoTo Finish 163$ Else 164$ FTNCHEK := $'File' 165$ EndIf 166$! 167$ Set Default [.TEST] 168$! 169$! Check for pre-defined logical (environment) variables 170$ Assign F1.TMP SYS$OUTPUT 171$ Show Logical 172$ Deassign SYS$OUTPUT 173$ Search/Nowarning/Output=F2.TMP F1.TMP FTNCHEK_ 174$ Delete/Noconfirm F1.TMP; 175$ Open/Read TMP F2.TMP 176$ Read/End_Of_File=Empty_Logical TMP Line 177$ Close TMP 178$ Write SYS$OUTPUT "WARNING ===> Logical names are defined <=== 179$ Type F2.TMP 180$ Write SYS$OUTPUT "These need to be DEASSIGNed before running CHECK" 181$ Delete/Noconfirm F2.TMP; 182$ GoTo Finish 183$ Empty_Logical: 184$ Close TMP 185$ Delete/Noconfirm F2.TMP; 186$! 187$! Check for existing default configuration files 188$ If F$Search("SYS$LOGIN:.FTNCHEKRC") .NES. "" 189$ Then 190$ Write SYS$OUTPUT "WARNING ===> SYS$LOGIN:.FTNCHEKRC exists <===" 191$ Write SYS$OUTPUT "delete or rename it before running check" 192$ GoTo Finish 193$ EndIf 194$ If F$Search("SYS$LOGIN:FTNCHEK.INI") .NES. "" 195$ Then 196$ Write SYS$OUTPUT "WARNING ===> SYS$LOGIN:FTNCHEK.INI exists <===" 197$ Write SYS$OUTPUT "delete or rename it before running check" 198$ GoTo Finish 199$ EndIf 200$! 201$! Check for [.VARY] subdirectory and create it if it does not exist 202$ If F$Search("VARY.DIR") .EQS. "" 203$ Then 204$ Write SYS$OUTPUT "NOTE: [.VARY] subdirectory does not exist: creating it now." 205$ Create/Dir [.VARY] 206$ Endif 207$! 208$ Write SYS$OUTPUT "================================================================" 209$ Write SYS$OUTPUT "There should be no file differences reported by these tests." 210$ Write SYS$OUTPUT "Output files matching master output files will be removed," 211$ Write SYS$OUTPUT "leaving any erroneous output files in the subdirectory" 212$ Write SYS$OUTPUT "[.TEST.VARY] for manual examination. If you built FTNCHEK with" 213$ Write SYS$OUTPUT "non-standard compilation options, there may be some differences." 214$ Write SYS$OUTPUT "================================================================" 215$! 216$!------------------------------------------------------------------------------ 217$ List: Call Noadwrite "checking listing output: " 218$ Filelist = "AVERAGE,BACKSLASH,CHESTNUTS,COMCLASH,COMCMP,COMPLEX,COMTEST," + - 219 "COMUSAGE,CORRECT,DIMS,DO_ENDDO,NAMELIST,NOBLANKS,STRINGS,UNIXINCLUDED," + - 220 "DECTAB,QUAD,SEQUENCE,SUBSTR,AUTOARRAY,CYCLE-EXIT,RELOPS,EMBEDDED-SPACE," + - 221 "ARG-ALIAS,COMMON-ALIAS,DEC-PARAMETER,IFFY,PURE-FUNCTION,PRIMES,LABELTEST," + - 222 "CASE,BLOCKERRORS,T208F" 223$! HELP omitted as VMS prints / instead of - switches and has different defaults 224$! INCLUDE omitted. VMS output is different for include files 225$! ALLKEYWORDS omitted. VMS output is different for include files 226$ Define FTNCHEK_F77 YES 227$ M = 0 228$ List1: File = F$Element(M,Comma,Filelist) 229$ If File .EQS. Comma Then Goto Endlist1 230$ Call Checklist 'File' 231$ M = M + 1 232$ Goto List1 233$ Endlist1: Call Noadwrite "done" 234$! Repeat for expert mode 235$ Expert: Call Noadwrite "checking expert-mode output: " 236$ M = 0 237$ Expert1: File = F$Element(M,Comma,Filelist) 238$ If File .EQS. Comma Then Goto Endexpert1 239$ Call Checkexpert 'File' 240$ M = M + 1 241$ Goto Expert1 242$ Endexpert1: Call Noadwrite "done" 243$ Deassign FTNCHEK_F77 244$! 245$!------------------------------------------------------------------------------ 246$ Freeform: Call Noadwrite "checking free-form output: " 247$ Filelist = "MODEL,BLOCKCHECK" 248$ Define FTNCHEK_F90 YES 249$ Define FTNCHEK_SOURCE "free" 250$ M = 0 251$ Freeform1: File = F$Element(M,Comma,Filelist) 252$ If File .EQS. Comma Then Goto Endfreeform1 253$ Call Checkfreeform 'File' 254$ M = M + 1 255$ Goto Freeform1 256$ Endfreeform1: Call Noadwrite "done" 257$ Deassign FTNCHEK_F90 258$ Deassign FTNCHEK_SOURCE 259$! 260$!------------------------------------------------------------------------------ 261$ Standard: Call Noadwrite "checking standard-compliance warnings: " 262$ Filelist = "IOKEYWORDS,F95DELETED" 263$ M = 0 264$ Standard1: File = F$Element(M,Comma,Filelist) 265$ If File .EQS. Comma Then Goto Endstandard1 266$ Call Check 'File' FC0 "-nof77 -nof90 -nof95" 267$ Call Check 'File' FC1 " -f77 -nof90 -nof95" 268$ Call Check 'File' FC2 "-nof77 -f90 -nof95" 269$ Call Check 'File' FC3 "-nof77 -nof90 -f95" 270$ M = M + 1 271$ Goto Standard1 272$ Endstandard1: Call Noadwrite "done" 273$! 274$!------------------------------------------------------------------------------ 275$ Size: Call Noadwrite "checking size and type mismatch: " 276$ Filelist = "ASSIGN,WORDSIZE,MIXED-EQUIV" 277$ M = 0 278$ Size1: File = F$Element(M,Comma,Filelist) 279$ If File .EQS. Comma Then Goto Endsize1 280$ Call Check 'File' FC1 "-notrun -noport -nof77 -lis" 281$ Call Check 'File' FC2 "-notrun -noport -f77" 282$ Call Check 'File' FC3 "-notrun -port -nof77" 283$ Call Check 'File' FC4 "-notrun -port -f77" 284$ Call Check 'File' FC5 " -trun -noport -nof77" 285$ Call Check 'File' FC6 " -trun -noport -f77" 286$ Call Check 'File' FC7 " -trun -port -nof77" 287$ Call Check 'File' FC8 " -trun -port -f77" 288$ Call Check 'File' FCA " -trun -port -nof77 -word=2" 289$ Call Check 'File' FCB " -trun -port -nof77 -word=4" 290$ Call Check 'File' FCC " -trun -port -nof77 -word=8" 291$ Call Check 'File' FCD " -trun -noport -nof77 -word=2" 292$ Call Check 'File' FCE " -trun -noport -nof77 -word=4" 293$ Call Check 'File' FCF " -trun -noport -nof77 -word=8" 294$ M = M + 1 295$ Goto Size1 296$ Endsize1: Call Noadwrite "done" 297$! 298$!------------------------------------------------------------------------------ 299$ Args: Call Noadwrite "checking -args setting: " 300$ Filelist = "01,02,03,04,05,06,07,08,09,10,11,12,13,14,15" 301$ M = 0 302$ Args1: File = F$Element(M,Comma,Filelist) 303$ If File .EQS. Comma Then Goto Endargs1 304$ N = 0 305$ Args2: Call Check "ARGS''File'" "FC''N'" "-args=''N'" 306$ N = N + 1 307$ If N .LT. 4 Then Goto Args2 308$ M = M + 1 309$ Goto Args1 310$ Endargs1: Call Noadwrite "done" 311$! 312$!------------------------------------------------------------------------------ 313$ Array: Call Noadwrite "checking -array setting: " 314$ Filelist = "ARRAYCLASH" 315$ M = 0 316$ Array1: File = F$Element(M,Comma,Filelist) 317$ If File .EQS. Comma Then Goto Endarray1 318$ N = 0 319$ Array2: Call Check 'File' "FC''N'" "-array=''N' -port" 320$ N = N + 1 321$ If N .LT. 4 Then Goto Array2 322$ M = M + 1 323$ Goto Array1 324$ Endarray1: Call Noadwrite "done" 325$! 326$!------------------------------------------------------------------------------ 327$ Common: Call Noadwrite "checking -common setting: " 328$ Filelist = "COMCMP,COMUSAGE" 329$ M = 0 330$ Common1: File = F$Element(M,Comma,Filelist) 331$ If File .EQS. Comma Then Goto Endcommon1 332$ N = 0 333$ Common2: Call Check 'File' "FC''N'" "-common=''N' -nof77" 334$ N = N + 1 335$ If N .LT. 4 Then Goto Common2 336$ M = M + 1 337$ Goto Common1 338$ Endcommon1: Call Noadwrite "done" 339$! 340$!------------------------------------------------------------------------------ 341$ Intrinsic: Call Noadwrite "checking -intrinsic setting: " 342$ Filelist = "INTRINSTEST" 343$ M = 0 344$ Intrinsic1: File = F$Element(M,Comma,Filelist) 345$ If File .EQS. Comma Then Goto Endintrinsic1 346$ Call Check 'File' FC0 "-intrinsic=none" 347$ Call Check 'File' FC1 "-intrinsic=none,extra" 348$ Call Check 'File' FC2 "-intrinsic=none,unix" 349$ Call Check 'File' FC3 "-intrinsic=none,vms" 350$ Call Check 'File' FC4 "-intrinsic=no-rand-no-arg,no-vms,unix" 351$ Call Check 'File' FC5 "-intrinsic=no-rand-one-arg,no-vms,unix" 352$ Call Check 'File' FC6 "-intrinsic=no-iargc-no-arg,no-vms,unix" 353$ Call Check 'File' FC7 "-intrinsic=no-iargc-one-arg,no-vms,unix" 354$ Call Check 'File' FC8 "-intrinsic=all" 355$ M = M + 1 356$ Goto Intrinsic1 357$ Endintrinsic1: Call Noadwrite "done" 358$! 359$!------------------------------------------------------------------------------ 360$ Output: Call Noadwrite "checking -output setting: " 361$ Call Check AVERAGE FC2 "-symt -list -port -out=average.out" 362$ Rename AVERAGE.OUT [.VARY] 363$ Call Compare AVERAGE.OUT ".f" 364$ Call Noadwrite "done" 365$! 366$!------------------------------------------------------------------------------ 367$ Usage: Call Noadwrite "checking -usage setting: " 368$ Filelist = "USAGE" 369$ M = 0 370$ Usage1: File = F$Element(M,Comma,Filelist) 371$ If File .EQS. Comma Then Goto Endusage1 372$ Call Check 'File' FC0 "-usage=none" 373$ Call Check 'File' FC1 "-usage=none,com-var-uninitialized,var-uninitialized" 374$ Call Check 'File' FC2 "-usage=none,com-block-unused,com-var-set-unused,com-var-unused,ext-unused,var-set-unused,var-unused" 375$ Call Check 'File' FC3 "-usage=all" 376$ M = M + 1 377$ Goto Usage1 378$ Endusage1: Call Noadwrite "done" 379$! 380$!------------------------------------------------------------------------------ 381$ Project: Call Noadwrite "checking project files: " 382$ Rename CORRECT.F CORREC.;9 383$ Call Doftnchek "-project correc.;9" "[.VARY]CORRECT.FC1" 384$ Rename CORREC.;9 CORRECT.F 385$ Call Doedit [.VARY]CORRECT.FC1 correc.prj correct.prj 386$ Call Doftnchek "CORREC.PRJ;1" "[.VARY]CORRECT.PCL" 387$ Rename CORREC.PRJ [.VARY]CORRECT.PRJ 388$ Call Doedit [.VARY]CORRECT.PCL correc.prj;1 correct.prj 389$ Call Compare CORRECT.FC1 ".f" 390$ Call Compare CORRECT.PRJ ".f" 391$ Call Compare CORRECT.PCL ".f" 392$ Call Noadwrite "done" 393$! 394$!------------------------------------------------------------------------------ 395$ Rc: Call Noadwrite "checking reading rc file: " 396$ Open/Write TMP FTNCHEK.INI 397$ Write TMP "f77=all" 398$ Write TMP "symtab" 399$ Close TMP 400$ Rename DO_ENDDO.F DO_ENDD.;9 401$ Call Doftnchek "-f77=no-long-names,no-name-underscore do_endd.;9" [.VARY]RC.FCL 402$ Rename DO_ENDD.;9 DO_ENDDO.F 403$ Call Doedit [.VARY]RC.FCL .;9 o.f 404$ Call Compare RC.FCL ".f" 405$ Delete/Noconfirm FTNCHEK.INI; 406$ Call Noadwrite "done" 407$! 408$!------------------------------------------------------------------------------ 409$ Wildcard: Call Noadwrite "check interpreting wildcards: " 410$ Call Doftnchek "-port=mixed* -port=help" "[.VARY]WILDCARD.FC1" 411$ Call Doedit [.VARY]WILDCARD.FC1 "/port" "-port" 412$ Call Compare WILDCARD.FC1 ".f" 413$ Call Doftnchek "-usage=no-*var* -usage=help" "[.VARY]WILDCARD.FC2" 414$ Call Doedit [.VARY]WILDCARD.FC2 "/usage" "-usage" 415$ Call Compare WILDCARD.FC2 ".f" 416$ Call Doftnchek "-usage=no-var* -usage=help" "[.VARY]WILDCARD.FC3" 417$ Call Doedit [.VARY]WILDCARD.FC3 "/usage" "-usage" 418$ Call Compare WILDCARD.FC3 ".f" 419$ Call Doftnchek "-f77=*array*,format* -f77=help" "[.VARY]WILDCARD.FC4" 420$ Call Doedit [.VARY]WILDCARD.FC4 "/f77" "-f77" 421$ Call Compare WILDCARD.FC4 ".f" 422$ Call Doftnchek "-pretty=*ugly* -pretty=help" "[.VARY]WILDCARD.FC5" 423$ Call Doedit [.VARY]WILDCARD.FC5 "/pretty" "-pretty" 424$ Call Compare WILDCARD.FC5 ".f" 425$ Call Noadwrite "done" 426$! 427$!------------------------------------------------------------------------------ 428$ Makedcls: Call Noadwrite "checking -makedcls setting: " 429$ Filelist = "BUILTIN,DCLTEST,DIMS,NAMELIST,PARAMS,T208A,T208B,T208C,T208D," + - 430 "T208E,T208F,T208G,T208H,T208I,T208J,T208K,T208L,T208M,T208N,T208O,T208P," + - 431 "T208Q,T208R,T208S,T208T,T208U,T208V,T208W,T208X" 432$ M = 0 433$ Makedcls1: File = F$element(M,Comma,Filelist) 434$ If File .EQS. Comma Then Goto Endmakedcls1 435$ Tmpfil = F$Extract ( 0, F$Length(File)-1, File ) 436$ Rename 'File'.F 'Tmpfil'.;9 437$ N = 0 438$ P = 1 439$ Makedcls2: Call Doftnchek "-nocheck -makedcls=''P' ''Tmpfil'.;9" NLA0: 440$ If F$Search("''Tmpfil'.DCL") .NES. "" 441$ Then 442$ Rename 'Tmpfil'.DCL [.VARY]'File'.DC'N' 443$ Open/Read TMP '[.VARY]'File'.DC'N' 444$ Read/End_Of_File=Dclsempty TMP Line 445$ Close TMP 446$ Call Compare 'File'.DC'N' ".f" 447$ Goto Makedclsnext 448$ Dclsempty: WRITE SYS$OUTPUT "Empty declarations file "+ F$Search("[.VARY]''Cffil'") + " should have been deleted" 449$ Endif 450$ Makedclsnext: P = P + P 451$ N = N + 1 452$ If N .LT. 10 Then Goto Makedcls2 453$ Rename 'Tmpfil'.;9 'File'.F 454$ M = M + 1 455$ Goto Makedcls1 456$ Endmakedcls1: Call Noadwrite "done" 457$! 458$!------------------------------------------------------------------------------ 459$ Vcg: Call Noadwrite "checking -vcg setting: " 460$ filelist = "COMCMP,COMUSAGE" 461$ M = 0 462$ Vcg1: File = F$Element(M,Comma,Filelist) 463$ If File .EQS. Comma Then Goto Endvcg1 464$ Tmpfil = F$Extract ( 0, F$Length(File)-1, File ) 465$ Rename 'File'.f 'Tmpfil'.;9 466$ Call Doftnchek "-vcg ''Tmpfil'.;9" NLA0: 467$ Rename 'Tmpfil'.;9 'File'.f 468$ Rename 'Tmpfil'.VCG [.VARY]'File'.VCG 469$ Call Compare 'File'.VCG ".f" 470$ M = M + 1 471$ Goto Vcg1 472$ Endvcg1: Call Noadwrite "done" 473$! 474$!------------------------------------------------------------------------------ 475$! Check for GAWK - needed for dcl2inc processing 476$ Dcl2inc: Filelist = "T208X" 477$ Assign F1.TMP SYS$OUTPUT 478$ Show Symbol GAWK 479$ Deassign SYS$OUTPUT 480$ Open/Read TMP F1.TMP 481$ Read TMP Line 482$ Close TMP 483$ Delete/Noconfirm F1.TMP; 484$ If Line .NES. "%DCL-W-UNDSYM, undefined symbol - check validity and spelling" 485$ Then 486$ Call Noadwrite "checking dcl2inc processing: " 487$ M = 0 488$ Dcl2inc1: File = F$Element(M,Comma,Filelist) 489$ If File .EQS. Comma Then Goto Enddcl2inc1 490$ Tmpfil = F$Extract ( 0, F$Length(File)-1, File ) 491$ Rename 'File'.f 'Tmpfil'.;9 492$ Call Doftnchek "-nocheck -makedcl=1 ''Tmpfil'.;9" NLA0: 493$ Rename 'Tmpfil'.;9 'File'.f 494$ Assign/User 'File'.ERR SYS$ERROR 495$ Assign/User [.VARY]'File'.MAK SYS$OUTPUT 496$ Gawk -f [-]DCL2INC.AWK 'Tmpfil'.DCL 497$ Deassign SYS$OUTPUT 498$ Rename 'Tmpfil'.DCL [.VARY]'File'.DCL 499$ Call Compare 'File'.DCL ".f" 500$ Rename 'Tmpfil'.DCN [.VARY]'File'.DCN 501$ Call Compare 'File'.DCN ".f" 502$ Call Doedit [.VARY]'File'.MAK 'Tmpfil'. 'File'. 503$ Call Compare 'File'.MAK ".f" 504$ Rename 'File'.ERR [.VARY] 505$ Call Doedit [.VARY]'File'.ERR 'Tmpfil'. 'File'. 506$ Call Compare 'File'.ERR ".f" 507$ Dcl2inc2: File = F$Search("*.INC") 508$ If File .EQS. "" Then Goto Enddcl2inc2 509$ Cffil = F$Parse(File,,,"NAME") + ".INC" 510$ Rename 'Cffil' [.VARY] 511$ Call Compare 'Cffil' ".f" 512$ Goto Dcl2inc2 513$ Enddcl2inc2: M = M + 1 514$ Goto Dcl2inc1 515$ Enddcl2inc1: Call Noadwrite "done" 516$ Else 517$ Write SYS$OUTPUT "WARNING ===> dcl2inc processing not checked <=== 518$ Write SYS$OUTPUT "Unable to locate GAWK on this system" 519$ Endif 520$! 521$ Finish: 522$ Set Default 'Startdir' 523$ If Setverify Then Set Verify 524$ EXIT 525