1
|
1 // input.h -*- C++ -*- |
|
2 /* |
|
3 |
|
4 Copyright (C) 1992, 1993 John W. Eaton |
|
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 #ifdef __GNUG__ |
|
30 #pragma interface |
|
31 #endif |
|
32 |
|
33 #include <stdio.h> |
|
34 |
|
35 extern char *octave_gets (void); |
|
36 extern int octave_read (char *buf, int max_size); |
|
37 extern FILE *get_input_from_file (char *name, int warn = 1); |
|
38 extern FILE *get_input_from_stdin (void); |
|
39 extern char *command_generator (char *text, int state); |
|
40 extern char **command_completer (char *text, int start, int end); |
|
41 extern void initialize_readline (void); |
|
42 |
|
43 // Global pointer for eval(). |
|
44 extern char *current_eval_string; |
|
45 |
|
46 // Nonzero means get input from current_eval_string. |
|
47 extern int get_input_from_eval_string; |
|
48 |
|
49 // Nonzero means we're parsing an M-file. |
|
50 extern int reading_m_file; |
|
51 |
|
52 // Simple name of M-file we are reading. |
|
53 extern char *curr_m_file_name; |
|
54 |
|
55 // Nonzero means we're parsing a script file. |
|
56 extern int reading_script_file; |
|
57 |
|
58 // If we are reading from an M-file, this is it. |
|
59 extern FILE *mf_instream; |
|
60 |
|
61 // Nonzero means we are using readline. |
|
62 extern int using_readline; |
|
63 |
|
64 // Nonzero means commands are echoed as they are executed (-x). |
|
65 extern int echo_input; |
|
66 |
|
67 // Nonzero means this is an interactive shell. |
|
68 extern int interactive; |
|
69 |
|
70 // Nonzero means the user forced this shell to be interactive (-i). |
|
71 extern int forced_interactive; |
|
72 |
|
73 // Should we issue a prompt? |
|
74 extern int promptflag; |
|
75 |
|
76 // A line of input. |
|
77 extern char *current_input_line; |
|
78 |
|
79 extern "C" |
|
80 { |
|
81 char *gnu_readline (char *s); |
|
82 } |
|
83 |
|
84 #endif |
|
85 |
|
86 /* |
|
87 ;;; Local Variables: *** |
|
88 ;;; mode: C++ *** |
|
89 ;;; page-delimiter: "^/\\*" *** |
|
90 ;;; End: *** |
|
91 */ |