This commit is contained in:
2007-06-20 07:39:12 +00:00
parent 433a19fd87
commit 7f39141289

View File

@ -5,7 +5,7 @@
static ecotx_t *readnext_ecotaxon(FILE *f,ecotx_t *taxon); static ecotx_t *readnext_ecotaxon(FILE *f,ecotx_t *taxon);
/** /**
* Open the taxonomy database * Open the taxonomy database
* @param pointer to the database (.tdx file) * @param pointer to the database (.tdx file)
* @return a ecotxidx_t structure * @return a ecotxidx_t structure
@ -107,7 +107,7 @@ ecotx_t *readnext_ecotaxon(FILE *f,ecotx_t *taxon)
} }
ecotaxonomy_t *read_taxonomy(const char *prefix) ecotaxonomy_t *read_taxonomy(const char *prefix,int32_t readAlternativeName)
{ {
ecotaxonomy_t *tax; ecotaxonomy_t *tax;
char *filename; char *filename;
@ -129,6 +129,13 @@ ecotaxonomy_t *read_taxonomy(const char *prefix)
tax->taxons = read_taxonomyidx(filename); tax->taxons = read_taxonomyidx(filename);
if (readAlternativeName)
{
snprintf(filename,buffsize,"%s.ndx",prefix);
tax->names=read_nameidx(filename,tax);
}
else
tax->names=NULL;
return tax; return tax;
} }