# Uploaded samtools version 0.1.14-1.
[samtools.git] / bam_aux.c
index 89e99f281adb652e144eea0a77074a1c6cec023a..4fd3190a73799c6fd68257cc8c1125a017dc4860 100644 (file)
--- 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