From 0fde38cd434c19ecb1083f03b2806d52f53cec9c Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Wed, 18 Mar 2009 08:30:29 +0100 Subject: [PATCH] Cosmetics. --- selector.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/selector.cc b/selector.cc index f8d133e..42c36a3 100644 --- a/selector.cc +++ b/selector.cc @@ -56,16 +56,14 @@ int use_regexp = 0; ////////////////////////////////////////////////////////////////////// -// This looks severely Linux-only ... - -void inject_into_tty_buffer(char *line) { +void inject_into_tty_buffer(char *string) { struct termios oldtio, newtio; - tcgetattr(STDIN_FILENO,&oldtio); + tcgetattr(STDIN_FILENO, &oldtio); memset(&newtio, 0, sizeof(newtio)); // Set input mode (non-canonical, *no echo*,...) tcsetattr(STDIN_FILENO, TCSANOW, &newtio); - // Put the selected line in the tty input buffer - for(char *k = line; *k; k++) { + // Put the selected string in the tty input buffer + for(char *k = string; *k; k++) { ioctl(STDIN_FILENO, TIOCSTI, k); } // Restore the old settings -- 2.39.5