50 |
#endif |
#endif |
51 |
|
|
52 |
#include <signal.h> |
#include <signal.h> |
53 |
#include <err.h> |
#include <error.h> |
54 |
#include "talk.h" |
#include "talk.h" |
55 |
|
|
56 |
|
RETSIGTYPE |
57 |
|
sig_sent(int sig ARG_UNUSED) |
58 |
|
{ |
59 |
|
|
60 |
|
message("Connection closing. Exiting"); |
61 |
|
quit(); |
62 |
|
} |
63 |
|
|
64 |
/* |
/* |
65 |
* Set up curses, catch the appropriate signals, |
* Set up curses, catch the appropriate signals, |
66 |
* and build the various windows. |
* and build the various windows. |
68 |
int |
int |
69 |
init_display() |
init_display() |
70 |
{ |
{ |
|
void sig_sent(); |
|
71 |
#ifdef HAVE_SIGACTION |
#ifdef HAVE_SIGACTION |
72 |
struct sigaction siga; |
struct sigaction siga; |
73 |
#else |
#else |
77 |
#endif |
#endif |
78 |
|
|
79 |
if (initscr() == NULL) |
if (initscr() == NULL) |
80 |
errx(1, "Terminal type unset or lacking necessary features."); |
error (1, 0, |
81 |
|
"Terminal type unset or lacking necessary features."); |
82 |
|
|
83 |
#ifdef HAVE_SIGACTION |
#ifdef HAVE_SIGACTION |
84 |
sigaction (SIGTSTP, (struct sigaction *)0, &siga); |
sigaction (SIGTSTP, (struct sigaction *)0, &siga); |
189 |
his_win.werase = buf[2]; |
his_win.werase = buf[2]; |
190 |
} |
} |
191 |
|
|
|
void |
|
|
sig_sent() |
|
|
{ |
|
|
|
|
|
message("Connection closing. Exiting"); |
|
|
quit(); |
|
|
} |
|
|
|
|
192 |
/* |
/* |
193 |
* All done talking...hang up the phone and reset terminal thingy's |
* All done talking...hang up the phone and reset terminal thingy's |
194 |
*/ |
*/ |