function [ngaps,nfirstbad,nlastbad,lgap]=reseq(ngaps,nfirstbad,nlastbad,lgap);
% c	subroutine to eliminate linearly-filled gaps from
% c	the list of gaps
% c
% c
% c	START at end of record and work back to first gap that has
% c	NOT been linearly filled (linbridge changed endpoints of
% c	filled gaps to -99)

indx=find(nfirstbad<0);
ngaps=ngaps-length(indx);
lgap(indx)=[];
nfirstbad(indx)=[];
nlastbad(indx)=[];

return
