1 |
|
/* -*-C-*- */ |
2 |
/* |
/* |
3 |
Copyright (C) 2000 Tuukka Toivonen <tuukkat AT ee.oulu.fi> |
Copyright (C) 2000 Tuukka Toivonen <tuukkat AT ee.oulu.fi> |
4 |
|
|
54 |
|
|
55 |
int readline_on = 0; /* On (1) or off (0) */ |
int readline_on = 0; /* On (1) or off (0) */ |
56 |
static int rl_ungetc_em_char = -1; |
static int rl_ungetc_em_char = -1; |
57 |
static unsigned char *rl_putc_em_line = NULL; |
static char *rl_putc_em_line = NULL; |
58 |
|
|
59 |
#ifdef RL_COMPLETION |
#ifdef RL_COMPLETION |
60 |
|
|
230 |
int rl_putc_em(int c, FILE *f) { |
int rl_putc_em(int c, FILE *f) { |
231 |
static int allocated_length = 0; |
static int allocated_length = 0; |
232 |
static int current_length = 0; |
static int current_length = 0; |
233 |
unsigned char *old_line; |
char *old_line; |
234 |
|
|
235 |
if (f!=stdout || !isatty(fileno(f)) || !readline_on) goto tail; |
if (f!=stdout || !isatty(fileno(f)) || !readline_on) goto tail; |
236 |
|
|
260 |
} |
} |
261 |
|
|
262 |
int rl_getc_em(FILE *f) { |
int rl_getc_em(FILE *f) { |
263 |
static unsigned char *line = NULL; |
static char *line = NULL; |
264 |
static int linepos = 0; |
static int linepos = 0; |
265 |
int r; |
int r; |
266 |
|
|