This patch rips out the whole talk protection stuff as it can leave the terminal in 600 mode. Who uses talk anyways these days? ================================================================================ --- pine/init.c +++ pine/init.c @@ -3003,10 +3003,6 @@ F_QUELL_FULL_HDR_RESET, h_config_quell_full_hdr_reset, PREF_ACMD}, /* Adv user prefs */ -#if !defined(DOS) && !defined(OS2) - {"allow-talk", - F_ALLOW_TALK, h_config_allow_talk, PREF_MISC}, -#endif {"assume-slow-link", F_FORCE_LOW_SPEED, h_config_force_low_speed, PREF_OS_LWSD}, {"auto-move-read-msgs", --- pine/osdep/termin.unx +++ pine/osdep/termin.unx @@ -53,61 +53,10 @@ init_mouse(); #endif /* MOUSE */ - /* turn off talk permission by default */ - - if(F_ON(F_ALLOW_TALK, ps)) - allow_talk(ps); - else - disallow_talk(ps); - return(PineRaw(1)); } - -/*---------------------------------------------------------------------- - Set or clear the specified tty mode - - Args: ps -- struct pine - mode -- mode bits to modify - clear -- whether or not to clear or set - - Result: tty driver mode change. - ----------------------------------------------------------------------*/ -void -tty_chmod(ps, mode, func) - struct pine *ps; - int mode; - int func; -{ - char *tty_name; - int new_mode; - struct stat sbuf; - static int saved_mode = -1; - - /* if no problem figuring out tty's name & mode? */ - if((((tty_name = (char *) ttyname(STDIN_FD)) != NULL - && fstat(STDIN_FD, &sbuf) == 0) - || ((tty_name = (char *) ttyname(STDOUT_FD)) != NULL - && fstat(STDOUT_FD, &sbuf) == 0)) - && !(func == TMD_RESET && saved_mode < 0)){ - new_mode = (func == TMD_RESET) - ? saved_mode - : (func == TMD_CLEAR) - ? (sbuf.st_mode & ~mode) - : (sbuf.st_mode | mode); - /* assign tty new mode */ - if(chmod(tty_name, new_mode) == 0){ - if(func == TMD_RESET) /* forget we knew */ - saved_mode = -1; - else if(saved_mode < 0) - saved_mode = sbuf.st_mode; /* remember original */ - } - } -} - - - /*---------------------------------------------------------------------- End use of the tty, put it back into it's normal mode (UNIX) @@ -127,7 +76,6 @@ fflush(stdout); dprint(2, (debugfile, "about to end_tty_driver\n")); - tty_chmod(ps, 0, TMD_RESET); PineRaw(0); } --- pine/other.c +++ pine/other.c @@ -12196,14 +12196,6 @@ #endif #if !defined(DOS) && !defined(OS2) - case F_ALLOW_TALK : - if(F_ON(f->id, ps)) - allow_talk(ps); - else - disallow_talk(ps); - - break; - case F_PASS_CONTROL_CHARS : ps->pass_ctrl_chars = F_ON(F_PASS_CONTROL_CHARS,ps_global) ? 1 : 0; break; --- pine/pine.h +++ pine/pine.h @@ -1869,20 +1869,6 @@ /* - * Macros to aid hack to turn off talk permission. - * Bit 020 is usually used to turn off talk permission, we turn off - * 002 also for good measure, since some mesg commands seem to do that. - */ -#define TALK_BIT 020 /* mode bits */ -#define GM_BIT 002 -#define TMD_CLEAR 0 /* functions */ -#define TMD_SET 1 -#define TMD_RESET 2 -#define allow_talk(p) tty_chmod((p), TALK_BIT, TMD_SET) -#define disallow_talk(p) tty_chmod((p), TALK_BIT|GM_BIT, TMD_CLEAR) - - -/* * Macros to help set numeric pinerc variables. Defined here are the * allowed min and max values as well as the name of the var as it * should be displayed in error messages.