diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-02-09 02:11:24 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-02-09 02:11:24 +0000 |
commit | 31ca54aa86a90052f8fe73fda66c7f39fd5079bc (patch) | |
tree | 91bf4097b9145323fd2aee645a2a42348e33b22e /cli.c | |
parent | e9cf357a99dcd2db14635974289e04f5f0808123 (diff) |
- itojun@cvs.openbsd.org 2001/02/08 19:30:52
sync with netbsd tree changes.
- more strict prototypes, include necessary headers
- use paths.h/pathnames.h decls
- size_t typecase to int -> u_long
Diffstat (limited to 'cli.c')
-rw-r--r-- | cli.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -1,8 +1,9 @@ #include "includes.h" -RCSID("$OpenBSD: cli.c,v 1.7 2001/02/04 15:32:23 stevesk Exp $"); +RCSID("$OpenBSD: cli.c,v 1.8 2001/02/08 19:30:51 itojun Exp $"); #include "xmalloc.h" #include "log.h" +#include "cli.h" static int cli_input = -1; static int cli_output = -1; @@ -31,7 +32,7 @@ cli_open(int from_stdin) cli_input = STDIN_FILENO; cli_output = STDERR_FILENO; } else { - cli_input = cli_output = open("/dev/tty", O_RDWR); + cli_input = cli_output = open(_PATH_TTY, O_RDWR); if (cli_input < 0) fatal("You have no controlling tty. Cannot read passphrase."); } @@ -42,7 +43,7 @@ cli_open(int from_stdin) } static void -cli_close() +cli_close(void) { if (!cli_from_stdin && cli_input >= 0) close(cli_input); @@ -53,13 +54,13 @@ cli_close() } void -intrcatch() +intrcatch(int sig) { intr = 1; } static void -cli_echo_disable() +cli_echo_disable(void) { sigemptyset(&nset); sigaddset(&nset, SIGTSTP); @@ -82,7 +83,7 @@ cli_echo_disable() } static void -cli_echo_restore() +cli_echo_restore(void) { if (echo_modified != 0) { tcsetattr(cli_input, TCSANOW, &otio); |