Mercurial > octave
annotate libinterp/corefcn/utils.h @ 30822:0826c503f294
Encoding facet based on gnulib uniconv for STL iostreams (bug #61839).
* liboctave/util/oct-string.h, liboctave/util/oct-string.cc (codecvt_u8): Add
encoding facet based on gnulib uniconv for STL iostreams.
* liboctave/wrappers/uniconv-wrappers.h, liboctave/wrappers/uniconv-wrappers.c
(octave_u8_conv_from_encoding_offsets, octave_u8_conv_to_encoding_offsets): Add
new wrappers.
* libinterp/corefcn/oct-stream.h, libinterp/corefcn/oct-stream.cc
(octave::stream): Wrap output stream with encoding facet.
* libinterp/corefcn/utils.h, libinterp/corefcn/utils.cc (format, vformat):
Remove functions that are no longer needed.
* libinterp/corefcn/file-io.cc: Add BIST.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sat, 05 Mar 2022 21:20:58 +0100 |
parents | 796f54d4ddbf |
children | c9788d7f6e65 |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 //////////////////////////////////////////////////////////////////////// |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 // |
30564
796f54d4ddbf
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
29960
diff
changeset
|
3 // Copyright (C) 1993-2022 The Octave Project Developers |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
4 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 // See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 // distribution or <https://octave.org/copyright/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
7 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
8 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
9 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
10 // Octave is free software: you can redistribute it and/or modify it |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
11 // under the terms of the GNU General Public License as published by |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
12 // the Free Software Foundation, either version 3 of the License, or |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
13 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
14 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
15 // Octave is distributed in the hope that it will be useful, but |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
16 // WITHOUT ANY WARRANTY; without even the implied warranty of |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
18 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
19 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
20 // You should have received a copy of the GNU General Public License |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
21 // along with Octave; see the file COPYING. If not, see |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
22 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 //////////////////////////////////////////////////////////////////////// |
1 | 25 |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
26 #if ! defined (octave_utils_h) |
383 | 27 #define octave_utils_h 1 |
1 | 28 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20925
diff
changeset
|
29 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20925
diff
changeset
|
30 |
3620 | 31 #include <cstdarg> |
32 | |
8950
d865363208d6
include <iosfwd> instead of <iostream> in header files
John W. Eaton <jwe@octave.org>
parents:
8920
diff
changeset
|
33 #include <iosfwd> |
1755 | 34 #include <string> |
10033
f349847c4541
optimize cellfun (@subsref, args, {subs}, uniformoutput, true) case
Jaroslav Hajek <highegg@gmail.com>
parents:
9705
diff
changeset
|
35 #include <list> |
1755 | 36 |
4478 | 37 #include "dMatrix.h" |
1966 | 38 #include "lo-utils.h" |
39 | |
3354 | 40 class octave_value; |
2086 | 41 class octave_value_list; |
1755 | 42 class string_vector; |
1 | 43 |
29960
939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
44 OCTAVE_NAMESPACE_BEGIN |
939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
45 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
46 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
|
47 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
|
48 |
29091
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
49 //! Helper class for `make_valid_name` function calls. |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
50 //! |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
51 //! Extracting options separately for multiple (e.g. 1000+) function calls |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
52 //! avoids expensive repetitive parsing of the very same options. |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
53 |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
54 class |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
55 OCTINTERP_API |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
56 make_valid_name_options |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
57 { |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
58 public: |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
59 |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
60 //! Default options for `make_valid_name` function calls. |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
61 //! |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
62 //! Calling the constructor without arguments is equivalent to: |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
63 //! |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
64 //! @code{.cc} |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
65 //! make_valid_name_options (ovl ("ReplacementStyle", "underscore", |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
66 //! "Prefix", "x")); |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
67 //! @endcode |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
68 |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
69 make_valid_name_options () = default; |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
70 |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
71 //! Extract attribute-value-pairs from an octave_value_list of strings. |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
72 //! |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
73 //! If attributes occur multiple times, the rightmost pair is chosen. |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
74 //! |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
75 //! @code{.cc} |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
76 //! make_valid_name_options (ovl ("ReplacementStyle", "hex", ...)); |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
77 //! @endcode |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
78 |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
79 make_valid_name_options (const octave_value_list& args); |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
80 |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
81 //! @return ReplacementStyle, see `help matlab.lang.makeValidName`. |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
82 |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
83 const std::string& |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
84 get_replacement_style () const { return m_replacement_style; } |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
85 |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
86 //! @return Prefix, see `help matlab.lang.makeValidName`. |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
87 |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
88 const std::string& get_prefix () const { return m_prefix; } |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
89 |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
90 private: |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
91 |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
92 std::string m_replacement_style{"underscore"}; |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
93 std::string m_prefix{"x"}; |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
94 }; |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
95 |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
96 //! Modify @p str to be a valid variable name. |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
97 //! |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
98 //! @param str input string |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
99 //! @param options see also `help matlab.lang.makeValidName`. |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
100 //! |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
101 //! @return true, if @p str was modified. |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
102 |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
103 extern OCTINTERP_API bool |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
104 make_valid_name (std::string& str, const make_valid_name_options& options); |
b924b916dc91
matlab.lang.makeValidName: reimplement in C++ (patch #9998)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
28078
diff
changeset
|
105 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
106 extern OCTINTERP_API bool |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
107 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
|
108 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
109 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
|
110 const std::string& s, |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
111 int min_match_len = 1, |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
112 int case_sens = 1); |
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 int |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
115 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
|
116 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
|
117 int max_toks); |
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 std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
120 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
|
121 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
122 extern OCTINTERP_API string_vector |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
123 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
|
124 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
125 extern OCTINTERP_API std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
126 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
|
127 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
128 extern OCTINTERP_API std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
129 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
|
130 const std::string& file, |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
131 bool require_regular_file = false); |
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 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
|
134 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
135 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
|
136 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
137 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
|
138 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
139 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
|
140 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
141 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
|
142 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
143 extern OCTINTERP_API void |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
144 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
|
145 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
146 extern OCTINTERP_API void |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
147 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
|
148 dim_vector& dim); |
607 | 149 |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
150 extern OCTINTERP_API void |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
151 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
|
152 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
|
153 octave_idx_type& nc); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
154 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
155 extern OCTINTERP_API void |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
156 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
|
157 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
|
158 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
159 extern OCTINTERP_API octave_idx_type |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
160 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
|
161 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
162 extern OCTINTERP_API Matrix |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
163 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
|
164 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
165 extern OCTINTERP_API FloatMatrix |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
166 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
|
167 |
29654
d13d090cb03a
use std::size_t and std::ptrdiff_t in C++ code (bug #60471)
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
168 extern OCTINTERP_API std::size_t |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
169 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
|
170 |
29654
d13d090cb03a
use std::size_t and std::ptrdiff_t in C++ code (bug #60471)
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
171 extern OCTINTERP_API std::size_t |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
172 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
|
173 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
174 extern OCTINTERP_API std::string |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
175 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
|
176 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
177 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
|
178 |
25961
f7b205562f1d
Allow graphics events to be processed while pause is active (bug #53729)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
25646
diff
changeset
|
179 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
|
180 bool do_graphics_events = false); |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
181 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
182 extern OCTINTERP_API |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
183 octave_value_list |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
184 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
|
185 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
|
186 int nargout); |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
187 |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
188 extern OCTINTERP_API |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
189 octave_value |
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
190 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
|
191 const char *fun_name, const octave_value_list& args); |
29960
939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
192 |
939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
193 OCTAVE_NAMESPACE_END |
25646
4d565baa475e
move libinterp/utils functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25147
diff
changeset
|
194 |
1 | 195 #endif |