1
|
1 // utils.h -*- C++ -*- |
|
2 /* |
|
3 |
1009
|
4 Copyright (C) 1992, 1993, 1994, 1995 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 |
|
10 Free Software Foundation; either version 2, or (at your option) any |
|
11 later version. |
|
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 |
|
19 along with Octave; see the file COPYING. If not, write to the Free |
1315
|
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1
|
21 |
|
22 */ |
|
23 |
383
|
24 #if !defined (octave_utils_h) |
|
25 #define octave_utils_h 1 |
1
|
26 |
|
27 class istream; |
|
28 class ostrstream; |
1738
|
29 |
1755
|
30 #include <string> |
|
31 |
526
|
32 class Octave_object; |
1755
|
33 class string_vector; |
1
|
34 |
|
35 extern char *strsave (const char *); |
1755
|
36 |
|
37 #if 0 |
1
|
38 extern char *strconcat (const char *, const char *); |
1755
|
39 #endif |
607
|
40 |
1
|
41 extern void discard_until (istream&, char); |
607
|
42 |
|
43 #if 0 |
|
44 extern char *read_until (istream&, char); |
|
45 #endif |
|
46 |
1755
|
47 extern string search_path_for_file (const string&, const string&); |
|
48 extern string file_in_path (const string&, const string&); |
|
49 extern string fcn_file_in_path (const string&); |
|
50 extern string oct_file_in_path (const string&); |
607
|
51 |
1618
|
52 extern "C" void jump_to_top_level (void) NORETURN; |
607
|
53 |
1755
|
54 extern int almost_match (const string& std, const string& s, |
287
|
55 int min_match_len = 1, int case_sens = 1); |
607
|
56 |
1755
|
57 extern int |
|
58 keyword_almost_match (const char **std, int *min_len, |
|
59 const string& s, int min_toks_to_match, |
|
60 int max_toks); |
|
61 |
1781
|
62 extern string_vector get_fcn_file_names (const string&, int = 0); |
1755
|
63 |
1795
|
64 extern string_vector get_fcn_file_names (int = 0); |
607
|
65 |
1
|
66 extern int NINT (double x); |
|
67 extern double D_NINT (double x); |
|
68 |
1755
|
69 extern string_vector make_argv (const Octave_object&, const string&); |
526
|
70 |
628
|
71 extern int empty_arg (const char *name, int nr, int nc); |
|
72 |
1755
|
73 extern ostrstream& list_in_columns (ostrstream& os, const string_vector& list); |
320
|
74 |
1755
|
75 extern string undo_string_escapes (const string& s); |
801
|
76 |
1755
|
77 extern void oct_putenv (const char *, const char *); |
1709
|
78 |
1
|
79 #endif |
|
80 |
|
81 /* |
|
82 ;;; Local Variables: *** |
|
83 ;;; mode: C++ *** |
|
84 ;;; page-delimiter: "^/\\*" *** |
|
85 ;;; End: *** |
|
86 */ |