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 |
3255
|
32 #include "oct-time.h" |
|
33 |
3707
|
34 class octave_value; |
|
35 class octave_value_list; |
|
36 |
1755
|
37 extern int octave_read (char *buf, unsigned max_size); |
3523
|
38 extern FILE *get_input_from_file (const std::string& name, int warn = 1); |
1
|
39 extern FILE *get_input_from_stdin (void); |
|
40 |
|
41 // Global pointer for eval(). |
3523
|
42 extern std::string current_eval_string; |
1
|
43 |
3019
|
44 // TRUE means get input from current_eval_string. |
|
45 extern bool get_input_from_eval_string; |
1
|
46 |
3019
|
47 // TRUE means we're parsing a function file. |
|
48 extern bool reading_fcn_file; |
1
|
49 |
1606
|
50 // Simple name of function file we are reading. |
3523
|
51 extern std::string curr_fcn_file_name; |
1606
|
52 |
|
53 // Full name of file we are reading. |
3523
|
54 extern std::string curr_fcn_file_full_name; |
1
|
55 |
3019
|
56 // TRUE means we're parsing a script file. |
|
57 extern bool reading_script_file; |
1
|
58 |
|
59 // If we are reading from an M-file, this is it. |
339
|
60 extern FILE *ff_instream; |
1
|
61 |
3019
|
62 // TRUE means this is an interactive shell. |
|
63 extern bool interactive; |
1
|
64 |
3019
|
65 // TRUE means the user forced this shell to be interactive (-i). |
|
66 extern bool forced_interactive; |
1
|
67 |
|
68 // Should we issue a prompt? |
|
69 extern int promptflag; |
|
70 |
|
71 // A line of input. |
3523
|
72 extern std::string current_input_line; |
1
|
73 |
2299
|
74 // TRUE after a call to completion_matches(). |
|
75 extern bool octave_completion_matches_called; |
|
76 |
3523
|
77 extern std::string gnu_readline (const std::string& s, bool force_readline = false); |
2927
|
78 |
|
79 extern void initialize_command_input (void); |
1
|
80 |
3707
|
81 extern octave_value do_keyboard (const octave_value_list& args); |
|
82 |
3523
|
83 extern std::string Vps4; |
2181
|
84 |
3019
|
85 enum echo_state |
|
86 { |
|
87 ECHO_OFF = 0, |
|
88 ECHO_SCRIPTS = 1, |
|
89 ECHO_FUNCTIONS = 2, |
|
90 ECHO_CMD_LINE = 4 |
|
91 }; |
|
92 |
|
93 extern int Vecho_executing_commands; |
|
94 |
3255
|
95 extern octave_time Vlast_prompt_time; |
3165
|
96 |
1
|
97 #endif |
|
98 |
|
99 /* |
|
100 ;;; Local Variables: *** |
|
101 ;;; mode: C++ *** |
|
102 ;;; End: *** |
|
103 */ |