Back to index

wims  3.65+svn20090927
errors.c
Go to the documentation of this file.
00001 /*    Copyright (C) 1998-2003 XIAO, Gang of Universite de Nice - Sophia Antipolis
00002  *
00003  *  This program is free software; you can redistribute it and/or modify
00004  *  it under the terms of the GNU General Public License as published by
00005  *  the Free Software Foundation; either version 2 of the License, or
00006  *  (at your option) any later version.
00007  *
00008  *  This program is distributed in the hope that it will be useful,
00009  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011  *  GNU General Public License for more details.
00012  *
00013  *  You should have received a copy of the GNU General Public License
00014  *  along with this program; if not, write to the Free Software
00015  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00016  */
00017 
00018        /* type=1: user. type=2: module. type=3: internal. */
00019 void _error(char *msg, int type)
00020 {
00021     fprintf(stderr,"%s\n",msg);
00022     exit(type);    
00023 }
00024 
00025 void _error1(char *msg) {_error(msg,1);}
00026 void _error2(char *msg) {_error(msg,1);}
00027 void _error3(char *msg) {_error(msg,1);}
00028 
00029 void (*error1) (char *msg)=_error1;
00030 void (*error2) (char *msg)=_error2;
00031 void (*error3) (char *msg)=_error3;
00032