Mercurial > hg > octave-nkf
annotate liboctave/system/mach-info.h @ 20195:4840fc43f0b5
octave-config: add EXEEXT and SHLEXT variables to -p
* build-aux/common.mk
(do_subst_default_vals) Add OCTAVE_EXEEXT and OCTAVE_SHLEXT
* src/octave-config.in.cc
(help_msg): add string EXEEXT, SHLEXT to help string
(initialize): initialize variables for EXEEXT, SHLEXT
author | John Donoghue |
---|---|
date | Wed, 25 Mar 2015 12:25:23 -0400 |
parents | 4197fc428c7d |
children |
rev | line source |
---|---|
1960 | 1 /* |
2 | |
19898
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
17769
diff
changeset
|
3 Copyright (C) 1996-2015 John W. Eaton |
1960 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
1960 | 11 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
1960 | 20 |
21 */ | |
22 | |
2317 | 23 #if !defined (octave_mach_info_h) |
24 #define octave_mach_info_h 1 | |
25 | |
26 #include <string> | |
27 | |
28 class | |
6108 | 29 OCTAVE_API |
2317 | 30 oct_mach_info |
31 { | |
2926 | 32 protected: |
33 | |
34 oct_mach_info (void); | |
35 | |
2317 | 36 public: |
37 | |
38 enum float_format | |
17769
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
39 { |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
40 flt_fmt_unknown, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
41 flt_fmt_ieee_little_endian, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
42 flt_fmt_ieee_big_endian, |
49a5a4be04a1
maint: Use GNU style coding conventions for code in liboctave/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
43 }; |
2317 | 44 |
2926 | 45 static bool instance_ok (void); |
2317 | 46 |
47 static float_format native_float_format (void); | |
48 | |
49 static bool words_big_endian (void); | |
1960 | 50 |
2317 | 51 static bool words_little_endian (void); |
52 | |
3504 | 53 static float_format string_to_float_format (const std::string&); |
2317 | 54 |
3504 | 55 static std::string float_format_as_string (float_format); |
2317 | 56 |
57 private: | |
58 | |
59 static oct_mach_info *instance; | |
60 | |
13983
7dd7cccf0757
clean up memory allocated for singletons before exit
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
61 static void cleanup_instance (void) { delete instance; instance = 0; } |
7dd7cccf0757
clean up memory allocated for singletons before exit
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
62 |
2317 | 63 // The floating point format for the current machine. |
2926 | 64 mutable float_format native_float_fmt; |
1960 | 65 |
2317 | 66 // TRUE if the byte order on this system is big endian. |
2926 | 67 mutable bool big_chief; |
2317 | 68 |
69 // No copying! | |
70 | |
71 oct_mach_info (const oct_mach_info&); | |
72 | |
73 oct_mach_info& operator = (const oct_mach_info&); | |
74 }; | |
1960 | 75 |
76 #endif |