Add %(unmailto) format function for List-Post headers
[mmh] / sbr / getans.c
index 919fd32..f3cea27 100644 (file)
@@ -10,6 +10,7 @@
 #include <h/signals.h>
 #include <setjmp.h>
 #include <signal.h>
+#include <unistd.h>
 
 static char ansbuf[BUFSIZ];
 static jmp_buf sigenv;
@@ -17,7 +18,7 @@ static jmp_buf sigenv;
 /*
 ** static prototypes
 */
-static RETSIGTYPE intrser(int);
+static void intrser(int);
 
 
 char **
@@ -52,25 +53,25 @@ getans(char *prompt, struct swit *ansp)
                }
                cpp = brkstring(ansbuf, " ", NULL);
                switch (smatch(*cpp, ansp)) {
-                       case AMBIGSW:
-                               ambigsw(*cpp, ansp);
-                               continue;
-                       case UNKWNSW:
-                               printf(" -%s unknown. Hit <CR> for help.\n", *cpp);
-                               continue;
-                       default:
-                               SIGNAL(SIGINT, istat);
-                               return cpp;
+               case AMBIGSW:
+                       ambigsw(*cpp, ansp);
+                       continue;
+               case UNKWNSW:
+                       printf(" -%s unknown. Hit <CR> for help.\n", *cpp);
+                       continue;
+               default:
+                       SIGNAL(SIGINT, istat);
+                       return cpp;
                }
        }
 }
 
 
-static RETSIGTYPE
+static void
 intrser(int i)
 {
        /*
        ** should this be siglongjmp?
        */
-       longjmp(sigenv, 1);
+       close(STDIN_FILENO);
 }