home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 328_01 / werror.c < prev    next >
C/C++ Source or Header  |  1991-03-17  |  345b  |  29 lines

  1. /*! werror
  2.  *    fatal error handler
  3.  */
  4.  
  5. #include "wscreen.h"
  6. #include "wsys.h"
  7.  
  8.  
  9.  
  10. #include <stdio.h>
  11.  
  12.  
  13. void    werror ( int errcode, char *msg )
  14.     {
  15.     #ifndef TEXTONLY
  16.         /* if in graphics mode, need to restore CRT
  17.          */
  18.                  wtextmode ();
  19.     #endif
  20.  
  21.  
  22.  
  23.     perror ( msg );
  24.  
  25.     exit (errcode);
  26.  
  27.     return; /* werror */
  28.     }
  29.