diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-07-02 21:15:39 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-07-02 21:15:39 +0200 |
commit | 830ac85aba11ca56f610e3119b7d92a9e9de18ac (patch) | |
tree | 8f8ce65176bfa5b1df36bacf0235e6d0a1654c6b /src/terminal.c | |
parent | 2c7a776e8882b7896090a24dc09ccd42e6f8a6ca (diff) | |
download | pianobar-830ac85aba11ca56f610e3119b7d92a9e9de18ac.tar.gz pianobar-830ac85aba11ca56f610e3119b7d92a9e9de18ac.tar.bz2 pianobar-830ac85aba11ca56f610e3119b7d92a9e9de18ac.zip |
Enable echoing on early return, too
See commit a6c521fecd91867c6e184106f4e63445d1cb158a
Diffstat (limited to 'src/terminal.c')
-rw-r--r-- | src/terminal.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/terminal.c b/src/terminal.c index 09d0fe8..ab96004 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -56,3 +56,18 @@ void BarTermSetBuffer (char enable) { } tcsetattr(fileno (stdin), TCSANOW, &termopts); } + +/* Save old terminal settings + * @param save settings here + */ +inline void BarTermSave (struct termios *termOrig) { + tcgetattr (fileno (stdin), termOrig); +} + +/* Restore terminal settings + * @param Old settings + */ +inline void BarTermRestore (struct termios *termOrig) { + tcsetattr (fileno (stdin), TCSANOW, termOrig); +} + |