diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-05-19 09:48:17 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-05-19 09:48:17 +0000 |
commit | 5e25ddb7d369b6785ec3aaa96cbc0521c22aeb0d (patch) | |
tree | 44b7cf5fb706b0816dd4525782ca8c37d07c2f43 /editors | |
parent | 636a1f85e89432601c59cdc3239fc867b4adf051 (diff) |
- use STD*_FILENO some more. No object-code changes
Diffstat (limited to 'editors')
-rw-r--r-- | editors/ed.c | 2 | ||||
-rw-r--r-- | editors/vi.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/editors/ed.c b/editors/ed.c index 2f3bf03bf..0961cc38e 100644 --- a/editors/ed.c +++ b/editors/ed.c @@ -825,7 +825,7 @@ static int printLines(int num1, int num2, int expandFlag) while (num1 <= num2) { if (!expandFlag) { - write(1, lp->data, lp->len); + write(STDOUT_FILENO, lp->data, lp->len); setCurNum(num1++); lp = lp->next; continue; diff --git a/editors/vi.c b/editors/vi.c index dded6edb3..1770d98c5 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -2220,7 +2220,7 @@ static char readit(void) // read (maybe cursor) key from stdin // get input from User- are there already input chars in Q? if (n <= 0) { // the Q is empty, wait for a typed char - n = safe_read(0, readbuffer, sizeof(readbuffer)); + n = safe_read(STDIN_FILENO, readbuffer, sizeof(readbuffer)); if (n < 0) { if (errno == EBADF || errno == EFAULT || errno == EINVAL || errno == EIO) @@ -2243,7 +2243,7 @@ static char readit(void) // read (maybe cursor) key from stdin && ((size_t)n <= (sizeof(readbuffer) - 8)) ) { // read the rest of the ESC string - int r = safe_read(0, readbuffer + n, sizeof(readbuffer) - n); + int r = safe_read(STDIN_FILENO, readbuffer + n, sizeof(readbuffer) - n); if (r > 0) n += r; } @@ -4035,7 +4035,7 @@ static void crash_test() printf("\n\n%d: \'%c\' %s\n\n\n%s[Hit return to continue]%s", totalcmds, last_input_char, msg, SOs, SOn); fflush(stdout); - while (safe_read(0, d, 1) > 0) { + while (safe_read(STDIN_FILENO, d, 1) > 0) { if (d[0] == '\n' || d[0] == '\r') break; } |