annotate libinterp/corefcn/oct-errno.in.cc @ 31231:a026fb2be108

sparse-xpow.cc: Return empty matrix for empty input (bug #63080)
author Arun Giridhar <arungiridhar@gmail.com>
date Mon, 19 Sep 2022 07:05:31 -0400
parents 83f9f8bda883
children aac27ad79be6
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 // %NO_EDIT_WARNING%
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
2
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
3 ////////////////////////////////////////////////////////////////////////
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
4 //
30564
796f54d4ddbf update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 30151
diff changeset
5 // Copyright (C) 2005-2022 The Octave Project Developers
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
7 // 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
8 // distribution or <https://octave.org/copyright/>.
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 // This file is part of Octave.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
11 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
12 // 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
13 // 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
14 // 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
15 // (at your option) any later version.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
16 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
17 // 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
18 // 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
19 // 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
20 // GNU General Public License for more details.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
21 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
22 // 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
23 // 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
24 // <https://www.gnu.org/licenses/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
25 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
26 ////////////////////////////////////////////////////////////////////////
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
27
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21301
diff changeset
28 #if defined (HAVE_CONFIG_H)
21301
40de9f8f23a6 Use '#include "config.h"' rather than <config.h>.
Rik <rik@octave.org>
parents: 21200
diff changeset
29 # include "config.h"
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
30 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
31
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
32 #include <cerrno>
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
33
13992
e1f76bfe0452 apply singleton_cleanup to a few more classes
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
34 #include "singleton-cleanup.h"
e1f76bfe0452 apply singleton_cleanup to a few more classes
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
35
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
36 #include "oct-errno.h"
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
37 #include "oct-map.h"
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
38 #include "error.h"
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
39
30151
b7727b8533d8 maint: use "m_" prefix for member variables in class octave_errno.
Rik <rik@octave.org>
parents: 29358
diff changeset
40 octave_errno *octave_errno::s_instance = nullptr;
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
41
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
42 octave_errno::octave_errno (void)
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
43 {
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
44 struct errno_struct
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
45 {
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
46 const char *name;
5890
078f5b203e92 [project @ 2006-07-15 13:00:42 by jwe]
jwe
parents: 5494
diff changeset
47 int value;
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
48 };
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
49
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
50 static errno_struct errno_codes[] =
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
51 {
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
52 // POSIX.
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
53
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
54 #if defined (E2BIG)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
55 { "E2BIG", E2BIG },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
56 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
57 #if defined (EACCES)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
58 { "EACCES", EACCES },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
59 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
60 #if defined (EADDRINUSE)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
61 { "EADDRINUSE", EADDRINUSE },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
62 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
63 #if defined (EADDRNOTAVAIL)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
64 { "EADDRNOTAVAIL", EADDRNOTAVAIL },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
65 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
66 #if defined (EAFNOSUPPORT)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
67 { "EAFNOSUPPORT", EAFNOSUPPORT },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
68 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
69 #if defined (EAGAIN)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
70 { "EAGAIN", EAGAIN },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
71 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
72 #if defined (EALREADY)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
73 { "EALREADY", EALREADY },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
74 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
75 #if defined (EBADF)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
76 { "EBADF", EBADF },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
77 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
78 #if defined (EBUSY)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
79 { "EBUSY", EBUSY },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
80 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
81 #if defined (ECHILD)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
82 { "ECHILD", ECHILD },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
83 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
84 #if defined (ECONNABORTED)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
85 { "ECONNABORTED", ECONNABORTED },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
86 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
87 #if defined (ECONNREFUSED)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
88 { "ECONNREFUSED", ECONNREFUSED },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
89 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
90 #if defined (ECONNRESET)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
91 { "ECONNRESET", ECONNRESET },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
92 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
93 #if defined (EDEADLK)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
94 { "EDEADLK", EDEADLK },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
95 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
96 #if defined (EDESTADDRREQ)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
97 { "EDESTADDRREQ", EDESTADDRREQ },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
98 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
99 #if defined (EDOM)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
100 { "EDOM", EDOM },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
101 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
102 #if defined (EDQUOT)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
103 { "EDQUOT", EDQUOT },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
104 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
105 #if defined (EEXIST)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
106 { "EEXIST", EEXIST },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
107 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
108 #if defined (EFAULT)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
109 { "EFAULT", EFAULT },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
110 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
111 #if defined (EFBIG)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
112 { "EFBIG", EFBIG },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
113 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
114 #if defined (EHOSTDOWN)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
115 { "EHOSTDOWN", EHOSTDOWN },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
116 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
117 #if defined (EHOSTUNREACH)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
118 { "EHOSTUNREACH", EHOSTUNREACH },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
119 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
120 #if defined (EINPROGRESS)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
121 { "EINPROGRESS", EINPROGRESS },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
122 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
123 #if defined (EINTR)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
124 { "EINTR", EINTR },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
125 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
126 #if defined (EINVAL)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
127 { "EINVAL", EINVAL },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
128 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
129 #if defined (EIO)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
130 { "EIO", EIO },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
131 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
132 #if defined (EISCONN)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
133 { "EISCONN", EISCONN },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
134 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
135 #if defined (EISDIR)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
136 { "EISDIR", EISDIR },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
137 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
138 #if defined (ELOOP)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
139 { "ELOOP", ELOOP },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
140 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
141 #if defined (EMFILE)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
142 { "EMFILE", EMFILE },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
143 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
144 #if defined (EMLINK)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
145 { "EMLINK", EMLINK },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
146 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
147 #if defined (EMSGSIZE)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
148 { "EMSGSIZE", EMSGSIZE },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
149 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
150 #if defined (ENAMETOOLONG)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
151 { "ENAMETOOLONG", ENAMETOOLONG },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
152 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
153 #if defined (ENETDOWN)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
154 { "ENETDOWN", ENETDOWN },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
155 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
156 #if defined (ENETRESET)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
157 { "ENETRESET", ENETRESET },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
158 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
159 #if defined (ENETUNREACH)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
160 { "ENETUNREACH", ENETUNREACH },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
161 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
162 #if defined (ENFILE)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
163 { "ENFILE", ENFILE },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
164 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
165 #if defined (ENOBUFS)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
166 { "ENOBUFS", ENOBUFS },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
167 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
168 #if defined (ENODEV)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
169 { "ENODEV", ENODEV },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
170 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
171 #if defined (ENOENT)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
172 { "ENOENT", ENOENT },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
173 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
174 #if defined (ENOEXEC)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
175 { "ENOEXEC", ENOEXEC },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
176 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
177 #if defined (ENOLCK)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
178 { "ENOLCK", ENOLCK },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
179 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
180 #if defined (ENOMEM)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
181 { "ENOMEM", ENOMEM },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
182 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
183 #if defined (ENOPROTOOPT)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
184 { "ENOPROTOOPT", ENOPROTOOPT },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
185 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
186 #if defined (ENOSPC)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
187 { "ENOSPC", ENOSPC },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
188 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
189 #if defined (ENOSYS)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
190 { "ENOSYS", ENOSYS },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
191 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
192 #if defined (ENOTBLK)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
193 { "ENOTBLK", ENOTBLK },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
194 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
195 #if defined (ENOTCONN)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
196 { "ENOTCONN", ENOTCONN },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
197 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
198 #if defined (ENOTDIR)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
199 { "ENOTDIR", ENOTDIR },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
200 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
201 #if defined (ENOTEMPTY)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
202 { "ENOTEMPTY", ENOTEMPTY },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
203 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
204 #if defined (ENOTSOCK)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
205 { "ENOTSOCK", ENOTSOCK },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
206 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
207 #if defined (ENOTTY)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
208 { "ENOTTY", ENOTTY },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
209 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
210 #if defined (ENXIO)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
211 { "ENXIO", ENXIO },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
212 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
213 #if defined (EOPNOTSUPP)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
214 { "EOPNOTSUPP", EOPNOTSUPP },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
215 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
216 #if defined (EPERM)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
217 { "EPERM", EPERM },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
218 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
219 #if defined (EPFNOSUPPORT)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
220 { "EPFNOSUPPORT", EPFNOSUPPORT },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
221 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
222 #if defined (EPIPE)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
223 { "EPIPE", EPIPE },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
224 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
225 #if defined (EPROTONOSUPPORT)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
226 { "EPROTONOSUPPORT", EPROTONOSUPPORT },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
227 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
228 #if defined (EPROTOTYPE)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
229 { "EPROTOTYPE", EPROTOTYPE },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
230 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
231 #if defined (ERANGE)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
232 { "ERANGE", ERANGE },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
233 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
234 #if defined (EREMOTE)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
235 { "EREMOTE", EREMOTE },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
236 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
237 #if defined (ERESTART)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
238 { "ERESTART", ERESTART },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
239 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
240 #if defined (EROFS)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
241 { "EROFS", EROFS },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
242 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
243 #if defined (ESHUTDOWN)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
244 { "ESHUTDOWN", ESHUTDOWN },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
245 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
246 #if defined (ESOCKTNOSUPPORT)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
247 { "ESOCKTNOSUPPORT", ESOCKTNOSUPPORT },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
248 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
249 #if defined (ESPIPE)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
250 { "ESPIPE", ESPIPE },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
251 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
252 #if defined (ESRCH)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
253 { "ESRCH", ESRCH },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
254 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
255 #if defined (ESTALE)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
256 { "ESTALE", ESTALE },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
257 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
258 #if defined (ETIMEDOUT)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
259 { "ETIMEDOUT", ETIMEDOUT },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
260 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
261 #if defined (ETOOMANYREFS)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
262 { "ETOOMANYREFS", ETOOMANYREFS },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
263 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
264 #if defined (ETXTBSY)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
265 { "ETXTBSY", ETXTBSY },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
266 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
267 #if defined (EUSERS)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
268 { "EUSERS", EUSERS },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
269 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
270 #if defined (EWOULDBLOCK)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
271 { "EWOULDBLOCK", EWOULDBLOCK },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
272 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
273 #if defined (EXDEV)
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
274 { "EXDEV", EXDEV },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
275 #endif
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
276
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
277 // Others (duplicates are OK).
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
278
5494
73a87a677257 [project @ 2005-10-14 07:29:20 by jwe]
jwe
parents: 5465
diff changeset
279 @SYSDEP_ERRNO_LIST@
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
280
23798
771310737137 Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents: 23722
diff changeset
281 { nullptr, 0 },
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
282 };
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
283
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
284 // Stuff them all in a map for fast access.
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
285
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
286 errno_struct *ptr = errno_codes;
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
287
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
288 while (ptr->name)
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
289 {
30151
b7727b8533d8 maint: use "m_" prefix for member variables in class octave_errno.
Rik <rik@octave.org>
parents: 29358
diff changeset
290 m_errno_tbl[ptr->name] = ptr->value;
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
291 ptr++;
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
292 }
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
293 }
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
294
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
295 bool
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
296 octave_errno::instance_ok (void)
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
297 {
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
298 bool retval = true;
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
299
30151
b7727b8533d8 maint: use "m_" prefix for member variables in class octave_errno.
Rik <rik@octave.org>
parents: 29358
diff changeset
300 if (! s_instance)
13992
e1f76bfe0452 apply singleton_cleanup to a few more classes
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
301 {
30151
b7727b8533d8 maint: use "m_" prefix for member variables in class octave_errno.
Rik <rik@octave.org>
parents: 29358
diff changeset
302 s_instance = new octave_errno ();
26369
0249ba4c9589 Fix static analyzer detected V668 issues (bug #55347).
Andreas Weber <octave@josoansi.de>
parents: 25054
diff changeset
303 singleton_cleanup_list::add (cleanup_instance);
13992
e1f76bfe0452 apply singleton_cleanup to a few more classes
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
304 }
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
305
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
306 return retval;
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
307 }
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
308
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
309 int
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
310 octave_errno::lookup (const std::string& name)
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
311 {
30151
b7727b8533d8 maint: use "m_" prefix for member variables in class octave_errno.
Rik <rik@octave.org>
parents: 29358
diff changeset
312 return (instance_ok ()) ? s_instance->do_lookup (name) : -1;
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
313 }
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
314
11063
e378c0176a38 oct-errno.cc.in: use octve_scalar_map instead of Octave_map
John W. Eaton <jwe@octave.org>
parents: 10161
diff changeset
315 octave_scalar_map
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
316 octave_errno::list (void)
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
317 {
30151
b7727b8533d8 maint: use "m_" prefix for member variables in class octave_errno.
Rik <rik@octave.org>
parents: 29358
diff changeset
318 return (instance_ok ()) ? s_instance->do_list () : octave_scalar_map ();
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
319 }
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
320
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
321 int
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
322 octave_errno::do_lookup (const std::string& name)
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
323 {
30346
91c6288781ba maint: Shorten some long lines in libinterp to <= 80 characters (bug #57599)
Rik <rik@octave.org>
parents: 30151
diff changeset
324 return (m_errno_tbl.find (name) != m_errno_tbl.end ()) ? m_errno_tbl[name]
91c6288781ba maint: Shorten some long lines in libinterp to <= 80 characters (bug #57599)
Rik <rik@octave.org>
parents: 30151
diff changeset
325 : -1;
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
326 }
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
327
11063
e378c0176a38 oct-errno.cc.in: use octve_scalar_map instead of Octave_map
John W. Eaton <jwe@octave.org>
parents: 10161
diff changeset
328 octave_scalar_map
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
329 octave_errno::do_list (void)
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
330 {
11063
e378c0176a38 oct-errno.cc.in: use octve_scalar_map instead of Octave_map
John W. Eaton <jwe@octave.org>
parents: 10161
diff changeset
331 octave_scalar_map retval;
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
332
30151
b7727b8533d8 maint: use "m_" prefix for member variables in class octave_errno.
Rik <rik@octave.org>
parents: 29358
diff changeset
333 for (const auto& p : m_errno_tbl)
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
334 {
22862
e365e87371a3 maint: Use C++ range feature to simplify some for loops in libinterp/corefcn.
Rik <rik@octave.org>
parents: 22755
diff changeset
335 retval.assign (p.first, p.second);
5465
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
336 }
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
337
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
338 return retval;
d6163c0effd5 [project @ 2005-09-23 15:42:48 by jwe]
jwe
parents:
diff changeset
339 }