/*

$Id: err,v 1.3 1999/10/05 22:34:02 joseph Exp $

*/

#undef E
#undef EF

#ifndef H_err_H
#define H_err_H

#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#endif

#include "kernel.h"

void err_set_taskname(const char *);

bool err_check(const _kernel_oserror *);
void err_check_fatal(const _kernel_oserror *);

void err_report(int, const char *);	/* OK button only */
void err_complain(int, const char *);	/* Cancel & OK buttons */
void err_complain_fatal(int, const char *);	/* Cancel button only */

bool err_debug_check(const _kernel_oserror *,
	const char *file, int line, bool fatal);

#endif

#ifdef POPNDEBUG
  #define E err_check
  #define EF err_check_fatal
#else
  #define E(e) err_debug_check((e), __FILE__, __LINE__, false)
  #define EF(e) err_debug_check((e), __FILE__, __LINE__, true)
#endif
