/*
	Copyright (C) 1994,1995	Edward Der-Hua Liu, Hsin-Chu, Taiwan
*/

#ifndef XI_H
#define XI_H

#define MROW 2
#define MCOL 44
#define InAreaX (16)
#define SelAreaX (26)

#define NormalColor (0x1f)
#define InAreaColor (0x4e)

struct TableHead {
	char ename[16];		/* ascii name */
	char cname[16];		/* prompt */
	char selkey[12];	/* select keys */
	char endian;
	int KeyS;		/* number of keys needed */
	int MaxPress;		/* Max len of keystroke  ar30:4  changjei:5 */
	int M_DUP_SEL;		/* how many keys used to select */
	int DefC;		/* Defined characters */
};

typedef struct {
  u_char key[4];   /* If I use u_long key, the struc size will be 8 */
  u_char ch[2];
} ITEM;

extern u_long CONVT(char *s);

#define ename(p) ((p)->ename)
#define cname(p) ((p)->cname)
#define endian(p) ((p)->endian)
#define KeyS(p) ((p)->KeyS)
#define MaxPress(p) ((p)->MaxPress)

void xprintf(char *,...);
void p_err(char *,...);

#endif

