Make sure rl_instream defaults to NULL and add rl_outstream.

This commit is contained in:
Joachim Nilsson 2010-08-05 02:00:35 +02:00
parent 5de90af58f
commit 27fcc878a1
2 changed files with 5 additions and 2 deletions

View File

@ -47,6 +47,8 @@ extern int rl_mark;
extern int rl_end; extern int rl_end;
extern char *rl_line_buffer; extern char *rl_line_buffer;
extern const char *rl_readline_name; extern const char *rl_readline_name;
extern FILE *rl_instream; /* The stdio stream from which input is read. Defaults to stdin if NULL - Not supported yet! */
extern FILE *rl_outstream; /* The stdio stream to which output is flushed. Defaults to stdout if NULL - Not supported yet! */
extern int el_no_echo; /* e.g under emacs, don't echo except prompt */ extern int el_no_echo; /* e.g under emacs, don't echo except prompt */
extern int el_hist_size; /* size of history scrollback buffer, default: 15 */ extern int el_hist_size; /* size of history scrollback buffer, default: 15 */

View File

@ -113,8 +113,9 @@ int rl_end;
int rl_meta_chars = 0; /* Display 8-bit chars as the actual char(0) or as `M-x'(1)? */ int rl_meta_chars = 0; /* Display 8-bit chars as the actual char(0) or as `M-x'(1)? */
char *rl_line_buffer; char *rl_line_buffer;
const char *rl_prompt; const char *rl_prompt;
const char *rl_readline_name;/* Set by calling program, for conditional parsing of ~/.inputrc - Not supported yet! */ const char *rl_readline_name; /* Set by calling program, for conditional parsing of ~/.inputrc - Not supported yet! */
FILE *rl_instream; FILE *rl_instream = NULL; /* The stdio stream from which input is read. Defaults to stdin if NULL - Not supported yet! */
FILE *rl_outstream = NULL; /* The stdio stream to which output is flushed. Defaults to stdout if NULL - Not supported yet! */
/* User definable callbacks. */ /* User definable callbacks. */
char **(*rl_attempted_completion_function)(const char *token, int start, int end); char **(*rl_attempted_completion_function)(const char *token, int start, int end);