diff options
Diffstat (limited to 'examples/rlptytest.c')
-rw-r--r-- | examples/rlptytest.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/examples/rlptytest.c b/examples/rlptytest.c index d170f62..021a868 100644 --- a/examples/rlptytest.c +++ b/examples/rlptytest.c @@ -42,8 +42,7 @@ static int masterfd = -1; static int slavefd; void -sigint (s) - int s; +sigint (int s) { tty_reset (STDIN_FILENO); close (masterfd); @@ -53,14 +52,13 @@ sigint (s) } void -sigwinch (s) - int s; +sigwinch (int s) { rl_resize_terminal (); } static int -user_input() +user_input(void) { int size; const int MAX = 1024; @@ -78,7 +76,7 @@ user_input() } static int -readline_input() +readline_input(void) { const int MAX = 1024; char *buf = (char *)malloc(MAX+1); @@ -124,7 +122,7 @@ rlctx_send_user_command(char *line) } static void -custom_deprep_term_function () +custom_deprep_term_function (void) { } @@ -226,9 +224,10 @@ static enum { RESET, TCBREAK } ttystate = RESET; * * Returns: 0 on success, -1 on error */ -int tty_cbreak(int fd){ +int tty_cbreak(int fd) +{ struct termios buf; - int ttysavefd = -1; + int ttysavefd = -1; if(tcgetattr(fd, &save_termios) < 0) return -1; @@ -316,7 +315,7 @@ int tty_reset(int fd) } int -main() +main(int c, char **v) { int val; |