Mercurial > hg > octave-lyh
annotate libinterp/interp-core/oct-errno.h @ 15195:2fc554ffbc28
split libinterp from src
* libinterp: New directory. Move all files from src directory here
except Makefile.am, main.cc, main-cli.cc, mkoctfile.in.cc,
mkoctfilr.in.sh, octave-config.in.cc, octave-config.in.sh.
* libinterp/Makefile.am: New file, extracted from src/Makefile.am.
* src/Makefile.am: Delete everything except targets and definitions
needed to build and link main and utility programs.
* Makefile.am (SUBDIRS): Include libinterp in the list.
* autogen.sh: Run config-module.sh in libinterp/dldfcn directory, not
src/dldfcn directory.
* configure.ac (AC_CONFIG_SRCDIR): Use libinterp/octave.cc, not
src/octave.cc.
(DL_LDFLAGS, LIBOCTINTERP): Use libinterp, not src.
(AC_CONFIG_FILES): Include libinterp/Makefile in the list.
* find-docstring-files.sh: Look in libinterp, not src.
* gui/src/Makefile.am (liboctgui_la_CPPFLAGS): Find header files in
libinterp, not src.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 18 Aug 2012 16:23:39 -0400 |
parents | src/interp-core/oct-errno.h@909a2797935b |
children |
rev | line source |
---|---|
5465 | 1 // oct-errno.h.in |
2 /* | |
3 | |
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
13992
diff
changeset
|
4 Copyright (C) 2005-2012 John W. Eaton |
5465 | 5 |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
5465 | 12 |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
5465 | 21 |
22 */ | |
23 | |
24 #if !defined (octave_errno_h) | |
25 #define octave_errno_h 1 | |
26 | |
8020
1d2bcc163c4d
oct-errno.h: include <cerrno>
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
27 #include <cerrno> |
5465 | 28 #include <map> |
29 #include <string> | |
30 | |
31 #include "oct-map.h" | |
32 | |
33 class | |
34 octave_errno | |
35 { | |
36 protected: | |
37 | |
38 octave_errno (void); | |
39 | |
40 public: | |
41 | |
42 ~octave_errno (void) { } | |
43 | |
44 static bool instance_ok (void); | |
45 | |
13992
e1f76bfe0452
apply singleton_cleanup to a few more classes
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
46 static void cleanup_instance (void) { delete instance; instance = 0; } |
e1f76bfe0452
apply singleton_cleanup to a few more classes
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
47 |
5465 | 48 static int lookup (const std::string& name); |
49 | |
11057
4d9f310b32bb
replace Octave_map->octave_map in oct-errno
Jaroslav Hajek <highegg@gmail.com>
parents:
10160
diff
changeset
|
50 static octave_scalar_map list (void); |
5465 | 51 |
52 static int get (void) { return errno; } | |
53 | |
54 static int set (int val) | |
55 { | |
56 int retval = errno; | |
57 errno = val; | |
58 return retval; | |
59 } | |
60 | |
61 private: | |
62 | |
63 std::map<std::string, int> errno_tbl; | |
64 | |
65 static octave_errno *instance; | |
66 | |
67 int do_lookup (const std::string& name); | |
68 | |
11057
4d9f310b32bb
replace Octave_map->octave_map in oct-errno
Jaroslav Hajek <highegg@gmail.com>
parents:
10160
diff
changeset
|
69 octave_scalar_map do_list (void); |
5465 | 70 }; |
71 | |
72 #endif |