X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=samtools.git;a=blobdiff_plain;f=bam_aux.c;h=4fd3190a73799c6fd68257cc8c1125a017dc4860;hp=89e99f281adb652e144eea0a77074a1c6cec023a;hb=ced7709f121a00d5049d99ee8576037994aab1d1;hpb=63f0c5147985e4b1c01942d4525c04e017dbe966 diff --git a/bam_aux.c b/bam_aux.c index 89e99f2..4fd3190 100644 --- a/bam_aux.c +++ b/bam_aux.c @@ -115,7 +115,7 @@ int bam_parse_region(bam_header_t *header, const char *str, int *ref_id, int *be *ref_id = kh_value(h, iter); if (i == k) { /* dump the whole sequence */ *begin = 0; *end = 1<<29; free(s); - return -1; + return 0; } for (p = s + i + 1; i != k; ++i) if (s[i] == '-') break; *begin = atoi(p); @@ -180,3 +180,10 @@ char *bam_aux2Z(const uint8_t *s) if (type == 'Z' || type == 'H') return (char*)s; else return 0; } + +#ifdef _WIN32 +double drand48() +{ + return (double)rand() / RAND_MAX; +} +#endif