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 |
4143
|
37 extern bool valid_identifier (const char *s); |
|
38 extern bool valid_identifier (const std::string& s); |
607
|
39 |
3523
|
40 extern int almost_match (const std::string& std, const std::string& s, |
287
|
41 int min_match_len = 1, int case_sens = 1); |
607
|
42 |
1755
|
43 extern int |
3072
|
44 keyword_almost_match (const char * const *std, int *min_len, |
3523
|
45 const std::string& s, int min_toks_to_match, |
1755
|
46 int max_toks); |
|
47 |
628
|
48 extern int empty_arg (const char *name, int nr, int nc); |
|
49 |
4143
|
50 extern std::string search_path_for_file (const std::string&, const std::string&); |
|
51 extern std::string file_in_path (const std::string&, const std::string&); |
|
52 extern std::string fcn_file_in_path (const std::string&); |
|
53 extern std::string oct_file_in_path (const std::string&); |
2042
|
54 |
3523
|
55 extern std::string do_string_escapes (const std::string& s); |
3103
|
56 |
4143
|
57 extern const char *undo_string_escape (char c); |
|
58 |
3523
|
59 extern std::string undo_string_escapes (const std::string& s); |
801
|
60 |
3523
|
61 extern int check_preference (const std::string& var); |
2204
|
62 |
3354
|
63 extern void |
|
64 get_dimensions (const octave_value& a, const octave_value& b, |
|
65 const char *warn_for, int& nr, int& nc); |
|
66 |
|
67 extern void |
|
68 get_dimensions (const octave_value& a, |
|
69 const char *warn_for, int& nr, int& nc); |
|
70 |
3620
|
71 extern int |
3622
|
72 octave_format (std::ostream& os, const char *fmt, ...); |
3620
|
73 |
|
74 extern int |
3622
|
75 octave_vformat (std::ostream& os, const char *fmt, va_list args); |
3620
|
76 |
4086
|
77 extern void octave_sleep (double seconds); |
3308
|
78 |
4067
|
79 extern "C" void octave_sleep (unsigned int seconds); |
|
80 |
4086
|
81 extern "C" void octave_usleep (unsigned int useconds); |
|
82 |
3350
|
83 extern "C" int octave_strcasecmp (const char *s1, const char *s2); |
|
84 |
|
85 extern "C" int octave_strncasecmp (const char *s1, const char *s2, size_t n); |
|
86 |
3623
|
87 extern "C" char *octave_snprintf (const char *fmt, ...); |
3620
|
88 |
3623
|
89 extern "C" char *octave_vsnprintf (const char *fmt, va_list args); |
3620
|
90 |
1
|
91 #endif |
|
92 |
|
93 /* |
|
94 ;;; Local Variables: *** |
|
95 ;;; mode: C++ *** |
|
96 ;;; End: *** |
|
97 */ |