/*
 * trie.h - Craig Kelley - Feb 1995
 *
 * This is the header file for trie-- it contains all the function
 * prototypes.  For a more detailed explanation of each procedure,
 * see the source code in "trie.c".
 */

#include <stdio.h> 
#include <stdlib.h>
#include <string.h>

#define MAXLENGTH 255		/* the maximum length of one line */
#define NCHARS 256		/* the number of different char codes */

/* 
 * Type Definitions 
 */

typedef struct T_NODE {                     
   char value;				    /* the char of this node */
   int end;				    /* marks the end of a line */
   struct T_NODE *children[NCHARS];	    /* points to the next char */
} trie_node;
typedef trie_node *node_ptr;

/* 
 * Function Prototypes 
 */

extern void insert_trie(node_ptr trie, char *line);
extern int output_trie(node_ptr trie, char *query, char *line);
extern node_ptr new_node(char c);
extern void free_trie(node_ptr);
extern void printt(node_ptr trie, char *query, char *prefix);



