 +    } else 
 +#endif
 +    { // qsort
++#if 0
++int found=0;
++bamptr_t *arr[2];
++{
++bamptr_t *bp;
++char qname[128];
++for(bp=ma[i]; bp; bp=bamptr_get_mate(bp)){
++bamptr_get_qname(bp, qname, sizeof(qname));
++if (0==strcmp("SRR002276.40596309",qname)) {
++  found=1;
++}
++}
++if(found){
++int ii=0;
++fprintf(stderr, "ma[%d] ", i);
++for(bp=ma[i]; bp; bp=bamptr_get_mate(bp)){
++arr[ii++]=bp;
++bamptr_get_qname(bp, qname, sizeof(qname));
++fprintf(stderr, "%s (%ld) - ", qname, bamptr_get_qnameid(bp));
++}
++fprintf(stderr, "\n");
++}
++}
++#endif
 +#if 1
 +      bamptr_t *bp, *next;
 +      for(bp=ma[i]; bp; bp=next) {

 .PHONY: lib mostlyclean tags test testclean
+
+-include $(DEPS)
diff -uprN -x '*_Jul11' -x 'ibm_*' -x 'Numer*' -x a.out -x '#*#' -x version.h -x q -x '*~' -x '*.c.*' -x '*.a' -x .git -x .svn -x '*.MIT' 00_svn_r2/samtools-2015-08-19/samtools/sam.c ../files/samtools/sam.c
--- 00_svn_r2/samtools-2015-08-19/samtools/sam.c	2015-08-19 17:55:53.807903000 +0900
+++ ../files/samtools/sam.c	2015-10-13 18:57:25.755999568 +0900

+
+#define DEFAULT_N_LINES		(128) // #lines per DEFAULT_BLKRD_SIZE 
+static void blkrd_free_list2_init(blkrd_free_list2_t *l2) {
+  l2->blkrd_free_list1 = md_malloc(sizeof(l2->blkrd_free_list1[0])*n_block_reader, mem_blkrdFreeList2Init, 1);
+  l2->blkrd_free_list2 = NULL;
+}
