Octave-Forge - Extra packages for GNU Octave | |
Home · Packages · Developers · Documentation · FAQ · Bugs · Mailing Lists · Links · Code |
00001 /* 00002 00003 Copyright (C) 1996, 1997, 1999, 2005, 2006, 2007 John W. Eaton 00004 00005 This file is part of Octave. 00006 00007 Octave is free software; you can redistribute it and/or modify it 00008 under the terms of the GNU General Public License as published by the 00009 Free Software Foundation; either version 3 of the License, or (at your 00010 option) any later version. 00011 00012 Octave is distributed in the hope that it will be useful, but WITHOUT 00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00014 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00015 for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with Octave; see the file COPYING. If not, see 00019 <http://www.gnu.org/licenses/>. 00020 00021 */ 00022 00023 #if !defined (octave_liboctave_error_h) 00024 #define octave_liboctave_error_h 1 00025 00026 #ifdef __cplusplus 00027 extern "C" { 00028 #endif 00029 00030 extern void liboctave_fatal (const char *fmt, ...) GCC_ATTR_NORETURN; 00031 00032 extern void liboctave_warning (const char *fmt, ...); 00033 00034 extern void liboctave_warning_with_id (const char *id, const char *fmt, ...); 00035 00036 typedef void (*liboctave_error_handler) (const char *, ...); 00037 00038 typedef void (*liboctave_warning_handler) (const char *, ...); 00039 00040 typedef void (*liboctave_warning_with_id_handler) (const char *, const char *, ...); 00041 00042 /* Would be nice to make these pointers private, but we want to share 00043 them among all the liboctave classes. */ 00044 CRUFT_API extern liboctave_error_handler current_liboctave_error_handler; 00045 00046 CRUFT_API extern liboctave_warning_handler current_liboctave_warning_handler; 00047 00048 CRUFT_API extern liboctave_warning_with_id_handler current_liboctave_warning_with_id_handler; 00049 00050 CRUFT_API extern void set_liboctave_error_handler (liboctave_error_handler f); 00051 00052 CRUFT_API extern void set_liboctave_warning_handler (liboctave_warning_handler f); 00053 00054 CRUFT_API extern void set_liboctave_warning_with_id_handler (liboctave_warning_with_id_handler f); 00055 00056 #ifdef __cplusplus 00057 } 00058 #endif 00059 00060 #endif 00061 00062 /* 00063 ;;; Local Variables: *** 00064 ;;; mode: C++ *** 00065 ;;; End: *** 00066 */