Mercurial > hg > octave-nkf
annotate src/input.h @ 12385:c468c5b902b3 release-3-4-x ss-3-3-92
version is now 3.3.92
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 06 Feb 2011 06:27:19 -0500 |
parents | fd0a3ac60b0e |
children | 72c96de7a403 |
rev | line source |
---|---|
1 | 1 /* |
2 | |
11523 | 3 Copyright (C) 1993-2011 John W. Eaton |
1 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
1 | 11 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
1 | 20 |
21 */ | |
22 | |
23 // Use the GNU readline library for command line editing and hisory. | |
24 | |
383 | 25 #if !defined (octave_input_h) |
26 #define octave_input_h 1 | |
1 | 27 |
1342 | 28 #include <cstdio> |
1 | 29 |
1750 | 30 #include <string> |
31 | |
3255 | 32 #include "oct-time.h" |
6208 | 33 #include "oct-obj.h" |
3770 | 34 #include "pager.h" |
3255 | 35 |
3707 | 36 class octave_value; |
37 | |
9247
b2790fd23800
More export symbols to allow usage from an IDE.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9237
diff
changeset
|
38 extern OCTINTERP_API int octave_read (char *buf, unsigned max_size); |
b2790fd23800
More export symbols to allow usage from an IDE.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9237
diff
changeset
|
39 extern OCTINTERP_API FILE *get_input_from_file (const std::string& name, int warn = 1); |
b2790fd23800
More export symbols to allow usage from an IDE.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9237
diff
changeset
|
40 extern OCTINTERP_API FILE *get_input_from_stdin (void); |
1 | 41 |
42 // Global pointer for eval(). | |
3523 | 43 extern std::string current_eval_string; |
1 | 44 |
3019 | 45 // TRUE means get input from current_eval_string. |
46 extern bool get_input_from_eval_string; | |
1 | 47 |
3877 | 48 // TRUE means we haven't been asked for the input from |
49 // current_eval_string yet. | |
50 extern bool input_from_eval_string_pending; | |
51 | |
5189 | 52 // TRUE means that input is coming from a file that was named on |
53 // the command line. | |
54 extern bool input_from_command_line_file; | |
55 | |
9999
653716f3d976
get_debug_input: force interactive input mode; don't get user input unless stdin is a tty
John W. Eaton <jwe@octave.org>
parents:
9476
diff
changeset
|
56 // TRUE means that stdin is a terminal, not a pipe or redirected file. |
653716f3d976
get_debug_input: force interactive input mode; don't get user input unless stdin is a tty
John W. Eaton <jwe@octave.org>
parents:
9476
diff
changeset
|
57 extern bool stdin_is_tty; |
653716f3d976
get_debug_input: force interactive input mode; don't get user input unless stdin is a tty
John W. Eaton <jwe@octave.org>
parents:
9476
diff
changeset
|
58 |
3019 | 59 // TRUE means we're parsing a function file. |
60 extern bool reading_fcn_file; | |
1 | 61 |
1606 | 62 // Simple name of function file we are reading. |
3523 | 63 extern std::string curr_fcn_file_name; |
1606 | 64 |
65 // Full name of file we are reading. | |
3523 | 66 extern std::string curr_fcn_file_full_name; |
1 | 67 |
3019 | 68 // TRUE means we're parsing a script file. |
69 extern bool reading_script_file; | |
1 | 70 |
9476 | 71 // TRUE means we're parsing a classdef file. |
72 extern bool reading_classdef_file; | |
73 | |
1 | 74 // If we are reading from an M-file, this is it. |
339 | 75 extern FILE *ff_instream; |
1 | 76 |
3019 | 77 // TRUE means this is an interactive shell. |
78 extern bool interactive; | |
1 | 79 |
3019 | 80 // TRUE means the user forced this shell to be interactive (-i). |
81 extern bool forced_interactive; | |
1 | 82 |
83 // Should we issue a prompt? | |
84 extern int promptflag; | |
85 | |
86 // A line of input. | |
3523 | 87 extern std::string current_input_line; |
1 | 88 |
3804 | 89 // TRUE after a call to completion_matches. |
2299 | 90 extern bool octave_completion_matches_called; |
91 | |
7409 | 92 // TRUE if the plotting system has requested a call to drawnow at |
93 // the next user prompt. | |
7414 | 94 extern OCTINTERP_API bool Vdrawnow_requested; |
7409 | 95 |
7752
40c428ea3408
initial implementation of dbup and dbdown
John W. Eaton <jwe@octave.org>
parents:
7414
diff
changeset
|
96 // TRUE if we are in debugging mode. |
9237
3c1762c7e787
Add missing xxx_API decoration and remove misplaced ones
Michael Goffioul <michael.goffioul@gmail.com>
parents:
8920
diff
changeset
|
97 extern OCTINTERP_API bool Vdebugging; |
7752
40c428ea3408
initial implementation of dbup and dbdown
John W. Eaton <jwe@octave.org>
parents:
7414
diff
changeset
|
98 |
3523 | 99 extern std::string gnu_readline (const std::string& s, bool force_readline = false); |
2927 | 100 |
101 extern void initialize_command_input (void); | |
1 | 102 |
5640 | 103 extern bool octave_yes_or_no (const std::string& prompt); |
104 | |
3770 | 105 extern octave_value do_keyboard (const octave_value_list& args = octave_value_list ()); |
3707 | 106 |
5794 | 107 extern std::string VPS4; |
2181 | 108 |
7818
5640a70cbab1
Add Ffilemarker and fix for 'dbstep in'
David Bateman <dbateman@free.fr>
parents:
7787
diff
changeset
|
109 extern char Vfilemarker; |
5640a70cbab1
Add Ffilemarker and fix for 'dbstep in'
David Bateman <dbateman@free.fr>
parents:
7787
diff
changeset
|
110 |
3019 | 111 enum echo_state |
112 { | |
113 ECHO_OFF = 0, | |
114 ECHO_SCRIPTS = 1, | |
115 ECHO_FUNCTIONS = 2, | |
116 ECHO_CMD_LINE = 4 | |
117 }; | |
118 | |
119 extern int Vecho_executing_commands; | |
120 | |
3255 | 121 extern octave_time Vlast_prompt_time; |
3165 | 122 |
1 | 123 #endif |