// debug.h -- debug support
//
// Author: Ian.Piumarta@inria.fr
//
// last edited: Mon Jan  4 02:44:41 1999 by piumarta (Ian Piumarta) on pingu

#ifndef _debug_h_
#define _debug_h_

extern void error(char *reason, ...);

#ifdef DEBUG
  extern "C" {
    void okayInterpreterObjects(void);
    void allAccessibleObjectsAkay(void);
  };
#endif

#ifdef NDEBUG
# define assert(expr)
#else
# define assert(expr) if (!(expr)) \
  error("%s:%d: assertion failed: %s", __FILE__, __LINE__, #expr)
# ifndef EPEND
#   warning: ASSERTIONS ARE ENABLED
# endif
#endif


#endif _debug_h_

