home *** CD-ROM | disk | FTP | other *** search
/ Supergames for Windows 3 / wingames3.zip / wingames3 / U-Z / YALIFE / WINERROR.CPP < prev    next >
C/C++ Source or Header  |  1993-09-08  |  548b  |  21 lines

  1. // (c) Jean MICHEL June 1993 -- any modifications must be signaled to the
  2. // author
  3.  
  4. #include <stdio.h>
  5. #include <owl.h>
  6. #include <stdarg.h>
  7. #include "efns.h"
  8. #include "winerror.h"
  9. void error(int errorcode,char *fmt,...)
  10. { char buf[200],*s,*errorstring;
  11.   if(errorcode&WARNING_)errorstring="WARNING";
  12.   va_list argptr;
  13.   va_start(argptr,fmt);
  14.   s=buf+vsprintf(buf,fmt,argptr);
  15.   va_end(argptr);
  16.   if(errorcode&FILE_)sprintf(s," : %s",strerror(errno));
  17.   MessageBeep(-1);
  18.   MessageBox(NULL,buf,errorstring,MB_OK|MB_ICONSTOP);
  19. }
  20.  
  21.