Allow hyphen in name of help item
[xboard.git] / dialogs.c
index 3279a5f..104f6c2 100644 (file)
--- a/dialogs.c
+++ b/dialogs.c
@@ -2156,6 +2156,25 @@ ConsoleAutoPopUp (char *buf)
        } else PopUpMoveDialog(*buf);
 }
 
+static Boolean noEcho;
+
+void
+EchoOn ()
+{
+    if(!noEcho) return;
+    system("stty echo");
+    WidgetEcho(&chatOptions[CHAT_IN], 1);
+    noEcho = False;
+}
+
+void
+EchoOff ()
+{
+    system("stty -echo");
+    WidgetEcho(&chatOptions[CHAT_IN], 0);
+    noEcho = True;
+}
+
 //--------------------------------- Game-List options dialog ------------------------------------------
 
 char *strings[LPUSERGLT_SIZE];
@@ -2443,7 +2462,7 @@ GetHelpText (FILE *f, char *name)
     int len, cnt = 0;
     snprintf(buf, MSG_SIZ, ".B %s", name);
     len = strlen(buf);
-    for(len=1; buf[len] == ' ' || isalpha(buf[len]) || isdigit(buf[len]); len++);
+    for(len=1; buf[len] == ' ' || buf[len] == '-' || isalpha(buf[len]) || isdigit(buf[len]); len++);
     buf[len] = NULLCHAR;
     while(buf[--len] == ' ') buf[len] = NULLCHAR;
     while((line = ReadLine(f))) {