Taxonomy handling functions in C. Features: read taxdump, read binary

files, write binary files. Not fully handled yet: *.adx, *.pdx, *.ldx,
merged.dmp and delnodes.dmp files.
This commit is contained in:
Celine Mercier
2016-10-27 18:56:11 +02:00
parent b63d0fb9fb
commit d8a257e711
5 changed files with 970 additions and 88 deletions

View File

@ -17,10 +17,6 @@
#include "obidms.h"
#define SWAPINT32(x) ((((x) << 24) & 0xFF000000) | (((x) << 8) & 0xFF0000) | \
(((x) >> 8) & 0xFF00) | (((x) >> 24) & 0xFF))
typedef struct {
int32_t taxid;
int32_t rank;
@ -72,8 +68,8 @@ typedef struct {
typedef struct {
int32_t count;
econame_t names[1];
int32_t count;
econame_t names[1];
} econameidx_t;
@ -109,4 +105,7 @@ int write_rankidx(OBIDMS_p dms, OBIDMS_taxonomy_p tax, const char* taxonomy_name
int write_taxonomyidx(OBIDMS_p dms, OBIDMS_taxonomy_p tax, const char* taxonomy_name);
int write_nameidx(OBIDMS_p dms, OBIDMS_taxonomy_p tax, const char* taxonomy_name);
int obi_write_taxonomy(OBIDMS_p dms, OBIDMS_taxonomy_p tax, const char* tax_name);
OBIDMS_taxonomy_p obi_read_taxdump(const char* taxdump);