1
|
1 // utils.h -*- C++ -*- |
|
2 /* |
|
3 |
296
|
4 Copyright (C) 1992, 1993, 1994 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 |
|
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|
21 |
|
22 */ |
|
23 |
383
|
24 #if !defined (octave_utils_h) |
|
25 #define octave_utils_h 1 |
1
|
26 |
|
27 class istream; |
|
28 class ostrstream; |
|
29 class tree_constant; |
526
|
30 class Octave_object; |
1
|
31 |
194
|
32 // Tell g++ that jump_to_top_level doesn't return; |
|
33 |
|
34 #ifdef __GNUG__ |
|
35 typedef void v_fcn_v (void); |
|
36 volatile v_fcn_v jump_to_top_level; |
|
37 #endif |
|
38 |
1
|
39 extern char *strsave (const char *); |
|
40 extern char *strconcat (const char *, const char *); |
607
|
41 |
1
|
42 extern void discard_until (istream&, char); |
607
|
43 |
|
44 #if 0 |
|
45 extern char *read_until (istream&, char); |
|
46 #endif |
|
47 |
686
|
48 extern char *search_path_for_file (const char *, const char *); |
164
|
49 extern char *file_in_path (const char *, const char *); |
338
|
50 extern char *fcn_file_in_path (const char *); |
572
|
51 extern char *oct_file_in_path (const char *); |
607
|
52 |
661
|
53 extern char *octave_tmp_file_name (void); |
|
54 |
526
|
55 extern char **pathstring_to_vector (char *pathstring); |
607
|
56 |
189
|
57 extern void jump_to_top_level (void); |
607
|
58 |
164
|
59 extern int almost_match (const char *std, const char *s, |
287
|
60 int min_match_len = 1, int case_sens = 1); |
|
61 extern int keyword_almost_match (const char **std, int *min_len, |
|
62 const char *s, int min_toks_to_match, |
|
63 int max_toks); |
607
|
64 |
444
|
65 extern char **get_fcn_file_names (int& ffl_len, const char *dir, |
|
66 int no_suffix); |
339
|
67 extern char **get_fcn_file_names (int& ffl_len, int no_suffix); |
607
|
68 |
1
|
69 extern int NINT (double x); |
|
70 extern double D_NINT (double x); |
|
71 |
578
|
72 extern char **make_argv (const Octave_object& args, const char *fcn_name); |
526
|
73 |
628
|
74 extern int empty_arg (const char *name, int nr, int nc); |
|
75 |
526
|
76 extern ostrstream& list_in_columns (ostrstream& os, char **list); |
320
|
77 |
801
|
78 extern char *undo_string_escape (char c); |
|
79 extern char *undo_string_escapes (char *s); |
|
80 |
1
|
81 #endif |
|
82 |
|
83 /* |
|
84 ;;; Local Variables: *** |
|
85 ;;; mode: C++ *** |
|
86 ;;; page-delimiter: "^/\\*" *** |
|
87 ;;; End: *** |
|
88 */ |