/******************************************************************************

    MODUL
	keyhashes.h

    DESCRIPTION
	definition module for all keymodules

******************************************************************************/

#ifndef KEYHASHES_H
#define KEYHASHES_H

/**************************************
		Includes
**************************************/

#ifndef   EXEC_TYPES_H
#include <exec/types.h>
#endif /* EXEC_TYPES_H */

#ifndef   EXEC_NODES_H
#include <exec/nodes.h>
#endif /* EXEC_NODES_H */


/**************************************
	    Globale Variable
**************************************/


/**************************************
	Defines und Strukturen
**************************************/

#define HASHSIZE    64	    /* power of 2   */
#define HASHMASK    (HASHSIZE-1)
#define QUALMASK    0x3ff

typedef struct _Hash {
    struct _HASH * next;    /* next hash    */
    UWORD	   mask;    /* qual. mask   */
    UWORD	   qual;    /* qual. comp   */
    UBYTE	   code;    /* keycode	    */
    char	 * comm;    /* command	    */
    char	 * help;    /* online help  */
} HASH;

typedef struct _2Strings {
    char  * from;
    char  * to;
} TWOSTRINGS;

typedef struct _3Strings {
    char  * from;
    char  * to;
    char  * help;
} THREESTRINGS;

typedef struct _KeyTable {
    struct Node node;
    HASH      * hash[HASHSIZE];
} KEYTABLE;


/**************************************
	       Prototypes
**************************************/


#endif /* KEYHASHES_H */

/******************************************************************************
*****  ENDE keyhashes.h
******************************************************************************/

