From 5a0f00a91005890ccdf28bf285db97f773017e02 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Thu, 16 Jul 2009 21:39:39 +0000 Subject: [PATCH] * samtools-0.1.5-7 (r403) * fixed a bug in kseq.h for binary files (text files are fine) --- bamtk.c | 2 +- kseq.h | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bamtk.c b/bamtk.c index edc949e..f77f69a 100644 --- a/bamtk.c +++ b/bamtk.c @@ -4,7 +4,7 @@ #include "bam.h" #ifndef PACKAGE_VERSION -#define PACKAGE_VERSION "0.1.5-6 (r402)" +#define PACKAGE_VERSION "0.1.5-7 (r403)" #endif int bam_taf2baf(int argc, char *argv[]); diff --git a/kseq.h b/kseq.h index bbe0125..82face0 100644 --- a/kseq.h +++ b/kseq.h @@ -25,6 +25,10 @@ /* Contact: Heng Li */ +/* + 2009-07-16 (lh3): in kstream_t, change "char*" to "unsigned char*" + */ + /* Last Modified: 12APR2009 */ #ifndef AC_KSEQ_H @@ -40,7 +44,7 @@ #define __KS_TYPE(type_t) \ typedef struct __kstream_t { \ - char *buf; \ + unsigned char *buf; \ int begin, end, is_eof; \ type_t f; \ } kstream_t; @@ -53,7 +57,7 @@ { \ kstream_t *ks = (kstream_t*)calloc(1, sizeof(kstream_t)); \ ks->f = f; \ - ks->buf = (char*)malloc(__bufsize); \ + ks->buf = malloc(__bufsize); \ return ks; \ } \ static inline void ks_destroy(kstream_t *ks) \ -- 2.39.2