Main Page | Data Structures | File List | Data Fields | Globals

error.h

Go to the documentation of this file.
00001 /*
00002  * luau (Lib Update/Auto-Update): Simple Update Library
00003  * Copyright (C) 2003  David Eklund
00004  *
00005  * - This library is free software; you can redistribute it and/or             -
00006  * - modify it under the terms of the GNU Lesser General Public                -
00007  * - License as published by the Free Software Foundation; either              -
00008  * - version 2.1 of the License, or (at your option) any later version.        -
00009  * -                                                                           -
00010  * - This library is distributed in the hope that it will be useful,           -
00011  * - but WITHOUT ANY WARRANTY; without even the implied warranty of            -
00012  * - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         -
00013  * - Lesser General Public License for more details.                           -
00014  * -                                                                           -
00015  * - You should have received a copy of the GNU Lesser General Public          -
00016  * - License along with this library; if not, write to the Free Software       -
00017  * - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA -
00018  */
00019 
00028 #ifndef ERROR_H
00029 #define ERROR_H
00030 
00031 #ifdef HAVE_CONFIG_H
00032 #  include <config.h>
00033 #endif
00034 
00036 #define FATAL_ERROR(string) lutil_error_fatal(string, __FILE__, __FUNCTION__, __LINE__)
00037 
00038 #define ERROR(args...) lutil_error(__FILE__, __FUNCTION__, __LINE__, args)
00039 
00040 typedef void (*UErrorFunc)(const char * string, const char* filename, const char* function, int lineno);
00041 typedef int (*UPromptFunc)(const char * title, const char* msg, int nTotal, int nDefault, const char *choice1, va_list args);
00042 
00044 void lutil_error_setErrorFunc(UErrorFunc errorFunc);
00046 void lutil_error_setPromptFunc(UPromptFunc promptFunc);
00048 void lutil_error_resetErrorFunc(void);
00050 void lutil_error_resetPromptFunc(void);
00051 
00053 void lutil_error_fatal(const char* string, const char* filename, const char* function, int lineno);
00055 int lutil_error_prompt(const char* title, const char* msg, int nTotal, int nDefault, const char *choice1, ...);
00056 
00058 void lutil_error(const char* filename, const char* function, int lineno, const char *template, ...) __attribute__ ((format (printf, 4, 5)));
00059 
00060 #endif /* !ERROR_H */

Generated on Mon Apr 12 22:17:10 2004 for luau by doxygen 1.3.2