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