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 |
|
23 // Use the GNU readline library for command line editing and hisory. |
|
24 |
383
|
25 #if !defined (octave_input_h) |
|
26 #define octave_input_h 1 |
1
|
27 |
1342
|
28 #include <cstdio> |
1
|
29 |
1750
|
30 #include <string> |
|
31 |
1755
|
32 extern int octave_read (char *buf, unsigned max_size); |
1750
|
33 extern FILE *get_input_from_file (const string& name, int warn = 1); |
1
|
34 extern FILE *get_input_from_stdin (void); |
|
35 |
|
36 // Global pointer for eval(). |
1755
|
37 extern string current_eval_string; |
1
|
38 |
3019
|
39 // TRUE means get input from current_eval_string. |
|
40 extern bool get_input_from_eval_string; |
1
|
41 |
3019
|
42 // TRUE means we're parsing a function file. |
|
43 extern bool reading_fcn_file; |
1
|
44 |
1606
|
45 // Simple name of function file we are reading. |
1755
|
46 extern string curr_fcn_file_name; |
1606
|
47 |
|
48 // Full name of file we are reading. |
1755
|
49 extern string curr_fcn_file_full_name; |
1
|
50 |
3019
|
51 // TRUE means we're parsing a script file. |
|
52 extern bool reading_script_file; |
1
|
53 |
|
54 // If we are reading from an M-file, this is it. |
339
|
55 extern FILE *ff_instream; |
1
|
56 |
3019
|
57 // TRUE means this is an interactive shell. |
|
58 extern bool interactive; |
1
|
59 |
3019
|
60 // TRUE means the user forced this shell to be interactive (-i). |
|
61 extern bool forced_interactive; |
1
|
62 |
|
63 // Should we issue a prompt? |
|
64 extern int promptflag; |
|
65 |
|
66 // A line of input. |
1755
|
67 extern string current_input_line; |
1
|
68 |
2299
|
69 // TRUE after a call to completion_matches(). |
|
70 extern bool octave_completion_matches_called; |
|
71 |
2927
|
72 extern string gnu_readline (const string& s, bool force_readline = false); |
|
73 |
|
74 extern void initialize_command_input (void); |
1
|
75 |
2181
|
76 extern string Vps4; |
|
77 |
3019
|
78 enum echo_state |
|
79 { |
|
80 ECHO_OFF = 0, |
|
81 ECHO_SCRIPTS = 1, |
|
82 ECHO_FUNCTIONS = 2, |
|
83 ECHO_CMD_LINE = 4 |
|
84 }; |
|
85 |
|
86 extern int Vecho_executing_commands; |
|
87 |
1
|
88 #endif |
|
89 |
|
90 /* |
|
91 ;;; Local Variables: *** |
|
92 ;;; mode: C++ *** |
|
93 ;;; End: *** |
|
94 */ |