home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / dos / prg / todb101 / todb / lib / cerr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-21  |  763 b   |  29 lines

  1. /* ========================================================================*/
  2. /*  TODB LIBRARY                               */
  3. /*    cerr.h                                       */
  4. /*                                       */
  5. /*    Macro and variables to trap C module's exit()               */
  6. /*                                       */
  7. /*    Version: see TODB.H file                           */
  8. /*                                       */
  9. /*    Copyright 1993 Christian Thérien                       */
  10. /*    All rights reserved                           */
  11. /* ========================================================================*/
  12.  
  13. #ifndef _CERR_H
  14. #define _CERR_H
  15.  
  16. #ifdef C_ERR
  17.  
  18. extern char errmod;     /* C module identification */
  19. extern int  errnum;     /* error identification */
  20.  
  21. #define _C_ERR_TRAP_
  22.  
  23. #define C_ERR_TRAP(mod, e) \
  24.     errmod = mod; errnum = e; exit(-1);
  25.  
  26. #endif /* C_ERR */
  27.  
  28. #endif /* _CERR_H */
  29.