patch to correct bug in switch between parts of the sequence database
git-svn-id: https://www.grenoble.prabi.fr/svn/LECASofts/ecoPCR/trunk@8 60f365c0-8329-0410-b2a4-ec073aeeaa1d
This commit is contained in:
@ -152,6 +152,9 @@ FILE *open_seqfile(const char *prefix,int32_t index)
|
|||||||
"%s_%03d.sdx",
|
"%s_%03d.sdx",
|
||||||
prefix,
|
prefix,
|
||||||
index);
|
index);
|
||||||
|
|
||||||
|
fprintf(stderr,"Coucou %s\n",filename_buffer);
|
||||||
|
|
||||||
|
|
||||||
if (filename_length >= 1024)
|
if (filename_length >= 1024)
|
||||||
ECOERROR(ECO_ASSERT_ERROR,"file name is too long");
|
ECOERROR(ECO_ASSERT_ERROR,"file name is too long");
|
||||||
@ -172,6 +175,7 @@ ecoseq_t *ecoseq_iterator(const char *prefix)
|
|||||||
{
|
{
|
||||||
static FILE *current_seq_file= NULL;
|
static FILE *current_seq_file= NULL;
|
||||||
static int32_t current_file_idx = 1;
|
static int32_t current_file_idx = 1;
|
||||||
|
static char current_prefix[1024];
|
||||||
ecoseq_t *seq;
|
ecoseq_t *seq;
|
||||||
|
|
||||||
if (prefix)
|
if (prefix)
|
||||||
@ -180,8 +184,11 @@ ecoseq_t *ecoseq_iterator(const char *prefix)
|
|||||||
|
|
||||||
if (current_seq_file)
|
if (current_seq_file)
|
||||||
fclose(current_seq_file);
|
fclose(current_seq_file);
|
||||||
|
|
||||||
|
strncpy(current_prefix,prefix,1023);
|
||||||
|
current_prefix[1024]=0;
|
||||||
|
|
||||||
current_seq_file = open_seqfile(prefix,
|
current_seq_file = open_seqfile(current_prefix,
|
||||||
current_file_idx);
|
current_file_idx);
|
||||||
|
|
||||||
if (!current_seq_file)
|
if (!current_seq_file)
|
||||||
@ -195,8 +202,10 @@ ecoseq_t *ecoseq_iterator(const char *prefix)
|
|||||||
{
|
{
|
||||||
current_file_idx++;
|
current_file_idx++;
|
||||||
fclose(current_seq_file);
|
fclose(current_seq_file);
|
||||||
current_seq_file = open_seqfile(prefix,
|
current_seq_file = open_seqfile(current_prefix,
|
||||||
current_file_idx);
|
current_file_idx);
|
||||||
|
|
||||||
|
|
||||||
if (current_seq_file)
|
if (current_seq_file)
|
||||||
seq = readnext_ecoseq(current_seq_file);
|
seq = readnext_ecoseq(current_seq_file);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user