00001 /******************************************************************************* 00002 * M3: M3_error.h * 00003 * * 00004 * Version 1.0 May 2004 * 00005 * * 00006 * Copyright (C) 2004 J. Borrill * 00007 * * 00008 * This program is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU General Public License as published by * 00010 * the Free Software Foundation; either version 2 of the License, or * 00011 * (at your option) any later version. * 00012 * * 00013 * This program is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00016 * GNU General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU General Public License * 00019 * along with this program; if not, write to the Free Software * 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 00021 * * 00022 *******************************************************************************/ 00023 00024 00025 #ifndef _H_M3_error 00026 #define _H_M3_error 00027 00028 /* M3_EFLAG_NONE is a place holder for the eventual 00029 move to error flag == 0 on no error returns. */ 00030 #define M3_EFLAG_NONE -1 00031 #define M3_EFLAG_DEFAULT 0 00032 #define M3_EFLAG_MALLOC_VSTRING 1 00033 #define M3_EFLAG_MALLOC_FSTRING 2 00034 #define M3_EFLAG_FOPEN_READ 3 00035 #define M3_EFLAG_FOPEN_WRITE 4 00036 #define M3_EFLAG_FOPEN_APPEND 5 00037 #define M3_EFLAG_FREAD_COUNT 6 00038 #define M3_EFLAG_FWRITE_COUNT 7 00039 #define M3_EFLAG_ARG_COUNT 8 00040 00041 void M3_ErrorCheck(int pe, char *string, int ok, int flag); 00042 00043 #ifndef _S_M3_error 00044 #define M3_ErrorCheck( pe, string, ok, flag ) M3_ErrorCheck( pe, string, ( ( ok ) ? 1 : 0 ), flag ) 00045 #endif 00046 00047 00048 #endif
1.5.3-20071008