Skip to content

@brentp /gist:809634
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
bfast patch for fseek on large files
diff --git a/bfast/RGIndex.c b/bfast/RGIndex.c
index 3e8f57a..cc5e426 100644
--- a/bfast/RGIndex.c
+++ b/bfast/RGIndex.c
@@ -1356,8 +1356,10 @@ void RGIndexMergeHelperFromDiskContig_8(RGIndex *index,
}
/* Move to beginning of the files */
- fseek(tmpLowerFP, 0 , SEEK_SET);
- fseek(tmpUpperFP, 0 , SEEK_SET);
+ fclose(tmpLowerFP);
+ fclose(tmpUpperFP);
+ tmpLowerFP = fopen(tmpLowerFileName, "rb");
+ tmpUpperFP = fopen(tmpUpperFileName, "rb");
/* Merge tmp files back into index */
/* Get first contig/pos */
@@ -1496,8 +1498,10 @@ void RGIndexMergeHelperFromDiskContig_32(RGIndex *index,
}
/* Move to beginning of the files */
- fseek(tmpLowerFP, 0 , SEEK_SET);
- fseek(tmpUpperFP, 0 , SEEK_SET);
+ fclose(tmpLowerFP);
+ fclose(tmpUpperFP);
+ tmpLowerFP = fopen(tmpLowerFileName, "rb");
+ tmpUpperFP = fopen(tmpUpperFileName, "rb");
/* Merge tmp files back into index */
/* Get first contig/pos */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.