Mercurial > hg > octave-nkf
annotate src/input.h @ 7752:40c428ea3408
initial implementation of dbup and dbdown
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 04 May 2008 03:42:19 -0400 |
parents | 905bceea061b |
children | 6b521b1e3631 |
rev | line source |
---|---|
1 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, |
4 2002, 2005, 2006, 2007 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 | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
1 | 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 | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
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 | |
3255 | 33 #include "oct-time.h" |
6208 | 34 #include "oct-obj.h" |
3770 | 35 #include "pager.h" |
3255 | 36 |
3707 | 37 class octave_value; |
38 | |
1755 | 39 extern int octave_read (char *buf, unsigned max_size); |
3523 | 40 extern FILE *get_input_from_file (const std::string& name, int warn = 1); |
1 | 41 extern FILE *get_input_from_stdin (void); |
42 | |
43 // Global pointer for eval(). | |
3523 | 44 extern std::string current_eval_string; |
1 | 45 |
3019 | 46 // TRUE means get input from current_eval_string. |
47 extern bool get_input_from_eval_string; | |
1 | 48 |
3877 | 49 // TRUE means we haven't been asked for the input from |
50 // current_eval_string yet. | |
51 extern bool input_from_eval_string_pending; | |
52 | |
5189 | 53 // TRUE means that input is coming from a file that was named on |
54 // the command line. | |
55 extern bool input_from_command_line_file; | |
56 | |
3019 | 57 // TRUE means we're parsing a function file. |
58 extern bool reading_fcn_file; | |
1 | 59 |
1606 | 60 // Simple name of function file we are reading. |
3523 | 61 extern std::string curr_fcn_file_name; |
1606 | 62 |
63 // Full name of file we are reading. | |
3523 | 64 extern std::string curr_fcn_file_full_name; |
1 | 65 |
3019 | 66 // TRUE means we're parsing a script file. |
67 extern bool reading_script_file; | |
1 | 68 |
69 // If we are reading from an M-file, this is it. | |
339 | 70 extern FILE *ff_instream; |
1 | 71 |
3019 | 72 // TRUE means this is an interactive shell. |
73 extern bool interactive; | |
1 | 74 |
3019 | 75 // TRUE means the user forced this shell to be interactive (-i). |
76 extern bool forced_interactive; | |
1 | 77 |
78 // Should we issue a prompt? | |
79 extern int promptflag; | |
80 | |
81 // A line of input. | |
3523 | 82 extern std::string current_input_line; |
1 | 83 |
3804 | 84 // TRUE after a call to completion_matches. |
2299 | 85 extern bool octave_completion_matches_called; |
86 | |
7409 | 87 // TRUE if the plotting system has requested a call to drawnow at |
88 // the next user prompt. | |
7414 | 89 extern OCTINTERP_API bool Vdrawnow_requested; |
7409 | 90 |
7752
40c428ea3408
initial implementation of dbup and dbdown
John W. Eaton <jwe@octave.org>
parents:
7414
diff
changeset
|
91 // TRUE if we are in debugging mode. |
40c428ea3408
initial implementation of dbup and dbdown
John W. Eaton <jwe@octave.org>
parents:
7414
diff
changeset
|
92 extern bool Vdebugging; |
40c428ea3408
initial implementation of dbup and dbdown
John W. Eaton <jwe@octave.org>
parents:
7414
diff
changeset
|
93 |
3523 | 94 extern std::string gnu_readline (const std::string& s, bool force_readline = false); |
2927 | 95 |
96 extern void initialize_command_input (void); | |
1 | 97 |
5640 | 98 extern bool octave_yes_or_no (const std::string& prompt); |
99 | |
3770 | 100 extern octave_value do_keyboard (const octave_value_list& args = octave_value_list ()); |
3707 | 101 |
5794 | 102 extern std::string VPS4; |
2181 | 103 |
3019 | 104 enum echo_state |
105 { | |
106 ECHO_OFF = 0, | |
107 ECHO_SCRIPTS = 1, | |
108 ECHO_FUNCTIONS = 2, | |
109 ECHO_CMD_LINE = 4 | |
110 }; | |
111 | |
112 extern int Vecho_executing_commands; | |
113 | |
3255 | 114 extern octave_time Vlast_prompt_time; |
3165 | 115 |
1 | 116 #endif |
117 | |
118 /* | |
119 ;;; Local Variables: *** | |
120 ;;; mode: C++ *** | |
121 ;;; End: *** | |
122 */ |