#include "ctype.h"
#include "exec/types.h"
#include "exec/exec.h"
#include "exec/execbase.h"
#include "intuition/intuition.h"
#include "intuition/intuitionbase.h"
#include "libraries/dos.h"
#include "libraries/dosextens.h"
#include "devices/keymap.h"
#include "stdio.h"
#if AZTEC_C
#include "functions.h"
#else
#include "proto/exec.h"
#include "proto/intuition.h"
#include "proto/dos.h"
#endif

#define BUFSIZE 2048L

#define OFF	0
#define ON	1
#define FAUX	0
#define VRAI	1
#define BON	0
#define ERROR	-1

#define MAX_TAB 0x280
#define P_SIZE 128L

/*struct KeyMap {
UBYTE *km_LoKeyMapTypes;
ULONG *km_LoKeyMap;
UBYTE *km_LoCapsable;
UBYTE *km_LoRepeatable;
UBYTE *km_HiKeyMapTypes;
ULONG *km_HiKeyMap;
UBYTE *km_HiCapsable;
UBYTE *km_HiRepeatable;
};
*/
struct KeyMap keymap;

struct P_String {
	UBYTE l;
	UBYTE *p;
	} *buf_p;

UBYTE	*alstrflag;
UBYTE	*filebuf;
UBYTE nom[32];
struct P_String *tri();

#define WIDTH	640L
#define HEIGHT	200L

struct Window   *window;      /* window pointer */
struct IntuitionBase *IntuitionBase;
struct GfxBase *GfxBase;
struct IntuiMessage *Message;
struct RastPort *wRPort;
union U_Key { UBYTE *str; UBYTE trad[4]; ULONG longtrad;} Tkey;

USHORT key_rel, key_abs;
UBYTE qual, strdead;
BOOL LoType, repet, caps;
UBYTE *pbase;
UBYTE *pnom;
struct P_String *buffer;

int invalide, etape;

