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 |
1426
|
34 extern void clean_up_and_exit (int) NORETURN; |
574
|
35 |
|
36 extern void parse_and_execute (FILE *f, int print = 0); |
1604
|
37 |
|
38 extern void parse_and_execute (const char *s, int print = 0, |
1605
|
39 int verbose = 0, |
|
40 const char *warn_for = 0); |
1
|
41 |
1488
|
42 extern tree_constant eval_string (const char *string, int print, |
|
43 int& parse_status); |
|
44 |
1
|
45 // argv[0] for this program. |
|
46 extern char *raw_prog_name; |
|
47 |
|
48 // Cleaned-up name of this program, not including path information. |
|
49 extern char *prog_name; |
|
50 |
|
51 // Login name for user running this program. |
|
52 extern char *user_name; |
|
53 |
|
54 // Name of the host we are running on. |
|
55 extern char *host_name; |
|
56 |
|
57 // User's home directory. |
|
58 extern char *home_directory; |
|
59 |
|
60 // Guess what? |
|
61 extern char *the_current_working_directory; |
|
62 |
1613
|
63 // The path that will be searched for programs that we execute. |
|
64 extern char *exec_path; |
|
65 |
1
|
66 // Load path specified on command line. |
|
67 extern char *load_path; |
|
68 |
186
|
69 // Name of the info file specified on command line. |
|
70 extern char *info_file; |
|
71 |
1613
|
72 // Name of the info reader we'd like to use. |
|
73 extern char *info_prog; |
|
74 |
195
|
75 // Name of the editor to be invoked by the edit_history command. |
|
76 extern char *editor; |
|
77 |
1
|
78 // If nonzero, don't do fancy line editing. |
|
79 extern int no_line_editing; |
|
80 |
792
|
81 // If nonzero, print verbose info in some cases. |
|
82 extern int verbose_flag; |
|
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 |
1355
|
102 // The command-line options. |
1572
|
103 extern charMatrix octave_argv; |
1355
|
104 |
1516
|
105 // Nonzero means that input is coming from a file that was named on |
|
106 // the command line. |
|
107 extern int input_from_command_line_file; |
|
108 |
1
|
109 #endif |
|
110 |
|
111 /* |
|
112 ;;; Local Variables: *** |
|
113 ;;; mode: C++ *** |
|
114 ;;; page-delimiter: "^/\\*" *** |
|
115 ;;; End: *** |
|
116 */ |