annotate src/toplev.h @ 1884:e62277bf5fe0

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