diff -ru ytalk-3.1.1/header.h ytalk/header.h --- ytalk-3.1.1/header.h Mon May 10 01:53:59 1999 +++ ytalk/header.h Wed Jan 16 10:20:56 2002 @@ -150,6 +150,7 @@ #define FL_CAPS 0x00000100L /* want caps as answers */ #define FL_NOAUTO 0x00000200L /* no auto-invite port */ #define FL_PROMPTRING 0x00000400L /* prompt before reringing */ +#define FL_ESC_YN 0x00001000L /* want ESC becfore y/n answers */ #define FL_LOCKED 0x40000000L /* flags locked by other end */ /* ---- defines and short-cuts ---- */ diff -ru ytalk-3.1.1/main.c ytalk/main.c --- ytalk-3.1.1/main.c Sun May 9 23:44:21 1999 +++ ytalk/main.c Wed Jan 16 10:22:00 2002 @@ -139,7 +139,7 @@ int argc; char **argv; { - int xflg = 0, sflg = 0, yflg = 0, iflg = 0; + int xflg = 0, sflg = 0, yflg = 0, iflg = 0, eflg = 0; char *prog; /* check for a 64-bit mis-compile */ @@ -169,6 +169,11 @@ yflg++; argv++, argc--; } + else if(strcmp(*argv, "-E") == 0) + { + eflg++; + argv++, argc--; + } else if(strcmp(*argv, "-i") == 0) { iflg++; @@ -198,6 +203,7 @@ Options: -i -- no auto-invite port\n\ -x -- do not use the X interface\n\ -Y -- require caps on all y/n answers\n\ + -E -- require before y/n answers\n\ -s -- start a shell\n\ -h host_or_ip -- select interface or virtual host\n", prog); (void)exit(YTE_INIT); @@ -225,6 +231,8 @@ def_flags &= ~FL_XWIN; if(yflg) def_flags |= FL_CAPS; + if(eflg) + def_flags |= FL_ESC_YN; if(iflg) def_flags |= FL_NOAUTO; diff -ru ytalk-3.1.1/menu.c ytalk/menu.c --- ytalk-3.1.1/menu.c Sat Nov 14 23:33:49 1998 +++ ytalk/menu.c Wed Jan 16 10:32:15 2002 @@ -890,7 +890,11 @@ char *prompt; { int out = 0; - + int esc_pressed = 0; + + if (!(def_flags&FL_ESC_YN)) + esc_pressed = 1; + yes_no_menu[0].func = NULL; yes_no_menu[0].key = ' '; @@ -907,6 +911,9 @@ kill_menu(); io_len = 0; } + for(; !esc_pressed && io_len > 0; io_len--, io_ptr++) + if (*io_ptr == 27) + esc_pressed = 1; for(; io_len > 0; io_len--, io_ptr++) { if(*io_ptr == 'Y' || (*io_ptr == 'y' && !(def_flags&FL_CAPS))) diff -ru ytalk-3.1.1/rc.c ytalk/rc.c --- ytalk-3.1.1/rc.c Mon May 10 01:53:31 1999 +++ ytalk/rc.c Thu Jan 17 13:52:09 2002 @@ -124,6 +124,9 @@ || strcmp(opt, "ni") == 0) mask |= FL_NOAUTO; + else if(strcmp(opt, "escape-yesno") == 0) + mask |= FL_ESC_YN; + if(!mask) return -1; diff -ru ytalk-3.1.1/ytalk.1 ytalk/ytalk.1 --- ytalk-3.1.1/ytalk.1 Mon May 10 02:45:47 1999 +++ ytalk/ytalk.1 Thu Jan 17 13:57:15 2002 @@ -12,7 +12,7 @@ .SH NAME ytalk - A multi-user chat program. .SH SYNOPSIS -ytalk [-x] [-s] [-Y] [-i] [-h hostname_or_ip] username... +ytalk [-x] [-s] [-Y] [-E] [-i] [-h hostname_or_ip] username... .SH DESCRIPTION .I YTalk V3.1.1 .PP @@ -56,6 +56,9 @@ The -Y option requires a capital Y or N as an answer to any yes/no question. .PP +The -E option requires you to press escape once before answering a +yes/no question (for those of us who type looking at the keyboard). +.PP For each user on the command line, YTalk will attempt to connect to the talk daemon on the specified user's host and determine if that user has left an invitation for you to call. If not, YTalk leaves an invitation for him @@ -246,11 +249,14 @@ .I noinvite , .I nodelay , .I asides , +.I escape-yesno , or .I X . Setting these options works just like described above. Turning .I X on or off will enable or disable the X11 Interface described below. +Turning escape-yesno on is equivalent to -E on the command line: it +will require you to hit escape before answering a yes/no question. For example, one could enable word-wrap with the line: .sp turn word-wrap on