home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Supergames for Windows 3
/
wingames3.zip
/
wingames3
/
U-Z
/
YALIFE
/
WINERROR.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-09-08
|
548b
|
21 lines
// (c) Jean MICHEL June 1993 -- any modifications must be signaled to the
// author
#include <stdio.h>
#include <owl.h>
#include <stdarg.h>
#include "efns.h"
#include "winerror.h"
void error(int errorcode,char *fmt,...)
{ char buf[200],*s,*errorstring;
if(errorcode&WARNING_)errorstring="WARNING";
va_list argptr;
va_start(argptr,fmt);
s=buf+vsprintf(buf,fmt,argptr);
va_end(argptr);
if(errorcode&FILE_)sprintf(s," : %s",strerror(errno));
MessageBeep(-1);
MessageBox(NULL,buf,errorstring,MB_OK|MB_ICONSTOP);
}