1670
|
1 // toplev.h -*- C++ -*- |
1
|
2 /* |
|
3 |
1009
|
4 Copyright (C) 1992, 1993, 1994, 1995 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 |
1488
|
44 extern tree_constant eval_string (const char *string, int print, |
|
45 int& parse_status); |
|
46 |
1
|
47 // argv[0] for this program. |
|
48 extern char *raw_prog_name; |
|
49 |
|
50 // Cleaned-up name of this program, not including path information. |
|
51 extern char *prog_name; |
|
52 |
|
53 // Login name for user running this program. |
|
54 extern char *user_name; |
|
55 |
|
56 // Name of the host we are running on. |
|
57 extern char *host_name; |
|
58 |
|
59 // User's home directory. |
|
60 extern char *home_directory; |
|
61 |
|
62 // Guess what? |
|
63 extern char *the_current_working_directory; |
|
64 |
1613
|
65 // The path that will be searched for programs that we execute. |
|
66 extern char *exec_path; |
|
67 |
1
|
68 // Load path specified on command line. |
|
69 extern char *load_path; |
|
70 |
186
|
71 // Name of the info file specified on command line. |
|
72 extern char *info_file; |
|
73 |
1613
|
74 // Name of the info reader we'd like to use. |
|
75 extern char *info_prog; |
|
76 |
195
|
77 // Name of the editor to be invoked by the edit_history command. |
|
78 extern char *editor; |
|
79 |
1
|
80 // If nonzero, don't do fancy line editing. |
|
81 extern int no_line_editing; |
|
82 |
792
|
83 // If nonzero, print verbose info in some cases. |
|
84 extern int verbose_flag; |
|
85 |
1671
|
86 // Nonzero means we printed messages about reading startup files. |
|
87 extern int reading_startup_message_printed; |
|
88 |
1
|
89 // Command number, counting from the beginning of this session. |
|
90 extern int current_command_number; |
|
91 |
|
92 // Nonzero means we are exiting via the builtin exit or quit functions. |
|
93 extern int quitting_gracefully; |
|
94 |
|
95 // Current command to execute. |
578
|
96 extern tree_statement_list *global_command; |
1
|
97 |
206
|
98 // Pointer to function that is currently being evaluated. |
|
99 extern tree_function *curr_function; |
|
100 |
315
|
101 // Nonzero means input is coming from startup file. |
|
102 extern int input_from_startup_file; |
|
103 |
1355
|
104 // The command-line options. |
1572
|
105 extern charMatrix octave_argv; |
1355
|
106 |
1516
|
107 // Nonzero means that input is coming from a file that was named on |
|
108 // the command line. |
|
109 extern int input_from_command_line_file; |
|
110 |
1
|
111 #endif |
|
112 |
|
113 /* |
|
114 ;;; Local Variables: *** |
|
115 ;;; mode: C++ *** |
|
116 ;;; page-delimiter: "^/\\*" *** |
|
117 ;;; End: *** |
|
118 */ |