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 |
|
24 #if !defined (_utils_h) |
|
25 #define _utils_h 1 |
|
26 |
|
27 #include <time.h> |
|
28 |
|
29 class istream; |
|
30 class ostrstream; |
|
31 class tree_constant; |
|
32 |
194
|
33 // Tell g++ that jump_to_top_level doesn't return; |
|
34 |
|
35 #ifdef __GNUG__ |
|
36 typedef void v_fcn_v (void); |
|
37 volatile v_fcn_v jump_to_top_level; |
|
38 #endif |
|
39 |
1
|
40 extern char *strsave (const char *); |
|
41 extern char *strconcat (const char *, const char *); |
|
42 extern void discard_until (istream&, char); |
164
|
43 extern void check_dimensions (int& nr, int& nc, const char *warnfor); |
1
|
44 extern void raw_mode (int); |
|
45 extern int kbhit (void); |
|
46 extern char **pathstring_to_vector (char *); |
195
|
47 extern char *octave_home (void); |
|
48 extern char *octave_lib_dir (void); |
|
49 extern char *octave_info_dir (void); |
1
|
50 extern char *default_path (void); |
186
|
51 extern char *default_info_file (void); |
195
|
52 extern char *default_editor (void); |
1
|
53 extern char *get_site_defaults (void); |
|
54 extern char *default_pager (void); |
164
|
55 extern char *file_in_path (const char *, const char *); |
|
56 extern char *m_file_in_path (const char *); |
|
57 extern char *polite_directory_format (const char *); |
|
58 extern int absolute_pathname (const char *); |
|
59 extern int absolute_program (const char *); |
1
|
60 extern char *base_pathname (char *); |
164
|
61 extern int read_octal (const char *); |
1
|
62 extern char *sub_append_string (char *, char *, int *, int *); |
164
|
63 extern char *decode_prompt_string (const char *); |
1
|
64 extern void pathname_backup (char *, int); |
164
|
65 extern char *make_absolute (const char *, const char *); |
|
66 extern char *get_working_directory (const char *); |
|
67 extern int change_to_directory (const char *); |
|
68 extern int is_newer (const char *, time_t); |
189
|
69 extern void jump_to_top_level (void); |
1
|
70 extern char *s_plural (int); |
|
71 extern char *es_plural (int); |
164
|
72 extern char *save_in_tmp_file (tree_constant& t, int nd = 2, int para = 0); |
1
|
73 extern void mark_for_deletion (const char *); |
|
74 extern void cleanup_tmp_files (void); |
|
75 extern int send_to_plot_stream (const char *cmd); |
|
76 extern void close_plot_stream (void); |
164
|
77 extern int almost_match (const char *std, const char *s, |
287
|
78 int min_match_len = 1, int case_sens = 1); |
|
79 extern int keyword_almost_match (const char **std, int *min_len, |
|
80 const char *s, int min_toks_to_match, |
|
81 int max_toks); |
164
|
82 extern char **get_m_file_names (int& mfl_len, const char *dir, int no_suffix); |
1
|
83 extern char **get_m_file_names (int& mfl_len, int no_suffix); |
|
84 extern int NINT (double x); |
|
85 extern double D_NINT (double x); |
241
|
86 extern void delete_ppchar (char **); |
1
|
87 |
|
88 #endif |
|
89 |
|
90 /* |
|
91 ;;; Local Variables: *** |
|
92 ;;; mode: C++ *** |
|
93 ;;; page-delimiter: "^/\\*" *** |
|
94 ;;; End: *** |
|
95 */ |