2000-03-05 19:58:08 +00:00
|
|
|
/* ------------------- htree.h -------------------- */
|
|
|
|
|
|
|
|
#ifndef HTREE_H
|
|
|
|
#define HTREE_H
|
|
|
|
|
2003-06-19 02:48:13 +00:00
|
|
|
typedef unsigned int DF_BYTECOUNTER;
|
2000-03-05 19:58:08 +00:00
|
|
|
|
|
|
|
/* ---- Huffman tree structure for building ---- */
|
2003-06-19 02:48:13 +00:00
|
|
|
struct DfHTree {
|
|
|
|
DF_BYTECOUNTER cnt; /* character frequency */
|
2000-03-05 19:58:08 +00:00
|
|
|
int parent; /* offset to parent node */
|
|
|
|
int right; /* offset to right child node */
|
|
|
|
int left; /* offset to left child node */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* ---- Huffman tree structure in compressed file ---- */
|
2003-06-19 02:48:13 +00:00
|
|
|
struct DfHTr {
|
2000-03-05 19:58:08 +00:00
|
|
|
int right; /* offset to right child node */
|
|
|
|
int left; /* offset to left child node */
|
|
|
|
};
|
|
|
|
|
2003-06-19 02:48:13 +00:00
|
|
|
extern struct DfHTr *DfHelpTree;
|
2000-03-05 19:58:08 +00:00
|
|
|
|
2003-06-19 02:48:13 +00:00
|
|
|
void DfBuildTree(void);
|
|
|
|
FILE *DfOpenHelpFile(void);
|
|
|
|
void DfHelpFilePosition(long *, int *);
|
|
|
|
void *DfGetHelpLine(char *);
|
|
|
|
void DfSeekHelpLine(long, int);
|
2000-03-05 19:58:08 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|