1
|
1 // utils.h -*- C++ -*- |
|
2 /* |
|
3 |
|
4 Copyright (C) 1992, 1993 John W. Eaton |
|
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 #ifdef __GNUG__ |
|
28 #pragma interface |
|
29 #endif |
|
30 |
|
31 #include <time.h> |
|
32 |
|
33 class istream; |
|
34 class ostrstream; |
|
35 class tree_constant; |
|
36 |
|
37 extern char *strsave (const char *); |
|
38 extern char *strconcat (const char *, const char *); |
|
39 extern void discard_until (istream&, char); |
164
|
40 extern void check_dimensions (int& nr, int& nc, const char *warnfor); |
1
|
41 extern void raw_mode (int); |
|
42 extern int kbhit (void); |
|
43 extern char **pathstring_to_vector (char *); |
|
44 extern char *default_path (void); |
|
45 extern char *get_site_defaults (void); |
|
46 extern char *default_pager (void); |
164
|
47 extern char *file_in_path (const char *, const char *); |
|
48 extern char *m_file_in_path (const char *); |
|
49 extern char *polite_directory_format (const char *); |
|
50 extern int absolute_pathname (const char *); |
|
51 extern int absolute_program (const char *); |
1
|
52 extern char *base_pathname (char *); |
164
|
53 extern int read_octal (const char *); |
1
|
54 extern char *sub_append_string (char *, char *, int *, int *); |
164
|
55 extern char *decode_prompt_string (const char *); |
1
|
56 extern void pathname_backup (char *, int); |
164
|
57 extern char *make_absolute (const char *, const char *); |
|
58 extern char *get_working_directory (const char *); |
|
59 extern int change_to_directory (const char *); |
|
60 extern int is_newer (const char *, time_t); |
102
|
61 extern void volatile jump_to_top_level (void); |
1
|
62 extern char *s_plural (int); |
|
63 extern char *es_plural (int); |
164
|
64 extern char *save_in_tmp_file (tree_constant& t, int nd = 2, int para = 0); |
1
|
65 extern void mark_for_deletion (const char *); |
|
66 extern void cleanup_tmp_files (void); |
|
67 extern int send_to_plot_stream (const char *cmd); |
|
68 extern void close_plot_stream (void); |
164
|
69 extern int almost_match (const char *std, const char *s, |
|
70 int min_match_len = 1); |
|
71 extern char **get_m_file_names (int& mfl_len, const char *dir, int no_suffix); |
1
|
72 extern char **get_m_file_names (int& mfl_len, int no_suffix); |
|
73 extern int NINT (double x); |
|
74 extern double D_NINT (double x); |
|
75 |
|
76 #endif |
|
77 |
|
78 /* |
|
79 ;;; Local Variables: *** |
|
80 ;;; mode: C++ *** |
|
81 ;;; page-delimiter: "^/\\*" *** |
|
82 ;;; End: *** |
|
83 */ |