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 |
1750
|
31 #include <string> |
|
32 |
1755
|
33 extern int octave_read (char *buf, unsigned max_size); |
1750
|
34 extern FILE *get_input_from_file (const string& name, int warn = 1); |
1
|
35 extern FILE *get_input_from_stdin (void); |
|
36 extern void initialize_readline (void); |
|
37 |
|
38 // Global pointer for eval(). |
1755
|
39 extern string current_eval_string; |
1
|
40 |
|
41 // Nonzero means get input from current_eval_string. |
|
42 extern int get_input_from_eval_string; |
|
43 |
338
|
44 // Nonzero means we're parsing a function file. |
|
45 extern int 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 |
|
53 // Nonzero means we're parsing a script file. |
|
54 extern int reading_script_file; |
|
55 |
|
56 // If we are reading from an M-file, this is it. |
339
|
57 extern FILE *ff_instream; |
1
|
58 |
|
59 // Nonzero means we are using readline. |
|
60 extern int using_readline; |
|
61 |
|
62 // Nonzero means this is an interactive shell. |
|
63 extern int interactive; |
|
64 |
|
65 // Nonzero means the user forced this shell to be interactive (-i). |
|
66 extern int forced_interactive; |
|
67 |
|
68 // Should we issue a prompt? |
|
69 extern int promptflag; |
|
70 |
|
71 // A line of input. |
1755
|
72 extern string current_input_line; |
1
|
73 |
1362
|
74 char *gnu_readline (const char *s); |
1
|
75 |
|
76 #endif |
|
77 |
|
78 /* |
|
79 ;;; Local Variables: *** |
|
80 ;;; mode: C++ *** |
|
81 ;;; page-delimiter: "^/\\*" *** |
|
82 ;;; End: *** |
|
83 */ |