Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed errfl218.zip
Binary file not shown.
Binary file removed errfl219.zip
Binary file not shown.
Binary file removed errfl220.zip
Binary file not shown.
Binary file removed errfl221.zip
Binary file not shown.
34 changes: 20 additions & 14 deletions errflags.pas
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@

program ErrFlags;

(* ErrFlags v2.22 // Checks nodelist segments for flag errors.
(* ErrFlags v2.23 // Checks nodelist segments for flag errors.
Copyright 1995-1997 jonny bergdahl data AB. Freeware. All rights deserved.
Modifications (c) 1999-2006 by Johan Zwiekhorst, 2:292/100
Modifications (c) 2017-2021 by Niels Joncheere, 2:292/789 *)
Modifications (c) 2017-2021 by Niels Joncheere, 2:292/789
Bug fixes (c) 2022 by Wilfred van Velzen, 2:280/464 *)


(* Revision history *)
(* Date Version Change *)
Expand Down Expand Up @@ -781,8 +783,8 @@ function FixFlags(Inp : String; RepNode : String; Prefix : String) : String;
begin
If (NFlag[L2] = ReduntForPrefFlags[L1].Last) then
begin
WriteLn('# WARNING: incompatible flag ', NFlag[L1], ' for ', Prefix, ' node ', RepNode);
WriteLn(RptFile, ' WARNING: incompatible flag ', NFlag[L1], ' for ', Prefix, ' node ', RepNode);
WriteLn('# WARNING: incompatible flag ', NFlag[L2], ' for ', Prefix, ' node ', RepNode);
WriteLn(RptFile, ' WARNING: incompatible flag ', NFlag[L2], ' for ', Prefix, ' node ', RepNode);
Inc(ThisReduErr);
end;
end;
Expand Down Expand Up @@ -884,6 +886,11 @@ function ParseNodeLine(Inp : String): String;
delete(Inp, i, 1);
i := pos(' ', Inp)
end;
if Length(Inp)=0 then
begin
ParseNodeLine := '';
Exit;
end;
DoDelCommas := (Inp[length(Inp)] = ','); (* !! 2.12 20010414 - remove all tail comma's *)
while Inp[length(Inp)] = ',' do dec(Inp[0]);
Prefix := Proper(Extract(Inp));
Expand Down Expand Up @@ -1077,8 +1084,8 @@ procedure CheckSegment(InP, InF, RptF, Notif : String);
Dos.FindNext(S);
end;
Temp := Upper(UnCompress);
Temp := Copy(UnCompress,1,Pred(Pos('%FILE%',Upper(UnCompress))))+InFile+
Copy(UnCompress,Pos('%FILE%',Upper(UnCompress))+6,255);
Temp := Copy(UnCompress,1,Pred(Pos('%FILE%',Temp)))+InFile+
Copy(UnCompress,Pos('%FILE%',Temp)+6,255);
Exec(GetEnv('COMSPEC'),'/C '+Temp);
Assign(TmpFile,InFile);
{$I-}
Expand Down Expand Up @@ -1171,7 +1178,7 @@ procedure CheckSegment(InP, InF, RptF, Notif : String);
{$I+}
If LastError<>0 then
begin
WriteLn('! Unable to create ',InF,' - error ',WordToStr(LastErr));
WriteLn('! Unable to create ',RptF,' - error ',WordToStr(LastErr));
Exit;
end;
if not OpenConfigFile(DEFAULT_CMT_FILE_NAMES, cmtFileName, cmtFile, false) then
Expand Down Expand Up @@ -1327,13 +1334,13 @@ procedure CheckSegment(InP, InF, RptF, Notif : String);
writeLn('! Unable to CD to path ',NotifyPath, ' - error ',LastErr);
exit;
end;
If Pos('%NODE%',Temp)<>0 then
If Pos('%NODE%',Upper(Temp))<>0 then
Temp := Copy(Temp,1,Pred(Pos('%NODE%',Upper(Temp))))+Notif+
Copy(Temp,Pos('%NODE%',Upper(Temp))+6,255);
If Pos('%FILE%',Temp)<>0 then
Copy(Temp,Pos('%NODE%',Upper(Temp))+6,255);
If Pos('%FILE%',Upper(Temp))<>0 then
Temp := Copy(Temp,1,Pred(Pos('%FILE%',Upper(Temp))))+RptF+
Copy(Temp,Pos('%FILE%',Upper(Temp))+6,255);
ExecuteCommand('Notify', Temp, OldDir);
Copy(Temp,Pos('%FILE%',Upper(Temp))+6,255);
ExecuteCommand('Notify', Temp, OldDir);
end;

Var
Expand All @@ -1357,14 +1364,13 @@ procedure CheckSegment(InP, InF, RptF, Notif : String);
For Loop := 1 to SegmentNum do
with SegmentFile[Loop] do
CheckSegment(InboundPath,FileName,RptFile,Notifier);
If AnyProcessed and (NotifyCmd<>'') then
If AnyProcessed and (ExecuteCmd<>'') then
begin
ChDir(ExecutePath);
{$I+}
If LastError<>0 then
writeLn('! Unable to CD to path ',ExecutePath, ' - error ',LastErr);
ExecuteCommand('Execute', ExecuteCmd, OldDir);
ChDir(OldDir);
end;
WriteLn();
WriteLn('* FINAL REPORT FOR ALL PROCESSED NODELIST SEGMENTS:'); (* !! 2.10 MM0811 *)
Expand Down