annotate libinterp/corefcn/toplev.cc @ 22264:9b78fda78300

fix build failure for --without-z (bug #48757) * liboctave/wrappers/async-system-wrapper.h, liboctave/wrappers/async-system-wrapper.c: New files for function extracted from Fsystem. * liboctave/wrappers/module.mk: Update. * toplev.cc: Include async-system-wrapper.h. (Fsystem): Use new octave_async_system_wrapper for async case. * oct-procbuf.cc: Include unistd.h, reluctantly. Use HAVE_UNISTD_H instead of HAVE_SYS_WAIT_H for conditional code.
author John W. Eaton <jwe@octave.org>
date Thu, 11 Aug 2016 12:33:26 -0400
parents 9203833cab7d
children bac0d6f07a3e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
1 /*
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
2
19697
4197fc428c7d maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents: 19625
diff changeset
3 Copyright (C) 1995-2015 John W. Eaton
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
4
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
6
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7013
diff changeset
9 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7013
diff changeset
10 option) any later version.
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
11
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
15 for more details.
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
16
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7013
diff changeset
18 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7013
diff changeset
19 <http://www.gnu.org/licenses/>.
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
20
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
21 */
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
22
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21618
diff changeset
23 #if defined (HAVE_CONFIG_H)
21301
40de9f8f23a6 Use '#include "config.h"' rather than <config.h>.
Rik <rik@octave.org>
parents: 21253
diff changeset
24 # include "config.h"
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
25 #endif
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
26
4489
a90c3cbded0d [project @ 2003-08-28 16:08:26 by jwe]
jwe
parents: 4440
diff changeset
27 #include <cerrno>
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
28 #include <cstdlib>
4221
a7d8e5dd87ad [project @ 2002-12-06 22:34:47 by jwe]
jwe
parents: 4217
diff changeset
29 #include <new>
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
30
5765
7ba9ad1fec11 [project @ 2006-04-17 05:05:15 by jwe]
jwe
parents: 5744
diff changeset
31 #include <sstream>
1728
42b4f904f1af [project @ 1996-01-09 11:36:01 by jwe]
jwe
parents: 1704
diff changeset
32 #include <string>
42b4f904f1af [project @ 1996-01-09 11:36:01 by jwe]
jwe
parents: 1704
diff changeset
33
21979
d04da18a407a use OCTAVE_USE_WINDOWS_API more consistently
John W. Eaton <jwe@octave.org>
parents: 21966
diff changeset
34 #if defined (OCTAVE_USE_WINDOWS_API)
21949
baeffde5c87d fix build for Windows systems
John W. Eaton <jwe@octave.org>
parents: 21942
diff changeset
35 # define WIN32_LEAN_AND_MEAN 1
baeffde5c87d fix build for Windows systems
John W. Eaton <jwe@octave.org>
parents: 21942
diff changeset
36 # include <windows.h>
baeffde5c87d fix build for Windows systems
John W. Eaton <jwe@octave.org>
parents: 21942
diff changeset
37 #endif
baeffde5c87d fix build for Windows systems
John W. Eaton <jwe@octave.org>
parents: 21942
diff changeset
38
22264
9b78fda78300 fix build failure for --without-z (bug #48757)
John W. Eaton <jwe@octave.org>
parents: 22094
diff changeset
39 #include "async-system-wrapper.h"
22094
9203833cab7d move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents: 22091
diff changeset
40 #include "child-list.h"
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
41 #include "lo-error.h"
21600
184b85b31e03 more updates for version function
mmuetzel <markus.muetzel@gmx.de>
parents: 21598
diff changeset
42 #include "oct-fftw.h"
13983
7dd7cccf0757 clean up memory allocated for singletons before exit
John W. Eaton <jwe@octave.org>
parents: 13981
diff changeset
43 #include "oct-locbuf.h"
21921
ecfcc8527661 hide sys/wait.h header and provide wrappers for waitpid macros
John W. Eaton <jwe@octave.org>
parents: 21907
diff changeset
44 #include "oct-syscalls.h"
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1751
diff changeset
45 #include "str-vec.h"
21899
7c053ad1c7ba hide sys/select header
John W. Eaton <jwe@octave.org>
parents: 21855
diff changeset
46 #include "wait-for-input.h"
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
47
21220
d78e45987d6a rename octave::build_env namespace from octave::config
John W. Eaton <jwe@octave.org>
parents: 21200
diff changeset
48 #include "build-env.h"
21607
37f6ed8a6f1b store liboctave and liboctinterp hg ids separately
John W. Eaton <jwe@octave.org>
parents: 21605
diff changeset
49 #include "liboctinterp-build-info.h"
22091
0f6fc2ec3b1a move call_stack class to a separate file
John W. Eaton <jwe@octave.org>
parents: 22089
diff changeset
50 #include "call-stack.h"
13983
7dd7cccf0757 clean up memory allocated for singletons before exit
John W. Eaton <jwe@octave.org>
parents: 13981
diff changeset
51 #include "defaults.h"
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
52 #include "defun.h"
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
53 #include "error.h"
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
54 #include "file-io.h"
22089
c2c668b3051b use classes for octave application and interpreter
John W. Eaton <jwe@octave.org>
parents: 22051
diff changeset
55 #include "octave.h"
2162
a940dcdfe9de [project @ 1996-05-13 10:31:51 by jwe]
jwe
parents: 2145
diff changeset
56 #include "oct-map.h"
20940
48b2ad5ee801 maint: Rename oct-obj.[cc|h] to ovl.[cc|h] for clarity.
Rik <rik@octave.org>
parents: 20939
diff changeset
57 #include "ovl.h"
13983
7dd7cccf0757 clean up memory allocated for singletons before exit
John W. Eaton <jwe@octave.org>
parents: 13981
diff changeset
58 #include "ov.h"
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
59 #include "pager.h"
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
60 #include "procstream.h"
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
61 #include "sysdep.h"
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
62 #include "unwind-prot.h"
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
63 #include "utils.h"
22094
9203833cab7d move new interpreter class to separate file
John W. Eaton <jwe@octave.org>
parents: 22091
diff changeset
64 #include <version.h>
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
65
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21618
diff changeset
66 #if ! defined (SHELL_PATH)
21200
fcac5dbbf9ed maint: Indent #ifdef blocks in libinterp.
Rik <rik@octave.org>
parents: 21182
diff changeset
67 # define SHELL_PATH "/bin/sh"
15756
ea1a1fb00744 Make the path to the shell interpreter configuable
Mike Miller <mtmiller@ieee.org>
parents: 15596
diff changeset
68 #endif
ea1a1fb00744 Make the path to the shell interpreter configuable
Mike Miller <mtmiller@ieee.org>
parents: 15596
diff changeset
69
1957
0e6a0a271998 [project @ 1996-02-15 01:08:15 by jwe]
jwe
parents: 1907
diff changeset
70 DEFUN (warranty, , ,
21966
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
71 doc: /* -*- texinfo -*-
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
72 @deftypefn {} {} warranty ()
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
73 Describe the conditions for copying and distributing Octave.
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
74 @end deftypefn */)
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
75 {
17510
7542f4496974 eliminate some macros in version.h
John W. Eaton <jwe@octave.org>
parents: 17281
diff changeset
76 octave_stdout << "\n" << octave_name_version_and_copyright () << "\n\
3922
38c61cbf086c [project @ 2002-05-01 06:48:35 by jwe]
jwe
parents: 3892
diff changeset
77 \n\
19604
7005044f3080 Correct missing word in output of warranty().
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 17821
diff changeset
78 GNU Octave is free software; you can redistribute it and/or modify\n\
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
79 it under the terms of the GNU General Public License as published by\n\
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7013
diff changeset
80 the Free Software Foundation; either version 3 of the License, or\n\
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
81 (at your option) any later version.\n\
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
82 \n\
11104
2c356a35d7f5 fix copyright notices
John W. Eaton <jwe@octave.org>
parents: 11066
diff changeset
83 GNU Octave is distributed in the hope that it will be useful,\n\
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
84 but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
85 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
86 GNU General Public License for more details.\n\
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
87 \n\
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
88 You should have received a copy of the GNU General Public License\n\
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7013
diff changeset
89 along with this program. If not, see <http://www.gnu.org/licenses/>.\n\
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
90 \n";
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
91
21078
49852ff04747 maint: Remove unnecessary declarations of retval.
Rik <rik@octave.org>
parents: 21055
diff changeset
92 return ovl ();
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
93 }
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
94
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
95 // Execute a shell command.
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
96
2086
bfb775fb6fe8 [project @ 1996-04-25 05:55:19 by jwe]
jwe
parents: 2084
diff changeset
97 static octave_value_list
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
98 run_command_and_return_output (const std::string& cmd_str)
2083
679d7262a525 [project @ 1996-04-25 04:29:27 by jwe]
jwe
parents: 2078
diff changeset
99 {
2086
bfb775fb6fe8 [project @ 1996-04-25 05:55:19 by jwe]
jwe
parents: 2084
diff changeset
100 octave_value_list retval;
21743
f4d7d0eb5b0c use namespace for unwind_protect class
John W. Eaton <jwe@octave.org>
parents: 21739
diff changeset
101 octave::unwind_protect frame;
2083
679d7262a525 [project @ 1996-04-25 04:29:27 by jwe]
jwe
parents: 2078
diff changeset
102
679d7262a525 [project @ 1996-04-25 04:29:27 by jwe]
jwe
parents: 2078
diff changeset
103 iprocstream *cmd = new iprocstream (cmd_str.c_str ());
679d7262a525 [project @ 1996-04-25 04:29:27 by jwe]
jwe
parents: 2078
diff changeset
104
10212
56f7734f5448 fix process creation failure handling in system()
Jaroslav Hajek <highegg@gmail.com>
parents: 10186
diff changeset
105 frame.add_delete (cmd);
22049
ccf50f029999 move octave_child_list to separate file and define inside namespace
John W. Eaton <jwe@octave.org>
parents: 22022
diff changeset
106 frame.add_fcn (octave::child_list::remove, cmd->pid ());
3060
9c6cd52f3f5a [project @ 1997-06-25 18:30:40 by jwe]
jwe
parents: 3020
diff changeset
107
20962
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
108 if (! *cmd)
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
109 error ("system: unable to start subprocess for '%s'", cmd_str.c_str ());
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
110
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
111 int fid = cmd->file_number ();
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
112
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
113 std::ostringstream output_buf;
2095
36903d507b0e [project @ 1996-04-28 09:00:07 by jwe]
jwe
parents: 2086
diff changeset
114
20962
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
115 char ch;
4494
93ad80b6eef6 [project @ 2003-09-03 20:27:00 by jwe]
jwe
parents: 4489
diff changeset
116
20962
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
117 for (;;)
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
118 {
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
119 if (cmd->get (ch))
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
120 output_buf.put (ch);
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
121 else
10212
56f7734f5448 fix process creation failure handling in system()
Jaroslav Hajek <highegg@gmail.com>
parents: 10186
diff changeset
122 {
20962
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
123 if (! cmd->eof () && errno == EAGAIN)
10212
56f7734f5448 fix process creation failure handling in system()
Jaroslav Hajek <highegg@gmail.com>
parents: 10186
diff changeset
124 {
20962
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
125 cmd->clear ();
3147
894d516b4a00 [project @ 1998-02-06 06:00:08 by jwe]
jwe
parents: 3141
diff changeset
126
21899
7c053ad1c7ba hide sys/select header
John W. Eaton <jwe@octave.org>
parents: 21855
diff changeset
127 if (octave_wait_for_input (fid) != 1)
10212
56f7734f5448 fix process creation failure handling in system()
Jaroslav Hajek <highegg@gmail.com>
parents: 10186
diff changeset
128 break;
56f7734f5448 fix process creation failure handling in system()
Jaroslav Hajek <highegg@gmail.com>
parents: 10186
diff changeset
129 }
20962
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
130 else
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
131 break;
10212
56f7734f5448 fix process creation failure handling in system()
Jaroslav Hajek <highegg@gmail.com>
parents: 10186
diff changeset
132 }
20962
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
133 }
3147
894d516b4a00 [project @ 1998-02-06 06:00:08 by jwe]
jwe
parents: 3141
diff changeset
134
20962
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
135 int cmd_status = cmd->close ();
2083
679d7262a525 [project @ 1996-04-25 04:29:27 by jwe]
jwe
parents: 2078
diff changeset
136
21921
ecfcc8527661 hide sys/wait.h header and provide wrappers for waitpid macros
John W. Eaton <jwe@octave.org>
parents: 21907
diff changeset
137 if (octave::sys::wifexited (cmd_status))
ecfcc8527661 hide sys/wait.h header and provide wrappers for waitpid macros
John W. Eaton <jwe@octave.org>
parents: 21907
diff changeset
138 cmd_status = octave::sys::wexitstatus (cmd_status);
20962
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
139 else
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
140 cmd_status = 127;
2083
679d7262a525 [project @ 1996-04-25 04:29:27 by jwe]
jwe
parents: 2078
diff changeset
141
20962
3aa293be0e8d maint: Invert simple conditionals in if/else/error paradigm.
Rik <rik@octave.org>
parents: 20946
diff changeset
142 retval = ovl (cmd_status, output_buf.str ());
2083
679d7262a525 [project @ 1996-04-25 04:29:27 by jwe]
jwe
parents: 2078
diff changeset
143
679d7262a525 [project @ 1996-04-25 04:29:27 by jwe]
jwe
parents: 2078
diff changeset
144 return retval;
679d7262a525 [project @ 1996-04-25 04:29:27 by jwe]
jwe
parents: 2078
diff changeset
145 }
679d7262a525 [project @ 1996-04-25 04:29:27 by jwe]
jwe
parents: 2078
diff changeset
146
5285
fe5ee25a5e6c [project @ 2005-04-19 15:02:49 by jwe]
jwe
parents: 5275
diff changeset
147 enum system_exec_type { et_sync, et_async };
fe5ee25a5e6c [project @ 2005-04-19 15:02:49 by jwe]
jwe
parents: 5275
diff changeset
148
1957
0e6a0a271998 [project @ 1996-02-15 01:08:15 by jwe]
jwe
parents: 1907
diff changeset
149 DEFUN (system, args, nargout,
21966
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
150 doc: /* -*- texinfo -*-
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
151 @deftypefn {} {} system ("@var{string}")
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
152 @deftypefnx {} {} system ("@var{string}", @var{return_output})
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
153 @deftypefnx {} {} system ("@var{string}", @var{return_output}, @var{type})
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
154 @deftypefnx {} {[@var{status}, @var{output}] =} system (@dots{})
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
155 Execute a shell command specified by @var{string}.
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
156
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
157 If the optional argument @var{type} is @qcode{"async"}, the process is
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
158 started in the background and the process ID of the child process is
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
159 returned immediately. Otherwise, the child process is started and Octave
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
160 waits until it exits. If the @var{type} argument is omitted, it defaults to
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
161 the value @qcode{"sync"}.
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
162
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
163 If @var{system} is called with one or more output arguments, or if the
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
164 optional argument @var{return_output} is true and the subprocess is started
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
165 synchronously, then the output from the command is returned as a variable.
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
166 Otherwise, if the subprocess is executed synchronously, its output is sent
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
167 to the standard output. To send the output of a command executed with
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
168 @code{system} through the pager, use a command like
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
169
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
170 @example
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
171 @group
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
172 [~, text] = system ("cmd");
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
173 disp (text);
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
174 @end group
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
175 @end example
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
176
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
177 @noindent
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
178 or
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
179
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
180 @example
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
181 printf ("%s\n", nthargout (2, "system", "cmd"));
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
182 @end example
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
183
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
184 The @code{system} function can return two values. The first is the
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
185 exit status of the command and the second is any output from the
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
186 command that was written to the standard output stream. For example,
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
187
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
188 @example
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
189 [status, output] = system ("echo foo; exit 2");
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
190 @end example
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
191
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
192 @noindent
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
193 will set the variable @code{output} to the string @samp{foo}, and the
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
194 variable @code{status} to the integer @samp{2}.
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
195
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
196 For commands run asynchronously, @var{status} is the process id of the
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
197 command shell that is started to run the command.
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
198 @seealso{unix, dos}
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
199 @end deftypefn */)
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
200 {
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
201 int nargin = args.length ();
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
202
20799
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
203 if (nargin == 0 || nargin > 3)
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
204 print_usage ();
2083
679d7262a525 [project @ 1996-04-25 04:29:27 by jwe]
jwe
parents: 2078
diff changeset
205
20799
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
206 system_exec_type type = et_sync;
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
207 if (nargin == 3)
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
208 {
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
209 std::string type_str = args(2).xstring_value ("system: TYPE must be a string");
11123
fbec4b3be59f toplev.cc (Fsystem): allow optional return_output and type arguments to be specified independently
John W. Eaton <jwe@octave.org>
parents: 11104
diff changeset
210
20799
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
211 if (type_str == "sync")
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
212 type = et_sync;
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
213 else if (type_str == "async")
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
214 type = et_async;
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
215 else
20831
35241c4b696c eliminate return statements after calls to error
John W. Eaton <jwe@octave.org>
parents: 20799
diff changeset
216 error ("system: TYPE must be \"sync\" or \"async\"");
20799
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
217 }
11123
fbec4b3be59f toplev.cc (Fsystem): allow optional return_output and type arguments to be specified independently
John W. Eaton <jwe@octave.org>
parents: 11104
diff changeset
218
20939
b17fda023ca6 maint: Use new C++ archetype in more files.
Rik <rik@octave.org>
parents: 20923
diff changeset
219 octave_value_list retval;
b17fda023ca6 maint: Use new C++ archetype in more files.
Rik <rik@octave.org>
parents: 20923
diff changeset
220
b17fda023ca6 maint: Use new C++ archetype in more files.
Rik <rik@octave.org>
parents: 20923
diff changeset
221 // FIXME: Is this unwind_protect frame needed anymore (12/16/15)?
21743
f4d7d0eb5b0c use namespace for unwind_protect class
John W. Eaton <jwe@octave.org>
parents: 21739
diff changeset
222 octave::unwind_protect frame;
20939
b17fda023ca6 maint: Use new C++ archetype in more files.
Rik <rik@octave.org>
parents: 20923
diff changeset
223
b17fda023ca6 maint: Use new C++ archetype in more files.
Rik <rik@octave.org>
parents: 20923
diff changeset
224 bool return_output = (nargin == 1 && nargout > 1);
b17fda023ca6 maint: Use new C++ archetype in more files.
Rik <rik@octave.org>
parents: 20923
diff changeset
225
20799
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
226 if (nargin > 1)
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
227 {
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
228 try
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
229 {
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
230 return_output = args(1).is_true ();
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
231 }
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
232 catch (octave_execution_exception& e)
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
233 {
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
234 error (e, "system: RETURN_OUTPUT must be boolean value true or false");
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
235 }
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
236 }
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
237
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
238 if (return_output && type == et_async)
20831
35241c4b696c eliminate return statements after calls to error
John W. Eaton <jwe@octave.org>
parents: 20799
diff changeset
239 error ("system: can't return output from commands run asynchronously");
20799
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
240
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
241 std::string cmd_str = args(0).xstring_value ("system: first argument must be a string");
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
242
21979
d04da18a407a use OCTAVE_USE_WINDOWS_API more consistently
John W. Eaton <jwe@octave.org>
parents: 21966
diff changeset
243 #if defined (OCTAVE_USE_WINDOWS_API)
20799
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
244 // Work around weird double-quote handling on Windows systems.
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
245 if (type == et_sync)
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
246 cmd_str = "\"" + cmd_str + "\"";
7104
b26d0cd10a42 [project @ 2007-11-06 17:18:41 by jwe]
jwe
parents: 7017
diff changeset
247 #endif
b26d0cd10a42 [project @ 2007-11-06 17:18:41 by jwe]
jwe
parents: 7017
diff changeset
248
20799
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
249 if (type == et_async)
22264
9b78fda78300 fix build failure for --without-z (bug #48757)
John W. Eaton <jwe@octave.org>
parents: 22094
diff changeset
250 retval(0) = octave_async_system_wrapper (cmd_str.c_str ());
20799
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
251 else if (return_output)
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
252 retval = run_command_and_return_output (cmd_str);
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
253 else
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
254 {
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
255 int status = system (cmd_str.c_str ());
2321
dac9933079e6 [project @ 1996-07-15 21:08:05 by jwe]
jwe
parents: 2299
diff changeset
256
20799
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
257 // The value in status is as returned by waitpid. If
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
258 // the process exited normally, extract the actual exit
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
259 // status of the command. Otherwise, return 127 as a
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
260 // failure code.
20582
ba2b07c13913 use new string_value method to handle value extraction errors
John W. Eaton <jwe@octave.org>
parents: 20555
diff changeset
261
21921
ecfcc8527661 hide sys/wait.h header and provide wrappers for waitpid macros
John W. Eaton <jwe@octave.org>
parents: 21907
diff changeset
262 if (octave::sys::wifexited (status))
ecfcc8527661 hide sys/wait.h header and provide wrappers for waitpid macros
John W. Eaton <jwe@octave.org>
parents: 21907
diff changeset
263 status = octave::sys::wexitstatus (status);
20799
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
264
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
265 retval(0) = status;
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
266 }
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
267
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
268 return retval;
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
269 }
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
270
12846
9ce9e1e2d2c8 codesprint: new tests for toplev.cc
John W. Eaton <jwe@octave.org>
parents: 12483
diff changeset
271 /*
9ce9e1e2d2c8 codesprint: new tests for toplev.cc
John W. Eaton <jwe@octave.org>
parents: 12483
diff changeset
272 %!test
14018
5d5685216876 Deprecate shell_cmd function and update system, dos, unix commands
Rik <octave@nomad.inbox5.com>
parents: 14016
diff changeset
273 %! cmd = ls_command ();
12846
9ce9e1e2d2c8 codesprint: new tests for toplev.cc
John W. Eaton <jwe@octave.org>
parents: 12483
diff changeset
274 %! [status, output] = system (cmd);
14018
5d5685216876 Deprecate shell_cmd function and update system, dos, unix commands
Rik <octave@nomad.inbox5.com>
parents: 14016
diff changeset
275 %! assert (status, 0);
12846
9ce9e1e2d2c8 codesprint: new tests for toplev.cc
John W. Eaton <jwe@octave.org>
parents: 12483
diff changeset
276 %! assert (ischar (output));
9ce9e1e2d2c8 codesprint: new tests for toplev.cc
John W. Eaton <jwe@octave.org>
parents: 12483
diff changeset
277 %! assert (! isempty (output));
14018
5d5685216876 Deprecate shell_cmd function and update system, dos, unix commands
Rik <octave@nomad.inbox5.com>
parents: 14016
diff changeset
278
5d5685216876 Deprecate shell_cmd function and update system, dos, unix commands
Rik <octave@nomad.inbox5.com>
parents: 14016
diff changeset
279 %!error system ()
5d5685216876 Deprecate shell_cmd function and update system, dos, unix commands
Rik <octave@nomad.inbox5.com>
parents: 14016
diff changeset
280 %!error system (1, 2, 3)
12846
9ce9e1e2d2c8 codesprint: new tests for toplev.cc
John W. Eaton <jwe@octave.org>
parents: 12483
diff changeset
281 */
9ce9e1e2d2c8 codesprint: new tests for toplev.cc
John W. Eaton <jwe@octave.org>
parents: 12483
diff changeset
282
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
283 static octave_value
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
284 find_config_info (const octave_scalar_map& m, const std::string& key)
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
285 {
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
286 if (m.isfield (key))
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
287 {
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
288 Cell c = m.contents (key);
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
289
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
290 if (! c.is_empty ())
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
291 return c(0);
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
292 }
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
293
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
294 return octave_value ();
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
295 }
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
296
21434
1da428cbf401 deprecate octave_config_info
John W. Eaton <jwe@octave.org>
parents: 21421
diff changeset
297 DEFUN (__octave_config_info__, args, ,
21966
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
298 doc: /* -*- texinfo -*-
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
299 @deftypefn {} {} __octave_config_info__ ()
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
300 @deftypefnx {} {} __octave_config_info__ (@var{option})
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
301 Return a structure containing configuration and installation information for
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
302 Octave.
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
303
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
304 If @var{option} is a string, return the configuration information for the
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
305 specified option.
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
306
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
307 @seealso{computer}
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21949
diff changeset
308 @end deftypefn */)
2162
a940dcdfe9de [project @ 1996-05-13 10:31:51 by jwe]
jwe
parents: 2145
diff changeset
309 {
4128
919b2f6573ee [project @ 2002-10-25 20:36:14 by jwe]
jwe
parents: 4111
diff changeset
310 #if defined (ENABLE_DYNAMIC_LINKING)
2689
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents: 2675
diff changeset
311 bool octave_supports_dynamic_linking = true;
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents: 2675
diff changeset
312 #else
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents: 2675
diff changeset
313 bool octave_supports_dynamic_linking = false;
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents: 2675
diff changeset
314 #endif
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents: 2675
diff changeset
315
4357
d700cfed902a [project @ 2003-02-22 18:48:18 by jwe]
jwe
parents: 4356
diff changeset
316 static bool initialized = false;
2162
a940dcdfe9de [project @ 1996-05-13 10:31:51 by jwe]
jwe
parents: 2145
diff changeset
317
6274
d42abdfcb8e9 [project @ 2007-02-07 07:22:02 by jwe]
jwe
parents: 6222
diff changeset
318 struct conf_info_struct
d42abdfcb8e9 [project @ 2007-02-07 07:22:02 by jwe]
jwe
parents: 6222
diff changeset
319 {
d42abdfcb8e9 [project @ 2007-02-07 07:22:02 by jwe]
jwe
parents: 6222
diff changeset
320 const char *key;
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
321 octave_value val;
6274
d42abdfcb8e9 [project @ 2007-02-07 07:22:02 by jwe]
jwe
parents: 6222
diff changeset
322 };
d42abdfcb8e9 [project @ 2007-02-07 07:22:02 by jwe]
jwe
parents: 6222
diff changeset
323
d42abdfcb8e9 [project @ 2007-02-07 07:22:02 by jwe]
jwe
parents: 6222
diff changeset
324 static const conf_info_struct conf_info[] =
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
325 {
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
326 { "DEFAULT_PAGER", OCTAVE_DEFAULT_PAGER },
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
327
21229
a83e7a384ee0 create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents: 21226
diff changeset
328 #if defined (OCTAVE_ENABLE_64)
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
329 { "ENABLE_64", true },
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
330 #else
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
331 { "ENABLE_64", false },
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
332 #endif
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
333
21229
a83e7a384ee0 create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents: 21226
diff changeset
334 #if defined (OCTAVE_ENABLE_ATOMIC_REFCOUNT)
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
335 { "ENABLE_ATOMIC_REFCOUNT", true },
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
336 #else
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
337 { "ENABLE_ATOMIC_REFCOUNT", false },
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
338 #endif
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
339
21229
a83e7a384ee0 create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents: 21226
diff changeset
340 #if defined (OCTAVE_ENABLE_BOUNDS_CHECK)
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
341 { "ENABLE_BOUNDS_CHECK", true },
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
342 #else
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
343 { "ENABLE_BOUNDS_CHECK", false },
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
344 #endif
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
345
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
346 #if defined (ENABLE_DOCS)
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
347 { "ENABLE_DOCS", true },
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
348 #else
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
349 { "ENABLE_DOCS", false },
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
350 #endif
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
351
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
352 #if defined (ENABLE_DYNAMIC_LINKING)
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
353 { "ENABLE_DYNAMIC_LINKING", true },
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
354 #else
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
355 { "ENABLE_DYNAMIC_LINKING", false },
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
356 #endif
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
357
21229
a83e7a384ee0 create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents: 21226
diff changeset
358 #if defined (OCTAVE_ENABLE_FLOAT_TRUNCATE)
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
359 { "ENABLE_FLOAT_TRUNCATE", true },
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
360 #else
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
361 { "ENABLE_FLOAT_TRUNCATE", false },
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
362 #endif
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
363
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
364 #if defined (ENABLE_JIT)
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
365 { "ENABLE_JIT", true },
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
366 #else
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
367 { "ENABLE_JIT", false },
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
368 #endif
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
369
21229
a83e7a384ee0 create and install a subset of config.h in octave-config.h
John W. Eaton <jwe@octave.org>
parents: 21226
diff changeset
370 #if defined (OCTAVE_ENABLE_OPENMP)
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
371 { "ENABLE_OPENMP", true },
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
372 #else
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
373 { "ENABLE_OPENMP", false },
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
374 #endif
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
375
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
376 { "api_version", OCTAVE_API_VERSION },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
377 { "archlibdir", subst_octave_home (OCTAVE_ARCHLIBDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
378 { "bindir", subst_octave_home (OCTAVE_BINDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
379 { "canonical_host_type", OCTAVE_CANONICAL_HOST_TYPE },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
380 { "datadir", subst_octave_home (OCTAVE_DATADIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
381 { "datarootdir", subst_octave_home (OCTAVE_DATAROOTDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
382 { "exec_prefix", subst_octave_home (OCTAVE_EXEC_PREFIX) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
383 { "fcnfiledir", subst_octave_home (OCTAVE_FCNFILEDIR) },
21600
184b85b31e03 more updates for version function
mmuetzel <markus.muetzel@gmx.de>
parents: 21598
diff changeset
384 { "fftw_version", octave_fftw_version () },
21603
37cbdf7bffa9 Add fftwf_version (bug #45659)
mmuetzel <markus.muetzel@gmx.de>
parents: 21600
diff changeset
385 { "fftwf_version", octave_fftwf_version () },
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
386 { "imagedir", subst_octave_home (OCTAVE_IMAGEDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
387 { "includedir", subst_octave_home (OCTAVE_INCLUDEDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
388 { "infodir", subst_octave_home (OCTAVE_INFODIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
389 { "infofile", subst_octave_home (OCTAVE_INFOFILE) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
390 { "libdir", subst_octave_home (OCTAVE_LIBDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
391 { "libexecdir", subst_octave_home (OCTAVE_LIBEXECDIR) },
21608
80258bb3a14b store hg id info in libgui and main exe and check for consistency (bug #45659)
John W. Eaton <jwe@octave.org>
parents: 21607
diff changeset
392 // Each library and executable has its own definition of the hg
80258bb3a14b store hg id info in libgui and main exe and check for consistency (bug #45659)
John W. Eaton <jwe@octave.org>
parents: 21607
diff changeset
393 // id. We check for consistency when Octave starts so we just
80258bb3a14b store hg id info in libgui and main exe and check for consistency (bug #45659)
John W. Eaton <jwe@octave.org>
parents: 21607
diff changeset
394 // store and report one of them here.
80258bb3a14b store hg id info in libgui and main exe and check for consistency (bug #45659)
John W. Eaton <jwe@octave.org>
parents: 21607
diff changeset
395 { "hg_id", liboctinterp_hg_id () },
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
396 { "localapiarchlibdir", subst_octave_home (OCTAVE_LOCALAPIARCHLIBDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
397 { "localapifcnfiledir", subst_octave_home (OCTAVE_LOCALAPIFCNFILEDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
398 { "localapioctfiledir", subst_octave_home (OCTAVE_LOCALAPIOCTFILEDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
399 { "localarchlibdir", subst_octave_home (OCTAVE_LOCALARCHLIBDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
400 { "localfcnfiledir", subst_octave_home (OCTAVE_LOCALFCNFILEDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
401 { "localoctfiledir", subst_octave_home (OCTAVE_LOCALOCTFILEDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
402 { "localstartupfiledir", subst_octave_home (OCTAVE_LOCALSTARTUPFILEDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
403 { "localverarchlibdir", subst_octave_home (OCTAVE_LOCALVERARCHLIBDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
404 { "localverfcnfiledir", subst_octave_home (OCTAVE_LOCALVERFCNFILEDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
405 { "localveroctfiledir", subst_octave_home (OCTAVE_LOCALVEROCTFILEDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
406 { "man1dir", subst_octave_home (OCTAVE_MAN1DIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
407 { "man1ext", OCTAVE_MAN1EXT },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
408 { "mandir", subst_octave_home (OCTAVE_MANDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
409 { "octdatadir", subst_octave_home (OCTAVE_OCTDATADIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
410 { "octfiledir", subst_octave_home (OCTAVE_OCTFILEDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
411 { "octetcdir", subst_octave_home (OCTAVE_OCTETCDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
412 { "octincludedir", subst_octave_home (OCTAVE_OCTINCLUDEDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
413 { "octlibdir", subst_octave_home (OCTAVE_OCTLIBDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
414 { "octtestsdir", subst_octave_home (OCTAVE_OCTTESTSDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
415 { "prefix", subst_octave_home (OCTAVE_PREFIX) },
21598
cf552443c104 revise method of handling hg id for build info
John W. Eaton <jwe@octave.org>
parents: 21597
diff changeset
416 { "release_date", OCTAVE_RELEASE_DATE },
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
417 { "startupfiledir", subst_octave_home (OCTAVE_STARTUPFILEDIR) },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
418 { "version", OCTAVE_VERSION },
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
419 { 0, octave_value () }
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
420 };
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
421
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
422 struct build_info_struct
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17755
diff changeset
423 {
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
424 const char *key;
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
425 const char *val;
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17755
diff changeset
426 };
4357
d700cfed902a [project @ 2003-02-22 18:48:18 by jwe]
jwe
parents: 4356
diff changeset
427
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
428 static const build_info_struct build_info[] =
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
429 {
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
430 { "AMD_CPPFLAGS", octave::build_env::AMD_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
431 { "AMD_LDFLAGS", octave::build_env::AMD_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
432 { "AMD_LIBS", octave::build_env::AMD_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
433 { "AR", octave::build_env::AR },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
434 { "ARFLAGS", octave::build_env::ARFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
435 { "ARPACK_CPPFLAGS", octave::build_env::ARPACK_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
436 { "ARPACK_LDFLAGS", octave::build_env::ARPACK_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
437 { "ARPACK_LIBS", octave::build_env::ARPACK_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
438 { "BLAS_LIBS", octave::build_env::BLAS_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
439 { "CAMD_CPPFLAGS", octave::build_env::CAMD_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
440 { "CAMD_LDFLAGS", octave::build_env::CAMD_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
441 { "CAMD_LIBS", octave::build_env::CAMD_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
442 { "CARBON_LIBS", octave::build_env::CARBON_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
443 { "CC", octave::build_env::CC },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
444 { "CCOLAMD_CPPFLAGS", octave::build_env::CCOLAMD_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
445 { "CCOLAMD_LDFLAGS", octave::build_env::CCOLAMD_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
446 { "CCOLAMD_LIBS", octave::build_env::CCOLAMD_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
447 { "CFLAGS", octave::build_env::CFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
448 { "CHOLMOD_CPPFLAGS", octave::build_env::CHOLMOD_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
449 { "CHOLMOD_LDFLAGS", octave::build_env::CHOLMOD_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
450 { "CHOLMOD_LIBS", octave::build_env::CHOLMOD_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
451 { "COLAMD_CPPFLAGS", octave::build_env::COLAMD_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
452 { "COLAMD_LDFLAGS", octave::build_env::COLAMD_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
453 { "COLAMD_LIBS", octave::build_env::COLAMD_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
454 { "CPICFLAG", octave::build_env::CPICFLAG },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
455 { "CPPFLAGS", octave::build_env::CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
456 { "CURL_CPPFLAGS", octave::build_env::CURL_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
457 { "CURL_LDFLAGS", octave::build_env::CURL_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
458 { "CURL_LIBS", octave::build_env::CURL_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
459 { "CXSPARSE_CPPFLAGS", octave::build_env::CXSPARSE_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
460 { "CXSPARSE_LDFLAGS", octave::build_env::CXSPARSE_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
461 { "CXSPARSE_LIBS", octave::build_env::CXSPARSE_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
462 { "CXX", octave::build_env::CXX },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
463 { "CXXCPP", octave::build_env::CXXCPP },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
464 { "CXXFLAGS", octave::build_env::CXXFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
465 { "CXXPICFLAG", octave::build_env::CXXPICFLAG },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
466 { "DEFS", octave::build_env::DEFS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
467 { "DL_LD", octave::build_env::DL_LD },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
468 { "DL_LDFLAGS", octave::build_env::DL_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
469 { "DL_LIBS", octave::build_env::DL_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
470 { "GCC_VERSION", octave::build_env::GCC_VERSION },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
471 { "GXX_VERSION", octave::build_env::GXX_VERSION },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
472 { "EXEEXT", octave::build_env::EXEEXT },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
473 { "F77", octave::build_env::F77 },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
474 { "F77_FLOAT_STORE_FLAG", octave::build_env::F77_FLOAT_STORE_FLAG },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
475 { "F77_INTEGER_8_FLAG", octave::build_env::F77_INTEGER_8_FLAG },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
476 { "FFLAGS", octave::build_env::FFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
477 { "FFTW3_CPPFLAGS", octave::build_env::FFTW3_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
478 { "FFTW3_LDFLAGS", octave::build_env::FFTW3_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
479 { "FFTW3_LIBS", octave::build_env::FFTW3_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
480 { "FFTW3F_CPPFLAGS", octave::build_env::FFTW3F_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
481 { "FFTW3F_LDFLAGS", octave::build_env::FFTW3F_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
482 { "FFTW3F_LIBS", octave::build_env::FFTW3F_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
483 { "FLIBS", octave::build_env::FLIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
484 { "FLTK_CPPFLAGS", octave::build_env::FLTK_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
485 { "FLTK_LDFLAGS", octave::build_env::FLTK_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
486 { "FLTK_LIBS", octave::build_env::FLTK_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
487 { "FONTCONFIG_CPPFLAGS", octave::build_env::FONTCONFIG_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
488 { "FONTCONFIG_LIBS", octave::build_env::FONTCONFIG_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
489 { "FPICFLAG", octave::build_env::FPICFLAG },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
490 { "FT2_CPPFLAGS", octave::build_env::FT2_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
491 { "FT2_LIBS", octave::build_env::FT2_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
492 { "GLPK_CPPFLAGS", octave::build_env::GLPK_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
493 { "GLPK_LDFLAGS", octave::build_env::GLPK_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
494 { "GLPK_LIBS", octave::build_env::GLPK_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
495 { "GNUPLOT", octave::build_env::GNUPLOT },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
496 { "HDF5_CPPFLAGS", octave::build_env::HDF5_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
497 { "HDF5_LDFLAGS", octave::build_env::HDF5_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
498 { "HDF5_LIBS", octave::build_env::HDF5_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
499 { "LAPACK_LIBS", octave::build_env::LAPACK_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
500 { "LDFLAGS", octave::build_env::LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
501 { "LD_CXX", octave::build_env::LD_CXX },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
502 { "LD_STATIC_FLAG", octave::build_env::LD_STATIC_FLAG },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
503 { "LEX", octave::build_env::LEX },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
504 { "LEXLIB", octave::build_env::LEXLIB },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
505 { "LFLAGS", octave::build_env::LFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
506 { "LIBOCTAVE", octave::build_env::LIBOCTAVE },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
507 { "LIBOCTINTERP", octave::build_env::LIBOCTINTERP },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
508 { "LIBS", octave::build_env::LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
509 { "LLVM_CPPFLAGS", octave::build_env::LLVM_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
510 { "LLVM_LDFLAGS", octave::build_env::LLVM_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
511 { "LLVM_LIBS", octave::build_env::LLVM_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
512 { "LN_S", octave::build_env::LN_S },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
513 { "MAGICK_CPPFLAGS", octave::build_env::MAGICK_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
514 { "MAGICK_LDFLAGS", octave::build_env::MAGICK_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
515 { "MAGICK_LIBS", octave::build_env::MAGICK_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
516 { "MKOCTFILE_DL_LDFLAGS", octave::build_env::MKOCTFILE_DL_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
517 { "OCTAVE_LINK_DEPS", octave::build_env::OCTAVE_LINK_DEPS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
518 { "OCTAVE_LINK_OPTS", octave::build_env::OCTAVE_LINK_OPTS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
519 { "OCT_LINK_DEPS", octave::build_env::OCT_LINK_DEPS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
520 { "OCT_LINK_OPTS", octave::build_env::OCT_LINK_OPTS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
521 { "OPENGL_LIBS", octave::build_env::OPENGL_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
522 { "OSMESA_CPPFLAGS", octave::build_env::OSMESA_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
523 { "OSMESA_LDFLAGS", octave::build_env::OSMESA_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
524 { "OSMESA_LIBS", octave::build_env::OSMESA_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
525 { "PCRE_CPPFLAGS", octave::build_env::PCRE_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
526 { "PCRE_LIBS", octave::build_env::PCRE_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
527 { "PTHREAD_CFLAGS", octave::build_env::PTHREAD_CFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
528 { "PTHREAD_LIBS", octave::build_env::PTHREAD_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
529 { "QHULL_CPPFLAGS", octave::build_env::QHULL_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
530 { "QHULL_LDFLAGS", octave::build_env::QHULL_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
531 { "QHULL_LIBS", octave::build_env::QHULL_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
532 { "QRUPDATE_CPPFLAGS", octave::build_env::QRUPDATE_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
533 { "QRUPDATE_LDFLAGS", octave::build_env::QRUPDATE_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
534 { "QRUPDATE_LIBS", octave::build_env::QRUPDATE_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
535 { "QT_CPPFLAGS", octave::build_env::QT_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
536 { "QT_LDFLAGS", octave::build_env::QT_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
537 { "QT_LIBS", octave::build_env::QT_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
538 { "RANLIB", octave::build_env::RANLIB },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
539 { "RDYNAMIC_FLAG", octave::build_env::RDYNAMIC_FLAG },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
540 { "READLINE_LIBS", octave::build_env::READLINE_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
541 { "SED", octave::build_env::SED },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
542 { "SHARED_LIBS", octave::build_env::SHARED_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
543 { "SH_LD", octave::build_env::SH_LD },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
544 { "SH_LDFLAGS", octave::build_env::SH_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
545 { "STATIC_LIBS", octave::build_env::STATIC_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
546 { "TERM_LIBS", octave::build_env::TERM_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
547 { "UMFPACK_CPPFLAGS", octave::build_env::UMFPACK_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
548 { "UMFPACK_LDFLAGS", octave::build_env::UMFPACK_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
549 { "UMFPACK_LIBS", octave::build_env::UMFPACK_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
550 { "WARN_CFLAGS", octave::build_env::WARN_CFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
551 { "WARN_CXXFLAGS", octave::build_env::WARN_CXXFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
552 { "X11_INCFLAGS", octave::build_env::X11_INCFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
553 { "X11_LIBS", octave::build_env::X11_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
554 { "XTRA_CFLAGS", octave::build_env::XTRA_CFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
555 { "XTRA_CXXFLAGS", octave::build_env::XTRA_CXXFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
556 { "YACC", octave::build_env::YACC },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
557 { "YFLAGS", octave::build_env::YFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
558 { "Z_CPPFLAGS", octave::build_env::Z_CPPFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
559 { "Z_LDFLAGS", octave::build_env::Z_LDFLAGS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
560 { "Z_LIBS", octave::build_env::Z_LIBS },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
561 { "config_opts", octave::build_env::config_opts },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
562 { 0, 0 },
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
563 };
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
564
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
565 static octave_scalar_map config;
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
566 static octave_scalar_map build_env;
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
567 static octave_scalar_map build_features = octave::build_env::features ();
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
568
4357
d700cfed902a [project @ 2003-02-22 18:48:18 by jwe]
jwe
parents: 4356
diff changeset
569 if (! initialized)
d700cfed902a [project @ 2003-02-22 18:48:18 by jwe]
jwe
parents: 4356
diff changeset
570 {
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
571 int i;
4357
d700cfed902a [project @ 2003-02-22 18:48:18 by jwe]
jwe
parents: 4356
diff changeset
572
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
573 i = 0;
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
574 while (true)
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
575 {
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
576 const build_info_struct& elt = build_info[i++];
4697
c26904f532f1 [project @ 2004-01-16 17:49:20 by jwe]
jwe
parents: 4691
diff changeset
577
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
578 const char *key = elt.key;
4697
c26904f532f1 [project @ 2004-01-16 17:49:20 by jwe]
jwe
parents: 4691
diff changeset
579
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
580 if (key)
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
581 build_env.assign (key, elt.val);
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
582 else
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
583 break;
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
584 }
4697
c26904f532f1 [project @ 2004-01-16 17:49:20 by jwe]
jwe
parents: 4691
diff changeset
585
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
586 i = 0;
4440
0bca8443db39 [project @ 2003-07-02 22:45:29 by jwe]
jwe
parents: 4429
diff changeset
587 while (true)
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10212
diff changeset
588 {
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10212
diff changeset
589 const conf_info_struct& elt = conf_info[i++];
6274
d42abdfcb8e9 [project @ 2007-02-07 07:22:02 by jwe]
jwe
parents: 6222
diff changeset
590
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10212
diff changeset
591 const char *key = elt.key;
4357
d700cfed902a [project @ 2003-02-22 18:48:18 by jwe]
jwe
parents: 4356
diff changeset
592
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10212
diff changeset
593 if (key)
21253
a66a737913b5 allow __have_feature__ to check for ENABLE_ options
John W. Eaton <jwe@octave.org>
parents: 21229
diff changeset
594 config.assign (key, elt.val);
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10212
diff changeset
595 else
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10212
diff changeset
596 break;
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10212
diff changeset
597 }
4357
d700cfed902a [project @ 2003-02-22 18:48:18 by jwe]
jwe
parents: 4356
diff changeset
598
4691
bdc51b369a78 [project @ 2004-01-10 18:16:02 by jwe]
jwe
parents: 4675
diff changeset
599 bool unix_system = true;
7013
f943e9635115 [project @ 2007-10-11 19:39:02 by jwe]
jwe
parents: 7010
diff changeset
600 bool mac_system = false;
4691
bdc51b369a78 [project @ 2004-01-10 18:16:02 by jwe]
jwe
parents: 4675
diff changeset
601 bool windows_system = false;
bdc51b369a78 [project @ 2004-01-10 18:16:02 by jwe]
jwe
parents: 4675
diff changeset
602
21979
d04da18a407a use OCTAVE_USE_WINDOWS_API more consistently
John W. Eaton <jwe@octave.org>
parents: 21966
diff changeset
603 #if defined (__WIN32__)
4691
bdc51b369a78 [project @ 2004-01-10 18:16:02 by jwe]
jwe
parents: 4675
diff changeset
604 windows_system = true;
20791
f7084eae3318 maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents: 20785
diff changeset
605 #if ! defined (__CYGWIN__)
4691
bdc51b369a78 [project @ 2004-01-10 18:16:02 by jwe]
jwe
parents: 4675
diff changeset
606 unix_system = false;
bdc51b369a78 [project @ 2004-01-10 18:16:02 by jwe]
jwe
parents: 4675
diff changeset
607 #endif
bdc51b369a78 [project @ 2004-01-10 18:16:02 by jwe]
jwe
parents: 4675
diff changeset
608 #endif
bdc51b369a78 [project @ 2004-01-10 18:16:02 by jwe]
jwe
parents: 4675
diff changeset
609
8574
83b8c739d626 toplev.cc: check OCTAVE_USE_OS_X_API instead of __APPLE__ && __MACH__
John W. Eaton <jwe@octave.org>
parents: 8377
diff changeset
610 #if defined (OCTAVE_USE_OS_X_API)
7010
f7d2f54008f5 [project @ 2007-10-11 17:50:34 by jwe]
jwe
parents: 7001
diff changeset
611 mac_system = true;
f7d2f54008f5 [project @ 2007-10-11 17:50:34 by jwe]
jwe
parents: 7001
diff changeset
612 #endif
f7d2f54008f5 [project @ 2007-10-11 17:50:34 by jwe]
jwe
parents: 7001
diff changeset
613
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
614 config.assign ("unix", octave_value (unix_system));
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
615 config.assign ("mac", octave_value (mac_system));
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
616 config.assign ("windows", octave_value (windows_system));
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
617
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
618 config.assign ("dld", octave_value (octave_supports_dynamic_linking));
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
619
21739
c4ab2e54f100 use namespace for oct_mach_info class
John W. Eaton <jwe@octave.org>
parents: 21724
diff changeset
620 octave::mach_info::float_format ff = octave::mach_info::native_float_format ();
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
621 config.assign ("float_format",
21739
c4ab2e54f100 use namespace for oct_mach_info class
John W. Eaton <jwe@octave.org>
parents: 21724
diff changeset
622 octave_value (octave::mach_info::float_format_as_string (ff)));
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
623
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
624 config.assign ("words_big_endian",
21739
c4ab2e54f100 use namespace for oct_mach_info class
John W. Eaton <jwe@octave.org>
parents: 21724
diff changeset
625 octave_value (octave::mach_info::words_big_endian ()));
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
626
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
627 config.assign ("words_little_endian",
21739
c4ab2e54f100 use namespace for oct_mach_info class
John W. Eaton <jwe@octave.org>
parents: 21724
diff changeset
628 octave_value (octave::mach_info::words_little_endian ()));
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
629
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
630 config.assign ("build_environment", octave_value (build_env));
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
631
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
632 config.assign ("build_features", octave_value (build_features));
4691
bdc51b369a78 [project @ 2004-01-10 18:16:02 by jwe]
jwe
parents: 4675
diff changeset
633
4357
d700cfed902a [project @ 2003-02-22 18:48:18 by jwe]
jwe
parents: 4356
diff changeset
634 initialized = true;
d700cfed902a [project @ 2003-02-22 18:48:18 by jwe]
jwe
parents: 4356
diff changeset
635 }
2162
a940dcdfe9de [project @ 1996-05-13 10:31:51 by jwe]
jwe
parents: 2145
diff changeset
636
2689
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents: 2675
diff changeset
637 int nargin = args.length ();
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents: 2675
diff changeset
638
20799
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
639 if (nargin > 1)
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
640 print_usage ();
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
641
20939
b17fda023ca6 maint: Use new C++ archetype in more files.
Rik <rik@octave.org>
parents: 20923
diff changeset
642 octave_value_list retval;
b17fda023ca6 maint: Use new C++ archetype in more files.
Rik <rik@octave.org>
parents: 20923
diff changeset
643
2689
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents: 2675
diff changeset
644 if (nargin == 1)
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents: 2675
diff changeset
645 {
21434
1da428cbf401 deprecate octave_config_info
John W. Eaton <jwe@octave.org>
parents: 21421
diff changeset
646 std::string arg = args(0).xstring_value ("__octave_config_info__: OPTION argument must be a string");
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
647
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
648 octave_value info = find_config_info (config, arg);
2689
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents: 2675
diff changeset
649
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
650 if (info.is_undefined ())
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
651 info = find_config_info (build_env, arg);
20939
b17fda023ca6 maint: Use new C++ archetype in more files.
Rik <rik@octave.org>
parents: 20923
diff changeset
652
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
653 if (info.is_undefined ())
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
654 info = find_config_info (build_features, arg);
5199
16a6247730d9 [project @ 2005-03-10 20:24:45 by jwe]
jwe
parents: 5189
diff changeset
655
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
656 if (info.is_undefined ())
21434
1da428cbf401 deprecate octave_config_info
John W. Eaton <jwe@octave.org>
parents: 21421
diff changeset
657 error ("__octave_config_info__: no info for '%s'", arg.c_str ());
20939
b17fda023ca6 maint: Use new C++ archetype in more files.
Rik <rik@octave.org>
parents: 20923
diff changeset
658
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
659 return info;
2689
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents: 2675
diff changeset
660 }
20799
c349d4c91ce2 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
661 else
21226
a55b8ece1ecd reorganize octave_config_info again
John W. Eaton <jwe@octave.org>
parents: 21220
diff changeset
662 retval = ovl (config);
2689
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents: 2675
diff changeset
663
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents: 2675
diff changeset
664 return retval;
2162
a940dcdfe9de [project @ 1996-05-13 10:31:51 by jwe]
jwe
parents: 2145
diff changeset
665 }
a940dcdfe9de [project @ 1996-05-13 10:31:51 by jwe]
jwe
parents: 2145
diff changeset
666
12846
9ce9e1e2d2c8 codesprint: new tests for toplev.cc
John W. Eaton <jwe@octave.org>
parents: 12483
diff changeset
667 /*
21434
1da428cbf401 deprecate octave_config_info
John W. Eaton <jwe@octave.org>
parents: 21421
diff changeset
668 %!assert (ischar (__octave_config_info__ ("version")))
12846
9ce9e1e2d2c8 codesprint: new tests for toplev.cc
John W. Eaton <jwe@octave.org>
parents: 12483
diff changeset
669 %!test
21434
1da428cbf401 deprecate octave_config_info
John W. Eaton <jwe@octave.org>
parents: 21421
diff changeset
670 %! x = __octave_config_info__ ();
12846
9ce9e1e2d2c8 codesprint: new tests for toplev.cc
John W. Eaton <jwe@octave.org>
parents: 12483
diff changeset
671 %! assert (isstruct (x));
9ce9e1e2d2c8 codesprint: new tests for toplev.cc
John W. Eaton <jwe@octave.org>
parents: 12483
diff changeset
672 %! assert (! isempty (x));
14429
eff4a5933e28 Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents: 14156
diff changeset
673
21603
37cbdf7bffa9 Add fftwf_version (bug #45659)
mmuetzel <markus.muetzel@gmx.de>
parents: 21600
diff changeset
674 %!assert (__octave_config_info__ ("fftw_version"), __octave_config_info__ ("fftwf_version"))
37cbdf7bffa9 Add fftwf_version (bug #45659)
mmuetzel <markus.muetzel@gmx.de>
parents: 21600
diff changeset
675
21434
1da428cbf401 deprecate octave_config_info
John W. Eaton <jwe@octave.org>
parents: 21421
diff changeset
676 %!error __octave_config_info__ (1, 2)
12846
9ce9e1e2d2c8 codesprint: new tests for toplev.cc
John W. Eaton <jwe@octave.org>
parents: 12483
diff changeset
677 */
9ce9e1e2d2c8 codesprint: new tests for toplev.cc
John W. Eaton <jwe@octave.org>
parents: 12483
diff changeset
678
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
679 #if defined (__GNUG__) && defined (DEBUG_NEW_DELETE)
2806
187d5321cfa3 [project @ 1997-03-11 05:13:15 by jwe]
jwe
parents: 2802
diff changeset
680
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
681 int debug_new_delete = 0;
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
682
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
683 typedef void (*vfp)(void);
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
684 extern vfp __new_handler;
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
685
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
686 void *
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
687 __builtin_new (size_t sz)
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
688 {
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
689 void *p;
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
690
20946
6eff66fb8a02 style fixes for comments
John W. Eaton <jwe@octave.org>
parents: 20940
diff changeset
691 // malloc (0) is unpredictable; avoid it.
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
692 if (sz == 0)
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
693 sz = 1;
21942
aab79a1885cc limit gnulib headers to liboctave/wrappers directory
John W. Eaton <jwe@octave.org>
parents: 21921
diff changeset
694 p = std::malloc (sz);
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
695 while (p == 0)
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
696 {
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
697 (*__new_handler) ();
21942
aab79a1885cc limit gnulib headers to liboctave/wrappers directory
John W. Eaton <jwe@octave.org>
parents: 21921
diff changeset
698 p = std::malloc (sz);
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
699 }
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
700
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
701 if (debug_new_delete)
5629
489a475073d7 [project @ 2006-02-20 21:47:12 by jwe]
jwe
parents: 5510
diff changeset
702 std::cerr << "__builtin_new: " << p << std::endl;
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
703
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
704 return p;
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
705 }
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
706
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
707 void
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
708 __builtin_delete (void *ptr)
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
709 {
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
710 if (debug_new_delete)
5629
489a475073d7 [project @ 2006-02-20 21:47:12 by jwe]
jwe
parents: 5510
diff changeset
711 std::cerr << "__builtin_delete: " << ptr << std::endl;
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
712
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
713 if (ptr)
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
714 free (ptr);
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
715 }
2806
187d5321cfa3 [project @ 1997-03-11 05:13:15 by jwe]
jwe
parents: 2802
diff changeset
716
1683
5282f171363d [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents:
diff changeset
717 #endif