#ifndef SortKey_SEEN__ #define SortKey_SEEN__ /////// File: SortKey.h /////// #define DELIM "\t \r" /* default key delimiters */ typedef char *String; typedef unsigned int Uint; class SortKey { public: SortKey(Uint pos = 0, String dlm = DELIM) { delim = dlm; position = pos; } int cmp(const char *a, const char *b); // compare lines int cmp(void* k, const char *b); // compare key to line private: String delim; Uint position; const char *key(const char *s); // identify key int is_del(const char* c); // delimiter test int keycmp(const char *a, const char *b); // compare keys }; #endif