#ifndef _UEXTENDED_
#define _UEXTENDED_

//#define MSDOS // bwh
//#define MACINTOSH
//define WINDOWS
#include "Platform.h"

#include <string.h>

#define UPPER  (1)
#define LOWER  (2)

#ifdef _WINDOWS_
#define FIRSTCHAR '\'' // ap 12/30/95 was 'A'
#define LASTCHAR  'ÿ'
#endif

#ifdef _MACINTOSH_
#define FIRSTCHAR '\'' // ap 12/30/95 was 'a'
#define LASTCHAR 'Ñ'   
#endif

#ifdef _MSDOS_// bwh
#define FIRSTCHAR '\'' // ap 12/30/95 was '-'
#define LASTCHAR 'Z'
#endif


#ifdef _WINDOWS_
#include "windows.h"
#endif

class UExtended {
public:

	//short EStrCmp(unsigned char *String1, unsigned char *String2);
	short EStrCmp(char *S1, char *S2);
	short ECharCmp(char char1, char char2);
	//short ECharCmp(char S1, char S2);
	short EIsLower(char Char);
	short EIsUpper(char Char);
	short EToLower(char Char);
	short EToUpper(char Char);
	void EStrLower(char *String);
	void EStrUpper(char *String);
	short EIsChar(char Char);
	unsigned char ENextChar(unsigned char Char);
	//void Init();
	UExtended();
	~UExtended();

protected:

	unsigned char *SortArray;
	unsigned char CompareArray[256];						// used to set values to characters for compare
	unsigned char ToUpperArray[256];						// array which maps lower case to upper case
	unsigned char ToLowerArray[256];						// array which maps upper case to lower case
	unsigned char CaseArray[256];						// array used to identify upper and lower case
	unsigned char TraverseArray[256];					// array which given a character identifies next
};

#endif

