1670
|
1 // toplev.h -*- C++ -*- |
1
|
2 /* |
|
3 |
1884
|
4 Copyright (C) 1996 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 |
1670
|
24 #if !defined (octave_toplev_h) |
|
25 #define octave_toplev_h 1 |
1
|
26 |
1355
|
27 #include <cstdio> |
1
|
28 |
1488
|
29 class tree_constant; |
|
30 class tree_function; |
578
|
31 class tree_statement_list; |
1572
|
32 class charMatrix; |
1
|
33 |
1747
|
34 #include <string> |
|
35 |
1426
|
36 extern void clean_up_and_exit (int) NORETURN; |
574
|
37 |
|
38 extern void parse_and_execute (FILE *f, int print = 0); |
1604
|
39 |
1747
|
40 extern void parse_and_execute (const string& s, int print = 0, |
1605
|
41 int verbose = 0, |
|
42 const char *warn_for = 0); |
1
|
43 |
1755
|
44 extern tree_constant eval_string (const string&, int print, |
1488
|
45 int& parse_status); |
|
46 |
1907
|
47 extern int main_loop (void); |
|
48 |
1
|
49 // argv[0] for this program. |
1755
|
50 extern string raw_prog_name; |
1
|
51 |
|
52 // Cleaned-up name of this program, not including path information. |
1755
|
53 extern string prog_name; |
1
|
54 |
|
55 // Login name for user running this program. |
1755
|
56 extern string user_name; |
1
|
57 |
|
58 // Name of the host we are running on. |
1755
|
59 extern string host_name; |
1
|
60 |
|
61 // User's home directory. |
1755
|
62 extern string home_directory; |
1
|
63 |
|
64 // Guess what? |
1755
|
65 extern string the_current_working_directory; |
1
|
66 |
1613
|
67 // The path that will be searched for programs that we execute. |
1755
|
68 extern string exec_path; |
1613
|
69 |
1
|
70 // Load path specified on command line. |
1755
|
71 extern string load_path; |
1
|
72 |
186
|
73 // Name of the info file specified on command line. |
1755
|
74 extern string info_file; |
186
|
75 |
1613
|
76 // Name of the info reader we'd like to use. |
1755
|
77 extern string info_prog; |
1613
|
78 |
195
|
79 // Name of the editor to be invoked by the edit_history command. |
1755
|
80 extern string editor; |
195
|
81 |
1822
|
82 // Nonzero means we are using readline. |
|
83 extern int using_readline; |
1
|
84 |
1671
|
85 // Nonzero means we printed messages about reading startup files. |
|
86 extern int reading_startup_message_printed; |
|
87 |
1
|
88 // Command number, counting from the beginning of this session. |
|
89 extern int current_command_number; |
|
90 |
|
91 // Nonzero means we are exiting via the builtin exit or quit functions. |
|
92 extern int quitting_gracefully; |
|
93 |
|
94 // Current command to execute. |
578
|
95 extern tree_statement_list *global_command; |
1
|
96 |
206
|
97 // Pointer to function that is currently being evaluated. |
|
98 extern tree_function *curr_function; |
|
99 |
315
|
100 // Nonzero means input is coming from startup file. |
|
101 extern int input_from_startup_file; |
|
102 |
1516
|
103 // Nonzero means that input is coming from a file that was named on |
|
104 // the command line. |
|
105 extern int input_from_command_line_file; |
|
106 |
1
|
107 #endif |
|
108 |
|
109 /* |
|
110 ;;; Local Variables: *** |
|
111 ;;; mode: C++ *** |
|
112 ;;; page-delimiter: "^/\\*" *** |
|
113 ;;; End: *** |
|
114 */ |