Mercurial > octave
annotate libinterp/corefcn/utils.h @ 25646:4d565baa475e
move libinterp/utils functions inside octave namespace
* utils.h, utils.cc: Move functions inside octave namespace.
Change all uses.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 19 Jul 2018 16:55:47 -0400 |
parents | 5960fd1b56f1 |
children | f7b205562f1d |
rev | line source |
---|---|
1 | 1 /* |
2 | |
25054
6652d3823428
maint: Update copyright dates in all source files.
John W. Eaton <jwe@octave.org>
parents:
24534
diff
changeset
|
3 Copyright (C) 1993-2018 John W. Eaton |
1 | 4 |
5 This file is part of Octave. | |
6 | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23615
diff
changeset
|
7 Octave is free software: you can redistribute it and/or modify it |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
8 under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23615
diff
changeset
|
9 the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
10 (at your option) any later version. |
1 | 11 |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
12 Octave is distributed in the hope that it will be useful, but |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
13 WITHOUT ANY WARRANTY; without even the implied warranty of |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
15 GNU General Public License for more details. |
1 | 16 |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23615
diff
changeset
|
19 <https://www.gnu.org/licenses/>. |
1 | 20 |
21 */ | |
22 | |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
23 #if ! defined (octave_utils_h) |
383 | 24 #define octave_utils_h 1 |
1 | 25 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20925
diff
changeset
|
26 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20925
diff
changeset
|
27 |
3620 | 28 #include <cstdarg> |
29 | |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
8920
diff
changeset
|
30 #include <iosfwd> |
1755 | 31 #include <string> |
10033
f349847c4541
optimize cellfun (@subsref, args, {subs}, uniformoutput, true) case
Jaroslav Hajek <highegg@gmail.com>
parents:
9705
diff
changeset
|
32 #include <list> |
1755 | 33 |
4478 | 34 #include "dMatrix.h" |
1966 | 35 #include "lo-utils.h" |
36 | |
3354 | 37 class octave_value; |
2086 | 38 class octave_value_list; |
1755 | 39 class string_vector; |
1 | 40 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
41 namespace octave |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
42 { |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
43 extern OCTINTERP_API bool valid_identifier (const char *s); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
44 extern OCTINTERP_API bool valid_identifier (const std::string& s); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
45 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
46 extern OCTINTERP_API bool |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
47 same_file (const std::string& f, const std::string& g); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
48 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
49 extern OCTINTERP_API int almost_match (const std::string& std, |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
50 const std::string& s, |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
51 int min_match_len = 1, |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
52 int case_sens = 1); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
53 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
54 extern OCTINTERP_API int |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
55 keyword_almost_match (const char * const *std, int *min_len, |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
56 const std::string& s, int min_toks_to_match, |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
57 int max_toks); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
58 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
59 extern OCTINTERP_API std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
60 search_path_for_file (const std::string&, const string_vector&); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
61 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
62 extern OCTINTERP_API string_vector |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
63 search_path_for_all_files (const std::string&, const string_vector&); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
64 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
65 extern OCTINTERP_API std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
66 file_in_path (const std::string&, const std::string&); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
67 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
68 extern OCTINTERP_API std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
69 find_data_file_in_load_path (const std::string& fcn, |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
70 const std::string& file, |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
71 bool require_regular_file = false); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
72 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
73 extern OCTINTERP_API std::string contents_file_in_path (const std::string&); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
74 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
75 extern OCTINTERP_API std::string fcn_file_in_path (const std::string&); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
76 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
77 extern OCTINTERP_API std::string do_string_escapes (const std::string& s); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
78 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
79 extern OCTINTERP_API const char * undo_string_escape (char c); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
80 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
81 extern OCTINTERP_API std::string undo_string_escapes (const std::string& s); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
82 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
83 extern OCTINTERP_API void |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
84 check_dimensions (dim_vector& dim, const char *warnfor); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
85 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
86 extern OCTINTERP_API void |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
87 get_dimensions (const octave_value& a, const char *warn_for, |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
88 dim_vector& dim); |
607 | 89 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
90 extern OCTINTERP_API void |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
91 get_dimensions (const octave_value& a, const octave_value& b, |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
92 const char *warn_for, octave_idx_type& nr, |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
93 octave_idx_type& nc); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
94 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
95 extern OCTINTERP_API void |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
96 get_dimensions (const octave_value& a, const char *warn_for, |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
97 octave_idx_type& nr, octave_idx_type& nc); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
98 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
99 extern OCTINTERP_API octave_idx_type |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
100 dims_to_numel (const dim_vector& dims, const octave_value_list& idx); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
101 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
102 extern OCTINTERP_API Matrix |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
103 identity_matrix (octave_idx_type nr, octave_idx_type nc); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
104 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
105 extern OCTINTERP_API FloatMatrix |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
106 float_identity_matrix (octave_idx_type nr, octave_idx_type nc); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
107 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
108 extern OCTINTERP_API size_t |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
109 format (std::ostream& os, const char *fmt, ...); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
110 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
111 extern OCTINTERP_API size_t |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
112 vformat (std::ostream& os, const char *fmt, va_list args); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
113 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
114 extern OCTINTERP_API std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
115 vasprintf (const char *fmt, va_list args); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
116 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
117 extern OCTINTERP_API std::string asprintf (const char *fmt, ...); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
118 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
119 extern OCTINTERP_API void sleep (double seconds); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
120 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
121 extern OCTINTERP_API |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
122 octave_value_list |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
123 do_simple_cellfun (octave_value_list (*fun) (const octave_value_list&, int), |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
124 const char *fun_name, const octave_value_list& args, |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
125 int nargout); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
126 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
127 extern OCTINTERP_API |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
128 octave_value |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
129 do_simple_cellfun (octave_value_list (*fun) (const octave_value_list&, int), |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
130 const char *fun_name, const octave_value_list& args); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
131 } |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
132 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
133 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS) |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
134 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
135 OCTAVE_DEPRECATED (5, "use 'octave::valid_identifier' instead") |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
136 extern OCTINTERP_API bool |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
137 valid_identifier (const char *s); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
138 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
139 OCTAVE_DEPRECATED (5, "use 'octave::valid_identifier' instead") |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
140 extern OCTINTERP_API bool |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
141 valid_identifier (const std::string& s); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
142 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
143 OCTAVE_DEPRECATED (5, "use 'octave::same_file' instead") |
6323 | 144 extern OCTINTERP_API bool |
145 same_file (const std::string& f, const std::string& g); | |
146 | |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
147 OCTAVE_DEPRECATED (5, "use 'octave::almost_match' instead") |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
148 extern OCTINTERP_API int |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
149 almost_match (const std::string& std, const std::string& s, |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
150 int min_match_len = 1, int case_sens = 1); |
607 | 151 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
152 OCTAVE_DEPRECATED (5, "use 'octave::keyword_almost_match' instead") |
6109 | 153 extern OCTINTERP_API int |
3072 | 154 keyword_almost_match (const char * const *std, int *min_len, |
10313 | 155 const std::string& s, int min_toks_to_match, |
156 int max_toks); | |
1755 | 157 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
158 OCTAVE_DEPRECATED (5, "use 'octave::search_path_for_file' instead") |
6109 | 159 extern OCTINTERP_API std::string |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
160 search_path_for_file (const std::string& path, const string_vector& names); |
4216 | 161 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
162 OCTAVE_DEPRECATED (5, "use 'octave::search_path_for_all_files' instead") |
6109 | 163 extern OCTINTERP_API string_vector |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
164 search_path_for_all_files (const std::string& path, const string_vector& names); |
4216 | 165 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
166 OCTAVE_DEPRECATED (5, "use 'octave::file_in_path' instead") |
6323 | 167 extern OCTINTERP_API std::string |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
168 file_in_path (const std::string& name, const std::string& suffix); |
6323 | 169 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
170 OCTAVE_DEPRECATED (5, "use 'octave::find_data_file_in_load_path ' instead") |
19030
9ef10e6a5987
make "file found in path" warnings consistent
John W. Eaton <jwe@octave.org>
parents:
17818
diff
changeset
|
171 extern OCTINTERP_API std::string |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
172 find_data_file_in_load_path (const std::string& fcn, const std::string& file, |
19030
9ef10e6a5987
make "file found in path" warnings consistent
John W. Eaton <jwe@octave.org>
parents:
17818
diff
changeset
|
173 bool require_regular_file = false); |
9ef10e6a5987
make "file found in path" warnings consistent
John W. Eaton <jwe@octave.org>
parents:
17818
diff
changeset
|
174 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
175 OCTAVE_DEPRECATED (5, "use 'octave::contents_file_in_path' instead") |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
176 extern OCTINTERP_API std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
177 contents_file_in_path (const std::string& s); |
8041
a14bdf90be55
Add a search for Contents.m files to the help function
David Bateman <dbateman@free.fr>
parents:
7789
diff
changeset
|
178 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
179 OCTAVE_DEPRECATED (5, "use 'octave::fcn_file_in_path' instead") |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
180 extern OCTINTERP_API std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
181 fcn_file_in_path (const std::string& s); |
21526
b76d1de20f9a
Deprecate unused C++ functions oct_file_in_path, mex_file_in_path.
Rik <rik@octave.org>
parents:
21244
diff
changeset
|
182 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
183 OCTAVE_DEPRECATED (5, "use 'octave::do_string_escapes' instead") |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
184 extern OCTINTERP_API std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
185 do_string_escapes (const std::string& s); |
3103 | 186 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
187 OCTAVE_DEPRECATED (5, "use 'octave::undo_string_escape' instead") |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
188 extern OCTINTERP_API const char * |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
189 undo_string_escape (char c); |
4143 | 190 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
191 OCTAVE_DEPRECATED (5, "use 'octave::undo_string_escapes' instead") |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
192 extern OCTINTERP_API std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
193 undo_string_escapes (const std::string& s); |
801 | 194 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
195 OCTAVE_DEPRECATED (5, "use 'octave::check_dimensions' instead") |
6109 | 196 extern OCTINTERP_API void |
4513 | 197 check_dimensions (dim_vector& dim, const char *warnfor); |
4481 | 198 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
199 OCTAVE_DEPRECATED (5, "use 'octave::get_dimensions' instead") |
6109 | 200 extern OCTINTERP_API void |
4481 | 201 get_dimensions (const octave_value& a, const char *warn_for, |
4513 | 202 dim_vector& dim); |
4481 | 203 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
204 OCTAVE_DEPRECATED (5, "use 'octave::get_dimensions' instead") |
6109 | 205 extern OCTINTERP_API void |
3354 | 206 get_dimensions (const octave_value& a, const octave_value& b, |
10313 | 207 const char *warn_for, octave_idx_type& nr, |
208 octave_idx_type& nc); | |
3354 | 209 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
210 OCTAVE_DEPRECATED (5, "use 'octave::get_dimensions' instead") |
6109 | 211 extern OCTINTERP_API void |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
212 get_dimensions (const octave_value& a, const char *warn_for, |
10313 | 213 octave_idx_type& nr, octave_idx_type& nc); |
3354 | 214 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
215 OCTAVE_DEPRECATED (5, "use 'octave::dims_to_numel' instead") |
9705
5acd99c3e794
avoid recursive overloaded calls in builtin numel
Jaroslav Hajek <highegg@gmail.com>
parents:
8950
diff
changeset
|
216 extern OCTINTERP_API octave_idx_type |
5acd99c3e794
avoid recursive overloaded calls in builtin numel
Jaroslav Hajek <highegg@gmail.com>
parents:
8950
diff
changeset
|
217 dims_to_numel (const dim_vector& dims, const octave_value_list& idx); |
5acd99c3e794
avoid recursive overloaded calls in builtin numel
Jaroslav Hajek <highegg@gmail.com>
parents:
8950
diff
changeset
|
218 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
219 OCTAVE_DEPRECATED (5, "use 'octave::identity_matrix' instead") |
6323 | 220 extern OCTINTERP_API Matrix |
221 identity_matrix (octave_idx_type nr, octave_idx_type nc); | |
4478 | 222 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
223 OCTAVE_DEPRECATED (5, "use 'octave::float_identity_matrix' instead") |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
224 extern OCTINTERP_API FloatMatrix |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
225 float_identity_matrix (octave_idx_type nr, octave_idx_type nc); |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
226 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
227 template <typename ... Args> |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
228 OCTAVE_DEPRECATED (5, "use 'octave::format' instead") |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
229 size_t |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
230 octave_format (std::ostream& os, const char *fmt, Args&& ... args) |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
231 { |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
232 return octave::format (os, fmt, std::forward<Args> (args) ...); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
233 } |
3620 | 234 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
235 OCTAVE_DEPRECATED (5, "use 'octave::vformat' instead") |
13991
051a8f94b6f8
avoid memory issue with octave_vsnprintf
John W. Eaton <jwe@octave.org>
parents:
13932
diff
changeset
|
236 extern OCTINTERP_API size_t |
3622 | 237 octave_vformat (std::ostream& os, const char *fmt, va_list args); |
3620 | 238 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
239 OCTAVE_DEPRECATED (5, "use 'octave::vasprintf' instead") |
14005
f8556baf1949
rename octave_vsnprintf and octave_snprintf
John W. Eaton <jwe@octave.org>
parents:
13991
diff
changeset
|
240 extern OCTINTERP_API std::string |
f8556baf1949
rename octave_vsnprintf and octave_snprintf
John W. Eaton <jwe@octave.org>
parents:
13991
diff
changeset
|
241 octave_vasprintf (const char *fmt, va_list args); |
4302 | 242 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
243 template <typename ... Args> |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
244 OCTAVE_DEPRECATED (5, "use 'octave::asprintf' instead") |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
245 std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
246 octave_asprintf (const char *fmt, Args&& ... args) |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
247 { |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
248 return octave::asprintf (fmt, std::forward<Args> (args) ...); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
249 } |
4302 | 250 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
251 OCTAVE_DEPRECATED (5, "use 'octave::sleep' instead") |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
252 extern OCTINTERP_API void |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
253 octave_sleep (double seconds); |
3308 | 254 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
255 OCTAVE_DEPRECATED (5, "use 'octave::do_simple_cellfun' instead") |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
256 extern OCTINTERP_API octave_value_list |
10086
76df75b10c80
allow more cells in strfind/strrep + supply a general mechanism
Jaroslav Hajek <highegg@gmail.com>
parents:
10033
diff
changeset
|
257 do_simple_cellfun (octave_value_list (*fun) (const octave_value_list&, int), |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
258 const char *fun_name, const octave_value_list& args, |
10086
76df75b10c80
allow more cells in strfind/strrep + supply a general mechanism
Jaroslav Hajek <highegg@gmail.com>
parents:
10033
diff
changeset
|
259 int nargout); |
76df75b10c80
allow more cells in strfind/strrep + supply a general mechanism
Jaroslav Hajek <highegg@gmail.com>
parents:
10033
diff
changeset
|
260 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
261 OCTAVE_DEPRECATED (5, "use 'octave::do_simple_cellfun' instead") |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
262 extern OCTINTERP_API octave_value |
10086
76df75b10c80
allow more cells in strfind/strrep + supply a general mechanism
Jaroslav Hajek <highegg@gmail.com>
parents:
10033
diff
changeset
|
263 do_simple_cellfun (octave_value_list (*fun) (const octave_value_list&, int), |
76df75b10c80
allow more cells in strfind/strrep + supply a general mechanism
Jaroslav Hajek <highegg@gmail.com>
parents:
10033
diff
changeset
|
264 const char *fun_name, const octave_value_list& args); |
11512
e4e82740e9cd
prototype fixes for C language files
John W. Eaton <jwe@octave.org>
parents:
10313
diff
changeset
|
265 |
1 | 266 #endif |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
267 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
268 #endif |