X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/8f9899ab8727d8a2173afe6a622e97c5cff386fc..4aca08ce404ffaa63000c218e8e042d7b27fbfcc:/sbr/read_switch_multiword.c diff --git a/sbr/read_switch_multiword.c b/sbr/read_switch_multiword.c index 67c5f33e..d13ae7a1 100644 --- a/sbr/read_switch_multiword.c +++ b/sbr/read_switch_multiword.c @@ -5,8 +5,11 @@ * complete copyright information. */ -#include -#include +#include "h/mh.h" +#include "brkstring.h" +#include "ambigsw.h" +#include "print_sw.h" +#include "h/signals.h" #include static char ansbuf[BUFSIZ]; @@ -25,12 +28,11 @@ read_switch_multiword (const char *prompt, const struct swit *ansp) SIGNAL_HANDLER istat = NULL; char *cp, **cpp; - if (!(sigsetjmp(sigenv, 1))) { - istat = SIGNAL (SIGINT, intrser); - } else { + if (sigsetjmp(sigenv, 1)) { SIGNAL (SIGINT, istat); return NULL; } + istat = SIGNAL (SIGINT, intrser); for (;;) { fputs(prompt, stdout);