Branch: Tag:

2000-06-05

2000-06-05 14:27:52 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added support for ERR_EXT_DECLARE, and modified ERR_DECLARE somewhat.

Rev: src/errors.h:1.10

2: Inside #if defined(ERR_DECLARE)
     #ifdef ERR_DECLARE   #define DECLARE_ERROR(NAME, INHERIT, DECL) \ - static struct program *PIKE_CONCAT(NAME,_error_program); \ - static int PIKE_CONCAT(NAME,_error_offset); \ + struct program *PIKE_CONCAT(NAME,_error_program); \ + int PIKE_CONCAT(NAME,_error_offset); +  + #define ERR_VAR(TYPE,CTYPE,RUNTYPE,NAME) TYPE NAME ; + #endif +  + #ifdef ERR_EXT_DECLARE + #define DECLARE_ERROR(NAME, INHERIT, DECL) \ + extern struct program *PIKE_CONCAT(NAME,_error_program); \ + extern int PIKE_CONCAT(NAME,_error_offset); \   struct PIKE_CONCAT(NAME,_error_struct) { \    DECL \   };      #define ERR_VAR(TYPE,CTYPE,RUNTYPE,NAME) TYPE NAME ; - #endif + #endif /* ERR_EXT_DECLARE */    -  +    #ifdef ERR_SETUP   #define DECLARE_ERROR(NAME, INHERIT, DECL) do{ \    int current_offset=0; \
104:   #undef ERR_FUNC      #undef ERR_DECLARE + #undef ERR_EXT_DECLARE   #undef ERR_SETUP   #undef ERR_CLEANUP