netcdf-c/libcdmr/ast_debug.h

28 lines
658 B
C
Raw Normal View History

2011-04-17 04:56:36 +08:00
#ifndef AST_DEBUG_H
#define AST_DEBUG_H
#define ASTDEBUG
#ifdef ASTDEBUG
extern int ast_catch(int);
2011-06-11 02:47:26 +08:00
extern void ast_breakpoint(int code);
2011-04-17 04:56:36 +08:00
#endif
/* Provide an error catcher */
#ifdef ASTDEBUG
2011-06-11 02:47:26 +08:00
#define ACATCH(status) (ast_catch(status))
2011-04-17 04:56:36 +08:00
#define ATHROW(status,go) {ast_catch(status);goto go;}
#define AERR(status,err,go) {status=err;ast_catch(status);goto go;}
#else
2011-06-11 02:47:26 +08:00
#define ACATCH(status) (status);
#define ATHROWCHK(status) ACATCH(status)
2011-04-17 04:56:36 +08:00
#define ATHROW(status,go) {goto go;}
#define AERR(status,err,go) {goto go;}
#endif
2011-06-11 02:47:26 +08:00
extern unsigned char* xbytes(ast_runtime*);
extern size_t xpos(ast_runtime* rt);
2011-04-17 04:56:36 +08:00
#endif /*AST_DEBUG_H*/