home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_10_09 / 1009025a < prev    next >
Text File  |  1992-07-08  |  532b  |  38 lines

  1. // LISTING 5
  2.  
  3. #include <stdlib.h>
  4. #include "ExH.h"
  5.  
  6. // Static members instantiation
  7.  
  8. PFV ExH::terminate = abort;
  9. PFV ExH::unexpected = ExH::terminate;
  10.  
  11. char ExH::safeSpace[ExH::BUFSIZE];
  12. Exception* ExH::lastEx = (Exception*)ExH::safeSpace;
  13. JmpStack ExH::stk;
  14.  
  15. void terminate()
  16. {
  17.     (ExH::terminate)();
  18. }
  19.  
  20. void unexpected()
  21. {
  22.     (ExH::unexpected)();
  23. }
  24.  
  25. PFV set_terminate(PFV t)
  26. {
  27.     PFV ret = ExH::terminate;
  28.     ExH::terminate = t;
  29.     return ret;
  30. }
  31.  
  32. PFV set_unexpected(PFV t)
  33. {
  34.     PFV ret = ExH::unexpected;
  35.     ExH::unexpected = t;
  36.     return ret;
  37. }
  38.