annotate liboctave/util/lo-error.h @ 29358:0a5b15007766 stable

update Octave Project Developers copyright for the new year In files that have the "Octave Project Developers" copyright notice, update for 2021.
author John W. Eaton <jwe@octave.org>
date Wed, 10 Feb 2021 09:52:15 -0500
parents bd51beb6205e
children 7854d5752dd2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ////////////////////////////////////////////////////////////////////////
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 //
29358
0a5b15007766 update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
3 // Copyright (C) 1996-2021 The Octave Project Developers
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
4 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 // See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 // distribution or <https://octave.org/copyright/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
7 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
8 // This file is part of Octave.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
9 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
10 // Octave is free software: you can redistribute it and/or modify it
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
11 // under the terms of the GNU General Public License as published by
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
12 // the Free Software Foundation, either version 3 of the License, or
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
13 // (at your option) any later version.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
14 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
15 // Octave is distributed in the hope that it will be useful, but
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
18 // GNU General Public License for more details.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
19 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
20 // You should have received a copy of the GNU General Public License
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
21 // along with Octave; see the file COPYING. If not, see
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
22 // <https://www.gnu.org/licenses/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
23 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
24 ////////////////////////////////////////////////////////////////////////
2551
65e2cd433c7f [project @ 1996-11-20 23:08:48 by jwe]
jwe
parents:
diff changeset
25
20791
f7084eae3318 maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents: 19697
diff changeset
26 #if ! defined (octave_lo_error_h)
17822
ebb3ef964372 maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents: 17744
diff changeset
27 #define octave_lo_error_h 1
2551
65e2cd433c7f [project @ 1996-11-20 23:08:48 by jwe]
jwe
parents:
diff changeset
28
21244
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 21227
diff changeset
29 #include "octave-config.h"
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 21227
diff changeset
30
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
31 #if defined (__cplusplus)
2551
65e2cd433c7f [project @ 1996-11-20 23:08:48 by jwe]
jwe
parents:
diff changeset
32 extern "C" {
65e2cd433c7f [project @ 1996-11-20 23:08:48 by jwe]
jwe
parents:
diff changeset
33 #endif
65e2cd433c7f [project @ 1996-11-20 23:08:48 by jwe]
jwe
parents:
diff changeset
34
21227
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21040
diff changeset
35 OCTAVE_NORETURN extern void
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21040
diff changeset
36 liboctave_fatal (const char *fmt, ...);
2551
65e2cd433c7f [project @ 1996-11-20 23:08:48 by jwe]
jwe
parents:
diff changeset
37
21040
3e7cfee5f786 maint: Rename attributes GCC_ATTR_XXX to OCTAVE_XXX.
Rik <rik@octave.org>
parents: 21037
diff changeset
38 OCTAVE_NORETURN extern
21029
e3b3bb522d62 maint: Move GCC_ attributes to start of declaration for future compatibility.
Rik <rik@octave.org>
parents: 21016
diff changeset
39 void liboctave_fatal_with_id (const char *id, const char *fmt, ...);
10370
9c4daf174387 implement IDs for common liboctave exceptions
Jaroslav Hajek <highegg@gmail.com>
parents: 9933
diff changeset
40
21227
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21040
diff changeset
41 extern void
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21040
diff changeset
42 liboctave_warning (const char *fmt, ...);
3325
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 2847
diff changeset
43
21227
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21040
diff changeset
44 extern void
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21040
diff changeset
45 liboctave_warning_with_id (const char *id, const char *fmt, ...);
5781
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5307
diff changeset
46
21037
b4d6e7cd28db maint: Avoid GCC_ATTR_RETURN in typedef which clang can't compile.
Rik <rik@octave.org>
parents: 21029
diff changeset
47 typedef void (*liboctave_error_handler) (const char *, ...);
2551
65e2cd433c7f [project @ 1996-11-20 23:08:48 by jwe]
jwe
parents:
diff changeset
48
22402
4caa7b28d183 maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents: 22323
diff changeset
49 typedef void (*liboctave_error_with_id_handler) (const char *, const char *,
4caa7b28d183 maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents: 22323
diff changeset
50 ...);
10370
9c4daf174387 implement IDs for common liboctave exceptions
Jaroslav Hajek <highegg@gmail.com>
parents: 9933
diff changeset
51
3325
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 2847
diff changeset
52 typedef void (*liboctave_warning_handler) (const char *, ...);
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 2847
diff changeset
53
22402
4caa7b28d183 maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents: 22323
diff changeset
54 typedef void (*liboctave_warning_with_id_handler) (const char *, const char *,
4caa7b28d183 maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents: 22323
diff changeset
55 ...);
5781
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5307
diff changeset
56
3325
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 2847
diff changeset
57 /* Would be nice to make these pointers private, but we want to share
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 2847
diff changeset
58 them among all the liboctave classes. */
26569
0e77df67b522 Add static compile-time checking of printf functions in liboctave.
Markus Mützel <markus.muetzel@gmx.de>
parents: 26376
diff changeset
59 OCTAVE_FORMAT_PRINTF (1, 2)
22402
4caa7b28d183 maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents: 22323
diff changeset
60 OCTAVE_NORETURN OCTAVE_API extern liboctave_error_handler
4caa7b28d183 maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents: 22323
diff changeset
61 current_liboctave_error_handler;
2551
65e2cd433c7f [project @ 1996-11-20 23:08:48 by jwe]
jwe
parents:
diff changeset
62
26569
0e77df67b522 Add static compile-time checking of printf functions in liboctave.
Markus Mützel <markus.muetzel@gmx.de>
parents: 26376
diff changeset
63 OCTAVE_FORMAT_PRINTF (2, 3)
22402
4caa7b28d183 maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents: 22323
diff changeset
64 OCTAVE_NORETURN OCTAVE_API extern liboctave_error_with_id_handler
4caa7b28d183 maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents: 22323
diff changeset
65 current_liboctave_error_with_id_handler;
10370
9c4daf174387 implement IDs for common liboctave exceptions
Jaroslav Hajek <highegg@gmail.com>
parents: 9933
diff changeset
66
26569
0e77df67b522 Add static compile-time checking of printf functions in liboctave.
Markus Mützel <markus.muetzel@gmx.de>
parents: 26376
diff changeset
67 OCTAVE_FORMAT_PRINTF (1, 2)
21227
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21040
diff changeset
68 OCTAVE_API extern liboctave_warning_handler current_liboctave_warning_handler;
3325
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 2847
diff changeset
69
26569
0e77df67b522 Add static compile-time checking of printf functions in liboctave.
Markus Mützel <markus.muetzel@gmx.de>
parents: 26376
diff changeset
70 OCTAVE_FORMAT_PRINTF (2, 3)
22402
4caa7b28d183 maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents: 22323
diff changeset
71 OCTAVE_API extern liboctave_warning_with_id_handler
4caa7b28d183 maint: Style check C++ code in liboctave/
Rik <rik@octave.org>
parents: 22323
diff changeset
72 current_liboctave_warning_with_id_handler;
5781
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5307
diff changeset
73
21227
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21040
diff changeset
74 OCTAVE_API extern void
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21040
diff changeset
75 set_liboctave_error_handler (OCTAVE_NORETURN liboctave_error_handler f);
2551
65e2cd433c7f [project @ 1996-11-20 23:08:48 by jwe]
jwe
parents:
diff changeset
76
21227
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21040
diff changeset
77 OCTAVE_API extern void
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21040
diff changeset
78 set_liboctave_error_with_id_handler (OCTAVE_NORETURN liboctave_error_with_id_handler f);
10370
9c4daf174387 implement IDs for common liboctave exceptions
Jaroslav Hajek <highegg@gmail.com>
parents: 9933
diff changeset
79
21227
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21040
diff changeset
80 OCTAVE_API extern void
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21040
diff changeset
81 set_liboctave_warning_handler (liboctave_warning_handler f);
3325
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 2847
diff changeset
82
21227
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21040
diff changeset
83 OCTAVE_API extern void
25150962bfd3 eliminate CRUFT_API macro
John W. Eaton <jwe@octave.org>
parents: 21040
diff changeset
84 set_liboctave_warning_with_id_handler (liboctave_warning_with_id_handler f);
5781
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5307
diff changeset
85
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
86 #if defined (__cplusplus)
2551
65e2cd433c7f [project @ 1996-11-20 23:08:48 by jwe]
jwe
parents:
diff changeset
87 }
65e2cd433c7f [project @ 1996-11-20 23:08:48 by jwe]
jwe
parents:
diff changeset
88 #endif
65e2cd433c7f [project @ 1996-11-20 23:08:48 by jwe]
jwe
parents:
diff changeset
89
65e2cd433c7f [project @ 1996-11-20 23:08:48 by jwe]
jwe
parents:
diff changeset
90 #endif