components/prboom/lprintf.c
/*
 * I_Error
 *
 * cphipps - moved out of i_* headers, to minimise source files that depend on
 * the low-level headers. All this does is print the error, then call the
 * low-level safe exit function.
 * killough 3/20/98: add const
 */
I_Error
cphipps - moved out of i_* headers, to minimise source files that depend on
the low-level headers. All this does is print the error, then call the
low-level safe exit function.
killough 3/20/98: add const
I_Error cphipps - moved out of i_ * headers to minimise source files that depend on the low - level headers . All this does is print the error then call the low - level safe exit function . killough 3 / 20 / 98 : add const
void I_Error(const char *error, ...)
{
  char errmsg[MAX_MESSAGE_SIZE];
  va_list argptr;
  va_start(argptr,error);
#ifdef HAVE_VSNPRINTF
  vsnprintf(errmsg,sizeof(errmsg),error,argptr);
#else
  vsprintf(errmsg,error,argptr);
#endif
  va_end(argptr);
  lprintf(LO_ERROR, "%s\n", errmsg);
#ifdef _MSC_VER
  if (!M_CheckParm ("-nodraw")) {
    MessageBox(con_hWnd,errmsg,"PrBoom",MB_OK | MB_TASKMODAL | MB_TOPMOST);
  }
#endif
  I_SafeExit(-1);
}
void I_Error ( const char * error , ... ) { char errmsg [ MAX_MESSAGE_SIZE ] ; va_list argptr ; va_start ( argptr , error ) ; #ifdef HAVE_VSNPRINTF vsnprintf ( errmsg , sizeof ( errmsg ) , error , argptr ) ; #else vsprintf ( errmsg , error , argptr ) ; #endif va_end ( argptr ) ; lprintf ( LO_ERROR , " \n " , errmsg ) ; #ifdef _MSC_VER if ( ! M_CheckParm ( " " ) ) { MessageBox ( con_hWnd , errmsg , " " , MB_OK | MB_TASKMODAL | MB_TOPMOST ) ; } #endif I_SafeExit ( -1 ) ; }
I_Error
 cphipps - moved out of i_* headers, to minimise source files that depend on
 the low-level headers.
I_Error cphipps - moved out of i_ * headers to minimise source files that depend on the low - level headers .
//Init_ConsoleWin();