| 1 |
diff -ruN away-0.9.5-old/away.c away-0.9.5/away.c |
| 2 |
--- away-0.9.5-old/away.c 2002-08-22 07:23:39.000000000 +0200 |
| 3 |
+++ away-0.9.5/away.c 2002-10-08 15:55:50.000000000 +0200 |
| 4 |
@@ -234,9 +234,23 @@ |
| 5 |
|
| 6 |
/* Stall */ |
| 7 |
void stall(void) { |
| 8 |
+ struct termios old, new; |
| 9 |
+ |
| 10 |
printf("\n You went away at %.20s", make_time()); |
| 11 |
printf("\n\n -- Press [Enter] to come back online --\n"); |
| 12 |
+ |
| 13 |
+ /* save term state */ |
| 14 |
+ tcgetattr(0, &old); |
| 15 |
+ new = old; |
| 16 |
+ |
| 17 |
+ /* turn off echo */ |
| 18 |
+ new.c_lflag &= ~ECHO; |
| 19 |
+ tcsetattr(0, TCSANOW, &new); |
| 20 |
getchar(); |
| 21 |
+ |
| 22 |
+ /* reset term */ |
| 23 |
+ tcsetattr(0, TCSANOW, &old); |
| 24 |
+ printf("\n"); |
| 25 |
} |
| 26 |
|
| 27 |
/* Get Current Time */ |
| 28 |
diff -ruN away-0.9.5-old/away.h away-0.9.5/away.h |
| 29 |
--- away-0.9.5-old/away.h 2002-08-12 02:33:03.000000000 +0200 |
| 30 |
+++ away-0.9.5/away.h 2002-10-08 15:51:03.000000000 +0200 |
| 31 |
@@ -58,6 +58,7 @@ |
| 32 |
#include <sys/stat.h> |
| 33 |
#include <security/pam_appl.h> |
| 34 |
#include <security/pam_misc.h> |
| 35 |
+#include <termios.h> |
| 36 |
|
| 37 |
/* Default conf file name */ |
| 38 |
char *rcfile = ".awayrc"; |