if (c->n_cigar && c->l_qseq != (int32_t)bam_cigar2qlen(c, bam1_cigar(b)))
parse_error(fp->n_lines, "CIGAR and sequence length are inconsistent");
p = (uint8_t*)alloc_data(b, doff + c->l_qseq + (c->l_qseq+1)/2) + doff;
- bzero(p, (c->l_qseq+1)/2);
+ memset(p, 0, (c->l_qseq+1)/2);
for (i = 0; i < c->l_qseq; ++i)
p[i/2] |= bam_nt16_table[(int)str->s[i]] << 4*(1-i%2);
if (ks_getuntil(ks, KS_SEP_TAB, str, &dret) < 0) return -6; // qual
} else return 0;
}
+#ifdef _USE_KNETFILE
static void download_from_remote(const char *url)
{
const int buf_size = 1 * 1024 * 1024;
fclose(fp);
knet_close(fp_remote);
}
+#else
+static void download_from_remote(const char *url)
+{
+ return;
+}
+#endif
bam_index_t *bam_index_load(const char *fn)
{
#include "bam.h"
#ifndef PACKAGE_VERSION
-#define PACKAGE_VERSION "0.1.5-5 (r395)"
+#define PACKAGE_VERSION "0.1.5-6 (r402)"
#endif
int bam_taf2baf(int argc, char *argv[]);
} cache_t;
KHASH_MAP_INIT_INT64(cache, cache_t)
+#ifdef _NO_LFS
+#define ftello(fp) ftell(fp)
+#define fseeko(fp, offset, whence) fseek(fp, offset, whence)
+#else
extern off_t ftello(FILE *stream);
extern int fseeko(FILE *stream, off_t offset, int whence);
+#endif
typedef int8_t byte;