/* must have function "Begin" to start with even if nothing inside */ func Begin() { ind1 = 0; /* initialize a counter */ } func OnLineHeader() { for(i = 0; i < size(LH.HLH); i++) /* print out current hist L-H */ print(LH.HLH[i],"\n"); LH.HLH[size(LH.HLH)] = SourceText; /* put script into hist L-H */ } /* here is the guts of what we want to do to each trace header */ func OnTrace() { ++ind1; /* increment counter by 1 */ recnum = Tr.RecNum; /* copy RecNum value to PrRcNm value */ trcnum = Tr.TrcNum; /* copy RecNum value to PrRcNm value */ srcpt = Tr.SrcLoc; cdp = Tr.DphInd; gi = Tr.RecInd; dist = Tr.DstSgn; print("Rec= ",recnum," trc= ",trcnum," src pt= ",srcpt," cdp= ",cdp," grp= ",gi," distance= ",dist,"\n"); } /* we're finished */