class TextPattern {
public:
                    TextPattern(char *pat);
                    ~TextPattern();
    
    /* return position of first occurrence of pattern in <text>, or
     * -1 if it does not occur */
    int             firstMatch(char *text);
private:
    int             pat_len;
    char            *pattern;
    int             *next;
};
