1
|
1 /* |
|
2 |
1884
|
3 Copyright (C) 1996 John W. Eaton |
1
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
1315
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1
|
20 |
|
21 */ |
|
22 |
1670
|
23 #if !defined (octave_toplev_h) |
|
24 #define octave_toplev_h 1 |
1
|
25 |
1355
|
26 #include <cstdio> |
1
|
27 |
1488
|
28 class tree_constant; |
|
29 class tree_function; |
578
|
30 class tree_statement_list; |
1572
|
31 class charMatrix; |
1
|
32 |
1747
|
33 #include <string> |
|
34 |
1426
|
35 extern void clean_up_and_exit (int) NORETURN; |
574
|
36 |
|
37 extern void parse_and_execute (FILE *f, int print = 0); |
1604
|
38 |
1747
|
39 extern void parse_and_execute (const string& s, int print = 0, |
1605
|
40 int verbose = 0, |
|
41 const char *warn_for = 0); |
1
|
42 |
1755
|
43 extern tree_constant eval_string (const string&, int print, |
1488
|
44 int& parse_status); |
|
45 |
1907
|
46 extern int main_loop (void); |
|
47 |
1
|
48 // argv[0] for this program. |
1755
|
49 extern string raw_prog_name; |
1
|
50 |
|
51 // Cleaned-up name of this program, not including path information. |
1755
|
52 extern string prog_name; |
1
|
53 |
|
54 // Login name for user running this program. |
1755
|
55 extern string user_name; |
1
|
56 |
|
57 // Name of the host we are running on. |
1755
|
58 extern string host_name; |
1
|
59 |
|
60 // User's home directory. |
1755
|
61 extern string home_directory; |
1
|
62 |
|
63 // Guess what? |
1755
|
64 extern string the_current_working_directory; |
1
|
65 |
1613
|
66 // The path that will be searched for programs that we execute. |
1755
|
67 extern string exec_path; |
1613
|
68 |
1
|
69 // Load path specified on command line. |
1755
|
70 extern string load_path; |
1
|
71 |
186
|
72 // Name of the info file specified on command line. |
1755
|
73 extern string info_file; |
186
|
74 |
1613
|
75 // Name of the info reader we'd like to use. |
1755
|
76 extern string info_prog; |
1613
|
77 |
195
|
78 // Name of the editor to be invoked by the edit_history command. |
1755
|
79 extern string editor; |
195
|
80 |
1822
|
81 // Nonzero means we are using readline. |
|
82 extern int using_readline; |
1
|
83 |
1671
|
84 // Nonzero means we printed messages about reading startup files. |
|
85 extern int reading_startup_message_printed; |
|
86 |
1
|
87 // Command number, counting from the beginning of this session. |
|
88 extern int current_command_number; |
|
89 |
|
90 // Nonzero means we are exiting via the builtin exit or quit functions. |
|
91 extern int quitting_gracefully; |
|
92 |
|
93 // Current command to execute. |
578
|
94 extern tree_statement_list *global_command; |
1
|
95 |
206
|
96 // Pointer to function that is currently being evaluated. |
|
97 extern tree_function *curr_function; |
|
98 |
315
|
99 // Nonzero means input is coming from startup file. |
|
100 extern int input_from_startup_file; |
|
101 |
1516
|
102 // Nonzero means that input is coming from a file that was named on |
|
103 // the command line. |
|
104 extern int input_from_command_line_file; |
|
105 |
1
|
106 #endif |
|
107 |
|
108 /* |
|
109 ;;; Local Variables: *** |
|
110 ;;; mode: C++ *** |
|
111 ;;; End: *** |
|
112 */ |