1
|
1 // input.h -*- C++ -*- |
|
2 /* |
|
3 |
269
|
4 Copyright (C) 1992, 1993, 1994 John W. Eaton |
1
|
5 |
|
6 This file is part of Octave. |
|
7 |
|
8 Octave is free software; you can redistribute it and/or modify it |
|
9 under the terms of the GNU General Public License as published by the |
|
10 Free Software Foundation; either version 2, or (at your option) any |
|
11 later version. |
|
12 |
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
16 for more details. |
|
17 |
|
18 You should have received a copy of the GNU General Public License |
|
19 along with Octave; see the file COPYING. If not, write to the Free |
|
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|
21 |
|
22 */ |
|
23 |
|
24 // Use the GNU readline library for command line editing and hisory. |
|
25 |
|
26 #if !defined (_input_h) |
|
27 #define _input_h 1 |
|
28 |
|
29 #include <stdio.h> |
|
30 |
|
31 extern int octave_read (char *buf, int max_size); |
|
32 extern FILE *get_input_from_file (char *name, int warn = 1); |
|
33 extern FILE *get_input_from_stdin (void); |
|
34 extern void initialize_readline (void); |
|
35 |
|
36 // Global pointer for eval(). |
164
|
37 extern const char *current_eval_string; |
1
|
38 |
|
39 // Nonzero means get input from current_eval_string. |
|
40 extern int get_input_from_eval_string; |
|
41 |
|
42 // Nonzero means we're parsing an M-file. |
|
43 extern int reading_m_file; |
|
44 |
|
45 // Simple name of M-file we are reading. |
|
46 extern char *curr_m_file_name; |
|
47 |
|
48 // Nonzero means we're parsing a script file. |
|
49 extern int reading_script_file; |
|
50 |
|
51 // If we are reading from an M-file, this is it. |
|
52 extern FILE *mf_instream; |
|
53 |
|
54 // Nonzero means we are using readline. |
|
55 extern int using_readline; |
|
56 |
|
57 // Nonzero means commands are echoed as they are executed (-x). |
|
58 extern int echo_input; |
|
59 |
|
60 // Nonzero means this is an interactive shell. |
|
61 extern int interactive; |
|
62 |
|
63 // Nonzero means the user forced this shell to be interactive (-i). |
|
64 extern int forced_interactive; |
|
65 |
|
66 // Should we issue a prompt? |
|
67 extern int promptflag; |
|
68 |
|
69 // A line of input. |
|
70 extern char *current_input_line; |
|
71 |
|
72 extern "C" |
|
73 { |
|
74 char *gnu_readline (char *s); |
|
75 } |
|
76 |
|
77 #endif |
|
78 |
|
79 /* |
|
80 ;;; Local Variables: *** |
|
81 ;;; mode: C++ *** |
|
82 ;;; page-delimiter: "^/\\*" *** |
|
83 ;;; End: *** |
|
84 */ |