00001 00076 /* This library is free software; you can redistribute it and/or 00077 modify it under the terms of the GNU Lesser General Public 00078 License as published by the Free Software Foundation; either 00079 version 2.1 of the License, or (at your option) any later version. 00080 00081 This library is distributed in the hope that it will be useful, 00082 but WITHOUT ANY WARRANTY; without even the implied warranty of 00083 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00084 Lesser General Public License for more details. 00085 00086 You should have received a copy of the GNU Lesser General Public 00087 License along with this library; if not, write to the Free Software 00088 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00089 */ 00090 00091 #ifndef _GAN_ERR_TRACE_H 00092 #define _GAN_ERR_TRACE_H 00093 00094 #include <gandalf/common/gan_err.h> 00095 00096 #ifdef __cplusplus 00097 extern "C" { 00098 #endif 00099 00149 typedef struct Gan_ErrorTrace 00150 { 00151 struct Gan_ErrorTrace *prev; 00152 int f_static_record; 00153 int f_static_message; 00154 int f_spare; 00156 const char *func_name; 00157 int err_code; 00158 const char *file_name; 00159 int line_number; 00160 char *message; 00161 } Gan_ErrorTrace; 00162 00167 #define GAN_ET_YES 0 00168 #define GAN_ET_NO 1 00169 00170 Gan_ErrorTrace *gan_et_push ( Gan_ErrorTrace *et_top, 00171 const char *func_name, 00172 int err_code, 00173 const char *file_name, 00174 int line_number, 00175 const char *message ); 00176 int gan_et_get_record_count ( Gan_ErrorTrace *et_record ); 00177 Gan_ErrorTrace *gan_et_get_record_next ( Gan_ErrorTrace *et_record ); 00178 Gan_ErrorTrace *gan_et_get_record_first ( Gan_ErrorTrace *et_record ); 00179 Gan_ErrorTrace *gan_et_flush_trace( Gan_ErrorTrace *et_record ); 00180 00189 #ifdef __cplusplus 00190 } 00191 #endif 00192 00193 #endif /* #ifndef _GAN_ERR_TRACE_H */