1
|
1 // input.h -*- C++ -*- |
|
2 /* |
|
3 |
1009
|
4 Copyright (C) 1992, 1993, 1994, 1995 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 |
1315
|
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1
|
21 |
|
22 */ |
|
23 |
|
24 // Use the GNU readline library for command line editing and hisory. |
|
25 |
383
|
26 #if !defined (octave_input_h) |
|
27 #define octave_input_h 1 |
1
|
28 |
1342
|
29 #include <cstdio> |
1
|
30 |
|
31 extern int octave_read (char *buf, int max_size); |
1604
|
32 extern FILE *get_input_from_file (const char *name, int warn = 1); |
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 |
338
|
42 // Nonzero means we're parsing a function file. |
|
43 extern int reading_fcn_file; |
1
|
44 |
1606
|
45 // Simple name of function file we are reading. |
|
46 extern const char *curr_fcn_file_name; |
|
47 |
|
48 // Full name of file we are reading. |
|
49 extern const char *curr_fcn_file_full_name; |
1
|
50 |
|
51 // Nonzero means we're parsing a script file. |
|
52 extern int reading_script_file; |
|
53 |
|
54 // If we are reading from an M-file, this is it. |
339
|
55 extern FILE *ff_instream; |
1
|
56 |
|
57 // Nonzero means we are using readline. |
|
58 extern int using_readline; |
|
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 |
1362
|
72 char *gnu_readline (const char *s); |
1
|
73 |
|
74 #endif |
|
75 |
|
76 /* |
|
77 ;;; Local Variables: *** |
|
78 ;;; mode: C++ *** |
|
79 ;;; page-delimiter: "^/\\*" *** |
|
80 ;;; End: *** |
|
81 */ |