Mercurial > hg > octave-nkf
annotate src/input.h @ 10160:cd96d29c5efa
remove Emacs local-variable settings from source files in src directory
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 20 Jan 2010 20:39:26 -0500 |
parents | 653716f3d976 |
children | fd0a3ac60b0e |
rev | line source |
---|---|
1 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, |
8920 | 4 2002, 2005, 2006, 2007, 2008, 2009 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 | |
9247
b2790fd23800
More export symbols to allow usage from an IDE.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
9237
diff
changeset
|
39 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
|
40 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
|
41 extern OCTINTERP_API FILE *get_input_from_stdin (void); |
1 | 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 | |
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
|
57 // 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
|
58 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
|
59 |
3019 | 60 // TRUE means we're parsing a function file. |
61 extern bool reading_fcn_file; | |
1 | 62 |
1606 | 63 // Simple name of function file we are reading. |
3523 | 64 extern std::string curr_fcn_file_name; |
1606 | 65 |
66 // Full name of file we are reading. | |
3523 | 67 extern std::string curr_fcn_file_full_name; |
1 | 68 |
3019 | 69 // TRUE means we're parsing a script file. |
70 extern bool reading_script_file; | |
1 | 71 |
9476 | 72 // TRUE means we're parsing a classdef file. |
73 extern bool reading_classdef_file; | |
74 | |
1 | 75 // If we are reading from an M-file, this is it. |
339 | 76 extern FILE *ff_instream; |
1 | 77 |
3019 | 78 // TRUE means this is an interactive shell. |
79 extern bool interactive; | |
1 | 80 |
3019 | 81 // TRUE means the user forced this shell to be interactive (-i). |
82 extern bool forced_interactive; | |
1 | 83 |
84 // Should we issue a prompt? | |
85 extern int promptflag; | |
86 | |
87 // A line of input. | |
3523 | 88 extern std::string current_input_line; |
1 | 89 |
3804 | 90 // TRUE after a call to completion_matches. |
2299 | 91 extern bool octave_completion_matches_called; |
92 | |
7409 | 93 // TRUE if the plotting system has requested a call to drawnow at |
94 // the next user prompt. | |
7414 | 95 extern OCTINTERP_API bool Vdrawnow_requested; |
7409 | 96 |
7752
40c428ea3408
initial implementation of dbup and dbdown
John W. Eaton <jwe@octave.org>
parents:
7414
diff
changeset
|
97 // 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
|
98 extern OCTINTERP_API bool Vdebugging; |
7752
40c428ea3408
initial implementation of dbup and dbdown
John W. Eaton <jwe@octave.org>
parents:
7414
diff
changeset
|
99 |
3523 | 100 extern std::string gnu_readline (const std::string& s, bool force_readline = false); |
2927 | 101 |
102 extern void initialize_command_input (void); | |
1 | 103 |
5640 | 104 extern bool octave_yes_or_no (const std::string& prompt); |
105 | |
3770 | 106 extern octave_value do_keyboard (const octave_value_list& args = octave_value_list ()); |
3707 | 107 |
5794 | 108 extern std::string VPS4; |
2181 | 109 |
7818
5640a70cbab1
Add Ffilemarker and fix for 'dbstep in'
David Bateman <dbateman@free.fr>
parents:
7787
diff
changeset
|
110 extern char Vfilemarker; |
5640a70cbab1
Add Ffilemarker and fix for 'dbstep in'
David Bateman <dbateman@free.fr>
parents:
7787
diff
changeset
|
111 |
3019 | 112 enum echo_state |
113 { | |
114 ECHO_OFF = 0, | |
115 ECHO_SCRIPTS = 1, | |
116 ECHO_FUNCTIONS = 2, | |
117 ECHO_CMD_LINE = 4 | |
118 }; | |
119 | |
120 extern int Vecho_executing_commands; | |
121 | |
3255 | 122 extern octave_time Vlast_prompt_time; |
3165 | 123 |
1 | 124 #endif |