/*
 ****************************************************************
 *                       File ISAM.H                            *
 *      isam typedef, error and external data definitions       *
 ***************************************************************/

#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif

typedef struct  m_elem  *M_ELEM;
typedef struct  l2_elem *L2_ELEM;
typedef struct  l3_elem *L3_ELEM;

#define NODUP   (flags & 1)
#define DUPKEY  1                       /* Duplicate key error */
#define IRE     2                       /* Index read error */
#define IWE     3                       /* Index write error */
#define ICE     4                       /* Index close error */
#define KNF     5                       /* Key not found */
#define INV     6                       /* Index is not valid */
#define NEM     7                       /* Not enough memory for open allocation */
#define FNF     8                       /* File not found on open */
#define INE     9                       /* Index is empty */
#define CCF     10                      /* Cannot create file */

#ifndef EOF
#define EOF     -1
#endif

 /***************************************************************
 *      this file contains the global data used by ISAM         *
 ***************************************************************/

extern unsigned _eof, _bof;             /* end- and start-of-file indicators */
extern int      i_errno;                /* error number */
extern struct   global  *index;         /* pointer to main globals from disk */
extern jmp_buf	__ienv;                 /* setjmp longjmp envelope for index */
extern long     _lm1;                   /* long minus 1 constant */

#define _ienv &__ienv
