Back to index

im-sdk  12.3.91
tree.h
Go to the documentation of this file.
00001 #ifndef HASH_TABLE_H
00002 #define HASH_TABLE_H
00003 
00004 #include "hhentry.h"
00005 
00006 typedef struct _TreeNode TreeNode;
00007 
00008 struct _TreeNode{
00009   TreeNode *left;
00010   TreeNode *right;
00011   HHItem *data;
00012 };
00013 
00014 typedef struct _Tree {
00015   TreeNode *root;
00016 } Tree;
00017 
00018 #if 0
00019 typedef struct _HashTable {
00020   int n_items;
00021   HHEntry **list;
00022 }HashTable;
00023 #endif
00024 
00025 TreeNode *
00026 tree_search_hangul (Tree *tree, unsigned char *hangul);
00027 
00028 Tree *
00029 tree_n_new (int n);
00030 
00031 TreeNode *
00032 tree_node_new_with_hhitem (HHItem *data);
00033 
00034 void
00035 tree_insert (Tree *tree, TreeNode *tnode);
00036 
00037 void
00038 tree_clear (Tree *tree);
00039 
00040 #endif /* HASH_TABLE_H */
00041 #ifndef HASH_TABLE_H
00042 #define HASH_TABLE_H
00043 
00044 #include "hhentry.h"
00045 
00046 typedef struct _TreeNode TreeNode;
00047 
00048 struct _TreeNode{
00049   TreeNode *left;
00050   TreeNode *right;
00051   HHItem *data;
00052 };
00053 
00054 typedef struct _Tree {
00055   TreeNode *root;
00056 } Tree;
00057 
00058 #if 0
00059 typedef struct _HashTable {
00060   int n_items;
00061   HHEntry **list;
00062 }HashTable;
00063 #endif
00064 
00065 TreeNode *
00066 tree_search_hangul (Tree *tree, unsigned char *hangul);
00067 
00068 #endif /* HASH_TABLE_H */