1
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
1
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
1315
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1
|
20 |
|
21 */ |
|
22 |
383
|
23 #if !defined (octave_utils_h) |
|
24 #define octave_utils_h 1 |
1
|
25 |
3620
|
26 #include <cstdarg> |
|
27 |
3503
|
28 #include <iostream> |
1755
|
29 #include <string> |
|
30 |
1966
|
31 #include "lo-utils.h" |
|
32 |
3354
|
33 class octave_value; |
2086
|
34 class octave_value_list; |
1755
|
35 class string_vector; |
1
|
36 |
3523
|
37 extern std::string search_path_for_file (const std::string&, const std::string&); |
|
38 extern std::string file_in_path (const std::string&, const std::string&); |
|
39 extern std::string fcn_file_in_path (const std::string&); |
|
40 extern std::string oct_file_in_path (const std::string&); |
607
|
41 |
3350
|
42 extern void jump_to_top_level (void) GCC_ATTR_NORETURN; |
607
|
43 |
3523
|
44 extern int almost_match (const std::string& std, const std::string& s, |
287
|
45 int min_match_len = 1, int case_sens = 1); |
607
|
46 |
1755
|
47 extern int |
3072
|
48 keyword_almost_match (const char * const *std, int *min_len, |
3523
|
49 const std::string& s, int min_toks_to_match, |
1755
|
50 int max_toks); |
|
51 |
628
|
52 extern int empty_arg (const char *name, int nr, int nc); |
|
53 |
2042
|
54 extern const char *undo_string_escape (char c); |
|
55 |
3523
|
56 extern std::string do_string_escapes (const std::string& s); |
3103
|
57 |
3523
|
58 extern std::string undo_string_escapes (const std::string& s); |
801
|
59 |
3523
|
60 extern int check_preference (const std::string& var); |
2204
|
61 |
3354
|
62 extern void |
|
63 get_dimensions (const octave_value& a, const octave_value& b, |
|
64 const char *warn_for, int& nr, int& nc); |
|
65 |
|
66 extern void |
|
67 get_dimensions (const octave_value& a, |
|
68 const char *warn_for, int& nr, int& nc); |
|
69 |
3620
|
70 extern int |
3622
|
71 octave_format (std::ostream& os, const char *fmt, ...); |
3620
|
72 |
|
73 extern int |
3622
|
74 octave_vformat (std::ostream& os, const char *fmt, va_list args); |
3620
|
75 |
3308
|
76 extern "C" void octave_usleep (unsigned int useconds); |
|
77 |
4067
|
78 extern "C" void octave_sleep (unsigned int seconds); |
|
79 |
3350
|
80 extern "C" int octave_strcasecmp (const char *s1, const char *s2); |
|
81 |
|
82 extern "C" int octave_strncasecmp (const char *s1, const char *s2, size_t n); |
|
83 |
3623
|
84 extern "C" char *octave_snprintf (const char *fmt, ...); |
3620
|
85 |
3623
|
86 extern "C" char *octave_vsnprintf (const char *fmt, va_list args); |
3620
|
87 |
1
|
88 #endif |
|
89 |
|
90 /* |
|
91 ;;; Local Variables: *** |
|
92 ;;; mode: C++ *** |
|
93 ;;; End: *** |
|
94 */ |