Mercurial > octave
annotate libinterp/corefcn/utils.h @ 25961:f7b205562f1d
Allow graphics events to be processed while pause is active (bug #53729)
* util.h/cc (octave::sleep): Add second argument "do_graphics_events" that
defaults to false. Depending on do_graphics_events, unlock the graphics mutex
and call gh_manager::process_events after each time laps. When the requested
time is infinite, call octave::kbhit after each time laps and interrupt if
a character was typed.
* sysdep.cc (Fpause): Without argument, set time value to inf. Call
octave::sleep with the second argument true. Document that graphics events
are handled even though the program is paused.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Mon, 22 Oct 2018 16:34:06 +0200 |
parents | 4d565baa475e |
children | 00f796120a6d |
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 |
25961
f7b205562f1d
Allow graphics events to be processed while pause is active (bug #53729)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25646
diff
changeset
|
119 extern OCTINTERP_API void sleep (double seconds, |
f7b205562f1d
Allow graphics events to be processed while pause is active (bug #53729)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25646
diff
changeset
|
120 bool do_graphics_events = false); |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
121 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
122 extern OCTINTERP_API |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
123 octave_value_list |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
124 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
|
125 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
|
126 int nargout); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
127 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
128 extern OCTINTERP_API |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
129 octave_value |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
130 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
|
131 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
|
132 } |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
133 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
134 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS) |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
135 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
136 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
|
137 extern OCTINTERP_API bool |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
138 valid_identifier (const char *s); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
139 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
140 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
|
141 extern OCTINTERP_API bool |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
142 valid_identifier (const std::string& s); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
143 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
144 OCTAVE_DEPRECATED (5, "use 'octave::same_file' instead") |
6323 | 145 extern OCTINTERP_API bool |
146 same_file (const std::string& f, const std::string& g); | |
147 | |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
148 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
|
149 extern OCTINTERP_API int |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
150 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
|
151 int min_match_len = 1, int case_sens = 1); |
607 | 152 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
153 OCTAVE_DEPRECATED (5, "use 'octave::keyword_almost_match' instead") |
6109 | 154 extern OCTINTERP_API int |
3072 | 155 keyword_almost_match (const char * const *std, int *min_len, |
10313 | 156 const std::string& s, int min_toks_to_match, |
157 int max_toks); | |
1755 | 158 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
159 OCTAVE_DEPRECATED (5, "use 'octave::search_path_for_file' instead") |
6109 | 160 extern OCTINTERP_API std::string |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
161 search_path_for_file (const std::string& path, const string_vector& names); |
4216 | 162 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
163 OCTAVE_DEPRECATED (5, "use 'octave::search_path_for_all_files' instead") |
6109 | 164 extern OCTINTERP_API string_vector |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
165 search_path_for_all_files (const std::string& path, const string_vector& names); |
4216 | 166 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
167 OCTAVE_DEPRECATED (5, "use 'octave::file_in_path' instead") |
6323 | 168 extern OCTINTERP_API std::string |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
169 file_in_path (const std::string& name, const std::string& suffix); |
6323 | 170 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
171 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
|
172 extern OCTINTERP_API std::string |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
173 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
|
174 bool require_regular_file = false); |
9ef10e6a5987
make "file found in path" warnings consistent
John W. Eaton <jwe@octave.org>
parents:
17818
diff
changeset
|
175 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
176 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
|
177 extern OCTINTERP_API std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
178 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
|
179 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
180 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
|
181 extern OCTINTERP_API std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
182 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
|
183 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
184 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
|
185 extern OCTINTERP_API std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
186 do_string_escapes (const std::string& s); |
3103 | 187 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
188 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
|
189 extern OCTINTERP_API const char * |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
190 undo_string_escape (char c); |
4143 | 191 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
192 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
|
193 extern OCTINTERP_API std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
194 undo_string_escapes (const std::string& s); |
801 | 195 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
196 OCTAVE_DEPRECATED (5, "use 'octave::check_dimensions' instead") |
6109 | 197 extern OCTINTERP_API void |
4513 | 198 check_dimensions (dim_vector& dim, const char *warnfor); |
4481 | 199 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
200 OCTAVE_DEPRECATED (5, "use 'octave::get_dimensions' instead") |
6109 | 201 extern OCTINTERP_API void |
4481 | 202 get_dimensions (const octave_value& a, const char *warn_for, |
4513 | 203 dim_vector& dim); |
4481 | 204 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
205 OCTAVE_DEPRECATED (5, "use 'octave::get_dimensions' instead") |
6109 | 206 extern OCTINTERP_API void |
3354 | 207 get_dimensions (const octave_value& a, const octave_value& b, |
10313 | 208 const char *warn_for, octave_idx_type& nr, |
209 octave_idx_type& nc); | |
3354 | 210 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
211 OCTAVE_DEPRECATED (5, "use 'octave::get_dimensions' instead") |
6109 | 212 extern OCTINTERP_API void |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
213 get_dimensions (const octave_value& a, const char *warn_for, |
10313 | 214 octave_idx_type& nr, octave_idx_type& nc); |
3354 | 215 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
216 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
|
217 extern OCTINTERP_API octave_idx_type |
5acd99c3e794
avoid recursive overloaded calls in builtin numel
Jaroslav Hajek <highegg@gmail.com>
parents:
8950
diff
changeset
|
218 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
|
219 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
220 OCTAVE_DEPRECATED (5, "use 'octave::identity_matrix' instead") |
6323 | 221 extern OCTINTERP_API Matrix |
222 identity_matrix (octave_idx_type nr, octave_idx_type nc); | |
4478 | 223 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
224 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
|
225 extern OCTINTERP_API FloatMatrix |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
226 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
|
227 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
228 template <typename ... Args> |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
229 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
|
230 size_t |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
231 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
|
232 { |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
233 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
|
234 } |
3620 | 235 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
236 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
|
237 extern OCTINTERP_API size_t |
3622 | 238 octave_vformat (std::ostream& os, const char *fmt, va_list args); |
3620 | 239 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
240 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
|
241 extern OCTINTERP_API std::string |
f8556baf1949
rename octave_vsnprintf and octave_snprintf
John W. Eaton <jwe@octave.org>
parents:
13991
diff
changeset
|
242 octave_vasprintf (const char *fmt, va_list args); |
4302 | 243 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
244 template <typename ... Args> |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
245 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
|
246 std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
247 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
|
248 { |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
249 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
|
250 } |
4302 | 251 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
252 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
|
253 extern OCTINTERP_API void |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
254 octave_sleep (double seconds); |
3308 | 255 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
256 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
|
257 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
|
258 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
|
259 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
|
260 int nargout); |
76df75b10c80
allow more cells in strfind/strrep + supply a general mechanism
Jaroslav Hajek <highegg@gmail.com>
parents:
10033
diff
changeset
|
261 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
262 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
|
263 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
|
264 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
|
265 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
|
266 |
1 | 267 #endif |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
268 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
269 #endif |