26 |
|
*/ |
27 |
|
|
28 |
|
#include <sys/cdefs.h> |
29 |
< |
__FBSDID("$FreeBSD: stable/9/bin/ed/io.c 229143 2011-12-31 19:48:04Z dim $"); |
29 |
> |
__FBSDID("$FreeBSD: release/10.0.0/bin/ed/io.c 241737 2012-10-19 14:49:42Z ed $"); |
30 |
|
|
31 |
|
#include "ed.h" |
32 |
|
|
33 |
– |
|
34 |
– |
extern int scripted; |
35 |
– |
|
33 |
|
/* read_file: read a named file/pipe into the buffer; return line count */ |
34 |
|
long |
35 |
|
read_file(char *fn, long n) |
55 |
|
return current_addr - n; |
56 |
|
} |
57 |
|
|
58 |
< |
|
59 |
< |
extern int des; |
63 |
< |
|
64 |
< |
char *sbuf; /* file i/o buffer */ |
65 |
< |
int sbufsz; /* file i/o buffer size */ |
58 |
> |
static char *sbuf; /* file i/o buffer */ |
59 |
> |
static int sbufsz; /* file i/o buffer size */ |
60 |
|
int newline_added; /* if set, newline appended to input file */ |
61 |
|
|
62 |
|
/* read_stream: read a stream into the editor buffer; return status */ |
291 |
|
|
292 |
|
#define ESCAPES "\a\b\f\n\r\t\v\\" |
293 |
|
#define ESCCHARS "abfnrtv\\" |
300 |
– |
|
301 |
– |
extern int rows; |
302 |
– |
extern int cols; |
294 |
|
|
295 |
|
/* put_tty_line: print text to stdout */ |
296 |
|
int |