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