typedef struct _taxon {
  char name[64] ;
  struct _taxon *next ;
  struct _taxon *nextlevel ;
  void *other_data ;
} taxon ;

/* step_taxon changes a pointer to taxon to a pointer to that taxon's
   "next" field */

#define step_taxon(P) (P) = ((P) != NULL ? (P)->next : NULL) 

/* insert_taxon_item inserts an item into the taxon list 
   headed by "head".

   If the given name is already present as an item and the
   "replace_data" argument is nonzero, the "other_data" 
   field of the already-present element is freed and replaced with the 
   "other_data" input argument.

   The function returns a pointer to the newly inserted or found
   item. */

extern taxon *insert_taxon_item(taxon **head, char *name, void *other_data,
				int replace_data) ;

/* insert_taxon_child inserts a taxon into the list headed by
   the "nextlevel" field of "parent". If "parent" is NULL, the
   function returns NULL, otherwise it returns a pointer like
   insert_taxon_item does. The behavior of "other_data" and "replace_data"
   are as per insert_taxon_item. */

extern taxon *insert_taxon_child(taxon *parent, char *name, 
				 void *other_data, int replace_data) ;

/* find_taxon_item returns a pointer to a taxon in the list headed
   by "head" whose name matches "name", or NULL if no such element
   exists. */

extern taxon *find_taxon_item(taxon *head, char *name) ;

