summaryrefslogtreecommitdiff
path: root/src/terminal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/terminal.c')
-rw-r--r--src/terminal.c15
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);
+}
+