annotate src/toplev.h @ 2891:1a30f46e1870

[project @ 1997-04-28 01:49:00 by jwe]
author jwe
date Mon, 28 Apr 1997 02:01:22 +0000
parents 00c0cd0f2ee7
children 64ff56723e75
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
1 /*
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
2
2847
8b262e771614 [project @ 1997-03-27 16:18:26 by jwe]
jwe
parents: 2806
diff changeset
3 Copyright (C) 1996, 1997 John W. Eaton
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
4
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
6
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
7 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
8 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
9 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
10 later version.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
11
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
12 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
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
14 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
15 for more details.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
16
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
17 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
18 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
19 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
20
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
1670
6708c53892c1 [project @ 1995-12-27 04:33:00 by jwe]
jwe
parents: 1613
diff changeset
23 #if !defined (octave_toplev_h)
6708c53892c1 [project @ 1995-12-27 04:33:00 by jwe]
jwe
parents: 1613
diff changeset
24 #define octave_toplev_h 1
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
25
1355
94697d007075 [project @ 1995-09-05 20:04:15 by jwe]
jwe
parents: 1315
diff changeset
26 #include <cstdio>
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
27
2086
bfb775fb6fe8 [project @ 1996-04-25 05:55:19 by jwe]
jwe
parents: 2077
diff changeset
28 class octave_value;
2796
74bc1ede3c3d [project @ 1997-03-07 06:55:47 by jwe]
jwe
parents: 2440
diff changeset
29 class octave_value_list;
2891
1a30f46e1870 [project @ 1997-04-28 01:49:00 by jwe]
jwe
parents: 2859
diff changeset
30 class octave_user_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
2796
74bc1ede3c3d [project @ 1997-03-07 06:55:47 by jwe]
jwe
parents: 2440
diff changeset
36 extern void
74bc1ede3c3d [project @ 1997-03-07 06:55:47 by jwe]
jwe
parents: 2440
diff changeset
37 clean_up_and_exit (int) GCC_ATTR_NORETURN;
574
a10f1c8ab10f [project @ 1994-07-29 18:29:13 by jwe]
jwe
parents: 383
diff changeset
38
2796
74bc1ede3c3d [project @ 1997-03-07 06:55:47 by jwe]
jwe
parents: 2440
diff changeset
39 extern void
2859
00c0cd0f2ee7 [project @ 1997-03-31 19:02:32 by jwe]
jwe
parents: 2847
diff changeset
40 parse_and_execute (FILE *f, bool print = false);
1604
583476712438 [project @ 1995-11-02 10:30:06 by jwe]
jwe
parents: 1572
diff changeset
41
2796
74bc1ede3c3d [project @ 1997-03-07 06:55:47 by jwe]
jwe
parents: 2440
diff changeset
42 extern void
2859
00c0cd0f2ee7 [project @ 1997-03-31 19:02:32 by jwe]
jwe
parents: 2847
diff changeset
43 parse_and_execute (const string& s, bool print = false, bool verbose = false,
2796
74bc1ede3c3d [project @ 1997-03-07 06:55:47 by jwe]
jwe
parents: 2440
diff changeset
44 const char *warn_for = 0);
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
45
2796
74bc1ede3c3d [project @ 1997-03-07 06:55:47 by jwe]
jwe
parents: 2440
diff changeset
46 extern octave_value
2859
00c0cd0f2ee7 [project @ 1997-03-31 19:02:32 by jwe]
jwe
parents: 2847
diff changeset
47 eval_string (const string&, bool print, int& parse_status);
1488
89c587478067 [project @ 1995-09-26 22:49:48 by jwe]
jwe
parents: 1426
diff changeset
48
2796
74bc1ede3c3d [project @ 1997-03-07 06:55:47 by jwe]
jwe
parents: 2440
diff changeset
49 extern int
74bc1ede3c3d [project @ 1997-03-07 06:55:47 by jwe]
jwe
parents: 2440
diff changeset
50 main_loop (void);
1907
8c6cea97eb80 [project @ 1996-02-10 01:12:46 by jwe]
jwe
parents: 1884
diff changeset
51
2796
74bc1ede3c3d [project @ 1997-03-07 06:55:47 by jwe]
jwe
parents: 2440
diff changeset
52 extern void
74bc1ede3c3d [project @ 1997-03-07 06:55:47 by jwe]
jwe
parents: 2440
diff changeset
53 do_octave_atexit (void);
2077
2d03b8eb891d [project @ 1996-04-24 00:21:21 by jwe]
jwe
parents: 1996
diff changeset
54
2806
187d5321cfa3 [project @ 1997-03-11 05:13:15 by jwe]
jwe
parents: 2796
diff changeset
55 extern void
187d5321cfa3 [project @ 1997-03-11 05:13:15 by jwe]
jwe
parents: 2796
diff changeset
56 symbols_of_toplev (void);
187d5321cfa3 [project @ 1997-03-11 05:13:15 by jwe]
jwe
parents: 2796
diff changeset
57
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
58 // argv[0] for this program.
2204
a24158362f9f [project @ 1996-05-15 06:09:42 by jwe]
jwe
parents: 2086
diff changeset
59 extern string Vprogram_invocation_name;
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
60
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
61 // Cleaned-up name of this program, not including path information.
2204
a24158362f9f [project @ 1996-05-15 06:09:42 by jwe]
jwe
parents: 2086
diff changeset
62 extern string Vprogram_name;
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
63
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
64 // Login name for user running this program.
2204
a24158362f9f [project @ 1996-05-15 06:09:42 by jwe]
jwe
parents: 2086
diff changeset
65 extern string Vuser_name;
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
66
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
67 // Name of the host we are running on.
2204
a24158362f9f [project @ 1996-05-15 06:09:42 by jwe]
jwe
parents: 2086
diff changeset
68 extern string Vhost_name;
1613
f18871f4df2b [project @ 1995-11-03 12:06:56 by jwe]
jwe
parents: 1605
diff changeset
69
2204
a24158362f9f [project @ 1996-05-15 06:09:42 by jwe]
jwe
parents: 2086
diff changeset
70 // Home directory for the current user.
a24158362f9f [project @ 1996-05-15 06:09:42 by jwe]
jwe
parents: 2086
diff changeset
71 extern string Vhome_directory;
195
13c6086c325c [project @ 1993-11-06 10:12:29 by jwe]
jwe
parents: 186
diff changeset
72
1822
3a47ca3dd227 [project @ 1996-02-01 08:06:35 by jwe]
jwe
parents: 1755
diff changeset
73 // Nonzero means we are using readline.
3a47ca3dd227 [project @ 1996-02-01 08:06:35 by jwe]
jwe
parents: 1755
diff changeset
74 extern int using_readline;
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
75
1671
8da30a147e27 [project @ 1995-12-27 04:56:15 by jwe]
jwe
parents: 1670
diff changeset
76 // Nonzero means we printed messages about reading startup files.
8da30a147e27 [project @ 1995-12-27 04:56:15 by jwe]
jwe
parents: 1670
diff changeset
77 extern int reading_startup_message_printed;
8da30a147e27 [project @ 1995-12-27 04:56:15 by jwe]
jwe
parents: 1670
diff changeset
78
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
79 // Command number, counting from the beginning of this session.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
80 extern int current_command_number;
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
81
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
82 // 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
83 extern int quitting_gracefully;
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
84
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
85 // Current command to execute.
578
d169be9237fb [project @ 1994-08-03 20:06:54 by jwe]
jwe
parents: 574
diff changeset
86 extern tree_statement_list *global_command;
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
87
206
1761d7a3770c [project @ 1993-11-10 21:00:31 by jwe]
jwe
parents: 195
diff changeset
88 // Pointer to function that is currently being evaluated.
2891
1a30f46e1870 [project @ 1997-04-28 01:49:00 by jwe]
jwe
parents: 2859
diff changeset
89 extern octave_user_function *curr_function;
206
1761d7a3770c [project @ 1993-11-10 21:00:31 by jwe]
jwe
parents: 195
diff changeset
90
315
260863721a51 [project @ 1994-01-28 04:22:45 by jwe]
jwe
parents: 206
diff changeset
91 // Nonzero means input is coming from startup file.
260863721a51 [project @ 1994-01-28 04:22:45 by jwe]
jwe
parents: 206
diff changeset
92 extern int input_from_startup_file;
260863721a51 [project @ 1994-01-28 04:22:45 by jwe]
jwe
parents: 206
diff changeset
93
1516
14d8c0a838c1 [project @ 1995-10-03 13:21:12 by jwe]
jwe
parents: 1488
diff changeset
94 // 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
95 // the command line.
14d8c0a838c1 [project @ 1995-10-03 13:21:12 by jwe]
jwe
parents: 1488
diff changeset
96 extern int input_from_command_line_file;
14d8c0a838c1 [project @ 1995-10-03 13:21:12 by jwe]
jwe
parents: 1488
diff changeset
97
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
98 #endif
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
99
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
100 /*
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
101 ;;; Local Variables: ***
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
102 ;;; mode: C++ ***
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
103 ;;; End: ***
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
104 */