projects
/
selector.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ee52e85
)
Cosmetics.
author
Francois Fleuret
<francois@fleuret.org>
Wed, 18 Mar 2009 07:30:29 +0000
(08:30 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Wed, 18 Mar 2009 07:30:29 +0000
(08:30 +0100)
selector.cc
patch
|
blob
|
history
diff --git
a/selector.cc
b/selector.cc
index
f8d133e
..
42c36a3
100644
(file)
--- 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;
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);
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
ioctl(STDIN_FILENO, TIOCSTI, k);
}
// Restore the old settings