]> git.donarmstrong.com Git - samtools.git/commitdiff
* samtools-0.1.5-6 (r402)
authorHeng Li <lh3@live.co.uk>
Thu, 16 Jul 2009 10:49:53 +0000 (10:49 +0000)
committerHeng Li <lh3@live.co.uk>
Thu, 16 Jul 2009 10:49:53 +0000 (10:49 +0000)
 * fixed compiling error when "-D_USE_NETFILE" is not applied
 * improve portability to MinGW

bam_import.c
bam_index.c
bamtk.c
bgzf.c

index fccaa022208131b27093a2b44f32e74d13a469c0..c6fbafce979d93560d80265807833a8c9972dca0 100644 (file)
@@ -359,7 +359,7 @@ int sam_read1(tamFile fp, bam_header_t *header, bam1_t *b)
                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
index 725d053b7f44a667a178aff67473e0c6376e1444..5126f00c8d8da0c41e0ba2179ca23cc8d436e53f 100644 (file)
@@ -354,6 +354,7 @@ bam_index_t *bam_index_load_local(const char *_fn)
        } else return 0;
 }
 
+#ifdef _USE_KNETFILE
 static void download_from_remote(const char *url)
 {
        const int buf_size = 1 * 1024 * 1024;
@@ -384,6 +385,12 @@ static void download_from_remote(const char *url)
        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)
 {
diff --git a/bamtk.c b/bamtk.c
index e071d31c5953564df4868906cbf3bec65c1a1940..edc949ea843f8e4032380048d5fde630bcf1ec22 100644 (file)
--- a/bamtk.c
+++ b/bamtk.c
@@ -4,7 +4,7 @@
 #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[]);
diff --git a/bgzf.c b/bgzf.c
index fe4e31da109f6ca523e73088fb3fd27aa9672587..364ca64cae7069aa61cb2d5154497575aa1627cd 100644 (file)
--- a/bgzf.c
+++ b/bgzf.c
@@ -31,8 +31,13 @@ typedef struct {
 } 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;