/*static char *SCCSID = "@(#)nls.h	6.1 90/11/17";*/
/* SCCSID = @(#)nls.h	6.2 90/06/15	*/
/****************************************************************************/
/*									    */
/*			 IBM/Microsoft Confidential			    */
/*									    */
/*		   Copyright (c) IBM Corporation  1987, 1990		    */
/*		   Copyright (c) Microsoft Corp.  1987, 1990		    */
/*			     All Rights Reserved			    */
/*									    */
/****************************************************************************/


/* #define ERROR_CODE_PAGE_NOT_FOUND		   4	*/
/* #define ERROR_NO_COUNTRY_OR_CODEPAGE 	   6	*/
/* #define ERROR_DOSGETCP_ERROR 		  10	*/
/* #define ERROR_UNEXPECTED_SLOT_RETURNED	  12	*/


/*  INTERNAL ERRORS */

#define ERROR_NOT_IN_CTRY_TABLE 	       -1


#define SETCOUNTRYINFO	1	/* select country info			*/
#define SETUCASE	2	/* select uppercase tbl 		*/
#define SETLCASE	3	/* select lowercase tbl 		*/
#define SETUCASEFILE	4	/* select uppercase spec table		*/
#define SETFILELIST	5	/* select valid file character list	*/
#define SETCOLLATE	6	/* select collating sequence		*/
#define SETDBCS 	7	/* select double byte char set		*/

#define MAXCASEMAP	256	/* max size for ucase table in casemap	*/

#define MAXDBCS 	256	/* max size for dbcs table in casemap	*/

#define NOT_DBCS_CHAR	0
#define DBCS_CHAR	1

#define TERMINATE	0
#define CONTINUE	1

// B712109  define FALSE	     0
// B712109  define TRUE 	!FALSE

#define NUMBER_ENTRY	    24		/* cp1.1 number of country = 24 */
#define NOT_IN_CTRY_TABLE   -1
#define NO_TIMEOUT	    -1
#define OFF_CODEPAGE	     2
#define OFF_COUNTRY	     4
/****	define for CPDOS1.1				       *****/

/******************************************/
/*   Structure declarations		  */
/******************************************/

struct cp_id_table  {
	unsigned    length;
	unsigned    howmany;
	unsigned    cp_id1;
	unsigned   near *cp_id1_off;
	unsigned    cp_id2;
	unsigned   near *cp_id2_off;
	};

struct nls_table  {
	unsigned     length;
	unsigned    near *format_off;
	unsigned    near *collate_off;
	unsigned    near *casemap_off;
	unsigned    near *DBCS_off;
	};

/****	define for OS/2 1.2				       *****/

typedef struct Header_Struc {	  /* B712109   Cache info data structure */
	unsigned    country_cd; 	    /* Country Code		 */
	unsigned    cp_id;		    /* Codepage ID		 */
	unsigned    total_len;		    /* total length of the block */
	unsigned    table_type; 	    /* Type of the table	 */
					    /*	  1 : COUNTRYINFO Table  */
					    /*	  2 : CASEMAP	  Table  */
					    /*	  6 : COLLATE	  Table  */
					    /*	  7 : DBCS Ev	  Table  */
					    /*				 */
	unsigned    nls_offset; 	    /* offset of next data block */
	struct Header_Struct far *next;     /* pointer to next header	 */
	} HEADER, far *PHEADER;  /* B712109    non 0 : Addr of next block*/
					    /*	   0 : Last Data Block	 */
