home *** CD-ROM | disk | FTP | other *** search
/ PC Shareware 1996 December / PC_Shareware-1996-12.iso / windows / spectrum / sources / error.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-23  |  1.9 KB  |  50 lines

  1. /* Error.c : Dialog boxes for emulator errors.
  2.  *
  3.  * Copyright 1996 Rui Fernando Ferreira Ribeiro.
  4.  *
  5.  * This program is free software; you can redistribute it and/or modify
  6.  * it under the terms of the GNU General Public License as published by
  7.  * the Free Software Foundation; either version 2 of the License, or
  8.  * (at your option) any later version.
  9.  *
  10.  * This program is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  * GNU General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU General Public License
  16.  * along with this program; if not, write to the Free Software
  17.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  */
  19.  
  20. #include <windows.h>
  21. #include <commdlg.h>
  22. #include <string.h>
  23. #include <ctype.h>
  24. #include "env.h"
  25.  
  26. /*=========================================================================*
  27.  *                            warning                                      *
  28.  *                                                                         *
  29.  * Non fatal error, just gives the message                                 *                                 
  30.  *=========================================================================*/
  31. void Warning(msg)
  32. const char * msg;
  33. {
  34.    MessageBox(NULL, msg, "WARNING", MB_OK | MB_ICONSTOP);
  35. }
  36.  
  37. /*=========================================================================*
  38.  *                            panic                                        *
  39.  *                                                                         *
  40.  * Critical error, reset the emulation                                     *
  41.  *=========================================================================*/
  42. void Panic(msg)
  43. const char * msg;
  44. {
  45.    Warning(msg);
  46.    do_reset();
  47. }
  48.  
  49. /* EOF: Error.c */
  50.