X-Git-Url: https://git.donarmstrong.com/?p=samtools.git;a=blobdiff_plain;f=bam_lpileup.c;h=d4dd63b99b85dd4c5811758153a56757c908a52c;hp=1562170e9159e8b53f2d65d7c87e4a59e8acecac;hb=307c147168f7154e3755712797078c513e0b242a;hpb=bd524958de35283de49cae7e7851da4c9e5eb6de diff --git a/bam_lpileup.c b/bam_lpileup.c index 1562170..d4dd63b 100644 --- a/bam_lpileup.c +++ b/bam_lpileup.c @@ -1,5 +1,6 @@ #include #include +#include #include "bam.h" #include "ksort.h" @@ -195,19 +196,3 @@ int bam_lplbuf_push(const bam1_t *b, bam_lplbuf_t *tv) { return bam_plbuf_push(b, tv->plbuf); } - -int bam_lpileup_file(bamFile fp, int mask, bam_pileup_f func, void *func_data) -{ - bam_lplbuf_t *buf; - int ret; - bam1_t *b; - b = (bam1_t*)calloc(1, sizeof(bam1_t)); - buf = bam_lplbuf_init(func, func_data); - bam_plbuf_set_mask(buf->plbuf, mask); - while ((ret = bam_read1(fp, b)) >= 0) - bam_lplbuf_push(b, buf); - bam_lplbuf_push(0, buf); - bam_lplbuf_destroy(buf); - free(b->data); free(b); - return 0; -}