(* Last edited on 1999-08-31 15:16:06 by hcgl *) FGet.Skip(rd, FGet.Blanks); IF Rd.EOF(rd) THEN RETURN END; cvx = NGet.Int(rd, "curve"), ch = PZLRChain.Read(rd), PROCEDURE ReadExcludedSegsFile(segName: TEXT): REF Segments = BEGIN IF Text.Empty(segName) THEN RETURN NEW(REF Segments, 0) ELSE WITH fileName = segName & ".seg" DO Wr.PutText(stderr, fileName & "\n"); WITH rd = FileRd.Open(fileName), sData = PZSegment.Read(rd) DO RETURN sData.s END END END END ReadExcludedSegsFile; PROCEDURE ExcludeSamples( cvx: NAT; (* A chain number. *) READONLY exSegs: Segments; (* List of segments, to exclude. *) VAR ex: BOOLS; (* OUT: samples to exclude from curve "cvx". *) ) = (* Sets "ex[i]" TRUE if and only if there is some excluded segment in "exSeg" that covers sample number "i" of curve "cvx". *) BEGIN FOR is := 0 TO LAST(exSegs) DO WITH s = exSegs[is] DO IF cvx = s.cvx THEN <* ASSERT NUMBER(ex) = s.tot *> FOR r := 0 TO s.ns - 1 DO WITH i = (s.ini + r) MOD s.tot DO ex[i] := TRUE END END END END END END ExcludeSamples;