1
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 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 |
2086
|
28 class octave_value; |
2796
|
29 class octave_value_list; |
2891
|
30 class octave_user_function; |
578
|
31 class tree_statement_list; |
1572
|
32 class charMatrix; |
1
|
33 |
1747
|
34 #include <string> |
|
35 |
2796
|
36 extern void |
|
37 clean_up_and_exit (int) GCC_ATTR_NORETURN; |
574
|
38 |
2796
|
39 extern void |
2859
|
40 parse_and_execute (FILE *f, bool print = false); |
1604
|
41 |
2796
|
42 extern void |
2859
|
43 parse_and_execute (const string& s, bool print = false, bool verbose = false, |
2796
|
44 const char *warn_for = 0); |
1
|
45 |
2796
|
46 extern octave_value |
2859
|
47 eval_string (const string&, bool print, int& parse_status); |
1488
|
48 |
2796
|
49 extern int |
|
50 main_loop (void); |
1907
|
51 |
2796
|
52 extern void |
|
53 do_octave_atexit (void); |
2077
|
54 |
2806
|
55 extern void |
|
56 symbols_of_toplev (void); |
|
57 |
1
|
58 // argv[0] for this program. |
2204
|
59 extern string Vprogram_invocation_name; |
1
|
60 |
|
61 // Cleaned-up name of this program, not including path information. |
2204
|
62 extern string Vprogram_name; |
1
|
63 |
|
64 // Login name for user running this program. |
2204
|
65 extern string Vuser_name; |
1
|
66 |
|
67 // Name of the host we are running on. |
2204
|
68 extern string Vhost_name; |
1613
|
69 |
2204
|
70 // Home directory for the current user. |
|
71 extern string Vhome_directory; |
195
|
72 |
1822
|
73 // Nonzero means we are using readline. |
|
74 extern int using_readline; |
1
|
75 |
1671
|
76 // Nonzero means we printed messages about reading startup files. |
|
77 extern int reading_startup_message_printed; |
|
78 |
1
|
79 // Command number, counting from the beginning of this session. |
|
80 extern int current_command_number; |
|
81 |
|
82 // Nonzero means we are exiting via the builtin exit or quit functions. |
|
83 extern int quitting_gracefully; |
|
84 |
|
85 // Current command to execute. |
578
|
86 extern tree_statement_list *global_command; |
1
|
87 |
206
|
88 // Pointer to function that is currently being evaluated. |
2891
|
89 extern octave_user_function *curr_function; |
206
|
90 |
315
|
91 // Nonzero means input is coming from startup file. |
|
92 extern int input_from_startup_file; |
|
93 |
1516
|
94 // Nonzero means that input is coming from a file that was named on |
|
95 // the command line. |
|
96 extern int input_from_command_line_file; |
|
97 |
1
|
98 #endif |
|
99 |
|
100 /* |
|
101 ;;; Local Variables: *** |
|
102 ;;; mode: C++ *** |
|
103 ;;; End: *** |
|
104 */ |