/**********************************************************************
 
	Copyright (C) 2003 Hirohisa MORI <joshua@nichibun.ac.jp>
 
	This program is free software; you can redistribute it 
	and/or modify it under the terms of the GLOBALBASE 
	Library General Public License (G-LGPL) as published by 

	http://www.globalbase.org/
 
	This program is distributed in the hope that it will be 
	useful, but WITHOUT ANY WARRANTY; without even the 
	implied warranty of MERCHANTABILITY or FITNESS FOR A 
	PARTICULAR PURPOSE.

**********************************************************************/



#ifndef ___DTREE64_H___
#define ___DTREE64_H___

#include	"favt64.h"
#include	"long_char.h"

typedef struct dtree_node64 {
	L_CHAR			ch;
	unsigned int		tree;
	unsigned int		data;
} DTREE_NODE64;

typedef struct dtree_trace_work64 {
	PDB64 * 			p;
	int 			(*func)();
	void *			w;
	int 			(*trace)();
	L_CHAR *		target;
} DTREE_TRACE_WORK64;

void dtree_endian64();
FAVT_ROOT64 * alloc_dtree64(PDB64 * p,int type);
unsigned int search_dtree64(int * sizep,FAVT_ROOT64 * r,L_CHAR * str,int perfect_flag);
int dtree_trace_from_small64(FAVT_ROOT64 * r,int (*func)(),void * work);
int dtree_trace_from_large64(FAVT_ROOT64 * r,int (*func)(),void * work);

#endif

