Mercurial > hg > octave-nkf
annotate src/utils.h @ 8770:af676d09da08
Fix test for X11 if "--without-x" is given.
author | Thomas Treichl <Thomas.Treichl@gmx.net> |
---|---|
date | Tue, 17 Feb 2009 00:27:30 -0500 |
parents | a14bdf90be55 |
children | eb63fbe60fab |
rev | line source |
---|---|
1 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, |
4 2003, 2005, 2006, 2007 John W. Eaton | |
1 | 5 |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
1 | 12 |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
1 | 21 |
22 */ | |
23 | |
383 | 24 #if !defined (octave_utils_h) |
25 #define octave_utils_h 1 | |
1 | 26 |
3620 | 27 #include <cstdarg> |
28 | |
3503 | 29 #include <iostream> |
1755 | 30 #include <string> |
31 | |
4478 | 32 #include "dMatrix.h" |
1966 | 33 #include "lo-utils.h" |
34 | |
3354 | 35 class octave_value; |
2086 | 36 class octave_value_list; |
1755 | 37 class string_vector; |
1 | 38 |
6109 | 39 extern OCTINTERP_API bool valid_identifier (const char *s); |
40 extern OCTINTERP_API bool valid_identifier (const std::string& s); | |
607 | 41 |
6323 | 42 extern OCTINTERP_API bool |
43 same_file (const std::string& f, const std::string& g); | |
44 | |
45 extern OCTINTERP_API int almost_match (const std::string& std, | |
46 const std::string& s, | |
47 int min_match_len = 1, | |
48 int case_sens = 1); | |
607 | 49 |
6109 | 50 extern OCTINTERP_API int |
3072 | 51 keyword_almost_match (const char * const *std, int *min_len, |
3523 | 52 const std::string& s, int min_toks_to_match, |
1755 | 53 int max_toks); |
54 | |
6323 | 55 extern OCTINTERP_API int empty_arg (const char *name, octave_idx_type nr, |
56 octave_idx_type nc); | |
628 | 57 |
6109 | 58 extern OCTINTERP_API std::string |
4243 | 59 search_path_for_file (const std::string&, const string_vector&); |
4216 | 60 |
6109 | 61 extern OCTINTERP_API string_vector |
4243 | 62 search_path_for_all_files (const std::string&, const string_vector&); |
4216 | 63 |
6323 | 64 extern OCTINTERP_API std::string |
65 file_in_path (const std::string&, const std::string&); | |
66 | |
8041
a14bdf90be55
Add a search for Contents.m files to the help function
David Bateman <dbateman@free.fr>
parents:
7789
diff
changeset
|
67 extern OCTINTERP_API std::string contents_file_in_path (const std::string&); |
a14bdf90be55
Add a search for Contents.m files to the help function
David Bateman <dbateman@free.fr>
parents:
7789
diff
changeset
|
68 |
6109 | 69 extern OCTINTERP_API std::string fcn_file_in_path (const std::string&); |
70 extern OCTINTERP_API std::string oct_file_in_path (const std::string&); | |
71 extern OCTINTERP_API std::string mex_file_in_path (const std::string&); | |
2042 | 72 |
6109 | 73 extern OCTINTERP_API std::string do_string_escapes (const std::string& s); |
3103 | 74 |
6109 | 75 extern OCTINTERP_API const char *undo_string_escape (char c); |
4143 | 76 |
6109 | 77 extern OCTINTERP_API std::string undo_string_escapes (const std::string& s); |
801 | 78 |
6109 | 79 extern OCTINTERP_API void |
4513 | 80 check_dimensions (dim_vector& dim, const char *warnfor); |
4481 | 81 |
6109 | 82 extern OCTINTERP_API void |
4481 | 83 get_dimensions (const octave_value& a, const char *warn_for, |
4513 | 84 dim_vector& dim); |
4481 | 85 |
6109 | 86 extern OCTINTERP_API void |
3354 | 87 get_dimensions (const octave_value& a, const octave_value& b, |
6323 | 88 const char *warn_for, octave_idx_type& nr, |
89 octave_idx_type& nc); | |
3354 | 90 |
6109 | 91 extern OCTINTERP_API void |
6323 | 92 get_dimensions (const octave_value& a,const char *warn_for, |
93 octave_idx_type& nr, octave_idx_type& nc); | |
3354 | 94 |
6323 | 95 extern OCTINTERP_API Matrix |
96 identity_matrix (octave_idx_type nr, octave_idx_type nc); | |
4478 | 97 |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
98 extern OCTINTERP_API FloatMatrix |
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
99 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
|
100 |
6109 | 101 extern OCTINTERP_API int |
3622 | 102 octave_format (std::ostream& os, const char *fmt, ...); |
3620 | 103 |
6109 | 104 extern OCTINTERP_API int |
3622 | 105 octave_vformat (std::ostream& os, const char *fmt, va_list args); |
3620 | 106 |
6109 | 107 extern OCTINTERP_API char *octave_vsnprintf (const char *fmt, va_list args); |
4302 | 108 |
6109 | 109 extern OCTINTERP_API char *octave_snprintf (const char *fmt, ...); |
4302 | 110 |
6109 | 111 extern OCTINTERP_API void octave_sleep (double seconds); |
3308 | 112 |
6109 | 113 extern "C" OCTINTERP_API void octave_sleep (unsigned int seconds); |
4067 | 114 |
6109 | 115 extern "C" OCTINTERP_API void octave_usleep (unsigned int useconds); |
4086 | 116 |
6323 | 117 extern "C" OCTINTERP_API int |
118 octave_raw_vsnprintf (char *buf, size_t n, const char *fmt, va_list args); | |
3620 | 119 |
1 | 120 #endif |
121 | |
122 /* | |
123 ;;; Local Variables: *** | |
124 ;;; mode: C++ *** | |
125 ;;; End: *** | |
126 */ |