/ must have function "Begin" to start with even if nothing inside */ func Begin() { ind1 = 0; /* initialize a counter */ } func OnLineHeader() { output(LH); } /* here is the guts of what we want to do to each trace header */ func OnTrace() { ++ind1; /* increment counter by 1 */ recnum = Tr.RecNum; trcnum = Tr.TrcNum; srcpt = Tr.SoPtNm; Tr.SrcLoc = srcpt; cdp = Tr.DphInd; gi = Tr.RecInd; dist = Tr.DstSgn; Tr.DstSgn = abs(dist); Tr.DstUsg = abs(dist); output(Tr); } /* we're finished */