home *** CD-ROM | disk | FTP | other *** search
/ Quark 3 / Quark3.iso / KATALOG / ARCHIV / TOOL / T001.ZIP / SOURCE.ZIP / Error.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-03  |  1.4 KB  |  54 lines

  1. /*
  2. Copyright (C) Matthew 'pagan' Baranowski & Sander 'FireStorm' van Rossen
  3.  
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License
  6. as published by the Free Software Foundation; either version 2
  7. of the License, or (at your option) any later version.
  8.  
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. GNU General Public License for more details.
  13.  
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  17. */
  18.  
  19. #include "system.h"
  20.  
  21. /*
  22. error handler
  23. */
  24.  
  25. void Error (char *error, ...)
  26. {
  27.         va_list argptr;
  28.         char    text[1024];       
  29.  
  30.         va_start (argptr,error);
  31.         vsprintf (text, error,argptr);
  32.         va_end (argptr);
  33.  
  34.         MessageBox( NULL, text, "Error", MB_OK );
  35.  
  36.         exit (1);
  37. }
  38.  
  39.  
  40. /* 
  41. debugging output
  42. */
  43. void Debug (char *error, ...)
  44. {
  45.         va_list argptr;
  46.         char    text[4096];       
  47.  
  48.         va_start (argptr,error);
  49.         vsprintf (text, error,argptr);
  50.         va_end (argptr);
  51.         
  52.         MessageBox( NULL, text, "Debug", MB_OK );        
  53. }
  54.