/*****************************************************************************
 * EXTERR.H - Extensions to errno for application-specific error handling.
 ****************************************************************************/

#ifndef EXTERROR_H
#define EXTERROR_H

#include <errno.h>				/* pull in compiler's standard errno stuff */

#ifndef E_OK
  #define E_OK 0
#endif

#ifndef ERROR
  #define ERROR (-1)
#endif

typedef struct _Err_tab {		/* application-specific error message table*/
	int 	code;				/* error code							   */
	char	*msg;				/* pointer to message for this code 	   */
	} _Err_tab; 				/* last entry marked by entry w/code 0	   */

#if defined(LATTICE) || defined(__TURBOC__)
  extern int  exterrset(_Err_tab *ptab, int install_or_remove);
  extern char *exterror(int errcode);
#else
  extern  int	exterrset();	  /* add/remove ap-specific err msg table	 */
  extern  char	*exterror();	  /* get ap-specific error message			 */
#endif

#endif

